VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.1/crypto/genasm-elf/aesni-x86.S@ 94083

Last change on this file since 94083 was 94083, checked in by vboxsync, 3 years ago

libs/openssl-3.0.1: Recreate asm files, bugref:10128

File size: 64.8 KB
Line 
1.text
2.globl aesni_encrypt
3.type aesni_encrypt,@function
4.align 16
5aesni_encrypt:
6.L_aesni_encrypt_begin:
7.byte 243,15,30,251
8 movl 4(%esp),%eax
9 movl 12(%esp),%edx
10 movups (%eax),%xmm2
11 movl 240(%edx),%ecx
12 movl 8(%esp),%eax
13 movups (%edx),%xmm0
14 movups 16(%edx),%xmm1
15 leal 32(%edx),%edx
16 xorps %xmm0,%xmm2
17.L000enc1_loop_1:
18.byte 102,15,56,220,209
19 decl %ecx
20 movups (%edx),%xmm1
21 leal 16(%edx),%edx
22 jnz .L000enc1_loop_1
23.byte 102,15,56,221,209
24 pxor %xmm0,%xmm0
25 pxor %xmm1,%xmm1
26 movups %xmm2,(%eax)
27 pxor %xmm2,%xmm2
28 ret
29.size aesni_encrypt,.-.L_aesni_encrypt_begin
30.globl aesni_decrypt
31.type aesni_decrypt,@function
32.align 16
33aesni_decrypt:
34.L_aesni_decrypt_begin:
35.byte 243,15,30,251
36 movl 4(%esp),%eax
37 movl 12(%esp),%edx
38 movups (%eax),%xmm2
39 movl 240(%edx),%ecx
40 movl 8(%esp),%eax
41 movups (%edx),%xmm0
42 movups 16(%edx),%xmm1
43 leal 32(%edx),%edx
44 xorps %xmm0,%xmm2
45.L001dec1_loop_2:
46.byte 102,15,56,222,209
47 decl %ecx
48 movups (%edx),%xmm1
49 leal 16(%edx),%edx
50 jnz .L001dec1_loop_2
51.byte 102,15,56,223,209
52 pxor %xmm0,%xmm0
53 pxor %xmm1,%xmm1
54 movups %xmm2,(%eax)
55 pxor %xmm2,%xmm2
56 ret
57.size aesni_decrypt,.-.L_aesni_decrypt_begin
58.type _aesni_encrypt2,@function
59.align 16
60_aesni_encrypt2:
61.byte 243,15,30,251
62 movups (%edx),%xmm0
63 shll $4,%ecx
64 movups 16(%edx),%xmm1
65 xorps %xmm0,%xmm2
66 pxor %xmm0,%xmm3
67 movups 32(%edx),%xmm0
68 leal 32(%edx,%ecx,1),%edx
69 negl %ecx
70 addl $16,%ecx
71.L002enc2_loop:
72.byte 102,15,56,220,209
73.byte 102,15,56,220,217
74 movups (%edx,%ecx,1),%xmm1
75 addl $32,%ecx
76.byte 102,15,56,220,208
77.byte 102,15,56,220,216
78 movups -16(%edx,%ecx,1),%xmm0
79 jnz .L002enc2_loop
80.byte 102,15,56,220,209
81.byte 102,15,56,220,217
82.byte 102,15,56,221,208
83.byte 102,15,56,221,216
84 ret
85.size _aesni_encrypt2,.-_aesni_encrypt2
86.type _aesni_decrypt2,@function
87.align 16
88_aesni_decrypt2:
89.byte 243,15,30,251
90 movups (%edx),%xmm0
91 shll $4,%ecx
92 movups 16(%edx),%xmm1
93 xorps %xmm0,%xmm2
94 pxor %xmm0,%xmm3
95 movups 32(%edx),%xmm0
96 leal 32(%edx,%ecx,1),%edx
97 negl %ecx
98 addl $16,%ecx
99.L003dec2_loop:
100.byte 102,15,56,222,209
101.byte 102,15,56,222,217
102 movups (%edx,%ecx,1),%xmm1
103 addl $32,%ecx
104.byte 102,15,56,222,208
105.byte 102,15,56,222,216
106 movups -16(%edx,%ecx,1),%xmm0
107 jnz .L003dec2_loop
108.byte 102,15,56,222,209
109.byte 102,15,56,222,217
110.byte 102,15,56,223,208
111.byte 102,15,56,223,216
112 ret
113.size _aesni_decrypt2,.-_aesni_decrypt2
114.type _aesni_encrypt3,@function
115.align 16
116_aesni_encrypt3:
117.byte 243,15,30,251
118 movups (%edx),%xmm0
119 shll $4,%ecx
120 movups 16(%edx),%xmm1
121 xorps %xmm0,%xmm2
122 pxor %xmm0,%xmm3
123 pxor %xmm0,%xmm4
124 movups 32(%edx),%xmm0
125 leal 32(%edx,%ecx,1),%edx
126 negl %ecx
127 addl $16,%ecx
128.L004enc3_loop:
129.byte 102,15,56,220,209
130.byte 102,15,56,220,217
131.byte 102,15,56,220,225
132 movups (%edx,%ecx,1),%xmm1
133 addl $32,%ecx
134.byte 102,15,56,220,208
135.byte 102,15,56,220,216
136.byte 102,15,56,220,224
137 movups -16(%edx,%ecx,1),%xmm0
138 jnz .L004enc3_loop
139.byte 102,15,56,220,209
140.byte 102,15,56,220,217
141.byte 102,15,56,220,225
142.byte 102,15,56,221,208
143.byte 102,15,56,221,216
144.byte 102,15,56,221,224
145 ret
146.size _aesni_encrypt3,.-_aesni_encrypt3
147.type _aesni_decrypt3,@function
148.align 16
149_aesni_decrypt3:
150.byte 243,15,30,251
151 movups (%edx),%xmm0
152 shll $4,%ecx
153 movups 16(%edx),%xmm1
154 xorps %xmm0,%xmm2
155 pxor %xmm0,%xmm3
156 pxor %xmm0,%xmm4
157 movups 32(%edx),%xmm0
158 leal 32(%edx,%ecx,1),%edx
159 negl %ecx
160 addl $16,%ecx
161.L005dec3_loop:
162.byte 102,15,56,222,209
163.byte 102,15,56,222,217
164.byte 102,15,56,222,225
165 movups (%edx,%ecx,1),%xmm1
166 addl $32,%ecx
167.byte 102,15,56,222,208
168.byte 102,15,56,222,216
169.byte 102,15,56,222,224
170 movups -16(%edx,%ecx,1),%xmm0
171 jnz .L005dec3_loop
172.byte 102,15,56,222,209
173.byte 102,15,56,222,217
174.byte 102,15,56,222,225
175.byte 102,15,56,223,208
176.byte 102,15,56,223,216
177.byte 102,15,56,223,224
178 ret
179.size _aesni_decrypt3,.-_aesni_decrypt3
180.type _aesni_encrypt4,@function
181.align 16
182_aesni_encrypt4:
183.byte 243,15,30,251
184 movups (%edx),%xmm0
185 movups 16(%edx),%xmm1
186 shll $4,%ecx
187 xorps %xmm0,%xmm2
188 pxor %xmm0,%xmm3
189 pxor %xmm0,%xmm4
190 pxor %xmm0,%xmm5
191 movups 32(%edx),%xmm0
192 leal 32(%edx,%ecx,1),%edx
193 negl %ecx
194.byte 15,31,64,0
195 addl $16,%ecx
196.L006enc4_loop:
197.byte 102,15,56,220,209
198.byte 102,15,56,220,217
199.byte 102,15,56,220,225
200.byte 102,15,56,220,233
201 movups (%edx,%ecx,1),%xmm1
202 addl $32,%ecx
203.byte 102,15,56,220,208
204.byte 102,15,56,220,216
205.byte 102,15,56,220,224
206.byte 102,15,56,220,232
207 movups -16(%edx,%ecx,1),%xmm0
208 jnz .L006enc4_loop
209.byte 102,15,56,220,209
210.byte 102,15,56,220,217
211.byte 102,15,56,220,225
212.byte 102,15,56,220,233
213.byte 102,15,56,221,208
214.byte 102,15,56,221,216
215.byte 102,15,56,221,224
216.byte 102,15,56,221,232
217 ret
218.size _aesni_encrypt4,.-_aesni_encrypt4
219.type _aesni_decrypt4,@function
220.align 16
221_aesni_decrypt4:
222.byte 243,15,30,251
223 movups (%edx),%xmm0
224 movups 16(%edx),%xmm1
225 shll $4,%ecx
226 xorps %xmm0,%xmm2
227 pxor %xmm0,%xmm3
228 pxor %xmm0,%xmm4
229 pxor %xmm0,%xmm5
230 movups 32(%edx),%xmm0
231 leal 32(%edx,%ecx,1),%edx
232 negl %ecx
233.byte 15,31,64,0
234 addl $16,%ecx
235.L007dec4_loop:
236.byte 102,15,56,222,209
237.byte 102,15,56,222,217
238.byte 102,15,56,222,225
239.byte 102,15,56,222,233
240 movups (%edx,%ecx,1),%xmm1
241 addl $32,%ecx
242.byte 102,15,56,222,208
243.byte 102,15,56,222,216
244.byte 102,15,56,222,224
245.byte 102,15,56,222,232
246 movups -16(%edx,%ecx,1),%xmm0
247 jnz .L007dec4_loop
248.byte 102,15,56,222,209
249.byte 102,15,56,222,217
250.byte 102,15,56,222,225
251.byte 102,15,56,222,233
252.byte 102,15,56,223,208
253.byte 102,15,56,223,216
254.byte 102,15,56,223,224
255.byte 102,15,56,223,232
256 ret
257.size _aesni_decrypt4,.-_aesni_decrypt4
258.type _aesni_encrypt6,@function
259.align 16
260_aesni_encrypt6:
261.byte 243,15,30,251
262 movups (%edx),%xmm0
263 shll $4,%ecx
264 movups 16(%edx),%xmm1
265 xorps %xmm0,%xmm2
266 pxor %xmm0,%xmm3
267 pxor %xmm0,%xmm4
268.byte 102,15,56,220,209
269 pxor %xmm0,%xmm5
270 pxor %xmm0,%xmm6
271.byte 102,15,56,220,217
272 leal 32(%edx,%ecx,1),%edx
273 negl %ecx
274.byte 102,15,56,220,225
275 pxor %xmm0,%xmm7
276 movups (%edx,%ecx,1),%xmm0
277 addl $16,%ecx
278 jmp .L008_aesni_encrypt6_inner
279.align 16
280.L009enc6_loop:
281.byte 102,15,56,220,209
282.byte 102,15,56,220,217
283.byte 102,15,56,220,225
284.L008_aesni_encrypt6_inner:
285.byte 102,15,56,220,233
286.byte 102,15,56,220,241
287.byte 102,15,56,220,249
288.L_aesni_encrypt6_enter:
289 movups (%edx,%ecx,1),%xmm1
290 addl $32,%ecx
291.byte 102,15,56,220,208
292.byte 102,15,56,220,216
293.byte 102,15,56,220,224
294.byte 102,15,56,220,232
295.byte 102,15,56,220,240
296.byte 102,15,56,220,248
297 movups -16(%edx,%ecx,1),%xmm0
298 jnz .L009enc6_loop
299.byte 102,15,56,220,209
300.byte 102,15,56,220,217
301.byte 102,15,56,220,225
302.byte 102,15,56,220,233
303.byte 102,15,56,220,241
304.byte 102,15,56,220,249
305.byte 102,15,56,221,208
306.byte 102,15,56,221,216
307.byte 102,15,56,221,224
308.byte 102,15,56,221,232
309.byte 102,15,56,221,240
310.byte 102,15,56,221,248
311 ret
312.size _aesni_encrypt6,.-_aesni_encrypt6
313.type _aesni_decrypt6,@function
314.align 16
315_aesni_decrypt6:
316.byte 243,15,30,251
317 movups (%edx),%xmm0
318 shll $4,%ecx
319 movups 16(%edx),%xmm1
320 xorps %xmm0,%xmm2
321 pxor %xmm0,%xmm3
322 pxor %xmm0,%xmm4
323.byte 102,15,56,222,209
324 pxor %xmm0,%xmm5
325 pxor %xmm0,%xmm6
326.byte 102,15,56,222,217
327 leal 32(%edx,%ecx,1),%edx
328 negl %ecx
329.byte 102,15,56,222,225
330 pxor %xmm0,%xmm7
331 movups (%edx,%ecx,1),%xmm0
332 addl $16,%ecx
333 jmp .L010_aesni_decrypt6_inner
334.align 16
335.L011dec6_loop:
336.byte 102,15,56,222,209
337.byte 102,15,56,222,217
338.byte 102,15,56,222,225
339.L010_aesni_decrypt6_inner:
340.byte 102,15,56,222,233
341.byte 102,15,56,222,241
342.byte 102,15,56,222,249
343.L_aesni_decrypt6_enter:
344 movups (%edx,%ecx,1),%xmm1
345 addl $32,%ecx
346.byte 102,15,56,222,208
347.byte 102,15,56,222,216
348.byte 102,15,56,222,224
349.byte 102,15,56,222,232
350.byte 102,15,56,222,240
351.byte 102,15,56,222,248
352 movups -16(%edx,%ecx,1),%xmm0
353 jnz .L011dec6_loop
354.byte 102,15,56,222,209
355.byte 102,15,56,222,217
356.byte 102,15,56,222,225
357.byte 102,15,56,222,233
358.byte 102,15,56,222,241
359.byte 102,15,56,222,249
360.byte 102,15,56,223,208
361.byte 102,15,56,223,216
362.byte 102,15,56,223,224
363.byte 102,15,56,223,232
364.byte 102,15,56,223,240
365.byte 102,15,56,223,248
366 ret
367.size _aesni_decrypt6,.-_aesni_decrypt6
368.globl aesni_ecb_encrypt
369.type aesni_ecb_encrypt,@function
370.align 16
371aesni_ecb_encrypt:
372.L_aesni_ecb_encrypt_begin:
373.byte 243,15,30,251
374 pushl %ebp
375 pushl %ebx
376 pushl %esi
377 pushl %edi
378 movl 20(%esp),%esi
379 movl 24(%esp),%edi
380 movl 28(%esp),%eax
381 movl 32(%esp),%edx
382 movl 36(%esp),%ebx
383 andl $-16,%eax
384 jz .L012ecb_ret
385 movl 240(%edx),%ecx
386 testl %ebx,%ebx
387 jz .L013ecb_decrypt
388 movl %edx,%ebp
389 movl %ecx,%ebx
390 cmpl $96,%eax
391 jb .L014ecb_enc_tail
392 movdqu (%esi),%xmm2
393 movdqu 16(%esi),%xmm3
394 movdqu 32(%esi),%xmm4
395 movdqu 48(%esi),%xmm5
396 movdqu 64(%esi),%xmm6
397 movdqu 80(%esi),%xmm7
398 leal 96(%esi),%esi
399 subl $96,%eax
400 jmp .L015ecb_enc_loop6_enter
401.align 16
402.L016ecb_enc_loop6:
403 movups %xmm2,(%edi)
404 movdqu (%esi),%xmm2
405 movups %xmm3,16(%edi)
406 movdqu 16(%esi),%xmm3
407 movups %xmm4,32(%edi)
408 movdqu 32(%esi),%xmm4
409 movups %xmm5,48(%edi)
410 movdqu 48(%esi),%xmm5
411 movups %xmm6,64(%edi)
412 movdqu 64(%esi),%xmm6
413 movups %xmm7,80(%edi)
414 leal 96(%edi),%edi
415 movdqu 80(%esi),%xmm7
416 leal 96(%esi),%esi
417.L015ecb_enc_loop6_enter:
418 call _aesni_encrypt6
419 movl %ebp,%edx
420 movl %ebx,%ecx
421 subl $96,%eax
422 jnc .L016ecb_enc_loop6
423 movups %xmm2,(%edi)
424 movups %xmm3,16(%edi)
425 movups %xmm4,32(%edi)
426 movups %xmm5,48(%edi)
427 movups %xmm6,64(%edi)
428 movups %xmm7,80(%edi)
429 leal 96(%edi),%edi
430 addl $96,%eax
431 jz .L012ecb_ret
432.L014ecb_enc_tail:
433 movups (%esi),%xmm2
434 cmpl $32,%eax
435 jb .L017ecb_enc_one
436 movups 16(%esi),%xmm3
437 je .L018ecb_enc_two
438 movups 32(%esi),%xmm4
439 cmpl $64,%eax
440 jb .L019ecb_enc_three
441 movups 48(%esi),%xmm5
442 je .L020ecb_enc_four
443 movups 64(%esi),%xmm6
444 xorps %xmm7,%xmm7
445 call _aesni_encrypt6
446 movups %xmm2,(%edi)
447 movups %xmm3,16(%edi)
448 movups %xmm4,32(%edi)
449 movups %xmm5,48(%edi)
450 movups %xmm6,64(%edi)
451 jmp .L012ecb_ret
452.align 16
453.L017ecb_enc_one:
454 movups (%edx),%xmm0
455 movups 16(%edx),%xmm1
456 leal 32(%edx),%edx
457 xorps %xmm0,%xmm2
458.L021enc1_loop_3:
459.byte 102,15,56,220,209
460 decl %ecx
461 movups (%edx),%xmm1
462 leal 16(%edx),%edx
463 jnz .L021enc1_loop_3
464.byte 102,15,56,221,209
465 movups %xmm2,(%edi)
466 jmp .L012ecb_ret
467.align 16
468.L018ecb_enc_two:
469 call _aesni_encrypt2
470 movups %xmm2,(%edi)
471 movups %xmm3,16(%edi)
472 jmp .L012ecb_ret
473.align 16
474.L019ecb_enc_three:
475 call _aesni_encrypt3
476 movups %xmm2,(%edi)
477 movups %xmm3,16(%edi)
478 movups %xmm4,32(%edi)
479 jmp .L012ecb_ret
480.align 16
481.L020ecb_enc_four:
482 call _aesni_encrypt4
483 movups %xmm2,(%edi)
484 movups %xmm3,16(%edi)
485 movups %xmm4,32(%edi)
486 movups %xmm5,48(%edi)
487 jmp .L012ecb_ret
488.align 16
489.L013ecb_decrypt:
490 movl %edx,%ebp
491 movl %ecx,%ebx
492 cmpl $96,%eax
493 jb .L022ecb_dec_tail
494 movdqu (%esi),%xmm2
495 movdqu 16(%esi),%xmm3
496 movdqu 32(%esi),%xmm4
497 movdqu 48(%esi),%xmm5
498 movdqu 64(%esi),%xmm6
499 movdqu 80(%esi),%xmm7
500 leal 96(%esi),%esi
501 subl $96,%eax
502 jmp .L023ecb_dec_loop6_enter
503.align 16
504.L024ecb_dec_loop6:
505 movups %xmm2,(%edi)
506 movdqu (%esi),%xmm2
507 movups %xmm3,16(%edi)
508 movdqu 16(%esi),%xmm3
509 movups %xmm4,32(%edi)
510 movdqu 32(%esi),%xmm4
511 movups %xmm5,48(%edi)
512 movdqu 48(%esi),%xmm5
513 movups %xmm6,64(%edi)
514 movdqu 64(%esi),%xmm6
515 movups %xmm7,80(%edi)
516 leal 96(%edi),%edi
517 movdqu 80(%esi),%xmm7
518 leal 96(%esi),%esi
519.L023ecb_dec_loop6_enter:
520 call _aesni_decrypt6
521 movl %ebp,%edx
522 movl %ebx,%ecx
523 subl $96,%eax
524 jnc .L024ecb_dec_loop6
525 movups %xmm2,(%edi)
526 movups %xmm3,16(%edi)
527 movups %xmm4,32(%edi)
528 movups %xmm5,48(%edi)
529 movups %xmm6,64(%edi)
530 movups %xmm7,80(%edi)
531 leal 96(%edi),%edi
532 addl $96,%eax
533 jz .L012ecb_ret
534.L022ecb_dec_tail:
535 movups (%esi),%xmm2
536 cmpl $32,%eax
537 jb .L025ecb_dec_one
538 movups 16(%esi),%xmm3
539 je .L026ecb_dec_two
540 movups 32(%esi),%xmm4
541 cmpl $64,%eax
542 jb .L027ecb_dec_three
543 movups 48(%esi),%xmm5
544 je .L028ecb_dec_four
545 movups 64(%esi),%xmm6
546 xorps %xmm7,%xmm7
547 call _aesni_decrypt6
548 movups %xmm2,(%edi)
549 movups %xmm3,16(%edi)
550 movups %xmm4,32(%edi)
551 movups %xmm5,48(%edi)
552 movups %xmm6,64(%edi)
553 jmp .L012ecb_ret
554.align 16
555.L025ecb_dec_one:
556 movups (%edx),%xmm0
557 movups 16(%edx),%xmm1
558 leal 32(%edx),%edx
559 xorps %xmm0,%xmm2
560.L029dec1_loop_4:
561.byte 102,15,56,222,209
562 decl %ecx
563 movups (%edx),%xmm1
564 leal 16(%edx),%edx
565 jnz .L029dec1_loop_4
566.byte 102,15,56,223,209
567 movups %xmm2,(%edi)
568 jmp .L012ecb_ret
569.align 16
570.L026ecb_dec_two:
571 call _aesni_decrypt2
572 movups %xmm2,(%edi)
573 movups %xmm3,16(%edi)
574 jmp .L012ecb_ret
575.align 16
576.L027ecb_dec_three:
577 call _aesni_decrypt3
578 movups %xmm2,(%edi)
579 movups %xmm3,16(%edi)
580 movups %xmm4,32(%edi)
581 jmp .L012ecb_ret
582.align 16
583.L028ecb_dec_four:
584 call _aesni_decrypt4
585 movups %xmm2,(%edi)
586 movups %xmm3,16(%edi)
587 movups %xmm4,32(%edi)
588 movups %xmm5,48(%edi)
589.L012ecb_ret:
590 pxor %xmm0,%xmm0
591 pxor %xmm1,%xmm1
592 pxor %xmm2,%xmm2
593 pxor %xmm3,%xmm3
594 pxor %xmm4,%xmm4
595 pxor %xmm5,%xmm5
596 pxor %xmm6,%xmm6
597 pxor %xmm7,%xmm7
598 popl %edi
599 popl %esi
600 popl %ebx
601 popl %ebp
602 ret
603.size aesni_ecb_encrypt,.-.L_aesni_ecb_encrypt_begin
604.globl aesni_ccm64_encrypt_blocks
605.type aesni_ccm64_encrypt_blocks,@function
606.align 16
607aesni_ccm64_encrypt_blocks:
608.L_aesni_ccm64_encrypt_blocks_begin:
609.byte 243,15,30,251
610 pushl %ebp
611 pushl %ebx
612 pushl %esi
613 pushl %edi
614 movl 20(%esp),%esi
615 movl 24(%esp),%edi
616 movl 28(%esp),%eax
617 movl 32(%esp),%edx
618 movl 36(%esp),%ebx
619 movl 40(%esp),%ecx
620 movl %esp,%ebp
621 subl $60,%esp
622 andl $-16,%esp
623 movl %ebp,48(%esp)
624 movdqu (%ebx),%xmm7
625 movdqu (%ecx),%xmm3
626 movl 240(%edx),%ecx
627 movl $202182159,(%esp)
628 movl $134810123,4(%esp)
629 movl $67438087,8(%esp)
630 movl $66051,12(%esp)
631 movl $1,%ebx
632 xorl %ebp,%ebp
633 movl %ebx,16(%esp)
634 movl %ebp,20(%esp)
635 movl %ebp,24(%esp)
636 movl %ebp,28(%esp)
637 shll $4,%ecx
638 movl $16,%ebx
639 leal (%edx),%ebp
640 movdqa (%esp),%xmm5
641 movdqa %xmm7,%xmm2
642 leal 32(%edx,%ecx,1),%edx
643 subl %ecx,%ebx
644.byte 102,15,56,0,253
645.L030ccm64_enc_outer:
646 movups (%ebp),%xmm0
647 movl %ebx,%ecx
648 movups (%esi),%xmm6
649 xorps %xmm0,%xmm2
650 movups 16(%ebp),%xmm1
651 xorps %xmm6,%xmm0
652 xorps %xmm0,%xmm3
653 movups 32(%ebp),%xmm0
654.L031ccm64_enc2_loop:
655.byte 102,15,56,220,209
656.byte 102,15,56,220,217
657 movups (%edx,%ecx,1),%xmm1
658 addl $32,%ecx
659.byte 102,15,56,220,208
660.byte 102,15,56,220,216
661 movups -16(%edx,%ecx,1),%xmm0
662 jnz .L031ccm64_enc2_loop
663.byte 102,15,56,220,209
664.byte 102,15,56,220,217
665 paddq 16(%esp),%xmm7
666 decl %eax
667.byte 102,15,56,221,208
668.byte 102,15,56,221,216
669 leal 16(%esi),%esi
670 xorps %xmm2,%xmm6
671 movdqa %xmm7,%xmm2
672 movups %xmm6,(%edi)
673.byte 102,15,56,0,213
674 leal 16(%edi),%edi
675 jnz .L030ccm64_enc_outer
676 movl 48(%esp),%esp
677 movl 40(%esp),%edi
678 movups %xmm3,(%edi)
679 pxor %xmm0,%xmm0
680 pxor %xmm1,%xmm1
681 pxor %xmm2,%xmm2
682 pxor %xmm3,%xmm3
683 pxor %xmm4,%xmm4
684 pxor %xmm5,%xmm5
685 pxor %xmm6,%xmm6
686 pxor %xmm7,%xmm7
687 popl %edi
688 popl %esi
689 popl %ebx
690 popl %ebp
691 ret
692.size aesni_ccm64_encrypt_blocks,.-.L_aesni_ccm64_encrypt_blocks_begin
693.globl aesni_ccm64_decrypt_blocks
694.type aesni_ccm64_decrypt_blocks,@function
695.align 16
696aesni_ccm64_decrypt_blocks:
697.L_aesni_ccm64_decrypt_blocks_begin:
698.byte 243,15,30,251
699 pushl %ebp
700 pushl %ebx
701 pushl %esi
702 pushl %edi
703 movl 20(%esp),%esi
704 movl 24(%esp),%edi
705 movl 28(%esp),%eax
706 movl 32(%esp),%edx
707 movl 36(%esp),%ebx
708 movl 40(%esp),%ecx
709 movl %esp,%ebp
710 subl $60,%esp
711 andl $-16,%esp
712 movl %ebp,48(%esp)
713 movdqu (%ebx),%xmm7
714 movdqu (%ecx),%xmm3
715 movl 240(%edx),%ecx
716 movl $202182159,(%esp)
717 movl $134810123,4(%esp)
718 movl $67438087,8(%esp)
719 movl $66051,12(%esp)
720 movl $1,%ebx
721 xorl %ebp,%ebp
722 movl %ebx,16(%esp)
723 movl %ebp,20(%esp)
724 movl %ebp,24(%esp)
725 movl %ebp,28(%esp)
726 movdqa (%esp),%xmm5
727 movdqa %xmm7,%xmm2
728 movl %edx,%ebp
729 movl %ecx,%ebx
730.byte 102,15,56,0,253
731 movups (%edx),%xmm0
732 movups 16(%edx),%xmm1
733 leal 32(%edx),%edx
734 xorps %xmm0,%xmm2
735.L032enc1_loop_5:
736.byte 102,15,56,220,209
737 decl %ecx
738 movups (%edx),%xmm1
739 leal 16(%edx),%edx
740 jnz .L032enc1_loop_5
741.byte 102,15,56,221,209
742 shll $4,%ebx
743 movl $16,%ecx
744 movups (%esi),%xmm6
745 paddq 16(%esp),%xmm7
746 leal 16(%esi),%esi
747 subl %ebx,%ecx
748 leal 32(%ebp,%ebx,1),%edx
749 movl %ecx,%ebx
750 jmp .L033ccm64_dec_outer
751.align 16
752.L033ccm64_dec_outer:
753 xorps %xmm2,%xmm6
754 movdqa %xmm7,%xmm2
755 movups %xmm6,(%edi)
756 leal 16(%edi),%edi
757.byte 102,15,56,0,213
758 subl $1,%eax
759 jz .L034ccm64_dec_break
760 movups (%ebp),%xmm0
761 movl %ebx,%ecx
762 movups 16(%ebp),%xmm1
763 xorps %xmm0,%xmm6
764 xorps %xmm0,%xmm2
765 xorps %xmm6,%xmm3
766 movups 32(%ebp),%xmm0
767.L035ccm64_dec2_loop:
768.byte 102,15,56,220,209
769.byte 102,15,56,220,217
770 movups (%edx,%ecx,1),%xmm1
771 addl $32,%ecx
772.byte 102,15,56,220,208
773.byte 102,15,56,220,216
774 movups -16(%edx,%ecx,1),%xmm0
775 jnz .L035ccm64_dec2_loop
776 movups (%esi),%xmm6
777 paddq 16(%esp),%xmm7
778.byte 102,15,56,220,209
779.byte 102,15,56,220,217
780.byte 102,15,56,221,208
781.byte 102,15,56,221,216
782 leal 16(%esi),%esi
783 jmp .L033ccm64_dec_outer
784.align 16
785.L034ccm64_dec_break:
786 movl 240(%ebp),%ecx
787 movl %ebp,%edx
788 movups (%edx),%xmm0
789 movups 16(%edx),%xmm1
790 xorps %xmm0,%xmm6
791 leal 32(%edx),%edx
792 xorps %xmm6,%xmm3
793.L036enc1_loop_6:
794.byte 102,15,56,220,217
795 decl %ecx
796 movups (%edx),%xmm1
797 leal 16(%edx),%edx
798 jnz .L036enc1_loop_6
799.byte 102,15,56,221,217
800 movl 48(%esp),%esp
801 movl 40(%esp),%edi
802 movups %xmm3,(%edi)
803 pxor %xmm0,%xmm0
804 pxor %xmm1,%xmm1
805 pxor %xmm2,%xmm2
806 pxor %xmm3,%xmm3
807 pxor %xmm4,%xmm4
808 pxor %xmm5,%xmm5
809 pxor %xmm6,%xmm6
810 pxor %xmm7,%xmm7
811 popl %edi
812 popl %esi
813 popl %ebx
814 popl %ebp
815 ret
816.size aesni_ccm64_decrypt_blocks,.-.L_aesni_ccm64_decrypt_blocks_begin
817.globl aesni_ctr32_encrypt_blocks
818.type aesni_ctr32_encrypt_blocks,@function
819.align 16
820aesni_ctr32_encrypt_blocks:
821.L_aesni_ctr32_encrypt_blocks_begin:
822.byte 243,15,30,251
823 pushl %ebp
824 pushl %ebx
825 pushl %esi
826 pushl %edi
827 movl 20(%esp),%esi
828 movl 24(%esp),%edi
829 movl 28(%esp),%eax
830 movl 32(%esp),%edx
831 movl 36(%esp),%ebx
832 movl %esp,%ebp
833 subl $88,%esp
834 andl $-16,%esp
835 movl %ebp,80(%esp)
836 cmpl $1,%eax
837 je .L037ctr32_one_shortcut
838 movdqu (%ebx),%xmm7
839 movl $202182159,(%esp)
840 movl $134810123,4(%esp)
841 movl $67438087,8(%esp)
842 movl $66051,12(%esp)
843 movl $6,%ecx
844 xorl %ebp,%ebp
845 movl %ecx,16(%esp)
846 movl %ecx,20(%esp)
847 movl %ecx,24(%esp)
848 movl %ebp,28(%esp)
849.byte 102,15,58,22,251,3
850.byte 102,15,58,34,253,3
851 movl 240(%edx),%ecx
852 bswap %ebx
853 pxor %xmm0,%xmm0
854 pxor %xmm1,%xmm1
855 movdqa (%esp),%xmm2
856.byte 102,15,58,34,195,0
857 leal 3(%ebx),%ebp
858.byte 102,15,58,34,205,0
859 incl %ebx
860.byte 102,15,58,34,195,1
861 incl %ebp
862.byte 102,15,58,34,205,1
863 incl %ebx
864.byte 102,15,58,34,195,2
865 incl %ebp
866.byte 102,15,58,34,205,2
867 movdqa %xmm0,48(%esp)
868.byte 102,15,56,0,194
869 movdqu (%edx),%xmm6
870 movdqa %xmm1,64(%esp)
871.byte 102,15,56,0,202
872 pshufd $192,%xmm0,%xmm2
873 pshufd $128,%xmm0,%xmm3
874 cmpl $6,%eax
875 jb .L038ctr32_tail
876 pxor %xmm6,%xmm7
877 shll $4,%ecx
878 movl $16,%ebx
879 movdqa %xmm7,32(%esp)
880 movl %edx,%ebp
881 subl %ecx,%ebx
882 leal 32(%edx,%ecx,1),%edx
883 subl $6,%eax
884 jmp .L039ctr32_loop6
885.align 16
886.L039ctr32_loop6:
887 pshufd $64,%xmm0,%xmm4
888 movdqa 32(%esp),%xmm0
889 pshufd $192,%xmm1,%xmm5
890 pxor %xmm0,%xmm2
891 pshufd $128,%xmm1,%xmm6
892 pxor %xmm0,%xmm3
893 pshufd $64,%xmm1,%xmm7
894 movups 16(%ebp),%xmm1
895 pxor %xmm0,%xmm4
896 pxor %xmm0,%xmm5
897.byte 102,15,56,220,209
898 pxor %xmm0,%xmm6
899 pxor %xmm0,%xmm7
900.byte 102,15,56,220,217
901 movups 32(%ebp),%xmm0
902 movl %ebx,%ecx
903.byte 102,15,56,220,225
904.byte 102,15,56,220,233
905.byte 102,15,56,220,241
906.byte 102,15,56,220,249
907 call .L_aesni_encrypt6_enter
908 movups (%esi),%xmm1
909 movups 16(%esi),%xmm0
910 xorps %xmm1,%xmm2
911 movups 32(%esi),%xmm1
912 xorps %xmm0,%xmm3
913 movups %xmm2,(%edi)
914 movdqa 16(%esp),%xmm0
915 xorps %xmm1,%xmm4
916 movdqa 64(%esp),%xmm1
917 movups %xmm3,16(%edi)
918 movups %xmm4,32(%edi)
919 paddd %xmm0,%xmm1
920 paddd 48(%esp),%xmm0
921 movdqa (%esp),%xmm2
922 movups 48(%esi),%xmm3
923 movups 64(%esi),%xmm4
924 xorps %xmm3,%xmm5
925 movups 80(%esi),%xmm3
926 leal 96(%esi),%esi
927 movdqa %xmm0,48(%esp)
928.byte 102,15,56,0,194
929 xorps %xmm4,%xmm6
930 movups %xmm5,48(%edi)
931 xorps %xmm3,%xmm7
932 movdqa %xmm1,64(%esp)
933.byte 102,15,56,0,202
934 movups %xmm6,64(%edi)
935 pshufd $192,%xmm0,%xmm2
936 movups %xmm7,80(%edi)
937 leal 96(%edi),%edi
938 pshufd $128,%xmm0,%xmm3
939 subl $6,%eax
940 jnc .L039ctr32_loop6
941 addl $6,%eax
942 jz .L040ctr32_ret
943 movdqu (%ebp),%xmm7
944 movl %ebp,%edx
945 pxor 32(%esp),%xmm7
946 movl 240(%ebp),%ecx
947.L038ctr32_tail:
948 por %xmm7,%xmm2
949 cmpl $2,%eax
950 jb .L041ctr32_one
951 pshufd $64,%xmm0,%xmm4
952 por %xmm7,%xmm3
953 je .L042ctr32_two
954 pshufd $192,%xmm1,%xmm5
955 por %xmm7,%xmm4
956 cmpl $4,%eax
957 jb .L043ctr32_three
958 pshufd $128,%xmm1,%xmm6
959 por %xmm7,%xmm5
960 je .L044ctr32_four
961 por %xmm7,%xmm6
962 call _aesni_encrypt6
963 movups (%esi),%xmm1
964 movups 16(%esi),%xmm0
965 xorps %xmm1,%xmm2
966 movups 32(%esi),%xmm1
967 xorps %xmm0,%xmm3
968 movups 48(%esi),%xmm0
969 xorps %xmm1,%xmm4
970 movups 64(%esi),%xmm1
971 xorps %xmm0,%xmm5
972 movups %xmm2,(%edi)
973 xorps %xmm1,%xmm6
974 movups %xmm3,16(%edi)
975 movups %xmm4,32(%edi)
976 movups %xmm5,48(%edi)
977 movups %xmm6,64(%edi)
978 jmp .L040ctr32_ret
979.align 16
980.L037ctr32_one_shortcut:
981 movups (%ebx),%xmm2
982 movl 240(%edx),%ecx
983.L041ctr32_one:
984 movups (%edx),%xmm0
985 movups 16(%edx),%xmm1
986 leal 32(%edx),%edx
987 xorps %xmm0,%xmm2
988.L045enc1_loop_7:
989.byte 102,15,56,220,209
990 decl %ecx
991 movups (%edx),%xmm1
992 leal 16(%edx),%edx
993 jnz .L045enc1_loop_7
994.byte 102,15,56,221,209
995 movups (%esi),%xmm6
996 xorps %xmm2,%xmm6
997 movups %xmm6,(%edi)
998 jmp .L040ctr32_ret
999.align 16
1000.L042ctr32_two:
1001 call _aesni_encrypt2
1002 movups (%esi),%xmm5
1003 movups 16(%esi),%xmm6
1004 xorps %xmm5,%xmm2
1005 xorps %xmm6,%xmm3
1006 movups %xmm2,(%edi)
1007 movups %xmm3,16(%edi)
1008 jmp .L040ctr32_ret
1009.align 16
1010.L043ctr32_three:
1011 call _aesni_encrypt3
1012 movups (%esi),%xmm5
1013 movups 16(%esi),%xmm6
1014 xorps %xmm5,%xmm2
1015 movups 32(%esi),%xmm7
1016 xorps %xmm6,%xmm3
1017 movups %xmm2,(%edi)
1018 xorps %xmm7,%xmm4
1019 movups %xmm3,16(%edi)
1020 movups %xmm4,32(%edi)
1021 jmp .L040ctr32_ret
1022.align 16
1023.L044ctr32_four:
1024 call _aesni_encrypt4
1025 movups (%esi),%xmm6
1026 movups 16(%esi),%xmm7
1027 movups 32(%esi),%xmm1
1028 xorps %xmm6,%xmm2
1029 movups 48(%esi),%xmm0
1030 xorps %xmm7,%xmm3
1031 movups %xmm2,(%edi)
1032 xorps %xmm1,%xmm4
1033 movups %xmm3,16(%edi)
1034 xorps %xmm0,%xmm5
1035 movups %xmm4,32(%edi)
1036 movups %xmm5,48(%edi)
1037.L040ctr32_ret:
1038 pxor %xmm0,%xmm0
1039 pxor %xmm1,%xmm1
1040 pxor %xmm2,%xmm2
1041 pxor %xmm3,%xmm3
1042 pxor %xmm4,%xmm4
1043 movdqa %xmm0,32(%esp)
1044 pxor %xmm5,%xmm5
1045 movdqa %xmm0,48(%esp)
1046 pxor %xmm6,%xmm6
1047 movdqa %xmm0,64(%esp)
1048 pxor %xmm7,%xmm7
1049 movl 80(%esp),%esp
1050 popl %edi
1051 popl %esi
1052 popl %ebx
1053 popl %ebp
1054 ret
1055.size aesni_ctr32_encrypt_blocks,.-.L_aesni_ctr32_encrypt_blocks_begin
1056.globl aesni_xts_encrypt
1057.type aesni_xts_encrypt,@function
1058.align 16
1059aesni_xts_encrypt:
1060.L_aesni_xts_encrypt_begin:
1061.byte 243,15,30,251
1062 pushl %ebp
1063 pushl %ebx
1064 pushl %esi
1065 pushl %edi
1066 movl 36(%esp),%edx
1067 movl 40(%esp),%esi
1068 movl 240(%edx),%ecx
1069 movups (%esi),%xmm2
1070 movups (%edx),%xmm0
1071 movups 16(%edx),%xmm1
1072 leal 32(%edx),%edx
1073 xorps %xmm0,%xmm2
1074.L046enc1_loop_8:
1075.byte 102,15,56,220,209
1076 decl %ecx
1077 movups (%edx),%xmm1
1078 leal 16(%edx),%edx
1079 jnz .L046enc1_loop_8
1080.byte 102,15,56,221,209
1081 movl 20(%esp),%esi
1082 movl 24(%esp),%edi
1083 movl 28(%esp),%eax
1084 movl 32(%esp),%edx
1085 movl %esp,%ebp
1086 subl $120,%esp
1087 movl 240(%edx),%ecx
1088 andl $-16,%esp
1089 movl $135,96(%esp)
1090 movl $0,100(%esp)
1091 movl $1,104(%esp)
1092 movl $0,108(%esp)
1093 movl %eax,112(%esp)
1094 movl %ebp,116(%esp)
1095 movdqa %xmm2,%xmm1
1096 pxor %xmm0,%xmm0
1097 movdqa 96(%esp),%xmm3
1098 pcmpgtd %xmm1,%xmm0
1099 andl $-16,%eax
1100 movl %edx,%ebp
1101 movl %ecx,%ebx
1102 subl $96,%eax
1103 jc .L047xts_enc_short
1104 shll $4,%ecx
1105 movl $16,%ebx
1106 subl %ecx,%ebx
1107 leal 32(%edx,%ecx,1),%edx
1108 jmp .L048xts_enc_loop6
1109.align 16
1110.L048xts_enc_loop6:
1111 pshufd $19,%xmm0,%xmm2
1112 pxor %xmm0,%xmm0
1113 movdqa %xmm1,(%esp)
1114 paddq %xmm1,%xmm1
1115 pand %xmm3,%xmm2
1116 pcmpgtd %xmm1,%xmm0
1117 pxor %xmm2,%xmm1
1118 pshufd $19,%xmm0,%xmm2
1119 pxor %xmm0,%xmm0
1120 movdqa %xmm1,16(%esp)
1121 paddq %xmm1,%xmm1
1122 pand %xmm3,%xmm2
1123 pcmpgtd %xmm1,%xmm0
1124 pxor %xmm2,%xmm1
1125 pshufd $19,%xmm0,%xmm2
1126 pxor %xmm0,%xmm0
1127 movdqa %xmm1,32(%esp)
1128 paddq %xmm1,%xmm1
1129 pand %xmm3,%xmm2
1130 pcmpgtd %xmm1,%xmm0
1131 pxor %xmm2,%xmm1
1132 pshufd $19,%xmm0,%xmm2
1133 pxor %xmm0,%xmm0
1134 movdqa %xmm1,48(%esp)
1135 paddq %xmm1,%xmm1
1136 pand %xmm3,%xmm2
1137 pcmpgtd %xmm1,%xmm0
1138 pxor %xmm2,%xmm1
1139 pshufd $19,%xmm0,%xmm7
1140 movdqa %xmm1,64(%esp)
1141 paddq %xmm1,%xmm1
1142 movups (%ebp),%xmm0
1143 pand %xmm3,%xmm7
1144 movups (%esi),%xmm2
1145 pxor %xmm1,%xmm7
1146 movl %ebx,%ecx
1147 movdqu 16(%esi),%xmm3
1148 xorps %xmm0,%xmm2
1149 movdqu 32(%esi),%xmm4
1150 pxor %xmm0,%xmm3
1151 movdqu 48(%esi),%xmm5
1152 pxor %xmm0,%xmm4
1153 movdqu 64(%esi),%xmm6
1154 pxor %xmm0,%xmm5
1155 movdqu 80(%esi),%xmm1
1156 pxor %xmm0,%xmm6
1157 leal 96(%esi),%esi
1158 pxor (%esp),%xmm2
1159 movdqa %xmm7,80(%esp)
1160 pxor %xmm1,%xmm7
1161 movups 16(%ebp),%xmm1
1162 pxor 16(%esp),%xmm3
1163 pxor 32(%esp),%xmm4
1164.byte 102,15,56,220,209
1165 pxor 48(%esp),%xmm5
1166 pxor 64(%esp),%xmm6
1167.byte 102,15,56,220,217
1168 pxor %xmm0,%xmm7
1169 movups 32(%ebp),%xmm0
1170.byte 102,15,56,220,225
1171.byte 102,15,56,220,233
1172.byte 102,15,56,220,241
1173.byte 102,15,56,220,249
1174 call .L_aesni_encrypt6_enter
1175 movdqa 80(%esp),%xmm1
1176 pxor %xmm0,%xmm0
1177 xorps (%esp),%xmm2
1178 pcmpgtd %xmm1,%xmm0
1179 xorps 16(%esp),%xmm3
1180 movups %xmm2,(%edi)
1181 xorps 32(%esp),%xmm4
1182 movups %xmm3,16(%edi)
1183 xorps 48(%esp),%xmm5
1184 movups %xmm4,32(%edi)
1185 xorps 64(%esp),%xmm6
1186 movups %xmm5,48(%edi)
1187 xorps %xmm1,%xmm7
1188 movups %xmm6,64(%edi)
1189 pshufd $19,%xmm0,%xmm2
1190 movups %xmm7,80(%edi)
1191 leal 96(%edi),%edi
1192 movdqa 96(%esp),%xmm3
1193 pxor %xmm0,%xmm0
1194 paddq %xmm1,%xmm1
1195 pand %xmm3,%xmm2
1196 pcmpgtd %xmm1,%xmm0
1197 pxor %xmm2,%xmm1
1198 subl $96,%eax
1199 jnc .L048xts_enc_loop6
1200 movl 240(%ebp),%ecx
1201 movl %ebp,%edx
1202 movl %ecx,%ebx
1203.L047xts_enc_short:
1204 addl $96,%eax
1205 jz .L049xts_enc_done6x
1206 movdqa %xmm1,%xmm5
1207 cmpl $32,%eax
1208 jb .L050xts_enc_one
1209 pshufd $19,%xmm0,%xmm2
1210 pxor %xmm0,%xmm0
1211 paddq %xmm1,%xmm1
1212 pand %xmm3,%xmm2
1213 pcmpgtd %xmm1,%xmm0
1214 pxor %xmm2,%xmm1
1215 je .L051xts_enc_two
1216 pshufd $19,%xmm0,%xmm2
1217 pxor %xmm0,%xmm0
1218 movdqa %xmm1,%xmm6
1219 paddq %xmm1,%xmm1
1220 pand %xmm3,%xmm2
1221 pcmpgtd %xmm1,%xmm0
1222 pxor %xmm2,%xmm1
1223 cmpl $64,%eax
1224 jb .L052xts_enc_three
1225 pshufd $19,%xmm0,%xmm2
1226 pxor %xmm0,%xmm0
1227 movdqa %xmm1,%xmm7
1228 paddq %xmm1,%xmm1
1229 pand %xmm3,%xmm2
1230 pcmpgtd %xmm1,%xmm0
1231 pxor %xmm2,%xmm1
1232 movdqa %xmm5,(%esp)
1233 movdqa %xmm6,16(%esp)
1234 je .L053xts_enc_four
1235 movdqa %xmm7,32(%esp)
1236 pshufd $19,%xmm0,%xmm7
1237 movdqa %xmm1,48(%esp)
1238 paddq %xmm1,%xmm1
1239 pand %xmm3,%xmm7
1240 pxor %xmm1,%xmm7
1241 movdqu (%esi),%xmm2
1242 movdqu 16(%esi),%xmm3
1243 movdqu 32(%esi),%xmm4
1244 pxor (%esp),%xmm2
1245 movdqu 48(%esi),%xmm5
1246 pxor 16(%esp),%xmm3
1247 movdqu 64(%esi),%xmm6
1248 pxor 32(%esp),%xmm4
1249 leal 80(%esi),%esi
1250 pxor 48(%esp),%xmm5
1251 movdqa %xmm7,64(%esp)
1252 pxor %xmm7,%xmm6
1253 call _aesni_encrypt6
1254 movaps 64(%esp),%xmm1
1255 xorps (%esp),%xmm2
1256 xorps 16(%esp),%xmm3
1257 xorps 32(%esp),%xmm4
1258 movups %xmm2,(%edi)
1259 xorps 48(%esp),%xmm5
1260 movups %xmm3,16(%edi)
1261 xorps %xmm1,%xmm6
1262 movups %xmm4,32(%edi)
1263 movups %xmm5,48(%edi)
1264 movups %xmm6,64(%edi)
1265 leal 80(%edi),%edi
1266 jmp .L054xts_enc_done
1267.align 16
1268.L050xts_enc_one:
1269 movups (%esi),%xmm2
1270 leal 16(%esi),%esi
1271 xorps %xmm5,%xmm2
1272 movups (%edx),%xmm0
1273 movups 16(%edx),%xmm1
1274 leal 32(%edx),%edx
1275 xorps %xmm0,%xmm2
1276.L055enc1_loop_9:
1277.byte 102,15,56,220,209
1278 decl %ecx
1279 movups (%edx),%xmm1
1280 leal 16(%edx),%edx
1281 jnz .L055enc1_loop_9
1282.byte 102,15,56,221,209
1283 xorps %xmm5,%xmm2
1284 movups %xmm2,(%edi)
1285 leal 16(%edi),%edi
1286 movdqa %xmm5,%xmm1
1287 jmp .L054xts_enc_done
1288.align 16
1289.L051xts_enc_two:
1290 movaps %xmm1,%xmm6
1291 movups (%esi),%xmm2
1292 movups 16(%esi),%xmm3
1293 leal 32(%esi),%esi
1294 xorps %xmm5,%xmm2
1295 xorps %xmm6,%xmm3
1296 call _aesni_encrypt2
1297 xorps %xmm5,%xmm2
1298 xorps %xmm6,%xmm3
1299 movups %xmm2,(%edi)
1300 movups %xmm3,16(%edi)
1301 leal 32(%edi),%edi
1302 movdqa %xmm6,%xmm1
1303 jmp .L054xts_enc_done
1304.align 16
1305.L052xts_enc_three:
1306 movaps %xmm1,%xmm7
1307 movups (%esi),%xmm2
1308 movups 16(%esi),%xmm3
1309 movups 32(%esi),%xmm4
1310 leal 48(%esi),%esi
1311 xorps %xmm5,%xmm2
1312 xorps %xmm6,%xmm3
1313 xorps %xmm7,%xmm4
1314 call _aesni_encrypt3
1315 xorps %xmm5,%xmm2
1316 xorps %xmm6,%xmm3
1317 xorps %xmm7,%xmm4
1318 movups %xmm2,(%edi)
1319 movups %xmm3,16(%edi)
1320 movups %xmm4,32(%edi)
1321 leal 48(%edi),%edi
1322 movdqa %xmm7,%xmm1
1323 jmp .L054xts_enc_done
1324.align 16
1325.L053xts_enc_four:
1326 movaps %xmm1,%xmm6
1327 movups (%esi),%xmm2
1328 movups 16(%esi),%xmm3
1329 movups 32(%esi),%xmm4
1330 xorps (%esp),%xmm2
1331 movups 48(%esi),%xmm5
1332 leal 64(%esi),%esi
1333 xorps 16(%esp),%xmm3
1334 xorps %xmm7,%xmm4
1335 xorps %xmm6,%xmm5
1336 call _aesni_encrypt4
1337 xorps (%esp),%xmm2
1338 xorps 16(%esp),%xmm3
1339 xorps %xmm7,%xmm4
1340 movups %xmm2,(%edi)
1341 xorps %xmm6,%xmm5
1342 movups %xmm3,16(%edi)
1343 movups %xmm4,32(%edi)
1344 movups %xmm5,48(%edi)
1345 leal 64(%edi),%edi
1346 movdqa %xmm6,%xmm1
1347 jmp .L054xts_enc_done
1348.align 16
1349.L049xts_enc_done6x:
1350 movl 112(%esp),%eax
1351 andl $15,%eax
1352 jz .L056xts_enc_ret
1353 movdqa %xmm1,%xmm5
1354 movl %eax,112(%esp)
1355 jmp .L057xts_enc_steal
1356.align 16
1357.L054xts_enc_done:
1358 movl 112(%esp),%eax
1359 pxor %xmm0,%xmm0
1360 andl $15,%eax
1361 jz .L056xts_enc_ret
1362 pcmpgtd %xmm1,%xmm0
1363 movl %eax,112(%esp)
1364 pshufd $19,%xmm0,%xmm5
1365 paddq %xmm1,%xmm1
1366 pand 96(%esp),%xmm5
1367 pxor %xmm1,%xmm5
1368.L057xts_enc_steal:
1369 movzbl (%esi),%ecx
1370 movzbl -16(%edi),%edx
1371 leal 1(%esi),%esi
1372 movb %cl,-16(%edi)
1373 movb %dl,(%edi)
1374 leal 1(%edi),%edi
1375 subl $1,%eax
1376 jnz .L057xts_enc_steal
1377 subl 112(%esp),%edi
1378 movl %ebp,%edx
1379 movl %ebx,%ecx
1380 movups -16(%edi),%xmm2
1381 xorps %xmm5,%xmm2
1382 movups (%edx),%xmm0
1383 movups 16(%edx),%xmm1
1384 leal 32(%edx),%edx
1385 xorps %xmm0,%xmm2
1386.L058enc1_loop_10:
1387.byte 102,15,56,220,209
1388 decl %ecx
1389 movups (%edx),%xmm1
1390 leal 16(%edx),%edx
1391 jnz .L058enc1_loop_10
1392.byte 102,15,56,221,209
1393 xorps %xmm5,%xmm2
1394 movups %xmm2,-16(%edi)
1395.L056xts_enc_ret:
1396 pxor %xmm0,%xmm0
1397 pxor %xmm1,%xmm1
1398 pxor %xmm2,%xmm2
1399 movdqa %xmm0,(%esp)
1400 pxor %xmm3,%xmm3
1401 movdqa %xmm0,16(%esp)
1402 pxor %xmm4,%xmm4
1403 movdqa %xmm0,32(%esp)
1404 pxor %xmm5,%xmm5
1405 movdqa %xmm0,48(%esp)
1406 pxor %xmm6,%xmm6
1407 movdqa %xmm0,64(%esp)
1408 pxor %xmm7,%xmm7
1409 movdqa %xmm0,80(%esp)
1410 movl 116(%esp),%esp
1411 popl %edi
1412 popl %esi
1413 popl %ebx
1414 popl %ebp
1415 ret
1416.size aesni_xts_encrypt,.-.L_aesni_xts_encrypt_begin
1417.globl aesni_xts_decrypt
1418.type aesni_xts_decrypt,@function
1419.align 16
1420aesni_xts_decrypt:
1421.L_aesni_xts_decrypt_begin:
1422.byte 243,15,30,251
1423 pushl %ebp
1424 pushl %ebx
1425 pushl %esi
1426 pushl %edi
1427 movl 36(%esp),%edx
1428 movl 40(%esp),%esi
1429 movl 240(%edx),%ecx
1430 movups (%esi),%xmm2
1431 movups (%edx),%xmm0
1432 movups 16(%edx),%xmm1
1433 leal 32(%edx),%edx
1434 xorps %xmm0,%xmm2
1435.L059enc1_loop_11:
1436.byte 102,15,56,220,209
1437 decl %ecx
1438 movups (%edx),%xmm1
1439 leal 16(%edx),%edx
1440 jnz .L059enc1_loop_11
1441.byte 102,15,56,221,209
1442 movl 20(%esp),%esi
1443 movl 24(%esp),%edi
1444 movl 28(%esp),%eax
1445 movl 32(%esp),%edx
1446 movl %esp,%ebp
1447 subl $120,%esp
1448 andl $-16,%esp
1449 xorl %ebx,%ebx
1450 testl $15,%eax
1451 setnz %bl
1452 shll $4,%ebx
1453 subl %ebx,%eax
1454 movl $135,96(%esp)
1455 movl $0,100(%esp)
1456 movl $1,104(%esp)
1457 movl $0,108(%esp)
1458 movl %eax,112(%esp)
1459 movl %ebp,116(%esp)
1460 movl 240(%edx),%ecx
1461 movl %edx,%ebp
1462 movl %ecx,%ebx
1463 movdqa %xmm2,%xmm1
1464 pxor %xmm0,%xmm0
1465 movdqa 96(%esp),%xmm3
1466 pcmpgtd %xmm1,%xmm0
1467 andl $-16,%eax
1468 subl $96,%eax
1469 jc .L060xts_dec_short
1470 shll $4,%ecx
1471 movl $16,%ebx
1472 subl %ecx,%ebx
1473 leal 32(%edx,%ecx,1),%edx
1474 jmp .L061xts_dec_loop6
1475.align 16
1476.L061xts_dec_loop6:
1477 pshufd $19,%xmm0,%xmm2
1478 pxor %xmm0,%xmm0
1479 movdqa %xmm1,(%esp)
1480 paddq %xmm1,%xmm1
1481 pand %xmm3,%xmm2
1482 pcmpgtd %xmm1,%xmm0
1483 pxor %xmm2,%xmm1
1484 pshufd $19,%xmm0,%xmm2
1485 pxor %xmm0,%xmm0
1486 movdqa %xmm1,16(%esp)
1487 paddq %xmm1,%xmm1
1488 pand %xmm3,%xmm2
1489 pcmpgtd %xmm1,%xmm0
1490 pxor %xmm2,%xmm1
1491 pshufd $19,%xmm0,%xmm2
1492 pxor %xmm0,%xmm0
1493 movdqa %xmm1,32(%esp)
1494 paddq %xmm1,%xmm1
1495 pand %xmm3,%xmm2
1496 pcmpgtd %xmm1,%xmm0
1497 pxor %xmm2,%xmm1
1498 pshufd $19,%xmm0,%xmm2
1499 pxor %xmm0,%xmm0
1500 movdqa %xmm1,48(%esp)
1501 paddq %xmm1,%xmm1
1502 pand %xmm3,%xmm2
1503 pcmpgtd %xmm1,%xmm0
1504 pxor %xmm2,%xmm1
1505 pshufd $19,%xmm0,%xmm7
1506 movdqa %xmm1,64(%esp)
1507 paddq %xmm1,%xmm1
1508 movups (%ebp),%xmm0
1509 pand %xmm3,%xmm7
1510 movups (%esi),%xmm2
1511 pxor %xmm1,%xmm7
1512 movl %ebx,%ecx
1513 movdqu 16(%esi),%xmm3
1514 xorps %xmm0,%xmm2
1515 movdqu 32(%esi),%xmm4
1516 pxor %xmm0,%xmm3
1517 movdqu 48(%esi),%xmm5
1518 pxor %xmm0,%xmm4
1519 movdqu 64(%esi),%xmm6
1520 pxor %xmm0,%xmm5
1521 movdqu 80(%esi),%xmm1
1522 pxor %xmm0,%xmm6
1523 leal 96(%esi),%esi
1524 pxor (%esp),%xmm2
1525 movdqa %xmm7,80(%esp)
1526 pxor %xmm1,%xmm7
1527 movups 16(%ebp),%xmm1
1528 pxor 16(%esp),%xmm3
1529 pxor 32(%esp),%xmm4
1530.byte 102,15,56,222,209
1531 pxor 48(%esp),%xmm5
1532 pxor 64(%esp),%xmm6
1533.byte 102,15,56,222,217
1534 pxor %xmm0,%xmm7
1535 movups 32(%ebp),%xmm0
1536.byte 102,15,56,222,225
1537.byte 102,15,56,222,233
1538.byte 102,15,56,222,241
1539.byte 102,15,56,222,249
1540 call .L_aesni_decrypt6_enter
1541 movdqa 80(%esp),%xmm1
1542 pxor %xmm0,%xmm0
1543 xorps (%esp),%xmm2
1544 pcmpgtd %xmm1,%xmm0
1545 xorps 16(%esp),%xmm3
1546 movups %xmm2,(%edi)
1547 xorps 32(%esp),%xmm4
1548 movups %xmm3,16(%edi)
1549 xorps 48(%esp),%xmm5
1550 movups %xmm4,32(%edi)
1551 xorps 64(%esp),%xmm6
1552 movups %xmm5,48(%edi)
1553 xorps %xmm1,%xmm7
1554 movups %xmm6,64(%edi)
1555 pshufd $19,%xmm0,%xmm2
1556 movups %xmm7,80(%edi)
1557 leal 96(%edi),%edi
1558 movdqa 96(%esp),%xmm3
1559 pxor %xmm0,%xmm0
1560 paddq %xmm1,%xmm1
1561 pand %xmm3,%xmm2
1562 pcmpgtd %xmm1,%xmm0
1563 pxor %xmm2,%xmm1
1564 subl $96,%eax
1565 jnc .L061xts_dec_loop6
1566 movl 240(%ebp),%ecx
1567 movl %ebp,%edx
1568 movl %ecx,%ebx
1569.L060xts_dec_short:
1570 addl $96,%eax
1571 jz .L062xts_dec_done6x
1572 movdqa %xmm1,%xmm5
1573 cmpl $32,%eax
1574 jb .L063xts_dec_one
1575 pshufd $19,%xmm0,%xmm2
1576 pxor %xmm0,%xmm0
1577 paddq %xmm1,%xmm1
1578 pand %xmm3,%xmm2
1579 pcmpgtd %xmm1,%xmm0
1580 pxor %xmm2,%xmm1
1581 je .L064xts_dec_two
1582 pshufd $19,%xmm0,%xmm2
1583 pxor %xmm0,%xmm0
1584 movdqa %xmm1,%xmm6
1585 paddq %xmm1,%xmm1
1586 pand %xmm3,%xmm2
1587 pcmpgtd %xmm1,%xmm0
1588 pxor %xmm2,%xmm1
1589 cmpl $64,%eax
1590 jb .L065xts_dec_three
1591 pshufd $19,%xmm0,%xmm2
1592 pxor %xmm0,%xmm0
1593 movdqa %xmm1,%xmm7
1594 paddq %xmm1,%xmm1
1595 pand %xmm3,%xmm2
1596 pcmpgtd %xmm1,%xmm0
1597 pxor %xmm2,%xmm1
1598 movdqa %xmm5,(%esp)
1599 movdqa %xmm6,16(%esp)
1600 je .L066xts_dec_four
1601 movdqa %xmm7,32(%esp)
1602 pshufd $19,%xmm0,%xmm7
1603 movdqa %xmm1,48(%esp)
1604 paddq %xmm1,%xmm1
1605 pand %xmm3,%xmm7
1606 pxor %xmm1,%xmm7
1607 movdqu (%esi),%xmm2
1608 movdqu 16(%esi),%xmm3
1609 movdqu 32(%esi),%xmm4
1610 pxor (%esp),%xmm2
1611 movdqu 48(%esi),%xmm5
1612 pxor 16(%esp),%xmm3
1613 movdqu 64(%esi),%xmm6
1614 pxor 32(%esp),%xmm4
1615 leal 80(%esi),%esi
1616 pxor 48(%esp),%xmm5
1617 movdqa %xmm7,64(%esp)
1618 pxor %xmm7,%xmm6
1619 call _aesni_decrypt6
1620 movaps 64(%esp),%xmm1
1621 xorps (%esp),%xmm2
1622 xorps 16(%esp),%xmm3
1623 xorps 32(%esp),%xmm4
1624 movups %xmm2,(%edi)
1625 xorps 48(%esp),%xmm5
1626 movups %xmm3,16(%edi)
1627 xorps %xmm1,%xmm6
1628 movups %xmm4,32(%edi)
1629 movups %xmm5,48(%edi)
1630 movups %xmm6,64(%edi)
1631 leal 80(%edi),%edi
1632 jmp .L067xts_dec_done
1633.align 16
1634.L063xts_dec_one:
1635 movups (%esi),%xmm2
1636 leal 16(%esi),%esi
1637 xorps %xmm5,%xmm2
1638 movups (%edx),%xmm0
1639 movups 16(%edx),%xmm1
1640 leal 32(%edx),%edx
1641 xorps %xmm0,%xmm2
1642.L068dec1_loop_12:
1643.byte 102,15,56,222,209
1644 decl %ecx
1645 movups (%edx),%xmm1
1646 leal 16(%edx),%edx
1647 jnz .L068dec1_loop_12
1648.byte 102,15,56,223,209
1649 xorps %xmm5,%xmm2
1650 movups %xmm2,(%edi)
1651 leal 16(%edi),%edi
1652 movdqa %xmm5,%xmm1
1653 jmp .L067xts_dec_done
1654.align 16
1655.L064xts_dec_two:
1656 movaps %xmm1,%xmm6
1657 movups (%esi),%xmm2
1658 movups 16(%esi),%xmm3
1659 leal 32(%esi),%esi
1660 xorps %xmm5,%xmm2
1661 xorps %xmm6,%xmm3
1662 call _aesni_decrypt2
1663 xorps %xmm5,%xmm2
1664 xorps %xmm6,%xmm3
1665 movups %xmm2,(%edi)
1666 movups %xmm3,16(%edi)
1667 leal 32(%edi),%edi
1668 movdqa %xmm6,%xmm1
1669 jmp .L067xts_dec_done
1670.align 16
1671.L065xts_dec_three:
1672 movaps %xmm1,%xmm7
1673 movups (%esi),%xmm2
1674 movups 16(%esi),%xmm3
1675 movups 32(%esi),%xmm4
1676 leal 48(%esi),%esi
1677 xorps %xmm5,%xmm2
1678 xorps %xmm6,%xmm3
1679 xorps %xmm7,%xmm4
1680 call _aesni_decrypt3
1681 xorps %xmm5,%xmm2
1682 xorps %xmm6,%xmm3
1683 xorps %xmm7,%xmm4
1684 movups %xmm2,(%edi)
1685 movups %xmm3,16(%edi)
1686 movups %xmm4,32(%edi)
1687 leal 48(%edi),%edi
1688 movdqa %xmm7,%xmm1
1689 jmp .L067xts_dec_done
1690.align 16
1691.L066xts_dec_four:
1692 movaps %xmm1,%xmm6
1693 movups (%esi),%xmm2
1694 movups 16(%esi),%xmm3
1695 movups 32(%esi),%xmm4
1696 xorps (%esp),%xmm2
1697 movups 48(%esi),%xmm5
1698 leal 64(%esi),%esi
1699 xorps 16(%esp),%xmm3
1700 xorps %xmm7,%xmm4
1701 xorps %xmm6,%xmm5
1702 call _aesni_decrypt4
1703 xorps (%esp),%xmm2
1704 xorps 16(%esp),%xmm3
1705 xorps %xmm7,%xmm4
1706 movups %xmm2,(%edi)
1707 xorps %xmm6,%xmm5
1708 movups %xmm3,16(%edi)
1709 movups %xmm4,32(%edi)
1710 movups %xmm5,48(%edi)
1711 leal 64(%edi),%edi
1712 movdqa %xmm6,%xmm1
1713 jmp .L067xts_dec_done
1714.align 16
1715.L062xts_dec_done6x:
1716 movl 112(%esp),%eax
1717 andl $15,%eax
1718 jz .L069xts_dec_ret
1719 movl %eax,112(%esp)
1720 jmp .L070xts_dec_only_one_more
1721.align 16
1722.L067xts_dec_done:
1723 movl 112(%esp),%eax
1724 pxor %xmm0,%xmm0
1725 andl $15,%eax
1726 jz .L069xts_dec_ret
1727 pcmpgtd %xmm1,%xmm0
1728 movl %eax,112(%esp)
1729 pshufd $19,%xmm0,%xmm2
1730 pxor %xmm0,%xmm0
1731 movdqa 96(%esp),%xmm3
1732 paddq %xmm1,%xmm1
1733 pand %xmm3,%xmm2
1734 pcmpgtd %xmm1,%xmm0
1735 pxor %xmm2,%xmm1
1736.L070xts_dec_only_one_more:
1737 pshufd $19,%xmm0,%xmm5
1738 movdqa %xmm1,%xmm6
1739 paddq %xmm1,%xmm1
1740 pand %xmm3,%xmm5
1741 pxor %xmm1,%xmm5
1742 movl %ebp,%edx
1743 movl %ebx,%ecx
1744 movups (%esi),%xmm2
1745 xorps %xmm5,%xmm2
1746 movups (%edx),%xmm0
1747 movups 16(%edx),%xmm1
1748 leal 32(%edx),%edx
1749 xorps %xmm0,%xmm2
1750.L071dec1_loop_13:
1751.byte 102,15,56,222,209
1752 decl %ecx
1753 movups (%edx),%xmm1
1754 leal 16(%edx),%edx
1755 jnz .L071dec1_loop_13
1756.byte 102,15,56,223,209
1757 xorps %xmm5,%xmm2
1758 movups %xmm2,(%edi)
1759.L072xts_dec_steal:
1760 movzbl 16(%esi),%ecx
1761 movzbl (%edi),%edx
1762 leal 1(%esi),%esi
1763 movb %cl,(%edi)
1764 movb %dl,16(%edi)
1765 leal 1(%edi),%edi
1766 subl $1,%eax
1767 jnz .L072xts_dec_steal
1768 subl 112(%esp),%edi
1769 movl %ebp,%edx
1770 movl %ebx,%ecx
1771 movups (%edi),%xmm2
1772 xorps %xmm6,%xmm2
1773 movups (%edx),%xmm0
1774 movups 16(%edx),%xmm1
1775 leal 32(%edx),%edx
1776 xorps %xmm0,%xmm2
1777.L073dec1_loop_14:
1778.byte 102,15,56,222,209
1779 decl %ecx
1780 movups (%edx),%xmm1
1781 leal 16(%edx),%edx
1782 jnz .L073dec1_loop_14
1783.byte 102,15,56,223,209
1784 xorps %xmm6,%xmm2
1785 movups %xmm2,(%edi)
1786.L069xts_dec_ret:
1787 pxor %xmm0,%xmm0
1788 pxor %xmm1,%xmm1
1789 pxor %xmm2,%xmm2
1790 movdqa %xmm0,(%esp)
1791 pxor %xmm3,%xmm3
1792 movdqa %xmm0,16(%esp)
1793 pxor %xmm4,%xmm4
1794 movdqa %xmm0,32(%esp)
1795 pxor %xmm5,%xmm5
1796 movdqa %xmm0,48(%esp)
1797 pxor %xmm6,%xmm6
1798 movdqa %xmm0,64(%esp)
1799 pxor %xmm7,%xmm7
1800 movdqa %xmm0,80(%esp)
1801 movl 116(%esp),%esp
1802 popl %edi
1803 popl %esi
1804 popl %ebx
1805 popl %ebp
1806 ret
1807.size aesni_xts_decrypt,.-.L_aesni_xts_decrypt_begin
1808.globl aesni_ocb_encrypt
1809.type aesni_ocb_encrypt,@function
1810.align 16
1811aesni_ocb_encrypt:
1812.L_aesni_ocb_encrypt_begin:
1813.byte 243,15,30,251
1814 pushl %ebp
1815 pushl %ebx
1816 pushl %esi
1817 pushl %edi
1818 movl 40(%esp),%ecx
1819 movl 48(%esp),%ebx
1820 movl 20(%esp),%esi
1821 movl 24(%esp),%edi
1822 movl 28(%esp),%eax
1823 movl 32(%esp),%edx
1824 movdqu (%ecx),%xmm0
1825 movl 36(%esp),%ebp
1826 movdqu (%ebx),%xmm1
1827 movl 44(%esp),%ebx
1828 movl %esp,%ecx
1829 subl $132,%esp
1830 andl $-16,%esp
1831 subl %esi,%edi
1832 shll $4,%eax
1833 leal -96(%esi,%eax,1),%eax
1834 movl %edi,120(%esp)
1835 movl %eax,124(%esp)
1836 movl %ecx,128(%esp)
1837 movl 240(%edx),%ecx
1838 testl $1,%ebp
1839 jnz .L074odd
1840 bsfl %ebp,%eax
1841 addl $1,%ebp
1842 shll $4,%eax
1843 movdqu (%ebx,%eax,1),%xmm7
1844 movl %edx,%eax
1845 movdqu (%esi),%xmm2
1846 leal 16(%esi),%esi
1847 pxor %xmm0,%xmm7
1848 pxor %xmm2,%xmm1
1849 pxor %xmm7,%xmm2
1850 movdqa %xmm1,%xmm6
1851 movups (%edx),%xmm0
1852 movups 16(%edx),%xmm1
1853 leal 32(%edx),%edx
1854 xorps %xmm0,%xmm2
1855.L075enc1_loop_15:
1856.byte 102,15,56,220,209
1857 decl %ecx
1858 movups (%edx),%xmm1
1859 leal 16(%edx),%edx
1860 jnz .L075enc1_loop_15
1861.byte 102,15,56,221,209
1862 xorps %xmm7,%xmm2
1863 movdqa %xmm7,%xmm0
1864 movdqa %xmm6,%xmm1
1865 movups %xmm2,-16(%edi,%esi,1)
1866 movl 240(%eax),%ecx
1867 movl %eax,%edx
1868 movl 124(%esp),%eax
1869.L074odd:
1870 shll $4,%ecx
1871 movl $16,%edi
1872 subl %ecx,%edi
1873 movl %edx,112(%esp)
1874 leal 32(%edx,%ecx,1),%edx
1875 movl %edi,116(%esp)
1876 cmpl %eax,%esi
1877 ja .L076short
1878 jmp .L077grandloop
1879.align 32
1880.L077grandloop:
1881 leal 1(%ebp),%ecx
1882 leal 3(%ebp),%eax
1883 leal 5(%ebp),%edi
1884 addl $6,%ebp
1885 bsfl %ecx,%ecx
1886 bsfl %eax,%eax
1887 bsfl %edi,%edi
1888 shll $4,%ecx
1889 shll $4,%eax
1890 shll $4,%edi
1891 movdqu (%ebx),%xmm2
1892 movdqu (%ebx,%ecx,1),%xmm3
1893 movl 116(%esp),%ecx
1894 movdqa %xmm2,%xmm4
1895 movdqu (%ebx,%eax,1),%xmm5
1896 movdqa %xmm2,%xmm6
1897 movdqu (%ebx,%edi,1),%xmm7
1898 pxor %xmm0,%xmm2
1899 pxor %xmm2,%xmm3
1900 movdqa %xmm2,(%esp)
1901 pxor %xmm3,%xmm4
1902 movdqa %xmm3,16(%esp)
1903 pxor %xmm4,%xmm5
1904 movdqa %xmm4,32(%esp)
1905 pxor %xmm5,%xmm6
1906 movdqa %xmm5,48(%esp)
1907 pxor %xmm6,%xmm7
1908 movdqa %xmm6,64(%esp)
1909 movdqa %xmm7,80(%esp)
1910 movups -48(%edx,%ecx,1),%xmm0
1911 movdqu (%esi),%xmm2
1912 movdqu 16(%esi),%xmm3
1913 movdqu 32(%esi),%xmm4
1914 movdqu 48(%esi),%xmm5
1915 movdqu 64(%esi),%xmm6
1916 movdqu 80(%esi),%xmm7
1917 leal 96(%esi),%esi
1918 pxor %xmm2,%xmm1
1919 pxor %xmm0,%xmm2
1920 pxor %xmm3,%xmm1
1921 pxor %xmm0,%xmm3
1922 pxor %xmm4,%xmm1
1923 pxor %xmm0,%xmm4
1924 pxor %xmm5,%xmm1
1925 pxor %xmm0,%xmm5
1926 pxor %xmm6,%xmm1
1927 pxor %xmm0,%xmm6
1928 pxor %xmm7,%xmm1
1929 pxor %xmm0,%xmm7
1930 movdqa %xmm1,96(%esp)
1931 movups -32(%edx,%ecx,1),%xmm1
1932 pxor (%esp),%xmm2
1933 pxor 16(%esp),%xmm3
1934 pxor 32(%esp),%xmm4
1935 pxor 48(%esp),%xmm5
1936 pxor 64(%esp),%xmm6
1937 pxor 80(%esp),%xmm7
1938 movups -16(%edx,%ecx,1),%xmm0
1939.byte 102,15,56,220,209
1940.byte 102,15,56,220,217
1941.byte 102,15,56,220,225
1942.byte 102,15,56,220,233
1943.byte 102,15,56,220,241
1944.byte 102,15,56,220,249
1945 movl 120(%esp),%edi
1946 movl 124(%esp),%eax
1947 call .L_aesni_encrypt6_enter
1948 movdqa 80(%esp),%xmm0
1949 pxor (%esp),%xmm2
1950 pxor 16(%esp),%xmm3
1951 pxor 32(%esp),%xmm4
1952 pxor 48(%esp),%xmm5
1953 pxor 64(%esp),%xmm6
1954 pxor %xmm0,%xmm7
1955 movdqa 96(%esp),%xmm1
1956 movdqu %xmm2,-96(%edi,%esi,1)
1957 movdqu %xmm3,-80(%edi,%esi,1)
1958 movdqu %xmm4,-64(%edi,%esi,1)
1959 movdqu %xmm5,-48(%edi,%esi,1)
1960 movdqu %xmm6,-32(%edi,%esi,1)
1961 movdqu %xmm7,-16(%edi,%esi,1)
1962 cmpl %eax,%esi
1963 jb .L077grandloop
1964.L076short:
1965 addl $96,%eax
1966 subl %esi,%eax
1967 jz .L078done
1968 cmpl $32,%eax
1969 jb .L079one
1970 je .L080two
1971 cmpl $64,%eax
1972 jb .L081three
1973 je .L082four
1974 leal 1(%ebp),%ecx
1975 leal 3(%ebp),%eax
1976 bsfl %ecx,%ecx
1977 bsfl %eax,%eax
1978 shll $4,%ecx
1979 shll $4,%eax
1980 movdqu (%ebx),%xmm2
1981 movdqu (%ebx,%ecx,1),%xmm3
1982 movl 116(%esp),%ecx
1983 movdqa %xmm2,%xmm4
1984 movdqu (%ebx,%eax,1),%xmm5
1985 movdqa %xmm2,%xmm6
1986 pxor %xmm0,%xmm2
1987 pxor %xmm2,%xmm3
1988 movdqa %xmm2,(%esp)
1989 pxor %xmm3,%xmm4
1990 movdqa %xmm3,16(%esp)
1991 pxor %xmm4,%xmm5
1992 movdqa %xmm4,32(%esp)
1993 pxor %xmm5,%xmm6
1994 movdqa %xmm5,48(%esp)
1995 pxor %xmm6,%xmm7
1996 movdqa %xmm6,64(%esp)
1997 movups -48(%edx,%ecx,1),%xmm0
1998 movdqu (%esi),%xmm2
1999 movdqu 16(%esi),%xmm3
2000 movdqu 32(%esi),%xmm4
2001 movdqu 48(%esi),%xmm5
2002 movdqu 64(%esi),%xmm6
2003 pxor %xmm7,%xmm7
2004 pxor %xmm2,%xmm1
2005 pxor %xmm0,%xmm2
2006 pxor %xmm3,%xmm1
2007 pxor %xmm0,%xmm3
2008 pxor %xmm4,%xmm1
2009 pxor %xmm0,%xmm4
2010 pxor %xmm5,%xmm1
2011 pxor %xmm0,%xmm5
2012 pxor %xmm6,%xmm1
2013 pxor %xmm0,%xmm6
2014 movdqa %xmm1,96(%esp)
2015 movups -32(%edx,%ecx,1),%xmm1
2016 pxor (%esp),%xmm2
2017 pxor 16(%esp),%xmm3
2018 pxor 32(%esp),%xmm4
2019 pxor 48(%esp),%xmm5
2020 pxor 64(%esp),%xmm6
2021 movups -16(%edx,%ecx,1),%xmm0
2022.byte 102,15,56,220,209
2023.byte 102,15,56,220,217
2024.byte 102,15,56,220,225
2025.byte 102,15,56,220,233
2026.byte 102,15,56,220,241
2027.byte 102,15,56,220,249
2028 movl 120(%esp),%edi
2029 call .L_aesni_encrypt6_enter
2030 movdqa 64(%esp),%xmm0
2031 pxor (%esp),%xmm2
2032 pxor 16(%esp),%xmm3
2033 pxor 32(%esp),%xmm4
2034 pxor 48(%esp),%xmm5
2035 pxor %xmm0,%xmm6
2036 movdqa 96(%esp),%xmm1
2037 movdqu %xmm2,(%edi,%esi,1)
2038 movdqu %xmm3,16(%edi,%esi,1)
2039 movdqu %xmm4,32(%edi,%esi,1)
2040 movdqu %xmm5,48(%edi,%esi,1)
2041 movdqu %xmm6,64(%edi,%esi,1)
2042 jmp .L078done
2043.align 16
2044.L079one:
2045 movdqu (%ebx),%xmm7
2046 movl 112(%esp),%edx
2047 movdqu (%esi),%xmm2
2048 movl 240(%edx),%ecx
2049 pxor %xmm0,%xmm7
2050 pxor %xmm2,%xmm1
2051 pxor %xmm7,%xmm2
2052 movdqa %xmm1,%xmm6
2053 movl 120(%esp),%edi
2054 movups (%edx),%xmm0
2055 movups 16(%edx),%xmm1
2056 leal 32(%edx),%edx
2057 xorps %xmm0,%xmm2
2058.L083enc1_loop_16:
2059.byte 102,15,56,220,209
2060 decl %ecx
2061 movups (%edx),%xmm1
2062 leal 16(%edx),%edx
2063 jnz .L083enc1_loop_16
2064.byte 102,15,56,221,209
2065 xorps %xmm7,%xmm2
2066 movdqa %xmm7,%xmm0
2067 movdqa %xmm6,%xmm1
2068 movups %xmm2,(%edi,%esi,1)
2069 jmp .L078done
2070.align 16
2071.L080two:
2072 leal 1(%ebp),%ecx
2073 movl 112(%esp),%edx
2074 bsfl %ecx,%ecx
2075 shll $4,%ecx
2076 movdqu (%ebx),%xmm6
2077 movdqu (%ebx,%ecx,1),%xmm7
2078 movdqu (%esi),%xmm2
2079 movdqu 16(%esi),%xmm3
2080 movl 240(%edx),%ecx
2081 pxor %xmm0,%xmm6
2082 pxor %xmm6,%xmm7
2083 pxor %xmm2,%xmm1
2084 pxor %xmm6,%xmm2
2085 pxor %xmm3,%xmm1
2086 pxor %xmm7,%xmm3
2087 movdqa %xmm1,%xmm5
2088 movl 120(%esp),%edi
2089 call _aesni_encrypt2
2090 xorps %xmm6,%xmm2
2091 xorps %xmm7,%xmm3
2092 movdqa %xmm7,%xmm0
2093 movdqa %xmm5,%xmm1
2094 movups %xmm2,(%edi,%esi,1)
2095 movups %xmm3,16(%edi,%esi,1)
2096 jmp .L078done
2097.align 16
2098.L081three:
2099 leal 1(%ebp),%ecx
2100 movl 112(%esp),%edx
2101 bsfl %ecx,%ecx
2102 shll $4,%ecx
2103 movdqu (%ebx),%xmm5
2104 movdqu (%ebx,%ecx,1),%xmm6
2105 movdqa %xmm5,%xmm7
2106 movdqu (%esi),%xmm2
2107 movdqu 16(%esi),%xmm3
2108 movdqu 32(%esi),%xmm4
2109 movl 240(%edx),%ecx
2110 pxor %xmm0,%xmm5
2111 pxor %xmm5,%xmm6
2112 pxor %xmm6,%xmm7
2113 pxor %xmm2,%xmm1
2114 pxor %xmm5,%xmm2
2115 pxor %xmm3,%xmm1
2116 pxor %xmm6,%xmm3
2117 pxor %xmm4,%xmm1
2118 pxor %xmm7,%xmm4
2119 movdqa %xmm1,96(%esp)
2120 movl 120(%esp),%edi
2121 call _aesni_encrypt3
2122 xorps %xmm5,%xmm2
2123 xorps %xmm6,%xmm3
2124 xorps %xmm7,%xmm4
2125 movdqa %xmm7,%xmm0
2126 movdqa 96(%esp),%xmm1
2127 movups %xmm2,(%edi,%esi,1)
2128 movups %xmm3,16(%edi,%esi,1)
2129 movups %xmm4,32(%edi,%esi,1)
2130 jmp .L078done
2131.align 16
2132.L082four:
2133 leal 1(%ebp),%ecx
2134 leal 3(%ebp),%eax
2135 bsfl %ecx,%ecx
2136 bsfl %eax,%eax
2137 movl 112(%esp),%edx
2138 shll $4,%ecx
2139 shll $4,%eax
2140 movdqu (%ebx),%xmm4
2141 movdqu (%ebx,%ecx,1),%xmm5
2142 movdqa %xmm4,%xmm6
2143 movdqu (%ebx,%eax,1),%xmm7
2144 pxor %xmm0,%xmm4
2145 movdqu (%esi),%xmm2
2146 pxor %xmm4,%xmm5
2147 movdqu 16(%esi),%xmm3
2148 pxor %xmm5,%xmm6
2149 movdqa %xmm4,(%esp)
2150 pxor %xmm6,%xmm7
2151 movdqa %xmm5,16(%esp)
2152 movdqu 32(%esi),%xmm4
2153 movdqu 48(%esi),%xmm5
2154 movl 240(%edx),%ecx
2155 pxor %xmm2,%xmm1
2156 pxor (%esp),%xmm2
2157 pxor %xmm3,%xmm1
2158 pxor 16(%esp),%xmm3
2159 pxor %xmm4,%xmm1
2160 pxor %xmm6,%xmm4
2161 pxor %xmm5,%xmm1
2162 pxor %xmm7,%xmm5
2163 movdqa %xmm1,96(%esp)
2164 movl 120(%esp),%edi
2165 call _aesni_encrypt4
2166 xorps (%esp),%xmm2
2167 xorps 16(%esp),%xmm3
2168 xorps %xmm6,%xmm4
2169 movups %xmm2,(%edi,%esi,1)
2170 xorps %xmm7,%xmm5
2171 movups %xmm3,16(%edi,%esi,1)
2172 movdqa %xmm7,%xmm0
2173 movups %xmm4,32(%edi,%esi,1)
2174 movdqa 96(%esp),%xmm1
2175 movups %xmm5,48(%edi,%esi,1)
2176.L078done:
2177 movl 128(%esp),%edx
2178 pxor %xmm2,%xmm2
2179 pxor %xmm3,%xmm3
2180 movdqa %xmm2,(%esp)
2181 pxor %xmm4,%xmm4
2182 movdqa %xmm2,16(%esp)
2183 pxor %xmm5,%xmm5
2184 movdqa %xmm2,32(%esp)
2185 pxor %xmm6,%xmm6
2186 movdqa %xmm2,48(%esp)
2187 pxor %xmm7,%xmm7
2188 movdqa %xmm2,64(%esp)
2189 movdqa %xmm2,80(%esp)
2190 movdqa %xmm2,96(%esp)
2191 leal (%edx),%esp
2192 movl 40(%esp),%ecx
2193 movl 48(%esp),%ebx
2194 movdqu %xmm0,(%ecx)
2195 pxor %xmm0,%xmm0
2196 movdqu %xmm1,(%ebx)
2197 pxor %xmm1,%xmm1
2198 popl %edi
2199 popl %esi
2200 popl %ebx
2201 popl %ebp
2202 ret
2203.size aesni_ocb_encrypt,.-.L_aesni_ocb_encrypt_begin
2204.globl aesni_ocb_decrypt
2205.type aesni_ocb_decrypt,@function
2206.align 16
2207aesni_ocb_decrypt:
2208.L_aesni_ocb_decrypt_begin:
2209.byte 243,15,30,251
2210 pushl %ebp
2211 pushl %ebx
2212 pushl %esi
2213 pushl %edi
2214 movl 40(%esp),%ecx
2215 movl 48(%esp),%ebx
2216 movl 20(%esp),%esi
2217 movl 24(%esp),%edi
2218 movl 28(%esp),%eax
2219 movl 32(%esp),%edx
2220 movdqu (%ecx),%xmm0
2221 movl 36(%esp),%ebp
2222 movdqu (%ebx),%xmm1
2223 movl 44(%esp),%ebx
2224 movl %esp,%ecx
2225 subl $132,%esp
2226 andl $-16,%esp
2227 subl %esi,%edi
2228 shll $4,%eax
2229 leal -96(%esi,%eax,1),%eax
2230 movl %edi,120(%esp)
2231 movl %eax,124(%esp)
2232 movl %ecx,128(%esp)
2233 movl 240(%edx),%ecx
2234 testl $1,%ebp
2235 jnz .L084odd
2236 bsfl %ebp,%eax
2237 addl $1,%ebp
2238 shll $4,%eax
2239 movdqu (%ebx,%eax,1),%xmm7
2240 movl %edx,%eax
2241 movdqu (%esi),%xmm2
2242 leal 16(%esi),%esi
2243 pxor %xmm0,%xmm7
2244 pxor %xmm7,%xmm2
2245 movdqa %xmm1,%xmm6
2246 movups (%edx),%xmm0
2247 movups 16(%edx),%xmm1
2248 leal 32(%edx),%edx
2249 xorps %xmm0,%xmm2
2250.L085dec1_loop_17:
2251.byte 102,15,56,222,209
2252 decl %ecx
2253 movups (%edx),%xmm1
2254 leal 16(%edx),%edx
2255 jnz .L085dec1_loop_17
2256.byte 102,15,56,223,209
2257 xorps %xmm7,%xmm2
2258 movaps %xmm6,%xmm1
2259 movdqa %xmm7,%xmm0
2260 xorps %xmm2,%xmm1
2261 movups %xmm2,-16(%edi,%esi,1)
2262 movl 240(%eax),%ecx
2263 movl %eax,%edx
2264 movl 124(%esp),%eax
2265.L084odd:
2266 shll $4,%ecx
2267 movl $16,%edi
2268 subl %ecx,%edi
2269 movl %edx,112(%esp)
2270 leal 32(%edx,%ecx,1),%edx
2271 movl %edi,116(%esp)
2272 cmpl %eax,%esi
2273 ja .L086short
2274 jmp .L087grandloop
2275.align 32
2276.L087grandloop:
2277 leal 1(%ebp),%ecx
2278 leal 3(%ebp),%eax
2279 leal 5(%ebp),%edi
2280 addl $6,%ebp
2281 bsfl %ecx,%ecx
2282 bsfl %eax,%eax
2283 bsfl %edi,%edi
2284 shll $4,%ecx
2285 shll $4,%eax
2286 shll $4,%edi
2287 movdqu (%ebx),%xmm2
2288 movdqu (%ebx,%ecx,1),%xmm3
2289 movl 116(%esp),%ecx
2290 movdqa %xmm2,%xmm4
2291 movdqu (%ebx,%eax,1),%xmm5
2292 movdqa %xmm2,%xmm6
2293 movdqu (%ebx,%edi,1),%xmm7
2294 pxor %xmm0,%xmm2
2295 pxor %xmm2,%xmm3
2296 movdqa %xmm2,(%esp)
2297 pxor %xmm3,%xmm4
2298 movdqa %xmm3,16(%esp)
2299 pxor %xmm4,%xmm5
2300 movdqa %xmm4,32(%esp)
2301 pxor %xmm5,%xmm6
2302 movdqa %xmm5,48(%esp)
2303 pxor %xmm6,%xmm7
2304 movdqa %xmm6,64(%esp)
2305 movdqa %xmm7,80(%esp)
2306 movups -48(%edx,%ecx,1),%xmm0
2307 movdqu (%esi),%xmm2
2308 movdqu 16(%esi),%xmm3
2309 movdqu 32(%esi),%xmm4
2310 movdqu 48(%esi),%xmm5
2311 movdqu 64(%esi),%xmm6
2312 movdqu 80(%esi),%xmm7
2313 leal 96(%esi),%esi
2314 movdqa %xmm1,96(%esp)
2315 pxor %xmm0,%xmm2
2316 pxor %xmm0,%xmm3
2317 pxor %xmm0,%xmm4
2318 pxor %xmm0,%xmm5
2319 pxor %xmm0,%xmm6
2320 pxor %xmm0,%xmm7
2321 movups -32(%edx,%ecx,1),%xmm1
2322 pxor (%esp),%xmm2
2323 pxor 16(%esp),%xmm3
2324 pxor 32(%esp),%xmm4
2325 pxor 48(%esp),%xmm5
2326 pxor 64(%esp),%xmm6
2327 pxor 80(%esp),%xmm7
2328 movups -16(%edx,%ecx,1),%xmm0
2329.byte 102,15,56,222,209
2330.byte 102,15,56,222,217
2331.byte 102,15,56,222,225
2332.byte 102,15,56,222,233
2333.byte 102,15,56,222,241
2334.byte 102,15,56,222,249
2335 movl 120(%esp),%edi
2336 movl 124(%esp),%eax
2337 call .L_aesni_decrypt6_enter
2338 movdqa 80(%esp),%xmm0
2339 pxor (%esp),%xmm2
2340 movdqa 96(%esp),%xmm1
2341 pxor 16(%esp),%xmm3
2342 pxor 32(%esp),%xmm4
2343 pxor 48(%esp),%xmm5
2344 pxor 64(%esp),%xmm6
2345 pxor %xmm0,%xmm7
2346 pxor %xmm2,%xmm1
2347 movdqu %xmm2,-96(%edi,%esi,1)
2348 pxor %xmm3,%xmm1
2349 movdqu %xmm3,-80(%edi,%esi,1)
2350 pxor %xmm4,%xmm1
2351 movdqu %xmm4,-64(%edi,%esi,1)
2352 pxor %xmm5,%xmm1
2353 movdqu %xmm5,-48(%edi,%esi,1)
2354 pxor %xmm6,%xmm1
2355 movdqu %xmm6,-32(%edi,%esi,1)
2356 pxor %xmm7,%xmm1
2357 movdqu %xmm7,-16(%edi,%esi,1)
2358 cmpl %eax,%esi
2359 jb .L087grandloop
2360.L086short:
2361 addl $96,%eax
2362 subl %esi,%eax
2363 jz .L088done
2364 cmpl $32,%eax
2365 jb .L089one
2366 je .L090two
2367 cmpl $64,%eax
2368 jb .L091three
2369 je .L092four
2370 leal 1(%ebp),%ecx
2371 leal 3(%ebp),%eax
2372 bsfl %ecx,%ecx
2373 bsfl %eax,%eax
2374 shll $4,%ecx
2375 shll $4,%eax
2376 movdqu (%ebx),%xmm2
2377 movdqu (%ebx,%ecx,1),%xmm3
2378 movl 116(%esp),%ecx
2379 movdqa %xmm2,%xmm4
2380 movdqu (%ebx,%eax,1),%xmm5
2381 movdqa %xmm2,%xmm6
2382 pxor %xmm0,%xmm2
2383 pxor %xmm2,%xmm3
2384 movdqa %xmm2,(%esp)
2385 pxor %xmm3,%xmm4
2386 movdqa %xmm3,16(%esp)
2387 pxor %xmm4,%xmm5
2388 movdqa %xmm4,32(%esp)
2389 pxor %xmm5,%xmm6
2390 movdqa %xmm5,48(%esp)
2391 pxor %xmm6,%xmm7
2392 movdqa %xmm6,64(%esp)
2393 movups -48(%edx,%ecx,1),%xmm0
2394 movdqu (%esi),%xmm2
2395 movdqu 16(%esi),%xmm3
2396 movdqu 32(%esi),%xmm4
2397 movdqu 48(%esi),%xmm5
2398 movdqu 64(%esi),%xmm6
2399 pxor %xmm7,%xmm7
2400 movdqa %xmm1,96(%esp)
2401 pxor %xmm0,%xmm2
2402 pxor %xmm0,%xmm3
2403 pxor %xmm0,%xmm4
2404 pxor %xmm0,%xmm5
2405 pxor %xmm0,%xmm6
2406 movups -32(%edx,%ecx,1),%xmm1
2407 pxor (%esp),%xmm2
2408 pxor 16(%esp),%xmm3
2409 pxor 32(%esp),%xmm4
2410 pxor 48(%esp),%xmm5
2411 pxor 64(%esp),%xmm6
2412 movups -16(%edx,%ecx,1),%xmm0
2413.byte 102,15,56,222,209
2414.byte 102,15,56,222,217
2415.byte 102,15,56,222,225
2416.byte 102,15,56,222,233
2417.byte 102,15,56,222,241
2418.byte 102,15,56,222,249
2419 movl 120(%esp),%edi
2420 call .L_aesni_decrypt6_enter
2421 movdqa 64(%esp),%xmm0
2422 pxor (%esp),%xmm2
2423 movdqa 96(%esp),%xmm1
2424 pxor 16(%esp),%xmm3
2425 pxor 32(%esp),%xmm4
2426 pxor 48(%esp),%xmm5
2427 pxor %xmm0,%xmm6
2428 pxor %xmm2,%xmm1
2429 movdqu %xmm2,(%edi,%esi,1)
2430 pxor %xmm3,%xmm1
2431 movdqu %xmm3,16(%edi,%esi,1)
2432 pxor %xmm4,%xmm1
2433 movdqu %xmm4,32(%edi,%esi,1)
2434 pxor %xmm5,%xmm1
2435 movdqu %xmm5,48(%edi,%esi,1)
2436 pxor %xmm6,%xmm1
2437 movdqu %xmm6,64(%edi,%esi,1)
2438 jmp .L088done
2439.align 16
2440.L089one:
2441 movdqu (%ebx),%xmm7
2442 movl 112(%esp),%edx
2443 movdqu (%esi),%xmm2
2444 movl 240(%edx),%ecx
2445 pxor %xmm0,%xmm7
2446 pxor %xmm7,%xmm2
2447 movdqa %xmm1,%xmm6
2448 movl 120(%esp),%edi
2449 movups (%edx),%xmm0
2450 movups 16(%edx),%xmm1
2451 leal 32(%edx),%edx
2452 xorps %xmm0,%xmm2
2453.L093dec1_loop_18:
2454.byte 102,15,56,222,209
2455 decl %ecx
2456 movups (%edx),%xmm1
2457 leal 16(%edx),%edx
2458 jnz .L093dec1_loop_18
2459.byte 102,15,56,223,209
2460 xorps %xmm7,%xmm2
2461 movaps %xmm6,%xmm1
2462 movdqa %xmm7,%xmm0
2463 xorps %xmm2,%xmm1
2464 movups %xmm2,(%edi,%esi,1)
2465 jmp .L088done
2466.align 16
2467.L090two:
2468 leal 1(%ebp),%ecx
2469 movl 112(%esp),%edx
2470 bsfl %ecx,%ecx
2471 shll $4,%ecx
2472 movdqu (%ebx),%xmm6
2473 movdqu (%ebx,%ecx,1),%xmm7
2474 movdqu (%esi),%xmm2
2475 movdqu 16(%esi),%xmm3
2476 movl 240(%edx),%ecx
2477 movdqa %xmm1,%xmm5
2478 pxor %xmm0,%xmm6
2479 pxor %xmm6,%xmm7
2480 pxor %xmm6,%xmm2
2481 pxor %xmm7,%xmm3
2482 movl 120(%esp),%edi
2483 call _aesni_decrypt2
2484 xorps %xmm6,%xmm2
2485 xorps %xmm7,%xmm3
2486 movdqa %xmm7,%xmm0
2487 xorps %xmm2,%xmm5
2488 movups %xmm2,(%edi,%esi,1)
2489 xorps %xmm3,%xmm5
2490 movups %xmm3,16(%edi,%esi,1)
2491 movaps %xmm5,%xmm1
2492 jmp .L088done
2493.align 16
2494.L091three:
2495 leal 1(%ebp),%ecx
2496 movl 112(%esp),%edx
2497 bsfl %ecx,%ecx
2498 shll $4,%ecx
2499 movdqu (%ebx),%xmm5
2500 movdqu (%ebx,%ecx,1),%xmm6
2501 movdqa %xmm5,%xmm7
2502 movdqu (%esi),%xmm2
2503 movdqu 16(%esi),%xmm3
2504 movdqu 32(%esi),%xmm4
2505 movl 240(%edx),%ecx
2506 movdqa %xmm1,96(%esp)
2507 pxor %xmm0,%xmm5
2508 pxor %xmm5,%xmm6
2509 pxor %xmm6,%xmm7
2510 pxor %xmm5,%xmm2
2511 pxor %xmm6,%xmm3
2512 pxor %xmm7,%xmm4
2513 movl 120(%esp),%edi
2514 call _aesni_decrypt3
2515 movdqa 96(%esp),%xmm1
2516 xorps %xmm5,%xmm2
2517 xorps %xmm6,%xmm3
2518 xorps %xmm7,%xmm4
2519 movups %xmm2,(%edi,%esi,1)
2520 pxor %xmm2,%xmm1
2521 movdqa %xmm7,%xmm0
2522 movups %xmm3,16(%edi,%esi,1)
2523 pxor %xmm3,%xmm1
2524 movups %xmm4,32(%edi,%esi,1)
2525 pxor %xmm4,%xmm1
2526 jmp .L088done
2527.align 16
2528.L092four:
2529 leal 1(%ebp),%ecx
2530 leal 3(%ebp),%eax
2531 bsfl %ecx,%ecx
2532 bsfl %eax,%eax
2533 movl 112(%esp),%edx
2534 shll $4,%ecx
2535 shll $4,%eax
2536 movdqu (%ebx),%xmm4
2537 movdqu (%ebx,%ecx,1),%xmm5
2538 movdqa %xmm4,%xmm6
2539 movdqu (%ebx,%eax,1),%xmm7
2540 pxor %xmm0,%xmm4
2541 movdqu (%esi),%xmm2
2542 pxor %xmm4,%xmm5
2543 movdqu 16(%esi),%xmm3
2544 pxor %xmm5,%xmm6
2545 movdqa %xmm4,(%esp)
2546 pxor %xmm6,%xmm7
2547 movdqa %xmm5,16(%esp)
2548 movdqu 32(%esi),%xmm4
2549 movdqu 48(%esi),%xmm5
2550 movl 240(%edx),%ecx
2551 movdqa %xmm1,96(%esp)
2552 pxor (%esp),%xmm2
2553 pxor 16(%esp),%xmm3
2554 pxor %xmm6,%xmm4
2555 pxor %xmm7,%xmm5
2556 movl 120(%esp),%edi
2557 call _aesni_decrypt4
2558 movdqa 96(%esp),%xmm1
2559 xorps (%esp),%xmm2
2560 xorps 16(%esp),%xmm3
2561 xorps %xmm6,%xmm4
2562 movups %xmm2,(%edi,%esi,1)
2563 pxor %xmm2,%xmm1
2564 xorps %xmm7,%xmm5
2565 movups %xmm3,16(%edi,%esi,1)
2566 pxor %xmm3,%xmm1
2567 movdqa %xmm7,%xmm0
2568 movups %xmm4,32(%edi,%esi,1)
2569 pxor %xmm4,%xmm1
2570 movups %xmm5,48(%edi,%esi,1)
2571 pxor %xmm5,%xmm1
2572.L088done:
2573 movl 128(%esp),%edx
2574 pxor %xmm2,%xmm2
2575 pxor %xmm3,%xmm3
2576 movdqa %xmm2,(%esp)
2577 pxor %xmm4,%xmm4
2578 movdqa %xmm2,16(%esp)
2579 pxor %xmm5,%xmm5
2580 movdqa %xmm2,32(%esp)
2581 pxor %xmm6,%xmm6
2582 movdqa %xmm2,48(%esp)
2583 pxor %xmm7,%xmm7
2584 movdqa %xmm2,64(%esp)
2585 movdqa %xmm2,80(%esp)
2586 movdqa %xmm2,96(%esp)
2587 leal (%edx),%esp
2588 movl 40(%esp),%ecx
2589 movl 48(%esp),%ebx
2590 movdqu %xmm0,(%ecx)
2591 pxor %xmm0,%xmm0
2592 movdqu %xmm1,(%ebx)
2593 pxor %xmm1,%xmm1
2594 popl %edi
2595 popl %esi
2596 popl %ebx
2597 popl %ebp
2598 ret
2599.size aesni_ocb_decrypt,.-.L_aesni_ocb_decrypt_begin
2600.globl aesni_cbc_encrypt
2601.type aesni_cbc_encrypt,@function
2602.align 16
2603aesni_cbc_encrypt:
2604.L_aesni_cbc_encrypt_begin:
2605.byte 243,15,30,251
2606 pushl %ebp
2607 pushl %ebx
2608 pushl %esi
2609 pushl %edi
2610 movl 20(%esp),%esi
2611 movl %esp,%ebx
2612 movl 24(%esp),%edi
2613 subl $24,%ebx
2614 movl 28(%esp),%eax
2615 andl $-16,%ebx
2616 movl 32(%esp),%edx
2617 movl 36(%esp),%ebp
2618 testl %eax,%eax
2619 jz .L094cbc_abort
2620 cmpl $0,40(%esp)
2621 xchgl %esp,%ebx
2622 movups (%ebp),%xmm7
2623 movl 240(%edx),%ecx
2624 movl %edx,%ebp
2625 movl %ebx,16(%esp)
2626 movl %ecx,%ebx
2627 je .L095cbc_decrypt
2628 movaps %xmm7,%xmm2
2629 cmpl $16,%eax
2630 jb .L096cbc_enc_tail
2631 subl $16,%eax
2632 jmp .L097cbc_enc_loop
2633.align 16
2634.L097cbc_enc_loop:
2635 movups (%esi),%xmm7
2636 leal 16(%esi),%esi
2637 movups (%edx),%xmm0
2638 movups 16(%edx),%xmm1
2639 xorps %xmm0,%xmm7
2640 leal 32(%edx),%edx
2641 xorps %xmm7,%xmm2
2642.L098enc1_loop_19:
2643.byte 102,15,56,220,209
2644 decl %ecx
2645 movups (%edx),%xmm1
2646 leal 16(%edx),%edx
2647 jnz .L098enc1_loop_19
2648.byte 102,15,56,221,209
2649 movl %ebx,%ecx
2650 movl %ebp,%edx
2651 movups %xmm2,(%edi)
2652 leal 16(%edi),%edi
2653 subl $16,%eax
2654 jnc .L097cbc_enc_loop
2655 addl $16,%eax
2656 jnz .L096cbc_enc_tail
2657 movaps %xmm2,%xmm7
2658 pxor %xmm2,%xmm2
2659 jmp .L099cbc_ret
2660.L096cbc_enc_tail:
2661 movl %eax,%ecx
2662.long 2767451785
2663 movl $16,%ecx
2664 subl %eax,%ecx
2665 xorl %eax,%eax
2666.long 2868115081
2667 leal -16(%edi),%edi
2668 movl %ebx,%ecx
2669 movl %edi,%esi
2670 movl %ebp,%edx
2671 jmp .L097cbc_enc_loop
2672.align 16
2673.L095cbc_decrypt:
2674 cmpl $80,%eax
2675 jbe .L100cbc_dec_tail
2676 movaps %xmm7,(%esp)
2677 subl $80,%eax
2678 jmp .L101cbc_dec_loop6_enter
2679.align 16
2680.L102cbc_dec_loop6:
2681 movaps %xmm0,(%esp)
2682 movups %xmm7,(%edi)
2683 leal 16(%edi),%edi
2684.L101cbc_dec_loop6_enter:
2685 movdqu (%esi),%xmm2
2686 movdqu 16(%esi),%xmm3
2687 movdqu 32(%esi),%xmm4
2688 movdqu 48(%esi),%xmm5
2689 movdqu 64(%esi),%xmm6
2690 movdqu 80(%esi),%xmm7
2691 call _aesni_decrypt6
2692 movups (%esi),%xmm1
2693 movups 16(%esi),%xmm0
2694 xorps (%esp),%xmm2
2695 xorps %xmm1,%xmm3
2696 movups 32(%esi),%xmm1
2697 xorps %xmm0,%xmm4
2698 movups 48(%esi),%xmm0
2699 xorps %xmm1,%xmm5
2700 movups 64(%esi),%xmm1
2701 xorps %xmm0,%xmm6
2702 movups 80(%esi),%xmm0
2703 xorps %xmm1,%xmm7
2704 movups %xmm2,(%edi)
2705 movups %xmm3,16(%edi)
2706 leal 96(%esi),%esi
2707 movups %xmm4,32(%edi)
2708 movl %ebx,%ecx
2709 movups %xmm5,48(%edi)
2710 movl %ebp,%edx
2711 movups %xmm6,64(%edi)
2712 leal 80(%edi),%edi
2713 subl $96,%eax
2714 ja .L102cbc_dec_loop6
2715 movaps %xmm7,%xmm2
2716 movaps %xmm0,%xmm7
2717 addl $80,%eax
2718 jle .L103cbc_dec_clear_tail_collected
2719 movups %xmm2,(%edi)
2720 leal 16(%edi),%edi
2721.L100cbc_dec_tail:
2722 movups (%esi),%xmm2
2723 movaps %xmm2,%xmm6
2724 cmpl $16,%eax
2725 jbe .L104cbc_dec_one
2726 movups 16(%esi),%xmm3
2727 movaps %xmm3,%xmm5
2728 cmpl $32,%eax
2729 jbe .L105cbc_dec_two
2730 movups 32(%esi),%xmm4
2731 cmpl $48,%eax
2732 jbe .L106cbc_dec_three
2733 movups 48(%esi),%xmm5
2734 cmpl $64,%eax
2735 jbe .L107cbc_dec_four
2736 movups 64(%esi),%xmm6
2737 movaps %xmm7,(%esp)
2738 movups (%esi),%xmm2
2739 xorps %xmm7,%xmm7
2740 call _aesni_decrypt6
2741 movups (%esi),%xmm1
2742 movups 16(%esi),%xmm0
2743 xorps (%esp),%xmm2
2744 xorps %xmm1,%xmm3
2745 movups 32(%esi),%xmm1
2746 xorps %xmm0,%xmm4
2747 movups 48(%esi),%xmm0
2748 xorps %xmm1,%xmm5
2749 movups 64(%esi),%xmm7
2750 xorps %xmm0,%xmm6
2751 movups %xmm2,(%edi)
2752 movups %xmm3,16(%edi)
2753 pxor %xmm3,%xmm3
2754 movups %xmm4,32(%edi)
2755 pxor %xmm4,%xmm4
2756 movups %xmm5,48(%edi)
2757 pxor %xmm5,%xmm5
2758 leal 64(%edi),%edi
2759 movaps %xmm6,%xmm2
2760 pxor %xmm6,%xmm6
2761 subl $80,%eax
2762 jmp .L108cbc_dec_tail_collected
2763.align 16
2764.L104cbc_dec_one:
2765 movups (%edx),%xmm0
2766 movups 16(%edx),%xmm1
2767 leal 32(%edx),%edx
2768 xorps %xmm0,%xmm2
2769.L109dec1_loop_20:
2770.byte 102,15,56,222,209
2771 decl %ecx
2772 movups (%edx),%xmm1
2773 leal 16(%edx),%edx
2774 jnz .L109dec1_loop_20
2775.byte 102,15,56,223,209
2776 xorps %xmm7,%xmm2
2777 movaps %xmm6,%xmm7
2778 subl $16,%eax
2779 jmp .L108cbc_dec_tail_collected
2780.align 16
2781.L105cbc_dec_two:
2782 call _aesni_decrypt2
2783 xorps %xmm7,%xmm2
2784 xorps %xmm6,%xmm3
2785 movups %xmm2,(%edi)
2786 movaps %xmm3,%xmm2
2787 pxor %xmm3,%xmm3
2788 leal 16(%edi),%edi
2789 movaps %xmm5,%xmm7
2790 subl $32,%eax
2791 jmp .L108cbc_dec_tail_collected
2792.align 16
2793.L106cbc_dec_three:
2794 call _aesni_decrypt3
2795 xorps %xmm7,%xmm2
2796 xorps %xmm6,%xmm3
2797 xorps %xmm5,%xmm4
2798 movups %xmm2,(%edi)
2799 movaps %xmm4,%xmm2
2800 pxor %xmm4,%xmm4
2801 movups %xmm3,16(%edi)
2802 pxor %xmm3,%xmm3
2803 leal 32(%edi),%edi
2804 movups 32(%esi),%xmm7
2805 subl $48,%eax
2806 jmp .L108cbc_dec_tail_collected
2807.align 16
2808.L107cbc_dec_four:
2809 call _aesni_decrypt4
2810 movups 16(%esi),%xmm1
2811 movups 32(%esi),%xmm0
2812 xorps %xmm7,%xmm2
2813 movups 48(%esi),%xmm7
2814 xorps %xmm6,%xmm3
2815 movups %xmm2,(%edi)
2816 xorps %xmm1,%xmm4
2817 movups %xmm3,16(%edi)
2818 pxor %xmm3,%xmm3
2819 xorps %xmm0,%xmm5
2820 movups %xmm4,32(%edi)
2821 pxor %xmm4,%xmm4
2822 leal 48(%edi),%edi
2823 movaps %xmm5,%xmm2
2824 pxor %xmm5,%xmm5
2825 subl $64,%eax
2826 jmp .L108cbc_dec_tail_collected
2827.align 16
2828.L103cbc_dec_clear_tail_collected:
2829 pxor %xmm3,%xmm3
2830 pxor %xmm4,%xmm4
2831 pxor %xmm5,%xmm5
2832 pxor %xmm6,%xmm6
2833.L108cbc_dec_tail_collected:
2834 andl $15,%eax
2835 jnz .L110cbc_dec_tail_partial
2836 movups %xmm2,(%edi)
2837 pxor %xmm0,%xmm0
2838 jmp .L099cbc_ret
2839.align 16
2840.L110cbc_dec_tail_partial:
2841 movaps %xmm2,(%esp)
2842 pxor %xmm0,%xmm0
2843 movl $16,%ecx
2844 movl %esp,%esi
2845 subl %eax,%ecx
2846.long 2767451785
2847 movdqa %xmm2,(%esp)
2848.L099cbc_ret:
2849 movl 16(%esp),%esp
2850 movl 36(%esp),%ebp
2851 pxor %xmm2,%xmm2
2852 pxor %xmm1,%xmm1
2853 movups %xmm7,(%ebp)
2854 pxor %xmm7,%xmm7
2855.L094cbc_abort:
2856 popl %edi
2857 popl %esi
2858 popl %ebx
2859 popl %ebp
2860 ret
2861.size aesni_cbc_encrypt,.-.L_aesni_cbc_encrypt_begin
2862.type _aesni_set_encrypt_key,@function
2863.align 16
2864_aesni_set_encrypt_key:
2865.byte 243,15,30,251
2866 pushl %ebp
2867 pushl %ebx
2868 testl %eax,%eax
2869 jz .L111bad_pointer
2870 testl %edx,%edx
2871 jz .L111bad_pointer
2872 call .L112pic
2873.L112pic:
2874 popl %ebx
2875 leal .Lkey_const-.L112pic(%ebx),%ebx
2876 leal OPENSSL_ia32cap_P-.Lkey_const(%ebx),%ebp
2877 movups (%eax),%xmm0
2878 xorps %xmm4,%xmm4
2879 movl 4(%ebp),%ebp
2880 leal 16(%edx),%edx
2881 andl $268437504,%ebp
2882 cmpl $256,%ecx
2883 je .L11314rounds
2884 cmpl $192,%ecx
2885 je .L11412rounds
2886 cmpl $128,%ecx
2887 jne .L115bad_keybits
2888.align 16
2889.L11610rounds:
2890 cmpl $268435456,%ebp
2891 je .L11710rounds_alt
2892 movl $9,%ecx
2893 movups %xmm0,-16(%edx)
2894.byte 102,15,58,223,200,1
2895 call .L118key_128_cold
2896.byte 102,15,58,223,200,2
2897 call .L119key_128
2898.byte 102,15,58,223,200,4
2899 call .L119key_128
2900.byte 102,15,58,223,200,8
2901 call .L119key_128
2902.byte 102,15,58,223,200,16
2903 call .L119key_128
2904.byte 102,15,58,223,200,32
2905 call .L119key_128
2906.byte 102,15,58,223,200,64
2907 call .L119key_128
2908.byte 102,15,58,223,200,128
2909 call .L119key_128
2910.byte 102,15,58,223,200,27
2911 call .L119key_128
2912.byte 102,15,58,223,200,54
2913 call .L119key_128
2914 movups %xmm0,(%edx)
2915 movl %ecx,80(%edx)
2916 jmp .L120good_key
2917.align 16
2918.L119key_128:
2919 movups %xmm0,(%edx)
2920 leal 16(%edx),%edx
2921.L118key_128_cold:
2922 shufps $16,%xmm0,%xmm4
2923 xorps %xmm4,%xmm0
2924 shufps $140,%xmm0,%xmm4
2925 xorps %xmm4,%xmm0
2926 shufps $255,%xmm1,%xmm1
2927 xorps %xmm1,%xmm0
2928 ret
2929.align 16
2930.L11710rounds_alt:
2931 movdqa (%ebx),%xmm5
2932 movl $8,%ecx
2933 movdqa 32(%ebx),%xmm4
2934 movdqa %xmm0,%xmm2
2935 movdqu %xmm0,-16(%edx)
2936.L121loop_key128:
2937.byte 102,15,56,0,197
2938.byte 102,15,56,221,196
2939 pslld $1,%xmm4
2940 leal 16(%edx),%edx
2941 movdqa %xmm2,%xmm3
2942 pslldq $4,%xmm2
2943 pxor %xmm2,%xmm3
2944 pslldq $4,%xmm2
2945 pxor %xmm2,%xmm3
2946 pslldq $4,%xmm2
2947 pxor %xmm3,%xmm2
2948 pxor %xmm2,%xmm0
2949 movdqu %xmm0,-16(%edx)
2950 movdqa %xmm0,%xmm2
2951 decl %ecx
2952 jnz .L121loop_key128
2953 movdqa 48(%ebx),%xmm4
2954.byte 102,15,56,0,197
2955.byte 102,15,56,221,196
2956 pslld $1,%xmm4
2957 movdqa %xmm2,%xmm3
2958 pslldq $4,%xmm2
2959 pxor %xmm2,%xmm3
2960 pslldq $4,%xmm2
2961 pxor %xmm2,%xmm3
2962 pslldq $4,%xmm2
2963 pxor %xmm3,%xmm2
2964 pxor %xmm2,%xmm0
2965 movdqu %xmm0,(%edx)
2966 movdqa %xmm0,%xmm2
2967.byte 102,15,56,0,197
2968.byte 102,15,56,221,196
2969 movdqa %xmm2,%xmm3
2970 pslldq $4,%xmm2
2971 pxor %xmm2,%xmm3
2972 pslldq $4,%xmm2
2973 pxor %xmm2,%xmm3
2974 pslldq $4,%xmm2
2975 pxor %xmm3,%xmm2
2976 pxor %xmm2,%xmm0
2977 movdqu %xmm0,16(%edx)
2978 movl $9,%ecx
2979 movl %ecx,96(%edx)
2980 jmp .L120good_key
2981.align 16
2982.L11412rounds:
2983 movq 16(%eax),%xmm2
2984 cmpl $268435456,%ebp
2985 je .L12212rounds_alt
2986 movl $11,%ecx
2987 movups %xmm0,-16(%edx)
2988.byte 102,15,58,223,202,1
2989 call .L123key_192a_cold
2990.byte 102,15,58,223,202,2
2991 call .L124key_192b
2992.byte 102,15,58,223,202,4
2993 call .L125key_192a
2994.byte 102,15,58,223,202,8
2995 call .L124key_192b
2996.byte 102,15,58,223,202,16
2997 call .L125key_192a
2998.byte 102,15,58,223,202,32
2999 call .L124key_192b
3000.byte 102,15,58,223,202,64
3001 call .L125key_192a
3002.byte 102,15,58,223,202,128
3003 call .L124key_192b
3004 movups %xmm0,(%edx)
3005 movl %ecx,48(%edx)
3006 jmp .L120good_key
3007.align 16
3008.L125key_192a:
3009 movups %xmm0,(%edx)
3010 leal 16(%edx),%edx
3011.align 16
3012.L123key_192a_cold:
3013 movaps %xmm2,%xmm5
3014.L126key_192b_warm:
3015 shufps $16,%xmm0,%xmm4
3016 movdqa %xmm2,%xmm3
3017 xorps %xmm4,%xmm0
3018 shufps $140,%xmm0,%xmm4
3019 pslldq $4,%xmm3
3020 xorps %xmm4,%xmm0
3021 pshufd $85,%xmm1,%xmm1
3022 pxor %xmm3,%xmm2
3023 pxor %xmm1,%xmm0
3024 pshufd $255,%xmm0,%xmm3
3025 pxor %xmm3,%xmm2
3026 ret
3027.align 16
3028.L124key_192b:
3029 movaps %xmm0,%xmm3
3030 shufps $68,%xmm0,%xmm5
3031 movups %xmm5,(%edx)
3032 shufps $78,%xmm2,%xmm3
3033 movups %xmm3,16(%edx)
3034 leal 32(%edx),%edx
3035 jmp .L126key_192b_warm
3036.align 16
3037.L12212rounds_alt:
3038 movdqa 16(%ebx),%xmm5
3039 movdqa 32(%ebx),%xmm4
3040 movl $8,%ecx
3041 movdqu %xmm0,-16(%edx)
3042.L127loop_key192:
3043 movq %xmm2,(%edx)
3044 movdqa %xmm2,%xmm1
3045.byte 102,15,56,0,213
3046.byte 102,15,56,221,212
3047 pslld $1,%xmm4
3048 leal 24(%edx),%edx
3049 movdqa %xmm0,%xmm3
3050 pslldq $4,%xmm0
3051 pxor %xmm0,%xmm3
3052 pslldq $4,%xmm0
3053 pxor %xmm0,%xmm3
3054 pslldq $4,%xmm0
3055 pxor %xmm3,%xmm0
3056 pshufd $255,%xmm0,%xmm3
3057 pxor %xmm1,%xmm3
3058 pslldq $4,%xmm1
3059 pxor %xmm1,%xmm3
3060 pxor %xmm2,%xmm0
3061 pxor %xmm3,%xmm2
3062 movdqu %xmm0,-16(%edx)
3063 decl %ecx
3064 jnz .L127loop_key192
3065 movl $11,%ecx
3066 movl %ecx,32(%edx)
3067 jmp .L120good_key
3068.align 16
3069.L11314rounds:
3070 movups 16(%eax),%xmm2
3071 leal 16(%edx),%edx
3072 cmpl $268435456,%ebp
3073 je .L12814rounds_alt
3074 movl $13,%ecx
3075 movups %xmm0,-32(%edx)
3076 movups %xmm2,-16(%edx)
3077.byte 102,15,58,223,202,1
3078 call .L129key_256a_cold
3079.byte 102,15,58,223,200,1
3080 call .L130key_256b
3081.byte 102,15,58,223,202,2
3082 call .L131key_256a
3083.byte 102,15,58,223,200,2
3084 call .L130key_256b
3085.byte 102,15,58,223,202,4
3086 call .L131key_256a
3087.byte 102,15,58,223,200,4
3088 call .L130key_256b
3089.byte 102,15,58,223,202,8
3090 call .L131key_256a
3091.byte 102,15,58,223,200,8
3092 call .L130key_256b
3093.byte 102,15,58,223,202,16
3094 call .L131key_256a
3095.byte 102,15,58,223,200,16
3096 call .L130key_256b
3097.byte 102,15,58,223,202,32
3098 call .L131key_256a
3099.byte 102,15,58,223,200,32
3100 call .L130key_256b
3101.byte 102,15,58,223,202,64
3102 call .L131key_256a
3103 movups %xmm0,(%edx)
3104 movl %ecx,16(%edx)
3105 xorl %eax,%eax
3106 jmp .L120good_key
3107.align 16
3108.L131key_256a:
3109 movups %xmm2,(%edx)
3110 leal 16(%edx),%edx
3111.L129key_256a_cold:
3112 shufps $16,%xmm0,%xmm4
3113 xorps %xmm4,%xmm0
3114 shufps $140,%xmm0,%xmm4
3115 xorps %xmm4,%xmm0
3116 shufps $255,%xmm1,%xmm1
3117 xorps %xmm1,%xmm0
3118 ret
3119.align 16
3120.L130key_256b:
3121 movups %xmm0,(%edx)
3122 leal 16(%edx),%edx
3123 shufps $16,%xmm2,%xmm4
3124 xorps %xmm4,%xmm2
3125 shufps $140,%xmm2,%xmm4
3126 xorps %xmm4,%xmm2
3127 shufps $170,%xmm1,%xmm1
3128 xorps %xmm1,%xmm2
3129 ret
3130.align 16
3131.L12814rounds_alt:
3132 movdqa (%ebx),%xmm5
3133 movdqa 32(%ebx),%xmm4
3134 movl $7,%ecx
3135 movdqu %xmm0,-32(%edx)
3136 movdqa %xmm2,%xmm1
3137 movdqu %xmm2,-16(%edx)
3138.L132loop_key256:
3139.byte 102,15,56,0,213
3140.byte 102,15,56,221,212
3141 movdqa %xmm0,%xmm3
3142 pslldq $4,%xmm0
3143 pxor %xmm0,%xmm3
3144 pslldq $4,%xmm0
3145 pxor %xmm0,%xmm3
3146 pslldq $4,%xmm0
3147 pxor %xmm3,%xmm0
3148 pslld $1,%xmm4
3149 pxor %xmm2,%xmm0
3150 movdqu %xmm0,(%edx)
3151 decl %ecx
3152 jz .L133done_key256
3153 pshufd $255,%xmm0,%xmm2
3154 pxor %xmm3,%xmm3
3155.byte 102,15,56,221,211
3156 movdqa %xmm1,%xmm3
3157 pslldq $4,%xmm1
3158 pxor %xmm1,%xmm3
3159 pslldq $4,%xmm1
3160 pxor %xmm1,%xmm3
3161 pslldq $4,%xmm1
3162 pxor %xmm3,%xmm1
3163 pxor %xmm1,%xmm2
3164 movdqu %xmm2,16(%edx)
3165 leal 32(%edx),%edx
3166 movdqa %xmm2,%xmm1
3167 jmp .L132loop_key256
3168.L133done_key256:
3169 movl $13,%ecx
3170 movl %ecx,16(%edx)
3171.L120good_key:
3172 pxor %xmm0,%xmm0
3173 pxor %xmm1,%xmm1
3174 pxor %xmm2,%xmm2
3175 pxor %xmm3,%xmm3
3176 pxor %xmm4,%xmm4
3177 pxor %xmm5,%xmm5
3178 xorl %eax,%eax
3179 popl %ebx
3180 popl %ebp
3181 ret
3182.align 4
3183.L111bad_pointer:
3184 movl $-1,%eax
3185 popl %ebx
3186 popl %ebp
3187 ret
3188.align 4
3189.L115bad_keybits:
3190 pxor %xmm0,%xmm0
3191 movl $-2,%eax
3192 popl %ebx
3193 popl %ebp
3194 ret
3195.size _aesni_set_encrypt_key,.-_aesni_set_encrypt_key
3196.globl aesni_set_encrypt_key
3197.type aesni_set_encrypt_key,@function
3198.align 16
3199aesni_set_encrypt_key:
3200.L_aesni_set_encrypt_key_begin:
3201.byte 243,15,30,251
3202 movl 4(%esp),%eax
3203 movl 8(%esp),%ecx
3204 movl 12(%esp),%edx
3205 call _aesni_set_encrypt_key
3206 ret
3207.size aesni_set_encrypt_key,.-.L_aesni_set_encrypt_key_begin
3208.globl aesni_set_decrypt_key
3209.type aesni_set_decrypt_key,@function
3210.align 16
3211aesni_set_decrypt_key:
3212.L_aesni_set_decrypt_key_begin:
3213.byte 243,15,30,251
3214 movl 4(%esp),%eax
3215 movl 8(%esp),%ecx
3216 movl 12(%esp),%edx
3217 call _aesni_set_encrypt_key
3218 movl 12(%esp),%edx
3219 shll $4,%ecx
3220 testl %eax,%eax
3221 jnz .L134dec_key_ret
3222 leal 16(%edx,%ecx,1),%eax
3223 movups (%edx),%xmm0
3224 movups (%eax),%xmm1
3225 movups %xmm0,(%eax)
3226 movups %xmm1,(%edx)
3227 leal 16(%edx),%edx
3228 leal -16(%eax),%eax
3229.L135dec_key_inverse:
3230 movups (%edx),%xmm0
3231 movups (%eax),%xmm1
3232.byte 102,15,56,219,192
3233.byte 102,15,56,219,201
3234 leal 16(%edx),%edx
3235 leal -16(%eax),%eax
3236 movups %xmm0,16(%eax)
3237 movups %xmm1,-16(%edx)
3238 cmpl %edx,%eax
3239 ja .L135dec_key_inverse
3240 movups (%edx),%xmm0
3241.byte 102,15,56,219,192
3242 movups %xmm0,(%edx)
3243 pxor %xmm0,%xmm0
3244 pxor %xmm1,%xmm1
3245 xorl %eax,%eax
3246.L134dec_key_ret:
3247 ret
3248.size aesni_set_decrypt_key,.-.L_aesni_set_decrypt_key_begin
3249.align 64
3250.Lkey_const:
3251.long 202313229,202313229,202313229,202313229
3252.long 67569157,67569157,67569157,67569157
3253.long 1,1,1,1
3254.long 27,27,27,27
3255.byte 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69
3256.byte 83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83
3257.byte 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
3258.byte 115,108,46,111,114,103,62,0
3259.comm OPENSSL_ia32cap_P,16,4
3260
3261 .section ".note.gnu.property", "a"
3262 .p2align 2
3263 .long 1f - 0f
3264 .long 4f - 1f
3265 .long 5
32660:
3267 .asciz "GNU"
32681:
3269 .p2align 2
3270 .long 0xc0000002
3271 .long 3f - 2f
32722:
3273 .long 3
32743:
3275 .p2align 2
32764:
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette