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