Debian Codegraph @

win-x86_64/crypto/fipsmodule/x86_64-mont5-win.asm

raw
1 ; This file is generated from a similarly-named Perl script in the BoringSSL
2 ; source tree. Do not edit by hand.
3
4 %ifidn __OUTPUT_FORMAT__, win64
5 default rel
6 %define XMMWORD
7 %define YMMWORD
8 %define ZMMWORD
9
10 %ifdef BORINGSSL_PREFIX
11 %include "boringssl_prefix_symbols_nasm.inc"
12 %endif
13 section .text code align=64
14
15
16 EXTERN OPENSSL_ia32cap_P
17
18 global bn_mul_mont_gather5
19
20 ALIGN 64
21 bn_mul_mont_gather5:
22 mov QWORD[8+rsp],rdi ;WIN64 prologue
23 mov QWORD[16+rsp],rsi
24 mov rax,rsp
25 $L$SEH_begin_bn_mul_mont_gather5:
26 mov rdi,rcx
27 mov rsi,rdx
28 mov rdx,r8
29 mov rcx,r9
30 mov r8,QWORD[40+rsp]
31 mov r9,QWORD[48+rsp]
32
33
34
35 mov r9d,r9d
36 mov rax,rsp
37
38 test r9d,7
39 jnz NEAR $L$mul_enter
40 lea r11,[OPENSSL_ia32cap_P]
41 mov r11d,DWORD[8+r11]
42 jmp NEAR $L$mul4x_enter
43
44 ALIGN 16
45 $L$mul_enter:
46 movd xmm5,DWORD[56+rsp]
47 push rbx
48
49 push rbp
50
51 push r12
52
53 push r13
54
55 push r14
56
57 push r15
58
59
60 neg r9
61 mov r11,rsp
62 lea r10,[((-280))+r9*8+rsp]
63 neg r9
64 and r10,-1024
65
66
67
68
69
70
71
72
73
74 sub r11,r10
75 and r11,-4096
76 lea rsp,[r11*1+r10]
77 mov r11,QWORD[rsp]
78 cmp rsp,r10
79 ja NEAR $L$mul_page_walk
80 jmp NEAR $L$mul_page_walk_done
81
82 $L$mul_page_walk:
83 lea rsp,[((-4096))+rsp]
84 mov r11,QWORD[rsp]
85 cmp rsp,r10
86 ja NEAR $L$mul_page_walk
87 $L$mul_page_walk_done:
88
89 lea r10,[$L$inc]
90 mov QWORD[8+r9*8+rsp],rax
91
92 $L$mul_body:
93
94 lea r12,[128+rdx]
95 movdqa xmm0,XMMWORD[r10]
96 movdqa xmm1,XMMWORD[16+r10]
97 lea r10,[((24-112))+r9*8+rsp]
98 and r10,-16
99
100 pshufd xmm5,xmm5,0
101 movdqa xmm4,xmm1
102 movdqa xmm2,xmm1
103 paddd xmm1,xmm0
104 pcmpeqd xmm0,xmm5
105 DB 0x67
106 movdqa xmm3,xmm4
107 paddd xmm2,xmm1
108 pcmpeqd xmm1,xmm5
109 movdqa XMMWORD[112+r10],xmm0
110 movdqa xmm0,xmm4
111
112 paddd xmm3,xmm2
113 pcmpeqd xmm2,xmm5
114 movdqa XMMWORD[128+r10],xmm1
115 movdqa xmm1,xmm4
116
117 paddd xmm0,xmm3
118 pcmpeqd xmm3,xmm5
119 movdqa XMMWORD[144+r10],xmm2
120 movdqa xmm2,xmm4
121
122 paddd xmm1,xmm0
123 pcmpeqd xmm0,xmm5
124 movdqa XMMWORD[160+r10],xmm3
125 movdqa xmm3,xmm4
126 paddd xmm2,xmm1
127 pcmpeqd xmm1,xmm5
128 movdqa XMMWORD[176+r10],xmm0
129 movdqa xmm0,xmm4
130
131 paddd xmm3,xmm2
132 pcmpeqd xmm2,xmm5
133 movdqa XMMWORD[192+r10],xmm1
134 movdqa xmm1,xmm4
135
136 paddd xmm0,xmm3
137 pcmpeqd xmm3,xmm5
138 movdqa XMMWORD[208+r10],xmm2
139 movdqa xmm2,xmm4
140
141 paddd xmm1,xmm0
142 pcmpeqd xmm0,xmm5
143 movdqa XMMWORD[224+r10],xmm3
144 movdqa xmm3,xmm4
145 paddd xmm2,xmm1
146 pcmpeqd xmm1,xmm5
147 movdqa XMMWORD[240+r10],xmm0
148 movdqa xmm0,xmm4
149
150 paddd xmm3,xmm2
151 pcmpeqd xmm2,xmm5
152 movdqa XMMWORD[256+r10],xmm1
153 movdqa xmm1,xmm4
154
155 paddd xmm0,xmm3
156 pcmpeqd xmm3,xmm5
157 movdqa XMMWORD[272+r10],xmm2
158 movdqa xmm2,xmm4
159
160 paddd xmm1,xmm0
161 pcmpeqd xmm0,xmm5
162 movdqa XMMWORD[288+r10],xmm3
163 movdqa xmm3,xmm4
164 paddd xmm2,xmm1
165 pcmpeqd xmm1,xmm5
166 movdqa XMMWORD[304+r10],xmm0
167
168 paddd xmm3,xmm2
169 DB 0x67
170 pcmpeqd xmm2,xmm5
171 movdqa XMMWORD[320+r10],xmm1
172
173 pcmpeqd xmm3,xmm5
174 movdqa XMMWORD[336+r10],xmm2
175 pand xmm0,XMMWORD[64+r12]
176
177 pand xmm1,XMMWORD[80+r12]
178 pand xmm2,XMMWORD[96+r12]
179 movdqa XMMWORD[352+r10],xmm3
180 pand xmm3,XMMWORD[112+r12]
181 por xmm0,xmm2
182 por xmm1,xmm3
183 movdqa xmm4,XMMWORD[((-128))+r12]
184 movdqa xmm5,XMMWORD[((-112))+r12]
185 movdqa xmm2,XMMWORD[((-96))+r12]
186 pand xmm4,XMMWORD[112+r10]
187 movdqa xmm3,XMMWORD[((-80))+r12]
188 pand xmm5,XMMWORD[128+r10]
189 por xmm0,xmm4
190 pand xmm2,XMMWORD[144+r10]
191 por xmm1,xmm5
192 pand xmm3,XMMWORD[160+r10]
193 por xmm0,xmm2
194 por xmm1,xmm3
195 movdqa xmm4,XMMWORD[((-64))+r12]
196 movdqa xmm5,XMMWORD[((-48))+r12]
197 movdqa xmm2,XMMWORD[((-32))+r12]
198 pand xmm4,XMMWORD[176+r10]
199 movdqa xmm3,XMMWORD[((-16))+r12]
200 pand xmm5,XMMWORD[192+r10]
201 por xmm0,xmm4
202 pand xmm2,XMMWORD[208+r10]
203 por xmm1,xmm5
204 pand xmm3,XMMWORD[224+r10]
205 por xmm0,xmm2
206 por xmm1,xmm3
207 movdqa xmm4,XMMWORD[r12]
208 movdqa xmm5,XMMWORD[16+r12]
209 movdqa xmm2,XMMWORD[32+r12]
210 pand xmm4,XMMWORD[240+r10]
211 movdqa xmm3,XMMWORD[48+r12]
212 pand xmm5,XMMWORD[256+r10]
213 por xmm0,xmm4
214 pand xmm2,XMMWORD[272+r10]
215 por xmm1,xmm5
216 pand xmm3,XMMWORD[288+r10]
217 por xmm0,xmm2
218 por xmm1,xmm3
219 por xmm0,xmm1
220
221 pshufd xmm1,xmm0,0x4e
222 por xmm0,xmm1
223 lea r12,[256+r12]
224 DB 102,72,15,126,195
225
226 mov r8,QWORD[r8]
227 mov rax,QWORD[rsi]
228
229 xor r14,r14
230 xor r15,r15
231
232 mov rbp,r8
233 mul rbx
234 mov r10,rax
235 mov rax,QWORD[rcx]
236
237 imul rbp,r10
238 mov r11,rdx
239
240 mul rbp
241 add r10,rax
242 mov rax,QWORD[8+rsi]
243 adc rdx,0
244 mov r13,rdx
245
246 lea r15,[1+r15]
247 jmp NEAR $L$1st_enter
248
249 ALIGN 16
250 $L$1st:
251 add r13,rax
252 mov rax,QWORD[r15*8+rsi]
253 adc rdx,0
254 add r13,r11
255 mov r11,r10
256 adc rdx,0
257 mov QWORD[((-16))+r15*8+rsp],r13
258 mov r13,rdx
259
260 $L$1st_enter:
261 mul rbx
262 add r11,rax
263 mov rax,QWORD[r15*8+rcx]
264 adc rdx,0
265 lea r15,[1+r15]
266 mov r10,rdx
267
268 mul rbp
269 cmp r15,r9
270 jne NEAR $L$1st
271
272
273 add r13,rax
274 adc rdx,0
275 add r13,r11
276 adc rdx,0
277 mov QWORD[((-16))+r9*8+rsp],r13
278 mov r13,rdx
279 mov r11,r10
280
281 xor rdx,rdx
282 add r13,r11
283 adc rdx,0
284 mov QWORD[((-8))+r9*8+rsp],r13
285 mov QWORD[r9*8+rsp],rdx
286
287 lea r14,[1+r14]
288 jmp NEAR $L$outer
289 ALIGN 16
290 $L$outer:
291 lea rdx,[((24+128))+r9*8+rsp]
292 and rdx,-16
293 pxor xmm4,xmm4
294 pxor xmm5,xmm5
295 movdqa xmm0,XMMWORD[((-128))+r12]
296 movdqa xmm1,XMMWORD[((-112))+r12]
297 movdqa xmm2,XMMWORD[((-96))+r12]
298 movdqa xmm3,XMMWORD[((-80))+r12]
299 pand xmm0,XMMWORD[((-128))+rdx]
300 pand xmm1,XMMWORD[((-112))+rdx]
301 por xmm4,xmm0
302 pand xmm2,XMMWORD[((-96))+rdx]
303 por xmm5,xmm1
304 pand xmm3,XMMWORD[((-80))+rdx]
305 por xmm4,xmm2
306 por xmm5,xmm3
307 movdqa xmm0,XMMWORD[((-64))+r12]
308 movdqa xmm1,XMMWORD[((-48))+r12]
309 movdqa xmm2,XMMWORD[((-32))+r12]
310 movdqa xmm3,XMMWORD[((-16))+r12]
311 pand xmm0,XMMWORD[((-64))+rdx]
312 pand xmm1,XMMWORD[((-48))+rdx]
313 por xmm4,xmm0
314 pand xmm2,XMMWORD[((-32))+rdx]
315 por xmm5,xmm1
316 pand xmm3,XMMWORD[((-16))+rdx]
317 por xmm4,xmm2
318 por xmm5,xmm3
319 movdqa xmm0,XMMWORD[r12]
320 movdqa xmm1,XMMWORD[16+r12]
321 movdqa xmm2,XMMWORD[32+r12]
322 movdqa xmm3,XMMWORD[48+r12]
323 pand xmm0,XMMWORD[rdx]
324 pand xmm1,XMMWORD[16+rdx]
325 por xmm4,xmm0
326 pand xmm2,XMMWORD[32+rdx]
327 por xmm5,xmm1
328 pand xmm3,XMMWORD[48+rdx]
329 por xmm4,xmm2
330 por xmm5,xmm3
331 movdqa xmm0,XMMWORD[64+r12]
332 movdqa xmm1,XMMWORD[80+r12]
333 movdqa xmm2,XMMWORD[96+r12]
334 movdqa xmm3,XMMWORD[112+r12]
335 pand xmm0,XMMWORD[64+rdx]
336 pand xmm1,XMMWORD[80+rdx]
337 por xmm4,xmm0
338 pand xmm2,XMMWORD[96+rdx]
339 por xmm5,xmm1
340 pand xmm3,XMMWORD[112+rdx]
341 por xmm4,xmm2
342 por xmm5,xmm3
343 por xmm4,xmm5
344
345 pshufd xmm0,xmm4,0x4e
346 por xmm0,xmm4
347 lea r12,[256+r12]
348
349 mov rax,QWORD[rsi]
350 DB 102,72,15,126,195
351
352 xor r15,r15
353 mov rbp,r8
354 mov r10,QWORD[rsp]
355
356 mul rbx
357 add r10,rax
358 mov rax,QWORD[rcx]
359 adc rdx,0
360
361 imul rbp,r10
362 mov r11,rdx
363
364 mul rbp
365 add r10,rax
366 mov rax,QWORD[8+rsi]
367 adc rdx,0
368 mov r10,QWORD[8+rsp]
369 mov r13,rdx
370
371 lea r15,[1+r15]
372 jmp NEAR $L$inner_enter
373
374 ALIGN 16
375 $L$inner:
376 add r13,rax
377 mov rax,QWORD[r15*8+rsi]
378 adc rdx,0
379 add r13,r10
380 mov r10,QWORD[r15*8+rsp]
381 adc rdx,0
382 mov QWORD[((-16))+r15*8+rsp],r13
383 mov r13,rdx
384
385 $L$inner_enter:
386 mul rbx
387 add r11,rax
388 mov rax,QWORD[r15*8+rcx]
389 adc rdx,0
390 add r10,r11
391 mov r11,rdx
392 adc r11,0
393 lea r15,[1+r15]
394
395 mul rbp
396 cmp r15,r9
397 jne NEAR $L$inner
398
399 add r13,rax
400 adc rdx,0
401 add r13,r10
402 mov r10,QWORD[r9*8+rsp]
403 adc rdx,0
404 mov QWORD[((-16))+r9*8+rsp],r13
405 mov r13,rdx
406
407 xor rdx,rdx
408 add r13,r11
409 adc rdx,0
410 add r13,r10
411 adc rdx,0
412 mov QWORD[((-8))+r9*8+rsp],r13
413 mov QWORD[r9*8+rsp],rdx
414
415 lea r14,[1+r14]
416 cmp r14,r9
417 jb NEAR $L$outer
418
419 xor r14,r14
420 mov rax,QWORD[rsp]
421 lea rsi,[rsp]
422 mov r15,r9
423 jmp NEAR $L$sub
424 ALIGN 16
425 $L$sub: sbb rax,QWORD[r14*8+rcx]
426 mov QWORD[r14*8+rdi],rax
427 mov rax,QWORD[8+r14*8+rsi]
428 lea r14,[1+r14]
429 dec r15
430 jnz NEAR $L$sub
431
432 sbb rax,0
433 mov rbx,-1
434 xor rbx,rax
435 xor r14,r14
436 mov r15,r9
437
438 $L$copy:
439 mov rcx,QWORD[r14*8+rdi]
440 mov rdx,QWORD[r14*8+rsp]
441 and rcx,rbx
442 and rdx,rax
443 mov QWORD[r14*8+rsp],r14
444 or rdx,rcx
445 mov QWORD[r14*8+rdi],rdx
446 lea r14,[1+r14]
447 sub r15,1
448 jnz NEAR $L$copy
449
450 mov rsi,QWORD[8+r9*8+rsp]
451
452 mov rax,1
453
454 mov r15,QWORD[((-48))+rsi]
455
456 mov r14,QWORD[((-40))+rsi]
457
458 mov r13,QWORD[((-32))+rsi]
459
460 mov r12,QWORD[((-24))+rsi]
461
462 mov rbp,QWORD[((-16))+rsi]
463
464 mov rbx,QWORD[((-8))+rsi]
465
466 lea rsp,[rsi]
467
468 $L$mul_epilogue:
469 mov rdi,QWORD[8+rsp] ;WIN64 epilogue
470 mov rsi,QWORD[16+rsp]
471 DB 0F3h,0C3h ;repret
472
473 $L$SEH_end_bn_mul_mont_gather5:
474
475 ALIGN 32
476 bn_mul4x_mont_gather5:
477 mov QWORD[8+rsp],rdi ;WIN64 prologue
478 mov QWORD[16+rsp],rsi
479 mov rax,rsp
480 $L$SEH_begin_bn_mul4x_mont_gather5:
481 mov rdi,rcx
482 mov rsi,rdx
483 mov rdx,r8
484 mov rcx,r9
485 mov r8,QWORD[40+rsp]
486 mov r9,QWORD[48+rsp]
487
488
489
490 DB 0x67
491 mov rax,rsp
492
493 $L$mul4x_enter:
494 and r11d,0x80108
495 cmp r11d,0x80108
496 je NEAR $L$mulx4x_enter
497 push rbx
498
499 push rbp
500
501 push r12
502
503 push r13
504
505 push r14
506
507 push r15
508
509 $L$mul4x_prologue:
510
511 DB 0x67
512 shl r9d,3
513 lea r10,[r9*2+r9]
514 neg r9
515
516
517
518
519
520
521
522
523
524
525 lea r11,[((-320))+r9*2+rsp]
526 mov rbp,rsp
527 sub r11,rdi
528 and r11,4095
529 cmp r10,r11
530 jb NEAR $L$mul4xsp_alt
531 sub rbp,r11
532 lea rbp,[((-320))+r9*2+rbp]
533 jmp NEAR $L$mul4xsp_done
534
535 ALIGN 32
536 $L$mul4xsp_alt:
537 lea r10,[((4096-320))+r9*2]
538 lea rbp,[((-320))+r9*2+rbp]
539 sub r11,r10
540 mov r10,0
541 cmovc r11,r10
542 sub rbp,r11
543 $L$mul4xsp_done:
544 and rbp,-64
545 mov r11,rsp
546 sub r11,rbp
547 and r11,-4096
548 lea rsp,[rbp*1+r11]
549 mov r10,QWORD[rsp]
550 cmp rsp,rbp
551 ja NEAR $L$mul4x_page_walk
552 jmp NEAR $L$mul4x_page_walk_done
553
554 $L$mul4x_page_walk:
555 lea rsp,[((-4096))+rsp]
556 mov r10,QWORD[rsp]
557 cmp rsp,rbp
558 ja NEAR $L$mul4x_page_walk
559 $L$mul4x_page_walk_done:
560
561 neg r9
562
563 mov QWORD[40+rsp],rax
564
565 $L$mul4x_body:
566
567 call mul4x_internal
568
569 mov rsi,QWORD[40+rsp]
570
571 mov rax,1
572
573 mov r15,QWORD[((-48))+rsi]
574
575 mov r14,QWORD[((-40))+rsi]
576
577 mov r13,QWORD[((-32))+rsi]
578
579 mov r12,QWORD[((-24))+rsi]
580
581 mov rbp,QWORD[((-16))+rsi]
582
583 mov rbx,QWORD[((-8))+rsi]
584
585 lea rsp,[rsi]
586
587 $L$mul4x_epilogue:
588 mov rdi,QWORD[8+rsp] ;WIN64 epilogue
589 mov rsi,QWORD[16+rsp]
590 DB 0F3h,0C3h ;repret
591
592 $L$SEH_end_bn_mul4x_mont_gather5:
593
594
595 ALIGN 32
596 mul4x_internal:
597
598 shl r9,5
599 movd xmm5,DWORD[56+rax]
600 lea rax,[$L$inc]
601 lea r13,[128+r9*1+rdx]
602 shr r9,5
603 movdqa xmm0,XMMWORD[rax]
604 movdqa xmm1,XMMWORD[16+rax]
605 lea r10,[((88-112))+r9*1+rsp]
606 lea r12,[128+rdx]
607
608 pshufd xmm5,xmm5,0
609 movdqa xmm4,xmm1
610 DB 0x67,0x67
611 movdqa xmm2,xmm1
612 paddd xmm1,xmm0
613 pcmpeqd xmm0,xmm5
614 DB 0x67
615 movdqa xmm3,xmm4
616 paddd xmm2,xmm1
617 pcmpeqd xmm1,xmm5
618 movdqa XMMWORD[112+r10],xmm0
619 movdqa xmm0,xmm4
620
621 paddd xmm3,xmm2
622 pcmpeqd xmm2,xmm5
623 movdqa XMMWORD[128+r10],xmm1
624 movdqa xmm1,xmm4
625
626 paddd xmm0,xmm3
627 pcmpeqd xmm3,xmm5
628 movdqa XMMWORD[144+r10],xmm2
629 movdqa xmm2,xmm4
630
631 paddd xmm1,xmm0
632 pcmpeqd xmm0,xmm5
633 movdqa XMMWORD[160+r10],xmm3
634 movdqa xmm3,xmm4
635 paddd xmm2,xmm1
636 pcmpeqd xmm1,xmm5
637 movdqa XMMWORD[176+r10],xmm0
638 movdqa xmm0,xmm4
639
640 paddd xmm3,xmm2
641 pcmpeqd xmm2,xmm5
642 movdqa XMMWORD[192+r10],xmm1
643 movdqa xmm1,xmm4
644
645 paddd xmm0,xmm3
646 pcmpeqd xmm3,xmm5
647 movdqa XMMWORD[208+r10],xmm2
648 movdqa xmm2,xmm4
649
650 paddd xmm1,xmm0
651 pcmpeqd xmm0,xmm5
652 movdqa XMMWORD[224+r10],xmm3
653 movdqa xmm3,xmm4
654 paddd xmm2,xmm1
655 pcmpeqd xmm1,xmm5
656 movdqa XMMWORD[240+r10],xmm0
657 movdqa xmm0,xmm4
658
659 paddd xmm3,xmm2
660 pcmpeqd xmm2,xmm5
661 movdqa XMMWORD[256+r10],xmm1
662 movdqa xmm1,xmm4
663
664 paddd xmm0,xmm3
665 pcmpeqd xmm3,xmm5
666 movdqa XMMWORD[272+r10],xmm2
667 movdqa xmm2,xmm4
668
669 paddd xmm1,xmm0
670 pcmpeqd xmm0,xmm5
671 movdqa XMMWORD[288+r10],xmm3
672 movdqa xmm3,xmm4
673 paddd xmm2,xmm1
674 pcmpeqd xmm1,xmm5
675 movdqa XMMWORD[304+r10],xmm0
676
677 paddd xmm3,xmm2
678 DB 0x67
679 pcmpeqd xmm2,xmm5
680 movdqa XMMWORD[320+r10],xmm1
681
682 pcmpeqd xmm3,xmm5
683 movdqa XMMWORD[336+r10],xmm2
684 pand xmm0,XMMWORD[64+r12]
685
686 pand xmm1,XMMWORD[80+r12]
687 pand xmm2,XMMWORD[96+r12]
688 movdqa XMMWORD[352+r10],xmm3
689 pand xmm3,XMMWORD[112+r12]
690 por xmm0,xmm2
691 por xmm1,xmm3
692 movdqa xmm4,XMMWORD[((-128))+r12]
693 movdqa xmm5,XMMWORD[((-112))+r12]
694 movdqa xmm2,XMMWORD[((-96))+r12]
695 pand xmm4,XMMWORD[112+r10]
696 movdqa xmm3,XMMWORD[((-80))+r12]
697 pand xmm5,XMMWORD[128+r10]
698 por xmm0,xmm4
699 pand xmm2,XMMWORD[144+r10]
700 por xmm1,xmm5
701 pand xmm3,XMMWORD[160+r10]
702 por xmm0,xmm2
703 por xmm1,xmm3
704 movdqa xmm4,XMMWORD[((-64))+r12]
705 movdqa xmm5,XMMWORD[((-48))+r12]
706 movdqa xmm2,XMMWORD[((-32))+r12]
707 pand xmm4,XMMWORD[176+r10]
708 movdqa xmm3,XMMWORD[((-16))+r12]
709 pand xmm5,XMMWORD[192+r10]
710 por xmm0,xmm4
711 pand xmm2,XMMWORD[208+r10]
712 por xmm1,xmm5
713 pand xmm3,XMMWORD[224+r10]
714 por xmm0,xmm2
715 por xmm1,xmm3
716 movdqa xmm4,XMMWORD[r12]
717 movdqa xmm5,XMMWORD[16+r12]
718 movdqa xmm2,XMMWORD[32+r12]
719 pand xmm4,XMMWORD[240+r10]
720 movdqa xmm3,XMMWORD[48+r12]
721 pand xmm5,XMMWORD[256+r10]
722 por xmm0,xmm4
723 pand xmm2,XMMWORD[272+r10]
724 por xmm1,xmm5
725 pand xmm3,XMMWORD[288+r10]
726 por xmm0,xmm2
727 por xmm1,xmm3
728 por xmm0,xmm1
729
730 pshufd xmm1,xmm0,0x4e
731 por xmm0,xmm1
732 lea r12,[256+r12]
733 DB 102,72,15,126,195
734
735 mov QWORD[((16+8))+rsp],r13
736 mov QWORD[((56+8))+rsp],rdi
737
738 mov r8,QWORD[r8]
739 mov rax,QWORD[rsi]
740 lea rsi,[r9*1+rsi]
741 neg r9
742
743 mov rbp,r8
744 mul rbx
745 mov r10,rax
746 mov rax,QWORD[rcx]
747
748 imul rbp,r10
749 lea r14,[((64+8))+rsp]
750 mov r11,rdx
751
752 mul rbp
753 add r10,rax
754 mov rax,QWORD[8+r9*1+rsi]
755 adc rdx,0
756 mov rdi,rdx
757
758 mul rbx
759 add r11,rax
760 mov rax,QWORD[8+rcx]
761 adc rdx,0
762 mov r10,rdx
763
764 mul rbp
765 add rdi,rax
766 mov rax,QWORD[16+r9*1+rsi]
767 adc rdx,0
768 add rdi,r11
769 lea r15,[32+r9]
770 lea rcx,[32+rcx]
771 adc rdx,0
772 mov QWORD[r14],rdi
773 mov r13,rdx
774 jmp NEAR $L$1st4x
775
776 ALIGN 32
777 $L$1st4x:
778 mul rbx
779 add r10,rax
780 mov rax,QWORD[((-16))+rcx]
781 lea r14,[32+r14]
782 adc rdx,0
783 mov r11,rdx
784
785 mul rbp
786 add r13,rax
787 mov rax,QWORD[((-8))+r15*1+rsi]
788 adc rdx,0
789 add r13,r10
790 adc rdx,0
791 mov QWORD[((-24))+r14],r13
792 mov rdi,rdx
793
794 mul rbx
795 add r11,rax
796 mov rax,QWORD[((-8))+rcx]
797 adc rdx,0
798 mov r10,rdx
799
800 mul rbp
801 add rdi,rax
802 mov rax,QWORD[r15*1+rsi]
803 adc rdx,0
804 add rdi,r11
805 adc rdx,0
806 mov QWORD[((-16))+r14],rdi
807 mov r13,rdx
808
809 mul rbx
810 add r10,rax
811 mov rax,QWORD[rcx]
812 adc rdx,0
813 mov r11,rdx
814
815 mul rbp
816 add r13,rax
817 mov rax,QWORD[8+r15*1+rsi]
818 adc rdx,0
819 add r13,r10
820 adc rdx,0
821 mov QWORD[((-8))+r14],r13
822 mov rdi,rdx
823
824 mul rbx
825 add r11,rax
826 mov rax,QWORD[8+rcx]
827 adc rdx,0
828 mov r10,rdx
829
830 mul rbp
831 add rdi,rax
832 mov rax,QWORD[16+r15*1+rsi]
833 adc rdx,0
834 add rdi,r11
835 lea rcx,[32+rcx]
836 adc rdx,0
837 mov QWORD[r14],rdi
838 mov r13,rdx
839
840 add r15,32
841 jnz NEAR $L$1st4x
842
843 mul rbx
844 add r10,rax
845 mov rax,QWORD[((-16))+rcx]
846 lea r14,[32+r14]
847 adc rdx,0
848 mov r11,rdx
849
850 mul rbp
851 add r13,rax
852 mov rax,QWORD[((-8))+rsi]
853 adc rdx,0
854 add r13,r10
855 adc rdx,0
856 mov QWORD[((-24))+r14],r13
857 mov rdi,rdx
858
859 mul rbx
860 add r11,rax
861 mov rax,QWORD[((-8))+rcx]
862 adc rdx,0
863 mov r10,rdx
864
865 mul rbp
866 add rdi,rax
867 mov rax,QWORD[r9*1+rsi]
868 adc rdx,0
869 add rdi,r11
870 adc rdx,0
871 mov QWORD[((-16))+r14],rdi
872 mov r13,rdx
873
874 lea rcx,[r9*1+rcx]
875
876 xor rdi,rdi
877 add r13,r10
878 adc rdi,0
879 mov QWORD[((-8))+r14],r13
880
881 jmp NEAR $L$outer4x
882
883 ALIGN 32
884 $L$outer4x:
885 lea rdx,[((16+128))+r14]
886 pxor xmm4,xmm4
887 pxor xmm5,xmm5
888 movdqa xmm0,XMMWORD[((-128))+r12]
889 movdqa xmm1,XMMWORD[((-112))+r12]
890 movdqa xmm2,XMMWORD[((-96))+r12]
891 movdqa xmm3,XMMWORD[((-80))+r12]
892 pand xmm0,XMMWORD[((-128))+rdx]
893 pand xmm1,XMMWORD[((-112))+rdx]
894 por xmm4,xmm0
895 pand xmm2,XMMWORD[((-96))+rdx]
896 por xmm5,xmm1
897 pand xmm3,XMMWORD[((-80))+rdx]
898 por xmm4,xmm2
899 por xmm5,xmm3
900 movdqa xmm0,XMMWORD[((-64))+r12]
901 movdqa xmm1,XMMWORD[((-48))+r12]
902 movdqa xmm2,XMMWORD[((-32))+r12]
903 movdqa xmm3,XMMWORD[((-16))+r12]
904 pand xmm0,XMMWORD[((-64))+rdx]
905 pand xmm1,XMMWORD[((-48))+rdx]
906 por xmm4,xmm0
907 pand xmm2,XMMWORD[((-32))+rdx]
908 por xmm5,xmm1
909 pand xmm3,XMMWORD[((-16))+rdx]
910 por xmm4,xmm2
911 por xmm5,xmm3
912 movdqa xmm0,XMMWORD[r12]
913 movdqa xmm1,XMMWORD[16+r12]
914 movdqa xmm2,XMMWORD[32+r12]
915 movdqa xmm3,XMMWORD[48+r12]
916 pand xmm0,XMMWORD[rdx]
917 pand xmm1,XMMWORD[16+rdx]
918 por xmm4,xmm0
919 pand xmm2,XMMWORD[32+rdx]
920 por xmm5,xmm1
921 pand xmm3,XMMWORD[48+rdx]
922 por xmm4,xmm2
923 por xmm5,xmm3
924 movdqa xmm0,XMMWORD[64+r12]
925 movdqa xmm1,XMMWORD[80+r12]
926 movdqa xmm2,XMMWORD[96+r12]
927 movdqa xmm3,XMMWORD[112+r12]
928 pand xmm0,XMMWORD[64+rdx]
929 pand xmm1,XMMWORD[80+rdx]
930 por xmm4,xmm0
931 pand xmm2,XMMWORD[96+rdx]
932 por xmm5,xmm1
933 pand xmm3,XMMWORD[112+rdx]
934 por xmm4,xmm2
935 por xmm5,xmm3
936 por xmm4,xmm5
937
938 pshufd xmm0,xmm4,0x4e
939 por xmm0,xmm4
940 lea r12,[256+r12]
941 DB 102,72,15,126,195
942
943 mov r10,QWORD[r9*1+r14]
944 mov rbp,r8
945 mul rbx
946 add r10,rax
947 mov rax,QWORD[rcx]
948 adc rdx,0
949
950 imul rbp,r10
951 mov r11,rdx
952 mov QWORD[r14],rdi
953
954 lea r14,[r9*1+r14]
955
956 mul rbp
957 add r10,rax
958 mov rax,QWORD[8+r9*1+rsi]
959 adc rdx,0
960 mov rdi,rdx
961
962 mul rbx
963 add r11,rax
964 mov rax,QWORD[8+rcx]
965 adc rdx,0
966 add r11,QWORD[8+r14]
967 adc rdx,0
968 mov r10,rdx
969
970 mul rbp
971 add rdi,rax
972 mov rax,QWORD[16+r9*1+rsi]
973 adc rdx,0
974 add rdi,r11
975 lea r15,[32+r9]
976 lea rcx,[32+rcx]
977 adc rdx,0
978 mov r13,rdx
979 jmp NEAR $L$inner4x
980
981 ALIGN 32
982 $L$inner4x:
983 mul rbx
984 add r10,rax
985 mov rax,QWORD[((-16))+rcx]
986 adc rdx,0
987 add r10,QWORD[16+r14]
988 lea r14,[32+r14]
989 adc rdx,0
990 mov r11,rdx
991
992 mul rbp
993 add r13,rax
994 mov rax,QWORD[((-8))+r15*1+rsi]
995 adc rdx,0
996 add r13,r10
997 adc rdx,0
998 mov QWORD[((-32))+r14],rdi
999 mov rdi,rdx
1000
1001 mul rbx
1002 add r11,rax
1003 mov rax,QWORD[((-8))+rcx]
1004 adc rdx,0
1005 add r11,QWORD[((-8))+r14]
1006 adc rdx,0
1007 mov r10,rdx
1008
1009 mul rbp
1010 add rdi,rax
1011 mov rax,QWORD[r15*1+rsi]
1012 adc rdx,0
1013 add rdi,r11
1014 adc rdx,0
1015 mov QWORD[((-24))+r14],r13
1016 mov r13,rdx
1017
1018 mul rbx
1019 add r10,rax
1020 mov rax,QWORD[rcx]
1021 adc rdx,0
1022 add r10,QWORD[r14]
1023 adc rdx,0
1024 mov r11,rdx
1025
1026 mul rbp
1027 add r13,rax
1028 mov rax,QWORD[8+r15*1+rsi]
1029 adc rdx,0
1030 add r13,r10
1031 adc rdx,0
1032 mov QWORD[((-16))+r14],rdi
1033 mov rdi,rdx
1034
1035 mul rbx
1036 add r11,rax
1037 mov rax,QWORD[8+rcx]
1038 adc rdx,0
1039 add r11,QWORD[8+r14]
1040 adc rdx,0
1041 mov r10,rdx
1042
1043 mul rbp
1044 add rdi,rax
1045 mov rax,QWORD[16+r15*1+rsi]
1046 adc rdx,0
1047 add rdi,r11
1048 lea rcx,[32+rcx]
1049 adc rdx,0
1050 mov QWORD[((-8))+r14],r13
1051 mov r13,rdx
1052
1053 add r15,32
1054 jnz NEAR $L$inner4x
1055
1056 mul rbx
1057 add r10,rax
1058 mov rax,QWORD[((-16))+rcx]
1059 adc rdx,0
1060 add r10,QWORD[16+r14]
1061 lea r14,[32+r14]
1062 adc rdx,0
1063 mov r11,rdx
1064
1065 mul rbp
1066 add r13,rax
1067 mov rax,QWORD[((-8))+rsi]
1068 adc rdx,0
1069 add r13,r10
1070 adc rdx,0
1071 mov QWORD[((-32))+r14],rdi
1072 mov rdi,rdx
1073
1074 mul rbx
1075 add r11,rax
1076 mov rax,rbp
1077 mov rbp,QWORD[((-8))+rcx]
1078 adc rdx,0
1079 add r11,QWORD[((-8))+r14]
1080 adc rdx,0
1081 mov r10,rdx
1082
1083 mul rbp
1084 add rdi,rax
1085 mov rax,QWORD[r9*1+rsi]
1086 adc rdx,0
1087 add rdi,r11
1088 adc rdx,0
1089 mov QWORD[((-24))+r14],r13
1090 mov r13,rdx
1091
1092 mov QWORD[((-16))+r14],rdi
1093 lea rcx,[r9*1+rcx]
1094
1095 xor rdi,rdi
1096 add r13,r10
1097 adc rdi,0
1098 add r13,QWORD[r14]
1099 adc rdi,0
1100 mov QWORD[((-8))+r14],r13
1101
1102 cmp r12,QWORD[((16+8))+rsp]
1103 jb NEAR $L$outer4x
1104 xor rax,rax
1105 sub rbp,r13
1106 adc r15,r15
1107 or rdi,r15
1108 sub rax,rdi
1109 lea rbx,[r9*1+r14]
1110 mov r12,QWORD[rcx]
1111 lea rbp,[rcx]
1112 mov rcx,r9
1113 sar rcx,3+2
1114 mov rdi,QWORD[((56+8))+rsp]
1115 dec r12
1116 xor r10,r10
1117 mov r13,QWORD[8+rbp]
1118 mov r14,QWORD[16+rbp]
1119 mov r15,QWORD[24+rbp]
1120 jmp NEAR $L$sqr4x_sub_entry
1121
1122
1123 global bn_power5
1124
1125 ALIGN 32
1126 bn_power5:
1127 mov QWORD[8+rsp],rdi ;WIN64 prologue
1128 mov QWORD[16+rsp],rsi
1129 mov rax,rsp
1130 $L$SEH_begin_bn_power5:
1131 mov rdi,rcx
1132 mov rsi,rdx
1133 mov rdx,r8
1134 mov rcx,r9
1135 mov r8,QWORD[40+rsp]
1136 mov r9,QWORD[48+rsp]
1137
1138
1139
1140 mov rax,rsp
1141
1142 lea r11,[OPENSSL_ia32cap_P]
1143 mov r11d,DWORD[8+r11]
1144 and r11d,0x80108
1145 cmp r11d,0x80108
1146 je NEAR $L$powerx5_enter
1147 push rbx
1148
1149 push rbp
1150
1151 push r12
1152
1153 push r13
1154
1155 push r14
1156
1157 push r15
1158
1159 $L$power5_prologue:
1160
1161 shl r9d,3
1162 lea r10d,[r9*2+r9]
1163 neg r9
1164 mov r8,QWORD[r8]
1165
1166
1167
1168
1169
1170
1171
1172
1173 lea r11,[((-320))+r9*2+rsp]
1174 mov rbp,rsp
1175 sub r11,rdi
1176 and r11,4095
1177 cmp r10,r11
1178 jb NEAR $L$pwr_sp_alt
1179 sub rbp,r11
1180 lea rbp,[((-320))+r9*2+rbp]
1181 jmp NEAR $L$pwr_sp_done
1182
1183 ALIGN 32
1184 $L$pwr_sp_alt:
1185 lea r10,[((4096-320))+r9*2]
1186 lea rbp,[((-320))+r9*2+rbp]
1187 sub r11,r10
1188 mov r10,0
1189 cmovc r11,r10
1190 sub rbp,r11
1191 $L$pwr_sp_done:
1192 and rbp,-64
1193 mov r11,rsp
1194 sub r11,rbp
1195 and r11,-4096
1196 lea rsp,[rbp*1+r11]
1197 mov r10,QWORD[rsp]
1198 cmp rsp,rbp
1199 ja NEAR $L$pwr_page_walk
1200 jmp NEAR $L$pwr_page_walk_done
1201
1202 $L$pwr_page_walk:
1203 lea rsp,[((-4096))+rsp]
1204 mov r10,QWORD[rsp]
1205 cmp rsp,rbp
1206 ja NEAR $L$pwr_page_walk
1207 $L$pwr_page_walk_done:
1208
1209 mov r10,r9
1210 neg r9
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221 mov QWORD[32+rsp],r8
1222 mov QWORD[40+rsp],rax
1223
1224 $L$power5_body:
1225 DB 102,72,15,110,207
1226 DB 102,72,15,110,209
1227 DB 102,73,15,110,218
1228 DB 102,72,15,110,226
1229
1230 call __bn_sqr8x_internal
1231 call __bn_post4x_internal
1232 call __bn_sqr8x_internal
1233 call __bn_post4x_internal
1234 call __bn_sqr8x_internal
1235 call __bn_post4x_internal
1236 call __bn_sqr8x_internal
1237 call __bn_post4x_internal
1238 call __bn_sqr8x_internal
1239 call __bn_post4x_internal
1240
1241 DB 102,72,15,126,209
1242 DB 102,72,15,126,226
1243 mov rdi,rsi
1244 mov rax,QWORD[40+rsp]
1245 lea r8,[32+rsp]
1246
1247 call mul4x_internal
1248
1249 mov rsi,QWORD[40+rsp]
1250
1251 mov rax,1
1252 mov r15,QWORD[((-48))+rsi]
1253
1254 mov r14,QWORD[((-40))+rsi]
1255
1256 mov r13,QWORD[((-32))+rsi]
1257
1258 mov r12,QWORD[((-24))+rsi]
1259
1260 mov rbp,QWORD[((-16))+rsi]
1261
1262 mov rbx,QWORD[((-8))+rsi]
1263
1264 lea rsp,[rsi]
1265
1266 $L$power5_epilogue:
1267 mov rdi,QWORD[8+rsp] ;WIN64 epilogue
1268 mov rsi,QWORD[16+rsp]
1269 DB 0F3h,0C3h ;repret
1270
1271 $L$SEH_end_bn_power5:
1272
1273 global bn_sqr8x_internal
1274
1275
1276 ALIGN 32
1277 bn_sqr8x_internal:
1278 __bn_sqr8x_internal:
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353 lea rbp,[32+r10]
1354 lea rsi,[r9*1+rsi]
1355
1356 mov rcx,r9
1357
1358
1359 mov r14,QWORD[((-32))+rbp*1+rsi]
1360 lea rdi,[((48+8))+r9*2+rsp]
1361 mov rax,QWORD[((-24))+rbp*1+rsi]
1362 lea rdi,[((-32))+rbp*1+rdi]
1363 mov rbx,QWORD[((-16))+rbp*1+rsi]
1364 mov r15,rax
1365
1366 mul r14
1367 mov r10,rax
1368 mov rax,rbx
1369 mov r11,rdx
1370 mov QWORD[((-24))+rbp*1+rdi],r10
1371
1372 mul r14
1373 add r11,rax
1374 mov rax,rbx
1375 adc rdx,0
1376 mov QWORD[((-16))+rbp*1+rdi],r11
1377 mov r10,rdx
1378
1379
1380 mov rbx,QWORD[((-8))+rbp*1+rsi]
1381 mul r15
1382 mov r12,rax
1383 mov rax,rbx
1384 mov r13,rdx
1385
1386 lea rcx,[rbp]
1387 mul r14
1388 add r10,rax
1389 mov rax,rbx
1390 mov r11,rdx
1391 adc r11,0
1392 add r10,r12
1393 adc r11,0
1394 mov QWORD[((-8))+rcx*1+rdi],r10
1395 jmp NEAR $L$sqr4x_1st
1396
1397 ALIGN 32
1398 $L$sqr4x_1st:
1399 mov rbx,QWORD[rcx*1+rsi]
1400 mul r15
1401 add r13,rax
1402 mov rax,rbx
1403 mov r12,rdx
1404 adc r12,0
1405
1406 mul r14
1407 add r11,rax
1408 mov rax,rbx
1409 mov rbx,QWORD[8+rcx*1+rsi]
1410 mov r10,rdx
1411 adc r10,0
1412 add r11,r13
1413 adc r10,0
1414
1415
1416 mul r15
1417 add r12,rax
1418 mov rax,rbx
1419 mov QWORD[rcx*1+rdi],r11
1420 mov r13,rdx
1421 adc r13,0
1422
1423 mul r14
1424 add r10,rax
1425 mov rax,rbx
1426 mov rbx,QWORD[16+rcx*1+rsi]
1427 mov r11,rdx
1428 adc r11,0
1429 add r10,r12
1430 adc r11,0
1431
1432 mul r15
1433 add r13,rax
1434 mov rax,rbx
1435 mov QWORD[8+rcx*1+rdi],r10
1436 mov r12,rdx
1437 adc r12,0
1438
1439 mul r14
1440 add r11,rax
1441 mov rax,rbx
1442 mov rbx,QWORD[24+rcx*1+rsi]
1443 mov r10,rdx
1444 adc r10,0
1445 add r11,r13
1446 adc r10,0
1447
1448
1449 mul r15
1450 add r12,rax
1451 mov rax,rbx
1452 mov QWORD[16+rcx*1+rdi],r11
1453 mov r13,rdx
1454 adc r13,0
1455 lea rcx,[32+rcx]
1456
1457 mul r14
1458 add r10,rax
1459 mov rax,rbx
1460 mov r11,rdx
1461 adc r11,0
1462 add r10,r12
1463 adc r11,0
1464 mov QWORD[((-8))+rcx*1+rdi],r10
1465
1466 cmp rcx,0
1467 jne NEAR $L$sqr4x_1st
1468
1469 mul r15
1470 add r13,rax
1471 lea rbp,[16+rbp]
1472 adc rdx,0
1473 add r13,r11
1474 adc rdx,0
1475
1476 mov QWORD[rdi],r13
1477 mov r12,rdx
1478 mov QWORD[8+rdi],rdx
1479 jmp NEAR $L$sqr4x_outer
1480
1481 ALIGN 32
1482 $L$sqr4x_outer:
1483 mov r14,QWORD[((-32))+rbp*1+rsi]
1484 lea rdi,[((48+8))+r9*2+rsp]
1485 mov rax,QWORD[((-24))+rbp*1+rsi]
1486 lea rdi,[((-32))+rbp*1+rdi]
1487 mov rbx,QWORD[((-16))+rbp*1+rsi]
1488 mov r15,rax
1489
1490 mul r14
1491 mov r10,QWORD[((-24))+rbp*1+rdi]
1492 add r10,rax
1493 mov rax,rbx
1494 adc rdx,0
1495 mov QWORD[((-24))+rbp*1+rdi],r10
1496 mov r11,rdx
1497
1498 mul r14
1499 add r11,rax
1500 mov rax,rbx
1501 adc rdx,0
1502 add r11,QWORD[((-16))+rbp*1+rdi]
1503 mov r10,rdx
1504 adc r10,0
1505 mov QWORD[((-16))+rbp*1+rdi],r11
1506
1507 xor r12,r12
1508
1509 mov rbx,QWORD[((-8))+rbp*1+rsi]
1510 mul r15
1511 add r12,rax
1512 mov rax,rbx
1513 adc rdx,0
1514 add r12,QWORD[((-8))+rbp*1+rdi]
1515 mov r13,rdx
1516 adc r13,0
1517
1518 mul r14
1519 add r10,rax
1520 mov rax,rbx
1521 adc rdx,0
1522 add r10,r12
1523 mov r11,rdx
1524 adc r11,0
1525 mov QWORD[((-8))+rbp*1+rdi],r10
1526
1527 lea rcx,[rbp]
1528 jmp NEAR $L$sqr4x_inner
1529
1530 ALIGN 32
1531 $L$sqr4x_inner:
1532 mov rbx,QWORD[rcx*1+rsi]
1533 mul r15
1534 add r13,rax
1535 mov rax,rbx
1536 mov r12,rdx
1537 adc r12,0
1538 add r13,QWORD[rcx*1+rdi]
1539 adc r12,0
1540
1541 DB 0x67
1542 mul r14
1543 add r11,rax
1544 mov rax,rbx
1545 mov rbx,QWORD[8+rcx*1+rsi]
1546 mov r10,rdx
1547 adc r10,0
1548 add r11,r13
1549 adc r10,0
1550
1551 mul r15
1552 add r12,rax
1553 mov QWORD[rcx*1+rdi],r11
1554 mov rax,rbx
1555 mov r13,rdx
1556 adc r13,0
1557 add r12,QWORD[8+rcx*1+rdi]
1558 lea rcx,[16+rcx]
1559 adc r13,0
1560
1561 mul r14
1562 add r10,rax
1563 mov rax,rbx
1564 adc rdx,0
1565 add r10,r12
1566 mov r11,rdx
1567 adc r11,0
1568 mov QWORD[((-8))+rcx*1+rdi],r10
1569
1570 cmp rcx,0
1571 jne NEAR $L$sqr4x_inner
1572
1573 DB 0x67
1574 mul r15
1575 add r13,rax
1576 adc rdx,0
1577 add r13,r11
1578 adc rdx,0
1579
1580 mov QWORD[rdi],r13
1581 mov r12,rdx
1582 mov QWORD[8+rdi],rdx
1583
1584 add rbp,16
1585 jnz NEAR $L$sqr4x_outer
1586
1587
1588 mov r14,QWORD[((-32))+rsi]
1589 lea rdi,[((48+8))+r9*2+rsp]
1590 mov rax,QWORD[((-24))+rsi]
1591 lea rdi,[((-32))+rbp*1+rdi]
1592 mov rbx,QWORD[((-16))+rsi]
1593 mov r15,rax
1594
1595 mul r14
1596 add r10,rax
1597 mov rax,rbx
1598 mov r11,rdx
1599 adc r11,0
1600
1601 mul r14
1602 add r11,rax
1603 mov rax,rbx
1604 mov QWORD[((-24))+rdi],r10
1605 mov r10,rdx
1606 adc r10,0
1607 add r11,r13
1608 mov rbx,QWORD[((-8))+rsi]
1609 adc r10,0
1610
1611 mul r15
1612 add r12,rax
1613 mov rax,rbx
1614 mov QWORD[((-16))+rdi],r11
1615 mov r13,rdx
1616 adc r13,0
1617
1618 mul r14
1619 add r10,rax
1620 mov rax,rbx
1621 mov r11,rdx
1622 adc r11,0
1623 add r10,r12
1624 adc r11,0
1625 mov QWORD[((-8))+rdi],r10
1626
1627 mul r15
1628 add r13,rax
1629 mov rax,QWORD[((-16))+rsi]
1630 adc rdx,0
1631 add r13,r11
1632 adc rdx,0
1633
1634 mov QWORD[rdi],r13
1635 mov r12,rdx
1636 mov QWORD[8+rdi],rdx
1637
1638 mul rbx
1639 add rbp,16
1640 xor r14,r14
1641 sub rbp,r9
1642 xor r15,r15
1643
1644 add rax,r12
1645 adc rdx,0
1646 mov QWORD[8+rdi],rax
1647 mov QWORD[16+rdi],rdx
1648 mov QWORD[24+rdi],r15
1649
1650 mov rax,QWORD[((-16))+rbp*1+rsi]
1651 lea rdi,[((48+8))+rsp]
1652 xor r10,r10
1653 mov r11,QWORD[8+rdi]
1654
1655 lea r12,[r10*2+r14]
1656 shr r10,63
1657 lea r13,[r11*2+rcx]
1658 shr r11,63
1659 or r13,r10
1660 mov r10,QWORD[16+rdi]
1661 mov r14,r11
1662 mul rax
1663 neg r15
1664 mov r11,QWORD[24+rdi]
1665 adc r12,rax
1666 mov rax,QWORD[((-8))+rbp*1+rsi]
1667 mov QWORD[rdi],r12
1668 adc r13,rdx
1669
1670 lea rbx,[r10*2+r14]
1671 mov QWORD[8+rdi],r13
1672 sbb r15,r15
1673 shr r10,63
1674 lea r8,[r11*2+rcx]
1675 shr r11,63
1676 or r8,r10
1677 mov r10,QWORD[32+rdi]
1678 mov r14,r11
1679 mul rax
1680 neg r15
1681 mov r11,QWORD[40+rdi]
1682 adc rbx,rax
1683 mov rax,QWORD[rbp*1+rsi]
1684 mov QWORD[16+rdi],rbx
1685 adc r8,rdx
1686 lea rbp,[16+rbp]
1687 mov QWORD[24+rdi],r8
1688 sbb r15,r15
1689 lea rdi,[64+rdi]
1690 jmp NEAR $L$sqr4x_shift_n_add
1691
1692 ALIGN 32
1693 $L$sqr4x_shift_n_add:
1694 lea r12,[r10*2+r14]
1695 shr r10,63
1696 lea r13,[r11*2+rcx]
1697 shr r11,63
1698 or r13,r10
1699 mov r10,QWORD[((-16))+rdi]
1700 mov r14,r11
1701 mul rax
1702 neg r15
1703 mov r11,QWORD[((-8))+rdi]
1704 adc r12,rax
1705 mov rax,QWORD[((-8))+rbp*1+rsi]
1706 mov QWORD[((-32))+rdi],r12
1707 adc r13,rdx
1708
1709 lea rbx,[r10*2+r14]
1710 mov QWORD[((-24))+rdi],r13
1711 sbb r15,r15
1712 shr r10,63
1713 lea r8,[r11*2+rcx]
1714 shr r11,63
1715 or r8,r10
1716 mov r10,QWORD[rdi]
1717 mov r14,r11
1718 mul rax
1719 neg r15
1720 mov r11,QWORD[8+rdi]
1721 adc rbx,rax
1722 mov rax,QWORD[rbp*1+rsi]
1723 mov QWORD[((-16))+rdi],rbx
1724 adc r8,rdx
1725
1726 lea r12,[r10*2+r14]
1727 mov QWORD[((-8))+rdi],r8
1728 sbb r15,r15
1729 shr r10,63
1730 lea r13,[r11*2+rcx]
1731 shr r11,63
1732 or r13,r10
1733 mov r10,QWORD[16+rdi]
1734 mov r14,r11
1735 mul rax
1736 neg r15
1737 mov r11,QWORD[24+rdi]
1738 adc r12,rax
1739 mov rax,QWORD[8+rbp*1+rsi]
1740 mov QWORD[rdi],r12
1741 adc r13,rdx
1742
1743 lea rbx,[r10*2+r14]
1744 mov QWORD[8+rdi],r13
1745 sbb r15,r15
1746 shr r10,63
1747 lea r8,[r11*2+rcx]
1748 shr r11,63
1749 or r8,r10
1750 mov r10,QWORD[32+rdi]
1751 mov r14,r11
1752 mul rax
1753 neg r15
1754 mov r11,QWORD[40+rdi]
1755 adc rbx,rax
1756 mov rax,QWORD[16+rbp*1+rsi]
1757 mov QWORD[16+rdi],rbx
1758 adc r8,rdx
1759 mov QWORD[24+rdi],r8
1760 sbb r15,r15
1761 lea rdi,[64+rdi]
1762 add rbp,32
1763 jnz NEAR $L$sqr4x_shift_n_add
1764
1765 lea r12,[r10*2+r14]
1766 DB 0x67
1767 shr r10,63
1768 lea r13,[r11*2+rcx]
1769 shr r11,63
1770 or r13,r10
1771 mov r10,QWORD[((-16))+rdi]
1772 mov r14,r11
1773 mul rax
1774 neg r15
1775 mov r11,QWORD[((-8))+rdi]
1776 adc r12,rax
1777 mov rax,QWORD[((-8))+rsi]
1778 mov QWORD[((-32))+rdi],r12
1779 adc r13,rdx
1780
1781 lea rbx,[r10*2+r14]
1782 mov QWORD[((-24))+rdi],r13
1783 sbb r15,r15
1784 shr r10,63
1785 lea r8,[r11*2+rcx]
1786 shr r11,63
1787 or r8,r10
1788 mul rax
1789 neg r15
1790 adc rbx,rax
1791 adc r8,rdx
1792 mov QWORD[((-16))+rdi],rbx
1793 mov QWORD[((-8))+rdi],r8
1794 DB 102,72,15,126,213
1795 __bn_sqr8x_reduction:
1796 xor rax,rax
1797 lea rcx,[rbp*1+r9]
1798 lea rdx,[((48+8))+r9*2+rsp]
1799 mov QWORD[((0+8))+rsp],rcx
1800 lea rdi,[((48+8))+r9*1+rsp]
1801 mov QWORD[((8+8))+rsp],rdx
1802 neg r9
1803 jmp NEAR $L$8x_reduction_loop
1804
1805 ALIGN 32
1806 $L$8x_reduction_loop:
1807 lea rdi,[r9*1+rdi]
1808 DB 0x66
1809 mov rbx,QWORD[rdi]
1810 mov r9,QWORD[8+rdi]
1811 mov r10,QWORD[16+rdi]
1812 mov r11,QWORD[24+rdi]
1813 mov r12,QWORD[32+rdi]
1814 mov r13,QWORD[40+rdi]
1815 mov r14,QWORD[48+rdi]
1816 mov r15,QWORD[56+rdi]
1817 mov QWORD[rdx],rax
1818 lea rdi,[64+rdi]
1819
1820 DB 0x67
1821 mov r8,rbx
1822 imul rbx,QWORD[((32+8))+rsp]
1823 mov rax,QWORD[rbp]
1824 mov ecx,8
1825 jmp NEAR $L$8x_reduce
1826
1827 ALIGN 32
1828 $L$8x_reduce:
1829 mul rbx
1830 mov rax,QWORD[8+rbp]
1831 neg r8
1832 mov r8,rdx
1833 adc r8,0
1834
1835 mul rbx
1836 add r9,rax
1837 mov rax,QWORD[16+rbp]
1838 adc rdx,0
1839 add r8,r9
1840 mov QWORD[((48-8+8))+rcx*8+rsp],rbx
1841 mov r9,rdx
1842 adc r9,0
1843
1844 mul rbx
1845 add r10,rax
1846 mov rax,QWORD[24+rbp]
1847 adc rdx,0
1848 add r9,r10
1849 mov rsi,QWORD[((32+8))+rsp]
1850 mov r10,rdx
1851 adc r10,0
1852
1853 mul rbx
1854 add r11,rax
1855 mov rax,QWORD[32+rbp]
1856 adc rdx,0
1857 imul rsi,r8
1858 add r10,r11
1859 mov r11,rdx
1860 adc r11,0
1861
1862 mul rbx
1863 add r12,rax
1864 mov rax,QWORD[40+rbp]
1865 adc rdx,0
1866 add r11,r12
1867 mov r12,rdx
1868 adc r12,0
1869
1870 mul rbx
1871 add r13,rax
1872 mov rax,QWORD[48+rbp]
1873 adc rdx,0
1874 add r12,r13
1875 mov r13,rdx
1876 adc r13,0
1877
1878 mul rbx
1879 add r14,rax
1880 mov rax,QWORD[56+rbp]
1881 adc rdx,0
1882 add r13,r14
1883 mov r14,rdx
1884 adc r14,0
1885
1886 mul rbx
1887 mov rbx,rsi
1888 add r15,rax
1889 mov rax,QWORD[rbp]
1890 adc rdx,0
1891 add r14,r15
1892 mov r15,rdx
1893 adc r15,0
1894
1895 dec ecx
1896 jnz NEAR $L$8x_reduce
1897
1898 lea rbp,[64+rbp]
1899 xor rax,rax
1900 mov rdx,QWORD[((8+8))+rsp]
1901 cmp rbp,QWORD[((0+8))+rsp]
1902 jae NEAR $L$8x_no_tail
1903
1904 DB 0x66
1905 add r8,QWORD[rdi]
1906 adc r9,QWORD[8+rdi]
1907 adc r10,QWORD[16+rdi]
1908 adc r11,QWORD[24+rdi]
1909 adc r12,QWORD[32+rdi]
1910 adc r13,QWORD[40+rdi]
1911 adc r14,QWORD[48+rdi]
1912 adc r15,QWORD[56+rdi]
1913 sbb rsi,rsi
1914
1915 mov rbx,QWORD[((48+56+8))+rsp]
1916 mov ecx,8
1917 mov rax,QWORD[rbp]
1918 jmp NEAR $L$8x_tail
1919
1920 ALIGN 32
1921 $L$8x_tail:
1922 mul rbx
1923 add r8,rax
1924 mov rax,QWORD[8+rbp]
1925 mov QWORD[rdi],r8
1926 mov r8,rdx
1927 adc r8,0
1928
1929 mul rbx
1930 add r9,rax
1931 mov rax,QWORD[16+rbp]
1932 adc rdx,0
1933 add r8,r9
1934 lea rdi,[8+rdi]
1935 mov r9,rdx
1936 adc r9,0
1937
1938 mul rbx
1939 add r10,rax
1940 mov rax,QWORD[24+rbp]
1941 adc rdx,0
1942 add r9,r10
1943 mov r10,rdx
1944 adc r10,0
1945
1946 mul rbx
1947 add r11,rax
1948 mov rax,QWORD[32+rbp]
1949 adc rdx,0
1950 add r10,r11
1951 mov r11,rdx
1952 adc r11,0
1953
1954 mul rbx
1955 add r12,rax
1956 mov rax,QWORD[40+rbp]
1957 adc rdx,0
1958 add r11,r12
1959 mov r12,rdx
1960 adc r12,0
1961
1962 mul rbx
1963 add r13,rax
1964 mov rax,QWORD[48+rbp]
1965 adc rdx,0
1966 add r12,r13
1967 mov r13,rdx
1968 adc r13,0
1969
1970 mul rbx
1971 add r14,rax
1972 mov rax,QWORD[56+rbp]
1973 adc rdx,0
1974 add r13,r14
1975 mov r14,rdx
1976 adc r14,0
1977
1978 mul rbx
1979 mov rbx,QWORD[((48-16+8))+rcx*8+rsp]
1980 add r15,rax
1981 adc rdx,0
1982 add r14,r15
1983 mov rax,QWORD[rbp]
1984 mov r15,rdx
1985 adc r15,0
1986
1987 dec ecx
1988 jnz NEAR $L$8x_tail
1989
1990 lea rbp,[64+rbp]
1991 mov rdx,QWORD[((8+8))+rsp]
1992 cmp rbp,QWORD[((0+8))+rsp]
1993 jae NEAR $L$8x_tail_done
1994
1995 mov rbx,QWORD[((48+56+8))+rsp]
1996 neg rsi
1997 mov rax,QWORD[rbp]
1998 adc r8,QWORD[rdi]
1999 adc r9,QWORD[8+rdi]
2000 adc r10,QWORD[16+rdi]
2001 adc r11,QWORD[24+rdi]
2002 adc r12,QWORD[32+rdi]
2003 adc r13,QWORD[40+rdi]
2004 adc r14,QWORD[48+rdi]
2005 adc r15,QWORD[56+rdi]
2006 sbb rsi,rsi
2007
2008 mov ecx,8
2009 jmp NEAR $L$8x_tail
2010
2011 ALIGN 32
2012 $L$8x_tail_done:
2013 xor rax,rax
2014 add r8,QWORD[rdx]
2015 adc r9,0
2016 adc r10,0
2017 adc r11,0
2018 adc r12,0
2019 adc r13,0
2020 adc r14,0
2021 adc r15,0
2022 adc rax,0
2023
2024 neg rsi
2025 $L$8x_no_tail:
2026 adc r8,QWORD[rdi]
2027 adc r9,QWORD[8+rdi]
2028 adc r10,QWORD[16+rdi]
2029 adc r11,QWORD[24+rdi]
2030 adc r12,QWORD[32+rdi]
2031 adc r13,QWORD[40+rdi]
2032 adc r14,QWORD[48+rdi]
2033 adc r15,QWORD[56+rdi]
2034 adc rax,0
2035 mov rcx,QWORD[((-8))+rbp]
2036 xor rsi,rsi
2037
2038 DB 102,72,15,126,213
2039
2040 mov QWORD[rdi],r8
2041 mov QWORD[8+rdi],r9
2042 DB 102,73,15,126,217
2043 mov QWORD[16+rdi],r10
2044 mov QWORD[24+rdi],r11
2045 mov QWORD[32+rdi],r12
2046 mov QWORD[40+rdi],r13
2047 mov QWORD[48+rdi],r14
2048 mov QWORD[56+rdi],r15
2049 lea rdi,[64+rdi]
2050
2051 cmp rdi,rdx
2052 jb NEAR $L$8x_reduction_loop
2053 DB 0F3h,0C3h ;repret
2054
2055
2056
2057 ALIGN 32
2058 __bn_post4x_internal:
2059
2060 mov r12,QWORD[rbp]
2061 lea rbx,[r9*1+rdi]
2062 mov rcx,r9
2063 DB 102,72,15,126,207
2064 neg rax
2065 DB 102,72,15,126,206
2066 sar rcx,3+2
2067 dec r12
2068 xor r10,r10
2069 mov r13,QWORD[8+rbp]
2070 mov r14,QWORD[16+rbp]
2071 mov r15,QWORD[24+rbp]
2072 jmp NEAR $L$sqr4x_sub_entry
2073
2074 ALIGN 16
2075 $L$sqr4x_sub:
2076 mov r12,QWORD[rbp]
2077 mov r13,QWORD[8+rbp]
2078 mov r14,QWORD[16+rbp]
2079 mov r15,QWORD[24+rbp]
2080 $L$sqr4x_sub_entry:
2081 lea rbp,[32+rbp]
2082 not r12
2083 not r13
2084 not r14
2085 not r15
2086 and r12,rax
2087 and r13,rax
2088 and r14,rax
2089 and r15,rax
2090
2091 neg r10
2092 adc r12,QWORD[rbx]
2093 adc r13,QWORD[8+rbx]
2094 adc r14,QWORD[16+rbx]
2095 adc r15,QWORD[24+rbx]
2096 mov QWORD[rdi],r12
2097 lea rbx,[32+rbx]
2098 mov QWORD[8+rdi],r13
2099 sbb r10,r10
2100 mov QWORD[16+rdi],r14
2101 mov QWORD[24+rdi],r15
2102 lea rdi,[32+rdi]
2103
2104 inc rcx
2105 jnz NEAR $L$sqr4x_sub
2106
2107 mov r10,r9
2108 neg r9
2109 DB 0F3h,0C3h ;repret
2110
2111
2112
2113 ALIGN 32
2114 bn_mulx4x_mont_gather5:
2115 mov QWORD[8+rsp],rdi ;WIN64 prologue
2116 mov QWORD[16+rsp],rsi
2117 mov rax,rsp
2118 $L$SEH_begin_bn_mulx4x_mont_gather5:
2119 mov rdi,rcx
2120 mov rsi,rdx
2121 mov rdx,r8
2122 mov rcx,r9
2123 mov r8,QWORD[40+rsp]
2124 mov r9,QWORD[48+rsp]
2125
2126
2127
2128 mov rax,rsp
2129
2130 $L$mulx4x_enter:
2131 push rbx
2132
2133 push rbp
2134
2135 push r12
2136
2137 push r13
2138
2139 push r14
2140
2141 push r15
2142
2143 $L$mulx4x_prologue:
2144
2145 shl r9d,3
2146 lea r10,[r9*2+r9]
2147 neg r9
2148 mov r8,QWORD[r8]
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159 lea r11,[((-320))+r9*2+rsp]
2160 mov rbp,rsp
2161 sub r11,rdi
2162 and r11,4095
2163 cmp r10,r11
2164 jb NEAR $L$mulx4xsp_alt
2165 sub rbp,r11
2166 lea rbp,[((-320))+r9*2+rbp]
2167 jmp NEAR $L$mulx4xsp_done
2168
2169 $L$mulx4xsp_alt:
2170 lea r10,[((4096-320))+r9*2]
2171 lea rbp,[((-320))+r9*2+rbp]
2172 sub r11,r10
2173 mov r10,0
2174 cmovc r11,r10
2175 sub rbp,r11
2176 $L$mulx4xsp_done:
2177 and rbp,-64
2178 mov r11,rsp
2179 sub r11,rbp
2180 and r11,-4096
2181 lea rsp,[rbp*1+r11]
2182 mov r10,QWORD[rsp]
2183 cmp rsp,rbp
2184 ja NEAR $L$mulx4x_page_walk
2185 jmp NEAR $L$mulx4x_page_walk_done
2186
2187 $L$mulx4x_page_walk:
2188 lea rsp,[((-4096))+rsp]
2189 mov r10,QWORD[rsp]
2190 cmp rsp,rbp
2191 ja NEAR $L$mulx4x_page_walk
2192 $L$mulx4x_page_walk_done:
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206 mov QWORD[32+rsp],r8
2207 mov QWORD[40+rsp],rax
2208
2209 $L$mulx4x_body:
2210 call mulx4x_internal
2211
2212 mov rsi,QWORD[40+rsp]
2213
2214 mov rax,1
2215
2216 mov r15,QWORD[((-48))+rsi]
2217
2218 mov r14,QWORD[((-40))+rsi]
2219
2220 mov r13,QWORD[((-32))+rsi]
2221
2222 mov r12,QWORD[((-24))+rsi]
2223
2224 mov rbp,QWORD[((-16))+rsi]
2225
2226 mov rbx,QWORD[((-8))+rsi]
2227
2228 lea rsp,[rsi]
2229
2230 $L$mulx4x_epilogue:
2231 mov rdi,QWORD[8+rsp] ;WIN64 epilogue
2232 mov rsi,QWORD[16+rsp]
2233 DB 0F3h,0C3h ;repret
2234
2235 $L$SEH_end_bn_mulx4x_mont_gather5:
2236
2237
2238 ALIGN 32
2239 mulx4x_internal:
2240
2241 mov QWORD[8+rsp],r9
2242 mov r10,r9
2243 neg r9
2244 shl r9,5
2245 neg r10
2246 lea r13,[128+r9*1+rdx]
2247 shr r9,5+5
2248 movd xmm5,DWORD[56+rax]
2249 sub r9,1
2250 lea rax,[$L$inc]
2251 mov QWORD[((16+8))+rsp],r13
2252 mov QWORD[((24+8))+rsp],r9
2253 mov QWORD[((56+8))+rsp],rdi
2254 movdqa xmm0,XMMWORD[rax]
2255 movdqa xmm1,XMMWORD[16+rax]
2256 lea r10,[((88-112))+r10*1+rsp]
2257 lea rdi,[128+rdx]
2258
2259 pshufd xmm5,xmm5,0
2260 movdqa xmm4,xmm1
2261 DB 0x67
2262 movdqa xmm2,xmm1
2263 DB 0x67
2264 paddd xmm1,xmm0
2265 pcmpeqd xmm0,xmm5
2266 movdqa xmm3,xmm4
2267 paddd xmm2,xmm1
2268 pcmpeqd xmm1,xmm5
2269 movdqa XMMWORD[112+r10],xmm0
2270 movdqa xmm0,xmm4
2271
2272 paddd xmm3,xmm2
2273 pcmpeqd xmm2,xmm5
2274 movdqa XMMWORD[128+r10],xmm1
2275 movdqa xmm1,xmm4
2276
2277 paddd xmm0,xmm3
2278 pcmpeqd xmm3,xmm5
2279 movdqa XMMWORD[144+r10],xmm2
2280 movdqa xmm2,xmm4
2281
2282 paddd xmm1,xmm0
2283 pcmpeqd xmm0,xmm5
2284 movdqa XMMWORD[160+r10],xmm3
2285 movdqa xmm3,xmm4
2286 paddd xmm2,xmm1
2287 pcmpeqd xmm1,xmm5
2288 movdqa XMMWORD[176+r10],xmm0
2289 movdqa xmm0,xmm4
2290
2291 paddd xmm3,xmm2
2292 pcmpeqd xmm2,xmm5
2293 movdqa XMMWORD[192+r10],xmm1
2294 movdqa xmm1,xmm4
2295
2296 paddd xmm0,xmm3
2297 pcmpeqd xmm3,xmm5
2298 movdqa XMMWORD[208+r10],xmm2
2299 movdqa xmm2,xmm4
2300
2301 paddd xmm1,xmm0
2302 pcmpeqd xmm0,xmm5
2303 movdqa XMMWORD[224+r10],xmm3
2304 movdqa xmm3,xmm4
2305 paddd xmm2,xmm1
2306 pcmpeqd xmm1,xmm5
2307 movdqa XMMWORD[240+r10],xmm0
2308 movdqa xmm0,xmm4
2309
2310 paddd xmm3,xmm2
2311 pcmpeqd xmm2,xmm5
2312 movdqa XMMWORD[256+r10],xmm1
2313 movdqa xmm1,xmm4
2314
2315 paddd xmm0,xmm3
2316 pcmpeqd xmm3,xmm5
2317 movdqa XMMWORD[272+r10],xmm2
2318 movdqa xmm2,xmm4
2319
2320 paddd xmm1,xmm0
2321 pcmpeqd xmm0,xmm5
2322 movdqa XMMWORD[288+r10],xmm3
2323 movdqa xmm3,xmm4
2324 DB 0x67
2325 paddd xmm2,xmm1
2326 pcmpeqd xmm1,xmm5
2327 movdqa XMMWORD[304+r10],xmm0
2328
2329 paddd xmm3,xmm2
2330 pcmpeqd xmm2,xmm5
2331 movdqa XMMWORD[320+r10],xmm1
2332
2333 pcmpeqd xmm3,xmm5
2334 movdqa XMMWORD[336+r10],xmm2
2335
2336 pand xmm0,XMMWORD[64+rdi]
2337 pand xmm1,XMMWORD[80+rdi]
2338 pand xmm2,XMMWORD[96+rdi]
2339 movdqa XMMWORD[352+r10],xmm3
2340 pand xmm3,XMMWORD[112+rdi]
2341 por xmm0,xmm2
2342 por xmm1,xmm3
2343 movdqa xmm4,XMMWORD[((-128))+rdi]
2344 movdqa xmm5,XMMWORD[((-112))+rdi]
2345 movdqa xmm2,XMMWORD[((-96))+rdi]
2346 pand xmm4,XMMWORD[112+r10]
2347 movdqa xmm3,XMMWORD[((-80))+rdi]
2348 pand xmm5,XMMWORD[128+r10]
2349 por xmm0,xmm4
2350 pand xmm2,XMMWORD[144+r10]
2351 por xmm1,xmm5
2352 pand xmm3,XMMWORD[160+r10]
2353 por xmm0,xmm2
2354 por xmm1,xmm3
2355 movdqa xmm4,XMMWORD[((-64))+rdi]
2356 movdqa xmm5,XMMWORD[((-48))+rdi]
2357 movdqa xmm2,XMMWORD[((-32))+rdi]
2358 pand xmm4,XMMWORD[176+r10]
2359 movdqa xmm3,XMMWORD[((-16))+rdi]
2360 pand xmm5,XMMWORD[192+r10]
2361 por xmm0,xmm4
2362 pand xmm2,XMMWORD[208+r10]
2363 por xmm1,xmm5
2364 pand xmm3,XMMWORD[224+r10]
2365 por xmm0,xmm2
2366 por xmm1,xmm3
2367 movdqa xmm4,XMMWORD[rdi]
2368 movdqa xmm5,XMMWORD[16+rdi]
2369 movdqa xmm2,XMMWORD[32+rdi]
2370 pand xmm4,XMMWORD[240+r10]
2371 movdqa xmm3,XMMWORD[48+rdi]
2372 pand xmm5,XMMWORD[256+r10]
2373 por xmm0,xmm4
2374 pand xmm2,XMMWORD[272+r10]
2375 por xmm1,xmm5
2376 pand xmm3,XMMWORD[288+r10]
2377 por xmm0,xmm2
2378 por xmm1,xmm3
2379 pxor xmm0,xmm1
2380
2381 pshufd xmm1,xmm0,0x4e
2382 por xmm0,xmm1
2383 lea rdi,[256+rdi]
2384 DB 102,72,15,126,194
2385 lea rbx,[((64+32+8))+rsp]
2386
2387 mov r9,rdx
2388 mulx rax,r8,QWORD[rsi]
2389 mulx r12,r11,QWORD[8+rsi]
2390 add r11,rax
2391 mulx r13,rax,QWORD[16+rsi]
2392 adc r12,rax
2393 adc r13,0
2394 mulx r14,rax,QWORD[24+rsi]
2395
2396 mov r15,r8
2397 imul r8,QWORD[((32+8))+rsp]
2398 xor rbp,rbp
2399 mov rdx,r8
2400
2401 mov QWORD[((8+8))+rsp],rdi
2402
2403 lea rsi,[32+rsi]
2404 adcx r13,rax
2405 adcx r14,rbp
2406
2407 mulx r10,rax,QWORD[rcx]
2408 adcx r15,rax
2409 adox r10,r11
2410 mulx r11,rax,QWORD[8+rcx]
2411 adcx r10,rax
2412 adox r11,r12
2413 mulx r12,rax,QWORD[16+rcx]
2414 mov rdi,QWORD[((24+8))+rsp]
2415 mov QWORD[((-32))+rbx],r10
2416 adcx r11,rax
2417 adox r12,r13
2418 mulx r15,rax,QWORD[24+rcx]
2419 mov rdx,r9
2420 mov QWORD[((-24))+rbx],r11
2421 adcx r12,rax
2422 adox r15,rbp
2423 lea rcx,[32+rcx]
2424 mov QWORD[((-16))+rbx],r12
2425 jmp NEAR $L$mulx4x_1st
2426
2427 ALIGN 32
2428 $L$mulx4x_1st:
2429 adcx r15,rbp
2430 mulx rax,r10,QWORD[rsi]
2431 adcx r10,r14
2432 mulx r14,r11,QWORD[8+rsi]
2433 adcx r11,rax
2434 mulx rax,r12,QWORD[16+rsi]
2435 adcx r12,r14
2436 mulx r14,r13,QWORD[24+rsi]
2437 DB 0x67,0x67
2438 mov rdx,r8
2439 adcx r13,rax
2440 adcx r14,rbp
2441 lea rsi,[32+rsi]
2442 lea rbx,[32+rbx]
2443
2444 adox r10,r15
2445 mulx r15,rax,QWORD[rcx]
2446 adcx r10,rax
2447 adox r11,r15
2448 mulx r15,rax,QWORD[8+rcx]
2449 adcx r11,rax
2450 adox r12,r15
2451 mulx r15,rax,QWORD[16+rcx]
2452 mov QWORD[((-40))+rbx],r10
2453 adcx r12,rax
2454 mov QWORD[((-32))+rbx],r11
2455 adox r13,r15
2456 mulx r15,rax,QWORD[24+rcx]
2457 mov rdx,r9
2458 mov QWORD[((-24))+rbx],r12
2459 adcx r13,rax
2460 adox r15,rbp
2461 lea rcx,[32+rcx]
2462 mov QWORD[((-16))+rbx],r13
2463
2464 dec rdi
2465 jnz NEAR $L$mulx4x_1st
2466
2467 mov rax,QWORD[8+rsp]
2468 adc r15,rbp
2469 lea rsi,[rax*1+rsi]
2470 add r14,r15
2471 mov rdi,QWORD[((8+8))+rsp]
2472 adc rbp,rbp
2473 mov QWORD[((-8))+rbx],r14
2474 jmp NEAR $L$mulx4x_outer
2475
2476 ALIGN 32
2477 $L$mulx4x_outer:
2478 lea r10,[((16-256))+rbx]
2479 pxor xmm4,xmm4
2480 DB 0x67,0x67
2481 pxor xmm5,xmm5
2482 movdqa xmm0,XMMWORD[((-128))+rdi]
2483 movdqa xmm1,XMMWORD[((-112))+rdi]
2484 movdqa xmm2,XMMWORD[((-96))+rdi]
2485 pand xmm0,XMMWORD[256+r10]
2486 movdqa xmm3,XMMWORD[((-80))+rdi]
2487 pand xmm1,XMMWORD[272+r10]
2488 por xmm4,xmm0
2489 pand xmm2,XMMWORD[288+r10]
2490 por xmm5,xmm1
2491 pand xmm3,XMMWORD[304+r10]
2492 por xmm4,xmm2
2493 por xmm5,xmm3
2494 movdqa xmm0,XMMWORD[((-64))+rdi]
2495 movdqa xmm1,XMMWORD[((-48))+rdi]
2496 movdqa xmm2,XMMWORD[((-32))+rdi]
2497 pand xmm0,XMMWORD[320+r10]
2498 movdqa xmm3,XMMWORD[((-16))+rdi]
2499 pand xmm1,XMMWORD[336+r10]
2500 por xmm4,xmm0
2501 pand xmm2,XMMWORD[352+r10]
2502 por xmm5,xmm1
2503 pand xmm3,XMMWORD[368+r10]
2504 por xmm4,xmm2
2505 por xmm5,xmm3
2506 movdqa xmm0,XMMWORD[rdi]
2507 movdqa xmm1,XMMWORD[16+rdi]
2508 movdqa xmm2,XMMWORD[32+rdi]
2509 pand xmm0,XMMWORD[384+r10]
2510 movdqa xmm3,XMMWORD[48+rdi]
2511 pand xmm1,XMMWORD[400+r10]
2512 por xmm4,xmm0
2513 pand xmm2,XMMWORD[416+r10]
2514 por xmm5,xmm1
2515 pand xmm3,XMMWORD[432+r10]
2516 por xmm4,xmm2
2517 por xmm5,xmm3
2518 movdqa xmm0,XMMWORD[64+rdi]
2519 movdqa xmm1,XMMWORD[80+rdi]
2520 movdqa xmm2,XMMWORD[96+rdi]
2521 pand xmm0,XMMWORD[448+r10]
2522 movdqa xmm3,XMMWORD[112+rdi]
2523 pand xmm1,XMMWORD[464+r10]
2524 por xmm4,xmm0
2525 pand xmm2,XMMWORD[480+r10]
2526 por xmm5,xmm1
2527 pand xmm3,XMMWORD[496+r10]
2528 por xmm4,xmm2
2529 por xmm5,xmm3
2530 por xmm4,xmm5
2531
2532 pshufd xmm0,xmm4,0x4e
2533 por xmm0,xmm4
2534 lea rdi,[256+rdi]
2535 DB 102,72,15,126,194
2536
2537 mov QWORD[rbx],rbp
2538 lea rbx,[32+rax*1+rbx]
2539 mulx r11,r8,QWORD[rsi]
2540 xor rbp,rbp
2541 mov r9,rdx
2542 mulx r12,r14,QWORD[8+rsi]
2543 adox r8,QWORD[((-32))+rbx]
2544 adcx r11,r14
2545 mulx r13,r15,QWORD[16+rsi]
2546 adox r11,QWORD[((-24))+rbx]
2547 adcx r12,r15
2548 mulx r14,rdx,QWORD[24+rsi]
2549 adox r12,QWORD[((-16))+rbx]
2550 adcx r13,rdx
2551 lea rcx,[rax*1+rcx]
2552 lea rsi,[32+rsi]
2553 adox r13,QWORD[((-8))+rbx]
2554 adcx r14,rbp
2555 adox r14,rbp
2556
2557 mov r15,r8
2558 imul r8,QWORD[((32+8))+rsp]
2559
2560 mov rdx,r8
2561 xor rbp,rbp
2562 mov QWORD[((8+8))+rsp],rdi
2563
2564 mulx r10,rax,QWORD[rcx]
2565 adcx r15,rax
2566 adox r10,r11
2567 mulx r11,rax,QWORD[8+rcx]
2568 adcx r10,rax
2569 adox r11,r12
2570 mulx r12,rax,QWORD[16+rcx]
2571 adcx r11,rax
2572 adox r12,r13
2573 mulx r15,rax,QWORD[24+rcx]
2574 mov rdx,r9
2575 mov rdi,QWORD[((24+8))+rsp]
2576 mov QWORD[((-32))+rbx],r10
2577 adcx r12,rax
2578 mov QWORD[((-24))+rbx],r11
2579 adox r15,rbp
2580 mov QWORD[((-16))+rbx],r12
2581 lea rcx,[32+rcx]
2582 jmp NEAR $L$mulx4x_inner
2583
2584 ALIGN 32
2585 $L$mulx4x_inner:
2586 mulx rax,r10,QWORD[rsi]
2587 adcx r15,rbp
2588 adox r10,r14
2589 mulx r14,r11,QWORD[8+rsi]
2590 adcx r10,QWORD[rbx]
2591 adox r11,rax
2592 mulx rax,r12,QWORD[16+rsi]
2593 adcx r11,QWORD[8+rbx]
2594 adox r12,r14
2595 mulx r14,r13,QWORD[24+rsi]
2596 mov rdx,r8
2597 adcx r12,QWORD[16+rbx]
2598 adox r13,rax
2599 adcx r13,QWORD[24+rbx]
2600 adox r14,rbp
2601 lea rsi,[32+rsi]
2602 lea rbx,[32+rbx]
2603 adcx r14,rbp
2604
2605 adox r10,r15
2606 mulx r15,rax,QWORD[rcx]
2607 adcx r10,rax
2608 adox r11,r15
2609 mulx r15,rax,QWORD[8+rcx]
2610 adcx r11,rax
2611 adox r12,r15
2612 mulx r15,rax,QWORD[16+rcx]
2613 mov QWORD[((-40))+rbx],r10
2614 adcx r12,rax
2615 adox r13,r15
2616 mov QWORD[((-32))+rbx],r11
2617 mulx r15,rax,QWORD[24+rcx]
2618 mov rdx,r9
2619 lea rcx,[32+rcx]
2620 mov QWORD[((-24))+rbx],r12
2621 adcx r13,rax
2622 adox r15,rbp
2623 mov QWORD[((-16))+rbx],r13
2624
2625 dec rdi
2626 jnz NEAR $L$mulx4x_inner
2627
2628 mov rax,QWORD[((0+8))+rsp]
2629 adc r15,rbp
2630 sub rdi,QWORD[rbx]
2631 mov rdi,QWORD[((8+8))+rsp]
2632 mov r10,QWORD[((16+8))+rsp]
2633 adc r14,r15
2634 lea rsi,[rax*1+rsi]
2635 adc rbp,rbp
2636 mov QWORD[((-8))+rbx],r14
2637
2638 cmp rdi,r10
2639 jb NEAR $L$mulx4x_outer
2640
2641 mov r10,QWORD[((-8))+rcx]
2642 mov r8,rbp
2643 mov r12,QWORD[rax*1+rcx]
2644 lea rbp,[rax*1+rcx]
2645 mov rcx,rax
2646 lea rdi,[rax*1+rbx]
2647 xor eax,eax
2648 xor r15,r15
2649 sub r10,r14
2650 adc r15,r15
2651 or r8,r15
2652 sar rcx,3+2
2653 sub rax,r8
2654 mov rdx,QWORD[((56+8))+rsp]
2655 dec r12
2656 mov r13,QWORD[8+rbp]
2657 xor r8,r8
2658 mov r14,QWORD[16+rbp]
2659 mov r15,QWORD[24+rbp]
2660 jmp NEAR $L$sqrx4x_sub_entry
2661
2662
2663
2664 ALIGN 32
2665 bn_powerx5:
2666 mov QWORD[8+rsp],rdi ;WIN64 prologue
2667 mov QWORD[16+rsp],rsi
2668 mov rax,rsp
2669 $L$SEH_begin_bn_powerx5:
2670 mov rdi,rcx
2671 mov rsi,rdx
2672 mov rdx,r8
2673 mov rcx,r9
2674 mov r8,QWORD[40+rsp]
2675 mov r9,QWORD[48+rsp]
2676
2677
2678
2679 mov rax,rsp
2680
2681 $L$powerx5_enter:
2682 push rbx
2683
2684 push rbp
2685
2686 push r12
2687
2688 push r13
2689
2690 push r14
2691
2692 push r15
2693
2694 $L$powerx5_prologue:
2695
2696 shl r9d,3
2697 lea r10,[r9*2+r9]
2698 neg r9
2699 mov r8,QWORD[r8]
2700
2701
2702
2703
2704
2705
2706
2707
2708 lea r11,[((-320))+r9*2+rsp]
2709 mov rbp,rsp
2710 sub r11,rdi
2711 and r11,4095
2712 cmp r10,r11
2713 jb NEAR $L$pwrx_sp_alt
2714 sub rbp,r11
2715 lea rbp,[((-320))+r9*2+rbp]
2716 jmp NEAR $L$pwrx_sp_done
2717
2718 ALIGN 32
2719 $L$pwrx_sp_alt:
2720 lea r10,[((4096-320))+r9*2]
2721 lea rbp,[((-320))+r9*2+rbp]
2722 sub r11,r10
2723 mov r10,0
2724 cmovc r11,r10
2725 sub rbp,r11
2726 $L$pwrx_sp_done:
2727 and rbp,-64
2728 mov r11,rsp
2729 sub r11,rbp
2730 and r11,-4096
2731 lea rsp,[rbp*1+r11]
2732 mov r10,QWORD[rsp]
2733 cmp rsp,rbp
2734 ja NEAR $L$pwrx_page_walk
2735 jmp NEAR $L$pwrx_page_walk_done
2736
2737 $L$pwrx_page_walk:
2738 lea rsp,[((-4096))+rsp]
2739 mov r10,QWORD[rsp]
2740 cmp rsp,rbp
2741 ja NEAR $L$pwrx_page_walk
2742 $L$pwrx_page_walk_done:
2743
2744 mov r10,r9
2745 neg r9
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758 pxor xmm0,xmm0
2759 DB 102,72,15,110,207
2760 DB 102,72,15,110,209
2761 DB 102,73,15,110,218
2762 DB 102,72,15,110,226
2763 mov QWORD[32+rsp],r8
2764 mov QWORD[40+rsp],rax
2765
2766 $L$powerx5_body:
2767
2768 call __bn_sqrx8x_internal
2769 call __bn_postx4x_internal
2770 call __bn_sqrx8x_internal
2771 call __bn_postx4x_internal
2772 call __bn_sqrx8x_internal
2773 call __bn_postx4x_internal
2774 call __bn_sqrx8x_internal
2775 call __bn_postx4x_internal
2776 call __bn_sqrx8x_internal
2777 call __bn_postx4x_internal
2778
2779 mov r9,r10
2780 mov rdi,rsi
2781 DB 102,72,15,126,209
2782 DB 102,72,15,126,226
2783 mov rax,QWORD[40+rsp]
2784
2785 call mulx4x_internal
2786
2787 mov rsi,QWORD[40+rsp]
2788
2789 mov rax,1
2790
2791 mov r15,QWORD[((-48))+rsi]
2792
2793 mov r14,QWORD[((-40))+rsi]
2794
2795 mov r13,QWORD[((-32))+rsi]
2796
2797 mov r12,QWORD[((-24))+rsi]
2798
2799 mov rbp,QWORD[((-16))+rsi]
2800
2801 mov rbx,QWORD[((-8))+rsi]
2802
2803 lea rsp,[rsi]
2804
2805 $L$powerx5_epilogue:
2806 mov rdi,QWORD[8+rsp] ;WIN64 epilogue
2807 mov rsi,QWORD[16+rsp]
2808 DB 0F3h,0C3h ;repret
2809
2810 $L$SEH_end_bn_powerx5:
2811
2812 global bn_sqrx8x_internal
2813
2814
2815 ALIGN 32
2816 bn_sqrx8x_internal:
2817 __bn_sqrx8x_internal:
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859 lea rdi,[((48+8))+rsp]
2860 lea rbp,[r9*1+rsi]
2861 mov QWORD[((0+8))+rsp],r9
2862 mov QWORD[((8+8))+rsp],rbp
2863 jmp NEAR $L$sqr8x_zero_start
2864
2865 ALIGN 32
2866 DB 0x66,0x66,0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00
2867 $L$sqrx8x_zero:
2868 DB 0x3e
2869 movdqa XMMWORD[rdi],xmm0
2870 movdqa XMMWORD[16+rdi],xmm0
2871 movdqa XMMWORD[32+rdi],xmm0
2872 movdqa XMMWORD[48+rdi],xmm0
2873 $L$sqr8x_zero_start:
2874 movdqa XMMWORD[64+rdi],xmm0
2875 movdqa XMMWORD[80+rdi],xmm0
2876 movdqa XMMWORD[96+rdi],xmm0
2877 movdqa XMMWORD[112+rdi],xmm0
2878 lea rdi,[128+rdi]
2879 sub r9,64
2880 jnz NEAR $L$sqrx8x_zero
2881
2882 mov rdx,QWORD[rsi]
2883
2884 xor r10,r10
2885 xor r11,r11
2886 xor r12,r12
2887 xor r13,r13
2888 xor r14,r14
2889 xor r15,r15
2890 lea rdi,[((48+8))+rsp]
2891 xor rbp,rbp
2892 jmp NEAR $L$sqrx8x_outer_loop
2893
2894 ALIGN 32
2895 $L$sqrx8x_outer_loop:
2896 mulx rax,r8,QWORD[8+rsi]
2897 adcx r8,r9
2898 adox r10,rax
2899 mulx rax,r9,QWORD[16+rsi]
2900 adcx r9,r10
2901 adox r11,rax
2902 DB 0xc4,0xe2,0xab,0xf6,0x86,0x18,0x00,0x00,0x00
2903 adcx r10,r11
2904 adox r12,rax
2905 DB 0xc4,0xe2,0xa3,0xf6,0x86,0x20,0x00,0x00,0x00
2906 adcx r11,r12
2907 adox r13,rax
2908 mulx rax,r12,QWORD[40+rsi]
2909 adcx r12,r13
2910 adox r14,rax
2911 mulx rax,r13,QWORD[48+rsi]
2912 adcx r13,r14
2913 adox rax,r15
2914 mulx r15,r14,QWORD[56+rsi]
2915 mov rdx,QWORD[8+rsi]
2916 adcx r14,rax
2917 adox r15,rbp
2918 adc r15,QWORD[64+rdi]
2919 mov QWORD[8+rdi],r8
2920 mov QWORD[16+rdi],r9
2921 sbb rcx,rcx
2922 xor rbp,rbp
2923
2924
2925 mulx rbx,r8,QWORD[16+rsi]
2926 mulx rax,r9,QWORD[24+rsi]
2927 adcx r8,r10
2928 adox r9,rbx
2929 mulx rbx,r10,QWORD[32+rsi]
2930 adcx r9,r11
2931 adox r10,rax
2932 DB 0xc4,0xe2,0xa3,0xf6,0x86,0x28,0x00,0x00,0x00
2933 adcx r10,r12
2934 adox r11,rbx
2935 DB 0xc4,0xe2,0x9b,0xf6,0x9e,0x30,0x00,0x00,0x00
2936 adcx r11,r13
2937 adox r12,r14
2938 DB 0xc4,0x62,0x93,0xf6,0xb6,0x38,0x00,0x00,0x00
2939 mov rdx,QWORD[16+rsi]
2940 adcx r12,rax
2941 adox r13,rbx
2942 adcx r13,r15
2943 adox r14,rbp
2944 adcx r14,rbp
2945
2946 mov QWORD[24+rdi],r8
2947 mov QWORD[32+rdi],r9
2948
2949 mulx rbx,r8,QWORD[24+rsi]
2950 mulx rax,r9,QWORD[32+rsi]
2951 adcx r8,r10
2952 adox r9,rbx
2953 mulx rbx,r10,QWORD[40+rsi]
2954 adcx r9,r11
2955 adox r10,rax
2956 DB 0xc4,0xe2,0xa3,0xf6,0x86,0x30,0x00,0x00,0x00
2957 adcx r10,r12
2958 adox r11,r13
2959 DB 0xc4,0x62,0x9b,0xf6,0xae,0x38,0x00,0x00,0x00
2960 DB 0x3e
2961 mov rdx,QWORD[24+rsi]
2962 adcx r11,rbx
2963 adox r12,rax
2964 adcx r12,r14
2965 mov QWORD[40+rdi],r8
2966 mov QWORD[48+rdi],r9
2967 mulx rax,r8,QWORD[32+rsi]
2968 adox r13,rbp
2969 adcx r13,rbp
2970
2971 mulx rbx,r9,QWORD[40+rsi]
2972 adcx r8,r10
2973 adox r9,rax
2974 mulx rax,r10,QWORD[48+rsi]
2975 adcx r9,r11
2976 adox r10,r12
2977 mulx r12,r11,QWORD[56+rsi]
2978 mov rdx,QWORD[32+rsi]
2979 mov r14,QWORD[40+rsi]
2980 adcx r10,rbx
2981 adox r11,rax
2982 mov r15,QWORD[48+rsi]
2983 adcx r11,r13
2984 adox r12,rbp
2985 adcx r12,rbp
2986
2987 mov QWORD[56+rdi],r8
2988 mov QWORD[64+rdi],r9
2989
2990 mulx rax,r9,r14
2991 mov r8,QWORD[56+rsi]
2992 adcx r9,r10
2993 mulx rbx,r10,r15
2994 adox r10,rax
2995 adcx r10,r11
2996 mulx rax,r11,r8
2997 mov rdx,r14
2998 adox r11,rbx
2999 adcx r11,r12
3000
3001 adcx rax,rbp
3002
3003 mulx rbx,r14,r15
3004 mulx r13,r12,r8
3005 mov rdx,r15
3006 lea rsi,[64+rsi]
3007 adcx r11,r14
3008 adox r12,rbx
3009 adcx r12,rax
3010 adox r13,rbp
3011
3012 DB 0x67,0x67
3013 mulx r14,r8,r8
3014 adcx r13,r8
3015 adcx r14,rbp
3016
3017 cmp rsi,QWORD[((8+8))+rsp]
3018 je NEAR $L$sqrx8x_outer_break
3019
3020 neg rcx
3021 mov rcx,-8
3022 mov r15,rbp
3023 mov r8,QWORD[64+rdi]
3024 adcx r9,QWORD[72+rdi]
3025 adcx r10,QWORD[80+rdi]
3026 adcx r11,QWORD[88+rdi]
3027 adc r12,QWORD[96+rdi]
3028 adc r13,QWORD[104+rdi]
3029 adc r14,QWORD[112+rdi]
3030 adc r15,QWORD[120+rdi]
3031 lea rbp,[rsi]
3032 lea rdi,[128+rdi]
3033 sbb rax,rax
3034
3035 mov rdx,QWORD[((-64))+rsi]
3036 mov QWORD[((16+8))+rsp],rax
3037 mov QWORD[((24+8))+rsp],rdi
3038
3039
3040 xor eax,eax
3041 jmp NEAR $L$sqrx8x_loop
3042
3043 ALIGN 32
3044 $L$sqrx8x_loop:
3045 mov rbx,r8
3046 mulx r8,rax,QWORD[rbp]
3047 adcx rbx,rax
3048 adox r8,r9
3049
3050 mulx r9,rax,QWORD[8+rbp]
3051 adcx r8,rax
3052 adox r9,r10
3053
3054 mulx r10,rax,QWORD[16+rbp]
3055 adcx r9,rax
3056 adox r10,r11
3057
3058 mulx r11,rax,QWORD[24+rbp]
3059 adcx r10,rax
3060 adox r11,r12
3061
3062 DB 0xc4,0x62,0xfb,0xf6,0xa5,0x20,0x00,0x00,0x00
3063 adcx r11,rax
3064 adox r12,r13
3065
3066 mulx r13,rax,QWORD[40+rbp]
3067 adcx r12,rax
3068 adox r13,r14
3069
3070 mulx r14,rax,QWORD[48+rbp]
3071 mov QWORD[rcx*8+rdi],rbx
3072 mov ebx,0
3073 adcx r13,rax
3074 adox r14,r15
3075
3076 DB 0xc4,0x62,0xfb,0xf6,0xbd,0x38,0x00,0x00,0x00
3077 mov rdx,QWORD[8+rcx*8+rsi]
3078 adcx r14,rax
3079 adox r15,rbx
3080 adcx r15,rbx
3081
3082 DB 0x67
3083 inc rcx
3084 jnz NEAR $L$sqrx8x_loop
3085
3086 lea rbp,[64+rbp]
3087 mov rcx,-8
3088 cmp rbp,QWORD[((8+8))+rsp]
3089 je NEAR $L$sqrx8x_break
3090
3091 sub rbx,QWORD[((16+8))+rsp]
3092 DB 0x66
3093 mov rdx,QWORD[((-64))+rsi]
3094 adcx r8,QWORD[rdi]
3095 adcx r9,QWORD[8+rdi]
3096 adc r10,QWORD[16+rdi]
3097 adc r11,QWORD[24+rdi]
3098 adc r12,QWORD[32+rdi]
3099 adc r13,QWORD[40+rdi]
3100 adc r14,QWORD[48+rdi]
3101 adc r15,QWORD[56+rdi]
3102 lea rdi,[64+rdi]
3103 DB 0x67
3104 sbb rax,rax
3105 xor ebx,ebx
3106 mov QWORD[((16+8))+rsp],rax
3107 jmp NEAR $L$sqrx8x_loop
3108
3109 ALIGN 32
3110 $L$sqrx8x_break:
3111 xor rbp,rbp
3112 sub rbx,QWORD[((16+8))+rsp]
3113 adcx r8,rbp
3114 mov rcx,QWORD[((24+8))+rsp]
3115 adcx r9,rbp
3116 mov rdx,QWORD[rsi]
3117 adc r10,0
3118 mov QWORD[rdi],r8
3119 adc r11,0
3120 adc r12,0
3121 adc r13,0
3122 adc r14,0
3123 adc r15,0
3124 cmp rdi,rcx
3125 je NEAR $L$sqrx8x_outer_loop
3126
3127 mov QWORD[8+rdi],r9
3128 mov r9,QWORD[8+rcx]
3129 mov QWORD[16+rdi],r10
3130 mov r10,QWORD[16+rcx]
3131 mov QWORD[24+rdi],r11
3132 mov r11,QWORD[24+rcx]
3133 mov QWORD[32+rdi],r12
3134 mov r12,QWORD[32+rcx]
3135 mov QWORD[40+rdi],r13
3136 mov r13,QWORD[40+rcx]
3137 mov QWORD[48+rdi],r14
3138 mov r14,QWORD[48+rcx]
3139 mov QWORD[56+rdi],r15
3140 mov r15,QWORD[56+rcx]
3141 mov rdi,rcx
3142 jmp NEAR $L$sqrx8x_outer_loop
3143
3144 ALIGN 32
3145 $L$sqrx8x_outer_break:
3146 mov QWORD[72+rdi],r9
3147 DB 102,72,15,126,217
3148 mov QWORD[80+rdi],r10
3149 mov QWORD[88+rdi],r11
3150 mov QWORD[96+rdi],r12
3151 mov QWORD[104+rdi],r13
3152 mov QWORD[112+rdi],r14
3153 lea rdi,[((48+8))+rsp]
3154 mov rdx,QWORD[rcx*1+rsi]
3155
3156 mov r11,QWORD[8+rdi]
3157 xor r10,r10
3158 mov r9,QWORD[((0+8))+rsp]
3159 adox r11,r11
3160 mov r12,QWORD[16+rdi]
3161 mov r13,QWORD[24+rdi]
3162
3163
3164 ALIGN 32
3165 $L$sqrx4x_shift_n_add:
3166 mulx rbx,rax,rdx
3167 adox r12,r12
3168 adcx rax,r10
3169 DB 0x48,0x8b,0x94,0x0e,0x08,0x00,0x00,0x00
3170 DB 0x4c,0x8b,0x97,0x20,0x00,0x00,0x00
3171 adox r13,r13
3172 adcx rbx,r11
3173 mov r11,QWORD[40+rdi]
3174 mov QWORD[rdi],rax
3175 mov QWORD[8+rdi],rbx
3176
3177 mulx rbx,rax,rdx
3178 adox r10,r10
3179 adcx rax,r12
3180 mov rdx,QWORD[16+rcx*1+rsi]
3181 mov r12,QWORD[48+rdi]
3182 adox r11,r11
3183 adcx rbx,r13
3184 mov r13,QWORD[56+rdi]
3185 mov QWORD[16+rdi],rax
3186 mov QWORD[24+rdi],rbx
3187
3188 mulx rbx,rax,rdx
3189 adox r12,r12
3190 adcx rax,r10
3191 mov rdx,QWORD[24+rcx*1+rsi]
3192 lea rcx,[32+rcx]
3193 mov r10,QWORD[64+rdi]
3194 adox r13,r13
3195 adcx rbx,r11
3196 mov r11,QWORD[72+rdi]
3197 mov QWORD[32+rdi],rax
3198 mov QWORD[40+rdi],rbx
3199
3200 mulx rbx,rax,rdx
3201 adox r10,r10
3202 adcx rax,r12
3203 jrcxz $L$sqrx4x_shift_n_add_break
3204 DB 0x48,0x8b,0x94,0x0e,0x00,0x00,0x00,0x00
3205 adox r11,r11
3206 adcx rbx,r13
3207 mov r12,QWORD[80+rdi]
3208 mov r13,QWORD[88+rdi]
3209 mov QWORD[48+rdi],rax
3210 mov QWORD[56+rdi],rbx
3211 lea rdi,[64+rdi]
3212 nop
3213 jmp NEAR $L$sqrx4x_shift_n_add
3214
3215 ALIGN 32
3216 $L$sqrx4x_shift_n_add_break:
3217 adcx rbx,r13
3218 mov QWORD[48+rdi],rax
3219 mov QWORD[56+rdi],rbx
3220 lea rdi,[64+rdi]
3221 DB 102,72,15,126,213
3222 __bn_sqrx8x_reduction:
3223 xor eax,eax
3224 mov rbx,QWORD[((32+8))+rsp]
3225 mov rdx,QWORD[((48+8))+rsp]
3226 lea rcx,[((-64))+r9*1+rbp]
3227
3228 mov QWORD[((0+8))+rsp],rcx
3229 mov QWORD[((8+8))+rsp],rdi
3230
3231 lea rdi,[((48+8))+rsp]
3232 jmp NEAR $L$sqrx8x_reduction_loop
3233
3234 ALIGN 32
3235 $L$sqrx8x_reduction_loop:
3236 mov r9,QWORD[8+rdi]
3237 mov r10,QWORD[16+rdi]
3238 mov r11,QWORD[24+rdi]
3239 mov r12,QWORD[32+rdi]
3240 mov r8,rdx
3241 imul rdx,rbx
3242 mov r13,QWORD[40+rdi]
3243 mov r14,QWORD[48+rdi]
3244 mov r15,QWORD[56+rdi]
3245 mov QWORD[((24+8))+rsp],rax
3246
3247 lea rdi,[64+rdi]
3248 xor rsi,rsi
3249 mov rcx,-8
3250 jmp NEAR $L$sqrx8x_reduce
3251
3252 ALIGN 32
3253 $L$sqrx8x_reduce:
3254 mov rbx,r8
3255 mulx r8,rax,QWORD[rbp]
3256 adcx rax,rbx
3257 adox r8,r9
3258
3259 mulx r9,rbx,QWORD[8+rbp]
3260 adcx r8,rbx
3261 adox r9,r10
3262
3263 mulx r10,rbx,QWORD[16+rbp]
3264 adcx r9,rbx
3265 adox r10,r11
3266
3267 mulx r11,rbx,QWORD[24+rbp]
3268 adcx r10,rbx
3269 adox r11,r12
3270
3271 DB 0xc4,0x62,0xe3,0xf6,0xa5,0x20,0x00,0x00,0x00
3272 mov rax,rdx
3273 mov rdx,r8
3274 adcx r11,rbx
3275 adox r12,r13
3276
3277 mulx rdx,rbx,QWORD[((32+8))+rsp]
3278 mov rdx,rax
3279 mov QWORD[((64+48+8))+rcx*8+rsp],rax
3280
3281 mulx r13,rax,QWORD[40+rbp]
3282 adcx r12,rax
3283 adox r13,r14
3284
3285 mulx r14,rax,QWORD[48+rbp]
3286 adcx r13,rax
3287 adox r14,r15
3288
3289 mulx r15,rax,QWORD[56+rbp]
3290 mov rdx,rbx
3291 adcx r14,rax
3292 adox r15,rsi
3293 adcx r15,rsi
3294
3295 DB 0x67,0x67,0x67
3296 inc rcx
3297 jnz NEAR $L$sqrx8x_reduce
3298
3299 mov rax,rsi
3300 cmp rbp,QWORD[((0+8))+rsp]
3301 jae NEAR $L$sqrx8x_no_tail
3302
3303 mov rdx,QWORD[((48+8))+rsp]
3304 add r8,QWORD[rdi]
3305 lea rbp,[64+rbp]
3306 mov rcx,-8
3307 adcx r9,QWORD[8+rdi]
3308 adcx r10,QWORD[16+rdi]
3309 adc r11,QWORD[24+rdi]
3310 adc r12,QWORD[32+rdi]
3311 adc r13,QWORD[40+rdi]
3312 adc r14,QWORD[48+rdi]
3313 adc r15,QWORD[56+rdi]
3314 lea rdi,[64+rdi]
3315 sbb rax,rax
3316
3317 xor rsi,rsi
3318 mov QWORD[((16+8))+rsp],rax
3319 jmp NEAR $L$sqrx8x_tail
3320
3321 ALIGN 32
3322 $L$sqrx8x_tail:
3323 mov rbx,r8
3324 mulx r8,rax,QWORD[rbp]
3325 adcx rbx,rax
3326 adox r8,r9
3327
3328 mulx r9,rax,QWORD[8+rbp]
3329 adcx r8,rax
3330 adox r9,r10
3331
3332 mulx r10,rax,QWORD[16+rbp]
3333 adcx r9,rax
3334 adox r10,r11
3335
3336 mulx r11,rax,QWORD[24+rbp]
3337 adcx r10,rax
3338 adox r11,r12
3339
3340 DB 0xc4,0x62,0xfb,0xf6,0xa5,0x20,0x00,0x00,0x00
3341 adcx r11,rax
3342 adox r12,r13
3343
3344 mulx r13,rax,QWORD[40+rbp]
3345 adcx r12,rax
3346 adox r13,r14
3347
3348 mulx r14,rax,QWORD[48+rbp]
3349 adcx r13,rax
3350 adox r14,r15
3351
3352 mulx r15,rax,QWORD[56+rbp]
3353 mov rdx,QWORD[((72+48+8))+rcx*8+rsp]
3354 adcx r14,rax
3355 adox r15,rsi
3356 mov QWORD[rcx*8+rdi],rbx
3357 mov rbx,r8
3358 adcx r15,rsi
3359
3360 inc rcx
3361 jnz NEAR $L$sqrx8x_tail
3362
3363 cmp rbp,QWORD[((0+8))+rsp]
3364 jae NEAR $L$sqrx8x_tail_done
3365
3366 sub rsi,QWORD[((16+8))+rsp]
3367 mov rdx,QWORD[((48+8))+rsp]
3368 lea rbp,[64+rbp]
3369 adc r8,QWORD[rdi]
3370 adc r9,QWORD[8+rdi]
3371 adc r10,QWORD[16+rdi]
3372 adc r11,QWORD[24+rdi]
3373 adc r12,QWORD[32+rdi]
3374 adc r13,QWORD[40+rdi]
3375 adc r14,QWORD[48+rdi]
3376 adc r15,QWORD[56+rdi]
3377 lea rdi,[64+rdi]
3378 sbb rax,rax
3379 sub rcx,8
3380
3381 xor rsi,rsi
3382 mov QWORD[((16+8))+rsp],rax
3383 jmp NEAR $L$sqrx8x_tail
3384
3385 ALIGN 32
3386 $L$sqrx8x_tail_done:
3387 xor rax,rax
3388 add r8,QWORD[((24+8))+rsp]
3389 adc r9,0
3390 adc r10,0
3391 adc r11,0
3392 adc r12,0
3393 adc r13,0
3394 adc r14,0
3395 adc r15,0
3396 adc rax,0
3397
3398 sub rsi,QWORD[((16+8))+rsp]
3399 $L$sqrx8x_no_tail:
3400 adc r8,QWORD[rdi]
3401 DB 102,72,15,126,217
3402 adc r9,QWORD[8+rdi]
3403 mov rsi,QWORD[56+rbp]
3404 DB 102,72,15,126,213
3405 adc r10,QWORD[16+rdi]
3406 adc r11,QWORD[24+rdi]
3407 adc r12,QWORD[32+rdi]
3408 adc r13,QWORD[40+rdi]
3409 adc r14,QWORD[48+rdi]
3410 adc r15,QWORD[56+rdi]
3411 adc rax,0
3412
3413 mov rbx,QWORD[((32+8))+rsp]
3414 mov rdx,QWORD[64+rcx*1+rdi]
3415
3416 mov QWORD[rdi],r8
3417 lea r8,[64+rdi]
3418 mov QWORD[8+rdi],r9
3419 mov QWORD[16+rdi],r10
3420 mov QWORD[24+rdi],r11
3421 mov QWORD[32+rdi],r12
3422 mov QWORD[40+rdi],r13
3423 mov QWORD[48+rdi],r14
3424 mov QWORD[56+rdi],r15
3425
3426 lea rdi,[64+rcx*1+rdi]
3427 cmp r8,QWORD[((8+8))+rsp]
3428 jb NEAR $L$sqrx8x_reduction_loop
3429 DB 0F3h,0C3h ;repret
3430
3431
3432 ALIGN 32
3433
3434 __bn_postx4x_internal:
3435
3436 mov r12,QWORD[rbp]
3437 mov r10,rcx
3438 mov r9,rcx
3439 neg rax
3440 sar rcx,3+2
3441
3442 DB 102,72,15,126,202
3443 DB 102,72,15,126,206
3444 dec r12
3445 mov r13,QWORD[8+rbp]
3446 xor r8,r8
3447 mov r14,QWORD[16+rbp]
3448 mov r15,QWORD[24+rbp]
3449 jmp NEAR $L$sqrx4x_sub_entry
3450
3451 ALIGN 16
3452 $L$sqrx4x_sub:
3453 mov r12,QWORD[rbp]
3454 mov r13,QWORD[8+rbp]
3455 mov r14,QWORD[16+rbp]
3456 mov r15,QWORD[24+rbp]
3457 $L$sqrx4x_sub_entry:
3458 andn r12,r12,rax
3459 lea rbp,[32+rbp]
3460 andn r13,r13,rax
3461 andn r14,r14,rax
3462 andn r15,r15,rax
3463
3464 neg r8
3465 adc r12,QWORD[rdi]
3466 adc r13,QWORD[8+rdi]
3467 adc r14,QWORD[16+rdi]
3468 adc r15,QWORD[24+rdi]
3469 mov QWORD[rdx],r12
3470 lea rdi,[32+rdi]
3471 mov QWORD[8+rdx],r13
3472 sbb r8,r8
3473 mov QWORD[16+rdx],r14
3474 mov QWORD[24+rdx],r15
3475 lea rdx,[32+rdx]
3476
3477 inc rcx
3478 jnz NEAR $L$sqrx4x_sub
3479
3480 neg r9
3481
3482 DB 0F3h,0C3h ;repret
3483
3484
3485 global bn_scatter5
3486
3487 ALIGN 16
3488 bn_scatter5:
3489
3490 cmp edx,0
3491 jz NEAR $L$scatter_epilogue
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501 lea r8,[r9*8+r8]
3502 $L$scatter:
3503 mov rax,QWORD[rcx]
3504 lea rcx,[8+rcx]
3505 mov QWORD[r8],rax
3506 lea r8,[256+r8]
3507 sub edx,1
3508 jnz NEAR $L$scatter
3509 $L$scatter_epilogue:
3510 DB 0F3h,0C3h ;repret
3511
3512
3513
3514 global bn_gather5
3515
3516 ALIGN 32
3517 bn_gather5:
3518
3519 $L$SEH_begin_bn_gather5:
3520
3521 DB 0x4c,0x8d,0x14,0x24
3522
3523 DB 0x48,0x81,0xec,0x08,0x01,0x00,0x00
3524 lea rax,[$L$inc]
3525 and rsp,-16
3526
3527 movd xmm5,r9d
3528 movdqa xmm0,XMMWORD[rax]
3529 movdqa xmm1,XMMWORD[16+rax]
3530 lea r11,[128+r8]
3531 lea rax,[128+rsp]
3532
3533 pshufd xmm5,xmm5,0
3534 movdqa xmm4,xmm1
3535 movdqa xmm2,xmm1
3536 paddd xmm1,xmm0
3537 pcmpeqd xmm0,xmm5
3538 movdqa xmm3,xmm4
3539
3540 paddd xmm2,xmm1
3541 pcmpeqd xmm1,xmm5
3542 movdqa XMMWORD[(-128)+rax],xmm0
3543 movdqa xmm0,xmm4
3544
3545 paddd xmm3,xmm2
3546 pcmpeqd xmm2,xmm5
3547 movdqa XMMWORD[(-112)+rax],xmm1
3548 movdqa xmm1,xmm4
3549
3550 paddd xmm0,xmm3
3551 pcmpeqd xmm3,xmm5
3552 movdqa XMMWORD[(-96)+rax],xmm2
3553 movdqa xmm2,xmm4
3554 paddd xmm1,xmm0
3555 pcmpeqd xmm0,xmm5
3556 movdqa XMMWORD[(-80)+rax],xmm3
3557 movdqa xmm3,xmm4
3558
3559 paddd xmm2,xmm1
3560 pcmpeqd xmm1,xmm5
3561 movdqa XMMWORD[(-64)+rax],xmm0
3562 movdqa xmm0,xmm4
3563
3564 paddd xmm3,xmm2
3565 pcmpeqd xmm2,xmm5
3566 movdqa XMMWORD[(-48)+rax],xmm1
3567 movdqa xmm1,xmm4
3568
3569 paddd xmm0,xmm3
3570 pcmpeqd xmm3,xmm5
3571 movdqa XMMWORD[(-32)+rax],xmm2
3572 movdqa xmm2,xmm4
3573 paddd xmm1,xmm0
3574 pcmpeqd xmm0,xmm5
3575 movdqa XMMWORD[(-16)+rax],xmm3
3576 movdqa xmm3,xmm4
3577
3578 paddd xmm2,xmm1
3579 pcmpeqd xmm1,xmm5
3580 movdqa XMMWORD[rax],xmm0
3581 movdqa xmm0,xmm4
3582
3583 paddd xmm3,xmm2
3584 pcmpeqd xmm2,xmm5
3585 movdqa XMMWORD[16+rax],xmm1
3586 movdqa xmm1,xmm4
3587
3588 paddd xmm0,xmm3
3589 pcmpeqd xmm3,xmm5
3590 movdqa XMMWORD[32+rax],xmm2
3591 movdqa xmm2,xmm4
3592 paddd xmm1,xmm0
3593 pcmpeqd xmm0,xmm5
3594 movdqa XMMWORD[48+rax],xmm3
3595 movdqa xmm3,xmm4
3596
3597 paddd xmm2,xmm1
3598 pcmpeqd xmm1,xmm5
3599 movdqa XMMWORD[64+rax],xmm0
3600 movdqa xmm0,xmm4
3601
3602 paddd xmm3,xmm2
3603 pcmpeqd xmm2,xmm5
3604 movdqa XMMWORD[80+rax],xmm1
3605 movdqa xmm1,xmm4
3606
3607 paddd xmm0,xmm3
3608 pcmpeqd xmm3,xmm5
3609 movdqa XMMWORD[96+rax],xmm2
3610 movdqa xmm2,xmm4
3611 movdqa XMMWORD[112+rax],xmm3
3612 jmp NEAR $L$gather
3613
3614 ALIGN 32
3615 $L$gather:
3616 pxor xmm4,xmm4
3617 pxor xmm5,xmm5
3618 movdqa xmm0,XMMWORD[((-128))+r11]
3619 movdqa xmm1,XMMWORD[((-112))+r11]
3620 movdqa xmm2,XMMWORD[((-96))+r11]
3621 pand xmm0,XMMWORD[((-128))+rax]
3622 movdqa xmm3,XMMWORD[((-80))+r11]
3623 pand xmm1,XMMWORD[((-112))+rax]
3624 por xmm4,xmm0
3625 pand xmm2,XMMWORD[((-96))+rax]
3626 por xmm5,xmm1
3627 pand xmm3,XMMWORD[((-80))+rax]
3628 por xmm4,xmm2
3629 por xmm5,xmm3
3630 movdqa xmm0,XMMWORD[((-64))+r11]
3631 movdqa xmm1,XMMWORD[((-48))+r11]
3632 movdqa xmm2,XMMWORD[((-32))+r11]
3633 pand xmm0,XMMWORD[((-64))+rax]
3634 movdqa xmm3,XMMWORD[((-16))+r11]
3635 pand xmm1,XMMWORD[((-48))+rax]
3636 por xmm4,xmm0
3637 pand xmm2,XMMWORD[((-32))+rax]
3638 por xmm5,xmm1
3639 pand xmm3,XMMWORD[((-16))+rax]
3640 por xmm4,xmm2
3641 por xmm5,xmm3
3642 movdqa xmm0,XMMWORD[r11]
3643 movdqa xmm1,XMMWORD[16+r11]
3644 movdqa xmm2,XMMWORD[32+r11]
3645 pand xmm0,XMMWORD[rax]
3646 movdqa xmm3,XMMWORD[48+r11]
3647 pand xmm1,XMMWORD[16+rax]
3648 por xmm4,xmm0
3649 pand xmm2,XMMWORD[32+rax]
3650 por xmm5,xmm1
3651 pand xmm3,XMMWORD[48+rax]
3652 por xmm4,xmm2
3653 por xmm5,xmm3
3654 movdqa xmm0,XMMWORD[64+r11]
3655 movdqa xmm1,XMMWORD[80+r11]
3656 movdqa xmm2,XMMWORD[96+r11]
3657 pand xmm0,XMMWORD[64+rax]
3658 movdqa xmm3,XMMWORD[112+r11]
3659 pand xmm1,XMMWORD[80+rax]
3660 por xmm4,xmm0
3661 pand xmm2,XMMWORD[96+rax]
3662 por xmm5,xmm1
3663 pand xmm3,XMMWORD[112+rax]
3664 por xmm4,xmm2
3665 por xmm5,xmm3
3666 por xmm4,xmm5
3667 lea r11,[256+r11]
3668
3669 pshufd xmm0,xmm4,0x4e
3670 por xmm0,xmm4
3671 movq QWORD[rcx],xmm0
3672 lea rcx,[8+rcx]
3673 sub edx,1
3674 jnz NEAR $L$gather
3675
3676 lea rsp,[r10]
3677
3678 DB 0F3h,0C3h ;repret
3679 $L$SEH_end_bn_gather5:
3680
3681
3682 section .rdata rdata align=8
3683 ALIGN 64
3684 $L$inc:
3685 DD 0,0,1,1
3686 DD 2,2,2,2
3687 DB 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105
3688 DB 112,108,105,99,97,116,105,111,110,32,119,105,116,104,32,115
3689 DB 99,97,116,116,101,114,47,103,97,116,104,101,114,32,102,111
3690 DB 114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79
3691 DB 71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111
3692 DB 112,101,110,115,115,108,46,111,114,103,62,0
3693 section .text
3694
3695 EXTERN __imp_RtlVirtualUnwind
3696
3697 ALIGN 16
3698 mul_handler:
3699 push rsi
3700 push rdi
3701 push rbx
3702 push rbp
3703 push r12
3704 push r13
3705 push r14
3706 push r15
3707 pushfq
3708 sub rsp,64
3709
3710 mov rax,QWORD[120+r8]
3711 mov rbx,QWORD[248+r8]
3712
3713 mov rsi,QWORD[8+r9]
3714 mov r11,QWORD[56+r9]
3715
3716 mov r10d,DWORD[r11]
3717 lea r10,[r10*1+rsi]
3718 cmp rbx,r10
3719 jb NEAR $L$common_seh_tail
3720
3721 mov r10d,DWORD[4+r11]
3722 lea r10,[r10*1+rsi]
3723 cmp rbx,r10
3724 jb NEAR $L$common_pop_regs
3725
3726 mov rax,QWORD[152+r8]
3727
3728 mov r10d,DWORD[8+r11]
3729 lea r10,[r10*1+rsi]
3730 cmp rbx,r10
3731 jae NEAR $L$common_seh_tail
3732
3733 lea r10,[$L$mul_epilogue]
3734 cmp rbx,r10
3735 ja NEAR $L$body_40
3736
3737 mov r10,QWORD[192+r8]
3738 mov rax,QWORD[8+r10*8+rax]
3739
3740 jmp NEAR $L$common_pop_regs
3741
3742 $L$body_40:
3743 mov rax,QWORD[40+rax]
3744 $L$common_pop_regs:
3745 mov rbx,QWORD[((-8))+rax]
3746 mov rbp,QWORD[((-16))+rax]
3747 mov r12,QWORD[((-24))+rax]
3748 mov r13,QWORD[((-32))+rax]
3749 mov r14,QWORD[((-40))+rax]
3750 mov r15,QWORD[((-48))+rax]
3751 mov QWORD[144+r8],rbx
3752 mov QWORD[160+r8],rbp
3753 mov QWORD[216+r8],r12
3754 mov QWORD[224+r8],r13
3755 mov QWORD[232+r8],r14
3756 mov QWORD[240+r8],r15
3757
3758 $L$common_seh_tail:
3759 mov rdi,QWORD[8+rax]
3760 mov rsi,QWORD[16+rax]
3761 mov QWORD[152+r8],rax
3762 mov QWORD[168+r8],rsi
3763 mov QWORD[176+r8],rdi
3764
3765 mov rdi,QWORD[40+r9]
3766 mov rsi,r8
3767 mov ecx,154
3768 DD 0xa548f3fc
3769
3770 mov rsi,r9
3771 xor rcx,rcx
3772 mov rdx,QWORD[8+rsi]
3773 mov r8,QWORD[rsi]
3774 mov r9,QWORD[16+rsi]
3775 mov r10,QWORD[40+rsi]
3776 lea r11,[56+rsi]
3777 lea r12,[24+rsi]
3778 mov QWORD[32+rsp],r10
3779 mov QWORD[40+rsp],r11
3780 mov QWORD[48+rsp],r12
3781 mov QWORD[56+rsp],rcx
3782 call QWORD[__imp_RtlVirtualUnwind]
3783
3784 mov eax,1
3785 add rsp,64
3786 popfq
3787 pop r15
3788 pop r14
3789 pop r13
3790 pop r12
3791 pop rbp
3792 pop rbx
3793 pop rdi
3794 pop rsi
3795 DB 0F3h,0C3h ;repret
3796
3797
3798 section .pdata rdata align=4
3799 ALIGN 4
3800 DD $L$SEH_begin_bn_mul_mont_gather5 wrt ..imagebase
3801 DD $L$SEH_end_bn_mul_mont_gather5 wrt ..imagebase
3802 DD $L$SEH_info_bn_mul_mont_gather5 wrt ..imagebase
3803
3804 DD $L$SEH_begin_bn_mul4x_mont_gather5 wrt ..imagebase
3805 DD $L$SEH_end_bn_mul4x_mont_gather5 wrt ..imagebase
3806 DD $L$SEH_info_bn_mul4x_mont_gather5 wrt ..imagebase
3807
3808 DD $L$SEH_begin_bn_power5 wrt ..imagebase
3809 DD $L$SEH_end_bn_power5 wrt ..imagebase
3810 DD $L$SEH_info_bn_power5 wrt ..imagebase
3811 DD $L$SEH_begin_bn_mulx4x_mont_gather5 wrt ..imagebase
3812 DD $L$SEH_end_bn_mulx4x_mont_gather5 wrt ..imagebase
3813 DD $L$SEH_info_bn_mulx4x_mont_gather5 wrt ..imagebase
3814
3815 DD $L$SEH_begin_bn_powerx5 wrt ..imagebase
3816 DD $L$SEH_end_bn_powerx5 wrt ..imagebase
3817 DD $L$SEH_info_bn_powerx5 wrt ..imagebase
3818 DD $L$SEH_begin_bn_gather5 wrt ..imagebase
3819 DD $L$SEH_end_bn_gather5 wrt ..imagebase
3820 DD $L$SEH_info_bn_gather5 wrt ..imagebase
3821
3822 section .xdata rdata align=8
3823 ALIGN 8
3824 $L$SEH_info_bn_mul_mont_gather5:
3825 DB 9,0,0,0
3826 DD mul_handler wrt ..imagebase
3827 DD $L$mul_body wrt ..imagebase,$L$mul_body wrt ..imagebase,$L$mul_epilogue wrt ..imagebase
3828 ALIGN 8
3829 $L$SEH_info_bn_mul4x_mont_gather5:
3830 DB 9,0,0,0
3831 DD mul_handler wrt ..imagebase
3832 DD $L$mul4x_prologue wrt ..imagebase,$L$mul4x_body wrt ..imagebase,$L$mul4x_epilogue wrt ..imagebase
3833 ALIGN 8
3834 $L$SEH_info_bn_power5:
3835 DB 9,0,0,0
3836 DD mul_handler wrt ..imagebase
3837 DD $L$power5_prologue wrt ..imagebase,$L$power5_body wrt ..imagebase,$L$power5_epilogue wrt ..imagebase
3838 ALIGN 8
3839 $L$SEH_info_bn_mulx4x_mont_gather5:
3840 DB 9,0,0,0
3841 DD mul_handler wrt ..imagebase
3842 DD $L$mulx4x_prologue wrt ..imagebase,$L$mulx4x_body wrt ..imagebase,$L$mulx4x_epilogue wrt ..imagebase
3843 ALIGN 8
3844 $L$SEH_info_bn_powerx5:
3845 DB 9,0,0,0
3846 DD mul_handler wrt ..imagebase
3847 DD $L$powerx5_prologue wrt ..imagebase,$L$powerx5_body wrt ..imagebase,$L$powerx5_epilogue wrt ..imagebase
3848 ALIGN 8
3849 $L$SEH_info_bn_gather5:
3850 DB 0x01,0x0b,0x03,0x0a
3851 DB 0x0b,0x01,0x21,0x00
3852 DB 0x04,0xa3,0x00,0x00
3853 ALIGN 8
3854 %else
3855 ; Work around https://bugzilla.nasm.us/show_bug.cgi?id=3392738
3856 ret
3857 %endif