Home | History | Annotate | Line # | Download | only in sparc
      1  1.1.1.2  christos #include "sparc_arch.h"
      2  1.1.1.2  christos 
      3  1.1.1.2  christos #ifdef	__arch64__
      4  1.1.1.2  christos .register	%g2,#scratch
      5  1.1.1.2  christos .register	%g3,#scratch
      6  1.1.1.2  christos #endif
      7  1.1.1.2  christos 
      8      1.1  christos .text
      9      1.1  christos 
     10      1.1  christos .globl	aes_t4_encrypt
     11      1.1  christos .align	32
     12      1.1  christos aes_t4_encrypt:
     13      1.1  christos 	andcc		%o0, 7, %g1		! is input aligned?
     14      1.1  christos 	andn		%o0, 7, %o0
     15      1.1  christos 
     16      1.1  christos 	ldx		[%o2 + 0], %g4
     17      1.1  christos 	ldx		[%o2 + 8], %g5
     18      1.1  christos 
     19      1.1  christos 	ldx		[%o0 + 0], %o4
     20      1.1  christos 	bz,pt		%icc, 1f
     21      1.1  christos 	ldx		[%o0 + 8], %o5
     22      1.1  christos 	ldx		[%o0 + 16], %o0
     23      1.1  christos 	sll		%g1, 3, %g1
     24      1.1  christos 	sub		%g0, %g1, %o3
     25      1.1  christos 	sllx		%o4, %g1, %o4
     26      1.1  christos 	sllx		%o5, %g1, %g1
     27      1.1  christos 	srlx		%o5, %o3, %o5
     28      1.1  christos 	srlx		%o0, %o3, %o3
     29      1.1  christos 	or		%o5, %o4, %o4
     30      1.1  christos 	or		%o3, %g1, %o5
     31      1.1  christos 1:
     32      1.1  christos 	ld		[%o2 + 240], %o3
     33      1.1  christos 	ldd		[%o2 + 16], %f12
     34      1.1  christos 	ldd		[%o2 + 24], %f14
     35      1.1  christos 	xor		%g4, %o4, %o4
     36      1.1  christos 	xor		%g5, %o5, %o5
     37      1.1  christos 	.word	0x81b0230c !movxtod	%o4,%f0
     38      1.1  christos 	.word	0x85b0230d !movxtod	%o5,%f2
     39      1.1  christos 	srl		%o3, 1, %o3
     40      1.1  christos 	ldd		[%o2 + 32], %f16
     41      1.1  christos 	sub		%o3, 1, %o3
     42      1.1  christos 	ldd		[%o2 + 40], %f18
     43      1.1  christos 	add		%o2, 48, %o2
     44      1.1  christos 
     45      1.1  christos .Lenc:
     46      1.1  christos 	.word	0x88cb0400 !aes_eround01	%f12,%f0,%f2,%f4
     47      1.1  christos 	.word	0x84cb8420 !aes_eround23	%f14,%f0,%f2,%f2
     48      1.1  christos 	ldd		[%o2 + 0], %f12
     49      1.1  christos 	ldd		[%o2 + 8], %f14
     50      1.1  christos 	sub		%o3,1,%o3
     51      1.1  christos 	.word	0x80cc0404 !aes_eround01	%f16,%f4,%f2,%f0
     52      1.1  christos 	.word	0x84cc8424 !aes_eround23	%f18,%f4,%f2,%f2
     53      1.1  christos 	ldd		[%o2 + 16], %f16
     54      1.1  christos 	ldd		[%o2 + 24], %f18
     55      1.1  christos 	brnz,pt		%o3, .Lenc
     56      1.1  christos 	add		%o2, 32, %o2
     57      1.1  christos 
     58      1.1  christos 	andcc		%o1, 7, %o4		! is output aligned?
     59      1.1  christos 	.word	0x88cb0400 !aes_eround01	%f12,%f0,%f2,%f4
     60      1.1  christos 	.word	0x84cb8420 !aes_eround23	%f14,%f0,%f2,%f2
     61      1.1  christos 	.word	0x80cc0484 !aes_eround01_l	%f16,%f4,%f2,%f0
     62      1.1  christos 	.word	0x84cc84a4 !aes_eround23_l	%f18,%f4,%f2,%f2
     63      1.1  christos 
     64      1.1  christos 	bnz,pn		%icc, 2f
     65      1.1  christos 	nop
     66      1.1  christos 
     67      1.1  christos 	std		%f0, [%o1 + 0]
     68      1.1  christos 	retl
     69      1.1  christos 	std		%f2, [%o1 + 8]
     70      1.1  christos 
     71      1.1  christos 2:	.word	0x93b24340 !alignaddrl	%o1,%g0,%o1
     72      1.1  christos 	mov		0xff, %o5
     73      1.1  christos 	srl		%o5, %o4, %o5
     74      1.1  christos 
     75      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4
     76      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
     77      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
     78      1.1  christos 
     79      1.1  christos 	stda		%f4, [%o1 + %o5]0xc0	! partial store
     80      1.1  christos 	std		%f6, [%o1 + 8]
     81      1.1  christos 	add		%o1, 16, %o1
     82      1.1  christos 	orn		%g0, %o5, %o5
     83      1.1  christos 	retl
     84      1.1  christos 	stda		%f8, [%o1 + %o5]0xc0	! partial store
     85      1.1  christos .type	aes_t4_encrypt,#function
     86      1.1  christos .size	aes_t4_encrypt,.-aes_t4_encrypt
     87      1.1  christos 
     88      1.1  christos .globl	aes_t4_decrypt
     89      1.1  christos .align	32
     90      1.1  christos aes_t4_decrypt:
     91      1.1  christos 	andcc		%o0, 7, %g1		! is input aligned?
     92      1.1  christos 	andn		%o0, 7, %o0
     93      1.1  christos 
     94      1.1  christos 	ldx		[%o2 + 0], %g4
     95      1.1  christos 	ldx		[%o2 + 8], %g5
     96      1.1  christos 
     97      1.1  christos 	ldx		[%o0 + 0], %o4
     98      1.1  christos 	bz,pt		%icc, 1f
     99      1.1  christos 	ldx		[%o0 + 8], %o5
    100      1.1  christos 	ldx		[%o0 + 16], %o0
    101      1.1  christos 	sll		%g1, 3, %g1
    102      1.1  christos 	sub		%g0, %g1, %o3
    103      1.1  christos 	sllx		%o4, %g1, %o4
    104      1.1  christos 	sllx		%o5, %g1, %g1
    105      1.1  christos 	srlx		%o5, %o3, %o5
    106      1.1  christos 	srlx		%o0, %o3, %o3
    107      1.1  christos 	or		%o5, %o4, %o4
    108      1.1  christos 	or		%o3, %g1, %o5
    109      1.1  christos 1:
    110      1.1  christos 	ld		[%o2 + 240], %o3
    111      1.1  christos 	ldd		[%o2 + 16], %f12
    112      1.1  christos 	ldd		[%o2 + 24], %f14
    113      1.1  christos 	xor		%g4, %o4, %o4
    114      1.1  christos 	xor		%g5, %o5, %o5
    115      1.1  christos 	.word	0x81b0230c !movxtod	%o4,%f0
    116      1.1  christos 	.word	0x85b0230d !movxtod	%o5,%f2
    117      1.1  christos 	srl		%o3, 1, %o3
    118      1.1  christos 	ldd		[%o2 + 32], %f16
    119      1.1  christos 	sub		%o3, 1, %o3
    120      1.1  christos 	ldd		[%o2 + 40], %f18
    121      1.1  christos 	add		%o2, 48, %o2
    122      1.1  christos 
    123      1.1  christos .Ldec:
    124      1.1  christos 	.word	0x88cb0440 !aes_dround01	%f12,%f0,%f2,%f4
    125      1.1  christos 	.word	0x84cb8460 !aes_dround23	%f14,%f0,%f2,%f2
    126      1.1  christos 	ldd		[%o2 + 0], %f12
    127      1.1  christos 	ldd		[%o2 + 8], %f14
    128      1.1  christos 	sub		%o3,1,%o3
    129      1.1  christos 	.word	0x80cc0444 !aes_dround01	%f16,%f4,%f2,%f0
    130      1.1  christos 	.word	0x84cc8464 !aes_dround23	%f18,%f4,%f2,%f2
    131      1.1  christos 	ldd		[%o2 + 16], %f16
    132      1.1  christos 	ldd		[%o2 + 24], %f18
    133      1.1  christos 	brnz,pt		%o3, .Ldec
    134      1.1  christos 	add		%o2, 32, %o2
    135      1.1  christos 
    136      1.1  christos 	andcc		%o1, 7, %o4		! is output aligned?
    137      1.1  christos 	.word	0x88cb0440 !aes_dround01	%f12,%f0,%f2,%f4
    138      1.1  christos 	.word	0x84cb8460 !aes_dround23	%f14,%f0,%f2,%f2
    139      1.1  christos 	.word	0x80cc04c4 !aes_dround01_l	%f16,%f4,%f2,%f0
    140      1.1  christos 	.word	0x84cc84e4 !aes_dround23_l	%f18,%f4,%f2,%f2
    141      1.1  christos 
    142      1.1  christos 	bnz,pn		%icc, 2f
    143      1.1  christos 	nop
    144      1.1  christos 
    145      1.1  christos 	std		%f0, [%o1 + 0]
    146      1.1  christos 	retl
    147      1.1  christos 	std		%f2, [%o1 + 8]
    148      1.1  christos 
    149      1.1  christos 2:	.word	0x93b24340 !alignaddrl	%o1,%g0,%o1
    150      1.1  christos 	mov		0xff, %o5
    151      1.1  christos 	srl		%o5, %o4, %o5
    152      1.1  christos 
    153      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4
    154      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
    155      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
    156      1.1  christos 
    157      1.1  christos 	stda		%f4, [%o1 + %o5]0xc0	! partial store
    158      1.1  christos 	std		%f6, [%o1 + 8]
    159      1.1  christos 	add		%o1, 16, %o1
    160      1.1  christos 	orn		%g0, %o5, %o5
    161      1.1  christos 	retl
    162      1.1  christos 	stda		%f8, [%o1 + %o5]0xc0	! partial store
    163      1.1  christos .type	aes_t4_decrypt,#function
    164      1.1  christos .size	aes_t4_decrypt,.-aes_t4_decrypt
    165      1.1  christos .globl	aes_t4_set_encrypt_key
    166      1.1  christos .align	32
    167      1.1  christos aes_t4_set_encrypt_key:
    168      1.1  christos .Lset_encrypt_key:
    169      1.1  christos 	and		%o0, 7, %o3
    170      1.1  christos 	.word	0x91b20300 !alignaddr	%o0,%g0,%o0
    171      1.1  christos 	cmp		%o1, 192
    172      1.1  christos 	ldd		[%o0 + 0], %f0
    173      1.1  christos 	bl,pt		%icc,.L128
    174      1.1  christos 	ldd		[%o0 + 8], %f2
    175      1.1  christos 
    176      1.1  christos 	be,pt		%icc,.L192
    177      1.1  christos 	ldd		[%o0 + 16], %f4
    178      1.1  christos 	brz,pt		%o3, .L256aligned
    179      1.1  christos 	ldd		[%o0 + 24], %f6
    180      1.1  christos 
    181      1.1  christos 	ldd		[%o0 + 32], %f8
    182      1.1  christos 	.word	0x81b00902 !faligndata	%f0,%f2,%f0
    183      1.1  christos 	.word	0x85b08904 !faligndata	%f2,%f4,%f2
    184      1.1  christos 	.word	0x89b10906 !faligndata	%f4,%f6,%f4
    185      1.1  christos 	.word	0x8db18908 !faligndata	%f6,%f8,%f6
    186      1.1  christos .L256aligned:
    187      1.1  christos 	std		%f0, [%o2 + 0]
    188      1.1  christos 	.word	0x80c80106 !aes_kexpand1	%f0,%f6,0,%f0
    189      1.1  christos 	std		%f2, [%o2 + 8]
    190      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    191      1.1  christos 	std		%f4, [%o2 + 16]
    192      1.1  christos 	.word	0x89b12602 !aes_kexpand0	%f4,%f2,%f4
    193      1.1  christos 	std		%f6, [%o2 + 24]
    194      1.1  christos 	.word	0x8db1a624 !aes_kexpand2	%f6,%f4,%f6
    195      1.1  christos 	std		%f0, [%o2 + 32]
    196      1.1  christos 	.word	0x80c80306 !aes_kexpand1	%f0,%f6,1,%f0
    197      1.1  christos 	std		%f2, [%o2 + 40]
    198      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    199      1.1  christos 	std		%f4, [%o2 + 48]
    200      1.1  christos 	.word	0x89b12602 !aes_kexpand0	%f4,%f2,%f4
    201      1.1  christos 	std		%f6, [%o2 + 56]
    202      1.1  christos 	.word	0x8db1a624 !aes_kexpand2	%f6,%f4,%f6
    203      1.1  christos 	std		%f0, [%o2 + 64]
    204      1.1  christos 	.word	0x80c80506 !aes_kexpand1	%f0,%f6,2,%f0
    205      1.1  christos 	std		%f2, [%o2 + 72]
    206      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    207      1.1  christos 	std		%f4, [%o2 + 80]
    208      1.1  christos 	.word	0x89b12602 !aes_kexpand0	%f4,%f2,%f4
    209      1.1  christos 	std		%f6, [%o2 + 88]
    210      1.1  christos 	.word	0x8db1a624 !aes_kexpand2	%f6,%f4,%f6
    211      1.1  christos 	std		%f0, [%o2 + 96]
    212      1.1  christos 	.word	0x80c80706 !aes_kexpand1	%f0,%f6,3,%f0
    213      1.1  christos 	std		%f2, [%o2 + 104]
    214      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    215      1.1  christos 	std		%f4, [%o2 + 112]
    216      1.1  christos 	.word	0x89b12602 !aes_kexpand0	%f4,%f2,%f4
    217      1.1  christos 	std		%f6, [%o2 + 120]
    218      1.1  christos 	.word	0x8db1a624 !aes_kexpand2	%f6,%f4,%f6
    219      1.1  christos 	std		%f0, [%o2 + 128]
    220      1.1  christos 	.word	0x80c80906 !aes_kexpand1	%f0,%f6,4,%f0
    221      1.1  christos 	std		%f2, [%o2 + 136]
    222      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    223      1.1  christos 	std		%f4, [%o2 + 144]
    224      1.1  christos 	.word	0x89b12602 !aes_kexpand0	%f4,%f2,%f4
    225      1.1  christos 	std		%f6, [%o2 + 152]
    226      1.1  christos 	.word	0x8db1a624 !aes_kexpand2	%f6,%f4,%f6
    227      1.1  christos 	std		%f0, [%o2 + 160]
    228      1.1  christos 	.word	0x80c80b06 !aes_kexpand1	%f0,%f6,5,%f0
    229      1.1  christos 	std		%f2, [%o2 + 168]
    230      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    231      1.1  christos 	std		%f4, [%o2 + 176]
    232      1.1  christos 	.word	0x89b12602 !aes_kexpand0	%f4,%f2,%f4
    233      1.1  christos 	std		%f6, [%o2 + 184]
    234      1.1  christos 	.word	0x8db1a624 !aes_kexpand2	%f6,%f4,%f6
    235      1.1  christos 	std		%f0, [%o2 + 192]
    236      1.1  christos 	.word	0x80c80d06 !aes_kexpand1	%f0,%f6,6,%f0
    237      1.1  christos 	std		%f2, [%o2 + 200]
    238      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    239      1.1  christos 	std		%f4, [%o2 + 208]
    240      1.1  christos 	std		%f6, [%o2 + 216]
    241      1.1  christos 	std		%f0, [%o2 + 224]
    242      1.1  christos 	std		%f2, [%o2 + 232]
    243      1.1  christos 
    244      1.1  christos 	mov		14, %o3
    245      1.1  christos 	st		%o3, [%o2 + 240]
    246      1.1  christos 	retl
    247      1.1  christos 	xor		%o0, %o0, %o0
    248      1.1  christos 
    249      1.1  christos .align	16
    250      1.1  christos .L192:
    251      1.1  christos 	brz,pt		%o3, .L192aligned
    252      1.1  christos 	nop
    253      1.1  christos 
    254      1.1  christos 	ldd		[%o0 + 24], %f6
    255      1.1  christos 	.word	0x81b00902 !faligndata	%f0,%f2,%f0
    256      1.1  christos 	.word	0x85b08904 !faligndata	%f2,%f4,%f2
    257      1.1  christos 	.word	0x89b10906 !faligndata	%f4,%f6,%f4
    258      1.1  christos .L192aligned:
    259      1.1  christos 	std		%f0, [%o2 + 0]
    260      1.1  christos 	.word	0x80c80104 !aes_kexpand1	%f0,%f4,0,%f0
    261      1.1  christos 	std		%f2, [%o2 + 8]
    262      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    263      1.1  christos 	std		%f4, [%o2 + 16]
    264      1.1  christos 	.word	0x89b12622 !aes_kexpand2	%f4,%f2,%f4
    265      1.1  christos 	std		%f0, [%o2 + 24]
    266      1.1  christos 	.word	0x80c80304 !aes_kexpand1	%f0,%f4,1,%f0
    267      1.1  christos 	std		%f2, [%o2 + 32]
    268      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    269      1.1  christos 	std		%f4, [%o2 + 40]
    270      1.1  christos 	.word	0x89b12622 !aes_kexpand2	%f4,%f2,%f4
    271      1.1  christos 	std		%f0, [%o2 + 48]
    272      1.1  christos 	.word	0x80c80504 !aes_kexpand1	%f0,%f4,2,%f0
    273      1.1  christos 	std		%f2, [%o2 + 56]
    274      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    275      1.1  christos 	std		%f4, [%o2 + 64]
    276      1.1  christos 	.word	0x89b12622 !aes_kexpand2	%f4,%f2,%f4
    277      1.1  christos 	std		%f0, [%o2 + 72]
    278      1.1  christos 	.word	0x80c80704 !aes_kexpand1	%f0,%f4,3,%f0
    279      1.1  christos 	std		%f2, [%o2 + 80]
    280      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    281      1.1  christos 	std		%f4, [%o2 + 88]
    282      1.1  christos 	.word	0x89b12622 !aes_kexpand2	%f4,%f2,%f4
    283      1.1  christos 	std		%f0, [%o2 + 96]
    284      1.1  christos 	.word	0x80c80904 !aes_kexpand1	%f0,%f4,4,%f0
    285      1.1  christos 	std		%f2, [%o2 + 104]
    286      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    287      1.1  christos 	std		%f4, [%o2 + 112]
    288      1.1  christos 	.word	0x89b12622 !aes_kexpand2	%f4,%f2,%f4
    289      1.1  christos 	std		%f0, [%o2 + 120]
    290      1.1  christos 	.word	0x80c80b04 !aes_kexpand1	%f0,%f4,5,%f0
    291      1.1  christos 	std		%f2, [%o2 + 128]
    292      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    293      1.1  christos 	std		%f4, [%o2 + 136]
    294      1.1  christos 	.word	0x89b12622 !aes_kexpand2	%f4,%f2,%f4
    295      1.1  christos 	std		%f0, [%o2 + 144]
    296      1.1  christos 	.word	0x80c80d04 !aes_kexpand1	%f0,%f4,6,%f0
    297      1.1  christos 	std		%f2, [%o2 + 152]
    298      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    299      1.1  christos 	std		%f4, [%o2 + 160]
    300      1.1  christos 	.word	0x89b12622 !aes_kexpand2	%f4,%f2,%f4
    301      1.1  christos 	std		%f0, [%o2 + 168]
    302      1.1  christos 	.word	0x80c80f04 !aes_kexpand1	%f0,%f4,7,%f0
    303      1.1  christos 	std		%f2, [%o2 + 176]
    304      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    305      1.1  christos 	std		%f4, [%o2 + 184]
    306      1.1  christos 	std		%f0, [%o2 + 192]
    307      1.1  christos 	std		%f2, [%o2 + 200]
    308      1.1  christos 
    309      1.1  christos 	mov		12, %o3
    310      1.1  christos 	st		%o3, [%o2 + 240]
    311      1.1  christos 	retl
    312      1.1  christos 	xor		%o0, %o0, %o0
    313      1.1  christos 
    314      1.1  christos .align	16
    315      1.1  christos .L128:
    316      1.1  christos 	brz,pt		%o3, .L128aligned
    317      1.1  christos 	nop
    318      1.1  christos 
    319      1.1  christos 	ldd		[%o0 + 16], %f4
    320      1.1  christos 	.word	0x81b00902 !faligndata	%f0,%f2,%f0
    321      1.1  christos 	.word	0x85b08904 !faligndata	%f2,%f4,%f2
    322      1.1  christos .L128aligned:
    323      1.1  christos 	std		%f0, [%o2 + 0]
    324      1.1  christos 	.word	0x80c80102 !aes_kexpand1	%f0,%f2,0,%f0
    325      1.1  christos 	std		%f2, [%o2 + 8]
    326      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    327      1.1  christos 	std		%f0, [%o2 + 16]
    328      1.1  christos 	.word	0x80c80302 !aes_kexpand1	%f0,%f2,1,%f0
    329      1.1  christos 	std		%f2, [%o2 + 24]
    330      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    331      1.1  christos 	std		%f0, [%o2 + 32]
    332      1.1  christos 	.word	0x80c80502 !aes_kexpand1	%f0,%f2,2,%f0
    333      1.1  christos 	std		%f2, [%o2 + 40]
    334      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    335      1.1  christos 	std		%f0, [%o2 + 48]
    336      1.1  christos 	.word	0x80c80702 !aes_kexpand1	%f0,%f2,3,%f0
    337      1.1  christos 	std		%f2, [%o2 + 56]
    338      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    339      1.1  christos 	std		%f0, [%o2 + 64]
    340      1.1  christos 	.word	0x80c80902 !aes_kexpand1	%f0,%f2,4,%f0
    341      1.1  christos 	std		%f2, [%o2 + 72]
    342      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    343      1.1  christos 	std		%f0, [%o2 + 80]
    344      1.1  christos 	.word	0x80c80b02 !aes_kexpand1	%f0,%f2,5,%f0
    345      1.1  christos 	std		%f2, [%o2 + 88]
    346      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    347      1.1  christos 	std		%f0, [%o2 + 96]
    348      1.1  christos 	.word	0x80c80d02 !aes_kexpand1	%f0,%f2,6,%f0
    349      1.1  christos 	std		%f2, [%o2 + 104]
    350      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    351      1.1  christos 	std		%f0, [%o2 + 112]
    352      1.1  christos 	.word	0x80c80f02 !aes_kexpand1	%f0,%f2,7,%f0
    353      1.1  christos 	std		%f2, [%o2 + 120]
    354      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    355      1.1  christos 	std		%f0, [%o2 + 128]
    356      1.1  christos 	.word	0x80c81102 !aes_kexpand1	%f0,%f2,8,%f0
    357      1.1  christos 	std		%f2, [%o2 + 136]
    358      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    359      1.1  christos 	std		%f0, [%o2 + 144]
    360      1.1  christos 	.word	0x80c81302 !aes_kexpand1	%f0,%f2,9,%f0
    361      1.1  christos 	std		%f2, [%o2 + 152]
    362      1.1  christos 	.word	0x85b0a620 !aes_kexpand2	%f2,%f0,%f2
    363      1.1  christos 	std		%f0, [%o2 + 160]
    364      1.1  christos 	std		%f2, [%o2 + 168]
    365      1.1  christos 
    366      1.1  christos 	mov		10, %o3
    367      1.1  christos 	st		%o3, [%o2 + 240]
    368      1.1  christos 	retl
    369      1.1  christos 	xor		%o0, %o0, %o0
    370      1.1  christos .type	aes_t4_set_encrypt_key,#function
    371      1.1  christos .size	aes_t4_set_encrypt_key,.-aes_t4_set_encrypt_key
    372      1.1  christos 
    373      1.1  christos .globl	aes_t4_set_decrypt_key
    374      1.1  christos .align	32
    375      1.1  christos aes_t4_set_decrypt_key:
    376      1.1  christos 	mov		%o7, %o5
    377      1.1  christos 	call		.Lset_encrypt_key
    378      1.1  christos 	nop
    379      1.1  christos 
    380      1.1  christos 	mov		%o5, %o7
    381      1.1  christos 	sll		%o3, 4, %o0		! %o3 is number of rounds
    382      1.1  christos 	add		%o3, 2, %o3
    383      1.1  christos 	add		%o2, %o0, %o0	! %o0=%o2+16*rounds
    384      1.1  christos 	srl		%o3, 2, %o3		! %o3=(rounds+2)/4
    385      1.1  christos 
    386      1.1  christos .Lkey_flip:
    387      1.1  christos 	ldd		[%o2 + 0],  %f0
    388      1.1  christos 	ldd		[%o2 + 8],  %f2
    389      1.1  christos 	ldd		[%o2 + 16], %f4
    390      1.1  christos 	ldd		[%o2 + 24], %f6
    391      1.1  christos 	ldd		[%o0 + 0],  %f8
    392      1.1  christos 	ldd		[%o0 + 8],  %f10
    393      1.1  christos 	ldd		[%o0 - 16], %f12
    394      1.1  christos 	ldd		[%o0 - 8],  %f14
    395      1.1  christos 	sub		%o3, 1, %o3
    396      1.1  christos 	std		%f0, [%o0 + 0]
    397      1.1  christos 	std		%f2, [%o0 + 8]
    398      1.1  christos 	std		%f4, [%o0 - 16]
    399      1.1  christos 	std		%f6, [%o0 - 8]
    400      1.1  christos 	std		%f8, [%o2 + 0]
    401      1.1  christos 	std		%f10, [%o2 + 8]
    402      1.1  christos 	std		%f12, [%o2 + 16]
    403      1.1  christos 	std		%f14, [%o2 + 24]
    404      1.1  christos 	add		%o2, 32, %o2
    405      1.1  christos 	brnz		%o3, .Lkey_flip
    406      1.1  christos 	sub		%o0, 32, %o0
    407      1.1  christos 
    408      1.1  christos 	retl
    409      1.1  christos 	xor		%o0, %o0, %o0
    410      1.1  christos .type	aes_t4_set_decrypt_key,#function
    411      1.1  christos .size	aes_t4_set_decrypt_key,.-aes_t4_set_decrypt_key
    412      1.1  christos .align	32
    413      1.1  christos _aes128_encrypt_1x:
    414      1.1  christos 	.word	0x88cc0400 !aes_eround01	%f16,%f0,%f2,%f4
    415      1.1  christos 	.word	0x84cc8420 !aes_eround23	%f18,%f0,%f2,%f2
    416      1.1  christos 	.word	0x80cd0404 !aes_eround01	%f20,%f4,%f2,%f0
    417      1.1  christos 	.word	0x84cd8424 !aes_eround23	%f22,%f4,%f2,%f2
    418      1.1  christos 	.word	0x88ce0400 !aes_eround01	%f24,%f0,%f2,%f4
    419      1.1  christos 	.word	0x84ce8420 !aes_eround23	%f26,%f0,%f2,%f2
    420      1.1  christos 	.word	0x80cf0404 !aes_eround01	%f28,%f4,%f2,%f0
    421      1.1  christos 	.word	0x84cf8424 !aes_eround23	%f30,%f4,%f2,%f2
    422      1.1  christos 	.word	0x88c84400 !aes_eround01	%f32,%f0,%f2,%f4
    423      1.1  christos 	.word	0x84c8c420 !aes_eround23	%f34,%f0,%f2,%f2
    424      1.1  christos 	.word	0x80c94404 !aes_eround01	%f36,%f4,%f2,%f0
    425      1.1  christos 	.word	0x84c9c424 !aes_eround23	%f38,%f4,%f2,%f2
    426      1.1  christos 	.word	0x88ca4400 !aes_eround01	%f40,%f0,%f2,%f4
    427      1.1  christos 	.word	0x84cac420 !aes_eround23	%f42,%f0,%f2,%f2
    428      1.1  christos 	.word	0x80cb4404 !aes_eround01	%f44,%f4,%f2,%f0
    429      1.1  christos 	.word	0x84cbc424 !aes_eround23	%f46,%f4,%f2,%f2
    430      1.1  christos 	.word	0x88cc4400 !aes_eround01	%f48,%f0,%f2,%f4
    431      1.1  christos 	.word	0x84ccc420 !aes_eround23	%f50,%f0,%f2,%f2
    432      1.1  christos 	.word	0x80cd4484 !aes_eround01_l	%f52,%f4,%f2,%f0
    433      1.1  christos 	retl
    434      1.1  christos 	.word	0x84cdc4a4 !aes_eround23_l	%f54,%f4,%f2,%f2
    435      1.1  christos .type	_aes128_encrypt_1x,#function
    436      1.1  christos .size	_aes128_encrypt_1x,.-_aes128_encrypt_1x
    437      1.1  christos 
    438      1.1  christos .align	32
    439      1.1  christos _aes128_encrypt_2x:
    440      1.1  christos 	.word	0x90cc0400 !aes_eround01	%f16,%f0,%f2,%f8
    441      1.1  christos 	.word	0x84cc8420 !aes_eround23	%f18,%f0,%f2,%f2
    442      1.1  christos 	.word	0x94cc0c04 !aes_eround01	%f16,%f4,%f6,%f10
    443      1.1  christos 	.word	0x8ccc8c24 !aes_eround23	%f18,%f4,%f6,%f6
    444      1.1  christos 	.word	0x80cd0408 !aes_eround01	%f20,%f8,%f2,%f0
    445      1.1  christos 	.word	0x84cd8428 !aes_eround23	%f22,%f8,%f2,%f2
    446      1.1  christos 	.word	0x88cd0c0a !aes_eround01	%f20,%f10,%f6,%f4
    447      1.1  christos 	.word	0x8ccd8c2a !aes_eround23	%f22,%f10,%f6,%f6
    448      1.1  christos 	.word	0x90ce0400 !aes_eround01	%f24,%f0,%f2,%f8
    449      1.1  christos 	.word	0x84ce8420 !aes_eround23	%f26,%f0,%f2,%f2
    450      1.1  christos 	.word	0x94ce0c04 !aes_eround01	%f24,%f4,%f6,%f10
    451      1.1  christos 	.word	0x8cce8c24 !aes_eround23	%f26,%f4,%f6,%f6
    452      1.1  christos 	.word	0x80cf0408 !aes_eround01	%f28,%f8,%f2,%f0
    453      1.1  christos 	.word	0x84cf8428 !aes_eround23	%f30,%f8,%f2,%f2
    454      1.1  christos 	.word	0x88cf0c0a !aes_eround01	%f28,%f10,%f6,%f4
    455      1.1  christos 	.word	0x8ccf8c2a !aes_eround23	%f30,%f10,%f6,%f6
    456      1.1  christos 	.word	0x90c84400 !aes_eround01	%f32,%f0,%f2,%f8
    457      1.1  christos 	.word	0x84c8c420 !aes_eround23	%f34,%f0,%f2,%f2
    458      1.1  christos 	.word	0x94c84c04 !aes_eround01	%f32,%f4,%f6,%f10
    459      1.1  christos 	.word	0x8cc8cc24 !aes_eround23	%f34,%f4,%f6,%f6
    460      1.1  christos 	.word	0x80c94408 !aes_eround01	%f36,%f8,%f2,%f0
    461      1.1  christos 	.word	0x84c9c428 !aes_eround23	%f38,%f8,%f2,%f2
    462      1.1  christos 	.word	0x88c94c0a !aes_eround01	%f36,%f10,%f6,%f4
    463      1.1  christos 	.word	0x8cc9cc2a !aes_eround23	%f38,%f10,%f6,%f6
    464      1.1  christos 	.word	0x90ca4400 !aes_eround01	%f40,%f0,%f2,%f8
    465      1.1  christos 	.word	0x84cac420 !aes_eround23	%f42,%f0,%f2,%f2
    466      1.1  christos 	.word	0x94ca4c04 !aes_eround01	%f40,%f4,%f6,%f10
    467      1.1  christos 	.word	0x8ccacc24 !aes_eround23	%f42,%f4,%f6,%f6
    468      1.1  christos 	.word	0x80cb4408 !aes_eround01	%f44,%f8,%f2,%f0
    469      1.1  christos 	.word	0x84cbc428 !aes_eround23	%f46,%f8,%f2,%f2
    470      1.1  christos 	.word	0x88cb4c0a !aes_eround01	%f44,%f10,%f6,%f4
    471      1.1  christos 	.word	0x8ccbcc2a !aes_eround23	%f46,%f10,%f6,%f6
    472      1.1  christos 	.word	0x90cc4400 !aes_eround01	%f48,%f0,%f2,%f8
    473      1.1  christos 	.word	0x84ccc420 !aes_eround23	%f50,%f0,%f2,%f2
    474      1.1  christos 	.word	0x94cc4c04 !aes_eround01	%f48,%f4,%f6,%f10
    475      1.1  christos 	.word	0x8ccccc24 !aes_eround23	%f50,%f4,%f6,%f6
    476      1.1  christos 	.word	0x80cd4488 !aes_eround01_l	%f52,%f8,%f2,%f0
    477      1.1  christos 	.word	0x84cdc4a8 !aes_eround23_l	%f54,%f8,%f2,%f2
    478      1.1  christos 	.word	0x88cd4c8a !aes_eround01_l	%f52,%f10,%f6,%f4
    479      1.1  christos 	retl
    480      1.1  christos 	.word	0x8ccdccaa !aes_eround23_l	%f54,%f10,%f6,%f6
    481      1.1  christos .type	_aes128_encrypt_2x,#function
    482      1.1  christos .size	_aes128_encrypt_2x,.-_aes128_encrypt_2x
    483      1.1  christos 
    484      1.1  christos .align	32
    485      1.1  christos _aes128_loadkey:
    486      1.1  christos 	ldx		[%i3 + 0], %g4
    487      1.1  christos 	ldx		[%i3 + 8], %g5
    488      1.1  christos 	ldd		[%i3 + 16], %f16
    489      1.1  christos 	ldd		[%i3 + 24], %f18
    490      1.1  christos 	ldd		[%i3 + 32], %f20
    491      1.1  christos 	ldd		[%i3 + 40], %f22
    492      1.1  christos 	ldd		[%i3 + 48], %f24
    493      1.1  christos 	ldd		[%i3 + 56], %f26
    494      1.1  christos 	ldd		[%i3 + 64], %f28
    495      1.1  christos 	ldd		[%i3 + 72], %f30
    496      1.1  christos 	ldd		[%i3 + 80], %f32
    497      1.1  christos 	ldd		[%i3 + 88], %f34
    498      1.1  christos 	ldd		[%i3 + 96], %f36
    499      1.1  christos 	ldd		[%i3 + 104], %f38
    500      1.1  christos 	ldd		[%i3 + 112], %f40
    501      1.1  christos 	ldd		[%i3 + 120], %f42
    502      1.1  christos 	ldd		[%i3 + 128], %f44
    503      1.1  christos 	ldd		[%i3 + 136], %f46
    504      1.1  christos 	ldd		[%i3 + 144], %f48
    505      1.1  christos 	ldd		[%i3 + 152], %f50
    506      1.1  christos 	ldd		[%i3 + 160], %f52
    507      1.1  christos 	ldd		[%i3 + 168], %f54
    508      1.1  christos 	retl
    509      1.1  christos 	nop
    510      1.1  christos .type	_aes128_loadkey,#function
    511      1.1  christos .size	_aes128_loadkey,.-_aes128_loadkey
    512      1.1  christos _aes128_load_enckey=_aes128_loadkey
    513      1.1  christos _aes128_load_deckey=_aes128_loadkey
    514      1.1  christos 
    515      1.1  christos .globl	aes128_t4_cbc_encrypt
    516      1.1  christos .align	32
    517      1.1  christos aes128_t4_cbc_encrypt:
    518  1.1.1.2  christos 	save		%sp, -STACK_FRAME, %sp
    519      1.1  christos 	cmp		%i2, 0
    520  1.1.1.2  christos 	be,pn		SIZE_T_CC, .L128_cbc_enc_abort
    521      1.1  christos 	srln		%i2, 0, %i2		! needed on v8+, "nop" on v9
    522      1.1  christos 	sub		%i0, %i1, %l5	! %i0!=%i1
    523      1.1  christos 	ld		[%i4 + 0], %f0
    524      1.1  christos 	ld		[%i4 + 4], %f1
    525      1.1  christos 	ld		[%i4 + 8], %f2
    526      1.1  christos 	ld		[%i4 + 12], %f3
    527      1.1  christos 	prefetch	[%i0], 20
    528      1.1  christos 	prefetch	[%i0 + 63], 20
    529      1.1  christos 	call		_aes128_load_enckey
    530      1.1  christos 	and		%i0, 7, %l0
    531      1.1  christos 	andn		%i0, 7, %i0
    532      1.1  christos 	sll		%l0, 3, %l0
    533      1.1  christos 	mov		64, %l1
    534      1.1  christos 	mov		0xff, %l3
    535      1.1  christos 	sub		%l1, %l0, %l1
    536      1.1  christos 	and		%i1, 7, %l2
    537      1.1  christos 	cmp		%i2, 127
    538      1.1  christos 	movrnz		%l2, 0, %l5		! if (	%i1&7 ||
    539  1.1.1.2  christos 	movleu		SIZE_T_CC, 0, %l5	!	%i2<128 ||
    540      1.1  christos 	brnz,pn		%l5, .L128cbc_enc_blk	!	%i0==%i1)
    541      1.1  christos 	srl		%l3, %l2, %l3
    542      1.1  christos 
    543      1.1  christos 	.word	0xb3b64340 !alignaddrl	%i1,%g0,%i1
    544      1.1  christos 	srlx		%i2, 4, %i2
    545      1.1  christos 	prefetch	[%i1], 22
    546      1.1  christos 
    547      1.1  christos .L128_cbc_enc_loop:
    548      1.1  christos 	ldx		[%i0 + 0], %o0
    549      1.1  christos 	brz,pt		%l0, 4f
    550      1.1  christos 	ldx		[%i0 + 8], %o1
    551      1.1  christos 
    552      1.1  christos 	ldx		[%i0 + 16], %o2
    553      1.1  christos 	sllx		%o0, %l0, %o0
    554      1.1  christos 	srlx		%o1, %l1, %g1
    555      1.1  christos 	sllx		%o1, %l0, %o1
    556      1.1  christos 	or		%g1, %o0, %o0
    557      1.1  christos 	srlx		%o2, %l1, %o2
    558      1.1  christos 	or		%o2, %o1, %o1
    559      1.1  christos 4:
    560      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
    561      1.1  christos 	xor		%g5, %o1, %o1
    562      1.1  christos 	.word	0x99b02308 !movxtod	%o0,%f12
    563      1.1  christos 	.word	0x9db02309 !movxtod	%o1,%f14
    564      1.1  christos 
    565      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
    566      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
    567      1.1  christos 	prefetch	[%i1 + 63], 22
    568      1.1  christos 	prefetch	[%i0 + 16+63], 20
    569      1.1  christos 	call		_aes128_encrypt_1x
    570      1.1  christos 	add		%i0, 16, %i0
    571      1.1  christos 
    572      1.1  christos 	brnz,pn		%l2, 2f
    573      1.1  christos 	sub		%i2, 1, %i2
    574  1.1.1.2  christos 
    575      1.1  christos 	std		%f0, [%i1 + 0]
    576      1.1  christos 	std		%f2, [%i1 + 8]
    577      1.1  christos 	brnz,pt		%i2, .L128_cbc_enc_loop
    578      1.1  christos 	add		%i1, 16, %i1
    579      1.1  christos 	st		%f0, [%i4 + 0]
    580      1.1  christos 	st		%f1, [%i4 + 4]
    581      1.1  christos 	st		%f2, [%i4 + 8]
    582      1.1  christos 	st		%f3, [%i4 + 12]
    583      1.1  christos .L128_cbc_enc_abort:
    584      1.1  christos 	ret
    585      1.1  christos 	restore
    586      1.1  christos 
    587      1.1  christos .align	16
    588      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
    589      1.1  christos 						! and ~3x deterioration
    590      1.1  christos 						! in inp==out case
    591      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4		! handle unaligned output
    592      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
    593      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
    594      1.1  christos 
    595      1.1  christos 	stda		%f4, [%i1 + %l3]0xc0	! partial store
    596      1.1  christos 	std		%f6, [%i1 + 8]
    597      1.1  christos 	add		%i1, 16, %i1
    598      1.1  christos 	orn		%g0, %l3, %l3
    599      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
    600      1.1  christos 
    601      1.1  christos 	brnz,pt		%i2, .L128_cbc_enc_loop+4
    602      1.1  christos 	orn		%g0, %l3, %l3
    603      1.1  christos 	st		%f0, [%i4 + 0]
    604      1.1  christos 	st		%f1, [%i4 + 4]
    605      1.1  christos 	st		%f2, [%i4 + 8]
    606      1.1  christos 	st		%f3, [%i4 + 12]
    607      1.1  christos 	ret
    608      1.1  christos 	restore
    609      1.1  christos 
    610      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    611      1.1  christos .align	32
    612      1.1  christos .L128cbc_enc_blk:
    613      1.1  christos 	add	%i1, %i2, %l5
    614      1.1  christos 	and	%l5, 63, %l5	! tail
    615      1.1  christos 	sub	%i2, %l5, %i2
    616      1.1  christos 	add	%l5, 15, %l5	! round up to 16n
    617      1.1  christos 	srlx	%i2, 4, %i2
    618      1.1  christos 	srl	%l5, 4, %l5
    619      1.1  christos 
    620      1.1  christos .L128_cbc_enc_blk_loop:
    621      1.1  christos 	ldx		[%i0 + 0], %o0
    622      1.1  christos 	brz,pt		%l0, 5f
    623      1.1  christos 	ldx		[%i0 + 8], %o1
    624      1.1  christos 
    625      1.1  christos 	ldx		[%i0 + 16], %o2
    626      1.1  christos 	sllx		%o0, %l0, %o0
    627      1.1  christos 	srlx		%o1, %l1, %g1
    628      1.1  christos 	sllx		%o1, %l0, %o1
    629      1.1  christos 	or		%g1, %o0, %o0
    630      1.1  christos 	srlx		%o2, %l1, %o2
    631      1.1  christos 	or		%o2, %o1, %o1
    632      1.1  christos 5:
    633      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
    634      1.1  christos 	xor		%g5, %o1, %o1
    635      1.1  christos 	.word	0x99b02308 !movxtod	%o0,%f12
    636      1.1  christos 	.word	0x9db02309 !movxtod	%o1,%f14
    637      1.1  christos 
    638      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
    639      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
    640      1.1  christos 	prefetch	[%i0 + 16+63], 20
    641      1.1  christos 	call		_aes128_encrypt_1x
    642      1.1  christos 	add		%i0, 16, %i0
    643      1.1  christos 	sub		%i2, 1, %i2
    644  1.1.1.2  christos 
    645      1.1  christos 	stda		%f0, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
    646      1.1  christos 	add		%i1, 8, %i1
    647      1.1  christos 	stda		%f2, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
    648      1.1  christos 	brnz,pt		%i2, .L128_cbc_enc_blk_loop
    649      1.1  christos 	add		%i1, 8, %i1
    650      1.1  christos 
    651      1.1  christos 	membar		#StoreLoad|#StoreStore
    652      1.1  christos 	brnz,pt		%l5, .L128_cbc_enc_loop
    653      1.1  christos 	mov		%l5, %i2
    654      1.1  christos 	st		%f0, [%i4 + 0]
    655      1.1  christos 	st		%f1, [%i4 + 4]
    656      1.1  christos 	st		%f2, [%i4 + 8]
    657      1.1  christos 	st		%f3, [%i4 + 12]
    658      1.1  christos 	ret
    659      1.1  christos 	restore
    660      1.1  christos .type	aes128_t4_cbc_encrypt,#function
    661      1.1  christos .size	aes128_t4_cbc_encrypt,.-aes128_t4_cbc_encrypt
    662      1.1  christos .globl	aes128_t4_ctr32_encrypt
    663      1.1  christos .align	32
    664      1.1  christos aes128_t4_ctr32_encrypt:
    665  1.1.1.2  christos 	save		%sp, -STACK_FRAME, %sp
    666      1.1  christos 	srln		%i2, 0, %i2		! needed on v8+, "nop" on v9
    667      1.1  christos 
    668      1.1  christos 	prefetch	[%i0], 20
    669      1.1  christos 	prefetch	[%i0 + 63], 20
    670      1.1  christos 	call		_aes128_load_enckey
    671      1.1  christos 	sllx		%i2, 4, %i2
    672      1.1  christos 
    673      1.1  christos 	ld		[%i4 + 0], %l4	! counter
    674      1.1  christos 	ld		[%i4 + 4], %l5
    675      1.1  christos 	ld		[%i4 + 8], %l6
    676      1.1  christos 	ld		[%i4 + 12], %l7
    677      1.1  christos 
    678      1.1  christos 	sllx		%l4, 32, %o5
    679      1.1  christos 	or		%l5, %o5, %o5
    680      1.1  christos 	sllx		%l6, 32, %g1
    681      1.1  christos 	xor		%o5, %g4, %g4		! ^= rk[0]
    682      1.1  christos 	xor		%g1, %g5, %g5
    683      1.1  christos 	.word	0x9db02304 !movxtod	%g4,%f14		! most significant 64 bits
    684      1.1  christos 
    685      1.1  christos 	sub		%i0, %i1, %l5	! %i0!=%i1
    686      1.1  christos 	and		%i0, 7, %l0
    687      1.1  christos 	andn		%i0, 7, %i0
    688      1.1  christos 	sll		%l0, 3, %l0
    689      1.1  christos 	mov		64, %l1
    690      1.1  christos 	mov		0xff, %l3
    691      1.1  christos 	sub		%l1, %l0, %l1
    692      1.1  christos 	and		%i1, 7, %l2
    693      1.1  christos 	cmp		%i2, 255
    694      1.1  christos 	movrnz		%l2, 0, %l5		! if (	%i1&7 ||
    695  1.1.1.2  christos 	movleu		SIZE_T_CC, 0, %l5	!	%i2<256 ||
    696      1.1  christos 	brnz,pn		%l5, .L128_ctr32_blk	!	%i0==%i1)
    697      1.1  christos 	srl		%l3, %l2, %l3
    698      1.1  christos 
    699      1.1  christos 	andcc		%i2, 16, %g0		! is number of blocks even?
    700      1.1  christos 	.word	0xb3b64340 !alignaddrl	%i1,%g0,%i1
    701      1.1  christos 	bz		%icc, .L128_ctr32_loop2x
    702      1.1  christos 	srlx		%i2, 4, %i2
    703      1.1  christos .L128_ctr32_loop:
    704      1.1  christos 	ldx		[%i0 + 0], %o0
    705      1.1  christos 	brz,pt		%l0, 4f
    706      1.1  christos 	ldx		[%i0 + 8], %o1
    707      1.1  christos 
    708      1.1  christos 	ldx		[%i0 + 16], %o2
    709      1.1  christos 	sllx		%o0, %l0, %o0
    710      1.1  christos 	srlx		%o1, %l1, %g1
    711      1.1  christos 	sllx		%o1, %l0, %o1
    712      1.1  christos 	or		%g1, %o0, %o0
    713      1.1  christos 	srlx		%o2, %l1, %o2
    714      1.1  christos 	or		%o2, %o1, %o1
    715      1.1  christos 4:
    716      1.1  christos 	xor		%g5, %l7, %g1		! ^= rk[0]
    717      1.1  christos 	add		%l7, 1, %l7
    718      1.1  christos 	.word	0x85b02301 !movxtod	%g1,%f2
    719      1.1  christos 	srl		%l7, 0, %l7		! clruw
    720      1.1  christos 	prefetch	[%i1 + 63], 22
    721      1.1  christos 	prefetch	[%i0 + 16+63], 20
    722      1.1  christos 	.word	0x88cc040e !aes_eround01	%f16,%f14,%f2,%f4
    723      1.1  christos 	.word	0x84cc842e !aes_eround23	%f18,%f14,%f2,%f2
    724      1.1  christos 	call		_aes128_encrypt_1x+8
    725      1.1  christos 	add		%i0, 16, %i0
    726      1.1  christos 
    727      1.1  christos 	.word	0x95b02308 !movxtod	%o0,%f10
    728      1.1  christos 	.word	0x99b02309 !movxtod	%o1,%f12
    729      1.1  christos 	.word	0x81b28d80 !fxor	%f10,%f0,%f0		! ^= inp
    730      1.1  christos 	.word	0x85b30d82 !fxor	%f12,%f2,%f2
    731      1.1  christos 
    732      1.1  christos 	brnz,pn		%l2, 2f
    733      1.1  christos 	sub		%i2, 1, %i2
    734  1.1.1.2  christos 
    735      1.1  christos 	std		%f0, [%i1 + 0]
    736      1.1  christos 	std		%f2, [%i1 + 8]
    737      1.1  christos 	brnz,pt		%i2, .L128_ctr32_loop2x
    738      1.1  christos 	add		%i1, 16, %i1
    739      1.1  christos 
    740      1.1  christos 	ret
    741      1.1  christos 	restore
    742      1.1  christos 
    743      1.1  christos .align	16
    744      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
    745      1.1  christos 						! and ~3x deterioration
    746      1.1  christos 						! in inp==out case
    747      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4		! handle unaligned output
    748      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
    749      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
    750      1.1  christos 	stda		%f4, [%i1 + %l3]0xc0	! partial store
    751      1.1  christos 	std		%f6, [%i1 + 8]
    752      1.1  christos 	add		%i1, 16, %i1
    753      1.1  christos 	orn		%g0, %l3, %l3
    754      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
    755      1.1  christos 
    756      1.1  christos 	brnz,pt		%i2, .L128_ctr32_loop2x+4
    757      1.1  christos 	orn		%g0, %l3, %l3
    758      1.1  christos 
    759      1.1  christos 	ret
    760      1.1  christos 	restore
    761      1.1  christos 
    762      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    763      1.1  christos .align	32
    764      1.1  christos .L128_ctr32_loop2x:
    765      1.1  christos 	ldx		[%i0 + 0], %o0
    766      1.1  christos 	ldx		[%i0 + 8], %o1
    767      1.1  christos 	ldx		[%i0 + 16], %o2
    768      1.1  christos 	brz,pt		%l0, 4f
    769      1.1  christos 	ldx		[%i0 + 24], %o3
    770      1.1  christos 
    771      1.1  christos 	ldx		[%i0 + 32], %o4
    772      1.1  christos 	sllx		%o0, %l0, %o0
    773      1.1  christos 	srlx		%o1, %l1, %g1
    774      1.1  christos 	or		%g1, %o0, %o0
    775      1.1  christos 	sllx		%o1, %l0, %o1
    776      1.1  christos 	srlx		%o2, %l1, %g1
    777      1.1  christos 	or		%g1, %o1, %o1
    778      1.1  christos 	sllx		%o2, %l0, %o2
    779      1.1  christos 	srlx		%o3, %l1, %g1
    780      1.1  christos 	or		%g1, %o2, %o2
    781      1.1  christos 	sllx		%o3, %l0, %o3
    782      1.1  christos 	srlx		%o4, %l1, %o4
    783      1.1  christos 	or		%o4, %o3, %o3
    784      1.1  christos 4:
    785      1.1  christos 	xor		%g5, %l7, %g1		! ^= rk[0]
    786      1.1  christos 	add		%l7, 1, %l7
    787      1.1  christos 	.word	0x85b02301 !movxtod	%g1,%f2
    788      1.1  christos 	srl		%l7, 0, %l7		! clruw
    789      1.1  christos 	xor		%g5, %l7, %g1
    790      1.1  christos 	add		%l7, 1, %l7
    791      1.1  christos 	.word	0x8db02301 !movxtod	%g1,%f6
    792      1.1  christos 	srl		%l7, 0, %l7		! clruw
    793      1.1  christos 	prefetch	[%i1 + 63], 22
    794      1.1  christos 	prefetch	[%i0 + 32+63], 20
    795      1.1  christos 	.word	0x90cc040e !aes_eround01	%f16,%f14,%f2,%f8
    796      1.1  christos 	.word	0x84cc842e !aes_eround23	%f18,%f14,%f2,%f2
    797      1.1  christos 	.word	0x94cc0c0e !aes_eround01	%f16,%f14,%f6,%f10
    798      1.1  christos 	.word	0x8ccc8c2e !aes_eround23	%f18,%f14,%f6,%f6
    799      1.1  christos 	call		_aes128_encrypt_2x+16
    800      1.1  christos 	add		%i0, 32, %i0
    801      1.1  christos 
    802      1.1  christos 	.word	0x91b02308 !movxtod	%o0,%f8
    803      1.1  christos 	.word	0x95b02309 !movxtod	%o1,%f10
    804      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
    805      1.1  christos 	.word	0x81b20d80 !fxor	%f8,%f0,%f0		! ^= inp
    806      1.1  christos 	.word	0x91b0230b !movxtod	%o3,%f8
    807      1.1  christos 	.word	0x85b28d82 !fxor	%f10,%f2,%f2
    808      1.1  christos 	.word	0x89b30d84 !fxor	%f12,%f4,%f4
    809      1.1  christos 	.word	0x8db20d86 !fxor	%f8,%f6,%f6
    810      1.1  christos 
    811      1.1  christos 	brnz,pn		%l2, 2f
    812      1.1  christos 	sub		%i2, 2, %i2
    813  1.1.1.2  christos 
    814      1.1  christos 	std		%f0, [%i1 + 0]
    815      1.1  christos 	std		%f2, [%i1 + 8]
    816      1.1  christos 	std		%f4, [%i1 + 16]
    817      1.1  christos 	std		%f6, [%i1 + 24]
    818      1.1  christos 	brnz,pt		%i2, .L128_ctr32_loop2x
    819      1.1  christos 	add		%i1, 32, %i1
    820      1.1  christos 
    821      1.1  christos 	ret
    822      1.1  christos 	restore
    823      1.1  christos 
    824      1.1  christos .align	16
    825      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
    826      1.1  christos 						! and ~3x deterioration
    827      1.1  christos 						! in inp==out case
    828      1.1  christos 	.word	0x91b00900 !faligndata	%f0,%f0,%f8		! handle unaligned output
    829      1.1  christos 	.word	0x81b00902 !faligndata	%f0,%f2,%f0
    830      1.1  christos 	.word	0x85b08904 !faligndata	%f2,%f4,%f2
    831      1.1  christos 	.word	0x89b10906 !faligndata	%f4,%f6,%f4
    832      1.1  christos 	.word	0x8db18906 !faligndata	%f6,%f6,%f6
    833      1.1  christos 
    834      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
    835      1.1  christos 	std		%f0, [%i1 + 8]
    836      1.1  christos 	std		%f2, [%i1 + 16]
    837      1.1  christos 	std		%f4, [%i1 + 24]
    838      1.1  christos 	add		%i1, 32, %i1
    839      1.1  christos 	orn		%g0, %l3, %l3
    840      1.1  christos 	stda		%f6, [%i1 + %l3]0xc0	! partial store
    841      1.1  christos 
    842      1.1  christos 	brnz,pt		%i2, .L128_ctr32_loop2x+4
    843      1.1  christos 	orn		%g0, %l3, %l3
    844      1.1  christos 
    845      1.1  christos 	ret
    846      1.1  christos 	restore
    847      1.1  christos 
    848      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    849      1.1  christos .align	32
    850      1.1  christos .L128_ctr32_blk:
    851      1.1  christos 	add	%i1, %i2, %l5
    852      1.1  christos 	and	%l5, 63, %l5	! tail
    853      1.1  christos 	sub	%i2, %l5, %i2
    854      1.1  christos 	add	%l5, 15, %l5	! round up to 16n
    855      1.1  christos 	srlx	%i2, 4, %i2
    856      1.1  christos 	srl	%l5, 4, %l5
    857      1.1  christos 	sub	%i2, 1, %i2
    858      1.1  christos 	add	%l5, 1, %l5
    859      1.1  christos 
    860      1.1  christos .L128_ctr32_blk_loop2x:
    861      1.1  christos 	ldx		[%i0 + 0], %o0
    862      1.1  christos 	ldx		[%i0 + 8], %o1
    863      1.1  christos 	ldx		[%i0 + 16], %o2
    864      1.1  christos 	brz,pt		%l0, 5f
    865      1.1  christos 	ldx		[%i0 + 24], %o3
    866      1.1  christos 
    867      1.1  christos 	ldx		[%i0 + 32], %o4
    868      1.1  christos 	sllx		%o0, %l0, %o0
    869      1.1  christos 	srlx		%o1, %l1, %g1
    870      1.1  christos 	or		%g1, %o0, %o0
    871      1.1  christos 	sllx		%o1, %l0, %o1
    872      1.1  christos 	srlx		%o2, %l1, %g1
    873      1.1  christos 	or		%g1, %o1, %o1
    874      1.1  christos 	sllx		%o2, %l0, %o2
    875      1.1  christos 	srlx		%o3, %l1, %g1
    876      1.1  christos 	or		%g1, %o2, %o2
    877      1.1  christos 	sllx		%o3, %l0, %o3
    878      1.1  christos 	srlx		%o4, %l1, %o4
    879      1.1  christos 	or		%o4, %o3, %o3
    880      1.1  christos 5:
    881      1.1  christos 	xor		%g5, %l7, %g1		! ^= rk[0]
    882      1.1  christos 	add		%l7, 1, %l7
    883      1.1  christos 	.word	0x85b02301 !movxtod	%g1,%f2
    884      1.1  christos 	srl		%l7, 0, %l7		! clruw
    885      1.1  christos 	xor		%g5, %l7, %g1
    886      1.1  christos 	add		%l7, 1, %l7
    887      1.1  christos 	.word	0x8db02301 !movxtod	%g1,%f6
    888      1.1  christos 	srl		%l7, 0, %l7		! clruw
    889      1.1  christos 	prefetch	[%i0 + 32+63], 20
    890      1.1  christos 	.word	0x90cc040e !aes_eround01	%f16,%f14,%f2,%f8
    891      1.1  christos 	.word	0x84cc842e !aes_eround23	%f18,%f14,%f2,%f2
    892      1.1  christos 	.word	0x94cc0c0e !aes_eround01	%f16,%f14,%f6,%f10
    893      1.1  christos 	.word	0x8ccc8c2e !aes_eround23	%f18,%f14,%f6,%f6
    894      1.1  christos 	call		_aes128_encrypt_2x+16
    895      1.1  christos 	add		%i0, 32, %i0
    896      1.1  christos 	subcc		%i2, 2, %i2
    897      1.1  christos 
    898      1.1  christos 	.word	0x91b02308 !movxtod	%o0,%f8
    899      1.1  christos 	.word	0x95b02309 !movxtod	%o1,%f10
    900      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
    901      1.1  christos 	.word	0x81b20d80 !fxor	%f8,%f0,%f0		! ^= inp
    902      1.1  christos 	.word	0x91b0230b !movxtod	%o3,%f8
    903      1.1  christos 	.word	0x85b28d82 !fxor	%f10,%f2,%f2
    904      1.1  christos 	.word	0x89b30d84 !fxor	%f12,%f4,%f4
    905      1.1  christos 	.word	0x8db20d86 !fxor	%f8,%f6,%f6
    906      1.1  christos 
    907      1.1  christos 	stda		%f0, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
    908      1.1  christos 	add		%i1, 8, %i1
    909      1.1  christos 	stda		%f2, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
    910      1.1  christos 	add		%i1, 8, %i1
    911      1.1  christos 	stda		%f4, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
    912      1.1  christos 	add		%i1, 8, %i1
    913      1.1  christos 	stda		%f6, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
    914  1.1.1.2  christos 	bgu,pt		SIZE_T_CC, .L128_ctr32_blk_loop2x
    915      1.1  christos 	add		%i1, 8, %i1
    916      1.1  christos 
    917      1.1  christos 	add		%l5, %i2, %i2
    918      1.1  christos 	andcc		%i2, 1, %g0		! is number of blocks even?
    919      1.1  christos 	membar		#StoreLoad|#StoreStore
    920      1.1  christos 	bnz,pt		%icc, .L128_ctr32_loop
    921      1.1  christos 	srl		%i2, 0, %i2
    922      1.1  christos 	brnz,pn		%i2, .L128_ctr32_loop2x
    923      1.1  christos 	nop
    924      1.1  christos 
    925      1.1  christos 	ret
    926      1.1  christos 	restore
    927      1.1  christos .type	aes128_t4_ctr32_encrypt,#function
    928      1.1  christos .size	aes128_t4_ctr32_encrypt,.-aes128_t4_ctr32_encrypt
    929      1.1  christos .globl	aes128_t4_xts_encrypt
    930      1.1  christos .align	32
    931      1.1  christos aes128_t4_xts_encrypt:
    932  1.1.1.2  christos 	save		%sp, -STACK_FRAME-16, %sp
    933      1.1  christos 	srln		%i2, 0, %i2		! needed on v8+, "nop" on v9
    934      1.1  christos 
    935      1.1  christos 	mov		%i5, %o0
    936  1.1.1.2  christos 	add		%fp, STACK_BIAS-16, %o1
    937      1.1  christos 	call		aes_t4_encrypt
    938      1.1  christos 	mov		%i4, %o2
    939      1.1  christos 
    940  1.1.1.2  christos 	add		%fp, STACK_BIAS-16, %l7
    941      1.1  christos 	ldxa		[%l7]0x88, %g2
    942  1.1.1.2  christos 	add		%fp, STACK_BIAS-8, %l7
    943      1.1  christos 	ldxa		[%l7]0x88, %g3		! %g3:%g2 is tweak
    944      1.1  christos 
    945      1.1  christos 	sethi		%hi(0x76543210), %l7
    946      1.1  christos 	or		%l7, %lo(0x76543210), %l7
    947      1.1  christos 	.word	0x81b5c320 !bmask	%l7,%g0,%g0		! byte swap mask
    948      1.1  christos 
    949      1.1  christos 	prefetch	[%i0], 20
    950      1.1  christos 	prefetch	[%i0 + 63], 20
    951      1.1  christos 	call		_aes128_load_enckey
    952      1.1  christos 	and		%i2, 15,  %i5
    953      1.1  christos 	and		%i2, -16, %i2
    954      1.1  christos 
    955      1.1  christos 	sub		%i0, %i1, %l5	! %i0!=%i1
    956      1.1  christos 	and		%i0, 7, %l0
    957      1.1  christos 	andn		%i0, 7, %i0
    958      1.1  christos 	sll		%l0, 3, %l0
    959      1.1  christos 	mov		64, %l1
    960      1.1  christos 	mov		0xff, %l3
    961      1.1  christos 	sub		%l1, %l0, %l1
    962      1.1  christos 	and		%i1, 7, %l2
    963      1.1  christos 	cmp		%i2, 255
    964      1.1  christos 	movrnz		%l2, 0, %l5		! if (	%i1&7 ||
    965  1.1.1.2  christos 	movleu		SIZE_T_CC, 0, %l5	!	%i2<256 ||
    966      1.1  christos 	brnz,pn		%l5, .L128_xts_enblk !	%i0==%i1)
    967      1.1  christos 	srl		%l3, %l2, %l3
    968      1.1  christos 
    969      1.1  christos 	andcc		%i2, 16, %g0		! is number of blocks even?
    970      1.1  christos 	.word	0xb3b64340 !alignaddrl	%i1,%g0,%i1
    971      1.1  christos 	bz		%icc, .L128_xts_enloop2x
    972      1.1  christos 	srlx		%i2, 4, %i2
    973      1.1  christos .L128_xts_enloop:
    974      1.1  christos 	ldx		[%i0 + 0], %o0
    975      1.1  christos 	brz,pt		%l0, 4f
    976      1.1  christos 	ldx		[%i0 + 8], %o1
    977      1.1  christos 
    978      1.1  christos 	ldx		[%i0 + 16], %o2
    979      1.1  christos 	sllx		%o0, %l0, %o0
    980      1.1  christos 	srlx		%o1, %l1, %g1
    981      1.1  christos 	sllx		%o1, %l0, %o1
    982      1.1  christos 	or		%g1, %o0, %o0
    983      1.1  christos 	srlx		%o2, %l1, %o2
    984      1.1  christos 	or		%o2, %o1, %o1
    985      1.1  christos 4:
    986      1.1  christos 	.word	0x99b02302 !movxtod	%g2,%f12
    987      1.1  christos 	.word	0x9db02303 !movxtod	%g3,%f14
    988      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
    989      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
    990      1.1  christos 
    991      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
    992      1.1  christos 	xor		%g5, %o1, %o1
    993      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
    994      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
    995      1.1  christos 
    996      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
    997      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
    998      1.1  christos 
    999      1.1  christos 	prefetch	[%i1 + 63], 22
   1000      1.1  christos 	prefetch	[%i0 + 16+63], 20
   1001      1.1  christos 	call		_aes128_encrypt_1x
   1002      1.1  christos 	add		%i0, 16, %i0
   1003      1.1  christos 
   1004      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   1005      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1006      1.1  christos 
   1007      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   1008      1.1  christos 	addcc		%g2, %g2, %g2
   1009      1.1  christos 	and		%l7, 0x87, %l7
   1010      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   1011      1.1  christos 	xor		%l7, %g2, %g2
   1012      1.1  christos 
   1013      1.1  christos 	brnz,pn		%l2, 2f
   1014      1.1  christos 	sub		%i2, 1, %i2
   1015  1.1.1.2  christos 
   1016      1.1  christos 	std		%f0, [%i1 + 0]
   1017      1.1  christos 	std		%f2, [%i1 + 8]
   1018      1.1  christos 	brnz,pt		%i2, .L128_xts_enloop2x
   1019      1.1  christos 	add		%i1, 16, %i1
   1020      1.1  christos 
   1021      1.1  christos 	brnz,pn		%i5, .L128_xts_ensteal
   1022      1.1  christos 	nop
   1023      1.1  christos 
   1024      1.1  christos 	ret
   1025      1.1  christos 	restore
   1026      1.1  christos 
   1027      1.1  christos .align	16
   1028      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   1029      1.1  christos 						! and ~3x deterioration
   1030      1.1  christos 						! in inp==out case
   1031      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4		! handle unaligned output
   1032      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
   1033      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
   1034      1.1  christos 	stda		%f4, [%i1 + %l3]0xc0	! partial store
   1035      1.1  christos 	std		%f6, [%i1 + 8]
   1036      1.1  christos 	add		%i1, 16, %i1
   1037      1.1  christos 	orn		%g0, %l3, %l3
   1038      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   1039      1.1  christos 
   1040      1.1  christos 	brnz,pt		%i2, .L128_xts_enloop2x+4
   1041      1.1  christos 	orn		%g0, %l3, %l3
   1042      1.1  christos 
   1043      1.1  christos 	brnz,pn		%i5, .L128_xts_ensteal
   1044      1.1  christos 	nop
   1045      1.1  christos 
   1046      1.1  christos 	ret
   1047      1.1  christos 	restore
   1048      1.1  christos 
   1049      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   1050      1.1  christos .align	32
   1051      1.1  christos .L128_xts_enloop2x:
   1052      1.1  christos 	ldx		[%i0 + 0], %o0
   1053      1.1  christos 	ldx		[%i0 + 8], %o1
   1054      1.1  christos 	ldx		[%i0 + 16], %o2
   1055      1.1  christos 	brz,pt		%l0, 4f
   1056      1.1  christos 	ldx		[%i0 + 24], %o3
   1057      1.1  christos 
   1058      1.1  christos 	ldx		[%i0 + 32], %o4
   1059      1.1  christos 	sllx		%o0, %l0, %o0
   1060      1.1  christos 	srlx		%o1, %l1, %g1
   1061      1.1  christos 	or		%g1, %o0, %o0
   1062      1.1  christos 	sllx		%o1, %l0, %o1
   1063      1.1  christos 	srlx		%o2, %l1, %g1
   1064      1.1  christos 	or		%g1, %o1, %o1
   1065      1.1  christos 	sllx		%o2, %l0, %o2
   1066      1.1  christos 	srlx		%o3, %l1, %g1
   1067      1.1  christos 	or		%g1, %o2, %o2
   1068      1.1  christos 	sllx		%o3, %l0, %o3
   1069      1.1  christos 	srlx		%o4, %l1, %o4
   1070      1.1  christos 	or		%o4, %o3, %o3
   1071      1.1  christos 4:
   1072      1.1  christos 	.word	0x99b02302 !movxtod	%g2,%f12
   1073      1.1  christos 	.word	0x9db02303 !movxtod	%g3,%f14
   1074      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
   1075      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
   1076      1.1  christos 
   1077      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   1078      1.1  christos 	addcc		%g2, %g2, %g2
   1079      1.1  christos 	and		%l7, 0x87, %l7
   1080      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   1081      1.1  christos 	xor		%l7, %g2, %g2
   1082      1.1  christos 
   1083      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   1084      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   1085      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   1086      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   1087      1.1  christos 
   1088      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   1089      1.1  christos 	xor		%g5, %o1, %o1
   1090      1.1  christos 	xor		%g4, %o2, %o2		! ^= rk[0]
   1091      1.1  christos 	xor		%g5, %o3, %o3
   1092      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
   1093      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
   1094      1.1  christos 	.word	0x89b0230a !movxtod	%o2,%f4
   1095      1.1  christos 	.word	0x8db0230b !movxtod	%o3,%f6
   1096      1.1  christos 
   1097      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   1098      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1099      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4		! ^= tweak[0]
   1100      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   1101      1.1  christos 
   1102      1.1  christos 	prefetch	[%i1 + 63], 22
   1103      1.1  christos 	prefetch	[%i0 + 32+63], 20
   1104      1.1  christos 	call		_aes128_encrypt_2x
   1105      1.1  christos 	add		%i0, 32, %i0
   1106      1.1  christos 
   1107      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   1108      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   1109      1.1  christos 
   1110      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   1111      1.1  christos 	addcc		%g2, %g2, %g2
   1112      1.1  christos 	and		%l7, 0x87, %l7
   1113      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   1114      1.1  christos 	xor		%l7, %g2, %g2
   1115      1.1  christos 
   1116      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   1117      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   1118      1.1  christos 
   1119      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   1120      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1121      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   1122      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   1123      1.1  christos 
   1124      1.1  christos 	brnz,pn		%l2, 2f
   1125      1.1  christos 	sub		%i2, 2, %i2
   1126  1.1.1.2  christos 
   1127      1.1  christos 	std		%f0, [%i1 + 0]
   1128      1.1  christos 	std		%f2, [%i1 + 8]
   1129      1.1  christos 	std		%f4, [%i1 + 16]
   1130      1.1  christos 	std		%f6, [%i1 + 24]
   1131      1.1  christos 	brnz,pt		%i2, .L128_xts_enloop2x
   1132      1.1  christos 	add		%i1, 32, %i1
   1133      1.1  christos 
   1134      1.1  christos 	.word	0x81b00f04 !fsrc2	%f0,%f4,%f0
   1135      1.1  christos 	.word	0x85b00f06 !fsrc2	%f0,%f6,%f2
   1136      1.1  christos 	brnz,pn		%i5, .L128_xts_ensteal
   1137      1.1  christos 	nop
   1138      1.1  christos 
   1139      1.1  christos 	ret
   1140      1.1  christos 	restore
   1141      1.1  christos 
   1142      1.1  christos .align	16
   1143      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   1144      1.1  christos 						! and ~3x deterioration
   1145      1.1  christos 						! in inp==out case
   1146      1.1  christos 	.word	0x91b00900 !faligndata	%f0,%f0,%f8		! handle unaligned output
   1147      1.1  christos 	.word	0x95b00902 !faligndata	%f0,%f2,%f10
   1148      1.1  christos 	.word	0x99b08904 !faligndata	%f2,%f4,%f12
   1149      1.1  christos 	.word	0x9db10906 !faligndata	%f4,%f6,%f14
   1150      1.1  christos 	.word	0x81b18906 !faligndata	%f6,%f6,%f0
   1151      1.1  christos 
   1152      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   1153      1.1  christos 	std		%f10, [%i1 + 8]
   1154      1.1  christos 	std		%f12, [%i1 + 16]
   1155      1.1  christos 	std		%f14, [%i1 + 24]
   1156      1.1  christos 	add		%i1, 32, %i1
   1157      1.1  christos 	orn		%g0, %l3, %l3
   1158      1.1  christos 	stda		%f0, [%i1 + %l3]0xc0	! partial store
   1159      1.1  christos 
   1160      1.1  christos 	brnz,pt		%i2, .L128_xts_enloop2x+4
   1161      1.1  christos 	orn		%g0, %l3, %l3
   1162      1.1  christos 
   1163      1.1  christos 	.word	0x81b00f04 !fsrc2	%f0,%f4,%f0
   1164      1.1  christos 	.word	0x85b00f06 !fsrc2	%f0,%f6,%f2
   1165      1.1  christos 	brnz,pn		%i5, .L128_xts_ensteal
   1166      1.1  christos 	nop
   1167      1.1  christos 
   1168      1.1  christos 	ret
   1169      1.1  christos 	restore
   1170      1.1  christos 
   1171      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   1172      1.1  christos .align	32
   1173      1.1  christos .L128_xts_enblk:
   1174      1.1  christos 	add	%i1, %i2, %l5
   1175      1.1  christos 	and	%l5, 63, %l5	! tail
   1176      1.1  christos 	sub	%i2, %l5, %i2
   1177      1.1  christos 	add	%l5, 15, %l5	! round up to 16n
   1178      1.1  christos 	srlx	%i2, 4, %i2
   1179      1.1  christos 	srl	%l5, 4, %l5
   1180      1.1  christos 	sub	%i2, 1, %i2
   1181      1.1  christos 	add	%l5, 1, %l5
   1182      1.1  christos 
   1183      1.1  christos .L128_xts_enblk2x:
   1184      1.1  christos 	ldx		[%i0 + 0], %o0
   1185      1.1  christos 	ldx		[%i0 + 8], %o1
   1186      1.1  christos 	ldx		[%i0 + 16], %o2
   1187      1.1  christos 	brz,pt		%l0, 5f
   1188      1.1  christos 	ldx		[%i0 + 24], %o3
   1189      1.1  christos 
   1190      1.1  christos 	ldx		[%i0 + 32], %o4
   1191      1.1  christos 	sllx		%o0, %l0, %o0
   1192      1.1  christos 	srlx		%o1, %l1, %g1
   1193      1.1  christos 	or		%g1, %o0, %o0
   1194      1.1  christos 	sllx		%o1, %l0, %o1
   1195      1.1  christos 	srlx		%o2, %l1, %g1
   1196      1.1  christos 	or		%g1, %o1, %o1
   1197      1.1  christos 	sllx		%o2, %l0, %o2
   1198      1.1  christos 	srlx		%o3, %l1, %g1
   1199      1.1  christos 	or		%g1, %o2, %o2
   1200      1.1  christos 	sllx		%o3, %l0, %o3
   1201      1.1  christos 	srlx		%o4, %l1, %o4
   1202      1.1  christos 	or		%o4, %o3, %o3
   1203      1.1  christos 5:
   1204      1.1  christos 	.word	0x99b02302 !movxtod	%g2,%f12
   1205      1.1  christos 	.word	0x9db02303 !movxtod	%g3,%f14
   1206      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
   1207      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
   1208      1.1  christos 
   1209      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   1210      1.1  christos 	addcc		%g2, %g2, %g2
   1211      1.1  christos 	and		%l7, 0x87, %l7
   1212      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   1213      1.1  christos 	xor		%l7, %g2, %g2
   1214      1.1  christos 
   1215      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   1216      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   1217      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   1218      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   1219      1.1  christos 
   1220      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   1221      1.1  christos 	xor		%g5, %o1, %o1
   1222      1.1  christos 	xor		%g4, %o2, %o2		! ^= rk[0]
   1223      1.1  christos 	xor		%g5, %o3, %o3
   1224      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
   1225      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
   1226      1.1  christos 	.word	0x89b0230a !movxtod	%o2,%f4
   1227      1.1  christos 	.word	0x8db0230b !movxtod	%o3,%f6
   1228      1.1  christos 
   1229      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   1230      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1231      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4		! ^= tweak[0]
   1232      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   1233      1.1  christos 
   1234      1.1  christos 	prefetch	[%i0 + 32+63], 20
   1235      1.1  christos 	call		_aes128_encrypt_2x
   1236      1.1  christos 	add		%i0, 32, %i0
   1237      1.1  christos 
   1238      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   1239      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   1240      1.1  christos 
   1241      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   1242      1.1  christos 	addcc		%g2, %g2, %g2
   1243      1.1  christos 	and		%l7, 0x87, %l7
   1244      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   1245      1.1  christos 	xor		%l7, %g2, %g2
   1246      1.1  christos 
   1247      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   1248      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   1249      1.1  christos 
   1250      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   1251      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1252      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   1253      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   1254      1.1  christos 
   1255      1.1  christos 	subcc		%i2, 2, %i2
   1256      1.1  christos 	stda		%f0, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   1257      1.1  christos 	add		%i1, 8, %i1
   1258      1.1  christos 	stda		%f2, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   1259      1.1  christos 	add		%i1, 8, %i1
   1260      1.1  christos 	stda		%f4, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   1261      1.1  christos 	add		%i1, 8, %i1
   1262      1.1  christos 	stda		%f6, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   1263  1.1.1.2  christos 	bgu,pt		SIZE_T_CC, .L128_xts_enblk2x
   1264      1.1  christos 	add		%i1, 8, %i1
   1265      1.1  christos 
   1266      1.1  christos 	add		%l5, %i2, %i2
   1267      1.1  christos 	andcc		%i2, 1, %g0		! is number of blocks even?
   1268      1.1  christos 	membar		#StoreLoad|#StoreStore
   1269      1.1  christos 	bnz,pt		%icc, .L128_xts_enloop
   1270      1.1  christos 	srl		%i2, 0, %i2
   1271      1.1  christos 	brnz,pn		%i2, .L128_xts_enloop2x
   1272      1.1  christos 	nop
   1273      1.1  christos 
   1274      1.1  christos 	.word	0x81b00f04 !fsrc2	%f0,%f4,%f0
   1275      1.1  christos 	.word	0x85b00f06 !fsrc2	%f0,%f6,%f2
   1276      1.1  christos 	brnz,pn		%i5, .L128_xts_ensteal
   1277      1.1  christos 	nop
   1278      1.1  christos 
   1279      1.1  christos 	ret
   1280      1.1  christos 	restore
   1281      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   1282      1.1  christos .align	32
   1283      1.1  christos .L128_xts_ensteal:
   1284  1.1.1.2  christos 	std		%f0, [%fp + STACK_BIAS-16]	! copy of output
   1285  1.1.1.2  christos 	std		%f2, [%fp + STACK_BIAS-8]
   1286      1.1  christos 
   1287      1.1  christos 	srl		%l0, 3, %l0
   1288  1.1.1.2  christos 	add		%fp, STACK_BIAS-16, %l7
   1289      1.1  christos 	add		%i0, %l0, %i0	! original %i0+%i2&-15
   1290      1.1  christos 	add		%i1, %l2, %i1	! original %i1+%i2&-15
   1291      1.1  christos 	mov		0, %l0
   1292      1.1  christos 	nop					! align
   1293      1.1  christos 
   1294      1.1  christos .L128_xts_enstealing:
   1295      1.1  christos 	ldub		[%i0 + %l0], %o0
   1296      1.1  christos 	ldub		[%l7  + %l0], %o1
   1297      1.1  christos 	dec		%i5
   1298      1.1  christos 	stb		%o0, [%l7  + %l0]
   1299      1.1  christos 	stb		%o1, [%i1 + %l0]
   1300      1.1  christos 	brnz		%i5, .L128_xts_enstealing
   1301      1.1  christos 	inc		%l0
   1302      1.1  christos 
   1303      1.1  christos 	mov		%l7, %i0
   1304      1.1  christos 	sub		%i1, 16, %i1
   1305      1.1  christos 	mov		0, %l0
   1306      1.1  christos 	sub		%i1, %l2, %i1
   1307      1.1  christos 	ba		.L128_xts_enloop	! one more time
   1308      1.1  christos 	mov		1, %i2				! %i5 is 0
   1309      1.1  christos 	ret
   1310      1.1  christos 	restore
   1311      1.1  christos .type	aes128_t4_xts_encrypt,#function
   1312      1.1  christos .size	aes128_t4_xts_encrypt,.-aes128_t4_xts_encrypt
   1313      1.1  christos .globl	aes128_t4_xts_decrypt
   1314      1.1  christos .align	32
   1315      1.1  christos aes128_t4_xts_decrypt:
   1316  1.1.1.2  christos 	save		%sp, -STACK_FRAME-16, %sp
   1317      1.1  christos 	srln		%i2, 0, %i2		! needed on v8+, "nop" on v9
   1318      1.1  christos 
   1319      1.1  christos 	mov		%i5, %o0
   1320  1.1.1.2  christos 	add		%fp, STACK_BIAS-16, %o1
   1321      1.1  christos 	call		aes_t4_encrypt
   1322      1.1  christos 	mov		%i4, %o2
   1323      1.1  christos 
   1324  1.1.1.2  christos 	add		%fp, STACK_BIAS-16, %l7
   1325      1.1  christos 	ldxa		[%l7]0x88, %g2
   1326  1.1.1.2  christos 	add		%fp, STACK_BIAS-8, %l7
   1327      1.1  christos 	ldxa		[%l7]0x88, %g3		! %g3:%g2 is tweak
   1328      1.1  christos 
   1329      1.1  christos 	sethi		%hi(0x76543210), %l7
   1330      1.1  christos 	or		%l7, %lo(0x76543210), %l7
   1331      1.1  christos 	.word	0x81b5c320 !bmask	%l7,%g0,%g0		! byte swap mask
   1332      1.1  christos 
   1333      1.1  christos 	prefetch	[%i0], 20
   1334      1.1  christos 	prefetch	[%i0 + 63], 20
   1335      1.1  christos 	call		_aes128_load_deckey
   1336      1.1  christos 	and		%i2, 15,  %i5
   1337      1.1  christos 	and		%i2, -16, %i2
   1338      1.1  christos 	mov		0, %l7
   1339      1.1  christos 	movrnz		%i5, 16,  %l7
   1340      1.1  christos 	sub		%i2, %l7, %i2
   1341      1.1  christos 
   1342      1.1  christos 	sub		%i0, %i1, %l5	! %i0!=%i1
   1343      1.1  christos 	and		%i0, 7, %l0
   1344      1.1  christos 	andn		%i0, 7, %i0
   1345      1.1  christos 	sll		%l0, 3, %l0
   1346      1.1  christos 	mov		64, %l1
   1347      1.1  christos 	mov		0xff, %l3
   1348      1.1  christos 	sub		%l1, %l0, %l1
   1349      1.1  christos 	and		%i1, 7, %l2
   1350      1.1  christos 	cmp		%i2, 255
   1351      1.1  christos 	movrnz		%l2, 0, %l5		! if (	%i1&7 ||
   1352  1.1.1.2  christos 	movleu		SIZE_T_CC, 0, %l5	!	%i2<256 ||
   1353      1.1  christos 	brnz,pn		%l5, .L128_xts_deblk !	%i0==%i1)
   1354      1.1  christos 	srl		%l3, %l2, %l3
   1355      1.1  christos 
   1356      1.1  christos 	andcc		%i2, 16, %g0		! is number of blocks even?
   1357      1.1  christos 	brz,pn		%i2, .L128_xts_desteal
   1358      1.1  christos 	.word	0xb3b64340 !alignaddrl	%i1,%g0,%i1
   1359      1.1  christos 	bz		%icc, .L128_xts_deloop2x
   1360      1.1  christos 	srlx		%i2, 4, %i2
   1361      1.1  christos .L128_xts_deloop:
   1362      1.1  christos 	ldx		[%i0 + 0], %o0
   1363      1.1  christos 	brz,pt		%l0, 4f
   1364      1.1  christos 	ldx		[%i0 + 8], %o1
   1365      1.1  christos 
   1366      1.1  christos 	ldx		[%i0 + 16], %o2
   1367      1.1  christos 	sllx		%o0, %l0, %o0
   1368      1.1  christos 	srlx		%o1, %l1, %g1
   1369      1.1  christos 	sllx		%o1, %l0, %o1
   1370      1.1  christos 	or		%g1, %o0, %o0
   1371      1.1  christos 	srlx		%o2, %l1, %o2
   1372      1.1  christos 	or		%o2, %o1, %o1
   1373      1.1  christos 4:
   1374      1.1  christos 	.word	0x99b02302 !movxtod	%g2,%f12
   1375      1.1  christos 	.word	0x9db02303 !movxtod	%g3,%f14
   1376      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
   1377      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
   1378      1.1  christos 
   1379      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   1380      1.1  christos 	xor		%g5, %o1, %o1
   1381      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
   1382      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
   1383      1.1  christos 
   1384      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   1385      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1386      1.1  christos 
   1387      1.1  christos 	prefetch	[%i1 + 63], 22
   1388      1.1  christos 	prefetch	[%i0 + 16+63], 20
   1389      1.1  christos 	call		_aes128_decrypt_1x
   1390      1.1  christos 	add		%i0, 16, %i0
   1391      1.1  christos 
   1392      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   1393      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1394      1.1  christos 
   1395      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   1396      1.1  christos 	addcc		%g2, %g2, %g2
   1397      1.1  christos 	and		%l7, 0x87, %l7
   1398      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   1399      1.1  christos 	xor		%l7, %g2, %g2
   1400      1.1  christos 
   1401      1.1  christos 	brnz,pn		%l2, 2f
   1402      1.1  christos 	sub		%i2, 1, %i2
   1403  1.1.1.2  christos 
   1404      1.1  christos 	std		%f0, [%i1 + 0]
   1405      1.1  christos 	std		%f2, [%i1 + 8]
   1406      1.1  christos 	brnz,pt		%i2, .L128_xts_deloop2x
   1407      1.1  christos 	add		%i1, 16, %i1
   1408      1.1  christos 
   1409      1.1  christos 	brnz,pn		%i5, .L128_xts_desteal
   1410      1.1  christos 	nop
   1411      1.1  christos 
   1412      1.1  christos 	ret
   1413      1.1  christos 	restore
   1414      1.1  christos 
   1415      1.1  christos .align	16
   1416      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   1417      1.1  christos 						! and ~3x deterioration
   1418      1.1  christos 						! in inp==out case
   1419      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4		! handle unaligned output
   1420      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
   1421      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
   1422      1.1  christos 	stda		%f4, [%i1 + %l3]0xc0	! partial store
   1423      1.1  christos 	std		%f6, [%i1 + 8]
   1424      1.1  christos 	add		%i1, 16, %i1
   1425      1.1  christos 	orn		%g0, %l3, %l3
   1426      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   1427      1.1  christos 
   1428      1.1  christos 	brnz,pt		%i2, .L128_xts_deloop2x+4
   1429      1.1  christos 	orn		%g0, %l3, %l3
   1430      1.1  christos 
   1431      1.1  christos 	brnz,pn		%i5, .L128_xts_desteal
   1432      1.1  christos 	nop
   1433      1.1  christos 
   1434      1.1  christos 	ret
   1435      1.1  christos 	restore
   1436      1.1  christos 
   1437      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   1438      1.1  christos .align	32
   1439      1.1  christos .L128_xts_deloop2x:
   1440      1.1  christos 	ldx		[%i0 + 0], %o0
   1441      1.1  christos 	ldx		[%i0 + 8], %o1
   1442      1.1  christos 	ldx		[%i0 + 16], %o2
   1443      1.1  christos 	brz,pt		%l0, 4f
   1444      1.1  christos 	ldx		[%i0 + 24], %o3
   1445      1.1  christos 
   1446      1.1  christos 	ldx		[%i0 + 32], %o4
   1447      1.1  christos 	sllx		%o0, %l0, %o0
   1448      1.1  christos 	srlx		%o1, %l1, %g1
   1449      1.1  christos 	or		%g1, %o0, %o0
   1450      1.1  christos 	sllx		%o1, %l0, %o1
   1451      1.1  christos 	srlx		%o2, %l1, %g1
   1452      1.1  christos 	or		%g1, %o1, %o1
   1453      1.1  christos 	sllx		%o2, %l0, %o2
   1454      1.1  christos 	srlx		%o3, %l1, %g1
   1455      1.1  christos 	or		%g1, %o2, %o2
   1456      1.1  christos 	sllx		%o3, %l0, %o3
   1457      1.1  christos 	srlx		%o4, %l1, %o4
   1458      1.1  christos 	or		%o4, %o3, %o3
   1459      1.1  christos 4:
   1460      1.1  christos 	.word	0x99b02302 !movxtod	%g2,%f12
   1461      1.1  christos 	.word	0x9db02303 !movxtod	%g3,%f14
   1462      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
   1463      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
   1464      1.1  christos 
   1465      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   1466      1.1  christos 	addcc		%g2, %g2, %g2
   1467      1.1  christos 	and		%l7, 0x87, %l7
   1468      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   1469      1.1  christos 	xor		%l7, %g2, %g2
   1470      1.1  christos 
   1471      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   1472      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   1473      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   1474      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   1475      1.1  christos 
   1476      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   1477      1.1  christos 	xor		%g5, %o1, %o1
   1478      1.1  christos 	xor		%g4, %o2, %o2		! ^= rk[0]
   1479      1.1  christos 	xor		%g5, %o3, %o3
   1480      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
   1481      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
   1482      1.1  christos 	.word	0x89b0230a !movxtod	%o2,%f4
   1483      1.1  christos 	.word	0x8db0230b !movxtod	%o3,%f6
   1484      1.1  christos 
   1485      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   1486      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1487      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4		! ^= tweak[0]
   1488      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   1489      1.1  christos 
   1490      1.1  christos 	prefetch	[%i1 + 63], 22
   1491      1.1  christos 	prefetch	[%i0 + 32+63], 20
   1492      1.1  christos 	call		_aes128_decrypt_2x
   1493      1.1  christos 	add		%i0, 32, %i0
   1494      1.1  christos 
   1495      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   1496      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   1497      1.1  christos 
   1498      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   1499      1.1  christos 	addcc		%g2, %g2, %g2
   1500      1.1  christos 	and		%l7, 0x87, %l7
   1501      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   1502      1.1  christos 	xor		%l7, %g2, %g2
   1503      1.1  christos 
   1504      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   1505      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   1506      1.1  christos 
   1507      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   1508      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1509      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   1510      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   1511      1.1  christos 
   1512      1.1  christos 	brnz,pn		%l2, 2f
   1513      1.1  christos 	sub		%i2, 2, %i2
   1514  1.1.1.2  christos 
   1515      1.1  christos 	std		%f0, [%i1 + 0]
   1516      1.1  christos 	std		%f2, [%i1 + 8]
   1517      1.1  christos 	std		%f4, [%i1 + 16]
   1518      1.1  christos 	std		%f6, [%i1 + 24]
   1519      1.1  christos 	brnz,pt		%i2, .L128_xts_deloop2x
   1520      1.1  christos 	add		%i1, 32, %i1
   1521      1.1  christos 
   1522      1.1  christos 	.word	0x81b00f04 !fsrc2	%f0,%f4,%f0
   1523      1.1  christos 	.word	0x85b00f06 !fsrc2	%f0,%f6,%f2
   1524      1.1  christos 	brnz,pn		%i5, .L128_xts_desteal
   1525      1.1  christos 	nop
   1526      1.1  christos 
   1527      1.1  christos 	ret
   1528      1.1  christos 	restore
   1529      1.1  christos 
   1530      1.1  christos .align	16
   1531      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   1532      1.1  christos 						! and ~3x deterioration
   1533      1.1  christos 						! in inp==out case
   1534      1.1  christos 	.word	0x91b00900 !faligndata	%f0,%f0,%f8		! handle unaligned output
   1535      1.1  christos 	.word	0x95b00902 !faligndata	%f0,%f2,%f10
   1536      1.1  christos 	.word	0x99b08904 !faligndata	%f2,%f4,%f12
   1537      1.1  christos 	.word	0x9db10906 !faligndata	%f4,%f6,%f14
   1538      1.1  christos 	.word	0x81b18906 !faligndata	%f6,%f6,%f0
   1539      1.1  christos 
   1540      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   1541      1.1  christos 	std		%f10, [%i1 + 8]
   1542      1.1  christos 	std		%f12, [%i1 + 16]
   1543      1.1  christos 	std		%f14, [%i1 + 24]
   1544      1.1  christos 	add		%i1, 32, %i1
   1545      1.1  christos 	orn		%g0, %l3, %l3
   1546      1.1  christos 	stda		%f0, [%i1 + %l3]0xc0	! partial store
   1547      1.1  christos 
   1548      1.1  christos 	brnz,pt		%i2, .L128_xts_deloop2x+4
   1549      1.1  christos 	orn		%g0, %l3, %l3
   1550      1.1  christos 
   1551      1.1  christos 	.word	0x81b00f04 !fsrc2	%f0,%f4,%f0
   1552      1.1  christos 	.word	0x85b00f06 !fsrc2	%f0,%f6,%f2
   1553      1.1  christos 	brnz,pn		%i5, .L128_xts_desteal
   1554      1.1  christos 	nop
   1555      1.1  christos 
   1556      1.1  christos 	ret
   1557      1.1  christos 	restore
   1558      1.1  christos 
   1559      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   1560      1.1  christos .align	32
   1561      1.1  christos .L128_xts_deblk:
   1562      1.1  christos 	add	%i1, %i2, %l5
   1563      1.1  christos 	and	%l5, 63, %l5	! tail
   1564      1.1  christos 	sub	%i2, %l5, %i2
   1565      1.1  christos 	add	%l5, 15, %l5	! round up to 16n
   1566      1.1  christos 	srlx	%i2, 4, %i2
   1567      1.1  christos 	srl	%l5, 4, %l5
   1568      1.1  christos 	sub	%i2, 1, %i2
   1569      1.1  christos 	add	%l5, 1, %l5
   1570      1.1  christos 
   1571      1.1  christos .L128_xts_deblk2x:
   1572      1.1  christos 	ldx		[%i0 + 0], %o0
   1573      1.1  christos 	ldx		[%i0 + 8], %o1
   1574      1.1  christos 	ldx		[%i0 + 16], %o2
   1575      1.1  christos 	brz,pt		%l0, 5f
   1576      1.1  christos 	ldx		[%i0 + 24], %o3
   1577      1.1  christos 
   1578      1.1  christos 	ldx		[%i0 + 32], %o4
   1579      1.1  christos 	sllx		%o0, %l0, %o0
   1580      1.1  christos 	srlx		%o1, %l1, %g1
   1581      1.1  christos 	or		%g1, %o0, %o0
   1582      1.1  christos 	sllx		%o1, %l0, %o1
   1583      1.1  christos 	srlx		%o2, %l1, %g1
   1584      1.1  christos 	or		%g1, %o1, %o1
   1585      1.1  christos 	sllx		%o2, %l0, %o2
   1586      1.1  christos 	srlx		%o3, %l1, %g1
   1587      1.1  christos 	or		%g1, %o2, %o2
   1588      1.1  christos 	sllx		%o3, %l0, %o3
   1589      1.1  christos 	srlx		%o4, %l1, %o4
   1590      1.1  christos 	or		%o4, %o3, %o3
   1591      1.1  christos 5:
   1592      1.1  christos 	.word	0x99b02302 !movxtod	%g2,%f12
   1593      1.1  christos 	.word	0x9db02303 !movxtod	%g3,%f14
   1594      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
   1595      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
   1596      1.1  christos 
   1597      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   1598      1.1  christos 	addcc		%g2, %g2, %g2
   1599      1.1  christos 	and		%l7, 0x87, %l7
   1600      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   1601      1.1  christos 	xor		%l7, %g2, %g2
   1602      1.1  christos 
   1603      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   1604      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   1605      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   1606      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   1607      1.1  christos 
   1608      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   1609      1.1  christos 	xor		%g5, %o1, %o1
   1610      1.1  christos 	xor		%g4, %o2, %o2		! ^= rk[0]
   1611      1.1  christos 	xor		%g5, %o3, %o3
   1612      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
   1613      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
   1614      1.1  christos 	.word	0x89b0230a !movxtod	%o2,%f4
   1615      1.1  christos 	.word	0x8db0230b !movxtod	%o3,%f6
   1616      1.1  christos 
   1617      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   1618      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1619      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4		! ^= tweak[0]
   1620      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   1621      1.1  christos 
   1622      1.1  christos 	prefetch	[%i0 + 32+63], 20
   1623      1.1  christos 	call		_aes128_decrypt_2x
   1624      1.1  christos 	add		%i0, 32, %i0
   1625      1.1  christos 
   1626      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   1627      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   1628      1.1  christos 
   1629      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   1630      1.1  christos 	addcc		%g2, %g2, %g2
   1631      1.1  christos 	and		%l7, 0x87, %l7
   1632      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   1633      1.1  christos 	xor		%l7, %g2, %g2
   1634      1.1  christos 
   1635      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   1636      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   1637      1.1  christos 
   1638      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   1639      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1640      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   1641      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   1642      1.1  christos 
   1643      1.1  christos 	subcc		%i2, 2, %i2
   1644      1.1  christos 	stda		%f0, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   1645      1.1  christos 	add		%i1, 8, %i1
   1646      1.1  christos 	stda		%f2, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   1647      1.1  christos 	add		%i1, 8, %i1
   1648      1.1  christos 	stda		%f4, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   1649      1.1  christos 	add		%i1, 8, %i1
   1650      1.1  christos 	stda		%f6, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   1651  1.1.1.2  christos 	bgu,pt		SIZE_T_CC, .L128_xts_deblk2x
   1652      1.1  christos 	add		%i1, 8, %i1
   1653      1.1  christos 
   1654      1.1  christos 	add		%l5, %i2, %i2
   1655      1.1  christos 	andcc		%i2, 1, %g0		! is number of blocks even?
   1656      1.1  christos 	membar		#StoreLoad|#StoreStore
   1657      1.1  christos 	bnz,pt		%icc, .L128_xts_deloop
   1658      1.1  christos 	srl		%i2, 0, %i2
   1659      1.1  christos 	brnz,pn		%i2, .L128_xts_deloop2x
   1660      1.1  christos 	nop
   1661      1.1  christos 
   1662      1.1  christos 	.word	0x81b00f04 !fsrc2	%f0,%f4,%f0
   1663      1.1  christos 	.word	0x85b00f06 !fsrc2	%f0,%f6,%f2
   1664      1.1  christos 	brnz,pn		%i5, .L128_xts_desteal
   1665      1.1  christos 	nop
   1666      1.1  christos 
   1667      1.1  christos 	ret
   1668      1.1  christos 	restore
   1669      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   1670      1.1  christos .align	32
   1671      1.1  christos .L128_xts_desteal:
   1672      1.1  christos 	ldx		[%i0 + 0], %o0
   1673      1.1  christos 	brz,pt		%l0, 8f
   1674      1.1  christos 	ldx		[%i0 + 8], %o1
   1675      1.1  christos 
   1676      1.1  christos 	ldx		[%i0 + 16], %o2
   1677      1.1  christos 	sllx		%o0, %l0, %o0
   1678      1.1  christos 	srlx		%o1, %l1, %g1
   1679      1.1  christos 	sllx		%o1, %l0, %o1
   1680      1.1  christos 	or		%g1, %o0, %o0
   1681      1.1  christos 	srlx		%o2, %l1, %o2
   1682      1.1  christos 	or		%o2, %o1, %o1
   1683      1.1  christos 8:
   1684      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   1685      1.1  christos 	addcc		%g2, %g2, %o2
   1686      1.1  christos 	and		%l7, 0x87, %l7
   1687      1.1  christos 	.word	0x97b0c223 !addxc	%g3,%g3,%o3
   1688      1.1  christos 	xor		%l7, %o2, %o2
   1689      1.1  christos 
   1690      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
   1691      1.1  christos 	.word	0x9db0230b !movxtod	%o3,%f14
   1692      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
   1693      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
   1694      1.1  christos 
   1695      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   1696      1.1  christos 	xor		%g5, %o1, %o1
   1697      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
   1698      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
   1699      1.1  christos 
   1700      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   1701      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1702      1.1  christos 
   1703      1.1  christos 	call		_aes128_decrypt_1x
   1704      1.1  christos 	add		%i0, 16, %i0
   1705      1.1  christos 
   1706      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   1707      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1708      1.1  christos 
   1709  1.1.1.2  christos 	std		%f0, [%fp + STACK_BIAS-16]
   1710  1.1.1.2  christos 	std		%f2, [%fp + STACK_BIAS-8]
   1711      1.1  christos 
   1712      1.1  christos 	srl		%l0, 3, %l0
   1713  1.1.1.2  christos 	add		%fp, STACK_BIAS-16, %l7
   1714      1.1  christos 	add		%i0, %l0, %i0	! original %i0+%i2&-15
   1715      1.1  christos 	add		%i1, %l2, %i1	! original %i1+%i2&-15
   1716      1.1  christos 	mov		0, %l0
   1717      1.1  christos 	add		%i1, 16, %i1
   1718      1.1  christos 	nop					! align
   1719      1.1  christos 
   1720      1.1  christos .L128_xts_destealing:
   1721      1.1  christos 	ldub		[%i0 + %l0], %o0
   1722      1.1  christos 	ldub		[%l7  + %l0], %o1
   1723      1.1  christos 	dec		%i5
   1724      1.1  christos 	stb		%o0, [%l7  + %l0]
   1725      1.1  christos 	stb		%o1, [%i1 + %l0]
   1726      1.1  christos 	brnz		%i5, .L128_xts_destealing
   1727      1.1  christos 	inc		%l0
   1728      1.1  christos 
   1729      1.1  christos 	mov		%l7, %i0
   1730      1.1  christos 	sub		%i1, 16, %i1
   1731      1.1  christos 	mov		0, %l0
   1732      1.1  christos 	sub		%i1, %l2, %i1
   1733      1.1  christos 	ba		.L128_xts_deloop	! one more time
   1734      1.1  christos 	mov		1, %i2				! %i5 is 0
   1735      1.1  christos 	ret
   1736      1.1  christos 	restore
   1737      1.1  christos .type	aes128_t4_xts_decrypt,#function
   1738      1.1  christos .size	aes128_t4_xts_decrypt,.-aes128_t4_xts_decrypt
   1739      1.1  christos .globl	aes128_t4_cbc_decrypt
   1740      1.1  christos .align	32
   1741      1.1  christos aes128_t4_cbc_decrypt:
   1742  1.1.1.2  christos 	save		%sp, -STACK_FRAME, %sp
   1743      1.1  christos 	cmp		%i2, 0
   1744  1.1.1.2  christos 	be,pn		SIZE_T_CC, .L128_cbc_dec_abort
   1745      1.1  christos 	srln		%i2, 0, %i2		! needed on v8+, "nop" on v9
   1746      1.1  christos 	sub		%i0, %i1, %l5	! %i0!=%i1
   1747      1.1  christos 	ld		[%i4 + 0], %f12	! load ivec
   1748      1.1  christos 	ld		[%i4 + 4], %f13
   1749      1.1  christos 	ld		[%i4 + 8], %f14
   1750      1.1  christos 	ld		[%i4 + 12], %f15
   1751      1.1  christos 	prefetch	[%i0], 20
   1752      1.1  christos 	prefetch	[%i0 + 63], 20
   1753      1.1  christos 	call		_aes128_load_deckey
   1754      1.1  christos 	and		%i0, 7, %l0
   1755      1.1  christos 	andn		%i0, 7, %i0
   1756      1.1  christos 	sll		%l0, 3, %l0
   1757      1.1  christos 	mov		64, %l1
   1758      1.1  christos 	mov		0xff, %l3
   1759      1.1  christos 	sub		%l1, %l0, %l1
   1760      1.1  christos 	and		%i1, 7, %l2
   1761      1.1  christos 	cmp		%i2, 255
   1762      1.1  christos 	movrnz		%l2, 0, %l5		! if (	%i1&7 ||
   1763  1.1.1.2  christos 	movleu		SIZE_T_CC, 0, %l5	!	%i2<256 ||
   1764      1.1  christos 	brnz,pn		%l5, .L128cbc_dec_blk	!	%i0==%i1)
   1765      1.1  christos 	srl		%l3, %l2, %l3
   1766      1.1  christos 
   1767      1.1  christos 	andcc		%i2, 16, %g0		! is number of blocks even?
   1768      1.1  christos 	srlx		%i2, 4, %i2
   1769      1.1  christos 	.word	0xb3b64340 !alignaddrl	%i1,%g0,%i1
   1770      1.1  christos 	bz		%icc, .L128_cbc_dec_loop2x
   1771      1.1  christos 	prefetch	[%i1], 22
   1772      1.1  christos .L128_cbc_dec_loop:
   1773      1.1  christos 	ldx		[%i0 + 0], %o0
   1774      1.1  christos 	brz,pt		%l0, 4f
   1775      1.1  christos 	ldx		[%i0 + 8], %o1
   1776      1.1  christos 
   1777      1.1  christos 	ldx		[%i0 + 16], %o2
   1778      1.1  christos 	sllx		%o0, %l0, %o0
   1779      1.1  christos 	srlx		%o1, %l1, %g1
   1780      1.1  christos 	sllx		%o1, %l0, %o1
   1781      1.1  christos 	or		%g1, %o0, %o0
   1782      1.1  christos 	srlx		%o2, %l1, %o2
   1783      1.1  christos 	or		%o2, %o1, %o1
   1784      1.1  christos 4:
   1785      1.1  christos 	xor		%g4, %o0, %o2		! ^= rk[0]
   1786      1.1  christos 	xor		%g5, %o1, %o3
   1787      1.1  christos 	.word	0x81b0230a !movxtod	%o2,%f0
   1788      1.1  christos 	.word	0x85b0230b !movxtod	%o3,%f2
   1789      1.1  christos 
   1790      1.1  christos 	prefetch	[%i1 + 63], 22
   1791      1.1  christos 	prefetch	[%i0 + 16+63], 20
   1792      1.1  christos 	call		_aes128_decrypt_1x
   1793      1.1  christos 	add		%i0, 16, %i0
   1794      1.1  christos 
   1795      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
   1796      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1797      1.1  christos 	.word	0x99b02308 !movxtod	%o0,%f12
   1798      1.1  christos 	.word	0x9db02309 !movxtod	%o1,%f14
   1799      1.1  christos 
   1800      1.1  christos 	brnz,pn		%l2, 2f
   1801      1.1  christos 	sub		%i2, 1, %i2
   1802  1.1.1.2  christos 
   1803      1.1  christos 	std		%f0, [%i1 + 0]
   1804      1.1  christos 	std		%f2, [%i1 + 8]
   1805      1.1  christos 	brnz,pt		%i2, .L128_cbc_dec_loop2x
   1806      1.1  christos 	add		%i1, 16, %i1
   1807      1.1  christos 	st		%f12, [%i4 + 0]
   1808      1.1  christos 	st		%f13, [%i4 + 4]
   1809      1.1  christos 	st		%f14, [%i4 + 8]
   1810      1.1  christos 	st		%f15, [%i4 + 12]
   1811      1.1  christos .L128_cbc_dec_abort:
   1812      1.1  christos 	ret
   1813      1.1  christos 	restore
   1814      1.1  christos 
   1815      1.1  christos .align	16
   1816      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   1817      1.1  christos 						! and ~3x deterioration
   1818      1.1  christos 						! in inp==out case
   1819      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4		! handle unaligned output
   1820      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
   1821      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
   1822      1.1  christos 
   1823      1.1  christos 	stda		%f4, [%i1 + %l3]0xc0	! partial store
   1824      1.1  christos 	std		%f6, [%i1 + 8]
   1825      1.1  christos 	add		%i1, 16, %i1
   1826      1.1  christos 	orn		%g0, %l3, %l3
   1827      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   1828      1.1  christos 
   1829      1.1  christos 	brnz,pt		%i2, .L128_cbc_dec_loop2x+4
   1830      1.1  christos 	orn		%g0, %l3, %l3
   1831      1.1  christos 	st		%f12, [%i4 + 0]
   1832      1.1  christos 	st		%f13, [%i4 + 4]
   1833      1.1  christos 	st		%f14, [%i4 + 8]
   1834      1.1  christos 	st		%f15, [%i4 + 12]
   1835      1.1  christos 	ret
   1836      1.1  christos 	restore
   1837      1.1  christos 
   1838      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   1839      1.1  christos .align	32
   1840      1.1  christos .L128_cbc_dec_loop2x:
   1841      1.1  christos 	ldx		[%i0 + 0], %o0
   1842      1.1  christos 	ldx		[%i0 + 8], %o1
   1843      1.1  christos 	ldx		[%i0 + 16], %o2
   1844      1.1  christos 	brz,pt		%l0, 4f
   1845      1.1  christos 	ldx		[%i0 + 24], %o3
   1846      1.1  christos 
   1847      1.1  christos 	ldx		[%i0 + 32], %o4
   1848      1.1  christos 	sllx		%o0, %l0, %o0
   1849      1.1  christos 	srlx		%o1, %l1, %g1
   1850      1.1  christos 	or		%g1, %o0, %o0
   1851      1.1  christos 	sllx		%o1, %l0, %o1
   1852      1.1  christos 	srlx		%o2, %l1, %g1
   1853      1.1  christos 	or		%g1, %o1, %o1
   1854      1.1  christos 	sllx		%o2, %l0, %o2
   1855      1.1  christos 	srlx		%o3, %l1, %g1
   1856      1.1  christos 	or		%g1, %o2, %o2
   1857      1.1  christos 	sllx		%o3, %l0, %o3
   1858      1.1  christos 	srlx		%o4, %l1, %o4
   1859      1.1  christos 	or		%o4, %o3, %o3
   1860      1.1  christos 4:
   1861      1.1  christos 	xor		%g4, %o0, %o4		! ^= rk[0]
   1862      1.1  christos 	xor		%g5, %o1, %o5
   1863      1.1  christos 	.word	0x81b0230c !movxtod	%o4,%f0
   1864      1.1  christos 	.word	0x85b0230d !movxtod	%o5,%f2
   1865      1.1  christos 	xor		%g4, %o2, %o4
   1866      1.1  christos 	xor		%g5, %o3, %o5
   1867      1.1  christos 	.word	0x89b0230c !movxtod	%o4,%f4
   1868      1.1  christos 	.word	0x8db0230d !movxtod	%o5,%f6
   1869      1.1  christos 
   1870      1.1  christos 	prefetch	[%i1 + 63], 22
   1871      1.1  christos 	prefetch	[%i0 + 32+63], 20
   1872      1.1  christos 	call		_aes128_decrypt_2x
   1873      1.1  christos 	add		%i0, 32, %i0
   1874      1.1  christos 
   1875      1.1  christos 	.word	0x91b02308 !movxtod	%o0,%f8
   1876      1.1  christos 	.word	0x95b02309 !movxtod	%o1,%f10
   1877      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
   1878      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1879      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
   1880      1.1  christos 	.word	0x9db0230b !movxtod	%o3,%f14
   1881      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   1882      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   1883      1.1  christos 
   1884      1.1  christos 	brnz,pn		%l2, 2f
   1885      1.1  christos 	sub		%i2, 2, %i2
   1886  1.1.1.2  christos 
   1887      1.1  christos 	std		%f0, [%i1 + 0]
   1888      1.1  christos 	std		%f2, [%i1 + 8]
   1889      1.1  christos 	std		%f4, [%i1 + 16]
   1890      1.1  christos 	std		%f6, [%i1 + 24]
   1891      1.1  christos 	brnz,pt		%i2, .L128_cbc_dec_loop2x
   1892      1.1  christos 	add		%i1, 32, %i1
   1893      1.1  christos 	st		%f12, [%i4 + 0]
   1894      1.1  christos 	st		%f13, [%i4 + 4]
   1895      1.1  christos 	st		%f14, [%i4 + 8]
   1896      1.1  christos 	st		%f15, [%i4 + 12]
   1897      1.1  christos 	ret
   1898      1.1  christos 	restore
   1899      1.1  christos 
   1900      1.1  christos .align	16
   1901      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   1902      1.1  christos 						! and ~3x deterioration
   1903      1.1  christos 						! in inp==out case
   1904      1.1  christos 	.word	0x91b00900 !faligndata	%f0,%f0,%f8		! handle unaligned output
   1905      1.1  christos 	.word	0x81b00902 !faligndata	%f0,%f2,%f0
   1906      1.1  christos 	.word	0x85b08904 !faligndata	%f2,%f4,%f2
   1907      1.1  christos 	.word	0x89b10906 !faligndata	%f4,%f6,%f4
   1908      1.1  christos 	.word	0x8db18906 !faligndata	%f6,%f6,%f6
   1909      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   1910      1.1  christos 	std		%f0, [%i1 + 8]
   1911      1.1  christos 	std		%f2, [%i1 + 16]
   1912      1.1  christos 	std		%f4, [%i1 + 24]
   1913      1.1  christos 	add		%i1, 32, %i1
   1914      1.1  christos 	orn		%g0, %l3, %l3
   1915      1.1  christos 	stda		%f6, [%i1 + %l3]0xc0	! partial store
   1916      1.1  christos 
   1917      1.1  christos 	brnz,pt		%i2, .L128_cbc_dec_loop2x+4
   1918      1.1  christos 	orn		%g0, %l3, %l3
   1919      1.1  christos 	st		%f12, [%i4 + 0]
   1920      1.1  christos 	st		%f13, [%i4 + 4]
   1921      1.1  christos 	st		%f14, [%i4 + 8]
   1922      1.1  christos 	st		%f15, [%i4 + 12]
   1923      1.1  christos 	ret
   1924      1.1  christos 	restore
   1925      1.1  christos 
   1926      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   1927      1.1  christos .align	32
   1928      1.1  christos .L128cbc_dec_blk:
   1929      1.1  christos 	add	%i1, %i2, %l5
   1930      1.1  christos 	and	%l5, 63, %l5	! tail
   1931      1.1  christos 	sub	%i2, %l5, %i2
   1932      1.1  christos 	add	%l5, 15, %l5	! round up to 16n
   1933      1.1  christos 	srlx	%i2, 4, %i2
   1934      1.1  christos 	srl	%l5, 4, %l5
   1935      1.1  christos 	sub	%i2, 1, %i2
   1936      1.1  christos 	add	%l5, 1, %l5
   1937      1.1  christos 
   1938      1.1  christos .L128_cbc_dec_blk_loop2x:
   1939      1.1  christos 	ldx		[%i0 + 0], %o0
   1940      1.1  christos 	ldx		[%i0 + 8], %o1
   1941      1.1  christos 	ldx		[%i0 + 16], %o2
   1942      1.1  christos 	brz,pt		%l0, 5f
   1943      1.1  christos 	ldx		[%i0 + 24], %o3
   1944      1.1  christos 
   1945      1.1  christos 	ldx		[%i0 + 32], %o4
   1946      1.1  christos 	sllx		%o0, %l0, %o0
   1947      1.1  christos 	srlx		%o1, %l1, %g1
   1948      1.1  christos 	or		%g1, %o0, %o0
   1949      1.1  christos 	sllx		%o1, %l0, %o1
   1950      1.1  christos 	srlx		%o2, %l1, %g1
   1951      1.1  christos 	or		%g1, %o1, %o1
   1952      1.1  christos 	sllx		%o2, %l0, %o2
   1953      1.1  christos 	srlx		%o3, %l1, %g1
   1954      1.1  christos 	or		%g1, %o2, %o2
   1955      1.1  christos 	sllx		%o3, %l0, %o3
   1956      1.1  christos 	srlx		%o4, %l1, %o4
   1957      1.1  christos 	or		%o4, %o3, %o3
   1958      1.1  christos 5:
   1959      1.1  christos 	xor		%g4, %o0, %o4		! ^= rk[0]
   1960      1.1  christos 	xor		%g5, %o1, %o5
   1961      1.1  christos 	.word	0x81b0230c !movxtod	%o4,%f0
   1962      1.1  christos 	.word	0x85b0230d !movxtod	%o5,%f2
   1963      1.1  christos 	xor		%g4, %o2, %o4
   1964      1.1  christos 	xor		%g5, %o3, %o5
   1965      1.1  christos 	.word	0x89b0230c !movxtod	%o4,%f4
   1966      1.1  christos 	.word	0x8db0230d !movxtod	%o5,%f6
   1967      1.1  christos 
   1968      1.1  christos 	prefetch	[%i0 + 32+63], 20
   1969      1.1  christos 	call		_aes128_decrypt_2x
   1970      1.1  christos 	add		%i0, 32, %i0
   1971      1.1  christos 	subcc		%i2, 2, %i2
   1972      1.1  christos 
   1973      1.1  christos 	.word	0x91b02308 !movxtod	%o0,%f8
   1974      1.1  christos 	.word	0x95b02309 !movxtod	%o1,%f10
   1975      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
   1976      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   1977      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
   1978      1.1  christos 	.word	0x9db0230b !movxtod	%o3,%f14
   1979      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   1980      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   1981      1.1  christos 
   1982      1.1  christos 	stda		%f0, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   1983      1.1  christos 	add		%i1, 8, %i1
   1984      1.1  christos 	stda		%f2, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   1985      1.1  christos 	add		%i1, 8, %i1
   1986      1.1  christos 	stda		%f4, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   1987      1.1  christos 	add		%i1, 8, %i1
   1988      1.1  christos 	stda		%f6, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   1989  1.1.1.2  christos 	bgu,pt		SIZE_T_CC, .L128_cbc_dec_blk_loop2x
   1990      1.1  christos 	add		%i1, 8, %i1
   1991      1.1  christos 
   1992      1.1  christos 	add		%l5, %i2, %i2
   1993      1.1  christos 	andcc		%i2, 1, %g0		! is number of blocks even?
   1994      1.1  christos 	membar		#StoreLoad|#StoreStore
   1995      1.1  christos 	bnz,pt		%icc, .L128_cbc_dec_loop
   1996      1.1  christos 	srl		%i2, 0, %i2
   1997      1.1  christos 	brnz,pn		%i2, .L128_cbc_dec_loop2x
   1998      1.1  christos 	nop
   1999      1.1  christos 	st		%f12, [%i4 + 0]	! write out ivec
   2000      1.1  christos 	st		%f13, [%i4 + 4]
   2001      1.1  christos 	st		%f14, [%i4 + 8]
   2002      1.1  christos 	st		%f15, [%i4 + 12]
   2003      1.1  christos 	ret
   2004      1.1  christos 	restore
   2005      1.1  christos .type	aes128_t4_cbc_decrypt,#function
   2006      1.1  christos .size	aes128_t4_cbc_decrypt,.-aes128_t4_cbc_decrypt
   2007      1.1  christos .align	32
   2008      1.1  christos _aes128_decrypt_1x:
   2009      1.1  christos 	.word	0x88cc0440 !aes_dround01	%f16,%f0,%f2,%f4
   2010      1.1  christos 	.word	0x84cc8460 !aes_dround23	%f18,%f0,%f2,%f2
   2011      1.1  christos 	.word	0x80cd0444 !aes_dround01	%f20,%f4,%f2,%f0
   2012      1.1  christos 	.word	0x84cd8464 !aes_dround23	%f22,%f4,%f2,%f2
   2013      1.1  christos 	.word	0x88ce0440 !aes_dround01	%f24,%f0,%f2,%f4
   2014      1.1  christos 	.word	0x84ce8460 !aes_dround23	%f26,%f0,%f2,%f2
   2015      1.1  christos 	.word	0x80cf0444 !aes_dround01	%f28,%f4,%f2,%f0
   2016      1.1  christos 	.word	0x84cf8464 !aes_dround23	%f30,%f4,%f2,%f2
   2017      1.1  christos 	.word	0x88c84440 !aes_dround01	%f32,%f0,%f2,%f4
   2018      1.1  christos 	.word	0x84c8c460 !aes_dround23	%f34,%f0,%f2,%f2
   2019      1.1  christos 	.word	0x80c94444 !aes_dround01	%f36,%f4,%f2,%f0
   2020      1.1  christos 	.word	0x84c9c464 !aes_dround23	%f38,%f4,%f2,%f2
   2021      1.1  christos 	.word	0x88ca4440 !aes_dround01	%f40,%f0,%f2,%f4
   2022      1.1  christos 	.word	0x84cac460 !aes_dround23	%f42,%f0,%f2,%f2
   2023      1.1  christos 	.word	0x80cb4444 !aes_dround01	%f44,%f4,%f2,%f0
   2024      1.1  christos 	.word	0x84cbc464 !aes_dround23	%f46,%f4,%f2,%f2
   2025      1.1  christos 	.word	0x88cc4440 !aes_dround01	%f48,%f0,%f2,%f4
   2026      1.1  christos 	.word	0x84ccc460 !aes_dround23	%f50,%f0,%f2,%f2
   2027      1.1  christos 	.word	0x80cd44c4 !aes_dround01_l	%f52,%f4,%f2,%f0
   2028      1.1  christos 	retl
   2029      1.1  christos 	.word	0x84cdc4e4 !aes_dround23_l	%f54,%f4,%f2,%f2
   2030      1.1  christos .type	_aes128_decrypt_1x,#function
   2031      1.1  christos .size	_aes128_decrypt_1x,.-_aes128_decrypt_1x
   2032      1.1  christos 
   2033      1.1  christos .align	32
   2034      1.1  christos _aes128_decrypt_2x:
   2035      1.1  christos 	.word	0x90cc0440 !aes_dround01	%f16,%f0,%f2,%f8
   2036      1.1  christos 	.word	0x84cc8460 !aes_dround23	%f18,%f0,%f2,%f2
   2037      1.1  christos 	.word	0x94cc0c44 !aes_dround01	%f16,%f4,%f6,%f10
   2038      1.1  christos 	.word	0x8ccc8c64 !aes_dround23	%f18,%f4,%f6,%f6
   2039      1.1  christos 	.word	0x80cd0448 !aes_dround01	%f20,%f8,%f2,%f0
   2040      1.1  christos 	.word	0x84cd8468 !aes_dround23	%f22,%f8,%f2,%f2
   2041      1.1  christos 	.word	0x88cd0c4a !aes_dround01	%f20,%f10,%f6,%f4
   2042      1.1  christos 	.word	0x8ccd8c6a !aes_dround23	%f22,%f10,%f6,%f6
   2043      1.1  christos 	.word	0x90ce0440 !aes_dround01	%f24,%f0,%f2,%f8
   2044      1.1  christos 	.word	0x84ce8460 !aes_dround23	%f26,%f0,%f2,%f2
   2045      1.1  christos 	.word	0x94ce0c44 !aes_dround01	%f24,%f4,%f6,%f10
   2046      1.1  christos 	.word	0x8cce8c64 !aes_dround23	%f26,%f4,%f6,%f6
   2047      1.1  christos 	.word	0x80cf0448 !aes_dround01	%f28,%f8,%f2,%f0
   2048      1.1  christos 	.word	0x84cf8468 !aes_dround23	%f30,%f8,%f2,%f2
   2049      1.1  christos 	.word	0x88cf0c4a !aes_dround01	%f28,%f10,%f6,%f4
   2050      1.1  christos 	.word	0x8ccf8c6a !aes_dround23	%f30,%f10,%f6,%f6
   2051      1.1  christos 	.word	0x90c84440 !aes_dround01	%f32,%f0,%f2,%f8
   2052      1.1  christos 	.word	0x84c8c460 !aes_dround23	%f34,%f0,%f2,%f2
   2053      1.1  christos 	.word	0x94c84c44 !aes_dround01	%f32,%f4,%f6,%f10
   2054      1.1  christos 	.word	0x8cc8cc64 !aes_dround23	%f34,%f4,%f6,%f6
   2055      1.1  christos 	.word	0x80c94448 !aes_dround01	%f36,%f8,%f2,%f0
   2056      1.1  christos 	.word	0x84c9c468 !aes_dround23	%f38,%f8,%f2,%f2
   2057      1.1  christos 	.word	0x88c94c4a !aes_dround01	%f36,%f10,%f6,%f4
   2058      1.1  christos 	.word	0x8cc9cc6a !aes_dround23	%f38,%f10,%f6,%f6
   2059      1.1  christos 	.word	0x90ca4440 !aes_dround01	%f40,%f0,%f2,%f8
   2060      1.1  christos 	.word	0x84cac460 !aes_dround23	%f42,%f0,%f2,%f2
   2061      1.1  christos 	.word	0x94ca4c44 !aes_dround01	%f40,%f4,%f6,%f10
   2062      1.1  christos 	.word	0x8ccacc64 !aes_dround23	%f42,%f4,%f6,%f6
   2063      1.1  christos 	.word	0x80cb4448 !aes_dround01	%f44,%f8,%f2,%f0
   2064      1.1  christos 	.word	0x84cbc468 !aes_dround23	%f46,%f8,%f2,%f2
   2065      1.1  christos 	.word	0x88cb4c4a !aes_dround01	%f44,%f10,%f6,%f4
   2066      1.1  christos 	.word	0x8ccbcc6a !aes_dround23	%f46,%f10,%f6,%f6
   2067      1.1  christos 	.word	0x90cc4440 !aes_dround01	%f48,%f0,%f2,%f8
   2068      1.1  christos 	.word	0x84ccc460 !aes_dround23	%f50,%f0,%f2,%f2
   2069      1.1  christos 	.word	0x94cc4c44 !aes_dround01	%f48,%f4,%f6,%f10
   2070      1.1  christos 	.word	0x8ccccc64 !aes_dround23	%f50,%f4,%f6,%f6
   2071      1.1  christos 	.word	0x80cd44c8 !aes_dround01_l	%f52,%f8,%f2,%f0
   2072      1.1  christos 	.word	0x84cdc4e8 !aes_dround23_l	%f54,%f8,%f2,%f2
   2073      1.1  christos 	.word	0x88cd4cca !aes_dround01_l	%f52,%f10,%f6,%f4
   2074      1.1  christos 	retl
   2075      1.1  christos 	.word	0x8ccdccea !aes_dround23_l	%f54,%f10,%f6,%f6
   2076      1.1  christos .type	_aes128_decrypt_2x,#function
   2077      1.1  christos .size	_aes128_decrypt_2x,.-_aes128_decrypt_2x
   2078      1.1  christos .align	32
   2079      1.1  christos _aes192_encrypt_1x:
   2080      1.1  christos 	.word	0x88cc0400 !aes_eround01	%f16,%f0,%f2,%f4
   2081      1.1  christos 	.word	0x84cc8420 !aes_eround23	%f18,%f0,%f2,%f2
   2082      1.1  christos 	.word	0x80cd0404 !aes_eround01	%f20,%f4,%f2,%f0
   2083      1.1  christos 	.word	0x84cd8424 !aes_eround23	%f22,%f4,%f2,%f2
   2084      1.1  christos 	.word	0x88ce0400 !aes_eround01	%f24,%f0,%f2,%f4
   2085      1.1  christos 	.word	0x84ce8420 !aes_eround23	%f26,%f0,%f2,%f2
   2086      1.1  christos 	.word	0x80cf0404 !aes_eround01	%f28,%f4,%f2,%f0
   2087      1.1  christos 	.word	0x84cf8424 !aes_eround23	%f30,%f4,%f2,%f2
   2088      1.1  christos 	.word	0x88c84400 !aes_eround01	%f32,%f0,%f2,%f4
   2089      1.1  christos 	.word	0x84c8c420 !aes_eround23	%f34,%f0,%f2,%f2
   2090      1.1  christos 	.word	0x80c94404 !aes_eround01	%f36,%f4,%f2,%f0
   2091      1.1  christos 	.word	0x84c9c424 !aes_eround23	%f38,%f4,%f2,%f2
   2092      1.1  christos 	.word	0x88ca4400 !aes_eround01	%f40,%f0,%f2,%f4
   2093      1.1  christos 	.word	0x84cac420 !aes_eround23	%f42,%f0,%f2,%f2
   2094      1.1  christos 	.word	0x80cb4404 !aes_eround01	%f44,%f4,%f2,%f0
   2095      1.1  christos 	.word	0x84cbc424 !aes_eround23	%f46,%f4,%f2,%f2
   2096      1.1  christos 	.word	0x88cc4400 !aes_eround01	%f48,%f0,%f2,%f4
   2097      1.1  christos 	.word	0x84ccc420 !aes_eround23	%f50,%f0,%f2,%f2
   2098      1.1  christos 	.word	0x80cd4404 !aes_eround01	%f52,%f4,%f2,%f0
   2099      1.1  christos 	.word	0x84cdc424 !aes_eround23	%f54,%f4,%f2,%f2
   2100      1.1  christos 	.word	0x88ce4400 !aes_eround01	%f56,%f0,%f2,%f4
   2101      1.1  christos 	.word	0x84cec420 !aes_eround23	%f58,%f0,%f2,%f2
   2102      1.1  christos 	.word	0x80cf4484 !aes_eround01_l	%f60,%f4,%f2,%f0
   2103      1.1  christos 	retl
   2104      1.1  christos 	.word	0x84cfc4a4 !aes_eround23_l	%f62,%f4,%f2,%f2
   2105      1.1  christos .type	_aes192_encrypt_1x,#function
   2106      1.1  christos .size	_aes192_encrypt_1x,.-_aes192_encrypt_1x
   2107      1.1  christos 
   2108      1.1  christos .align	32
   2109      1.1  christos _aes192_encrypt_2x:
   2110      1.1  christos 	.word	0x90cc0400 !aes_eround01	%f16,%f0,%f2,%f8
   2111      1.1  christos 	.word	0x84cc8420 !aes_eround23	%f18,%f0,%f2,%f2
   2112      1.1  christos 	.word	0x94cc0c04 !aes_eround01	%f16,%f4,%f6,%f10
   2113      1.1  christos 	.word	0x8ccc8c24 !aes_eround23	%f18,%f4,%f6,%f6
   2114      1.1  christos 	.word	0x80cd0408 !aes_eround01	%f20,%f8,%f2,%f0
   2115      1.1  christos 	.word	0x84cd8428 !aes_eround23	%f22,%f8,%f2,%f2
   2116      1.1  christos 	.word	0x88cd0c0a !aes_eround01	%f20,%f10,%f6,%f4
   2117      1.1  christos 	.word	0x8ccd8c2a !aes_eround23	%f22,%f10,%f6,%f6
   2118      1.1  christos 	.word	0x90ce0400 !aes_eround01	%f24,%f0,%f2,%f8
   2119      1.1  christos 	.word	0x84ce8420 !aes_eround23	%f26,%f0,%f2,%f2
   2120      1.1  christos 	.word	0x94ce0c04 !aes_eround01	%f24,%f4,%f6,%f10
   2121      1.1  christos 	.word	0x8cce8c24 !aes_eround23	%f26,%f4,%f6,%f6
   2122      1.1  christos 	.word	0x80cf0408 !aes_eround01	%f28,%f8,%f2,%f0
   2123      1.1  christos 	.word	0x84cf8428 !aes_eround23	%f30,%f8,%f2,%f2
   2124      1.1  christos 	.word	0x88cf0c0a !aes_eround01	%f28,%f10,%f6,%f4
   2125      1.1  christos 	.word	0x8ccf8c2a !aes_eround23	%f30,%f10,%f6,%f6
   2126      1.1  christos 	.word	0x90c84400 !aes_eround01	%f32,%f0,%f2,%f8
   2127      1.1  christos 	.word	0x84c8c420 !aes_eround23	%f34,%f0,%f2,%f2
   2128      1.1  christos 	.word	0x94c84c04 !aes_eround01	%f32,%f4,%f6,%f10
   2129      1.1  christos 	.word	0x8cc8cc24 !aes_eround23	%f34,%f4,%f6,%f6
   2130      1.1  christos 	.word	0x80c94408 !aes_eround01	%f36,%f8,%f2,%f0
   2131      1.1  christos 	.word	0x84c9c428 !aes_eround23	%f38,%f8,%f2,%f2
   2132      1.1  christos 	.word	0x88c94c0a !aes_eround01	%f36,%f10,%f6,%f4
   2133      1.1  christos 	.word	0x8cc9cc2a !aes_eround23	%f38,%f10,%f6,%f6
   2134      1.1  christos 	.word	0x90ca4400 !aes_eround01	%f40,%f0,%f2,%f8
   2135      1.1  christos 	.word	0x84cac420 !aes_eround23	%f42,%f0,%f2,%f2
   2136      1.1  christos 	.word	0x94ca4c04 !aes_eround01	%f40,%f4,%f6,%f10
   2137      1.1  christos 	.word	0x8ccacc24 !aes_eround23	%f42,%f4,%f6,%f6
   2138      1.1  christos 	.word	0x80cb4408 !aes_eround01	%f44,%f8,%f2,%f0
   2139      1.1  christos 	.word	0x84cbc428 !aes_eround23	%f46,%f8,%f2,%f2
   2140      1.1  christos 	.word	0x88cb4c0a !aes_eround01	%f44,%f10,%f6,%f4
   2141      1.1  christos 	.word	0x8ccbcc2a !aes_eround23	%f46,%f10,%f6,%f6
   2142      1.1  christos 	.word	0x90cc4400 !aes_eround01	%f48,%f0,%f2,%f8
   2143      1.1  christos 	.word	0x84ccc420 !aes_eround23	%f50,%f0,%f2,%f2
   2144      1.1  christos 	.word	0x94cc4c04 !aes_eround01	%f48,%f4,%f6,%f10
   2145      1.1  christos 	.word	0x8ccccc24 !aes_eround23	%f50,%f4,%f6,%f6
   2146      1.1  christos 	.word	0x80cd4408 !aes_eround01	%f52,%f8,%f2,%f0
   2147      1.1  christos 	.word	0x84cdc428 !aes_eround23	%f54,%f8,%f2,%f2
   2148      1.1  christos 	.word	0x88cd4c0a !aes_eround01	%f52,%f10,%f6,%f4
   2149      1.1  christos 	.word	0x8ccdcc2a !aes_eround23	%f54,%f10,%f6,%f6
   2150      1.1  christos 	.word	0x90ce4400 !aes_eround01	%f56,%f0,%f2,%f8
   2151      1.1  christos 	.word	0x84cec420 !aes_eround23	%f58,%f0,%f2,%f2
   2152      1.1  christos 	.word	0x94ce4c04 !aes_eround01	%f56,%f4,%f6,%f10
   2153      1.1  christos 	.word	0x8ccecc24 !aes_eround23	%f58,%f4,%f6,%f6
   2154      1.1  christos 	.word	0x80cf4488 !aes_eround01_l	%f60,%f8,%f2,%f0
   2155      1.1  christos 	.word	0x84cfc4a8 !aes_eround23_l	%f62,%f8,%f2,%f2
   2156      1.1  christos 	.word	0x88cf4c8a !aes_eround01_l	%f60,%f10,%f6,%f4
   2157      1.1  christos 	retl
   2158      1.1  christos 	.word	0x8ccfccaa !aes_eround23_l	%f62,%f10,%f6,%f6
   2159      1.1  christos .type	_aes192_encrypt_2x,#function
   2160      1.1  christos .size	_aes192_encrypt_2x,.-_aes192_encrypt_2x
   2161      1.1  christos 
   2162      1.1  christos .align	32
   2163      1.1  christos _aes256_encrypt_1x:
   2164      1.1  christos 	.word	0x88cc0400 !aes_eround01	%f16,%f0,%f2,%f4
   2165      1.1  christos 	.word	0x84cc8420 !aes_eround23	%f18,%f0,%f2,%f2
   2166      1.1  christos 	ldd		[%i3 + 208], %f16
   2167      1.1  christos 	ldd		[%i3 + 216], %f18
   2168      1.1  christos 	.word	0x80cd0404 !aes_eround01	%f20,%f4,%f2,%f0
   2169      1.1  christos 	.word	0x84cd8424 !aes_eround23	%f22,%f4,%f2,%f2
   2170      1.1  christos 	ldd		[%i3 + 224], %f20
   2171      1.1  christos 	ldd		[%i3 + 232], %f22
   2172      1.1  christos 	.word	0x88ce0400 !aes_eround01	%f24,%f0,%f2,%f4
   2173      1.1  christos 	.word	0x84ce8420 !aes_eround23	%f26,%f0,%f2,%f2
   2174      1.1  christos 	.word	0x80cf0404 !aes_eround01	%f28,%f4,%f2,%f0
   2175      1.1  christos 	.word	0x84cf8424 !aes_eround23	%f30,%f4,%f2,%f2
   2176      1.1  christos 	.word	0x88c84400 !aes_eround01	%f32,%f0,%f2,%f4
   2177      1.1  christos 	.word	0x84c8c420 !aes_eround23	%f34,%f0,%f2,%f2
   2178      1.1  christos 	.word	0x80c94404 !aes_eround01	%f36,%f4,%f2,%f0
   2179      1.1  christos 	.word	0x84c9c424 !aes_eround23	%f38,%f4,%f2,%f2
   2180      1.1  christos 	.word	0x88ca4400 !aes_eround01	%f40,%f0,%f2,%f4
   2181      1.1  christos 	.word	0x84cac420 !aes_eround23	%f42,%f0,%f2,%f2
   2182      1.1  christos 	.word	0x80cb4404 !aes_eround01	%f44,%f4,%f2,%f0
   2183      1.1  christos 	.word	0x84cbc424 !aes_eround23	%f46,%f4,%f2,%f2
   2184      1.1  christos 	.word	0x88cc4400 !aes_eround01	%f48,%f0,%f2,%f4
   2185      1.1  christos 	.word	0x84ccc420 !aes_eround23	%f50,%f0,%f2,%f2
   2186      1.1  christos 	.word	0x80cd4404 !aes_eround01	%f52,%f4,%f2,%f0
   2187      1.1  christos 	.word	0x84cdc424 !aes_eround23	%f54,%f4,%f2,%f2
   2188      1.1  christos 	.word	0x88ce4400 !aes_eround01	%f56,%f0,%f2,%f4
   2189      1.1  christos 	.word	0x84cec420 !aes_eround23	%f58,%f0,%f2,%f2
   2190      1.1  christos 	.word	0x80cf4404 !aes_eround01	%f60,%f4,%f2,%f0
   2191      1.1  christos 	.word	0x84cfc424 !aes_eround23	%f62,%f4,%f2,%f2
   2192      1.1  christos 	.word	0x88cc0400 !aes_eround01	%f16,%f0,%f2,%f4
   2193      1.1  christos 	.word	0x84cc8420 !aes_eround23	%f18,%f0,%f2,%f2
   2194      1.1  christos 	ldd		[%i3 + 16], %f16
   2195      1.1  christos 	ldd		[%i3 + 24], %f18
   2196      1.1  christos 	.word	0x80cd0484 !aes_eround01_l	%f20,%f4,%f2,%f0
   2197      1.1  christos 	.word	0x84cd84a4 !aes_eround23_l	%f22,%f4,%f2,%f2
   2198      1.1  christos 	ldd		[%i3 + 32], %f20
   2199      1.1  christos 	retl
   2200      1.1  christos 	ldd		[%i3 + 40], %f22
   2201      1.1  christos .type	_aes256_encrypt_1x,#function
   2202      1.1  christos .size	_aes256_encrypt_1x,.-_aes256_encrypt_1x
   2203      1.1  christos 
   2204      1.1  christos .align	32
   2205      1.1  christos _aes256_encrypt_2x:
   2206      1.1  christos 	.word	0x90cc0400 !aes_eround01	%f16,%f0,%f2,%f8
   2207      1.1  christos 	.word	0x84cc8420 !aes_eround23	%f18,%f0,%f2,%f2
   2208      1.1  christos 	.word	0x94cc0c04 !aes_eround01	%f16,%f4,%f6,%f10
   2209      1.1  christos 	.word	0x8ccc8c24 !aes_eround23	%f18,%f4,%f6,%f6
   2210      1.1  christos 	ldd		[%i3 + 208], %f16
   2211      1.1  christos 	ldd		[%i3 + 216], %f18
   2212      1.1  christos 	.word	0x80cd0408 !aes_eround01	%f20,%f8,%f2,%f0
   2213      1.1  christos 	.word	0x84cd8428 !aes_eround23	%f22,%f8,%f2,%f2
   2214      1.1  christos 	.word	0x88cd0c0a !aes_eround01	%f20,%f10,%f6,%f4
   2215      1.1  christos 	.word	0x8ccd8c2a !aes_eround23	%f22,%f10,%f6,%f6
   2216      1.1  christos 	ldd		[%i3 + 224], %f20
   2217      1.1  christos 	ldd		[%i3 + 232], %f22
   2218      1.1  christos 	.word	0x90ce0400 !aes_eround01	%f24,%f0,%f2,%f8
   2219      1.1  christos 	.word	0x84ce8420 !aes_eround23	%f26,%f0,%f2,%f2
   2220      1.1  christos 	.word	0x94ce0c04 !aes_eround01	%f24,%f4,%f6,%f10
   2221      1.1  christos 	.word	0x8cce8c24 !aes_eround23	%f26,%f4,%f6,%f6
   2222      1.1  christos 	.word	0x80cf0408 !aes_eround01	%f28,%f8,%f2,%f0
   2223      1.1  christos 	.word	0x84cf8428 !aes_eround23	%f30,%f8,%f2,%f2
   2224      1.1  christos 	.word	0x88cf0c0a !aes_eround01	%f28,%f10,%f6,%f4
   2225      1.1  christos 	.word	0x8ccf8c2a !aes_eround23	%f30,%f10,%f6,%f6
   2226      1.1  christos 	.word	0x90c84400 !aes_eround01	%f32,%f0,%f2,%f8
   2227      1.1  christos 	.word	0x84c8c420 !aes_eround23	%f34,%f0,%f2,%f2
   2228      1.1  christos 	.word	0x94c84c04 !aes_eround01	%f32,%f4,%f6,%f10
   2229      1.1  christos 	.word	0x8cc8cc24 !aes_eround23	%f34,%f4,%f6,%f6
   2230      1.1  christos 	.word	0x80c94408 !aes_eround01	%f36,%f8,%f2,%f0
   2231      1.1  christos 	.word	0x84c9c428 !aes_eround23	%f38,%f8,%f2,%f2
   2232      1.1  christos 	.word	0x88c94c0a !aes_eround01	%f36,%f10,%f6,%f4
   2233      1.1  christos 	.word	0x8cc9cc2a !aes_eround23	%f38,%f10,%f6,%f6
   2234      1.1  christos 	.word	0x90ca4400 !aes_eround01	%f40,%f0,%f2,%f8
   2235      1.1  christos 	.word	0x84cac420 !aes_eround23	%f42,%f0,%f2,%f2
   2236      1.1  christos 	.word	0x94ca4c04 !aes_eround01	%f40,%f4,%f6,%f10
   2237      1.1  christos 	.word	0x8ccacc24 !aes_eround23	%f42,%f4,%f6,%f6
   2238      1.1  christos 	.word	0x80cb4408 !aes_eround01	%f44,%f8,%f2,%f0
   2239      1.1  christos 	.word	0x84cbc428 !aes_eround23	%f46,%f8,%f2,%f2
   2240      1.1  christos 	.word	0x88cb4c0a !aes_eround01	%f44,%f10,%f6,%f4
   2241      1.1  christos 	.word	0x8ccbcc2a !aes_eround23	%f46,%f10,%f6,%f6
   2242      1.1  christos 	.word	0x90cc4400 !aes_eround01	%f48,%f0,%f2,%f8
   2243      1.1  christos 	.word	0x84ccc420 !aes_eround23	%f50,%f0,%f2,%f2
   2244      1.1  christos 	.word	0x94cc4c04 !aes_eround01	%f48,%f4,%f6,%f10
   2245      1.1  christos 	.word	0x8ccccc24 !aes_eround23	%f50,%f4,%f6,%f6
   2246      1.1  christos 	.word	0x80cd4408 !aes_eround01	%f52,%f8,%f2,%f0
   2247      1.1  christos 	.word	0x84cdc428 !aes_eround23	%f54,%f8,%f2,%f2
   2248      1.1  christos 	.word	0x88cd4c0a !aes_eround01	%f52,%f10,%f6,%f4
   2249      1.1  christos 	.word	0x8ccdcc2a !aes_eround23	%f54,%f10,%f6,%f6
   2250      1.1  christos 	.word	0x90ce4400 !aes_eround01	%f56,%f0,%f2,%f8
   2251      1.1  christos 	.word	0x84cec420 !aes_eround23	%f58,%f0,%f2,%f2
   2252      1.1  christos 	.word	0x94ce4c04 !aes_eround01	%f56,%f4,%f6,%f10
   2253      1.1  christos 	.word	0x8ccecc24 !aes_eround23	%f58,%f4,%f6,%f6
   2254      1.1  christos 	.word	0x80cf4408 !aes_eround01	%f60,%f8,%f2,%f0
   2255      1.1  christos 	.word	0x84cfc428 !aes_eround23	%f62,%f8,%f2,%f2
   2256      1.1  christos 	.word	0x88cf4c0a !aes_eround01	%f60,%f10,%f6,%f4
   2257      1.1  christos 	.word	0x8ccfcc2a !aes_eround23	%f62,%f10,%f6,%f6
   2258      1.1  christos 	.word	0x90cc0400 !aes_eround01	%f16,%f0,%f2,%f8
   2259      1.1  christos 	.word	0x84cc8420 !aes_eround23	%f18,%f0,%f2,%f2
   2260      1.1  christos 	.word	0x94cc0c04 !aes_eround01	%f16,%f4,%f6,%f10
   2261      1.1  christos 	.word	0x8ccc8c24 !aes_eround23	%f18,%f4,%f6,%f6
   2262      1.1  christos 	ldd		[%i3 + 16], %f16
   2263      1.1  christos 	ldd		[%i3 + 24], %f18
   2264      1.1  christos 	.word	0x80cd0488 !aes_eround01_l	%f20,%f8,%f2,%f0
   2265      1.1  christos 	.word	0x84cd84a8 !aes_eround23_l	%f22,%f8,%f2,%f2
   2266      1.1  christos 	.word	0x88cd0c8a !aes_eround01_l	%f20,%f10,%f6,%f4
   2267      1.1  christos 	.word	0x8ccd8caa !aes_eround23_l	%f22,%f10,%f6,%f6
   2268      1.1  christos 	ldd		[%i3 + 32], %f20
   2269      1.1  christos 	retl
   2270      1.1  christos 	ldd		[%i3 + 40], %f22
   2271      1.1  christos .type	_aes256_encrypt_2x,#function
   2272      1.1  christos .size	_aes256_encrypt_2x,.-_aes256_encrypt_2x
   2273      1.1  christos 
   2274      1.1  christos .align	32
   2275      1.1  christos _aes192_loadkey:
   2276      1.1  christos 	ldx		[%i3 + 0], %g4
   2277      1.1  christos 	ldx		[%i3 + 8], %g5
   2278      1.1  christos 	ldd		[%i3 + 16], %f16
   2279      1.1  christos 	ldd		[%i3 + 24], %f18
   2280      1.1  christos 	ldd		[%i3 + 32], %f20
   2281      1.1  christos 	ldd		[%i3 + 40], %f22
   2282      1.1  christos 	ldd		[%i3 + 48], %f24
   2283      1.1  christos 	ldd		[%i3 + 56], %f26
   2284      1.1  christos 	ldd		[%i3 + 64], %f28
   2285      1.1  christos 	ldd		[%i3 + 72], %f30
   2286      1.1  christos 	ldd		[%i3 + 80], %f32
   2287      1.1  christos 	ldd		[%i3 + 88], %f34
   2288      1.1  christos 	ldd		[%i3 + 96], %f36
   2289      1.1  christos 	ldd		[%i3 + 104], %f38
   2290      1.1  christos 	ldd		[%i3 + 112], %f40
   2291      1.1  christos 	ldd		[%i3 + 120], %f42
   2292      1.1  christos 	ldd		[%i3 + 128], %f44
   2293      1.1  christos 	ldd		[%i3 + 136], %f46
   2294      1.1  christos 	ldd		[%i3 + 144], %f48
   2295      1.1  christos 	ldd		[%i3 + 152], %f50
   2296      1.1  christos 	ldd		[%i3 + 160], %f52
   2297      1.1  christos 	ldd		[%i3 + 168], %f54
   2298      1.1  christos 	ldd		[%i3 + 176], %f56
   2299      1.1  christos 	ldd		[%i3 + 184], %f58
   2300      1.1  christos 	ldd		[%i3 + 192], %f60
   2301      1.1  christos 	ldd		[%i3 + 200], %f62
   2302      1.1  christos 	retl
   2303      1.1  christos 	nop
   2304      1.1  christos .type	_aes192_loadkey,#function
   2305      1.1  christos .size	_aes192_loadkey,.-_aes192_loadkey
   2306      1.1  christos _aes256_loadkey=_aes192_loadkey
   2307      1.1  christos _aes192_load_enckey=_aes192_loadkey
   2308      1.1  christos _aes192_load_deckey=_aes192_loadkey
   2309      1.1  christos _aes256_load_enckey=_aes192_loadkey
   2310      1.1  christos _aes256_load_deckey=_aes192_loadkey
   2311      1.1  christos .globl	aes256_t4_cbc_encrypt
   2312      1.1  christos .align	32
   2313      1.1  christos aes256_t4_cbc_encrypt:
   2314  1.1.1.2  christos 	save		%sp, -STACK_FRAME, %sp
   2315      1.1  christos 	cmp		%i2, 0
   2316  1.1.1.2  christos 	be,pn		SIZE_T_CC, .L256_cbc_enc_abort
   2317      1.1  christos 	srln		%i2, 0, %i2		! needed on v8+, "nop" on v9
   2318      1.1  christos 	sub		%i0, %i1, %l5	! %i0!=%i1
   2319      1.1  christos 	ld		[%i4 + 0], %f0
   2320      1.1  christos 	ld		[%i4 + 4], %f1
   2321      1.1  christos 	ld		[%i4 + 8], %f2
   2322      1.1  christos 	ld		[%i4 + 12], %f3
   2323      1.1  christos 	prefetch	[%i0], 20
   2324      1.1  christos 	prefetch	[%i0 + 63], 20
   2325      1.1  christos 	call		_aes256_load_enckey
   2326      1.1  christos 	and		%i0, 7, %l0
   2327      1.1  christos 	andn		%i0, 7, %i0
   2328      1.1  christos 	sll		%l0, 3, %l0
   2329      1.1  christos 	mov		64, %l1
   2330      1.1  christos 	mov		0xff, %l3
   2331      1.1  christos 	sub		%l1, %l0, %l1
   2332      1.1  christos 	and		%i1, 7, %l2
   2333      1.1  christos 	cmp		%i2, 127
   2334      1.1  christos 	movrnz		%l2, 0, %l5		! if (	%i1&7 ||
   2335  1.1.1.2  christos 	movleu		SIZE_T_CC, 0, %l5	!	%i2<128 ||
   2336      1.1  christos 	brnz,pn		%l5, .L256cbc_enc_blk	!	%i0==%i1)
   2337      1.1  christos 	srl		%l3, %l2, %l3
   2338      1.1  christos 
   2339      1.1  christos 	.word	0xb3b64340 !alignaddrl	%i1,%g0,%i1
   2340      1.1  christos 	srlx		%i2, 4, %i2
   2341      1.1  christos 	prefetch	[%i1], 22
   2342      1.1  christos 
   2343      1.1  christos .L256_cbc_enc_loop:
   2344      1.1  christos 	ldx		[%i0 + 0], %o0
   2345      1.1  christos 	brz,pt		%l0, 4f
   2346      1.1  christos 	ldx		[%i0 + 8], %o1
   2347      1.1  christos 
   2348      1.1  christos 	ldx		[%i0 + 16], %o2
   2349      1.1  christos 	sllx		%o0, %l0, %o0
   2350      1.1  christos 	srlx		%o1, %l1, %g1
   2351      1.1  christos 	sllx		%o1, %l0, %o1
   2352      1.1  christos 	or		%g1, %o0, %o0
   2353      1.1  christos 	srlx		%o2, %l1, %o2
   2354      1.1  christos 	or		%o2, %o1, %o1
   2355      1.1  christos 4:
   2356      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   2357      1.1  christos 	xor		%g5, %o1, %o1
   2358      1.1  christos 	.word	0x99b02308 !movxtod	%o0,%f12
   2359      1.1  christos 	.word	0x9db02309 !movxtod	%o1,%f14
   2360      1.1  christos 
   2361      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
   2362      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   2363      1.1  christos 	prefetch	[%i1 + 63], 22
   2364      1.1  christos 	prefetch	[%i0 + 16+63], 20
   2365      1.1  christos 	call		_aes256_encrypt_1x
   2366      1.1  christos 	add		%i0, 16, %i0
   2367      1.1  christos 
   2368      1.1  christos 	brnz,pn		%l2, 2f
   2369      1.1  christos 	sub		%i2, 1, %i2
   2370  1.1.1.2  christos 
   2371      1.1  christos 	std		%f0, [%i1 + 0]
   2372      1.1  christos 	std		%f2, [%i1 + 8]
   2373      1.1  christos 	brnz,pt		%i2, .L256_cbc_enc_loop
   2374      1.1  christos 	add		%i1, 16, %i1
   2375      1.1  christos 	st		%f0, [%i4 + 0]
   2376      1.1  christos 	st		%f1, [%i4 + 4]
   2377      1.1  christos 	st		%f2, [%i4 + 8]
   2378      1.1  christos 	st		%f3, [%i4 + 12]
   2379      1.1  christos .L256_cbc_enc_abort:
   2380      1.1  christos 	ret
   2381      1.1  christos 	restore
   2382      1.1  christos 
   2383      1.1  christos .align	16
   2384      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   2385      1.1  christos 						! and ~3x deterioration
   2386      1.1  christos 						! in inp==out case
   2387      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4		! handle unaligned output
   2388      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
   2389      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
   2390      1.1  christos 
   2391      1.1  christos 	stda		%f4, [%i1 + %l3]0xc0	! partial store
   2392      1.1  christos 	std		%f6, [%i1 + 8]
   2393      1.1  christos 	add		%i1, 16, %i1
   2394      1.1  christos 	orn		%g0, %l3, %l3
   2395      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   2396      1.1  christos 
   2397      1.1  christos 	brnz,pt		%i2, .L256_cbc_enc_loop+4
   2398      1.1  christos 	orn		%g0, %l3, %l3
   2399      1.1  christos 	st		%f0, [%i4 + 0]
   2400      1.1  christos 	st		%f1, [%i4 + 4]
   2401      1.1  christos 	st		%f2, [%i4 + 8]
   2402      1.1  christos 	st		%f3, [%i4 + 12]
   2403      1.1  christos 	ret
   2404      1.1  christos 	restore
   2405      1.1  christos 
   2406      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   2407      1.1  christos .align	32
   2408      1.1  christos .L256cbc_enc_blk:
   2409      1.1  christos 	add	%i1, %i2, %l5
   2410      1.1  christos 	and	%l5, 63, %l5	! tail
   2411      1.1  christos 	sub	%i2, %l5, %i2
   2412      1.1  christos 	add	%l5, 15, %l5	! round up to 16n
   2413      1.1  christos 	srlx	%i2, 4, %i2
   2414      1.1  christos 	srl	%l5, 4, %l5
   2415      1.1  christos 
   2416      1.1  christos .L256_cbc_enc_blk_loop:
   2417      1.1  christos 	ldx		[%i0 + 0], %o0
   2418      1.1  christos 	brz,pt		%l0, 5f
   2419      1.1  christos 	ldx		[%i0 + 8], %o1
   2420      1.1  christos 
   2421      1.1  christos 	ldx		[%i0 + 16], %o2
   2422      1.1  christos 	sllx		%o0, %l0, %o0
   2423      1.1  christos 	srlx		%o1, %l1, %g1
   2424      1.1  christos 	sllx		%o1, %l0, %o1
   2425      1.1  christos 	or		%g1, %o0, %o0
   2426      1.1  christos 	srlx		%o2, %l1, %o2
   2427      1.1  christos 	or		%o2, %o1, %o1
   2428      1.1  christos 5:
   2429      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   2430      1.1  christos 	xor		%g5, %o1, %o1
   2431      1.1  christos 	.word	0x99b02308 !movxtod	%o0,%f12
   2432      1.1  christos 	.word	0x9db02309 !movxtod	%o1,%f14
   2433      1.1  christos 
   2434      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
   2435      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   2436      1.1  christos 	prefetch	[%i0 + 16+63], 20
   2437      1.1  christos 	call		_aes256_encrypt_1x
   2438      1.1  christos 	add		%i0, 16, %i0
   2439      1.1  christos 	sub		%i2, 1, %i2
   2440  1.1.1.2  christos 
   2441      1.1  christos 	stda		%f0, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   2442      1.1  christos 	add		%i1, 8, %i1
   2443      1.1  christos 	stda		%f2, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   2444      1.1  christos 	brnz,pt		%i2, .L256_cbc_enc_blk_loop
   2445      1.1  christos 	add		%i1, 8, %i1
   2446      1.1  christos 
   2447      1.1  christos 	membar		#StoreLoad|#StoreStore
   2448      1.1  christos 	brnz,pt		%l5, .L256_cbc_enc_loop
   2449      1.1  christos 	mov		%l5, %i2
   2450      1.1  christos 	st		%f0, [%i4 + 0]
   2451      1.1  christos 	st		%f1, [%i4 + 4]
   2452      1.1  christos 	st		%f2, [%i4 + 8]
   2453      1.1  christos 	st		%f3, [%i4 + 12]
   2454      1.1  christos 	ret
   2455      1.1  christos 	restore
   2456      1.1  christos .type	aes256_t4_cbc_encrypt,#function
   2457      1.1  christos .size	aes256_t4_cbc_encrypt,.-aes256_t4_cbc_encrypt
   2458      1.1  christos .globl	aes192_t4_cbc_encrypt
   2459      1.1  christos .align	32
   2460      1.1  christos aes192_t4_cbc_encrypt:
   2461  1.1.1.2  christos 	save		%sp, -STACK_FRAME, %sp
   2462      1.1  christos 	cmp		%i2, 0
   2463  1.1.1.2  christos 	be,pn		SIZE_T_CC, .L192_cbc_enc_abort
   2464      1.1  christos 	srln		%i2, 0, %i2		! needed on v8+, "nop" on v9
   2465      1.1  christos 	sub		%i0, %i1, %l5	! %i0!=%i1
   2466      1.1  christos 	ld		[%i4 + 0], %f0
   2467      1.1  christos 	ld		[%i4 + 4], %f1
   2468      1.1  christos 	ld		[%i4 + 8], %f2
   2469      1.1  christos 	ld		[%i4 + 12], %f3
   2470      1.1  christos 	prefetch	[%i0], 20
   2471      1.1  christos 	prefetch	[%i0 + 63], 20
   2472      1.1  christos 	call		_aes192_load_enckey
   2473      1.1  christos 	and		%i0, 7, %l0
   2474      1.1  christos 	andn		%i0, 7, %i0
   2475      1.1  christos 	sll		%l0, 3, %l0
   2476      1.1  christos 	mov		64, %l1
   2477      1.1  christos 	mov		0xff, %l3
   2478      1.1  christos 	sub		%l1, %l0, %l1
   2479      1.1  christos 	and		%i1, 7, %l2
   2480      1.1  christos 	cmp		%i2, 127
   2481      1.1  christos 	movrnz		%l2, 0, %l5		! if (	%i1&7 ||
   2482  1.1.1.2  christos 	movleu		SIZE_T_CC, 0, %l5	!	%i2<128 ||
   2483      1.1  christos 	brnz,pn		%l5, .L192cbc_enc_blk	!	%i0==%i1)
   2484      1.1  christos 	srl		%l3, %l2, %l3
   2485      1.1  christos 
   2486      1.1  christos 	.word	0xb3b64340 !alignaddrl	%i1,%g0,%i1
   2487      1.1  christos 	srlx		%i2, 4, %i2
   2488      1.1  christos 	prefetch	[%i1], 22
   2489      1.1  christos 
   2490      1.1  christos .L192_cbc_enc_loop:
   2491      1.1  christos 	ldx		[%i0 + 0], %o0
   2492      1.1  christos 	brz,pt		%l0, 4f
   2493      1.1  christos 	ldx		[%i0 + 8], %o1
   2494      1.1  christos 
   2495      1.1  christos 	ldx		[%i0 + 16], %o2
   2496      1.1  christos 	sllx		%o0, %l0, %o0
   2497      1.1  christos 	srlx		%o1, %l1, %g1
   2498      1.1  christos 	sllx		%o1, %l0, %o1
   2499      1.1  christos 	or		%g1, %o0, %o0
   2500      1.1  christos 	srlx		%o2, %l1, %o2
   2501      1.1  christos 	or		%o2, %o1, %o1
   2502      1.1  christos 4:
   2503      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   2504      1.1  christos 	xor		%g5, %o1, %o1
   2505      1.1  christos 	.word	0x99b02308 !movxtod	%o0,%f12
   2506      1.1  christos 	.word	0x9db02309 !movxtod	%o1,%f14
   2507      1.1  christos 
   2508      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
   2509      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   2510      1.1  christos 	prefetch	[%i1 + 63], 22
   2511      1.1  christos 	prefetch	[%i0 + 16+63], 20
   2512      1.1  christos 	call		_aes192_encrypt_1x
   2513      1.1  christos 	add		%i0, 16, %i0
   2514      1.1  christos 
   2515      1.1  christos 	brnz,pn		%l2, 2f
   2516      1.1  christos 	sub		%i2, 1, %i2
   2517  1.1.1.2  christos 
   2518      1.1  christos 	std		%f0, [%i1 + 0]
   2519      1.1  christos 	std		%f2, [%i1 + 8]
   2520      1.1  christos 	brnz,pt		%i2, .L192_cbc_enc_loop
   2521      1.1  christos 	add		%i1, 16, %i1
   2522      1.1  christos 	st		%f0, [%i4 + 0]
   2523      1.1  christos 	st		%f1, [%i4 + 4]
   2524      1.1  christos 	st		%f2, [%i4 + 8]
   2525      1.1  christos 	st		%f3, [%i4 + 12]
   2526      1.1  christos .L192_cbc_enc_abort:
   2527      1.1  christos 	ret
   2528      1.1  christos 	restore
   2529      1.1  christos 
   2530      1.1  christos .align	16
   2531      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   2532      1.1  christos 						! and ~3x deterioration
   2533      1.1  christos 						! in inp==out case
   2534      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4		! handle unaligned output
   2535      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
   2536      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
   2537      1.1  christos 
   2538      1.1  christos 	stda		%f4, [%i1 + %l3]0xc0	! partial store
   2539      1.1  christos 	std		%f6, [%i1 + 8]
   2540      1.1  christos 	add		%i1, 16, %i1
   2541      1.1  christos 	orn		%g0, %l3, %l3
   2542      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   2543      1.1  christos 
   2544      1.1  christos 	brnz,pt		%i2, .L192_cbc_enc_loop+4
   2545      1.1  christos 	orn		%g0, %l3, %l3
   2546      1.1  christos 	st		%f0, [%i4 + 0]
   2547      1.1  christos 	st		%f1, [%i4 + 4]
   2548      1.1  christos 	st		%f2, [%i4 + 8]
   2549      1.1  christos 	st		%f3, [%i4 + 12]
   2550      1.1  christos 	ret
   2551      1.1  christos 	restore
   2552      1.1  christos 
   2553      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   2554      1.1  christos .align	32
   2555      1.1  christos .L192cbc_enc_blk:
   2556      1.1  christos 	add	%i1, %i2, %l5
   2557      1.1  christos 	and	%l5, 63, %l5	! tail
   2558      1.1  christos 	sub	%i2, %l5, %i2
   2559      1.1  christos 	add	%l5, 15, %l5	! round up to 16n
   2560      1.1  christos 	srlx	%i2, 4, %i2
   2561      1.1  christos 	srl	%l5, 4, %l5
   2562      1.1  christos 
   2563      1.1  christos .L192_cbc_enc_blk_loop:
   2564      1.1  christos 	ldx		[%i0 + 0], %o0
   2565      1.1  christos 	brz,pt		%l0, 5f
   2566      1.1  christos 	ldx		[%i0 + 8], %o1
   2567      1.1  christos 
   2568      1.1  christos 	ldx		[%i0 + 16], %o2
   2569      1.1  christos 	sllx		%o0, %l0, %o0
   2570      1.1  christos 	srlx		%o1, %l1, %g1
   2571      1.1  christos 	sllx		%o1, %l0, %o1
   2572      1.1  christos 	or		%g1, %o0, %o0
   2573      1.1  christos 	srlx		%o2, %l1, %o2
   2574      1.1  christos 	or		%o2, %o1, %o1
   2575      1.1  christos 5:
   2576      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   2577      1.1  christos 	xor		%g5, %o1, %o1
   2578      1.1  christos 	.word	0x99b02308 !movxtod	%o0,%f12
   2579      1.1  christos 	.word	0x9db02309 !movxtod	%o1,%f14
   2580      1.1  christos 
   2581      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
   2582      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   2583      1.1  christos 	prefetch	[%i0 + 16+63], 20
   2584      1.1  christos 	call		_aes192_encrypt_1x
   2585      1.1  christos 	add		%i0, 16, %i0
   2586      1.1  christos 	sub		%i2, 1, %i2
   2587  1.1.1.2  christos 
   2588      1.1  christos 	stda		%f0, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   2589      1.1  christos 	add		%i1, 8, %i1
   2590      1.1  christos 	stda		%f2, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   2591      1.1  christos 	brnz,pt		%i2, .L192_cbc_enc_blk_loop
   2592      1.1  christos 	add		%i1, 8, %i1
   2593      1.1  christos 
   2594      1.1  christos 	membar		#StoreLoad|#StoreStore
   2595      1.1  christos 	brnz,pt		%l5, .L192_cbc_enc_loop
   2596      1.1  christos 	mov		%l5, %i2
   2597      1.1  christos 	st		%f0, [%i4 + 0]
   2598      1.1  christos 	st		%f1, [%i4 + 4]
   2599      1.1  christos 	st		%f2, [%i4 + 8]
   2600      1.1  christos 	st		%f3, [%i4 + 12]
   2601      1.1  christos 	ret
   2602      1.1  christos 	restore
   2603      1.1  christos .type	aes192_t4_cbc_encrypt,#function
   2604      1.1  christos .size	aes192_t4_cbc_encrypt,.-aes192_t4_cbc_encrypt
   2605      1.1  christos .globl	aes256_t4_ctr32_encrypt
   2606      1.1  christos .align	32
   2607      1.1  christos aes256_t4_ctr32_encrypt:
   2608  1.1.1.2  christos 	save		%sp, -STACK_FRAME, %sp
   2609      1.1  christos 	srln		%i2, 0, %i2		! needed on v8+, "nop" on v9
   2610      1.1  christos 
   2611      1.1  christos 	prefetch	[%i0], 20
   2612      1.1  christos 	prefetch	[%i0 + 63], 20
   2613      1.1  christos 	call		_aes256_load_enckey
   2614      1.1  christos 	sllx		%i2, 4, %i2
   2615      1.1  christos 
   2616      1.1  christos 	ld		[%i4 + 0], %l4	! counter
   2617      1.1  christos 	ld		[%i4 + 4], %l5
   2618      1.1  christos 	ld		[%i4 + 8], %l6
   2619      1.1  christos 	ld		[%i4 + 12], %l7
   2620      1.1  christos 
   2621      1.1  christos 	sllx		%l4, 32, %o5
   2622      1.1  christos 	or		%l5, %o5, %o5
   2623      1.1  christos 	sllx		%l6, 32, %g1
   2624      1.1  christos 	xor		%o5, %g4, %g4		! ^= rk[0]
   2625      1.1  christos 	xor		%g1, %g5, %g5
   2626      1.1  christos 	.word	0x9db02304 !movxtod	%g4,%f14		! most significant 64 bits
   2627      1.1  christos 
   2628      1.1  christos 	sub		%i0, %i1, %l5	! %i0!=%i1
   2629      1.1  christos 	and		%i0, 7, %l0
   2630      1.1  christos 	andn		%i0, 7, %i0
   2631      1.1  christos 	sll		%l0, 3, %l0
   2632      1.1  christos 	mov		64, %l1
   2633      1.1  christos 	mov		0xff, %l3
   2634      1.1  christos 	sub		%l1, %l0, %l1
   2635      1.1  christos 	and		%i1, 7, %l2
   2636      1.1  christos 	cmp		%i2, 255
   2637      1.1  christos 	movrnz		%l2, 0, %l5		! if (	%i1&7 ||
   2638  1.1.1.2  christos 	movleu		SIZE_T_CC, 0, %l5	!	%i2<256 ||
   2639      1.1  christos 	brnz,pn		%l5, .L256_ctr32_blk	!	%i0==%i1)
   2640      1.1  christos 	srl		%l3, %l2, %l3
   2641      1.1  christos 
   2642      1.1  christos 	andcc		%i2, 16, %g0		! is number of blocks even?
   2643      1.1  christos 	.word	0xb3b64340 !alignaddrl	%i1,%g0,%i1
   2644      1.1  christos 	bz		%icc, .L256_ctr32_loop2x
   2645      1.1  christos 	srlx		%i2, 4, %i2
   2646      1.1  christos .L256_ctr32_loop:
   2647      1.1  christos 	ldx		[%i0 + 0], %o0
   2648      1.1  christos 	brz,pt		%l0, 4f
   2649      1.1  christos 	ldx		[%i0 + 8], %o1
   2650      1.1  christos 
   2651      1.1  christos 	ldx		[%i0 + 16], %o2
   2652      1.1  christos 	sllx		%o0, %l0, %o0
   2653      1.1  christos 	srlx		%o1, %l1, %g1
   2654      1.1  christos 	sllx		%o1, %l0, %o1
   2655      1.1  christos 	or		%g1, %o0, %o0
   2656      1.1  christos 	srlx		%o2, %l1, %o2
   2657      1.1  christos 	or		%o2, %o1, %o1
   2658      1.1  christos 4:
   2659      1.1  christos 	xor		%g5, %l7, %g1		! ^= rk[0]
   2660      1.1  christos 	add		%l7, 1, %l7
   2661      1.1  christos 	.word	0x85b02301 !movxtod	%g1,%f2
   2662      1.1  christos 	srl		%l7, 0, %l7		! clruw
   2663      1.1  christos 	prefetch	[%i1 + 63], 22
   2664      1.1  christos 	prefetch	[%i0 + 16+63], 20
   2665      1.1  christos 	.word	0x88cc040e !aes_eround01	%f16,%f14,%f2,%f4
   2666      1.1  christos 	.word	0x84cc842e !aes_eround23	%f18,%f14,%f2,%f2
   2667      1.1  christos 	call		_aes256_encrypt_1x+8
   2668      1.1  christos 	add		%i0, 16, %i0
   2669      1.1  christos 
   2670      1.1  christos 	.word	0x95b02308 !movxtod	%o0,%f10
   2671      1.1  christos 	.word	0x99b02309 !movxtod	%o1,%f12
   2672      1.1  christos 	.word	0x81b28d80 !fxor	%f10,%f0,%f0		! ^= inp
   2673      1.1  christos 	.word	0x85b30d82 !fxor	%f12,%f2,%f2
   2674      1.1  christos 
   2675      1.1  christos 	brnz,pn		%l2, 2f
   2676      1.1  christos 	sub		%i2, 1, %i2
   2677  1.1.1.2  christos 
   2678      1.1  christos 	std		%f0, [%i1 + 0]
   2679      1.1  christos 	std		%f2, [%i1 + 8]
   2680      1.1  christos 	brnz,pt		%i2, .L256_ctr32_loop2x
   2681      1.1  christos 	add		%i1, 16, %i1
   2682      1.1  christos 
   2683      1.1  christos 	ret
   2684      1.1  christos 	restore
   2685      1.1  christos 
   2686      1.1  christos .align	16
   2687      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   2688      1.1  christos 						! and ~3x deterioration
   2689      1.1  christos 						! in inp==out case
   2690      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4		! handle unaligned output
   2691      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
   2692      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
   2693      1.1  christos 	stda		%f4, [%i1 + %l3]0xc0	! partial store
   2694      1.1  christos 	std		%f6, [%i1 + 8]
   2695      1.1  christos 	add		%i1, 16, %i1
   2696      1.1  christos 	orn		%g0, %l3, %l3
   2697      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   2698      1.1  christos 
   2699      1.1  christos 	brnz,pt		%i2, .L256_ctr32_loop2x+4
   2700      1.1  christos 	orn		%g0, %l3, %l3
   2701      1.1  christos 
   2702      1.1  christos 	ret
   2703      1.1  christos 	restore
   2704      1.1  christos 
   2705      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   2706      1.1  christos .align	32
   2707      1.1  christos .L256_ctr32_loop2x:
   2708      1.1  christos 	ldx		[%i0 + 0], %o0
   2709      1.1  christos 	ldx		[%i0 + 8], %o1
   2710      1.1  christos 	ldx		[%i0 + 16], %o2
   2711      1.1  christos 	brz,pt		%l0, 4f
   2712      1.1  christos 	ldx		[%i0 + 24], %o3
   2713      1.1  christos 
   2714      1.1  christos 	ldx		[%i0 + 32], %o4
   2715      1.1  christos 	sllx		%o0, %l0, %o0
   2716      1.1  christos 	srlx		%o1, %l1, %g1
   2717      1.1  christos 	or		%g1, %o0, %o0
   2718      1.1  christos 	sllx		%o1, %l0, %o1
   2719      1.1  christos 	srlx		%o2, %l1, %g1
   2720      1.1  christos 	or		%g1, %o1, %o1
   2721      1.1  christos 	sllx		%o2, %l0, %o2
   2722      1.1  christos 	srlx		%o3, %l1, %g1
   2723      1.1  christos 	or		%g1, %o2, %o2
   2724      1.1  christos 	sllx		%o3, %l0, %o3
   2725      1.1  christos 	srlx		%o4, %l1, %o4
   2726      1.1  christos 	or		%o4, %o3, %o3
   2727      1.1  christos 4:
   2728      1.1  christos 	xor		%g5, %l7, %g1		! ^= rk[0]
   2729      1.1  christos 	add		%l7, 1, %l7
   2730      1.1  christos 	.word	0x85b02301 !movxtod	%g1,%f2
   2731      1.1  christos 	srl		%l7, 0, %l7		! clruw
   2732      1.1  christos 	xor		%g5, %l7, %g1
   2733      1.1  christos 	add		%l7, 1, %l7
   2734      1.1  christos 	.word	0x8db02301 !movxtod	%g1,%f6
   2735      1.1  christos 	srl		%l7, 0, %l7		! clruw
   2736      1.1  christos 	prefetch	[%i1 + 63], 22
   2737      1.1  christos 	prefetch	[%i0 + 32+63], 20
   2738      1.1  christos 	.word	0x90cc040e !aes_eround01	%f16,%f14,%f2,%f8
   2739      1.1  christos 	.word	0x84cc842e !aes_eround23	%f18,%f14,%f2,%f2
   2740      1.1  christos 	.word	0x94cc0c0e !aes_eround01	%f16,%f14,%f6,%f10
   2741      1.1  christos 	.word	0x8ccc8c2e !aes_eround23	%f18,%f14,%f6,%f6
   2742      1.1  christos 	call		_aes256_encrypt_2x+16
   2743      1.1  christos 	add		%i0, 32, %i0
   2744      1.1  christos 
   2745      1.1  christos 	.word	0x91b02308 !movxtod	%o0,%f8
   2746      1.1  christos 	.word	0x95b02309 !movxtod	%o1,%f10
   2747      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
   2748      1.1  christos 	.word	0x81b20d80 !fxor	%f8,%f0,%f0		! ^= inp
   2749      1.1  christos 	.word	0x91b0230b !movxtod	%o3,%f8
   2750      1.1  christos 	.word	0x85b28d82 !fxor	%f10,%f2,%f2
   2751      1.1  christos 	.word	0x89b30d84 !fxor	%f12,%f4,%f4
   2752      1.1  christos 	.word	0x8db20d86 !fxor	%f8,%f6,%f6
   2753      1.1  christos 
   2754      1.1  christos 	brnz,pn		%l2, 2f
   2755      1.1  christos 	sub		%i2, 2, %i2
   2756  1.1.1.2  christos 
   2757      1.1  christos 	std		%f0, [%i1 + 0]
   2758      1.1  christos 	std		%f2, [%i1 + 8]
   2759      1.1  christos 	std		%f4, [%i1 + 16]
   2760      1.1  christos 	std		%f6, [%i1 + 24]
   2761      1.1  christos 	brnz,pt		%i2, .L256_ctr32_loop2x
   2762      1.1  christos 	add		%i1, 32, %i1
   2763      1.1  christos 
   2764      1.1  christos 	ret
   2765      1.1  christos 	restore
   2766      1.1  christos 
   2767      1.1  christos .align	16
   2768      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   2769      1.1  christos 						! and ~3x deterioration
   2770      1.1  christos 						! in inp==out case
   2771      1.1  christos 	.word	0x91b00900 !faligndata	%f0,%f0,%f8		! handle unaligned output
   2772      1.1  christos 	.word	0x81b00902 !faligndata	%f0,%f2,%f0
   2773      1.1  christos 	.word	0x85b08904 !faligndata	%f2,%f4,%f2
   2774      1.1  christos 	.word	0x89b10906 !faligndata	%f4,%f6,%f4
   2775      1.1  christos 	.word	0x8db18906 !faligndata	%f6,%f6,%f6
   2776      1.1  christos 
   2777      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   2778      1.1  christos 	std		%f0, [%i1 + 8]
   2779      1.1  christos 	std		%f2, [%i1 + 16]
   2780      1.1  christos 	std		%f4, [%i1 + 24]
   2781      1.1  christos 	add		%i1, 32, %i1
   2782      1.1  christos 	orn		%g0, %l3, %l3
   2783      1.1  christos 	stda		%f6, [%i1 + %l3]0xc0	! partial store
   2784      1.1  christos 
   2785      1.1  christos 	brnz,pt		%i2, .L256_ctr32_loop2x+4
   2786      1.1  christos 	orn		%g0, %l3, %l3
   2787      1.1  christos 
   2788      1.1  christos 	ret
   2789      1.1  christos 	restore
   2790      1.1  christos 
   2791      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   2792      1.1  christos .align	32
   2793      1.1  christos .L256_ctr32_blk:
   2794      1.1  christos 	add	%i1, %i2, %l5
   2795      1.1  christos 	and	%l5, 63, %l5	! tail
   2796      1.1  christos 	sub	%i2, %l5, %i2
   2797      1.1  christos 	add	%l5, 15, %l5	! round up to 16n
   2798      1.1  christos 	srlx	%i2, 4, %i2
   2799      1.1  christos 	srl	%l5, 4, %l5
   2800      1.1  christos 	sub	%i2, 1, %i2
   2801      1.1  christos 	add	%l5, 1, %l5
   2802      1.1  christos 
   2803      1.1  christos .L256_ctr32_blk_loop2x:
   2804      1.1  christos 	ldx		[%i0 + 0], %o0
   2805      1.1  christos 	ldx		[%i0 + 8], %o1
   2806      1.1  christos 	ldx		[%i0 + 16], %o2
   2807      1.1  christos 	brz,pt		%l0, 5f
   2808      1.1  christos 	ldx		[%i0 + 24], %o3
   2809      1.1  christos 
   2810      1.1  christos 	ldx		[%i0 + 32], %o4
   2811      1.1  christos 	sllx		%o0, %l0, %o0
   2812      1.1  christos 	srlx		%o1, %l1, %g1
   2813      1.1  christos 	or		%g1, %o0, %o0
   2814      1.1  christos 	sllx		%o1, %l0, %o1
   2815      1.1  christos 	srlx		%o2, %l1, %g1
   2816      1.1  christos 	or		%g1, %o1, %o1
   2817      1.1  christos 	sllx		%o2, %l0, %o2
   2818      1.1  christos 	srlx		%o3, %l1, %g1
   2819      1.1  christos 	or		%g1, %o2, %o2
   2820      1.1  christos 	sllx		%o3, %l0, %o3
   2821      1.1  christos 	srlx		%o4, %l1, %o4
   2822      1.1  christos 	or		%o4, %o3, %o3
   2823      1.1  christos 5:
   2824      1.1  christos 	xor		%g5, %l7, %g1		! ^= rk[0]
   2825      1.1  christos 	add		%l7, 1, %l7
   2826      1.1  christos 	.word	0x85b02301 !movxtod	%g1,%f2
   2827      1.1  christos 	srl		%l7, 0, %l7		! clruw
   2828      1.1  christos 	xor		%g5, %l7, %g1
   2829      1.1  christos 	add		%l7, 1, %l7
   2830      1.1  christos 	.word	0x8db02301 !movxtod	%g1,%f6
   2831      1.1  christos 	srl		%l7, 0, %l7		! clruw
   2832      1.1  christos 	prefetch	[%i0 + 32+63], 20
   2833      1.1  christos 	.word	0x90cc040e !aes_eround01	%f16,%f14,%f2,%f8
   2834      1.1  christos 	.word	0x84cc842e !aes_eround23	%f18,%f14,%f2,%f2
   2835      1.1  christos 	.word	0x94cc0c0e !aes_eround01	%f16,%f14,%f6,%f10
   2836      1.1  christos 	.word	0x8ccc8c2e !aes_eround23	%f18,%f14,%f6,%f6
   2837      1.1  christos 	call		_aes256_encrypt_2x+16
   2838      1.1  christos 	add		%i0, 32, %i0
   2839      1.1  christos 	subcc		%i2, 2, %i2
   2840      1.1  christos 
   2841      1.1  christos 	.word	0x91b02308 !movxtod	%o0,%f8
   2842      1.1  christos 	.word	0x95b02309 !movxtod	%o1,%f10
   2843      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
   2844      1.1  christos 	.word	0x81b20d80 !fxor	%f8,%f0,%f0		! ^= inp
   2845      1.1  christos 	.word	0x91b0230b !movxtod	%o3,%f8
   2846      1.1  christos 	.word	0x85b28d82 !fxor	%f10,%f2,%f2
   2847      1.1  christos 	.word	0x89b30d84 !fxor	%f12,%f4,%f4
   2848      1.1  christos 	.word	0x8db20d86 !fxor	%f8,%f6,%f6
   2849      1.1  christos 
   2850      1.1  christos 	stda		%f0, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   2851      1.1  christos 	add		%i1, 8, %i1
   2852      1.1  christos 	stda		%f2, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   2853      1.1  christos 	add		%i1, 8, %i1
   2854      1.1  christos 	stda		%f4, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   2855      1.1  christos 	add		%i1, 8, %i1
   2856      1.1  christos 	stda		%f6, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   2857  1.1.1.2  christos 	bgu,pt		SIZE_T_CC, .L256_ctr32_blk_loop2x
   2858      1.1  christos 	add		%i1, 8, %i1
   2859      1.1  christos 
   2860      1.1  christos 	add		%l5, %i2, %i2
   2861      1.1  christos 	andcc		%i2, 1, %g0		! is number of blocks even?
   2862      1.1  christos 	membar		#StoreLoad|#StoreStore
   2863      1.1  christos 	bnz,pt		%icc, .L256_ctr32_loop
   2864      1.1  christos 	srl		%i2, 0, %i2
   2865      1.1  christos 	brnz,pn		%i2, .L256_ctr32_loop2x
   2866      1.1  christos 	nop
   2867      1.1  christos 
   2868      1.1  christos 	ret
   2869      1.1  christos 	restore
   2870      1.1  christos .type	aes256_t4_ctr32_encrypt,#function
   2871      1.1  christos .size	aes256_t4_ctr32_encrypt,.-aes256_t4_ctr32_encrypt
   2872      1.1  christos .globl	aes256_t4_xts_encrypt
   2873      1.1  christos .align	32
   2874      1.1  christos aes256_t4_xts_encrypt:
   2875  1.1.1.2  christos 	save		%sp, -STACK_FRAME-16, %sp
   2876      1.1  christos 	srln		%i2, 0, %i2		! needed on v8+, "nop" on v9
   2877      1.1  christos 
   2878      1.1  christos 	mov		%i5, %o0
   2879  1.1.1.2  christos 	add		%fp, STACK_BIAS-16, %o1
   2880      1.1  christos 	call		aes_t4_encrypt
   2881      1.1  christos 	mov		%i4, %o2
   2882      1.1  christos 
   2883  1.1.1.2  christos 	add		%fp, STACK_BIAS-16, %l7
   2884      1.1  christos 	ldxa		[%l7]0x88, %g2
   2885  1.1.1.2  christos 	add		%fp, STACK_BIAS-8, %l7
   2886      1.1  christos 	ldxa		[%l7]0x88, %g3		! %g3:%g2 is tweak
   2887      1.1  christos 
   2888      1.1  christos 	sethi		%hi(0x76543210), %l7
   2889      1.1  christos 	or		%l7, %lo(0x76543210), %l7
   2890      1.1  christos 	.word	0x81b5c320 !bmask	%l7,%g0,%g0		! byte swap mask
   2891      1.1  christos 
   2892      1.1  christos 	prefetch	[%i0], 20
   2893      1.1  christos 	prefetch	[%i0 + 63], 20
   2894      1.1  christos 	call		_aes256_load_enckey
   2895      1.1  christos 	and		%i2, 15,  %i5
   2896      1.1  christos 	and		%i2, -16, %i2
   2897      1.1  christos 
   2898      1.1  christos 	sub		%i0, %i1, %l5	! %i0!=%i1
   2899      1.1  christos 	and		%i0, 7, %l0
   2900      1.1  christos 	andn		%i0, 7, %i0
   2901      1.1  christos 	sll		%l0, 3, %l0
   2902      1.1  christos 	mov		64, %l1
   2903      1.1  christos 	mov		0xff, %l3
   2904      1.1  christos 	sub		%l1, %l0, %l1
   2905      1.1  christos 	and		%i1, 7, %l2
   2906      1.1  christos 	cmp		%i2, 255
   2907      1.1  christos 	movrnz		%l2, 0, %l5		! if (	%i1&7 ||
   2908  1.1.1.2  christos 	movleu		SIZE_T_CC, 0, %l5	!	%i2<256 ||
   2909      1.1  christos 	brnz,pn		%l5, .L256_xts_enblk !	%i0==%i1)
   2910      1.1  christos 	srl		%l3, %l2, %l3
   2911      1.1  christos 
   2912      1.1  christos 	andcc		%i2, 16, %g0		! is number of blocks even?
   2913      1.1  christos 	.word	0xb3b64340 !alignaddrl	%i1,%g0,%i1
   2914      1.1  christos 	bz		%icc, .L256_xts_enloop2x
   2915      1.1  christos 	srlx		%i2, 4, %i2
   2916      1.1  christos .L256_xts_enloop:
   2917      1.1  christos 	ldx		[%i0 + 0], %o0
   2918      1.1  christos 	brz,pt		%l0, 4f
   2919      1.1  christos 	ldx		[%i0 + 8], %o1
   2920      1.1  christos 
   2921      1.1  christos 	ldx		[%i0 + 16], %o2
   2922      1.1  christos 	sllx		%o0, %l0, %o0
   2923      1.1  christos 	srlx		%o1, %l1, %g1
   2924      1.1  christos 	sllx		%o1, %l0, %o1
   2925      1.1  christos 	or		%g1, %o0, %o0
   2926      1.1  christos 	srlx		%o2, %l1, %o2
   2927      1.1  christos 	or		%o2, %o1, %o1
   2928      1.1  christos 4:
   2929      1.1  christos 	.word	0x99b02302 !movxtod	%g2,%f12
   2930      1.1  christos 	.word	0x9db02303 !movxtod	%g3,%f14
   2931      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
   2932      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
   2933      1.1  christos 
   2934      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   2935      1.1  christos 	xor		%g5, %o1, %o1
   2936      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
   2937      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
   2938      1.1  christos 
   2939      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   2940      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   2941      1.1  christos 
   2942      1.1  christos 	prefetch	[%i1 + 63], 22
   2943      1.1  christos 	prefetch	[%i0 + 16+63], 20
   2944      1.1  christos 	call		_aes256_encrypt_1x
   2945      1.1  christos 	add		%i0, 16, %i0
   2946      1.1  christos 
   2947      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   2948      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   2949      1.1  christos 
   2950      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   2951      1.1  christos 	addcc		%g2, %g2, %g2
   2952      1.1  christos 	and		%l7, 0x87, %l7
   2953      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   2954      1.1  christos 	xor		%l7, %g2, %g2
   2955      1.1  christos 
   2956      1.1  christos 	brnz,pn		%l2, 2f
   2957      1.1  christos 	sub		%i2, 1, %i2
   2958  1.1.1.2  christos 
   2959      1.1  christos 	std		%f0, [%i1 + 0]
   2960      1.1  christos 	std		%f2, [%i1 + 8]
   2961      1.1  christos 	brnz,pt		%i2, .L256_xts_enloop2x
   2962      1.1  christos 	add		%i1, 16, %i1
   2963      1.1  christos 
   2964      1.1  christos 	brnz,pn		%i5, .L256_xts_ensteal
   2965      1.1  christos 	nop
   2966      1.1  christos 
   2967      1.1  christos 	ret
   2968      1.1  christos 	restore
   2969      1.1  christos 
   2970      1.1  christos .align	16
   2971      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   2972      1.1  christos 						! and ~3x deterioration
   2973      1.1  christos 						! in inp==out case
   2974      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4		! handle unaligned output
   2975      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
   2976      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
   2977      1.1  christos 	stda		%f4, [%i1 + %l3]0xc0	! partial store
   2978      1.1  christos 	std		%f6, [%i1 + 8]
   2979      1.1  christos 	add		%i1, 16, %i1
   2980      1.1  christos 	orn		%g0, %l3, %l3
   2981      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   2982      1.1  christos 
   2983      1.1  christos 	brnz,pt		%i2, .L256_xts_enloop2x+4
   2984      1.1  christos 	orn		%g0, %l3, %l3
   2985      1.1  christos 
   2986      1.1  christos 	brnz,pn		%i5, .L256_xts_ensteal
   2987      1.1  christos 	nop
   2988      1.1  christos 
   2989      1.1  christos 	ret
   2990      1.1  christos 	restore
   2991      1.1  christos 
   2992      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   2993      1.1  christos .align	32
   2994      1.1  christos .L256_xts_enloop2x:
   2995      1.1  christos 	ldx		[%i0 + 0], %o0
   2996      1.1  christos 	ldx		[%i0 + 8], %o1
   2997      1.1  christos 	ldx		[%i0 + 16], %o2
   2998      1.1  christos 	brz,pt		%l0, 4f
   2999      1.1  christos 	ldx		[%i0 + 24], %o3
   3000      1.1  christos 
   3001      1.1  christos 	ldx		[%i0 + 32], %o4
   3002      1.1  christos 	sllx		%o0, %l0, %o0
   3003      1.1  christos 	srlx		%o1, %l1, %g1
   3004      1.1  christos 	or		%g1, %o0, %o0
   3005      1.1  christos 	sllx		%o1, %l0, %o1
   3006      1.1  christos 	srlx		%o2, %l1, %g1
   3007      1.1  christos 	or		%g1, %o1, %o1
   3008      1.1  christos 	sllx		%o2, %l0, %o2
   3009      1.1  christos 	srlx		%o3, %l1, %g1
   3010      1.1  christos 	or		%g1, %o2, %o2
   3011      1.1  christos 	sllx		%o3, %l0, %o3
   3012      1.1  christos 	srlx		%o4, %l1, %o4
   3013      1.1  christos 	or		%o4, %o3, %o3
   3014      1.1  christos 4:
   3015      1.1  christos 	.word	0x99b02302 !movxtod	%g2,%f12
   3016      1.1  christos 	.word	0x9db02303 !movxtod	%g3,%f14
   3017      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
   3018      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
   3019      1.1  christos 
   3020      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   3021      1.1  christos 	addcc		%g2, %g2, %g2
   3022      1.1  christos 	and		%l7, 0x87, %l7
   3023      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   3024      1.1  christos 	xor		%l7, %g2, %g2
   3025      1.1  christos 
   3026      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   3027      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   3028      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   3029      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   3030      1.1  christos 
   3031      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   3032      1.1  christos 	xor		%g5, %o1, %o1
   3033      1.1  christos 	xor		%g4, %o2, %o2		! ^= rk[0]
   3034      1.1  christos 	xor		%g5, %o3, %o3
   3035      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
   3036      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
   3037      1.1  christos 	.word	0x89b0230a !movxtod	%o2,%f4
   3038      1.1  christos 	.word	0x8db0230b !movxtod	%o3,%f6
   3039      1.1  christos 
   3040      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   3041      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   3042      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4		! ^= tweak[0]
   3043      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   3044      1.1  christos 
   3045      1.1  christos 	prefetch	[%i1 + 63], 22
   3046      1.1  christos 	prefetch	[%i0 + 32+63], 20
   3047      1.1  christos 	call		_aes256_encrypt_2x
   3048      1.1  christos 	add		%i0, 32, %i0
   3049      1.1  christos 
   3050      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   3051      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   3052      1.1  christos 
   3053      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   3054      1.1  christos 	addcc		%g2, %g2, %g2
   3055      1.1  christos 	and		%l7, 0x87, %l7
   3056      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   3057      1.1  christos 	xor		%l7, %g2, %g2
   3058      1.1  christos 
   3059      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   3060      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   3061      1.1  christos 
   3062      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   3063      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   3064      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   3065      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   3066      1.1  christos 
   3067      1.1  christos 	brnz,pn		%l2, 2f
   3068      1.1  christos 	sub		%i2, 2, %i2
   3069  1.1.1.2  christos 
   3070      1.1  christos 	std		%f0, [%i1 + 0]
   3071      1.1  christos 	std		%f2, [%i1 + 8]
   3072      1.1  christos 	std		%f4, [%i1 + 16]
   3073      1.1  christos 	std		%f6, [%i1 + 24]
   3074      1.1  christos 	brnz,pt		%i2, .L256_xts_enloop2x
   3075      1.1  christos 	add		%i1, 32, %i1
   3076      1.1  christos 
   3077      1.1  christos 	.word	0x81b00f04 !fsrc2	%f0,%f4,%f0
   3078      1.1  christos 	.word	0x85b00f06 !fsrc2	%f0,%f6,%f2
   3079      1.1  christos 	brnz,pn		%i5, .L256_xts_ensteal
   3080      1.1  christos 	nop
   3081      1.1  christos 
   3082      1.1  christos 	ret
   3083      1.1  christos 	restore
   3084      1.1  christos 
   3085      1.1  christos .align	16
   3086      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   3087      1.1  christos 						! and ~3x deterioration
   3088      1.1  christos 						! in inp==out case
   3089      1.1  christos 	.word	0x91b00900 !faligndata	%f0,%f0,%f8		! handle unaligned output
   3090      1.1  christos 	.word	0x95b00902 !faligndata	%f0,%f2,%f10
   3091      1.1  christos 	.word	0x99b08904 !faligndata	%f2,%f4,%f12
   3092      1.1  christos 	.word	0x9db10906 !faligndata	%f4,%f6,%f14
   3093      1.1  christos 	.word	0x81b18906 !faligndata	%f6,%f6,%f0
   3094      1.1  christos 
   3095      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   3096      1.1  christos 	std		%f10, [%i1 + 8]
   3097      1.1  christos 	std		%f12, [%i1 + 16]
   3098      1.1  christos 	std		%f14, [%i1 + 24]
   3099      1.1  christos 	add		%i1, 32, %i1
   3100      1.1  christos 	orn		%g0, %l3, %l3
   3101      1.1  christos 	stda		%f0, [%i1 + %l3]0xc0	! partial store
   3102      1.1  christos 
   3103      1.1  christos 	brnz,pt		%i2, .L256_xts_enloop2x+4
   3104      1.1  christos 	orn		%g0, %l3, %l3
   3105      1.1  christos 
   3106      1.1  christos 	.word	0x81b00f04 !fsrc2	%f0,%f4,%f0
   3107      1.1  christos 	.word	0x85b00f06 !fsrc2	%f0,%f6,%f2
   3108      1.1  christos 	brnz,pn		%i5, .L256_xts_ensteal
   3109      1.1  christos 	nop
   3110      1.1  christos 
   3111      1.1  christos 	ret
   3112      1.1  christos 	restore
   3113      1.1  christos 
   3114      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   3115      1.1  christos .align	32
   3116      1.1  christos .L256_xts_enblk:
   3117      1.1  christos 	add	%i1, %i2, %l5
   3118      1.1  christos 	and	%l5, 63, %l5	! tail
   3119      1.1  christos 	sub	%i2, %l5, %i2
   3120      1.1  christos 	add	%l5, 15, %l5	! round up to 16n
   3121      1.1  christos 	srlx	%i2, 4, %i2
   3122      1.1  christos 	srl	%l5, 4, %l5
   3123      1.1  christos 	sub	%i2, 1, %i2
   3124      1.1  christos 	add	%l5, 1, %l5
   3125      1.1  christos 
   3126      1.1  christos .L256_xts_enblk2x:
   3127      1.1  christos 	ldx		[%i0 + 0], %o0
   3128      1.1  christos 	ldx		[%i0 + 8], %o1
   3129      1.1  christos 	ldx		[%i0 + 16], %o2
   3130      1.1  christos 	brz,pt		%l0, 5f
   3131      1.1  christos 	ldx		[%i0 + 24], %o3
   3132      1.1  christos 
   3133      1.1  christos 	ldx		[%i0 + 32], %o4
   3134      1.1  christos 	sllx		%o0, %l0, %o0
   3135      1.1  christos 	srlx		%o1, %l1, %g1
   3136      1.1  christos 	or		%g1, %o0, %o0
   3137      1.1  christos 	sllx		%o1, %l0, %o1
   3138      1.1  christos 	srlx		%o2, %l1, %g1
   3139      1.1  christos 	or		%g1, %o1, %o1
   3140      1.1  christos 	sllx		%o2, %l0, %o2
   3141      1.1  christos 	srlx		%o3, %l1, %g1
   3142      1.1  christos 	or		%g1, %o2, %o2
   3143      1.1  christos 	sllx		%o3, %l0, %o3
   3144      1.1  christos 	srlx		%o4, %l1, %o4
   3145      1.1  christos 	or		%o4, %o3, %o3
   3146      1.1  christos 5:
   3147      1.1  christos 	.word	0x99b02302 !movxtod	%g2,%f12
   3148      1.1  christos 	.word	0x9db02303 !movxtod	%g3,%f14
   3149      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
   3150      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
   3151      1.1  christos 
   3152      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   3153      1.1  christos 	addcc		%g2, %g2, %g2
   3154      1.1  christos 	and		%l7, 0x87, %l7
   3155      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   3156      1.1  christos 	xor		%l7, %g2, %g2
   3157      1.1  christos 
   3158      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   3159      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   3160      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   3161      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   3162      1.1  christos 
   3163      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   3164      1.1  christos 	xor		%g5, %o1, %o1
   3165      1.1  christos 	xor		%g4, %o2, %o2		! ^= rk[0]
   3166      1.1  christos 	xor		%g5, %o3, %o3
   3167      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
   3168      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
   3169      1.1  christos 	.word	0x89b0230a !movxtod	%o2,%f4
   3170      1.1  christos 	.word	0x8db0230b !movxtod	%o3,%f6
   3171      1.1  christos 
   3172      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   3173      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   3174      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4		! ^= tweak[0]
   3175      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   3176      1.1  christos 
   3177      1.1  christos 	prefetch	[%i0 + 32+63], 20
   3178      1.1  christos 	call		_aes256_encrypt_2x
   3179      1.1  christos 	add		%i0, 32, %i0
   3180      1.1  christos 
   3181      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   3182      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   3183      1.1  christos 
   3184      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   3185      1.1  christos 	addcc		%g2, %g2, %g2
   3186      1.1  christos 	and		%l7, 0x87, %l7
   3187      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   3188      1.1  christos 	xor		%l7, %g2, %g2
   3189      1.1  christos 
   3190      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   3191      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   3192      1.1  christos 
   3193      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   3194      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   3195      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   3196      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   3197      1.1  christos 
   3198      1.1  christos 	subcc		%i2, 2, %i2
   3199      1.1  christos 	stda		%f0, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   3200      1.1  christos 	add		%i1, 8, %i1
   3201      1.1  christos 	stda		%f2, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   3202      1.1  christos 	add		%i1, 8, %i1
   3203      1.1  christos 	stda		%f4, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   3204      1.1  christos 	add		%i1, 8, %i1
   3205      1.1  christos 	stda		%f6, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   3206  1.1.1.2  christos 	bgu,pt		SIZE_T_CC, .L256_xts_enblk2x
   3207      1.1  christos 	add		%i1, 8, %i1
   3208      1.1  christos 
   3209      1.1  christos 	add		%l5, %i2, %i2
   3210      1.1  christos 	andcc		%i2, 1, %g0		! is number of blocks even?
   3211      1.1  christos 	membar		#StoreLoad|#StoreStore
   3212      1.1  christos 	bnz,pt		%icc, .L256_xts_enloop
   3213      1.1  christos 	srl		%i2, 0, %i2
   3214      1.1  christos 	brnz,pn		%i2, .L256_xts_enloop2x
   3215      1.1  christos 	nop
   3216      1.1  christos 
   3217      1.1  christos 	.word	0x81b00f04 !fsrc2	%f0,%f4,%f0
   3218      1.1  christos 	.word	0x85b00f06 !fsrc2	%f0,%f6,%f2
   3219      1.1  christos 	brnz,pn		%i5, .L256_xts_ensteal
   3220      1.1  christos 	nop
   3221      1.1  christos 
   3222      1.1  christos 	ret
   3223      1.1  christos 	restore
   3224      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   3225      1.1  christos .align	32
   3226      1.1  christos .L256_xts_ensteal:
   3227  1.1.1.2  christos 	std		%f0, [%fp + STACK_BIAS-16]	! copy of output
   3228  1.1.1.2  christos 	std		%f2, [%fp + STACK_BIAS-8]
   3229      1.1  christos 
   3230      1.1  christos 	srl		%l0, 3, %l0
   3231  1.1.1.2  christos 	add		%fp, STACK_BIAS-16, %l7
   3232      1.1  christos 	add		%i0, %l0, %i0	! original %i0+%i2&-15
   3233      1.1  christos 	add		%i1, %l2, %i1	! original %i1+%i2&-15
   3234      1.1  christos 	mov		0, %l0
   3235      1.1  christos 	nop					! align
   3236      1.1  christos 
   3237      1.1  christos .L256_xts_enstealing:
   3238      1.1  christos 	ldub		[%i0 + %l0], %o0
   3239      1.1  christos 	ldub		[%l7  + %l0], %o1
   3240      1.1  christos 	dec		%i5
   3241      1.1  christos 	stb		%o0, [%l7  + %l0]
   3242      1.1  christos 	stb		%o1, [%i1 + %l0]
   3243      1.1  christos 	brnz		%i5, .L256_xts_enstealing
   3244      1.1  christos 	inc		%l0
   3245      1.1  christos 
   3246      1.1  christos 	mov		%l7, %i0
   3247      1.1  christos 	sub		%i1, 16, %i1
   3248      1.1  christos 	mov		0, %l0
   3249      1.1  christos 	sub		%i1, %l2, %i1
   3250      1.1  christos 	ba		.L256_xts_enloop	! one more time
   3251      1.1  christos 	mov		1, %i2				! %i5 is 0
   3252      1.1  christos 	ret
   3253      1.1  christos 	restore
   3254      1.1  christos .type	aes256_t4_xts_encrypt,#function
   3255      1.1  christos .size	aes256_t4_xts_encrypt,.-aes256_t4_xts_encrypt
   3256      1.1  christos .globl	aes256_t4_xts_decrypt
   3257      1.1  christos .align	32
   3258      1.1  christos aes256_t4_xts_decrypt:
   3259  1.1.1.2  christos 	save		%sp, -STACK_FRAME-16, %sp
   3260      1.1  christos 	srln		%i2, 0, %i2		! needed on v8+, "nop" on v9
   3261      1.1  christos 
   3262      1.1  christos 	mov		%i5, %o0
   3263  1.1.1.2  christos 	add		%fp, STACK_BIAS-16, %o1
   3264      1.1  christos 	call		aes_t4_encrypt
   3265      1.1  christos 	mov		%i4, %o2
   3266      1.1  christos 
   3267  1.1.1.2  christos 	add		%fp, STACK_BIAS-16, %l7
   3268      1.1  christos 	ldxa		[%l7]0x88, %g2
   3269  1.1.1.2  christos 	add		%fp, STACK_BIAS-8, %l7
   3270      1.1  christos 	ldxa		[%l7]0x88, %g3		! %g3:%g2 is tweak
   3271      1.1  christos 
   3272      1.1  christos 	sethi		%hi(0x76543210), %l7
   3273      1.1  christos 	or		%l7, %lo(0x76543210), %l7
   3274      1.1  christos 	.word	0x81b5c320 !bmask	%l7,%g0,%g0		! byte swap mask
   3275      1.1  christos 
   3276      1.1  christos 	prefetch	[%i0], 20
   3277      1.1  christos 	prefetch	[%i0 + 63], 20
   3278      1.1  christos 	call		_aes256_load_deckey
   3279      1.1  christos 	and		%i2, 15,  %i5
   3280      1.1  christos 	and		%i2, -16, %i2
   3281      1.1  christos 	mov		0, %l7
   3282      1.1  christos 	movrnz		%i5, 16,  %l7
   3283      1.1  christos 	sub		%i2, %l7, %i2
   3284      1.1  christos 
   3285      1.1  christos 	sub		%i0, %i1, %l5	! %i0!=%i1
   3286      1.1  christos 	and		%i0, 7, %l0
   3287      1.1  christos 	andn		%i0, 7, %i0
   3288      1.1  christos 	sll		%l0, 3, %l0
   3289      1.1  christos 	mov		64, %l1
   3290      1.1  christos 	mov		0xff, %l3
   3291      1.1  christos 	sub		%l1, %l0, %l1
   3292      1.1  christos 	and		%i1, 7, %l2
   3293      1.1  christos 	cmp		%i2, 255
   3294      1.1  christos 	movrnz		%l2, 0, %l5		! if (	%i1&7 ||
   3295  1.1.1.2  christos 	movleu		SIZE_T_CC, 0, %l5	!	%i2<256 ||
   3296      1.1  christos 	brnz,pn		%l5, .L256_xts_deblk !	%i0==%i1)
   3297      1.1  christos 	srl		%l3, %l2, %l3
   3298      1.1  christos 
   3299      1.1  christos 	andcc		%i2, 16, %g0		! is number of blocks even?
   3300      1.1  christos 	brz,pn		%i2, .L256_xts_desteal
   3301      1.1  christos 	.word	0xb3b64340 !alignaddrl	%i1,%g0,%i1
   3302      1.1  christos 	bz		%icc, .L256_xts_deloop2x
   3303      1.1  christos 	srlx		%i2, 4, %i2
   3304      1.1  christos .L256_xts_deloop:
   3305      1.1  christos 	ldx		[%i0 + 0], %o0
   3306      1.1  christos 	brz,pt		%l0, 4f
   3307      1.1  christos 	ldx		[%i0 + 8], %o1
   3308      1.1  christos 
   3309      1.1  christos 	ldx		[%i0 + 16], %o2
   3310      1.1  christos 	sllx		%o0, %l0, %o0
   3311      1.1  christos 	srlx		%o1, %l1, %g1
   3312      1.1  christos 	sllx		%o1, %l0, %o1
   3313      1.1  christos 	or		%g1, %o0, %o0
   3314      1.1  christos 	srlx		%o2, %l1, %o2
   3315      1.1  christos 	or		%o2, %o1, %o1
   3316      1.1  christos 4:
   3317      1.1  christos 	.word	0x99b02302 !movxtod	%g2,%f12
   3318      1.1  christos 	.word	0x9db02303 !movxtod	%g3,%f14
   3319      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
   3320      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
   3321      1.1  christos 
   3322      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   3323      1.1  christos 	xor		%g5, %o1, %o1
   3324      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
   3325      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
   3326      1.1  christos 
   3327      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   3328      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   3329      1.1  christos 
   3330      1.1  christos 	prefetch	[%i1 + 63], 22
   3331      1.1  christos 	prefetch	[%i0 + 16+63], 20
   3332      1.1  christos 	call		_aes256_decrypt_1x
   3333      1.1  christos 	add		%i0, 16, %i0
   3334      1.1  christos 
   3335      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   3336      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   3337      1.1  christos 
   3338      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   3339      1.1  christos 	addcc		%g2, %g2, %g2
   3340      1.1  christos 	and		%l7, 0x87, %l7
   3341      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   3342      1.1  christos 	xor		%l7, %g2, %g2
   3343      1.1  christos 
   3344      1.1  christos 	brnz,pn		%l2, 2f
   3345      1.1  christos 	sub		%i2, 1, %i2
   3346  1.1.1.2  christos 
   3347      1.1  christos 	std		%f0, [%i1 + 0]
   3348      1.1  christos 	std		%f2, [%i1 + 8]
   3349      1.1  christos 	brnz,pt		%i2, .L256_xts_deloop2x
   3350      1.1  christos 	add		%i1, 16, %i1
   3351      1.1  christos 
   3352      1.1  christos 	brnz,pn		%i5, .L256_xts_desteal
   3353      1.1  christos 	nop
   3354      1.1  christos 
   3355      1.1  christos 	ret
   3356      1.1  christos 	restore
   3357      1.1  christos 
   3358      1.1  christos .align	16
   3359      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   3360      1.1  christos 						! and ~3x deterioration
   3361      1.1  christos 						! in inp==out case
   3362      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4		! handle unaligned output
   3363      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
   3364      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
   3365      1.1  christos 	stda		%f4, [%i1 + %l3]0xc0	! partial store
   3366      1.1  christos 	std		%f6, [%i1 + 8]
   3367      1.1  christos 	add		%i1, 16, %i1
   3368      1.1  christos 	orn		%g0, %l3, %l3
   3369      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   3370      1.1  christos 
   3371      1.1  christos 	brnz,pt		%i2, .L256_xts_deloop2x+4
   3372      1.1  christos 	orn		%g0, %l3, %l3
   3373      1.1  christos 
   3374      1.1  christos 	brnz,pn		%i5, .L256_xts_desteal
   3375      1.1  christos 	nop
   3376      1.1  christos 
   3377      1.1  christos 	ret
   3378      1.1  christos 	restore
   3379      1.1  christos 
   3380      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   3381      1.1  christos .align	32
   3382      1.1  christos .L256_xts_deloop2x:
   3383      1.1  christos 	ldx		[%i0 + 0], %o0
   3384      1.1  christos 	ldx		[%i0 + 8], %o1
   3385      1.1  christos 	ldx		[%i0 + 16], %o2
   3386      1.1  christos 	brz,pt		%l0, 4f
   3387      1.1  christos 	ldx		[%i0 + 24], %o3
   3388      1.1  christos 
   3389      1.1  christos 	ldx		[%i0 + 32], %o4
   3390      1.1  christos 	sllx		%o0, %l0, %o0
   3391      1.1  christos 	srlx		%o1, %l1, %g1
   3392      1.1  christos 	or		%g1, %o0, %o0
   3393      1.1  christos 	sllx		%o1, %l0, %o1
   3394      1.1  christos 	srlx		%o2, %l1, %g1
   3395      1.1  christos 	or		%g1, %o1, %o1
   3396      1.1  christos 	sllx		%o2, %l0, %o2
   3397      1.1  christos 	srlx		%o3, %l1, %g1
   3398      1.1  christos 	or		%g1, %o2, %o2
   3399      1.1  christos 	sllx		%o3, %l0, %o3
   3400      1.1  christos 	srlx		%o4, %l1, %o4
   3401      1.1  christos 	or		%o4, %o3, %o3
   3402      1.1  christos 4:
   3403      1.1  christos 	.word	0x99b02302 !movxtod	%g2,%f12
   3404      1.1  christos 	.word	0x9db02303 !movxtod	%g3,%f14
   3405      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
   3406      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
   3407      1.1  christos 
   3408      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   3409      1.1  christos 	addcc		%g2, %g2, %g2
   3410      1.1  christos 	and		%l7, 0x87, %l7
   3411      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   3412      1.1  christos 	xor		%l7, %g2, %g2
   3413      1.1  christos 
   3414      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   3415      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   3416      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   3417      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   3418      1.1  christos 
   3419      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   3420      1.1  christos 	xor		%g5, %o1, %o1
   3421      1.1  christos 	xor		%g4, %o2, %o2		! ^= rk[0]
   3422      1.1  christos 	xor		%g5, %o3, %o3
   3423      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
   3424      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
   3425      1.1  christos 	.word	0x89b0230a !movxtod	%o2,%f4
   3426      1.1  christos 	.word	0x8db0230b !movxtod	%o3,%f6
   3427      1.1  christos 
   3428      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   3429      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   3430      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4		! ^= tweak[0]
   3431      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   3432      1.1  christos 
   3433      1.1  christos 	prefetch	[%i1 + 63], 22
   3434      1.1  christos 	prefetch	[%i0 + 32+63], 20
   3435      1.1  christos 	call		_aes256_decrypt_2x
   3436      1.1  christos 	add		%i0, 32, %i0
   3437      1.1  christos 
   3438      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   3439      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   3440      1.1  christos 
   3441      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   3442      1.1  christos 	addcc		%g2, %g2, %g2
   3443      1.1  christos 	and		%l7, 0x87, %l7
   3444      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   3445      1.1  christos 	xor		%l7, %g2, %g2
   3446      1.1  christos 
   3447      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   3448      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   3449      1.1  christos 
   3450      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   3451      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   3452      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   3453      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   3454      1.1  christos 
   3455      1.1  christos 	brnz,pn		%l2, 2f
   3456      1.1  christos 	sub		%i2, 2, %i2
   3457  1.1.1.2  christos 
   3458      1.1  christos 	std		%f0, [%i1 + 0]
   3459      1.1  christos 	std		%f2, [%i1 + 8]
   3460      1.1  christos 	std		%f4, [%i1 + 16]
   3461      1.1  christos 	std		%f6, [%i1 + 24]
   3462      1.1  christos 	brnz,pt		%i2, .L256_xts_deloop2x
   3463      1.1  christos 	add		%i1, 32, %i1
   3464      1.1  christos 
   3465      1.1  christos 	.word	0x81b00f04 !fsrc2	%f0,%f4,%f0
   3466      1.1  christos 	.word	0x85b00f06 !fsrc2	%f0,%f6,%f2
   3467      1.1  christos 	brnz,pn		%i5, .L256_xts_desteal
   3468      1.1  christos 	nop
   3469      1.1  christos 
   3470      1.1  christos 	ret
   3471      1.1  christos 	restore
   3472      1.1  christos 
   3473      1.1  christos .align	16
   3474      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   3475      1.1  christos 						! and ~3x deterioration
   3476      1.1  christos 						! in inp==out case
   3477      1.1  christos 	.word	0x91b00900 !faligndata	%f0,%f0,%f8		! handle unaligned output
   3478      1.1  christos 	.word	0x95b00902 !faligndata	%f0,%f2,%f10
   3479      1.1  christos 	.word	0x99b08904 !faligndata	%f2,%f4,%f12
   3480      1.1  christos 	.word	0x9db10906 !faligndata	%f4,%f6,%f14
   3481      1.1  christos 	.word	0x81b18906 !faligndata	%f6,%f6,%f0
   3482      1.1  christos 
   3483      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   3484      1.1  christos 	std		%f10, [%i1 + 8]
   3485      1.1  christos 	std		%f12, [%i1 + 16]
   3486      1.1  christos 	std		%f14, [%i1 + 24]
   3487      1.1  christos 	add		%i1, 32, %i1
   3488      1.1  christos 	orn		%g0, %l3, %l3
   3489      1.1  christos 	stda		%f0, [%i1 + %l3]0xc0	! partial store
   3490      1.1  christos 
   3491      1.1  christos 	brnz,pt		%i2, .L256_xts_deloop2x+4
   3492      1.1  christos 	orn		%g0, %l3, %l3
   3493      1.1  christos 
   3494      1.1  christos 	.word	0x81b00f04 !fsrc2	%f0,%f4,%f0
   3495      1.1  christos 	.word	0x85b00f06 !fsrc2	%f0,%f6,%f2
   3496      1.1  christos 	brnz,pn		%i5, .L256_xts_desteal
   3497      1.1  christos 	nop
   3498      1.1  christos 
   3499      1.1  christos 	ret
   3500      1.1  christos 	restore
   3501      1.1  christos 
   3502      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   3503      1.1  christos .align	32
   3504      1.1  christos .L256_xts_deblk:
   3505      1.1  christos 	add	%i1, %i2, %l5
   3506      1.1  christos 	and	%l5, 63, %l5	! tail
   3507      1.1  christos 	sub	%i2, %l5, %i2
   3508      1.1  christos 	add	%l5, 15, %l5	! round up to 16n
   3509      1.1  christos 	srlx	%i2, 4, %i2
   3510      1.1  christos 	srl	%l5, 4, %l5
   3511      1.1  christos 	sub	%i2, 1, %i2
   3512      1.1  christos 	add	%l5, 1, %l5
   3513      1.1  christos 
   3514      1.1  christos .L256_xts_deblk2x:
   3515      1.1  christos 	ldx		[%i0 + 0], %o0
   3516      1.1  christos 	ldx		[%i0 + 8], %o1
   3517      1.1  christos 	ldx		[%i0 + 16], %o2
   3518      1.1  christos 	brz,pt		%l0, 5f
   3519      1.1  christos 	ldx		[%i0 + 24], %o3
   3520      1.1  christos 
   3521      1.1  christos 	ldx		[%i0 + 32], %o4
   3522      1.1  christos 	sllx		%o0, %l0, %o0
   3523      1.1  christos 	srlx		%o1, %l1, %g1
   3524      1.1  christos 	or		%g1, %o0, %o0
   3525      1.1  christos 	sllx		%o1, %l0, %o1
   3526      1.1  christos 	srlx		%o2, %l1, %g1
   3527      1.1  christos 	or		%g1, %o1, %o1
   3528      1.1  christos 	sllx		%o2, %l0, %o2
   3529      1.1  christos 	srlx		%o3, %l1, %g1
   3530      1.1  christos 	or		%g1, %o2, %o2
   3531      1.1  christos 	sllx		%o3, %l0, %o3
   3532      1.1  christos 	srlx		%o4, %l1, %o4
   3533      1.1  christos 	or		%o4, %o3, %o3
   3534      1.1  christos 5:
   3535      1.1  christos 	.word	0x99b02302 !movxtod	%g2,%f12
   3536      1.1  christos 	.word	0x9db02303 !movxtod	%g3,%f14
   3537      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
   3538      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
   3539      1.1  christos 
   3540      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   3541      1.1  christos 	addcc		%g2, %g2, %g2
   3542      1.1  christos 	and		%l7, 0x87, %l7
   3543      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   3544      1.1  christos 	xor		%l7, %g2, %g2
   3545      1.1  christos 
   3546      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   3547      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   3548      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   3549      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   3550      1.1  christos 
   3551      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   3552      1.1  christos 	xor		%g5, %o1, %o1
   3553      1.1  christos 	xor		%g4, %o2, %o2		! ^= rk[0]
   3554      1.1  christos 	xor		%g5, %o3, %o3
   3555      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
   3556      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
   3557      1.1  christos 	.word	0x89b0230a !movxtod	%o2,%f4
   3558      1.1  christos 	.word	0x8db0230b !movxtod	%o3,%f6
   3559      1.1  christos 
   3560      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   3561      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   3562      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4		! ^= tweak[0]
   3563      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   3564      1.1  christos 
   3565      1.1  christos 	prefetch	[%i0 + 32+63], 20
   3566      1.1  christos 	call		_aes256_decrypt_2x
   3567      1.1  christos 	add		%i0, 32, %i0
   3568      1.1  christos 
   3569      1.1  christos 	.word	0x91b02302 !movxtod	%g2,%f8
   3570      1.1  christos 	.word	0x95b02303 !movxtod	%g3,%f10
   3571      1.1  christos 
   3572      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   3573      1.1  christos 	addcc		%g2, %g2, %g2
   3574      1.1  christos 	and		%l7, 0x87, %l7
   3575      1.1  christos 	.word	0x87b0c223 !addxc	%g3,%g3,%g3
   3576      1.1  christos 	xor		%l7, %g2, %g2
   3577      1.1  christos 
   3578      1.1  christos 	.word	0x91b20988 !bshuffle	%f8,%f8,%f8
   3579      1.1  christos 	.word	0x95b2898a !bshuffle	%f10,%f10,%f10
   3580      1.1  christos 
   3581      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   3582      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   3583      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   3584      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   3585      1.1  christos 
   3586      1.1  christos 	subcc		%i2, 2, %i2
   3587      1.1  christos 	stda		%f0, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   3588      1.1  christos 	add		%i1, 8, %i1
   3589      1.1  christos 	stda		%f2, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   3590      1.1  christos 	add		%i1, 8, %i1
   3591      1.1  christos 	stda		%f4, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   3592      1.1  christos 	add		%i1, 8, %i1
   3593      1.1  christos 	stda		%f6, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   3594  1.1.1.2  christos 	bgu,pt		SIZE_T_CC, .L256_xts_deblk2x
   3595      1.1  christos 	add		%i1, 8, %i1
   3596      1.1  christos 
   3597      1.1  christos 	add		%l5, %i2, %i2
   3598      1.1  christos 	andcc		%i2, 1, %g0		! is number of blocks even?
   3599      1.1  christos 	membar		#StoreLoad|#StoreStore
   3600      1.1  christos 	bnz,pt		%icc, .L256_xts_deloop
   3601      1.1  christos 	srl		%i2, 0, %i2
   3602      1.1  christos 	brnz,pn		%i2, .L256_xts_deloop2x
   3603      1.1  christos 	nop
   3604      1.1  christos 
   3605      1.1  christos 	.word	0x81b00f04 !fsrc2	%f0,%f4,%f0
   3606      1.1  christos 	.word	0x85b00f06 !fsrc2	%f0,%f6,%f2
   3607      1.1  christos 	brnz,pn		%i5, .L256_xts_desteal
   3608      1.1  christos 	nop
   3609      1.1  christos 
   3610      1.1  christos 	ret
   3611      1.1  christos 	restore
   3612      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   3613      1.1  christos .align	32
   3614      1.1  christos .L256_xts_desteal:
   3615      1.1  christos 	ldx		[%i0 + 0], %o0
   3616      1.1  christos 	brz,pt		%l0, 8f
   3617      1.1  christos 	ldx		[%i0 + 8], %o1
   3618      1.1  christos 
   3619      1.1  christos 	ldx		[%i0 + 16], %o2
   3620      1.1  christos 	sllx		%o0, %l0, %o0
   3621      1.1  christos 	srlx		%o1, %l1, %g1
   3622      1.1  christos 	sllx		%o1, %l0, %o1
   3623      1.1  christos 	or		%g1, %o0, %o0
   3624      1.1  christos 	srlx		%o2, %l1, %o2
   3625      1.1  christos 	or		%o2, %o1, %o1
   3626      1.1  christos 8:
   3627      1.1  christos 	srax		%g3, 63, %l7		! next tweak value
   3628      1.1  christos 	addcc		%g2, %g2, %o2
   3629      1.1  christos 	and		%l7, 0x87, %l7
   3630      1.1  christos 	.word	0x97b0c223 !addxc	%g3,%g3,%o3
   3631      1.1  christos 	xor		%l7, %o2, %o2
   3632      1.1  christos 
   3633      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
   3634      1.1  christos 	.word	0x9db0230b !movxtod	%o3,%f14
   3635      1.1  christos 	.word	0x99b3098c !bshuffle	%f12,%f12,%f12
   3636      1.1  christos 	.word	0x9db3898e !bshuffle	%f14,%f14,%f14
   3637      1.1  christos 
   3638      1.1  christos 	xor		%g4, %o0, %o0		! ^= rk[0]
   3639      1.1  christos 	xor		%g5, %o1, %o1
   3640      1.1  christos 	.word	0x81b02308 !movxtod	%o0,%f0
   3641      1.1  christos 	.word	0x85b02309 !movxtod	%o1,%f2
   3642      1.1  christos 
   3643      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   3644      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   3645      1.1  christos 
   3646      1.1  christos 	call		_aes256_decrypt_1x
   3647      1.1  christos 	add		%i0, 16, %i0
   3648      1.1  christos 
   3649      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= tweak[0]
   3650      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   3651      1.1  christos 
   3652  1.1.1.2  christos 	std		%f0, [%fp + STACK_BIAS-16]
   3653  1.1.1.2  christos 	std		%f2, [%fp + STACK_BIAS-8]
   3654      1.1  christos 
   3655      1.1  christos 	srl		%l0, 3, %l0
   3656  1.1.1.2  christos 	add		%fp, STACK_BIAS-16, %l7
   3657      1.1  christos 	add		%i0, %l0, %i0	! original %i0+%i2&-15
   3658      1.1  christos 	add		%i1, %l2, %i1	! original %i1+%i2&-15
   3659      1.1  christos 	mov		0, %l0
   3660      1.1  christos 	add		%i1, 16, %i1
   3661      1.1  christos 	nop					! align
   3662      1.1  christos 
   3663      1.1  christos .L256_xts_destealing:
   3664      1.1  christos 	ldub		[%i0 + %l0], %o0
   3665      1.1  christos 	ldub		[%l7  + %l0], %o1
   3666      1.1  christos 	dec		%i5
   3667      1.1  christos 	stb		%o0, [%l7  + %l0]
   3668      1.1  christos 	stb		%o1, [%i1 + %l0]
   3669      1.1  christos 	brnz		%i5, .L256_xts_destealing
   3670      1.1  christos 	inc		%l0
   3671      1.1  christos 
   3672      1.1  christos 	mov		%l7, %i0
   3673      1.1  christos 	sub		%i1, 16, %i1
   3674      1.1  christos 	mov		0, %l0
   3675      1.1  christos 	sub		%i1, %l2, %i1
   3676      1.1  christos 	ba		.L256_xts_deloop	! one more time
   3677      1.1  christos 	mov		1, %i2				! %i5 is 0
   3678      1.1  christos 	ret
   3679      1.1  christos 	restore
   3680      1.1  christos .type	aes256_t4_xts_decrypt,#function
   3681      1.1  christos .size	aes256_t4_xts_decrypt,.-aes256_t4_xts_decrypt
   3682      1.1  christos .globl	aes192_t4_ctr32_encrypt
   3683      1.1  christos .align	32
   3684      1.1  christos aes192_t4_ctr32_encrypt:
   3685  1.1.1.2  christos 	save		%sp, -STACK_FRAME, %sp
   3686      1.1  christos 	srln		%i2, 0, %i2		! needed on v8+, "nop" on v9
   3687      1.1  christos 
   3688      1.1  christos 	prefetch	[%i0], 20
   3689      1.1  christos 	prefetch	[%i0 + 63], 20
   3690      1.1  christos 	call		_aes192_load_enckey
   3691      1.1  christos 	sllx		%i2, 4, %i2
   3692      1.1  christos 
   3693      1.1  christos 	ld		[%i4 + 0], %l4	! counter
   3694      1.1  christos 	ld		[%i4 + 4], %l5
   3695      1.1  christos 	ld		[%i4 + 8], %l6
   3696      1.1  christos 	ld		[%i4 + 12], %l7
   3697      1.1  christos 
   3698      1.1  christos 	sllx		%l4, 32, %o5
   3699      1.1  christos 	or		%l5, %o5, %o5
   3700      1.1  christos 	sllx		%l6, 32, %g1
   3701      1.1  christos 	xor		%o5, %g4, %g4		! ^= rk[0]
   3702      1.1  christos 	xor		%g1, %g5, %g5
   3703      1.1  christos 	.word	0x9db02304 !movxtod	%g4,%f14		! most significant 64 bits
   3704      1.1  christos 
   3705      1.1  christos 	sub		%i0, %i1, %l5	! %i0!=%i1
   3706      1.1  christos 	and		%i0, 7, %l0
   3707      1.1  christos 	andn		%i0, 7, %i0
   3708      1.1  christos 	sll		%l0, 3, %l0
   3709      1.1  christos 	mov		64, %l1
   3710      1.1  christos 	mov		0xff, %l3
   3711      1.1  christos 	sub		%l1, %l0, %l1
   3712      1.1  christos 	and		%i1, 7, %l2
   3713      1.1  christos 	cmp		%i2, 255
   3714      1.1  christos 	movrnz		%l2, 0, %l5		! if (	%i1&7 ||
   3715  1.1.1.2  christos 	movleu		SIZE_T_CC, 0, %l5	!	%i2<256 ||
   3716      1.1  christos 	brnz,pn		%l5, .L192_ctr32_blk	!	%i0==%i1)
   3717      1.1  christos 	srl		%l3, %l2, %l3
   3718      1.1  christos 
   3719      1.1  christos 	andcc		%i2, 16, %g0		! is number of blocks even?
   3720      1.1  christos 	.word	0xb3b64340 !alignaddrl	%i1,%g0,%i1
   3721      1.1  christos 	bz		%icc, .L192_ctr32_loop2x
   3722      1.1  christos 	srlx		%i2, 4, %i2
   3723      1.1  christos .L192_ctr32_loop:
   3724      1.1  christos 	ldx		[%i0 + 0], %o0
   3725      1.1  christos 	brz,pt		%l0, 4f
   3726      1.1  christos 	ldx		[%i0 + 8], %o1
   3727      1.1  christos 
   3728      1.1  christos 	ldx		[%i0 + 16], %o2
   3729      1.1  christos 	sllx		%o0, %l0, %o0
   3730      1.1  christos 	srlx		%o1, %l1, %g1
   3731      1.1  christos 	sllx		%o1, %l0, %o1
   3732      1.1  christos 	or		%g1, %o0, %o0
   3733      1.1  christos 	srlx		%o2, %l1, %o2
   3734      1.1  christos 	or		%o2, %o1, %o1
   3735      1.1  christos 4:
   3736      1.1  christos 	xor		%g5, %l7, %g1		! ^= rk[0]
   3737      1.1  christos 	add		%l7, 1, %l7
   3738      1.1  christos 	.word	0x85b02301 !movxtod	%g1,%f2
   3739      1.1  christos 	srl		%l7, 0, %l7		! clruw
   3740      1.1  christos 	prefetch	[%i1 + 63], 22
   3741      1.1  christos 	prefetch	[%i0 + 16+63], 20
   3742      1.1  christos 	.word	0x88cc040e !aes_eround01	%f16,%f14,%f2,%f4
   3743      1.1  christos 	.word	0x84cc842e !aes_eround23	%f18,%f14,%f2,%f2
   3744      1.1  christos 	call		_aes192_encrypt_1x+8
   3745      1.1  christos 	add		%i0, 16, %i0
   3746      1.1  christos 
   3747      1.1  christos 	.word	0x95b02308 !movxtod	%o0,%f10
   3748      1.1  christos 	.word	0x99b02309 !movxtod	%o1,%f12
   3749      1.1  christos 	.word	0x81b28d80 !fxor	%f10,%f0,%f0		! ^= inp
   3750      1.1  christos 	.word	0x85b30d82 !fxor	%f12,%f2,%f2
   3751      1.1  christos 
   3752      1.1  christos 	brnz,pn		%l2, 2f
   3753      1.1  christos 	sub		%i2, 1, %i2
   3754  1.1.1.2  christos 
   3755      1.1  christos 	std		%f0, [%i1 + 0]
   3756      1.1  christos 	std		%f2, [%i1 + 8]
   3757      1.1  christos 	brnz,pt		%i2, .L192_ctr32_loop2x
   3758      1.1  christos 	add		%i1, 16, %i1
   3759      1.1  christos 
   3760      1.1  christos 	ret
   3761      1.1  christos 	restore
   3762      1.1  christos 
   3763      1.1  christos .align	16
   3764      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   3765      1.1  christos 						! and ~3x deterioration
   3766      1.1  christos 						! in inp==out case
   3767      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4		! handle unaligned output
   3768      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
   3769      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
   3770      1.1  christos 	stda		%f4, [%i1 + %l3]0xc0	! partial store
   3771      1.1  christos 	std		%f6, [%i1 + 8]
   3772      1.1  christos 	add		%i1, 16, %i1
   3773      1.1  christos 	orn		%g0, %l3, %l3
   3774      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   3775      1.1  christos 
   3776      1.1  christos 	brnz,pt		%i2, .L192_ctr32_loop2x+4
   3777      1.1  christos 	orn		%g0, %l3, %l3
   3778      1.1  christos 
   3779      1.1  christos 	ret
   3780      1.1  christos 	restore
   3781      1.1  christos 
   3782      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   3783      1.1  christos .align	32
   3784      1.1  christos .L192_ctr32_loop2x:
   3785      1.1  christos 	ldx		[%i0 + 0], %o0
   3786      1.1  christos 	ldx		[%i0 + 8], %o1
   3787      1.1  christos 	ldx		[%i0 + 16], %o2
   3788      1.1  christos 	brz,pt		%l0, 4f
   3789      1.1  christos 	ldx		[%i0 + 24], %o3
   3790      1.1  christos 
   3791      1.1  christos 	ldx		[%i0 + 32], %o4
   3792      1.1  christos 	sllx		%o0, %l0, %o0
   3793      1.1  christos 	srlx		%o1, %l1, %g1
   3794      1.1  christos 	or		%g1, %o0, %o0
   3795      1.1  christos 	sllx		%o1, %l0, %o1
   3796      1.1  christos 	srlx		%o2, %l1, %g1
   3797      1.1  christos 	or		%g1, %o1, %o1
   3798      1.1  christos 	sllx		%o2, %l0, %o2
   3799      1.1  christos 	srlx		%o3, %l1, %g1
   3800      1.1  christos 	or		%g1, %o2, %o2
   3801      1.1  christos 	sllx		%o3, %l0, %o3
   3802      1.1  christos 	srlx		%o4, %l1, %o4
   3803      1.1  christos 	or		%o4, %o3, %o3
   3804      1.1  christos 4:
   3805      1.1  christos 	xor		%g5, %l7, %g1		! ^= rk[0]
   3806      1.1  christos 	add		%l7, 1, %l7
   3807      1.1  christos 	.word	0x85b02301 !movxtod	%g1,%f2
   3808      1.1  christos 	srl		%l7, 0, %l7		! clruw
   3809      1.1  christos 	xor		%g5, %l7, %g1
   3810      1.1  christos 	add		%l7, 1, %l7
   3811      1.1  christos 	.word	0x8db02301 !movxtod	%g1,%f6
   3812      1.1  christos 	srl		%l7, 0, %l7		! clruw
   3813      1.1  christos 	prefetch	[%i1 + 63], 22
   3814      1.1  christos 	prefetch	[%i0 + 32+63], 20
   3815      1.1  christos 	.word	0x90cc040e !aes_eround01	%f16,%f14,%f2,%f8
   3816      1.1  christos 	.word	0x84cc842e !aes_eround23	%f18,%f14,%f2,%f2
   3817      1.1  christos 	.word	0x94cc0c0e !aes_eround01	%f16,%f14,%f6,%f10
   3818      1.1  christos 	.word	0x8ccc8c2e !aes_eround23	%f18,%f14,%f6,%f6
   3819      1.1  christos 	call		_aes192_encrypt_2x+16
   3820      1.1  christos 	add		%i0, 32, %i0
   3821      1.1  christos 
   3822      1.1  christos 	.word	0x91b02308 !movxtod	%o0,%f8
   3823      1.1  christos 	.word	0x95b02309 !movxtod	%o1,%f10
   3824      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
   3825      1.1  christos 	.word	0x81b20d80 !fxor	%f8,%f0,%f0		! ^= inp
   3826      1.1  christos 	.word	0x91b0230b !movxtod	%o3,%f8
   3827      1.1  christos 	.word	0x85b28d82 !fxor	%f10,%f2,%f2
   3828      1.1  christos 	.word	0x89b30d84 !fxor	%f12,%f4,%f4
   3829      1.1  christos 	.word	0x8db20d86 !fxor	%f8,%f6,%f6
   3830      1.1  christos 
   3831      1.1  christos 	brnz,pn		%l2, 2f
   3832      1.1  christos 	sub		%i2, 2, %i2
   3833  1.1.1.2  christos 
   3834      1.1  christos 	std		%f0, [%i1 + 0]
   3835      1.1  christos 	std		%f2, [%i1 + 8]
   3836      1.1  christos 	std		%f4, [%i1 + 16]
   3837      1.1  christos 	std		%f6, [%i1 + 24]
   3838      1.1  christos 	brnz,pt		%i2, .L192_ctr32_loop2x
   3839      1.1  christos 	add		%i1, 32, %i1
   3840      1.1  christos 
   3841      1.1  christos 	ret
   3842      1.1  christos 	restore
   3843      1.1  christos 
   3844      1.1  christos .align	16
   3845      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   3846      1.1  christos 						! and ~3x deterioration
   3847      1.1  christos 						! in inp==out case
   3848      1.1  christos 	.word	0x91b00900 !faligndata	%f0,%f0,%f8		! handle unaligned output
   3849      1.1  christos 	.word	0x81b00902 !faligndata	%f0,%f2,%f0
   3850      1.1  christos 	.word	0x85b08904 !faligndata	%f2,%f4,%f2
   3851      1.1  christos 	.word	0x89b10906 !faligndata	%f4,%f6,%f4
   3852      1.1  christos 	.word	0x8db18906 !faligndata	%f6,%f6,%f6
   3853      1.1  christos 
   3854      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   3855      1.1  christos 	std		%f0, [%i1 + 8]
   3856      1.1  christos 	std		%f2, [%i1 + 16]
   3857      1.1  christos 	std		%f4, [%i1 + 24]
   3858      1.1  christos 	add		%i1, 32, %i1
   3859      1.1  christos 	orn		%g0, %l3, %l3
   3860      1.1  christos 	stda		%f6, [%i1 + %l3]0xc0	! partial store
   3861      1.1  christos 
   3862      1.1  christos 	brnz,pt		%i2, .L192_ctr32_loop2x+4
   3863      1.1  christos 	orn		%g0, %l3, %l3
   3864      1.1  christos 
   3865      1.1  christos 	ret
   3866      1.1  christos 	restore
   3867      1.1  christos 
   3868      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   3869      1.1  christos .align	32
   3870      1.1  christos .L192_ctr32_blk:
   3871      1.1  christos 	add	%i1, %i2, %l5
   3872      1.1  christos 	and	%l5, 63, %l5	! tail
   3873      1.1  christos 	sub	%i2, %l5, %i2
   3874      1.1  christos 	add	%l5, 15, %l5	! round up to 16n
   3875      1.1  christos 	srlx	%i2, 4, %i2
   3876      1.1  christos 	srl	%l5, 4, %l5
   3877      1.1  christos 	sub	%i2, 1, %i2
   3878      1.1  christos 	add	%l5, 1, %l5
   3879      1.1  christos 
   3880      1.1  christos .L192_ctr32_blk_loop2x:
   3881      1.1  christos 	ldx		[%i0 + 0], %o0
   3882      1.1  christos 	ldx		[%i0 + 8], %o1
   3883      1.1  christos 	ldx		[%i0 + 16], %o2
   3884      1.1  christos 	brz,pt		%l0, 5f
   3885      1.1  christos 	ldx		[%i0 + 24], %o3
   3886      1.1  christos 
   3887      1.1  christos 	ldx		[%i0 + 32], %o4
   3888      1.1  christos 	sllx		%o0, %l0, %o0
   3889      1.1  christos 	srlx		%o1, %l1, %g1
   3890      1.1  christos 	or		%g1, %o0, %o0
   3891      1.1  christos 	sllx		%o1, %l0, %o1
   3892      1.1  christos 	srlx		%o2, %l1, %g1
   3893      1.1  christos 	or		%g1, %o1, %o1
   3894      1.1  christos 	sllx		%o2, %l0, %o2
   3895      1.1  christos 	srlx		%o3, %l1, %g1
   3896      1.1  christos 	or		%g1, %o2, %o2
   3897      1.1  christos 	sllx		%o3, %l0, %o3
   3898      1.1  christos 	srlx		%o4, %l1, %o4
   3899      1.1  christos 	or		%o4, %o3, %o3
   3900      1.1  christos 5:
   3901      1.1  christos 	xor		%g5, %l7, %g1		! ^= rk[0]
   3902      1.1  christos 	add		%l7, 1, %l7
   3903      1.1  christos 	.word	0x85b02301 !movxtod	%g1,%f2
   3904      1.1  christos 	srl		%l7, 0, %l7		! clruw
   3905      1.1  christos 	xor		%g5, %l7, %g1
   3906      1.1  christos 	add		%l7, 1, %l7
   3907      1.1  christos 	.word	0x8db02301 !movxtod	%g1,%f6
   3908      1.1  christos 	srl		%l7, 0, %l7		! clruw
   3909      1.1  christos 	prefetch	[%i0 + 32+63], 20
   3910      1.1  christos 	.word	0x90cc040e !aes_eround01	%f16,%f14,%f2,%f8
   3911      1.1  christos 	.word	0x84cc842e !aes_eround23	%f18,%f14,%f2,%f2
   3912      1.1  christos 	.word	0x94cc0c0e !aes_eround01	%f16,%f14,%f6,%f10
   3913      1.1  christos 	.word	0x8ccc8c2e !aes_eround23	%f18,%f14,%f6,%f6
   3914      1.1  christos 	call		_aes192_encrypt_2x+16
   3915      1.1  christos 	add		%i0, 32, %i0
   3916      1.1  christos 	subcc		%i2, 2, %i2
   3917      1.1  christos 
   3918      1.1  christos 	.word	0x91b02308 !movxtod	%o0,%f8
   3919      1.1  christos 	.word	0x95b02309 !movxtod	%o1,%f10
   3920      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
   3921      1.1  christos 	.word	0x81b20d80 !fxor	%f8,%f0,%f0		! ^= inp
   3922      1.1  christos 	.word	0x91b0230b !movxtod	%o3,%f8
   3923      1.1  christos 	.word	0x85b28d82 !fxor	%f10,%f2,%f2
   3924      1.1  christos 	.word	0x89b30d84 !fxor	%f12,%f4,%f4
   3925      1.1  christos 	.word	0x8db20d86 !fxor	%f8,%f6,%f6
   3926      1.1  christos 
   3927      1.1  christos 	stda		%f0, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   3928      1.1  christos 	add		%i1, 8, %i1
   3929      1.1  christos 	stda		%f2, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   3930      1.1  christos 	add		%i1, 8, %i1
   3931      1.1  christos 	stda		%f4, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   3932      1.1  christos 	add		%i1, 8, %i1
   3933      1.1  christos 	stda		%f6, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   3934  1.1.1.2  christos 	bgu,pt		SIZE_T_CC, .L192_ctr32_blk_loop2x
   3935      1.1  christos 	add		%i1, 8, %i1
   3936      1.1  christos 
   3937      1.1  christos 	add		%l5, %i2, %i2
   3938      1.1  christos 	andcc		%i2, 1, %g0		! is number of blocks even?
   3939      1.1  christos 	membar		#StoreLoad|#StoreStore
   3940      1.1  christos 	bnz,pt		%icc, .L192_ctr32_loop
   3941      1.1  christos 	srl		%i2, 0, %i2
   3942      1.1  christos 	brnz,pn		%i2, .L192_ctr32_loop2x
   3943      1.1  christos 	nop
   3944      1.1  christos 
   3945      1.1  christos 	ret
   3946      1.1  christos 	restore
   3947      1.1  christos .type	aes192_t4_ctr32_encrypt,#function
   3948      1.1  christos .size	aes192_t4_ctr32_encrypt,.-aes192_t4_ctr32_encrypt
   3949      1.1  christos .globl	aes192_t4_cbc_decrypt
   3950      1.1  christos .align	32
   3951      1.1  christos aes192_t4_cbc_decrypt:
   3952  1.1.1.2  christos 	save		%sp, -STACK_FRAME, %sp
   3953      1.1  christos 	cmp		%i2, 0
   3954  1.1.1.2  christos 	be,pn		SIZE_T_CC, .L192_cbc_dec_abort
   3955      1.1  christos 	srln		%i2, 0, %i2		! needed on v8+, "nop" on v9
   3956      1.1  christos 	sub		%i0, %i1, %l5	! %i0!=%i1
   3957      1.1  christos 	ld		[%i4 + 0], %f12	! load ivec
   3958      1.1  christos 	ld		[%i4 + 4], %f13
   3959      1.1  christos 	ld		[%i4 + 8], %f14
   3960      1.1  christos 	ld		[%i4 + 12], %f15
   3961      1.1  christos 	prefetch	[%i0], 20
   3962      1.1  christos 	prefetch	[%i0 + 63], 20
   3963      1.1  christos 	call		_aes192_load_deckey
   3964      1.1  christos 	and		%i0, 7, %l0
   3965      1.1  christos 	andn		%i0, 7, %i0
   3966      1.1  christos 	sll		%l0, 3, %l0
   3967      1.1  christos 	mov		64, %l1
   3968      1.1  christos 	mov		0xff, %l3
   3969      1.1  christos 	sub		%l1, %l0, %l1
   3970      1.1  christos 	and		%i1, 7, %l2
   3971      1.1  christos 	cmp		%i2, 255
   3972      1.1  christos 	movrnz		%l2, 0, %l5		! if (	%i1&7 ||
   3973  1.1.1.2  christos 	movleu		SIZE_T_CC, 0, %l5	!	%i2<256 ||
   3974      1.1  christos 	brnz,pn		%l5, .L192cbc_dec_blk	!	%i0==%i1)
   3975      1.1  christos 	srl		%l3, %l2, %l3
   3976      1.1  christos 
   3977      1.1  christos 	andcc		%i2, 16, %g0		! is number of blocks even?
   3978      1.1  christos 	srlx		%i2, 4, %i2
   3979      1.1  christos 	.word	0xb3b64340 !alignaddrl	%i1,%g0,%i1
   3980      1.1  christos 	bz		%icc, .L192_cbc_dec_loop2x
   3981      1.1  christos 	prefetch	[%i1], 22
   3982      1.1  christos .L192_cbc_dec_loop:
   3983      1.1  christos 	ldx		[%i0 + 0], %o0
   3984      1.1  christos 	brz,pt		%l0, 4f
   3985      1.1  christos 	ldx		[%i0 + 8], %o1
   3986      1.1  christos 
   3987      1.1  christos 	ldx		[%i0 + 16], %o2
   3988      1.1  christos 	sllx		%o0, %l0, %o0
   3989      1.1  christos 	srlx		%o1, %l1, %g1
   3990      1.1  christos 	sllx		%o1, %l0, %o1
   3991      1.1  christos 	or		%g1, %o0, %o0
   3992      1.1  christos 	srlx		%o2, %l1, %o2
   3993      1.1  christos 	or		%o2, %o1, %o1
   3994      1.1  christos 4:
   3995      1.1  christos 	xor		%g4, %o0, %o2		! ^= rk[0]
   3996      1.1  christos 	xor		%g5, %o1, %o3
   3997      1.1  christos 	.word	0x81b0230a !movxtod	%o2,%f0
   3998      1.1  christos 	.word	0x85b0230b !movxtod	%o3,%f2
   3999      1.1  christos 
   4000      1.1  christos 	prefetch	[%i1 + 63], 22
   4001      1.1  christos 	prefetch	[%i0 + 16+63], 20
   4002      1.1  christos 	call		_aes192_decrypt_1x
   4003      1.1  christos 	add		%i0, 16, %i0
   4004      1.1  christos 
   4005      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
   4006      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   4007      1.1  christos 	.word	0x99b02308 !movxtod	%o0,%f12
   4008      1.1  christos 	.word	0x9db02309 !movxtod	%o1,%f14
   4009      1.1  christos 
   4010      1.1  christos 	brnz,pn		%l2, 2f
   4011      1.1  christos 	sub		%i2, 1, %i2
   4012  1.1.1.2  christos 
   4013      1.1  christos 	std		%f0, [%i1 + 0]
   4014      1.1  christos 	std		%f2, [%i1 + 8]
   4015      1.1  christos 	brnz,pt		%i2, .L192_cbc_dec_loop2x
   4016      1.1  christos 	add		%i1, 16, %i1
   4017      1.1  christos 	st		%f12, [%i4 + 0]
   4018      1.1  christos 	st		%f13, [%i4 + 4]
   4019      1.1  christos 	st		%f14, [%i4 + 8]
   4020      1.1  christos 	st		%f15, [%i4 + 12]
   4021      1.1  christos .L192_cbc_dec_abort:
   4022      1.1  christos 	ret
   4023      1.1  christos 	restore
   4024      1.1  christos 
   4025      1.1  christos .align	16
   4026      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   4027      1.1  christos 						! and ~3x deterioration
   4028      1.1  christos 						! in inp==out case
   4029      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4		! handle unaligned output
   4030      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
   4031      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
   4032      1.1  christos 
   4033      1.1  christos 	stda		%f4, [%i1 + %l3]0xc0	! partial store
   4034      1.1  christos 	std		%f6, [%i1 + 8]
   4035      1.1  christos 	add		%i1, 16, %i1
   4036      1.1  christos 	orn		%g0, %l3, %l3
   4037      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   4038      1.1  christos 
   4039      1.1  christos 	brnz,pt		%i2, .L192_cbc_dec_loop2x+4
   4040      1.1  christos 	orn		%g0, %l3, %l3
   4041      1.1  christos 	st		%f12, [%i4 + 0]
   4042      1.1  christos 	st		%f13, [%i4 + 4]
   4043      1.1  christos 	st		%f14, [%i4 + 8]
   4044      1.1  christos 	st		%f15, [%i4 + 12]
   4045      1.1  christos 	ret
   4046      1.1  christos 	restore
   4047      1.1  christos 
   4048      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   4049      1.1  christos .align	32
   4050      1.1  christos .L192_cbc_dec_loop2x:
   4051      1.1  christos 	ldx		[%i0 + 0], %o0
   4052      1.1  christos 	ldx		[%i0 + 8], %o1
   4053      1.1  christos 	ldx		[%i0 + 16], %o2
   4054      1.1  christos 	brz,pt		%l0, 4f
   4055      1.1  christos 	ldx		[%i0 + 24], %o3
   4056      1.1  christos 
   4057      1.1  christos 	ldx		[%i0 + 32], %o4
   4058      1.1  christos 	sllx		%o0, %l0, %o0
   4059      1.1  christos 	srlx		%o1, %l1, %g1
   4060      1.1  christos 	or		%g1, %o0, %o0
   4061      1.1  christos 	sllx		%o1, %l0, %o1
   4062      1.1  christos 	srlx		%o2, %l1, %g1
   4063      1.1  christos 	or		%g1, %o1, %o1
   4064      1.1  christos 	sllx		%o2, %l0, %o2
   4065      1.1  christos 	srlx		%o3, %l1, %g1
   4066      1.1  christos 	or		%g1, %o2, %o2
   4067      1.1  christos 	sllx		%o3, %l0, %o3
   4068      1.1  christos 	srlx		%o4, %l1, %o4
   4069      1.1  christos 	or		%o4, %o3, %o3
   4070      1.1  christos 4:
   4071      1.1  christos 	xor		%g4, %o0, %o4		! ^= rk[0]
   4072      1.1  christos 	xor		%g5, %o1, %o5
   4073      1.1  christos 	.word	0x81b0230c !movxtod	%o4,%f0
   4074      1.1  christos 	.word	0x85b0230d !movxtod	%o5,%f2
   4075      1.1  christos 	xor		%g4, %o2, %o4
   4076      1.1  christos 	xor		%g5, %o3, %o5
   4077      1.1  christos 	.word	0x89b0230c !movxtod	%o4,%f4
   4078      1.1  christos 	.word	0x8db0230d !movxtod	%o5,%f6
   4079      1.1  christos 
   4080      1.1  christos 	prefetch	[%i1 + 63], 22
   4081      1.1  christos 	prefetch	[%i0 + 32+63], 20
   4082      1.1  christos 	call		_aes192_decrypt_2x
   4083      1.1  christos 	add		%i0, 32, %i0
   4084      1.1  christos 
   4085      1.1  christos 	.word	0x91b02308 !movxtod	%o0,%f8
   4086      1.1  christos 	.word	0x95b02309 !movxtod	%o1,%f10
   4087      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
   4088      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   4089      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
   4090      1.1  christos 	.word	0x9db0230b !movxtod	%o3,%f14
   4091      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   4092      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   4093      1.1  christos 
   4094      1.1  christos 	brnz,pn		%l2, 2f
   4095      1.1  christos 	sub		%i2, 2, %i2
   4096  1.1.1.2  christos 
   4097      1.1  christos 	std		%f0, [%i1 + 0]
   4098      1.1  christos 	std		%f2, [%i1 + 8]
   4099      1.1  christos 	std		%f4, [%i1 + 16]
   4100      1.1  christos 	std		%f6, [%i1 + 24]
   4101      1.1  christos 	brnz,pt		%i2, .L192_cbc_dec_loop2x
   4102      1.1  christos 	add		%i1, 32, %i1
   4103      1.1  christos 	st		%f12, [%i4 + 0]
   4104      1.1  christos 	st		%f13, [%i4 + 4]
   4105      1.1  christos 	st		%f14, [%i4 + 8]
   4106      1.1  christos 	st		%f15, [%i4 + 12]
   4107      1.1  christos 	ret
   4108      1.1  christos 	restore
   4109      1.1  christos 
   4110      1.1  christos .align	16
   4111      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   4112      1.1  christos 						! and ~3x deterioration
   4113      1.1  christos 						! in inp==out case
   4114      1.1  christos 	.word	0x91b00900 !faligndata	%f0,%f0,%f8		! handle unaligned output
   4115      1.1  christos 	.word	0x81b00902 !faligndata	%f0,%f2,%f0
   4116      1.1  christos 	.word	0x85b08904 !faligndata	%f2,%f4,%f2
   4117      1.1  christos 	.word	0x89b10906 !faligndata	%f4,%f6,%f4
   4118      1.1  christos 	.word	0x8db18906 !faligndata	%f6,%f6,%f6
   4119      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   4120      1.1  christos 	std		%f0, [%i1 + 8]
   4121      1.1  christos 	std		%f2, [%i1 + 16]
   4122      1.1  christos 	std		%f4, [%i1 + 24]
   4123      1.1  christos 	add		%i1, 32, %i1
   4124      1.1  christos 	orn		%g0, %l3, %l3
   4125      1.1  christos 	stda		%f6, [%i1 + %l3]0xc0	! partial store
   4126      1.1  christos 
   4127      1.1  christos 	brnz,pt		%i2, .L192_cbc_dec_loop2x+4
   4128      1.1  christos 	orn		%g0, %l3, %l3
   4129      1.1  christos 	st		%f12, [%i4 + 0]
   4130      1.1  christos 	st		%f13, [%i4 + 4]
   4131      1.1  christos 	st		%f14, [%i4 + 8]
   4132      1.1  christos 	st		%f15, [%i4 + 12]
   4133      1.1  christos 	ret
   4134      1.1  christos 	restore
   4135      1.1  christos 
   4136      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   4137      1.1  christos .align	32
   4138      1.1  christos .L192cbc_dec_blk:
   4139      1.1  christos 	add	%i1, %i2, %l5
   4140      1.1  christos 	and	%l5, 63, %l5	! tail
   4141      1.1  christos 	sub	%i2, %l5, %i2
   4142      1.1  christos 	add	%l5, 15, %l5	! round up to 16n
   4143      1.1  christos 	srlx	%i2, 4, %i2
   4144      1.1  christos 	srl	%l5, 4, %l5
   4145      1.1  christos 	sub	%i2, 1, %i2
   4146      1.1  christos 	add	%l5, 1, %l5
   4147      1.1  christos 
   4148      1.1  christos .L192_cbc_dec_blk_loop2x:
   4149      1.1  christos 	ldx		[%i0 + 0], %o0
   4150      1.1  christos 	ldx		[%i0 + 8], %o1
   4151      1.1  christos 	ldx		[%i0 + 16], %o2
   4152      1.1  christos 	brz,pt		%l0, 5f
   4153      1.1  christos 	ldx		[%i0 + 24], %o3
   4154      1.1  christos 
   4155      1.1  christos 	ldx		[%i0 + 32], %o4
   4156      1.1  christos 	sllx		%o0, %l0, %o0
   4157      1.1  christos 	srlx		%o1, %l1, %g1
   4158      1.1  christos 	or		%g1, %o0, %o0
   4159      1.1  christos 	sllx		%o1, %l0, %o1
   4160      1.1  christos 	srlx		%o2, %l1, %g1
   4161      1.1  christos 	or		%g1, %o1, %o1
   4162      1.1  christos 	sllx		%o2, %l0, %o2
   4163      1.1  christos 	srlx		%o3, %l1, %g1
   4164      1.1  christos 	or		%g1, %o2, %o2
   4165      1.1  christos 	sllx		%o3, %l0, %o3
   4166      1.1  christos 	srlx		%o4, %l1, %o4
   4167      1.1  christos 	or		%o4, %o3, %o3
   4168      1.1  christos 5:
   4169      1.1  christos 	xor		%g4, %o0, %o4		! ^= rk[0]
   4170      1.1  christos 	xor		%g5, %o1, %o5
   4171      1.1  christos 	.word	0x81b0230c !movxtod	%o4,%f0
   4172      1.1  christos 	.word	0x85b0230d !movxtod	%o5,%f2
   4173      1.1  christos 	xor		%g4, %o2, %o4
   4174      1.1  christos 	xor		%g5, %o3, %o5
   4175      1.1  christos 	.word	0x89b0230c !movxtod	%o4,%f4
   4176      1.1  christos 	.word	0x8db0230d !movxtod	%o5,%f6
   4177      1.1  christos 
   4178      1.1  christos 	prefetch	[%i0 + 32+63], 20
   4179      1.1  christos 	call		_aes192_decrypt_2x
   4180      1.1  christos 	add		%i0, 32, %i0
   4181      1.1  christos 	subcc		%i2, 2, %i2
   4182      1.1  christos 
   4183      1.1  christos 	.word	0x91b02308 !movxtod	%o0,%f8
   4184      1.1  christos 	.word	0x95b02309 !movxtod	%o1,%f10
   4185      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
   4186      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   4187      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
   4188      1.1  christos 	.word	0x9db0230b !movxtod	%o3,%f14
   4189      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   4190      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   4191      1.1  christos 
   4192      1.1  christos 	stda		%f0, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   4193      1.1  christos 	add		%i1, 8, %i1
   4194      1.1  christos 	stda		%f2, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   4195      1.1  christos 	add		%i1, 8, %i1
   4196      1.1  christos 	stda		%f4, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   4197      1.1  christos 	add		%i1, 8, %i1
   4198      1.1  christos 	stda		%f6, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   4199  1.1.1.2  christos 	bgu,pt		SIZE_T_CC, .L192_cbc_dec_blk_loop2x
   4200      1.1  christos 	add		%i1, 8, %i1
   4201      1.1  christos 
   4202      1.1  christos 	add		%l5, %i2, %i2
   4203      1.1  christos 	andcc		%i2, 1, %g0		! is number of blocks even?
   4204      1.1  christos 	membar		#StoreLoad|#StoreStore
   4205      1.1  christos 	bnz,pt		%icc, .L192_cbc_dec_loop
   4206      1.1  christos 	srl		%i2, 0, %i2
   4207      1.1  christos 	brnz,pn		%i2, .L192_cbc_dec_loop2x
   4208      1.1  christos 	nop
   4209      1.1  christos 	st		%f12, [%i4 + 0]	! write out ivec
   4210      1.1  christos 	st		%f13, [%i4 + 4]
   4211      1.1  christos 	st		%f14, [%i4 + 8]
   4212      1.1  christos 	st		%f15, [%i4 + 12]
   4213      1.1  christos 	ret
   4214      1.1  christos 	restore
   4215      1.1  christos .type	aes192_t4_cbc_decrypt,#function
   4216      1.1  christos .size	aes192_t4_cbc_decrypt,.-aes192_t4_cbc_decrypt
   4217      1.1  christos .globl	aes256_t4_cbc_decrypt
   4218      1.1  christos .align	32
   4219      1.1  christos aes256_t4_cbc_decrypt:
   4220  1.1.1.2  christos 	save		%sp, -STACK_FRAME, %sp
   4221      1.1  christos 	cmp		%i2, 0
   4222  1.1.1.2  christos 	be,pn		SIZE_T_CC, .L256_cbc_dec_abort
   4223      1.1  christos 	srln		%i2, 0, %i2		! needed on v8+, "nop" on v9
   4224      1.1  christos 	sub		%i0, %i1, %l5	! %i0!=%i1
   4225      1.1  christos 	ld		[%i4 + 0], %f12	! load ivec
   4226      1.1  christos 	ld		[%i4 + 4], %f13
   4227      1.1  christos 	ld		[%i4 + 8], %f14
   4228      1.1  christos 	ld		[%i4 + 12], %f15
   4229      1.1  christos 	prefetch	[%i0], 20
   4230      1.1  christos 	prefetch	[%i0 + 63], 20
   4231      1.1  christos 	call		_aes256_load_deckey
   4232      1.1  christos 	and		%i0, 7, %l0
   4233      1.1  christos 	andn		%i0, 7, %i0
   4234      1.1  christos 	sll		%l0, 3, %l0
   4235      1.1  christos 	mov		64, %l1
   4236      1.1  christos 	mov		0xff, %l3
   4237      1.1  christos 	sub		%l1, %l0, %l1
   4238      1.1  christos 	and		%i1, 7, %l2
   4239      1.1  christos 	cmp		%i2, 255
   4240      1.1  christos 	movrnz		%l2, 0, %l5		! if (	%i1&7 ||
   4241  1.1.1.2  christos 	movleu		SIZE_T_CC, 0, %l5	!	%i2<256 ||
   4242      1.1  christos 	brnz,pn		%l5, .L256cbc_dec_blk	!	%i0==%i1)
   4243      1.1  christos 	srl		%l3, %l2, %l3
   4244      1.1  christos 
   4245      1.1  christos 	andcc		%i2, 16, %g0		! is number of blocks even?
   4246      1.1  christos 	srlx		%i2, 4, %i2
   4247      1.1  christos 	.word	0xb3b64340 !alignaddrl	%i1,%g0,%i1
   4248      1.1  christos 	bz		%icc, .L256_cbc_dec_loop2x
   4249      1.1  christos 	prefetch	[%i1], 22
   4250      1.1  christos .L256_cbc_dec_loop:
   4251      1.1  christos 	ldx		[%i0 + 0], %o0
   4252      1.1  christos 	brz,pt		%l0, 4f
   4253      1.1  christos 	ldx		[%i0 + 8], %o1
   4254      1.1  christos 
   4255      1.1  christos 	ldx		[%i0 + 16], %o2
   4256      1.1  christos 	sllx		%o0, %l0, %o0
   4257      1.1  christos 	srlx		%o1, %l1, %g1
   4258      1.1  christos 	sllx		%o1, %l0, %o1
   4259      1.1  christos 	or		%g1, %o0, %o0
   4260      1.1  christos 	srlx		%o2, %l1, %o2
   4261      1.1  christos 	or		%o2, %o1, %o1
   4262      1.1  christos 4:
   4263      1.1  christos 	xor		%g4, %o0, %o2		! ^= rk[0]
   4264      1.1  christos 	xor		%g5, %o1, %o3
   4265      1.1  christos 	.word	0x81b0230a !movxtod	%o2,%f0
   4266      1.1  christos 	.word	0x85b0230b !movxtod	%o3,%f2
   4267      1.1  christos 
   4268      1.1  christos 	prefetch	[%i1 + 63], 22
   4269      1.1  christos 	prefetch	[%i0 + 16+63], 20
   4270      1.1  christos 	call		_aes256_decrypt_1x
   4271      1.1  christos 	add		%i0, 16, %i0
   4272      1.1  christos 
   4273      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
   4274      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   4275      1.1  christos 	.word	0x99b02308 !movxtod	%o0,%f12
   4276      1.1  christos 	.word	0x9db02309 !movxtod	%o1,%f14
   4277      1.1  christos 
   4278      1.1  christos 	brnz,pn		%l2, 2f
   4279      1.1  christos 	sub		%i2, 1, %i2
   4280  1.1.1.2  christos 
   4281      1.1  christos 	std		%f0, [%i1 + 0]
   4282      1.1  christos 	std		%f2, [%i1 + 8]
   4283      1.1  christos 	brnz,pt		%i2, .L256_cbc_dec_loop2x
   4284      1.1  christos 	add		%i1, 16, %i1
   4285      1.1  christos 	st		%f12, [%i4 + 0]
   4286      1.1  christos 	st		%f13, [%i4 + 4]
   4287      1.1  christos 	st		%f14, [%i4 + 8]
   4288      1.1  christos 	st		%f15, [%i4 + 12]
   4289      1.1  christos .L256_cbc_dec_abort:
   4290      1.1  christos 	ret
   4291      1.1  christos 	restore
   4292      1.1  christos 
   4293      1.1  christos .align	16
   4294      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   4295      1.1  christos 						! and ~3x deterioration
   4296      1.1  christos 						! in inp==out case
   4297      1.1  christos 	.word	0x89b00900 !faligndata	%f0,%f0,%f4		! handle unaligned output
   4298      1.1  christos 	.word	0x8db00902 !faligndata	%f0,%f2,%f6
   4299      1.1  christos 	.word	0x91b08902 !faligndata	%f2,%f2,%f8
   4300      1.1  christos 
   4301      1.1  christos 	stda		%f4, [%i1 + %l3]0xc0	! partial store
   4302      1.1  christos 	std		%f6, [%i1 + 8]
   4303      1.1  christos 	add		%i1, 16, %i1
   4304      1.1  christos 	orn		%g0, %l3, %l3
   4305      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   4306      1.1  christos 
   4307      1.1  christos 	brnz,pt		%i2, .L256_cbc_dec_loop2x+4
   4308      1.1  christos 	orn		%g0, %l3, %l3
   4309      1.1  christos 	st		%f12, [%i4 + 0]
   4310      1.1  christos 	st		%f13, [%i4 + 4]
   4311      1.1  christos 	st		%f14, [%i4 + 8]
   4312      1.1  christos 	st		%f15, [%i4 + 12]
   4313      1.1  christos 	ret
   4314      1.1  christos 	restore
   4315      1.1  christos 
   4316      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   4317      1.1  christos .align	32
   4318      1.1  christos .L256_cbc_dec_loop2x:
   4319      1.1  christos 	ldx		[%i0 + 0], %o0
   4320      1.1  christos 	ldx		[%i0 + 8], %o1
   4321      1.1  christos 	ldx		[%i0 + 16], %o2
   4322      1.1  christos 	brz,pt		%l0, 4f
   4323      1.1  christos 	ldx		[%i0 + 24], %o3
   4324      1.1  christos 
   4325      1.1  christos 	ldx		[%i0 + 32], %o4
   4326      1.1  christos 	sllx		%o0, %l0, %o0
   4327      1.1  christos 	srlx		%o1, %l1, %g1
   4328      1.1  christos 	or		%g1, %o0, %o0
   4329      1.1  christos 	sllx		%o1, %l0, %o1
   4330      1.1  christos 	srlx		%o2, %l1, %g1
   4331      1.1  christos 	or		%g1, %o1, %o1
   4332      1.1  christos 	sllx		%o2, %l0, %o2
   4333      1.1  christos 	srlx		%o3, %l1, %g1
   4334      1.1  christos 	or		%g1, %o2, %o2
   4335      1.1  christos 	sllx		%o3, %l0, %o3
   4336      1.1  christos 	srlx		%o4, %l1, %o4
   4337      1.1  christos 	or		%o4, %o3, %o3
   4338      1.1  christos 4:
   4339      1.1  christos 	xor		%g4, %o0, %o4		! ^= rk[0]
   4340      1.1  christos 	xor		%g5, %o1, %o5
   4341      1.1  christos 	.word	0x81b0230c !movxtod	%o4,%f0
   4342      1.1  christos 	.word	0x85b0230d !movxtod	%o5,%f2
   4343      1.1  christos 	xor		%g4, %o2, %o4
   4344      1.1  christos 	xor		%g5, %o3, %o5
   4345      1.1  christos 	.word	0x89b0230c !movxtod	%o4,%f4
   4346      1.1  christos 	.word	0x8db0230d !movxtod	%o5,%f6
   4347      1.1  christos 
   4348      1.1  christos 	prefetch	[%i1 + 63], 22
   4349      1.1  christos 	prefetch	[%i0 + 32+63], 20
   4350      1.1  christos 	call		_aes256_decrypt_2x
   4351      1.1  christos 	add		%i0, 32, %i0
   4352      1.1  christos 
   4353      1.1  christos 	.word	0x91b02308 !movxtod	%o0,%f8
   4354      1.1  christos 	.word	0x95b02309 !movxtod	%o1,%f10
   4355      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
   4356      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   4357      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
   4358      1.1  christos 	.word	0x9db0230b !movxtod	%o3,%f14
   4359      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   4360      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   4361      1.1  christos 
   4362      1.1  christos 	brnz,pn		%l2, 2f
   4363      1.1  christos 	sub		%i2, 2, %i2
   4364  1.1.1.2  christos 
   4365      1.1  christos 	std		%f0, [%i1 + 0]
   4366      1.1  christos 	std		%f2, [%i1 + 8]
   4367      1.1  christos 	std		%f4, [%i1 + 16]
   4368      1.1  christos 	std		%f6, [%i1 + 24]
   4369      1.1  christos 	brnz,pt		%i2, .L256_cbc_dec_loop2x
   4370      1.1  christos 	add		%i1, 32, %i1
   4371      1.1  christos 	st		%f12, [%i4 + 0]
   4372      1.1  christos 	st		%f13, [%i4 + 4]
   4373      1.1  christos 	st		%f14, [%i4 + 8]
   4374      1.1  christos 	st		%f15, [%i4 + 12]
   4375      1.1  christos 	ret
   4376      1.1  christos 	restore
   4377      1.1  christos 
   4378      1.1  christos .align	16
   4379      1.1  christos 2:	ldxa		[%i0]0x82, %o0		! avoid read-after-write hazard
   4380      1.1  christos 						! and ~3x deterioration
   4381      1.1  christos 						! in inp==out case
   4382      1.1  christos 	.word	0x91b00900 !faligndata	%f0,%f0,%f8		! handle unaligned output
   4383      1.1  christos 	.word	0x81b00902 !faligndata	%f0,%f2,%f0
   4384      1.1  christos 	.word	0x85b08904 !faligndata	%f2,%f4,%f2
   4385      1.1  christos 	.word	0x89b10906 !faligndata	%f4,%f6,%f4
   4386      1.1  christos 	.word	0x8db18906 !faligndata	%f6,%f6,%f6
   4387      1.1  christos 	stda		%f8, [%i1 + %l3]0xc0	! partial store
   4388      1.1  christos 	std		%f0, [%i1 + 8]
   4389      1.1  christos 	std		%f2, [%i1 + 16]
   4390      1.1  christos 	std		%f4, [%i1 + 24]
   4391      1.1  christos 	add		%i1, 32, %i1
   4392      1.1  christos 	orn		%g0, %l3, %l3
   4393      1.1  christos 	stda		%f6, [%i1 + %l3]0xc0	! partial store
   4394      1.1  christos 
   4395      1.1  christos 	brnz,pt		%i2, .L256_cbc_dec_loop2x+4
   4396      1.1  christos 	orn		%g0, %l3, %l3
   4397      1.1  christos 	st		%f12, [%i4 + 0]
   4398      1.1  christos 	st		%f13, [%i4 + 4]
   4399      1.1  christos 	st		%f14, [%i4 + 8]
   4400      1.1  christos 	st		%f15, [%i4 + 12]
   4401      1.1  christos 	ret
   4402      1.1  christos 	restore
   4403      1.1  christos 
   4404      1.1  christos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   4405      1.1  christos .align	32
   4406      1.1  christos .L256cbc_dec_blk:
   4407      1.1  christos 	add	%i1, %i2, %l5
   4408      1.1  christos 	and	%l5, 63, %l5	! tail
   4409      1.1  christos 	sub	%i2, %l5, %i2
   4410      1.1  christos 	add	%l5, 15, %l5	! round up to 16n
   4411      1.1  christos 	srlx	%i2, 4, %i2
   4412      1.1  christos 	srl	%l5, 4, %l5
   4413      1.1  christos 	sub	%i2, 1, %i2
   4414      1.1  christos 	add	%l5, 1, %l5
   4415      1.1  christos 
   4416      1.1  christos .L256_cbc_dec_blk_loop2x:
   4417      1.1  christos 	ldx		[%i0 + 0], %o0
   4418      1.1  christos 	ldx		[%i0 + 8], %o1
   4419      1.1  christos 	ldx		[%i0 + 16], %o2
   4420      1.1  christos 	brz,pt		%l0, 5f
   4421      1.1  christos 	ldx		[%i0 + 24], %o3
   4422      1.1  christos 
   4423      1.1  christos 	ldx		[%i0 + 32], %o4
   4424      1.1  christos 	sllx		%o0, %l0, %o0
   4425      1.1  christos 	srlx		%o1, %l1, %g1
   4426      1.1  christos 	or		%g1, %o0, %o0
   4427      1.1  christos 	sllx		%o1, %l0, %o1
   4428      1.1  christos 	srlx		%o2, %l1, %g1
   4429      1.1  christos 	or		%g1, %o1, %o1
   4430      1.1  christos 	sllx		%o2, %l0, %o2
   4431      1.1  christos 	srlx		%o3, %l1, %g1
   4432      1.1  christos 	or		%g1, %o2, %o2
   4433      1.1  christos 	sllx		%o3, %l0, %o3
   4434      1.1  christos 	srlx		%o4, %l1, %o4
   4435      1.1  christos 	or		%o4, %o3, %o3
   4436      1.1  christos 5:
   4437      1.1  christos 	xor		%g4, %o0, %o4		! ^= rk[0]
   4438      1.1  christos 	xor		%g5, %o1, %o5
   4439      1.1  christos 	.word	0x81b0230c !movxtod	%o4,%f0
   4440      1.1  christos 	.word	0x85b0230d !movxtod	%o5,%f2
   4441      1.1  christos 	xor		%g4, %o2, %o4
   4442      1.1  christos 	xor		%g5, %o3, %o5
   4443      1.1  christos 	.word	0x89b0230c !movxtod	%o4,%f4
   4444      1.1  christos 	.word	0x8db0230d !movxtod	%o5,%f6
   4445      1.1  christos 
   4446      1.1  christos 	prefetch	[%i0 + 32+63], 20
   4447      1.1  christos 	call		_aes256_decrypt_2x
   4448      1.1  christos 	add		%i0, 32, %i0
   4449      1.1  christos 	subcc		%i2, 2, %i2
   4450      1.1  christos 
   4451      1.1  christos 	.word	0x91b02308 !movxtod	%o0,%f8
   4452      1.1  christos 	.word	0x95b02309 !movxtod	%o1,%f10
   4453      1.1  christos 	.word	0x81b30d80 !fxor	%f12,%f0,%f0		! ^= ivec
   4454      1.1  christos 	.word	0x85b38d82 !fxor	%f14,%f2,%f2
   4455      1.1  christos 	.word	0x99b0230a !movxtod	%o2,%f12
   4456      1.1  christos 	.word	0x9db0230b !movxtod	%o3,%f14
   4457      1.1  christos 	.word	0x89b20d84 !fxor	%f8,%f4,%f4
   4458      1.1  christos 	.word	0x8db28d86 !fxor	%f10,%f6,%f6
   4459      1.1  christos 
   4460      1.1  christos 	stda		%f0, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   4461      1.1  christos 	add		%i1, 8, %i1
   4462      1.1  christos 	stda		%f2, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   4463      1.1  christos 	add		%i1, 8, %i1
   4464      1.1  christos 	stda		%f4, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   4465      1.1  christos 	add		%i1, 8, %i1
   4466      1.1  christos 	stda		%f6, [%i1]0xe2		! ASI_BLK_INIT, T4-specific
   4467  1.1.1.2  christos 	bgu,pt		SIZE_T_CC, .L256_cbc_dec_blk_loop2x
   4468      1.1  christos 	add		%i1, 8, %i1
   4469      1.1  christos 
   4470      1.1  christos 	add		%l5, %i2, %i2
   4471      1.1  christos 	andcc		%i2, 1, %g0		! is number of blocks even?
   4472      1.1  christos 	membar		#StoreLoad|#StoreStore
   4473      1.1  christos 	bnz,pt		%icc, .L256_cbc_dec_loop
   4474      1.1  christos 	srl		%i2, 0, %i2
   4475      1.1  christos 	brnz,pn		%i2, .L256_cbc_dec_loop2x
   4476      1.1  christos 	nop
   4477      1.1  christos 	st		%f12, [%i4 + 0]	! write out ivec
   4478      1.1  christos 	st		%f13, [%i4 + 4]
   4479      1.1  christos 	st		%f14, [%i4 + 8]
   4480      1.1  christos 	st		%f15, [%i4 + 12]
   4481      1.1  christos 	ret
   4482      1.1  christos 	restore
   4483      1.1  christos .type	aes256_t4_cbc_decrypt,#function
   4484      1.1  christos .size	aes256_t4_cbc_decrypt,.-aes256_t4_cbc_decrypt
   4485      1.1  christos .align	32
   4486      1.1  christos _aes256_decrypt_1x:
   4487      1.1  christos 	.word	0x88cc0440 !aes_dround01	%f16,%f0,%f2,%f4
   4488      1.1  christos 	.word	0x84cc8460 !aes_dround23	%f18,%f0,%f2,%f2
   4489      1.1  christos 	ldd		[%i3 + 208], %f16
   4490      1.1  christos 	ldd		[%i3 + 216], %f18
   4491      1.1  christos 	.word	0x80cd0444 !aes_dround01	%f20,%f4,%f2,%f0
   4492      1.1  christos 	.word	0x84cd8464 !aes_dround23	%f22,%f4,%f2,%f2
   4493      1.1  christos 	ldd		[%i3 + 224], %f20
   4494      1.1  christos 	ldd		[%i3 + 232], %f22
   4495      1.1  christos 	.word	0x88ce0440 !aes_dround01	%f24,%f0,%f2,%f4
   4496      1.1  christos 	.word	0x84ce8460 !aes_dround23	%f26,%f0,%f2,%f2
   4497      1.1  christos 	.word	0x80cf0444 !aes_dround01	%f28,%f4,%f2,%f0
   4498      1.1  christos 	.word	0x84cf8464 !aes_dround23	%f30,%f4,%f2,%f2
   4499      1.1  christos 	.word	0x88c84440 !aes_dround01	%f32,%f0,%f2,%f4
   4500      1.1  christos 	.word	0x84c8c460 !aes_dround23	%f34,%f0,%f2,%f2
   4501      1.1  christos 	.word	0x80c94444 !aes_dround01	%f36,%f4,%f2,%f0
   4502      1.1  christos 	.word	0x84c9c464 !aes_dround23	%f38,%f4,%f2,%f2
   4503      1.1  christos 	.word	0x88ca4440 !aes_dround01	%f40,%f0,%f2,%f4
   4504      1.1  christos 	.word	0x84cac460 !aes_dround23	%f42,%f0,%f2,%f2
   4505      1.1  christos 	.word	0x80cb4444 !aes_dround01	%f44,%f4,%f2,%f0
   4506      1.1  christos 	.word	0x84cbc464 !aes_dround23	%f46,%f4,%f2,%f2
   4507      1.1  christos 	.word	0x88cc4440 !aes_dround01	%f48,%f0,%f2,%f4
   4508      1.1  christos 	.word	0x84ccc460 !aes_dround23	%f50,%f0,%f2,%f2
   4509      1.1  christos 	.word	0x80cd4444 !aes_dround01	%f52,%f4,%f2,%f0
   4510      1.1  christos 	.word	0x84cdc464 !aes_dround23	%f54,%f4,%f2,%f2
   4511      1.1  christos 	.word	0x88ce4440 !aes_dround01	%f56,%f0,%f2,%f4
   4512      1.1  christos 	.word	0x84cec460 !aes_dround23	%f58,%f0,%f2,%f2
   4513      1.1  christos 	.word	0x80cf4444 !aes_dround01	%f60,%f4,%f2,%f0
   4514      1.1  christos 	.word	0x84cfc464 !aes_dround23	%f62,%f4,%f2,%f2
   4515      1.1  christos 	.word	0x88cc0440 !aes_dround01	%f16,%f0,%f2,%f4
   4516      1.1  christos 	.word	0x84cc8460 !aes_dround23	%f18,%f0,%f2,%f2
   4517      1.1  christos 	ldd		[%i3 + 16], %f16
   4518      1.1  christos 	ldd		[%i3 + 24], %f18
   4519      1.1  christos 	.word	0x80cd04c4 !aes_dround01_l	%f20,%f4,%f2,%f0
   4520      1.1  christos 	.word	0x84cd84e4 !aes_dround23_l	%f22,%f4,%f2,%f2
   4521      1.1  christos 	ldd		[%i3 + 32], %f20
   4522      1.1  christos 	retl
   4523      1.1  christos 	ldd		[%i3 + 40], %f22
   4524      1.1  christos .type	_aes256_decrypt_1x,#function
   4525      1.1  christos .size	_aes256_decrypt_1x,.-_aes256_decrypt_1x
   4526      1.1  christos 
   4527      1.1  christos .align	32
   4528      1.1  christos _aes256_decrypt_2x:
   4529      1.1  christos 	.word	0x90cc0440 !aes_dround01	%f16,%f0,%f2,%f8
   4530      1.1  christos 	.word	0x84cc8460 !aes_dround23	%f18,%f0,%f2,%f2
   4531      1.1  christos 	.word	0x94cc0c44 !aes_dround01	%f16,%f4,%f6,%f10
   4532      1.1  christos 	.word	0x8ccc8c64 !aes_dround23	%f18,%f4,%f6,%f6
   4533      1.1  christos 	ldd		[%i3 + 208], %f16
   4534      1.1  christos 	ldd		[%i3 + 216], %f18
   4535      1.1  christos 	.word	0x80cd0448 !aes_dround01	%f20,%f8,%f2,%f0
   4536      1.1  christos 	.word	0x84cd8468 !aes_dround23	%f22,%f8,%f2,%f2
   4537      1.1  christos 	.word	0x88cd0c4a !aes_dround01	%f20,%f10,%f6,%f4
   4538      1.1  christos 	.word	0x8ccd8c6a !aes_dround23	%f22,%f10,%f6,%f6
   4539      1.1  christos 	ldd		[%i3 + 224], %f20
   4540      1.1  christos 	ldd		[%i3 + 232], %f22
   4541      1.1  christos 	.word	0x90ce0440 !aes_dround01	%f24,%f0,%f2,%f8
   4542      1.1  christos 	.word	0x84ce8460 !aes_dround23	%f26,%f0,%f2,%f2
   4543      1.1  christos 	.word	0x94ce0c44 !aes_dround01	%f24,%f4,%f6,%f10
   4544      1.1  christos 	.word	0x8cce8c64 !aes_dround23	%f26,%f4,%f6,%f6
   4545      1.1  christos 	.word	0x80cf0448 !aes_dround01	%f28,%f8,%f2,%f0
   4546      1.1  christos 	.word	0x84cf8468 !aes_dround23	%f30,%f8,%f2,%f2
   4547      1.1  christos 	.word	0x88cf0c4a !aes_dround01	%f28,%f10,%f6,%f4
   4548      1.1  christos 	.word	0x8ccf8c6a !aes_dround23	%f30,%f10,%f6,%f6
   4549      1.1  christos 	.word	0x90c84440 !aes_dround01	%f32,%f0,%f2,%f8
   4550      1.1  christos 	.word	0x84c8c460 !aes_dround23	%f34,%f0,%f2,%f2
   4551      1.1  christos 	.word	0x94c84c44 !aes_dround01	%f32,%f4,%f6,%f10
   4552      1.1  christos 	.word	0x8cc8cc64 !aes_dround23	%f34,%f4,%f6,%f6
   4553      1.1  christos 	.word	0x80c94448 !aes_dround01	%f36,%f8,%f2,%f0
   4554      1.1  christos 	.word	0x84c9c468 !aes_dround23	%f38,%f8,%f2,%f2
   4555      1.1  christos 	.word	0x88c94c4a !aes_dround01	%f36,%f10,%f6,%f4
   4556      1.1  christos 	.word	0x8cc9cc6a !aes_dround23	%f38,%f10,%f6,%f6
   4557      1.1  christos 	.word	0x90ca4440 !aes_dround01	%f40,%f0,%f2,%f8
   4558      1.1  christos 	.word	0x84cac460 !aes_dround23	%f42,%f0,%f2,%f2
   4559      1.1  christos 	.word	0x94ca4c44 !aes_dround01	%f40,%f4,%f6,%f10
   4560      1.1  christos 	.word	0x8ccacc64 !aes_dround23	%f42,%f4,%f6,%f6
   4561      1.1  christos 	.word	0x80cb4448 !aes_dround01	%f44,%f8,%f2,%f0
   4562      1.1  christos 	.word	0x84cbc468 !aes_dround23	%f46,%f8,%f2,%f2
   4563      1.1  christos 	.word	0x88cb4c4a !aes_dround01	%f44,%f10,%f6,%f4
   4564      1.1  christos 	.word	0x8ccbcc6a !aes_dround23	%f46,%f10,%f6,%f6
   4565      1.1  christos 	.word	0x90cc4440 !aes_dround01	%f48,%f0,%f2,%f8
   4566      1.1  christos 	.word	0x84ccc460 !aes_dround23	%f50,%f0,%f2,%f2
   4567      1.1  christos 	.word	0x94cc4c44 !aes_dround01	%f48,%f4,%f6,%f10
   4568      1.1  christos 	.word	0x8ccccc64 !aes_dround23	%f50,%f4,%f6,%f6
   4569      1.1  christos 	.word	0x80cd4448 !aes_dround01	%f52,%f8,%f2,%f0
   4570      1.1  christos 	.word	0x84cdc468 !aes_dround23	%f54,%f8,%f2,%f2
   4571      1.1  christos 	.word	0x88cd4c4a !aes_dround01	%f52,%f10,%f6,%f4
   4572      1.1  christos 	.word	0x8ccdcc6a !aes_dround23	%f54,%f10,%f6,%f6
   4573      1.1  christos 	.word	0x90ce4440 !aes_dround01	%f56,%f0,%f2,%f8
   4574      1.1  christos 	.word	0x84cec460 !aes_dround23	%f58,%f0,%f2,%f2
   4575      1.1  christos 	.word	0x94ce4c44 !aes_dround01	%f56,%f4,%f6,%f10
   4576      1.1  christos 	.word	0x8ccecc64 !aes_dround23	%f58,%f4,%f6,%f6
   4577      1.1  christos 	.word	0x80cf4448 !aes_dround01	%f60,%f8,%f2,%f0
   4578      1.1  christos 	.word	0x84cfc468 !aes_dround23	%f62,%f8,%f2,%f2
   4579      1.1  christos 	.word	0x88cf4c4a !aes_dround01	%f60,%f10,%f6,%f4
   4580      1.1  christos 	.word	0x8ccfcc6a !aes_dround23	%f62,%f10,%f6,%f6
   4581      1.1  christos 	.word	0x90cc0440 !aes_dround01	%f16,%f0,%f2,%f8
   4582      1.1  christos 	.word	0x84cc8460 !aes_dround23	%f18,%f0,%f2,%f2
   4583      1.1  christos 	.word	0x94cc0c44 !aes_dround01	%f16,%f4,%f6,%f10
   4584      1.1  christos 	.word	0x8ccc8c64 !aes_dround23	%f18,%f4,%f6,%f6
   4585      1.1  christos 	ldd		[%i3 + 16], %f16
   4586      1.1  christos 	ldd		[%i3 + 24], %f18
   4587      1.1  christos 	.word	0x80cd04c8 !aes_dround01_l	%f20,%f8,%f2,%f0
   4588      1.1  christos 	.word	0x84cd84e8 !aes_dround23_l	%f22,%f8,%f2,%f2
   4589      1.1  christos 	.word	0x88cd0cca !aes_dround01_l	%f20,%f10,%f6,%f4
   4590      1.1  christos 	.word	0x8ccd8cea !aes_dround23_l	%f22,%f10,%f6,%f6
   4591      1.1  christos 	ldd		[%i3 + 32], %f20
   4592      1.1  christos 	retl
   4593      1.1  christos 	ldd		[%i3 + 40], %f22
   4594      1.1  christos .type	_aes256_decrypt_2x,#function
   4595      1.1  christos .size	_aes256_decrypt_2x,.-_aes256_decrypt_2x
   4596      1.1  christos 
   4597      1.1  christos .align	32
   4598      1.1  christos _aes192_decrypt_1x:
   4599      1.1  christos 	.word	0x88cc0440 !aes_dround01	%f16,%f0,%f2,%f4
   4600      1.1  christos 	.word	0x84cc8460 !aes_dround23	%f18,%f0,%f2,%f2
   4601      1.1  christos 	.word	0x80cd0444 !aes_dround01	%f20,%f4,%f2,%f0
   4602      1.1  christos 	.word	0x84cd8464 !aes_dround23	%f22,%f4,%f2,%f2
   4603      1.1  christos 	.word	0x88ce0440 !aes_dround01	%f24,%f0,%f2,%f4
   4604      1.1  christos 	.word	0x84ce8460 !aes_dround23	%f26,%f0,%f2,%f2
   4605      1.1  christos 	.word	0x80cf0444 !aes_dround01	%f28,%f4,%f2,%f0
   4606      1.1  christos 	.word	0x84cf8464 !aes_dround23	%f30,%f4,%f2,%f2
   4607      1.1  christos 	.word	0x88c84440 !aes_dround01	%f32,%f0,%f2,%f4
   4608      1.1  christos 	.word	0x84c8c460 !aes_dround23	%f34,%f0,%f2,%f2
   4609      1.1  christos 	.word	0x80c94444 !aes_dround01	%f36,%f4,%f2,%f0
   4610      1.1  christos 	.word	0x84c9c464 !aes_dround23	%f38,%f4,%f2,%f2
   4611      1.1  christos 	.word	0x88ca4440 !aes_dround01	%f40,%f0,%f2,%f4
   4612      1.1  christos 	.word	0x84cac460 !aes_dround23	%f42,%f0,%f2,%f2
   4613      1.1  christos 	.word	0x80cb4444 !aes_dround01	%f44,%f4,%f2,%f0
   4614      1.1  christos 	.word	0x84cbc464 !aes_dround23	%f46,%f4,%f2,%f2
   4615      1.1  christos 	.word	0x88cc4440 !aes_dround01	%f48,%f0,%f2,%f4
   4616      1.1  christos 	.word	0x84ccc460 !aes_dround23	%f50,%f0,%f2,%f2
   4617      1.1  christos 	.word	0x80cd4444 !aes_dround01	%f52,%f4,%f2,%f0
   4618      1.1  christos 	.word	0x84cdc464 !aes_dround23	%f54,%f4,%f2,%f2
   4619      1.1  christos 	.word	0x88ce4440 !aes_dround01	%f56,%f0,%f2,%f4
   4620      1.1  christos 	.word	0x84cec460 !aes_dround23	%f58,%f0,%f2,%f2
   4621      1.1  christos 	.word	0x80cf44c4 !aes_dround01_l	%f60,%f4,%f2,%f0
   4622      1.1  christos 	retl
   4623      1.1  christos 	.word	0x84cfc4e4 !aes_dround23_l	%f62,%f4,%f2,%f2
   4624      1.1  christos .type	_aes192_decrypt_1x,#function
   4625      1.1  christos .size	_aes192_decrypt_1x,.-_aes192_decrypt_1x
   4626      1.1  christos 
   4627      1.1  christos .align	32
   4628      1.1  christos _aes192_decrypt_2x:
   4629      1.1  christos 	.word	0x90cc0440 !aes_dround01	%f16,%f0,%f2,%f8
   4630      1.1  christos 	.word	0x84cc8460 !aes_dround23	%f18,%f0,%f2,%f2
   4631      1.1  christos 	.word	0x94cc0c44 !aes_dround01	%f16,%f4,%f6,%f10
   4632      1.1  christos 	.word	0x8ccc8c64 !aes_dround23	%f18,%f4,%f6,%f6
   4633      1.1  christos 	.word	0x80cd0448 !aes_dround01	%f20,%f8,%f2,%f0
   4634      1.1  christos 	.word	0x84cd8468 !aes_dround23	%f22,%f8,%f2,%f2
   4635      1.1  christos 	.word	0x88cd0c4a !aes_dround01	%f20,%f10,%f6,%f4
   4636      1.1  christos 	.word	0x8ccd8c6a !aes_dround23	%f22,%f10,%f6,%f6
   4637      1.1  christos 	.word	0x90ce0440 !aes_dround01	%f24,%f0,%f2,%f8
   4638      1.1  christos 	.word	0x84ce8460 !aes_dround23	%f26,%f0,%f2,%f2
   4639      1.1  christos 	.word	0x94ce0c44 !aes_dround01	%f24,%f4,%f6,%f10
   4640      1.1  christos 	.word	0x8cce8c64 !aes_dround23	%f26,%f4,%f6,%f6
   4641      1.1  christos 	.word	0x80cf0448 !aes_dround01	%f28,%f8,%f2,%f0
   4642      1.1  christos 	.word	0x84cf8468 !aes_dround23	%f30,%f8,%f2,%f2
   4643      1.1  christos 	.word	0x88cf0c4a !aes_dround01	%f28,%f10,%f6,%f4
   4644      1.1  christos 	.word	0x8ccf8c6a !aes_dround23	%f30,%f10,%f6,%f6
   4645      1.1  christos 	.word	0x90c84440 !aes_dround01	%f32,%f0,%f2,%f8
   4646      1.1  christos 	.word	0x84c8c460 !aes_dround23	%f34,%f0,%f2,%f2
   4647      1.1  christos 	.word	0x94c84c44 !aes_dround01	%f32,%f4,%f6,%f10
   4648      1.1  christos 	.word	0x8cc8cc64 !aes_dround23	%f34,%f4,%f6,%f6
   4649      1.1  christos 	.word	0x80c94448 !aes_dround01	%f36,%f8,%f2,%f0
   4650      1.1  christos 	.word	0x84c9c468 !aes_dround23	%f38,%f8,%f2,%f2
   4651      1.1  christos 	.word	0x88c94c4a !aes_dround01	%f36,%f10,%f6,%f4
   4652      1.1  christos 	.word	0x8cc9cc6a !aes_dround23	%f38,%f10,%f6,%f6
   4653      1.1  christos 	.word	0x90ca4440 !aes_dround01	%f40,%f0,%f2,%f8
   4654      1.1  christos 	.word	0x84cac460 !aes_dround23	%f42,%f0,%f2,%f2
   4655      1.1  christos 	.word	0x94ca4c44 !aes_dround01	%f40,%f4,%f6,%f10
   4656      1.1  christos 	.word	0x8ccacc64 !aes_dround23	%f42,%f4,%f6,%f6
   4657      1.1  christos 	.word	0x80cb4448 !aes_dround01	%f44,%f8,%f2,%f0
   4658      1.1  christos 	.word	0x84cbc468 !aes_dround23	%f46,%f8,%f2,%f2
   4659      1.1  christos 	.word	0x88cb4c4a !aes_dround01	%f44,%f10,%f6,%f4
   4660      1.1  christos 	.word	0x8ccbcc6a !aes_dround23	%f46,%f10,%f6,%f6
   4661      1.1  christos 	.word	0x90cc4440 !aes_dround01	%f48,%f0,%f2,%f8
   4662      1.1  christos 	.word	0x84ccc460 !aes_dround23	%f50,%f0,%f2,%f2
   4663      1.1  christos 	.word	0x94cc4c44 !aes_dround01	%f48,%f4,%f6,%f10
   4664      1.1  christos 	.word	0x8ccccc64 !aes_dround23	%f50,%f4,%f6,%f6
   4665      1.1  christos 	.word	0x80cd4448 !aes_dround01	%f52,%f8,%f2,%f0
   4666      1.1  christos 	.word	0x84cdc468 !aes_dround23	%f54,%f8,%f2,%f2
   4667      1.1  christos 	.word	0x88cd4c4a !aes_dround01	%f52,%f10,%f6,%f4
   4668      1.1  christos 	.word	0x8ccdcc6a !aes_dround23	%f54,%f10,%f6,%f6
   4669      1.1  christos 	.word	0x90ce4440 !aes_dround01	%f56,%f0,%f2,%f8
   4670      1.1  christos 	.word	0x84cec460 !aes_dround23	%f58,%f0,%f2,%f2
   4671      1.1  christos 	.word	0x94ce4c44 !aes_dround01	%f56,%f4,%f6,%f10
   4672      1.1  christos 	.word	0x8ccecc64 !aes_dround23	%f58,%f4,%f6,%f6
   4673      1.1  christos 	.word	0x80cf44c8 !aes_dround01_l	%f60,%f8,%f2,%f0
   4674      1.1  christos 	.word	0x84cfc4e8 !aes_dround23_l	%f62,%f8,%f2,%f2
   4675      1.1  christos 	.word	0x88cf4cca !aes_dround01_l	%f60,%f10,%f6,%f4
   4676      1.1  christos 	retl
   4677      1.1  christos 	.word	0x8ccfccea !aes_dround23_l	%f62,%f10,%f6,%f6
   4678      1.1  christos .type	_aes192_decrypt_2x,#function
   4679      1.1  christos .size	_aes192_decrypt_2x,.-_aes192_decrypt_2x
   4680      1.1  christos .asciz	"AES for SPARC T4, David S. Miller, Andy Polyakov"
   4681      1.1  christos .align	4
   4682