rc5.evm 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155
  1. .code:
  2. PUSH1 0xE0 uint32[4] memory key
  3. PUSH1 0x40 contract rc5 {...
  4. MSTORE uint32[4] memory key
  5. PUSH1 0x60 contract rc5 {...
  6. PUSH1 0x4 uint32[4] memory key
  7. DUP2 contract rc5 {...
  8. tag2:
  9. JUMPDEST uint32[4] memory key
  10. PUSH1 0x0 uint32[4] memory key
  11. DUP2 uint32[4] memory key
  12. MSTORE uint32[4] memory key
  13. PUSH1 0x20 uint32[4] memory key
  14. ADD uint32[4] memory key
  15. SWAP1 uint32[4] memory key
  16. PUSH1 0x1 uint32[4] memory key
  17. SWAP1 uint32[4] memory key
  18. SUB uint32[4] memory key
  19. SWAP1 uint32[4] memory key
  20. DUP2 uint32[4] memory key
  21. PUSH [tag2] uint32[4] memory key
  22. JUMPI uint32[4] memory key
  23. POP
  24. POP
  25. PUSH1 0x40 contract rc5 {...
  26. DUP1 uint32[26] memory box
  27. MLOAD uint32[26] memory box
  28. PUSH2 0x340 uint32[26] memory box
  29. DUP2 uint32[26] memory box
  30. ADD uint32[26] memory box
  31. SWAP1 uint32[26] memory box
  32. SWAP2 uint32[26] memory box
  33. MSTORE uint32[26] memory box
  34. PUSH1 0x1A uint32[26] memory box
  35. DUP2 uint32[26] memory box
  36. tag3:
  37. JUMPDEST uint32[26] memory box
  38. PUSH1 0x0 uint32[26] memory box
  39. DUP2 uint32[26] memory box
  40. MSTORE uint32[26] memory box
  41. PUSH1 0x20 uint32[26] memory box
  42. ADD uint32[26] memory box
  43. SWAP1 uint32[26] memory box
  44. PUSH1 0x1 uint32[26] memory box
  45. SWAP1 uint32[26] memory box
  46. SUB uint32[26] memory box
  47. SWAP1 uint32[26] memory box
  48. DUP2 uint32[26] memory box
  49. PUSH [tag3] uint32[26] memory box
  50. JUMPI uint32[26] memory box
  51. POP
  52. POP
  53. PUSH1 0x40 contract rc5 {...
  54. DUP1 uint32[4] memory msg
  55. MLOAD uint32[4] memory msg
  56. PUSH1 0x80 uint32[4] memory key
  57. DUP2 uint32[4] memory msg
  58. ADD uint32[4] memory msg
  59. SWAP1 uint32[4] memory msg
  60. SWAP2 uint32[4] memory msg
  61. MSTORE uint32[4] memory msg
  62. PUSH1 0x4 uint32[4] memory key
  63. DUP2 uint32[4] memory msg
  64. tag4:
  65. JUMPDEST uint32[4] memory msg
  66. PUSH1 0x0 uint32[4] memory msg
  67. DUP2 uint32[4] memory msg
  68. MSTORE uint32[4] memory msg
  69. PUSH1 0x20 uint32[4] memory msg
  70. ADD uint32[4] memory msg
  71. SWAP1 uint32[4] memory msg
  72. PUSH1 0x1 uint32[4] memory msg
  73. SWAP1 uint32[4] memory msg
  74. SUB uint32[4] memory msg
  75. SWAP1 uint32[4] memory msg
  76. DUP2 uint32[4] memory msg
  77. PUSH [tag4] uint32[4] memory msg
  78. JUMPI uint32[4] memory msg
  79. POP
  80. POP
  81. PUSH1 0x40 contract rc5 {...
  82. DUP1 uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  83. MLOAD uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  84. PUSH1 0x80 uint32[4] memory key
  85. DUP2 uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  86. ADD uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  87. DUP3 uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  88. MSTORE uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  89. PUSH4 0x243F6A88 0x243F6A88
  90. DUP2 uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  91. MSTORE uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  92. PUSH4 0x85A308D3 0x85A308D3
  93. PUSH1 0x20 uint32[4] memory key
  94. DUP3 uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  95. ADD uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  96. MSTORE uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  97. PUSH4 0x452821E6 0x452821E6
  98. SWAP2 uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  99. DUP2 uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  100. ADD uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  101. SWAP2 uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  102. SWAP1 uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  103. SWAP2 uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  104. MSTORE uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  105. PUSH4 0x38D01377 0x38D01377
  106. PUSH1 0x60 contract rc5 {...
  107. DUP3 uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  108. ADD uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  109. MSTORE uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  110. PUSH4 0xB7E15163 0xb7e15163
  111. DUP4 S[0] = 0xb7e15163
  112. MSTORE S[0] = 0xb7e15163
  113. SWAP3 uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  114. POP
  115. PUSH1 0x0
  116. PUSH [tag6] expand(key, box)
  117. DUP5 uint32[4] memory key = [0x243F6A88, 0x85A308D3, 0x452821E6, 0x38D01377]
  118. DUP5 ++i
  119. DUP4
  120. DUP1
  121. PUSH1 0x1 uint32[4] memory key
  122. DUP2
  123. DUP1
  124. tag14:
  125. JUMPDEST for (i = 1; i < 26; ++i)...
  126. PUSH1 0x1A 26
  127. DUP4 i
  128. PUSH4 0xFFFFFFFF i < 26
  129. AND i < 26
  130. LT i < 26
  131. ISZERO for (i = 1; i < 26; ++i)...
  132. PUSH [tag15] for (i = 1; i < 26; ++i)...
  133. JUMPI for (i = 1; i < 26; ++i)...
  134. DUP6 S
  135. PUSH1 0x1 1
  136. DUP5 i
  137. SUB i - 1
  138. PUSH4 0xFFFFFFFF S[i - 1]
  139. AND S[i - 1]
  140. PUSH1 0x1A S[i - 1]
  141. DUP2 S[i - 1]
  142. LT S[i - 1]
  143. ISZERO S[i - 1]
  144. PUSH [ErrorTag] S[i - 1]
  145. JUMPI S[i - 1]
  146. PUSH1 0x20 uint32[4] memory key
  147. MUL S[i - 1]
  148. ADD S[i - 1]
  149. MLOAD S[i - 1]
  150. PUSH4 0x9E3779B9 0x9e3779b9
  151. ADD S[i - 1] + 0x9e3779b9
  152. DUP7 S
  153. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  154. DUP6 S[i]
  155. AND S[i]
  156. PUSH1 0x1A uint32[26] memory box
  157. DUP2 S[i]
  158. LT S[i]
  159. ISZERO S[i]
  160. PUSH [ErrorTag] S[0]
  161. JUMPI S[i]
  162. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  163. SWAP3 i < 26
  164. SWAP1 i < 26
  165. SWAP3 i < 26
  166. AND i < 26
  167. PUSH1 0x20 uint32[4] memory key
  168. SWAP3 S[i - 1]
  169. SWAP1 S[i - 1]
  170. SWAP3 S[i - 1]
  171. MUL S[i - 1]
  172. ADD S[i - 1]
  173. MSTORE S[i] = S[i - 1] + 0x9e3779b9
  174. PUSH1 0x1 uint32[4] memory key
  175. SWAP3 ++i
  176. SWAP1 ++i
  177. SWAP3 ++i
  178. ADD ++i
  179. SWAP2 ++i
  180. PUSH [tag14] for (i = 1; i < 26; ++i)...
  181. JUMP for (i = 1; i < 26; ++i)...
  182. tag6:
  183. JUMPDEST expand(key, box)
  184. POP
  185. POP
  186. PUSH1 0x40 contract rc5 {...
  187. DUP1 uint32[4] memory tmp
  188. MLOAD uint32[4] memory tmp
  189. PUSH1 0x80 uint32[4] memory key
  190. DUP2 uint32[4] memory tmp
  191. ADD uint32[4] memory tmp
  192. DUP3 uint32[4] memory tmp
  193. MSTORE uint32[4] memory tmp
  194. PUSH4 0xDEADBEEF 0xdeadbeef
  195. DUP1 uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  196. DUP3 uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  197. MSTORE uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  198. PUSH1 0x20 uint32[4] memory key
  199. DUP3 uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  200. ADD uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  201. DUP2 uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  202. SWAP1 uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  203. MSTORE uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  204. SWAP2 uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  205. DUP2 uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  206. ADD uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  207. DUP3 uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  208. SWAP1 uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  209. MSTORE uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  210. PUSH1 0x60 contract rc5 {...
  211. DUP2 uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  212. ADD uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  213. SWAP2 uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  214. SWAP1 uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  215. SWAP2 uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  216. MSTORE uint32[4] memory msg = [0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef]
  217. PUSH1 0x0
  218. tag8:
  219. JUMPDEST for (int i = 0; i < 10000; ++i)...
  220. PUSH2 0x2710 10000
  221. DUP2 i
  222. SLT i < 10000
  223. ISZERO for (int i = 0; i < 10000; ++i)...
  224. PUSH [tag9] for (int i = 0; i < 10000; ++i)...
  225. JUMPI for (int i = 0; i < 10000; ++i)...
  226. PUSH [tag11] test(box, msg)
  227. DUP4 box
  228. DUP4 msg
  229. PUSH1 0x80 uint32[4] memory tmp
  230. PUSH1 0x40 uint32[4] memory tmp
  231. MLOAD uint32[4] memory tmp
  232. SWAP1 uint32[4] memory tmp
  233. DUP2 uint32[4] memory tmp
  234. ADD uint32[4] memory tmp
  235. PUSH1 0x40 uint32[4] memory tmp
  236. MSTORE uint32[4] memory tmp
  237. DUP1 uint32[4] memory tmp
  238. PUSH1 0x4 uint32[4] memory tmp
  239. SWAP1 uint32[4] memory tmp
  240. tag22:
  241. JUMPDEST uint32[4] memory tmp
  242. PUSH1 0x0 uint32[4] memory tmp
  243. DUP2 uint32[4] memory tmp
  244. MSTORE uint32[4] memory tmp
  245. PUSH1 0x20 uint32[4] memory tmp
  246. ADD uint32[4] memory tmp
  247. SWAP1 uint32[4] memory tmp
  248. PUSH1 0x1 uint32[4] memory tmp
  249. SWAP1 uint32[4] memory tmp
  250. SUB uint32[4] memory tmp
  251. SWAP1 uint32[4] memory tmp
  252. DUP2 uint32[4] memory tmp
  253. PUSH [tag22] uint32[4] memory tmp
  254. JUMPI uint32[4] memory tmp
  255. SWAP1 uint32[4] memory tmp
  256. POP uint32[4] memory tmp
  257. POP uint32[4] memory tmp
  258. PUSH1 0x0 uint i
  259. DUP3 msg
  260. SWAP2 uint32[4] memory tmp = msg
  261. POP uint32[4] memory tmp = msg
  262. PUSH [tag24] encrypt(S, tmp)
  263. DUP5 S
  264. DUP4 tmp
  265. PUSH1 0x0
  266. DUP1
  267. DUP1
  268. DUP1
  269. tag38:
  270. JUMPDEST for (uint32 i = 0; i < 4; i += 2) {...
  271. PUSH1 0x4 4
  272. DUP5 i
  273. PUSH4 0xFFFFFFFF i < 4
  274. AND i < 4
  275. LT i < 4
  276. ISZERO for (uint32 i = 0; i < 4; i += 2) {...
  277. PUSH [tag39] for (uint32 i = 0; i < 4; i += 2) {...
  278. JUMPI for (uint32 i = 0; i < 4; i += 2) {...
  279. DUP5 inout
  280. DUP5 i
  281. PUSH4 0xFFFFFFFF inout[i]
  282. AND inout[i]
  283. PUSH1 0x4 inout[i]
  284. DUP2 inout[i]
  285. LT inout[i]
  286. ISZERO inout[i]
  287. PUSH [ErrorTag] inout[i]
  288. JUMPI inout[i]
  289. PUSH1 0x20 uint32[4] memory key
  290. MUL S[i - 1]
  291. ADD S[i - 1]
  292. MLOAD inout[i]
  293. SWAP3 inout[i]
  294. POP
  295. DUP5 inout
  296. PUSH1 0x1 uint32[4] memory key
  297. DUP6 i+1
  298. ADD i+1
  299. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  300. AND inout[i+1]
  301. PUSH1 0x4 uint32[4] memory key
  302. DUP2 inout[i+1]
  303. LT inout[i+1]
  304. ISZERO inout[i+1]
  305. PUSH [ErrorTag] S[0]
  306. JUMPI inout[i+1]
  307. PUSH1 0x20 uint32[4] memory key
  308. SWAP1 S[i - 1]
  309. DUP2 S[i - 1]
  310. MUL S[i - 1]
  311. SWAP2 S[i - 1]
  312. SWAP1 S[i - 1]
  313. SWAP2 S[i - 1]
  314. ADD S[i - 1]
  315. MLOAD inout[i]
  316. DUP8 inout[i]
  317. MLOAD inout[i]
  318. SWAP2 S[i - 1]
  319. DUP9 S[i - 1]
  320. ADD S[i - 1]
  321. MLOAD inout[i]
  322. SWAP2 A += S[0]
  323. SWAP1 A += S[0]
  324. SWAP5 A += S[0]
  325. ADD A += S[0]
  326. SWAP4 A += S[0]
  327. ADD B += S[1]
  328. SWAP2 B += S[1]
  329. POP
  330. PUSH1 0xC 12
  331. SWAP1 12
  332. POP
  333. tag41:
  334. JUMPDEST for (int j = 12; j <= 4; ++j) {...
  335. PUSH1 0x4 uint32[4] memory key
  336. DUP2 j <= 4
  337. SGT j <= 4
  338. PUSH [tag42] for (int j = 12; j <= 4; ++j) {...
  339. JUMPI for (int j = 12; j <= 4; ++j) {...
  340. DUP6 S
  341. DUP5 i
  342. PUSH1 0x2 2
  343. MUL 2 * i
  344. PUSH4 0xFFFFFFFF S[2 * i]
  345. AND S[2 * i]
  346. PUSH1 0x1A S[2 * i]
  347. DUP2 S[2 * i]
  348. LT S[2 * i]
  349. ISZERO S[2 * i]
  350. PUSH [ErrorTag] S[2 * i]
  351. JUMPI S[2 * i]
  352. PUSH1 0x20 uint32[4] memory key
  353. MUL S[i - 1]
  354. ADD S[i - 1]
  355. MLOAD S[2 * i + 1]
  356. PUSH [tag44] rotate_left((A ^ B), B)
  357. DUP4 A ^ B
  358. DUP6 A ^ B
  359. XOR A ^ B
  360. DUP5 B
  361. PUSH [tag20] rotate_right
  362. JUMP [in] rotate_left((A ^ B), B)
  363. tag9:
  364. JUMPDEST for (int i = 0; i < 10000; ++i)...
  365. POP function rc5() {...
  366. POP function rc5() {...
  367. POP function rc5() {...
  368. POP function rc5() {...
  369. PUSH #[$00000000…00000000] contract rc5 {...
  370. DUP1 contract rc5 {...
  371. PUSH [$00000000…00000000] contract rc5 {...
  372. PUSH1 0x0 contract rc5 {...
  373. CODECOPY contract rc5 {...
  374. PUSH1 0x0 contract rc5 {...
  375. RETURN contract rc5 {...
  376. tag11:
  377. JUMPDEST test(box, msg)
  378. PUSH1 0x1 uint32[4] memory key
  379. ADD ++i
  380. PUSH [tag8] for (int i = 0; i < 10000; ++i)...
  381. JUMP for (int i = 0; i < 10000; ++i)...
  382. tag15:
  383. JUMPDEST for (i = 1; i < 26; ++i)...
  384. POP
  385. PUSH1 0x0
  386. SWAP2
  387. POP
  388. DUP2
  389. SWAP1
  390. POP
  391. PUSH1 0x4E 3*26
  392. tag17:
  393. JUMPDEST while (n-- > 0) {...
  394. PUSH1 0x0
  395. NOT
  396. DUP2 n--
  397. ADD n--
  398. SWAP1 n--
  399. PUSH1 0x0
  400. SWAP1 n-- > 0
  401. SGT n-- > 0
  402. ISZERO while (n-- > 0) {...
  403. PUSH [tag18] while (n-- > 0) {...
  404. JUMPI while (n-- > 0) {...
  405. PUSH [tag19] rotate_left((S[i] + A + B), 3)
  406. DUP5 B
  407. DUP7 A
  408. DUP9 S
  409. DUP7 i
  410. PUSH4 0xFFFFFFFF S[i]
  411. AND S[i]
  412. PUSH1 0x1A S[i]
  413. DUP2 S[i]
  414. LT S[i]
  415. ISZERO S[i]
  416. PUSH [ErrorTag] S[i]
  417. JUMPI S[i]
  418. PUSH1 0x20 uint32[4] memory key
  419. MUL S[i - 1]
  420. ADD S[i - 1]
  421. MLOAD S[i - 1]
  422. ADD S[i] + A
  423. ADD S[i] + A + B
  424. PUSH1 0x3 uint32[4] memory key
  425. tag20:
  426. JUMPDEST function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  427. PUSH1 0x1F 0x1f
  428. AND n &= 0x1f
  429. PUSH1 0x0
  430. PUSH [tag33] shift_right(v, 32 - n)
  431. DUP4 S[i - 1]
  432. PUSH1 0x20 uint32[4] memory key
  433. DUP5 32 - n
  434. SWAP1 32 - n
  435. SUB 32 - n
  436. tag34:
  437. JUMPDEST function shift_right(uint32 v, uint32 n) returns (uint32) {...
  438. PUSH1 0x2 ++i
  439. DUP2 2**n
  440. SWAP1 2**n
  441. EXP 2**n
  442. SWAP1 v *= 2**n
  443. SWAP2 v *= 2**n
  444. MUL v *= 2**n
  445. SWAP1 v *= 2**n
  446. DUP2 v *= 2**n
  447. tag32:
  448. JUMPDEST function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  449. SWAP3 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  450. SWAP2 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  451. POP function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  452. POP function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  453. JUMP [out] function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  454. tag18:
  455. JUMPDEST while (n-- > 0) {...
  456. POP function expand(uint32[4] L, uint32[26] S) {...
  457. POP function expand(uint32[4] L, uint32[26] S) {...
  458. POP function expand(uint32[4] L, uint32[26] S) {...
  459. POP function expand(uint32[4] L, uint32[26] S) {...
  460. POP function expand(uint32[4] L, uint32[26] S) {...
  461. POP function expand(uint32[4] L, uint32[26] S) {...
  462. POP function expand(uint32[4] L, uint32[26] S) {...
  463. JUMP [out] function expand(uint32[4] L, uint32[26] S) {...
  464. tag19:
  465. JUMPDEST rotate_left((S[i] + A + B), 3)
  466. DUP7 S
  467. DUP5 i
  468. PUSH4 0xFFFFFFFF S[i]
  469. AND S[i]
  470. PUSH1 0x1A S[i]
  471. DUP2 S[i]
  472. LT S[i]
  473. ISZERO S[i]
  474. PUSH [ErrorTag] S[i]
  475. JUMPI S[i]
  476. SWAP1 S[i]
  477. SWAP1 S[i]
  478. PUSH1 0x20 S[i]
  479. MUL S[i]
  480. ADD S[i]
  481. SWAP1 S[i] = rotate_left((S[i] + A + B), 3)
  482. PUSH4 0xFFFFFFFF S[i] = rotate_left((S[i] + A + B), 3)
  483. AND S[i] = rotate_left((S[i] + A + B), 3)
  484. SWAP1 S[i] = rotate_left((S[i] + A + B), 3)
  485. DUP2 S[i] = rotate_left((S[i] + A + B), 3)
  486. DUP2 S[i] = rotate_left((S[i] + A + B), 3)
  487. MSTORE S[i] = rotate_left((S[i] + A + B), 3)
  488. PUSH1 0x20 S[i] = rotate_left((S[i] + A + B), 3)
  489. ADD S[i] = rotate_left((S[i] + A + B), 3)
  490. POP S[i] = rotate_left((S[i] + A + B), 3)
  491. SWAP5 A = S[i] = rotate_left((S[i] + A + B), 3)
  492. POP A = S[i] = rotate_left((S[i] + A + B), 3)
  493. DUP5 A = S[i] = rotate_left((S[i] + A + B), 3)
  494. POP A = S[i] = rotate_left((S[i] + A + B), 3)
  495. PUSH [tag21] rotate_left((L[j] + A + B), A + B)
  496. DUP5 B
  497. DUP7 A
  498. DUP10 L
  499. DUP6 j
  500. PUSH4 0xFFFFFFFF L[j]
  501. AND L[j]
  502. PUSH1 0x4 L[j]
  503. DUP2 L[j]
  504. LT L[j]
  505. ISZERO L[j]
  506. PUSH [ErrorTag] L[j]
  507. JUMPI L[j]
  508. PUSH1 0x20 uint32[4] memory key
  509. MUL L[j]
  510. ADD L[j]
  511. MLOAD L[j]
  512. ADD L[j] + A
  513. ADD L[j] + A + B
  514. DUP7 A + B
  515. DUP7 A + B
  516. ADD A + B
  517. PUSH [tag20] rotate_right
  518. JUMP [in] rotate_left((L[j] + A + B), A + B)
  519. tag21:
  520. JUMPDEST rotate_left((L[j] + A + B), A + B)
  521. DUP8 L
  522. DUP4 j
  523. PUSH4 0xFFFFFFFF L[j]
  524. AND L[j]
  525. PUSH1 0x4 L[j]
  526. DUP2 L[j]
  527. LT L[j]
  528. ISZERO L[j]
  529. PUSH [ErrorTag] L[j]
  530. JUMPI L[j]
  531. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  532. SWAP3 L[j] = rotate_left((L[j] + A + B), A + B)
  533. DUP4 L[j] = rotate_left((L[j] + A + B), A + B)
  534. AND L[j] = rotate_left((L[j] + A + B), A + B)
  535. PUSH1 0x20 uint32[4] memory key
  536. SWAP2 L[j]
  537. SWAP1 L[j]
  538. SWAP2 L[j]
  539. MUL L[j]
  540. SWAP1 L[j]
  541. SWAP2 L[j]
  542. ADD L[j]
  543. DUP2 L[j] = rotate_left((L[j] + A + B), A + B)
  544. SWAP1 L[j] = rotate_left((L[j] + A + B), A + B)
  545. MSTORE L[j] = rotate_left((L[j] + A + B), A + B)
  546. SWAP5 L[j] = rotate_left((L[j] + A + B), A + B)
  547. POP
  548. PUSH1 0x1A uint32[26] memory box
  549. PUSH1 0x1 uint32[4] memory key
  550. SWAP5 ++i
  551. DUP6 ++i
  552. ADD ++i
  553. DUP3 ++i % 26
  554. AND ++i % 26
  555. MOD ++i % 26
  556. SWAP4 ++i % 26
  557. PUSH1 0x4 uint32[4] memory key
  558. SWAP4 ++i
  559. ADD ++i
  560. AND ++j % 4
  561. SWAP2 ++j % 4
  562. SWAP1 ++j % 4
  563. SWAP2 ++j % 4
  564. MOD ++j % 4
  565. SWAP1 ++j % 4
  566. PUSH [tag17] while (n-- > 0) {...
  567. JUMP while (n-- > 0) {...
  568. tag24:
  569. JUMPDEST encrypt(S, tmp)
  570. PUSH [tag26] decrypt(S, tmp)
  571. DUP5 S
  572. DUP4 tmp
  573. PUSH1 0x0
  574. DUP1
  575. DUP1
  576. DUP1
  577. tag47:
  578. JUMPDEST for (uint32 i = 0; i < 4; i += 2) {...
  579. PUSH1 0x4 4
  580. DUP5 i
  581. PUSH4 0xFFFFFFFF i < 4
  582. AND i < 4
  583. LT i < 4
  584. ISZERO for (uint32 i = 0; i < 4; i += 2) {...
  585. PUSH [tag39] for (uint32 i = 0; i < 4; i += 2) {...
  586. JUMPI for (uint32 i = 0; i < 4; i += 2) {...
  587. DUP5 inout
  588. DUP5 i
  589. PUSH4 0xFFFFFFFF inout[i]
  590. AND inout[i]
  591. PUSH1 0x4 inout[i]
  592. DUP2 inout[i]
  593. LT inout[i]
  594. ISZERO inout[i]
  595. PUSH [ErrorTag] inout[i]
  596. JUMPI inout[i]
  597. PUSH1 0x20 uint32[4] memory key
  598. MUL S[i - 1]
  599. ADD S[i - 1]
  600. MLOAD inout[i]
  601. SWAP3 inout[i]
  602. POP
  603. DUP5 inout
  604. PUSH1 0x1 uint32[4] memory key
  605. DUP6 i+1
  606. ADD i+1
  607. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  608. AND inout[i+1]
  609. PUSH1 0x4 uint32[4] memory key
  610. DUP2 inout[i+1]
  611. LT inout[i+1]
  612. ISZERO inout[i+1]
  613. PUSH [ErrorTag] S[0]
  614. JUMPI inout[i+1]
  615. PUSH1 0x20 uint32[4] memory key
  616. MUL S[i - 1]
  617. ADD S[i - 1]
  618. MLOAD inout[i]
  619. SWAP2 inout[i]
  620. POP
  621. PUSH1 0xC 12
  622. SWAP1 12
  623. POP
  624. tag50:
  625. JUMPDEST for (int j = 12; j > 0; --j) {...
  626. PUSH1 0x0 0
  627. DUP2 j
  628. SGT j > 0
  629. ISZERO for (int j = 12; j > 0; --j) {...
  630. PUSH [tag51] for (int j = 12; j > 0; --j) {...
  631. JUMPI for (int j = 12; j > 0; --j) {...
  632. DUP3 A
  633. PUSH [tag53] rotate_right(B - S[2 * i + 1], A)
  634. DUP8 S
  635. DUP7 i
  636. PUSH1 0x2 2
  637. MUL 2 * i
  638. PUSH1 0x1 1
  639. ADD 2 * i + 1
  640. PUSH4 0xFFFFFFFF S[2 * i + 1]
  641. AND S[2 * i + 1]
  642. PUSH1 0x1A S[2 * i + 1]
  643. DUP2 S[2 * i + 1]
  644. LT S[2 * i + 1]
  645. ISZERO S[2 * i + 1]
  646. PUSH [ErrorTag] S[2 * i + 1]
  647. JUMPI S[2 * i + 1]
  648. PUSH1 0x20 uint32[4] memory key
  649. MUL S[i - 1]
  650. ADD S[i - 1]
  651. MLOAD S[2 * i + 1]
  652. DUP5 B - S[2 * i + 1]
  653. SUB B - S[2 * i + 1]
  654. DUP6 inout
  655. PUSH [tag20] rotate_right
  656. JUMP [in] rotate_right(B - S[2 * i + 1], A)
  657. tag26:
  658. JUMPDEST decrypt(S, tmp)
  659. POP
  660. PUSH1 0x0
  661. tag28:
  662. JUMPDEST for (uint i = 0; i < 4; ++i) {...
  663. PUSH1 0x4 4
  664. DUP2 i
  665. LT i < 4
  666. ISZERO for (uint i = 0; i < 4; ++i) {...
  667. PUSH [tag29] for (uint i = 0; i < 4; ++i) {...
  668. JUMPI for (uint i = 0; i < 4; ++i) {...
  669. DUP2 tmp
  670. DUP2 i
  671. PUSH1 0x4 tmp[i]
  672. DUP2 tmp[i]
  673. LT tmp[i]
  674. ISZERO tmp[i]
  675. PUSH [ErrorTag] tmp[i]
  676. JUMPI tmp[i]
  677. PUSH1 0x20 uint32[4] memory key
  678. MUL S[i - 1]
  679. ADD S[i - 1]
  680. MLOAD tmp[i]
  681. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  682. AND msg[i] != tmp[i]
  683. DUP4 i
  684. DUP3 i
  685. PUSH1 0x4 uint32[4] memory key
  686. DUP2 msg[i]
  687. LT msg[i]
  688. ISZERO msg[i]
  689. PUSH [ErrorTag] S[0]
  690. JUMPI msg[i]
  691. PUSH1 0x20 uint32[4] memory key
  692. MUL S[i - 1]
  693. ADD S[i - 1]
  694. MLOAD tmp[i]
  695. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  696. AND msg[i] != tmp[i]
  697. EQ msg[i] != tmp[i]
  698. PUSH [tag31] if (msg[i] != tmp[i])...
  699. JUMPI if (msg[i] != tmp[i])...
  700. PUSH [ErrorTag] throw
  701. JUMP throw
  702. tag29:
  703. JUMPDEST for (uint i = 0; i < 4; ++i) {...
  704. POP function test(uint32[26] S, uint32[4] msg) {...
  705. POP function test(uint32[26] S, uint32[4] msg) {...
  706. POP function test(uint32[26] S, uint32[4] msg) {...
  707. POP function test(uint32[26] S, uint32[4] msg) {...
  708. JUMP [out] function test(uint32[26] S, uint32[4] msg) {...
  709. tag31:
  710. JUMPDEST if (msg[i] != tmp[i])...
  711. PUSH1 0x1 uint32[4] memory key
  712. ADD ++i
  713. PUSH [tag28] for (uint i = 0; i < 4; ++i) {...
  714. JUMP for (uint i = 0; i < 4; ++i) {...
  715. tag33:
  716. JUMPDEST shift_right(v, 32 - n)
  717. PUSH [tag35] shift_left(v, n)
  718. DUP5 v
  719. DUP5 n
  720. PUSH [tag34] shift_left
  721. JUMP [in] shift_left(v, n)
  722. tag35:
  723. JUMPDEST shift_left(v, n)
  724. OR shift_left(v, n) | shift_right(v, 32 - n)
  725. SWAP1 return shift_left(v, n) | shift_right(v, 32 - n)
  726. POP return shift_left(v, n) | shift_right(v, 32 - n)
  727. PUSH [tag32] return shift_left(v, n) | shift_right(v, 32 - n)
  728. JUMP return shift_left(v, n) | shift_right(v, 32 - n)
  729. tag39:
  730. JUMPDEST for (uint32 i = 0; i < 4; i += 2) {...
  731. POP function encrypt(uint32[26] S, uint32[4] inout) {...
  732. POP function encrypt(uint32[26] S, uint32[4] inout) {...
  733. POP function encrypt(uint32[26] S, uint32[4] inout) {...
  734. POP function encrypt(uint32[26] S, uint32[4] inout) {...
  735. POP function encrypt(uint32[26] S, uint32[4] inout) {...
  736. POP function encrypt(uint32[26] S, uint32[4] inout) {...
  737. JUMP [out] function encrypt(uint32[26] S, uint32[4] inout) {...
  738. tag42:
  739. JUMPDEST for (int j = 12; j <= 4; ++j) {...
  740. DUP3 A
  741. DUP6 inout
  742. DUP6 i
  743. PUSH4 0xFFFFFFFF inout[i]
  744. AND inout[i]
  745. PUSH1 0x4 inout[i]
  746. DUP2 inout[i]
  747. LT inout[i]
  748. ISZERO inout[i]
  749. PUSH [ErrorTag] inout[i]
  750. JUMPI inout[i]
  751. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  752. SWAP3 i < 26
  753. DUP4 i < 26
  754. AND i < 26
  755. PUSH1 0x20 uint32[4] memory key
  756. SWAP2 S[i - 1]
  757. SWAP1 S[i - 1]
  758. SWAP2 S[i - 1]
  759. MUL S[i - 1]
  760. SWAP1 S[i - 1]
  761. SWAP2 S[i - 1]
  762. ADD S[i - 1]
  763. MSTORE inout[i] = A
  764. DUP3 i
  765. SWAP1 i
  766. DUP7 S
  767. SWAP1 S
  768. PUSH1 0x1 uint32[4] memory key
  769. DUP8 i+1
  770. ADD i+1
  771. AND inout[i+1]
  772. PUSH1 0x4 uint32[4] memory key
  773. DUP2 inout[i+1]
  774. LT inout[i+1]
  775. ISZERO inout[i+1]
  776. PUSH [ErrorTag] S[0]
  777. JUMPI inout[i+1]
  778. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  779. SWAP3 i < 26
  780. SWAP1 i < 26
  781. SWAP3 i < 26
  782. AND i < 26
  783. PUSH1 0x20 uint32[4] memory key
  784. SWAP3 S[i - 1]
  785. SWAP1 S[i - 1]
  786. SWAP3 S[i - 1]
  787. MUL S[i - 1]
  788. ADD S[i - 1]
  789. MSTORE inout[i+1] = B
  790. PUSH1 0x2 ++i
  791. SWAP4 i += 2
  792. SWAP1 i += 2
  793. SWAP4 i += 2
  794. ADD i += 2
  795. SWAP3 i += 2
  796. PUSH [tag38] for (uint32 i = 0; i < 4; i += 2) {...
  797. JUMP for (uint32 i = 0; i < 4; i += 2) {...
  798. tag44:
  799. JUMPDEST rotate_left((A ^ B), B)
  800. ADD rotate_left((B ^ A), A) + S[2 * i + 1]
  801. SWAP3 rotate_left((B ^ A), A) + S[2 * i + 1]
  802. POP
  803. DUP6 S
  804. PUSH1 0x2 ++i
  805. DUP6 2 * i
  806. MUL 2 * i
  807. PUSH1 0x1 uint32[4] memory key
  808. ADD 2 * i + 1
  809. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  810. AND S[2 * i + 1]
  811. PUSH1 0x1A uint32[26] memory box
  812. DUP2 S[2 * i + 1]
  813. LT S[2 * i + 1]
  814. ISZERO S[2 * i + 1]
  815. PUSH [ErrorTag] S[0]
  816. JUMPI S[2 * i + 1]
  817. PUSH1 0x20 uint32[4] memory key
  818. MUL S[2 * i + 1]
  819. ADD S[2 * i + 1]
  820. MLOAD S[2 * i + 1]
  821. PUSH [tag45] rotate_left((B ^ A), A)
  822. DUP5 B ^ A
  823. DUP5 B ^ A
  824. XOR B ^ A
  825. DUP6 rotate_left((B ^ A), A) + S[2 * i + 1]
  826. PUSH [tag20] rotate_right
  827. JUMP [in] rotate_left((B ^ A), A)
  828. tag45:
  829. JUMPDEST rotate_left((B ^ A), A)
  830. ADD rotate_left((B ^ A), A) + S[2 * i + 1]
  831. SWAP2 rotate_left((B ^ A), A) + S[2 * i + 1]
  832. POP
  833. PUSH1 0x1 uint32[4] memory key
  834. ADD ++i
  835. PUSH [tag41] for (int j = 12; j <= 4; ++j) {...
  836. JUMP for (int j = 12; j <= 4; ++j) {...
  837. tag51:
  838. JUMPDEST for (int j = 12; j > 0; --j) {...
  839. PUSH1 0x20 uint32[4] memory key
  840. DUP7 S[i - 1]
  841. ADD S[i - 1]
  842. MLOAD S[2 * i + 1]
  843. DUP7 S[2 * i + 1]
  844. MLOAD S[2 * i + 1]
  845. SWAP1 A -= S[0]
  846. SWAP4 A -= S[0]
  847. SUB A -= S[0]
  848. SWAP3 A -= S[0]
  849. SWAP1 B -= S[1]
  850. SWAP2 B -= S[1]
  851. SUB B -= S[1]
  852. SWAP1 B -= S[1]
  853. DUP3 A -= S[0]
  854. DUP6 inout
  855. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  856. DUP7 inout[i]
  857. AND inout[i]
  858. PUSH1 0x4 uint32[4] memory key
  859. DUP2 inout[i]
  860. LT inout[i]
  861. ISZERO inout[i]
  862. PUSH [ErrorTag] S[i - 1]
  863. JUMPI inout[i]
  864. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  865. SWAP3 i < 26
  866. DUP4 i < 26
  867. AND i < 26
  868. PUSH1 0x20 uint32[4] memory key
  869. SWAP2 S[i - 1]
  870. SWAP1 S[i - 1]
  871. SWAP2 S[i - 1]
  872. MUL S[i - 1]
  873. SWAP1 S[i - 1]
  874. SWAP2 S[i - 1]
  875. ADD S[i - 1]
  876. MSTORE inout[i] = A
  877. DUP3 i
  878. SWAP1 i
  879. DUP7 S
  880. SWAP1 S
  881. PUSH1 0x1 uint32[4] memory key
  882. DUP8 i+1
  883. ADD i+1
  884. AND inout[i+1]
  885. PUSH1 0x4 uint32[4] memory key
  886. DUP2 inout[i+1]
  887. LT inout[i+1]
  888. ISZERO inout[i+1]
  889. PUSH [ErrorTag] S[0]
  890. JUMPI inout[i+1]
  891. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  892. SWAP3 i < 26
  893. SWAP1 i < 26
  894. SWAP3 i < 26
  895. AND i < 26
  896. PUSH1 0x20 uint32[4] memory key
  897. SWAP3 S[i - 1]
  898. SWAP1 S[i - 1]
  899. SWAP3 S[i - 1]
  900. MUL S[i - 1]
  901. ADD S[i - 1]
  902. MSTORE inout[i+1] = B
  903. PUSH1 0x2 ++i
  904. SWAP4 i += 2
  905. SWAP1 i += 2
  906. SWAP4 i += 2
  907. ADD i += 2
  908. SWAP3 i += 2
  909. PUSH [tag47] for (uint32 i = 0; i < 4; i += 2) {...
  910. JUMP for (uint32 i = 0; i < 4; i += 2) {...
  911. tag53:
  912. JUMPDEST rotate_right(B - S[2 * i + 1], A)
  913. XOR rotate_right(A - S[2 * i], B) ^ B
  914. SWAP2 rotate_right(A - S[2 * i], B) ^ B
  915. POP
  916. DUP2 rotate_right(A - S[2 * i], B) ^ B
  917. PUSH [tag55] rotate_right(A - S[2 * i], B)
  918. DUP8 S
  919. PUSH1 0x2 ++i
  920. DUP8 2 * i
  921. MUL 2 * i
  922. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  923. AND S[2 * i]
  924. PUSH1 0x1A uint32[26] memory box
  925. DUP2 S[2 * i]
  926. LT S[2 * i]
  927. ISZERO S[2 * i]
  928. PUSH [ErrorTag] S[0]
  929. JUMPI S[2 * i]
  930. PUSH1 0x20 uint32[4] memory key
  931. MUL S[2 * i]
  932. ADD S[2 * i]
  933. MLOAD S[2 * i]
  934. DUP6 A - S[2 * i]
  935. SUB A - S[2 * i]
  936. DUP3 rotate_right(A - S[2 * i], B) ^ B
  937. PUSH [tag20] rotate_right
  938. JUMP [in] rotate_right(A - S[2 * i], B)
  939. tag55:
  940. JUMPDEST rotate_right(A - S[2 * i], B)
  941. XOR rotate_right(A - S[2 * i], B) ^ B
  942. SWAP3 rotate_right(A - S[2 * i], B) ^ B
  943. POP
  944. PUSH1 0x0
  945. NOT
  946. ADD i - 1
  947. PUSH [tag50] for (int j = 12; j > 0; --j) {...
  948. JUMP for (int j = 12; j > 0; --j) {...
  949. .data:
  950. 0:
  951. .code:
  952. PUSH1 0x60 contract rc5 {...
  953. PUSH1 0x40 contract rc5 {...
  954. MSTORE contract rc5 {...
  955. CALLDATASIZE contract rc5 {...
  956. ISZERO contract rc5 {...
  957. PUSH [tag1] contract rc5 {...
  958. JUMPI contract rc5 {...
  959. PUSH1 0xE0
  960. PUSH1 0x2
  961. EXP
  962. PUSH1 0x0 contract rc5 {...
  963. CALLDATALOAD contract rc5 {...
  964. DIV contract rc5 {...
  965. PUSH4 0x434D16F5 contract rc5 {...
  966. DUP2 contract rc5 {...
  967. EQ contract rc5 {...
  968. PUSH [tag2] contract rc5 {...
  969. JUMPI contract rc5 {...
  970. DUP1 contract rc5 {...
  971. PUSH4 0x4B8E38DB contract rc5 {...
  972. EQ contract rc5 {...
  973. PUSH [tag3] contract rc5 {...
  974. JUMPI contract rc5 {...
  975. DUP1 contract rc5 {...
  976. PUSH4 0x53127B88 contract rc5 {...
  977. EQ contract rc5 {...
  978. PUSH [tag4] contract rc5 {...
  979. JUMPI contract rc5 {...
  980. DUP1 contract rc5 {...
  981. PUSH4 0x625126ED contract rc5 {...
  982. EQ contract rc5 {...
  983. PUSH [tag5] contract rc5 {...
  984. JUMPI contract rc5 {...
  985. DUP1 contract rc5 {...
  986. PUSH4 0x66AC777E contract rc5 {...
  987. EQ contract rc5 {...
  988. PUSH [tag2] contract rc5 {...
  989. JUMPI contract rc5 {...
  990. DUP1 contract rc5 {...
  991. PUSH4 0xA8E553F5 contract rc5 {...
  992. EQ contract rc5 {...
  993. PUSH [tag7] contract rc5 {...
  994. JUMPI contract rc5 {...
  995. DUP1 contract rc5 {...
  996. PUSH4 0xD924C660 contract rc5 {...
  997. EQ contract rc5 {...
  998. PUSH [tag5] contract rc5 {...
  999. JUMPI contract rc5 {...
  1000. DUP1 contract rc5 {...
  1001. PUSH4 0xED25E6C2 contract rc5 {...
  1002. EQ contract rc5 {...
  1003. PUSH [tag9] contract rc5 {...
  1004. JUMPI contract rc5 {...
  1005. tag1:
  1006. JUMPDEST contract rc5 {...
  1007. PUSH [ErrorTag] contract rc5 {...
  1008. JUMP contract rc5 {...
  1009. tag2:
  1010. JUMPDEST function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1011. CALLVALUE function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1012. PUSH [ErrorTag] function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1013. JUMPI function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1014. PUSH [tag10] function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1015. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  1016. CALLDATALOAD function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1017. PUSH1 0x24 function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1018. CALLDATALOAD function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1019. tag11:
  1020. JUMPDEST function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1021. PUSH1 0x1F 0x1f
  1022. AND n &= 0x1f
  1023. PUSH1 0x0 contract rc5 {...
  1024. PUSH [tag27] shift_right(v, 32 - n)
  1025. DUP4 S[i - 1]
  1026. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1027. DUP5 32 - n
  1028. SWAP1 32 - n
  1029. SUB 32 - n
  1030. tag17:
  1031. JUMPDEST function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1032. PUSH1 0x2 ++i
  1033. DUP2 2**n
  1034. SWAP1 2**n
  1035. EXP 2**n
  1036. SWAP1 v *= 2**n
  1037. SWAP2 v *= 2**n
  1038. MUL v *= 2**n
  1039. SWAP1 v *= 2**n
  1040. DUP2 v *= 2**n
  1041. tag26:
  1042. JUMPDEST function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1043. SWAP3 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1044. SWAP2 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1045. POP function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1046. POP function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1047. JUMP [out] function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1048. tag3:
  1049. JUMPDEST function test(uint32[26] S, uint32[4] msg) {...
  1050. CALLVALUE function test(uint32[26] S, uint32[4] msg) {...
  1051. PUSH [ErrorTag] function test(uint32[26] S, uint32[4] msg) {...
  1052. JUMPI function test(uint32[26] S, uint32[4] msg) {...
  1053. PUSH1 0x40 contract rc5 {...
  1054. DUP1 uint32[4] memory tmp
  1055. MLOAD uint32[4] memory tmp
  1056. PUSH2 0x340 function expand(uint32[4] L, uint32[26] S) {...
  1057. DUP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1058. DUP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1059. ADD function decrypt(uint32[26] S, uint32[4] inout) {...
  1060. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1061. SWAP3 function decrypt(uint32[26] S, uint32[4] inout) {...
  1062. MSTORE function decrypt(uint32[26] S, uint32[4] inout) {...
  1063. PUSH [tag12] function expand(uint32[4] L, uint32[26] S) {...
  1064. SWAP2 function expand(uint32[4] L, uint32[26] S) {...
  1065. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  1066. SWAP2 function expand(uint32[4] L, uint32[26] S) {...
  1067. PUSH2 0x344 function decrypt(uint32[26] S, uint32[4] inout) {...
  1068. SWAP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1069. DUP4 function expand(uint32[4] L, uint32[26] S) {...
  1070. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1071. PUSH1 0x1A function expand(uint32[4] L, uint32[26] S) {...
  1072. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1073. DUP4 uint32[4] memory tmp
  1074. SWAP1 uint32[4] memory tmp
  1075. DUP4 function expand(uint32[4] L, uint32[26] S) {...
  1076. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1077. DUP1 function expand(uint32[4] L, uint32[26] S) {...
  1078. DUP3 function expand(uint32[4] L, uint32[26] S) {...
  1079. DUP5 uint32[4] memory tmp
  1080. CALLDATACOPY function test(uint32[26] S, uint32[4] msg) {...
  1081. POP
  1082. POP
  1083. PUSH1 0x40 contract rc5 {...
  1084. DUP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1085. MLOAD function decrypt(uint32[26] S, uint32[4] inout) {...
  1086. PUSH1 0x80 function expand(uint32[4] L, uint32[26] S) {...
  1087. DUP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1088. DUP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1089. ADD function decrypt(uint32[26] S, uint32[4] inout) {...
  1090. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1091. SWAP3 function decrypt(uint32[26] S, uint32[4] inout) {...
  1092. MSTORE function decrypt(uint32[26] S, uint32[4] inout) {...
  1093. SWAP2 uint32[4] memory tmp
  1094. SWAP7 uint32[4] memory tmp
  1095. POP
  1096. SWAP3 function expand(uint32[4] L, uint32[26] S) {...
  1097. SWAP5 function expand(uint32[4] L, uint32[26] S) {...
  1098. PUSH2 0x3C4 function expand(uint32[4] L, uint32[26] S) {...
  1099. SWAP5 function expand(uint32[4] L, uint32[26] S) {...
  1100. POP
  1101. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1102. SWAP3 function decrypt(uint32[26] S, uint32[4] inout) {...
  1103. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1104. SWAP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1105. POP
  1106. DUP5 function expand(uint32[4] L, uint32[26] S) {...
  1107. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1108. DUP4 function decrypt(uint32[26] S, uint32[4] inout) {...
  1109. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1110. DUP4 function decrypt(uint32[26] S, uint32[4] inout) {...
  1111. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1112. DUP1 function expand(uint32[4] L, uint32[26] S) {...
  1113. DUP3 function decrypt(uint32[26] S, uint32[4] inout) {...
  1114. DUP5 function decrypt(uint32[26] S, uint32[4] inout) {...
  1115. CALLDATACOPY function test(uint32[26] S, uint32[4] msg) {...
  1116. POP
  1117. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1118. SWAP6 function decrypt(uint32[26] S, uint32[4] inout) {...
  1119. POP
  1120. POP
  1121. POP
  1122. POP
  1123. POP
  1124. POP
  1125. PUSH1 0x80 uint32[4] memory tmp
  1126. PUSH1 0x40 uint32[4] memory tmp
  1127. MLOAD uint32[4] memory tmp
  1128. SWAP1 uint32[4] memory tmp
  1129. DUP2 uint32[4] memory tmp
  1130. ADD uint32[4] memory tmp
  1131. PUSH1 0x40 uint32[4] memory tmp
  1132. MSTORE uint32[4] memory tmp
  1133. DUP1 uint32[4] memory tmp
  1134. PUSH1 0x4 uint32[4] memory tmp
  1135. SWAP1 uint32[4] memory tmp
  1136. tag29:
  1137. JUMPDEST uint32[4] memory tmp
  1138. PUSH1 0x0 uint32[4] memory tmp
  1139. DUP2 uint32[4] memory tmp
  1140. MSTORE uint32[4] memory tmp
  1141. PUSH1 0x20 uint32[4] memory tmp
  1142. ADD uint32[4] memory tmp
  1143. SWAP1 uint32[4] memory tmp
  1144. PUSH1 0x1 uint32[4] memory tmp
  1145. SWAP1 uint32[4] memory tmp
  1146. SUB uint32[4] memory tmp
  1147. SWAP1 uint32[4] memory tmp
  1148. DUP2 uint32[4] memory tmp
  1149. PUSH [tag29] uint32[4] memory tmp
  1150. JUMPI uint32[4] memory tmp
  1151. SWAP1 uint32[4] memory tmp
  1152. POP uint32[4] memory tmp
  1153. POP uint32[4] memory tmp
  1154. PUSH1 0x0 uint i
  1155. DUP3 msg
  1156. SWAP2 uint32[4] memory tmp = msg
  1157. POP uint32[4] memory tmp = msg
  1158. PUSH [tag31] encrypt(S, tmp)
  1159. DUP5 S
  1160. DUP4 tmp
  1161. PUSH [tag15] encrypt
  1162. JUMP [in] encrypt(S, tmp)
  1163. tag4:
  1164. JUMPDEST function encrypt(uint32[26] S, uint32[4] inout) {...
  1165. CALLVALUE function encrypt(uint32[26] S, uint32[4] inout) {...
  1166. PUSH [ErrorTag] function encrypt(uint32[26] S, uint32[4] inout) {...
  1167. JUMPI function encrypt(uint32[26] S, uint32[4] inout) {...
  1168. PUSH1 0x40 contract rc5 {...
  1169. DUP1 uint32[4] memory tmp
  1170. MLOAD uint32[4] memory tmp
  1171. PUSH2 0x340 function expand(uint32[4] L, uint32[26] S) {...
  1172. DUP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1173. DUP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1174. ADD function decrypt(uint32[26] S, uint32[4] inout) {...
  1175. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1176. SWAP3 function decrypt(uint32[26] S, uint32[4] inout) {...
  1177. MSTORE function decrypt(uint32[26] S, uint32[4] inout) {...
  1178. PUSH [tag12] function expand(uint32[4] L, uint32[26] S) {...
  1179. SWAP2 function expand(uint32[4] L, uint32[26] S) {...
  1180. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  1181. SWAP2 function expand(uint32[4] L, uint32[26] S) {...
  1182. PUSH2 0x344 function decrypt(uint32[26] S, uint32[4] inout) {...
  1183. SWAP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1184. DUP4 function expand(uint32[4] L, uint32[26] S) {...
  1185. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1186. PUSH1 0x1A function expand(uint32[4] L, uint32[26] S) {...
  1187. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1188. DUP4 uint32[4] memory tmp
  1189. SWAP1 uint32[4] memory tmp
  1190. DUP4 function expand(uint32[4] L, uint32[26] S) {...
  1191. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1192. DUP1 function expand(uint32[4] L, uint32[26] S) {...
  1193. DUP3 function expand(uint32[4] L, uint32[26] S) {...
  1194. DUP5 uint32[4] memory tmp
  1195. CALLDATACOPY function encrypt(uint32[26] S, uint32[4] inout) {...
  1196. POP
  1197. POP
  1198. PUSH1 0x40 contract rc5 {...
  1199. DUP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1200. MLOAD function decrypt(uint32[26] S, uint32[4] inout) {...
  1201. PUSH1 0x80 function expand(uint32[4] L, uint32[26] S) {...
  1202. DUP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1203. DUP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1204. ADD function decrypt(uint32[26] S, uint32[4] inout) {...
  1205. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1206. SWAP3 function decrypt(uint32[26] S, uint32[4] inout) {...
  1207. MSTORE function decrypt(uint32[26] S, uint32[4] inout) {...
  1208. SWAP2 uint32[4] memory tmp
  1209. SWAP7 uint32[4] memory tmp
  1210. POP
  1211. SWAP3 function expand(uint32[4] L, uint32[26] S) {...
  1212. SWAP5 function expand(uint32[4] L, uint32[26] S) {...
  1213. PUSH2 0x3C4 function expand(uint32[4] L, uint32[26] S) {...
  1214. SWAP5 function expand(uint32[4] L, uint32[26] S) {...
  1215. POP
  1216. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1217. SWAP3 function decrypt(uint32[26] S, uint32[4] inout) {...
  1218. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1219. SWAP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1220. POP
  1221. DUP5 function expand(uint32[4] L, uint32[26] S) {...
  1222. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1223. DUP4 function decrypt(uint32[26] S, uint32[4] inout) {...
  1224. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1225. DUP4 function decrypt(uint32[26] S, uint32[4] inout) {...
  1226. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1227. DUP1 function expand(uint32[4] L, uint32[26] S) {...
  1228. DUP3 function decrypt(uint32[26] S, uint32[4] inout) {...
  1229. DUP5 function decrypt(uint32[26] S, uint32[4] inout) {...
  1230. CALLDATACOPY function encrypt(uint32[26] S, uint32[4] inout) {...
  1231. POP
  1232. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1233. SWAP6 function decrypt(uint32[26] S, uint32[4] inout) {...
  1234. POP
  1235. POP
  1236. POP
  1237. POP
  1238. POP
  1239. POP
  1240. tag15:
  1241. JUMPDEST function encrypt(uint32[26] S, uint32[4] inout) {...
  1242. PUSH1 0x0 contract rc5 {...
  1243. DUP1 contract rc5 {...
  1244. DUP1 contract rc5 {...
  1245. DUP1 contract rc5 {...
  1246. tag38:
  1247. JUMPDEST for (uint32 i = 0; i < 4; i += 2) {...
  1248. PUSH1 0x4 4
  1249. DUP5 i
  1250. PUSH4 0xFFFFFFFF i < 4
  1251. AND i < 4
  1252. LT i < 4
  1253. ISZERO for (uint32 i = 0; i < 4; i += 2) {...
  1254. PUSH [tag39] for (uint32 i = 0; i < 4; i += 2) {...
  1255. JUMPI for (uint32 i = 0; i < 4; i += 2) {...
  1256. DUP5 inout
  1257. DUP5 i
  1258. PUSH4 0xFFFFFFFF inout[i]
  1259. AND inout[i]
  1260. PUSH1 0x4 inout[i]
  1261. DUP2 inout[i]
  1262. LT inout[i]
  1263. ISZERO inout[i]
  1264. PUSH [ErrorTag] inout[i]
  1265. JUMPI inout[i]
  1266. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1267. MUL S[i - 1]
  1268. ADD S[i - 1]
  1269. MLOAD inout[i]
  1270. SWAP3 inout[i]
  1271. POP
  1272. DUP5 S
  1273. PUSH1 0x1 S[0]
  1274. DUP6 i+1
  1275. ADD i+1
  1276. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1277. AND inout[i+1]
  1278. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  1279. DUP2 inout[i+1]
  1280. LT inout[i+1]
  1281. ISZERO inout[i+1]
  1282. PUSH [ErrorTag] contract rc5 {...
  1283. JUMPI inout[i+1]
  1284. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1285. SWAP1 S[i - 1]
  1286. DUP2 S[i - 1]
  1287. MUL S[i - 1]
  1288. SWAP2 S[i - 1]
  1289. SWAP1 S[i - 1]
  1290. SWAP2 S[i - 1]
  1291. ADD S[i - 1]
  1292. MLOAD inout[i]
  1293. DUP8 inout[i]
  1294. MLOAD inout[i]
  1295. SWAP2 S[i - 1]
  1296. DUP9 S[i - 1]
  1297. ADD S[i - 1]
  1298. MLOAD inout[i]
  1299. SWAP2 A += S[0]
  1300. SWAP1 A += S[0]
  1301. SWAP5 A += S[0]
  1302. ADD A += S[0]
  1303. SWAP4 A += S[0]
  1304. ADD B += S[1]
  1305. SWAP2 B += S[1]
  1306. POP
  1307. PUSH1 0xC 12
  1308. SWAP1 12
  1309. POP
  1310. tag41:
  1311. JUMPDEST for (int j = 12; j <= 4; ++j) {...
  1312. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  1313. DUP2 j <= 4
  1314. SGT j <= 4
  1315. PUSH [tag42] for (int j = 12; j <= 4; ++j) {...
  1316. JUMPI for (int j = 12; j <= 4; ++j) {...
  1317. DUP6 S
  1318. DUP5 i
  1319. PUSH1 0x2 2
  1320. MUL 2 * i
  1321. PUSH4 0xFFFFFFFF S[2 * i]
  1322. AND S[2 * i]
  1323. PUSH1 0x1A S[2 * i]
  1324. DUP2 S[2 * i]
  1325. LT S[2 * i]
  1326. ISZERO S[2 * i]
  1327. PUSH [ErrorTag] S[2 * i]
  1328. JUMPI S[2 * i]
  1329. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1330. MUL S[i - 1]
  1331. ADD S[i - 1]
  1332. MLOAD S[2 * i + 1]
  1333. PUSH [tag44] rotate_left((A ^ B), B)
  1334. DUP4 A ^ B
  1335. DUP6 A ^ B
  1336. XOR A ^ B
  1337. DUP5 B
  1338. PUSH [tag11] rotate_left
  1339. JUMP [in] rotate_left((A ^ B), B)
  1340. tag5:
  1341. JUMPDEST function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1342. CALLVALUE function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1343. PUSH [ErrorTag] function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1344. JUMPI function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1345. PUSH [tag10] function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1346. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  1347. CALLDATALOAD function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1348. PUSH1 0x24 function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1349. CALLDATALOAD function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1350. PUSH [tag17] shift_left
  1351. JUMP function shift_left(uint32 v, uint32 n) returns (uint32) {...
  1352. tag7:
  1353. JUMPDEST function decrypt(uint32[26] S, uint32[4] inout) {...
  1354. CALLVALUE function decrypt(uint32[26] S, uint32[4] inout) {...
  1355. PUSH [ErrorTag] function decrypt(uint32[26] S, uint32[4] inout) {...
  1356. JUMPI function decrypt(uint32[26] S, uint32[4] inout) {...
  1357. PUSH1 0x40 contract rc5 {...
  1358. DUP1 uint32[4] memory tmp
  1359. MLOAD uint32[4] memory tmp
  1360. PUSH2 0x340 function expand(uint32[4] L, uint32[26] S) {...
  1361. DUP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1362. DUP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1363. ADD function decrypt(uint32[26] S, uint32[4] inout) {...
  1364. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1365. SWAP3 function decrypt(uint32[26] S, uint32[4] inout) {...
  1366. MSTORE function decrypt(uint32[26] S, uint32[4] inout) {...
  1367. PUSH [tag12] function expand(uint32[4] L, uint32[26] S) {...
  1368. SWAP2 function expand(uint32[4] L, uint32[26] S) {...
  1369. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  1370. SWAP2 function expand(uint32[4] L, uint32[26] S) {...
  1371. PUSH2 0x344 function decrypt(uint32[26] S, uint32[4] inout) {...
  1372. SWAP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1373. DUP4 function expand(uint32[4] L, uint32[26] S) {...
  1374. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1375. PUSH1 0x1A function expand(uint32[4] L, uint32[26] S) {...
  1376. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1377. DUP4 uint32[4] memory tmp
  1378. SWAP1 uint32[4] memory tmp
  1379. DUP4 function expand(uint32[4] L, uint32[26] S) {...
  1380. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1381. DUP1 function expand(uint32[4] L, uint32[26] S) {...
  1382. DUP3 function expand(uint32[4] L, uint32[26] S) {...
  1383. DUP5 uint32[4] memory tmp
  1384. CALLDATACOPY function decrypt(uint32[26] S, uint32[4] inout) {...
  1385. POP
  1386. POP
  1387. PUSH1 0x40 contract rc5 {...
  1388. DUP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1389. MLOAD function decrypt(uint32[26] S, uint32[4] inout) {...
  1390. PUSH1 0x80 function expand(uint32[4] L, uint32[26] S) {...
  1391. DUP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1392. DUP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1393. ADD function decrypt(uint32[26] S, uint32[4] inout) {...
  1394. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1395. SWAP3 function decrypt(uint32[26] S, uint32[4] inout) {...
  1396. MSTORE function decrypt(uint32[26] S, uint32[4] inout) {...
  1397. SWAP2 uint32[4] memory tmp
  1398. SWAP7 uint32[4] memory tmp
  1399. POP
  1400. SWAP3 function expand(uint32[4] L, uint32[26] S) {...
  1401. SWAP5 function expand(uint32[4] L, uint32[26] S) {...
  1402. PUSH2 0x3C4 function expand(uint32[4] L, uint32[26] S) {...
  1403. SWAP5 function expand(uint32[4] L, uint32[26] S) {...
  1404. POP
  1405. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1406. SWAP3 function decrypt(uint32[26] S, uint32[4] inout) {...
  1407. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1408. SWAP2 function decrypt(uint32[26] S, uint32[4] inout) {...
  1409. POP
  1410. DUP5 function expand(uint32[4] L, uint32[26] S) {...
  1411. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1412. DUP4 function decrypt(uint32[26] S, uint32[4] inout) {...
  1413. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1414. DUP4 function decrypt(uint32[26] S, uint32[4] inout) {...
  1415. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1416. DUP1 function expand(uint32[4] L, uint32[26] S) {...
  1417. DUP3 function decrypt(uint32[26] S, uint32[4] inout) {...
  1418. DUP5 function decrypt(uint32[26] S, uint32[4] inout) {...
  1419. CALLDATACOPY function decrypt(uint32[26] S, uint32[4] inout) {...
  1420. POP
  1421. SWAP1 function decrypt(uint32[26] S, uint32[4] inout) {...
  1422. SWAP6 function decrypt(uint32[26] S, uint32[4] inout) {...
  1423. POP
  1424. PUSH [tag21] function decrypt(uint32[26] S, uint32[4] inout) {...
  1425. SWAP5 function decrypt(uint32[26] S, uint32[4] inout) {...
  1426. POP
  1427. POP
  1428. POP
  1429. POP
  1430. POP
  1431. JUMP function decrypt(uint32[26] S, uint32[4] inout) {...
  1432. tag9:
  1433. JUMPDEST function expand(uint32[4] L, uint32[26] S) {...
  1434. CALLVALUE function expand(uint32[4] L, uint32[26] S) {...
  1435. PUSH [ErrorTag] function expand(uint32[4] L, uint32[26] S) {...
  1436. JUMPI function expand(uint32[4] L, uint32[26] S) {...
  1437. PUSH1 0x40 contract rc5 {...
  1438. DUP1 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1439. MLOAD function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1440. PUSH1 0x80 function expand(uint32[4] L, uint32[26] S) {...
  1441. DUP2 function expand(uint32[4] L, uint32[26] S) {...
  1442. DUP2 function expand(uint32[4] L, uint32[26] S) {...
  1443. ADD function expand(uint32[4] L, uint32[26] S) {...
  1444. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1445. SWAP3 function expand(uint32[4] L, uint32[26] S) {...
  1446. MSTORE function expand(uint32[4] L, uint32[26] S) {...
  1447. PUSH [tag12] function expand(uint32[4] L, uint32[26] S) {...
  1448. SWAP2 function expand(uint32[4] L, uint32[26] S) {...
  1449. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  1450. SWAP2 function expand(uint32[4] L, uint32[26] S) {...
  1451. PUSH1 0x84 function expand(uint32[4] L, uint32[26] S) {...
  1452. SWAP2 function expand(uint32[4] L, uint32[26] S) {...
  1453. DUP4 function expand(uint32[4] L, uint32[26] S) {...
  1454. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1455. DUP2 function expand(uint32[4] L, uint32[26] S) {...
  1456. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1457. DUP4 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1458. SWAP1 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1459. DUP3 function expand(uint32[4] L, uint32[26] S) {...
  1460. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1461. DUP1 function expand(uint32[4] L, uint32[26] S) {...
  1462. DUP3 function expand(uint32[4] L, uint32[26] S) {...
  1463. DUP5 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1464. CALLDATACOPY function expand(uint32[4] L, uint32[26] S) {...
  1465. POP
  1466. POP
  1467. PUSH1 0x40 contract rc5 {...
  1468. DUP1 function expand(uint32[4] L, uint32[26] S) {...
  1469. MLOAD function expand(uint32[4] L, uint32[26] S) {...
  1470. PUSH2 0x340 function expand(uint32[4] L, uint32[26] S) {...
  1471. DUP2 function expand(uint32[4] L, uint32[26] S) {...
  1472. DUP2 function expand(uint32[4] L, uint32[26] S) {...
  1473. ADD function expand(uint32[4] L, uint32[26] S) {...
  1474. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1475. SWAP3 function expand(uint32[4] L, uint32[26] S) {...
  1476. MSTORE function expand(uint32[4] L, uint32[26] S) {...
  1477. SWAP2 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1478. SWAP7 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1479. POP
  1480. SWAP2 function expand(uint32[4] L, uint32[26] S) {...
  1481. SWAP5 function expand(uint32[4] L, uint32[26] S) {...
  1482. PUSH2 0x3C4 function expand(uint32[4] L, uint32[26] S) {...
  1483. SWAP5 function expand(uint32[4] L, uint32[26] S) {...
  1484. POP
  1485. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1486. SWAP3 function expand(uint32[4] L, uint32[26] S) {...
  1487. POP
  1488. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1489. PUSH1 0x1A function expand(uint32[4] L, uint32[26] S) {...
  1490. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1491. DUP4 function expand(uint32[4] L, uint32[26] S) {...
  1492. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1493. DUP4 function expand(uint32[4] L, uint32[26] S) {...
  1494. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1495. DUP1 function expand(uint32[4] L, uint32[26] S) {...
  1496. DUP3 function expand(uint32[4] L, uint32[26] S) {...
  1497. DUP5 function expand(uint32[4] L, uint32[26] S) {...
  1498. CALLDATACOPY function expand(uint32[4] L, uint32[26] S) {...
  1499. POP
  1500. SWAP1 function expand(uint32[4] L, uint32[26] S) {...
  1501. SWAP6 function expand(uint32[4] L, uint32[26] S) {...
  1502. POP
  1503. POP
  1504. POP
  1505. POP
  1506. POP
  1507. POP
  1508. PUSH1 0x0 contract rc5 {...
  1509. DUP1 contract rc5 {...
  1510. DUP1 contract rc5 {...
  1511. DUP1 contract rc5 {...
  1512. DUP1 contract rc5 {...
  1513. PUSH4 0xB7E15163 0xb7e15163
  1514. DUP7 S[i - 1]
  1515. DUP3 contract rc5 {...
  1516. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1517. SWAP3 i < 26
  1518. SWAP1 i < 26
  1519. SWAP3 i < 26
  1520. AND i < 26
  1521. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1522. SWAP3 S[i - 1]
  1523. SWAP1 S[i - 1]
  1524. SWAP3 S[i - 1]
  1525. MUL S[i - 1]
  1526. ADD S[i - 1]
  1527. MSTORE S[0] = 0xb7e15163
  1528. PUSH1 0x1 S[0]
  1529. SWAP3 S[0]
  1530. POP
  1531. tag61:
  1532. JUMPDEST for (i = 1; i < 26; ++i)...
  1533. PUSH1 0x1A 26
  1534. DUP4 i
  1535. PUSH4 0xFFFFFFFF i < 26
  1536. AND i < 26
  1537. LT i < 26
  1538. ISZERO for (i = 1; i < 26; ++i)...
  1539. PUSH [tag62] for (i = 1; i < 26; ++i)...
  1540. JUMPI for (i = 1; i < 26; ++i)...
  1541. DUP6 S
  1542. PUSH1 0x1 1
  1543. DUP5 i
  1544. SUB i - 1
  1545. PUSH4 0xFFFFFFFF S[i - 1]
  1546. AND S[i - 1]
  1547. PUSH1 0x1A S[i - 1]
  1548. DUP2 S[i - 1]
  1549. LT S[i - 1]
  1550. ISZERO S[i - 1]
  1551. PUSH [ErrorTag] S[i - 1]
  1552. JUMPI S[i - 1]
  1553. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1554. MUL S[i - 1]
  1555. ADD S[i - 1]
  1556. MLOAD S[i - 1]
  1557. PUSH4 0x9E3779B9 0x9e3779b9
  1558. ADD S[i - 1] + 0x9e3779b9
  1559. DUP7 S
  1560. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1561. DUP6 S[i]
  1562. AND S[i]
  1563. PUSH1 0x1A function expand(uint32[4] L, uint32[26] S) {...
  1564. DUP2 S[i]
  1565. LT S[i]
  1566. ISZERO S[i]
  1567. PUSH [ErrorTag] contract rc5 {...
  1568. JUMPI S[i]
  1569. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1570. SWAP3 i < 26
  1571. SWAP1 i < 26
  1572. SWAP3 i < 26
  1573. AND i < 26
  1574. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1575. SWAP3 S[i - 1]
  1576. SWAP1 S[i - 1]
  1577. SWAP3 S[i - 1]
  1578. MUL S[i - 1]
  1579. ADD S[i - 1]
  1580. MSTORE S[i] = S[i - 1] + 0x9e3779b9
  1581. PUSH1 0x1 S[0]
  1582. SWAP3 ++i
  1583. SWAP1 ++i
  1584. SWAP3 ++i
  1585. ADD ++i
  1586. SWAP2 ++i
  1587. PUSH [tag61] for (i = 1; i < 26; ++i)...
  1588. JUMP for (i = 1; i < 26; ++i)...
  1589. tag10:
  1590. JUMPDEST function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1591. PUSH1 0x40 contract rc5 {...
  1592. DUP1 uint32[4] memory tmp
  1593. MLOAD uint32[4] memory tmp
  1594. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1595. SWAP3 L[j] = rotate_left((L[j] + A + B), A + B)
  1596. SWAP1 L[j] = rotate_left((L[j] + A + B), A + B)
  1597. SWAP3 L[j] = rotate_left((L[j] + A + B), A + B)
  1598. AND L[j] = rotate_left((L[j] + A + B), A + B)
  1599. DUP3 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1600. MSTORE function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1601. MLOAD function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1602. SWAP1 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1603. DUP2 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1604. SWAP1 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1605. SUB function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1606. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1607. ADD function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1608. SWAP1 function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1609. RETURN function rotate_left(uint32 v, uint32 n) returns (uint32) {...
  1610. tag12:
  1611. JUMPDEST function test(uint32[26] S, uint32[4] msg) {...
  1612. STOP function test(uint32[26] S, uint32[4] msg) {...
  1613. tag31:
  1614. JUMPDEST encrypt(S, tmp)
  1615. PUSH [tag32] decrypt(S, tmp)
  1616. DUP5 S
  1617. DUP4 tmp
  1618. tag21:
  1619. JUMPDEST function decrypt(uint32[26] S, uint32[4] inout) {...
  1620. PUSH1 0x0 contract rc5 {...
  1621. DUP1 contract rc5 {...
  1622. DUP1 contract rc5 {...
  1623. DUP1 contract rc5 {...
  1624. tag51:
  1625. JUMPDEST for (uint32 i = 0; i < 4; i += 2) {...
  1626. PUSH1 0x4 4
  1627. DUP5 i
  1628. PUSH4 0xFFFFFFFF i < 4
  1629. AND i < 4
  1630. LT i < 4
  1631. ISZERO for (uint32 i = 0; i < 4; i += 2) {...
  1632. PUSH [tag39] for (uint32 i = 0; i < 4; i += 2) {...
  1633. JUMPI for (uint32 i = 0; i < 4; i += 2) {...
  1634. DUP5 inout
  1635. DUP5 i
  1636. PUSH4 0xFFFFFFFF inout[i]
  1637. AND inout[i]
  1638. PUSH1 0x4 inout[i]
  1639. DUP2 inout[i]
  1640. LT inout[i]
  1641. ISZERO inout[i]
  1642. PUSH [ErrorTag] inout[i]
  1643. JUMPI inout[i]
  1644. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1645. MUL S[i - 1]
  1646. ADD S[i - 1]
  1647. MLOAD inout[i]
  1648. SWAP3 inout[i]
  1649. POP
  1650. DUP5 S
  1651. PUSH1 0x1 S[0]
  1652. DUP6 i+1
  1653. ADD i+1
  1654. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1655. AND inout[i+1]
  1656. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  1657. DUP2 inout[i+1]
  1658. LT inout[i+1]
  1659. ISZERO inout[i+1]
  1660. PUSH [ErrorTag] contract rc5 {...
  1661. JUMPI inout[i+1]
  1662. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1663. MUL S[i - 1]
  1664. ADD S[i - 1]
  1665. MLOAD inout[i]
  1666. SWAP2 inout[i]
  1667. POP
  1668. PUSH1 0xC 12
  1669. SWAP1 12
  1670. POP
  1671. tag54:
  1672. JUMPDEST for (int j = 12; j > 0; --j) {...
  1673. PUSH1 0x0 0
  1674. DUP2 j
  1675. SGT j > 0
  1676. ISZERO for (int j = 12; j > 0; --j) {...
  1677. PUSH [tag55] for (int j = 12; j > 0; --j) {...
  1678. JUMPI for (int j = 12; j > 0; --j) {...
  1679. DUP3 A
  1680. PUSH [tag57] rotate_right(B - S[2 * i + 1], A)
  1681. DUP8 S
  1682. DUP7 i
  1683. PUSH1 0x2 2
  1684. MUL 2 * i
  1685. PUSH1 0x1 1
  1686. ADD 2 * i + 1
  1687. PUSH4 0xFFFFFFFF S[2 * i + 1]
  1688. AND S[2 * i + 1]
  1689. PUSH1 0x1A S[2 * i + 1]
  1690. DUP2 S[2 * i + 1]
  1691. LT S[2 * i + 1]
  1692. ISZERO S[2 * i + 1]
  1693. PUSH [ErrorTag] S[2 * i + 1]
  1694. JUMPI S[2 * i + 1]
  1695. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1696. MUL S[i - 1]
  1697. ADD S[i - 1]
  1698. MLOAD S[2 * i + 1]
  1699. DUP5 B - S[2 * i + 1]
  1700. SUB B - S[2 * i + 1]
  1701. DUP6 S
  1702. PUSH [tag11] rotate_left
  1703. JUMP [in] rotate_right(B - S[2 * i + 1], A)
  1704. tag27:
  1705. JUMPDEST shift_right(v, 32 - n)
  1706. PUSH [tag28] shift_left(v, n)
  1707. DUP5 v
  1708. DUP5 n
  1709. PUSH [tag17] shift_left
  1710. JUMP [in] shift_left(v, n)
  1711. tag28:
  1712. JUMPDEST shift_left(v, n)
  1713. OR shift_left(v, n) | shift_right(v, 32 - n)
  1714. SWAP1 return shift_left(v, n) | shift_right(v, 32 - n)
  1715. POP return shift_left(v, n) | shift_right(v, 32 - n)
  1716. PUSH [tag26] return shift_left(v, n) | shift_right(v, 32 - n)
  1717. JUMP return shift_left(v, n) | shift_right(v, 32 - n)
  1718. tag32:
  1719. JUMPDEST decrypt(S, tmp)
  1720. POP
  1721. PUSH1 0x0 contract rc5 {...
  1722. tag33:
  1723. JUMPDEST for (uint i = 0; i < 4; ++i) {...
  1724. PUSH1 0x4 4
  1725. DUP2 i
  1726. LT i < 4
  1727. ISZERO for (uint i = 0; i < 4; ++i) {...
  1728. PUSH [tag34] for (uint i = 0; i < 4; ++i) {...
  1729. JUMPI for (uint i = 0; i < 4; ++i) {...
  1730. DUP2 tmp
  1731. DUP2 i
  1732. PUSH1 0x4 tmp[i]
  1733. DUP2 tmp[i]
  1734. LT tmp[i]
  1735. ISZERO tmp[i]
  1736. PUSH [ErrorTag] tmp[i]
  1737. JUMPI tmp[i]
  1738. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1739. MUL S[i - 1]
  1740. ADD S[i - 1]
  1741. MLOAD tmp[i]
  1742. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1743. AND msg[i] != tmp[i]
  1744. DUP4 i
  1745. DUP3 i
  1746. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  1747. DUP2 msg[i]
  1748. LT msg[i]
  1749. ISZERO msg[i]
  1750. PUSH [ErrorTag] contract rc5 {...
  1751. JUMPI msg[i]
  1752. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1753. MUL S[i - 1]
  1754. ADD S[i - 1]
  1755. MLOAD tmp[i]
  1756. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1757. AND msg[i] != tmp[i]
  1758. EQ msg[i] != tmp[i]
  1759. PUSH [tag36] if (msg[i] != tmp[i])...
  1760. JUMPI if (msg[i] != tmp[i])...
  1761. PUSH [ErrorTag] throw
  1762. JUMP throw
  1763. tag34:
  1764. JUMPDEST for (uint i = 0; i < 4; ++i) {...
  1765. POP function test(uint32[26] S, uint32[4] msg) {...
  1766. POP function test(uint32[26] S, uint32[4] msg) {...
  1767. POP function test(uint32[26] S, uint32[4] msg) {...
  1768. POP function test(uint32[26] S, uint32[4] msg) {...
  1769. JUMP [out] function test(uint32[26] S, uint32[4] msg) {...
  1770. tag36:
  1771. JUMPDEST if (msg[i] != tmp[i])...
  1772. PUSH1 0x1 S[0]
  1773. ADD ++i
  1774. PUSH [tag33] for (uint i = 0; i < 4; ++i) {...
  1775. JUMP for (uint i = 0; i < 4; ++i) {...
  1776. tag39:
  1777. JUMPDEST for (uint32 i = 0; i < 4; i += 2) {...
  1778. POP function encrypt(uint32[26] S, uint32[4] inout) {...
  1779. POP function encrypt(uint32[26] S, uint32[4] inout) {...
  1780. POP function encrypt(uint32[26] S, uint32[4] inout) {...
  1781. POP function encrypt(uint32[26] S, uint32[4] inout) {...
  1782. POP function encrypt(uint32[26] S, uint32[4] inout) {...
  1783. POP function encrypt(uint32[26] S, uint32[4] inout) {...
  1784. JUMP [out] function encrypt(uint32[26] S, uint32[4] inout) {...
  1785. tag42:
  1786. JUMPDEST for (int j = 12; j <= 4; ++j) {...
  1787. DUP3 A
  1788. DUP6 inout
  1789. DUP6 i
  1790. PUSH4 0xFFFFFFFF inout[i]
  1791. AND inout[i]
  1792. PUSH1 0x4 inout[i]
  1793. DUP2 inout[i]
  1794. LT inout[i]
  1795. ISZERO inout[i]
  1796. PUSH [ErrorTag] inout[i]
  1797. JUMPI inout[i]
  1798. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1799. SWAP3 i < 26
  1800. DUP4 i < 26
  1801. AND i < 26
  1802. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1803. SWAP2 S[i - 1]
  1804. SWAP1 S[i - 1]
  1805. SWAP2 S[i - 1]
  1806. MUL S[i - 1]
  1807. SWAP1 S[i - 1]
  1808. SWAP2 S[i - 1]
  1809. ADD S[i - 1]
  1810. MSTORE inout[i] = A
  1811. DUP3 i
  1812. SWAP1 i
  1813. DUP7 S
  1814. SWAP1 S
  1815. PUSH1 0x1 S[0]
  1816. DUP8 i+1
  1817. ADD i+1
  1818. AND inout[i+1]
  1819. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  1820. DUP2 inout[i+1]
  1821. LT inout[i+1]
  1822. ISZERO inout[i+1]
  1823. PUSH [ErrorTag] contract rc5 {...
  1824. JUMPI inout[i+1]
  1825. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1826. SWAP3 i < 26
  1827. SWAP1 i < 26
  1828. SWAP3 i < 26
  1829. AND i < 26
  1830. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1831. SWAP3 S[i - 1]
  1832. SWAP1 S[i - 1]
  1833. SWAP3 S[i - 1]
  1834. MUL S[i - 1]
  1835. ADD S[i - 1]
  1836. MSTORE inout[i+1] = B
  1837. PUSH1 0x2 ++i
  1838. SWAP4 i += 2
  1839. SWAP1 i += 2
  1840. SWAP4 i += 2
  1841. ADD i += 2
  1842. SWAP3 i += 2
  1843. PUSH [tag38] for (uint32 i = 0; i < 4; i += 2) {...
  1844. JUMP for (uint32 i = 0; i < 4; i += 2) {...
  1845. tag44:
  1846. JUMPDEST rotate_left((A ^ B), B)
  1847. ADD rotate_left((B ^ A), A) + S[2 * i + 1]
  1848. SWAP3 rotate_left((B ^ A), A) + S[2 * i + 1]
  1849. POP
  1850. DUP6 S
  1851. PUSH1 0x2 ++i
  1852. DUP6 2 * i
  1853. MUL 2 * i
  1854. PUSH1 0x1 S[0]
  1855. ADD 2 * i + 1
  1856. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1857. AND S[2 * i + 1]
  1858. PUSH1 0x1A function expand(uint32[4] L, uint32[26] S) {...
  1859. DUP2 S[2 * i + 1]
  1860. LT S[2 * i + 1]
  1861. ISZERO S[2 * i + 1]
  1862. PUSH [ErrorTag] contract rc5 {...
  1863. JUMPI S[2 * i + 1]
  1864. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1865. MUL S[2 * i + 1]
  1866. ADD S[2 * i + 1]
  1867. MLOAD S[2 * i + 1]
  1868. PUSH [tag45] rotate_left((B ^ A), A)
  1869. DUP5 B ^ A
  1870. DUP5 B ^ A
  1871. XOR B ^ A
  1872. DUP6 rotate_left((B ^ A), A) + S[2 * i + 1]
  1873. PUSH [tag11] rotate_left
  1874. JUMP [in] rotate_left((B ^ A), A)
  1875. tag45:
  1876. JUMPDEST rotate_left((B ^ A), A)
  1877. ADD rotate_left((B ^ A), A) + S[2 * i + 1]
  1878. SWAP2 rotate_left((B ^ A), A) + S[2 * i + 1]
  1879. POP
  1880. PUSH1 0x1 S[0]
  1881. ADD ++i
  1882. PUSH [tag41] for (int j = 12; j <= 4; ++j) {...
  1883. JUMP for (int j = 12; j <= 4; ++j) {...
  1884. tag55:
  1885. JUMPDEST for (int j = 12; j > 0; --j) {...
  1886. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1887. DUP7 S[i - 1]
  1888. ADD S[i - 1]
  1889. MLOAD S[2 * i + 1]
  1890. DUP7 S[2 * i + 1]
  1891. MLOAD S[2 * i + 1]
  1892. SWAP1 A -= S[0]
  1893. SWAP4 A -= S[0]
  1894. SUB A -= S[0]
  1895. SWAP3 A -= S[0]
  1896. SWAP1 B -= S[1]
  1897. SWAP2 B -= S[1]
  1898. SUB B -= S[1]
  1899. SWAP1 B -= S[1]
  1900. DUP3 A -= S[0]
  1901. DUP6 S
  1902. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1903. DUP7 inout[i]
  1904. AND inout[i]
  1905. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  1906. DUP2 inout[i]
  1907. LT inout[i]
  1908. ISZERO inout[i]
  1909. PUSH [ErrorTag] contract rc5 {...
  1910. JUMPI inout[i]
  1911. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1912. SWAP3 i < 26
  1913. DUP4 i < 26
  1914. AND i < 26
  1915. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1916. SWAP2 S[i - 1]
  1917. SWAP1 S[i - 1]
  1918. SWAP2 S[i - 1]
  1919. MUL S[i - 1]
  1920. SWAP1 S[i - 1]
  1921. SWAP2 S[i - 1]
  1922. ADD S[i - 1]
  1923. MSTORE inout[i] = A
  1924. DUP3 i
  1925. SWAP1 i
  1926. DUP7 S
  1927. SWAP1 S
  1928. PUSH1 0x1 S[0]
  1929. DUP8 i+1
  1930. ADD i+1
  1931. AND inout[i+1]
  1932. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  1933. DUP2 inout[i+1]
  1934. LT inout[i+1]
  1935. ISZERO inout[i+1]
  1936. PUSH [ErrorTag] contract rc5 {...
  1937. JUMPI inout[i+1]
  1938. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1939. SWAP3 i < 26
  1940. SWAP1 i < 26
  1941. SWAP3 i < 26
  1942. AND i < 26
  1943. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1944. SWAP3 S[i - 1]
  1945. SWAP1 S[i - 1]
  1946. SWAP3 S[i - 1]
  1947. MUL S[i - 1]
  1948. ADD S[i - 1]
  1949. MSTORE inout[i+1] = B
  1950. PUSH1 0x2 ++i
  1951. SWAP4 i += 2
  1952. SWAP1 i += 2
  1953. SWAP4 i += 2
  1954. ADD i += 2
  1955. SWAP3 i += 2
  1956. PUSH [tag51] for (uint32 i = 0; i < 4; i += 2) {...
  1957. JUMP for (uint32 i = 0; i < 4; i += 2) {...
  1958. tag57:
  1959. JUMPDEST rotate_right(B - S[2 * i + 1], A)
  1960. XOR rotate_right(A - S[2 * i], B) ^ B
  1961. SWAP2 rotate_right(A - S[2 * i], B) ^ B
  1962. POP
  1963. DUP2 rotate_right(A - S[2 * i], B) ^ B
  1964. PUSH [tag58] rotate_right(A - S[2 * i], B)
  1965. DUP8 S
  1966. PUSH1 0x2 ++i
  1967. DUP8 2 * i
  1968. MUL 2 * i
  1969. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  1970. AND S[2 * i]
  1971. PUSH1 0x1A function expand(uint32[4] L, uint32[26] S) {...
  1972. DUP2 S[2 * i]
  1973. LT S[2 * i]
  1974. ISZERO S[2 * i]
  1975. PUSH [ErrorTag] contract rc5 {...
  1976. JUMPI S[2 * i]
  1977. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  1978. MUL S[2 * i]
  1979. ADD S[2 * i]
  1980. MLOAD S[2 * i]
  1981. DUP6 A - S[2 * i]
  1982. SUB A - S[2 * i]
  1983. DUP3 rotate_right(A - S[2 * i], B) ^ B
  1984. PUSH [tag11] rotate_left
  1985. JUMP [in] rotate_right(A - S[2 * i], B)
  1986. tag58:
  1987. JUMPDEST rotate_right(A - S[2 * i], B)
  1988. XOR rotate_right(A - S[2 * i], B) ^ B
  1989. SWAP3 rotate_right(A - S[2 * i], B) ^ B
  1990. POP
  1991. PUSH1 0x0
  1992. NOT
  1993. ADD i - 1
  1994. PUSH [tag54] for (int j = 12; j > 0; --j) {...
  1995. JUMP for (int j = 12; j > 0; --j) {...
  1996. tag62:
  1997. JUMPDEST for (i = 1; i < 26; ++i)...
  1998. POP
  1999. PUSH1 0x0 contract rc5 {...
  2000. SWAP2 contract rc5 {...
  2001. POP
  2002. DUP2 contract rc5 {...
  2003. SWAP1 contract rc5 {...
  2004. POP
  2005. PUSH1 0x4E 3*26
  2006. tag64:
  2007. JUMPDEST while (n-- > 0) {...
  2008. PUSH1 0x0
  2009. NOT
  2010. DUP2 n--
  2011. ADD n--
  2012. SWAP1 n--
  2013. PUSH1 0x0 contract rc5 {...
  2014. SWAP1 n-- > 0
  2015. SGT n-- > 0
  2016. ISZERO while (n-- > 0) {...
  2017. PUSH [tag65] while (n-- > 0) {...
  2018. JUMPI while (n-- > 0) {...
  2019. PUSH [tag66] rotate_left((S[i] + A + B), 3)
  2020. DUP5 B
  2021. DUP7 A
  2022. DUP9 S
  2023. DUP7 i
  2024. PUSH4 0xFFFFFFFF S[i]
  2025. AND S[i]
  2026. PUSH1 0x1A S[i]
  2027. DUP2 S[i]
  2028. LT S[i]
  2029. ISZERO S[i]
  2030. PUSH [ErrorTag] S[i]
  2031. JUMPI S[i]
  2032. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  2033. MUL S[i - 1]
  2034. ADD S[i - 1]
  2035. MLOAD S[i - 1]
  2036. ADD S[i] + A
  2037. ADD S[i] + A + B
  2038. PUSH1 0x3 3
  2039. PUSH [tag11] rotate_left
  2040. JUMP [in] rotate_left((S[i] + A + B), 3)
  2041. tag65:
  2042. JUMPDEST while (n-- > 0) {...
  2043. POP function expand(uint32[4] L, uint32[26] S) {...
  2044. POP function expand(uint32[4] L, uint32[26] S) {...
  2045. POP function expand(uint32[4] L, uint32[26] S) {...
  2046. POP function expand(uint32[4] L, uint32[26] S) {...
  2047. POP function expand(uint32[4] L, uint32[26] S) {...
  2048. POP function expand(uint32[4] L, uint32[26] S) {...
  2049. POP function expand(uint32[4] L, uint32[26] S) {...
  2050. JUMP [out] function expand(uint32[4] L, uint32[26] S) {...
  2051. tag66:
  2052. JUMPDEST rotate_left((S[i] + A + B), 3)
  2053. DUP7 S
  2054. DUP5 i
  2055. PUSH4 0xFFFFFFFF S[i]
  2056. AND S[i]
  2057. PUSH1 0x1A S[i]
  2058. DUP2 S[i]
  2059. LT S[i]
  2060. ISZERO S[i]
  2061. PUSH [ErrorTag] S[i]
  2062. JUMPI S[i]
  2063. SWAP1 S[i]
  2064. SWAP1 S[i]
  2065. PUSH1 0x20 S[i]
  2066. MUL S[i]
  2067. ADD S[i]
  2068. SWAP1 S[i] = rotate_left((S[i] + A + B), 3)
  2069. PUSH4 0xFFFFFFFF S[i] = rotate_left((S[i] + A + B), 3)
  2070. AND S[i] = rotate_left((S[i] + A + B), 3)
  2071. SWAP1 S[i] = rotate_left((S[i] + A + B), 3)
  2072. DUP2 S[i] = rotate_left((S[i] + A + B), 3)
  2073. DUP2 S[i] = rotate_left((S[i] + A + B), 3)
  2074. MSTORE S[i] = rotate_left((S[i] + A + B), 3)
  2075. PUSH1 0x20 S[i] = rotate_left((S[i] + A + B), 3)
  2076. ADD S[i] = rotate_left((S[i] + A + B), 3)
  2077. POP S[i] = rotate_left((S[i] + A + B), 3)
  2078. SWAP5 A = S[i] = rotate_left((S[i] + A + B), 3)
  2079. POP A = S[i] = rotate_left((S[i] + A + B), 3)
  2080. DUP5 A = S[i] = rotate_left((S[i] + A + B), 3)
  2081. POP A = S[i] = rotate_left((S[i] + A + B), 3)
  2082. PUSH [tag67] rotate_left((L[j] + A + B), A + B)
  2083. DUP5 B
  2084. DUP7 A
  2085. DUP10 L
  2086. DUP6 j
  2087. PUSH4 0xFFFFFFFF L[j]
  2088. AND L[j]
  2089. PUSH1 0x4 L[j]
  2090. DUP2 L[j]
  2091. LT L[j]
  2092. ISZERO L[j]
  2093. PUSH [ErrorTag] L[j]
  2094. JUMPI L[j]
  2095. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  2096. MUL L[j]
  2097. ADD L[j]
  2098. MLOAD L[j]
  2099. ADD L[j] + A
  2100. ADD L[j] + A + B
  2101. DUP7 A + B
  2102. DUP7 A + B
  2103. ADD A + B
  2104. PUSH [tag11] rotate_left
  2105. JUMP [in] rotate_left((L[j] + A + B), A + B)
  2106. tag67:
  2107. JUMPDEST rotate_left((L[j] + A + B), A + B)
  2108. DUP8 L
  2109. DUP4 j
  2110. PUSH4 0xFFFFFFFF L[j]
  2111. AND L[j]
  2112. PUSH1 0x4 L[j]
  2113. DUP2 L[j]
  2114. LT L[j]
  2115. ISZERO L[j]
  2116. PUSH [ErrorTag] L[j]
  2117. JUMPI L[j]
  2118. PUSH4 0xFFFFFFFF S[0] = 0xb7e15163
  2119. SWAP3 L[j] = rotate_left((L[j] + A + B), A + B)
  2120. DUP4 L[j] = rotate_left((L[j] + A + B), A + B)
  2121. AND L[j] = rotate_left((L[j] + A + B), A + B)
  2122. PUSH1 0x20 function expand(uint32[4] L, uint32[26] S) {...
  2123. SWAP2 L[j]
  2124. SWAP1 L[j]
  2125. SWAP2 L[j]
  2126. MUL L[j]
  2127. SWAP1 L[j]
  2128. SWAP2 L[j]
  2129. ADD L[j]
  2130. DUP2 L[j] = rotate_left((L[j] + A + B), A + B)
  2131. SWAP1 L[j] = rotate_left((L[j] + A + B), A + B)
  2132. MSTORE L[j] = rotate_left((L[j] + A + B), A + B)
  2133. SWAP5 L[j] = rotate_left((L[j] + A + B), A + B)
  2134. POP
  2135. PUSH1 0x1A function expand(uint32[4] L, uint32[26] S) {...
  2136. PUSH1 0x1 S[0]
  2137. SWAP5 ++i
  2138. DUP6 ++i
  2139. ADD ++i
  2140. DUP3 ++i % 26
  2141. AND ++i % 26
  2142. MOD ++i % 26
  2143. SWAP4 ++i % 26
  2144. PUSH1 0x4 function expand(uint32[4] L, uint32[26] S) {...
  2145. SWAP4 ++i
  2146. ADD ++i
  2147. AND ++j % 4
  2148. SWAP2 ++j % 4
  2149. SWAP1 ++j % 4
  2150. SWAP2 ++j % 4
  2151. MOD ++j % 4
  2152. SWAP1 ++j % 4
  2153. PUSH [tag64] while (n-- > 0) {...
  2154. JUMP while (n-- > 0) {...