rsaz-avx2.masm 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984
  1. OPTION DOTNAME
  2. .text$ SEGMENT ALIGN(256) 'CODE'
  3. PUBLIC rsaz_1024_sqr_avx2
  4. ALIGN 64
  5. rsaz_1024_sqr_avx2 PROC PUBLIC
  6. mov QWORD PTR[8+rsp],rdi ;WIN64 prologue
  7. mov QWORD PTR[16+rsp],rsi
  8. mov rax,rsp
  9. $L$SEH_begin_rsaz_1024_sqr_avx2::
  10. mov rdi,rcx
  11. mov rsi,rdx
  12. mov rdx,r8
  13. mov rcx,r9
  14. mov r8,QWORD PTR[40+rsp]
  15. lea rax,QWORD PTR[rsp]
  16. push rbx
  17. push rbp
  18. push r12
  19. push r13
  20. push r14
  21. push r15
  22. vzeroupper
  23. lea rsp,QWORD PTR[((-168))+rsp]
  24. vmovaps XMMWORD PTR[(-216)+rax],xmm6
  25. vmovaps XMMWORD PTR[(-200)+rax],xmm7
  26. vmovaps XMMWORD PTR[(-184)+rax],xmm8
  27. vmovaps XMMWORD PTR[(-168)+rax],xmm9
  28. vmovaps XMMWORD PTR[(-152)+rax],xmm10
  29. vmovaps XMMWORD PTR[(-136)+rax],xmm11
  30. vmovaps XMMWORD PTR[(-120)+rax],xmm12
  31. vmovaps XMMWORD PTR[(-104)+rax],xmm13
  32. vmovaps XMMWORD PTR[(-88)+rax],xmm14
  33. vmovaps XMMWORD PTR[(-72)+rax],xmm15
  34. $L$sqr_1024_body::
  35. mov rbp,rax
  36. mov r13,rdx
  37. sub rsp,832
  38. mov r15,r13
  39. sub rdi,-128
  40. sub rsi,-128
  41. sub r13,-128
  42. and r15,4095
  43. add r15,32*10
  44. shr r15,12
  45. vpxor ymm9,ymm9,ymm9
  46. jz $L$sqr_1024_no_n_copy
  47. sub rsp,32*10
  48. vmovdqu ymm0,YMMWORD PTR[((0-128))+r13]
  49. and rsp,-2048
  50. vmovdqu ymm1,YMMWORD PTR[((32-128))+r13]
  51. vmovdqu ymm2,YMMWORD PTR[((64-128))+r13]
  52. vmovdqu ymm3,YMMWORD PTR[((96-128))+r13]
  53. vmovdqu ymm4,YMMWORD PTR[((128-128))+r13]
  54. vmovdqu ymm5,YMMWORD PTR[((160-128))+r13]
  55. vmovdqu ymm6,YMMWORD PTR[((192-128))+r13]
  56. vmovdqu ymm7,YMMWORD PTR[((224-128))+r13]
  57. vmovdqu ymm8,YMMWORD PTR[((256-128))+r13]
  58. lea r13,QWORD PTR[((832+128))+rsp]
  59. vmovdqu YMMWORD PTR[(0-128)+r13],ymm0
  60. vmovdqu YMMWORD PTR[(32-128)+r13],ymm1
  61. vmovdqu YMMWORD PTR[(64-128)+r13],ymm2
  62. vmovdqu YMMWORD PTR[(96-128)+r13],ymm3
  63. vmovdqu YMMWORD PTR[(128-128)+r13],ymm4
  64. vmovdqu YMMWORD PTR[(160-128)+r13],ymm5
  65. vmovdqu YMMWORD PTR[(192-128)+r13],ymm6
  66. vmovdqu YMMWORD PTR[(224-128)+r13],ymm7
  67. vmovdqu YMMWORD PTR[(256-128)+r13],ymm8
  68. vmovdqu YMMWORD PTR[(288-128)+r13],ymm9
  69. $L$sqr_1024_no_n_copy::
  70. and rsp,-1024
  71. vmovdqu ymm1,YMMWORD PTR[((32-128))+rsi]
  72. vmovdqu ymm2,YMMWORD PTR[((64-128))+rsi]
  73. vmovdqu ymm3,YMMWORD PTR[((96-128))+rsi]
  74. vmovdqu ymm4,YMMWORD PTR[((128-128))+rsi]
  75. vmovdqu ymm5,YMMWORD PTR[((160-128))+rsi]
  76. vmovdqu ymm6,YMMWORD PTR[((192-128))+rsi]
  77. vmovdqu ymm7,YMMWORD PTR[((224-128))+rsi]
  78. vmovdqu ymm8,YMMWORD PTR[((256-128))+rsi]
  79. lea rbx,QWORD PTR[192+rsp]
  80. vmovdqu ymm15,YMMWORD PTR[$L$and_mask]
  81. jmp $L$OOP_GRANDE_SQR_1024
  82. ALIGN 32
  83. $L$OOP_GRANDE_SQR_1024::
  84. lea r9,QWORD PTR[((576+128))+rsp]
  85. lea r12,QWORD PTR[448+rsp]
  86. vpaddq ymm1,ymm1,ymm1
  87. vpbroadcastq ymm10,QWORD PTR[((0-128))+rsi]
  88. vpaddq ymm2,ymm2,ymm2
  89. vmovdqa YMMWORD PTR[(0-128)+r9],ymm1
  90. vpaddq ymm3,ymm3,ymm3
  91. vmovdqa YMMWORD PTR[(32-128)+r9],ymm2
  92. vpaddq ymm4,ymm4,ymm4
  93. vmovdqa YMMWORD PTR[(64-128)+r9],ymm3
  94. vpaddq ymm5,ymm5,ymm5
  95. vmovdqa YMMWORD PTR[(96-128)+r9],ymm4
  96. vpaddq ymm6,ymm6,ymm6
  97. vmovdqa YMMWORD PTR[(128-128)+r9],ymm5
  98. vpaddq ymm7,ymm7,ymm7
  99. vmovdqa YMMWORD PTR[(160-128)+r9],ymm6
  100. vpaddq ymm8,ymm8,ymm8
  101. vmovdqa YMMWORD PTR[(192-128)+r9],ymm7
  102. vpxor ymm9,ymm9,ymm9
  103. vmovdqa YMMWORD PTR[(224-128)+r9],ymm8
  104. vpmuludq ymm0,ymm10,YMMWORD PTR[((0-128))+rsi]
  105. vpbroadcastq ymm11,QWORD PTR[((32-128))+rsi]
  106. vmovdqu YMMWORD PTR[(288-192)+rbx],ymm9
  107. vpmuludq ymm1,ymm1,ymm10
  108. vmovdqu YMMWORD PTR[(320-448)+r12],ymm9
  109. vpmuludq ymm2,ymm2,ymm10
  110. vmovdqu YMMWORD PTR[(352-448)+r12],ymm9
  111. vpmuludq ymm3,ymm3,ymm10
  112. vmovdqu YMMWORD PTR[(384-448)+r12],ymm9
  113. vpmuludq ymm4,ymm4,ymm10
  114. vmovdqu YMMWORD PTR[(416-448)+r12],ymm9
  115. vpmuludq ymm5,ymm5,ymm10
  116. vmovdqu YMMWORD PTR[(448-448)+r12],ymm9
  117. vpmuludq ymm6,ymm6,ymm10
  118. vmovdqu YMMWORD PTR[(480-448)+r12],ymm9
  119. vpmuludq ymm7,ymm7,ymm10
  120. vmovdqu YMMWORD PTR[(512-448)+r12],ymm9
  121. vpmuludq ymm8,ymm8,ymm10
  122. vpbroadcastq ymm10,QWORD PTR[((64-128))+rsi]
  123. vmovdqu YMMWORD PTR[(544-448)+r12],ymm9
  124. mov r15,rsi
  125. mov r14d,4
  126. jmp $L$sqr_entry_1024
  127. ALIGN 32
  128. $L$OOP_SQR_1024::
  129. vpbroadcastq ymm11,QWORD PTR[((32-128))+r15]
  130. vpmuludq ymm0,ymm10,YMMWORD PTR[((0-128))+rsi]
  131. vpaddq ymm0,ymm0,YMMWORD PTR[((0-192))+rbx]
  132. vpmuludq ymm1,ymm10,YMMWORD PTR[((0-128))+r9]
  133. vpaddq ymm1,ymm1,YMMWORD PTR[((32-192))+rbx]
  134. vpmuludq ymm2,ymm10,YMMWORD PTR[((32-128))+r9]
  135. vpaddq ymm2,ymm2,YMMWORD PTR[((64-192))+rbx]
  136. vpmuludq ymm3,ymm10,YMMWORD PTR[((64-128))+r9]
  137. vpaddq ymm3,ymm3,YMMWORD PTR[((96-192))+rbx]
  138. vpmuludq ymm4,ymm10,YMMWORD PTR[((96-128))+r9]
  139. vpaddq ymm4,ymm4,YMMWORD PTR[((128-192))+rbx]
  140. vpmuludq ymm5,ymm10,YMMWORD PTR[((128-128))+r9]
  141. vpaddq ymm5,ymm5,YMMWORD PTR[((160-192))+rbx]
  142. vpmuludq ymm6,ymm10,YMMWORD PTR[((160-128))+r9]
  143. vpaddq ymm6,ymm6,YMMWORD PTR[((192-192))+rbx]
  144. vpmuludq ymm7,ymm10,YMMWORD PTR[((192-128))+r9]
  145. vpaddq ymm7,ymm7,YMMWORD PTR[((224-192))+rbx]
  146. vpmuludq ymm8,ymm10,YMMWORD PTR[((224-128))+r9]
  147. vpbroadcastq ymm10,QWORD PTR[((64-128))+r15]
  148. vpaddq ymm8,ymm8,YMMWORD PTR[((256-192))+rbx]
  149. $L$sqr_entry_1024::
  150. vmovdqu YMMWORD PTR[(0-192)+rbx],ymm0
  151. vmovdqu YMMWORD PTR[(32-192)+rbx],ymm1
  152. vpmuludq ymm12,ymm11,YMMWORD PTR[((32-128))+rsi]
  153. vpaddq ymm2,ymm2,ymm12
  154. vpmuludq ymm14,ymm11,YMMWORD PTR[((32-128))+r9]
  155. vpaddq ymm3,ymm3,ymm14
  156. vpmuludq ymm13,ymm11,YMMWORD PTR[((64-128))+r9]
  157. vpaddq ymm4,ymm4,ymm13
  158. vpmuludq ymm12,ymm11,YMMWORD PTR[((96-128))+r9]
  159. vpaddq ymm5,ymm5,ymm12
  160. vpmuludq ymm14,ymm11,YMMWORD PTR[((128-128))+r9]
  161. vpaddq ymm6,ymm6,ymm14
  162. vpmuludq ymm13,ymm11,YMMWORD PTR[((160-128))+r9]
  163. vpaddq ymm7,ymm7,ymm13
  164. vpmuludq ymm12,ymm11,YMMWORD PTR[((192-128))+r9]
  165. vpaddq ymm8,ymm8,ymm12
  166. vpmuludq ymm0,ymm11,YMMWORD PTR[((224-128))+r9]
  167. vpbroadcastq ymm11,QWORD PTR[((96-128))+r15]
  168. vpaddq ymm0,ymm0,YMMWORD PTR[((288-192))+rbx]
  169. vmovdqu YMMWORD PTR[(64-192)+rbx],ymm2
  170. vmovdqu YMMWORD PTR[(96-192)+rbx],ymm3
  171. vpmuludq ymm13,ymm10,YMMWORD PTR[((64-128))+rsi]
  172. vpaddq ymm4,ymm4,ymm13
  173. vpmuludq ymm12,ymm10,YMMWORD PTR[((64-128))+r9]
  174. vpaddq ymm5,ymm5,ymm12
  175. vpmuludq ymm14,ymm10,YMMWORD PTR[((96-128))+r9]
  176. vpaddq ymm6,ymm6,ymm14
  177. vpmuludq ymm13,ymm10,YMMWORD PTR[((128-128))+r9]
  178. vpaddq ymm7,ymm7,ymm13
  179. vpmuludq ymm12,ymm10,YMMWORD PTR[((160-128))+r9]
  180. vpaddq ymm8,ymm8,ymm12
  181. vpmuludq ymm14,ymm10,YMMWORD PTR[((192-128))+r9]
  182. vpaddq ymm0,ymm0,ymm14
  183. vpmuludq ymm1,ymm10,YMMWORD PTR[((224-128))+r9]
  184. vpbroadcastq ymm10,QWORD PTR[((128-128))+r15]
  185. vpaddq ymm1,ymm1,YMMWORD PTR[((320-448))+r12]
  186. vmovdqu YMMWORD PTR[(128-192)+rbx],ymm4
  187. vmovdqu YMMWORD PTR[(160-192)+rbx],ymm5
  188. vpmuludq ymm12,ymm11,YMMWORD PTR[((96-128))+rsi]
  189. vpaddq ymm6,ymm6,ymm12
  190. vpmuludq ymm14,ymm11,YMMWORD PTR[((96-128))+r9]
  191. vpaddq ymm7,ymm7,ymm14
  192. vpmuludq ymm13,ymm11,YMMWORD PTR[((128-128))+r9]
  193. vpaddq ymm8,ymm8,ymm13
  194. vpmuludq ymm12,ymm11,YMMWORD PTR[((160-128))+r9]
  195. vpaddq ymm0,ymm0,ymm12
  196. vpmuludq ymm14,ymm11,YMMWORD PTR[((192-128))+r9]
  197. vpaddq ymm1,ymm1,ymm14
  198. vpmuludq ymm2,ymm11,YMMWORD PTR[((224-128))+r9]
  199. vpbroadcastq ymm11,QWORD PTR[((160-128))+r15]
  200. vpaddq ymm2,ymm2,YMMWORD PTR[((352-448))+r12]
  201. vmovdqu YMMWORD PTR[(192-192)+rbx],ymm6
  202. vmovdqu YMMWORD PTR[(224-192)+rbx],ymm7
  203. vpmuludq ymm12,ymm10,YMMWORD PTR[((128-128))+rsi]
  204. vpaddq ymm8,ymm8,ymm12
  205. vpmuludq ymm14,ymm10,YMMWORD PTR[((128-128))+r9]
  206. vpaddq ymm0,ymm0,ymm14
  207. vpmuludq ymm13,ymm10,YMMWORD PTR[((160-128))+r9]
  208. vpaddq ymm1,ymm1,ymm13
  209. vpmuludq ymm12,ymm10,YMMWORD PTR[((192-128))+r9]
  210. vpaddq ymm2,ymm2,ymm12
  211. vpmuludq ymm3,ymm10,YMMWORD PTR[((224-128))+r9]
  212. vpbroadcastq ymm10,QWORD PTR[((192-128))+r15]
  213. vpaddq ymm3,ymm3,YMMWORD PTR[((384-448))+r12]
  214. vmovdqu YMMWORD PTR[(256-192)+rbx],ymm8
  215. vmovdqu YMMWORD PTR[(288-192)+rbx],ymm0
  216. lea rbx,QWORD PTR[8+rbx]
  217. vpmuludq ymm13,ymm11,YMMWORD PTR[((160-128))+rsi]
  218. vpaddq ymm1,ymm1,ymm13
  219. vpmuludq ymm12,ymm11,YMMWORD PTR[((160-128))+r9]
  220. vpaddq ymm2,ymm2,ymm12
  221. vpmuludq ymm14,ymm11,YMMWORD PTR[((192-128))+r9]
  222. vpaddq ymm3,ymm3,ymm14
  223. vpmuludq ymm4,ymm11,YMMWORD PTR[((224-128))+r9]
  224. vpbroadcastq ymm11,QWORD PTR[((224-128))+r15]
  225. vpaddq ymm4,ymm4,YMMWORD PTR[((416-448))+r12]
  226. vmovdqu YMMWORD PTR[(320-448)+r12],ymm1
  227. vmovdqu YMMWORD PTR[(352-448)+r12],ymm2
  228. vpmuludq ymm12,ymm10,YMMWORD PTR[((192-128))+rsi]
  229. vpaddq ymm3,ymm3,ymm12
  230. vpmuludq ymm14,ymm10,YMMWORD PTR[((192-128))+r9]
  231. vpbroadcastq ymm0,QWORD PTR[((256-128))+r15]
  232. vpaddq ymm4,ymm4,ymm14
  233. vpmuludq ymm5,ymm10,YMMWORD PTR[((224-128))+r9]
  234. vpbroadcastq ymm10,QWORD PTR[((0+8-128))+r15]
  235. vpaddq ymm5,ymm5,YMMWORD PTR[((448-448))+r12]
  236. vmovdqu YMMWORD PTR[(384-448)+r12],ymm3
  237. vmovdqu YMMWORD PTR[(416-448)+r12],ymm4
  238. lea r15,QWORD PTR[8+r15]
  239. vpmuludq ymm12,ymm11,YMMWORD PTR[((224-128))+rsi]
  240. vpaddq ymm5,ymm5,ymm12
  241. vpmuludq ymm6,ymm11,YMMWORD PTR[((224-128))+r9]
  242. vpaddq ymm6,ymm6,YMMWORD PTR[((480-448))+r12]
  243. vpmuludq ymm7,ymm0,YMMWORD PTR[((256-128))+rsi]
  244. vmovdqu YMMWORD PTR[(448-448)+r12],ymm5
  245. vpaddq ymm7,ymm7,YMMWORD PTR[((512-448))+r12]
  246. vmovdqu YMMWORD PTR[(480-448)+r12],ymm6
  247. vmovdqu YMMWORD PTR[(512-448)+r12],ymm7
  248. lea r12,QWORD PTR[8+r12]
  249. dec r14d
  250. jnz $L$OOP_SQR_1024
  251. vmovdqu ymm8,YMMWORD PTR[256+rsp]
  252. vmovdqu ymm1,YMMWORD PTR[288+rsp]
  253. vmovdqu ymm2,YMMWORD PTR[320+rsp]
  254. lea rbx,QWORD PTR[192+rsp]
  255. vpsrlq ymm14,ymm8,29
  256. vpand ymm8,ymm8,ymm15
  257. vpsrlq ymm11,ymm1,29
  258. vpand ymm1,ymm1,ymm15
  259. vpermq ymm14,ymm14,093h
  260. vpxor ymm9,ymm9,ymm9
  261. vpermq ymm11,ymm11,093h
  262. vpblendd ymm10,ymm14,ymm9,3
  263. vpblendd ymm14,ymm11,ymm14,3
  264. vpaddq ymm8,ymm8,ymm10
  265. vpblendd ymm11,ymm9,ymm11,3
  266. vpaddq ymm1,ymm1,ymm14
  267. vpaddq ymm2,ymm2,ymm11
  268. vmovdqu YMMWORD PTR[(288-192)+rbx],ymm1
  269. vmovdqu YMMWORD PTR[(320-192)+rbx],ymm2
  270. mov rax,QWORD PTR[rsp]
  271. mov r10,QWORD PTR[8+rsp]
  272. mov r11,QWORD PTR[16+rsp]
  273. mov r12,QWORD PTR[24+rsp]
  274. vmovdqu ymm1,YMMWORD PTR[32+rsp]
  275. vmovdqu ymm2,YMMWORD PTR[((64-192))+rbx]
  276. vmovdqu ymm3,YMMWORD PTR[((96-192))+rbx]
  277. vmovdqu ymm4,YMMWORD PTR[((128-192))+rbx]
  278. vmovdqu ymm5,YMMWORD PTR[((160-192))+rbx]
  279. vmovdqu ymm6,YMMWORD PTR[((192-192))+rbx]
  280. vmovdqu ymm7,YMMWORD PTR[((224-192))+rbx]
  281. mov r9,rax
  282. imul eax,ecx
  283. and eax,01fffffffh
  284. vmovd xmm12,eax
  285. mov rdx,rax
  286. imul rax,QWORD PTR[((-128))+r13]
  287. vpbroadcastq ymm12,xmm12
  288. add r9,rax
  289. mov rax,rdx
  290. imul rax,QWORD PTR[((8-128))+r13]
  291. shr r9,29
  292. add r10,rax
  293. mov rax,rdx
  294. imul rax,QWORD PTR[((16-128))+r13]
  295. add r10,r9
  296. add r11,rax
  297. imul rdx,QWORD PTR[((24-128))+r13]
  298. add r12,rdx
  299. mov rax,r10
  300. imul eax,ecx
  301. and eax,01fffffffh
  302. mov r14d,9
  303. jmp $L$OOP_REDUCE_1024
  304. ALIGN 32
  305. $L$OOP_REDUCE_1024::
  306. vmovd xmm13,eax
  307. vpbroadcastq ymm13,xmm13
  308. vpmuludq ymm10,ymm12,YMMWORD PTR[((32-128))+r13]
  309. mov rdx,rax
  310. imul rax,QWORD PTR[((-128))+r13]
  311. vpaddq ymm1,ymm1,ymm10
  312. add r10,rax
  313. vpmuludq ymm14,ymm12,YMMWORD PTR[((64-128))+r13]
  314. mov rax,rdx
  315. imul rax,QWORD PTR[((8-128))+r13]
  316. vpaddq ymm2,ymm2,ymm14
  317. vpmuludq ymm11,ymm12,YMMWORD PTR[((96-128))+r13]
  318. DB 067h
  319. add r11,rax
  320. DB 067h
  321. mov rax,rdx
  322. imul rax,QWORD PTR[((16-128))+r13]
  323. shr r10,29
  324. vpaddq ymm3,ymm3,ymm11
  325. vpmuludq ymm10,ymm12,YMMWORD PTR[((128-128))+r13]
  326. add r12,rax
  327. add r11,r10
  328. vpaddq ymm4,ymm4,ymm10
  329. vpmuludq ymm14,ymm12,YMMWORD PTR[((160-128))+r13]
  330. mov rax,r11
  331. imul eax,ecx
  332. vpaddq ymm5,ymm5,ymm14
  333. vpmuludq ymm11,ymm12,YMMWORD PTR[((192-128))+r13]
  334. and eax,01fffffffh
  335. vpaddq ymm6,ymm6,ymm11
  336. vpmuludq ymm10,ymm12,YMMWORD PTR[((224-128))+r13]
  337. vpaddq ymm7,ymm7,ymm10
  338. vpmuludq ymm14,ymm12,YMMWORD PTR[((256-128))+r13]
  339. vmovd xmm12,eax
  340. vpaddq ymm8,ymm8,ymm14
  341. vpbroadcastq ymm12,xmm12
  342. vpmuludq ymm11,ymm13,YMMWORD PTR[((32-8-128))+r13]
  343. vmovdqu ymm14,YMMWORD PTR[((96-8-128))+r13]
  344. mov rdx,rax
  345. imul rax,QWORD PTR[((-128))+r13]
  346. vpaddq ymm1,ymm1,ymm11
  347. vpmuludq ymm10,ymm13,YMMWORD PTR[((64-8-128))+r13]
  348. vmovdqu ymm11,YMMWORD PTR[((128-8-128))+r13]
  349. add r11,rax
  350. mov rax,rdx
  351. imul rax,QWORD PTR[((8-128))+r13]
  352. vpaddq ymm2,ymm2,ymm10
  353. add rax,r12
  354. shr r11,29
  355. vpmuludq ymm14,ymm14,ymm13
  356. vmovdqu ymm10,YMMWORD PTR[((160-8-128))+r13]
  357. add rax,r11
  358. vpaddq ymm3,ymm3,ymm14
  359. vpmuludq ymm11,ymm11,ymm13
  360. vmovdqu ymm14,YMMWORD PTR[((192-8-128))+r13]
  361. DB 067h
  362. mov r12,rax
  363. imul eax,ecx
  364. vpaddq ymm4,ymm4,ymm11
  365. vpmuludq ymm10,ymm10,ymm13
  366. DB 0c4h,041h,07eh,06fh,09dh,058h,000h,000h,000h
  367. and eax,01fffffffh
  368. vpaddq ymm5,ymm5,ymm10
  369. vpmuludq ymm14,ymm14,ymm13
  370. vmovdqu ymm10,YMMWORD PTR[((256-8-128))+r13]
  371. vpaddq ymm6,ymm6,ymm14
  372. vpmuludq ymm11,ymm11,ymm13
  373. vmovdqu ymm9,YMMWORD PTR[((288-8-128))+r13]
  374. vmovd xmm0,eax
  375. imul rax,QWORD PTR[((-128))+r13]
  376. vpaddq ymm7,ymm7,ymm11
  377. vpmuludq ymm10,ymm10,ymm13
  378. vmovdqu ymm14,YMMWORD PTR[((32-16-128))+r13]
  379. vpbroadcastq ymm0,xmm0
  380. vpaddq ymm8,ymm8,ymm10
  381. vpmuludq ymm9,ymm9,ymm13
  382. vmovdqu ymm11,YMMWORD PTR[((64-16-128))+r13]
  383. add r12,rax
  384. vmovdqu ymm13,YMMWORD PTR[((32-24-128))+r13]
  385. vpmuludq ymm14,ymm14,ymm12
  386. vmovdqu ymm10,YMMWORD PTR[((96-16-128))+r13]
  387. vpaddq ymm1,ymm1,ymm14
  388. vpmuludq ymm13,ymm13,ymm0
  389. vpmuludq ymm11,ymm11,ymm12
  390. DB 0c4h,041h,07eh,06fh,0b5h,0f0h,0ffh,0ffh,0ffh
  391. vpaddq ymm13,ymm13,ymm1
  392. vpaddq ymm2,ymm2,ymm11
  393. vpmuludq ymm10,ymm10,ymm12
  394. vmovdqu ymm11,YMMWORD PTR[((160-16-128))+r13]
  395. DB 067h
  396. vmovq rax,xmm13
  397. vmovdqu YMMWORD PTR[rsp],ymm13
  398. vpaddq ymm3,ymm3,ymm10
  399. vpmuludq ymm14,ymm14,ymm12
  400. vmovdqu ymm10,YMMWORD PTR[((192-16-128))+r13]
  401. vpaddq ymm4,ymm4,ymm14
  402. vpmuludq ymm11,ymm11,ymm12
  403. vmovdqu ymm14,YMMWORD PTR[((224-16-128))+r13]
  404. vpaddq ymm5,ymm5,ymm11
  405. vpmuludq ymm10,ymm10,ymm12
  406. vmovdqu ymm11,YMMWORD PTR[((256-16-128))+r13]
  407. vpaddq ymm6,ymm6,ymm10
  408. vpmuludq ymm14,ymm14,ymm12
  409. shr r12,29
  410. vmovdqu ymm10,YMMWORD PTR[((288-16-128))+r13]
  411. add rax,r12
  412. vpaddq ymm7,ymm7,ymm14
  413. vpmuludq ymm11,ymm11,ymm12
  414. mov r9,rax
  415. imul eax,ecx
  416. vpaddq ymm8,ymm8,ymm11
  417. vpmuludq ymm10,ymm10,ymm12
  418. and eax,01fffffffh
  419. vmovd xmm12,eax
  420. vmovdqu ymm11,YMMWORD PTR[((96-24-128))+r13]
  421. DB 067h
  422. vpaddq ymm9,ymm9,ymm10
  423. vpbroadcastq ymm12,xmm12
  424. vpmuludq ymm14,ymm0,YMMWORD PTR[((64-24-128))+r13]
  425. vmovdqu ymm10,YMMWORD PTR[((128-24-128))+r13]
  426. mov rdx,rax
  427. imul rax,QWORD PTR[((-128))+r13]
  428. mov r10,QWORD PTR[8+rsp]
  429. vpaddq ymm1,ymm2,ymm14
  430. vpmuludq ymm11,ymm11,ymm0
  431. vmovdqu ymm14,YMMWORD PTR[((160-24-128))+r13]
  432. add r9,rax
  433. mov rax,rdx
  434. imul rax,QWORD PTR[((8-128))+r13]
  435. DB 067h
  436. shr r9,29
  437. mov r11,QWORD PTR[16+rsp]
  438. vpaddq ymm2,ymm3,ymm11
  439. vpmuludq ymm10,ymm10,ymm0
  440. vmovdqu ymm11,YMMWORD PTR[((192-24-128))+r13]
  441. add r10,rax
  442. mov rax,rdx
  443. imul rax,QWORD PTR[((16-128))+r13]
  444. vpaddq ymm3,ymm4,ymm10
  445. vpmuludq ymm14,ymm14,ymm0
  446. vmovdqu ymm10,YMMWORD PTR[((224-24-128))+r13]
  447. imul rdx,QWORD PTR[((24-128))+r13]
  448. add r11,rax
  449. lea rax,QWORD PTR[r10*1+r9]
  450. vpaddq ymm4,ymm5,ymm14
  451. vpmuludq ymm11,ymm11,ymm0
  452. vmovdqu ymm14,YMMWORD PTR[((256-24-128))+r13]
  453. mov r10,rax
  454. imul eax,ecx
  455. vpmuludq ymm10,ymm10,ymm0
  456. vpaddq ymm5,ymm6,ymm11
  457. vmovdqu ymm11,YMMWORD PTR[((288-24-128))+r13]
  458. and eax,01fffffffh
  459. vpaddq ymm6,ymm7,ymm10
  460. vpmuludq ymm14,ymm14,ymm0
  461. add rdx,QWORD PTR[24+rsp]
  462. vpaddq ymm7,ymm8,ymm14
  463. vpmuludq ymm11,ymm11,ymm0
  464. vpaddq ymm8,ymm9,ymm11
  465. vmovq xmm9,r12
  466. mov r12,rdx
  467. dec r14d
  468. jnz $L$OOP_REDUCE_1024
  469. lea r12,QWORD PTR[448+rsp]
  470. vpaddq ymm0,ymm13,ymm9
  471. vpxor ymm9,ymm9,ymm9
  472. vpaddq ymm0,ymm0,YMMWORD PTR[((288-192))+rbx]
  473. vpaddq ymm1,ymm1,YMMWORD PTR[((320-448))+r12]
  474. vpaddq ymm2,ymm2,YMMWORD PTR[((352-448))+r12]
  475. vpaddq ymm3,ymm3,YMMWORD PTR[((384-448))+r12]
  476. vpaddq ymm4,ymm4,YMMWORD PTR[((416-448))+r12]
  477. vpaddq ymm5,ymm5,YMMWORD PTR[((448-448))+r12]
  478. vpaddq ymm6,ymm6,YMMWORD PTR[((480-448))+r12]
  479. vpaddq ymm7,ymm7,YMMWORD PTR[((512-448))+r12]
  480. vpaddq ymm8,ymm8,YMMWORD PTR[((544-448))+r12]
  481. vpsrlq ymm14,ymm0,29
  482. vpand ymm0,ymm0,ymm15
  483. vpsrlq ymm11,ymm1,29
  484. vpand ymm1,ymm1,ymm15
  485. vpsrlq ymm12,ymm2,29
  486. vpermq ymm14,ymm14,093h
  487. vpand ymm2,ymm2,ymm15
  488. vpsrlq ymm13,ymm3,29
  489. vpermq ymm11,ymm11,093h
  490. vpand ymm3,ymm3,ymm15
  491. vpermq ymm12,ymm12,093h
  492. vpblendd ymm10,ymm14,ymm9,3
  493. vpermq ymm13,ymm13,093h
  494. vpblendd ymm14,ymm11,ymm14,3
  495. vpaddq ymm0,ymm0,ymm10
  496. vpblendd ymm11,ymm12,ymm11,3
  497. vpaddq ymm1,ymm1,ymm14
  498. vpblendd ymm12,ymm13,ymm12,3
  499. vpaddq ymm2,ymm2,ymm11
  500. vpblendd ymm13,ymm9,ymm13,3
  501. vpaddq ymm3,ymm3,ymm12
  502. vpaddq ymm4,ymm4,ymm13
  503. vpsrlq ymm14,ymm0,29
  504. vpand ymm0,ymm0,ymm15
  505. vpsrlq ymm11,ymm1,29
  506. vpand ymm1,ymm1,ymm15
  507. vpsrlq ymm12,ymm2,29
  508. vpermq ymm14,ymm14,093h
  509. vpand ymm2,ymm2,ymm15
  510. vpsrlq ymm13,ymm3,29
  511. vpermq ymm11,ymm11,093h
  512. vpand ymm3,ymm3,ymm15
  513. vpermq ymm12,ymm12,093h
  514. vpblendd ymm10,ymm14,ymm9,3
  515. vpermq ymm13,ymm13,093h
  516. vpblendd ymm14,ymm11,ymm14,3
  517. vpaddq ymm0,ymm0,ymm10
  518. vpblendd ymm11,ymm12,ymm11,3
  519. vpaddq ymm1,ymm1,ymm14
  520. vmovdqu YMMWORD PTR[(0-128)+rdi],ymm0
  521. vpblendd ymm12,ymm13,ymm12,3
  522. vpaddq ymm2,ymm2,ymm11
  523. vmovdqu YMMWORD PTR[(32-128)+rdi],ymm1
  524. vpblendd ymm13,ymm9,ymm13,3
  525. vpaddq ymm3,ymm3,ymm12
  526. vmovdqu YMMWORD PTR[(64-128)+rdi],ymm2
  527. vpaddq ymm4,ymm4,ymm13
  528. vmovdqu YMMWORD PTR[(96-128)+rdi],ymm3
  529. vpsrlq ymm14,ymm4,29
  530. vpand ymm4,ymm4,ymm15
  531. vpsrlq ymm11,ymm5,29
  532. vpand ymm5,ymm5,ymm15
  533. vpsrlq ymm12,ymm6,29
  534. vpermq ymm14,ymm14,093h
  535. vpand ymm6,ymm6,ymm15
  536. vpsrlq ymm13,ymm7,29
  537. vpermq ymm11,ymm11,093h
  538. vpand ymm7,ymm7,ymm15
  539. vpsrlq ymm0,ymm8,29
  540. vpermq ymm12,ymm12,093h
  541. vpand ymm8,ymm8,ymm15
  542. vpermq ymm13,ymm13,093h
  543. vpblendd ymm10,ymm14,ymm9,3
  544. vpermq ymm0,ymm0,093h
  545. vpblendd ymm14,ymm11,ymm14,3
  546. vpaddq ymm4,ymm4,ymm10
  547. vpblendd ymm11,ymm12,ymm11,3
  548. vpaddq ymm5,ymm5,ymm14
  549. vpblendd ymm12,ymm13,ymm12,3
  550. vpaddq ymm6,ymm6,ymm11
  551. vpblendd ymm13,ymm0,ymm13,3
  552. vpaddq ymm7,ymm7,ymm12
  553. vpaddq ymm8,ymm8,ymm13
  554. vpsrlq ymm14,ymm4,29
  555. vpand ymm4,ymm4,ymm15
  556. vpsrlq ymm11,ymm5,29
  557. vpand ymm5,ymm5,ymm15
  558. vpsrlq ymm12,ymm6,29
  559. vpermq ymm14,ymm14,093h
  560. vpand ymm6,ymm6,ymm15
  561. vpsrlq ymm13,ymm7,29
  562. vpermq ymm11,ymm11,093h
  563. vpand ymm7,ymm7,ymm15
  564. vpsrlq ymm0,ymm8,29
  565. vpermq ymm12,ymm12,093h
  566. vpand ymm8,ymm8,ymm15
  567. vpermq ymm13,ymm13,093h
  568. vpblendd ymm10,ymm14,ymm9,3
  569. vpermq ymm0,ymm0,093h
  570. vpblendd ymm14,ymm11,ymm14,3
  571. vpaddq ymm4,ymm4,ymm10
  572. vpblendd ymm11,ymm12,ymm11,3
  573. vpaddq ymm5,ymm5,ymm14
  574. vmovdqu YMMWORD PTR[(128-128)+rdi],ymm4
  575. vpblendd ymm12,ymm13,ymm12,3
  576. vpaddq ymm6,ymm6,ymm11
  577. vmovdqu YMMWORD PTR[(160-128)+rdi],ymm5
  578. vpblendd ymm13,ymm0,ymm13,3
  579. vpaddq ymm7,ymm7,ymm12
  580. vmovdqu YMMWORD PTR[(192-128)+rdi],ymm6
  581. vpaddq ymm8,ymm8,ymm13
  582. vmovdqu YMMWORD PTR[(224-128)+rdi],ymm7
  583. vmovdqu YMMWORD PTR[(256-128)+rdi],ymm8
  584. mov rsi,rdi
  585. dec r8d
  586. jne $L$OOP_GRANDE_SQR_1024
  587. vzeroall
  588. mov rax,rbp
  589. $L$sqr_1024_in_tail::
  590. movaps xmm6,XMMWORD PTR[((-216))+rax]
  591. movaps xmm7,XMMWORD PTR[((-200))+rax]
  592. movaps xmm8,XMMWORD PTR[((-184))+rax]
  593. movaps xmm9,XMMWORD PTR[((-168))+rax]
  594. movaps xmm10,XMMWORD PTR[((-152))+rax]
  595. movaps xmm11,XMMWORD PTR[((-136))+rax]
  596. movaps xmm12,XMMWORD PTR[((-120))+rax]
  597. movaps xmm13,XMMWORD PTR[((-104))+rax]
  598. movaps xmm14,XMMWORD PTR[((-88))+rax]
  599. movaps xmm15,XMMWORD PTR[((-72))+rax]
  600. mov r15,QWORD PTR[((-48))+rax]
  601. mov r14,QWORD PTR[((-40))+rax]
  602. mov r13,QWORD PTR[((-32))+rax]
  603. mov r12,QWORD PTR[((-24))+rax]
  604. mov rbp,QWORD PTR[((-16))+rax]
  605. mov rbx,QWORD PTR[((-8))+rax]
  606. lea rsp,QWORD PTR[rax]
  607. $L$sqr_1024_epilogue::
  608. mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue
  609. mov rsi,QWORD PTR[16+rsp]
  610. DB 0F3h,0C3h ;repret
  611. $L$SEH_end_rsaz_1024_sqr_avx2::
  612. rsaz_1024_sqr_avx2 ENDP
  613. PUBLIC rsaz_1024_mul_avx2
  614. ALIGN 64
  615. rsaz_1024_mul_avx2 PROC PUBLIC
  616. mov QWORD PTR[8+rsp],rdi ;WIN64 prologue
  617. mov QWORD PTR[16+rsp],rsi
  618. mov rax,rsp
  619. $L$SEH_begin_rsaz_1024_mul_avx2::
  620. mov rdi,rcx
  621. mov rsi,rdx
  622. mov rdx,r8
  623. mov rcx,r9
  624. mov r8,QWORD PTR[40+rsp]
  625. lea rax,QWORD PTR[rsp]
  626. push rbx
  627. push rbp
  628. push r12
  629. push r13
  630. push r14
  631. push r15
  632. vzeroupper
  633. lea rsp,QWORD PTR[((-168))+rsp]
  634. vmovaps XMMWORD PTR[(-216)+rax],xmm6
  635. vmovaps XMMWORD PTR[(-200)+rax],xmm7
  636. vmovaps XMMWORD PTR[(-184)+rax],xmm8
  637. vmovaps XMMWORD PTR[(-168)+rax],xmm9
  638. vmovaps XMMWORD PTR[(-152)+rax],xmm10
  639. vmovaps XMMWORD PTR[(-136)+rax],xmm11
  640. vmovaps XMMWORD PTR[(-120)+rax],xmm12
  641. vmovaps XMMWORD PTR[(-104)+rax],xmm13
  642. vmovaps XMMWORD PTR[(-88)+rax],xmm14
  643. vmovaps XMMWORD PTR[(-72)+rax],xmm15
  644. $L$mul_1024_body::
  645. mov rbp,rax
  646. vzeroall
  647. mov r13,rdx
  648. sub rsp,64
  649. DB 067h,067h
  650. mov r15,rsi
  651. and r15,4095
  652. add r15,32*10
  653. shr r15,12
  654. mov r15,rsi
  655. cmovnz rsi,r13
  656. cmovnz r13,r15
  657. mov r15,rcx
  658. sub rsi,-128
  659. sub rcx,-128
  660. sub rdi,-128
  661. and r15,4095
  662. add r15,32*10
  663. DB 067h,067h
  664. shr r15,12
  665. jz $L$mul_1024_no_n_copy
  666. sub rsp,32*10
  667. vmovdqu ymm0,YMMWORD PTR[((0-128))+rcx]
  668. and rsp,-512
  669. vmovdqu ymm1,YMMWORD PTR[((32-128))+rcx]
  670. vmovdqu ymm2,YMMWORD PTR[((64-128))+rcx]
  671. vmovdqu ymm3,YMMWORD PTR[((96-128))+rcx]
  672. vmovdqu ymm4,YMMWORD PTR[((128-128))+rcx]
  673. vmovdqu ymm5,YMMWORD PTR[((160-128))+rcx]
  674. vmovdqu ymm6,YMMWORD PTR[((192-128))+rcx]
  675. vmovdqu ymm7,YMMWORD PTR[((224-128))+rcx]
  676. vmovdqu ymm8,YMMWORD PTR[((256-128))+rcx]
  677. lea rcx,QWORD PTR[((64+128))+rsp]
  678. vmovdqu YMMWORD PTR[(0-128)+rcx],ymm0
  679. vpxor ymm0,ymm0,ymm0
  680. vmovdqu YMMWORD PTR[(32-128)+rcx],ymm1
  681. vpxor ymm1,ymm1,ymm1
  682. vmovdqu YMMWORD PTR[(64-128)+rcx],ymm2
  683. vpxor ymm2,ymm2,ymm2
  684. vmovdqu YMMWORD PTR[(96-128)+rcx],ymm3
  685. vpxor ymm3,ymm3,ymm3
  686. vmovdqu YMMWORD PTR[(128-128)+rcx],ymm4
  687. vpxor ymm4,ymm4,ymm4
  688. vmovdqu YMMWORD PTR[(160-128)+rcx],ymm5
  689. vpxor ymm5,ymm5,ymm5
  690. vmovdqu YMMWORD PTR[(192-128)+rcx],ymm6
  691. vpxor ymm6,ymm6,ymm6
  692. vmovdqu YMMWORD PTR[(224-128)+rcx],ymm7
  693. vpxor ymm7,ymm7,ymm7
  694. vmovdqu YMMWORD PTR[(256-128)+rcx],ymm8
  695. vmovdqa ymm8,ymm0
  696. vmovdqu YMMWORD PTR[(288-128)+rcx],ymm9
  697. $L$mul_1024_no_n_copy::
  698. and rsp,-64
  699. mov rbx,QWORD PTR[r13]
  700. vpbroadcastq ymm10,QWORD PTR[r13]
  701. vmovdqu YMMWORD PTR[rsp],ymm0
  702. xor r9,r9
  703. DB 067h
  704. xor r10,r10
  705. xor r11,r11
  706. xor r12,r12
  707. vmovdqu ymm15,YMMWORD PTR[$L$and_mask]
  708. mov r14d,9
  709. vmovdqu YMMWORD PTR[(288-128)+rdi],ymm9
  710. jmp $L$oop_mul_1024
  711. ALIGN 32
  712. $L$oop_mul_1024::
  713. vpsrlq ymm9,ymm3,29
  714. mov rax,rbx
  715. imul rax,QWORD PTR[((-128))+rsi]
  716. add rax,r9
  717. mov r10,rbx
  718. imul r10,QWORD PTR[((8-128))+rsi]
  719. add r10,QWORD PTR[8+rsp]
  720. mov r9,rax
  721. imul eax,r8d
  722. and eax,01fffffffh
  723. mov r11,rbx
  724. imul r11,QWORD PTR[((16-128))+rsi]
  725. add r11,QWORD PTR[16+rsp]
  726. mov r12,rbx
  727. imul r12,QWORD PTR[((24-128))+rsi]
  728. add r12,QWORD PTR[24+rsp]
  729. vpmuludq ymm0,ymm10,YMMWORD PTR[((32-128))+rsi]
  730. vmovd xmm11,eax
  731. vpaddq ymm1,ymm1,ymm0
  732. vpmuludq ymm12,ymm10,YMMWORD PTR[((64-128))+rsi]
  733. vpbroadcastq ymm11,xmm11
  734. vpaddq ymm2,ymm2,ymm12
  735. vpmuludq ymm13,ymm10,YMMWORD PTR[((96-128))+rsi]
  736. vpand ymm3,ymm3,ymm15
  737. vpaddq ymm3,ymm3,ymm13
  738. vpmuludq ymm0,ymm10,YMMWORD PTR[((128-128))+rsi]
  739. vpaddq ymm4,ymm4,ymm0
  740. vpmuludq ymm12,ymm10,YMMWORD PTR[((160-128))+rsi]
  741. vpaddq ymm5,ymm5,ymm12
  742. vpmuludq ymm13,ymm10,YMMWORD PTR[((192-128))+rsi]
  743. vpaddq ymm6,ymm6,ymm13
  744. vpmuludq ymm0,ymm10,YMMWORD PTR[((224-128))+rsi]
  745. vpermq ymm9,ymm9,093h
  746. vpaddq ymm7,ymm7,ymm0
  747. vpmuludq ymm12,ymm10,YMMWORD PTR[((256-128))+rsi]
  748. vpbroadcastq ymm10,QWORD PTR[8+r13]
  749. vpaddq ymm8,ymm8,ymm12
  750. mov rdx,rax
  751. imul rax,QWORD PTR[((-128))+rcx]
  752. add r9,rax
  753. mov rax,rdx
  754. imul rax,QWORD PTR[((8-128))+rcx]
  755. add r10,rax
  756. mov rax,rdx
  757. imul rax,QWORD PTR[((16-128))+rcx]
  758. add r11,rax
  759. shr r9,29
  760. imul rdx,QWORD PTR[((24-128))+rcx]
  761. add r12,rdx
  762. add r10,r9
  763. vpmuludq ymm13,ymm11,YMMWORD PTR[((32-128))+rcx]
  764. vmovq rbx,xmm10
  765. vpaddq ymm1,ymm1,ymm13
  766. vpmuludq ymm0,ymm11,YMMWORD PTR[((64-128))+rcx]
  767. vpaddq ymm2,ymm2,ymm0
  768. vpmuludq ymm12,ymm11,YMMWORD PTR[((96-128))+rcx]
  769. vpaddq ymm3,ymm3,ymm12
  770. vpmuludq ymm13,ymm11,YMMWORD PTR[((128-128))+rcx]
  771. vpaddq ymm4,ymm4,ymm13
  772. vpmuludq ymm0,ymm11,YMMWORD PTR[((160-128))+rcx]
  773. vpaddq ymm5,ymm5,ymm0
  774. vpmuludq ymm12,ymm11,YMMWORD PTR[((192-128))+rcx]
  775. vpaddq ymm6,ymm6,ymm12
  776. vpmuludq ymm13,ymm11,YMMWORD PTR[((224-128))+rcx]
  777. vpblendd ymm12,ymm9,ymm14,3
  778. vpaddq ymm7,ymm7,ymm13
  779. vpmuludq ymm0,ymm11,YMMWORD PTR[((256-128))+rcx]
  780. vpaddq ymm3,ymm3,ymm12
  781. vpaddq ymm8,ymm8,ymm0
  782. mov rax,rbx
  783. imul rax,QWORD PTR[((-128))+rsi]
  784. add r10,rax
  785. vmovdqu ymm12,YMMWORD PTR[((-8+32-128))+rsi]
  786. mov rax,rbx
  787. imul rax,QWORD PTR[((8-128))+rsi]
  788. add r11,rax
  789. vmovdqu ymm13,YMMWORD PTR[((-8+64-128))+rsi]
  790. mov rax,r10
  791. vpblendd ymm9,ymm9,ymm14,0fch
  792. imul eax,r8d
  793. vpaddq ymm4,ymm4,ymm9
  794. and eax,01fffffffh
  795. imul rbx,QWORD PTR[((16-128))+rsi]
  796. add r12,rbx
  797. vpmuludq ymm12,ymm12,ymm10
  798. vmovd xmm11,eax
  799. vmovdqu ymm0,YMMWORD PTR[((-8+96-128))+rsi]
  800. vpaddq ymm1,ymm1,ymm12
  801. vpmuludq ymm13,ymm13,ymm10
  802. vpbroadcastq ymm11,xmm11
  803. vmovdqu ymm12,YMMWORD PTR[((-8+128-128))+rsi]
  804. vpaddq ymm2,ymm2,ymm13
  805. vpmuludq ymm0,ymm0,ymm10
  806. vmovdqu ymm13,YMMWORD PTR[((-8+160-128))+rsi]
  807. vpaddq ymm3,ymm3,ymm0
  808. vpmuludq ymm12,ymm12,ymm10
  809. vmovdqu ymm0,YMMWORD PTR[((-8+192-128))+rsi]
  810. vpaddq ymm4,ymm4,ymm12
  811. vpmuludq ymm13,ymm13,ymm10
  812. vmovdqu ymm12,YMMWORD PTR[((-8+224-128))+rsi]
  813. vpaddq ymm5,ymm5,ymm13
  814. vpmuludq ymm0,ymm0,ymm10
  815. vmovdqu ymm13,YMMWORD PTR[((-8+256-128))+rsi]
  816. vpaddq ymm6,ymm6,ymm0
  817. vpmuludq ymm12,ymm12,ymm10
  818. vmovdqu ymm9,YMMWORD PTR[((-8+288-128))+rsi]
  819. vpaddq ymm7,ymm7,ymm12
  820. vpmuludq ymm13,ymm13,ymm10
  821. vpaddq ymm8,ymm8,ymm13
  822. vpmuludq ymm9,ymm9,ymm10
  823. vpbroadcastq ymm10,QWORD PTR[16+r13]
  824. mov rdx,rax
  825. imul rax,QWORD PTR[((-128))+rcx]
  826. add r10,rax
  827. vmovdqu ymm0,YMMWORD PTR[((-8+32-128))+rcx]
  828. mov rax,rdx
  829. imul rax,QWORD PTR[((8-128))+rcx]
  830. add r11,rax
  831. vmovdqu ymm12,YMMWORD PTR[((-8+64-128))+rcx]
  832. shr r10,29
  833. imul rdx,QWORD PTR[((16-128))+rcx]
  834. add r12,rdx
  835. add r11,r10
  836. vpmuludq ymm0,ymm0,ymm11
  837. vmovq rbx,xmm10
  838. vmovdqu ymm13,YMMWORD PTR[((-8+96-128))+rcx]
  839. vpaddq ymm1,ymm1,ymm0
  840. vpmuludq ymm12,ymm12,ymm11
  841. vmovdqu ymm0,YMMWORD PTR[((-8+128-128))+rcx]
  842. vpaddq ymm2,ymm2,ymm12
  843. vpmuludq ymm13,ymm13,ymm11
  844. vmovdqu ymm12,YMMWORD PTR[((-8+160-128))+rcx]
  845. vpaddq ymm3,ymm3,ymm13
  846. vpmuludq ymm0,ymm0,ymm11
  847. vmovdqu ymm13,YMMWORD PTR[((-8+192-128))+rcx]
  848. vpaddq ymm4,ymm4,ymm0
  849. vpmuludq ymm12,ymm12,ymm11
  850. vmovdqu ymm0,YMMWORD PTR[((-8+224-128))+rcx]
  851. vpaddq ymm5,ymm5,ymm12
  852. vpmuludq ymm13,ymm13,ymm11
  853. vmovdqu ymm12,YMMWORD PTR[((-8+256-128))+rcx]
  854. vpaddq ymm6,ymm6,ymm13
  855. vpmuludq ymm0,ymm0,ymm11
  856. vmovdqu ymm13,YMMWORD PTR[((-8+288-128))+rcx]
  857. vpaddq ymm7,ymm7,ymm0
  858. vpmuludq ymm12,ymm12,ymm11
  859. vpaddq ymm8,ymm8,ymm12
  860. vpmuludq ymm13,ymm13,ymm11
  861. vpaddq ymm9,ymm9,ymm13
  862. vmovdqu ymm0,YMMWORD PTR[((-16+32-128))+rsi]
  863. mov rax,rbx
  864. imul rax,QWORD PTR[((-128))+rsi]
  865. add rax,r11
  866. vmovdqu ymm12,YMMWORD PTR[((-16+64-128))+rsi]
  867. mov r11,rax
  868. imul eax,r8d
  869. and eax,01fffffffh
  870. imul rbx,QWORD PTR[((8-128))+rsi]
  871. add r12,rbx
  872. vpmuludq ymm0,ymm0,ymm10
  873. vmovd xmm11,eax
  874. vmovdqu ymm13,YMMWORD PTR[((-16+96-128))+rsi]
  875. vpaddq ymm1,ymm1,ymm0
  876. vpmuludq ymm12,ymm12,ymm10
  877. vpbroadcastq ymm11,xmm11
  878. vmovdqu ymm0,YMMWORD PTR[((-16+128-128))+rsi]
  879. vpaddq ymm2,ymm2,ymm12
  880. vpmuludq ymm13,ymm13,ymm10
  881. vmovdqu ymm12,YMMWORD PTR[((-16+160-128))+rsi]
  882. vpaddq ymm3,ymm3,ymm13
  883. vpmuludq ymm0,ymm0,ymm10
  884. vmovdqu ymm13,YMMWORD PTR[((-16+192-128))+rsi]
  885. vpaddq ymm4,ymm4,ymm0
  886. vpmuludq ymm12,ymm12,ymm10
  887. vmovdqu ymm0,YMMWORD PTR[((-16+224-128))+rsi]
  888. vpaddq ymm5,ymm5,ymm12
  889. vpmuludq ymm13,ymm13,ymm10
  890. vmovdqu ymm12,YMMWORD PTR[((-16+256-128))+rsi]
  891. vpaddq ymm6,ymm6,ymm13
  892. vpmuludq ymm0,ymm0,ymm10
  893. vmovdqu ymm13,YMMWORD PTR[((-16+288-128))+rsi]
  894. vpaddq ymm7,ymm7,ymm0
  895. vpmuludq ymm12,ymm12,ymm10
  896. vpaddq ymm8,ymm8,ymm12
  897. vpmuludq ymm13,ymm13,ymm10
  898. vpbroadcastq ymm10,QWORD PTR[24+r13]
  899. vpaddq ymm9,ymm9,ymm13
  900. vmovdqu ymm0,YMMWORD PTR[((-16+32-128))+rcx]
  901. mov rdx,rax
  902. imul rax,QWORD PTR[((-128))+rcx]
  903. add r11,rax
  904. vmovdqu ymm12,YMMWORD PTR[((-16+64-128))+rcx]
  905. imul rdx,QWORD PTR[((8-128))+rcx]
  906. add r12,rdx
  907. shr r11,29
  908. vpmuludq ymm0,ymm0,ymm11
  909. vmovq rbx,xmm10
  910. vmovdqu ymm13,YMMWORD PTR[((-16+96-128))+rcx]
  911. vpaddq ymm1,ymm1,ymm0
  912. vpmuludq ymm12,ymm12,ymm11
  913. vmovdqu ymm0,YMMWORD PTR[((-16+128-128))+rcx]
  914. vpaddq ymm2,ymm2,ymm12
  915. vpmuludq ymm13,ymm13,ymm11
  916. vmovdqu ymm12,YMMWORD PTR[((-16+160-128))+rcx]
  917. vpaddq ymm3,ymm3,ymm13
  918. vpmuludq ymm0,ymm0,ymm11
  919. vmovdqu ymm13,YMMWORD PTR[((-16+192-128))+rcx]
  920. vpaddq ymm4,ymm4,ymm0
  921. vpmuludq ymm12,ymm12,ymm11
  922. vmovdqu ymm0,YMMWORD PTR[((-16+224-128))+rcx]
  923. vpaddq ymm5,ymm5,ymm12
  924. vpmuludq ymm13,ymm13,ymm11
  925. vmovdqu ymm12,YMMWORD PTR[((-16+256-128))+rcx]
  926. vpaddq ymm6,ymm6,ymm13
  927. vpmuludq ymm0,ymm0,ymm11
  928. vmovdqu ymm13,YMMWORD PTR[((-16+288-128))+rcx]
  929. vpaddq ymm7,ymm7,ymm0
  930. vpmuludq ymm12,ymm12,ymm11
  931. vmovdqu ymm0,YMMWORD PTR[((-24+32-128))+rsi]
  932. vpaddq ymm8,ymm8,ymm12
  933. vpmuludq ymm13,ymm13,ymm11
  934. vmovdqu ymm12,YMMWORD PTR[((-24+64-128))+rsi]
  935. vpaddq ymm9,ymm9,ymm13
  936. add r12,r11
  937. imul rbx,QWORD PTR[((-128))+rsi]
  938. add r12,rbx
  939. mov rax,r12
  940. imul eax,r8d
  941. and eax,01fffffffh
  942. vpmuludq ymm0,ymm0,ymm10
  943. vmovd xmm11,eax
  944. vmovdqu ymm13,YMMWORD PTR[((-24+96-128))+rsi]
  945. vpaddq ymm1,ymm1,ymm0
  946. vpmuludq ymm12,ymm12,ymm10
  947. vpbroadcastq ymm11,xmm11
  948. vmovdqu ymm0,YMMWORD PTR[((-24+128-128))+rsi]
  949. vpaddq ymm2,ymm2,ymm12
  950. vpmuludq ymm13,ymm13,ymm10
  951. vmovdqu ymm12,YMMWORD PTR[((-24+160-128))+rsi]
  952. vpaddq ymm3,ymm3,ymm13
  953. vpmuludq ymm0,ymm0,ymm10
  954. vmovdqu ymm13,YMMWORD PTR[((-24+192-128))+rsi]
  955. vpaddq ymm4,ymm4,ymm0
  956. vpmuludq ymm12,ymm12,ymm10
  957. vmovdqu ymm0,YMMWORD PTR[((-24+224-128))+rsi]
  958. vpaddq ymm5,ymm5,ymm12
  959. vpmuludq ymm13,ymm13,ymm10
  960. vmovdqu ymm12,YMMWORD PTR[((-24+256-128))+rsi]
  961. vpaddq ymm6,ymm6,ymm13
  962. vpmuludq ymm0,ymm0,ymm10
  963. vmovdqu ymm13,YMMWORD PTR[((-24+288-128))+rsi]
  964. vpaddq ymm7,ymm7,ymm0
  965. vpmuludq ymm12,ymm12,ymm10
  966. vpaddq ymm8,ymm8,ymm12
  967. vpmuludq ymm13,ymm13,ymm10
  968. vpbroadcastq ymm10,QWORD PTR[32+r13]
  969. vpaddq ymm9,ymm9,ymm13
  970. add r13,32
  971. vmovdqu ymm0,YMMWORD PTR[((-24+32-128))+rcx]
  972. imul rax,QWORD PTR[((-128))+rcx]
  973. add r12,rax
  974. shr r12,29
  975. vmovdqu ymm12,YMMWORD PTR[((-24+64-128))+rcx]
  976. vpmuludq ymm0,ymm0,ymm11
  977. vmovq rbx,xmm10
  978. vmovdqu ymm13,YMMWORD PTR[((-24+96-128))+rcx]
  979. vpaddq ymm0,ymm1,ymm0
  980. vpmuludq ymm12,ymm12,ymm11
  981. vmovdqu YMMWORD PTR[rsp],ymm0
  982. vpaddq ymm1,ymm2,ymm12
  983. vmovdqu ymm0,YMMWORD PTR[((-24+128-128))+rcx]
  984. vpmuludq ymm13,ymm13,ymm11
  985. vmovdqu ymm12,YMMWORD PTR[((-24+160-128))+rcx]
  986. vpaddq ymm2,ymm3,ymm13
  987. vpmuludq ymm0,ymm0,ymm11
  988. vmovdqu ymm13,YMMWORD PTR[((-24+192-128))+rcx]
  989. vpaddq ymm3,ymm4,ymm0
  990. vpmuludq ymm12,ymm12,ymm11
  991. vmovdqu ymm0,YMMWORD PTR[((-24+224-128))+rcx]
  992. vpaddq ymm4,ymm5,ymm12
  993. vpmuludq ymm13,ymm13,ymm11
  994. vmovdqu ymm12,YMMWORD PTR[((-24+256-128))+rcx]
  995. vpaddq ymm5,ymm6,ymm13
  996. vpmuludq ymm0,ymm0,ymm11
  997. vmovdqu ymm13,YMMWORD PTR[((-24+288-128))+rcx]
  998. mov r9,r12
  999. vpaddq ymm6,ymm7,ymm0
  1000. vpmuludq ymm12,ymm12,ymm11
  1001. add r9,QWORD PTR[rsp]
  1002. vpaddq ymm7,ymm8,ymm12
  1003. vpmuludq ymm13,ymm13,ymm11
  1004. vmovq xmm12,r12
  1005. vpaddq ymm8,ymm9,ymm13
  1006. dec r14d
  1007. jnz $L$oop_mul_1024
  1008. vpaddq ymm0,ymm12,YMMWORD PTR[rsp]
  1009. vpsrlq ymm12,ymm0,29
  1010. vpand ymm0,ymm0,ymm15
  1011. vpsrlq ymm13,ymm1,29
  1012. vpand ymm1,ymm1,ymm15
  1013. vpsrlq ymm10,ymm2,29
  1014. vpermq ymm12,ymm12,093h
  1015. vpand ymm2,ymm2,ymm15
  1016. vpsrlq ymm11,ymm3,29
  1017. vpermq ymm13,ymm13,093h
  1018. vpand ymm3,ymm3,ymm15
  1019. vpblendd ymm9,ymm12,ymm14,3
  1020. vpermq ymm10,ymm10,093h
  1021. vpblendd ymm12,ymm13,ymm12,3
  1022. vpermq ymm11,ymm11,093h
  1023. vpaddq ymm0,ymm0,ymm9
  1024. vpblendd ymm13,ymm10,ymm13,3
  1025. vpaddq ymm1,ymm1,ymm12
  1026. vpblendd ymm10,ymm11,ymm10,3
  1027. vpaddq ymm2,ymm2,ymm13
  1028. vpblendd ymm11,ymm14,ymm11,3
  1029. vpaddq ymm3,ymm3,ymm10
  1030. vpaddq ymm4,ymm4,ymm11
  1031. vpsrlq ymm12,ymm0,29
  1032. vpand ymm0,ymm0,ymm15
  1033. vpsrlq ymm13,ymm1,29
  1034. vpand ymm1,ymm1,ymm15
  1035. vpsrlq ymm10,ymm2,29
  1036. vpermq ymm12,ymm12,093h
  1037. vpand ymm2,ymm2,ymm15
  1038. vpsrlq ymm11,ymm3,29
  1039. vpermq ymm13,ymm13,093h
  1040. vpand ymm3,ymm3,ymm15
  1041. vpermq ymm10,ymm10,093h
  1042. vpblendd ymm9,ymm12,ymm14,3
  1043. vpermq ymm11,ymm11,093h
  1044. vpblendd ymm12,ymm13,ymm12,3
  1045. vpaddq ymm0,ymm0,ymm9
  1046. vpblendd ymm13,ymm10,ymm13,3
  1047. vpaddq ymm1,ymm1,ymm12
  1048. vpblendd ymm10,ymm11,ymm10,3
  1049. vpaddq ymm2,ymm2,ymm13
  1050. vpblendd ymm11,ymm14,ymm11,3
  1051. vpaddq ymm3,ymm3,ymm10
  1052. vpaddq ymm4,ymm4,ymm11
  1053. vmovdqu YMMWORD PTR[(0-128)+rdi],ymm0
  1054. vmovdqu YMMWORD PTR[(32-128)+rdi],ymm1
  1055. vmovdqu YMMWORD PTR[(64-128)+rdi],ymm2
  1056. vmovdqu YMMWORD PTR[(96-128)+rdi],ymm3
  1057. vpsrlq ymm12,ymm4,29
  1058. vpand ymm4,ymm4,ymm15
  1059. vpsrlq ymm13,ymm5,29
  1060. vpand ymm5,ymm5,ymm15
  1061. vpsrlq ymm10,ymm6,29
  1062. vpermq ymm12,ymm12,093h
  1063. vpand ymm6,ymm6,ymm15
  1064. vpsrlq ymm11,ymm7,29
  1065. vpermq ymm13,ymm13,093h
  1066. vpand ymm7,ymm7,ymm15
  1067. vpsrlq ymm0,ymm8,29
  1068. vpermq ymm10,ymm10,093h
  1069. vpand ymm8,ymm8,ymm15
  1070. vpermq ymm11,ymm11,093h
  1071. vpblendd ymm9,ymm12,ymm14,3
  1072. vpermq ymm0,ymm0,093h
  1073. vpblendd ymm12,ymm13,ymm12,3
  1074. vpaddq ymm4,ymm4,ymm9
  1075. vpblendd ymm13,ymm10,ymm13,3
  1076. vpaddq ymm5,ymm5,ymm12
  1077. vpblendd ymm10,ymm11,ymm10,3
  1078. vpaddq ymm6,ymm6,ymm13
  1079. vpblendd ymm11,ymm0,ymm11,3
  1080. vpaddq ymm7,ymm7,ymm10
  1081. vpaddq ymm8,ymm8,ymm11
  1082. vpsrlq ymm12,ymm4,29
  1083. vpand ymm4,ymm4,ymm15
  1084. vpsrlq ymm13,ymm5,29
  1085. vpand ymm5,ymm5,ymm15
  1086. vpsrlq ymm10,ymm6,29
  1087. vpermq ymm12,ymm12,093h
  1088. vpand ymm6,ymm6,ymm15
  1089. vpsrlq ymm11,ymm7,29
  1090. vpermq ymm13,ymm13,093h
  1091. vpand ymm7,ymm7,ymm15
  1092. vpsrlq ymm0,ymm8,29
  1093. vpermq ymm10,ymm10,093h
  1094. vpand ymm8,ymm8,ymm15
  1095. vpermq ymm11,ymm11,093h
  1096. vpblendd ymm9,ymm12,ymm14,3
  1097. vpermq ymm0,ymm0,093h
  1098. vpblendd ymm12,ymm13,ymm12,3
  1099. vpaddq ymm4,ymm4,ymm9
  1100. vpblendd ymm13,ymm10,ymm13,3
  1101. vpaddq ymm5,ymm5,ymm12
  1102. vpblendd ymm10,ymm11,ymm10,3
  1103. vpaddq ymm6,ymm6,ymm13
  1104. vpblendd ymm11,ymm0,ymm11,3
  1105. vpaddq ymm7,ymm7,ymm10
  1106. vpaddq ymm8,ymm8,ymm11
  1107. vmovdqu YMMWORD PTR[(128-128)+rdi],ymm4
  1108. vmovdqu YMMWORD PTR[(160-128)+rdi],ymm5
  1109. vmovdqu YMMWORD PTR[(192-128)+rdi],ymm6
  1110. vmovdqu YMMWORD PTR[(224-128)+rdi],ymm7
  1111. vmovdqu YMMWORD PTR[(256-128)+rdi],ymm8
  1112. vzeroupper
  1113. mov rax,rbp
  1114. $L$mul_1024_in_tail::
  1115. movaps xmm6,XMMWORD PTR[((-216))+rax]
  1116. movaps xmm7,XMMWORD PTR[((-200))+rax]
  1117. movaps xmm8,XMMWORD PTR[((-184))+rax]
  1118. movaps xmm9,XMMWORD PTR[((-168))+rax]
  1119. movaps xmm10,XMMWORD PTR[((-152))+rax]
  1120. movaps xmm11,XMMWORD PTR[((-136))+rax]
  1121. movaps xmm12,XMMWORD PTR[((-120))+rax]
  1122. movaps xmm13,XMMWORD PTR[((-104))+rax]
  1123. movaps xmm14,XMMWORD PTR[((-88))+rax]
  1124. movaps xmm15,XMMWORD PTR[((-72))+rax]
  1125. mov r15,QWORD PTR[((-48))+rax]
  1126. mov r14,QWORD PTR[((-40))+rax]
  1127. mov r13,QWORD PTR[((-32))+rax]
  1128. mov r12,QWORD PTR[((-24))+rax]
  1129. mov rbp,QWORD PTR[((-16))+rax]
  1130. mov rbx,QWORD PTR[((-8))+rax]
  1131. lea rsp,QWORD PTR[rax]
  1132. $L$mul_1024_epilogue::
  1133. mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue
  1134. mov rsi,QWORD PTR[16+rsp]
  1135. DB 0F3h,0C3h ;repret
  1136. $L$SEH_end_rsaz_1024_mul_avx2::
  1137. rsaz_1024_mul_avx2 ENDP
  1138. PUBLIC rsaz_1024_red2norm_avx2
  1139. ALIGN 32
  1140. rsaz_1024_red2norm_avx2 PROC PUBLIC
  1141. sub rdx,-128
  1142. xor rax,rax
  1143. mov r8,QWORD PTR[((-128))+rdx]
  1144. mov r9,QWORD PTR[((-120))+rdx]
  1145. mov r10,QWORD PTR[((-112))+rdx]
  1146. shl r8,0
  1147. shl r9,29
  1148. mov r11,r10
  1149. shl r10,58
  1150. shr r11,6
  1151. add rax,r8
  1152. add rax,r9
  1153. add rax,r10
  1154. adc r11,0
  1155. mov QWORD PTR[rcx],rax
  1156. mov rax,r11
  1157. mov r8,QWORD PTR[((-104))+rdx]
  1158. mov r9,QWORD PTR[((-96))+rdx]
  1159. shl r8,23
  1160. mov r10,r9
  1161. shl r9,52
  1162. shr r10,12
  1163. add rax,r8
  1164. add rax,r9
  1165. adc r10,0
  1166. mov QWORD PTR[8+rcx],rax
  1167. mov rax,r10
  1168. mov r11,QWORD PTR[((-88))+rdx]
  1169. mov r8,QWORD PTR[((-80))+rdx]
  1170. shl r11,17
  1171. mov r9,r8
  1172. shl r8,46
  1173. shr r9,18
  1174. add rax,r11
  1175. add rax,r8
  1176. adc r9,0
  1177. mov QWORD PTR[16+rcx],rax
  1178. mov rax,r9
  1179. mov r10,QWORD PTR[((-72))+rdx]
  1180. mov r11,QWORD PTR[((-64))+rdx]
  1181. shl r10,11
  1182. mov r8,r11
  1183. shl r11,40
  1184. shr r8,24
  1185. add rax,r10
  1186. add rax,r11
  1187. adc r8,0
  1188. mov QWORD PTR[24+rcx],rax
  1189. mov rax,r8
  1190. mov r9,QWORD PTR[((-56))+rdx]
  1191. mov r10,QWORD PTR[((-48))+rdx]
  1192. mov r11,QWORD PTR[((-40))+rdx]
  1193. shl r9,5
  1194. shl r10,34
  1195. mov r8,r11
  1196. shl r11,63
  1197. shr r8,1
  1198. add rax,r9
  1199. add rax,r10
  1200. add rax,r11
  1201. adc r8,0
  1202. mov QWORD PTR[32+rcx],rax
  1203. mov rax,r8
  1204. mov r9,QWORD PTR[((-32))+rdx]
  1205. mov r10,QWORD PTR[((-24))+rdx]
  1206. shl r9,28
  1207. mov r11,r10
  1208. shl r10,57
  1209. shr r11,7
  1210. add rax,r9
  1211. add rax,r10
  1212. adc r11,0
  1213. mov QWORD PTR[40+rcx],rax
  1214. mov rax,r11
  1215. mov r8,QWORD PTR[((-16))+rdx]
  1216. mov r9,QWORD PTR[((-8))+rdx]
  1217. shl r8,22
  1218. mov r10,r9
  1219. shl r9,51
  1220. shr r10,13
  1221. add rax,r8
  1222. add rax,r9
  1223. adc r10,0
  1224. mov QWORD PTR[48+rcx],rax
  1225. mov rax,r10
  1226. mov r11,QWORD PTR[rdx]
  1227. mov r8,QWORD PTR[8+rdx]
  1228. shl r11,16
  1229. mov r9,r8
  1230. shl r8,45
  1231. shr r9,19
  1232. add rax,r11
  1233. add rax,r8
  1234. adc r9,0
  1235. mov QWORD PTR[56+rcx],rax
  1236. mov rax,r9
  1237. mov r10,QWORD PTR[16+rdx]
  1238. mov r11,QWORD PTR[24+rdx]
  1239. shl r10,10
  1240. mov r8,r11
  1241. shl r11,39
  1242. shr r8,25
  1243. add rax,r10
  1244. add rax,r11
  1245. adc r8,0
  1246. mov QWORD PTR[64+rcx],rax
  1247. mov rax,r8
  1248. mov r9,QWORD PTR[32+rdx]
  1249. mov r10,QWORD PTR[40+rdx]
  1250. mov r11,QWORD PTR[48+rdx]
  1251. shl r9,4
  1252. shl r10,33
  1253. mov r8,r11
  1254. shl r11,62
  1255. shr r8,2
  1256. add rax,r9
  1257. add rax,r10
  1258. add rax,r11
  1259. adc r8,0
  1260. mov QWORD PTR[72+rcx],rax
  1261. mov rax,r8
  1262. mov r9,QWORD PTR[56+rdx]
  1263. mov r10,QWORD PTR[64+rdx]
  1264. shl r9,27
  1265. mov r11,r10
  1266. shl r10,56
  1267. shr r11,8
  1268. add rax,r9
  1269. add rax,r10
  1270. adc r11,0
  1271. mov QWORD PTR[80+rcx],rax
  1272. mov rax,r11
  1273. mov r8,QWORD PTR[72+rdx]
  1274. mov r9,QWORD PTR[80+rdx]
  1275. shl r8,21
  1276. mov r10,r9
  1277. shl r9,50
  1278. shr r10,14
  1279. add rax,r8
  1280. add rax,r9
  1281. adc r10,0
  1282. mov QWORD PTR[88+rcx],rax
  1283. mov rax,r10
  1284. mov r11,QWORD PTR[88+rdx]
  1285. mov r8,QWORD PTR[96+rdx]
  1286. shl r11,15
  1287. mov r9,r8
  1288. shl r8,44
  1289. shr r9,20
  1290. add rax,r11
  1291. add rax,r8
  1292. adc r9,0
  1293. mov QWORD PTR[96+rcx],rax
  1294. mov rax,r9
  1295. mov r10,QWORD PTR[104+rdx]
  1296. mov r11,QWORD PTR[112+rdx]
  1297. shl r10,9
  1298. mov r8,r11
  1299. shl r11,38
  1300. shr r8,26
  1301. add rax,r10
  1302. add rax,r11
  1303. adc r8,0
  1304. mov QWORD PTR[104+rcx],rax
  1305. mov rax,r8
  1306. mov r9,QWORD PTR[120+rdx]
  1307. mov r10,QWORD PTR[128+rdx]
  1308. mov r11,QWORD PTR[136+rdx]
  1309. shl r9,3
  1310. shl r10,32
  1311. mov r8,r11
  1312. shl r11,61
  1313. shr r8,3
  1314. add rax,r9
  1315. add rax,r10
  1316. add rax,r11
  1317. adc r8,0
  1318. mov QWORD PTR[112+rcx],rax
  1319. mov rax,r8
  1320. mov r9,QWORD PTR[144+rdx]
  1321. mov r10,QWORD PTR[152+rdx]
  1322. shl r9,26
  1323. mov r11,r10
  1324. shl r10,55
  1325. shr r11,9
  1326. add rax,r9
  1327. add rax,r10
  1328. adc r11,0
  1329. mov QWORD PTR[120+rcx],rax
  1330. mov rax,r11
  1331. DB 0F3h,0C3h ;repret
  1332. rsaz_1024_red2norm_avx2 ENDP
  1333. PUBLIC rsaz_1024_norm2red_avx2
  1334. ALIGN 32
  1335. rsaz_1024_norm2red_avx2 PROC PUBLIC
  1336. sub rcx,-128
  1337. mov r8,QWORD PTR[rdx]
  1338. mov eax,01fffffffh
  1339. mov r9,QWORD PTR[8+rdx]
  1340. mov r11,r8
  1341. shr r11,0
  1342. and r11,rax
  1343. mov QWORD PTR[((-128))+rcx],r11
  1344. mov r10,r8
  1345. shr r10,29
  1346. and r10,rax
  1347. mov QWORD PTR[((-120))+rcx],r10
  1348. shrd r8,r9,58
  1349. and r8,rax
  1350. mov QWORD PTR[((-112))+rcx],r8
  1351. mov r10,QWORD PTR[16+rdx]
  1352. mov r8,r9
  1353. shr r8,23
  1354. and r8,rax
  1355. mov QWORD PTR[((-104))+rcx],r8
  1356. shrd r9,r10,52
  1357. and r9,rax
  1358. mov QWORD PTR[((-96))+rcx],r9
  1359. mov r11,QWORD PTR[24+rdx]
  1360. mov r9,r10
  1361. shr r9,17
  1362. and r9,rax
  1363. mov QWORD PTR[((-88))+rcx],r9
  1364. shrd r10,r11,46
  1365. and r10,rax
  1366. mov QWORD PTR[((-80))+rcx],r10
  1367. mov r8,QWORD PTR[32+rdx]
  1368. mov r10,r11
  1369. shr r10,11
  1370. and r10,rax
  1371. mov QWORD PTR[((-72))+rcx],r10
  1372. shrd r11,r8,40
  1373. and r11,rax
  1374. mov QWORD PTR[((-64))+rcx],r11
  1375. mov r9,QWORD PTR[40+rdx]
  1376. mov r11,r8
  1377. shr r11,5
  1378. and r11,rax
  1379. mov QWORD PTR[((-56))+rcx],r11
  1380. mov r10,r8
  1381. shr r10,34
  1382. and r10,rax
  1383. mov QWORD PTR[((-48))+rcx],r10
  1384. shrd r8,r9,63
  1385. and r8,rax
  1386. mov QWORD PTR[((-40))+rcx],r8
  1387. mov r10,QWORD PTR[48+rdx]
  1388. mov r8,r9
  1389. shr r8,28
  1390. and r8,rax
  1391. mov QWORD PTR[((-32))+rcx],r8
  1392. shrd r9,r10,57
  1393. and r9,rax
  1394. mov QWORD PTR[((-24))+rcx],r9
  1395. mov r11,QWORD PTR[56+rdx]
  1396. mov r9,r10
  1397. shr r9,22
  1398. and r9,rax
  1399. mov QWORD PTR[((-16))+rcx],r9
  1400. shrd r10,r11,51
  1401. and r10,rax
  1402. mov QWORD PTR[((-8))+rcx],r10
  1403. mov r8,QWORD PTR[64+rdx]
  1404. mov r10,r11
  1405. shr r10,16
  1406. and r10,rax
  1407. mov QWORD PTR[rcx],r10
  1408. shrd r11,r8,45
  1409. and r11,rax
  1410. mov QWORD PTR[8+rcx],r11
  1411. mov r9,QWORD PTR[72+rdx]
  1412. mov r11,r8
  1413. shr r11,10
  1414. and r11,rax
  1415. mov QWORD PTR[16+rcx],r11
  1416. shrd r8,r9,39
  1417. and r8,rax
  1418. mov QWORD PTR[24+rcx],r8
  1419. mov r10,QWORD PTR[80+rdx]
  1420. mov r8,r9
  1421. shr r8,4
  1422. and r8,rax
  1423. mov QWORD PTR[32+rcx],r8
  1424. mov r11,r9
  1425. shr r11,33
  1426. and r11,rax
  1427. mov QWORD PTR[40+rcx],r11
  1428. shrd r9,r10,62
  1429. and r9,rax
  1430. mov QWORD PTR[48+rcx],r9
  1431. mov r11,QWORD PTR[88+rdx]
  1432. mov r9,r10
  1433. shr r9,27
  1434. and r9,rax
  1435. mov QWORD PTR[56+rcx],r9
  1436. shrd r10,r11,56
  1437. and r10,rax
  1438. mov QWORD PTR[64+rcx],r10
  1439. mov r8,QWORD PTR[96+rdx]
  1440. mov r10,r11
  1441. shr r10,21
  1442. and r10,rax
  1443. mov QWORD PTR[72+rcx],r10
  1444. shrd r11,r8,50
  1445. and r11,rax
  1446. mov QWORD PTR[80+rcx],r11
  1447. mov r9,QWORD PTR[104+rdx]
  1448. mov r11,r8
  1449. shr r11,15
  1450. and r11,rax
  1451. mov QWORD PTR[88+rcx],r11
  1452. shrd r8,r9,44
  1453. and r8,rax
  1454. mov QWORD PTR[96+rcx],r8
  1455. mov r10,QWORD PTR[112+rdx]
  1456. mov r8,r9
  1457. shr r8,9
  1458. and r8,rax
  1459. mov QWORD PTR[104+rcx],r8
  1460. shrd r9,r10,38
  1461. and r9,rax
  1462. mov QWORD PTR[112+rcx],r9
  1463. mov r11,QWORD PTR[120+rdx]
  1464. mov r9,r10
  1465. shr r9,3
  1466. and r9,rax
  1467. mov QWORD PTR[120+rcx],r9
  1468. mov r8,r10
  1469. shr r8,32
  1470. and r8,rax
  1471. mov QWORD PTR[128+rcx],r8
  1472. shrd r10,r11,61
  1473. and r10,rax
  1474. mov QWORD PTR[136+rcx],r10
  1475. xor r8,r8
  1476. mov r10,r11
  1477. shr r10,26
  1478. and r10,rax
  1479. mov QWORD PTR[144+rcx],r10
  1480. shrd r11,r8,55
  1481. and r11,rax
  1482. mov QWORD PTR[152+rcx],r11
  1483. mov QWORD PTR[160+rcx],r8
  1484. mov QWORD PTR[168+rcx],r8
  1485. mov QWORD PTR[176+rcx],r8
  1486. mov QWORD PTR[184+rcx],r8
  1487. DB 0F3h,0C3h ;repret
  1488. rsaz_1024_norm2red_avx2 ENDP
  1489. PUBLIC rsaz_1024_scatter5_avx2
  1490. ALIGN 32
  1491. rsaz_1024_scatter5_avx2 PROC PUBLIC
  1492. vzeroupper
  1493. vmovdqu ymm5,YMMWORD PTR[$L$scatter_permd]
  1494. shl r8d,4
  1495. lea rcx,QWORD PTR[r8*1+rcx]
  1496. mov eax,9
  1497. jmp $L$oop_scatter_1024
  1498. ALIGN 32
  1499. $L$oop_scatter_1024::
  1500. vmovdqu ymm0,YMMWORD PTR[rdx]
  1501. lea rdx,QWORD PTR[32+rdx]
  1502. vpermd ymm0,ymm5,ymm0
  1503. vmovdqu XMMWORD PTR[rcx],xmm0
  1504. lea rcx,QWORD PTR[512+rcx]
  1505. dec eax
  1506. jnz $L$oop_scatter_1024
  1507. vzeroupper
  1508. DB 0F3h,0C3h ;repret
  1509. rsaz_1024_scatter5_avx2 ENDP
  1510. PUBLIC rsaz_1024_gather5_avx2
  1511. ALIGN 32
  1512. rsaz_1024_gather5_avx2 PROC PUBLIC
  1513. vzeroupper
  1514. mov r11,rsp
  1515. lea rax,QWORD PTR[((-136))+rsp]
  1516. $L$SEH_begin_rsaz_1024_gather5::
  1517. DB 048h,08dh,060h,0e0h
  1518. DB 0c5h,0f8h,029h,070h,0e0h
  1519. DB 0c5h,0f8h,029h,078h,0f0h
  1520. DB 0c5h,078h,029h,040h,000h
  1521. DB 0c5h,078h,029h,048h,010h
  1522. DB 0c5h,078h,029h,050h,020h
  1523. DB 0c5h,078h,029h,058h,030h
  1524. DB 0c5h,078h,029h,060h,040h
  1525. DB 0c5h,078h,029h,068h,050h
  1526. DB 0c5h,078h,029h,070h,060h
  1527. DB 0c5h,078h,029h,078h,070h
  1528. lea rsp,QWORD PTR[((-256))+rsp]
  1529. and rsp,-32
  1530. lea r10,QWORD PTR[$L$inc]
  1531. lea rax,QWORD PTR[((-128))+rsp]
  1532. vmovd xmm4,r8d
  1533. vmovdqa ymm0,YMMWORD PTR[r10]
  1534. vmovdqa ymm1,YMMWORD PTR[32+r10]
  1535. vmovdqa ymm5,YMMWORD PTR[64+r10]
  1536. vpbroadcastd ymm4,xmm4
  1537. vpaddd ymm2,ymm0,ymm5
  1538. vpcmpeqd ymm0,ymm0,ymm4
  1539. vpaddd ymm3,ymm1,ymm5
  1540. vpcmpeqd ymm1,ymm1,ymm4
  1541. vmovdqa YMMWORD PTR[(0+128)+rax],ymm0
  1542. vpaddd ymm0,ymm2,ymm5
  1543. vpcmpeqd ymm2,ymm2,ymm4
  1544. vmovdqa YMMWORD PTR[(32+128)+rax],ymm1
  1545. vpaddd ymm1,ymm3,ymm5
  1546. vpcmpeqd ymm3,ymm3,ymm4
  1547. vmovdqa YMMWORD PTR[(64+128)+rax],ymm2
  1548. vpaddd ymm2,ymm0,ymm5
  1549. vpcmpeqd ymm0,ymm0,ymm4
  1550. vmovdqa YMMWORD PTR[(96+128)+rax],ymm3
  1551. vpaddd ymm3,ymm1,ymm5
  1552. vpcmpeqd ymm1,ymm1,ymm4
  1553. vmovdqa YMMWORD PTR[(128+128)+rax],ymm0
  1554. vpaddd ymm8,ymm2,ymm5
  1555. vpcmpeqd ymm2,ymm2,ymm4
  1556. vmovdqa YMMWORD PTR[(160+128)+rax],ymm1
  1557. vpaddd ymm9,ymm3,ymm5
  1558. vpcmpeqd ymm3,ymm3,ymm4
  1559. vmovdqa YMMWORD PTR[(192+128)+rax],ymm2
  1560. vpaddd ymm10,ymm8,ymm5
  1561. vpcmpeqd ymm8,ymm8,ymm4
  1562. vmovdqa YMMWORD PTR[(224+128)+rax],ymm3
  1563. vpaddd ymm11,ymm9,ymm5
  1564. vpcmpeqd ymm9,ymm9,ymm4
  1565. vpaddd ymm12,ymm10,ymm5
  1566. vpcmpeqd ymm10,ymm10,ymm4
  1567. vpaddd ymm13,ymm11,ymm5
  1568. vpcmpeqd ymm11,ymm11,ymm4
  1569. vpaddd ymm14,ymm12,ymm5
  1570. vpcmpeqd ymm12,ymm12,ymm4
  1571. vpaddd ymm15,ymm13,ymm5
  1572. vpcmpeqd ymm13,ymm13,ymm4
  1573. vpcmpeqd ymm14,ymm14,ymm4
  1574. vpcmpeqd ymm15,ymm15,ymm4
  1575. vmovdqa ymm7,YMMWORD PTR[((-32))+r10]
  1576. lea rdx,QWORD PTR[128+rdx]
  1577. mov r8d,9
  1578. $L$oop_gather_1024::
  1579. vmovdqa ymm0,YMMWORD PTR[((0-128))+rdx]
  1580. vmovdqa ymm1,YMMWORD PTR[((32-128))+rdx]
  1581. vmovdqa ymm2,YMMWORD PTR[((64-128))+rdx]
  1582. vmovdqa ymm3,YMMWORD PTR[((96-128))+rdx]
  1583. vpand ymm0,ymm0,YMMWORD PTR[((0+128))+rax]
  1584. vpand ymm1,ymm1,YMMWORD PTR[((32+128))+rax]
  1585. vpand ymm2,ymm2,YMMWORD PTR[((64+128))+rax]
  1586. vpor ymm4,ymm1,ymm0
  1587. vpand ymm3,ymm3,YMMWORD PTR[((96+128))+rax]
  1588. vmovdqa ymm0,YMMWORD PTR[((128-128))+rdx]
  1589. vmovdqa ymm1,YMMWORD PTR[((160-128))+rdx]
  1590. vpor ymm5,ymm3,ymm2
  1591. vmovdqa ymm2,YMMWORD PTR[((192-128))+rdx]
  1592. vmovdqa ymm3,YMMWORD PTR[((224-128))+rdx]
  1593. vpand ymm0,ymm0,YMMWORD PTR[((128+128))+rax]
  1594. vpand ymm1,ymm1,YMMWORD PTR[((160+128))+rax]
  1595. vpand ymm2,ymm2,YMMWORD PTR[((192+128))+rax]
  1596. vpor ymm4,ymm4,ymm0
  1597. vpand ymm3,ymm3,YMMWORD PTR[((224+128))+rax]
  1598. vpand ymm0,ymm8,YMMWORD PTR[((256-128))+rdx]
  1599. vpor ymm5,ymm5,ymm1
  1600. vpand ymm1,ymm9,YMMWORD PTR[((288-128))+rdx]
  1601. vpor ymm4,ymm4,ymm2
  1602. vpand ymm2,ymm10,YMMWORD PTR[((320-128))+rdx]
  1603. vpor ymm5,ymm5,ymm3
  1604. vpand ymm3,ymm11,YMMWORD PTR[((352-128))+rdx]
  1605. vpor ymm4,ymm4,ymm0
  1606. vpand ymm0,ymm12,YMMWORD PTR[((384-128))+rdx]
  1607. vpor ymm5,ymm5,ymm1
  1608. vpand ymm1,ymm13,YMMWORD PTR[((416-128))+rdx]
  1609. vpor ymm4,ymm4,ymm2
  1610. vpand ymm2,ymm14,YMMWORD PTR[((448-128))+rdx]
  1611. vpor ymm5,ymm5,ymm3
  1612. vpand ymm3,ymm15,YMMWORD PTR[((480-128))+rdx]
  1613. lea rdx,QWORD PTR[512+rdx]
  1614. vpor ymm4,ymm4,ymm0
  1615. vpor ymm5,ymm5,ymm1
  1616. vpor ymm4,ymm4,ymm2
  1617. vpor ymm5,ymm5,ymm3
  1618. vpor ymm4,ymm4,ymm5
  1619. vextracti128 xmm5,ymm4,1
  1620. vpor xmm5,xmm5,xmm4
  1621. vpermd ymm5,ymm7,ymm5
  1622. vmovdqu YMMWORD PTR[rcx],ymm5
  1623. lea rcx,QWORD PTR[32+rcx]
  1624. dec r8d
  1625. jnz $L$oop_gather_1024
  1626. vpxor ymm0,ymm0,ymm0
  1627. vmovdqu YMMWORD PTR[rcx],ymm0
  1628. vzeroupper
  1629. movaps xmm6,XMMWORD PTR[((-168))+r11]
  1630. movaps xmm7,XMMWORD PTR[((-152))+r11]
  1631. movaps xmm8,XMMWORD PTR[((-136))+r11]
  1632. movaps xmm9,XMMWORD PTR[((-120))+r11]
  1633. movaps xmm10,XMMWORD PTR[((-104))+r11]
  1634. movaps xmm11,XMMWORD PTR[((-88))+r11]
  1635. movaps xmm12,XMMWORD PTR[((-72))+r11]
  1636. movaps xmm13,XMMWORD PTR[((-56))+r11]
  1637. movaps xmm14,XMMWORD PTR[((-40))+r11]
  1638. movaps xmm15,XMMWORD PTR[((-24))+r11]
  1639. lea rsp,QWORD PTR[r11]
  1640. DB 0F3h,0C3h ;repret
  1641. $L$SEH_end_rsaz_1024_gather5::
  1642. rsaz_1024_gather5_avx2 ENDP
  1643. EXTERN OPENSSL_ia32cap_P:NEAR
  1644. PUBLIC rsaz_avx2_eligible
  1645. ALIGN 32
  1646. rsaz_avx2_eligible PROC PUBLIC
  1647. mov eax,DWORD PTR[((OPENSSL_ia32cap_P+8))]
  1648. mov ecx,524544
  1649. mov edx,0
  1650. and ecx,eax
  1651. cmp ecx,524544
  1652. cmove eax,edx
  1653. and eax,32
  1654. shr eax,5
  1655. DB 0F3h,0C3h ;repret
  1656. rsaz_avx2_eligible ENDP
  1657. ALIGN 64
  1658. $L$and_mask::
  1659. DQ 01fffffffh,01fffffffh,01fffffffh,01fffffffh
  1660. $L$scatter_permd::
  1661. DD 0,2,4,6,7,7,7,7
  1662. $L$gather_permd::
  1663. DD 0,7,1,7,2,7,3,7
  1664. $L$inc::
  1665. DD 0,0,0,0,1,1,1,1
  1666. DD 2,2,2,2,3,3,3,3
  1667. DD 4,4,4,4,4,4,4,4
  1668. ALIGN 64
  1669. EXTERN __imp_RtlVirtualUnwind:NEAR
  1670. ALIGN 16
  1671. rsaz_se_handler PROC PRIVATE
  1672. push rsi
  1673. push rdi
  1674. push rbx
  1675. push rbp
  1676. push r12
  1677. push r13
  1678. push r14
  1679. push r15
  1680. pushfq
  1681. sub rsp,64
  1682. mov rax,QWORD PTR[120+r8]
  1683. mov rbx,QWORD PTR[248+r8]
  1684. mov rsi,QWORD PTR[8+r9]
  1685. mov r11,QWORD PTR[56+r9]
  1686. mov r10d,DWORD PTR[r11]
  1687. lea r10,QWORD PTR[r10*1+rsi]
  1688. cmp rbx,r10
  1689. jb $L$common_seh_tail
  1690. mov r10d,DWORD PTR[4+r11]
  1691. lea r10,QWORD PTR[r10*1+rsi]
  1692. cmp rbx,r10
  1693. jae $L$common_seh_tail
  1694. mov rbp,QWORD PTR[160+r8]
  1695. mov r10d,DWORD PTR[8+r11]
  1696. lea r10,QWORD PTR[r10*1+rsi]
  1697. cmp rbx,r10
  1698. cmovc rax,rbp
  1699. mov r15,QWORD PTR[((-48))+rax]
  1700. mov r14,QWORD PTR[((-40))+rax]
  1701. mov r13,QWORD PTR[((-32))+rax]
  1702. mov r12,QWORD PTR[((-24))+rax]
  1703. mov rbp,QWORD PTR[((-16))+rax]
  1704. mov rbx,QWORD PTR[((-8))+rax]
  1705. mov QWORD PTR[240+r8],r15
  1706. mov QWORD PTR[232+r8],r14
  1707. mov QWORD PTR[224+r8],r13
  1708. mov QWORD PTR[216+r8],r12
  1709. mov QWORD PTR[160+r8],rbp
  1710. mov QWORD PTR[144+r8],rbx
  1711. lea rsi,QWORD PTR[((-216))+rax]
  1712. lea rdi,QWORD PTR[512+r8]
  1713. mov ecx,20
  1714. DD 0a548f3fch
  1715. $L$common_seh_tail::
  1716. mov rdi,QWORD PTR[8+rax]
  1717. mov rsi,QWORD PTR[16+rax]
  1718. mov QWORD PTR[152+r8],rax
  1719. mov QWORD PTR[168+r8],rsi
  1720. mov QWORD PTR[176+r8],rdi
  1721. mov rdi,QWORD PTR[40+r9]
  1722. mov rsi,r8
  1723. mov ecx,154
  1724. DD 0a548f3fch
  1725. mov rsi,r9
  1726. xor rcx,rcx
  1727. mov rdx,QWORD PTR[8+rsi]
  1728. mov r8,QWORD PTR[rsi]
  1729. mov r9,QWORD PTR[16+rsi]
  1730. mov r10,QWORD PTR[40+rsi]
  1731. lea r11,QWORD PTR[56+rsi]
  1732. lea r12,QWORD PTR[24+rsi]
  1733. mov QWORD PTR[32+rsp],r10
  1734. mov QWORD PTR[40+rsp],r11
  1735. mov QWORD PTR[48+rsp],r12
  1736. mov QWORD PTR[56+rsp],rcx
  1737. call QWORD PTR[__imp_RtlVirtualUnwind]
  1738. mov eax,1
  1739. add rsp,64
  1740. popfq
  1741. pop r15
  1742. pop r14
  1743. pop r13
  1744. pop r12
  1745. pop rbp
  1746. pop rbx
  1747. pop rdi
  1748. pop rsi
  1749. DB 0F3h,0C3h ;repret
  1750. rsaz_se_handler ENDP
  1751. .text$ ENDS
  1752. .pdata SEGMENT READONLY ALIGN(4)
  1753. ALIGN 4
  1754. DD imagerel $L$SEH_begin_rsaz_1024_sqr_avx2
  1755. DD imagerel $L$SEH_end_rsaz_1024_sqr_avx2
  1756. DD imagerel $L$SEH_info_rsaz_1024_sqr_avx2
  1757. DD imagerel $L$SEH_begin_rsaz_1024_mul_avx2
  1758. DD imagerel $L$SEH_end_rsaz_1024_mul_avx2
  1759. DD imagerel $L$SEH_info_rsaz_1024_mul_avx2
  1760. DD imagerel $L$SEH_begin_rsaz_1024_gather5
  1761. DD imagerel $L$SEH_end_rsaz_1024_gather5
  1762. DD imagerel $L$SEH_info_rsaz_1024_gather5
  1763. .pdata ENDS
  1764. .xdata SEGMENT READONLY ALIGN(8)
  1765. ALIGN 8
  1766. $L$SEH_info_rsaz_1024_sqr_avx2::
  1767. DB 9,0,0,0
  1768. DD imagerel rsaz_se_handler
  1769. DD imagerel $L$sqr_1024_body,imagerel $L$sqr_1024_epilogue,imagerel $L$sqr_1024_in_tail
  1770. DD 0
  1771. $L$SEH_info_rsaz_1024_mul_avx2::
  1772. DB 9,0,0,0
  1773. DD imagerel rsaz_se_handler
  1774. DD imagerel $L$mul_1024_body,imagerel $L$mul_1024_epilogue,imagerel $L$mul_1024_in_tail
  1775. DD 0
  1776. $L$SEH_info_rsaz_1024_gather5::
  1777. DB 001h,036h,017h,00bh
  1778. DB 036h,0f8h,009h,000h
  1779. DB 031h,0e8h,008h,000h
  1780. DB 02ch,0d8h,007h,000h
  1781. DB 027h,0c8h,006h,000h
  1782. DB 022h,0b8h,005h,000h
  1783. DB 01dh,0a8h,004h,000h
  1784. DB 018h,098h,003h,000h
  1785. DB 013h,088h,002h,000h
  1786. DB 00eh,078h,001h,000h
  1787. DB 009h,068h,000h,000h
  1788. DB 004h,001h,015h,000h
  1789. DB 000h,0b3h,000h,000h
  1790. .xdata ENDS
  1791. END