Update files for OpenSSL-1.0.1g import.
[dragonfly.git] / secure / lib / libcrypto / asm / bn-586.s
1 .file   "../../../../crypto/openssl/crypto/bn/asm/bn-586.s"
2 .text
3 .globl  bn_mul_add_words
4 .type   bn_mul_add_words,@function
5 .align  16
6 bn_mul_add_words:
7 .L_bn_mul_add_words_begin:
8         leal    OPENSSL_ia32cap_P,%eax
9         btl     $26,(%eax)
10         jnc     .L000maw_non_sse2
11         movl    4(%esp),%eax
12         movl    8(%esp),%edx
13         movl    12(%esp),%ecx
14         movd    16(%esp),%mm0
15         pxor    %mm1,%mm1
16         jmp     .L001maw_sse2_entry
17 .align  16
18 .L002maw_sse2_unrolled:
19         movd    (%eax),%mm3
20         paddq   %mm3,%mm1
21         movd    (%edx),%mm2
22         pmuludq %mm0,%mm2
23         movd    4(%edx),%mm4
24         pmuludq %mm0,%mm4
25         movd    8(%edx),%mm6
26         pmuludq %mm0,%mm6
27         movd    12(%edx),%mm7
28         pmuludq %mm0,%mm7
29         paddq   %mm2,%mm1
30         movd    4(%eax),%mm3
31         paddq   %mm4,%mm3
32         movd    8(%eax),%mm5
33         paddq   %mm6,%mm5
34         movd    12(%eax),%mm4
35         paddq   %mm4,%mm7
36         movd    %mm1,(%eax)
37         movd    16(%edx),%mm2
38         pmuludq %mm0,%mm2
39         psrlq   $32,%mm1
40         movd    20(%edx),%mm4
41         pmuludq %mm0,%mm4
42         paddq   %mm3,%mm1
43         movd    24(%edx),%mm6
44         pmuludq %mm0,%mm6
45         movd    %mm1,4(%eax)
46         psrlq   $32,%mm1
47         movd    28(%edx),%mm3
48         addl    $32,%edx
49         pmuludq %mm0,%mm3
50         paddq   %mm5,%mm1
51         movd    16(%eax),%mm5
52         paddq   %mm5,%mm2
53         movd    %mm1,8(%eax)
54         psrlq   $32,%mm1
55         paddq   %mm7,%mm1
56         movd    20(%eax),%mm5
57         paddq   %mm5,%mm4
58         movd    %mm1,12(%eax)
59         psrlq   $32,%mm1
60         paddq   %mm2,%mm1
61         movd    24(%eax),%mm5
62         paddq   %mm5,%mm6
63         movd    %mm1,16(%eax)
64         psrlq   $32,%mm1
65         paddq   %mm4,%mm1
66         movd    28(%eax),%mm5
67         paddq   %mm5,%mm3
68         movd    %mm1,20(%eax)
69         psrlq   $32,%mm1
70         paddq   %mm6,%mm1
71         movd    %mm1,24(%eax)
72         psrlq   $32,%mm1
73         paddq   %mm3,%mm1
74         movd    %mm1,28(%eax)
75         leal    32(%eax),%eax
76         psrlq   $32,%mm1
77         subl    $8,%ecx
78         jz      .L003maw_sse2_exit
79 .L001maw_sse2_entry:
80         testl   $4294967288,%ecx
81         jnz     .L002maw_sse2_unrolled
82 .align  4
83 .L004maw_sse2_loop:
84         movd    (%edx),%mm2
85         movd    (%eax),%mm3
86         pmuludq %mm0,%mm2
87         leal    4(%edx),%edx
88         paddq   %mm3,%mm1
89         paddq   %mm2,%mm1
90         movd    %mm1,(%eax)
91         subl    $1,%ecx
92         psrlq   $32,%mm1
93         leal    4(%eax),%eax
94         jnz     .L004maw_sse2_loop
95 .L003maw_sse2_exit:
96         movd    %mm1,%eax
97         emms
98         ret
99 .align  16
100 .L000maw_non_sse2:
101         pushl   %ebp
102         pushl   %ebx
103         pushl   %esi
104         pushl   %edi
105
106         xorl    %esi,%esi
107         movl    20(%esp),%edi
108         movl    28(%esp),%ecx
109         movl    24(%esp),%ebx
110         andl    $4294967288,%ecx
111         movl    32(%esp),%ebp
112         pushl   %ecx
113         jz      .L005maw_finish
114 .align  16
115 .L006maw_loop:
116
117         movl    (%ebx),%eax
118         mull    %ebp
119         addl    %esi,%eax
120         adcl    $0,%edx
121         addl    (%edi),%eax
122         adcl    $0,%edx
123         movl    %eax,(%edi)
124         movl    %edx,%esi
125
126         movl    4(%ebx),%eax
127         mull    %ebp
128         addl    %esi,%eax
129         adcl    $0,%edx
130         addl    4(%edi),%eax
131         adcl    $0,%edx
132         movl    %eax,4(%edi)
133         movl    %edx,%esi
134
135         movl    8(%ebx),%eax
136         mull    %ebp
137         addl    %esi,%eax
138         adcl    $0,%edx
139         addl    8(%edi),%eax
140         adcl    $0,%edx
141         movl    %eax,8(%edi)
142         movl    %edx,%esi
143
144         movl    12(%ebx),%eax
145         mull    %ebp
146         addl    %esi,%eax
147         adcl    $0,%edx
148         addl    12(%edi),%eax
149         adcl    $0,%edx
150         movl    %eax,12(%edi)
151         movl    %edx,%esi
152
153         movl    16(%ebx),%eax
154         mull    %ebp
155         addl    %esi,%eax
156         adcl    $0,%edx
157         addl    16(%edi),%eax
158         adcl    $0,%edx
159         movl    %eax,16(%edi)
160         movl    %edx,%esi
161
162         movl    20(%ebx),%eax
163         mull    %ebp
164         addl    %esi,%eax
165         adcl    $0,%edx
166         addl    20(%edi),%eax
167         adcl    $0,%edx
168         movl    %eax,20(%edi)
169         movl    %edx,%esi
170
171         movl    24(%ebx),%eax
172         mull    %ebp
173         addl    %esi,%eax
174         adcl    $0,%edx
175         addl    24(%edi),%eax
176         adcl    $0,%edx
177         movl    %eax,24(%edi)
178         movl    %edx,%esi
179
180         movl    28(%ebx),%eax
181         mull    %ebp
182         addl    %esi,%eax
183         adcl    $0,%edx
184         addl    28(%edi),%eax
185         adcl    $0,%edx
186         movl    %eax,28(%edi)
187         movl    %edx,%esi
188
189         subl    $8,%ecx
190         leal    32(%ebx),%ebx
191         leal    32(%edi),%edi
192         jnz     .L006maw_loop
193 .L005maw_finish:
194         movl    32(%esp),%ecx
195         andl    $7,%ecx
196         jnz     .L007maw_finish2
197         jmp     .L008maw_end
198 .L007maw_finish2:
199
200         movl    (%ebx),%eax
201         mull    %ebp
202         addl    %esi,%eax
203         adcl    $0,%edx
204         addl    (%edi),%eax
205         adcl    $0,%edx
206         decl    %ecx
207         movl    %eax,(%edi)
208         movl    %edx,%esi
209         jz      .L008maw_end
210
211         movl    4(%ebx),%eax
212         mull    %ebp
213         addl    %esi,%eax
214         adcl    $0,%edx
215         addl    4(%edi),%eax
216         adcl    $0,%edx
217         decl    %ecx
218         movl    %eax,4(%edi)
219         movl    %edx,%esi
220         jz      .L008maw_end
221
222         movl    8(%ebx),%eax
223         mull    %ebp
224         addl    %esi,%eax
225         adcl    $0,%edx
226         addl    8(%edi),%eax
227         adcl    $0,%edx
228         decl    %ecx
229         movl    %eax,8(%edi)
230         movl    %edx,%esi
231         jz      .L008maw_end
232
233         movl    12(%ebx),%eax
234         mull    %ebp
235         addl    %esi,%eax
236         adcl    $0,%edx
237         addl    12(%edi),%eax
238         adcl    $0,%edx
239         decl    %ecx
240         movl    %eax,12(%edi)
241         movl    %edx,%esi
242         jz      .L008maw_end
243
244         movl    16(%ebx),%eax
245         mull    %ebp
246         addl    %esi,%eax
247         adcl    $0,%edx
248         addl    16(%edi),%eax
249         adcl    $0,%edx
250         decl    %ecx
251         movl    %eax,16(%edi)
252         movl    %edx,%esi
253         jz      .L008maw_end
254
255         movl    20(%ebx),%eax
256         mull    %ebp
257         addl    %esi,%eax
258         adcl    $0,%edx
259         addl    20(%edi),%eax
260         adcl    $0,%edx
261         decl    %ecx
262         movl    %eax,20(%edi)
263         movl    %edx,%esi
264         jz      .L008maw_end
265
266         movl    24(%ebx),%eax
267         mull    %ebp
268         addl    %esi,%eax
269         adcl    $0,%edx
270         addl    24(%edi),%eax
271         adcl    $0,%edx
272         movl    %eax,24(%edi)
273         movl    %edx,%esi
274 .L008maw_end:
275         movl    %esi,%eax
276         popl    %ecx
277         popl    %edi
278         popl    %esi
279         popl    %ebx
280         popl    %ebp
281         ret
282 .size   bn_mul_add_words,.-.L_bn_mul_add_words_begin
283 .globl  bn_mul_words
284 .type   bn_mul_words,@function
285 .align  16
286 bn_mul_words:
287 .L_bn_mul_words_begin:
288         leal    OPENSSL_ia32cap_P,%eax
289         btl     $26,(%eax)
290         jnc     .L009mw_non_sse2
291         movl    4(%esp),%eax
292         movl    8(%esp),%edx
293         movl    12(%esp),%ecx
294         movd    16(%esp),%mm0
295         pxor    %mm1,%mm1
296 .align  16
297 .L010mw_sse2_loop:
298         movd    (%edx),%mm2
299         pmuludq %mm0,%mm2
300         leal    4(%edx),%edx
301         paddq   %mm2,%mm1
302         movd    %mm1,(%eax)
303         subl    $1,%ecx
304         psrlq   $32,%mm1
305         leal    4(%eax),%eax
306         jnz     .L010mw_sse2_loop
307         movd    %mm1,%eax
308         emms
309         ret
310 .align  16
311 .L009mw_non_sse2:
312         pushl   %ebp
313         pushl   %ebx
314         pushl   %esi
315         pushl   %edi
316
317         xorl    %esi,%esi
318         movl    20(%esp),%edi
319         movl    24(%esp),%ebx
320         movl    28(%esp),%ebp
321         movl    32(%esp),%ecx
322         andl    $4294967288,%ebp
323         jz      .L011mw_finish
324 .L012mw_loop:
325
326         movl    (%ebx),%eax
327         mull    %ecx
328         addl    %esi,%eax
329         adcl    $0,%edx
330         movl    %eax,(%edi)
331         movl    %edx,%esi
332
333         movl    4(%ebx),%eax
334         mull    %ecx
335         addl    %esi,%eax
336         adcl    $0,%edx
337         movl    %eax,4(%edi)
338         movl    %edx,%esi
339
340         movl    8(%ebx),%eax
341         mull    %ecx
342         addl    %esi,%eax
343         adcl    $0,%edx
344         movl    %eax,8(%edi)
345         movl    %edx,%esi
346
347         movl    12(%ebx),%eax
348         mull    %ecx
349         addl    %esi,%eax
350         adcl    $0,%edx
351         movl    %eax,12(%edi)
352         movl    %edx,%esi
353
354         movl    16(%ebx),%eax
355         mull    %ecx
356         addl    %esi,%eax
357         adcl    $0,%edx
358         movl    %eax,16(%edi)
359         movl    %edx,%esi
360
361         movl    20(%ebx),%eax
362         mull    %ecx
363         addl    %esi,%eax
364         adcl    $0,%edx
365         movl    %eax,20(%edi)
366         movl    %edx,%esi
367
368         movl    24(%ebx),%eax
369         mull    %ecx
370         addl    %esi,%eax
371         adcl    $0,%edx
372         movl    %eax,24(%edi)
373         movl    %edx,%esi
374
375         movl    28(%ebx),%eax
376         mull    %ecx
377         addl    %esi,%eax
378         adcl    $0,%edx
379         movl    %eax,28(%edi)
380         movl    %edx,%esi
381
382         addl    $32,%ebx
383         addl    $32,%edi
384         subl    $8,%ebp
385         jz      .L011mw_finish
386         jmp     .L012mw_loop
387 .L011mw_finish:
388         movl    28(%esp),%ebp
389         andl    $7,%ebp
390         jnz     .L013mw_finish2
391         jmp     .L014mw_end
392 .L013mw_finish2:
393
394         movl    (%ebx),%eax
395         mull    %ecx
396         addl    %esi,%eax
397         adcl    $0,%edx
398         movl    %eax,(%edi)
399         movl    %edx,%esi
400         decl    %ebp
401         jz      .L014mw_end
402
403         movl    4(%ebx),%eax
404         mull    %ecx
405         addl    %esi,%eax
406         adcl    $0,%edx
407         movl    %eax,4(%edi)
408         movl    %edx,%esi
409         decl    %ebp
410         jz      .L014mw_end
411
412         movl    8(%ebx),%eax
413         mull    %ecx
414         addl    %esi,%eax
415         adcl    $0,%edx
416         movl    %eax,8(%edi)
417         movl    %edx,%esi
418         decl    %ebp
419         jz      .L014mw_end
420
421         movl    12(%ebx),%eax
422         mull    %ecx
423         addl    %esi,%eax
424         adcl    $0,%edx
425         movl    %eax,12(%edi)
426         movl    %edx,%esi
427         decl    %ebp
428         jz      .L014mw_end
429
430         movl    16(%ebx),%eax
431         mull    %ecx
432         addl    %esi,%eax
433         adcl    $0,%edx
434         movl    %eax,16(%edi)
435         movl    %edx,%esi
436         decl    %ebp
437         jz      .L014mw_end
438
439         movl    20(%ebx),%eax
440         mull    %ecx
441         addl    %esi,%eax
442         adcl    $0,%edx
443         movl    %eax,20(%edi)
444         movl    %edx,%esi
445         decl    %ebp
446         jz      .L014mw_end
447
448         movl    24(%ebx),%eax
449         mull    %ecx
450         addl    %esi,%eax
451         adcl    $0,%edx
452         movl    %eax,24(%edi)
453         movl    %edx,%esi
454 .L014mw_end:
455         movl    %esi,%eax
456         popl    %edi
457         popl    %esi
458         popl    %ebx
459         popl    %ebp
460         ret
461 .size   bn_mul_words,.-.L_bn_mul_words_begin
462 .globl  bn_sqr_words
463 .type   bn_sqr_words,@function
464 .align  16
465 bn_sqr_words:
466 .L_bn_sqr_words_begin:
467         leal    OPENSSL_ia32cap_P,%eax
468         btl     $26,(%eax)
469         jnc     .L015sqr_non_sse2
470         movl    4(%esp),%eax
471         movl    8(%esp),%edx
472         movl    12(%esp),%ecx
473 .align  16
474 .L016sqr_sse2_loop:
475         movd    (%edx),%mm0
476         pmuludq %mm0,%mm0
477         leal    4(%edx),%edx
478         movq    %mm0,(%eax)
479         subl    $1,%ecx
480         leal    8(%eax),%eax
481         jnz     .L016sqr_sse2_loop
482         emms
483         ret
484 .align  16
485 .L015sqr_non_sse2:
486         pushl   %ebp
487         pushl   %ebx
488         pushl   %esi
489         pushl   %edi
490
491         movl    20(%esp),%esi
492         movl    24(%esp),%edi
493         movl    28(%esp),%ebx
494         andl    $4294967288,%ebx
495         jz      .L017sw_finish
496 .L018sw_loop:
497
498         movl    (%edi),%eax
499         mull    %eax
500         movl    %eax,(%esi)
501         movl    %edx,4(%esi)
502
503         movl    4(%edi),%eax
504         mull    %eax
505         movl    %eax,8(%esi)
506         movl    %edx,12(%esi)
507
508         movl    8(%edi),%eax
509         mull    %eax
510         movl    %eax,16(%esi)
511         movl    %edx,20(%esi)
512
513         movl    12(%edi),%eax
514         mull    %eax
515         movl    %eax,24(%esi)
516         movl    %edx,28(%esi)
517
518         movl    16(%edi),%eax
519         mull    %eax
520         movl    %eax,32(%esi)
521         movl    %edx,36(%esi)
522
523         movl    20(%edi),%eax
524         mull    %eax
525         movl    %eax,40(%esi)
526         movl    %edx,44(%esi)
527
528         movl    24(%edi),%eax
529         mull    %eax
530         movl    %eax,48(%esi)
531         movl    %edx,52(%esi)
532
533         movl    28(%edi),%eax
534         mull    %eax
535         movl    %eax,56(%esi)
536         movl    %edx,60(%esi)
537
538         addl    $32,%edi
539         addl    $64,%esi
540         subl    $8,%ebx
541         jnz     .L018sw_loop
542 .L017sw_finish:
543         movl    28(%esp),%ebx
544         andl    $7,%ebx
545         jz      .L019sw_end
546
547         movl    (%edi),%eax
548         mull    %eax
549         movl    %eax,(%esi)
550         decl    %ebx
551         movl    %edx,4(%esi)
552         jz      .L019sw_end
553
554         movl    4(%edi),%eax
555         mull    %eax
556         movl    %eax,8(%esi)
557         decl    %ebx
558         movl    %edx,12(%esi)
559         jz      .L019sw_end
560
561         movl    8(%edi),%eax
562         mull    %eax
563         movl    %eax,16(%esi)
564         decl    %ebx
565         movl    %edx,20(%esi)
566         jz      .L019sw_end
567
568         movl    12(%edi),%eax
569         mull    %eax
570         movl    %eax,24(%esi)
571         decl    %ebx
572         movl    %edx,28(%esi)
573         jz      .L019sw_end
574
575         movl    16(%edi),%eax
576         mull    %eax
577         movl    %eax,32(%esi)
578         decl    %ebx
579         movl    %edx,36(%esi)
580         jz      .L019sw_end
581
582         movl    20(%edi),%eax
583         mull    %eax
584         movl    %eax,40(%esi)
585         decl    %ebx
586         movl    %edx,44(%esi)
587         jz      .L019sw_end
588
589         movl    24(%edi),%eax
590         mull    %eax
591         movl    %eax,48(%esi)
592         movl    %edx,52(%esi)
593 .L019sw_end:
594         popl    %edi
595         popl    %esi
596         popl    %ebx
597         popl    %ebp
598         ret
599 .size   bn_sqr_words,.-.L_bn_sqr_words_begin
600 .globl  bn_div_words
601 .type   bn_div_words,@function
602 .align  16
603 bn_div_words:
604 .L_bn_div_words_begin:
605         movl    4(%esp),%edx
606         movl    8(%esp),%eax
607         movl    12(%esp),%ecx
608         divl    %ecx
609         ret
610 .size   bn_div_words,.-.L_bn_div_words_begin
611 .globl  bn_add_words
612 .type   bn_add_words,@function
613 .align  16
614 bn_add_words:
615 .L_bn_add_words_begin:
616         pushl   %ebp
617         pushl   %ebx
618         pushl   %esi
619         pushl   %edi
620
621         movl    20(%esp),%ebx
622         movl    24(%esp),%esi
623         movl    28(%esp),%edi
624         movl    32(%esp),%ebp
625         xorl    %eax,%eax
626         andl    $4294967288,%ebp
627         jz      .L020aw_finish
628 .L021aw_loop:
629
630         movl    (%esi),%ecx
631         movl    (%edi),%edx
632         addl    %eax,%ecx
633         movl    $0,%eax
634         adcl    %eax,%eax
635         addl    %edx,%ecx
636         adcl    $0,%eax
637         movl    %ecx,(%ebx)
638
639         movl    4(%esi),%ecx
640         movl    4(%edi),%edx
641         addl    %eax,%ecx
642         movl    $0,%eax
643         adcl    %eax,%eax
644         addl    %edx,%ecx
645         adcl    $0,%eax
646         movl    %ecx,4(%ebx)
647
648         movl    8(%esi),%ecx
649         movl    8(%edi),%edx
650         addl    %eax,%ecx
651         movl    $0,%eax
652         adcl    %eax,%eax
653         addl    %edx,%ecx
654         adcl    $0,%eax
655         movl    %ecx,8(%ebx)
656
657         movl    12(%esi),%ecx
658         movl    12(%edi),%edx
659         addl    %eax,%ecx
660         movl    $0,%eax
661         adcl    %eax,%eax
662         addl    %edx,%ecx
663         adcl    $0,%eax
664         movl    %ecx,12(%ebx)
665
666         movl    16(%esi),%ecx
667         movl    16(%edi),%edx
668         addl    %eax,%ecx
669         movl    $0,%eax
670         adcl    %eax,%eax
671         addl    %edx,%ecx
672         adcl    $0,%eax
673         movl    %ecx,16(%ebx)
674
675         movl    20(%esi),%ecx
676         movl    20(%edi),%edx
677         addl    %eax,%ecx
678         movl    $0,%eax
679         adcl    %eax,%eax
680         addl    %edx,%ecx
681         adcl    $0,%eax
682         movl    %ecx,20(%ebx)
683
684         movl    24(%esi),%ecx
685         movl    24(%edi),%edx
686         addl    %eax,%ecx
687         movl    $0,%eax
688         adcl    %eax,%eax
689         addl    %edx,%ecx
690         adcl    $0,%eax
691         movl    %ecx,24(%ebx)
692
693         movl    28(%esi),%ecx
694         movl    28(%edi),%edx
695         addl    %eax,%ecx
696         movl    $0,%eax
697         adcl    %eax,%eax
698         addl    %edx,%ecx
699         adcl    $0,%eax
700         movl    %ecx,28(%ebx)
701
702         addl    $32,%esi
703         addl    $32,%edi
704         addl    $32,%ebx
705         subl    $8,%ebp
706         jnz     .L021aw_loop
707 .L020aw_finish:
708         movl    32(%esp),%ebp
709         andl    $7,%ebp
710         jz      .L022aw_end
711
712         movl    (%esi),%ecx
713         movl    (%edi),%edx
714         addl    %eax,%ecx
715         movl    $0,%eax
716         adcl    %eax,%eax
717         addl    %edx,%ecx
718         adcl    $0,%eax
719         decl    %ebp
720         movl    %ecx,(%ebx)
721         jz      .L022aw_end
722
723         movl    4(%esi),%ecx
724         movl    4(%edi),%edx
725         addl    %eax,%ecx
726         movl    $0,%eax
727         adcl    %eax,%eax
728         addl    %edx,%ecx
729         adcl    $0,%eax
730         decl    %ebp
731         movl    %ecx,4(%ebx)
732         jz      .L022aw_end
733
734         movl    8(%esi),%ecx
735         movl    8(%edi),%edx
736         addl    %eax,%ecx
737         movl    $0,%eax
738         adcl    %eax,%eax
739         addl    %edx,%ecx
740         adcl    $0,%eax
741         decl    %ebp
742         movl    %ecx,8(%ebx)
743         jz      .L022aw_end
744
745         movl    12(%esi),%ecx
746         movl    12(%edi),%edx
747         addl    %eax,%ecx
748         movl    $0,%eax
749         adcl    %eax,%eax
750         addl    %edx,%ecx
751         adcl    $0,%eax
752         decl    %ebp
753         movl    %ecx,12(%ebx)
754         jz      .L022aw_end
755
756         movl    16(%esi),%ecx
757         movl    16(%edi),%edx
758         addl    %eax,%ecx
759         movl    $0,%eax
760         adcl    %eax,%eax
761         addl    %edx,%ecx
762         adcl    $0,%eax
763         decl    %ebp
764         movl    %ecx,16(%ebx)
765         jz      .L022aw_end
766
767         movl    20(%esi),%ecx
768         movl    20(%edi),%edx
769         addl    %eax,%ecx
770         movl    $0,%eax
771         adcl    %eax,%eax
772         addl    %edx,%ecx
773         adcl    $0,%eax
774         decl    %ebp
775         movl    %ecx,20(%ebx)
776         jz      .L022aw_end
777
778         movl    24(%esi),%ecx
779         movl    24(%edi),%edx
780         addl    %eax,%ecx
781         movl    $0,%eax
782         adcl    %eax,%eax
783         addl    %edx,%ecx
784         adcl    $0,%eax
785         movl    %ecx,24(%ebx)
786 .L022aw_end:
787         popl    %edi
788         popl    %esi
789         popl    %ebx
790         popl    %ebp
791         ret
792 .size   bn_add_words,.-.L_bn_add_words_begin
793 .globl  bn_sub_words
794 .type   bn_sub_words,@function
795 .align  16
796 bn_sub_words:
797 .L_bn_sub_words_begin:
798         pushl   %ebp
799         pushl   %ebx
800         pushl   %esi
801         pushl   %edi
802
803         movl    20(%esp),%ebx
804         movl    24(%esp),%esi
805         movl    28(%esp),%edi
806         movl    32(%esp),%ebp
807         xorl    %eax,%eax
808         andl    $4294967288,%ebp
809         jz      .L023aw_finish
810 .L024aw_loop:
811
812         movl    (%esi),%ecx
813         movl    (%edi),%edx
814         subl    %eax,%ecx
815         movl    $0,%eax
816         adcl    %eax,%eax
817         subl    %edx,%ecx
818         adcl    $0,%eax
819         movl    %ecx,(%ebx)
820
821         movl    4(%esi),%ecx
822         movl    4(%edi),%edx
823         subl    %eax,%ecx
824         movl    $0,%eax
825         adcl    %eax,%eax
826         subl    %edx,%ecx
827         adcl    $0,%eax
828         movl    %ecx,4(%ebx)
829
830         movl    8(%esi),%ecx
831         movl    8(%edi),%edx
832         subl    %eax,%ecx
833         movl    $0,%eax
834         adcl    %eax,%eax
835         subl    %edx,%ecx
836         adcl    $0,%eax
837         movl    %ecx,8(%ebx)
838
839         movl    12(%esi),%ecx
840         movl    12(%edi),%edx
841         subl    %eax,%ecx
842         movl    $0,%eax
843         adcl    %eax,%eax
844         subl    %edx,%ecx
845         adcl    $0,%eax
846         movl    %ecx,12(%ebx)
847
848         movl    16(%esi),%ecx
849         movl    16(%edi),%edx
850         subl    %eax,%ecx
851         movl    $0,%eax
852         adcl    %eax,%eax
853         subl    %edx,%ecx
854         adcl    $0,%eax
855         movl    %ecx,16(%ebx)
856
857         movl    20(%esi),%ecx
858         movl    20(%edi),%edx
859         subl    %eax,%ecx
860         movl    $0,%eax
861         adcl    %eax,%eax
862         subl    %edx,%ecx
863         adcl    $0,%eax
864         movl    %ecx,20(%ebx)
865
866         movl    24(%esi),%ecx
867         movl    24(%edi),%edx
868         subl    %eax,%ecx
869         movl    $0,%eax
870         adcl    %eax,%eax
871         subl    %edx,%ecx
872         adcl    $0,%eax
873         movl    %ecx,24(%ebx)
874
875         movl    28(%esi),%ecx
876         movl    28(%edi),%edx
877         subl    %eax,%ecx
878         movl    $0,%eax
879         adcl    %eax,%eax
880         subl    %edx,%ecx
881         adcl    $0,%eax
882         movl    %ecx,28(%ebx)
883
884         addl    $32,%esi
885         addl    $32,%edi
886         addl    $32,%ebx
887         subl    $8,%ebp
888         jnz     .L024aw_loop
889 .L023aw_finish:
890         movl    32(%esp),%ebp
891         andl    $7,%ebp
892         jz      .L025aw_end
893
894         movl    (%esi),%ecx
895         movl    (%edi),%edx
896         subl    %eax,%ecx
897         movl    $0,%eax
898         adcl    %eax,%eax
899         subl    %edx,%ecx
900         adcl    $0,%eax
901         decl    %ebp
902         movl    %ecx,(%ebx)
903         jz      .L025aw_end
904
905         movl    4(%esi),%ecx
906         movl    4(%edi),%edx
907         subl    %eax,%ecx
908         movl    $0,%eax
909         adcl    %eax,%eax
910         subl    %edx,%ecx
911         adcl    $0,%eax
912         decl    %ebp
913         movl    %ecx,4(%ebx)
914         jz      .L025aw_end
915
916         movl    8(%esi),%ecx
917         movl    8(%edi),%edx
918         subl    %eax,%ecx
919         movl    $0,%eax
920         adcl    %eax,%eax
921         subl    %edx,%ecx
922         adcl    $0,%eax
923         decl    %ebp
924         movl    %ecx,8(%ebx)
925         jz      .L025aw_end
926
927         movl    12(%esi),%ecx
928         movl    12(%edi),%edx
929         subl    %eax,%ecx
930         movl    $0,%eax
931         adcl    %eax,%eax
932         subl    %edx,%ecx
933         adcl    $0,%eax
934         decl    %ebp
935         movl    %ecx,12(%ebx)
936         jz      .L025aw_end
937
938         movl    16(%esi),%ecx
939         movl    16(%edi),%edx
940         subl    %eax,%ecx
941         movl    $0,%eax
942         adcl    %eax,%eax
943         subl    %edx,%ecx
944         adcl    $0,%eax
945         decl    %ebp
946         movl    %ecx,16(%ebx)
947         jz      .L025aw_end
948
949         movl    20(%esi),%ecx
950         movl    20(%edi),%edx
951         subl    %eax,%ecx
952         movl    $0,%eax
953         adcl    %eax,%eax
954         subl    %edx,%ecx
955         adcl    $0,%eax
956         decl    %ebp
957         movl    %ecx,20(%ebx)
958         jz      .L025aw_end
959
960         movl    24(%esi),%ecx
961         movl    24(%edi),%edx
962         subl    %eax,%ecx
963         movl    $0,%eax
964         adcl    %eax,%eax
965         subl    %edx,%ecx
966         adcl    $0,%eax
967         movl    %ecx,24(%ebx)
968 .L025aw_end:
969         popl    %edi
970         popl    %esi
971         popl    %ebx
972         popl    %ebp
973         ret
974 .size   bn_sub_words,.-.L_bn_sub_words_begin
975 .globl  bn_sub_part_words
976 .type   bn_sub_part_words,@function
977 .align  16
978 bn_sub_part_words:
979 .L_bn_sub_part_words_begin:
980         pushl   %ebp
981         pushl   %ebx
982         pushl   %esi
983         pushl   %edi
984
985         movl    20(%esp),%ebx
986         movl    24(%esp),%esi
987         movl    28(%esp),%edi
988         movl    32(%esp),%ebp
989         xorl    %eax,%eax
990         andl    $4294967288,%ebp
991         jz      .L026aw_finish
992 .L027aw_loop:
993
994         movl    (%esi),%ecx
995         movl    (%edi),%edx
996         subl    %eax,%ecx
997         movl    $0,%eax
998         adcl    %eax,%eax
999         subl    %edx,%ecx
1000         adcl    $0,%eax
1001         movl    %ecx,(%ebx)
1002
1003         movl    4(%esi),%ecx
1004         movl    4(%edi),%edx
1005         subl    %eax,%ecx
1006         movl    $0,%eax
1007         adcl    %eax,%eax
1008         subl    %edx,%ecx
1009         adcl    $0,%eax
1010         movl    %ecx,4(%ebx)
1011
1012         movl    8(%esi),%ecx
1013         movl    8(%edi),%edx
1014         subl    %eax,%ecx
1015         movl    $0,%eax
1016         adcl    %eax,%eax
1017         subl    %edx,%ecx
1018         adcl    $0,%eax
1019         movl    %ecx,8(%ebx)
1020
1021         movl    12(%esi),%ecx
1022         movl    12(%edi),%edx
1023         subl    %eax,%ecx
1024         movl    $0,%eax
1025         adcl    %eax,%eax
1026         subl    %edx,%ecx
1027         adcl    $0,%eax
1028         movl    %ecx,12(%ebx)
1029
1030         movl    16(%esi),%ecx
1031         movl    16(%edi),%edx
1032         subl    %eax,%ecx
1033         movl    $0,%eax
1034         adcl    %eax,%eax
1035         subl    %edx,%ecx
1036         adcl    $0,%eax
1037         movl    %ecx,16(%ebx)
1038
1039         movl    20(%esi),%ecx
1040         movl    20(%edi),%edx
1041         subl    %eax,%ecx
1042         movl    $0,%eax
1043         adcl    %eax,%eax
1044         subl    %edx,%ecx
1045         adcl    $0,%eax
1046         movl    %ecx,20(%ebx)
1047
1048         movl    24(%esi),%ecx
1049         movl    24(%edi),%edx
1050         subl    %eax,%ecx
1051         movl    $0,%eax
1052         adcl    %eax,%eax
1053         subl    %edx,%ecx
1054         adcl    $0,%eax
1055         movl    %ecx,24(%ebx)
1056
1057         movl    28(%esi),%ecx
1058         movl    28(%edi),%edx
1059         subl    %eax,%ecx
1060         movl    $0,%eax
1061         adcl    %eax,%eax
1062         subl    %edx,%ecx
1063         adcl    $0,%eax
1064         movl    %ecx,28(%ebx)
1065
1066         addl    $32,%esi
1067         addl    $32,%edi
1068         addl    $32,%ebx
1069         subl    $8,%ebp
1070         jnz     .L027aw_loop
1071 .L026aw_finish:
1072         movl    32(%esp),%ebp
1073         andl    $7,%ebp
1074         jz      .L028aw_end
1075
1076         movl    (%esi),%ecx
1077         movl    (%edi),%edx
1078         subl    %eax,%ecx
1079         movl    $0,%eax
1080         adcl    %eax,%eax
1081         subl    %edx,%ecx
1082         adcl    $0,%eax
1083         movl    %ecx,(%ebx)
1084         addl    $4,%esi
1085         addl    $4,%edi
1086         addl    $4,%ebx
1087         decl    %ebp
1088         jz      .L028aw_end
1089
1090         movl    (%esi),%ecx
1091         movl    (%edi),%edx
1092         subl    %eax,%ecx
1093         movl    $0,%eax
1094         adcl    %eax,%eax
1095         subl    %edx,%ecx
1096         adcl    $0,%eax
1097         movl    %ecx,(%ebx)
1098         addl    $4,%esi
1099         addl    $4,%edi
1100         addl    $4,%ebx
1101         decl    %ebp
1102         jz      .L028aw_end
1103
1104         movl    (%esi),%ecx
1105         movl    (%edi),%edx
1106         subl    %eax,%ecx
1107         movl    $0,%eax
1108         adcl    %eax,%eax
1109         subl    %edx,%ecx
1110         adcl    $0,%eax
1111         movl    %ecx,(%ebx)
1112         addl    $4,%esi
1113         addl    $4,%edi
1114         addl    $4,%ebx
1115         decl    %ebp
1116         jz      .L028aw_end
1117
1118         movl    (%esi),%ecx
1119         movl    (%edi),%edx
1120         subl    %eax,%ecx
1121         movl    $0,%eax
1122         adcl    %eax,%eax
1123         subl    %edx,%ecx
1124         adcl    $0,%eax
1125         movl    %ecx,(%ebx)
1126         addl    $4,%esi
1127         addl    $4,%edi
1128         addl    $4,%ebx
1129         decl    %ebp
1130         jz      .L028aw_end
1131
1132         movl    (%esi),%ecx
1133         movl    (%edi),%edx
1134         subl    %eax,%ecx
1135         movl    $0,%eax
1136         adcl    %eax,%eax
1137         subl    %edx,%ecx
1138         adcl    $0,%eax
1139         movl    %ecx,(%ebx)
1140         addl    $4,%esi
1141         addl    $4,%edi
1142         addl    $4,%ebx
1143         decl    %ebp
1144         jz      .L028aw_end
1145
1146         movl    (%esi),%ecx
1147         movl    (%edi),%edx
1148         subl    %eax,%ecx
1149         movl    $0,%eax
1150         adcl    %eax,%eax
1151         subl    %edx,%ecx
1152         adcl    $0,%eax
1153         movl    %ecx,(%ebx)
1154         addl    $4,%esi
1155         addl    $4,%edi
1156         addl    $4,%ebx
1157         decl    %ebp
1158         jz      .L028aw_end
1159
1160         movl    (%esi),%ecx
1161         movl    (%edi),%edx
1162         subl    %eax,%ecx
1163         movl    $0,%eax
1164         adcl    %eax,%eax
1165         subl    %edx,%ecx
1166         adcl    $0,%eax
1167         movl    %ecx,(%ebx)
1168         addl    $4,%esi
1169         addl    $4,%edi
1170         addl    $4,%ebx
1171 .L028aw_end:
1172         cmpl    $0,36(%esp)
1173         je      .L029pw_end
1174         movl    36(%esp),%ebp
1175         cmpl    $0,%ebp
1176         je      .L029pw_end
1177         jge     .L030pw_pos
1178
1179         movl    $0,%edx
1180         subl    %ebp,%edx
1181         movl    %edx,%ebp
1182         andl    $4294967288,%ebp
1183         jz      .L031pw_neg_finish
1184 .L032pw_neg_loop:
1185
1186         movl    $0,%ecx
1187         movl    (%edi),%edx
1188         subl    %eax,%ecx
1189         movl    $0,%eax
1190         adcl    %eax,%eax
1191         subl    %edx,%ecx
1192         adcl    $0,%eax
1193         movl    %ecx,(%ebx)
1194
1195         movl    $0,%ecx
1196         movl    4(%edi),%edx
1197         subl    %eax,%ecx
1198         movl    $0,%eax
1199         adcl    %eax,%eax
1200         subl    %edx,%ecx
1201         adcl    $0,%eax
1202         movl    %ecx,4(%ebx)
1203
1204         movl    $0,%ecx
1205         movl    8(%edi),%edx
1206         subl    %eax,%ecx
1207         movl    $0,%eax
1208         adcl    %eax,%eax
1209         subl    %edx,%ecx
1210         adcl    $0,%eax
1211         movl    %ecx,8(%ebx)
1212
1213         movl    $0,%ecx
1214         movl    12(%edi),%edx
1215         subl    %eax,%ecx
1216         movl    $0,%eax
1217         adcl    %eax,%eax
1218         subl    %edx,%ecx
1219         adcl    $0,%eax
1220         movl    %ecx,12(%ebx)
1221
1222         movl    $0,%ecx
1223         movl    16(%edi),%edx
1224         subl    %eax,%ecx
1225         movl    $0,%eax
1226         adcl    %eax,%eax
1227         subl    %edx,%ecx
1228         adcl    $0,%eax
1229         movl    %ecx,16(%ebx)
1230
1231         movl    $0,%ecx
1232         movl    20(%edi),%edx
1233         subl    %eax,%ecx
1234         movl    $0,%eax
1235         adcl    %eax,%eax
1236         subl    %edx,%ecx
1237         adcl    $0,%eax
1238         movl    %ecx,20(%ebx)
1239
1240         movl    $0,%ecx
1241         movl    24(%edi),%edx
1242         subl    %eax,%ecx
1243         movl    $0,%eax
1244         adcl    %eax,%eax
1245         subl    %edx,%ecx
1246         adcl    $0,%eax
1247         movl    %ecx,24(%ebx)
1248
1249         movl    $0,%ecx
1250         movl    28(%edi),%edx
1251         subl    %eax,%ecx
1252         movl    $0,%eax
1253         adcl    %eax,%eax
1254         subl    %edx,%ecx
1255         adcl    $0,%eax
1256         movl    %ecx,28(%ebx)
1257
1258         addl    $32,%edi
1259         addl    $32,%ebx
1260         subl    $8,%ebp
1261         jnz     .L032pw_neg_loop
1262 .L031pw_neg_finish:
1263         movl    36(%esp),%edx
1264         movl    $0,%ebp
1265         subl    %edx,%ebp
1266         andl    $7,%ebp
1267         jz      .L029pw_end
1268
1269         movl    $0,%ecx
1270         movl    (%edi),%edx
1271         subl    %eax,%ecx
1272         movl    $0,%eax
1273         adcl    %eax,%eax
1274         subl    %edx,%ecx
1275         adcl    $0,%eax
1276         decl    %ebp
1277         movl    %ecx,(%ebx)
1278         jz      .L029pw_end
1279
1280         movl    $0,%ecx
1281         movl    4(%edi),%edx
1282         subl    %eax,%ecx
1283         movl    $0,%eax
1284         adcl    %eax,%eax
1285         subl    %edx,%ecx
1286         adcl    $0,%eax
1287         decl    %ebp
1288         movl    %ecx,4(%ebx)
1289         jz      .L029pw_end
1290
1291         movl    $0,%ecx
1292         movl    8(%edi),%edx
1293         subl    %eax,%ecx
1294         movl    $0,%eax
1295         adcl    %eax,%eax
1296         subl    %edx,%ecx
1297         adcl    $0,%eax
1298         decl    %ebp
1299         movl    %ecx,8(%ebx)
1300         jz      .L029pw_end
1301
1302         movl    $0,%ecx
1303         movl    12(%edi),%edx
1304         subl    %eax,%ecx
1305         movl    $0,%eax
1306         adcl    %eax,%eax
1307         subl    %edx,%ecx
1308         adcl    $0,%eax
1309         decl    %ebp
1310         movl    %ecx,12(%ebx)
1311         jz      .L029pw_end
1312
1313         movl    $0,%ecx
1314         movl    16(%edi),%edx
1315         subl    %eax,%ecx
1316         movl    $0,%eax
1317         adcl    %eax,%eax
1318         subl    %edx,%ecx
1319         adcl    $0,%eax
1320         decl    %ebp
1321         movl    %ecx,16(%ebx)
1322         jz      .L029pw_end
1323
1324         movl    $0,%ecx
1325         movl    20(%edi),%edx
1326         subl    %eax,%ecx
1327         movl    $0,%eax
1328         adcl    %eax,%eax
1329         subl    %edx,%ecx
1330         adcl    $0,%eax
1331         decl    %ebp
1332         movl    %ecx,20(%ebx)
1333         jz      .L029pw_end
1334
1335         movl    $0,%ecx
1336         movl    24(%edi),%edx
1337         subl    %eax,%ecx
1338         movl    $0,%eax
1339         adcl    %eax,%eax
1340         subl    %edx,%ecx
1341         adcl    $0,%eax
1342         movl    %ecx,24(%ebx)
1343         jmp     .L029pw_end
1344 .L030pw_pos:
1345         andl    $4294967288,%ebp
1346         jz      .L033pw_pos_finish
1347 .L034pw_pos_loop:
1348
1349         movl    (%esi),%ecx
1350         subl    %eax,%ecx
1351         movl    %ecx,(%ebx)
1352         jnc     .L035pw_nc0
1353
1354         movl    4(%esi),%ecx
1355         subl    %eax,%ecx
1356         movl    %ecx,4(%ebx)
1357         jnc     .L036pw_nc1
1358
1359         movl    8(%esi),%ecx
1360         subl    %eax,%ecx
1361         movl    %ecx,8(%ebx)
1362         jnc     .L037pw_nc2
1363
1364         movl    12(%esi),%ecx
1365         subl    %eax,%ecx
1366         movl    %ecx,12(%ebx)
1367         jnc     .L038pw_nc3
1368
1369         movl    16(%esi),%ecx
1370         subl    %eax,%ecx
1371         movl    %ecx,16(%ebx)
1372         jnc     .L039pw_nc4
1373
1374         movl    20(%esi),%ecx
1375         subl    %eax,%ecx
1376         movl    %ecx,20(%ebx)
1377         jnc     .L040pw_nc5
1378
1379         movl    24(%esi),%ecx
1380         subl    %eax,%ecx
1381         movl    %ecx,24(%ebx)
1382         jnc     .L041pw_nc6
1383
1384         movl    28(%esi),%ecx
1385         subl    %eax,%ecx
1386         movl    %ecx,28(%ebx)
1387         jnc     .L042pw_nc7
1388
1389         addl    $32,%esi
1390         addl    $32,%ebx
1391         subl    $8,%ebp
1392         jnz     .L034pw_pos_loop
1393 .L033pw_pos_finish:
1394         movl    36(%esp),%ebp
1395         andl    $7,%ebp
1396         jz      .L029pw_end
1397
1398         movl    (%esi),%ecx
1399         subl    %eax,%ecx
1400         movl    %ecx,(%ebx)
1401         jnc     .L043pw_tail_nc0
1402         decl    %ebp
1403         jz      .L029pw_end
1404
1405         movl    4(%esi),%ecx
1406         subl    %eax,%ecx
1407         movl    %ecx,4(%ebx)
1408         jnc     .L044pw_tail_nc1
1409         decl    %ebp
1410         jz      .L029pw_end
1411
1412         movl    8(%esi),%ecx
1413         subl    %eax,%ecx
1414         movl    %ecx,8(%ebx)
1415         jnc     .L045pw_tail_nc2
1416         decl    %ebp
1417         jz      .L029pw_end
1418
1419         movl    12(%esi),%ecx
1420         subl    %eax,%ecx
1421         movl    %ecx,12(%ebx)
1422         jnc     .L046pw_tail_nc3
1423         decl    %ebp
1424         jz      .L029pw_end
1425
1426         movl    16(%esi),%ecx
1427         subl    %eax,%ecx
1428         movl    %ecx,16(%ebx)
1429         jnc     .L047pw_tail_nc4
1430         decl    %ebp
1431         jz      .L029pw_end
1432
1433         movl    20(%esi),%ecx
1434         subl    %eax,%ecx
1435         movl    %ecx,20(%ebx)
1436         jnc     .L048pw_tail_nc5
1437         decl    %ebp
1438         jz      .L029pw_end
1439
1440         movl    24(%esi),%ecx
1441         subl    %eax,%ecx
1442         movl    %ecx,24(%ebx)
1443         jnc     .L049pw_tail_nc6
1444         movl    $1,%eax
1445         jmp     .L029pw_end
1446 .L050pw_nc_loop:
1447         movl    (%esi),%ecx
1448         movl    %ecx,(%ebx)
1449 .L035pw_nc0:
1450         movl    4(%esi),%ecx
1451         movl    %ecx,4(%ebx)
1452 .L036pw_nc1:
1453         movl    8(%esi),%ecx
1454         movl    %ecx,8(%ebx)
1455 .L037pw_nc2:
1456         movl    12(%esi),%ecx
1457         movl    %ecx,12(%ebx)
1458 .L038pw_nc3:
1459         movl    16(%esi),%ecx
1460         movl    %ecx,16(%ebx)
1461 .L039pw_nc4:
1462         movl    20(%esi),%ecx
1463         movl    %ecx,20(%ebx)
1464 .L040pw_nc5:
1465         movl    24(%esi),%ecx
1466         movl    %ecx,24(%ebx)
1467 .L041pw_nc6:
1468         movl    28(%esi),%ecx
1469         movl    %ecx,28(%ebx)
1470 .L042pw_nc7:
1471
1472         addl    $32,%esi
1473         addl    $32,%ebx
1474         subl    $8,%ebp
1475         jnz     .L050pw_nc_loop
1476         movl    36(%esp),%ebp
1477         andl    $7,%ebp
1478         jz      .L051pw_nc_end
1479         movl    (%esi),%ecx
1480         movl    %ecx,(%ebx)
1481 .L043pw_tail_nc0:
1482         decl    %ebp
1483         jz      .L051pw_nc_end
1484         movl    4(%esi),%ecx
1485         movl    %ecx,4(%ebx)
1486 .L044pw_tail_nc1:
1487         decl    %ebp
1488         jz      .L051pw_nc_end
1489         movl    8(%esi),%ecx
1490         movl    %ecx,8(%ebx)
1491 .L045pw_tail_nc2:
1492         decl    %ebp
1493         jz      .L051pw_nc_end
1494         movl    12(%esi),%ecx
1495         movl    %ecx,12(%ebx)
1496 .L046pw_tail_nc3:
1497         decl    %ebp
1498         jz      .L051pw_nc_end
1499         movl    16(%esi),%ecx
1500         movl    %ecx,16(%ebx)
1501 .L047pw_tail_nc4:
1502         decl    %ebp
1503         jz      .L051pw_nc_end
1504         movl    20(%esi),%ecx
1505         movl    %ecx,20(%ebx)
1506 .L048pw_tail_nc5:
1507         decl    %ebp
1508         jz      .L051pw_nc_end
1509         movl    24(%esi),%ecx
1510         movl    %ecx,24(%ebx)
1511 .L049pw_tail_nc6:
1512 .L051pw_nc_end:
1513         movl    $0,%eax
1514 .L029pw_end:
1515         popl    %edi
1516         popl    %esi
1517         popl    %ebx
1518         popl    %ebp
1519         ret
1520 .size   bn_sub_part_words,.-.L_bn_sub_part_words_begin
1521 .comm   OPENSSL_ia32cap_P,4,4