cmll-x86_64.s 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903
  1. .text
  2. .globl _Camellia_EncryptBlock
  3. .p2align 4
  4. _Camellia_EncryptBlock:
  5. movl $128,%eax
  6. subl %edi,%eax
  7. movl $3,%edi
  8. adcl $0,%edi
  9. jmp L$enc_rounds
  10. .globl _Camellia_EncryptBlock_Rounds
  11. .p2align 4
  12. L$enc_rounds:
  13. _Camellia_EncryptBlock_Rounds:
  14. pushq %rbx
  15. pushq %rbp
  16. pushq %r13
  17. pushq %r14
  18. pushq %r15
  19. L$enc_prologue:
  20. movq %rcx,%r13
  21. movq %rdx,%r14
  22. shll $6,%edi
  23. leaq L$Camellia_SBOX(%rip),%rbp
  24. leaq (%r14,%rdi,1),%r15
  25. movl 0(%rsi),%r8d
  26. movl 4(%rsi),%r9d
  27. movl 8(%rsi),%r10d
  28. bswapl %r8d
  29. movl 12(%rsi),%r11d
  30. bswapl %r9d
  31. bswapl %r10d
  32. bswapl %r11d
  33. call _x86_64_Camellia_encrypt
  34. bswapl %r8d
  35. bswapl %r9d
  36. bswapl %r10d
  37. movl %r8d,0(%r13)
  38. bswapl %r11d
  39. movl %r9d,4(%r13)
  40. movl %r10d,8(%r13)
  41. movl %r11d,12(%r13)
  42. movq 0(%rsp),%r15
  43. movq 8(%rsp),%r14
  44. movq 16(%rsp),%r13
  45. movq 24(%rsp),%rbp
  46. movq 32(%rsp),%rbx
  47. leaq 40(%rsp),%rsp
  48. L$enc_epilogue:
  49. .byte 0xf3,0xc3
  50. .p2align 4
  51. _x86_64_Camellia_encrypt:
  52. xorl 0(%r14),%r9d
  53. xorl 4(%r14),%r8d
  54. xorl 8(%r14),%r11d
  55. xorl 12(%r14),%r10d
  56. .p2align 4
  57. L$eloop:
  58. movl 16(%r14),%ebx
  59. movl 20(%r14),%eax
  60. xorl %r8d,%eax
  61. xorl %r9d,%ebx
  62. movzbl %ah,%esi
  63. movzbl %bl,%edi
  64. movl 2052(%rbp,%rsi,8),%edx
  65. movl 0(%rbp,%rdi,8),%ecx
  66. movzbl %al,%esi
  67. shrl $16,%eax
  68. movzbl %bh,%edi
  69. xorl 4(%rbp,%rsi,8),%edx
  70. shrl $16,%ebx
  71. xorl 4(%rbp,%rdi,8),%ecx
  72. movzbl %ah,%esi
  73. movzbl %bl,%edi
  74. xorl 0(%rbp,%rsi,8),%edx
  75. xorl 2052(%rbp,%rdi,8),%ecx
  76. movzbl %al,%esi
  77. movzbl %bh,%edi
  78. xorl 2048(%rbp,%rsi,8),%edx
  79. xorl 2048(%rbp,%rdi,8),%ecx
  80. movl 24(%r14),%ebx
  81. movl 28(%r14),%eax
  82. xorl %edx,%ecx
  83. rorl $8,%edx
  84. xorl %ecx,%r10d
  85. xorl %ecx,%r11d
  86. xorl %edx,%r11d
  87. xorl %r10d,%eax
  88. xorl %r11d,%ebx
  89. movzbl %ah,%esi
  90. movzbl %bl,%edi
  91. movl 2052(%rbp,%rsi,8),%edx
  92. movl 0(%rbp,%rdi,8),%ecx
  93. movzbl %al,%esi
  94. shrl $16,%eax
  95. movzbl %bh,%edi
  96. xorl 4(%rbp,%rsi,8),%edx
  97. shrl $16,%ebx
  98. xorl 4(%rbp,%rdi,8),%ecx
  99. movzbl %ah,%esi
  100. movzbl %bl,%edi
  101. xorl 0(%rbp,%rsi,8),%edx
  102. xorl 2052(%rbp,%rdi,8),%ecx
  103. movzbl %al,%esi
  104. movzbl %bh,%edi
  105. xorl 2048(%rbp,%rsi,8),%edx
  106. xorl 2048(%rbp,%rdi,8),%ecx
  107. movl 32(%r14),%ebx
  108. movl 36(%r14),%eax
  109. xorl %edx,%ecx
  110. rorl $8,%edx
  111. xorl %ecx,%r8d
  112. xorl %ecx,%r9d
  113. xorl %edx,%r9d
  114. xorl %r8d,%eax
  115. xorl %r9d,%ebx
  116. movzbl %ah,%esi
  117. movzbl %bl,%edi
  118. movl 2052(%rbp,%rsi,8),%edx
  119. movl 0(%rbp,%rdi,8),%ecx
  120. movzbl %al,%esi
  121. shrl $16,%eax
  122. movzbl %bh,%edi
  123. xorl 4(%rbp,%rsi,8),%edx
  124. shrl $16,%ebx
  125. xorl 4(%rbp,%rdi,8),%ecx
  126. movzbl %ah,%esi
  127. movzbl %bl,%edi
  128. xorl 0(%rbp,%rsi,8),%edx
  129. xorl 2052(%rbp,%rdi,8),%ecx
  130. movzbl %al,%esi
  131. movzbl %bh,%edi
  132. xorl 2048(%rbp,%rsi,8),%edx
  133. xorl 2048(%rbp,%rdi,8),%ecx
  134. movl 40(%r14),%ebx
  135. movl 44(%r14),%eax
  136. xorl %edx,%ecx
  137. rorl $8,%edx
  138. xorl %ecx,%r10d
  139. xorl %ecx,%r11d
  140. xorl %edx,%r11d
  141. xorl %r10d,%eax
  142. xorl %r11d,%ebx
  143. movzbl %ah,%esi
  144. movzbl %bl,%edi
  145. movl 2052(%rbp,%rsi,8),%edx
  146. movl 0(%rbp,%rdi,8),%ecx
  147. movzbl %al,%esi
  148. shrl $16,%eax
  149. movzbl %bh,%edi
  150. xorl 4(%rbp,%rsi,8),%edx
  151. shrl $16,%ebx
  152. xorl 4(%rbp,%rdi,8),%ecx
  153. movzbl %ah,%esi
  154. movzbl %bl,%edi
  155. xorl 0(%rbp,%rsi,8),%edx
  156. xorl 2052(%rbp,%rdi,8),%ecx
  157. movzbl %al,%esi
  158. movzbl %bh,%edi
  159. xorl 2048(%rbp,%rsi,8),%edx
  160. xorl 2048(%rbp,%rdi,8),%ecx
  161. movl 48(%r14),%ebx
  162. movl 52(%r14),%eax
  163. xorl %edx,%ecx
  164. rorl $8,%edx
  165. xorl %ecx,%r8d
  166. xorl %ecx,%r9d
  167. xorl %edx,%r9d
  168. xorl %r8d,%eax
  169. xorl %r9d,%ebx
  170. movzbl %ah,%esi
  171. movzbl %bl,%edi
  172. movl 2052(%rbp,%rsi,8),%edx
  173. movl 0(%rbp,%rdi,8),%ecx
  174. movzbl %al,%esi
  175. shrl $16,%eax
  176. movzbl %bh,%edi
  177. xorl 4(%rbp,%rsi,8),%edx
  178. shrl $16,%ebx
  179. xorl 4(%rbp,%rdi,8),%ecx
  180. movzbl %ah,%esi
  181. movzbl %bl,%edi
  182. xorl 0(%rbp,%rsi,8),%edx
  183. xorl 2052(%rbp,%rdi,8),%ecx
  184. movzbl %al,%esi
  185. movzbl %bh,%edi
  186. xorl 2048(%rbp,%rsi,8),%edx
  187. xorl 2048(%rbp,%rdi,8),%ecx
  188. movl 56(%r14),%ebx
  189. movl 60(%r14),%eax
  190. xorl %edx,%ecx
  191. rorl $8,%edx
  192. xorl %ecx,%r10d
  193. xorl %ecx,%r11d
  194. xorl %edx,%r11d
  195. xorl %r10d,%eax
  196. xorl %r11d,%ebx
  197. movzbl %ah,%esi
  198. movzbl %bl,%edi
  199. movl 2052(%rbp,%rsi,8),%edx
  200. movl 0(%rbp,%rdi,8),%ecx
  201. movzbl %al,%esi
  202. shrl $16,%eax
  203. movzbl %bh,%edi
  204. xorl 4(%rbp,%rsi,8),%edx
  205. shrl $16,%ebx
  206. xorl 4(%rbp,%rdi,8),%ecx
  207. movzbl %ah,%esi
  208. movzbl %bl,%edi
  209. xorl 0(%rbp,%rsi,8),%edx
  210. xorl 2052(%rbp,%rdi,8),%ecx
  211. movzbl %al,%esi
  212. movzbl %bh,%edi
  213. xorl 2048(%rbp,%rsi,8),%edx
  214. xorl 2048(%rbp,%rdi,8),%ecx
  215. movl 64(%r14),%ebx
  216. movl 68(%r14),%eax
  217. xorl %edx,%ecx
  218. rorl $8,%edx
  219. xorl %ecx,%r8d
  220. xorl %ecx,%r9d
  221. xorl %edx,%r9d
  222. leaq 64(%r14),%r14
  223. cmpq %r15,%r14
  224. movl 8(%r14),%edx
  225. movl 12(%r14),%ecx
  226. je L$edone
  227. andl %r8d,%eax
  228. orl %r11d,%edx
  229. roll $1,%eax
  230. xorl %edx,%r10d
  231. xorl %eax,%r9d
  232. andl %r10d,%ecx
  233. orl %r9d,%ebx
  234. roll $1,%ecx
  235. xorl %ebx,%r8d
  236. xorl %ecx,%r11d
  237. jmp L$eloop
  238. .p2align 4
  239. L$edone:
  240. xorl %r10d,%eax
  241. xorl %r11d,%ebx
  242. xorl %r8d,%ecx
  243. xorl %r9d,%edx
  244. movl %eax,%r8d
  245. movl %ebx,%r9d
  246. movl %ecx,%r10d
  247. movl %edx,%r11d
  248. .byte 0xf3,0xc3
  249. .globl _Camellia_DecryptBlock
  250. .p2align 4
  251. _Camellia_DecryptBlock:
  252. movl $128,%eax
  253. subl %edi,%eax
  254. movl $3,%edi
  255. adcl $0,%edi
  256. jmp L$dec_rounds
  257. .globl _Camellia_DecryptBlock_Rounds
  258. .p2align 4
  259. L$dec_rounds:
  260. _Camellia_DecryptBlock_Rounds:
  261. pushq %rbx
  262. pushq %rbp
  263. pushq %r13
  264. pushq %r14
  265. pushq %r15
  266. L$dec_prologue:
  267. movq %rcx,%r13
  268. movq %rdx,%r15
  269. shll $6,%edi
  270. leaq L$Camellia_SBOX(%rip),%rbp
  271. leaq (%r15,%rdi,1),%r14
  272. movl 0(%rsi),%r8d
  273. movl 4(%rsi),%r9d
  274. movl 8(%rsi),%r10d
  275. bswapl %r8d
  276. movl 12(%rsi),%r11d
  277. bswapl %r9d
  278. bswapl %r10d
  279. bswapl %r11d
  280. call _x86_64_Camellia_decrypt
  281. bswapl %r8d
  282. bswapl %r9d
  283. bswapl %r10d
  284. movl %r8d,0(%r13)
  285. bswapl %r11d
  286. movl %r9d,4(%r13)
  287. movl %r10d,8(%r13)
  288. movl %r11d,12(%r13)
  289. movq 0(%rsp),%r15
  290. movq 8(%rsp),%r14
  291. movq 16(%rsp),%r13
  292. movq 24(%rsp),%rbp
  293. movq 32(%rsp),%rbx
  294. leaq 40(%rsp),%rsp
  295. L$dec_epilogue:
  296. .byte 0xf3,0xc3
  297. .p2align 4
  298. _x86_64_Camellia_decrypt:
  299. xorl 0(%r14),%r9d
  300. xorl 4(%r14),%r8d
  301. xorl 8(%r14),%r11d
  302. xorl 12(%r14),%r10d
  303. .p2align 4
  304. L$dloop:
  305. movl -8(%r14),%ebx
  306. movl -4(%r14),%eax
  307. xorl %r8d,%eax
  308. xorl %r9d,%ebx
  309. movzbl %ah,%esi
  310. movzbl %bl,%edi
  311. movl 2052(%rbp,%rsi,8),%edx
  312. movl 0(%rbp,%rdi,8),%ecx
  313. movzbl %al,%esi
  314. shrl $16,%eax
  315. movzbl %bh,%edi
  316. xorl 4(%rbp,%rsi,8),%edx
  317. shrl $16,%ebx
  318. xorl 4(%rbp,%rdi,8),%ecx
  319. movzbl %ah,%esi
  320. movzbl %bl,%edi
  321. xorl 0(%rbp,%rsi,8),%edx
  322. xorl 2052(%rbp,%rdi,8),%ecx
  323. movzbl %al,%esi
  324. movzbl %bh,%edi
  325. xorl 2048(%rbp,%rsi,8),%edx
  326. xorl 2048(%rbp,%rdi,8),%ecx
  327. movl -16(%r14),%ebx
  328. movl -12(%r14),%eax
  329. xorl %edx,%ecx
  330. rorl $8,%edx
  331. xorl %ecx,%r10d
  332. xorl %ecx,%r11d
  333. xorl %edx,%r11d
  334. xorl %r10d,%eax
  335. xorl %r11d,%ebx
  336. movzbl %ah,%esi
  337. movzbl %bl,%edi
  338. movl 2052(%rbp,%rsi,8),%edx
  339. movl 0(%rbp,%rdi,8),%ecx
  340. movzbl %al,%esi
  341. shrl $16,%eax
  342. movzbl %bh,%edi
  343. xorl 4(%rbp,%rsi,8),%edx
  344. shrl $16,%ebx
  345. xorl 4(%rbp,%rdi,8),%ecx
  346. movzbl %ah,%esi
  347. movzbl %bl,%edi
  348. xorl 0(%rbp,%rsi,8),%edx
  349. xorl 2052(%rbp,%rdi,8),%ecx
  350. movzbl %al,%esi
  351. movzbl %bh,%edi
  352. xorl 2048(%rbp,%rsi,8),%edx
  353. xorl 2048(%rbp,%rdi,8),%ecx
  354. movl -24(%r14),%ebx
  355. movl -20(%r14),%eax
  356. xorl %edx,%ecx
  357. rorl $8,%edx
  358. xorl %ecx,%r8d
  359. xorl %ecx,%r9d
  360. xorl %edx,%r9d
  361. xorl %r8d,%eax
  362. xorl %r9d,%ebx
  363. movzbl %ah,%esi
  364. movzbl %bl,%edi
  365. movl 2052(%rbp,%rsi,8),%edx
  366. movl 0(%rbp,%rdi,8),%ecx
  367. movzbl %al,%esi
  368. shrl $16,%eax
  369. movzbl %bh,%edi
  370. xorl 4(%rbp,%rsi,8),%edx
  371. shrl $16,%ebx
  372. xorl 4(%rbp,%rdi,8),%ecx
  373. movzbl %ah,%esi
  374. movzbl %bl,%edi
  375. xorl 0(%rbp,%rsi,8),%edx
  376. xorl 2052(%rbp,%rdi,8),%ecx
  377. movzbl %al,%esi
  378. movzbl %bh,%edi
  379. xorl 2048(%rbp,%rsi,8),%edx
  380. xorl 2048(%rbp,%rdi,8),%ecx
  381. movl -32(%r14),%ebx
  382. movl -28(%r14),%eax
  383. xorl %edx,%ecx
  384. rorl $8,%edx
  385. xorl %ecx,%r10d
  386. xorl %ecx,%r11d
  387. xorl %edx,%r11d
  388. xorl %r10d,%eax
  389. xorl %r11d,%ebx
  390. movzbl %ah,%esi
  391. movzbl %bl,%edi
  392. movl 2052(%rbp,%rsi,8),%edx
  393. movl 0(%rbp,%rdi,8),%ecx
  394. movzbl %al,%esi
  395. shrl $16,%eax
  396. movzbl %bh,%edi
  397. xorl 4(%rbp,%rsi,8),%edx
  398. shrl $16,%ebx
  399. xorl 4(%rbp,%rdi,8),%ecx
  400. movzbl %ah,%esi
  401. movzbl %bl,%edi
  402. xorl 0(%rbp,%rsi,8),%edx
  403. xorl 2052(%rbp,%rdi,8),%ecx
  404. movzbl %al,%esi
  405. movzbl %bh,%edi
  406. xorl 2048(%rbp,%rsi,8),%edx
  407. xorl 2048(%rbp,%rdi,8),%ecx
  408. movl -40(%r14),%ebx
  409. movl -36(%r14),%eax
  410. xorl %edx,%ecx
  411. rorl $8,%edx
  412. xorl %ecx,%r8d
  413. xorl %ecx,%r9d
  414. xorl %edx,%r9d
  415. xorl %r8d,%eax
  416. xorl %r9d,%ebx
  417. movzbl %ah,%esi
  418. movzbl %bl,%edi
  419. movl 2052(%rbp,%rsi,8),%edx
  420. movl 0(%rbp,%rdi,8),%ecx
  421. movzbl %al,%esi
  422. shrl $16,%eax
  423. movzbl %bh,%edi
  424. xorl 4(%rbp,%rsi,8),%edx
  425. shrl $16,%ebx
  426. xorl 4(%rbp,%rdi,8),%ecx
  427. movzbl %ah,%esi
  428. movzbl %bl,%edi
  429. xorl 0(%rbp,%rsi,8),%edx
  430. xorl 2052(%rbp,%rdi,8),%ecx
  431. movzbl %al,%esi
  432. movzbl %bh,%edi
  433. xorl 2048(%rbp,%rsi,8),%edx
  434. xorl 2048(%rbp,%rdi,8),%ecx
  435. movl -48(%r14),%ebx
  436. movl -44(%r14),%eax
  437. xorl %edx,%ecx
  438. rorl $8,%edx
  439. xorl %ecx,%r10d
  440. xorl %ecx,%r11d
  441. xorl %edx,%r11d
  442. xorl %r10d,%eax
  443. xorl %r11d,%ebx
  444. movzbl %ah,%esi
  445. movzbl %bl,%edi
  446. movl 2052(%rbp,%rsi,8),%edx
  447. movl 0(%rbp,%rdi,8),%ecx
  448. movzbl %al,%esi
  449. shrl $16,%eax
  450. movzbl %bh,%edi
  451. xorl 4(%rbp,%rsi,8),%edx
  452. shrl $16,%ebx
  453. xorl 4(%rbp,%rdi,8),%ecx
  454. movzbl %ah,%esi
  455. movzbl %bl,%edi
  456. xorl 0(%rbp,%rsi,8),%edx
  457. xorl 2052(%rbp,%rdi,8),%ecx
  458. movzbl %al,%esi
  459. movzbl %bh,%edi
  460. xorl 2048(%rbp,%rsi,8),%edx
  461. xorl 2048(%rbp,%rdi,8),%ecx
  462. movl -56(%r14),%ebx
  463. movl -52(%r14),%eax
  464. xorl %edx,%ecx
  465. rorl $8,%edx
  466. xorl %ecx,%r8d
  467. xorl %ecx,%r9d
  468. xorl %edx,%r9d
  469. leaq -64(%r14),%r14
  470. cmpq %r15,%r14
  471. movl 0(%r14),%edx
  472. movl 4(%r14),%ecx
  473. je L$ddone
  474. andl %r8d,%eax
  475. orl %r11d,%edx
  476. roll $1,%eax
  477. xorl %edx,%r10d
  478. xorl %eax,%r9d
  479. andl %r10d,%ecx
  480. orl %r9d,%ebx
  481. roll $1,%ecx
  482. xorl %ebx,%r8d
  483. xorl %ecx,%r11d
  484. jmp L$dloop
  485. .p2align 4
  486. L$ddone:
  487. xorl %r10d,%ecx
  488. xorl %r11d,%edx
  489. xorl %r8d,%eax
  490. xorl %r9d,%ebx
  491. movl %ecx,%r8d
  492. movl %edx,%r9d
  493. movl %eax,%r10d
  494. movl %ebx,%r11d
  495. .byte 0xf3,0xc3
  496. .globl _Camellia_Ekeygen
  497. .p2align 4
  498. _Camellia_Ekeygen:
  499. pushq %rbx
  500. pushq %rbp
  501. pushq %r13
  502. pushq %r14
  503. pushq %r15
  504. L$key_prologue:
  505. movl %edi,%r15d
  506. movq %rdx,%r13
  507. movl 0(%rsi),%r8d
  508. movl 4(%rsi),%r9d
  509. movl 8(%rsi),%r10d
  510. movl 12(%rsi),%r11d
  511. bswapl %r8d
  512. bswapl %r9d
  513. bswapl %r10d
  514. bswapl %r11d
  515. movl %r9d,0(%r13)
  516. movl %r8d,4(%r13)
  517. movl %r11d,8(%r13)
  518. movl %r10d,12(%r13)
  519. cmpq $128,%r15
  520. je L$1st128
  521. movl 16(%rsi),%r8d
  522. movl 20(%rsi),%r9d
  523. cmpq $192,%r15
  524. je L$1st192
  525. movl 24(%rsi),%r10d
  526. movl 28(%rsi),%r11d
  527. jmp L$1st256
  528. L$1st192:
  529. movl %r8d,%r10d
  530. movl %r9d,%r11d
  531. notl %r10d
  532. notl %r11d
  533. L$1st256:
  534. bswapl %r8d
  535. bswapl %r9d
  536. bswapl %r10d
  537. bswapl %r11d
  538. movl %r9d,32(%r13)
  539. movl %r8d,36(%r13)
  540. movl %r11d,40(%r13)
  541. movl %r10d,44(%r13)
  542. xorl 0(%r13),%r9d
  543. xorl 4(%r13),%r8d
  544. xorl 8(%r13),%r11d
  545. xorl 12(%r13),%r10d
  546. L$1st128:
  547. leaq L$Camellia_SIGMA(%rip),%r14
  548. leaq L$Camellia_SBOX(%rip),%rbp
  549. movl 0(%r14),%ebx
  550. movl 4(%r14),%eax
  551. xorl %r8d,%eax
  552. xorl %r9d,%ebx
  553. movzbl %ah,%esi
  554. movzbl %bl,%edi
  555. movl 2052(%rbp,%rsi,8),%edx
  556. movl 0(%rbp,%rdi,8),%ecx
  557. movzbl %al,%esi
  558. shrl $16,%eax
  559. movzbl %bh,%edi
  560. xorl 4(%rbp,%rsi,8),%edx
  561. shrl $16,%ebx
  562. xorl 4(%rbp,%rdi,8),%ecx
  563. movzbl %ah,%esi
  564. movzbl %bl,%edi
  565. xorl 0(%rbp,%rsi,8),%edx
  566. xorl 2052(%rbp,%rdi,8),%ecx
  567. movzbl %al,%esi
  568. movzbl %bh,%edi
  569. xorl 2048(%rbp,%rsi,8),%edx
  570. xorl 2048(%rbp,%rdi,8),%ecx
  571. movl 8(%r14),%ebx
  572. movl 12(%r14),%eax
  573. xorl %edx,%ecx
  574. rorl $8,%edx
  575. xorl %ecx,%r10d
  576. xorl %ecx,%r11d
  577. xorl %edx,%r11d
  578. xorl %r10d,%eax
  579. xorl %r11d,%ebx
  580. movzbl %ah,%esi
  581. movzbl %bl,%edi
  582. movl 2052(%rbp,%rsi,8),%edx
  583. movl 0(%rbp,%rdi,8),%ecx
  584. movzbl %al,%esi
  585. shrl $16,%eax
  586. movzbl %bh,%edi
  587. xorl 4(%rbp,%rsi,8),%edx
  588. shrl $16,%ebx
  589. xorl 4(%rbp,%rdi,8),%ecx
  590. movzbl %ah,%esi
  591. movzbl %bl,%edi
  592. xorl 0(%rbp,%rsi,8),%edx
  593. xorl 2052(%rbp,%rdi,8),%ecx
  594. movzbl %al,%esi
  595. movzbl %bh,%edi
  596. xorl 2048(%rbp,%rsi,8),%edx
  597. xorl 2048(%rbp,%rdi,8),%ecx
  598. movl 16(%r14),%ebx
  599. movl 20(%r14),%eax
  600. xorl %edx,%ecx
  601. rorl $8,%edx
  602. xorl %ecx,%r8d
  603. xorl %ecx,%r9d
  604. xorl %edx,%r9d
  605. xorl 0(%r13),%r9d
  606. xorl 4(%r13),%r8d
  607. xorl 8(%r13),%r11d
  608. xorl 12(%r13),%r10d
  609. xorl %r8d,%eax
  610. xorl %r9d,%ebx
  611. movzbl %ah,%esi
  612. movzbl %bl,%edi
  613. movl 2052(%rbp,%rsi,8),%edx
  614. movl 0(%rbp,%rdi,8),%ecx
  615. movzbl %al,%esi
  616. shrl $16,%eax
  617. movzbl %bh,%edi
  618. xorl 4(%rbp,%rsi,8),%edx
  619. shrl $16,%ebx
  620. xorl 4(%rbp,%rdi,8),%ecx
  621. movzbl %ah,%esi
  622. movzbl %bl,%edi
  623. xorl 0(%rbp,%rsi,8),%edx
  624. xorl 2052(%rbp,%rdi,8),%ecx
  625. movzbl %al,%esi
  626. movzbl %bh,%edi
  627. xorl 2048(%rbp,%rsi,8),%edx
  628. xorl 2048(%rbp,%rdi,8),%ecx
  629. movl 24(%r14),%ebx
  630. movl 28(%r14),%eax
  631. xorl %edx,%ecx
  632. rorl $8,%edx
  633. xorl %ecx,%r10d
  634. xorl %ecx,%r11d
  635. xorl %edx,%r11d
  636. xorl %r10d,%eax
  637. xorl %r11d,%ebx
  638. movzbl %ah,%esi
  639. movzbl %bl,%edi
  640. movl 2052(%rbp,%rsi,8),%edx
  641. movl 0(%rbp,%rdi,8),%ecx
  642. movzbl %al,%esi
  643. shrl $16,%eax
  644. movzbl %bh,%edi
  645. xorl 4(%rbp,%rsi,8),%edx
  646. shrl $16,%ebx
  647. xorl 4(%rbp,%rdi,8),%ecx
  648. movzbl %ah,%esi
  649. movzbl %bl,%edi
  650. xorl 0(%rbp,%rsi,8),%edx
  651. xorl 2052(%rbp,%rdi,8),%ecx
  652. movzbl %al,%esi
  653. movzbl %bh,%edi
  654. xorl 2048(%rbp,%rsi,8),%edx
  655. xorl 2048(%rbp,%rdi,8),%ecx
  656. movl 32(%r14),%ebx
  657. movl 36(%r14),%eax
  658. xorl %edx,%ecx
  659. rorl $8,%edx
  660. xorl %ecx,%r8d
  661. xorl %ecx,%r9d
  662. xorl %edx,%r9d
  663. cmpq $128,%r15
  664. jne L$2nd256
  665. leaq 128(%r13),%r13
  666. shlq $32,%r8
  667. shlq $32,%r10
  668. orq %r9,%r8
  669. orq %r11,%r10
  670. movq -128(%r13),%rax
  671. movq -120(%r13),%rbx
  672. movq %r8,-112(%r13)
  673. movq %r10,-104(%r13)
  674. movq %rax,%r11
  675. shlq $15,%rax
  676. movq %rbx,%r9
  677. shrq $49,%r9
  678. shrq $49,%r11
  679. orq %r9,%rax
  680. shlq $15,%rbx
  681. orq %r11,%rbx
  682. movq %rax,-96(%r13)
  683. movq %rbx,-88(%r13)
  684. movq %r8,%r11
  685. shlq $15,%r8
  686. movq %r10,%r9
  687. shrq $49,%r9
  688. shrq $49,%r11
  689. orq %r9,%r8
  690. shlq $15,%r10
  691. orq %r11,%r10
  692. movq %r8,-80(%r13)
  693. movq %r10,-72(%r13)
  694. movq %r8,%r11
  695. shlq $15,%r8
  696. movq %r10,%r9
  697. shrq $49,%r9
  698. shrq $49,%r11
  699. orq %r9,%r8
  700. shlq $15,%r10
  701. orq %r11,%r10
  702. movq %r8,-64(%r13)
  703. movq %r10,-56(%r13)
  704. movq %rax,%r11
  705. shlq $30,%rax
  706. movq %rbx,%r9
  707. shrq $34,%r9
  708. shrq $34,%r11
  709. orq %r9,%rax
  710. shlq $30,%rbx
  711. orq %r11,%rbx
  712. movq %rax,-48(%r13)
  713. movq %rbx,-40(%r13)
  714. movq %r8,%r11
  715. shlq $15,%r8
  716. movq %r10,%r9
  717. shrq $49,%r9
  718. shrq $49,%r11
  719. orq %r9,%r8
  720. shlq $15,%r10
  721. orq %r11,%r10
  722. movq %r8,-32(%r13)
  723. movq %rax,%r11
  724. shlq $15,%rax
  725. movq %rbx,%r9
  726. shrq $49,%r9
  727. shrq $49,%r11
  728. orq %r9,%rax
  729. shlq $15,%rbx
  730. orq %r11,%rbx
  731. movq %rbx,-24(%r13)
  732. movq %r8,%r11
  733. shlq $15,%r8
  734. movq %r10,%r9
  735. shrq $49,%r9
  736. shrq $49,%r11
  737. orq %r9,%r8
  738. shlq $15,%r10
  739. orq %r11,%r10
  740. movq %r8,-16(%r13)
  741. movq %r10,-8(%r13)
  742. movq %rax,%r11
  743. shlq $17,%rax
  744. movq %rbx,%r9
  745. shrq $47,%r9
  746. shrq $47,%r11
  747. orq %r9,%rax
  748. shlq $17,%rbx
  749. orq %r11,%rbx
  750. movq %rax,0(%r13)
  751. movq %rbx,8(%r13)
  752. movq %rax,%r11
  753. shlq $17,%rax
  754. movq %rbx,%r9
  755. shrq $47,%r9
  756. shrq $47,%r11
  757. orq %r9,%rax
  758. shlq $17,%rbx
  759. orq %r11,%rbx
  760. movq %rax,16(%r13)
  761. movq %rbx,24(%r13)
  762. movq %r8,%r11
  763. shlq $34,%r8
  764. movq %r10,%r9
  765. shrq $30,%r9
  766. shrq $30,%r11
  767. orq %r9,%r8
  768. shlq $34,%r10
  769. orq %r11,%r10
  770. movq %r8,32(%r13)
  771. movq %r10,40(%r13)
  772. movq %rax,%r11
  773. shlq $17,%rax
  774. movq %rbx,%r9
  775. shrq $47,%r9
  776. shrq $47,%r11
  777. orq %r9,%rax
  778. shlq $17,%rbx
  779. orq %r11,%rbx
  780. movq %rax,48(%r13)
  781. movq %rbx,56(%r13)
  782. movq %r8,%r11
  783. shlq $17,%r8
  784. movq %r10,%r9
  785. shrq $47,%r9
  786. shrq $47,%r11
  787. orq %r9,%r8
  788. shlq $17,%r10
  789. orq %r11,%r10
  790. movq %r8,64(%r13)
  791. movq %r10,72(%r13)
  792. movl $3,%eax
  793. jmp L$done
  794. .p2align 4
  795. L$2nd256:
  796. movl %r9d,48(%r13)
  797. movl %r8d,52(%r13)
  798. movl %r11d,56(%r13)
  799. movl %r10d,60(%r13)
  800. xorl 32(%r13),%r9d
  801. xorl 36(%r13),%r8d
  802. xorl 40(%r13),%r11d
  803. xorl 44(%r13),%r10d
  804. xorl %r8d,%eax
  805. xorl %r9d,%ebx
  806. movzbl %ah,%esi
  807. movzbl %bl,%edi
  808. movl 2052(%rbp,%rsi,8),%edx
  809. movl 0(%rbp,%rdi,8),%ecx
  810. movzbl %al,%esi
  811. shrl $16,%eax
  812. movzbl %bh,%edi
  813. xorl 4(%rbp,%rsi,8),%edx
  814. shrl $16,%ebx
  815. xorl 4(%rbp,%rdi,8),%ecx
  816. movzbl %ah,%esi
  817. movzbl %bl,%edi
  818. xorl 0(%rbp,%rsi,8),%edx
  819. xorl 2052(%rbp,%rdi,8),%ecx
  820. movzbl %al,%esi
  821. movzbl %bh,%edi
  822. xorl 2048(%rbp,%rsi,8),%edx
  823. xorl 2048(%rbp,%rdi,8),%ecx
  824. movl 40(%r14),%ebx
  825. movl 44(%r14),%eax
  826. xorl %edx,%ecx
  827. rorl $8,%edx
  828. xorl %ecx,%r10d
  829. xorl %ecx,%r11d
  830. xorl %edx,%r11d
  831. xorl %r10d,%eax
  832. xorl %r11d,%ebx
  833. movzbl %ah,%esi
  834. movzbl %bl,%edi
  835. movl 2052(%rbp,%rsi,8),%edx
  836. movl 0(%rbp,%rdi,8),%ecx
  837. movzbl %al,%esi
  838. shrl $16,%eax
  839. movzbl %bh,%edi
  840. xorl 4(%rbp,%rsi,8),%edx
  841. shrl $16,%ebx
  842. xorl 4(%rbp,%rdi,8),%ecx
  843. movzbl %ah,%esi
  844. movzbl %bl,%edi
  845. xorl 0(%rbp,%rsi,8),%edx
  846. xorl 2052(%rbp,%rdi,8),%ecx
  847. movzbl %al,%esi
  848. movzbl %bh,%edi
  849. xorl 2048(%rbp,%rsi,8),%edx
  850. xorl 2048(%rbp,%rdi,8),%ecx
  851. movl 48(%r14),%ebx
  852. movl 52(%r14),%eax
  853. xorl %edx,%ecx
  854. rorl $8,%edx
  855. xorl %ecx,%r8d
  856. xorl %ecx,%r9d
  857. xorl %edx,%r9d
  858. movq 0(%r13),%rax
  859. movq 8(%r13),%rbx
  860. movq 32(%r13),%rcx
  861. movq 40(%r13),%rdx
  862. movq 48(%r13),%r14
  863. movq 56(%r13),%r15
  864. leaq 128(%r13),%r13
  865. shlq $32,%r8
  866. shlq $32,%r10
  867. orq %r9,%r8
  868. orq %r11,%r10
  869. movq %r8,-112(%r13)
  870. movq %r10,-104(%r13)
  871. movq %rcx,%r11
  872. shlq $15,%rcx
  873. movq %rdx,%r9
  874. shrq $49,%r9
  875. shrq $49,%r11
  876. orq %r9,%rcx
  877. shlq $15,%rdx
  878. orq %r11,%rdx
  879. movq %rcx,-96(%r13)
  880. movq %rdx,-88(%r13)
  881. movq %r14,%r11
  882. shlq $15,%r14
  883. movq %r15,%r9
  884. shrq $49,%r9
  885. shrq $49,%r11
  886. orq %r9,%r14
  887. shlq $15,%r15
  888. orq %r11,%r15
  889. movq %r14,-80(%r13)
  890. movq %r15,-72(%r13)
  891. movq %rcx,%r11
  892. shlq $15,%rcx
  893. movq %rdx,%r9
  894. shrq $49,%r9
  895. shrq $49,%r11
  896. orq %r9,%rcx
  897. shlq $15,%rdx
  898. orq %r11,%rdx
  899. movq %rcx,-64(%r13)
  900. movq %rdx,-56(%r13)
  901. movq %r8,%r11
  902. shlq $30,%r8
  903. movq %r10,%r9
  904. shrq $34,%r9
  905. shrq $34,%r11
  906. orq %r9,%r8
  907. shlq $30,%r10
  908. orq %r11,%r10
  909. movq %r8,-48(%r13)
  910. movq %r10,-40(%r13)
  911. movq %rax,%r11
  912. shlq $45,%rax
  913. movq %rbx,%r9
  914. shrq $19,%r9
  915. shrq $19,%r11
  916. orq %r9,%rax
  917. shlq $45,%rbx
  918. orq %r11,%rbx
  919. movq %rax,-32(%r13)
  920. movq %rbx,-24(%r13)
  921. movq %r14,%r11
  922. shlq $30,%r14
  923. movq %r15,%r9
  924. shrq $34,%r9
  925. shrq $34,%r11
  926. orq %r9,%r14
  927. shlq $30,%r15
  928. orq %r11,%r15
  929. movq %r14,-16(%r13)
  930. movq %r15,-8(%r13)
  931. movq %rax,%r11
  932. shlq $15,%rax
  933. movq %rbx,%r9
  934. shrq $49,%r9
  935. shrq $49,%r11
  936. orq %r9,%rax
  937. shlq $15,%rbx
  938. orq %r11,%rbx
  939. movq %rax,0(%r13)
  940. movq %rbx,8(%r13)
  941. movq %rcx,%r11
  942. shlq $30,%rcx
  943. movq %rdx,%r9
  944. shrq $34,%r9
  945. shrq $34,%r11
  946. orq %r9,%rcx
  947. shlq $30,%rdx
  948. orq %r11,%rdx
  949. movq %rcx,16(%r13)
  950. movq %rdx,24(%r13)
  951. movq %r8,%r11
  952. shlq $30,%r8
  953. movq %r10,%r9
  954. shrq $34,%r9
  955. shrq $34,%r11
  956. orq %r9,%r8
  957. shlq $30,%r10
  958. orq %r11,%r10
  959. movq %r8,32(%r13)
  960. movq %r10,40(%r13)
  961. movq %rax,%r11
  962. shlq $17,%rax
  963. movq %rbx,%r9
  964. shrq $47,%r9
  965. shrq $47,%r11
  966. orq %r9,%rax
  967. shlq $17,%rbx
  968. orq %r11,%rbx
  969. movq %rax,48(%r13)
  970. movq %rbx,56(%r13)
  971. movq %r14,%r11
  972. shlq $32,%r14
  973. movq %r15,%r9
  974. shrq $32,%r9
  975. shrq $32,%r11
  976. orq %r9,%r14
  977. shlq $32,%r15
  978. orq %r11,%r15
  979. movq %r14,64(%r13)
  980. movq %r15,72(%r13)
  981. movq %rcx,%r11
  982. shlq $34,%rcx
  983. movq %rdx,%r9
  984. shrq $30,%r9
  985. shrq $30,%r11
  986. orq %r9,%rcx
  987. shlq $34,%rdx
  988. orq %r11,%rdx
  989. movq %rcx,80(%r13)
  990. movq %rdx,88(%r13)
  991. movq %r14,%r11
  992. shlq $17,%r14
  993. movq %r15,%r9
  994. shrq $47,%r9
  995. shrq $47,%r11
  996. orq %r9,%r14
  997. shlq $17,%r15
  998. orq %r11,%r15
  999. movq %r14,96(%r13)
  1000. movq %r15,104(%r13)
  1001. movq %rax,%r11
  1002. shlq $34,%rax
  1003. movq %rbx,%r9
  1004. shrq $30,%r9
  1005. shrq $30,%r11
  1006. orq %r9,%rax
  1007. shlq $34,%rbx
  1008. orq %r11,%rbx
  1009. movq %rax,112(%r13)
  1010. movq %rbx,120(%r13)
  1011. movq %r8,%r11
  1012. shlq $51,%r8
  1013. movq %r10,%r9
  1014. shrq $13,%r9
  1015. shrq $13,%r11
  1016. orq %r9,%r8
  1017. shlq $51,%r10
  1018. orq %r11,%r10
  1019. movq %r8,128(%r13)
  1020. movq %r10,136(%r13)
  1021. movl $4,%eax
  1022. L$done:
  1023. movq 0(%rsp),%r15
  1024. movq 8(%rsp),%r14
  1025. movq 16(%rsp),%r13
  1026. movq 24(%rsp),%rbp
  1027. movq 32(%rsp),%rbx
  1028. leaq 40(%rsp),%rsp
  1029. L$key_epilogue:
  1030. .byte 0xf3,0xc3
  1031. .p2align 6
  1032. L$Camellia_SIGMA:
  1033. .long 0x3bcc908b, 0xa09e667f, 0x4caa73b2, 0xb67ae858
  1034. .long 0xe94f82be, 0xc6ef372f, 0xf1d36f1c, 0x54ff53a5
  1035. .long 0xde682d1d, 0x10e527fa, 0xb3e6c1fd, 0xb05688c2
  1036. .long 0, 0, 0, 0
  1037. L$Camellia_SBOX:
  1038. .long 0x70707000,0x70700070
  1039. .long 0x82828200,0x2c2c002c
  1040. .long 0x2c2c2c00,0xb3b300b3
  1041. .long 0xececec00,0xc0c000c0
  1042. .long 0xb3b3b300,0xe4e400e4
  1043. .long 0x27272700,0x57570057
  1044. .long 0xc0c0c000,0xeaea00ea
  1045. .long 0xe5e5e500,0xaeae00ae
  1046. .long 0xe4e4e400,0x23230023
  1047. .long 0x85858500,0x6b6b006b
  1048. .long 0x57575700,0x45450045
  1049. .long 0x35353500,0xa5a500a5
  1050. .long 0xeaeaea00,0xeded00ed
  1051. .long 0x0c0c0c00,0x4f4f004f
  1052. .long 0xaeaeae00,0x1d1d001d
  1053. .long 0x41414100,0x92920092
  1054. .long 0x23232300,0x86860086
  1055. .long 0xefefef00,0xafaf00af
  1056. .long 0x6b6b6b00,0x7c7c007c
  1057. .long 0x93939300,0x1f1f001f
  1058. .long 0x45454500,0x3e3e003e
  1059. .long 0x19191900,0xdcdc00dc
  1060. .long 0xa5a5a500,0x5e5e005e
  1061. .long 0x21212100,0x0b0b000b
  1062. .long 0xededed00,0xa6a600a6
  1063. .long 0x0e0e0e00,0x39390039
  1064. .long 0x4f4f4f00,0xd5d500d5
  1065. .long 0x4e4e4e00,0x5d5d005d
  1066. .long 0x1d1d1d00,0xd9d900d9
  1067. .long 0x65656500,0x5a5a005a
  1068. .long 0x92929200,0x51510051
  1069. .long 0xbdbdbd00,0x6c6c006c
  1070. .long 0x86868600,0x8b8b008b
  1071. .long 0xb8b8b800,0x9a9a009a
  1072. .long 0xafafaf00,0xfbfb00fb
  1073. .long 0x8f8f8f00,0xb0b000b0
  1074. .long 0x7c7c7c00,0x74740074
  1075. .long 0xebebeb00,0x2b2b002b
  1076. .long 0x1f1f1f00,0xf0f000f0
  1077. .long 0xcecece00,0x84840084
  1078. .long 0x3e3e3e00,0xdfdf00df
  1079. .long 0x30303000,0xcbcb00cb
  1080. .long 0xdcdcdc00,0x34340034
  1081. .long 0x5f5f5f00,0x76760076
  1082. .long 0x5e5e5e00,0x6d6d006d
  1083. .long 0xc5c5c500,0xa9a900a9
  1084. .long 0x0b0b0b00,0xd1d100d1
  1085. .long 0x1a1a1a00,0x04040004
  1086. .long 0xa6a6a600,0x14140014
  1087. .long 0xe1e1e100,0x3a3a003a
  1088. .long 0x39393900,0xdede00de
  1089. .long 0xcacaca00,0x11110011
  1090. .long 0xd5d5d500,0x32320032
  1091. .long 0x47474700,0x9c9c009c
  1092. .long 0x5d5d5d00,0x53530053
  1093. .long 0x3d3d3d00,0xf2f200f2
  1094. .long 0xd9d9d900,0xfefe00fe
  1095. .long 0x01010100,0xcfcf00cf
  1096. .long 0x5a5a5a00,0xc3c300c3
  1097. .long 0xd6d6d600,0x7a7a007a
  1098. .long 0x51515100,0x24240024
  1099. .long 0x56565600,0xe8e800e8
  1100. .long 0x6c6c6c00,0x60600060
  1101. .long 0x4d4d4d00,0x69690069
  1102. .long 0x8b8b8b00,0xaaaa00aa
  1103. .long 0x0d0d0d00,0xa0a000a0
  1104. .long 0x9a9a9a00,0xa1a100a1
  1105. .long 0x66666600,0x62620062
  1106. .long 0xfbfbfb00,0x54540054
  1107. .long 0xcccccc00,0x1e1e001e
  1108. .long 0xb0b0b000,0xe0e000e0
  1109. .long 0x2d2d2d00,0x64640064
  1110. .long 0x74747400,0x10100010
  1111. .long 0x12121200,0x00000000
  1112. .long 0x2b2b2b00,0xa3a300a3
  1113. .long 0x20202000,0x75750075
  1114. .long 0xf0f0f000,0x8a8a008a
  1115. .long 0xb1b1b100,0xe6e600e6
  1116. .long 0x84848400,0x09090009
  1117. .long 0x99999900,0xdddd00dd
  1118. .long 0xdfdfdf00,0x87870087
  1119. .long 0x4c4c4c00,0x83830083
  1120. .long 0xcbcbcb00,0xcdcd00cd
  1121. .long 0xc2c2c200,0x90900090
  1122. .long 0x34343400,0x73730073
  1123. .long 0x7e7e7e00,0xf6f600f6
  1124. .long 0x76767600,0x9d9d009d
  1125. .long 0x05050500,0xbfbf00bf
  1126. .long 0x6d6d6d00,0x52520052
  1127. .long 0xb7b7b700,0xd8d800d8
  1128. .long 0xa9a9a900,0xc8c800c8
  1129. .long 0x31313100,0xc6c600c6
  1130. .long 0xd1d1d100,0x81810081
  1131. .long 0x17171700,0x6f6f006f
  1132. .long 0x04040400,0x13130013
  1133. .long 0xd7d7d700,0x63630063
  1134. .long 0x14141400,0xe9e900e9
  1135. .long 0x58585800,0xa7a700a7
  1136. .long 0x3a3a3a00,0x9f9f009f
  1137. .long 0x61616100,0xbcbc00bc
  1138. .long 0xdedede00,0x29290029
  1139. .long 0x1b1b1b00,0xf9f900f9
  1140. .long 0x11111100,0x2f2f002f
  1141. .long 0x1c1c1c00,0xb4b400b4
  1142. .long 0x32323200,0x78780078
  1143. .long 0x0f0f0f00,0x06060006
  1144. .long 0x9c9c9c00,0xe7e700e7
  1145. .long 0x16161600,0x71710071
  1146. .long 0x53535300,0xd4d400d4
  1147. .long 0x18181800,0xabab00ab
  1148. .long 0xf2f2f200,0x88880088
  1149. .long 0x22222200,0x8d8d008d
  1150. .long 0xfefefe00,0x72720072
  1151. .long 0x44444400,0xb9b900b9
  1152. .long 0xcfcfcf00,0xf8f800f8
  1153. .long 0xb2b2b200,0xacac00ac
  1154. .long 0xc3c3c300,0x36360036
  1155. .long 0xb5b5b500,0x2a2a002a
  1156. .long 0x7a7a7a00,0x3c3c003c
  1157. .long 0x91919100,0xf1f100f1
  1158. .long 0x24242400,0x40400040
  1159. .long 0x08080800,0xd3d300d3
  1160. .long 0xe8e8e800,0xbbbb00bb
  1161. .long 0xa8a8a800,0x43430043
  1162. .long 0x60606000,0x15150015
  1163. .long 0xfcfcfc00,0xadad00ad
  1164. .long 0x69696900,0x77770077
  1165. .long 0x50505000,0x80800080
  1166. .long 0xaaaaaa00,0x82820082
  1167. .long 0xd0d0d000,0xecec00ec
  1168. .long 0xa0a0a000,0x27270027
  1169. .long 0x7d7d7d00,0xe5e500e5
  1170. .long 0xa1a1a100,0x85850085
  1171. .long 0x89898900,0x35350035
  1172. .long 0x62626200,0x0c0c000c
  1173. .long 0x97979700,0x41410041
  1174. .long 0x54545400,0xefef00ef
  1175. .long 0x5b5b5b00,0x93930093
  1176. .long 0x1e1e1e00,0x19190019
  1177. .long 0x95959500,0x21210021
  1178. .long 0xe0e0e000,0x0e0e000e
  1179. .long 0xffffff00,0x4e4e004e
  1180. .long 0x64646400,0x65650065
  1181. .long 0xd2d2d200,0xbdbd00bd
  1182. .long 0x10101000,0xb8b800b8
  1183. .long 0xc4c4c400,0x8f8f008f
  1184. .long 0x00000000,0xebeb00eb
  1185. .long 0x48484800,0xcece00ce
  1186. .long 0xa3a3a300,0x30300030
  1187. .long 0xf7f7f700,0x5f5f005f
  1188. .long 0x75757500,0xc5c500c5
  1189. .long 0xdbdbdb00,0x1a1a001a
  1190. .long 0x8a8a8a00,0xe1e100e1
  1191. .long 0x03030300,0xcaca00ca
  1192. .long 0xe6e6e600,0x47470047
  1193. .long 0xdadada00,0x3d3d003d
  1194. .long 0x09090900,0x01010001
  1195. .long 0x3f3f3f00,0xd6d600d6
  1196. .long 0xdddddd00,0x56560056
  1197. .long 0x94949400,0x4d4d004d
  1198. .long 0x87878700,0x0d0d000d
  1199. .long 0x5c5c5c00,0x66660066
  1200. .long 0x83838300,0xcccc00cc
  1201. .long 0x02020200,0x2d2d002d
  1202. .long 0xcdcdcd00,0x12120012
  1203. .long 0x4a4a4a00,0x20200020
  1204. .long 0x90909000,0xb1b100b1
  1205. .long 0x33333300,0x99990099
  1206. .long 0x73737300,0x4c4c004c
  1207. .long 0x67676700,0xc2c200c2
  1208. .long 0xf6f6f600,0x7e7e007e
  1209. .long 0xf3f3f300,0x05050005
  1210. .long 0x9d9d9d00,0xb7b700b7
  1211. .long 0x7f7f7f00,0x31310031
  1212. .long 0xbfbfbf00,0x17170017
  1213. .long 0xe2e2e200,0xd7d700d7
  1214. .long 0x52525200,0x58580058
  1215. .long 0x9b9b9b00,0x61610061
  1216. .long 0xd8d8d800,0x1b1b001b
  1217. .long 0x26262600,0x1c1c001c
  1218. .long 0xc8c8c800,0x0f0f000f
  1219. .long 0x37373700,0x16160016
  1220. .long 0xc6c6c600,0x18180018
  1221. .long 0x3b3b3b00,0x22220022
  1222. .long 0x81818100,0x44440044
  1223. .long 0x96969600,0xb2b200b2
  1224. .long 0x6f6f6f00,0xb5b500b5
  1225. .long 0x4b4b4b00,0x91910091
  1226. .long 0x13131300,0x08080008
  1227. .long 0xbebebe00,0xa8a800a8
  1228. .long 0x63636300,0xfcfc00fc
  1229. .long 0x2e2e2e00,0x50500050
  1230. .long 0xe9e9e900,0xd0d000d0
  1231. .long 0x79797900,0x7d7d007d
  1232. .long 0xa7a7a700,0x89890089
  1233. .long 0x8c8c8c00,0x97970097
  1234. .long 0x9f9f9f00,0x5b5b005b
  1235. .long 0x6e6e6e00,0x95950095
  1236. .long 0xbcbcbc00,0xffff00ff
  1237. .long 0x8e8e8e00,0xd2d200d2
  1238. .long 0x29292900,0xc4c400c4
  1239. .long 0xf5f5f500,0x48480048
  1240. .long 0xf9f9f900,0xf7f700f7
  1241. .long 0xb6b6b600,0xdbdb00db
  1242. .long 0x2f2f2f00,0x03030003
  1243. .long 0xfdfdfd00,0xdada00da
  1244. .long 0xb4b4b400,0x3f3f003f
  1245. .long 0x59595900,0x94940094
  1246. .long 0x78787800,0x5c5c005c
  1247. .long 0x98989800,0x02020002
  1248. .long 0x06060600,0x4a4a004a
  1249. .long 0x6a6a6a00,0x33330033
  1250. .long 0xe7e7e700,0x67670067
  1251. .long 0x46464600,0xf3f300f3
  1252. .long 0x71717100,0x7f7f007f
  1253. .long 0xbababa00,0xe2e200e2
  1254. .long 0xd4d4d400,0x9b9b009b
  1255. .long 0x25252500,0x26260026
  1256. .long 0xababab00,0x37370037
  1257. .long 0x42424200,0x3b3b003b
  1258. .long 0x88888800,0x96960096
  1259. .long 0xa2a2a200,0x4b4b004b
  1260. .long 0x8d8d8d00,0xbebe00be
  1261. .long 0xfafafa00,0x2e2e002e
  1262. .long 0x72727200,0x79790079
  1263. .long 0x07070700,0x8c8c008c
  1264. .long 0xb9b9b900,0x6e6e006e
  1265. .long 0x55555500,0x8e8e008e
  1266. .long 0xf8f8f800,0xf5f500f5
  1267. .long 0xeeeeee00,0xb6b600b6
  1268. .long 0xacacac00,0xfdfd00fd
  1269. .long 0x0a0a0a00,0x59590059
  1270. .long 0x36363600,0x98980098
  1271. .long 0x49494900,0x6a6a006a
  1272. .long 0x2a2a2a00,0x46460046
  1273. .long 0x68686800,0xbaba00ba
  1274. .long 0x3c3c3c00,0x25250025
  1275. .long 0x38383800,0x42420042
  1276. .long 0xf1f1f100,0xa2a200a2
  1277. .long 0xa4a4a400,0xfafa00fa
  1278. .long 0x40404000,0x07070007
  1279. .long 0x28282800,0x55550055
  1280. .long 0xd3d3d300,0xeeee00ee
  1281. .long 0x7b7b7b00,0x0a0a000a
  1282. .long 0xbbbbbb00,0x49490049
  1283. .long 0xc9c9c900,0x68680068
  1284. .long 0x43434300,0x38380038
  1285. .long 0xc1c1c100,0xa4a400a4
  1286. .long 0x15151500,0x28280028
  1287. .long 0xe3e3e300,0x7b7b007b
  1288. .long 0xadadad00,0xc9c900c9
  1289. .long 0xf4f4f400,0xc1c100c1
  1290. .long 0x77777700,0xe3e300e3
  1291. .long 0xc7c7c700,0xf4f400f4
  1292. .long 0x80808000,0xc7c700c7
  1293. .long 0x9e9e9e00,0x9e9e009e
  1294. .long 0x00e0e0e0,0x38003838
  1295. .long 0x00050505,0x41004141
  1296. .long 0x00585858,0x16001616
  1297. .long 0x00d9d9d9,0x76007676
  1298. .long 0x00676767,0xd900d9d9
  1299. .long 0x004e4e4e,0x93009393
  1300. .long 0x00818181,0x60006060
  1301. .long 0x00cbcbcb,0xf200f2f2
  1302. .long 0x00c9c9c9,0x72007272
  1303. .long 0x000b0b0b,0xc200c2c2
  1304. .long 0x00aeaeae,0xab00abab
  1305. .long 0x006a6a6a,0x9a009a9a
  1306. .long 0x00d5d5d5,0x75007575
  1307. .long 0x00181818,0x06000606
  1308. .long 0x005d5d5d,0x57005757
  1309. .long 0x00828282,0xa000a0a0
  1310. .long 0x00464646,0x91009191
  1311. .long 0x00dfdfdf,0xf700f7f7
  1312. .long 0x00d6d6d6,0xb500b5b5
  1313. .long 0x00272727,0xc900c9c9
  1314. .long 0x008a8a8a,0xa200a2a2
  1315. .long 0x00323232,0x8c008c8c
  1316. .long 0x004b4b4b,0xd200d2d2
  1317. .long 0x00424242,0x90009090
  1318. .long 0x00dbdbdb,0xf600f6f6
  1319. .long 0x001c1c1c,0x07000707
  1320. .long 0x009e9e9e,0xa700a7a7
  1321. .long 0x009c9c9c,0x27002727
  1322. .long 0x003a3a3a,0x8e008e8e
  1323. .long 0x00cacaca,0xb200b2b2
  1324. .long 0x00252525,0x49004949
  1325. .long 0x007b7b7b,0xde00dede
  1326. .long 0x000d0d0d,0x43004343
  1327. .long 0x00717171,0x5c005c5c
  1328. .long 0x005f5f5f,0xd700d7d7
  1329. .long 0x001f1f1f,0xc700c7c7
  1330. .long 0x00f8f8f8,0x3e003e3e
  1331. .long 0x00d7d7d7,0xf500f5f5
  1332. .long 0x003e3e3e,0x8f008f8f
  1333. .long 0x009d9d9d,0x67006767
  1334. .long 0x007c7c7c,0x1f001f1f
  1335. .long 0x00606060,0x18001818
  1336. .long 0x00b9b9b9,0x6e006e6e
  1337. .long 0x00bebebe,0xaf00afaf
  1338. .long 0x00bcbcbc,0x2f002f2f
  1339. .long 0x008b8b8b,0xe200e2e2
  1340. .long 0x00161616,0x85008585
  1341. .long 0x00343434,0x0d000d0d
  1342. .long 0x004d4d4d,0x53005353
  1343. .long 0x00c3c3c3,0xf000f0f0
  1344. .long 0x00727272,0x9c009c9c
  1345. .long 0x00959595,0x65006565
  1346. .long 0x00ababab,0xea00eaea
  1347. .long 0x008e8e8e,0xa300a3a3
  1348. .long 0x00bababa,0xae00aeae
  1349. .long 0x007a7a7a,0x9e009e9e
  1350. .long 0x00b3b3b3,0xec00ecec
  1351. .long 0x00020202,0x80008080
  1352. .long 0x00b4b4b4,0x2d002d2d
  1353. .long 0x00adadad,0x6b006b6b
  1354. .long 0x00a2a2a2,0xa800a8a8
  1355. .long 0x00acacac,0x2b002b2b
  1356. .long 0x00d8d8d8,0x36003636
  1357. .long 0x009a9a9a,0xa600a6a6
  1358. .long 0x00171717,0xc500c5c5
  1359. .long 0x001a1a1a,0x86008686
  1360. .long 0x00353535,0x4d004d4d
  1361. .long 0x00cccccc,0x33003333
  1362. .long 0x00f7f7f7,0xfd00fdfd
  1363. .long 0x00999999,0x66006666
  1364. .long 0x00616161,0x58005858
  1365. .long 0x005a5a5a,0x96009696
  1366. .long 0x00e8e8e8,0x3a003a3a
  1367. .long 0x00242424,0x09000909
  1368. .long 0x00565656,0x95009595
  1369. .long 0x00404040,0x10001010
  1370. .long 0x00e1e1e1,0x78007878
  1371. .long 0x00636363,0xd800d8d8
  1372. .long 0x00090909,0x42004242
  1373. .long 0x00333333,0xcc00cccc
  1374. .long 0x00bfbfbf,0xef00efef
  1375. .long 0x00989898,0x26002626
  1376. .long 0x00979797,0xe500e5e5
  1377. .long 0x00858585,0x61006161
  1378. .long 0x00686868,0x1a001a1a
  1379. .long 0x00fcfcfc,0x3f003f3f
  1380. .long 0x00ececec,0x3b003b3b
  1381. .long 0x000a0a0a,0x82008282
  1382. .long 0x00dadada,0xb600b6b6
  1383. .long 0x006f6f6f,0xdb00dbdb
  1384. .long 0x00535353,0xd400d4d4
  1385. .long 0x00626262,0x98009898
  1386. .long 0x00a3a3a3,0xe800e8e8
  1387. .long 0x002e2e2e,0x8b008b8b
  1388. .long 0x00080808,0x02000202
  1389. .long 0x00afafaf,0xeb00ebeb
  1390. .long 0x00282828,0x0a000a0a
  1391. .long 0x00b0b0b0,0x2c002c2c
  1392. .long 0x00747474,0x1d001d1d
  1393. .long 0x00c2c2c2,0xb000b0b0
  1394. .long 0x00bdbdbd,0x6f006f6f
  1395. .long 0x00363636,0x8d008d8d
  1396. .long 0x00222222,0x88008888
  1397. .long 0x00383838,0x0e000e0e
  1398. .long 0x00646464,0x19001919
  1399. .long 0x001e1e1e,0x87008787
  1400. .long 0x00393939,0x4e004e4e
  1401. .long 0x002c2c2c,0x0b000b0b
  1402. .long 0x00a6a6a6,0xa900a9a9
  1403. .long 0x00303030,0x0c000c0c
  1404. .long 0x00e5e5e5,0x79007979
  1405. .long 0x00444444,0x11001111
  1406. .long 0x00fdfdfd,0x7f007f7f
  1407. .long 0x00888888,0x22002222
  1408. .long 0x009f9f9f,0xe700e7e7
  1409. .long 0x00656565,0x59005959
  1410. .long 0x00878787,0xe100e1e1
  1411. .long 0x006b6b6b,0xda00dada
  1412. .long 0x00f4f4f4,0x3d003d3d
  1413. .long 0x00232323,0xc800c8c8
  1414. .long 0x00484848,0x12001212
  1415. .long 0x00101010,0x04000404
  1416. .long 0x00d1d1d1,0x74007474
  1417. .long 0x00515151,0x54005454
  1418. .long 0x00c0c0c0,0x30003030
  1419. .long 0x00f9f9f9,0x7e007e7e
  1420. .long 0x00d2d2d2,0xb400b4b4
  1421. .long 0x00a0a0a0,0x28002828
  1422. .long 0x00555555,0x55005555
  1423. .long 0x00a1a1a1,0x68006868
  1424. .long 0x00414141,0x50005050
  1425. .long 0x00fafafa,0xbe00bebe
  1426. .long 0x00434343,0xd000d0d0
  1427. .long 0x00131313,0xc400c4c4
  1428. .long 0x00c4c4c4,0x31003131
  1429. .long 0x002f2f2f,0xcb00cbcb
  1430. .long 0x00a8a8a8,0x2a002a2a
  1431. .long 0x00b6b6b6,0xad00adad
  1432. .long 0x003c3c3c,0x0f000f0f
  1433. .long 0x002b2b2b,0xca00caca
  1434. .long 0x00c1c1c1,0x70007070
  1435. .long 0x00ffffff,0xff00ffff
  1436. .long 0x00c8c8c8,0x32003232
  1437. .long 0x00a5a5a5,0x69006969
  1438. .long 0x00202020,0x08000808
  1439. .long 0x00898989,0x62006262
  1440. .long 0x00000000,0x00000000
  1441. .long 0x00909090,0x24002424
  1442. .long 0x00474747,0xd100d1d1
  1443. .long 0x00efefef,0xfb00fbfb
  1444. .long 0x00eaeaea,0xba00baba
  1445. .long 0x00b7b7b7,0xed00eded
  1446. .long 0x00151515,0x45004545
  1447. .long 0x00060606,0x81008181
  1448. .long 0x00cdcdcd,0x73007373
  1449. .long 0x00b5b5b5,0x6d006d6d
  1450. .long 0x00121212,0x84008484
  1451. .long 0x007e7e7e,0x9f009f9f
  1452. .long 0x00bbbbbb,0xee00eeee
  1453. .long 0x00292929,0x4a004a4a
  1454. .long 0x000f0f0f,0xc300c3c3
  1455. .long 0x00b8b8b8,0x2e002e2e
  1456. .long 0x00070707,0xc100c1c1
  1457. .long 0x00040404,0x01000101
  1458. .long 0x009b9b9b,0xe600e6e6
  1459. .long 0x00949494,0x25002525
  1460. .long 0x00212121,0x48004848
  1461. .long 0x00666666,0x99009999
  1462. .long 0x00e6e6e6,0xb900b9b9
  1463. .long 0x00cecece,0xb300b3b3
  1464. .long 0x00ededed,0x7b007b7b
  1465. .long 0x00e7e7e7,0xf900f9f9
  1466. .long 0x003b3b3b,0xce00cece
  1467. .long 0x00fefefe,0xbf00bfbf
  1468. .long 0x007f7f7f,0xdf00dfdf
  1469. .long 0x00c5c5c5,0x71007171
  1470. .long 0x00a4a4a4,0x29002929
  1471. .long 0x00373737,0xcd00cdcd
  1472. .long 0x00b1b1b1,0x6c006c6c
  1473. .long 0x004c4c4c,0x13001313
  1474. .long 0x00919191,0x64006464
  1475. .long 0x006e6e6e,0x9b009b9b
  1476. .long 0x008d8d8d,0x63006363
  1477. .long 0x00767676,0x9d009d9d
  1478. .long 0x00030303,0xc000c0c0
  1479. .long 0x002d2d2d,0x4b004b4b
  1480. .long 0x00dedede,0xb700b7b7
  1481. .long 0x00969696,0xa500a5a5
  1482. .long 0x00262626,0x89008989
  1483. .long 0x007d7d7d,0x5f005f5f
  1484. .long 0x00c6c6c6,0xb100b1b1
  1485. .long 0x005c5c5c,0x17001717
  1486. .long 0x00d3d3d3,0xf400f4f4
  1487. .long 0x00f2f2f2,0xbc00bcbc
  1488. .long 0x004f4f4f,0xd300d3d3
  1489. .long 0x00191919,0x46004646
  1490. .long 0x003f3f3f,0xcf00cfcf
  1491. .long 0x00dcdcdc,0x37003737
  1492. .long 0x00797979,0x5e005e5e
  1493. .long 0x001d1d1d,0x47004747
  1494. .long 0x00525252,0x94009494
  1495. .long 0x00ebebeb,0xfa00fafa
  1496. .long 0x00f3f3f3,0xfc00fcfc
  1497. .long 0x006d6d6d,0x5b005b5b
  1498. .long 0x005e5e5e,0x97009797
  1499. .long 0x00fbfbfb,0xfe00fefe
  1500. .long 0x00696969,0x5a005a5a
  1501. .long 0x00b2b2b2,0xac00acac
  1502. .long 0x00f0f0f0,0x3c003c3c
  1503. .long 0x00313131,0x4c004c4c
  1504. .long 0x000c0c0c,0x03000303
  1505. .long 0x00d4d4d4,0x35003535
  1506. .long 0x00cfcfcf,0xf300f3f3
  1507. .long 0x008c8c8c,0x23002323
  1508. .long 0x00e2e2e2,0xb800b8b8
  1509. .long 0x00757575,0x5d005d5d
  1510. .long 0x00a9a9a9,0x6a006a6a
  1511. .long 0x004a4a4a,0x92009292
  1512. .long 0x00575757,0xd500d5d5
  1513. .long 0x00848484,0x21002121
  1514. .long 0x00111111,0x44004444
  1515. .long 0x00454545,0x51005151
  1516. .long 0x001b1b1b,0xc600c6c6
  1517. .long 0x00f5f5f5,0x7d007d7d
  1518. .long 0x00e4e4e4,0x39003939
  1519. .long 0x000e0e0e,0x83008383
  1520. .long 0x00737373,0xdc00dcdc
  1521. .long 0x00aaaaaa,0xaa00aaaa
  1522. .long 0x00f1f1f1,0x7c007c7c
  1523. .long 0x00dddddd,0x77007777
  1524. .long 0x00595959,0x56005656
  1525. .long 0x00141414,0x05000505
  1526. .long 0x006c6c6c,0x1b001b1b
  1527. .long 0x00929292,0xa400a4a4
  1528. .long 0x00545454,0x15001515
  1529. .long 0x00d0d0d0,0x34003434
  1530. .long 0x00787878,0x1e001e1e
  1531. .long 0x00707070,0x1c001c1c
  1532. .long 0x00e3e3e3,0xf800f8f8
  1533. .long 0x00494949,0x52005252
  1534. .long 0x00808080,0x20002020
  1535. .long 0x00505050,0x14001414
  1536. .long 0x00a7a7a7,0xe900e9e9
  1537. .long 0x00f6f6f6,0xbd00bdbd
  1538. .long 0x00777777,0xdd00dddd
  1539. .long 0x00939393,0xe400e4e4
  1540. .long 0x00868686,0xa100a1a1
  1541. .long 0x00838383,0xe000e0e0
  1542. .long 0x002a2a2a,0x8a008a8a
  1543. .long 0x00c7c7c7,0xf100f1f1
  1544. .long 0x005b5b5b,0xd600d6d6
  1545. .long 0x00e9e9e9,0x7a007a7a
  1546. .long 0x00eeeeee,0xbb00bbbb
  1547. .long 0x008f8f8f,0xe300e3e3
  1548. .long 0x00010101,0x40004040
  1549. .long 0x003d3d3d,0x4f004f4f
  1550. .globl _Camellia_cbc_encrypt
  1551. .p2align 4
  1552. _Camellia_cbc_encrypt:
  1553. cmpq $0,%rdx
  1554. je L$cbc_abort
  1555. pushq %rbx
  1556. pushq %rbp
  1557. pushq %r12
  1558. pushq %r13
  1559. pushq %r14
  1560. pushq %r15
  1561. L$cbc_prologue:
  1562. movq %rsp,%rbp
  1563. subq $64,%rsp
  1564. andq $-64,%rsp
  1565. leaq -64-63(%rcx),%r10
  1566. subq %rsp,%r10
  1567. negq %r10
  1568. andq $0x3C0,%r10
  1569. subq %r10,%rsp
  1570. movq %rdi,%r12
  1571. movq %rsi,%r13
  1572. movq %r8,%rbx
  1573. movq %rcx,%r14
  1574. movl 272(%rcx),%r15d
  1575. movq %r8,40(%rsp)
  1576. movq %rbp,48(%rsp)
  1577. L$cbc_body:
  1578. leaq L$Camellia_SBOX(%rip),%rbp
  1579. movl $32,%ecx
  1580. .p2align 2
  1581. L$cbc_prefetch_sbox:
  1582. movq 0(%rbp),%rax
  1583. movq 32(%rbp),%rsi
  1584. movq 64(%rbp),%rdi
  1585. movq 96(%rbp),%r11
  1586. leaq 128(%rbp),%rbp
  1587. loop L$cbc_prefetch_sbox
  1588. subq $4096,%rbp
  1589. shlq $6,%r15
  1590. movq %rdx,%rcx
  1591. leaq (%r14,%r15,1),%r15
  1592. cmpl $0,%r9d
  1593. je L$CBC_DECRYPT
  1594. andq $-16,%rdx
  1595. andq $15,%rcx
  1596. leaq (%r12,%rdx,1),%rdx
  1597. movq %r14,0(%rsp)
  1598. movq %rdx,8(%rsp)
  1599. movq %rcx,16(%rsp)
  1600. cmpq %r12,%rdx
  1601. movl 0(%rbx),%r8d
  1602. movl 4(%rbx),%r9d
  1603. movl 8(%rbx),%r10d
  1604. movl 12(%rbx),%r11d
  1605. je L$cbc_enc_tail
  1606. jmp L$cbc_eloop
  1607. .p2align 4
  1608. L$cbc_eloop:
  1609. xorl 0(%r12),%r8d
  1610. xorl 4(%r12),%r9d
  1611. xorl 8(%r12),%r10d
  1612. bswapl %r8d
  1613. xorl 12(%r12),%r11d
  1614. bswapl %r9d
  1615. bswapl %r10d
  1616. bswapl %r11d
  1617. call _x86_64_Camellia_encrypt
  1618. movq 0(%rsp),%r14
  1619. bswapl %r8d
  1620. movq 8(%rsp),%rdx
  1621. bswapl %r9d
  1622. movq 16(%rsp),%rcx
  1623. bswapl %r10d
  1624. movl %r8d,0(%r13)
  1625. bswapl %r11d
  1626. movl %r9d,4(%r13)
  1627. movl %r10d,8(%r13)
  1628. leaq 16(%r12),%r12
  1629. movl %r11d,12(%r13)
  1630. cmpq %rdx,%r12
  1631. leaq 16(%r13),%r13
  1632. jne L$cbc_eloop
  1633. cmpq $0,%rcx
  1634. jne L$cbc_enc_tail
  1635. movq 40(%rsp),%r13
  1636. movl %r8d,0(%r13)
  1637. movl %r9d,4(%r13)
  1638. movl %r10d,8(%r13)
  1639. movl %r11d,12(%r13)
  1640. jmp L$cbc_done
  1641. .p2align 4
  1642. L$cbc_enc_tail:
  1643. xorq %rax,%rax
  1644. movq %rax,0+24(%rsp)
  1645. movq %rax,8+24(%rsp)
  1646. movq %rax,16(%rsp)
  1647. L$cbc_enc_pushf:
  1648. pushfq
  1649. cld
  1650. movq %r12,%rsi
  1651. leaq 8+24(%rsp),%rdi
  1652. .long 0x9066A4F3
  1653. popfq
  1654. L$cbc_enc_popf:
  1655. leaq 24(%rsp),%r12
  1656. leaq 16+24(%rsp),%rax
  1657. movq %rax,8(%rsp)
  1658. jmp L$cbc_eloop
  1659. .p2align 4
  1660. L$CBC_DECRYPT:
  1661. xchgq %r14,%r15
  1662. addq $15,%rdx
  1663. andq $15,%rcx
  1664. andq $-16,%rdx
  1665. movq %r14,0(%rsp)
  1666. leaq (%r12,%rdx,1),%rdx
  1667. movq %rdx,8(%rsp)
  1668. movq %rcx,16(%rsp)
  1669. movq (%rbx),%rax
  1670. movq 8(%rbx),%rbx
  1671. jmp L$cbc_dloop
  1672. .p2align 4
  1673. L$cbc_dloop:
  1674. movl 0(%r12),%r8d
  1675. movl 4(%r12),%r9d
  1676. movl 8(%r12),%r10d
  1677. bswapl %r8d
  1678. movl 12(%r12),%r11d
  1679. bswapl %r9d
  1680. movq %rax,0+24(%rsp)
  1681. bswapl %r10d
  1682. movq %rbx,8+24(%rsp)
  1683. bswapl %r11d
  1684. call _x86_64_Camellia_decrypt
  1685. movq 0(%rsp),%r14
  1686. movq 8(%rsp),%rdx
  1687. movq 16(%rsp),%rcx
  1688. bswapl %r8d
  1689. movq (%r12),%rax
  1690. bswapl %r9d
  1691. movq 8(%r12),%rbx
  1692. bswapl %r10d
  1693. xorl 0+24(%rsp),%r8d
  1694. bswapl %r11d
  1695. xorl 4+24(%rsp),%r9d
  1696. xorl 8+24(%rsp),%r10d
  1697. leaq 16(%r12),%r12
  1698. xorl 12+24(%rsp),%r11d
  1699. cmpq %rdx,%r12
  1700. je L$cbc_ddone
  1701. movl %r8d,0(%r13)
  1702. movl %r9d,4(%r13)
  1703. movl %r10d,8(%r13)
  1704. movl %r11d,12(%r13)
  1705. leaq 16(%r13),%r13
  1706. jmp L$cbc_dloop
  1707. .p2align 4
  1708. L$cbc_ddone:
  1709. movq 40(%rsp),%rdx
  1710. cmpq $0,%rcx
  1711. jne L$cbc_dec_tail
  1712. movl %r8d,0(%r13)
  1713. movl %r9d,4(%r13)
  1714. movl %r10d,8(%r13)
  1715. movl %r11d,12(%r13)
  1716. movq %rax,(%rdx)
  1717. movq %rbx,8(%rdx)
  1718. jmp L$cbc_done
  1719. .p2align 4
  1720. L$cbc_dec_tail:
  1721. movl %r8d,0+24(%rsp)
  1722. movl %r9d,4+24(%rsp)
  1723. movl %r10d,8+24(%rsp)
  1724. movl %r11d,12+24(%rsp)
  1725. L$cbc_dec_pushf:
  1726. pushfq
  1727. cld
  1728. leaq 8+24(%rsp),%rsi
  1729. leaq (%r13),%rdi
  1730. .long 0x9066A4F3
  1731. popfq
  1732. L$cbc_dec_popf:
  1733. movq %rax,(%rdx)
  1734. movq %rbx,8(%rdx)
  1735. jmp L$cbc_done
  1736. .p2align 4
  1737. L$cbc_done:
  1738. movq 48(%rsp),%rcx
  1739. movq 0(%rcx),%r15
  1740. movq 8(%rcx),%r14
  1741. movq 16(%rcx),%r13
  1742. movq 24(%rcx),%r12
  1743. movq 32(%rcx),%rbp
  1744. movq 40(%rcx),%rbx
  1745. leaq 48(%rcx),%rsp
  1746. L$cbc_abort:
  1747. .byte 0xf3,0xc3
  1748. .byte 67,97,109,101,108,108,105,97,32,102,111,114,32,120,56,54,95,54,52,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0