]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - secure/lib/libcrypto/i386/des-586.s
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / secure / lib / libcrypto / i386 / des-586.s
1         # $FreeBSD$
2 .file   "des-586.s"
3 .text
4 .globl  DES_SPtrans
5 .type   _x86_DES_encrypt,@function
6 .align  16
7 _x86_DES_encrypt:
8         pushl   %ecx
9
10         movl    (%ecx),%eax
11         xorl    %ebx,%ebx
12         movl    4(%ecx),%edx
13         xorl    %esi,%eax
14         xorl    %ecx,%ecx
15         xorl    %esi,%edx
16         andl    $0xfcfcfcfc,%eax
17         andl    $0xcfcfcfcf,%edx
18         movb    %al,%bl
19         movb    %ah,%cl
20         rorl    $4,%edx
21         xorl    (%ebp,%ebx,1),%edi
22         movb    %dl,%bl
23         xorl    0x200(%ebp,%ecx,1),%edi
24         movb    %dh,%cl
25         shrl    $16,%eax
26         xorl    0x100(%ebp,%ebx,1),%edi
27         movb    %ah,%bl
28         shrl    $16,%edx
29         xorl    0x300(%ebp,%ecx,1),%edi
30         movb    %dh,%cl
31         andl    $0xff,%eax
32         andl    $0xff,%edx
33         xorl    0x600(%ebp,%ebx,1),%edi
34         xorl    0x700(%ebp,%ecx,1),%edi
35         movl    (%esp),%ecx
36         xorl    0x400(%ebp,%eax,1),%edi
37         xorl    0x500(%ebp,%edx,1),%edi
38
39         movl    8(%ecx),%eax
40         xorl    %ebx,%ebx
41         movl    12(%ecx),%edx
42         xorl    %edi,%eax
43         xorl    %ecx,%ecx
44         xorl    %edi,%edx
45         andl    $0xfcfcfcfc,%eax
46         andl    $0xcfcfcfcf,%edx
47         movb    %al,%bl
48         movb    %ah,%cl
49         rorl    $4,%edx
50         xorl    (%ebp,%ebx,1),%esi
51         movb    %dl,%bl
52         xorl    0x200(%ebp,%ecx,1),%esi
53         movb    %dh,%cl
54         shrl    $16,%eax
55         xorl    0x100(%ebp,%ebx,1),%esi
56         movb    %ah,%bl
57         shrl    $16,%edx
58         xorl    0x300(%ebp,%ecx,1),%esi
59         movb    %dh,%cl
60         andl    $0xff,%eax
61         andl    $0xff,%edx
62         xorl    0x600(%ebp,%ebx,1),%esi
63         xorl    0x700(%ebp,%ecx,1),%esi
64         movl    (%esp),%ecx
65         xorl    0x400(%ebp,%eax,1),%esi
66         xorl    0x500(%ebp,%edx,1),%esi
67
68         movl    16(%ecx),%eax
69         xorl    %ebx,%ebx
70         movl    20(%ecx),%edx
71         xorl    %esi,%eax
72         xorl    %ecx,%ecx
73         xorl    %esi,%edx
74         andl    $0xfcfcfcfc,%eax
75         andl    $0xcfcfcfcf,%edx
76         movb    %al,%bl
77         movb    %ah,%cl
78         rorl    $4,%edx
79         xorl    (%ebp,%ebx,1),%edi
80         movb    %dl,%bl
81         xorl    0x200(%ebp,%ecx,1),%edi
82         movb    %dh,%cl
83         shrl    $16,%eax
84         xorl    0x100(%ebp,%ebx,1),%edi
85         movb    %ah,%bl
86         shrl    $16,%edx
87         xorl    0x300(%ebp,%ecx,1),%edi
88         movb    %dh,%cl
89         andl    $0xff,%eax
90         andl    $0xff,%edx
91         xorl    0x600(%ebp,%ebx,1),%edi
92         xorl    0x700(%ebp,%ecx,1),%edi
93         movl    (%esp),%ecx
94         xorl    0x400(%ebp,%eax,1),%edi
95         xorl    0x500(%ebp,%edx,1),%edi
96
97         movl    24(%ecx),%eax
98         xorl    %ebx,%ebx
99         movl    28(%ecx),%edx
100         xorl    %edi,%eax
101         xorl    %ecx,%ecx
102         xorl    %edi,%edx
103         andl    $0xfcfcfcfc,%eax
104         andl    $0xcfcfcfcf,%edx
105         movb    %al,%bl
106         movb    %ah,%cl
107         rorl    $4,%edx
108         xorl    (%ebp,%ebx,1),%esi
109         movb    %dl,%bl
110         xorl    0x200(%ebp,%ecx,1),%esi
111         movb    %dh,%cl
112         shrl    $16,%eax
113         xorl    0x100(%ebp,%ebx,1),%esi
114         movb    %ah,%bl
115         shrl    $16,%edx
116         xorl    0x300(%ebp,%ecx,1),%esi
117         movb    %dh,%cl
118         andl    $0xff,%eax
119         andl    $0xff,%edx
120         xorl    0x600(%ebp,%ebx,1),%esi
121         xorl    0x700(%ebp,%ecx,1),%esi
122         movl    (%esp),%ecx
123         xorl    0x400(%ebp,%eax,1),%esi
124         xorl    0x500(%ebp,%edx,1),%esi
125
126         movl    32(%ecx),%eax
127         xorl    %ebx,%ebx
128         movl    36(%ecx),%edx
129         xorl    %esi,%eax
130         xorl    %ecx,%ecx
131         xorl    %esi,%edx
132         andl    $0xfcfcfcfc,%eax
133         andl    $0xcfcfcfcf,%edx
134         movb    %al,%bl
135         movb    %ah,%cl
136         rorl    $4,%edx
137         xorl    (%ebp,%ebx,1),%edi
138         movb    %dl,%bl
139         xorl    0x200(%ebp,%ecx,1),%edi
140         movb    %dh,%cl
141         shrl    $16,%eax
142         xorl    0x100(%ebp,%ebx,1),%edi
143         movb    %ah,%bl
144         shrl    $16,%edx
145         xorl    0x300(%ebp,%ecx,1),%edi
146         movb    %dh,%cl
147         andl    $0xff,%eax
148         andl    $0xff,%edx
149         xorl    0x600(%ebp,%ebx,1),%edi
150         xorl    0x700(%ebp,%ecx,1),%edi
151         movl    (%esp),%ecx
152         xorl    0x400(%ebp,%eax,1),%edi
153         xorl    0x500(%ebp,%edx,1),%edi
154
155         movl    40(%ecx),%eax
156         xorl    %ebx,%ebx
157         movl    44(%ecx),%edx
158         xorl    %edi,%eax
159         xorl    %ecx,%ecx
160         xorl    %edi,%edx
161         andl    $0xfcfcfcfc,%eax
162         andl    $0xcfcfcfcf,%edx
163         movb    %al,%bl
164         movb    %ah,%cl
165         rorl    $4,%edx
166         xorl    (%ebp,%ebx,1),%esi
167         movb    %dl,%bl
168         xorl    0x200(%ebp,%ecx,1),%esi
169         movb    %dh,%cl
170         shrl    $16,%eax
171         xorl    0x100(%ebp,%ebx,1),%esi
172         movb    %ah,%bl
173         shrl    $16,%edx
174         xorl    0x300(%ebp,%ecx,1),%esi
175         movb    %dh,%cl
176         andl    $0xff,%eax
177         andl    $0xff,%edx
178         xorl    0x600(%ebp,%ebx,1),%esi
179         xorl    0x700(%ebp,%ecx,1),%esi
180         movl    (%esp),%ecx
181         xorl    0x400(%ebp,%eax,1),%esi
182         xorl    0x500(%ebp,%edx,1),%esi
183
184         movl    48(%ecx),%eax
185         xorl    %ebx,%ebx
186         movl    52(%ecx),%edx
187         xorl    %esi,%eax
188         xorl    %ecx,%ecx
189         xorl    %esi,%edx
190         andl    $0xfcfcfcfc,%eax
191         andl    $0xcfcfcfcf,%edx
192         movb    %al,%bl
193         movb    %ah,%cl
194         rorl    $4,%edx
195         xorl    (%ebp,%ebx,1),%edi
196         movb    %dl,%bl
197         xorl    0x200(%ebp,%ecx,1),%edi
198         movb    %dh,%cl
199         shrl    $16,%eax
200         xorl    0x100(%ebp,%ebx,1),%edi
201         movb    %ah,%bl
202         shrl    $16,%edx
203         xorl    0x300(%ebp,%ecx,1),%edi
204         movb    %dh,%cl
205         andl    $0xff,%eax
206         andl    $0xff,%edx
207         xorl    0x600(%ebp,%ebx,1),%edi
208         xorl    0x700(%ebp,%ecx,1),%edi
209         movl    (%esp),%ecx
210         xorl    0x400(%ebp,%eax,1),%edi
211         xorl    0x500(%ebp,%edx,1),%edi
212
213         movl    56(%ecx),%eax
214         xorl    %ebx,%ebx
215         movl    60(%ecx),%edx
216         xorl    %edi,%eax
217         xorl    %ecx,%ecx
218         xorl    %edi,%edx
219         andl    $0xfcfcfcfc,%eax
220         andl    $0xcfcfcfcf,%edx
221         movb    %al,%bl
222         movb    %ah,%cl
223         rorl    $4,%edx
224         xorl    (%ebp,%ebx,1),%esi
225         movb    %dl,%bl
226         xorl    0x200(%ebp,%ecx,1),%esi
227         movb    %dh,%cl
228         shrl    $16,%eax
229         xorl    0x100(%ebp,%ebx,1),%esi
230         movb    %ah,%bl
231         shrl    $16,%edx
232         xorl    0x300(%ebp,%ecx,1),%esi
233         movb    %dh,%cl
234         andl    $0xff,%eax
235         andl    $0xff,%edx
236         xorl    0x600(%ebp,%ebx,1),%esi
237         xorl    0x700(%ebp,%ecx,1),%esi
238         movl    (%esp),%ecx
239         xorl    0x400(%ebp,%eax,1),%esi
240         xorl    0x500(%ebp,%edx,1),%esi
241
242         movl    64(%ecx),%eax
243         xorl    %ebx,%ebx
244         movl    68(%ecx),%edx
245         xorl    %esi,%eax
246         xorl    %ecx,%ecx
247         xorl    %esi,%edx
248         andl    $0xfcfcfcfc,%eax
249         andl    $0xcfcfcfcf,%edx
250         movb    %al,%bl
251         movb    %ah,%cl
252         rorl    $4,%edx
253         xorl    (%ebp,%ebx,1),%edi
254         movb    %dl,%bl
255         xorl    0x200(%ebp,%ecx,1),%edi
256         movb    %dh,%cl
257         shrl    $16,%eax
258         xorl    0x100(%ebp,%ebx,1),%edi
259         movb    %ah,%bl
260         shrl    $16,%edx
261         xorl    0x300(%ebp,%ecx,1),%edi
262         movb    %dh,%cl
263         andl    $0xff,%eax
264         andl    $0xff,%edx
265         xorl    0x600(%ebp,%ebx,1),%edi
266         xorl    0x700(%ebp,%ecx,1),%edi
267         movl    (%esp),%ecx
268         xorl    0x400(%ebp,%eax,1),%edi
269         xorl    0x500(%ebp,%edx,1),%edi
270
271         movl    72(%ecx),%eax
272         xorl    %ebx,%ebx
273         movl    76(%ecx),%edx
274         xorl    %edi,%eax
275         xorl    %ecx,%ecx
276         xorl    %edi,%edx
277         andl    $0xfcfcfcfc,%eax
278         andl    $0xcfcfcfcf,%edx
279         movb    %al,%bl
280         movb    %ah,%cl
281         rorl    $4,%edx
282         xorl    (%ebp,%ebx,1),%esi
283         movb    %dl,%bl
284         xorl    0x200(%ebp,%ecx,1),%esi
285         movb    %dh,%cl
286         shrl    $16,%eax
287         xorl    0x100(%ebp,%ebx,1),%esi
288         movb    %ah,%bl
289         shrl    $16,%edx
290         xorl    0x300(%ebp,%ecx,1),%esi
291         movb    %dh,%cl
292         andl    $0xff,%eax
293         andl    $0xff,%edx
294         xorl    0x600(%ebp,%ebx,1),%esi
295         xorl    0x700(%ebp,%ecx,1),%esi
296         movl    (%esp),%ecx
297         xorl    0x400(%ebp,%eax,1),%esi
298         xorl    0x500(%ebp,%edx,1),%esi
299
300         movl    80(%ecx),%eax
301         xorl    %ebx,%ebx
302         movl    84(%ecx),%edx
303         xorl    %esi,%eax
304         xorl    %ecx,%ecx
305         xorl    %esi,%edx
306         andl    $0xfcfcfcfc,%eax
307         andl    $0xcfcfcfcf,%edx
308         movb    %al,%bl
309         movb    %ah,%cl
310         rorl    $4,%edx
311         xorl    (%ebp,%ebx,1),%edi
312         movb    %dl,%bl
313         xorl    0x200(%ebp,%ecx,1),%edi
314         movb    %dh,%cl
315         shrl    $16,%eax
316         xorl    0x100(%ebp,%ebx,1),%edi
317         movb    %ah,%bl
318         shrl    $16,%edx
319         xorl    0x300(%ebp,%ecx,1),%edi
320         movb    %dh,%cl
321         andl    $0xff,%eax
322         andl    $0xff,%edx
323         xorl    0x600(%ebp,%ebx,1),%edi
324         xorl    0x700(%ebp,%ecx,1),%edi
325         movl    (%esp),%ecx
326         xorl    0x400(%ebp,%eax,1),%edi
327         xorl    0x500(%ebp,%edx,1),%edi
328
329         movl    88(%ecx),%eax
330         xorl    %ebx,%ebx
331         movl    92(%ecx),%edx
332         xorl    %edi,%eax
333         xorl    %ecx,%ecx
334         xorl    %edi,%edx
335         andl    $0xfcfcfcfc,%eax
336         andl    $0xcfcfcfcf,%edx
337         movb    %al,%bl
338         movb    %ah,%cl
339         rorl    $4,%edx
340         xorl    (%ebp,%ebx,1),%esi
341         movb    %dl,%bl
342         xorl    0x200(%ebp,%ecx,1),%esi
343         movb    %dh,%cl
344         shrl    $16,%eax
345         xorl    0x100(%ebp,%ebx,1),%esi
346         movb    %ah,%bl
347         shrl    $16,%edx
348         xorl    0x300(%ebp,%ecx,1),%esi
349         movb    %dh,%cl
350         andl    $0xff,%eax
351         andl    $0xff,%edx
352         xorl    0x600(%ebp,%ebx,1),%esi
353         xorl    0x700(%ebp,%ecx,1),%esi
354         movl    (%esp),%ecx
355         xorl    0x400(%ebp,%eax,1),%esi
356         xorl    0x500(%ebp,%edx,1),%esi
357
358         movl    96(%ecx),%eax
359         xorl    %ebx,%ebx
360         movl    100(%ecx),%edx
361         xorl    %esi,%eax
362         xorl    %ecx,%ecx
363         xorl    %esi,%edx
364         andl    $0xfcfcfcfc,%eax
365         andl    $0xcfcfcfcf,%edx
366         movb    %al,%bl
367         movb    %ah,%cl
368         rorl    $4,%edx
369         xorl    (%ebp,%ebx,1),%edi
370         movb    %dl,%bl
371         xorl    0x200(%ebp,%ecx,1),%edi
372         movb    %dh,%cl
373         shrl    $16,%eax
374         xorl    0x100(%ebp,%ebx,1),%edi
375         movb    %ah,%bl
376         shrl    $16,%edx
377         xorl    0x300(%ebp,%ecx,1),%edi
378         movb    %dh,%cl
379         andl    $0xff,%eax
380         andl    $0xff,%edx
381         xorl    0x600(%ebp,%ebx,1),%edi
382         xorl    0x700(%ebp,%ecx,1),%edi
383         movl    (%esp),%ecx
384         xorl    0x400(%ebp,%eax,1),%edi
385         xorl    0x500(%ebp,%edx,1),%edi
386
387         movl    104(%ecx),%eax
388         xorl    %ebx,%ebx
389         movl    108(%ecx),%edx
390         xorl    %edi,%eax
391         xorl    %ecx,%ecx
392         xorl    %edi,%edx
393         andl    $0xfcfcfcfc,%eax
394         andl    $0xcfcfcfcf,%edx
395         movb    %al,%bl
396         movb    %ah,%cl
397         rorl    $4,%edx
398         xorl    (%ebp,%ebx,1),%esi
399         movb    %dl,%bl
400         xorl    0x200(%ebp,%ecx,1),%esi
401         movb    %dh,%cl
402         shrl    $16,%eax
403         xorl    0x100(%ebp,%ebx,1),%esi
404         movb    %ah,%bl
405         shrl    $16,%edx
406         xorl    0x300(%ebp,%ecx,1),%esi
407         movb    %dh,%cl
408         andl    $0xff,%eax
409         andl    $0xff,%edx
410         xorl    0x600(%ebp,%ebx,1),%esi
411         xorl    0x700(%ebp,%ecx,1),%esi
412         movl    (%esp),%ecx
413         xorl    0x400(%ebp,%eax,1),%esi
414         xorl    0x500(%ebp,%edx,1),%esi
415
416         movl    112(%ecx),%eax
417         xorl    %ebx,%ebx
418         movl    116(%ecx),%edx
419         xorl    %esi,%eax
420         xorl    %ecx,%ecx
421         xorl    %esi,%edx
422         andl    $0xfcfcfcfc,%eax
423         andl    $0xcfcfcfcf,%edx
424         movb    %al,%bl
425         movb    %ah,%cl
426         rorl    $4,%edx
427         xorl    (%ebp,%ebx,1),%edi
428         movb    %dl,%bl
429         xorl    0x200(%ebp,%ecx,1),%edi
430         movb    %dh,%cl
431         shrl    $16,%eax
432         xorl    0x100(%ebp,%ebx,1),%edi
433         movb    %ah,%bl
434         shrl    $16,%edx
435         xorl    0x300(%ebp,%ecx,1),%edi
436         movb    %dh,%cl
437         andl    $0xff,%eax
438         andl    $0xff,%edx
439         xorl    0x600(%ebp,%ebx,1),%edi
440         xorl    0x700(%ebp,%ecx,1),%edi
441         movl    (%esp),%ecx
442         xorl    0x400(%ebp,%eax,1),%edi
443         xorl    0x500(%ebp,%edx,1),%edi
444
445         movl    120(%ecx),%eax
446         xorl    %ebx,%ebx
447         movl    124(%ecx),%edx
448         xorl    %edi,%eax
449         xorl    %ecx,%ecx
450         xorl    %edi,%edx
451         andl    $0xfcfcfcfc,%eax
452         andl    $0xcfcfcfcf,%edx
453         movb    %al,%bl
454         movb    %ah,%cl
455         rorl    $4,%edx
456         xorl    (%ebp,%ebx,1),%esi
457         movb    %dl,%bl
458         xorl    0x200(%ebp,%ecx,1),%esi
459         movb    %dh,%cl
460         shrl    $16,%eax
461         xorl    0x100(%ebp,%ebx,1),%esi
462         movb    %ah,%bl
463         shrl    $16,%edx
464         xorl    0x300(%ebp,%ecx,1),%esi
465         movb    %dh,%cl
466         andl    $0xff,%eax
467         andl    $0xff,%edx
468         xorl    0x600(%ebp,%ebx,1),%esi
469         xorl    0x700(%ebp,%ecx,1),%esi
470         movl    (%esp),%ecx
471         xorl    0x400(%ebp,%eax,1),%esi
472         xorl    0x500(%ebp,%edx,1),%esi
473         addl    $4,%esp
474         ret
475 .size   _x86_DES_encrypt,.-_x86_DES_encrypt
476 .type   _x86_DES_decrypt,@function
477 .align  16
478 _x86_DES_decrypt:
479         pushl   %ecx
480
481         movl    120(%ecx),%eax
482         xorl    %ebx,%ebx
483         movl    124(%ecx),%edx
484         xorl    %esi,%eax
485         xorl    %ecx,%ecx
486         xorl    %esi,%edx
487         andl    $0xfcfcfcfc,%eax
488         andl    $0xcfcfcfcf,%edx
489         movb    %al,%bl
490         movb    %ah,%cl
491         rorl    $4,%edx
492         xorl    (%ebp,%ebx,1),%edi
493         movb    %dl,%bl
494         xorl    0x200(%ebp,%ecx,1),%edi
495         movb    %dh,%cl
496         shrl    $16,%eax
497         xorl    0x100(%ebp,%ebx,1),%edi
498         movb    %ah,%bl
499         shrl    $16,%edx
500         xorl    0x300(%ebp,%ecx,1),%edi
501         movb    %dh,%cl
502         andl    $0xff,%eax
503         andl    $0xff,%edx
504         xorl    0x600(%ebp,%ebx,1),%edi
505         xorl    0x700(%ebp,%ecx,1),%edi
506         movl    (%esp),%ecx
507         xorl    0x400(%ebp,%eax,1),%edi
508         xorl    0x500(%ebp,%edx,1),%edi
509
510         movl    112(%ecx),%eax
511         xorl    %ebx,%ebx
512         movl    116(%ecx),%edx
513         xorl    %edi,%eax
514         xorl    %ecx,%ecx
515         xorl    %edi,%edx
516         andl    $0xfcfcfcfc,%eax
517         andl    $0xcfcfcfcf,%edx
518         movb    %al,%bl
519         movb    %ah,%cl
520         rorl    $4,%edx
521         xorl    (%ebp,%ebx,1),%esi
522         movb    %dl,%bl
523         xorl    0x200(%ebp,%ecx,1),%esi
524         movb    %dh,%cl
525         shrl    $16,%eax
526         xorl    0x100(%ebp,%ebx,1),%esi
527         movb    %ah,%bl
528         shrl    $16,%edx
529         xorl    0x300(%ebp,%ecx,1),%esi
530         movb    %dh,%cl
531         andl    $0xff,%eax
532         andl    $0xff,%edx
533         xorl    0x600(%ebp,%ebx,1),%esi
534         xorl    0x700(%ebp,%ecx,1),%esi
535         movl    (%esp),%ecx
536         xorl    0x400(%ebp,%eax,1),%esi
537         xorl    0x500(%ebp,%edx,1),%esi
538
539         movl    104(%ecx),%eax
540         xorl    %ebx,%ebx
541         movl    108(%ecx),%edx
542         xorl    %esi,%eax
543         xorl    %ecx,%ecx
544         xorl    %esi,%edx
545         andl    $0xfcfcfcfc,%eax
546         andl    $0xcfcfcfcf,%edx
547         movb    %al,%bl
548         movb    %ah,%cl
549         rorl    $4,%edx
550         xorl    (%ebp,%ebx,1),%edi
551         movb    %dl,%bl
552         xorl    0x200(%ebp,%ecx,1),%edi
553         movb    %dh,%cl
554         shrl    $16,%eax
555         xorl    0x100(%ebp,%ebx,1),%edi
556         movb    %ah,%bl
557         shrl    $16,%edx
558         xorl    0x300(%ebp,%ecx,1),%edi
559         movb    %dh,%cl
560         andl    $0xff,%eax
561         andl    $0xff,%edx
562         xorl    0x600(%ebp,%ebx,1),%edi
563         xorl    0x700(%ebp,%ecx,1),%edi
564         movl    (%esp),%ecx
565         xorl    0x400(%ebp,%eax,1),%edi
566         xorl    0x500(%ebp,%edx,1),%edi
567
568         movl    96(%ecx),%eax
569         xorl    %ebx,%ebx
570         movl    100(%ecx),%edx
571         xorl    %edi,%eax
572         xorl    %ecx,%ecx
573         xorl    %edi,%edx
574         andl    $0xfcfcfcfc,%eax
575         andl    $0xcfcfcfcf,%edx
576         movb    %al,%bl
577         movb    %ah,%cl
578         rorl    $4,%edx
579         xorl    (%ebp,%ebx,1),%esi
580         movb    %dl,%bl
581         xorl    0x200(%ebp,%ecx,1),%esi
582         movb    %dh,%cl
583         shrl    $16,%eax
584         xorl    0x100(%ebp,%ebx,1),%esi
585         movb    %ah,%bl
586         shrl    $16,%edx
587         xorl    0x300(%ebp,%ecx,1),%esi
588         movb    %dh,%cl
589         andl    $0xff,%eax
590         andl    $0xff,%edx
591         xorl    0x600(%ebp,%ebx,1),%esi
592         xorl    0x700(%ebp,%ecx,1),%esi
593         movl    (%esp),%ecx
594         xorl    0x400(%ebp,%eax,1),%esi
595         xorl    0x500(%ebp,%edx,1),%esi
596
597         movl    88(%ecx),%eax
598         xorl    %ebx,%ebx
599         movl    92(%ecx),%edx
600         xorl    %esi,%eax
601         xorl    %ecx,%ecx
602         xorl    %esi,%edx
603         andl    $0xfcfcfcfc,%eax
604         andl    $0xcfcfcfcf,%edx
605         movb    %al,%bl
606         movb    %ah,%cl
607         rorl    $4,%edx
608         xorl    (%ebp,%ebx,1),%edi
609         movb    %dl,%bl
610         xorl    0x200(%ebp,%ecx,1),%edi
611         movb    %dh,%cl
612         shrl    $16,%eax
613         xorl    0x100(%ebp,%ebx,1),%edi
614         movb    %ah,%bl
615         shrl    $16,%edx
616         xorl    0x300(%ebp,%ecx,1),%edi
617         movb    %dh,%cl
618         andl    $0xff,%eax
619         andl    $0xff,%edx
620         xorl    0x600(%ebp,%ebx,1),%edi
621         xorl    0x700(%ebp,%ecx,1),%edi
622         movl    (%esp),%ecx
623         xorl    0x400(%ebp,%eax,1),%edi
624         xorl    0x500(%ebp,%edx,1),%edi
625
626         movl    80(%ecx),%eax
627         xorl    %ebx,%ebx
628         movl    84(%ecx),%edx
629         xorl    %edi,%eax
630         xorl    %ecx,%ecx
631         xorl    %edi,%edx
632         andl    $0xfcfcfcfc,%eax
633         andl    $0xcfcfcfcf,%edx
634         movb    %al,%bl
635         movb    %ah,%cl
636         rorl    $4,%edx
637         xorl    (%ebp,%ebx,1),%esi
638         movb    %dl,%bl
639         xorl    0x200(%ebp,%ecx,1),%esi
640         movb    %dh,%cl
641         shrl    $16,%eax
642         xorl    0x100(%ebp,%ebx,1),%esi
643         movb    %ah,%bl
644         shrl    $16,%edx
645         xorl    0x300(%ebp,%ecx,1),%esi
646         movb    %dh,%cl
647         andl    $0xff,%eax
648         andl    $0xff,%edx
649         xorl    0x600(%ebp,%ebx,1),%esi
650         xorl    0x700(%ebp,%ecx,1),%esi
651         movl    (%esp),%ecx
652         xorl    0x400(%ebp,%eax,1),%esi
653         xorl    0x500(%ebp,%edx,1),%esi
654
655         movl    72(%ecx),%eax
656         xorl    %ebx,%ebx
657         movl    76(%ecx),%edx
658         xorl    %esi,%eax
659         xorl    %ecx,%ecx
660         xorl    %esi,%edx
661         andl    $0xfcfcfcfc,%eax
662         andl    $0xcfcfcfcf,%edx
663         movb    %al,%bl
664         movb    %ah,%cl
665         rorl    $4,%edx
666         xorl    (%ebp,%ebx,1),%edi
667         movb    %dl,%bl
668         xorl    0x200(%ebp,%ecx,1),%edi
669         movb    %dh,%cl
670         shrl    $16,%eax
671         xorl    0x100(%ebp,%ebx,1),%edi
672         movb    %ah,%bl
673         shrl    $16,%edx
674         xorl    0x300(%ebp,%ecx,1),%edi
675         movb    %dh,%cl
676         andl    $0xff,%eax
677         andl    $0xff,%edx
678         xorl    0x600(%ebp,%ebx,1),%edi
679         xorl    0x700(%ebp,%ecx,1),%edi
680         movl    (%esp),%ecx
681         xorl    0x400(%ebp,%eax,1),%edi
682         xorl    0x500(%ebp,%edx,1),%edi
683
684         movl    64(%ecx),%eax
685         xorl    %ebx,%ebx
686         movl    68(%ecx),%edx
687         xorl    %edi,%eax
688         xorl    %ecx,%ecx
689         xorl    %edi,%edx
690         andl    $0xfcfcfcfc,%eax
691         andl    $0xcfcfcfcf,%edx
692         movb    %al,%bl
693         movb    %ah,%cl
694         rorl    $4,%edx
695         xorl    (%ebp,%ebx,1),%esi
696         movb    %dl,%bl
697         xorl    0x200(%ebp,%ecx,1),%esi
698         movb    %dh,%cl
699         shrl    $16,%eax
700         xorl    0x100(%ebp,%ebx,1),%esi
701         movb    %ah,%bl
702         shrl    $16,%edx
703         xorl    0x300(%ebp,%ecx,1),%esi
704         movb    %dh,%cl
705         andl    $0xff,%eax
706         andl    $0xff,%edx
707         xorl    0x600(%ebp,%ebx,1),%esi
708         xorl    0x700(%ebp,%ecx,1),%esi
709         movl    (%esp),%ecx
710         xorl    0x400(%ebp,%eax,1),%esi
711         xorl    0x500(%ebp,%edx,1),%esi
712
713         movl    56(%ecx),%eax
714         xorl    %ebx,%ebx
715         movl    60(%ecx),%edx
716         xorl    %esi,%eax
717         xorl    %ecx,%ecx
718         xorl    %esi,%edx
719         andl    $0xfcfcfcfc,%eax
720         andl    $0xcfcfcfcf,%edx
721         movb    %al,%bl
722         movb    %ah,%cl
723         rorl    $4,%edx
724         xorl    (%ebp,%ebx,1),%edi
725         movb    %dl,%bl
726         xorl    0x200(%ebp,%ecx,1),%edi
727         movb    %dh,%cl
728         shrl    $16,%eax
729         xorl    0x100(%ebp,%ebx,1),%edi
730         movb    %ah,%bl
731         shrl    $16,%edx
732         xorl    0x300(%ebp,%ecx,1),%edi
733         movb    %dh,%cl
734         andl    $0xff,%eax
735         andl    $0xff,%edx
736         xorl    0x600(%ebp,%ebx,1),%edi
737         xorl    0x700(%ebp,%ecx,1),%edi
738         movl    (%esp),%ecx
739         xorl    0x400(%ebp,%eax,1),%edi
740         xorl    0x500(%ebp,%edx,1),%edi
741
742         movl    48(%ecx),%eax
743         xorl    %ebx,%ebx
744         movl    52(%ecx),%edx
745         xorl    %edi,%eax
746         xorl    %ecx,%ecx
747         xorl    %edi,%edx
748         andl    $0xfcfcfcfc,%eax
749         andl    $0xcfcfcfcf,%edx
750         movb    %al,%bl
751         movb    %ah,%cl
752         rorl    $4,%edx
753         xorl    (%ebp,%ebx,1),%esi
754         movb    %dl,%bl
755         xorl    0x200(%ebp,%ecx,1),%esi
756         movb    %dh,%cl
757         shrl    $16,%eax
758         xorl    0x100(%ebp,%ebx,1),%esi
759         movb    %ah,%bl
760         shrl    $16,%edx
761         xorl    0x300(%ebp,%ecx,1),%esi
762         movb    %dh,%cl
763         andl    $0xff,%eax
764         andl    $0xff,%edx
765         xorl    0x600(%ebp,%ebx,1),%esi
766         xorl    0x700(%ebp,%ecx,1),%esi
767         movl    (%esp),%ecx
768         xorl    0x400(%ebp,%eax,1),%esi
769         xorl    0x500(%ebp,%edx,1),%esi
770
771         movl    40(%ecx),%eax
772         xorl    %ebx,%ebx
773         movl    44(%ecx),%edx
774         xorl    %esi,%eax
775         xorl    %ecx,%ecx
776         xorl    %esi,%edx
777         andl    $0xfcfcfcfc,%eax
778         andl    $0xcfcfcfcf,%edx
779         movb    %al,%bl
780         movb    %ah,%cl
781         rorl    $4,%edx
782         xorl    (%ebp,%ebx,1),%edi
783         movb    %dl,%bl
784         xorl    0x200(%ebp,%ecx,1),%edi
785         movb    %dh,%cl
786         shrl    $16,%eax
787         xorl    0x100(%ebp,%ebx,1),%edi
788         movb    %ah,%bl
789         shrl    $16,%edx
790         xorl    0x300(%ebp,%ecx,1),%edi
791         movb    %dh,%cl
792         andl    $0xff,%eax
793         andl    $0xff,%edx
794         xorl    0x600(%ebp,%ebx,1),%edi
795         xorl    0x700(%ebp,%ecx,1),%edi
796         movl    (%esp),%ecx
797         xorl    0x400(%ebp,%eax,1),%edi
798         xorl    0x500(%ebp,%edx,1),%edi
799
800         movl    32(%ecx),%eax
801         xorl    %ebx,%ebx
802         movl    36(%ecx),%edx
803         xorl    %edi,%eax
804         xorl    %ecx,%ecx
805         xorl    %edi,%edx
806         andl    $0xfcfcfcfc,%eax
807         andl    $0xcfcfcfcf,%edx
808         movb    %al,%bl
809         movb    %ah,%cl
810         rorl    $4,%edx
811         xorl    (%ebp,%ebx,1),%esi
812         movb    %dl,%bl
813         xorl    0x200(%ebp,%ecx,1),%esi
814         movb    %dh,%cl
815         shrl    $16,%eax
816         xorl    0x100(%ebp,%ebx,1),%esi
817         movb    %ah,%bl
818         shrl    $16,%edx
819         xorl    0x300(%ebp,%ecx,1),%esi
820         movb    %dh,%cl
821         andl    $0xff,%eax
822         andl    $0xff,%edx
823         xorl    0x600(%ebp,%ebx,1),%esi
824         xorl    0x700(%ebp,%ecx,1),%esi
825         movl    (%esp),%ecx
826         xorl    0x400(%ebp,%eax,1),%esi
827         xorl    0x500(%ebp,%edx,1),%esi
828
829         movl    24(%ecx),%eax
830         xorl    %ebx,%ebx
831         movl    28(%ecx),%edx
832         xorl    %esi,%eax
833         xorl    %ecx,%ecx
834         xorl    %esi,%edx
835         andl    $0xfcfcfcfc,%eax
836         andl    $0xcfcfcfcf,%edx
837         movb    %al,%bl
838         movb    %ah,%cl
839         rorl    $4,%edx
840         xorl    (%ebp,%ebx,1),%edi
841         movb    %dl,%bl
842         xorl    0x200(%ebp,%ecx,1),%edi
843         movb    %dh,%cl
844         shrl    $16,%eax
845         xorl    0x100(%ebp,%ebx,1),%edi
846         movb    %ah,%bl
847         shrl    $16,%edx
848         xorl    0x300(%ebp,%ecx,1),%edi
849         movb    %dh,%cl
850         andl    $0xff,%eax
851         andl    $0xff,%edx
852         xorl    0x600(%ebp,%ebx,1),%edi
853         xorl    0x700(%ebp,%ecx,1),%edi
854         movl    (%esp),%ecx
855         xorl    0x400(%ebp,%eax,1),%edi
856         xorl    0x500(%ebp,%edx,1),%edi
857
858         movl    16(%ecx),%eax
859         xorl    %ebx,%ebx
860         movl    20(%ecx),%edx
861         xorl    %edi,%eax
862         xorl    %ecx,%ecx
863         xorl    %edi,%edx
864         andl    $0xfcfcfcfc,%eax
865         andl    $0xcfcfcfcf,%edx
866         movb    %al,%bl
867         movb    %ah,%cl
868         rorl    $4,%edx
869         xorl    (%ebp,%ebx,1),%esi
870         movb    %dl,%bl
871         xorl    0x200(%ebp,%ecx,1),%esi
872         movb    %dh,%cl
873         shrl    $16,%eax
874         xorl    0x100(%ebp,%ebx,1),%esi
875         movb    %ah,%bl
876         shrl    $16,%edx
877         xorl    0x300(%ebp,%ecx,1),%esi
878         movb    %dh,%cl
879         andl    $0xff,%eax
880         andl    $0xff,%edx
881         xorl    0x600(%ebp,%ebx,1),%esi
882         xorl    0x700(%ebp,%ecx,1),%esi
883         movl    (%esp),%ecx
884         xorl    0x400(%ebp,%eax,1),%esi
885         xorl    0x500(%ebp,%edx,1),%esi
886
887         movl    8(%ecx),%eax
888         xorl    %ebx,%ebx
889         movl    12(%ecx),%edx
890         xorl    %esi,%eax
891         xorl    %ecx,%ecx
892         xorl    %esi,%edx
893         andl    $0xfcfcfcfc,%eax
894         andl    $0xcfcfcfcf,%edx
895         movb    %al,%bl
896         movb    %ah,%cl
897         rorl    $4,%edx
898         xorl    (%ebp,%ebx,1),%edi
899         movb    %dl,%bl
900         xorl    0x200(%ebp,%ecx,1),%edi
901         movb    %dh,%cl
902         shrl    $16,%eax
903         xorl    0x100(%ebp,%ebx,1),%edi
904         movb    %ah,%bl
905         shrl    $16,%edx
906         xorl    0x300(%ebp,%ecx,1),%edi
907         movb    %dh,%cl
908         andl    $0xff,%eax
909         andl    $0xff,%edx
910         xorl    0x600(%ebp,%ebx,1),%edi
911         xorl    0x700(%ebp,%ecx,1),%edi
912         movl    (%esp),%ecx
913         xorl    0x400(%ebp,%eax,1),%edi
914         xorl    0x500(%ebp,%edx,1),%edi
915
916         movl    (%ecx),%eax
917         xorl    %ebx,%ebx
918         movl    4(%ecx),%edx
919         xorl    %edi,%eax
920         xorl    %ecx,%ecx
921         xorl    %edi,%edx
922         andl    $0xfcfcfcfc,%eax
923         andl    $0xcfcfcfcf,%edx
924         movb    %al,%bl
925         movb    %ah,%cl
926         rorl    $4,%edx
927         xorl    (%ebp,%ebx,1),%esi
928         movb    %dl,%bl
929         xorl    0x200(%ebp,%ecx,1),%esi
930         movb    %dh,%cl
931         shrl    $16,%eax
932         xorl    0x100(%ebp,%ebx,1),%esi
933         movb    %ah,%bl
934         shrl    $16,%edx
935         xorl    0x300(%ebp,%ecx,1),%esi
936         movb    %dh,%cl
937         andl    $0xff,%eax
938         andl    $0xff,%edx
939         xorl    0x600(%ebp,%ebx,1),%esi
940         xorl    0x700(%ebp,%ecx,1),%esi
941         movl    (%esp),%ecx
942         xorl    0x400(%ebp,%eax,1),%esi
943         xorl    0x500(%ebp,%edx,1),%esi
944         addl    $4,%esp
945         ret
946 .size   _x86_DES_decrypt,.-_x86_DES_decrypt
947 .globl  DES_encrypt1
948 .type   DES_encrypt1,@function
949 .align  16
950 DES_encrypt1:
951 .L_DES_encrypt1_begin:
952         pushl   %esi
953         pushl   %edi
954
955
956         movl    12(%esp),%esi
957         xorl    %ecx,%ecx
958         pushl   %ebx
959         pushl   %ebp
960         movl    (%esi),%eax
961         movl    28(%esp),%ebx
962         movl    4(%esi),%edi
963
964
965         roll    $4,%eax
966         movl    %eax,%esi
967         xorl    %edi,%eax
968         andl    $0xf0f0f0f0,%eax
969         xorl    %eax,%esi
970         xorl    %eax,%edi
971
972         roll    $20,%edi
973         movl    %edi,%eax
974         xorl    %esi,%edi
975         andl    $0xfff0000f,%edi
976         xorl    %edi,%eax
977         xorl    %edi,%esi
978
979         roll    $14,%eax
980         movl    %eax,%edi
981         xorl    %esi,%eax
982         andl    $0x33333333,%eax
983         xorl    %eax,%edi
984         xorl    %eax,%esi
985
986         roll    $22,%esi
987         movl    %esi,%eax
988         xorl    %edi,%esi
989         andl    $0x03fc03fc,%esi
990         xorl    %esi,%eax
991         xorl    %esi,%edi
992
993         roll    $9,%eax
994         movl    %eax,%esi
995         xorl    %edi,%eax
996         andl    $0xaaaaaaaa,%eax
997         xorl    %eax,%esi
998         xorl    %eax,%edi
999
1000         roll    $1,%edi
1001         call    .L000pic_point
1002 .L000pic_point:
1003         popl    %ebp
1004         leal    DES_SPtrans-.L000pic_point(%ebp),%ebp
1005         movl    24(%esp),%ecx
1006         cmpl    $0,%ebx
1007         je      .L001decrypt
1008         call    _x86_DES_encrypt
1009         jmp     .L002done
1010 .L001decrypt:
1011         call    _x86_DES_decrypt
1012 .L002done:
1013
1014
1015         movl    20(%esp),%edx
1016         rorl    $1,%esi
1017         movl    %edi,%eax
1018         xorl    %esi,%edi
1019         andl    $0xaaaaaaaa,%edi
1020         xorl    %edi,%eax
1021         xorl    %edi,%esi
1022
1023         roll    $23,%eax
1024         movl    %eax,%edi
1025         xorl    %esi,%eax
1026         andl    $0x03fc03fc,%eax
1027         xorl    %eax,%edi
1028         xorl    %eax,%esi
1029
1030         roll    $10,%edi
1031         movl    %edi,%eax
1032         xorl    %esi,%edi
1033         andl    $0x33333333,%edi
1034         xorl    %edi,%eax
1035         xorl    %edi,%esi
1036
1037         roll    $18,%esi
1038         movl    %esi,%edi
1039         xorl    %eax,%esi
1040         andl    $0xfff0000f,%esi
1041         xorl    %esi,%edi
1042         xorl    %esi,%eax
1043
1044         roll    $12,%edi
1045         movl    %edi,%esi
1046         xorl    %eax,%edi
1047         andl    $0xf0f0f0f0,%edi
1048         xorl    %edi,%esi
1049         xorl    %edi,%eax
1050
1051         rorl    $4,%eax
1052         movl    %eax,(%edx)
1053         movl    %esi,4(%edx)
1054         popl    %ebp
1055         popl    %ebx
1056         popl    %edi
1057         popl    %esi
1058         ret
1059 .size   DES_encrypt1,.-.L_DES_encrypt1_begin
1060 .globl  DES_encrypt2
1061 .type   DES_encrypt2,@function
1062 .align  16
1063 DES_encrypt2:
1064 .L_DES_encrypt2_begin:
1065         pushl   %esi
1066         pushl   %edi
1067
1068
1069         movl    12(%esp),%eax
1070         xorl    %ecx,%ecx
1071         pushl   %ebx
1072         pushl   %ebp
1073         movl    (%eax),%esi
1074         movl    28(%esp),%ebx
1075         roll    $3,%esi
1076         movl    4(%eax),%edi
1077         roll    $3,%edi
1078         call    .L003pic_point
1079 .L003pic_point:
1080         popl    %ebp
1081         leal    DES_SPtrans-.L003pic_point(%ebp),%ebp
1082         movl    24(%esp),%ecx
1083         cmpl    $0,%ebx
1084         je      .L004decrypt
1085         call    _x86_DES_encrypt
1086         jmp     .L005done
1087 .L004decrypt:
1088         call    _x86_DES_decrypt
1089 .L005done:
1090
1091
1092         rorl    $3,%edi
1093         movl    20(%esp),%eax
1094         rorl    $3,%esi
1095         movl    %edi,(%eax)
1096         movl    %esi,4(%eax)
1097         popl    %ebp
1098         popl    %ebx
1099         popl    %edi
1100         popl    %esi
1101         ret
1102 .size   DES_encrypt2,.-.L_DES_encrypt2_begin
1103 .globl  DES_encrypt3
1104 .type   DES_encrypt3,@function
1105 .align  16
1106 DES_encrypt3:
1107 .L_DES_encrypt3_begin:
1108         pushl   %ebx
1109         movl    8(%esp),%ebx
1110         pushl   %ebp
1111         pushl   %esi
1112         pushl   %edi
1113
1114
1115         movl    (%ebx),%edi
1116         movl    4(%ebx),%esi
1117         subl    $12,%esp
1118
1119
1120         roll    $4,%edi
1121         movl    %edi,%edx
1122         xorl    %esi,%edi
1123         andl    $0xf0f0f0f0,%edi
1124         xorl    %edi,%edx
1125         xorl    %edi,%esi
1126
1127         roll    $20,%esi
1128         movl    %esi,%edi
1129         xorl    %edx,%esi
1130         andl    $0xfff0000f,%esi
1131         xorl    %esi,%edi
1132         xorl    %esi,%edx
1133
1134         roll    $14,%edi
1135         movl    %edi,%esi
1136         xorl    %edx,%edi
1137         andl    $0x33333333,%edi
1138         xorl    %edi,%esi
1139         xorl    %edi,%edx
1140
1141         roll    $22,%edx
1142         movl    %edx,%edi
1143         xorl    %esi,%edx
1144         andl    $0x03fc03fc,%edx
1145         xorl    %edx,%edi
1146         xorl    %edx,%esi
1147
1148         roll    $9,%edi
1149         movl    %edi,%edx
1150         xorl    %esi,%edi
1151         andl    $0xaaaaaaaa,%edi
1152         xorl    %edi,%edx
1153         xorl    %edi,%esi
1154
1155         rorl    $3,%edx
1156         rorl    $2,%esi
1157         movl    %esi,4(%ebx)
1158         movl    36(%esp),%eax
1159         movl    %edx,(%ebx)
1160         movl    40(%esp),%edi
1161         movl    44(%esp),%esi
1162         movl    $1,8(%esp)
1163         movl    %eax,4(%esp)
1164         movl    %ebx,(%esp)
1165         call    .L_DES_encrypt2_begin
1166         movl    $0,8(%esp)
1167         movl    %edi,4(%esp)
1168         movl    %ebx,(%esp)
1169         call    .L_DES_encrypt2_begin
1170         movl    $1,8(%esp)
1171         movl    %esi,4(%esp)
1172         movl    %ebx,(%esp)
1173         call    .L_DES_encrypt2_begin
1174         addl    $12,%esp
1175         movl    (%ebx),%edi
1176         movl    4(%ebx),%esi
1177
1178
1179         roll    $2,%esi
1180         roll    $3,%edi
1181         movl    %edi,%eax
1182         xorl    %esi,%edi
1183         andl    $0xaaaaaaaa,%edi
1184         xorl    %edi,%eax
1185         xorl    %edi,%esi
1186
1187         roll    $23,%eax
1188         movl    %eax,%edi
1189         xorl    %esi,%eax
1190         andl    $0x03fc03fc,%eax
1191         xorl    %eax,%edi
1192         xorl    %eax,%esi
1193
1194         roll    $10,%edi
1195         movl    %edi,%eax
1196         xorl    %esi,%edi
1197         andl    $0x33333333,%edi
1198         xorl    %edi,%eax
1199         xorl    %edi,%esi
1200
1201         roll    $18,%esi
1202         movl    %esi,%edi
1203         xorl    %eax,%esi
1204         andl    $0xfff0000f,%esi
1205         xorl    %esi,%edi
1206         xorl    %esi,%eax
1207
1208         roll    $12,%edi
1209         movl    %edi,%esi
1210         xorl    %eax,%edi
1211         andl    $0xf0f0f0f0,%edi
1212         xorl    %edi,%esi
1213         xorl    %edi,%eax
1214
1215         rorl    $4,%eax
1216         movl    %eax,(%ebx)
1217         movl    %esi,4(%ebx)
1218         popl    %edi
1219         popl    %esi
1220         popl    %ebp
1221         popl    %ebx
1222         ret
1223 .size   DES_encrypt3,.-.L_DES_encrypt3_begin
1224 .globl  DES_decrypt3
1225 .type   DES_decrypt3,@function
1226 .align  16
1227 DES_decrypt3:
1228 .L_DES_decrypt3_begin:
1229         pushl   %ebx
1230         movl    8(%esp),%ebx
1231         pushl   %ebp
1232         pushl   %esi
1233         pushl   %edi
1234
1235
1236         movl    (%ebx),%edi
1237         movl    4(%ebx),%esi
1238         subl    $12,%esp
1239
1240
1241         roll    $4,%edi
1242         movl    %edi,%edx
1243         xorl    %esi,%edi
1244         andl    $0xf0f0f0f0,%edi
1245         xorl    %edi,%edx
1246         xorl    %edi,%esi
1247
1248         roll    $20,%esi
1249         movl    %esi,%edi
1250         xorl    %edx,%esi
1251         andl    $0xfff0000f,%esi
1252         xorl    %esi,%edi
1253         xorl    %esi,%edx
1254
1255         roll    $14,%edi
1256         movl    %edi,%esi
1257         xorl    %edx,%edi
1258         andl    $0x33333333,%edi
1259         xorl    %edi,%esi
1260         xorl    %edi,%edx
1261
1262         roll    $22,%edx
1263         movl    %edx,%edi
1264         xorl    %esi,%edx
1265         andl    $0x03fc03fc,%edx
1266         xorl    %edx,%edi
1267         xorl    %edx,%esi
1268
1269         roll    $9,%edi
1270         movl    %edi,%edx
1271         xorl    %esi,%edi
1272         andl    $0xaaaaaaaa,%edi
1273         xorl    %edi,%edx
1274         xorl    %edi,%esi
1275
1276         rorl    $3,%edx
1277         rorl    $2,%esi
1278         movl    %esi,4(%ebx)
1279         movl    36(%esp),%esi
1280         movl    %edx,(%ebx)
1281         movl    40(%esp),%edi
1282         movl    44(%esp),%eax
1283         movl    $0,8(%esp)
1284         movl    %eax,4(%esp)
1285         movl    %ebx,(%esp)
1286         call    .L_DES_encrypt2_begin
1287         movl    $1,8(%esp)
1288         movl    %edi,4(%esp)
1289         movl    %ebx,(%esp)
1290         call    .L_DES_encrypt2_begin
1291         movl    $0,8(%esp)
1292         movl    %esi,4(%esp)
1293         movl    %ebx,(%esp)
1294         call    .L_DES_encrypt2_begin
1295         addl    $12,%esp
1296         movl    (%ebx),%edi
1297         movl    4(%ebx),%esi
1298
1299
1300         roll    $2,%esi
1301         roll    $3,%edi
1302         movl    %edi,%eax
1303         xorl    %esi,%edi
1304         andl    $0xaaaaaaaa,%edi
1305         xorl    %edi,%eax
1306         xorl    %edi,%esi
1307
1308         roll    $23,%eax
1309         movl    %eax,%edi
1310         xorl    %esi,%eax
1311         andl    $0x03fc03fc,%eax
1312         xorl    %eax,%edi
1313         xorl    %eax,%esi
1314
1315         roll    $10,%edi
1316         movl    %edi,%eax
1317         xorl    %esi,%edi
1318         andl    $0x33333333,%edi
1319         xorl    %edi,%eax
1320         xorl    %edi,%esi
1321
1322         roll    $18,%esi
1323         movl    %esi,%edi
1324         xorl    %eax,%esi
1325         andl    $0xfff0000f,%esi
1326         xorl    %esi,%edi
1327         xorl    %esi,%eax
1328
1329         roll    $12,%edi
1330         movl    %edi,%esi
1331         xorl    %eax,%edi
1332         andl    $0xf0f0f0f0,%edi
1333         xorl    %edi,%esi
1334         xorl    %edi,%eax
1335
1336         rorl    $4,%eax
1337         movl    %eax,(%ebx)
1338         movl    %esi,4(%ebx)
1339         popl    %edi
1340         popl    %esi
1341         popl    %ebp
1342         popl    %ebx
1343         ret
1344 .size   DES_decrypt3,.-.L_DES_decrypt3_begin
1345 .globl  DES_ncbc_encrypt
1346 .type   DES_ncbc_encrypt,@function
1347 .align  16
1348 DES_ncbc_encrypt:
1349 .L_DES_ncbc_encrypt_begin:
1350
1351         pushl   %ebp
1352         pushl   %ebx
1353         pushl   %esi
1354         pushl   %edi
1355         movl    28(%esp),%ebp
1356
1357         movl    36(%esp),%ebx
1358         movl    (%ebx),%esi
1359         movl    4(%ebx),%edi
1360         pushl   %edi
1361         pushl   %esi
1362         pushl   %edi
1363         pushl   %esi
1364         movl    %esp,%ebx
1365         movl    36(%esp),%esi
1366         movl    40(%esp),%edi
1367
1368         movl    56(%esp),%ecx
1369
1370         pushl   %ecx
1371
1372         movl    52(%esp),%eax
1373         pushl   %eax
1374         pushl   %ebx
1375         cmpl    $0,%ecx
1376         jz      .L006decrypt
1377         andl    $4294967288,%ebp
1378         movl    12(%esp),%eax
1379         movl    16(%esp),%ebx
1380         jz      .L007encrypt_finish
1381 .L008encrypt_loop:
1382         movl    (%esi),%ecx
1383         movl    4(%esi),%edx
1384         xorl    %ecx,%eax
1385         xorl    %edx,%ebx
1386         movl    %eax,12(%esp)
1387         movl    %ebx,16(%esp)
1388         call    .L_DES_encrypt1_begin
1389         movl    12(%esp),%eax
1390         movl    16(%esp),%ebx
1391         movl    %eax,(%edi)
1392         movl    %ebx,4(%edi)
1393         addl    $8,%esi
1394         addl    $8,%edi
1395         subl    $8,%ebp
1396         jnz     .L008encrypt_loop
1397 .L007encrypt_finish:
1398         movl    56(%esp),%ebp
1399         andl    $7,%ebp
1400         jz      .L009finish
1401         call    .L010PIC_point
1402 .L010PIC_point:
1403         popl    %edx
1404         leal    .L011cbc_enc_jmp_table-.L010PIC_point(%edx),%ecx
1405         movl    (%ecx,%ebp,4),%ebp
1406         addl    %edx,%ebp
1407         xorl    %ecx,%ecx
1408         xorl    %edx,%edx
1409         jmp     *%ebp
1410 .L012ej7:
1411         movb    6(%esi),%dh
1412         shll    $8,%edx
1413 .L013ej6:
1414         movb    5(%esi),%dh
1415 .L014ej5:
1416         movb    4(%esi),%dl
1417 .L015ej4:
1418         movl    (%esi),%ecx
1419         jmp     .L016ejend
1420 .L017ej3:
1421         movb    2(%esi),%ch
1422         shll    $8,%ecx
1423 .L018ej2:
1424         movb    1(%esi),%ch
1425 .L019ej1:
1426         movb    (%esi),%cl
1427 .L016ejend:
1428         xorl    %ecx,%eax
1429         xorl    %edx,%ebx
1430         movl    %eax,12(%esp)
1431         movl    %ebx,16(%esp)
1432         call    .L_DES_encrypt1_begin
1433         movl    12(%esp),%eax
1434         movl    16(%esp),%ebx
1435         movl    %eax,(%edi)
1436         movl    %ebx,4(%edi)
1437         jmp     .L009finish
1438 .L006decrypt:
1439         andl    $4294967288,%ebp
1440         movl    20(%esp),%eax
1441         movl    24(%esp),%ebx
1442         jz      .L020decrypt_finish
1443 .L021decrypt_loop:
1444         movl    (%esi),%eax
1445         movl    4(%esi),%ebx
1446         movl    %eax,12(%esp)
1447         movl    %ebx,16(%esp)
1448         call    .L_DES_encrypt1_begin
1449         movl    12(%esp),%eax
1450         movl    16(%esp),%ebx
1451         movl    20(%esp),%ecx
1452         movl    24(%esp),%edx
1453         xorl    %eax,%ecx
1454         xorl    %ebx,%edx
1455         movl    (%esi),%eax
1456         movl    4(%esi),%ebx
1457         movl    %ecx,(%edi)
1458         movl    %edx,4(%edi)
1459         movl    %eax,20(%esp)
1460         movl    %ebx,24(%esp)
1461         addl    $8,%esi
1462         addl    $8,%edi
1463         subl    $8,%ebp
1464         jnz     .L021decrypt_loop
1465 .L020decrypt_finish:
1466         movl    56(%esp),%ebp
1467         andl    $7,%ebp
1468         jz      .L009finish
1469         movl    (%esi),%eax
1470         movl    4(%esi),%ebx
1471         movl    %eax,12(%esp)
1472         movl    %ebx,16(%esp)
1473         call    .L_DES_encrypt1_begin
1474         movl    12(%esp),%eax
1475         movl    16(%esp),%ebx
1476         movl    20(%esp),%ecx
1477         movl    24(%esp),%edx
1478         xorl    %eax,%ecx
1479         xorl    %ebx,%edx
1480         movl    (%esi),%eax
1481         movl    4(%esi),%ebx
1482 .L022dj7:
1483         rorl    $16,%edx
1484         movb    %dl,6(%edi)
1485         shrl    $16,%edx
1486 .L023dj6:
1487         movb    %dh,5(%edi)
1488 .L024dj5:
1489         movb    %dl,4(%edi)
1490 .L025dj4:
1491         movl    %ecx,(%edi)
1492         jmp     .L026djend
1493 .L027dj3:
1494         rorl    $16,%ecx
1495         movb    %cl,2(%edi)
1496         shll    $16,%ecx
1497 .L028dj2:
1498         movb    %ch,1(%esi)
1499 .L029dj1:
1500         movb    %cl,(%esi)
1501 .L026djend:
1502         jmp     .L009finish
1503 .L009finish:
1504         movl    64(%esp),%ecx
1505         addl    $28,%esp
1506         movl    %eax,(%ecx)
1507         movl    %ebx,4(%ecx)
1508         popl    %edi
1509         popl    %esi
1510         popl    %ebx
1511         popl    %ebp
1512         ret
1513 .align  64
1514 .L011cbc_enc_jmp_table:
1515 .long   0
1516 .long   .L019ej1-.L010PIC_point
1517 .long   .L018ej2-.L010PIC_point
1518 .long   .L017ej3-.L010PIC_point
1519 .long   .L015ej4-.L010PIC_point
1520 .long   .L014ej5-.L010PIC_point
1521 .long   .L013ej6-.L010PIC_point
1522 .long   .L012ej7-.L010PIC_point
1523 .align  64
1524 .size   DES_ncbc_encrypt,.-.L_DES_ncbc_encrypt_begin
1525 .globl  DES_ede3_cbc_encrypt
1526 .type   DES_ede3_cbc_encrypt,@function
1527 .align  16
1528 DES_ede3_cbc_encrypt:
1529 .L_DES_ede3_cbc_encrypt_begin:
1530
1531         pushl   %ebp
1532         pushl   %ebx
1533         pushl   %esi
1534         pushl   %edi
1535         movl    28(%esp),%ebp
1536
1537         movl    44(%esp),%ebx
1538         movl    (%ebx),%esi
1539         movl    4(%ebx),%edi
1540         pushl   %edi
1541         pushl   %esi
1542         pushl   %edi
1543         pushl   %esi
1544         movl    %esp,%ebx
1545         movl    36(%esp),%esi
1546         movl    40(%esp),%edi
1547
1548         movl    64(%esp),%ecx
1549
1550         movl    56(%esp),%eax
1551         pushl   %eax
1552
1553         movl    56(%esp),%eax
1554         pushl   %eax
1555
1556         movl    56(%esp),%eax
1557         pushl   %eax
1558         pushl   %ebx
1559         cmpl    $0,%ecx
1560         jz      .L030decrypt
1561         andl    $4294967288,%ebp
1562         movl    16(%esp),%eax
1563         movl    20(%esp),%ebx
1564         jz      .L031encrypt_finish
1565 .L032encrypt_loop:
1566         movl    (%esi),%ecx
1567         movl    4(%esi),%edx
1568         xorl    %ecx,%eax
1569         xorl    %edx,%ebx
1570         movl    %eax,16(%esp)
1571         movl    %ebx,20(%esp)
1572         call    .L_DES_encrypt3_begin
1573         movl    16(%esp),%eax
1574         movl    20(%esp),%ebx
1575         movl    %eax,(%edi)
1576         movl    %ebx,4(%edi)
1577         addl    $8,%esi
1578         addl    $8,%edi
1579         subl    $8,%ebp
1580         jnz     .L032encrypt_loop
1581 .L031encrypt_finish:
1582         movl    60(%esp),%ebp
1583         andl    $7,%ebp
1584         jz      .L033finish
1585         call    .L034PIC_point
1586 .L034PIC_point:
1587         popl    %edx
1588         leal    .L035cbc_enc_jmp_table-.L034PIC_point(%edx),%ecx
1589         movl    (%ecx,%ebp,4),%ebp
1590         addl    %edx,%ebp
1591         xorl    %ecx,%ecx
1592         xorl    %edx,%edx
1593         jmp     *%ebp
1594 .L036ej7:
1595         movb    6(%esi),%dh
1596         shll    $8,%edx
1597 .L037ej6:
1598         movb    5(%esi),%dh
1599 .L038ej5:
1600         movb    4(%esi),%dl
1601 .L039ej4:
1602         movl    (%esi),%ecx
1603         jmp     .L040ejend
1604 .L041ej3:
1605         movb    2(%esi),%ch
1606         shll    $8,%ecx
1607 .L042ej2:
1608         movb    1(%esi),%ch
1609 .L043ej1:
1610         movb    (%esi),%cl
1611 .L040ejend:
1612         xorl    %ecx,%eax
1613         xorl    %edx,%ebx
1614         movl    %eax,16(%esp)
1615         movl    %ebx,20(%esp)
1616         call    .L_DES_encrypt3_begin
1617         movl    16(%esp),%eax
1618         movl    20(%esp),%ebx
1619         movl    %eax,(%edi)
1620         movl    %ebx,4(%edi)
1621         jmp     .L033finish
1622 .L030decrypt:
1623         andl    $4294967288,%ebp
1624         movl    24(%esp),%eax
1625         movl    28(%esp),%ebx
1626         jz      .L044decrypt_finish
1627 .L045decrypt_loop:
1628         movl    (%esi),%eax
1629         movl    4(%esi),%ebx
1630         movl    %eax,16(%esp)
1631         movl    %ebx,20(%esp)
1632         call    .L_DES_decrypt3_begin
1633         movl    16(%esp),%eax
1634         movl    20(%esp),%ebx
1635         movl    24(%esp),%ecx
1636         movl    28(%esp),%edx
1637         xorl    %eax,%ecx
1638         xorl    %ebx,%edx
1639         movl    (%esi),%eax
1640         movl    4(%esi),%ebx
1641         movl    %ecx,(%edi)
1642         movl    %edx,4(%edi)
1643         movl    %eax,24(%esp)
1644         movl    %ebx,28(%esp)
1645         addl    $8,%esi
1646         addl    $8,%edi
1647         subl    $8,%ebp
1648         jnz     .L045decrypt_loop
1649 .L044decrypt_finish:
1650         movl    60(%esp),%ebp
1651         andl    $7,%ebp
1652         jz      .L033finish
1653         movl    (%esi),%eax
1654         movl    4(%esi),%ebx
1655         movl    %eax,16(%esp)
1656         movl    %ebx,20(%esp)
1657         call    .L_DES_decrypt3_begin
1658         movl    16(%esp),%eax
1659         movl    20(%esp),%ebx
1660         movl    24(%esp),%ecx
1661         movl    28(%esp),%edx
1662         xorl    %eax,%ecx
1663         xorl    %ebx,%edx
1664         movl    (%esi),%eax
1665         movl    4(%esi),%ebx
1666 .L046dj7:
1667         rorl    $16,%edx
1668         movb    %dl,6(%edi)
1669         shrl    $16,%edx
1670 .L047dj6:
1671         movb    %dh,5(%edi)
1672 .L048dj5:
1673         movb    %dl,4(%edi)
1674 .L049dj4:
1675         movl    %ecx,(%edi)
1676         jmp     .L050djend
1677 .L051dj3:
1678         rorl    $16,%ecx
1679         movb    %cl,2(%edi)
1680         shll    $16,%ecx
1681 .L052dj2:
1682         movb    %ch,1(%esi)
1683 .L053dj1:
1684         movb    %cl,(%esi)
1685 .L050djend:
1686         jmp     .L033finish
1687 .L033finish:
1688         movl    76(%esp),%ecx
1689         addl    $32,%esp
1690         movl    %eax,(%ecx)
1691         movl    %ebx,4(%ecx)
1692         popl    %edi
1693         popl    %esi
1694         popl    %ebx
1695         popl    %ebp
1696         ret
1697 .align  64
1698 .L035cbc_enc_jmp_table:
1699 .long   0
1700 .long   .L043ej1-.L034PIC_point
1701 .long   .L042ej2-.L034PIC_point
1702 .long   .L041ej3-.L034PIC_point
1703 .long   .L039ej4-.L034PIC_point
1704 .long   .L038ej5-.L034PIC_point
1705 .long   .L037ej6-.L034PIC_point
1706 .long   .L036ej7-.L034PIC_point
1707 .align  64
1708 .size   DES_ede3_cbc_encrypt,.-.L_DES_ede3_cbc_encrypt_begin
1709 .align  64
1710 DES_SPtrans:
1711 .long   34080768,524288,33554434,34080770
1712 .long   33554432,526338,524290,33554434
1713 .long   526338,34080768,34078720,2050
1714 .long   33556482,33554432,0,524290
1715 .long   524288,2,33556480,526336
1716 .long   34080770,34078720,2050,33556480
1717 .long   2,2048,526336,34078722
1718 .long   2048,33556482,34078722,0
1719 .long   0,34080770,33556480,524290
1720 .long   34080768,524288,2050,33556480
1721 .long   34078722,2048,526336,33554434
1722 .long   526338,2,33554434,34078720
1723 .long   34080770,526336,34078720,33556482
1724 .long   33554432,2050,524290,0
1725 .long   524288,33554432,33556482,34080768
1726 .long   2,34078722,2048,526338
1727 .long   1074823184,0,1081344,1074790400
1728 .long   1073741840,32784,1073774592,1081344
1729 .long   32768,1074790416,16,1073774592
1730 .long   1048592,1074823168,1074790400,16
1731 .long   1048576,1073774608,1074790416,32768
1732 .long   1081360,1073741824,0,1048592
1733 .long   1073774608,1081360,1074823168,1073741840
1734 .long   1073741824,1048576,32784,1074823184
1735 .long   1048592,1074823168,1073774592,1081360
1736 .long   1074823184,1048592,1073741840,0
1737 .long   1073741824,32784,1048576,1074790416
1738 .long   32768,1073741824,1081360,1073774608
1739 .long   1074823168,32768,0,1073741840
1740 .long   16,1074823184,1081344,1074790400
1741 .long   1074790416,1048576,32784,1073774592
1742 .long   1073774608,16,1074790400,1081344
1743 .long   67108865,67371264,256,67109121
1744 .long   262145,67108864,67109121,262400
1745 .long   67109120,262144,67371008,1
1746 .long   67371265,257,1,67371009
1747 .long   0,262145,67371264,256
1748 .long   257,67371265,262144,67108865
1749 .long   67371009,67109120,262401,67371008
1750 .long   262400,0,67108864,262401
1751 .long   67371264,256,1,262144
1752 .long   257,262145,67371008,67109121
1753 .long   0,67371264,262400,67371009
1754 .long   262145,67108864,67371265,1
1755 .long   262401,67108865,67108864,67371265
1756 .long   262144,67109120,67109121,262400
1757 .long   67109120,0,67371009,257
1758 .long   67108865,262401,256,67371008
1759 .long   4198408,268439552,8,272633864
1760 .long   0,272629760,268439560,4194312
1761 .long   272633856,268435464,268435456,4104
1762 .long   268435464,4198408,4194304,268435456
1763 .long   272629768,4198400,4096,8
1764 .long   4198400,268439560,272629760,4096
1765 .long   4104,0,4194312,272633856
1766 .long   268439552,272629768,272633864,4194304
1767 .long   272629768,4104,4194304,268435464
1768 .long   4198400,268439552,8,272629760
1769 .long   268439560,0,4096,4194312
1770 .long   0,272629768,272633856,4096
1771 .long   268435456,272633864,4198408,4194304
1772 .long   272633864,8,268439552,4198408
1773 .long   4194312,4198400,272629760,268439560
1774 .long   4104,268435456,268435464,272633856
1775 .long   134217728,65536,1024,134284320
1776 .long   134283296,134218752,66592,134283264
1777 .long   65536,32,134217760,66560
1778 .long   134218784,134283296,134284288,0
1779 .long   66560,134217728,65568,1056
1780 .long   134218752,66592,0,134217760
1781 .long   32,134218784,134284320,65568
1782 .long   134283264,1024,1056,134284288
1783 .long   134284288,134218784,65568,134283264
1784 .long   65536,32,134217760,134218752
1785 .long   134217728,66560,134284320,0
1786 .long   66592,134217728,1024,65568
1787 .long   134218784,1024,0,134284320
1788 .long   134283296,134284288,1056,65536
1789 .long   66560,134283296,134218752,1056
1790 .long   32,66592,134283264,134217760
1791 .long   2147483712,2097216,0,2149588992
1792 .long   2097216,8192,2147491904,2097152
1793 .long   8256,2149589056,2105344,2147483648
1794 .long   2147491840,2147483712,2149580800,2105408
1795 .long   2097152,2147491904,2149580864,0
1796 .long   8192,64,2149588992,2149580864
1797 .long   2149589056,2149580800,2147483648,8256
1798 .long   64,2105344,2105408,2147491840
1799 .long   8256,2147483648,2147491840,2105408
1800 .long   2149588992,2097216,0,2147491840
1801 .long   2147483648,8192,2149580864,2097152
1802 .long   2097216,2149589056,2105344,64
1803 .long   2149589056,2105344,2097152,2147491904
1804 .long   2147483712,2149580800,2105408,0
1805 .long   8192,2147483712,2147491904,2149588992
1806 .long   2149580800,8256,64,2149580864
1807 .long   16384,512,16777728,16777220
1808 .long   16794116,16388,16896,0
1809 .long   16777216,16777732,516,16793600
1810 .long   4,16794112,16793600,516
1811 .long   16777732,16384,16388,16794116
1812 .long   0,16777728,16777220,16896
1813 .long   16793604,16900,16794112,4
1814 .long   16900,16793604,512,16777216
1815 .long   16900,16793600,16793604,516
1816 .long   16384,512,16777216,16793604
1817 .long   16777732,16900,16896,0
1818 .long   512,16777220,4,16777728
1819 .long   0,16777732,16777728,16896
1820 .long   516,16384,16794116,16777216
1821 .long   16794112,4,16388,16794116
1822 .long   16777220,16794112,16793600,16388
1823 .long   545259648,545390592,131200,0
1824 .long   537001984,8388736,545259520,545390720
1825 .long   128,536870912,8519680,131200
1826 .long   8519808,537002112,536871040,545259520
1827 .long   131072,8519808,8388736,537001984
1828 .long   545390720,536871040,0,8519680
1829 .long   536870912,8388608,537002112,545259648
1830 .long   8388608,131072,545390592,128
1831 .long   8388608,131072,536871040,545390720
1832 .long   131200,536870912,0,8519680
1833 .long   545259648,537002112,537001984,8388736
1834 .long   545390592,128,8388736,537001984
1835 .long   545390720,8388608,545259520,536871040
1836 .long   8519680,131200,537002112,545259520
1837 .long   128,545390592,8519808,0
1838 .long   536870912,545259648,131072,8519808