blob: d3dc6beb6ac1e073c8f21feddd874e1133bbadcb [file] [log] [blame]
Adam Langleyd9e397b2015-01-22 14:27:53 -08001#if defined(__i386__)
2.file "aes-586.S"
3.text
4.private_extern __x86_AES_encrypt_compact
5.align 4
6__x86_AES_encrypt_compact:
7 movl %edi,20(%esp)
8 xorl (%edi),%eax
9 xorl 4(%edi),%ebx
10 xorl 8(%edi),%ecx
11 xorl 12(%edi),%edx
12 movl 240(%edi),%esi
13 leal -2(%esi,%esi,1),%esi
14 leal (%edi,%esi,8),%esi
15 movl %esi,24(%esp)
16 movl -128(%ebp),%edi
17 movl -96(%ebp),%esi
18 movl -64(%ebp),%edi
19 movl -32(%ebp),%esi
20 movl (%ebp),%edi
21 movl 32(%ebp),%esi
22 movl 64(%ebp),%edi
23 movl 96(%ebp),%esi
24.align 4,0x90
25L000loop:
26 movl %eax,%esi
27 andl $255,%esi
28 movzbl -128(%ebp,%esi,1),%esi
29 movzbl %bh,%edi
30 movzbl -128(%ebp,%edi,1),%edi
31 shll $8,%edi
32 xorl %edi,%esi
33 movl %ecx,%edi
34 shrl $16,%edi
35 andl $255,%edi
36 movzbl -128(%ebp,%edi,1),%edi
37 shll $16,%edi
38 xorl %edi,%esi
39 movl %edx,%edi
40 shrl $24,%edi
41 movzbl -128(%ebp,%edi,1),%edi
42 shll $24,%edi
43 xorl %edi,%esi
44 movl %esi,4(%esp)
45 movl %ebx,%esi
46 andl $255,%esi
47 shrl $16,%ebx
48 movzbl -128(%ebp,%esi,1),%esi
49 movzbl %ch,%edi
50 movzbl -128(%ebp,%edi,1),%edi
51 shll $8,%edi
52 xorl %edi,%esi
53 movl %edx,%edi
54 shrl $16,%edi
55 andl $255,%edi
56 movzbl -128(%ebp,%edi,1),%edi
57 shll $16,%edi
58 xorl %edi,%esi
59 movl %eax,%edi
60 shrl $24,%edi
61 movzbl -128(%ebp,%edi,1),%edi
62 shll $24,%edi
63 xorl %edi,%esi
64 movl %esi,8(%esp)
65 movl %ecx,%esi
66 andl $255,%esi
67 shrl $24,%ecx
68 movzbl -128(%ebp,%esi,1),%esi
69 movzbl %dh,%edi
70 movzbl -128(%ebp,%edi,1),%edi
71 shll $8,%edi
72 xorl %edi,%esi
73 movl %eax,%edi
74 shrl $16,%edi
75 andl $255,%edx
76 andl $255,%edi
77 movzbl -128(%ebp,%edi,1),%edi
78 shll $16,%edi
79 xorl %edi,%esi
80 movzbl %bh,%edi
81 movzbl -128(%ebp,%edi,1),%edi
82 shll $24,%edi
83 xorl %edi,%esi
84 andl $255,%edx
85 movzbl -128(%ebp,%edx,1),%edx
86 movzbl %ah,%eax
87 movzbl -128(%ebp,%eax,1),%eax
88 shll $8,%eax
89 xorl %eax,%edx
90 movl 4(%esp),%eax
91 andl $255,%ebx
92 movzbl -128(%ebp,%ebx,1),%ebx
93 shll $16,%ebx
94 xorl %ebx,%edx
95 movl 8(%esp),%ebx
96 movzbl -128(%ebp,%ecx,1),%ecx
97 shll $24,%ecx
98 xorl %ecx,%edx
99 movl %esi,%ecx
100 movl $2155905152,%ebp
101 andl %ecx,%ebp
102 leal (%ecx,%ecx,1),%edi
103 movl %ebp,%esi
104 shrl $7,%ebp
105 andl $4278124286,%edi
106 subl %ebp,%esi
107 movl %ecx,%ebp
108 andl $454761243,%esi
109 rorl $16,%ebp
110 xorl %edi,%esi
111 movl %ecx,%edi
112 xorl %esi,%ecx
113 rorl $24,%edi
114 xorl %ebp,%esi
115 roll $24,%ecx
116 xorl %edi,%esi
117 movl $2155905152,%ebp
118 xorl %esi,%ecx
119 andl %edx,%ebp
120 leal (%edx,%edx,1),%edi
121 movl %ebp,%esi
122 shrl $7,%ebp
123 andl $4278124286,%edi
124 subl %ebp,%esi
125 movl %edx,%ebp
126 andl $454761243,%esi
127 rorl $16,%ebp
128 xorl %edi,%esi
129 movl %edx,%edi
130 xorl %esi,%edx
131 rorl $24,%edi
132 xorl %ebp,%esi
133 roll $24,%edx
134 xorl %edi,%esi
135 movl $2155905152,%ebp
136 xorl %esi,%edx
137 andl %eax,%ebp
138 leal (%eax,%eax,1),%edi
139 movl %ebp,%esi
140 shrl $7,%ebp
141 andl $4278124286,%edi
142 subl %ebp,%esi
143 movl %eax,%ebp
144 andl $454761243,%esi
145 rorl $16,%ebp
146 xorl %edi,%esi
147 movl %eax,%edi
148 xorl %esi,%eax
149 rorl $24,%edi
150 xorl %ebp,%esi
151 roll $24,%eax
152 xorl %edi,%esi
153 movl $2155905152,%ebp
154 xorl %esi,%eax
155 andl %ebx,%ebp
156 leal (%ebx,%ebx,1),%edi
157 movl %ebp,%esi
158 shrl $7,%ebp
159 andl $4278124286,%edi
160 subl %ebp,%esi
161 movl %ebx,%ebp
162 andl $454761243,%esi
163 rorl $16,%ebp
164 xorl %edi,%esi
165 movl %ebx,%edi
166 xorl %esi,%ebx
167 rorl $24,%edi
168 xorl %ebp,%esi
169 roll $24,%ebx
170 xorl %edi,%esi
171 xorl %esi,%ebx
172 movl 20(%esp),%edi
173 movl 28(%esp),%ebp
174 addl $16,%edi
175 xorl (%edi),%eax
176 xorl 4(%edi),%ebx
177 xorl 8(%edi),%ecx
178 xorl 12(%edi),%edx
179 cmpl 24(%esp),%edi
180 movl %edi,20(%esp)
181 jb L000loop
182 movl %eax,%esi
183 andl $255,%esi
184 movzbl -128(%ebp,%esi,1),%esi
185 movzbl %bh,%edi
186 movzbl -128(%ebp,%edi,1),%edi
187 shll $8,%edi
188 xorl %edi,%esi
189 movl %ecx,%edi
190 shrl $16,%edi
191 andl $255,%edi
192 movzbl -128(%ebp,%edi,1),%edi
193 shll $16,%edi
194 xorl %edi,%esi
195 movl %edx,%edi
196 shrl $24,%edi
197 movzbl -128(%ebp,%edi,1),%edi
198 shll $24,%edi
199 xorl %edi,%esi
200 movl %esi,4(%esp)
201 movl %ebx,%esi
202 andl $255,%esi
203 shrl $16,%ebx
204 movzbl -128(%ebp,%esi,1),%esi
205 movzbl %ch,%edi
206 movzbl -128(%ebp,%edi,1),%edi
207 shll $8,%edi
208 xorl %edi,%esi
209 movl %edx,%edi
210 shrl $16,%edi
211 andl $255,%edi
212 movzbl -128(%ebp,%edi,1),%edi
213 shll $16,%edi
214 xorl %edi,%esi
215 movl %eax,%edi
216 shrl $24,%edi
217 movzbl -128(%ebp,%edi,1),%edi
218 shll $24,%edi
219 xorl %edi,%esi
220 movl %esi,8(%esp)
221 movl %ecx,%esi
222 andl $255,%esi
223 shrl $24,%ecx
224 movzbl -128(%ebp,%esi,1),%esi
225 movzbl %dh,%edi
226 movzbl -128(%ebp,%edi,1),%edi
227 shll $8,%edi
228 xorl %edi,%esi
229 movl %eax,%edi
230 shrl $16,%edi
231 andl $255,%edx
232 andl $255,%edi
233 movzbl -128(%ebp,%edi,1),%edi
234 shll $16,%edi
235 xorl %edi,%esi
236 movzbl %bh,%edi
237 movzbl -128(%ebp,%edi,1),%edi
238 shll $24,%edi
239 xorl %edi,%esi
240 movl 20(%esp),%edi
241 andl $255,%edx
242 movzbl -128(%ebp,%edx,1),%edx
243 movzbl %ah,%eax
244 movzbl -128(%ebp,%eax,1),%eax
245 shll $8,%eax
246 xorl %eax,%edx
247 movl 4(%esp),%eax
248 andl $255,%ebx
249 movzbl -128(%ebp,%ebx,1),%ebx
250 shll $16,%ebx
251 xorl %ebx,%edx
252 movl 8(%esp),%ebx
253 movzbl -128(%ebp,%ecx,1),%ecx
254 shll $24,%ecx
255 xorl %ecx,%edx
256 movl %esi,%ecx
257 xorl 16(%edi),%eax
258 xorl 20(%edi),%ebx
259 xorl 24(%edi),%ecx
260 xorl 28(%edi),%edx
261 ret
262.private_extern __sse_AES_encrypt_compact
263.align 4
264__sse_AES_encrypt_compact:
265 pxor (%edi),%mm0
266 pxor 8(%edi),%mm4
267 movl 240(%edi),%esi
268 leal -2(%esi,%esi,1),%esi
269 leal (%edi,%esi,8),%esi
270 movl %esi,24(%esp)
271 movl $454761243,%eax
272 movl %eax,8(%esp)
273 movl %eax,12(%esp)
274 movl -128(%ebp),%eax
275 movl -96(%ebp),%ebx
276 movl -64(%ebp),%ecx
277 movl -32(%ebp),%edx
278 movl (%ebp),%eax
279 movl 32(%ebp),%ebx
280 movl 64(%ebp),%ecx
281 movl 96(%ebp),%edx
282.align 4,0x90
283L001loop:
284 pshufw $8,%mm0,%mm1
285 pshufw $13,%mm4,%mm5
286 movd %mm1,%eax
287 movd %mm5,%ebx
288 movl %edi,20(%esp)
289 movzbl %al,%esi
290 movzbl %ah,%edx
291 pshufw $13,%mm0,%mm2
292 movzbl -128(%ebp,%esi,1),%ecx
293 movzbl %bl,%edi
294 movzbl -128(%ebp,%edx,1),%edx
295 shrl $16,%eax
296 shll $8,%edx
297 movzbl -128(%ebp,%edi,1),%esi
298 movzbl %bh,%edi
299 shll $16,%esi
300 pshufw $8,%mm4,%mm6
301 orl %esi,%ecx
302 movzbl -128(%ebp,%edi,1),%esi
303 movzbl %ah,%edi
304 shll $24,%esi
305 shrl $16,%ebx
306 orl %esi,%edx
307 movzbl -128(%ebp,%edi,1),%esi
308 movzbl %bh,%edi
309 shll $8,%esi
310 orl %esi,%ecx
311 movzbl -128(%ebp,%edi,1),%esi
312 movzbl %al,%edi
313 shll $24,%esi
314 orl %esi,%ecx
315 movzbl -128(%ebp,%edi,1),%esi
316 movzbl %bl,%edi
317 movd %mm2,%eax
318 movd %ecx,%mm0
319 movzbl -128(%ebp,%edi,1),%ecx
320 movzbl %ah,%edi
321 shll $16,%ecx
322 movd %mm6,%ebx
323 orl %esi,%ecx
324 movzbl -128(%ebp,%edi,1),%esi
325 movzbl %bh,%edi
326 shll $24,%esi
327 orl %esi,%ecx
328 movzbl -128(%ebp,%edi,1),%esi
329 movzbl %bl,%edi
330 shll $8,%esi
331 shrl $16,%ebx
332 orl %esi,%ecx
333 movzbl -128(%ebp,%edi,1),%esi
334 movzbl %al,%edi
335 shrl $16,%eax
336 movd %ecx,%mm1
337 movzbl -128(%ebp,%edi,1),%ecx
338 movzbl %ah,%edi
339 shll $16,%ecx
340 andl $255,%eax
341 orl %esi,%ecx
342 punpckldq %mm1,%mm0
343 movzbl -128(%ebp,%edi,1),%esi
344 movzbl %bh,%edi
345 shll $24,%esi
346 andl $255,%ebx
347 movzbl -128(%ebp,%eax,1),%eax
348 orl %esi,%ecx
349 shll $16,%eax
350 movzbl -128(%ebp,%edi,1),%esi
351 orl %eax,%edx
352 shll $8,%esi
353 movzbl -128(%ebp,%ebx,1),%ebx
354 orl %esi,%ecx
355 orl %ebx,%edx
356 movl 20(%esp),%edi
357 movd %ecx,%mm4
358 movd %edx,%mm5
359 punpckldq %mm5,%mm4
360 addl $16,%edi
361 cmpl 24(%esp),%edi
362 ja L002out
363 movq 8(%esp),%mm2
364 pxor %mm3,%mm3
365 pxor %mm7,%mm7
366 movq %mm0,%mm1
367 movq %mm4,%mm5
368 pcmpgtb %mm0,%mm3
369 pcmpgtb %mm4,%mm7
370 pand %mm2,%mm3
371 pand %mm2,%mm7
372 pshufw $177,%mm0,%mm2
373 pshufw $177,%mm4,%mm6
374 paddb %mm0,%mm0
375 paddb %mm4,%mm4
376 pxor %mm3,%mm0
377 pxor %mm7,%mm4
378 pshufw $177,%mm2,%mm3
379 pshufw $177,%mm6,%mm7
380 pxor %mm0,%mm1
381 pxor %mm4,%mm5
382 pxor %mm2,%mm0
383 pxor %mm6,%mm4
384 movq %mm3,%mm2
385 movq %mm7,%mm6
386 pslld $8,%mm3
387 pslld $8,%mm7
388 psrld $24,%mm2
389 psrld $24,%mm6
390 pxor %mm3,%mm0
391 pxor %mm7,%mm4
392 pxor %mm2,%mm0
393 pxor %mm6,%mm4
394 movq %mm1,%mm3
395 movq %mm5,%mm7
396 movq (%edi),%mm2
397 movq 8(%edi),%mm6
398 psrld $8,%mm1
399 psrld $8,%mm5
400 movl -128(%ebp),%eax
401 pslld $24,%mm3
402 pslld $24,%mm7
403 movl -64(%ebp),%ebx
404 pxor %mm1,%mm0
405 pxor %mm5,%mm4
406 movl (%ebp),%ecx
407 pxor %mm3,%mm0
408 pxor %mm7,%mm4
409 movl 64(%ebp),%edx
410 pxor %mm2,%mm0
411 pxor %mm6,%mm4
412 jmp L001loop
413.align 4,0x90
414L002out:
415 pxor (%edi),%mm0
416 pxor 8(%edi),%mm4
417 ret
418.private_extern __x86_AES_encrypt
419.align 4
420__x86_AES_encrypt:
421 movl %edi,20(%esp)
422 xorl (%edi),%eax
423 xorl 4(%edi),%ebx
424 xorl 8(%edi),%ecx
425 xorl 12(%edi),%edx
426 movl 240(%edi),%esi
427 leal -2(%esi,%esi,1),%esi
428 leal (%edi,%esi,8),%esi
429 movl %esi,24(%esp)
430.align 4,0x90
431L003loop:
432 movl %eax,%esi
433 andl $255,%esi
434 movl (%ebp,%esi,8),%esi
435 movzbl %bh,%edi
436 xorl 3(%ebp,%edi,8),%esi
437 movl %ecx,%edi
438 shrl $16,%edi
439 andl $255,%edi
440 xorl 2(%ebp,%edi,8),%esi
441 movl %edx,%edi
442 shrl $24,%edi
443 xorl 1(%ebp,%edi,8),%esi
444 movl %esi,4(%esp)
445 movl %ebx,%esi
446 andl $255,%esi
447 shrl $16,%ebx
448 movl (%ebp,%esi,8),%esi
449 movzbl %ch,%edi
450 xorl 3(%ebp,%edi,8),%esi
451 movl %edx,%edi
452 shrl $16,%edi
453 andl $255,%edi
454 xorl 2(%ebp,%edi,8),%esi
455 movl %eax,%edi
456 shrl $24,%edi
457 xorl 1(%ebp,%edi,8),%esi
458 movl %esi,8(%esp)
459 movl %ecx,%esi
460 andl $255,%esi
461 shrl $24,%ecx
462 movl (%ebp,%esi,8),%esi
463 movzbl %dh,%edi
464 xorl 3(%ebp,%edi,8),%esi
465 movl %eax,%edi
466 shrl $16,%edi
467 andl $255,%edx
468 andl $255,%edi
469 xorl 2(%ebp,%edi,8),%esi
470 movzbl %bh,%edi
471 xorl 1(%ebp,%edi,8),%esi
472 movl 20(%esp),%edi
473 movl (%ebp,%edx,8),%edx
474 movzbl %ah,%eax
475 xorl 3(%ebp,%eax,8),%edx
476 movl 4(%esp),%eax
477 andl $255,%ebx
478 xorl 2(%ebp,%ebx,8),%edx
479 movl 8(%esp),%ebx
480 xorl 1(%ebp,%ecx,8),%edx
481 movl %esi,%ecx
482 addl $16,%edi
483 xorl (%edi),%eax
484 xorl 4(%edi),%ebx
485 xorl 8(%edi),%ecx
486 xorl 12(%edi),%edx
487 cmpl 24(%esp),%edi
488 movl %edi,20(%esp)
489 jb L003loop
490 movl %eax,%esi
491 andl $255,%esi
492 movl 2(%ebp,%esi,8),%esi
493 andl $255,%esi
494 movzbl %bh,%edi
495 movl (%ebp,%edi,8),%edi
496 andl $65280,%edi
497 xorl %edi,%esi
498 movl %ecx,%edi
499 shrl $16,%edi
500 andl $255,%edi
501 movl (%ebp,%edi,8),%edi
502 andl $16711680,%edi
503 xorl %edi,%esi
504 movl %edx,%edi
505 shrl $24,%edi
506 movl 2(%ebp,%edi,8),%edi
507 andl $4278190080,%edi
508 xorl %edi,%esi
509 movl %esi,4(%esp)
510 movl %ebx,%esi
511 andl $255,%esi
512 shrl $16,%ebx
513 movl 2(%ebp,%esi,8),%esi
514 andl $255,%esi
515 movzbl %ch,%edi
516 movl (%ebp,%edi,8),%edi
517 andl $65280,%edi
518 xorl %edi,%esi
519 movl %edx,%edi
520 shrl $16,%edi
521 andl $255,%edi
522 movl (%ebp,%edi,8),%edi
523 andl $16711680,%edi
524 xorl %edi,%esi
525 movl %eax,%edi
526 shrl $24,%edi
527 movl 2(%ebp,%edi,8),%edi
528 andl $4278190080,%edi
529 xorl %edi,%esi
530 movl %esi,8(%esp)
531 movl %ecx,%esi
532 andl $255,%esi
533 shrl $24,%ecx
534 movl 2(%ebp,%esi,8),%esi
535 andl $255,%esi
536 movzbl %dh,%edi
537 movl (%ebp,%edi,8),%edi
538 andl $65280,%edi
539 xorl %edi,%esi
540 movl %eax,%edi
541 shrl $16,%edi
542 andl $255,%edx
543 andl $255,%edi
544 movl (%ebp,%edi,8),%edi
545 andl $16711680,%edi
546 xorl %edi,%esi
547 movzbl %bh,%edi
548 movl 2(%ebp,%edi,8),%edi
549 andl $4278190080,%edi
550 xorl %edi,%esi
551 movl 20(%esp),%edi
552 andl $255,%edx
553 movl 2(%ebp,%edx,8),%edx
554 andl $255,%edx
555 movzbl %ah,%eax
556 movl (%ebp,%eax,8),%eax
557 andl $65280,%eax
558 xorl %eax,%edx
559 movl 4(%esp),%eax
560 andl $255,%ebx
561 movl (%ebp,%ebx,8),%ebx
562 andl $16711680,%ebx
563 xorl %ebx,%edx
564 movl 8(%esp),%ebx
565 movl 2(%ebp,%ecx,8),%ecx
566 andl $4278190080,%ecx
567 xorl %ecx,%edx
568 movl %esi,%ecx
569 addl $16,%edi
570 xorl (%edi),%eax
571 xorl 4(%edi),%ebx
572 xorl 8(%edi),%ecx
573 xorl 12(%edi),%edx
574 ret
575.align 6,0x90
576LAES_Te:
577.long 2774754246,2774754246
578.long 2222750968,2222750968
579.long 2574743534,2574743534
580.long 2373680118,2373680118
581.long 234025727,234025727
582.long 3177933782,3177933782
583.long 2976870366,2976870366
584.long 1422247313,1422247313
585.long 1345335392,1345335392
586.long 50397442,50397442
587.long 2842126286,2842126286
588.long 2099981142,2099981142
589.long 436141799,436141799
590.long 1658312629,1658312629
591.long 3870010189,3870010189
592.long 2591454956,2591454956
593.long 1170918031,1170918031
594.long 2642575903,2642575903
595.long 1086966153,1086966153
596.long 2273148410,2273148410
597.long 368769775,368769775
598.long 3948501426,3948501426
599.long 3376891790,3376891790
600.long 200339707,200339707
601.long 3970805057,3970805057
602.long 1742001331,1742001331
603.long 4255294047,4255294047
604.long 3937382213,3937382213
605.long 3214711843,3214711843
606.long 4154762323,4154762323
607.long 2524082916,2524082916
608.long 1539358875,1539358875
609.long 3266819957,3266819957
610.long 486407649,486407649
611.long 2928907069,2928907069
612.long 1780885068,1780885068
613.long 1513502316,1513502316
614.long 1094664062,1094664062
615.long 49805301,49805301
616.long 1338821763,1338821763
617.long 1546925160,1546925160
618.long 4104496465,4104496465
619.long 887481809,887481809
620.long 150073849,150073849
621.long 2473685474,2473685474
622.long 1943591083,1943591083
623.long 1395732834,1395732834
624.long 1058346282,1058346282
625.long 201589768,201589768
626.long 1388824469,1388824469
627.long 1696801606,1696801606
628.long 1589887901,1589887901
629.long 672667696,672667696
630.long 2711000631,2711000631
631.long 251987210,251987210
632.long 3046808111,3046808111
633.long 151455502,151455502
634.long 907153956,907153956
635.long 2608889883,2608889883
636.long 1038279391,1038279391
637.long 652995533,652995533
638.long 1764173646,1764173646
639.long 3451040383,3451040383
640.long 2675275242,2675275242
641.long 453576978,453576978
642.long 2659418909,2659418909
643.long 1949051992,1949051992
644.long 773462580,773462580
645.long 756751158,756751158
646.long 2993581788,2993581788
647.long 3998898868,3998898868
648.long 4221608027,4221608027
649.long 4132590244,4132590244
650.long 1295727478,1295727478
651.long 1641469623,1641469623
652.long 3467883389,3467883389
653.long 2066295122,2066295122
654.long 1055122397,1055122397
655.long 1898917726,1898917726
656.long 2542044179,2542044179
657.long 4115878822,4115878822
658.long 1758581177,1758581177
659.long 0,0
660.long 753790401,753790401
661.long 1612718144,1612718144
662.long 536673507,536673507
663.long 3367088505,3367088505
664.long 3982187446,3982187446
665.long 3194645204,3194645204
666.long 1187761037,1187761037
667.long 3653156455,3653156455
668.long 1262041458,1262041458
669.long 3729410708,3729410708
670.long 3561770136,3561770136
671.long 3898103984,3898103984
672.long 1255133061,1255133061
673.long 1808847035,1808847035
674.long 720367557,720367557
675.long 3853167183,3853167183
676.long 385612781,385612781
677.long 3309519750,3309519750
678.long 3612167578,3612167578
679.long 1429418854,1429418854
680.long 2491778321,2491778321
681.long 3477423498,3477423498
682.long 284817897,284817897
683.long 100794884,100794884
684.long 2172616702,2172616702
685.long 4031795360,4031795360
686.long 1144798328,1144798328
687.long 3131023141,3131023141
688.long 3819481163,3819481163
689.long 4082192802,4082192802
690.long 4272137053,4272137053
691.long 3225436288,3225436288
692.long 2324664069,2324664069
693.long 2912064063,2912064063
694.long 3164445985,3164445985
695.long 1211644016,1211644016
696.long 83228145,83228145
697.long 3753688163,3753688163
698.long 3249976951,3249976951
699.long 1977277103,1977277103
700.long 1663115586,1663115586
701.long 806359072,806359072
702.long 452984805,452984805
703.long 250868733,250868733
704.long 1842533055,1842533055
705.long 1288555905,1288555905
706.long 336333848,336333848
707.long 890442534,890442534
708.long 804056259,804056259
709.long 3781124030,3781124030
710.long 2727843637,2727843637
711.long 3427026056,3427026056
712.long 957814574,957814574
713.long 1472513171,1472513171
714.long 4071073621,4071073621
715.long 2189328124,2189328124
716.long 1195195770,1195195770
717.long 2892260552,2892260552
718.long 3881655738,3881655738
719.long 723065138,723065138
720.long 2507371494,2507371494
721.long 2690670784,2690670784
722.long 2558624025,2558624025
723.long 3511635870,3511635870
724.long 2145180835,2145180835
725.long 1713513028,1713513028
726.long 2116692564,2116692564
727.long 2878378043,2878378043
728.long 2206763019,2206763019
729.long 3393603212,3393603212
730.long 703524551,703524551
731.long 3552098411,3552098411
732.long 1007948840,1007948840
733.long 2044649127,2044649127
734.long 3797835452,3797835452
735.long 487262998,487262998
736.long 1994120109,1994120109
737.long 1004593371,1004593371
738.long 1446130276,1446130276
739.long 1312438900,1312438900
740.long 503974420,503974420
741.long 3679013266,3679013266
742.long 168166924,168166924
743.long 1814307912,1814307912
744.long 3831258296,3831258296
745.long 1573044895,1573044895
746.long 1859376061,1859376061
747.long 4021070915,4021070915
748.long 2791465668,2791465668
749.long 2828112185,2828112185
750.long 2761266481,2761266481
751.long 937747667,937747667
752.long 2339994098,2339994098
753.long 854058965,854058965
754.long 1137232011,1137232011
755.long 1496790894,1496790894
756.long 3077402074,3077402074
757.long 2358086913,2358086913
758.long 1691735473,1691735473
759.long 3528347292,3528347292
760.long 3769215305,3769215305
761.long 3027004632,3027004632
762.long 4199962284,4199962284
763.long 133494003,133494003
764.long 636152527,636152527
765.long 2942657994,2942657994
766.long 2390391540,2390391540
767.long 3920539207,3920539207
768.long 403179536,403179536
769.long 3585784431,3585784431
770.long 2289596656,2289596656
771.long 1864705354,1864705354
772.long 1915629148,1915629148
773.long 605822008,605822008
774.long 4054230615,4054230615
775.long 3350508659,3350508659
776.long 1371981463,1371981463
777.long 602466507,602466507
778.long 2094914977,2094914977
779.long 2624877800,2624877800
780.long 555687742,555687742
781.long 3712699286,3712699286
782.long 3703422305,3703422305
783.long 2257292045,2257292045
784.long 2240449039,2240449039
785.long 2423288032,2423288032
786.long 1111375484,1111375484
787.long 3300242801,3300242801
788.long 2858837708,2858837708
789.long 3628615824,3628615824
790.long 84083462,84083462
791.long 32962295,32962295
792.long 302911004,302911004
793.long 2741068226,2741068226
794.long 1597322602,1597322602
795.long 4183250862,4183250862
796.long 3501832553,3501832553
797.long 2441512471,2441512471
798.long 1489093017,1489093017
799.long 656219450,656219450
800.long 3114180135,3114180135
801.long 954327513,954327513
802.long 335083755,335083755
803.long 3013122091,3013122091
804.long 856756514,856756514
805.long 3144247762,3144247762
806.long 1893325225,1893325225
807.long 2307821063,2307821063
808.long 2811532339,2811532339
809.long 3063651117,3063651117
810.long 572399164,572399164
811.long 2458355477,2458355477
812.long 552200649,552200649
813.long 1238290055,1238290055
814.long 4283782570,4283782570
815.long 2015897680,2015897680
816.long 2061492133,2061492133
817.long 2408352771,2408352771
818.long 4171342169,4171342169
819.long 2156497161,2156497161
820.long 386731290,386731290
821.long 3669999461,3669999461
822.long 837215959,837215959
823.long 3326231172,3326231172
824.long 3093850320,3093850320
825.long 3275833730,3275833730
826.long 2962856233,2962856233
827.long 1999449434,1999449434
828.long 286199582,286199582
829.long 3417354363,3417354363
830.long 4233385128,4233385128
831.long 3602627437,3602627437
832.long 974525996,974525996
833.byte 99,124,119,123,242,107,111,197
834.byte 48,1,103,43,254,215,171,118
835.byte 202,130,201,125,250,89,71,240
836.byte 173,212,162,175,156,164,114,192
837.byte 183,253,147,38,54,63,247,204
838.byte 52,165,229,241,113,216,49,21
839.byte 4,199,35,195,24,150,5,154
840.byte 7,18,128,226,235,39,178,117
841.byte 9,131,44,26,27,110,90,160
842.byte 82,59,214,179,41,227,47,132
843.byte 83,209,0,237,32,252,177,91
844.byte 106,203,190,57,74,76,88,207
845.byte 208,239,170,251,67,77,51,133
846.byte 69,249,2,127,80,60,159,168
847.byte 81,163,64,143,146,157,56,245
848.byte 188,182,218,33,16,255,243,210
849.byte 205,12,19,236,95,151,68,23
850.byte 196,167,126,61,100,93,25,115
851.byte 96,129,79,220,34,42,144,136
852.byte 70,238,184,20,222,94,11,219
853.byte 224,50,58,10,73,6,36,92
854.byte 194,211,172,98,145,149,228,121
855.byte 231,200,55,109,141,213,78,169
856.byte 108,86,244,234,101,122,174,8
857.byte 186,120,37,46,28,166,180,198
858.byte 232,221,116,31,75,189,139,138
859.byte 112,62,181,102,72,3,246,14
860.byte 97,53,87,185,134,193,29,158
861.byte 225,248,152,17,105,217,142,148
862.byte 155,30,135,233,206,85,40,223
863.byte 140,161,137,13,191,230,66,104
864.byte 65,153,45,15,176,84,187,22
865.byte 99,124,119,123,242,107,111,197
866.byte 48,1,103,43,254,215,171,118
867.byte 202,130,201,125,250,89,71,240
868.byte 173,212,162,175,156,164,114,192
869.byte 183,253,147,38,54,63,247,204
870.byte 52,165,229,241,113,216,49,21
871.byte 4,199,35,195,24,150,5,154
872.byte 7,18,128,226,235,39,178,117
873.byte 9,131,44,26,27,110,90,160
874.byte 82,59,214,179,41,227,47,132
875.byte 83,209,0,237,32,252,177,91
876.byte 106,203,190,57,74,76,88,207
877.byte 208,239,170,251,67,77,51,133
878.byte 69,249,2,127,80,60,159,168
879.byte 81,163,64,143,146,157,56,245
880.byte 188,182,218,33,16,255,243,210
881.byte 205,12,19,236,95,151,68,23
882.byte 196,167,126,61,100,93,25,115
883.byte 96,129,79,220,34,42,144,136
884.byte 70,238,184,20,222,94,11,219
885.byte 224,50,58,10,73,6,36,92
886.byte 194,211,172,98,145,149,228,121
887.byte 231,200,55,109,141,213,78,169
888.byte 108,86,244,234,101,122,174,8
889.byte 186,120,37,46,28,166,180,198
890.byte 232,221,116,31,75,189,139,138
891.byte 112,62,181,102,72,3,246,14
892.byte 97,53,87,185,134,193,29,158
893.byte 225,248,152,17,105,217,142,148
894.byte 155,30,135,233,206,85,40,223
895.byte 140,161,137,13,191,230,66,104
896.byte 65,153,45,15,176,84,187,22
897.byte 99,124,119,123,242,107,111,197
898.byte 48,1,103,43,254,215,171,118
899.byte 202,130,201,125,250,89,71,240
900.byte 173,212,162,175,156,164,114,192
901.byte 183,253,147,38,54,63,247,204
902.byte 52,165,229,241,113,216,49,21
903.byte 4,199,35,195,24,150,5,154
904.byte 7,18,128,226,235,39,178,117
905.byte 9,131,44,26,27,110,90,160
906.byte 82,59,214,179,41,227,47,132
907.byte 83,209,0,237,32,252,177,91
908.byte 106,203,190,57,74,76,88,207
909.byte 208,239,170,251,67,77,51,133
910.byte 69,249,2,127,80,60,159,168
911.byte 81,163,64,143,146,157,56,245
912.byte 188,182,218,33,16,255,243,210
913.byte 205,12,19,236,95,151,68,23
914.byte 196,167,126,61,100,93,25,115
915.byte 96,129,79,220,34,42,144,136
916.byte 70,238,184,20,222,94,11,219
917.byte 224,50,58,10,73,6,36,92
918.byte 194,211,172,98,145,149,228,121
919.byte 231,200,55,109,141,213,78,169
920.byte 108,86,244,234,101,122,174,8
921.byte 186,120,37,46,28,166,180,198
922.byte 232,221,116,31,75,189,139,138
923.byte 112,62,181,102,72,3,246,14
924.byte 97,53,87,185,134,193,29,158
925.byte 225,248,152,17,105,217,142,148
926.byte 155,30,135,233,206,85,40,223
927.byte 140,161,137,13,191,230,66,104
928.byte 65,153,45,15,176,84,187,22
929.byte 99,124,119,123,242,107,111,197
930.byte 48,1,103,43,254,215,171,118
931.byte 202,130,201,125,250,89,71,240
932.byte 173,212,162,175,156,164,114,192
933.byte 183,253,147,38,54,63,247,204
934.byte 52,165,229,241,113,216,49,21
935.byte 4,199,35,195,24,150,5,154
936.byte 7,18,128,226,235,39,178,117
937.byte 9,131,44,26,27,110,90,160
938.byte 82,59,214,179,41,227,47,132
939.byte 83,209,0,237,32,252,177,91
940.byte 106,203,190,57,74,76,88,207
941.byte 208,239,170,251,67,77,51,133
942.byte 69,249,2,127,80,60,159,168
943.byte 81,163,64,143,146,157,56,245
944.byte 188,182,218,33,16,255,243,210
945.byte 205,12,19,236,95,151,68,23
946.byte 196,167,126,61,100,93,25,115
947.byte 96,129,79,220,34,42,144,136
948.byte 70,238,184,20,222,94,11,219
949.byte 224,50,58,10,73,6,36,92
950.byte 194,211,172,98,145,149,228,121
951.byte 231,200,55,109,141,213,78,169
952.byte 108,86,244,234,101,122,174,8
953.byte 186,120,37,46,28,166,180,198
954.byte 232,221,116,31,75,189,139,138
955.byte 112,62,181,102,72,3,246,14
956.byte 97,53,87,185,134,193,29,158
957.byte 225,248,152,17,105,217,142,148
958.byte 155,30,135,233,206,85,40,223
959.byte 140,161,137,13,191,230,66,104
960.byte 65,153,45,15,176,84,187,22
961.long 1,2,4,8
962.long 16,32,64,128
963.long 27,54,0,0
964.long 0,0,0,0
965.globl _asm_AES_encrypt
966.private_extern _asm_AES_encrypt
967.align 4
968_asm_AES_encrypt:
969L_asm_AES_encrypt_begin:
970 pushl %ebp
971 pushl %ebx
972 pushl %esi
973 pushl %edi
974 movl 20(%esp),%esi
975 movl 28(%esp),%edi
976 movl %esp,%eax
977 subl $36,%esp
978 andl $-64,%esp
979 leal -127(%edi),%ebx
980 subl %esp,%ebx
981 negl %ebx
982 andl $960,%ebx
983 subl %ebx,%esp
984 addl $4,%esp
985 movl %eax,28(%esp)
986 call L004pic_point
987L004pic_point:
988 popl %ebp
989 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L004pic_point(%ebp),%eax
990 leal LAES_Te-L004pic_point(%ebp),%ebp
991 leal 764(%esp),%ebx
992 subl %ebp,%ebx
993 andl $768,%ebx
994 leal 2176(%ebp,%ebx,1),%ebp
995 btl $25,(%eax)
996 jnc L005x86
997 movq (%esi),%mm0
998 movq 8(%esi),%mm4
999 call __sse_AES_encrypt_compact
1000 movl 28(%esp),%esp
1001 movl 24(%esp),%esi
1002 movq %mm0,(%esi)
1003 movq %mm4,8(%esi)
1004 emms
1005 popl %edi
1006 popl %esi
1007 popl %ebx
1008 popl %ebp
1009 ret
1010.align 4,0x90
1011L005x86:
1012 movl %ebp,24(%esp)
1013 movl (%esi),%eax
1014 movl 4(%esi),%ebx
1015 movl 8(%esi),%ecx
1016 movl 12(%esi),%edx
1017 call __x86_AES_encrypt_compact
1018 movl 28(%esp),%esp
1019 movl 24(%esp),%esi
1020 movl %eax,(%esi)
1021 movl %ebx,4(%esi)
1022 movl %ecx,8(%esi)
1023 movl %edx,12(%esi)
1024 popl %edi
1025 popl %esi
1026 popl %ebx
1027 popl %ebp
1028 ret
1029.private_extern __x86_AES_decrypt_compact
1030.align 4
1031__x86_AES_decrypt_compact:
1032 movl %edi,20(%esp)
1033 xorl (%edi),%eax
1034 xorl 4(%edi),%ebx
1035 xorl 8(%edi),%ecx
1036 xorl 12(%edi),%edx
1037 movl 240(%edi),%esi
1038 leal -2(%esi,%esi,1),%esi
1039 leal (%edi,%esi,8),%esi
1040 movl %esi,24(%esp)
1041 movl -128(%ebp),%edi
1042 movl -96(%ebp),%esi
1043 movl -64(%ebp),%edi
1044 movl -32(%ebp),%esi
1045 movl (%ebp),%edi
1046 movl 32(%ebp),%esi
1047 movl 64(%ebp),%edi
1048 movl 96(%ebp),%esi
1049.align 4,0x90
1050L006loop:
1051 movl %eax,%esi
1052 andl $255,%esi
1053 movzbl -128(%ebp,%esi,1),%esi
1054 movzbl %dh,%edi
1055 movzbl -128(%ebp,%edi,1),%edi
1056 shll $8,%edi
1057 xorl %edi,%esi
1058 movl %ecx,%edi
1059 shrl $16,%edi
1060 andl $255,%edi
1061 movzbl -128(%ebp,%edi,1),%edi
1062 shll $16,%edi
1063 xorl %edi,%esi
1064 movl %ebx,%edi
1065 shrl $24,%edi
1066 movzbl -128(%ebp,%edi,1),%edi
1067 shll $24,%edi
1068 xorl %edi,%esi
1069 movl %esi,4(%esp)
1070 movl %ebx,%esi
1071 andl $255,%esi
1072 movzbl -128(%ebp,%esi,1),%esi
1073 movzbl %ah,%edi
1074 movzbl -128(%ebp,%edi,1),%edi
1075 shll $8,%edi
1076 xorl %edi,%esi
1077 movl %edx,%edi
1078 shrl $16,%edi
1079 andl $255,%edi
1080 movzbl -128(%ebp,%edi,1),%edi
1081 shll $16,%edi
1082 xorl %edi,%esi
1083 movl %ecx,%edi
1084 shrl $24,%edi
1085 movzbl -128(%ebp,%edi,1),%edi
1086 shll $24,%edi
1087 xorl %edi,%esi
1088 movl %esi,8(%esp)
1089 movl %ecx,%esi
1090 andl $255,%esi
1091 movzbl -128(%ebp,%esi,1),%esi
1092 movzbl %bh,%edi
1093 movzbl -128(%ebp,%edi,1),%edi
1094 shll $8,%edi
1095 xorl %edi,%esi
1096 movl %eax,%edi
1097 shrl $16,%edi
1098 andl $255,%edi
1099 movzbl -128(%ebp,%edi,1),%edi
1100 shll $16,%edi
1101 xorl %edi,%esi
1102 movl %edx,%edi
1103 shrl $24,%edi
1104 movzbl -128(%ebp,%edi,1),%edi
1105 shll $24,%edi
1106 xorl %edi,%esi
1107 andl $255,%edx
1108 movzbl -128(%ebp,%edx,1),%edx
1109 movzbl %ch,%ecx
1110 movzbl -128(%ebp,%ecx,1),%ecx
1111 shll $8,%ecx
1112 xorl %ecx,%edx
1113 movl %esi,%ecx
1114 shrl $16,%ebx
1115 andl $255,%ebx
1116 movzbl -128(%ebp,%ebx,1),%ebx
1117 shll $16,%ebx
1118 xorl %ebx,%edx
1119 shrl $24,%eax
1120 movzbl -128(%ebp,%eax,1),%eax
1121 shll $24,%eax
1122 xorl %eax,%edx
1123 movl $2155905152,%edi
1124 andl %ecx,%edi
1125 movl %edi,%esi
1126 shrl $7,%edi
1127 leal (%ecx,%ecx,1),%eax
1128 subl %edi,%esi
1129 andl $4278124286,%eax
1130 andl $454761243,%esi
1131 xorl %esi,%eax
1132 movl $2155905152,%edi
1133 andl %eax,%edi
1134 movl %edi,%esi
1135 shrl $7,%edi
1136 leal (%eax,%eax,1),%ebx
1137 subl %edi,%esi
1138 andl $4278124286,%ebx
1139 andl $454761243,%esi
1140 xorl %ecx,%eax
1141 xorl %esi,%ebx
1142 movl $2155905152,%edi
1143 andl %ebx,%edi
1144 movl %edi,%esi
1145 shrl $7,%edi
1146 leal (%ebx,%ebx,1),%ebp
1147 subl %edi,%esi
1148 andl $4278124286,%ebp
1149 andl $454761243,%esi
1150 xorl %ecx,%ebx
1151 roll $8,%ecx
1152 xorl %esi,%ebp
1153 xorl %eax,%ecx
1154 xorl %ebp,%eax
1155 xorl %ebx,%ecx
1156 xorl %ebp,%ebx
1157 roll $24,%eax
1158 xorl %ebp,%ecx
1159 roll $16,%ebx
1160 xorl %eax,%ecx
1161 roll $8,%ebp
1162 xorl %ebx,%ecx
1163 movl 4(%esp),%eax
1164 xorl %ebp,%ecx
1165 movl %ecx,12(%esp)
1166 movl $2155905152,%edi
1167 andl %edx,%edi
1168 movl %edi,%esi
1169 shrl $7,%edi
1170 leal (%edx,%edx,1),%ebx
1171 subl %edi,%esi
1172 andl $4278124286,%ebx
1173 andl $454761243,%esi
1174 xorl %esi,%ebx
1175 movl $2155905152,%edi
1176 andl %ebx,%edi
1177 movl %edi,%esi
1178 shrl $7,%edi
1179 leal (%ebx,%ebx,1),%ecx
1180 subl %edi,%esi
1181 andl $4278124286,%ecx
1182 andl $454761243,%esi
1183 xorl %edx,%ebx
1184 xorl %esi,%ecx
1185 movl $2155905152,%edi
1186 andl %ecx,%edi
1187 movl %edi,%esi
1188 shrl $7,%edi
1189 leal (%ecx,%ecx,1),%ebp
1190 subl %edi,%esi
1191 andl $4278124286,%ebp
1192 andl $454761243,%esi
1193 xorl %edx,%ecx
1194 roll $8,%edx
1195 xorl %esi,%ebp
1196 xorl %ebx,%edx
1197 xorl %ebp,%ebx
1198 xorl %ecx,%edx
1199 xorl %ebp,%ecx
1200 roll $24,%ebx
1201 xorl %ebp,%edx
1202 roll $16,%ecx
1203 xorl %ebx,%edx
1204 roll $8,%ebp
1205 xorl %ecx,%edx
1206 movl 8(%esp),%ebx
1207 xorl %ebp,%edx
1208 movl %edx,16(%esp)
1209 movl $2155905152,%edi
1210 andl %eax,%edi
1211 movl %edi,%esi
1212 shrl $7,%edi
1213 leal (%eax,%eax,1),%ecx
1214 subl %edi,%esi
1215 andl $4278124286,%ecx
1216 andl $454761243,%esi
1217 xorl %esi,%ecx
1218 movl $2155905152,%edi
1219 andl %ecx,%edi
1220 movl %edi,%esi
1221 shrl $7,%edi
1222 leal (%ecx,%ecx,1),%edx
1223 subl %edi,%esi
1224 andl $4278124286,%edx
1225 andl $454761243,%esi
1226 xorl %eax,%ecx
1227 xorl %esi,%edx
1228 movl $2155905152,%edi
1229 andl %edx,%edi
1230 movl %edi,%esi
1231 shrl $7,%edi
1232 leal (%edx,%edx,1),%ebp
1233 subl %edi,%esi
1234 andl $4278124286,%ebp
1235 andl $454761243,%esi
1236 xorl %eax,%edx
1237 roll $8,%eax
1238 xorl %esi,%ebp
1239 xorl %ecx,%eax
1240 xorl %ebp,%ecx
1241 xorl %edx,%eax
1242 xorl %ebp,%edx
1243 roll $24,%ecx
1244 xorl %ebp,%eax
1245 roll $16,%edx
1246 xorl %ecx,%eax
1247 roll $8,%ebp
1248 xorl %edx,%eax
1249 xorl %ebp,%eax
1250 movl $2155905152,%edi
1251 andl %ebx,%edi
1252 movl %edi,%esi
1253 shrl $7,%edi
1254 leal (%ebx,%ebx,1),%ecx
1255 subl %edi,%esi
1256 andl $4278124286,%ecx
1257 andl $454761243,%esi
1258 xorl %esi,%ecx
1259 movl $2155905152,%edi
1260 andl %ecx,%edi
1261 movl %edi,%esi
1262 shrl $7,%edi
1263 leal (%ecx,%ecx,1),%edx
1264 subl %edi,%esi
1265 andl $4278124286,%edx
1266 andl $454761243,%esi
1267 xorl %ebx,%ecx
1268 xorl %esi,%edx
1269 movl $2155905152,%edi
1270 andl %edx,%edi
1271 movl %edi,%esi
1272 shrl $7,%edi
1273 leal (%edx,%edx,1),%ebp
1274 subl %edi,%esi
1275 andl $4278124286,%ebp
1276 andl $454761243,%esi
1277 xorl %ebx,%edx
1278 roll $8,%ebx
1279 xorl %esi,%ebp
1280 xorl %ecx,%ebx
1281 xorl %ebp,%ecx
1282 xorl %edx,%ebx
1283 xorl %ebp,%edx
1284 roll $24,%ecx
1285 xorl %ebp,%ebx
1286 roll $16,%edx
1287 xorl %ecx,%ebx
1288 roll $8,%ebp
1289 xorl %edx,%ebx
1290 movl 12(%esp),%ecx
1291 xorl %ebp,%ebx
1292 movl 16(%esp),%edx
1293 movl 20(%esp),%edi
1294 movl 28(%esp),%ebp
1295 addl $16,%edi
1296 xorl (%edi),%eax
1297 xorl 4(%edi),%ebx
1298 xorl 8(%edi),%ecx
1299 xorl 12(%edi),%edx
1300 cmpl 24(%esp),%edi
1301 movl %edi,20(%esp)
1302 jb L006loop
1303 movl %eax,%esi
1304 andl $255,%esi
1305 movzbl -128(%ebp,%esi,1),%esi
1306 movzbl %dh,%edi
1307 movzbl -128(%ebp,%edi,1),%edi
1308 shll $8,%edi
1309 xorl %edi,%esi
1310 movl %ecx,%edi
1311 shrl $16,%edi
1312 andl $255,%edi
1313 movzbl -128(%ebp,%edi,1),%edi
1314 shll $16,%edi
1315 xorl %edi,%esi
1316 movl %ebx,%edi
1317 shrl $24,%edi
1318 movzbl -128(%ebp,%edi,1),%edi
1319 shll $24,%edi
1320 xorl %edi,%esi
1321 movl %esi,4(%esp)
1322 movl %ebx,%esi
1323 andl $255,%esi
1324 movzbl -128(%ebp,%esi,1),%esi
1325 movzbl %ah,%edi
1326 movzbl -128(%ebp,%edi,1),%edi
1327 shll $8,%edi
1328 xorl %edi,%esi
1329 movl %edx,%edi
1330 shrl $16,%edi
1331 andl $255,%edi
1332 movzbl -128(%ebp,%edi,1),%edi
1333 shll $16,%edi
1334 xorl %edi,%esi
1335 movl %ecx,%edi
1336 shrl $24,%edi
1337 movzbl -128(%ebp,%edi,1),%edi
1338 shll $24,%edi
1339 xorl %edi,%esi
1340 movl %esi,8(%esp)
1341 movl %ecx,%esi
1342 andl $255,%esi
1343 movzbl -128(%ebp,%esi,1),%esi
1344 movzbl %bh,%edi
1345 movzbl -128(%ebp,%edi,1),%edi
1346 shll $8,%edi
1347 xorl %edi,%esi
1348 movl %eax,%edi
1349 shrl $16,%edi
1350 andl $255,%edi
1351 movzbl -128(%ebp,%edi,1),%edi
1352 shll $16,%edi
1353 xorl %edi,%esi
1354 movl %edx,%edi
1355 shrl $24,%edi
1356 movzbl -128(%ebp,%edi,1),%edi
1357 shll $24,%edi
1358 xorl %edi,%esi
1359 movl 20(%esp),%edi
1360 andl $255,%edx
1361 movzbl -128(%ebp,%edx,1),%edx
1362 movzbl %ch,%ecx
1363 movzbl -128(%ebp,%ecx,1),%ecx
1364 shll $8,%ecx
1365 xorl %ecx,%edx
1366 movl %esi,%ecx
1367 shrl $16,%ebx
1368 andl $255,%ebx
1369 movzbl -128(%ebp,%ebx,1),%ebx
1370 shll $16,%ebx
1371 xorl %ebx,%edx
1372 movl 8(%esp),%ebx
1373 shrl $24,%eax
1374 movzbl -128(%ebp,%eax,1),%eax
1375 shll $24,%eax
1376 xorl %eax,%edx
1377 movl 4(%esp),%eax
1378 xorl 16(%edi),%eax
1379 xorl 20(%edi),%ebx
1380 xorl 24(%edi),%ecx
1381 xorl 28(%edi),%edx
1382 ret
1383.private_extern __sse_AES_decrypt_compact
1384.align 4
1385__sse_AES_decrypt_compact:
1386 pxor (%edi),%mm0
1387 pxor 8(%edi),%mm4
1388 movl 240(%edi),%esi
1389 leal -2(%esi,%esi,1),%esi
1390 leal (%edi,%esi,8),%esi
1391 movl %esi,24(%esp)
1392 movl $454761243,%eax
1393 movl %eax,8(%esp)
1394 movl %eax,12(%esp)
1395 movl -128(%ebp),%eax
1396 movl -96(%ebp),%ebx
1397 movl -64(%ebp),%ecx
1398 movl -32(%ebp),%edx
1399 movl (%ebp),%eax
1400 movl 32(%ebp),%ebx
1401 movl 64(%ebp),%ecx
1402 movl 96(%ebp),%edx
1403.align 4,0x90
1404L007loop:
1405 pshufw $12,%mm0,%mm1
1406 pshufw $9,%mm4,%mm5
1407 movd %mm1,%eax
1408 movd %mm5,%ebx
1409 movl %edi,20(%esp)
1410 movzbl %al,%esi
1411 movzbl %ah,%edx
1412 pshufw $6,%mm0,%mm2
1413 movzbl -128(%ebp,%esi,1),%ecx
1414 movzbl %bl,%edi
1415 movzbl -128(%ebp,%edx,1),%edx
1416 shrl $16,%eax
1417 shll $8,%edx
1418 movzbl -128(%ebp,%edi,1),%esi
1419 movzbl %bh,%edi
1420 shll $16,%esi
1421 pshufw $3,%mm4,%mm6
1422 orl %esi,%ecx
1423 movzbl -128(%ebp,%edi,1),%esi
1424 movzbl %ah,%edi
1425 shll $24,%esi
1426 shrl $16,%ebx
1427 orl %esi,%edx
1428 movzbl -128(%ebp,%edi,1),%esi
1429 movzbl %bh,%edi
1430 shll $24,%esi
1431 orl %esi,%ecx
1432 movzbl -128(%ebp,%edi,1),%esi
1433 movzbl %al,%edi
1434 shll $8,%esi
1435 movd %mm2,%eax
1436 orl %esi,%ecx
1437 movzbl -128(%ebp,%edi,1),%esi
1438 movzbl %bl,%edi
1439 shll $16,%esi
1440 movd %mm6,%ebx
1441 movd %ecx,%mm0
1442 movzbl -128(%ebp,%edi,1),%ecx
1443 movzbl %al,%edi
1444 orl %esi,%ecx
1445 movzbl -128(%ebp,%edi,1),%esi
1446 movzbl %bl,%edi
1447 orl %esi,%edx
1448 movzbl -128(%ebp,%edi,1),%esi
1449 movzbl %ah,%edi
1450 shll $16,%esi
1451 shrl $16,%eax
1452 orl %esi,%edx
1453 movzbl -128(%ebp,%edi,1),%esi
1454 movzbl %bh,%edi
1455 shrl $16,%ebx
1456 shll $8,%esi
1457 movd %edx,%mm1
1458 movzbl -128(%ebp,%edi,1),%edx
1459 movzbl %bh,%edi
1460 shll $24,%edx
1461 andl $255,%ebx
1462 orl %esi,%edx
1463 punpckldq %mm1,%mm0
1464 movzbl -128(%ebp,%edi,1),%esi
1465 movzbl %al,%edi
1466 shll $8,%esi
1467 movzbl %ah,%eax
1468 movzbl -128(%ebp,%ebx,1),%ebx
1469 orl %esi,%ecx
1470 movzbl -128(%ebp,%edi,1),%esi
1471 orl %ebx,%edx
1472 shll $16,%esi
1473 movzbl -128(%ebp,%eax,1),%eax
1474 orl %esi,%edx
1475 shll $24,%eax
1476 orl %eax,%ecx
1477 movl 20(%esp),%edi
1478 movd %edx,%mm4
1479 movd %ecx,%mm5
1480 punpckldq %mm5,%mm4
1481 addl $16,%edi
1482 cmpl 24(%esp),%edi
1483 ja L008out
1484 movq %mm0,%mm3
1485 movq %mm4,%mm7
1486 pshufw $228,%mm0,%mm2
1487 pshufw $228,%mm4,%mm6
1488 movq %mm0,%mm1
1489 movq %mm4,%mm5
1490 pshufw $177,%mm0,%mm0
1491 pshufw $177,%mm4,%mm4
1492 pslld $8,%mm2
1493 pslld $8,%mm6
1494 psrld $8,%mm3
1495 psrld $8,%mm7
1496 pxor %mm2,%mm0
1497 pxor %mm6,%mm4
1498 pxor %mm3,%mm0
1499 pxor %mm7,%mm4
1500 pslld $16,%mm2
1501 pslld $16,%mm6
1502 psrld $16,%mm3
1503 psrld $16,%mm7
1504 pxor %mm2,%mm0
1505 pxor %mm6,%mm4
1506 pxor %mm3,%mm0
1507 pxor %mm7,%mm4
1508 movq 8(%esp),%mm3
1509 pxor %mm2,%mm2
1510 pxor %mm6,%mm6
1511 pcmpgtb %mm1,%mm2
1512 pcmpgtb %mm5,%mm6
1513 pand %mm3,%mm2
1514 pand %mm3,%mm6
1515 paddb %mm1,%mm1
1516 paddb %mm5,%mm5
1517 pxor %mm2,%mm1
1518 pxor %mm6,%mm5
1519 movq %mm1,%mm3
1520 movq %mm5,%mm7
1521 movq %mm1,%mm2
1522 movq %mm5,%mm6
1523 pxor %mm1,%mm0
1524 pxor %mm5,%mm4
1525 pslld $24,%mm3
1526 pslld $24,%mm7
1527 psrld $8,%mm2
1528 psrld $8,%mm6
1529 pxor %mm3,%mm0
1530 pxor %mm7,%mm4
1531 pxor %mm2,%mm0
1532 pxor %mm6,%mm4
1533 movq 8(%esp),%mm2
1534 pxor %mm3,%mm3
1535 pxor %mm7,%mm7
1536 pcmpgtb %mm1,%mm3
1537 pcmpgtb %mm5,%mm7
1538 pand %mm2,%mm3
1539 pand %mm2,%mm7
1540 paddb %mm1,%mm1
1541 paddb %mm5,%mm5
1542 pxor %mm3,%mm1
1543 pxor %mm7,%mm5
1544 pshufw $177,%mm1,%mm3
1545 pshufw $177,%mm5,%mm7
1546 pxor %mm1,%mm0
1547 pxor %mm5,%mm4
1548 pxor %mm3,%mm0
1549 pxor %mm7,%mm4
1550 pxor %mm3,%mm3
1551 pxor %mm7,%mm7
1552 pcmpgtb %mm1,%mm3
1553 pcmpgtb %mm5,%mm7
1554 pand %mm2,%mm3
1555 pand %mm2,%mm7
1556 paddb %mm1,%mm1
1557 paddb %mm5,%mm5
1558 pxor %mm3,%mm1
1559 pxor %mm7,%mm5
1560 pxor %mm1,%mm0
1561 pxor %mm5,%mm4
1562 movq %mm1,%mm3
1563 movq %mm5,%mm7
1564 pshufw $177,%mm1,%mm2
1565 pshufw $177,%mm5,%mm6
1566 pxor %mm2,%mm0
1567 pxor %mm6,%mm4
1568 pslld $8,%mm1
1569 pslld $8,%mm5
1570 psrld $8,%mm3
1571 psrld $8,%mm7
1572 movq (%edi),%mm2
1573 movq 8(%edi),%mm6
1574 pxor %mm1,%mm0
1575 pxor %mm5,%mm4
1576 pxor %mm3,%mm0
1577 pxor %mm7,%mm4
1578 movl -128(%ebp),%eax
1579 pslld $16,%mm1
1580 pslld $16,%mm5
1581 movl -64(%ebp),%ebx
1582 psrld $16,%mm3
1583 psrld $16,%mm7
1584 movl (%ebp),%ecx
1585 pxor %mm1,%mm0
1586 pxor %mm5,%mm4
1587 movl 64(%ebp),%edx
1588 pxor %mm3,%mm0
1589 pxor %mm7,%mm4
1590 pxor %mm2,%mm0
1591 pxor %mm6,%mm4
1592 jmp L007loop
1593.align 4,0x90
1594L008out:
1595 pxor (%edi),%mm0
1596 pxor 8(%edi),%mm4
1597 ret
1598.private_extern __x86_AES_decrypt
1599.align 4
1600__x86_AES_decrypt:
1601 movl %edi,20(%esp)
1602 xorl (%edi),%eax
1603 xorl 4(%edi),%ebx
1604 xorl 8(%edi),%ecx
1605 xorl 12(%edi),%edx
1606 movl 240(%edi),%esi
1607 leal -2(%esi,%esi,1),%esi
1608 leal (%edi,%esi,8),%esi
1609 movl %esi,24(%esp)
1610.align 4,0x90
1611L009loop:
1612 movl %eax,%esi
1613 andl $255,%esi
1614 movl (%ebp,%esi,8),%esi
1615 movzbl %dh,%edi
1616 xorl 3(%ebp,%edi,8),%esi
1617 movl %ecx,%edi
1618 shrl $16,%edi
1619 andl $255,%edi
1620 xorl 2(%ebp,%edi,8),%esi
1621 movl %ebx,%edi
1622 shrl $24,%edi
1623 xorl 1(%ebp,%edi,8),%esi
1624 movl %esi,4(%esp)
1625 movl %ebx,%esi
1626 andl $255,%esi
1627 movl (%ebp,%esi,8),%esi
1628 movzbl %ah,%edi
1629 xorl 3(%ebp,%edi,8),%esi
1630 movl %edx,%edi
1631 shrl $16,%edi
1632 andl $255,%edi
1633 xorl 2(%ebp,%edi,8),%esi
1634 movl %ecx,%edi
1635 shrl $24,%edi
1636 xorl 1(%ebp,%edi,8),%esi
1637 movl %esi,8(%esp)
1638 movl %ecx,%esi
1639 andl $255,%esi
1640 movl (%ebp,%esi,8),%esi
1641 movzbl %bh,%edi
1642 xorl 3(%ebp,%edi,8),%esi
1643 movl %eax,%edi
1644 shrl $16,%edi
1645 andl $255,%edi
1646 xorl 2(%ebp,%edi,8),%esi
1647 movl %edx,%edi
1648 shrl $24,%edi
1649 xorl 1(%ebp,%edi,8),%esi
1650 movl 20(%esp),%edi
1651 andl $255,%edx
1652 movl (%ebp,%edx,8),%edx
1653 movzbl %ch,%ecx
1654 xorl 3(%ebp,%ecx,8),%edx
1655 movl %esi,%ecx
1656 shrl $16,%ebx
1657 andl $255,%ebx
1658 xorl 2(%ebp,%ebx,8),%edx
1659 movl 8(%esp),%ebx
1660 shrl $24,%eax
1661 xorl 1(%ebp,%eax,8),%edx
1662 movl 4(%esp),%eax
1663 addl $16,%edi
1664 xorl (%edi),%eax
1665 xorl 4(%edi),%ebx
1666 xorl 8(%edi),%ecx
1667 xorl 12(%edi),%edx
1668 cmpl 24(%esp),%edi
1669 movl %edi,20(%esp)
1670 jb L009loop
1671 leal 2176(%ebp),%ebp
1672 movl -128(%ebp),%edi
1673 movl -96(%ebp),%esi
1674 movl -64(%ebp),%edi
1675 movl -32(%ebp),%esi
1676 movl (%ebp),%edi
1677 movl 32(%ebp),%esi
1678 movl 64(%ebp),%edi
1679 movl 96(%ebp),%esi
1680 leal -128(%ebp),%ebp
1681 movl %eax,%esi
1682 andl $255,%esi
1683 movzbl (%ebp,%esi,1),%esi
1684 movzbl %dh,%edi
1685 movzbl (%ebp,%edi,1),%edi
1686 shll $8,%edi
1687 xorl %edi,%esi
1688 movl %ecx,%edi
1689 shrl $16,%edi
1690 andl $255,%edi
1691 movzbl (%ebp,%edi,1),%edi
1692 shll $16,%edi
1693 xorl %edi,%esi
1694 movl %ebx,%edi
1695 shrl $24,%edi
1696 movzbl (%ebp,%edi,1),%edi
1697 shll $24,%edi
1698 xorl %edi,%esi
1699 movl %esi,4(%esp)
1700 movl %ebx,%esi
1701 andl $255,%esi
1702 movzbl (%ebp,%esi,1),%esi
1703 movzbl %ah,%edi
1704 movzbl (%ebp,%edi,1),%edi
1705 shll $8,%edi
1706 xorl %edi,%esi
1707 movl %edx,%edi
1708 shrl $16,%edi
1709 andl $255,%edi
1710 movzbl (%ebp,%edi,1),%edi
1711 shll $16,%edi
1712 xorl %edi,%esi
1713 movl %ecx,%edi
1714 shrl $24,%edi
1715 movzbl (%ebp,%edi,1),%edi
1716 shll $24,%edi
1717 xorl %edi,%esi
1718 movl %esi,8(%esp)
1719 movl %ecx,%esi
1720 andl $255,%esi
1721 movzbl (%ebp,%esi,1),%esi
1722 movzbl %bh,%edi
1723 movzbl (%ebp,%edi,1),%edi
1724 shll $8,%edi
1725 xorl %edi,%esi
1726 movl %eax,%edi
1727 shrl $16,%edi
1728 andl $255,%edi
1729 movzbl (%ebp,%edi,1),%edi
1730 shll $16,%edi
1731 xorl %edi,%esi
1732 movl %edx,%edi
1733 shrl $24,%edi
1734 movzbl (%ebp,%edi,1),%edi
1735 shll $24,%edi
1736 xorl %edi,%esi
1737 movl 20(%esp),%edi
1738 andl $255,%edx
1739 movzbl (%ebp,%edx,1),%edx
1740 movzbl %ch,%ecx
1741 movzbl (%ebp,%ecx,1),%ecx
1742 shll $8,%ecx
1743 xorl %ecx,%edx
1744 movl %esi,%ecx
1745 shrl $16,%ebx
1746 andl $255,%ebx
1747 movzbl (%ebp,%ebx,1),%ebx
1748 shll $16,%ebx
1749 xorl %ebx,%edx
1750 movl 8(%esp),%ebx
1751 shrl $24,%eax
1752 movzbl (%ebp,%eax,1),%eax
1753 shll $24,%eax
1754 xorl %eax,%edx
1755 movl 4(%esp),%eax
1756 leal -2048(%ebp),%ebp
1757 addl $16,%edi
1758 xorl (%edi),%eax
1759 xorl 4(%edi),%ebx
1760 xorl 8(%edi),%ecx
1761 xorl 12(%edi),%edx
1762 ret
1763.align 6,0x90
1764LAES_Td:
1765.long 1353184337,1353184337
1766.long 1399144830,1399144830
1767.long 3282310938,3282310938
1768.long 2522752826,2522752826
1769.long 3412831035,3412831035
1770.long 4047871263,4047871263
1771.long 2874735276,2874735276
1772.long 2466505547,2466505547
1773.long 1442459680,1442459680
1774.long 4134368941,4134368941
1775.long 2440481928,2440481928
1776.long 625738485,625738485
1777.long 4242007375,4242007375
1778.long 3620416197,3620416197
1779.long 2151953702,2151953702
1780.long 2409849525,2409849525
1781.long 1230680542,1230680542
1782.long 1729870373,1729870373
1783.long 2551114309,2551114309
1784.long 3787521629,3787521629
1785.long 41234371,41234371
1786.long 317738113,317738113
1787.long 2744600205,2744600205
1788.long 3338261355,3338261355
1789.long 3881799427,3881799427
1790.long 2510066197,2510066197
1791.long 3950669247,3950669247
1792.long 3663286933,3663286933
1793.long 763608788,763608788
1794.long 3542185048,3542185048
1795.long 694804553,694804553
1796.long 1154009486,1154009486
1797.long 1787413109,1787413109
1798.long 2021232372,2021232372
1799.long 1799248025,1799248025
1800.long 3715217703,3715217703
1801.long 3058688446,3058688446
1802.long 397248752,397248752
1803.long 1722556617,1722556617
1804.long 3023752829,3023752829
1805.long 407560035,407560035
1806.long 2184256229,2184256229
1807.long 1613975959,1613975959
1808.long 1165972322,1165972322
1809.long 3765920945,3765920945
1810.long 2226023355,2226023355
1811.long 480281086,480281086
1812.long 2485848313,2485848313
1813.long 1483229296,1483229296
1814.long 436028815,436028815
1815.long 2272059028,2272059028
1816.long 3086515026,3086515026
1817.long 601060267,601060267
1818.long 3791801202,3791801202
1819.long 1468997603,1468997603
1820.long 715871590,715871590
1821.long 120122290,120122290
1822.long 63092015,63092015
1823.long 2591802758,2591802758
1824.long 2768779219,2768779219
1825.long 4068943920,4068943920
1826.long 2997206819,2997206819
1827.long 3127509762,3127509762
1828.long 1552029421,1552029421
1829.long 723308426,723308426
1830.long 2461301159,2461301159
1831.long 4042393587,4042393587
1832.long 2715969870,2715969870
1833.long 3455375973,3455375973
1834.long 3586000134,3586000134
1835.long 526529745,526529745
1836.long 2331944644,2331944644
1837.long 2639474228,2639474228
1838.long 2689987490,2689987490
1839.long 853641733,853641733
1840.long 1978398372,1978398372
1841.long 971801355,971801355
1842.long 2867814464,2867814464
1843.long 111112542,111112542
1844.long 1360031421,1360031421
1845.long 4186579262,4186579262
1846.long 1023860118,1023860118
1847.long 2919579357,2919579357
1848.long 1186850381,1186850381
1849.long 3045938321,3045938321
1850.long 90031217,90031217
1851.long 1876166148,1876166148
1852.long 4279586912,4279586912
1853.long 620468249,620468249
1854.long 2548678102,2548678102
1855.long 3426959497,3426959497
1856.long 2006899047,2006899047
1857.long 3175278768,3175278768
1858.long 2290845959,2290845959
1859.long 945494503,945494503
1860.long 3689859193,3689859193
1861.long 1191869601,1191869601
1862.long 3910091388,3910091388
1863.long 3374220536,3374220536
1864.long 0,0
1865.long 2206629897,2206629897
1866.long 1223502642,1223502642
1867.long 2893025566,2893025566
1868.long 1316117100,1316117100
1869.long 4227796733,4227796733
1870.long 1446544655,1446544655
1871.long 517320253,517320253
1872.long 658058550,658058550
1873.long 1691946762,1691946762
1874.long 564550760,564550760
1875.long 3511966619,3511966619
1876.long 976107044,976107044
1877.long 2976320012,2976320012
1878.long 266819475,266819475
1879.long 3533106868,3533106868
1880.long 2660342555,2660342555
1881.long 1338359936,1338359936
1882.long 2720062561,2720062561
1883.long 1766553434,1766553434
1884.long 370807324,370807324
1885.long 179999714,179999714
1886.long 3844776128,3844776128
1887.long 1138762300,1138762300
1888.long 488053522,488053522
1889.long 185403662,185403662
1890.long 2915535858,2915535858
1891.long 3114841645,3114841645
1892.long 3366526484,3366526484
1893.long 2233069911,2233069911
1894.long 1275557295,1275557295
1895.long 3151862254,3151862254
1896.long 4250959779,4250959779
1897.long 2670068215,2670068215
1898.long 3170202204,3170202204
1899.long 3309004356,3309004356
1900.long 880737115,880737115
1901.long 1982415755,1982415755
1902.long 3703972811,3703972811
1903.long 1761406390,1761406390
1904.long 1676797112,1676797112
1905.long 3403428311,3403428311
1906.long 277177154,277177154
1907.long 1076008723,1076008723
1908.long 538035844,538035844
1909.long 2099530373,2099530373
1910.long 4164795346,4164795346
1911.long 288553390,288553390
1912.long 1839278535,1839278535
1913.long 1261411869,1261411869
1914.long 4080055004,4080055004
1915.long 3964831245,3964831245
1916.long 3504587127,3504587127
1917.long 1813426987,1813426987
1918.long 2579067049,2579067049
1919.long 4199060497,4199060497
1920.long 577038663,577038663
1921.long 3297574056,3297574056
1922.long 440397984,440397984
1923.long 3626794326,3626794326
1924.long 4019204898,4019204898
1925.long 3343796615,3343796615
1926.long 3251714265,3251714265
1927.long 4272081548,4272081548
1928.long 906744984,906744984
1929.long 3481400742,3481400742
1930.long 685669029,685669029
1931.long 646887386,646887386
1932.long 2764025151,2764025151
1933.long 3835509292,3835509292
1934.long 227702864,227702864
1935.long 2613862250,2613862250
1936.long 1648787028,1648787028
1937.long 3256061430,3256061430
1938.long 3904428176,3904428176
1939.long 1593260334,1593260334
1940.long 4121936770,4121936770
1941.long 3196083615,3196083615
1942.long 2090061929,2090061929
1943.long 2838353263,2838353263
1944.long 3004310991,3004310991
1945.long 999926984,999926984
1946.long 2809993232,2809993232
1947.long 1852021992,1852021992
1948.long 2075868123,2075868123
1949.long 158869197,158869197
1950.long 4095236462,4095236462
1951.long 28809964,28809964
1952.long 2828685187,2828685187
1953.long 1701746150,1701746150
1954.long 2129067946,2129067946
1955.long 147831841,147831841
1956.long 3873969647,3873969647
1957.long 3650873274,3650873274
1958.long 3459673930,3459673930
1959.long 3557400554,3557400554
1960.long 3598495785,3598495785
1961.long 2947720241,2947720241
1962.long 824393514,824393514
1963.long 815048134,815048134
1964.long 3227951669,3227951669
1965.long 935087732,935087732
1966.long 2798289660,2798289660
1967.long 2966458592,2966458592
1968.long 366520115,366520115
1969.long 1251476721,1251476721
1970.long 4158319681,4158319681
1971.long 240176511,240176511
1972.long 804688151,804688151
1973.long 2379631990,2379631990
1974.long 1303441219,1303441219
1975.long 1414376140,1414376140
1976.long 3741619940,3741619940
1977.long 3820343710,3820343710
1978.long 461924940,461924940
1979.long 3089050817,3089050817
1980.long 2136040774,2136040774
1981.long 82468509,82468509
1982.long 1563790337,1563790337
1983.long 1937016826,1937016826
1984.long 776014843,776014843
1985.long 1511876531,1511876531
1986.long 1389550482,1389550482
1987.long 861278441,861278441
1988.long 323475053,323475053
1989.long 2355222426,2355222426
1990.long 2047648055,2047648055
1991.long 2383738969,2383738969
1992.long 2302415851,2302415851
1993.long 3995576782,3995576782
1994.long 902390199,902390199
1995.long 3991215329,3991215329
1996.long 1018251130,1018251130
1997.long 1507840668,1507840668
1998.long 1064563285,1064563285
1999.long 2043548696,2043548696
2000.long 3208103795,3208103795
2001.long 3939366739,3939366739
2002.long 1537932639,1537932639
2003.long 342834655,342834655
2004.long 2262516856,2262516856
2005.long 2180231114,2180231114
2006.long 1053059257,1053059257
2007.long 741614648,741614648
2008.long 1598071746,1598071746
2009.long 1925389590,1925389590
2010.long 203809468,203809468
2011.long 2336832552,2336832552
2012.long 1100287487,1100287487
2013.long 1895934009,1895934009
2014.long 3736275976,3736275976
2015.long 2632234200,2632234200
2016.long 2428589668,2428589668
2017.long 1636092795,1636092795
2018.long 1890988757,1890988757
2019.long 1952214088,1952214088
2020.long 1113045200,1113045200
2021.byte 82,9,106,213,48,54,165,56
2022.byte 191,64,163,158,129,243,215,251
2023.byte 124,227,57,130,155,47,255,135
2024.byte 52,142,67,68,196,222,233,203
2025.byte 84,123,148,50,166,194,35,61
2026.byte 238,76,149,11,66,250,195,78
2027.byte 8,46,161,102,40,217,36,178
2028.byte 118,91,162,73,109,139,209,37
2029.byte 114,248,246,100,134,104,152,22
2030.byte 212,164,92,204,93,101,182,146
2031.byte 108,112,72,80,253,237,185,218
2032.byte 94,21,70,87,167,141,157,132
2033.byte 144,216,171,0,140,188,211,10
2034.byte 247,228,88,5,184,179,69,6
2035.byte 208,44,30,143,202,63,15,2
2036.byte 193,175,189,3,1,19,138,107
2037.byte 58,145,17,65,79,103,220,234
2038.byte 151,242,207,206,240,180,230,115
2039.byte 150,172,116,34,231,173,53,133
2040.byte 226,249,55,232,28,117,223,110
2041.byte 71,241,26,113,29,41,197,137
2042.byte 111,183,98,14,170,24,190,27
2043.byte 252,86,62,75,198,210,121,32
2044.byte 154,219,192,254,120,205,90,244
2045.byte 31,221,168,51,136,7,199,49
2046.byte 177,18,16,89,39,128,236,95
2047.byte 96,81,127,169,25,181,74,13
2048.byte 45,229,122,159,147,201,156,239
2049.byte 160,224,59,77,174,42,245,176
2050.byte 200,235,187,60,131,83,153,97
2051.byte 23,43,4,126,186,119,214,38
2052.byte 225,105,20,99,85,33,12,125
2053.byte 82,9,106,213,48,54,165,56
2054.byte 191,64,163,158,129,243,215,251
2055.byte 124,227,57,130,155,47,255,135
2056.byte 52,142,67,68,196,222,233,203
2057.byte 84,123,148,50,166,194,35,61
2058.byte 238,76,149,11,66,250,195,78
2059.byte 8,46,161,102,40,217,36,178
2060.byte 118,91,162,73,109,139,209,37
2061.byte 114,248,246,100,134,104,152,22
2062.byte 212,164,92,204,93,101,182,146
2063.byte 108,112,72,80,253,237,185,218
2064.byte 94,21,70,87,167,141,157,132
2065.byte 144,216,171,0,140,188,211,10
2066.byte 247,228,88,5,184,179,69,6
2067.byte 208,44,30,143,202,63,15,2
2068.byte 193,175,189,3,1,19,138,107
2069.byte 58,145,17,65,79,103,220,234
2070.byte 151,242,207,206,240,180,230,115
2071.byte 150,172,116,34,231,173,53,133
2072.byte 226,249,55,232,28,117,223,110
2073.byte 71,241,26,113,29,41,197,137
2074.byte 111,183,98,14,170,24,190,27
2075.byte 252,86,62,75,198,210,121,32
2076.byte 154,219,192,254,120,205,90,244
2077.byte 31,221,168,51,136,7,199,49
2078.byte 177,18,16,89,39,128,236,95
2079.byte 96,81,127,169,25,181,74,13
2080.byte 45,229,122,159,147,201,156,239
2081.byte 160,224,59,77,174,42,245,176
2082.byte 200,235,187,60,131,83,153,97
2083.byte 23,43,4,126,186,119,214,38
2084.byte 225,105,20,99,85,33,12,125
2085.byte 82,9,106,213,48,54,165,56
2086.byte 191,64,163,158,129,243,215,251
2087.byte 124,227,57,130,155,47,255,135
2088.byte 52,142,67,68,196,222,233,203
2089.byte 84,123,148,50,166,194,35,61
2090.byte 238,76,149,11,66,250,195,78
2091.byte 8,46,161,102,40,217,36,178
2092.byte 118,91,162,73,109,139,209,37
2093.byte 114,248,246,100,134,104,152,22
2094.byte 212,164,92,204,93,101,182,146
2095.byte 108,112,72,80,253,237,185,218
2096.byte 94,21,70,87,167,141,157,132
2097.byte 144,216,171,0,140,188,211,10
2098.byte 247,228,88,5,184,179,69,6
2099.byte 208,44,30,143,202,63,15,2
2100.byte 193,175,189,3,1,19,138,107
2101.byte 58,145,17,65,79,103,220,234
2102.byte 151,242,207,206,240,180,230,115
2103.byte 150,172,116,34,231,173,53,133
2104.byte 226,249,55,232,28,117,223,110
2105.byte 71,241,26,113,29,41,197,137
2106.byte 111,183,98,14,170,24,190,27
2107.byte 252,86,62,75,198,210,121,32
2108.byte 154,219,192,254,120,205,90,244
2109.byte 31,221,168,51,136,7,199,49
2110.byte 177,18,16,89,39,128,236,95
2111.byte 96,81,127,169,25,181,74,13
2112.byte 45,229,122,159,147,201,156,239
2113.byte 160,224,59,77,174,42,245,176
2114.byte 200,235,187,60,131,83,153,97
2115.byte 23,43,4,126,186,119,214,38
2116.byte 225,105,20,99,85,33,12,125
2117.byte 82,9,106,213,48,54,165,56
2118.byte 191,64,163,158,129,243,215,251
2119.byte 124,227,57,130,155,47,255,135
2120.byte 52,142,67,68,196,222,233,203
2121.byte 84,123,148,50,166,194,35,61
2122.byte 238,76,149,11,66,250,195,78
2123.byte 8,46,161,102,40,217,36,178
2124.byte 118,91,162,73,109,139,209,37
2125.byte 114,248,246,100,134,104,152,22
2126.byte 212,164,92,204,93,101,182,146
2127.byte 108,112,72,80,253,237,185,218
2128.byte 94,21,70,87,167,141,157,132
2129.byte 144,216,171,0,140,188,211,10
2130.byte 247,228,88,5,184,179,69,6
2131.byte 208,44,30,143,202,63,15,2
2132.byte 193,175,189,3,1,19,138,107
2133.byte 58,145,17,65,79,103,220,234
2134.byte 151,242,207,206,240,180,230,115
2135.byte 150,172,116,34,231,173,53,133
2136.byte 226,249,55,232,28,117,223,110
2137.byte 71,241,26,113,29,41,197,137
2138.byte 111,183,98,14,170,24,190,27
2139.byte 252,86,62,75,198,210,121,32
2140.byte 154,219,192,254,120,205,90,244
2141.byte 31,221,168,51,136,7,199,49
2142.byte 177,18,16,89,39,128,236,95
2143.byte 96,81,127,169,25,181,74,13
2144.byte 45,229,122,159,147,201,156,239
2145.byte 160,224,59,77,174,42,245,176
2146.byte 200,235,187,60,131,83,153,97
2147.byte 23,43,4,126,186,119,214,38
2148.byte 225,105,20,99,85,33,12,125
2149.globl _asm_AES_decrypt
2150.private_extern _asm_AES_decrypt
2151.align 4
2152_asm_AES_decrypt:
2153L_asm_AES_decrypt_begin:
2154 pushl %ebp
2155 pushl %ebx
2156 pushl %esi
2157 pushl %edi
2158 movl 20(%esp),%esi
2159 movl 28(%esp),%edi
2160 movl %esp,%eax
2161 subl $36,%esp
2162 andl $-64,%esp
2163 leal -127(%edi),%ebx
2164 subl %esp,%ebx
2165 negl %ebx
2166 andl $960,%ebx
2167 subl %ebx,%esp
2168 addl $4,%esp
2169 movl %eax,28(%esp)
2170 call L010pic_point
2171L010pic_point:
2172 popl %ebp
2173 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L010pic_point(%ebp),%eax
2174 leal LAES_Td-L010pic_point(%ebp),%ebp
2175 leal 764(%esp),%ebx
2176 subl %ebp,%ebx
2177 andl $768,%ebx
2178 leal 2176(%ebp,%ebx,1),%ebp
2179 btl $25,(%eax)
2180 jnc L011x86
2181 movq (%esi),%mm0
2182 movq 8(%esi),%mm4
2183 call __sse_AES_decrypt_compact
2184 movl 28(%esp),%esp
2185 movl 24(%esp),%esi
2186 movq %mm0,(%esi)
2187 movq %mm4,8(%esi)
2188 emms
2189 popl %edi
2190 popl %esi
2191 popl %ebx
2192 popl %ebp
2193 ret
2194.align 4,0x90
2195L011x86:
2196 movl %ebp,24(%esp)
2197 movl (%esi),%eax
2198 movl 4(%esi),%ebx
2199 movl 8(%esi),%ecx
2200 movl 12(%esi),%edx
2201 call __x86_AES_decrypt_compact
2202 movl 28(%esp),%esp
2203 movl 24(%esp),%esi
2204 movl %eax,(%esi)
2205 movl %ebx,4(%esi)
2206 movl %ecx,8(%esi)
2207 movl %edx,12(%esi)
2208 popl %edi
2209 popl %esi
2210 popl %ebx
2211 popl %ebp
2212 ret
2213.globl _asm_AES_cbc_encrypt
2214.private_extern _asm_AES_cbc_encrypt
2215.align 4
2216_asm_AES_cbc_encrypt:
2217L_asm_AES_cbc_encrypt_begin:
2218 pushl %ebp
2219 pushl %ebx
2220 pushl %esi
2221 pushl %edi
2222 movl 28(%esp),%ecx
2223 cmpl $0,%ecx
2224 je L012drop_out
2225 call L013pic_point
2226L013pic_point:
2227 popl %ebp
2228 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L013pic_point(%ebp),%eax
2229 cmpl $0,40(%esp)
2230 leal LAES_Te-L013pic_point(%ebp),%ebp
2231 jne L014picked_te
2232 leal LAES_Td-LAES_Te(%ebp),%ebp
2233L014picked_te:
2234 pushfl
2235 cld
2236 cmpl $512,%ecx
2237 jb L015slow_way
2238 testl $15,%ecx
2239 jnz L015slow_way
2240 btl $28,(%eax)
2241 jc L015slow_way
2242 leal -324(%esp),%esi
2243 andl $-64,%esi
2244 movl %ebp,%eax
2245 leal 2304(%ebp),%ebx
2246 movl %esi,%edx
2247 andl $4095,%eax
2248 andl $4095,%ebx
2249 andl $4095,%edx
2250 cmpl %ebx,%edx
2251 jb L016tbl_break_out
2252 subl %ebx,%edx
2253 subl %edx,%esi
2254 jmp L017tbl_ok
2255.align 2,0x90
2256L016tbl_break_out:
2257 subl %eax,%edx
2258 andl $4095,%edx
2259 addl $384,%edx
2260 subl %edx,%esi
2261.align 2,0x90
2262L017tbl_ok:
2263 leal 24(%esp),%edx
2264 xchgl %esi,%esp
2265 addl $4,%esp
2266 movl %ebp,24(%esp)
2267 movl %esi,28(%esp)
2268 movl (%edx),%eax
2269 movl 4(%edx),%ebx
2270 movl 12(%edx),%edi
2271 movl 16(%edx),%esi
2272 movl 20(%edx),%edx
2273 movl %eax,32(%esp)
2274 movl %ebx,36(%esp)
2275 movl %ecx,40(%esp)
2276 movl %edi,44(%esp)
2277 movl %esi,48(%esp)
2278 movl $0,316(%esp)
2279 movl %edi,%ebx
2280 movl $61,%ecx
2281 subl %ebp,%ebx
2282 movl %edi,%esi
2283 andl $4095,%ebx
2284 leal 76(%esp),%edi
2285 cmpl $2304,%ebx
2286 jb L018do_copy
2287 cmpl $3852,%ebx
2288 jb L019skip_copy
2289.align 2,0x90
2290L018do_copy:
2291 movl %edi,44(%esp)
2292.long 2784229001
2293L019skip_copy:
2294 movl $16,%edi
2295.align 2,0x90
2296L020prefetch_tbl:
2297 movl (%ebp),%eax
2298 movl 32(%ebp),%ebx
2299 movl 64(%ebp),%ecx
2300 movl 96(%ebp),%esi
2301 leal 128(%ebp),%ebp
2302 subl $1,%edi
2303 jnz L020prefetch_tbl
2304 subl $2048,%ebp
2305 movl 32(%esp),%esi
2306 movl 48(%esp),%edi
2307 cmpl $0,%edx
2308 je L021fast_decrypt
2309 movl (%edi),%eax
2310 movl 4(%edi),%ebx
2311.align 4,0x90
2312L022fast_enc_loop:
2313 movl 8(%edi),%ecx
2314 movl 12(%edi),%edx
2315 xorl (%esi),%eax
2316 xorl 4(%esi),%ebx
2317 xorl 8(%esi),%ecx
2318 xorl 12(%esi),%edx
2319 movl 44(%esp),%edi
2320 call __x86_AES_encrypt
2321 movl 32(%esp),%esi
2322 movl 36(%esp),%edi
2323 movl %eax,(%edi)
2324 movl %ebx,4(%edi)
2325 movl %ecx,8(%edi)
2326 movl %edx,12(%edi)
2327 leal 16(%esi),%esi
2328 movl 40(%esp),%ecx
2329 movl %esi,32(%esp)
2330 leal 16(%edi),%edx
2331 movl %edx,36(%esp)
2332 subl $16,%ecx
2333 movl %ecx,40(%esp)
2334 jnz L022fast_enc_loop
2335 movl 48(%esp),%esi
2336 movl 8(%edi),%ecx
2337 movl 12(%edi),%edx
2338 movl %eax,(%esi)
2339 movl %ebx,4(%esi)
2340 movl %ecx,8(%esi)
2341 movl %edx,12(%esi)
2342 cmpl $0,316(%esp)
2343 movl 44(%esp),%edi
2344 je L023skip_ezero
2345 movl $60,%ecx
2346 xorl %eax,%eax
2347.align 2,0x90
2348.long 2884892297
2349L023skip_ezero:
2350 movl 28(%esp),%esp
2351 popfl
2352L012drop_out:
2353 popl %edi
2354 popl %esi
2355 popl %ebx
2356 popl %ebp
2357 ret
2358 pushfl
2359.align 4,0x90
2360L021fast_decrypt:
2361 cmpl 36(%esp),%esi
2362 je L024fast_dec_in_place
2363 movl %edi,52(%esp)
2364.align 2,0x90
2365.align 4,0x90
2366L025fast_dec_loop:
2367 movl (%esi),%eax
2368 movl 4(%esi),%ebx
2369 movl 8(%esi),%ecx
2370 movl 12(%esi),%edx
2371 movl 44(%esp),%edi
2372 call __x86_AES_decrypt
2373 movl 52(%esp),%edi
2374 movl 40(%esp),%esi
2375 xorl (%edi),%eax
2376 xorl 4(%edi),%ebx
2377 xorl 8(%edi),%ecx
2378 xorl 12(%edi),%edx
2379 movl 36(%esp),%edi
2380 movl 32(%esp),%esi
2381 movl %eax,(%edi)
2382 movl %ebx,4(%edi)
2383 movl %ecx,8(%edi)
2384 movl %edx,12(%edi)
2385 movl 40(%esp),%ecx
2386 movl %esi,52(%esp)
2387 leal 16(%esi),%esi
2388 movl %esi,32(%esp)
2389 leal 16(%edi),%edi
2390 movl %edi,36(%esp)
2391 subl $16,%ecx
2392 movl %ecx,40(%esp)
2393 jnz L025fast_dec_loop
2394 movl 52(%esp),%edi
2395 movl 48(%esp),%esi
2396 movl (%edi),%eax
2397 movl 4(%edi),%ebx
2398 movl 8(%edi),%ecx
2399 movl 12(%edi),%edx
2400 movl %eax,(%esi)
2401 movl %ebx,4(%esi)
2402 movl %ecx,8(%esi)
2403 movl %edx,12(%esi)
2404 jmp L026fast_dec_out
2405.align 4,0x90
2406L024fast_dec_in_place:
2407L027fast_dec_in_place_loop:
2408 movl (%esi),%eax
2409 movl 4(%esi),%ebx
2410 movl 8(%esi),%ecx
2411 movl 12(%esi),%edx
2412 leal 60(%esp),%edi
2413 movl %eax,(%edi)
2414 movl %ebx,4(%edi)
2415 movl %ecx,8(%edi)
2416 movl %edx,12(%edi)
2417 movl 44(%esp),%edi
2418 call __x86_AES_decrypt
2419 movl 48(%esp),%edi
2420 movl 36(%esp),%esi
2421 xorl (%edi),%eax
2422 xorl 4(%edi),%ebx
2423 xorl 8(%edi),%ecx
2424 xorl 12(%edi),%edx
2425 movl %eax,(%esi)
2426 movl %ebx,4(%esi)
2427 movl %ecx,8(%esi)
2428 movl %edx,12(%esi)
2429 leal 16(%esi),%esi
2430 movl %esi,36(%esp)
2431 leal 60(%esp),%esi
2432 movl (%esi),%eax
2433 movl 4(%esi),%ebx
2434 movl 8(%esi),%ecx
2435 movl 12(%esi),%edx
2436 movl %eax,(%edi)
2437 movl %ebx,4(%edi)
2438 movl %ecx,8(%edi)
2439 movl %edx,12(%edi)
2440 movl 32(%esp),%esi
2441 movl 40(%esp),%ecx
2442 leal 16(%esi),%esi
2443 movl %esi,32(%esp)
2444 subl $16,%ecx
2445 movl %ecx,40(%esp)
2446 jnz L027fast_dec_in_place_loop
2447.align 2,0x90
2448L026fast_dec_out:
2449 cmpl $0,316(%esp)
2450 movl 44(%esp),%edi
2451 je L028skip_dzero
2452 movl $60,%ecx
2453 xorl %eax,%eax
2454.align 2,0x90
2455.long 2884892297
2456L028skip_dzero:
2457 movl 28(%esp),%esp
2458 popfl
2459 popl %edi
2460 popl %esi
2461 popl %ebx
2462 popl %ebp
2463 ret
2464 pushfl
2465.align 4,0x90
2466L015slow_way:
2467 movl (%eax),%eax
2468 movl 36(%esp),%edi
2469 leal -80(%esp),%esi
2470 andl $-64,%esi
2471 leal -143(%edi),%ebx
2472 subl %esi,%ebx
2473 negl %ebx
2474 andl $960,%ebx
2475 subl %ebx,%esi
2476 leal 768(%esi),%ebx
2477 subl %ebp,%ebx
2478 andl $768,%ebx
2479 leal 2176(%ebp,%ebx,1),%ebp
2480 leal 24(%esp),%edx
2481 xchgl %esi,%esp
2482 addl $4,%esp
2483 movl %ebp,24(%esp)
2484 movl %esi,28(%esp)
2485 movl %eax,52(%esp)
2486 movl (%edx),%eax
2487 movl 4(%edx),%ebx
2488 movl 16(%edx),%esi
2489 movl 20(%edx),%edx
2490 movl %eax,32(%esp)
2491 movl %ebx,36(%esp)
2492 movl %ecx,40(%esp)
2493 movl %edi,44(%esp)
2494 movl %esi,48(%esp)
2495 movl %esi,%edi
2496 movl %eax,%esi
2497 cmpl $0,%edx
2498 je L029slow_decrypt
2499 cmpl $16,%ecx
2500 movl %ebx,%edx
2501 jb L030slow_enc_tail
2502 btl $25,52(%esp)
2503 jnc L031slow_enc_x86
2504 movq (%edi),%mm0
2505 movq 8(%edi),%mm4
2506.align 4,0x90
2507L032slow_enc_loop_sse:
2508 pxor (%esi),%mm0
2509 pxor 8(%esi),%mm4
2510 movl 44(%esp),%edi
2511 call __sse_AES_encrypt_compact
2512 movl 32(%esp),%esi
2513 movl 36(%esp),%edi
2514 movl 40(%esp),%ecx
2515 movq %mm0,(%edi)
2516 movq %mm4,8(%edi)
2517 leal 16(%esi),%esi
2518 movl %esi,32(%esp)
2519 leal 16(%edi),%edx
2520 movl %edx,36(%esp)
2521 subl $16,%ecx
2522 cmpl $16,%ecx
2523 movl %ecx,40(%esp)
2524 jae L032slow_enc_loop_sse
2525 testl $15,%ecx
2526 jnz L030slow_enc_tail
2527 movl 48(%esp),%esi
2528 movq %mm0,(%esi)
2529 movq %mm4,8(%esi)
2530 emms
2531 movl 28(%esp),%esp
2532 popfl
2533 popl %edi
2534 popl %esi
2535 popl %ebx
2536 popl %ebp
2537 ret
2538 pushfl
2539.align 4,0x90
2540L031slow_enc_x86:
2541 movl (%edi),%eax
2542 movl 4(%edi),%ebx
2543.align 2,0x90
2544L033slow_enc_loop_x86:
2545 movl 8(%edi),%ecx
2546 movl 12(%edi),%edx
2547 xorl (%esi),%eax
2548 xorl 4(%esi),%ebx
2549 xorl 8(%esi),%ecx
2550 xorl 12(%esi),%edx
2551 movl 44(%esp),%edi
2552 call __x86_AES_encrypt_compact
2553 movl 32(%esp),%esi
2554 movl 36(%esp),%edi
2555 movl %eax,(%edi)
2556 movl %ebx,4(%edi)
2557 movl %ecx,8(%edi)
2558 movl %edx,12(%edi)
2559 movl 40(%esp),%ecx
2560 leal 16(%esi),%esi
2561 movl %esi,32(%esp)
2562 leal 16(%edi),%edx
2563 movl %edx,36(%esp)
2564 subl $16,%ecx
2565 cmpl $16,%ecx
2566 movl %ecx,40(%esp)
2567 jae L033slow_enc_loop_x86
2568 testl $15,%ecx
2569 jnz L030slow_enc_tail
2570 movl 48(%esp),%esi
2571 movl 8(%edi),%ecx
2572 movl 12(%edi),%edx
2573 movl %eax,(%esi)
2574 movl %ebx,4(%esi)
2575 movl %ecx,8(%esi)
2576 movl %edx,12(%esi)
2577 movl 28(%esp),%esp
2578 popfl
2579 popl %edi
2580 popl %esi
2581 popl %ebx
2582 popl %ebp
2583 ret
2584 pushfl
2585.align 4,0x90
2586L030slow_enc_tail:
2587 emms
2588 movl %edx,%edi
2589 movl $16,%ebx
2590 subl %ecx,%ebx
2591 cmpl %esi,%edi
2592 je L034enc_in_place
2593.align 2,0x90
2594.long 2767451785
2595 jmp L035enc_skip_in_place
2596L034enc_in_place:
2597 leal (%edi,%ecx,1),%edi
2598L035enc_skip_in_place:
2599 movl %ebx,%ecx
2600 xorl %eax,%eax
2601.align 2,0x90
2602.long 2868115081
2603 movl 48(%esp),%edi
2604 movl %edx,%esi
2605 movl (%edi),%eax
2606 movl 4(%edi),%ebx
2607 movl $16,40(%esp)
2608 jmp L033slow_enc_loop_x86
2609.align 4,0x90
2610L029slow_decrypt:
2611 btl $25,52(%esp)
2612 jnc L036slow_dec_loop_x86
2613.align 2,0x90
2614L037slow_dec_loop_sse:
2615 movq (%esi),%mm0
2616 movq 8(%esi),%mm4
2617 movl 44(%esp),%edi
2618 call __sse_AES_decrypt_compact
2619 movl 32(%esp),%esi
2620 leal 60(%esp),%eax
2621 movl 36(%esp),%ebx
2622 movl 40(%esp),%ecx
2623 movl 48(%esp),%edi
2624 movq (%esi),%mm1
2625 movq 8(%esi),%mm5
2626 pxor (%edi),%mm0
2627 pxor 8(%edi),%mm4
2628 movq %mm1,(%edi)
2629 movq %mm5,8(%edi)
2630 subl $16,%ecx
2631 jc L038slow_dec_partial_sse
2632 movq %mm0,(%ebx)
2633 movq %mm4,8(%ebx)
2634 leal 16(%ebx),%ebx
2635 movl %ebx,36(%esp)
2636 leal 16(%esi),%esi
2637 movl %esi,32(%esp)
2638 movl %ecx,40(%esp)
2639 jnz L037slow_dec_loop_sse
2640 emms
2641 movl 28(%esp),%esp
2642 popfl
2643 popl %edi
2644 popl %esi
2645 popl %ebx
2646 popl %ebp
2647 ret
2648 pushfl
2649.align 4,0x90
2650L038slow_dec_partial_sse:
2651 movq %mm0,(%eax)
2652 movq %mm4,8(%eax)
2653 emms
2654 addl $16,%ecx
2655 movl %ebx,%edi
2656 movl %eax,%esi
2657.align 2,0x90
2658.long 2767451785
2659 movl 28(%esp),%esp
2660 popfl
2661 popl %edi
2662 popl %esi
2663 popl %ebx
2664 popl %ebp
2665 ret
2666 pushfl
2667.align 4,0x90
2668L036slow_dec_loop_x86:
2669 movl (%esi),%eax
2670 movl 4(%esi),%ebx
2671 movl 8(%esi),%ecx
2672 movl 12(%esi),%edx
2673 leal 60(%esp),%edi
2674 movl %eax,(%edi)
2675 movl %ebx,4(%edi)
2676 movl %ecx,8(%edi)
2677 movl %edx,12(%edi)
2678 movl 44(%esp),%edi
2679 call __x86_AES_decrypt_compact
2680 movl 48(%esp),%edi
2681 movl 40(%esp),%esi
2682 xorl (%edi),%eax
2683 xorl 4(%edi),%ebx
2684 xorl 8(%edi),%ecx
2685 xorl 12(%edi),%edx
2686 subl $16,%esi
2687 jc L039slow_dec_partial_x86
2688 movl %esi,40(%esp)
2689 movl 36(%esp),%esi
2690 movl %eax,(%esi)
2691 movl %ebx,4(%esi)
2692 movl %ecx,8(%esi)
2693 movl %edx,12(%esi)
2694 leal 16(%esi),%esi
2695 movl %esi,36(%esp)
2696 leal 60(%esp),%esi
2697 movl (%esi),%eax
2698 movl 4(%esi),%ebx
2699 movl 8(%esi),%ecx
2700 movl 12(%esi),%edx
2701 movl %eax,(%edi)
2702 movl %ebx,4(%edi)
2703 movl %ecx,8(%edi)
2704 movl %edx,12(%edi)
2705 movl 32(%esp),%esi
2706 leal 16(%esi),%esi
2707 movl %esi,32(%esp)
2708 jnz L036slow_dec_loop_x86
2709 movl 28(%esp),%esp
2710 popfl
2711 popl %edi
2712 popl %esi
2713 popl %ebx
2714 popl %ebp
2715 ret
2716 pushfl
2717.align 4,0x90
2718L039slow_dec_partial_x86:
2719 leal 60(%esp),%esi
2720 movl %eax,(%esi)
2721 movl %ebx,4(%esi)
2722 movl %ecx,8(%esi)
2723 movl %edx,12(%esi)
2724 movl 32(%esp),%esi
2725 movl (%esi),%eax
2726 movl 4(%esi),%ebx
2727 movl 8(%esi),%ecx
2728 movl 12(%esi),%edx
2729 movl %eax,(%edi)
2730 movl %ebx,4(%edi)
2731 movl %ecx,8(%edi)
2732 movl %edx,12(%edi)
2733 movl 40(%esp),%ecx
2734 movl 36(%esp),%edi
2735 leal 60(%esp),%esi
2736.align 2,0x90
2737.long 2767451785
2738 movl 28(%esp),%esp
2739 popfl
2740 popl %edi
2741 popl %esi
2742 popl %ebx
2743 popl %ebp
2744 ret
2745.private_extern __x86_AES_set_encrypt_key
2746.align 4
2747__x86_AES_set_encrypt_key:
2748 pushl %ebp
2749 pushl %ebx
2750 pushl %esi
2751 pushl %edi
2752 movl 24(%esp),%esi
2753 movl 32(%esp),%edi
2754 testl $-1,%esi
2755 jz L040badpointer
2756 testl $-1,%edi
2757 jz L040badpointer
2758 call L041pic_point
2759L041pic_point:
2760 popl %ebp
2761 leal LAES_Te-L041pic_point(%ebp),%ebp
2762 leal 2176(%ebp),%ebp
2763 movl -128(%ebp),%eax
2764 movl -96(%ebp),%ebx
2765 movl -64(%ebp),%ecx
2766 movl -32(%ebp),%edx
2767 movl (%ebp),%eax
2768 movl 32(%ebp),%ebx
2769 movl 64(%ebp),%ecx
2770 movl 96(%ebp),%edx
2771 movl 28(%esp),%ecx
2772 cmpl $128,%ecx
2773 je L04210rounds
2774 cmpl $192,%ecx
2775 je L04312rounds
2776 cmpl $256,%ecx
2777 je L04414rounds
2778 movl $-2,%eax
2779 jmp L045exit
2780L04210rounds:
2781 movl (%esi),%eax
2782 movl 4(%esi),%ebx
2783 movl 8(%esi),%ecx
2784 movl 12(%esi),%edx
2785 movl %eax,(%edi)
2786 movl %ebx,4(%edi)
2787 movl %ecx,8(%edi)
2788 movl %edx,12(%edi)
2789 xorl %ecx,%ecx
2790 jmp L04610shortcut
2791.align 2,0x90
2792L04710loop:
2793 movl (%edi),%eax
2794 movl 12(%edi),%edx
2795L04610shortcut:
2796 movzbl %dl,%esi
2797 movzbl -128(%ebp,%esi,1),%ebx
2798 movzbl %dh,%esi
2799 shll $24,%ebx
2800 xorl %ebx,%eax
2801 movzbl -128(%ebp,%esi,1),%ebx
2802 shrl $16,%edx
2803 movzbl %dl,%esi
2804 xorl %ebx,%eax
2805 movzbl -128(%ebp,%esi,1),%ebx
2806 movzbl %dh,%esi
2807 shll $8,%ebx
2808 xorl %ebx,%eax
2809 movzbl -128(%ebp,%esi,1),%ebx
2810 shll $16,%ebx
2811 xorl %ebx,%eax
2812 xorl 896(%ebp,%ecx,4),%eax
2813 movl %eax,16(%edi)
2814 xorl 4(%edi),%eax
2815 movl %eax,20(%edi)
2816 xorl 8(%edi),%eax
2817 movl %eax,24(%edi)
2818 xorl 12(%edi),%eax
2819 movl %eax,28(%edi)
2820 incl %ecx
2821 addl $16,%edi
2822 cmpl $10,%ecx
2823 jl L04710loop
2824 movl $10,80(%edi)
2825 xorl %eax,%eax
2826 jmp L045exit
2827L04312rounds:
2828 movl (%esi),%eax
2829 movl 4(%esi),%ebx
2830 movl 8(%esi),%ecx
2831 movl 12(%esi),%edx
2832 movl %eax,(%edi)
2833 movl %ebx,4(%edi)
2834 movl %ecx,8(%edi)
2835 movl %edx,12(%edi)
2836 movl 16(%esi),%ecx
2837 movl 20(%esi),%edx
2838 movl %ecx,16(%edi)
2839 movl %edx,20(%edi)
2840 xorl %ecx,%ecx
2841 jmp L04812shortcut
2842.align 2,0x90
2843L04912loop:
2844 movl (%edi),%eax
2845 movl 20(%edi),%edx
2846L04812shortcut:
2847 movzbl %dl,%esi
2848 movzbl -128(%ebp,%esi,1),%ebx
2849 movzbl %dh,%esi
2850 shll $24,%ebx
2851 xorl %ebx,%eax
2852 movzbl -128(%ebp,%esi,1),%ebx
2853 shrl $16,%edx
2854 movzbl %dl,%esi
2855 xorl %ebx,%eax
2856 movzbl -128(%ebp,%esi,1),%ebx
2857 movzbl %dh,%esi
2858 shll $8,%ebx
2859 xorl %ebx,%eax
2860 movzbl -128(%ebp,%esi,1),%ebx
2861 shll $16,%ebx
2862 xorl %ebx,%eax
2863 xorl 896(%ebp,%ecx,4),%eax
2864 movl %eax,24(%edi)
2865 xorl 4(%edi),%eax
2866 movl %eax,28(%edi)
2867 xorl 8(%edi),%eax
2868 movl %eax,32(%edi)
2869 xorl 12(%edi),%eax
2870 movl %eax,36(%edi)
2871 cmpl $7,%ecx
2872 je L05012break
2873 incl %ecx
2874 xorl 16(%edi),%eax
2875 movl %eax,40(%edi)
2876 xorl 20(%edi),%eax
2877 movl %eax,44(%edi)
2878 addl $24,%edi
2879 jmp L04912loop
2880L05012break:
2881 movl $12,72(%edi)
2882 xorl %eax,%eax
2883 jmp L045exit
2884L04414rounds:
2885 movl (%esi),%eax
2886 movl 4(%esi),%ebx
2887 movl 8(%esi),%ecx
2888 movl 12(%esi),%edx
2889 movl %eax,(%edi)
2890 movl %ebx,4(%edi)
2891 movl %ecx,8(%edi)
2892 movl %edx,12(%edi)
2893 movl 16(%esi),%eax
2894 movl 20(%esi),%ebx
2895 movl 24(%esi),%ecx
2896 movl 28(%esi),%edx
2897 movl %eax,16(%edi)
2898 movl %ebx,20(%edi)
2899 movl %ecx,24(%edi)
2900 movl %edx,28(%edi)
2901 xorl %ecx,%ecx
2902 jmp L05114shortcut
2903.align 2,0x90
2904L05214loop:
2905 movl 28(%edi),%edx
2906L05114shortcut:
2907 movl (%edi),%eax
2908 movzbl %dl,%esi
2909 movzbl -128(%ebp,%esi,1),%ebx
2910 movzbl %dh,%esi
2911 shll $24,%ebx
2912 xorl %ebx,%eax
2913 movzbl -128(%ebp,%esi,1),%ebx
2914 shrl $16,%edx
2915 movzbl %dl,%esi
2916 xorl %ebx,%eax
2917 movzbl -128(%ebp,%esi,1),%ebx
2918 movzbl %dh,%esi
2919 shll $8,%ebx
2920 xorl %ebx,%eax
2921 movzbl -128(%ebp,%esi,1),%ebx
2922 shll $16,%ebx
2923 xorl %ebx,%eax
2924 xorl 896(%ebp,%ecx,4),%eax
2925 movl %eax,32(%edi)
2926 xorl 4(%edi),%eax
2927 movl %eax,36(%edi)
2928 xorl 8(%edi),%eax
2929 movl %eax,40(%edi)
2930 xorl 12(%edi),%eax
2931 movl %eax,44(%edi)
2932 cmpl $6,%ecx
2933 je L05314break
2934 incl %ecx
2935 movl %eax,%edx
2936 movl 16(%edi),%eax
2937 movzbl %dl,%esi
2938 movzbl -128(%ebp,%esi,1),%ebx
2939 movzbl %dh,%esi
2940 xorl %ebx,%eax
2941 movzbl -128(%ebp,%esi,1),%ebx
2942 shrl $16,%edx
2943 shll $8,%ebx
2944 movzbl %dl,%esi
2945 xorl %ebx,%eax
2946 movzbl -128(%ebp,%esi,1),%ebx
2947 movzbl %dh,%esi
2948 shll $16,%ebx
2949 xorl %ebx,%eax
2950 movzbl -128(%ebp,%esi,1),%ebx
2951 shll $24,%ebx
2952 xorl %ebx,%eax
2953 movl %eax,48(%edi)
2954 xorl 20(%edi),%eax
2955 movl %eax,52(%edi)
2956 xorl 24(%edi),%eax
2957 movl %eax,56(%edi)
2958 xorl 28(%edi),%eax
2959 movl %eax,60(%edi)
2960 addl $32,%edi
2961 jmp L05214loop
2962L05314break:
2963 movl $14,48(%edi)
2964 xorl %eax,%eax
2965 jmp L045exit
2966L040badpointer:
2967 movl $-1,%eax
2968L045exit:
2969 popl %edi
2970 popl %esi
2971 popl %ebx
2972 popl %ebp
2973 ret
2974.globl _asm_AES_set_encrypt_key
2975.private_extern _asm_AES_set_encrypt_key
2976.align 4
2977_asm_AES_set_encrypt_key:
2978L_asm_AES_set_encrypt_key_begin:
2979 call __x86_AES_set_encrypt_key
2980 ret
2981.globl _asm_AES_set_decrypt_key
2982.private_extern _asm_AES_set_decrypt_key
2983.align 4
2984_asm_AES_set_decrypt_key:
2985L_asm_AES_set_decrypt_key_begin:
2986 call __x86_AES_set_encrypt_key
2987 cmpl $0,%eax
2988 je L054proceed
2989 ret
2990L054proceed:
2991 pushl %ebp
2992 pushl %ebx
2993 pushl %esi
2994 pushl %edi
2995 movl 28(%esp),%esi
2996 movl 240(%esi),%ecx
2997 leal (,%ecx,4),%ecx
2998 leal (%esi,%ecx,4),%edi
2999.align 2,0x90
3000L055invert:
3001 movl (%esi),%eax
3002 movl 4(%esi),%ebx
3003 movl (%edi),%ecx
3004 movl 4(%edi),%edx
3005 movl %eax,(%edi)
3006 movl %ebx,4(%edi)
3007 movl %ecx,(%esi)
3008 movl %edx,4(%esi)
3009 movl 8(%esi),%eax
3010 movl 12(%esi),%ebx
3011 movl 8(%edi),%ecx
3012 movl 12(%edi),%edx
3013 movl %eax,8(%edi)
3014 movl %ebx,12(%edi)
3015 movl %ecx,8(%esi)
3016 movl %edx,12(%esi)
3017 addl $16,%esi
3018 subl $16,%edi
3019 cmpl %edi,%esi
3020 jne L055invert
3021 movl 28(%esp),%edi
3022 movl 240(%edi),%esi
3023 leal -2(%esi,%esi,1),%esi
3024 leal (%edi,%esi,8),%esi
3025 movl %esi,28(%esp)
3026 movl 16(%edi),%eax
3027.align 2,0x90
3028L056permute:
3029 addl $16,%edi
3030 movl $2155905152,%ebp
3031 andl %eax,%ebp
3032 leal (%eax,%eax,1),%ebx
3033 movl %ebp,%esi
3034 shrl $7,%ebp
3035 subl %ebp,%esi
3036 andl $4278124286,%ebx
3037 andl $454761243,%esi
3038 xorl %esi,%ebx
3039 movl $2155905152,%ebp
3040 andl %ebx,%ebp
3041 leal (%ebx,%ebx,1),%ecx
3042 movl %ebp,%esi
3043 shrl $7,%ebp
3044 subl %ebp,%esi
3045 andl $4278124286,%ecx
3046 andl $454761243,%esi
3047 xorl %eax,%ebx
3048 xorl %esi,%ecx
3049 movl $2155905152,%ebp
3050 andl %ecx,%ebp
3051 leal (%ecx,%ecx,1),%edx
3052 movl %ebp,%esi
3053 shrl $7,%ebp
3054 xorl %eax,%ecx
3055 subl %ebp,%esi
3056 andl $4278124286,%edx
3057 andl $454761243,%esi
3058 roll $8,%eax
3059 xorl %esi,%edx
3060 movl 4(%edi),%ebp
3061 xorl %ebx,%eax
3062 xorl %edx,%ebx
3063 xorl %ecx,%eax
3064 roll $24,%ebx
3065 xorl %edx,%ecx
3066 xorl %edx,%eax
3067 roll $16,%ecx
3068 xorl %ebx,%eax
3069 roll $8,%edx
3070 xorl %ecx,%eax
3071 movl %ebp,%ebx
3072 xorl %edx,%eax
3073 movl %eax,(%edi)
3074 movl $2155905152,%ebp
3075 andl %ebx,%ebp
3076 leal (%ebx,%ebx,1),%ecx
3077 movl %ebp,%esi
3078 shrl $7,%ebp
3079 subl %ebp,%esi
3080 andl $4278124286,%ecx
3081 andl $454761243,%esi
3082 xorl %esi,%ecx
3083 movl $2155905152,%ebp
3084 andl %ecx,%ebp
3085 leal (%ecx,%ecx,1),%edx
3086 movl %ebp,%esi
3087 shrl $7,%ebp
3088 subl %ebp,%esi
3089 andl $4278124286,%edx
3090 andl $454761243,%esi
3091 xorl %ebx,%ecx
3092 xorl %esi,%edx
3093 movl $2155905152,%ebp
3094 andl %edx,%ebp
3095 leal (%edx,%edx,1),%eax
3096 movl %ebp,%esi
3097 shrl $7,%ebp
3098 xorl %ebx,%edx
3099 subl %ebp,%esi
3100 andl $4278124286,%eax
3101 andl $454761243,%esi
3102 roll $8,%ebx
3103 xorl %esi,%eax
3104 movl 8(%edi),%ebp
3105 xorl %ecx,%ebx
3106 xorl %eax,%ecx
3107 xorl %edx,%ebx
3108 roll $24,%ecx
3109 xorl %eax,%edx
3110 xorl %eax,%ebx
3111 roll $16,%edx
3112 xorl %ecx,%ebx
3113 roll $8,%eax
3114 xorl %edx,%ebx
3115 movl %ebp,%ecx
3116 xorl %eax,%ebx
3117 movl %ebx,4(%edi)
3118 movl $2155905152,%ebp
3119 andl %ecx,%ebp
3120 leal (%ecx,%ecx,1),%edx
3121 movl %ebp,%esi
3122 shrl $7,%ebp
3123 subl %ebp,%esi
3124 andl $4278124286,%edx
3125 andl $454761243,%esi
3126 xorl %esi,%edx
3127 movl $2155905152,%ebp
3128 andl %edx,%ebp
3129 leal (%edx,%edx,1),%eax
3130 movl %ebp,%esi
3131 shrl $7,%ebp
3132 subl %ebp,%esi
3133 andl $4278124286,%eax
3134 andl $454761243,%esi
3135 xorl %ecx,%edx
3136 xorl %esi,%eax
3137 movl $2155905152,%ebp
3138 andl %eax,%ebp
3139 leal (%eax,%eax,1),%ebx
3140 movl %ebp,%esi
3141 shrl $7,%ebp
3142 xorl %ecx,%eax
3143 subl %ebp,%esi
3144 andl $4278124286,%ebx
3145 andl $454761243,%esi
3146 roll $8,%ecx
3147 xorl %esi,%ebx
3148 movl 12(%edi),%ebp
3149 xorl %edx,%ecx
3150 xorl %ebx,%edx
3151 xorl %eax,%ecx
3152 roll $24,%edx
3153 xorl %ebx,%eax
3154 xorl %ebx,%ecx
3155 roll $16,%eax
3156 xorl %edx,%ecx
3157 roll $8,%ebx
3158 xorl %eax,%ecx
3159 movl %ebp,%edx
3160 xorl %ebx,%ecx
3161 movl %ecx,8(%edi)
3162 movl $2155905152,%ebp
3163 andl %edx,%ebp
3164 leal (%edx,%edx,1),%eax
3165 movl %ebp,%esi
3166 shrl $7,%ebp
3167 subl %ebp,%esi
3168 andl $4278124286,%eax
3169 andl $454761243,%esi
3170 xorl %esi,%eax
3171 movl $2155905152,%ebp
3172 andl %eax,%ebp
3173 leal (%eax,%eax,1),%ebx
3174 movl %ebp,%esi
3175 shrl $7,%ebp
3176 subl %ebp,%esi
3177 andl $4278124286,%ebx
3178 andl $454761243,%esi
3179 xorl %edx,%eax
3180 xorl %esi,%ebx
3181 movl $2155905152,%ebp
3182 andl %ebx,%ebp
3183 leal (%ebx,%ebx,1),%ecx
3184 movl %ebp,%esi
3185 shrl $7,%ebp
3186 xorl %edx,%ebx
3187 subl %ebp,%esi
3188 andl $4278124286,%ecx
3189 andl $454761243,%esi
3190 roll $8,%edx
3191 xorl %esi,%ecx
3192 movl 16(%edi),%ebp
3193 xorl %eax,%edx
3194 xorl %ecx,%eax
3195 xorl %ebx,%edx
3196 roll $24,%eax
3197 xorl %ecx,%ebx
3198 xorl %ecx,%edx
3199 roll $16,%ebx
3200 xorl %eax,%edx
3201 roll $8,%ecx
3202 xorl %ebx,%edx
3203 movl %ebp,%eax
3204 xorl %ecx,%edx
3205 movl %edx,12(%edi)
3206 cmpl 28(%esp),%edi
3207 jb L056permute
3208 xorl %eax,%eax
3209 popl %edi
3210 popl %esi
3211 popl %ebx
3212 popl %ebp
3213 ret
3214.byte 65,69,83,32,102,111,114,32,120,56,54,44,32,67,82,89
3215.byte 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114
3216.byte 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
3217.section __IMPORT,__pointers,non_lazy_symbol_pointers
3218L_OPENSSL_ia32cap_P$non_lazy_ptr:
3219.indirect_symbol _OPENSSL_ia32cap_P
3220.long 0
3221#endif