xref: /minix3/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/cast-586.S (revision ebfedea0ce5bbe81e252ddf32d732e40fb633fae)
1*ebfedea0SLionel Sambuc#include <machine/asm.h>
2*ebfedea0SLionel Sambuc.text
3*ebfedea0SLionel Sambuc.globl	CAST_encrypt
4*ebfedea0SLionel Sambuc.type	CAST_encrypt,@function
5*ebfedea0SLionel Sambuc.align	16
6*ebfedea0SLionel SambucCAST_encrypt:
7*ebfedea0SLionel Sambuc.L_CAST_encrypt_begin:
8*ebfedea0SLionel Sambuc
9*ebfedea0SLionel Sambuc	pushl	%ebp
10*ebfedea0SLionel Sambuc	pushl	%ebx
11*ebfedea0SLionel Sambuc	movl	12(%esp),%ebx
12*ebfedea0SLionel Sambuc	movl	16(%esp),%ebp
13*ebfedea0SLionel Sambuc	pushl	%esi
14*ebfedea0SLionel Sambuc	pushl	%edi
15*ebfedea0SLionel Sambuc
16*ebfedea0SLionel Sambuc	movl	(%ebx),%edi
17*ebfedea0SLionel Sambuc	movl	4(%ebx),%esi
18*ebfedea0SLionel Sambuc
19*ebfedea0SLionel Sambuc	movl	128(%ebp),%eax
20*ebfedea0SLionel Sambuc	pushl	%eax
21*ebfedea0SLionel Sambuc	xorl	%eax,%eax
22*ebfedea0SLionel Sambuc
23*ebfedea0SLionel Sambuc	movl	(%ebp),%edx
24*ebfedea0SLionel Sambuc	movl	4(%ebp),%ecx
25*ebfedea0SLionel Sambuc	addl	%esi,%edx
26*ebfedea0SLionel Sambuc	roll	%cl,%edx
27*ebfedea0SLionel Sambuc	movl	%edx,%ebx
28*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
29*ebfedea0SLionel Sambuc	movb	%dh,%cl
30*ebfedea0SLionel Sambuc	andl	$255,%ebx
31*ebfedea0SLionel Sambuc	shrl	$16,%edx
32*ebfedea0SLionel Sambuc	xorl	%eax,%eax
33*ebfedea0SLionel Sambuc	movb	%dh,%al
34*ebfedea0SLionel Sambuc	andl	$255,%edx
35*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
36*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
37*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
38*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
39*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
40*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
41*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
42*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
43*ebfedea0SLionel Sambuc
44*ebfedea0SLionel Sambuc	movl	8(%ebp),%edx
45*ebfedea0SLionel Sambuc	movl	12(%ebp),%ecx
46*ebfedea0SLionel Sambuc	xorl	%edi,%edx
47*ebfedea0SLionel Sambuc	roll	%cl,%edx
48*ebfedea0SLionel Sambuc	movl	%edx,%ebx
49*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
50*ebfedea0SLionel Sambuc	movb	%dh,%cl
51*ebfedea0SLionel Sambuc	andl	$255,%ebx
52*ebfedea0SLionel Sambuc	shrl	$16,%edx
53*ebfedea0SLionel Sambuc	xorl	%eax,%eax
54*ebfedea0SLionel Sambuc	movb	%dh,%al
55*ebfedea0SLionel Sambuc	andl	$255,%edx
56*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
57*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
58*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
59*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
60*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
61*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
62*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
63*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
64*ebfedea0SLionel Sambuc
65*ebfedea0SLionel Sambuc	movl	16(%ebp),%edx
66*ebfedea0SLionel Sambuc	movl	20(%ebp),%ecx
67*ebfedea0SLionel Sambuc	subl	%esi,%edx
68*ebfedea0SLionel Sambuc	roll	%cl,%edx
69*ebfedea0SLionel Sambuc	movl	%edx,%ebx
70*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
71*ebfedea0SLionel Sambuc	movb	%dh,%cl
72*ebfedea0SLionel Sambuc	andl	$255,%ebx
73*ebfedea0SLionel Sambuc	shrl	$16,%edx
74*ebfedea0SLionel Sambuc	xorl	%eax,%eax
75*ebfedea0SLionel Sambuc	movb	%dh,%al
76*ebfedea0SLionel Sambuc	andl	$255,%edx
77*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
78*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
79*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
80*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
81*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
82*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
83*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
84*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
85*ebfedea0SLionel Sambuc
86*ebfedea0SLionel Sambuc	movl	24(%ebp),%edx
87*ebfedea0SLionel Sambuc	movl	28(%ebp),%ecx
88*ebfedea0SLionel Sambuc	addl	%edi,%edx
89*ebfedea0SLionel Sambuc	roll	%cl,%edx
90*ebfedea0SLionel Sambuc	movl	%edx,%ebx
91*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
92*ebfedea0SLionel Sambuc	movb	%dh,%cl
93*ebfedea0SLionel Sambuc	andl	$255,%ebx
94*ebfedea0SLionel Sambuc	shrl	$16,%edx
95*ebfedea0SLionel Sambuc	xorl	%eax,%eax
96*ebfedea0SLionel Sambuc	movb	%dh,%al
97*ebfedea0SLionel Sambuc	andl	$255,%edx
98*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
99*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
100*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
101*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
102*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
103*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
104*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
105*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
106*ebfedea0SLionel Sambuc
107*ebfedea0SLionel Sambuc	movl	32(%ebp),%edx
108*ebfedea0SLionel Sambuc	movl	36(%ebp),%ecx
109*ebfedea0SLionel Sambuc	xorl	%esi,%edx
110*ebfedea0SLionel Sambuc	roll	%cl,%edx
111*ebfedea0SLionel Sambuc	movl	%edx,%ebx
112*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
113*ebfedea0SLionel Sambuc	movb	%dh,%cl
114*ebfedea0SLionel Sambuc	andl	$255,%ebx
115*ebfedea0SLionel Sambuc	shrl	$16,%edx
116*ebfedea0SLionel Sambuc	xorl	%eax,%eax
117*ebfedea0SLionel Sambuc	movb	%dh,%al
118*ebfedea0SLionel Sambuc	andl	$255,%edx
119*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
120*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
121*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
122*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
123*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
124*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
125*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
126*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
127*ebfedea0SLionel Sambuc
128*ebfedea0SLionel Sambuc	movl	40(%ebp),%edx
129*ebfedea0SLionel Sambuc	movl	44(%ebp),%ecx
130*ebfedea0SLionel Sambuc	subl	%edi,%edx
131*ebfedea0SLionel Sambuc	roll	%cl,%edx
132*ebfedea0SLionel Sambuc	movl	%edx,%ebx
133*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
134*ebfedea0SLionel Sambuc	movb	%dh,%cl
135*ebfedea0SLionel Sambuc	andl	$255,%ebx
136*ebfedea0SLionel Sambuc	shrl	$16,%edx
137*ebfedea0SLionel Sambuc	xorl	%eax,%eax
138*ebfedea0SLionel Sambuc	movb	%dh,%al
139*ebfedea0SLionel Sambuc	andl	$255,%edx
140*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
141*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
142*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
143*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
144*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
145*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
146*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
147*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
148*ebfedea0SLionel Sambuc
149*ebfedea0SLionel Sambuc	movl	48(%ebp),%edx
150*ebfedea0SLionel Sambuc	movl	52(%ebp),%ecx
151*ebfedea0SLionel Sambuc	addl	%esi,%edx
152*ebfedea0SLionel Sambuc	roll	%cl,%edx
153*ebfedea0SLionel Sambuc	movl	%edx,%ebx
154*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
155*ebfedea0SLionel Sambuc	movb	%dh,%cl
156*ebfedea0SLionel Sambuc	andl	$255,%ebx
157*ebfedea0SLionel Sambuc	shrl	$16,%edx
158*ebfedea0SLionel Sambuc	xorl	%eax,%eax
159*ebfedea0SLionel Sambuc	movb	%dh,%al
160*ebfedea0SLionel Sambuc	andl	$255,%edx
161*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
162*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
163*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
164*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
165*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
166*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
167*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
168*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
169*ebfedea0SLionel Sambuc
170*ebfedea0SLionel Sambuc	movl	56(%ebp),%edx
171*ebfedea0SLionel Sambuc	movl	60(%ebp),%ecx
172*ebfedea0SLionel Sambuc	xorl	%edi,%edx
173*ebfedea0SLionel Sambuc	roll	%cl,%edx
174*ebfedea0SLionel Sambuc	movl	%edx,%ebx
175*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
176*ebfedea0SLionel Sambuc	movb	%dh,%cl
177*ebfedea0SLionel Sambuc	andl	$255,%ebx
178*ebfedea0SLionel Sambuc	shrl	$16,%edx
179*ebfedea0SLionel Sambuc	xorl	%eax,%eax
180*ebfedea0SLionel Sambuc	movb	%dh,%al
181*ebfedea0SLionel Sambuc	andl	$255,%edx
182*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
183*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
184*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
185*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
186*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
187*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
188*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
189*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
190*ebfedea0SLionel Sambuc
191*ebfedea0SLionel Sambuc	movl	64(%ebp),%edx
192*ebfedea0SLionel Sambuc	movl	68(%ebp),%ecx
193*ebfedea0SLionel Sambuc	subl	%esi,%edx
194*ebfedea0SLionel Sambuc	roll	%cl,%edx
195*ebfedea0SLionel Sambuc	movl	%edx,%ebx
196*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
197*ebfedea0SLionel Sambuc	movb	%dh,%cl
198*ebfedea0SLionel Sambuc	andl	$255,%ebx
199*ebfedea0SLionel Sambuc	shrl	$16,%edx
200*ebfedea0SLionel Sambuc	xorl	%eax,%eax
201*ebfedea0SLionel Sambuc	movb	%dh,%al
202*ebfedea0SLionel Sambuc	andl	$255,%edx
203*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
204*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
205*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
206*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
207*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
208*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
209*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
210*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
211*ebfedea0SLionel Sambuc
212*ebfedea0SLionel Sambuc	movl	72(%ebp),%edx
213*ebfedea0SLionel Sambuc	movl	76(%ebp),%ecx
214*ebfedea0SLionel Sambuc	addl	%edi,%edx
215*ebfedea0SLionel Sambuc	roll	%cl,%edx
216*ebfedea0SLionel Sambuc	movl	%edx,%ebx
217*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
218*ebfedea0SLionel Sambuc	movb	%dh,%cl
219*ebfedea0SLionel Sambuc	andl	$255,%ebx
220*ebfedea0SLionel Sambuc	shrl	$16,%edx
221*ebfedea0SLionel Sambuc	xorl	%eax,%eax
222*ebfedea0SLionel Sambuc	movb	%dh,%al
223*ebfedea0SLionel Sambuc	andl	$255,%edx
224*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
225*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
226*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
227*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
228*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
229*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
230*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
231*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
232*ebfedea0SLionel Sambuc
233*ebfedea0SLionel Sambuc	movl	80(%ebp),%edx
234*ebfedea0SLionel Sambuc	movl	84(%ebp),%ecx
235*ebfedea0SLionel Sambuc	xorl	%esi,%edx
236*ebfedea0SLionel Sambuc	roll	%cl,%edx
237*ebfedea0SLionel Sambuc	movl	%edx,%ebx
238*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
239*ebfedea0SLionel Sambuc	movb	%dh,%cl
240*ebfedea0SLionel Sambuc	andl	$255,%ebx
241*ebfedea0SLionel Sambuc	shrl	$16,%edx
242*ebfedea0SLionel Sambuc	xorl	%eax,%eax
243*ebfedea0SLionel Sambuc	movb	%dh,%al
244*ebfedea0SLionel Sambuc	andl	$255,%edx
245*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
246*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
247*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
248*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
249*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
250*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
251*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
252*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
253*ebfedea0SLionel Sambuc
254*ebfedea0SLionel Sambuc	movl	88(%ebp),%edx
255*ebfedea0SLionel Sambuc	movl	92(%ebp),%ecx
256*ebfedea0SLionel Sambuc	subl	%edi,%edx
257*ebfedea0SLionel Sambuc	roll	%cl,%edx
258*ebfedea0SLionel Sambuc	movl	%edx,%ebx
259*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
260*ebfedea0SLionel Sambuc	movb	%dh,%cl
261*ebfedea0SLionel Sambuc	andl	$255,%ebx
262*ebfedea0SLionel Sambuc	shrl	$16,%edx
263*ebfedea0SLionel Sambuc	xorl	%eax,%eax
264*ebfedea0SLionel Sambuc	movb	%dh,%al
265*ebfedea0SLionel Sambuc	andl	$255,%edx
266*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
267*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
268*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
269*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
270*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
271*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
272*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
273*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
274*ebfedea0SLionel Sambuc
275*ebfedea0SLionel Sambuc	popl	%edx
276*ebfedea0SLionel Sambuc	orl	%edx,%edx
277*ebfedea0SLionel Sambuc	jnz	.L000cast_enc_done
278*ebfedea0SLionel Sambuc
279*ebfedea0SLionel Sambuc	movl	96(%ebp),%edx
280*ebfedea0SLionel Sambuc	movl	100(%ebp),%ecx
281*ebfedea0SLionel Sambuc	addl	%esi,%edx
282*ebfedea0SLionel Sambuc	roll	%cl,%edx
283*ebfedea0SLionel Sambuc	movl	%edx,%ebx
284*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
285*ebfedea0SLionel Sambuc	movb	%dh,%cl
286*ebfedea0SLionel Sambuc	andl	$255,%ebx
287*ebfedea0SLionel Sambuc	shrl	$16,%edx
288*ebfedea0SLionel Sambuc	xorl	%eax,%eax
289*ebfedea0SLionel Sambuc	movb	%dh,%al
290*ebfedea0SLionel Sambuc	andl	$255,%edx
291*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
292*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
293*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
294*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
295*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
296*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
297*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
298*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
299*ebfedea0SLionel Sambuc
300*ebfedea0SLionel Sambuc	movl	104(%ebp),%edx
301*ebfedea0SLionel Sambuc	movl	108(%ebp),%ecx
302*ebfedea0SLionel Sambuc	xorl	%edi,%edx
303*ebfedea0SLionel Sambuc	roll	%cl,%edx
304*ebfedea0SLionel Sambuc	movl	%edx,%ebx
305*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
306*ebfedea0SLionel Sambuc	movb	%dh,%cl
307*ebfedea0SLionel Sambuc	andl	$255,%ebx
308*ebfedea0SLionel Sambuc	shrl	$16,%edx
309*ebfedea0SLionel Sambuc	xorl	%eax,%eax
310*ebfedea0SLionel Sambuc	movb	%dh,%al
311*ebfedea0SLionel Sambuc	andl	$255,%edx
312*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
313*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
314*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
315*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
316*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
317*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
318*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
319*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
320*ebfedea0SLionel Sambuc
321*ebfedea0SLionel Sambuc	movl	112(%ebp),%edx
322*ebfedea0SLionel Sambuc	movl	116(%ebp),%ecx
323*ebfedea0SLionel Sambuc	subl	%esi,%edx
324*ebfedea0SLionel Sambuc	roll	%cl,%edx
325*ebfedea0SLionel Sambuc	movl	%edx,%ebx
326*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
327*ebfedea0SLionel Sambuc	movb	%dh,%cl
328*ebfedea0SLionel Sambuc	andl	$255,%ebx
329*ebfedea0SLionel Sambuc	shrl	$16,%edx
330*ebfedea0SLionel Sambuc	xorl	%eax,%eax
331*ebfedea0SLionel Sambuc	movb	%dh,%al
332*ebfedea0SLionel Sambuc	andl	$255,%edx
333*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
334*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
335*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
336*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
337*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
338*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
339*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
340*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
341*ebfedea0SLionel Sambuc
342*ebfedea0SLionel Sambuc	movl	120(%ebp),%edx
343*ebfedea0SLionel Sambuc	movl	124(%ebp),%ecx
344*ebfedea0SLionel Sambuc	addl	%edi,%edx
345*ebfedea0SLionel Sambuc	roll	%cl,%edx
346*ebfedea0SLionel Sambuc	movl	%edx,%ebx
347*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
348*ebfedea0SLionel Sambuc	movb	%dh,%cl
349*ebfedea0SLionel Sambuc	andl	$255,%ebx
350*ebfedea0SLionel Sambuc	shrl	$16,%edx
351*ebfedea0SLionel Sambuc	xorl	%eax,%eax
352*ebfedea0SLionel Sambuc	movb	%dh,%al
353*ebfedea0SLionel Sambuc	andl	$255,%edx
354*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
355*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
356*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
357*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
358*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
359*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
360*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
361*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
362*ebfedea0SLionel Sambuc.L000cast_enc_done:
363*ebfedea0SLionel Sambuc	nop
364*ebfedea0SLionel Sambuc	movl	20(%esp),%eax
365*ebfedea0SLionel Sambuc	movl	%edi,4(%eax)
366*ebfedea0SLionel Sambuc	movl	%esi,(%eax)
367*ebfedea0SLionel Sambuc	popl	%edi
368*ebfedea0SLionel Sambuc	popl	%esi
369*ebfedea0SLionel Sambuc	popl	%ebx
370*ebfedea0SLionel Sambuc	popl	%ebp
371*ebfedea0SLionel Sambuc	ret
372*ebfedea0SLionel Sambuc.size	CAST_encrypt,.-.L_CAST_encrypt_begin
373*ebfedea0SLionel Sambuc.globl	CAST_decrypt
374*ebfedea0SLionel Sambuc.type	CAST_decrypt,@function
375*ebfedea0SLionel Sambuc.align	16
376*ebfedea0SLionel SambucCAST_decrypt:
377*ebfedea0SLionel Sambuc.L_CAST_decrypt_begin:
378*ebfedea0SLionel Sambuc
379*ebfedea0SLionel Sambuc	pushl	%ebp
380*ebfedea0SLionel Sambuc	pushl	%ebx
381*ebfedea0SLionel Sambuc	movl	12(%esp),%ebx
382*ebfedea0SLionel Sambuc	movl	16(%esp),%ebp
383*ebfedea0SLionel Sambuc	pushl	%esi
384*ebfedea0SLionel Sambuc	pushl	%edi
385*ebfedea0SLionel Sambuc
386*ebfedea0SLionel Sambuc	movl	(%ebx),%edi
387*ebfedea0SLionel Sambuc	movl	4(%ebx),%esi
388*ebfedea0SLionel Sambuc
389*ebfedea0SLionel Sambuc	movl	128(%ebp),%eax
390*ebfedea0SLionel Sambuc	orl	%eax,%eax
391*ebfedea0SLionel Sambuc	jnz	.L001cast_dec_skip
392*ebfedea0SLionel Sambuc	xorl	%eax,%eax
393*ebfedea0SLionel Sambuc
394*ebfedea0SLionel Sambuc	movl	120(%ebp),%edx
395*ebfedea0SLionel Sambuc	movl	124(%ebp),%ecx
396*ebfedea0SLionel Sambuc	addl	%esi,%edx
397*ebfedea0SLionel Sambuc	roll	%cl,%edx
398*ebfedea0SLionel Sambuc	movl	%edx,%ebx
399*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
400*ebfedea0SLionel Sambuc	movb	%dh,%cl
401*ebfedea0SLionel Sambuc	andl	$255,%ebx
402*ebfedea0SLionel Sambuc	shrl	$16,%edx
403*ebfedea0SLionel Sambuc	xorl	%eax,%eax
404*ebfedea0SLionel Sambuc	movb	%dh,%al
405*ebfedea0SLionel Sambuc	andl	$255,%edx
406*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
407*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
408*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
409*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
410*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
411*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
412*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
413*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
414*ebfedea0SLionel Sambuc
415*ebfedea0SLionel Sambuc	movl	112(%ebp),%edx
416*ebfedea0SLionel Sambuc	movl	116(%ebp),%ecx
417*ebfedea0SLionel Sambuc	subl	%edi,%edx
418*ebfedea0SLionel Sambuc	roll	%cl,%edx
419*ebfedea0SLionel Sambuc	movl	%edx,%ebx
420*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
421*ebfedea0SLionel Sambuc	movb	%dh,%cl
422*ebfedea0SLionel Sambuc	andl	$255,%ebx
423*ebfedea0SLionel Sambuc	shrl	$16,%edx
424*ebfedea0SLionel Sambuc	xorl	%eax,%eax
425*ebfedea0SLionel Sambuc	movb	%dh,%al
426*ebfedea0SLionel Sambuc	andl	$255,%edx
427*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
428*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
429*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
430*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
431*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
432*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
433*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
434*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
435*ebfedea0SLionel Sambuc
436*ebfedea0SLionel Sambuc	movl	104(%ebp),%edx
437*ebfedea0SLionel Sambuc	movl	108(%ebp),%ecx
438*ebfedea0SLionel Sambuc	xorl	%esi,%edx
439*ebfedea0SLionel Sambuc	roll	%cl,%edx
440*ebfedea0SLionel Sambuc	movl	%edx,%ebx
441*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
442*ebfedea0SLionel Sambuc	movb	%dh,%cl
443*ebfedea0SLionel Sambuc	andl	$255,%ebx
444*ebfedea0SLionel Sambuc	shrl	$16,%edx
445*ebfedea0SLionel Sambuc	xorl	%eax,%eax
446*ebfedea0SLionel Sambuc	movb	%dh,%al
447*ebfedea0SLionel Sambuc	andl	$255,%edx
448*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
449*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
450*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
451*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
452*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
453*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
454*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
455*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
456*ebfedea0SLionel Sambuc
457*ebfedea0SLionel Sambuc	movl	96(%ebp),%edx
458*ebfedea0SLionel Sambuc	movl	100(%ebp),%ecx
459*ebfedea0SLionel Sambuc	addl	%edi,%edx
460*ebfedea0SLionel Sambuc	roll	%cl,%edx
461*ebfedea0SLionel Sambuc	movl	%edx,%ebx
462*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
463*ebfedea0SLionel Sambuc	movb	%dh,%cl
464*ebfedea0SLionel Sambuc	andl	$255,%ebx
465*ebfedea0SLionel Sambuc	shrl	$16,%edx
466*ebfedea0SLionel Sambuc	xorl	%eax,%eax
467*ebfedea0SLionel Sambuc	movb	%dh,%al
468*ebfedea0SLionel Sambuc	andl	$255,%edx
469*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
470*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
471*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
472*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
473*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
474*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
475*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
476*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
477*ebfedea0SLionel Sambuc.L001cast_dec_skip:
478*ebfedea0SLionel Sambuc
479*ebfedea0SLionel Sambuc	movl	88(%ebp),%edx
480*ebfedea0SLionel Sambuc	movl	92(%ebp),%ecx
481*ebfedea0SLionel Sambuc	subl	%esi,%edx
482*ebfedea0SLionel Sambuc	roll	%cl,%edx
483*ebfedea0SLionel Sambuc	movl	%edx,%ebx
484*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
485*ebfedea0SLionel Sambuc	movb	%dh,%cl
486*ebfedea0SLionel Sambuc	andl	$255,%ebx
487*ebfedea0SLionel Sambuc	shrl	$16,%edx
488*ebfedea0SLionel Sambuc	xorl	%eax,%eax
489*ebfedea0SLionel Sambuc	movb	%dh,%al
490*ebfedea0SLionel Sambuc	andl	$255,%edx
491*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
492*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
493*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
494*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
495*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
496*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
497*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
498*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
499*ebfedea0SLionel Sambuc
500*ebfedea0SLionel Sambuc	movl	80(%ebp),%edx
501*ebfedea0SLionel Sambuc	movl	84(%ebp),%ecx
502*ebfedea0SLionel Sambuc	xorl	%edi,%edx
503*ebfedea0SLionel Sambuc	roll	%cl,%edx
504*ebfedea0SLionel Sambuc	movl	%edx,%ebx
505*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
506*ebfedea0SLionel Sambuc	movb	%dh,%cl
507*ebfedea0SLionel Sambuc	andl	$255,%ebx
508*ebfedea0SLionel Sambuc	shrl	$16,%edx
509*ebfedea0SLionel Sambuc	xorl	%eax,%eax
510*ebfedea0SLionel Sambuc	movb	%dh,%al
511*ebfedea0SLionel Sambuc	andl	$255,%edx
512*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
513*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
514*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
515*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
516*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
517*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
518*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
519*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
520*ebfedea0SLionel Sambuc
521*ebfedea0SLionel Sambuc	movl	72(%ebp),%edx
522*ebfedea0SLionel Sambuc	movl	76(%ebp),%ecx
523*ebfedea0SLionel Sambuc	addl	%esi,%edx
524*ebfedea0SLionel Sambuc	roll	%cl,%edx
525*ebfedea0SLionel Sambuc	movl	%edx,%ebx
526*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
527*ebfedea0SLionel Sambuc	movb	%dh,%cl
528*ebfedea0SLionel Sambuc	andl	$255,%ebx
529*ebfedea0SLionel Sambuc	shrl	$16,%edx
530*ebfedea0SLionel Sambuc	xorl	%eax,%eax
531*ebfedea0SLionel Sambuc	movb	%dh,%al
532*ebfedea0SLionel Sambuc	andl	$255,%edx
533*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
534*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
535*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
536*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
537*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
538*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
539*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
540*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
541*ebfedea0SLionel Sambuc
542*ebfedea0SLionel Sambuc	movl	64(%ebp),%edx
543*ebfedea0SLionel Sambuc	movl	68(%ebp),%ecx
544*ebfedea0SLionel Sambuc	subl	%edi,%edx
545*ebfedea0SLionel Sambuc	roll	%cl,%edx
546*ebfedea0SLionel Sambuc	movl	%edx,%ebx
547*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
548*ebfedea0SLionel Sambuc	movb	%dh,%cl
549*ebfedea0SLionel Sambuc	andl	$255,%ebx
550*ebfedea0SLionel Sambuc	shrl	$16,%edx
551*ebfedea0SLionel Sambuc	xorl	%eax,%eax
552*ebfedea0SLionel Sambuc	movb	%dh,%al
553*ebfedea0SLionel Sambuc	andl	$255,%edx
554*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
555*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
556*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
557*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
558*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
559*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
560*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
561*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
562*ebfedea0SLionel Sambuc
563*ebfedea0SLionel Sambuc	movl	56(%ebp),%edx
564*ebfedea0SLionel Sambuc	movl	60(%ebp),%ecx
565*ebfedea0SLionel Sambuc	xorl	%esi,%edx
566*ebfedea0SLionel Sambuc	roll	%cl,%edx
567*ebfedea0SLionel Sambuc	movl	%edx,%ebx
568*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
569*ebfedea0SLionel Sambuc	movb	%dh,%cl
570*ebfedea0SLionel Sambuc	andl	$255,%ebx
571*ebfedea0SLionel Sambuc	shrl	$16,%edx
572*ebfedea0SLionel Sambuc	xorl	%eax,%eax
573*ebfedea0SLionel Sambuc	movb	%dh,%al
574*ebfedea0SLionel Sambuc	andl	$255,%edx
575*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
576*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
577*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
578*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
579*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
580*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
581*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
582*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
583*ebfedea0SLionel Sambuc
584*ebfedea0SLionel Sambuc	movl	48(%ebp),%edx
585*ebfedea0SLionel Sambuc	movl	52(%ebp),%ecx
586*ebfedea0SLionel Sambuc	addl	%edi,%edx
587*ebfedea0SLionel Sambuc	roll	%cl,%edx
588*ebfedea0SLionel Sambuc	movl	%edx,%ebx
589*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
590*ebfedea0SLionel Sambuc	movb	%dh,%cl
591*ebfedea0SLionel Sambuc	andl	$255,%ebx
592*ebfedea0SLionel Sambuc	shrl	$16,%edx
593*ebfedea0SLionel Sambuc	xorl	%eax,%eax
594*ebfedea0SLionel Sambuc	movb	%dh,%al
595*ebfedea0SLionel Sambuc	andl	$255,%edx
596*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
597*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
598*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
599*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
600*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
601*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
602*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
603*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
604*ebfedea0SLionel Sambuc
605*ebfedea0SLionel Sambuc	movl	40(%ebp),%edx
606*ebfedea0SLionel Sambuc	movl	44(%ebp),%ecx
607*ebfedea0SLionel Sambuc	subl	%esi,%edx
608*ebfedea0SLionel Sambuc	roll	%cl,%edx
609*ebfedea0SLionel Sambuc	movl	%edx,%ebx
610*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
611*ebfedea0SLionel Sambuc	movb	%dh,%cl
612*ebfedea0SLionel Sambuc	andl	$255,%ebx
613*ebfedea0SLionel Sambuc	shrl	$16,%edx
614*ebfedea0SLionel Sambuc	xorl	%eax,%eax
615*ebfedea0SLionel Sambuc	movb	%dh,%al
616*ebfedea0SLionel Sambuc	andl	$255,%edx
617*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
618*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
619*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
620*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
621*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
622*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
623*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
624*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
625*ebfedea0SLionel Sambuc
626*ebfedea0SLionel Sambuc	movl	32(%ebp),%edx
627*ebfedea0SLionel Sambuc	movl	36(%ebp),%ecx
628*ebfedea0SLionel Sambuc	xorl	%edi,%edx
629*ebfedea0SLionel Sambuc	roll	%cl,%edx
630*ebfedea0SLionel Sambuc	movl	%edx,%ebx
631*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
632*ebfedea0SLionel Sambuc	movb	%dh,%cl
633*ebfedea0SLionel Sambuc	andl	$255,%ebx
634*ebfedea0SLionel Sambuc	shrl	$16,%edx
635*ebfedea0SLionel Sambuc	xorl	%eax,%eax
636*ebfedea0SLionel Sambuc	movb	%dh,%al
637*ebfedea0SLionel Sambuc	andl	$255,%edx
638*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
639*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
640*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
641*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
642*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
643*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
644*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
645*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
646*ebfedea0SLionel Sambuc
647*ebfedea0SLionel Sambuc	movl	24(%ebp),%edx
648*ebfedea0SLionel Sambuc	movl	28(%ebp),%ecx
649*ebfedea0SLionel Sambuc	addl	%esi,%edx
650*ebfedea0SLionel Sambuc	roll	%cl,%edx
651*ebfedea0SLionel Sambuc	movl	%edx,%ebx
652*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
653*ebfedea0SLionel Sambuc	movb	%dh,%cl
654*ebfedea0SLionel Sambuc	andl	$255,%ebx
655*ebfedea0SLionel Sambuc	shrl	$16,%edx
656*ebfedea0SLionel Sambuc	xorl	%eax,%eax
657*ebfedea0SLionel Sambuc	movb	%dh,%al
658*ebfedea0SLionel Sambuc	andl	$255,%edx
659*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
660*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
661*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
662*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
663*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
664*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
665*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
666*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
667*ebfedea0SLionel Sambuc
668*ebfedea0SLionel Sambuc	movl	16(%ebp),%edx
669*ebfedea0SLionel Sambuc	movl	20(%ebp),%ecx
670*ebfedea0SLionel Sambuc	subl	%edi,%edx
671*ebfedea0SLionel Sambuc	roll	%cl,%edx
672*ebfedea0SLionel Sambuc	movl	%edx,%ebx
673*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
674*ebfedea0SLionel Sambuc	movb	%dh,%cl
675*ebfedea0SLionel Sambuc	andl	$255,%ebx
676*ebfedea0SLionel Sambuc	shrl	$16,%edx
677*ebfedea0SLionel Sambuc	xorl	%eax,%eax
678*ebfedea0SLionel Sambuc	movb	%dh,%al
679*ebfedea0SLionel Sambuc	andl	$255,%edx
680*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
681*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
682*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
683*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
684*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
685*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
686*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
687*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
688*ebfedea0SLionel Sambuc
689*ebfedea0SLionel Sambuc	movl	8(%ebp),%edx
690*ebfedea0SLionel Sambuc	movl	12(%ebp),%ecx
691*ebfedea0SLionel Sambuc	xorl	%esi,%edx
692*ebfedea0SLionel Sambuc	roll	%cl,%edx
693*ebfedea0SLionel Sambuc	movl	%edx,%ebx
694*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
695*ebfedea0SLionel Sambuc	movb	%dh,%cl
696*ebfedea0SLionel Sambuc	andl	$255,%ebx
697*ebfedea0SLionel Sambuc	shrl	$16,%edx
698*ebfedea0SLionel Sambuc	xorl	%eax,%eax
699*ebfedea0SLionel Sambuc	movb	%dh,%al
700*ebfedea0SLionel Sambuc	andl	$255,%edx
701*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
702*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
703*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
704*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
705*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
706*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
707*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
708*ebfedea0SLionel Sambuc	xorl	%ecx,%edi
709*ebfedea0SLionel Sambuc
710*ebfedea0SLionel Sambuc	movl	(%ebp),%edx
711*ebfedea0SLionel Sambuc	movl	4(%ebp),%ecx
712*ebfedea0SLionel Sambuc	addl	%edi,%edx
713*ebfedea0SLionel Sambuc	roll	%cl,%edx
714*ebfedea0SLionel Sambuc	movl	%edx,%ebx
715*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
716*ebfedea0SLionel Sambuc	movb	%dh,%cl
717*ebfedea0SLionel Sambuc	andl	$255,%ebx
718*ebfedea0SLionel Sambuc	shrl	$16,%edx
719*ebfedea0SLionel Sambuc	xorl	%eax,%eax
720*ebfedea0SLionel Sambuc	movb	%dh,%al
721*ebfedea0SLionel Sambuc	andl	$255,%edx
722*ebfedea0SLionel Sambuc	movl	CAST_S_table0(,%ecx,4),%ecx
723*ebfedea0SLionel Sambuc	movl	CAST_S_table1(,%ebx,4),%ebx
724*ebfedea0SLionel Sambuc	xorl	%ebx,%ecx
725*ebfedea0SLionel Sambuc	movl	CAST_S_table2(,%eax,4),%ebx
726*ebfedea0SLionel Sambuc	subl	%ebx,%ecx
727*ebfedea0SLionel Sambuc	movl	CAST_S_table3(,%edx,4),%ebx
728*ebfedea0SLionel Sambuc	addl	%ebx,%ecx
729*ebfedea0SLionel Sambuc	xorl	%ecx,%esi
730*ebfedea0SLionel Sambuc	nop
731*ebfedea0SLionel Sambuc	movl	20(%esp),%eax
732*ebfedea0SLionel Sambuc	movl	%edi,4(%eax)
733*ebfedea0SLionel Sambuc	movl	%esi,(%eax)
734*ebfedea0SLionel Sambuc	popl	%edi
735*ebfedea0SLionel Sambuc	popl	%esi
736*ebfedea0SLionel Sambuc	popl	%ebx
737*ebfedea0SLionel Sambuc	popl	%ebp
738*ebfedea0SLionel Sambuc	ret
739*ebfedea0SLionel Sambuc.size	CAST_decrypt,.-.L_CAST_decrypt_begin
740*ebfedea0SLionel Sambuc.globl	CAST_cbc_encrypt
741*ebfedea0SLionel Sambuc.type	CAST_cbc_encrypt,@function
742*ebfedea0SLionel Sambuc.align	16
743*ebfedea0SLionel SambucCAST_cbc_encrypt:
744*ebfedea0SLionel Sambuc.L_CAST_cbc_encrypt_begin:
745*ebfedea0SLionel Sambuc
746*ebfedea0SLionel Sambuc	pushl	%ebp
747*ebfedea0SLionel Sambuc	pushl	%ebx
748*ebfedea0SLionel Sambuc	pushl	%esi
749*ebfedea0SLionel Sambuc	pushl	%edi
750*ebfedea0SLionel Sambuc	movl	28(%esp),%ebp
751*ebfedea0SLionel Sambuc
752*ebfedea0SLionel Sambuc	movl	36(%esp),%ebx
753*ebfedea0SLionel Sambuc	movl	(%ebx),%esi
754*ebfedea0SLionel Sambuc	movl	4(%ebx),%edi
755*ebfedea0SLionel Sambuc	pushl	%edi
756*ebfedea0SLionel Sambuc	pushl	%esi
757*ebfedea0SLionel Sambuc	pushl	%edi
758*ebfedea0SLionel Sambuc	pushl	%esi
759*ebfedea0SLionel Sambuc	movl	%esp,%ebx
760*ebfedea0SLionel Sambuc	movl	36(%esp),%esi
761*ebfedea0SLionel Sambuc	movl	40(%esp),%edi
762*ebfedea0SLionel Sambuc
763*ebfedea0SLionel Sambuc	movl	56(%esp),%ecx
764*ebfedea0SLionel Sambuc
765*ebfedea0SLionel Sambuc	movl	48(%esp),%eax
766*ebfedea0SLionel Sambuc	pushl	%eax
767*ebfedea0SLionel Sambuc	pushl	%ebx
768*ebfedea0SLionel Sambuc	cmpl	$0,%ecx
769*ebfedea0SLionel Sambuc	jz	.L002decrypt
770*ebfedea0SLionel Sambuc	andl	$4294967288,%ebp
771*ebfedea0SLionel Sambuc	movl	8(%esp),%eax
772*ebfedea0SLionel Sambuc	movl	12(%esp),%ebx
773*ebfedea0SLionel Sambuc	jz	.L003encrypt_finish
774*ebfedea0SLionel Sambuc.L004encrypt_loop:
775*ebfedea0SLionel Sambuc	movl	(%esi),%ecx
776*ebfedea0SLionel Sambuc	movl	4(%esi),%edx
777*ebfedea0SLionel Sambuc	xorl	%ecx,%eax
778*ebfedea0SLionel Sambuc	xorl	%edx,%ebx
779*ebfedea0SLionel Sambuc	bswap	%eax
780*ebfedea0SLionel Sambuc	bswap	%ebx
781*ebfedea0SLionel Sambuc	movl	%eax,8(%esp)
782*ebfedea0SLionel Sambuc	movl	%ebx,12(%esp)
783*ebfedea0SLionel Sambuc	call	.L_CAST_encrypt_begin
784*ebfedea0SLionel Sambuc	movl	8(%esp),%eax
785*ebfedea0SLionel Sambuc	movl	12(%esp),%ebx
786*ebfedea0SLionel Sambuc	bswap	%eax
787*ebfedea0SLionel Sambuc	bswap	%ebx
788*ebfedea0SLionel Sambuc	movl	%eax,(%edi)
789*ebfedea0SLionel Sambuc	movl	%ebx,4(%edi)
790*ebfedea0SLionel Sambuc	addl	$8,%esi
791*ebfedea0SLionel Sambuc	addl	$8,%edi
792*ebfedea0SLionel Sambuc	subl	$8,%ebp
793*ebfedea0SLionel Sambuc	jnz	.L004encrypt_loop
794*ebfedea0SLionel Sambuc.L003encrypt_finish:
795*ebfedea0SLionel Sambuc	movl	52(%esp),%ebp
796*ebfedea0SLionel Sambuc	andl	$7,%ebp
797*ebfedea0SLionel Sambuc	jz	.L005finish
798*ebfedea0SLionel Sambuc	call	.L006PIC_point
799*ebfedea0SLionel Sambuc.L006PIC_point:
800*ebfedea0SLionel Sambuc	popl	%edx
801*ebfedea0SLionel Sambuc	leal	.L007cbc_enc_jmp_table-.L006PIC_point(%edx),%ecx
802*ebfedea0SLionel Sambuc	movl	(%ecx,%ebp,4),%ebp
803*ebfedea0SLionel Sambuc	addl	%edx,%ebp
804*ebfedea0SLionel Sambuc	xorl	%ecx,%ecx
805*ebfedea0SLionel Sambuc	xorl	%edx,%edx
806*ebfedea0SLionel Sambuc	jmp	*%ebp
807*ebfedea0SLionel Sambuc.L008ej7:
808*ebfedea0SLionel Sambuc	movb	6(%esi),%dh
809*ebfedea0SLionel Sambuc	shll	$8,%edx
810*ebfedea0SLionel Sambuc.L009ej6:
811*ebfedea0SLionel Sambuc	movb	5(%esi),%dh
812*ebfedea0SLionel Sambuc.L010ej5:
813*ebfedea0SLionel Sambuc	movb	4(%esi),%dl
814*ebfedea0SLionel Sambuc.L011ej4:
815*ebfedea0SLionel Sambuc	movl	(%esi),%ecx
816*ebfedea0SLionel Sambuc	jmp	.L012ejend
817*ebfedea0SLionel Sambuc.L013ej3:
818*ebfedea0SLionel Sambuc	movb	2(%esi),%ch
819*ebfedea0SLionel Sambuc	shll	$8,%ecx
820*ebfedea0SLionel Sambuc.L014ej2:
821*ebfedea0SLionel Sambuc	movb	1(%esi),%ch
822*ebfedea0SLionel Sambuc.L015ej1:
823*ebfedea0SLionel Sambuc	movb	(%esi),%cl
824*ebfedea0SLionel Sambuc.L012ejend:
825*ebfedea0SLionel Sambuc	xorl	%ecx,%eax
826*ebfedea0SLionel Sambuc	xorl	%edx,%ebx
827*ebfedea0SLionel Sambuc	bswap	%eax
828*ebfedea0SLionel Sambuc	bswap	%ebx
829*ebfedea0SLionel Sambuc	movl	%eax,8(%esp)
830*ebfedea0SLionel Sambuc	movl	%ebx,12(%esp)
831*ebfedea0SLionel Sambuc	call	.L_CAST_encrypt_begin
832*ebfedea0SLionel Sambuc	movl	8(%esp),%eax
833*ebfedea0SLionel Sambuc	movl	12(%esp),%ebx
834*ebfedea0SLionel Sambuc	bswap	%eax
835*ebfedea0SLionel Sambuc	bswap	%ebx
836*ebfedea0SLionel Sambuc	movl	%eax,(%edi)
837*ebfedea0SLionel Sambuc	movl	%ebx,4(%edi)
838*ebfedea0SLionel Sambuc	jmp	.L005finish
839*ebfedea0SLionel Sambuc.L002decrypt:
840*ebfedea0SLionel Sambuc	andl	$4294967288,%ebp
841*ebfedea0SLionel Sambuc	movl	16(%esp),%eax
842*ebfedea0SLionel Sambuc	movl	20(%esp),%ebx
843*ebfedea0SLionel Sambuc	jz	.L016decrypt_finish
844*ebfedea0SLionel Sambuc.L017decrypt_loop:
845*ebfedea0SLionel Sambuc	movl	(%esi),%eax
846*ebfedea0SLionel Sambuc	movl	4(%esi),%ebx
847*ebfedea0SLionel Sambuc	bswap	%eax
848*ebfedea0SLionel Sambuc	bswap	%ebx
849*ebfedea0SLionel Sambuc	movl	%eax,8(%esp)
850*ebfedea0SLionel Sambuc	movl	%ebx,12(%esp)
851*ebfedea0SLionel Sambuc	call	.L_CAST_decrypt_begin
852*ebfedea0SLionel Sambuc	movl	8(%esp),%eax
853*ebfedea0SLionel Sambuc	movl	12(%esp),%ebx
854*ebfedea0SLionel Sambuc	bswap	%eax
855*ebfedea0SLionel Sambuc	bswap	%ebx
856*ebfedea0SLionel Sambuc	movl	16(%esp),%ecx
857*ebfedea0SLionel Sambuc	movl	20(%esp),%edx
858*ebfedea0SLionel Sambuc	xorl	%eax,%ecx
859*ebfedea0SLionel Sambuc	xorl	%ebx,%edx
860*ebfedea0SLionel Sambuc	movl	(%esi),%eax
861*ebfedea0SLionel Sambuc	movl	4(%esi),%ebx
862*ebfedea0SLionel Sambuc	movl	%ecx,(%edi)
863*ebfedea0SLionel Sambuc	movl	%edx,4(%edi)
864*ebfedea0SLionel Sambuc	movl	%eax,16(%esp)
865*ebfedea0SLionel Sambuc	movl	%ebx,20(%esp)
866*ebfedea0SLionel Sambuc	addl	$8,%esi
867*ebfedea0SLionel Sambuc	addl	$8,%edi
868*ebfedea0SLionel Sambuc	subl	$8,%ebp
869*ebfedea0SLionel Sambuc	jnz	.L017decrypt_loop
870*ebfedea0SLionel Sambuc.L016decrypt_finish:
871*ebfedea0SLionel Sambuc	movl	52(%esp),%ebp
872*ebfedea0SLionel Sambuc	andl	$7,%ebp
873*ebfedea0SLionel Sambuc	jz	.L005finish
874*ebfedea0SLionel Sambuc	movl	(%esi),%eax
875*ebfedea0SLionel Sambuc	movl	4(%esi),%ebx
876*ebfedea0SLionel Sambuc	bswap	%eax
877*ebfedea0SLionel Sambuc	bswap	%ebx
878*ebfedea0SLionel Sambuc	movl	%eax,8(%esp)
879*ebfedea0SLionel Sambuc	movl	%ebx,12(%esp)
880*ebfedea0SLionel Sambuc	call	.L_CAST_decrypt_begin
881*ebfedea0SLionel Sambuc	movl	8(%esp),%eax
882*ebfedea0SLionel Sambuc	movl	12(%esp),%ebx
883*ebfedea0SLionel Sambuc	bswap	%eax
884*ebfedea0SLionel Sambuc	bswap	%ebx
885*ebfedea0SLionel Sambuc	movl	16(%esp),%ecx
886*ebfedea0SLionel Sambuc	movl	20(%esp),%edx
887*ebfedea0SLionel Sambuc	xorl	%eax,%ecx
888*ebfedea0SLionel Sambuc	xorl	%ebx,%edx
889*ebfedea0SLionel Sambuc	movl	(%esi),%eax
890*ebfedea0SLionel Sambuc	movl	4(%esi),%ebx
891*ebfedea0SLionel Sambuc.L018dj7:
892*ebfedea0SLionel Sambuc	rorl	$16,%edx
893*ebfedea0SLionel Sambuc	movb	%dl,6(%edi)
894*ebfedea0SLionel Sambuc	shrl	$16,%edx
895*ebfedea0SLionel Sambuc.L019dj6:
896*ebfedea0SLionel Sambuc	movb	%dh,5(%edi)
897*ebfedea0SLionel Sambuc.L020dj5:
898*ebfedea0SLionel Sambuc	movb	%dl,4(%edi)
899*ebfedea0SLionel Sambuc.L021dj4:
900*ebfedea0SLionel Sambuc	movl	%ecx,(%edi)
901*ebfedea0SLionel Sambuc	jmp	.L022djend
902*ebfedea0SLionel Sambuc.L023dj3:
903*ebfedea0SLionel Sambuc	rorl	$16,%ecx
904*ebfedea0SLionel Sambuc	movb	%cl,2(%edi)
905*ebfedea0SLionel Sambuc	shll	$16,%ecx
906*ebfedea0SLionel Sambuc.L024dj2:
907*ebfedea0SLionel Sambuc	movb	%ch,1(%esi)
908*ebfedea0SLionel Sambuc.L025dj1:
909*ebfedea0SLionel Sambuc	movb	%cl,(%esi)
910*ebfedea0SLionel Sambuc.L022djend:
911*ebfedea0SLionel Sambuc	jmp	.L005finish
912*ebfedea0SLionel Sambuc.L005finish:
913*ebfedea0SLionel Sambuc	movl	60(%esp),%ecx
914*ebfedea0SLionel Sambuc	addl	$24,%esp
915*ebfedea0SLionel Sambuc	movl	%eax,(%ecx)
916*ebfedea0SLionel Sambuc	movl	%ebx,4(%ecx)
917*ebfedea0SLionel Sambuc	popl	%edi
918*ebfedea0SLionel Sambuc	popl	%esi
919*ebfedea0SLionel Sambuc	popl	%ebx
920*ebfedea0SLionel Sambuc	popl	%ebp
921*ebfedea0SLionel Sambuc	ret
922*ebfedea0SLionel Sambuc.align	64
923*ebfedea0SLionel Sambuc.L007cbc_enc_jmp_table:
924*ebfedea0SLionel Sambuc.long	0
925*ebfedea0SLionel Sambuc.long	.L015ej1-.L006PIC_point
926*ebfedea0SLionel Sambuc.long	.L014ej2-.L006PIC_point
927*ebfedea0SLionel Sambuc.long	.L013ej3-.L006PIC_point
928*ebfedea0SLionel Sambuc.long	.L011ej4-.L006PIC_point
929*ebfedea0SLionel Sambuc.long	.L010ej5-.L006PIC_point
930*ebfedea0SLionel Sambuc.long	.L009ej6-.L006PIC_point
931*ebfedea0SLionel Sambuc.long	.L008ej7-.L006PIC_point
932*ebfedea0SLionel Sambuc.align	64
933*ebfedea0SLionel Sambuc.size	CAST_cbc_encrypt,.-.L_CAST_cbc_encrypt_begin
934