VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.7/crypto/genasm-macosx/aesni-x86.S@ 97371

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

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

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