Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

1938 rindas
34 KiB

  1. /* Copyright (c) 2015, Google Inc.
  2. *
  3. * Permission to use, copy, modify, and/or distribute this software for any
  4. * purpose with or without fee is hereby granted, provided that the above
  5. * copyright notice and this permission notice appear in all copies.
  6. *
  7. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  10. * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  12. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  13. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
  14. /* This file is adapted from crypto_scalarmult/curve25519/amd64-51/ in
  15. * SUPERCOP 20141124 (http://bench.cr.yp.to/supercop.html). That code is public
  16. * domain licensed but the standard ISC license is included above to keep
  17. * licensing simple. */
  18. #if !defined(OPENSSL_NO_ASM)
  19. #if defined(__x86_64__)
  20. .data
  21. .p2align 4
  22. #if defined(__APPLE__)
  23. /* OS X's C ABI prefixes functions with underscore. */
  24. #define C_ABI(x) _ ## x
  25. #define HIDDEN .private_extern
  26. #else
  27. #define C_ABI(x) x
  28. #define HIDDEN .hidden
  29. #endif
  30. x25519_x86_64_REDMASK51: .quad 0x0007FFFFFFFFFFFF
  31. x25519_x86_64_121666_213: .quad 996687872
  32. x25519_x86_64_2P0: .quad 0xFFFFFFFFFFFDA
  33. x25519_x86_64_2P1234: .quad 0xFFFFFFFFFFFFE
  34. x25519_x86_64_4P0: .quad 0x1FFFFFFFFFFFB4
  35. x25519_x86_64_4P1234: .quad 0x1FFFFFFFFFFFFC
  36. x25519_x86_64_MU0: .quad 0xED9CE5A30A2C131B
  37. x25519_x86_64_MU1: .quad 0x2106215D086329A7
  38. x25519_x86_64_MU2: .quad 0xFFFFFFFFFFFFFFEB
  39. x25519_x86_64_MU3: .quad 0xFFFFFFFFFFFFFFFF
  40. x25519_x86_64_MU4: .quad 0x000000000000000F
  41. x25519_x86_64_ORDER0: .quad 0x5812631A5CF5D3ED
  42. x25519_x86_64_ORDER1: .quad 0x14DEF9DEA2F79CD6
  43. x25519_x86_64_ORDER2: .quad 0x0000000000000000
  44. x25519_x86_64_ORDER3: .quad 0x1000000000000000
  45. x25519_x86_64_EC2D0: .quad 1859910466990425
  46. x25519_x86_64_EC2D1: .quad 932731440258426
  47. x25519_x86_64_EC2D2: .quad 1072319116312658
  48. x25519_x86_64_EC2D3: .quad 1815898335770999
  49. x25519_x86_64_EC2D4: .quad 633789495995903
  50. x25519_x86_64__38: .quad 38
  51. .text
  52. .p2align 5
  53. .globl C_ABI(x25519_x86_64_freeze)
  54. HIDDEN C_ABI(x25519_x86_64_freeze)
  55. C_ABI(x25519_x86_64_freeze):
  56. mov %rsp,%r11
  57. and $31,%r11
  58. add $64,%r11
  59. sub %r11,%rsp
  60. movq %r11,0(%rsp)
  61. movq %r12,8(%rsp)
  62. movq %r13,16(%rsp)
  63. movq %r14,24(%rsp)
  64. movq %r15,32(%rsp)
  65. movq %rbx,40(%rsp)
  66. movq %rbp,48(%rsp)
  67. movq 0(%rdi),%rsi
  68. movq 8(%rdi),%rdx
  69. movq 16(%rdi),%rcx
  70. movq 24(%rdi),%r8
  71. movq 32(%rdi),%r9
  72. movq x25519_x86_64_REDMASK51(%rip),%rax
  73. mov %rax,%r10
  74. sub $18,%r10
  75. mov $3,%r11
  76. ._reduceloop:
  77. mov %rsi,%r12
  78. shr $51,%r12
  79. and %rax,%rsi
  80. add %r12,%rdx
  81. mov %rdx,%r12
  82. shr $51,%r12
  83. and %rax,%rdx
  84. add %r12,%rcx
  85. mov %rcx,%r12
  86. shr $51,%r12
  87. and %rax,%rcx
  88. add %r12,%r8
  89. mov %r8,%r12
  90. shr $51,%r12
  91. and %rax,%r8
  92. add %r12,%r9
  93. mov %r9,%r12
  94. shr $51,%r12
  95. and %rax,%r9
  96. imulq $19,%r12,%r12
  97. add %r12,%rsi
  98. sub $1,%r11
  99. ja ._reduceloop
  100. mov $1,%r12
  101. cmp %r10,%rsi
  102. cmovl %r11,%r12
  103. cmp %rax,%rdx
  104. cmovne %r11,%r12
  105. cmp %rax,%rcx
  106. cmovne %r11,%r12
  107. cmp %rax,%r8
  108. cmovne %r11,%r12
  109. cmp %rax,%r9
  110. cmovne %r11,%r12
  111. neg %r12
  112. and %r12,%rax
  113. and %r12,%r10
  114. sub %r10,%rsi
  115. sub %rax,%rdx
  116. sub %rax,%rcx
  117. sub %rax,%r8
  118. sub %rax,%r9
  119. movq %rsi,0(%rdi)
  120. movq %rdx,8(%rdi)
  121. movq %rcx,16(%rdi)
  122. movq %r8,24(%rdi)
  123. movq %r9,32(%rdi)
  124. movq 0(%rsp),%r11
  125. movq 8(%rsp),%r12
  126. movq 16(%rsp),%r13
  127. movq 24(%rsp),%r14
  128. movq 32(%rsp),%r15
  129. movq 40(%rsp),%rbx
  130. movq 48(%rsp),%rbp
  131. add %r11,%rsp
  132. mov %rdi,%rax
  133. mov %rsi,%rdx
  134. ret
  135. .p2align 5
  136. .globl C_ABI(x25519_x86_64_mul)
  137. HIDDEN C_ABI(x25519_x86_64_mul)
  138. C_ABI(x25519_x86_64_mul):
  139. mov %rsp,%r11
  140. and $31,%r11
  141. add $96,%r11
  142. sub %r11,%rsp
  143. movq %r11,0(%rsp)
  144. movq %r12,8(%rsp)
  145. movq %r13,16(%rsp)
  146. movq %r14,24(%rsp)
  147. movq %r15,32(%rsp)
  148. movq %rbx,40(%rsp)
  149. movq %rbp,48(%rsp)
  150. movq %rdi,56(%rsp)
  151. mov %rdx,%rcx
  152. movq 24(%rsi),%rdx
  153. imulq $19,%rdx,%rax
  154. movq %rax,64(%rsp)
  155. mulq 16(%rcx)
  156. mov %rax,%r8
  157. mov %rdx,%r9
  158. movq 32(%rsi),%rdx
  159. imulq $19,%rdx,%rax
  160. movq %rax,72(%rsp)
  161. mulq 8(%rcx)
  162. add %rax,%r8
  163. adc %rdx,%r9
  164. movq 0(%rsi),%rax
  165. mulq 0(%rcx)
  166. add %rax,%r8
  167. adc %rdx,%r9
  168. movq 0(%rsi),%rax
  169. mulq 8(%rcx)
  170. mov %rax,%r10
  171. mov %rdx,%r11
  172. movq 0(%rsi),%rax
  173. mulq 16(%rcx)
  174. mov %rax,%r12
  175. mov %rdx,%r13
  176. movq 0(%rsi),%rax
  177. mulq 24(%rcx)
  178. mov %rax,%r14
  179. mov %rdx,%r15
  180. movq 0(%rsi),%rax
  181. mulq 32(%rcx)
  182. mov %rax,%rbx
  183. mov %rdx,%rbp
  184. movq 8(%rsi),%rax
  185. mulq 0(%rcx)
  186. add %rax,%r10
  187. adc %rdx,%r11
  188. movq 8(%rsi),%rax
  189. mulq 8(%rcx)
  190. add %rax,%r12
  191. adc %rdx,%r13
  192. movq 8(%rsi),%rax
  193. mulq 16(%rcx)
  194. add %rax,%r14
  195. adc %rdx,%r15
  196. movq 8(%rsi),%rax
  197. mulq 24(%rcx)
  198. add %rax,%rbx
  199. adc %rdx,%rbp
  200. movq 8(%rsi),%rdx
  201. imulq $19,%rdx,%rax
  202. mulq 32(%rcx)
  203. add %rax,%r8
  204. adc %rdx,%r9
  205. movq 16(%rsi),%rax
  206. mulq 0(%rcx)
  207. add %rax,%r12
  208. adc %rdx,%r13
  209. movq 16(%rsi),%rax
  210. mulq 8(%rcx)
  211. add %rax,%r14
  212. adc %rdx,%r15
  213. movq 16(%rsi),%rax
  214. mulq 16(%rcx)
  215. add %rax,%rbx
  216. adc %rdx,%rbp
  217. movq 16(%rsi),%rdx
  218. imulq $19,%rdx,%rax
  219. mulq 24(%rcx)
  220. add %rax,%r8
  221. adc %rdx,%r9
  222. movq 16(%rsi),%rdx
  223. imulq $19,%rdx,%rax
  224. mulq 32(%rcx)
  225. add %rax,%r10
  226. adc %rdx,%r11
  227. movq 24(%rsi),%rax
  228. mulq 0(%rcx)
  229. add %rax,%r14
  230. adc %rdx,%r15
  231. movq 24(%rsi),%rax
  232. mulq 8(%rcx)
  233. add %rax,%rbx
  234. adc %rdx,%rbp
  235. movq 64(%rsp),%rax
  236. mulq 24(%rcx)
  237. add %rax,%r10
  238. adc %rdx,%r11
  239. movq 64(%rsp),%rax
  240. mulq 32(%rcx)
  241. add %rax,%r12
  242. adc %rdx,%r13
  243. movq 32(%rsi),%rax
  244. mulq 0(%rcx)
  245. add %rax,%rbx
  246. adc %rdx,%rbp
  247. movq 72(%rsp),%rax
  248. mulq 16(%rcx)
  249. add %rax,%r10
  250. adc %rdx,%r11
  251. movq 72(%rsp),%rax
  252. mulq 24(%rcx)
  253. add %rax,%r12
  254. adc %rdx,%r13
  255. movq 72(%rsp),%rax
  256. mulq 32(%rcx)
  257. add %rax,%r14
  258. adc %rdx,%r15
  259. movq x25519_x86_64_REDMASK51(%rip),%rsi
  260. shld $13,%r8,%r9
  261. and %rsi,%r8
  262. shld $13,%r10,%r11
  263. and %rsi,%r10
  264. add %r9,%r10
  265. shld $13,%r12,%r13
  266. and %rsi,%r12
  267. add %r11,%r12
  268. shld $13,%r14,%r15
  269. and %rsi,%r14
  270. add %r13,%r14
  271. shld $13,%rbx,%rbp
  272. and %rsi,%rbx
  273. add %r15,%rbx
  274. imulq $19,%rbp,%rdx
  275. add %rdx,%r8
  276. mov %r8,%rdx
  277. shr $51,%rdx
  278. add %r10,%rdx
  279. mov %rdx,%rcx
  280. shr $51,%rdx
  281. and %rsi,%r8
  282. add %r12,%rdx
  283. mov %rdx,%r9
  284. shr $51,%rdx
  285. and %rsi,%rcx
  286. add %r14,%rdx
  287. mov %rdx,%rax
  288. shr $51,%rdx
  289. and %rsi,%r9
  290. add %rbx,%rdx
  291. mov %rdx,%r10
  292. shr $51,%rdx
  293. and %rsi,%rax
  294. imulq $19,%rdx,%rdx
  295. add %rdx,%r8
  296. and %rsi,%r10
  297. movq %r8,0(%rdi)
  298. movq %rcx,8(%rdi)
  299. movq %r9,16(%rdi)
  300. movq %rax,24(%rdi)
  301. movq %r10,32(%rdi)
  302. movq 0(%rsp),%r11
  303. movq 8(%rsp),%r12
  304. movq 16(%rsp),%r13
  305. movq 24(%rsp),%r14
  306. movq 32(%rsp),%r15
  307. movq 40(%rsp),%rbx
  308. movq 48(%rsp),%rbp
  309. add %r11,%rsp
  310. mov %rdi,%rax
  311. mov %rsi,%rdx
  312. ret
  313. .p2align 5
  314. .globl C_ABI(x25519_x86_64_square)
  315. HIDDEN C_ABI(x25519_x86_64_square)
  316. C_ABI(x25519_x86_64_square):
  317. mov %rsp,%r11
  318. and $31,%r11
  319. add $64,%r11
  320. sub %r11,%rsp
  321. movq %r11,0(%rsp)
  322. movq %r12,8(%rsp)
  323. movq %r13,16(%rsp)
  324. movq %r14,24(%rsp)
  325. movq %r15,32(%rsp)
  326. movq %rbx,40(%rsp)
  327. movq %rbp,48(%rsp)
  328. movq 0(%rsi),%rax
  329. mulq 0(%rsi)
  330. mov %rax,%rcx
  331. mov %rdx,%r8
  332. movq 0(%rsi),%rax
  333. shl $1,%rax
  334. mulq 8(%rsi)
  335. mov %rax,%r9
  336. mov %rdx,%r10
  337. movq 0(%rsi),%rax
  338. shl $1,%rax
  339. mulq 16(%rsi)
  340. mov %rax,%r11
  341. mov %rdx,%r12
  342. movq 0(%rsi),%rax
  343. shl $1,%rax
  344. mulq 24(%rsi)
  345. mov %rax,%r13
  346. mov %rdx,%r14
  347. movq 0(%rsi),%rax
  348. shl $1,%rax
  349. mulq 32(%rsi)
  350. mov %rax,%r15
  351. mov %rdx,%rbx
  352. movq 8(%rsi),%rax
  353. mulq 8(%rsi)
  354. add %rax,%r11
  355. adc %rdx,%r12
  356. movq 8(%rsi),%rax
  357. shl $1,%rax
  358. mulq 16(%rsi)
  359. add %rax,%r13
  360. adc %rdx,%r14
  361. movq 8(%rsi),%rax
  362. shl $1,%rax
  363. mulq 24(%rsi)
  364. add %rax,%r15
  365. adc %rdx,%rbx
  366. movq 8(%rsi),%rdx
  367. imulq $38,%rdx,%rax
  368. mulq 32(%rsi)
  369. add %rax,%rcx
  370. adc %rdx,%r8
  371. movq 16(%rsi),%rax
  372. mulq 16(%rsi)
  373. add %rax,%r15
  374. adc %rdx,%rbx
  375. movq 16(%rsi),%rdx
  376. imulq $38,%rdx,%rax
  377. mulq 24(%rsi)
  378. add %rax,%rcx
  379. adc %rdx,%r8
  380. movq 16(%rsi),%rdx
  381. imulq $38,%rdx,%rax
  382. mulq 32(%rsi)
  383. add %rax,%r9
  384. adc %rdx,%r10
  385. movq 24(%rsi),%rdx
  386. imulq $19,%rdx,%rax
  387. mulq 24(%rsi)
  388. add %rax,%r9
  389. adc %rdx,%r10
  390. movq 24(%rsi),%rdx
  391. imulq $38,%rdx,%rax
  392. mulq 32(%rsi)
  393. add %rax,%r11
  394. adc %rdx,%r12
  395. movq 32(%rsi),%rdx
  396. imulq $19,%rdx,%rax
  397. mulq 32(%rsi)
  398. add %rax,%r13
  399. adc %rdx,%r14
  400. movq x25519_x86_64_REDMASK51(%rip),%rsi
  401. shld $13,%rcx,%r8
  402. and %rsi,%rcx
  403. shld $13,%r9,%r10
  404. and %rsi,%r9
  405. add %r8,%r9
  406. shld $13,%r11,%r12
  407. and %rsi,%r11
  408. add %r10,%r11
  409. shld $13,%r13,%r14
  410. and %rsi,%r13
  411. add %r12,%r13
  412. shld $13,%r15,%rbx
  413. and %rsi,%r15
  414. add %r14,%r15
  415. imulq $19,%rbx,%rdx
  416. add %rdx,%rcx
  417. mov %rcx,%rdx
  418. shr $51,%rdx
  419. add %r9,%rdx
  420. and %rsi,%rcx
  421. mov %rdx,%r8
  422. shr $51,%rdx
  423. add %r11,%rdx
  424. and %rsi,%r8
  425. mov %rdx,%r9
  426. shr $51,%rdx
  427. add %r13,%rdx
  428. and %rsi,%r9
  429. mov %rdx,%rax
  430. shr $51,%rdx
  431. add %r15,%rdx
  432. and %rsi,%rax
  433. mov %rdx,%r10
  434. shr $51,%rdx
  435. imulq $19,%rdx,%rdx
  436. add %rdx,%rcx
  437. and %rsi,%r10
  438. movq %rcx,0(%rdi)
  439. movq %r8,8(%rdi)
  440. movq %r9,16(%rdi)
  441. movq %rax,24(%rdi)
  442. movq %r10,32(%rdi)
  443. movq 0(%rsp),%r11
  444. movq 8(%rsp),%r12
  445. movq 16(%rsp),%r13
  446. movq 24(%rsp),%r14
  447. movq 32(%rsp),%r15
  448. movq 40(%rsp),%rbx
  449. movq 48(%rsp),%rbp
  450. add %r11,%rsp
  451. mov %rdi,%rax
  452. mov %rsi,%rdx
  453. ret
  454. .p2align 5
  455. .globl C_ABI(x25519_x86_64_ladderstep)
  456. HIDDEN C_ABI(x25519_x86_64_ladderstep)
  457. C_ABI(x25519_x86_64_ladderstep):
  458. mov %rsp,%r11
  459. and $31,%r11
  460. add $352,%r11
  461. sub %r11,%rsp
  462. movq %r11,0(%rsp)
  463. movq %r12,8(%rsp)
  464. movq %r13,16(%rsp)
  465. movq %r14,24(%rsp)
  466. movq %r15,32(%rsp)
  467. movq %rbx,40(%rsp)
  468. movq %rbp,48(%rsp)
  469. movq 40(%rdi),%rsi
  470. movq 48(%rdi),%rdx
  471. movq 56(%rdi),%rcx
  472. movq 64(%rdi),%r8
  473. movq 72(%rdi),%r9
  474. mov %rsi,%rax
  475. mov %rdx,%r10
  476. mov %rcx,%r11
  477. mov %r8,%r12
  478. mov %r9,%r13
  479. add x25519_x86_64_2P0(%rip),%rax
  480. add x25519_x86_64_2P1234(%rip),%r10
  481. add x25519_x86_64_2P1234(%rip),%r11
  482. add x25519_x86_64_2P1234(%rip),%r12
  483. add x25519_x86_64_2P1234(%rip),%r13
  484. addq 80(%rdi),%rsi
  485. addq 88(%rdi),%rdx
  486. addq 96(%rdi),%rcx
  487. addq 104(%rdi),%r8
  488. addq 112(%rdi),%r9
  489. subq 80(%rdi),%rax
  490. subq 88(%rdi),%r10
  491. subq 96(%rdi),%r11
  492. subq 104(%rdi),%r12
  493. subq 112(%rdi),%r13
  494. movq %rsi,56(%rsp)
  495. movq %rdx,64(%rsp)
  496. movq %rcx,72(%rsp)
  497. movq %r8,80(%rsp)
  498. movq %r9,88(%rsp)
  499. movq %rax,96(%rsp)
  500. movq %r10,104(%rsp)
  501. movq %r11,112(%rsp)
  502. movq %r12,120(%rsp)
  503. movq %r13,128(%rsp)
  504. movq 96(%rsp),%rax
  505. mulq 96(%rsp)
  506. mov %rax,%rsi
  507. mov %rdx,%rcx
  508. movq 96(%rsp),%rax
  509. shl $1,%rax
  510. mulq 104(%rsp)
  511. mov %rax,%r8
  512. mov %rdx,%r9
  513. movq 96(%rsp),%rax
  514. shl $1,%rax
  515. mulq 112(%rsp)
  516. mov %rax,%r10
  517. mov %rdx,%r11
  518. movq 96(%rsp),%rax
  519. shl $1,%rax
  520. mulq 120(%rsp)
  521. mov %rax,%r12
  522. mov %rdx,%r13
  523. movq 96(%rsp),%rax
  524. shl $1,%rax
  525. mulq 128(%rsp)
  526. mov %rax,%r14
  527. mov %rdx,%r15
  528. movq 104(%rsp),%rax
  529. mulq 104(%rsp)
  530. add %rax,%r10
  531. adc %rdx,%r11
  532. movq 104(%rsp),%rax
  533. shl $1,%rax
  534. mulq 112(%rsp)
  535. add %rax,%r12
  536. adc %rdx,%r13
  537. movq 104(%rsp),%rax
  538. shl $1,%rax
  539. mulq 120(%rsp)
  540. add %rax,%r14
  541. adc %rdx,%r15
  542. movq 104(%rsp),%rdx
  543. imulq $38,%rdx,%rax
  544. mulq 128(%rsp)
  545. add %rax,%rsi
  546. adc %rdx,%rcx
  547. movq 112(%rsp),%rax
  548. mulq 112(%rsp)
  549. add %rax,%r14
  550. adc %rdx,%r15
  551. movq 112(%rsp),%rdx
  552. imulq $38,%rdx,%rax
  553. mulq 120(%rsp)
  554. add %rax,%rsi
  555. adc %rdx,%rcx
  556. movq 112(%rsp),%rdx
  557. imulq $38,%rdx,%rax
  558. mulq 128(%rsp)
  559. add %rax,%r8
  560. adc %rdx,%r9
  561. movq 120(%rsp),%rdx
  562. imulq $19,%rdx,%rax
  563. mulq 120(%rsp)
  564. add %rax,%r8
  565. adc %rdx,%r9
  566. movq 120(%rsp),%rdx
  567. imulq $38,%rdx,%rax
  568. mulq 128(%rsp)
  569. add %rax,%r10
  570. adc %rdx,%r11
  571. movq 128(%rsp),%rdx
  572. imulq $19,%rdx,%rax
  573. mulq 128(%rsp)
  574. add %rax,%r12
  575. adc %rdx,%r13
  576. movq x25519_x86_64_REDMASK51(%rip),%rdx
  577. shld $13,%rsi,%rcx
  578. and %rdx,%rsi
  579. shld $13,%r8,%r9
  580. and %rdx,%r8
  581. add %rcx,%r8
  582. shld $13,%r10,%r11
  583. and %rdx,%r10
  584. add %r9,%r10
  585. shld $13,%r12,%r13
  586. and %rdx,%r12
  587. add %r11,%r12
  588. shld $13,%r14,%r15
  589. and %rdx,%r14
  590. add %r13,%r14
  591. imulq $19,%r15,%rcx
  592. add %rcx,%rsi
  593. mov %rsi,%rcx
  594. shr $51,%rcx
  595. add %r8,%rcx
  596. and %rdx,%rsi
  597. mov %rcx,%r8
  598. shr $51,%rcx
  599. add %r10,%rcx
  600. and %rdx,%r8
  601. mov %rcx,%r9
  602. shr $51,%rcx
  603. add %r12,%rcx
  604. and %rdx,%r9
  605. mov %rcx,%rax
  606. shr $51,%rcx
  607. add %r14,%rcx
  608. and %rdx,%rax
  609. mov %rcx,%r10
  610. shr $51,%rcx
  611. imulq $19,%rcx,%rcx
  612. add %rcx,%rsi
  613. and %rdx,%r10
  614. movq %rsi,136(%rsp)
  615. movq %r8,144(%rsp)
  616. movq %r9,152(%rsp)
  617. movq %rax,160(%rsp)
  618. movq %r10,168(%rsp)
  619. movq 56(%rsp),%rax
  620. mulq 56(%rsp)
  621. mov %rax,%rsi
  622. mov %rdx,%rcx
  623. movq 56(%rsp),%rax
  624. shl $1,%rax
  625. mulq 64(%rsp)
  626. mov %rax,%r8
  627. mov %rdx,%r9
  628. movq 56(%rsp),%rax
  629. shl $1,%rax
  630. mulq 72(%rsp)
  631. mov %rax,%r10
  632. mov %rdx,%r11
  633. movq 56(%rsp),%rax
  634. shl $1,%rax
  635. mulq 80(%rsp)
  636. mov %rax,%r12
  637. mov %rdx,%r13
  638. movq 56(%rsp),%rax
  639. shl $1,%rax
  640. mulq 88(%rsp)
  641. mov %rax,%r14
  642. mov %rdx,%r15
  643. movq 64(%rsp),%rax
  644. mulq 64(%rsp)
  645. add %rax,%r10
  646. adc %rdx,%r11
  647. movq 64(%rsp),%rax
  648. shl $1,%rax
  649. mulq 72(%rsp)
  650. add %rax,%r12
  651. adc %rdx,%r13
  652. movq 64(%rsp),%rax
  653. shl $1,%rax
  654. mulq 80(%rsp)
  655. add %rax,%r14
  656. adc %rdx,%r15
  657. movq 64(%rsp),%rdx
  658. imulq $38,%rdx,%rax
  659. mulq 88(%rsp)
  660. add %rax,%rsi
  661. adc %rdx,%rcx
  662. movq 72(%rsp),%rax
  663. mulq 72(%rsp)
  664. add %rax,%r14
  665. adc %rdx,%r15
  666. movq 72(%rsp),%rdx
  667. imulq $38,%rdx,%rax
  668. mulq 80(%rsp)
  669. add %rax,%rsi
  670. adc %rdx,%rcx
  671. movq 72(%rsp),%rdx
  672. imulq $38,%rdx,%rax
  673. mulq 88(%rsp)
  674. add %rax,%r8
  675. adc %rdx,%r9
  676. movq 80(%rsp),%rdx
  677. imulq $19,%rdx,%rax
  678. mulq 80(%rsp)
  679. add %rax,%r8
  680. adc %rdx,%r9
  681. movq 80(%rsp),%rdx
  682. imulq $38,%rdx,%rax
  683. mulq 88(%rsp)
  684. add %rax,%r10
  685. adc %rdx,%r11
  686. movq 88(%rsp),%rdx
  687. imulq $19,%rdx,%rax
  688. mulq 88(%rsp)
  689. add %rax,%r12
  690. adc %rdx,%r13
  691. movq x25519_x86_64_REDMASK51(%rip),%rdx
  692. shld $13,%rsi,%rcx
  693. and %rdx,%rsi
  694. shld $13,%r8,%r9
  695. and %rdx,%r8
  696. add %rcx,%r8
  697. shld $13,%r10,%r11
  698. and %rdx,%r10
  699. add %r9,%r10
  700. shld $13,%r12,%r13
  701. and %rdx,%r12
  702. add %r11,%r12
  703. shld $13,%r14,%r15
  704. and %rdx,%r14
  705. add %r13,%r14
  706. imulq $19,%r15,%rcx
  707. add %rcx,%rsi
  708. mov %rsi,%rcx
  709. shr $51,%rcx
  710. add %r8,%rcx
  711. and %rdx,%rsi
  712. mov %rcx,%r8
  713. shr $51,%rcx
  714. add %r10,%rcx
  715. and %rdx,%r8
  716. mov %rcx,%r9
  717. shr $51,%rcx
  718. add %r12,%rcx
  719. and %rdx,%r9
  720. mov %rcx,%rax
  721. shr $51,%rcx
  722. add %r14,%rcx
  723. and %rdx,%rax
  724. mov %rcx,%r10
  725. shr $51,%rcx
  726. imulq $19,%rcx,%rcx
  727. add %rcx,%rsi
  728. and %rdx,%r10
  729. movq %rsi,176(%rsp)
  730. movq %r8,184(%rsp)
  731. movq %r9,192(%rsp)
  732. movq %rax,200(%rsp)
  733. movq %r10,208(%rsp)
  734. mov %rsi,%rsi
  735. mov %r8,%rdx
  736. mov %r9,%rcx
  737. mov %rax,%r8
  738. mov %r10,%r9
  739. add x25519_x86_64_2P0(%rip),%rsi
  740. add x25519_x86_64_2P1234(%rip),%rdx
  741. add x25519_x86_64_2P1234(%rip),%rcx
  742. add x25519_x86_64_2P1234(%rip),%r8
  743. add x25519_x86_64_2P1234(%rip),%r9
  744. subq 136(%rsp),%rsi
  745. subq 144(%rsp),%rdx
  746. subq 152(%rsp),%rcx
  747. subq 160(%rsp),%r8
  748. subq 168(%rsp),%r9
  749. movq %rsi,216(%rsp)
  750. movq %rdx,224(%rsp)
  751. movq %rcx,232(%rsp)
  752. movq %r8,240(%rsp)
  753. movq %r9,248(%rsp)
  754. movq 120(%rdi),%rsi
  755. movq 128(%rdi),%rdx
  756. movq 136(%rdi),%rcx
  757. movq 144(%rdi),%r8
  758. movq 152(%rdi),%r9
  759. mov %rsi,%rax
  760. mov %rdx,%r10
  761. mov %rcx,%r11
  762. mov %r8,%r12
  763. mov %r9,%r13
  764. add x25519_x86_64_2P0(%rip),%rax
  765. add x25519_x86_64_2P1234(%rip),%r10
  766. add x25519_x86_64_2P1234(%rip),%r11
  767. add x25519_x86_64_2P1234(%rip),%r12
  768. add x25519_x86_64_2P1234(%rip),%r13
  769. addq 160(%rdi),%rsi
  770. addq 168(%rdi),%rdx
  771. addq 176(%rdi),%rcx
  772. addq 184(%rdi),%r8
  773. addq 192(%rdi),%r9
  774. subq 160(%rdi),%rax
  775. subq 168(%rdi),%r10
  776. subq 176(%rdi),%r11
  777. subq 184(%rdi),%r12
  778. subq 192(%rdi),%r13
  779. movq %rsi,256(%rsp)
  780. movq %rdx,264(%rsp)
  781. movq %rcx,272(%rsp)
  782. movq %r8,280(%rsp)
  783. movq %r9,288(%rsp)
  784. movq %rax,296(%rsp)
  785. movq %r10,304(%rsp)
  786. movq %r11,312(%rsp)
  787. movq %r12,320(%rsp)
  788. movq %r13,328(%rsp)
  789. movq 280(%rsp),%rsi
  790. imulq $19,%rsi,%rax
  791. movq %rax,336(%rsp)
  792. mulq 112(%rsp)
  793. mov %rax,%rsi
  794. mov %rdx,%rcx
  795. movq 288(%rsp),%rdx
  796. imulq $19,%rdx,%rax
  797. movq %rax,344(%rsp)
  798. mulq 104(%rsp)
  799. add %rax,%rsi
  800. adc %rdx,%rcx
  801. movq 256(%rsp),%rax
  802. mulq 96(%rsp)
  803. add %rax,%rsi
  804. adc %rdx,%rcx
  805. movq 256(%rsp),%rax
  806. mulq 104(%rsp)
  807. mov %rax,%r8
  808. mov %rdx,%r9
  809. movq 256(%rsp),%rax
  810. mulq 112(%rsp)
  811. mov %rax,%r10
  812. mov %rdx,%r11
  813. movq 256(%rsp),%rax
  814. mulq 120(%rsp)
  815. mov %rax,%r12
  816. mov %rdx,%r13
  817. movq 256(%rsp),%rax
  818. mulq 128(%rsp)
  819. mov %rax,%r14
  820. mov %rdx,%r15
  821. movq 264(%rsp),%rax
  822. mulq 96(%rsp)
  823. add %rax,%r8
  824. adc %rdx,%r9
  825. movq 264(%rsp),%rax
  826. mulq 104(%rsp)
  827. add %rax,%r10
  828. adc %rdx,%r11
  829. movq 264(%rsp),%rax
  830. mulq 112(%rsp)
  831. add %rax,%r12
  832. adc %rdx,%r13
  833. movq 264(%rsp),%rax
  834. mulq 120(%rsp)
  835. add %rax,%r14
  836. adc %rdx,%r15
  837. movq 264(%rsp),%rdx
  838. imulq $19,%rdx,%rax
  839. mulq 128(%rsp)
  840. add %rax,%rsi
  841. adc %rdx,%rcx
  842. movq 272(%rsp),%rax
  843. mulq 96(%rsp)
  844. add %rax,%r10
  845. adc %rdx,%r11
  846. movq 272(%rsp),%rax
  847. mulq 104(%rsp)
  848. add %rax,%r12
  849. adc %rdx,%r13
  850. movq 272(%rsp),%rax
  851. mulq 112(%rsp)
  852. add %rax,%r14
  853. adc %rdx,%r15
  854. movq 272(%rsp),%rdx
  855. imulq $19,%rdx,%rax
  856. mulq 120(%rsp)
  857. add %rax,%rsi
  858. adc %rdx,%rcx
  859. movq 272(%rsp),%rdx
  860. imulq $19,%rdx,%rax
  861. mulq 128(%rsp)
  862. add %rax,%r8
  863. adc %rdx,%r9
  864. movq 280(%rsp),%rax
  865. mulq 96(%rsp)
  866. add %rax,%r12
  867. adc %rdx,%r13
  868. movq 280(%rsp),%rax
  869. mulq 104(%rsp)
  870. add %rax,%r14
  871. adc %rdx,%r15
  872. movq 336(%rsp),%rax
  873. mulq 120(%rsp)
  874. add %rax,%r8
  875. adc %rdx,%r9
  876. movq 336(%rsp),%rax
  877. mulq 128(%rsp)
  878. add %rax,%r10
  879. adc %rdx,%r11
  880. movq 288(%rsp),%rax
  881. mulq 96(%rsp)
  882. add %rax,%r14
  883. adc %rdx,%r15
  884. movq 344(%rsp),%rax
  885. mulq 112(%rsp)
  886. add %rax,%r8
  887. adc %rdx,%r9
  888. movq 344(%rsp),%rax
  889. mulq 120(%rsp)
  890. add %rax,%r10
  891. adc %rdx,%r11
  892. movq 344(%rsp),%rax
  893. mulq 128(%rsp)
  894. add %rax,%r12
  895. adc %rdx,%r13
  896. movq x25519_x86_64_REDMASK51(%rip),%rdx
  897. shld $13,%rsi,%rcx
  898. and %rdx,%rsi
  899. shld $13,%r8,%r9
  900. and %rdx,%r8
  901. add %rcx,%r8
  902. shld $13,%r10,%r11
  903. and %rdx,%r10
  904. add %r9,%r10
  905. shld $13,%r12,%r13
  906. and %rdx,%r12
  907. add %r11,%r12
  908. shld $13,%r14,%r15
  909. and %rdx,%r14
  910. add %r13,%r14
  911. imulq $19,%r15,%rcx
  912. add %rcx,%rsi
  913. mov %rsi,%rcx
  914. shr $51,%rcx
  915. add %r8,%rcx
  916. mov %rcx,%r8
  917. shr $51,%rcx
  918. and %rdx,%rsi
  919. add %r10,%rcx
  920. mov %rcx,%r9
  921. shr $51,%rcx
  922. and %rdx,%r8
  923. add %r12,%rcx
  924. mov %rcx,%rax
  925. shr $51,%rcx
  926. and %rdx,%r9
  927. add %r14,%rcx
  928. mov %rcx,%r10
  929. shr $51,%rcx
  930. and %rdx,%rax
  931. imulq $19,%rcx,%rcx
  932. add %rcx,%rsi
  933. and %rdx,%r10
  934. movq %rsi,96(%rsp)
  935. movq %r8,104(%rsp)
  936. movq %r9,112(%rsp)
  937. movq %rax,120(%rsp)
  938. movq %r10,128(%rsp)
  939. movq 320(%rsp),%rsi
  940. imulq $19,%rsi,%rax
  941. movq %rax,256(%rsp)
  942. mulq 72(%rsp)
  943. mov %rax,%rsi
  944. mov %rdx,%rcx
  945. movq 328(%rsp),%rdx
  946. imulq $19,%rdx,%rax
  947. movq %rax,264(%rsp)
  948. mulq 64(%rsp)
  949. add %rax,%rsi
  950. adc %rdx,%rcx
  951. movq 296(%rsp),%rax
  952. mulq 56(%rsp)
  953. add %rax,%rsi
  954. adc %rdx,%rcx
  955. movq 296(%rsp),%rax
  956. mulq 64(%rsp)
  957. mov %rax,%r8
  958. mov %rdx,%r9
  959. movq 296(%rsp),%rax
  960. mulq 72(%rsp)
  961. mov %rax,%r10
  962. mov %rdx,%r11
  963. movq 296(%rsp),%rax
  964. mulq 80(%rsp)
  965. mov %rax,%r12
  966. mov %rdx,%r13
  967. movq 296(%rsp),%rax
  968. mulq 88(%rsp)
  969. mov %rax,%r14
  970. mov %rdx,%r15
  971. movq 304(%rsp),%rax
  972. mulq 56(%rsp)
  973. add %rax,%r8
  974. adc %rdx,%r9
  975. movq 304(%rsp),%rax
  976. mulq 64(%rsp)
  977. add %rax,%r10
  978. adc %rdx,%r11
  979. movq 304(%rsp),%rax
  980. mulq 72(%rsp)
  981. add %rax,%r12
  982. adc %rdx,%r13
  983. movq 304(%rsp),%rax
  984. mulq 80(%rsp)
  985. add %rax,%r14
  986. adc %rdx,%r15
  987. movq 304(%rsp),%rdx
  988. imulq $19,%rdx,%rax
  989. mulq 88(%rsp)
  990. add %rax,%rsi
  991. adc %rdx,%rcx
  992. movq 312(%rsp),%rax
  993. mulq 56(%rsp)
  994. add %rax,%r10
  995. adc %rdx,%r11
  996. movq 312(%rsp),%rax
  997. mulq 64(%rsp)
  998. add %rax,%r12
  999. adc %rdx,%r13
  1000. movq 312(%rsp),%rax
  1001. mulq 72(%rsp)
  1002. add %rax,%r14
  1003. adc %rdx,%r15
  1004. movq 312(%rsp),%rdx
  1005. imulq $19,%rdx,%rax
  1006. mulq 80(%rsp)
  1007. add %rax,%rsi
  1008. adc %rdx,%rcx
  1009. movq 312(%rsp),%rdx
  1010. imulq $19,%rdx,%rax
  1011. mulq 88(%rsp)
  1012. add %rax,%r8
  1013. adc %rdx,%r9
  1014. movq 320(%rsp),%rax
  1015. mulq 56(%rsp)
  1016. add %rax,%r12
  1017. adc %rdx,%r13
  1018. movq 320(%rsp),%rax
  1019. mulq 64(%rsp)
  1020. add %rax,%r14
  1021. adc %rdx,%r15
  1022. movq 256(%rsp),%rax
  1023. mulq 80(%rsp)
  1024. add %rax,%r8
  1025. adc %rdx,%r9
  1026. movq 256(%rsp),%rax
  1027. mulq 88(%rsp)
  1028. add %rax,%r10
  1029. adc %rdx,%r11
  1030. movq 328(%rsp),%rax
  1031. mulq 56(%rsp)
  1032. add %rax,%r14
  1033. adc %rdx,%r15
  1034. movq 264(%rsp),%rax
  1035. mulq 72(%rsp)
  1036. add %rax,%r8
  1037. adc %rdx,%r9
  1038. movq 264(%rsp),%rax
  1039. mulq 80(%rsp)
  1040. add %rax,%r10
  1041. adc %rdx,%r11
  1042. movq 264(%rsp),%rax
  1043. mulq 88(%rsp)
  1044. add %rax,%r12
  1045. adc %rdx,%r13
  1046. movq x25519_x86_64_REDMASK51(%rip),%rdx
  1047. shld $13,%rsi,%rcx
  1048. and %rdx,%rsi
  1049. shld $13,%r8,%r9
  1050. and %rdx,%r8
  1051. add %rcx,%r8
  1052. shld $13,%r10,%r11
  1053. and %rdx,%r10
  1054. add %r9,%r10
  1055. shld $13,%r12,%r13
  1056. and %rdx,%r12
  1057. add %r11,%r12
  1058. shld $13,%r14,%r15
  1059. and %rdx,%r14
  1060. add %r13,%r14
  1061. imulq $19,%r15,%rcx
  1062. add %rcx,%rsi
  1063. mov %rsi,%rcx
  1064. shr $51,%rcx
  1065. add %r8,%rcx
  1066. mov %rcx,%r8
  1067. shr $51,%rcx
  1068. and %rdx,%rsi
  1069. add %r10,%rcx
  1070. mov %rcx,%r9
  1071. shr $51,%rcx
  1072. and %rdx,%r8
  1073. add %r12,%rcx
  1074. mov %rcx,%rax
  1075. shr $51,%rcx
  1076. and %rdx,%r9
  1077. add %r14,%rcx
  1078. mov %rcx,%r10
  1079. shr $51,%rcx
  1080. and %rdx,%rax
  1081. imulq $19,%rcx,%rcx
  1082. add %rcx,%rsi
  1083. and %rdx,%r10
  1084. mov %rsi,%rdx
  1085. mov %r8,%rcx
  1086. mov %r9,%r11
  1087. mov %rax,%r12
  1088. mov %r10,%r13
  1089. add x25519_x86_64_2P0(%rip),%rdx
  1090. add x25519_x86_64_2P1234(%rip),%rcx
  1091. add x25519_x86_64_2P1234(%rip),%r11
  1092. add x25519_x86_64_2P1234(%rip),%r12
  1093. add x25519_x86_64_2P1234(%rip),%r13
  1094. addq 96(%rsp),%rsi
  1095. addq 104(%rsp),%r8
  1096. addq 112(%rsp),%r9
  1097. addq 120(%rsp),%rax
  1098. addq 128(%rsp),%r10
  1099. subq 96(%rsp),%rdx
  1100. subq 104(%rsp),%rcx
  1101. subq 112(%rsp),%r11
  1102. subq 120(%rsp),%r12
  1103. subq 128(%rsp),%r13
  1104. movq %rsi,120(%rdi)
  1105. movq %r8,128(%rdi)
  1106. movq %r9,136(%rdi)
  1107. movq %rax,144(%rdi)
  1108. movq %r10,152(%rdi)
  1109. movq %rdx,160(%rdi)
  1110. movq %rcx,168(%rdi)
  1111. movq %r11,176(%rdi)
  1112. movq %r12,184(%rdi)
  1113. movq %r13,192(%rdi)
  1114. movq 120(%rdi),%rax
  1115. mulq 120(%rdi)
  1116. mov %rax,%rsi
  1117. mov %rdx,%rcx
  1118. movq 120(%rdi),%rax
  1119. shl $1,%rax
  1120. mulq 128(%rdi)
  1121. mov %rax,%r8
  1122. mov %rdx,%r9
  1123. movq 120(%rdi),%rax
  1124. shl $1,%rax
  1125. mulq 136(%rdi)
  1126. mov %rax,%r10
  1127. mov %rdx,%r11
  1128. movq 120(%rdi),%rax
  1129. shl $1,%rax
  1130. mulq 144(%rdi)
  1131. mov %rax,%r12
  1132. mov %rdx,%r13
  1133. movq 120(%rdi),%rax
  1134. shl $1,%rax
  1135. mulq 152(%rdi)
  1136. mov %rax,%r14
  1137. mov %rdx,%r15
  1138. movq 128(%rdi),%rax
  1139. mulq 128(%rdi)
  1140. add %rax,%r10
  1141. adc %rdx,%r11
  1142. movq 128(%rdi),%rax
  1143. shl $1,%rax
  1144. mulq 136(%rdi)
  1145. add %rax,%r12
  1146. adc %rdx,%r13
  1147. movq 128(%rdi),%rax
  1148. shl $1,%rax
  1149. mulq 144(%rdi)
  1150. add %rax,%r14
  1151. adc %rdx,%r15
  1152. movq 128(%rdi),%rdx
  1153. imulq $38,%rdx,%rax
  1154. mulq 152(%rdi)
  1155. add %rax,%rsi
  1156. adc %rdx,%rcx
  1157. movq 136(%rdi),%rax
  1158. mulq 136(%rdi)
  1159. add %rax,%r14
  1160. adc %rdx,%r15
  1161. movq 136(%rdi),%rdx
  1162. imulq $38,%rdx,%rax
  1163. mulq 144(%rdi)
  1164. add %rax,%rsi
  1165. adc %rdx,%rcx
  1166. movq 136(%rdi),%rdx
  1167. imulq $38,%rdx,%rax
  1168. mulq 152(%rdi)
  1169. add %rax,%r8
  1170. adc %rdx,%r9
  1171. movq 144(%rdi),%rdx
  1172. imulq $19,%rdx,%rax
  1173. mulq 144(%rdi)
  1174. add %rax,%r8
  1175. adc %rdx,%r9
  1176. movq 144(%rdi),%rdx
  1177. imulq $38,%rdx,%rax
  1178. mulq 152(%rdi)
  1179. add %rax,%r10
  1180. adc %rdx,%r11
  1181. movq 152(%rdi),%rdx
  1182. imulq $19,%rdx,%rax
  1183. mulq 152(%rdi)
  1184. add %rax,%r12
  1185. adc %rdx,%r13
  1186. movq x25519_x86_64_REDMASK51(%rip),%rdx
  1187. shld $13,%rsi,%rcx
  1188. and %rdx,%rsi
  1189. shld $13,%r8,%r9
  1190. and %rdx,%r8
  1191. add %rcx,%r8
  1192. shld $13,%r10,%r11
  1193. and %rdx,%r10
  1194. add %r9,%r10
  1195. shld $13,%r12,%r13
  1196. and %rdx,%r12
  1197. add %r11,%r12
  1198. shld $13,%r14,%r15
  1199. and %rdx,%r14
  1200. add %r13,%r14
  1201. imulq $19,%r15,%rcx
  1202. add %rcx,%rsi
  1203. mov %rsi,%rcx
  1204. shr $51,%rcx
  1205. add %r8,%rcx
  1206. and %rdx,%rsi
  1207. mov %rcx,%r8
  1208. shr $51,%rcx
  1209. add %r10,%rcx
  1210. and %rdx,%r8
  1211. mov %rcx,%r9
  1212. shr $51,%rcx
  1213. add %r12,%rcx
  1214. and %rdx,%r9
  1215. mov %rcx,%rax
  1216. shr $51,%rcx
  1217. add %r14,%rcx
  1218. and %rdx,%rax
  1219. mov %rcx,%r10
  1220. shr $51,%rcx
  1221. imulq $19,%rcx,%rcx
  1222. add %rcx,%rsi
  1223. and %rdx,%r10
  1224. movq %rsi,120(%rdi)
  1225. movq %r8,128(%rdi)
  1226. movq %r9,136(%rdi)
  1227. movq %rax,144(%rdi)
  1228. movq %r10,152(%rdi)
  1229. movq 160(%rdi),%rax
  1230. mulq 160(%rdi)
  1231. mov %rax,%rsi
  1232. mov %rdx,%rcx
  1233. movq 160(%rdi),%rax
  1234. shl $1,%rax
  1235. mulq 168(%rdi)
  1236. mov %rax,%r8
  1237. mov %rdx,%r9
  1238. movq 160(%rdi),%rax
  1239. shl $1,%rax
  1240. mulq 176(%rdi)
  1241. mov %rax,%r10
  1242. mov %rdx,%r11
  1243. movq 160(%rdi),%rax
  1244. shl $1,%rax
  1245. mulq 184(%rdi)
  1246. mov %rax,%r12
  1247. mov %rdx,%r13
  1248. movq 160(%rdi),%rax
  1249. shl $1,%rax
  1250. mulq 192(%rdi)
  1251. mov %rax,%r14
  1252. mov %rdx,%r15
  1253. movq 168(%rdi),%rax
  1254. mulq 168(%rdi)
  1255. add %rax,%r10
  1256. adc %rdx,%r11
  1257. movq 168(%rdi),%rax
  1258. shl $1,%rax
  1259. mulq 176(%rdi)
  1260. add %rax,%r12
  1261. adc %rdx,%r13
  1262. movq 168(%rdi),%rax
  1263. shl $1,%rax
  1264. mulq 184(%rdi)
  1265. add %rax,%r14
  1266. adc %rdx,%r15
  1267. movq 168(%rdi),%rdx
  1268. imulq $38,%rdx,%rax
  1269. mulq 192(%rdi)
  1270. add %rax,%rsi
  1271. adc %rdx,%rcx
  1272. movq 176(%rdi),%rax
  1273. mulq 176(%rdi)
  1274. add %rax,%r14
  1275. adc %rdx,%r15
  1276. movq 176(%rdi),%rdx
  1277. imulq $38,%rdx,%rax
  1278. mulq 184(%rdi)
  1279. add %rax,%rsi
  1280. adc %rdx,%rcx
  1281. movq 176(%rdi),%rdx
  1282. imulq $38,%rdx,%rax
  1283. mulq 192(%rdi)
  1284. add %rax,%r8
  1285. adc %rdx,%r9
  1286. movq 184(%rdi),%rdx
  1287. imulq $19,%rdx,%rax
  1288. mulq 184(%rdi)
  1289. add %rax,%r8
  1290. adc %rdx,%r9
  1291. movq 184(%rdi),%rdx
  1292. imulq $38,%rdx,%rax
  1293. mulq 192(%rdi)
  1294. add %rax,%r10
  1295. adc %rdx,%r11
  1296. movq 192(%rdi),%rdx
  1297. imulq $19,%rdx,%rax
  1298. mulq 192(%rdi)
  1299. add %rax,%r12
  1300. adc %rdx,%r13
  1301. movq x25519_x86_64_REDMASK51(%rip),%rdx
  1302. shld $13,%rsi,%rcx
  1303. and %rdx,%rsi
  1304. shld $13,%r8,%r9
  1305. and %rdx,%r8
  1306. add %rcx,%r8
  1307. shld $13,%r10,%r11
  1308. and %rdx,%r10
  1309. add %r9,%r10
  1310. shld $13,%r12,%r13
  1311. and %rdx,%r12
  1312. add %r11,%r12
  1313. shld $13,%r14,%r15
  1314. and %rdx,%r14
  1315. add %r13,%r14
  1316. imulq $19,%r15,%rcx
  1317. add %rcx,%rsi
  1318. mov %rsi,%rcx
  1319. shr $51,%rcx
  1320. add %r8,%rcx
  1321. and %rdx,%rsi
  1322. mov %rcx,%r8
  1323. shr $51,%rcx
  1324. add %r10,%rcx
  1325. and %rdx,%r8
  1326. mov %rcx,%r9
  1327. shr $51,%rcx
  1328. add %r12,%rcx
  1329. and %rdx,%r9
  1330. mov %rcx,%rax
  1331. shr $51,%rcx
  1332. add %r14,%rcx
  1333. and %rdx,%rax
  1334. mov %rcx,%r10
  1335. shr $51,%rcx
  1336. imulq $19,%rcx,%rcx
  1337. add %rcx,%rsi
  1338. and %rdx,%r10
  1339. movq %rsi,160(%rdi)
  1340. movq %r8,168(%rdi)
  1341. movq %r9,176(%rdi)
  1342. movq %rax,184(%rdi)
  1343. movq %r10,192(%rdi)
  1344. movq 184(%rdi),%rsi
  1345. imulq $19,%rsi,%rax
  1346. movq %rax,56(%rsp)
  1347. mulq 16(%rdi)
  1348. mov %rax,%rsi
  1349. mov %rdx,%rcx
  1350. movq 192(%rdi),%rdx
  1351. imulq $19,%rdx,%rax
  1352. movq %rax,64(%rsp)
  1353. mulq 8(%rdi)
  1354. add %rax,%rsi
  1355. adc %rdx,%rcx
  1356. movq 160(%rdi),%rax
  1357. mulq 0(%rdi)
  1358. add %rax,%rsi
  1359. adc %rdx,%rcx
  1360. movq 160(%rdi),%rax
  1361. mulq 8(%rdi)
  1362. mov %rax,%r8
  1363. mov %rdx,%r9
  1364. movq 160(%rdi),%rax
  1365. mulq 16(%rdi)
  1366. mov %rax,%r10
  1367. mov %rdx,%r11
  1368. movq 160(%rdi),%rax
  1369. mulq 24(%rdi)
  1370. mov %rax,%r12
  1371. mov %rdx,%r13
  1372. movq 160(%rdi),%rax
  1373. mulq 32(%rdi)
  1374. mov %rax,%r14
  1375. mov %rdx,%r15
  1376. movq 168(%rdi),%rax
  1377. mulq 0(%rdi)
  1378. add %rax,%r8
  1379. adc %rdx,%r9
  1380. movq 168(%rdi),%rax
  1381. mulq 8(%rdi)
  1382. add %rax,%r10
  1383. adc %rdx,%r11
  1384. movq 168(%rdi),%rax
  1385. mulq 16(%rdi)
  1386. add %rax,%r12
  1387. adc %rdx,%r13
  1388. movq 168(%rdi),%rax
  1389. mulq 24(%rdi)
  1390. add %rax,%r14
  1391. adc %rdx,%r15
  1392. movq 168(%rdi),%rdx
  1393. imulq $19,%rdx,%rax
  1394. mulq 32(%rdi)
  1395. add %rax,%rsi
  1396. adc %rdx,%rcx
  1397. movq 176(%rdi),%rax
  1398. mulq 0(%rdi)
  1399. add %rax,%r10
  1400. adc %rdx,%r11
  1401. movq 176(%rdi),%rax
  1402. mulq 8(%rdi)
  1403. add %rax,%r12
  1404. adc %rdx,%r13
  1405. movq 176(%rdi),%rax
  1406. mulq 16(%rdi)
  1407. add %rax,%r14
  1408. adc %rdx,%r15
  1409. movq 176(%rdi),%rdx
  1410. imulq $19,%rdx,%rax
  1411. mulq 24(%rdi)
  1412. add %rax,%rsi
  1413. adc %rdx,%rcx
  1414. movq 176(%rdi),%rdx
  1415. imulq $19,%rdx,%rax
  1416. mulq 32(%rdi)
  1417. add %rax,%r8
  1418. adc %rdx,%r9
  1419. movq 184(%rdi),%rax
  1420. mulq 0(%rdi)
  1421. add %rax,%r12
  1422. adc %rdx,%r13
  1423. movq 184(%rdi),%rax
  1424. mulq 8(%rdi)
  1425. add %rax,%r14
  1426. adc %rdx,%r15
  1427. movq 56(%rsp),%rax
  1428. mulq 24(%rdi)
  1429. add %rax,%r8
  1430. adc %rdx,%r9
  1431. movq 56(%rsp),%rax
  1432. mulq 32(%rdi)
  1433. add %rax,%r10
  1434. adc %rdx,%r11
  1435. movq 192(%rdi),%rax
  1436. mulq 0(%rdi)
  1437. add %rax,%r14
  1438. adc %rdx,%r15
  1439. movq 64(%rsp),%rax
  1440. mulq 16(%rdi)
  1441. add %rax,%r8
  1442. adc %rdx,%r9
  1443. movq 64(%rsp),%rax
  1444. mulq 24(%rdi)
  1445. add %rax,%r10
  1446. adc %rdx,%r11
  1447. movq 64(%rsp),%rax
  1448. mulq 32(%rdi)
  1449. add %rax,%r12
  1450. adc %rdx,%r13
  1451. movq x25519_x86_64_REDMASK51(%rip),%rdx
  1452. shld $13,%rsi,%rcx
  1453. and %rdx,%rsi
  1454. shld $13,%r8,%r9
  1455. and %rdx,%r8
  1456. add %rcx,%r8
  1457. shld $13,%r10,%r11
  1458. and %rdx,%r10
  1459. add %r9,%r10
  1460. shld $13,%r12,%r13
  1461. and %rdx,%r12
  1462. add %r11,%r12
  1463. shld $13,%r14,%r15
  1464. and %rdx,%r14
  1465. add %r13,%r14
  1466. imulq $19,%r15,%rcx
  1467. add %rcx,%rsi
  1468. mov %rsi,%rcx
  1469. shr $51,%rcx
  1470. add %r8,%rcx
  1471. mov %rcx,%r8
  1472. shr $51,%rcx
  1473. and %rdx,%rsi
  1474. add %r10,%rcx
  1475. mov %rcx,%r9
  1476. shr $51,%rcx
  1477. and %rdx,%r8
  1478. add %r12,%rcx
  1479. mov %rcx,%rax
  1480. shr $51,%rcx
  1481. and %rdx,%r9
  1482. add %r14,%rcx
  1483. mov %rcx,%r10
  1484. shr $51,%rcx
  1485. and %rdx,%rax
  1486. imulq $19,%rcx,%rcx
  1487. add %rcx,%rsi
  1488. and %rdx,%r10
  1489. movq %rsi,160(%rdi)
  1490. movq %r8,168(%rdi)
  1491. movq %r9,176(%rdi)
  1492. movq %rax,184(%rdi)
  1493. movq %r10,192(%rdi)
  1494. movq 200(%rsp),%rsi
  1495. imulq $19,%rsi,%rax
  1496. movq %rax,56(%rsp)
  1497. mulq 152(%rsp)
  1498. mov %rax,%rsi
  1499. mov %rdx,%rcx
  1500. movq 208(%rsp),%rdx
  1501. imulq $19,%rdx,%rax
  1502. movq %rax,64(%rsp)
  1503. mulq 144(%rsp)
  1504. add %rax,%rsi
  1505. adc %rdx,%rcx
  1506. movq 176(%rsp),%rax
  1507. mulq 136(%rsp)
  1508. add %rax,%rsi
  1509. adc %rdx,%rcx
  1510. movq 176(%rsp),%rax
  1511. mulq 144(%rsp)
  1512. mov %rax,%r8
  1513. mov %rdx,%r9
  1514. movq 176(%rsp),%rax
  1515. mulq 152(%rsp)
  1516. mov %rax,%r10
  1517. mov %rdx,%r11
  1518. movq 176(%rsp),%rax
  1519. mulq 160(%rsp)
  1520. mov %rax,%r12
  1521. mov %rdx,%r13
  1522. movq 176(%rsp),%rax
  1523. mulq 168(%rsp)
  1524. mov %rax,%r14
  1525. mov %rdx,%r15
  1526. movq 184(%rsp),%rax
  1527. mulq 136(%rsp)
  1528. add %rax,%r8
  1529. adc %rdx,%r9
  1530. movq 184(%rsp),%rax
  1531. mulq 144(%rsp)
  1532. add %rax,%r10
  1533. adc %rdx,%r11
  1534. movq 184(%rsp),%rax
  1535. mulq 152(%rsp)
  1536. add %rax,%r12
  1537. adc %rdx,%r13
  1538. movq 184(%rsp),%rax
  1539. mulq 160(%rsp)
  1540. add %rax,%r14
  1541. adc %rdx,%r15
  1542. movq 184(%rsp),%rdx
  1543. imulq $19,%rdx,%rax
  1544. mulq 168(%rsp)
  1545. add %rax,%rsi
  1546. adc %rdx,%rcx
  1547. movq 192(%rsp),%rax
  1548. mulq 136(%rsp)
  1549. add %rax,%r10
  1550. adc %rdx,%r11
  1551. movq 192(%rsp),%rax
  1552. mulq 144(%rsp)
  1553. add %rax,%r12
  1554. adc %rdx,%r13
  1555. movq 192(%rsp),%rax
  1556. mulq 152(%rsp)
  1557. add %rax,%r14
  1558. adc %rdx,%r15
  1559. movq 192(%rsp),%rdx
  1560. imulq $19,%rdx,%rax
  1561. mulq 160(%rsp)
  1562. add %rax,%rsi
  1563. adc %rdx,%rcx
  1564. movq 192(%rsp),%rdx
  1565. imulq $19,%rdx,%rax
  1566. mulq 168(%rsp)
  1567. add %rax,%r8
  1568. adc %rdx,%r9
  1569. movq 200(%rsp),%rax
  1570. mulq 136(%rsp)
  1571. add %rax,%r12
  1572. adc %rdx,%r13
  1573. movq 200(%rsp),%rax
  1574. mulq 144(%rsp)
  1575. add %rax,%r14
  1576. adc %rdx,%r15
  1577. movq 56(%rsp),%rax
  1578. mulq 160(%rsp)
  1579. add %rax,%r8
  1580. adc %rdx,%r9
  1581. movq 56(%rsp),%rax
  1582. mulq 168(%rsp)
  1583. add %rax,%r10
  1584. adc %rdx,%r11
  1585. movq 208(%rsp),%rax
  1586. mulq 136(%rsp)
  1587. add %rax,%r14
  1588. adc %rdx,%r15
  1589. movq 64(%rsp),%rax
  1590. mulq 152(%rsp)
  1591. add %rax,%r8
  1592. adc %rdx,%r9
  1593. movq 64(%rsp),%rax
  1594. mulq 160(%rsp)
  1595. add %rax,%r10
  1596. adc %rdx,%r11
  1597. movq 64(%rsp),%rax
  1598. mulq 168(%rsp)
  1599. add %rax,%r12
  1600. adc %rdx,%r13
  1601. movq x25519_x86_64_REDMASK51(%rip),%rdx
  1602. shld $13,%rsi,%rcx
  1603. and %rdx,%rsi
  1604. shld $13,%r8,%r9
  1605. and %rdx,%r8
  1606. add %rcx,%r8
  1607. shld $13,%r10,%r11
  1608. and %rdx,%r10
  1609. add %r9,%r10
  1610. shld $13,%r12,%r13
  1611. and %rdx,%r12
  1612. add %r11,%r12
  1613. shld $13,%r14,%r15
  1614. and %rdx,%r14
  1615. add %r13,%r14
  1616. imulq $19,%r15,%rcx
  1617. add %rcx,%rsi
  1618. mov %rsi,%rcx
  1619. shr $51,%rcx
  1620. add %r8,%rcx
  1621. mov %rcx,%r8
  1622. shr $51,%rcx
  1623. and %rdx,%rsi
  1624. add %r10,%rcx
  1625. mov %rcx,%r9
  1626. shr $51,%rcx
  1627. and %rdx,%r8
  1628. add %r12,%rcx
  1629. mov %rcx,%rax
  1630. shr $51,%rcx
  1631. and %rdx,%r9
  1632. add %r14,%rcx
  1633. mov %rcx,%r10
  1634. shr $51,%rcx
  1635. and %rdx,%rax
  1636. imulq $19,%rcx,%rcx
  1637. add %rcx,%rsi
  1638. and %rdx,%r10
  1639. movq %rsi,40(%rdi)
  1640. movq %r8,48(%rdi)
  1641. movq %r9,56(%rdi)
  1642. movq %rax,64(%rdi)
  1643. movq %r10,72(%rdi)
  1644. movq 216(%rsp),%rax
  1645. mulq x25519_x86_64_121666_213(%rip)
  1646. shr $13,%rax
  1647. mov %rax,%rsi
  1648. mov %rdx,%rcx
  1649. movq 224(%rsp),%rax
  1650. mulq x25519_x86_64_121666_213(%rip)
  1651. shr $13,%rax
  1652. add %rax,%rcx
  1653. mov %rdx,%r8
  1654. movq 232(%rsp),%rax
  1655. mulq x25519_x86_64_121666_213(%rip)
  1656. shr $13,%rax
  1657. add %rax,%r8
  1658. mov %rdx,%r9
  1659. movq 240(%rsp),%rax
  1660. mulq x25519_x86_64_121666_213(%rip)
  1661. shr $13,%rax
  1662. add %rax,%r9
  1663. mov %rdx,%r10
  1664. movq 248(%rsp),%rax
  1665. mulq x25519_x86_64_121666_213(%rip)
  1666. shr $13,%rax
  1667. add %rax,%r10
  1668. imulq $19,%rdx,%rdx
  1669. add %rdx,%rsi
  1670. addq 136(%rsp),%rsi
  1671. addq 144(%rsp),%rcx
  1672. addq 152(%rsp),%r8
  1673. addq 160(%rsp),%r9
  1674. addq 168(%rsp),%r10
  1675. movq %rsi,80(%rdi)
  1676. movq %rcx,88(%rdi)
  1677. movq %r8,96(%rdi)
  1678. movq %r9,104(%rdi)
  1679. movq %r10,112(%rdi)
  1680. movq 104(%rdi),%rsi
  1681. imulq $19,%rsi,%rax
  1682. movq %rax,56(%rsp)
  1683. mulq 232(%rsp)
  1684. mov %rax,%rsi
  1685. mov %rdx,%rcx
  1686. movq 112(%rdi),%rdx
  1687. imulq $19,%rdx,%rax
  1688. movq %rax,64(%rsp)
  1689. mulq 224(%rsp)
  1690. add %rax,%rsi
  1691. adc %rdx,%rcx
  1692. movq 80(%rdi),%rax
  1693. mulq 216(%rsp)
  1694. add %rax,%rsi
  1695. adc %rdx,%rcx
  1696. movq 80(%rdi),%rax
  1697. mulq 224(%rsp)
  1698. mov %rax,%r8
  1699. mov %rdx,%r9
  1700. movq 80(%rdi),%rax
  1701. mulq 232(%rsp)
  1702. mov %rax,%r10
  1703. mov %rdx,%r11
  1704. movq 80(%rdi),%rax
  1705. mulq 240(%rsp)
  1706. mov %rax,%r12
  1707. mov %rdx,%r13
  1708. movq 80(%rdi),%rax
  1709. mulq 248(%rsp)
  1710. mov %rax,%r14
  1711. mov %rdx,%r15
  1712. movq 88(%rdi),%rax
  1713. mulq 216(%rsp)
  1714. add %rax,%r8
  1715. adc %rdx,%r9
  1716. movq 88(%rdi),%rax
  1717. mulq 224(%rsp)
  1718. add %rax,%r10
  1719. adc %rdx,%r11
  1720. movq 88(%rdi),%rax
  1721. mulq 232(%rsp)
  1722. add %rax,%r12
  1723. adc %rdx,%r13
  1724. movq 88(%rdi),%rax
  1725. mulq 240(%rsp)
  1726. add %rax,%r14
  1727. adc %rdx,%r15
  1728. movq 88(%rdi),%rdx
  1729. imulq $19,%rdx,%rax
  1730. mulq 248(%rsp)
  1731. add %rax,%rsi
  1732. adc %rdx,%rcx
  1733. movq 96(%rdi),%rax
  1734. mulq 216(%rsp)
  1735. add %rax,%r10
  1736. adc %rdx,%r11
  1737. movq 96(%rdi),%rax
  1738. mulq 224(%rsp)
  1739. add %rax,%r12
  1740. adc %rdx,%r13
  1741. movq 96(%rdi),%rax
  1742. mulq 232(%rsp)
  1743. add %rax,%r14
  1744. adc %rdx,%r15
  1745. movq 96(%rdi),%rdx
  1746. imulq $19,%rdx,%rax
  1747. mulq 240(%rsp)
  1748. add %rax,%rsi
  1749. adc %rdx,%rcx
  1750. movq 96(%rdi),%rdx
  1751. imulq $19,%rdx,%rax
  1752. mulq 248(%rsp)
  1753. add %rax,%r8
  1754. adc %rdx,%r9
  1755. movq 104(%rdi),%rax
  1756. mulq 216(%rsp)
  1757. add %rax,%r12
  1758. adc %rdx,%r13
  1759. movq 104(%rdi),%rax
  1760. mulq 224(%rsp)
  1761. add %rax,%r14
  1762. adc %rdx,%r15
  1763. movq 56(%rsp),%rax
  1764. mulq 240(%rsp)
  1765. add %rax,%r8
  1766. adc %rdx,%r9
  1767. movq 56(%rsp),%rax
  1768. mulq 248(%rsp)
  1769. add %rax,%r10
  1770. adc %rdx,%r11
  1771. movq 112(%rdi),%rax
  1772. mulq 216(%rsp)
  1773. add %rax,%r14
  1774. adc %rdx,%r15
  1775. movq 64(%rsp),%rax
  1776. mulq 232(%rsp)
  1777. add %rax,%r8
  1778. adc %rdx,%r9
  1779. movq 64(%rsp),%rax
  1780. mulq 240(%rsp)
  1781. add %rax,%r10
  1782. adc %rdx,%r11
  1783. movq 64(%rsp),%rax
  1784. mulq 248(%rsp)
  1785. add %rax,%r12
  1786. adc %rdx,%r13
  1787. movq x25519_x86_64_REDMASK51(%rip),%rdx
  1788. shld $13,%rsi,%rcx
  1789. and %rdx,%rsi
  1790. shld $13,%r8,%r9
  1791. and %rdx,%r8
  1792. add %rcx,%r8
  1793. shld $13,%r10,%r11
  1794. and %rdx,%r10
  1795. add %r9,%r10
  1796. shld $13,%r12,%r13
  1797. and %rdx,%r12
  1798. add %r11,%r12
  1799. shld $13,%r14,%r15
  1800. and %rdx,%r14
  1801. add %r13,%r14
  1802. imulq $19,%r15,%rcx
  1803. add %rcx,%rsi
  1804. mov %rsi,%rcx
  1805. shr $51,%rcx
  1806. add %r8,%rcx
  1807. mov %rcx,%r8
  1808. shr $51,%rcx
  1809. and %rdx,%rsi
  1810. add %r10,%rcx
  1811. mov %rcx,%r9
  1812. shr $51,%rcx
  1813. and %rdx,%r8
  1814. add %r12,%rcx
  1815. mov %rcx,%rax
  1816. shr $51,%rcx
  1817. and %rdx,%r9
  1818. add %r14,%rcx
  1819. mov %rcx,%r10
  1820. shr $51,%rcx
  1821. and %rdx,%rax
  1822. imulq $19,%rcx,%rcx
  1823. add %rcx,%rsi
  1824. and %rdx,%r10
  1825. movq %rsi,80(%rdi)
  1826. movq %r8,88(%rdi)
  1827. movq %r9,96(%rdi)
  1828. movq %rax,104(%rdi)
  1829. movq %r10,112(%rdi)
  1830. movq 0(%rsp),%r11
  1831. movq 8(%rsp),%r12
  1832. movq 16(%rsp),%r13
  1833. movq 24(%rsp),%r14
  1834. movq 32(%rsp),%r15
  1835. movq 40(%rsp),%rbx
  1836. movq 48(%rsp),%rbp
  1837. add %r11,%rsp
  1838. mov %rdi,%rax
  1839. mov %rsi,%rdx
  1840. ret
  1841. .p2align 5
  1842. .globl C_ABI(x25519_x86_64_work_cswap)
  1843. HIDDEN C_ABI(x25519_x86_64_work_cswap)
  1844. C_ABI(x25519_x86_64_work_cswap):
  1845. mov %rsp,%r11
  1846. and $31,%r11
  1847. add $0,%r11
  1848. sub %r11,%rsp
  1849. cmp $1,%rsi
  1850. movq 0(%rdi),%rsi
  1851. movq 80(%rdi),%rdx
  1852. movq 8(%rdi),%rcx
  1853. movq 88(%rdi),%r8
  1854. mov %rsi,%r9
  1855. cmove %rdx,%rsi
  1856. cmove %r9,%rdx
  1857. mov %rcx,%r9
  1858. cmove %r8,%rcx
  1859. cmove %r9,%r8
  1860. movq %rsi,0(%rdi)
  1861. movq %rdx,80(%rdi)
  1862. movq %rcx,8(%rdi)
  1863. movq %r8,88(%rdi)
  1864. movq 16(%rdi),%rsi
  1865. movq 96(%rdi),%rdx
  1866. movq 24(%rdi),%rcx
  1867. movq 104(%rdi),%r8
  1868. mov %rsi,%r9
  1869. cmove %rdx,%rsi
  1870. cmove %r9,%rdx
  1871. mov %rcx,%r9
  1872. cmove %r8,%rcx
  1873. cmove %r9,%r8
  1874. movq %rsi,16(%rdi)
  1875. movq %rdx,96(%rdi)
  1876. movq %rcx,24(%rdi)
  1877. movq %r8,104(%rdi)
  1878. movq 32(%rdi),%rsi
  1879. movq 112(%rdi),%rdx
  1880. movq 40(%rdi),%rcx
  1881. movq 120(%rdi),%r8
  1882. mov %rsi,%r9
  1883. cmove %rdx,%rsi
  1884. cmove %r9,%rdx
  1885. mov %rcx,%r9
  1886. cmove %r8,%rcx
  1887. cmove %r9,%r8
  1888. movq %rsi,32(%rdi)
  1889. movq %rdx,112(%rdi)
  1890. movq %rcx,40(%rdi)
  1891. movq %r8,120(%rdi)
  1892. movq 48(%rdi),%rsi
  1893. movq 128(%rdi),%rdx
  1894. movq 56(%rdi),%rcx
  1895. movq 136(%rdi),%r8
  1896. mov %rsi,%r9
  1897. cmove %rdx,%rsi
  1898. cmove %r9,%rdx
  1899. mov %rcx,%r9
  1900. cmove %r8,%rcx
  1901. cmove %r9,%r8
  1902. movq %rsi,48(%rdi)
  1903. movq %rdx,128(%rdi)
  1904. movq %rcx,56(%rdi)
  1905. movq %r8,136(%rdi)
  1906. movq 64(%rdi),%rsi
  1907. movq 144(%rdi),%rdx
  1908. movq 72(%rdi),%rcx
  1909. movq 152(%rdi),%r8
  1910. mov %rsi,%r9
  1911. cmove %rdx,%rsi
  1912. cmove %r9,%rdx
  1913. mov %rcx,%r9
  1914. cmove %r8,%rcx
  1915. cmove %r9,%r8
  1916. movq %rsi,64(%rdi)
  1917. movq %rdx,144(%rdi)
  1918. movq %rcx,72(%rdi)
  1919. movq %r8,152(%rdi)
  1920. add %r11,%rsp
  1921. mov %rdi,%rax
  1922. mov %rsi,%rdx
  1923. ret
  1924. #endif /* __x86_64__ */
  1925. #endif /* !OPENSSL_NO_ASM */