M1.M1 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582
  1. ## Copyright (C) 2017 Jeremiah Orians
  2. ## This file is part of stage0.
  3. ##
  4. ## stage0 is free software: you can redistribute it and/or modify
  5. ## it under the terms of the GNU General Public License as published by
  6. ## the Free Software Foundation, either version 3 of the License, or
  7. ## (at your option) any later version.
  8. ##
  9. ## stage0 is distributed in the hope that it will be useful,
  10. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. ## GNU General Public License for more details.
  13. ##
  14. ## You should have received a copy of the GNU General Public License
  15. ## along with stage0. If not, see <http://www.gnu.org/licenses/>.
  16. :newToken
  17. push___%ebp
  18. mov____%esp,%ebp
  19. sub____%esp,$i32 %0x1054
  20. # struct Token *p;
  21. # p = calloc(1, sizeof(struct Token))
  22. mov____$i32,%eax %0x10
  23. push___%eax
  24. mov____$i32,%eax %0x1
  25. push___%eax
  26. call32 %calloc
  27. add____$i8,%esp !0x8
  28. mov____%eax,0x8(%ebp) !0x-4
  29. test___%eax,%eax
  30. # if (0 == p) ...
  31. mov____$i32,%eax %0x0
  32. push___%eax
  33. mov____0x8(%ebp),%eax !0x-4
  34. mov____%eax,%edx
  35. pop____%eax
  36. sub____%edx,%eax
  37. sete___%al
  38. movzbl_%al,%eax
  39. # jmp test LABEL
  40. jne32 %_newToken_10_break
  41. # fprintf(2, "calloc failed.\n");
  42. push___$i32 &string_open_0
  43. mov____$i32,%eax %0x2
  44. push___%eax
  45. call32 %fprintf
  46. add____$i8,%esp !0x8
  47. test___%eax,%eax
  48. # exit(1);
  49. mov____$i32,%eax %0x1
  50. push___%eax
  51. call32 %exit
  52. add____$i8,%esp !0x4
  53. test___%eax,%eax
  54. jmp32 %_newToken_10_break
  55. :_newToken_10_break
  56. mov____0x8(%ebp),%eax !0x-4
  57. leave
  58. ret
  59. :reverse_list
  60. push___%ebp
  61. mov____%esp,%ebp
  62. sub____%esp,$i32 %0x1054
  63. # struct Token *root = 0;
  64. mov____$i32,%eax %0x0
  65. mov____%eax,0x8(%ebp) !0x-4
  66. # while (0 != head) ...
  67. jmp32 %_reverse_list_4_continue
  68. :_reverse_list_4_loop
  69. # struct Token *next = head->next;
  70. mov____%ebp,%eax
  71. add____$i8,%eax !0x8
  72. mov____(%eax),%eax
  73. add____$i8,%eax !0x0
  74. # head->next
  75. mov____(%eax),%eax
  76. mov____%eax,0x8(%ebp) !0x-8
  77. # head->next = root
  78. mov____0x8(%ebp),%eax !0x-4
  79. push___%eax
  80. mov____%ebp,%eax
  81. add____$i8,%eax !0x8
  82. mov____(%eax),%eax
  83. add____$i8,%eax !0x0
  84. mov____%eax,%edx
  85. pop____%eax
  86. mov____%eax,(%edx)
  87. test___%eax,%eax
  88. # root = head
  89. mov____0x8(%ebp),%eax !0x8
  90. mov____%eax,0x8(%ebp) !0x-4
  91. test___%eax,%eax
  92. # head = next
  93. mov____0x8(%ebp),%eax !0x-8
  94. mov____%eax,0x8(%ebp) !0x8
  95. test___%eax,%eax
  96. :_reverse_list_4_continue
  97. mov____$i32,%eax %0x0
  98. push___%eax
  99. mov____0x8(%ebp),%eax !0x8
  100. mov____%eax,%edx
  101. pop____%eax
  102. push___%eax
  103. sub____%edx,%eax
  104. setne__%al
  105. movzbl_%al,%eax
  106. xchg___%eax,(%esp)
  107. sub____%edx,%eax
  108. lahf
  109. xor____$i8,%ah !0x40
  110. sahf
  111. pop____%eax
  112. # jmp test LABEL
  113. jne32 %_reverse_list_4_break
  114. jmp32 %_reverse_list_4_loop
  115. :_reverse_list_4_break
  116. mov____0x8(%ebp),%eax !0x-4
  117. leave
  118. ret
  119. :purge_lineComment
  120. push___%ebp
  121. mov____%esp,%ebp
  122. sub____%esp,$i32 %0x1054
  123. # int c = fgetc(source_file);
  124. mov____0x32,%eax &source_file
  125. push___%eax
  126. call32 %fgetc
  127. add____$i8,%esp !0x4
  128. mov____%eax,0x8(%ebp) !0x-4
  129. # while (10 != c && 13 != c) ...
  130. jmp32 %_purge_lineComment_5_continue
  131. :_purge_lineComment_5_loop
  132. # c = fgetc(source_file)
  133. mov____0x32,%eax &source_file
  134. push___%eax
  135. call32 %fgetc
  136. add____$i8,%esp !0x4
  137. mov____%eax,0x8(%ebp) !0x-4
  138. test___%eax,%eax
  139. :_purge_lineComment_5_continue
  140. mov____$i32,%eax %0xa
  141. push___%eax
  142. mov____0x8(%ebp),%eax !0x-4
  143. mov____%eax,%edx
  144. pop____%eax
  145. push___%eax
  146. sub____%edx,%eax
  147. setne__%al
  148. movzbl_%al,%eax
  149. xchg___%eax,(%esp)
  150. sub____%edx,%eax
  151. lahf
  152. xor____$i8,%ah !0x40
  153. sahf
  154. pop____%eax
  155. # jmp test LABEL
  156. jne32 %_purge_lineComment_5_break
  157. mov____$i32,%eax %0xd
  158. push___%eax
  159. mov____0x8(%ebp),%eax !0x-4
  160. mov____%eax,%edx
  161. pop____%eax
  162. push___%eax
  163. sub____%edx,%eax
  164. setne__%al
  165. movzbl_%al,%eax
  166. xchg___%eax,(%esp)
  167. sub____%edx,%eax
  168. lahf
  169. xor____$i8,%ah !0x40
  170. sahf
  171. pop____%eax
  172. # jmp test LABEL
  173. jne32 %_purge_lineComment_5_break
  174. jmp32 %_purge_lineComment_5_loop
  175. :_purge_lineComment_5_break
  176. leave
  177. ret
  178. :store_atom
  179. push___%ebp
  180. mov____%esp,%ebp
  181. sub____%esp,$i32 %0x1054
  182. # char *store = calloc(4096 + 1, sizeof(char));
  183. mov____$i32,%eax %0x1
  184. push___%eax
  185. mov____$i32,%eax %0x1000
  186. add____$i8,%eax !0x1
  187. push___%eax
  188. call32 %calloc
  189. add____$i8,%esp !0x8
  190. mov____%eax,0x8(%ebp) !0x-4
  191. # if (0 == store) ...
  192. mov____$i32,%eax %0x0
  193. push___%eax
  194. mov____0x8(%ebp),%eax !0x-4
  195. mov____%eax,%edx
  196. pop____%eax
  197. sub____%edx,%eax
  198. sete___%al
  199. movzbl_%al,%eax
  200. # jmp test LABEL
  201. jne32 %_store_atom_9_break
  202. # fprintf(2, "Exhusted available memory\n");
  203. push___$i32 &string_open_1
  204. mov____$i32,%eax %0x2
  205. push___%eax
  206. call32 %fprintf
  207. add____$i8,%esp !0x8
  208. test___%eax,%eax
  209. # exit(1);
  210. mov____$i32,%eax %0x1
  211. push___%eax
  212. call32 %exit
  213. add____$i8,%esp !0x4
  214. test___%eax,%eax
  215. jmp32 %_store_atom_9_break
  216. :_store_atom_9_break
  217. # int ch;
  218. # int i = 0;
  219. mov____$i32,%eax %0x0
  220. mov____%eax,0x8(%ebp) !0x-c
  221. # ch = c
  222. movzbl_0x8(%ebp),%eax !0x8
  223. mov____%eax,0x8(%ebp) !0x-8
  224. test___%eax,%eax
  225. # do 9 != ch && 10 != ch && 32 != ch && i <= 4096while (...);
  226. :_store_atom_38_loop
  227. # store[i] = (char)ch
  228. mov____0x8(%ebp),%eax !0x-8
  229. push___%eax
  230. mov____0x8(%ebp),%eax !0x-c
  231. mov____%eax,%edx
  232. push___%eax
  233. mov____0x8(%ebp),%eax !0x-4
  234. mov____%eax,%edx
  235. pop____%eax
  236. add____%edx,%eax
  237. mov____%eax,%edx
  238. pop____%eax
  239. mov____%al,(%edx)
  240. test___%eax,%eax
  241. # ch = fgetc(source_file)
  242. mov____0x32,%eax &source_file
  243. push___%eax
  244. call32 %fgetc
  245. add____$i8,%esp !0x4
  246. mov____%eax,0x8(%ebp) !0x-8
  247. test___%eax,%eax
  248. # i = i + 1
  249. mov____0x8(%ebp),%eax !0x-c
  250. add____$i8,%eax !0x1
  251. mov____%eax,0x8(%ebp) !0x-c
  252. test___%eax,%eax
  253. :_store_atom_38_continue
  254. mov____$i32,%eax %0x9
  255. push___%eax
  256. mov____0x8(%ebp),%eax !0x-8
  257. mov____%eax,%edx
  258. pop____%eax
  259. push___%eax
  260. sub____%edx,%eax
  261. setne__%al
  262. movzbl_%al,%eax
  263. xchg___%eax,(%esp)
  264. sub____%edx,%eax
  265. lahf
  266. xor____$i8,%ah !0x40
  267. sahf
  268. pop____%eax
  269. # jmp test LABEL
  270. jne32 %_store_atom_38_break
  271. mov____$i32,%eax %0xa
  272. push___%eax
  273. mov____0x8(%ebp),%eax !0x-8
  274. mov____%eax,%edx
  275. pop____%eax
  276. push___%eax
  277. sub____%edx,%eax
  278. setne__%al
  279. movzbl_%al,%eax
  280. xchg___%eax,(%esp)
  281. sub____%edx,%eax
  282. lahf
  283. xor____$i8,%ah !0x40
  284. sahf
  285. pop____%eax
  286. # jmp test LABEL
  287. jne32 %_store_atom_38_break
  288. mov____$i32,%eax %0x20
  289. push___%eax
  290. mov____0x8(%ebp),%eax !0x-8
  291. mov____%eax,%edx
  292. pop____%eax
  293. push___%eax
  294. sub____%edx,%eax
  295. setne__%al
  296. movzbl_%al,%eax
  297. xchg___%eax,(%esp)
  298. sub____%edx,%eax
  299. lahf
  300. xor____$i8,%ah !0x40
  301. sahf
  302. pop____%eax
  303. # jmp test LABEL
  304. jne32 %_store_atom_38_break
  305. mov____0x8(%ebp),%eax !0x-c
  306. push___%eax
  307. mov____$i32,%eax %0x1000
  308. mov____%eax,%edx
  309. pop____%eax
  310. sub____%edx,%eax
  311. setle__%al
  312. movzbl_%al,%eax
  313. # jmp test LABEL
  314. jg32 %_store_atom_38_break
  315. jmp32 %_store_atom_38_loop
  316. :_store_atom_38_break
  317. mov____0x8(%ebp),%eax !0x-4
  318. leave
  319. ret
  320. :store_string
  321. push___%ebp
  322. mov____%esp,%ebp
  323. sub____%esp,$i32 %0x1054
  324. # char *store = calloc(4096 + 1, sizeof(char));
  325. mov____$i32,%eax %0x1
  326. push___%eax
  327. mov____$i32,%eax %0x1000
  328. add____$i8,%eax !0x1
  329. push___%eax
  330. call32 %calloc
  331. add____$i8,%esp !0x8
  332. mov____%eax,0x8(%ebp) !0x-4
  333. # if (0 == store) ...
  334. mov____$i32,%eax %0x0
  335. push___%eax
  336. mov____0x8(%ebp),%eax !0x-4
  337. mov____%eax,%edx
  338. pop____%eax
  339. sub____%edx,%eax
  340. sete___%al
  341. movzbl_%al,%eax
  342. # jmp test LABEL
  343. jne32 %_store_string_9_break
  344. # fprintf(2, "Exhusted available memory\n");
  345. push___$i32 &string_open_1
  346. mov____$i32,%eax %0x2
  347. push___%eax
  348. call32 %fprintf
  349. add____$i8,%esp !0x8
  350. test___%eax,%eax
  351. # exit(1);
  352. mov____$i32,%eax %0x1
  353. push___%eax
  354. call32 %exit
  355. add____$i8,%esp !0x4
  356. test___%eax,%eax
  357. jmp32 %_store_string_9_break
  358. :_store_string_9_break
  359. # int ch;
  360. # int i = 0;
  361. mov____$i32,%eax %0x0
  362. mov____%eax,0x8(%ebp) !0x-c
  363. # ch = c
  364. movzbl_0x8(%ebp),%eax !0x8
  365. mov____%eax,0x8(%ebp) !0x-8
  366. test___%eax,%eax
  367. # do ch != cwhile (...);
  368. :_store_string_38_loop
  369. # store[i] = (char)ch
  370. mov____0x8(%ebp),%eax !0x-8
  371. push___%eax
  372. mov____0x8(%ebp),%eax !0x-c
  373. mov____%eax,%edx
  374. push___%eax
  375. mov____0x8(%ebp),%eax !0x-4
  376. mov____%eax,%edx
  377. pop____%eax
  378. add____%edx,%eax
  379. mov____%eax,%edx
  380. pop____%eax
  381. mov____%al,(%edx)
  382. test___%eax,%eax
  383. # i = i + 1
  384. mov____0x8(%ebp),%eax !0x-c
  385. add____$i8,%eax !0x1
  386. mov____%eax,0x8(%ebp) !0x-c
  387. test___%eax,%eax
  388. # ch = fgetc(source_file)
  389. mov____0x32,%eax &source_file
  390. push___%eax
  391. call32 %fgetc
  392. add____$i8,%esp !0x4
  393. mov____%eax,0x8(%ebp) !0x-8
  394. test___%eax,%eax
  395. # if (-1 == ch) ...
  396. push___%eax
  397. mov____$i32,%eax %0x1
  398. mov____%eax,%edx
  399. pop____%eax
  400. mov____$i32,%eax %0x0
  401. sub____%edx,%eax
  402. push___%eax
  403. mov____0x8(%ebp),%eax !0x-8
  404. mov____%eax,%edx
  405. pop____%eax
  406. sub____%edx,%eax
  407. sete___%al
  408. movzbl_%al,%eax
  409. # jmp test LABEL
  410. jne32 %_store_string_63_break
  411. # fprintf(2, "Unmatched \"!\n");
  412. push___$i32 &string_open_2
  413. mov____$i32,%eax %0x2
  414. push___%eax
  415. call32 %fprintf
  416. add____$i8,%esp !0x8
  417. test___%eax,%eax
  418. # exit(1);
  419. mov____$i32,%eax %0x1
  420. push___%eax
  421. call32 %exit
  422. add____$i8,%esp !0x4
  423. test___%eax,%eax
  424. jmp32 %_store_string_63_break
  425. :_store_string_63_break
  426. # if (4096 == i) ...
  427. mov____$i32,%eax %0x1000
  428. push___%eax
  429. mov____0x8(%ebp),%eax !0x-c
  430. mov____%eax,%edx
  431. pop____%eax
  432. sub____%edx,%eax
  433. sete___%al
  434. movzbl_%al,%eax
  435. # jmp test LABEL
  436. jne32 %_store_string_88_break
  437. # fprintf(2, "String: %s exceeds max string size\n", store);
  438. push___0x8(%ebp) !0x-4
  439. push___$i32 &string_open_3
  440. mov____$i32,%eax %0x2
  441. push___%eax
  442. call32 %fprintf
  443. add____$i8,%esp !0xc
  444. test___%eax,%eax
  445. # exit(1);
  446. mov____$i32,%eax %0x1
  447. push___%eax
  448. call32 %exit
  449. add____$i8,%esp !0x4
  450. test___%eax,%eax
  451. jmp32 %_store_string_88_break
  452. :_store_string_88_break
  453. :_store_string_38_continue
  454. mov____0x8(%ebp),%eax !0x-8
  455. push___%eax
  456. movzbl_0x8(%ebp),%eax !0x8
  457. mov____%eax,%edx
  458. pop____%eax
  459. push___%eax
  460. sub____%edx,%eax
  461. setne__%al
  462. movzbl_%al,%eax
  463. xchg___%eax,(%esp)
  464. sub____%edx,%eax
  465. lahf
  466. xor____$i8,%ah !0x40
  467. sahf
  468. pop____%eax
  469. # jmp test LABEL
  470. jne32 %_store_string_38_break
  471. jmp32 %_store_string_38_loop
  472. :_store_string_38_break
  473. mov____0x8(%ebp),%eax !0x-4
  474. leave
  475. ret
  476. :Tokenize_Line
  477. push___%ebp
  478. mov____%esp,%ebp
  479. sub____%esp,$i32 %0x1054
  480. # int c;
  481. :_Tokenize_Line_label_restart
  482. # c = fgetc(source_file)
  483. mov____0x32,%eax &source_file
  484. push___%eax
  485. call32 %fgetc
  486. add____$i8,%esp !0x4
  487. mov____%eax,0x8(%ebp) !0x-4
  488. test___%eax,%eax
  489. # if (35 == c || 59 == c) ...
  490. mov____$i32,%eax %0x23
  491. push___%eax
  492. mov____0x8(%ebp),%eax !0x-4
  493. mov____%eax,%edx
  494. pop____%eax
  495. sub____%edx,%eax
  496. sete___%al
  497. movzbl_%al,%eax
  498. # jmp test LABEL
  499. jne32 %_Tokenize_Line_8_break_b_9
  500. jmp32 %_Tokenize_Line_8_break_skip_b_9
  501. :_Tokenize_Line_8_break_b_9
  502. mov____$i32,%eax %0x3b
  503. push___%eax
  504. mov____0x8(%ebp),%eax !0x-4
  505. mov____%eax,%edx
  506. pop____%eax
  507. sub____%edx,%eax
  508. sete___%al
  509. movzbl_%al,%eax
  510. # jmp test LABEL
  511. jne32 %_Tokenize_Line_8_break
  512. :_Tokenize_Line_8_break_skip_b_9
  513. # purge_lineComment();
  514. call32 %purge_lineComment
  515. add____$i8,%esp !0x0
  516. test___%eax,%eax
  517. jmp32 %_Tokenize_Line_label_restart
  518. jmp32 %_Tokenize_Line_8_break
  519. :_Tokenize_Line_8_break
  520. # if ((9 == c || 10 == c) || 32 == c) ...
  521. mov____$i32,%eax %0x9
  522. push___%eax
  523. mov____0x8(%ebp),%eax !0x-4
  524. mov____%eax,%edx
  525. pop____%eax
  526. sub____%edx,%eax
  527. sete___%al
  528. movzbl_%al,%eax
  529. # jmp test LABEL
  530. jne32 %_Tokenize_Line_32_break_b_33_b_33
  531. jmp32 %_Tokenize_Line_32_break_b_33_skip_b_33
  532. :_Tokenize_Line_32_break_b_33_b_33
  533. mov____$i32,%eax %0xa
  534. push___%eax
  535. mov____0x8(%ebp),%eax !0x-4
  536. mov____%eax,%edx
  537. pop____%eax
  538. sub____%edx,%eax
  539. sete___%al
  540. movzbl_%al,%eax
  541. # jmp test LABEL
  542. jne32 %_Tokenize_Line_32_break_b_33
  543. :_Tokenize_Line_32_break_b_33_skip_b_33
  544. jmp32 %_Tokenize_Line_32_break_skip_b_33
  545. :_Tokenize_Line_32_break_b_33
  546. mov____$i32,%eax %0x20
  547. push___%eax
  548. mov____0x8(%ebp),%eax !0x-4
  549. mov____%eax,%edx
  550. pop____%eax
  551. sub____%edx,%eax
  552. sete___%al
  553. movzbl_%al,%eax
  554. # jmp test LABEL
  555. jne32 %_Tokenize_Line_32_break
  556. :_Tokenize_Line_32_break_skip_b_33
  557. jmp32 %_Tokenize_Line_label_restart
  558. jmp32 %_Tokenize_Line_32_break
  559. :_Tokenize_Line_32_break
  560. # struct Token *p = newToken();
  561. call32 %newToken
  562. add____$i8,%esp !0x0
  563. mov____%eax,0x8(%ebp) !0x-8
  564. # if (-1 == c) ...else ...
  565. push___%eax
  566. mov____$i32,%eax %0x1
  567. mov____%eax,%edx
  568. pop____%eax
  569. mov____$i32,%eax %0x0
  570. sub____%edx,%eax
  571. push___%eax
  572. mov____0x8(%ebp),%eax !0x-4
  573. mov____%eax,%edx
  574. pop____%eax
  575. sub____%edx,%eax
  576. sete___%al
  577. movzbl_%al,%eax
  578. # jmp test LABEL
  579. jne32 %_Tokenize_Line_66_else
  580. # Reached_EOF = 1
  581. mov____$i32,%eax %0x1
  582. mov____%eax,0x32 &Reached_EOF
  583. test___%eax,%eax
  584. # free(p);
  585. push___0x8(%ebp) !0x-8
  586. call32 %free
  587. add____$i8,%esp !0x4
  588. test___%eax,%eax
  589. mov____0x8(%ebp),%eax !0x8
  590. leave
  591. ret
  592. jmp32 %_Tokenize_Line_66_break
  593. :_Tokenize_Line_66_else
  594. # if (34 == c || 39 == c) ...else ...
  595. mov____$i32,%eax %0x22
  596. push___%eax
  597. mov____0x8(%ebp),%eax !0x-4
  598. mov____%eax,%edx
  599. pop____%eax
  600. sub____%edx,%eax
  601. sete___%al
  602. movzbl_%al,%eax
  603. # jmp test LABEL
  604. jne32 %_Tokenize_Line_90_else_b_91
  605. jmp32 %_Tokenize_Line_90_else_skip_b_91
  606. :_Tokenize_Line_90_else_b_91
  607. mov____$i32,%eax %0x27
  608. push___%eax
  609. mov____0x8(%ebp),%eax !0x-4
  610. mov____%eax,%edx
  611. pop____%eax
  612. sub____%edx,%eax
  613. sete___%al
  614. movzbl_%al,%eax
  615. # jmp test LABEL
  616. jne32 %_Tokenize_Line_90_else
  617. :_Tokenize_Line_90_else_skip_b_91
  618. # p->Text = store_string(c)
  619. push___0x8(%ebp) !0x-4
  620. call32 %store_string
  621. add____$i8,%esp !0x4
  622. push___%eax
  623. mov____%ebp,%eax
  624. add____$i8,%eax !0x-8
  625. mov____(%eax),%eax
  626. add____$i8,%eax !0x8
  627. mov____%eax,%edx
  628. pop____%eax
  629. mov____%eax,(%edx)
  630. test___%eax,%eax
  631. # p->type = 2
  632. mov____$i32,%eax %0x2
  633. push___%eax
  634. mov____%ebp,%eax
  635. add____$i8,%eax !0x-8
  636. mov____(%eax),%eax
  637. add____$i8,%eax !0x4
  638. mov____%eax,%edx
  639. pop____%eax
  640. mov____%eax,(%edx)
  641. test___%eax,%eax
  642. jmp32 %_Tokenize_Line_90_break
  643. :_Tokenize_Line_90_else
  644. # p->Text = store_atom(c)
  645. push___0x8(%ebp) !0x-4
  646. call32 %store_atom
  647. add____$i8,%esp !0x4
  648. push___%eax
  649. mov____%ebp,%eax
  650. add____$i8,%eax !0x-8
  651. mov____(%eax),%eax
  652. add____$i8,%eax !0x8
  653. mov____%eax,%edx
  654. pop____%eax
  655. mov____%eax,(%edx)
  656. test___%eax,%eax
  657. :_Tokenize_Line_90_break
  658. :_Tokenize_Line_66_break
  659. # p->next = head
  660. mov____0x8(%ebp),%eax !0x8
  661. push___%eax
  662. mov____%ebp,%eax
  663. add____$i8,%eax !0x-8
  664. mov____(%eax),%eax
  665. add____$i8,%eax !0x0
  666. mov____%eax,%edx
  667. pop____%eax
  668. mov____%eax,(%edx)
  669. test___%eax,%eax
  670. mov____0x8(%ebp),%eax !0x-8
  671. leave
  672. ret
  673. :setExpression
  674. push___%ebp
  675. mov____%esp,%ebp
  676. sub____%esp,$i32 %0x1054
  677. # for (struct Token *i = p; 0 != i; i = i->next) ...
  678. # struct Token *i = p;
  679. mov____0x8(%ebp),%eax !0x8
  680. mov____%eax,0x8(%ebp) !0x-4
  681. jmp32 %_setExpression_1_initial_skip
  682. :_setExpression_1_loop
  683. # if (i->type & 1) ...else ...
  684. mov____%ebp,%eax
  685. add____$i8,%eax !0x-4
  686. mov____(%eax),%eax
  687. add____$i8,%eax !0x4
  688. # i->type
  689. mov____(%eax),%eax
  690. push___%eax
  691. mov____$i32,%eax %0x1
  692. mov____%eax,%edx
  693. pop____%eax
  694. and____%edx,%eax
  695. test___%eax,%eax
  696. # jmp test LABEL
  697. test___%eax,%eax
  698. je32 %_setExpression_7_else
  699. jmp32 %_setExpression_1_continue
  700. jmp32 %_setExpression_7_break
  701. :_setExpression_7_else
  702. # if (0 == strncmp(i->Text, match, 4096)) ...
  703. mov____$i32,%eax %0x0
  704. push___%eax
  705. mov____$i32,%eax %0x1000
  706. push___%eax
  707. push___0x8(%ebp) !0xc
  708. mov____%ebp,%eax
  709. add____$i8,%eax !0x-4
  710. mov____(%eax),%eax
  711. add____$i8,%eax !0x8
  712. # i->Text
  713. mov____(%eax),%eax
  714. push___%eax
  715. call32 %strncmp
  716. add____$i8,%esp !0xc
  717. mov____%eax,%edx
  718. pop____%eax
  719. sub____%edx,%eax
  720. sete___%al
  721. movzbl_%al,%eax
  722. # jmp test LABEL
  723. jne32 %_setExpression_24_break
  724. # i->Expression = Exp
  725. mov____0x8(%ebp),%eax !0x10
  726. push___%eax
  727. mov____%ebp,%eax
  728. add____$i8,%eax !0x-4
  729. mov____(%eax),%eax
  730. add____$i8,%eax !0xc
  731. mov____%eax,%edx
  732. pop____%eax
  733. mov____%eax,(%edx)
  734. test___%eax,%eax
  735. jmp32 %_setExpression_24_break
  736. :_setExpression_24_break
  737. :_setExpression_7_break
  738. :_setExpression_1_continue
  739. # i = i->next
  740. mov____%ebp,%eax
  741. add____$i8,%eax !0x-4
  742. mov____(%eax),%eax
  743. add____$i8,%eax !0x0
  744. # i->next
  745. mov____(%eax),%eax
  746. mov____%eax,0x8(%ebp) !0x-4
  747. :_setExpression_1_initial_skip
  748. mov____$i32,%eax %0x0
  749. push___%eax
  750. mov____0x8(%ebp),%eax !0x-4
  751. mov____%eax,%edx
  752. pop____%eax
  753. push___%eax
  754. sub____%edx,%eax
  755. setne__%al
  756. movzbl_%al,%eax
  757. xchg___%eax,(%esp)
  758. sub____%edx,%eax
  759. lahf
  760. xor____$i8,%ah !0x40
  761. sahf
  762. pop____%eax
  763. # jmp test LABEL
  764. jne32 %_setExpression_1_break
  765. jmp32 %_setExpression_1_loop
  766. :_setExpression_1_break
  767. leave
  768. ret
  769. :identify_macros
  770. push___%ebp
  771. mov____%esp,%ebp
  772. sub____%esp,$i32 %0x1054
  773. # for (struct Token *i = p; 0 != i; i = i->next) ...
  774. # struct Token *i = p;
  775. mov____0x8(%ebp),%eax !0x8
  776. mov____%eax,0x8(%ebp) !0x-4
  777. jmp32 %_identify_macros_1_initial_skip
  778. :_identify_macros_1_loop
  779. # if (0 == strncmp(i->Text, "DEFINE", 4096)) ...
  780. mov____$i32,%eax %0x0
  781. push___%eax
  782. mov____$i32,%eax %0x1000
  783. push___%eax
  784. push___$i32 &string_open_4
  785. mov____%ebp,%eax
  786. add____$i8,%eax !0x-4
  787. mov____(%eax),%eax
  788. add____$i8,%eax !0x8
  789. # i->Text
  790. mov____(%eax),%eax
  791. push___%eax
  792. call32 %strncmp
  793. add____$i8,%esp !0xc
  794. mov____%eax,%edx
  795. pop____%eax
  796. sub____%edx,%eax
  797. sete___%al
  798. movzbl_%al,%eax
  799. # jmp test LABEL
  800. jne32 %_identify_macros_7_break
  801. # i->type = 1
  802. mov____$i32,%eax %0x1
  803. push___%eax
  804. mov____%ebp,%eax
  805. add____$i8,%eax !0x-4
  806. mov____(%eax),%eax
  807. add____$i8,%eax !0x4
  808. mov____%eax,%edx
  809. pop____%eax
  810. mov____%eax,(%edx)
  811. test___%eax,%eax
  812. # i->Text = i->next->Text
  813. mov____%ebp,%eax
  814. add____$i8,%eax !0x-4
  815. mov____(%eax),%eax
  816. add____$i8,%eax !0x0
  817. mov____(%eax),%eax
  818. add____$i8,%eax !0x8
  819. # i->next->Text
  820. mov____(%eax),%eax
  821. push___%eax
  822. mov____%ebp,%eax
  823. add____$i8,%eax !0x-4
  824. mov____(%eax),%eax
  825. add____$i8,%eax !0x8
  826. mov____%eax,%edx
  827. pop____%eax
  828. mov____%eax,(%edx)
  829. test___%eax,%eax
  830. # if (i->next->next->type & 2) ...else ...
  831. mov____%ebp,%eax
  832. add____$i8,%eax !0x-4
  833. mov____(%eax),%eax
  834. add____$i8,%eax !0x0
  835. mov____(%eax),%eax
  836. add____$i8,%eax !0x0
  837. mov____(%eax),%eax
  838. add____$i8,%eax !0x4
  839. # i->next->next->type
  840. mov____(%eax),%eax
  841. push___%eax
  842. mov____$i32,%eax %0x2
  843. mov____%eax,%edx
  844. pop____%eax
  845. and____%edx,%eax
  846. test___%eax,%eax
  847. # jmp test LABEL
  848. test___%eax,%eax
  849. je32 %_identify_macros_50_else
  850. # i->Expression = i->next->next->Text + 1
  851. mov____%ebp,%eax
  852. add____$i8,%eax !0x-4
  853. mov____(%eax),%eax
  854. add____$i8,%eax !0x0
  855. mov____(%eax),%eax
  856. add____$i8,%eax !0x0
  857. mov____(%eax),%eax
  858. add____$i8,%eax !0x8
  859. # i->next->next->Text
  860. mov____(%eax),%eax
  861. add____$i8,%eax !0x1
  862. push___%eax
  863. mov____%ebp,%eax
  864. add____$i8,%eax !0x-4
  865. mov____(%eax),%eax
  866. add____$i8,%eax !0xc
  867. mov____%eax,%edx
  868. pop____%eax
  869. mov____%eax,(%edx)
  870. test___%eax,%eax
  871. jmp32 %_identify_macros_50_break
  872. :_identify_macros_50_else
  873. # i->Expression = i->next->next->Text
  874. mov____%ebp,%eax
  875. add____$i8,%eax !0x-4
  876. mov____(%eax),%eax
  877. add____$i8,%eax !0x0
  878. mov____(%eax),%eax
  879. add____$i8,%eax !0x0
  880. mov____(%eax),%eax
  881. add____$i8,%eax !0x8
  882. # i->next->next->Text
  883. mov____(%eax),%eax
  884. push___%eax
  885. mov____%ebp,%eax
  886. add____$i8,%eax !0x-4
  887. mov____(%eax),%eax
  888. add____$i8,%eax !0xc
  889. mov____%eax,%edx
  890. pop____%eax
  891. mov____%eax,(%edx)
  892. test___%eax,%eax
  893. :_identify_macros_50_break
  894. # i->next = i->next->next->next
  895. mov____%ebp,%eax
  896. add____$i8,%eax !0x-4
  897. mov____(%eax),%eax
  898. add____$i8,%eax !0x0
  899. mov____(%eax),%eax
  900. add____$i8,%eax !0x0
  901. mov____(%eax),%eax
  902. add____$i8,%eax !0x0
  903. # i->next->next->next
  904. mov____(%eax),%eax
  905. push___%eax
  906. mov____%ebp,%eax
  907. add____$i8,%eax !0x-4
  908. mov____(%eax),%eax
  909. add____$i8,%eax !0x0
  910. mov____%eax,%edx
  911. pop____%eax
  912. mov____%eax,(%edx)
  913. test___%eax,%eax
  914. jmp32 %_identify_macros_7_break
  915. :_identify_macros_7_break
  916. :_identify_macros_1_continue
  917. # i = i->next
  918. mov____%ebp,%eax
  919. add____$i8,%eax !0x-4
  920. mov____(%eax),%eax
  921. add____$i8,%eax !0x0
  922. # i->next
  923. mov____(%eax),%eax
  924. mov____%eax,0x8(%ebp) !0x-4
  925. :_identify_macros_1_initial_skip
  926. mov____$i32,%eax %0x0
  927. push___%eax
  928. mov____0x8(%ebp),%eax !0x-4
  929. mov____%eax,%edx
  930. pop____%eax
  931. push___%eax
  932. sub____%edx,%eax
  933. setne__%al
  934. movzbl_%al,%eax
  935. xchg___%eax,(%esp)
  936. sub____%edx,%eax
  937. lahf
  938. xor____$i8,%ah !0x40
  939. sahf
  940. pop____%eax
  941. # jmp test LABEL
  942. jne32 %_identify_macros_1_break
  943. jmp32 %_identify_macros_1_loop
  944. :_identify_macros_1_break
  945. leave
  946. ret
  947. :line_macro
  948. push___%ebp
  949. mov____%esp,%ebp
  950. sub____%esp,$i32 %0x1054
  951. # for (struct Token *i = p; 0 != i; i = i->next) ...
  952. # struct Token *i = p;
  953. mov____0x8(%ebp),%eax !0x8
  954. mov____%eax,0x8(%ebp) !0x-4
  955. jmp32 %_line_macro_1_initial_skip
  956. :_line_macro_1_loop
  957. # if (i->type & 1) ...
  958. mov____%ebp,%eax
  959. add____$i8,%eax !0x-4
  960. mov____(%eax),%eax
  961. add____$i8,%eax !0x4
  962. # i->type
  963. mov____(%eax),%eax
  964. push___%eax
  965. mov____$i32,%eax %0x1
  966. mov____%eax,%edx
  967. pop____%eax
  968. and____%edx,%eax
  969. test___%eax,%eax
  970. # jmp test LABEL
  971. test___%eax,%eax
  972. je32 %_line_macro_7_break
  973. # setExpression(i->next, i->Text, i->Expression);
  974. mov____%ebp,%eax
  975. add____$i8,%eax !0x-4
  976. mov____(%eax),%eax
  977. add____$i8,%eax !0xc
  978. # i->Expression
  979. mov____(%eax),%eax
  980. push___%eax
  981. mov____%ebp,%eax
  982. add____$i8,%eax !0x-4
  983. mov____(%eax),%eax
  984. add____$i8,%eax !0x8
  985. # i->Text
  986. mov____(%eax),%eax
  987. push___%eax
  988. mov____%ebp,%eax
  989. add____$i8,%eax !0x-4
  990. mov____(%eax),%eax
  991. add____$i8,%eax !0x0
  992. # i->next
  993. mov____(%eax),%eax
  994. push___%eax
  995. call32 %setExpression
  996. add____$i8,%esp !0xc
  997. test___%eax,%eax
  998. jmp32 %_line_macro_7_break
  999. :_line_macro_7_break
  1000. :_line_macro_1_continue
  1001. # i = i->next
  1002. mov____%ebp,%eax
  1003. add____$i8,%eax !0x-4
  1004. mov____(%eax),%eax
  1005. add____$i8,%eax !0x0
  1006. # i->next
  1007. mov____(%eax),%eax
  1008. mov____%eax,0x8(%ebp) !0x-4
  1009. :_line_macro_1_initial_skip
  1010. mov____$i32,%eax %0x0
  1011. push___%eax
  1012. mov____0x8(%ebp),%eax !0x-4
  1013. mov____%eax,%edx
  1014. pop____%eax
  1015. push___%eax
  1016. sub____%edx,%eax
  1017. setne__%al
  1018. movzbl_%al,%eax
  1019. xchg___%eax,(%esp)
  1020. sub____%edx,%eax
  1021. lahf
  1022. xor____$i8,%ah !0x40
  1023. sahf
  1024. pop____%eax
  1025. # jmp test LABEL
  1026. jne32 %_line_macro_1_break
  1027. jmp32 %_line_macro_1_loop
  1028. :_line_macro_1_break
  1029. leave
  1030. ret
  1031. :hexify_string
  1032. push___%ebp
  1033. mov____%esp,%ebp
  1034. sub____%esp,$i32 %0x1054
  1035. # char table[16] = {0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, };
  1036. mov____$i32,%eax %0x30
  1037. mov____%al,0x8(%ebp) !0x-10
  1038. mov____$i32,%eax %0x31
  1039. mov____%al,0x8(%ebp) !0x-f
  1040. mov____$i32,%eax %0x32
  1041. mov____%al,0x8(%ebp) !0x-e
  1042. mov____$i32,%eax %0x33
  1043. mov____%al,0x8(%ebp) !0x-d
  1044. mov____$i32,%eax %0x34
  1045. mov____%al,0x8(%ebp) !0x-c
  1046. mov____$i32,%eax %0x35
  1047. mov____%al,0x8(%ebp) !0x-b
  1048. mov____$i32,%eax %0x36
  1049. mov____%al,0x8(%ebp) !0x-a
  1050. mov____$i32,%eax %0x37
  1051. mov____%al,0x8(%ebp) !0x-9
  1052. mov____$i32,%eax %0x38
  1053. mov____%al,0x8(%ebp) !0x-8
  1054. mov____$i32,%eax %0x39
  1055. mov____%al,0x8(%ebp) !0x-7
  1056. mov____$i32,%eax %0x41
  1057. mov____%al,0x8(%ebp) !0x-6
  1058. mov____$i32,%eax %0x42
  1059. mov____%al,0x8(%ebp) !0x-5
  1060. mov____$i32,%eax %0x43
  1061. mov____%al,0x8(%ebp) !0x-4
  1062. mov____$i32,%eax %0x44
  1063. mov____%al,0x8(%ebp) !0x-3
  1064. mov____$i32,%eax %0x45
  1065. mov____%al,0x8(%ebp) !0x-2
  1066. mov____$i32,%eax %0x46
  1067. mov____%al,0x8(%ebp) !0x-1
  1068. # int i = (strlen(p->Text + 1)/4 + 1)*8;
  1069. mov____%ebp,%eax
  1070. add____$i8,%eax !0x8
  1071. mov____(%eax),%eax
  1072. add____$i8,%eax !0x8
  1073. # p->Text
  1074. mov____(%eax),%eax
  1075. add____$i8,%eax !0x1
  1076. push___%eax
  1077. call32 %strlen
  1078. add____$i8,%esp !0x4
  1079. push___%eax
  1080. mov____$i32,%eax %0x4
  1081. mov____%eax,%edx
  1082. pop____%eax
  1083. mov____%edx,%ebx
  1084. xor____%edx,%edx
  1085. idiv___%ebx
  1086. add____$i8,%eax !0x1
  1087. push___%eax
  1088. mov____$i32,%eax %0x8
  1089. mov____%eax,%edx
  1090. pop____%eax
  1091. mul____%edx
  1092. mov____%eax,0x8(%ebp) !0x-14
  1093. # char *d = calloc(4096, sizeof(char));
  1094. mov____$i32,%eax %0x1
  1095. push___%eax
  1096. mov____$i32,%eax %0x1000
  1097. push___%eax
  1098. call32 %calloc
  1099. add____$i8,%esp !0x8
  1100. mov____%eax,0x8(%ebp) !0x-18
  1101. # p->Expression = d
  1102. mov____0x8(%ebp),%eax !0x-18
  1103. push___%eax
  1104. mov____%ebp,%eax
  1105. add____$i8,%eax !0x8
  1106. mov____(%eax),%eax
  1107. add____$i8,%eax !0xc
  1108. mov____%eax,%edx
  1109. pop____%eax
  1110. mov____%eax,(%edx)
  1111. test___%eax,%eax
  1112. # while (0 < i) ...
  1113. jmp32 %_hexify_string_70_continue
  1114. :_hexify_string_70_loop
  1115. # i = i - 1
  1116. mov____0x8(%ebp),%eax !0x-14
  1117. add____$i8,%eax !0x-1
  1118. mov____%eax,0x8(%ebp) !0x-14
  1119. test___%eax,%eax
  1120. # d[i] = 0x30
  1121. mov____$i32,%eax %0x30
  1122. push___%eax
  1123. mov____0x8(%ebp),%eax !0x-14
  1124. mov____%eax,%edx
  1125. push___%eax
  1126. mov____0x8(%ebp),%eax !0x-18
  1127. mov____%eax,%edx
  1128. pop____%eax
  1129. add____%edx,%eax
  1130. mov____%eax,%edx
  1131. pop____%eax
  1132. mov____%al,(%edx)
  1133. test___%eax,%eax
  1134. :_hexify_string_70_continue
  1135. mov____$i32,%eax %0x0
  1136. push___%eax
  1137. mov____0x8(%ebp),%eax !0x-14
  1138. mov____%eax,%edx
  1139. pop____%eax
  1140. sub____%edx,%eax
  1141. setl___%al
  1142. movzbl_%al,%eax
  1143. # jmp test LABEL
  1144. jge32 %_hexify_string_70_break
  1145. jmp32 %_hexify_string_70_loop
  1146. :_hexify_string_70_break
  1147. # while (i < 4096) ...
  1148. jmp32 %_hexify_string_101_continue
  1149. :_hexify_string_101_loop
  1150. # if (0 == p->Text[i + 1]) ...else ...
  1151. mov____$i32,%eax %0x0
  1152. push___%eax
  1153. mov____0x8(%ebp),%eax !0x-14
  1154. add____$i8,%eax !0x1
  1155. mov____%eax,%edx
  1156. push___%eax
  1157. mov____%ebp,%eax
  1158. add____$i8,%eax !0x8
  1159. mov____(%eax),%eax
  1160. add____$i8,%eax !0x8
  1161. # p->Text
  1162. mov____(%eax),%eax
  1163. mov____%eax,%edx
  1164. pop____%eax
  1165. add____%edx,%eax
  1166. movzbl_(%eax),%eax
  1167. mov____%eax,%edx
  1168. pop____%eax
  1169. sub____%edx,%eax
  1170. sete___%al
  1171. movzbl_%al,%eax
  1172. # jmp test LABEL
  1173. jne32 %_hexify_string_104_else
  1174. # i = 4096
  1175. mov____$i32,%eax %0x1000
  1176. mov____%eax,0x8(%ebp) !0x-14
  1177. test___%eax,%eax
  1178. jmp32 %_hexify_string_104_break
  1179. :_hexify_string_104_else
  1180. # d[2*i] = table[p->Text[i + 1]/16]
  1181. mov____0x8(%ebp),%eax !0x-14
  1182. add____$i8,%eax !0x1
  1183. mov____%eax,%edx
  1184. push___%eax
  1185. mov____%ebp,%eax
  1186. add____$i8,%eax !0x8
  1187. mov____(%eax),%eax
  1188. add____$i8,%eax !0x8
  1189. # p->Text
  1190. mov____(%eax),%eax
  1191. mov____%eax,%edx
  1192. pop____%eax
  1193. add____%edx,%eax
  1194. movzbl_(%eax),%eax
  1195. push___%eax
  1196. mov____$i32,%eax %0x10
  1197. mov____%eax,%edx
  1198. pop____%eax
  1199. mov____%edx,%ebx
  1200. xor____%edx,%edx
  1201. idiv___%ebx
  1202. mov____%eax,%edx
  1203. push___%eax
  1204. mov____%ebp,%eax
  1205. add____$i8,%eax !0x-10
  1206. mov____%eax,%edx
  1207. pop____%eax
  1208. add____%edx,%eax
  1209. movzbl_(%eax),%eax
  1210. push___%eax
  1211. mov____$i32,%eax %0x2
  1212. push___%eax
  1213. mov____0x8(%ebp),%eax !0x-14
  1214. mov____%eax,%edx
  1215. pop____%eax
  1216. mul____%edx
  1217. mov____%eax,%edx
  1218. push___%eax
  1219. mov____0x8(%ebp),%eax !0x-18
  1220. mov____%eax,%edx
  1221. pop____%eax
  1222. add____%edx,%eax
  1223. mov____%eax,%edx
  1224. pop____%eax
  1225. mov____%al,(%edx)
  1226. test___%eax,%eax
  1227. # d[2*i + 1] = table[p->Text[i + 1]%16]
  1228. mov____0x8(%ebp),%eax !0x-14
  1229. add____$i8,%eax !0x1
  1230. mov____%eax,%edx
  1231. push___%eax
  1232. mov____%ebp,%eax
  1233. add____$i8,%eax !0x8
  1234. mov____(%eax),%eax
  1235. add____$i8,%eax !0x8
  1236. # p->Text
  1237. mov____(%eax),%eax
  1238. mov____%eax,%edx
  1239. pop____%eax
  1240. add____%edx,%eax
  1241. movzbl_(%eax),%eax
  1242. push___%eax
  1243. mov____$i32,%eax %0x10
  1244. mov____%eax,%edx
  1245. pop____%eax
  1246. mov____%edx,%ebx
  1247. xor____%edx,%edx
  1248. idiv___%ebx
  1249. mov____%edx,%eax
  1250. mov____%eax,%edx
  1251. push___%eax
  1252. mov____%ebp,%eax
  1253. add____$i8,%eax !0x-10
  1254. mov____%eax,%edx
  1255. pop____%eax
  1256. add____%edx,%eax
  1257. movzbl_(%eax),%eax
  1258. push___%eax
  1259. mov____$i32,%eax %0x2
  1260. push___%eax
  1261. mov____0x8(%ebp),%eax !0x-14
  1262. mov____%eax,%edx
  1263. pop____%eax
  1264. mul____%edx
  1265. add____$i8,%eax !0x1
  1266. mov____%eax,%edx
  1267. push___%eax
  1268. mov____0x8(%ebp),%eax !0x-18
  1269. mov____%eax,%edx
  1270. pop____%eax
  1271. add____%edx,%eax
  1272. mov____%eax,%edx
  1273. pop____%eax
  1274. mov____%al,(%edx)
  1275. test___%eax,%eax
  1276. # i = i + 1
  1277. mov____0x8(%ebp),%eax !0x-14
  1278. add____$i8,%eax !0x1
  1279. mov____%eax,0x8(%ebp) !0x-14
  1280. test___%eax,%eax
  1281. :_hexify_string_104_break
  1282. :_hexify_string_101_continue
  1283. mov____0x8(%ebp),%eax !0x-14
  1284. push___%eax
  1285. mov____$i32,%eax %0x1000
  1286. mov____%eax,%edx
  1287. pop____%eax
  1288. sub____%edx,%eax
  1289. setl___%al
  1290. movzbl_%al,%eax
  1291. # jmp test LABEL
  1292. jge32 %_hexify_string_101_break
  1293. jmp32 %_hexify_string_101_loop
  1294. :_hexify_string_101_break
  1295. leave
  1296. ret
  1297. :process_string
  1298. push___%ebp
  1299. mov____%esp,%ebp
  1300. sub____%esp,$i32 %0x1054
  1301. # for (struct Token *i = p; 0 != i; i = i->next) ...
  1302. # struct Token *i = p;
  1303. mov____0x8(%ebp),%eax !0x8
  1304. mov____%eax,0x8(%ebp) !0x-4
  1305. jmp32 %_process_string_1_initial_skip
  1306. :_process_string_1_loop
  1307. # if (i->type & 2) ...
  1308. mov____%ebp,%eax
  1309. add____$i8,%eax !0x-4
  1310. mov____(%eax),%eax
  1311. add____$i8,%eax !0x4
  1312. # i->type
  1313. mov____(%eax),%eax
  1314. push___%eax
  1315. mov____$i32,%eax %0x2
  1316. mov____%eax,%edx
  1317. pop____%eax
  1318. and____%edx,%eax
  1319. test___%eax,%eax
  1320. # jmp test LABEL
  1321. test___%eax,%eax
  1322. je32 %_process_string_7_break
  1323. # if (''' == i->Text[0]) ...else ...
  1324. mov____$i32,%eax %0x27
  1325. push___%eax
  1326. mov____$i32,%eax %0x0
  1327. mov____%eax,%edx
  1328. push___%eax
  1329. mov____%ebp,%eax
  1330. add____$i8,%eax !0x-4
  1331. mov____(%eax),%eax
  1332. add____$i8,%eax !0x8
  1333. # i->Text
  1334. mov____(%eax),%eax
  1335. mov____%eax,%edx
  1336. pop____%eax
  1337. add____%edx,%eax
  1338. movzbl_(%eax),%eax
  1339. mov____%eax,%edx
  1340. pop____%eax
  1341. sub____%edx,%eax
  1342. sete___%al
  1343. movzbl_%al,%eax
  1344. # jmp test LABEL
  1345. jne32 %_process_string_21_else
  1346. # i->Expression = i->Text + 1
  1347. mov____%ebp,%eax
  1348. add____$i8,%eax !0x-4
  1349. mov____(%eax),%eax
  1350. add____$i8,%eax !0x8
  1351. # i->Text
  1352. mov____(%eax),%eax
  1353. add____$i8,%eax !0x1
  1354. push___%eax
  1355. mov____%ebp,%eax
  1356. add____$i8,%eax !0x-4
  1357. mov____(%eax),%eax
  1358. add____$i8,%eax !0xc
  1359. mov____%eax,%edx
  1360. pop____%eax
  1361. mov____%eax,(%edx)
  1362. test___%eax,%eax
  1363. jmp32 %_process_string_21_break
  1364. :_process_string_21_else
  1365. # if ('"' == i->Text[0]) ...
  1366. mov____$i32,%eax %0x22
  1367. push___%eax
  1368. mov____$i32,%eax %0x0
  1369. mov____%eax,%edx
  1370. push___%eax
  1371. mov____%ebp,%eax
  1372. add____$i8,%eax !0x-4
  1373. mov____(%eax),%eax
  1374. add____$i8,%eax !0x8
  1375. # i->Text
  1376. mov____(%eax),%eax
  1377. mov____%eax,%edx
  1378. pop____%eax
  1379. add____%edx,%eax
  1380. movzbl_(%eax),%eax
  1381. mov____%eax,%edx
  1382. pop____%eax
  1383. sub____%edx,%eax
  1384. sete___%al
  1385. movzbl_%al,%eax
  1386. # jmp test LABEL
  1387. jne32 %_process_string_56_break
  1388. # hexify_string(i);
  1389. push___0x8(%ebp) !0x-4
  1390. call32 %hexify_string
  1391. add____$i8,%esp !0x4
  1392. test___%eax,%eax
  1393. jmp32 %_process_string_56_break
  1394. :_process_string_56_break
  1395. :_process_string_21_break
  1396. jmp32 %_process_string_7_break
  1397. :_process_string_7_break
  1398. :_process_string_1_continue
  1399. # i = i->next
  1400. mov____%ebp,%eax
  1401. add____$i8,%eax !0x-4
  1402. mov____(%eax),%eax
  1403. add____$i8,%eax !0x0
  1404. # i->next
  1405. mov____(%eax),%eax
  1406. mov____%eax,0x8(%ebp) !0x-4
  1407. :_process_string_1_initial_skip
  1408. mov____$i32,%eax %0x0
  1409. push___%eax
  1410. mov____0x8(%ebp),%eax !0x-4
  1411. mov____%eax,%edx
  1412. pop____%eax
  1413. push___%eax
  1414. sub____%edx,%eax
  1415. setne__%al
  1416. movzbl_%al,%eax
  1417. xchg___%eax,(%esp)
  1418. sub____%edx,%eax
  1419. lahf
  1420. xor____$i8,%ah !0x40
  1421. sahf
  1422. pop____%eax
  1423. # jmp test LABEL
  1424. jne32 %_process_string_1_break
  1425. jmp32 %_process_string_1_loop
  1426. :_process_string_1_break
  1427. leave
  1428. ret
  1429. :preserve_other
  1430. push___%ebp
  1431. mov____%esp,%ebp
  1432. sub____%esp,$i32 %0x1054
  1433. # for (struct Token *i = p; 0 != i; i = i->next) ...
  1434. # struct Token *i = p;
  1435. mov____0x8(%ebp),%eax !0x8
  1436. mov____%eax,0x8(%ebp) !0x-4
  1437. jmp32 %_preserve_other_1_initial_skip
  1438. :_preserve_other_1_loop
  1439. # if (0 == i->Expression && !(i->type & 1)) ...
  1440. mov____$i32,%eax %0x0
  1441. push___%eax
  1442. mov____%ebp,%eax
  1443. add____$i8,%eax !0x-4
  1444. mov____(%eax),%eax
  1445. add____$i8,%eax !0xc
  1446. # i->Expression
  1447. mov____(%eax),%eax
  1448. mov____%eax,%edx
  1449. pop____%eax
  1450. sub____%edx,%eax
  1451. sete___%al
  1452. movzbl_%al,%eax
  1453. # jmp test LABEL
  1454. jne32 %_preserve_other_7_break
  1455. mov____%ebp,%eax
  1456. add____$i8,%eax !0x-4
  1457. mov____(%eax),%eax
  1458. add____$i8,%eax !0x4
  1459. # i->type
  1460. mov____(%eax),%eax
  1461. push___%eax
  1462. mov____$i32,%eax %0x1
  1463. mov____%eax,%edx
  1464. pop____%eax
  1465. and____%edx,%eax
  1466. test___%eax,%eax
  1467. sete___%al
  1468. movzbl_%al,%eax
  1469. test___%eax,%eax
  1470. # jmp test LABEL
  1471. je32 %_preserve_other_7_break
  1472. # i->Expression = i->Text
  1473. mov____%ebp,%eax
  1474. add____$i8,%eax !0x-4
  1475. mov____(%eax),%eax
  1476. add____$i8,%eax !0x8
  1477. # i->Text
  1478. mov____(%eax),%eax
  1479. push___%eax
  1480. mov____%ebp,%eax
  1481. add____$i8,%eax !0x-4
  1482. mov____(%eax),%eax
  1483. add____$i8,%eax !0xc
  1484. mov____%eax,%edx
  1485. pop____%eax
  1486. mov____%eax,(%edx)
  1487. test___%eax,%eax
  1488. jmp32 %_preserve_other_7_break
  1489. :_preserve_other_7_break
  1490. :_preserve_other_1_continue
  1491. # i = i->next
  1492. mov____%ebp,%eax
  1493. add____$i8,%eax !0x-4
  1494. mov____(%eax),%eax
  1495. add____$i8,%eax !0x0
  1496. # i->next
  1497. mov____(%eax),%eax
  1498. mov____%eax,0x8(%ebp) !0x-4
  1499. :_preserve_other_1_initial_skip
  1500. mov____$i32,%eax %0x0
  1501. push___%eax
  1502. mov____0x8(%ebp),%eax !0x-4
  1503. mov____%eax,%edx
  1504. pop____%eax
  1505. push___%eax
  1506. sub____%edx,%eax
  1507. setne__%al
  1508. movzbl_%al,%eax
  1509. xchg___%eax,(%esp)
  1510. sub____%edx,%eax
  1511. lahf
  1512. xor____$i8,%ah !0x40
  1513. sahf
  1514. pop____%eax
  1515. # jmp test LABEL
  1516. jne32 %_preserve_other_1_break
  1517. jmp32 %_preserve_other_1_loop
  1518. :_preserve_other_1_break
  1519. leave
  1520. ret
  1521. :range_check
  1522. push___%ebp
  1523. mov____%esp,%ebp
  1524. sub____%esp,$i32 %0x1054
  1525. # switch (number_of_bytes) { ...}
  1526. mov____0x8(%ebp),%eax !0xc
  1527. :_range_check_1_clause0
  1528. cmp____$i8,%eax !0x4
  1529. je32 %_range_check_1_body0
  1530. jmp32 %_range_check_1_clause1
  1531. :_range_check_1_body0
  1532. jmp32 %_range_check_1_break
  1533. jmp32 %_range_check_1_body1
  1534. :_range_check_1_clause1
  1535. cmp____$i8,%eax !0x3
  1536. je32 %_range_check_1_body1
  1537. jmp32 %_range_check_1_clause2
  1538. :_range_check_1_body1
  1539. # if (16777216 < displacement || displacement < -8388608) ...
  1540. mov____$i32,%eax %0x1000000
  1541. push___%eax
  1542. mov____0x8(%ebp),%eax !0x8
  1543. mov____%eax,%edx
  1544. pop____%eax
  1545. sub____%edx,%eax
  1546. setl___%al
  1547. movzbl_%al,%eax
  1548. # jmp test LABEL
  1549. jge32 %_range_check_15_break_b_16
  1550. jmp32 %_range_check_15_break_skip_b_16
  1551. :_range_check_15_break_b_16
  1552. mov____0x8(%ebp),%eax !0x8
  1553. push___%eax
  1554. push___%eax
  1555. mov____$i32,%eax %0x800000
  1556. mov____%eax,%edx
  1557. pop____%eax
  1558. mov____$i32,%eax %0x0
  1559. sub____%edx,%eax
  1560. mov____%eax,%edx
  1561. pop____%eax
  1562. sub____%edx,%eax
  1563. setl___%al
  1564. movzbl_%al,%eax
  1565. # jmp test LABEL
  1566. jge32 %_range_check_15_break
  1567. :_range_check_15_break_skip_b_16
  1568. # fprintf(2, "A displacement of %d does not fit in 3 bytes", displacement);
  1569. push___0x8(%ebp) !0x8
  1570. push___$i32 &string_open_5
  1571. mov____$i32,%eax %0x2
  1572. push___%eax
  1573. call32 %fprintf
  1574. add____$i8,%esp !0xc
  1575. test___%eax,%eax
  1576. # exit(1);
  1577. mov____$i32,%eax %0x1
  1578. push___%eax
  1579. call32 %exit
  1580. add____$i8,%esp !0x4
  1581. test___%eax,%eax
  1582. jmp32 %_range_check_15_break
  1583. :_range_check_15_break
  1584. jmp32 %_range_check_1_break
  1585. jmp32 %_range_check_1_body2
  1586. :_range_check_1_clause2
  1587. cmp____$i8,%eax !0x2
  1588. je32 %_range_check_1_body2
  1589. jmp32 %_range_check_1_clause3
  1590. :_range_check_1_body2
  1591. # if (65535 < displacement || displacement < -32768) ...
  1592. mov____$i32,%eax %0xffff
  1593. push___%eax
  1594. mov____0x8(%ebp),%eax !0x8
  1595. mov____%eax,%edx
  1596. pop____%eax
  1597. sub____%edx,%eax
  1598. setl___%al
  1599. movzbl_%al,%eax
  1600. # jmp test LABEL
  1601. jge32 %_range_check_58_break_b_59
  1602. jmp32 %_range_check_58_break_skip_b_59
  1603. :_range_check_58_break_b_59
  1604. mov____0x8(%ebp),%eax !0x8
  1605. push___%eax
  1606. push___%eax
  1607. mov____$i32,%eax %0x8000
  1608. mov____%eax,%edx
  1609. pop____%eax
  1610. mov____$i32,%eax %0x0
  1611. sub____%edx,%eax
  1612. mov____%eax,%edx
  1613. pop____%eax
  1614. sub____%edx,%eax
  1615. setl___%al
  1616. movzbl_%al,%eax
  1617. # jmp test LABEL
  1618. jge32 %_range_check_58_break
  1619. :_range_check_58_break_skip_b_59
  1620. # fprintf(2, "A displacement of %d does not fit in 2 bytes", displacement);
  1621. push___0x8(%ebp) !0x8
  1622. push___$i32 &string_open_6
  1623. mov____$i32,%eax %0x2
  1624. push___%eax
  1625. call32 %fprintf
  1626. add____$i8,%esp !0xc
  1627. test___%eax,%eax
  1628. # exit(1);
  1629. mov____$i32,%eax %0x1
  1630. push___%eax
  1631. call32 %exit
  1632. add____$i8,%esp !0x4
  1633. test___%eax,%eax
  1634. jmp32 %_range_check_58_break
  1635. :_range_check_58_break
  1636. jmp32 %_range_check_1_break
  1637. jmp32 %_range_check_1_body3
  1638. :_range_check_1_clause3
  1639. cmp____$i8,%eax !0x1
  1640. je32 %_range_check_1_body3
  1641. jmp32 %_range_check_1_clause4
  1642. :_range_check_1_body3
  1643. # if (255 < displacement || displacement < -128) ...
  1644. mov____$i32,%eax %0xff
  1645. push___%eax
  1646. mov____0x8(%ebp),%eax !0x8
  1647. mov____%eax,%edx
  1648. pop____%eax
  1649. sub____%edx,%eax
  1650. setl___%al
  1651. movzbl_%al,%eax
  1652. # jmp test LABEL
  1653. jge32 %_range_check_101_break_b_102
  1654. jmp32 %_range_check_101_break_skip_b_102
  1655. :_range_check_101_break_b_102
  1656. mov____0x8(%ebp),%eax !0x8
  1657. push___%eax
  1658. push___%eax
  1659. mov____$i32,%eax %0x80
  1660. mov____%eax,%edx
  1661. pop____%eax
  1662. mov____$i32,%eax %0x0
  1663. sub____%edx,%eax
  1664. mov____%eax,%edx
  1665. pop____%eax
  1666. sub____%edx,%eax
  1667. setl___%al
  1668. movzbl_%al,%eax
  1669. # jmp test LABEL
  1670. jge32 %_range_check_101_break
  1671. :_range_check_101_break_skip_b_102
  1672. # fprintf(2, "A displacement of %d does not fit in 1 byte", displacement);
  1673. push___0x8(%ebp) !0x8
  1674. push___$i32 &string_open_7
  1675. mov____$i32,%eax %0x2
  1676. push___%eax
  1677. call32 %fprintf
  1678. add____$i8,%esp !0xc
  1679. test___%eax,%eax
  1680. # exit(1);
  1681. mov____$i32,%eax %0x1
  1682. push___%eax
  1683. call32 %exit
  1684. add____$i8,%esp !0x4
  1685. test___%eax,%eax
  1686. jmp32 %_range_check_101_break
  1687. :_range_check_101_break
  1688. jmp32 %_range_check_1_break
  1689. jmp32 %_range_check_1_body4
  1690. :_range_check_1_clause4
  1691. :_range_check_1_body4
  1692. # exit(1);
  1693. mov____$i32,%eax %0x1
  1694. push___%eax
  1695. call32 %exit
  1696. add____$i8,%esp !0x4
  1697. test___%eax,%eax
  1698. :_range_check_1_break
  1699. leave
  1700. ret
  1701. :hex
  1702. push___%ebp
  1703. mov____%esp,%ebp
  1704. sub____%esp,$i32 %0x1054
  1705. # if (c >= '0' && c <= '9') ...else ...
  1706. mov____0x8(%ebp),%eax !0x8
  1707. push___%eax
  1708. mov____$i32,%eax %0x30
  1709. mov____%eax,%edx
  1710. pop____%eax
  1711. sub____%edx,%eax
  1712. setge__%al
  1713. movzbl_%al,%eax
  1714. # jmp test LABEL
  1715. jl32 %_hex_1_else
  1716. mov____0x8(%ebp),%eax !0x8
  1717. push___%eax
  1718. mov____$i32,%eax %0x39
  1719. mov____%eax,%edx
  1720. pop____%eax
  1721. sub____%edx,%eax
  1722. setle__%al
  1723. movzbl_%al,%eax
  1724. # jmp test LABEL
  1725. jg32 %_hex_1_else
  1726. mov____0x8(%ebp),%eax !0x8
  1727. add____$i8,%eax !0x-30
  1728. leave
  1729. ret
  1730. jmp32 %_hex_1_break
  1731. :_hex_1_else
  1732. # if (c >= 'a' && c <= 'f') ...else ...
  1733. mov____0x8(%ebp),%eax !0x8
  1734. push___%eax
  1735. mov____$i32,%eax %0x61
  1736. mov____%eax,%edx
  1737. pop____%eax
  1738. sub____%edx,%eax
  1739. setge__%al
  1740. movzbl_%al,%eax
  1741. # jmp test LABEL
  1742. jl32 %_hex_21_else
  1743. mov____0x8(%ebp),%eax !0x8
  1744. push___%eax
  1745. mov____$i32,%eax %0x66
  1746. mov____%eax,%edx
  1747. pop____%eax
  1748. sub____%edx,%eax
  1749. setle__%al
  1750. movzbl_%al,%eax
  1751. # jmp test LABEL
  1752. jg32 %_hex_21_else
  1753. mov____0x8(%ebp),%eax !0x8
  1754. add____$i8,%eax !0x-57
  1755. leave
  1756. ret
  1757. jmp32 %_hex_21_break
  1758. :_hex_21_else
  1759. # if (c >= 'A' && c <= 'F') ...else ...
  1760. mov____0x8(%ebp),%eax !0x8
  1761. push___%eax
  1762. mov____$i32,%eax %0x41
  1763. mov____%eax,%edx
  1764. pop____%eax
  1765. sub____%edx,%eax
  1766. setge__%al
  1767. movzbl_%al,%eax
  1768. # jmp test LABEL
  1769. jl32 %_hex_41_else
  1770. mov____0x8(%ebp),%eax !0x8
  1771. push___%eax
  1772. mov____$i32,%eax %0x46
  1773. mov____%eax,%edx
  1774. pop____%eax
  1775. sub____%edx,%eax
  1776. setle__%al
  1777. movzbl_%al,%eax
  1778. # jmp test LABEL
  1779. jg32 %_hex_41_else
  1780. mov____0x8(%ebp),%eax !0x8
  1781. add____$i8,%eax !0x-37
  1782. leave
  1783. ret
  1784. jmp32 %_hex_41_break
  1785. :_hex_41_else
  1786. push___%eax
  1787. mov____$i32,%eax %0x1
  1788. mov____%eax,%edx
  1789. pop____%eax
  1790. mov____$i32,%eax %0x0
  1791. sub____%edx,%eax
  1792. leave
  1793. ret
  1794. :_hex_41_break
  1795. :_hex_21_break
  1796. :_hex_1_break
  1797. leave
  1798. ret
  1799. :decimal
  1800. push___%ebp
  1801. mov____%esp,%ebp
  1802. sub____%esp,$i32 %0x1054
  1803. # if (c >= '0' && c <= '9') ...else ...
  1804. mov____0x8(%ebp),%eax !0x8
  1805. push___%eax
  1806. mov____$i32,%eax %0x30
  1807. mov____%eax,%edx
  1808. pop____%eax
  1809. sub____%edx,%eax
  1810. setge__%al
  1811. movzbl_%al,%eax
  1812. # jmp test LABEL
  1813. jl32 %_decimal_1_else
  1814. mov____0x8(%ebp),%eax !0x8
  1815. push___%eax
  1816. mov____$i32,%eax %0x39
  1817. mov____%eax,%edx
  1818. pop____%eax
  1819. sub____%edx,%eax
  1820. setle__%al
  1821. movzbl_%al,%eax
  1822. # jmp test LABEL
  1823. jg32 %_decimal_1_else
  1824. mov____0x8(%ebp),%eax !0x8
  1825. add____$i8,%eax !0x-30
  1826. leave
  1827. ret
  1828. jmp32 %_decimal_1_break
  1829. :_decimal_1_else
  1830. push___%eax
  1831. mov____$i32,%eax %0x1
  1832. mov____%eax,%edx
  1833. pop____%eax
  1834. mov____$i32,%eax %0x0
  1835. sub____%edx,%eax
  1836. leave
  1837. ret
  1838. :_decimal_1_break
  1839. leave
  1840. ret
  1841. :numerate_string
  1842. push___%ebp
  1843. mov____%esp,%ebp
  1844. sub____%esp,$i32 %0x1054
  1845. # int count = 0;
  1846. mov____$i32,%eax %0x0
  1847. mov____%eax,0x8(%ebp) !0x-4
  1848. # int index;
  1849. # int negative;
  1850. # if (0 == a[0]) ...else ...
  1851. mov____$i32,%eax %0x0
  1852. push___%eax
  1853. mov____$i32,%eax %0x0
  1854. mov____%eax,%edx
  1855. push___%eax
  1856. mov____0x8(%ebp),%eax !0x8
  1857. mov____%eax,%edx
  1858. pop____%eax
  1859. add____%edx,%eax
  1860. movzbl_(%eax),%eax
  1861. mov____%eax,%edx
  1862. pop____%eax
  1863. sub____%edx,%eax
  1864. sete___%al
  1865. movzbl_%al,%eax
  1866. # jmp test LABEL
  1867. jne32 %_numerate_string_6_else
  1868. mov____$i32,%eax %0x0
  1869. leave
  1870. ret
  1871. jmp32 %_numerate_string_6_break
  1872. :_numerate_string_6_else
  1873. # if (a[0] == '0' && a[1] == 'x') ...else ...
  1874. mov____$i32,%eax %0x0
  1875. mov____%eax,%edx
  1876. push___%eax
  1877. mov____0x8(%ebp),%eax !0x8
  1878. mov____%eax,%edx
  1879. pop____%eax
  1880. add____%edx,%eax
  1881. movzbl_(%eax),%eax
  1882. push___%eax
  1883. mov____$i32,%eax %0x30
  1884. mov____%eax,%edx
  1885. pop____%eax
  1886. sub____%edx,%eax
  1887. sete___%al
  1888. movzbl_%al,%eax
  1889. # jmp test LABEL
  1890. jne32 %_numerate_string_24_else
  1891. mov____$i32,%eax %0x1
  1892. mov____%eax,%edx
  1893. push___%eax
  1894. mov____0x8(%ebp),%eax !0x8
  1895. mov____%eax,%edx
  1896. pop____%eax
  1897. add____%edx,%eax
  1898. movzbl_(%eax),%eax
  1899. push___%eax
  1900. mov____$i32,%eax %0x78
  1901. mov____%eax,%edx
  1902. pop____%eax
  1903. sub____%edx,%eax
  1904. sete___%al
  1905. movzbl_%al,%eax
  1906. # jmp test LABEL
  1907. jne32 %_numerate_string_24_else
  1908. # if ('-' == a[2]) ...else ...
  1909. mov____$i32,%eax %0x2d
  1910. push___%eax
  1911. mov____$i32,%eax %0x2
  1912. mov____%eax,%edx
  1913. push___%eax
  1914. mov____0x8(%ebp),%eax !0x8
  1915. mov____%eax,%edx
  1916. pop____%eax
  1917. add____%edx,%eax
  1918. movzbl_(%eax),%eax
  1919. mov____%eax,%edx
  1920. pop____%eax
  1921. sub____%edx,%eax
  1922. sete___%al
  1923. movzbl_%al,%eax
  1924. # jmp test LABEL
  1925. jne32 %_numerate_string_51_else
  1926. # negative = 1
  1927. mov____$i32,%eax %0x1
  1928. mov____%eax,0x8(%ebp) !0x-c
  1929. test___%eax,%eax
  1930. # index = 3
  1931. mov____$i32,%eax %0x3
  1932. mov____%eax,0x8(%ebp) !0x-8
  1933. test___%eax,%eax
  1934. jmp32 %_numerate_string_51_break
  1935. :_numerate_string_51_else
  1936. # negative = 0
  1937. mov____$i32,%eax %0x0
  1938. mov____%eax,0x8(%ebp) !0x-c
  1939. test___%eax,%eax
  1940. # index = 2
  1941. mov____$i32,%eax %0x2
  1942. mov____%eax,0x8(%ebp) !0x-8
  1943. test___%eax,%eax
  1944. :_numerate_string_51_break
  1945. # while (0 != a[index]) ...
  1946. jmp32 %_numerate_string_84_continue
  1947. :_numerate_string_84_loop
  1948. # if (-1 == hex(a[index])) ...
  1949. push___%eax
  1950. mov____$i32,%eax %0x1
  1951. mov____%eax,%edx
  1952. pop____%eax
  1953. mov____$i32,%eax %0x0
  1954. sub____%edx,%eax
  1955. push___%eax
  1956. mov____0x8(%ebp),%eax !0x-8
  1957. mov____%eax,%edx
  1958. push___%eax
  1959. mov____0x8(%ebp),%eax !0x8
  1960. mov____%eax,%edx
  1961. pop____%eax
  1962. add____%edx,%eax
  1963. movzbl_(%eax),%eax
  1964. push___%eax
  1965. call32 %hex
  1966. add____$i8,%esp !0x4
  1967. mov____%eax,%edx
  1968. pop____%eax
  1969. sub____%edx,%eax
  1970. sete___%al
  1971. movzbl_%al,%eax
  1972. # jmp test LABEL
  1973. jne32 %_numerate_string_87_break
  1974. mov____$i32,%eax %0x0
  1975. leave
  1976. ret
  1977. jmp32 %_numerate_string_87_break
  1978. :_numerate_string_87_break
  1979. # count = 16*count + hex(a[index])
  1980. mov____$i32,%eax %0x10
  1981. push___%eax
  1982. mov____0x8(%ebp),%eax !0x-4
  1983. mov____%eax,%edx
  1984. pop____%eax
  1985. mul____%edx
  1986. push___%eax
  1987. mov____0x8(%ebp),%eax !0x-8
  1988. mov____%eax,%edx
  1989. push___%eax
  1990. mov____0x8(%ebp),%eax !0x8
  1991. mov____%eax,%edx
  1992. pop____%eax
  1993. add____%edx,%eax
  1994. movzbl_(%eax),%eax
  1995. push___%eax
  1996. call32 %hex
  1997. add____$i8,%esp !0x4
  1998. mov____%eax,%edx
  1999. pop____%eax
  2000. add____%edx,%eax
  2001. mov____%eax,0x8(%ebp) !0x-4
  2002. test___%eax,%eax
  2003. # index = index + 1
  2004. mov____0x8(%ebp),%eax !0x-8
  2005. add____$i8,%eax !0x1
  2006. mov____%eax,0x8(%ebp) !0x-8
  2007. test___%eax,%eax
  2008. :_numerate_string_84_continue
  2009. mov____$i32,%eax %0x0
  2010. push___%eax
  2011. mov____0x8(%ebp),%eax !0x-8
  2012. mov____%eax,%edx
  2013. push___%eax
  2014. mov____0x8(%ebp),%eax !0x8
  2015. mov____%eax,%edx
  2016. pop____%eax
  2017. add____%edx,%eax
  2018. movzbl_(%eax),%eax
  2019. mov____%eax,%edx
  2020. pop____%eax
  2021. push___%eax
  2022. sub____%edx,%eax
  2023. setne__%al
  2024. movzbl_%al,%eax
  2025. xchg___%eax,(%esp)
  2026. sub____%edx,%eax
  2027. lahf
  2028. xor____$i8,%ah !0x40
  2029. sahf
  2030. pop____%eax
  2031. # jmp test LABEL
  2032. jne32 %_numerate_string_84_break
  2033. jmp32 %_numerate_string_84_loop
  2034. :_numerate_string_84_break
  2035. jmp32 %_numerate_string_24_break
  2036. :_numerate_string_24_else
  2037. # if ('-' == a[0]) ...else ...
  2038. mov____$i32,%eax %0x2d
  2039. push___%eax
  2040. mov____$i32,%eax %0x0
  2041. mov____%eax,%edx
  2042. push___%eax
  2043. mov____0x8(%ebp),%eax !0x8
  2044. mov____%eax,%edx
  2045. pop____%eax
  2046. add____%edx,%eax
  2047. movzbl_(%eax),%eax
  2048. mov____%eax,%edx
  2049. pop____%eax
  2050. sub____%edx,%eax
  2051. sete___%al
  2052. movzbl_%al,%eax
  2053. # jmp test LABEL
  2054. jne32 %_numerate_string_154_else
  2055. # negative = 1
  2056. mov____$i32,%eax %0x1
  2057. mov____%eax,0x8(%ebp) !0x-c
  2058. test___%eax,%eax
  2059. # index = 1
  2060. mov____$i32,%eax %0x1
  2061. mov____%eax,0x8(%ebp) !0x-8
  2062. test___%eax,%eax
  2063. jmp32 %_numerate_string_154_break
  2064. :_numerate_string_154_else
  2065. # negative = 0
  2066. mov____$i32,%eax %0x0
  2067. mov____%eax,0x8(%ebp) !0x-c
  2068. test___%eax,%eax
  2069. # index = 0
  2070. mov____$i32,%eax %0x0
  2071. mov____%eax,0x8(%ebp) !0x-8
  2072. test___%eax,%eax
  2073. :_numerate_string_154_break
  2074. # while (0 != a[index]) ...
  2075. jmp32 %_numerate_string_187_continue
  2076. :_numerate_string_187_loop
  2077. # if (-1 == decimal(a[index])) ...
  2078. push___%eax
  2079. mov____$i32,%eax %0x1
  2080. mov____%eax,%edx
  2081. pop____%eax
  2082. mov____$i32,%eax %0x0
  2083. sub____%edx,%eax
  2084. push___%eax
  2085. mov____0x8(%ebp),%eax !0x-8
  2086. mov____%eax,%edx
  2087. push___%eax
  2088. mov____0x8(%ebp),%eax !0x8
  2089. mov____%eax,%edx
  2090. pop____%eax
  2091. add____%edx,%eax
  2092. movzbl_(%eax),%eax
  2093. push___%eax
  2094. call32 %decimal
  2095. add____$i8,%esp !0x4
  2096. mov____%eax,%edx
  2097. pop____%eax
  2098. sub____%edx,%eax
  2099. sete___%al
  2100. movzbl_%al,%eax
  2101. # jmp test LABEL
  2102. jne32 %_numerate_string_190_break
  2103. mov____$i32,%eax %0x0
  2104. leave
  2105. ret
  2106. jmp32 %_numerate_string_190_break
  2107. :_numerate_string_190_break
  2108. # count = 10*count + decimal(a[index])
  2109. mov____$i32,%eax %0xa
  2110. push___%eax
  2111. mov____0x8(%ebp),%eax !0x-4
  2112. mov____%eax,%edx
  2113. pop____%eax
  2114. mul____%edx
  2115. push___%eax
  2116. mov____0x8(%ebp),%eax !0x-8
  2117. mov____%eax,%edx
  2118. push___%eax
  2119. mov____0x8(%ebp),%eax !0x8
  2120. mov____%eax,%edx
  2121. pop____%eax
  2122. add____%edx,%eax
  2123. movzbl_(%eax),%eax
  2124. push___%eax
  2125. call32 %decimal
  2126. add____$i8,%esp !0x4
  2127. mov____%eax,%edx
  2128. pop____%eax
  2129. add____%edx,%eax
  2130. mov____%eax,0x8(%ebp) !0x-4
  2131. test___%eax,%eax
  2132. # index = index + 1
  2133. mov____0x8(%ebp),%eax !0x-8
  2134. add____$i8,%eax !0x1
  2135. mov____%eax,0x8(%ebp) !0x-8
  2136. test___%eax,%eax
  2137. :_numerate_string_187_continue
  2138. mov____$i32,%eax %0x0
  2139. push___%eax
  2140. mov____0x8(%ebp),%eax !0x-8
  2141. mov____%eax,%edx
  2142. push___%eax
  2143. mov____0x8(%ebp),%eax !0x8
  2144. mov____%eax,%edx
  2145. pop____%eax
  2146. add____%edx,%eax
  2147. movzbl_(%eax),%eax
  2148. mov____%eax,%edx
  2149. pop____%eax
  2150. push___%eax
  2151. sub____%edx,%eax
  2152. setne__%al
  2153. movzbl_%al,%eax
  2154. xchg___%eax,(%esp)
  2155. sub____%edx,%eax
  2156. lahf
  2157. xor____$i8,%ah !0x40
  2158. sahf
  2159. pop____%eax
  2160. # jmp test LABEL
  2161. jne32 %_numerate_string_187_break
  2162. jmp32 %_numerate_string_187_loop
  2163. :_numerate_string_187_break
  2164. :_numerate_string_24_break
  2165. :_numerate_string_6_break
  2166. # if (negative) ...
  2167. mov____0x8(%ebp),%eax !0x-c
  2168. test___%eax,%eax
  2169. # jmp test LABEL
  2170. test___%eax,%eax
  2171. je32 %_numerate_string_257_break
  2172. # count = count*-1
  2173. mov____0x8(%ebp),%eax !0x-4
  2174. push___%eax
  2175. push___%eax
  2176. mov____$i32,%eax %0x1
  2177. mov____%eax,%edx
  2178. pop____%eax
  2179. mov____$i32,%eax %0x0
  2180. sub____%edx,%eax
  2181. mov____%eax,%edx
  2182. pop____%eax
  2183. mul____%edx
  2184. mov____%eax,0x8(%ebp) !0x-4
  2185. test___%eax,%eax
  2186. jmp32 %_numerate_string_257_break
  2187. :_numerate_string_257_break
  2188. mov____0x8(%ebp),%eax !0x-4
  2189. leave
  2190. ret
  2191. :LittleEndian
  2192. push___%ebp
  2193. mov____%esp,%ebp
  2194. sub____%esp,$i32 %0x1054
  2195. # char table[16] = {0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, };
  2196. mov____$i32,%eax %0x30
  2197. mov____%al,0x8(%ebp) !0x-10
  2198. mov____$i32,%eax %0x31
  2199. mov____%al,0x8(%ebp) !0x-f
  2200. mov____$i32,%eax %0x32
  2201. mov____%al,0x8(%ebp) !0x-e
  2202. mov____$i32,%eax %0x33
  2203. mov____%al,0x8(%ebp) !0x-d
  2204. mov____$i32,%eax %0x34
  2205. mov____%al,0x8(%ebp) !0x-c
  2206. mov____$i32,%eax %0x35
  2207. mov____%al,0x8(%ebp) !0x-b
  2208. mov____$i32,%eax %0x36
  2209. mov____%al,0x8(%ebp) !0x-a
  2210. mov____$i32,%eax %0x37
  2211. mov____%al,0x8(%ebp) !0x-9
  2212. mov____$i32,%eax %0x38
  2213. mov____%al,0x8(%ebp) !0x-8
  2214. mov____$i32,%eax %0x39
  2215. mov____%al,0x8(%ebp) !0x-7
  2216. mov____$i32,%eax %0x41
  2217. mov____%al,0x8(%ebp) !0x-6
  2218. mov____$i32,%eax %0x42
  2219. mov____%al,0x8(%ebp) !0x-5
  2220. mov____$i32,%eax %0x43
  2221. mov____%al,0x8(%ebp) !0x-4
  2222. mov____$i32,%eax %0x44
  2223. mov____%al,0x8(%ebp) !0x-3
  2224. mov____$i32,%eax %0x45
  2225. mov____%al,0x8(%ebp) !0x-2
  2226. mov____$i32,%eax %0x46
  2227. mov____%al,0x8(%ebp) !0x-1
  2228. # switch (Number_of_bytes) { ...}
  2229. mov____0x8(%ebp),%eax !0x10
  2230. :_LittleEndian_34_clause0
  2231. cmp____$i8,%eax !0x4
  2232. je32 %_LittleEndian_34_body0
  2233. jmp32 %_LittleEndian_34_clause1
  2234. :_LittleEndian_34_body0
  2235. # c[6] = table[value<<28]
  2236. mov____0x8(%ebp),%eax !0x8
  2237. push___%eax
  2238. mov____$i32,%eax %0x1c
  2239. mov____%eax,%edx
  2240. pop____%eax
  2241. xor____%ecx,%ecx
  2242. mov____%edx,%ecx
  2243. shr____%cl,%eax
  2244. mov____%eax,%edx
  2245. push___%eax
  2246. mov____%ebp,%eax
  2247. add____$i8,%eax !0x-10
  2248. mov____%eax,%edx
  2249. pop____%eax
  2250. add____%edx,%eax
  2251. movzbl_(%eax),%eax
  2252. push___%eax
  2253. mov____$i32,%eax %0x6
  2254. mov____%eax,%edx
  2255. push___%eax
  2256. mov____0x8(%ebp),%eax !0xc
  2257. mov____%eax,%edx
  2258. pop____%eax
  2259. add____%edx,%eax
  2260. mov____%eax,%edx
  2261. pop____%eax
  2262. mov____%al,(%edx)
  2263. test___%eax,%eax
  2264. # c[7] = table[(value<<24)%16]
  2265. mov____0x8(%ebp),%eax !0x8
  2266. push___%eax
  2267. mov____$i32,%eax %0x18
  2268. mov____%eax,%edx
  2269. pop____%eax
  2270. xor____%ecx,%ecx
  2271. mov____%edx,%ecx
  2272. shr____%cl,%eax
  2273. push___%eax
  2274. mov____$i32,%eax %0x10
  2275. mov____%eax,%edx
  2276. pop____%eax
  2277. mov____%edx,%ebx
  2278. xor____%edx,%edx
  2279. idiv___%ebx
  2280. mov____%edx,%eax
  2281. mov____%eax,%edx
  2282. push___%eax
  2283. mov____%ebp,%eax
  2284. add____$i8,%eax !0x-10
  2285. mov____%eax,%edx
  2286. pop____%eax
  2287. add____%edx,%eax
  2288. movzbl_(%eax),%eax
  2289. push___%eax
  2290. mov____$i32,%eax %0x7
  2291. mov____%eax,%edx
  2292. push___%eax
  2293. mov____0x8(%ebp),%eax !0xc
  2294. mov____%eax,%edx
  2295. pop____%eax
  2296. add____%edx,%eax
  2297. mov____%eax,%edx
  2298. pop____%eax
  2299. mov____%al,(%edx)
  2300. test___%eax,%eax
  2301. jmp32 %_LittleEndian_34_body1
  2302. :_LittleEndian_34_clause1
  2303. cmp____$i8,%eax !0x3
  2304. je32 %_LittleEndian_34_body1
  2305. jmp32 %_LittleEndian_34_clause2
  2306. :_LittleEndian_34_body1
  2307. # c[4] = table[(value<<20)%16]
  2308. mov____0x8(%ebp),%eax !0x8
  2309. push___%eax
  2310. mov____$i32,%eax %0x14
  2311. mov____%eax,%edx
  2312. pop____%eax
  2313. xor____%ecx,%ecx
  2314. mov____%edx,%ecx
  2315. shr____%cl,%eax
  2316. push___%eax
  2317. mov____$i32,%eax %0x10
  2318. mov____%eax,%edx
  2319. pop____%eax
  2320. mov____%edx,%ebx
  2321. xor____%edx,%edx
  2322. idiv___%ebx
  2323. mov____%edx,%eax
  2324. mov____%eax,%edx
  2325. push___%eax
  2326. mov____%ebp,%eax
  2327. add____$i8,%eax !0x-10
  2328. mov____%eax,%edx
  2329. pop____%eax
  2330. add____%edx,%eax
  2331. movzbl_(%eax),%eax
  2332. push___%eax
  2333. mov____$i32,%eax %0x4
  2334. mov____%eax,%edx
  2335. push___%eax
  2336. mov____0x8(%ebp),%eax !0xc
  2337. mov____%eax,%edx
  2338. pop____%eax
  2339. add____%edx,%eax
  2340. mov____%eax,%edx
  2341. pop____%eax
  2342. mov____%al,(%edx)
  2343. test___%eax,%eax
  2344. # c[5] = table[(value<<16)%16]
  2345. mov____0x8(%ebp),%eax !0x8
  2346. push___%eax
  2347. mov____$i32,%eax %0x10
  2348. mov____%eax,%edx
  2349. pop____%eax
  2350. xor____%ecx,%ecx
  2351. mov____%edx,%ecx
  2352. shr____%cl,%eax
  2353. push___%eax
  2354. mov____$i32,%eax %0x10
  2355. mov____%eax,%edx
  2356. pop____%eax
  2357. mov____%edx,%ebx
  2358. xor____%edx,%edx
  2359. idiv___%ebx
  2360. mov____%edx,%eax
  2361. mov____%eax,%edx
  2362. push___%eax
  2363. mov____%ebp,%eax
  2364. add____$i8,%eax !0x-10
  2365. mov____%eax,%edx
  2366. pop____%eax
  2367. add____%edx,%eax
  2368. movzbl_(%eax),%eax
  2369. push___%eax
  2370. mov____$i32,%eax %0x5
  2371. mov____%eax,%edx
  2372. push___%eax
  2373. mov____0x8(%ebp),%eax !0xc
  2374. mov____%eax,%edx
  2375. pop____%eax
  2376. add____%edx,%eax
  2377. mov____%eax,%edx
  2378. pop____%eax
  2379. mov____%al,(%edx)
  2380. test___%eax,%eax
  2381. jmp32 %_LittleEndian_34_body2
  2382. :_LittleEndian_34_clause2
  2383. cmp____$i8,%eax !0x2
  2384. je32 %_LittleEndian_34_body2
  2385. jmp32 %_LittleEndian_34_clause3
  2386. :_LittleEndian_34_body2
  2387. # c[2] = table[(value<<12)%16]
  2388. mov____0x8(%ebp),%eax !0x8
  2389. push___%eax
  2390. mov____$i32,%eax %0xc
  2391. mov____%eax,%edx
  2392. pop____%eax
  2393. xor____%ecx,%ecx
  2394. mov____%edx,%ecx
  2395. shr____%cl,%eax
  2396. push___%eax
  2397. mov____$i32,%eax %0x10
  2398. mov____%eax,%edx
  2399. pop____%eax
  2400. mov____%edx,%ebx
  2401. xor____%edx,%edx
  2402. idiv___%ebx
  2403. mov____%edx,%eax
  2404. mov____%eax,%edx
  2405. push___%eax
  2406. mov____%ebp,%eax
  2407. add____$i8,%eax !0x-10
  2408. mov____%eax,%edx
  2409. pop____%eax
  2410. add____%edx,%eax
  2411. movzbl_(%eax),%eax
  2412. push___%eax
  2413. mov____$i32,%eax %0x2
  2414. mov____%eax,%edx
  2415. push___%eax
  2416. mov____0x8(%ebp),%eax !0xc
  2417. mov____%eax,%edx
  2418. pop____%eax
  2419. add____%edx,%eax
  2420. mov____%eax,%edx
  2421. pop____%eax
  2422. mov____%al,(%edx)
  2423. test___%eax,%eax
  2424. # c[3] = table[(value<<8)%16]
  2425. mov____0x8(%ebp),%eax !0x8
  2426. push___%eax
  2427. mov____$i32,%eax %0x8
  2428. mov____%eax,%edx
  2429. pop____%eax
  2430. xor____%ecx,%ecx
  2431. mov____%edx,%ecx
  2432. shr____%cl,%eax
  2433. push___%eax
  2434. mov____$i32,%eax %0x10
  2435. mov____%eax,%edx
  2436. pop____%eax
  2437. mov____%edx,%ebx
  2438. xor____%edx,%edx
  2439. idiv___%ebx
  2440. mov____%edx,%eax
  2441. mov____%eax,%edx
  2442. push___%eax
  2443. mov____%ebp,%eax
  2444. add____$i8,%eax !0x-10
  2445. mov____%eax,%edx
  2446. pop____%eax
  2447. add____%edx,%eax
  2448. movzbl_(%eax),%eax
  2449. push___%eax
  2450. mov____$i32,%eax %0x3
  2451. mov____%eax,%edx
  2452. push___%eax
  2453. mov____0x8(%ebp),%eax !0xc
  2454. mov____%eax,%edx
  2455. pop____%eax
  2456. add____%edx,%eax
  2457. mov____%eax,%edx
  2458. pop____%eax
  2459. mov____%al,(%edx)
  2460. test___%eax,%eax
  2461. jmp32 %_LittleEndian_34_body3
  2462. :_LittleEndian_34_clause3
  2463. cmp____$i8,%eax !0x1
  2464. je32 %_LittleEndian_34_body3
  2465. jmp32 %_LittleEndian_34_clause4
  2466. :_LittleEndian_34_body3
  2467. # c[0] = table[(value<<4)%16]
  2468. mov____0x8(%ebp),%eax !0x8
  2469. push___%eax
  2470. mov____$i32,%eax %0x4
  2471. mov____%eax,%edx
  2472. pop____%eax
  2473. xor____%ecx,%ecx
  2474. mov____%edx,%ecx
  2475. shr____%cl,%eax
  2476. push___%eax
  2477. mov____$i32,%eax %0x10
  2478. mov____%eax,%edx
  2479. pop____%eax
  2480. mov____%edx,%ebx
  2481. xor____%edx,%edx
  2482. idiv___%ebx
  2483. mov____%edx,%eax
  2484. mov____%eax,%edx
  2485. push___%eax
  2486. mov____%ebp,%eax
  2487. add____$i8,%eax !0x-10
  2488. mov____%eax,%edx
  2489. pop____%eax
  2490. add____%edx,%eax
  2491. movzbl_(%eax),%eax
  2492. push___%eax
  2493. mov____$i32,%eax %0x0
  2494. mov____%eax,%edx
  2495. push___%eax
  2496. mov____0x8(%ebp),%eax !0xc
  2497. mov____%eax,%edx
  2498. pop____%eax
  2499. add____%edx,%eax
  2500. mov____%eax,%edx
  2501. pop____%eax
  2502. mov____%al,(%edx)
  2503. test___%eax,%eax
  2504. # c[1] = table[value%16]
  2505. mov____0x8(%ebp),%eax !0x8
  2506. push___%eax
  2507. mov____$i32,%eax %0x10
  2508. mov____%eax,%edx
  2509. pop____%eax
  2510. mov____%edx,%ebx
  2511. xor____%edx,%edx
  2512. idiv___%ebx
  2513. mov____%edx,%eax
  2514. mov____%eax,%edx
  2515. push___%eax
  2516. mov____%ebp,%eax
  2517. add____$i8,%eax !0x-10
  2518. mov____%eax,%edx
  2519. pop____%eax
  2520. add____%edx,%eax
  2521. movzbl_(%eax),%eax
  2522. push___%eax
  2523. mov____$i32,%eax %0x1
  2524. mov____%eax,%edx
  2525. push___%eax
  2526. mov____0x8(%ebp),%eax !0xc
  2527. mov____%eax,%edx
  2528. pop____%eax
  2529. add____%edx,%eax
  2530. mov____%eax,%edx
  2531. pop____%eax
  2532. mov____%al,(%edx)
  2533. test___%eax,%eax
  2534. jmp32 %_LittleEndian_34_break
  2535. jmp32 %_LittleEndian_34_body4
  2536. :_LittleEndian_34_clause4
  2537. :_LittleEndian_34_body4
  2538. # fprintf(2, "Received invalid number of bytes in LittleEndian %d\n", Number_of_bytes);
  2539. push___0x8(%ebp) !0x10
  2540. push___$i32 &string_open_8
  2541. mov____$i32,%eax %0x2
  2542. push___%eax
  2543. call32 %fprintf
  2544. add____$i8,%esp !0xc
  2545. test___%eax,%eax
  2546. # exit(1);
  2547. mov____$i32,%eax %0x1
  2548. push___%eax
  2549. call32 %exit
  2550. add____$i8,%esp !0x4
  2551. test___%eax,%eax
  2552. :_LittleEndian_34_break
  2553. mov____0x8(%ebp),%eax !0xc
  2554. leave
  2555. ret
  2556. :express_number
  2557. push___%ebp
  2558. mov____%esp,%ebp
  2559. sub____%esp,$i32 %0x1054
  2560. # char *ch;
  2561. # if ('!' == c) ...else ...
  2562. mov____$i32,%eax %0x21
  2563. push___%eax
  2564. movzbl_0x8(%ebp),%eax !0xc
  2565. mov____%eax,%edx
  2566. pop____%eax
  2567. sub____%edx,%eax
  2568. sete___%al
  2569. movzbl_%al,%eax
  2570. # jmp test LABEL
  2571. jne32 %_express_number_2_else
  2572. # range_check(value, 1);
  2573. mov____$i32,%eax %0x1
  2574. push___%eax
  2575. push___0x8(%ebp) !0x8
  2576. call32 %range_check
  2577. add____$i8,%esp !0x8
  2578. test___%eax,%eax
  2579. # ch = calloc(3, sizeof(char))
  2580. mov____$i32,%eax %0x1
  2581. push___%eax
  2582. mov____$i32,%eax %0x3
  2583. push___%eax
  2584. call32 %calloc
  2585. add____$i8,%esp !0x8
  2586. mov____%eax,0x8(%ebp) !0x-4
  2587. test___%eax,%eax
  2588. # if (BigEndian) ...else ...
  2589. mov____0x32,%eax &BigEndian
  2590. test___%eax,%eax
  2591. # jmp test LABEL
  2592. test___%eax,%eax
  2593. je32 %_express_number_24_else
  2594. # sprintf(ch, "%02X", value & 0xFF);
  2595. mov____0x8(%ebp),%eax !0x8
  2596. push___%eax
  2597. mov____$i32,%eax %0xff
  2598. mov____%eax,%edx
  2599. pop____%eax
  2600. and____%edx,%eax
  2601. push___%eax
  2602. push___$i32 &string_open_9
  2603. push___0x8(%ebp) !0x-4
  2604. call32 %sprintf
  2605. add____$i8,%esp !0xc
  2606. test___%eax,%eax
  2607. jmp32 %_express_number_24_break
  2608. :_express_number_24_else
  2609. # ch = LittleEndian(value, ch, 1)
  2610. mov____$i32,%eax %0x1
  2611. push___%eax
  2612. push___0x8(%ebp) !0x-4
  2613. push___0x8(%ebp) !0x8
  2614. call32 %LittleEndian
  2615. add____$i8,%esp !0xc
  2616. mov____%eax,0x8(%ebp) !0x-4
  2617. test___%eax,%eax
  2618. :_express_number_24_break
  2619. jmp32 %_express_number_2_break
  2620. :_express_number_2_else
  2621. # if ('@' == c) ...else ...
  2622. mov____$i32,%eax %0x40
  2623. push___%eax
  2624. movzbl_0x8(%ebp),%eax !0xc
  2625. mov____%eax,%edx
  2626. pop____%eax
  2627. sub____%edx,%eax
  2628. sete___%al
  2629. movzbl_%al,%eax
  2630. # jmp test LABEL
  2631. jne32 %_express_number_54_else
  2632. # range_check(value, 2);
  2633. mov____$i32,%eax %0x2
  2634. push___%eax
  2635. push___0x8(%ebp) !0x8
  2636. call32 %range_check
  2637. add____$i8,%esp !0x8
  2638. test___%eax,%eax
  2639. # ch = calloc(5, sizeof(char))
  2640. mov____$i32,%eax %0x1
  2641. push___%eax
  2642. mov____$i32,%eax %0x5
  2643. push___%eax
  2644. call32 %calloc
  2645. add____$i8,%esp !0x8
  2646. mov____%eax,0x8(%ebp) !0x-4
  2647. test___%eax,%eax
  2648. # if (BigEndian) ...else ...
  2649. mov____0x32,%eax &BigEndian
  2650. test___%eax,%eax
  2651. # jmp test LABEL
  2652. test___%eax,%eax
  2653. je32 %_express_number_76_else
  2654. # sprintf(ch, "%04X", value & 0xFFFF);
  2655. mov____0x8(%ebp),%eax !0x8
  2656. push___%eax
  2657. mov____$i32,%eax %0xffff
  2658. mov____%eax,%edx
  2659. pop____%eax
  2660. and____%edx,%eax
  2661. push___%eax
  2662. push___$i32 &string_open_10
  2663. push___0x8(%ebp) !0x-4
  2664. call32 %sprintf
  2665. add____$i8,%esp !0xc
  2666. test___%eax,%eax
  2667. jmp32 %_express_number_76_break
  2668. :_express_number_76_else
  2669. # ch = LittleEndian(value, ch, 2)
  2670. mov____$i32,%eax %0x2
  2671. push___%eax
  2672. push___0x8(%ebp) !0x-4
  2673. push___0x8(%ebp) !0x8
  2674. call32 %LittleEndian
  2675. add____$i8,%esp !0xc
  2676. mov____%eax,0x8(%ebp) !0x-4
  2677. test___%eax,%eax
  2678. :_express_number_76_break
  2679. jmp32 %_express_number_54_break
  2680. :_express_number_54_else
  2681. # if ('%' == c) ...else ...
  2682. mov____$i32,%eax %0x25
  2683. push___%eax
  2684. movzbl_0x8(%ebp),%eax !0xc
  2685. mov____%eax,%edx
  2686. pop____%eax
  2687. sub____%edx,%eax
  2688. sete___%al
  2689. movzbl_%al,%eax
  2690. # jmp test LABEL
  2691. jne32 %_express_number_106_else
  2692. # range_check(value, 4);
  2693. mov____$i32,%eax %0x4
  2694. push___%eax
  2695. push___0x8(%ebp) !0x8
  2696. call32 %range_check
  2697. add____$i8,%esp !0x8
  2698. test___%eax,%eax
  2699. # ch = calloc(9, sizeof(char))
  2700. mov____$i32,%eax %0x1
  2701. push___%eax
  2702. mov____$i32,%eax %0x9
  2703. push___%eax
  2704. call32 %calloc
  2705. add____$i8,%esp !0x8
  2706. mov____%eax,0x8(%ebp) !0x-4
  2707. test___%eax,%eax
  2708. # if (BigEndian) ...else ...
  2709. mov____0x32,%eax &BigEndian
  2710. test___%eax,%eax
  2711. # jmp test LABEL
  2712. test___%eax,%eax
  2713. je32 %_express_number_128_else
  2714. # sprintf(ch, "%08X", value & 0xFFFFFFFF);
  2715. mov____0x8(%ebp),%eax !0x8
  2716. push___%eax
  2717. mov____$i32,%eax %0xffffffff
  2718. mov____%eax,%edx
  2719. pop____%eax
  2720. and____%edx,%eax
  2721. push___%eax
  2722. push___$i32 &string_open_11
  2723. push___0x8(%ebp) !0x-4
  2724. call32 %sprintf
  2725. add____$i8,%esp !0xc
  2726. test___%eax,%eax
  2727. jmp32 %_express_number_128_break
  2728. :_express_number_128_else
  2729. # ch = LittleEndian(value, ch, 4)
  2730. mov____$i32,%eax %0x4
  2731. push___%eax
  2732. push___0x8(%ebp) !0x-4
  2733. push___0x8(%ebp) !0x8
  2734. call32 %LittleEndian
  2735. add____$i8,%esp !0xc
  2736. mov____%eax,0x8(%ebp) !0x-4
  2737. test___%eax,%eax
  2738. :_express_number_128_break
  2739. jmp32 %_express_number_106_break
  2740. :_express_number_106_else
  2741. # fprintf(2, "Given symbol %c to express immediate value %d\n", c, value);
  2742. push___0x8(%ebp) !0x8
  2743. push___0x8(%ebp) !0xc
  2744. push___$i32 &string_open_12
  2745. mov____$i32,%eax %0x2
  2746. push___%eax
  2747. call32 %fprintf
  2748. add____$i8,%esp !0x10
  2749. test___%eax,%eax
  2750. # exit(1);
  2751. mov____$i32,%eax %0x1
  2752. push___%eax
  2753. call32 %exit
  2754. add____$i8,%esp !0x4
  2755. test___%eax,%eax
  2756. :_express_number_106_break
  2757. :_express_number_54_break
  2758. :_express_number_2_break
  2759. mov____0x8(%ebp),%eax !0x-4
  2760. leave
  2761. ret
  2762. :eval_immediates
  2763. push___%ebp
  2764. mov____%esp,%ebp
  2765. sub____%esp,$i32 %0x1054
  2766. # for (struct Token *i = p; 0 != i; i = i->next) ...
  2767. # struct Token *i = p;
  2768. mov____0x8(%ebp),%eax !0x8
  2769. mov____%eax,0x8(%ebp) !0x-4
  2770. jmp32 %_eval_immediates_1_initial_skip
  2771. :_eval_immediates_1_loop
  2772. # if (0 == i->Expression && !(i->type & 1)) ...
  2773. mov____$i32,%eax %0x0
  2774. push___%eax
  2775. mov____%ebp,%eax
  2776. add____$i8,%eax !0x-4
  2777. mov____(%eax),%eax
  2778. add____$i8,%eax !0xc
  2779. # i->Expression
  2780. mov____(%eax),%eax
  2781. mov____%eax,%edx
  2782. pop____%eax
  2783. sub____%edx,%eax
  2784. sete___%al
  2785. movzbl_%al,%eax
  2786. # jmp test LABEL
  2787. jne32 %_eval_immediates_7_break
  2788. mov____%ebp,%eax
  2789. add____$i8,%eax !0x-4
  2790. mov____(%eax),%eax
  2791. add____$i8,%eax !0x4
  2792. # i->type
  2793. mov____(%eax),%eax
  2794. push___%eax
  2795. mov____$i32,%eax %0x1
  2796. mov____%eax,%edx
  2797. pop____%eax
  2798. and____%edx,%eax
  2799. test___%eax,%eax
  2800. sete___%al
  2801. movzbl_%al,%eax
  2802. test___%eax,%eax
  2803. # jmp test LABEL
  2804. je32 %_eval_immediates_7_break
  2805. # int value;
  2806. # switch (Architecture) { ...}
  2807. mov____0x32,%eax &Architecture
  2808. :_eval_immediates_34_clause0
  2809. cmp____$i8,%eax !0x2
  2810. je32 %_eval_immediates_34_body0
  2811. cmp____$i8,%eax !0x1
  2812. je32 %_eval_immediates_34_body0
  2813. jmp32 %_eval_immediates_34_clause1
  2814. :_eval_immediates_34_body0
  2815. # value = numerate_string(i->Text + 1)
  2816. mov____%ebp,%eax
  2817. add____$i8,%eax !0x-4
  2818. mov____(%eax),%eax
  2819. add____$i8,%eax !0x8
  2820. # i->Text
  2821. mov____(%eax),%eax
  2822. add____$i8,%eax !0x1
  2823. push___%eax
  2824. call32 %numerate_string
  2825. add____$i8,%esp !0x4
  2826. mov____%eax,0x8(%ebp) !0x-8
  2827. test___%eax,%eax
  2828. # if ('0' == i->Text[1] || 0 != value) ...
  2829. mov____$i32,%eax %0x30
  2830. push___%eax
  2831. mov____$i32,%eax %0x1
  2832. mov____%eax,%edx
  2833. push___%eax
  2834. mov____%ebp,%eax
  2835. add____$i8,%eax !0x-4
  2836. mov____(%eax),%eax
  2837. add____$i8,%eax !0x8
  2838. # i->Text
  2839. mov____(%eax),%eax
  2840. mov____%eax,%edx
  2841. pop____%eax
  2842. add____%edx,%eax
  2843. movzbl_(%eax),%eax
  2844. mov____%eax,%edx
  2845. pop____%eax
  2846. sub____%edx,%eax
  2847. sete___%al
  2848. movzbl_%al,%eax
  2849. # jmp test LABEL
  2850. jne32 %_eval_immediates_54_break_b_55
  2851. jmp32 %_eval_immediates_54_break_skip_b_55
  2852. :_eval_immediates_54_break_b_55
  2853. mov____$i32,%eax %0x0
  2854. push___%eax
  2855. mov____0x8(%ebp),%eax !0x-8
  2856. mov____%eax,%edx
  2857. pop____%eax
  2858. push___%eax
  2859. sub____%edx,%eax
  2860. setne__%al
  2861. movzbl_%al,%eax
  2862. xchg___%eax,(%esp)
  2863. sub____%edx,%eax
  2864. lahf
  2865. xor____$i8,%ah !0x40
  2866. sahf
  2867. pop____%eax
  2868. # jmp test LABEL
  2869. jne32 %_eval_immediates_54_break
  2870. :_eval_immediates_54_break_skip_b_55
  2871. # i->Expression = express_number(value, i->Text[0])
  2872. mov____$i32,%eax %0x0
  2873. mov____%eax,%edx
  2874. push___%eax
  2875. mov____%ebp,%eax
  2876. add____$i8,%eax !0x-4
  2877. mov____(%eax),%eax
  2878. add____$i8,%eax !0x8
  2879. # i->Text
  2880. mov____(%eax),%eax
  2881. mov____%eax,%edx
  2882. pop____%eax
  2883. add____%edx,%eax
  2884. movzbl_(%eax),%eax
  2885. push___%eax
  2886. push___0x8(%ebp) !0x-8
  2887. call32 %express_number
  2888. add____$i8,%esp !0x8
  2889. push___%eax
  2890. mov____%ebp,%eax
  2891. add____$i8,%eax !0x-4
  2892. mov____(%eax),%eax
  2893. add____$i8,%eax !0xc
  2894. mov____%eax,%edx
  2895. pop____%eax
  2896. mov____%eax,(%edx)
  2897. test___%eax,%eax
  2898. jmp32 %_eval_immediates_54_break
  2899. :_eval_immediates_54_break
  2900. jmp32 %_eval_immediates_34_break
  2901. jmp32 %_eval_immediates_34_body1
  2902. :_eval_immediates_34_clause1
  2903. cmp____$i8,%eax !0x0
  2904. je32 %_eval_immediates_34_body1
  2905. jmp32 %_eval_immediates_34_break
  2906. :_eval_immediates_34_body1
  2907. # value = numerate_string(i->Text)
  2908. mov____%ebp,%eax
  2909. add____$i8,%eax !0x-4
  2910. mov____(%eax),%eax
  2911. add____$i8,%eax !0x8
  2912. # i->Text
  2913. mov____(%eax),%eax
  2914. push___%eax
  2915. call32 %numerate_string
  2916. add____$i8,%esp !0x4
  2917. mov____%eax,0x8(%ebp) !0x-8
  2918. test___%eax,%eax
  2919. # if ('0' == i->Text[0] || 0 != value) ...
  2920. mov____$i32,%eax %0x30
  2921. push___%eax
  2922. mov____$i32,%eax %0x0
  2923. mov____%eax,%edx
  2924. push___%eax
  2925. mov____%ebp,%eax
  2926. add____$i8,%eax !0x-4
  2927. mov____(%eax),%eax
  2928. add____$i8,%eax !0x8
  2929. # i->Text
  2930. mov____(%eax),%eax
  2931. mov____%eax,%edx
  2932. pop____%eax
  2933. add____%edx,%eax
  2934. movzbl_(%eax),%eax
  2935. mov____%eax,%edx
  2936. pop____%eax
  2937. sub____%edx,%eax
  2938. sete___%al
  2939. movzbl_%al,%eax
  2940. # jmp test LABEL
  2941. jne32 %_eval_immediates_124_break_b_125
  2942. jmp32 %_eval_immediates_124_break_skip_b_125
  2943. :_eval_immediates_124_break_b_125
  2944. mov____$i32,%eax %0x0
  2945. push___%eax
  2946. mov____0x8(%ebp),%eax !0x-8
  2947. mov____%eax,%edx
  2948. pop____%eax
  2949. push___%eax
  2950. sub____%edx,%eax
  2951. setne__%al
  2952. movzbl_%al,%eax
  2953. xchg___%eax,(%esp)
  2954. sub____%edx,%eax
  2955. lahf
  2956. xor____$i8,%ah !0x40
  2957. sahf
  2958. pop____%eax
  2959. # jmp test LABEL
  2960. jne32 %_eval_immediates_124_break
  2961. :_eval_immediates_124_break_skip_b_125
  2962. # range_check(value, 2);
  2963. mov____$i32,%eax %0x2
  2964. push___%eax
  2965. push___0x8(%ebp) !0x-8
  2966. call32 %range_check
  2967. add____$i8,%esp !0x8
  2968. test___%eax,%eax
  2969. # i->Expression = calloc(5, sizeof(char))
  2970. mov____$i32,%eax %0x1
  2971. push___%eax
  2972. mov____$i32,%eax %0x5
  2973. push___%eax
  2974. call32 %calloc
  2975. add____$i8,%esp !0x8
  2976. push___%eax
  2977. mov____%ebp,%eax
  2978. add____$i8,%eax !0x-4
  2979. mov____(%eax),%eax
  2980. add____$i8,%eax !0xc
  2981. mov____%eax,%edx
  2982. pop____%eax
  2983. mov____%eax,(%edx)
  2984. test___%eax,%eax
  2985. # sprintf(i->Expression, "%04X", value);
  2986. push___0x8(%ebp) !0x-8
  2987. push___$i32 &string_open_10
  2988. mov____%ebp,%eax
  2989. add____$i8,%eax !0x-4
  2990. mov____(%eax),%eax
  2991. add____$i8,%eax !0xc
  2992. # i->Expression
  2993. mov____(%eax),%eax
  2994. push___%eax
  2995. call32 %sprintf
  2996. add____$i8,%esp !0xc
  2997. test___%eax,%eax
  2998. jmp32 %_eval_immediates_124_break
  2999. :_eval_immediates_124_break
  3000. jmp32 %_eval_immediates_34_break
  3001. :_eval_immediates_34_break
  3002. jmp32 %_eval_immediates_7_break
  3003. :_eval_immediates_7_break
  3004. :_eval_immediates_1_continue
  3005. # i = i->next
  3006. mov____%ebp,%eax
  3007. add____$i8,%eax !0x-4
  3008. mov____(%eax),%eax
  3009. add____$i8,%eax !0x0
  3010. # i->next
  3011. mov____(%eax),%eax
  3012. mov____%eax,0x8(%ebp) !0x-4
  3013. :_eval_immediates_1_initial_skip
  3014. mov____$i32,%eax %0x0
  3015. push___%eax
  3016. mov____0x8(%ebp),%eax !0x-4
  3017. mov____%eax,%edx
  3018. pop____%eax
  3019. push___%eax
  3020. sub____%edx,%eax
  3021. setne__%al
  3022. movzbl_%al,%eax
  3023. xchg___%eax,(%esp)
  3024. sub____%edx,%eax
  3025. lahf
  3026. xor____$i8,%ah !0x40
  3027. sahf
  3028. pop____%eax
  3029. # jmp test LABEL
  3030. jne32 %_eval_immediates_1_break
  3031. jmp32 %_eval_immediates_1_loop
  3032. :_eval_immediates_1_break
  3033. leave
  3034. ret
  3035. :print_hex
  3036. push___%ebp
  3037. mov____%esp,%ebp
  3038. sub____%esp,$i32 %0x1054
  3039. # for (struct Token *i = p; 0 != i; i = i->next) ...
  3040. # struct Token *i = p;
  3041. mov____0x8(%ebp),%eax !0x8
  3042. mov____%eax,0x8(%ebp) !0x-4
  3043. jmp32 %_print_hex_1_initial_skip
  3044. :_print_hex_1_loop
  3045. # if (i->type ^ 1) ...
  3046. mov____%ebp,%eax
  3047. add____$i8,%eax !0x-4
  3048. mov____(%eax),%eax
  3049. add____$i8,%eax !0x4
  3050. # i->type
  3051. mov____(%eax),%eax
  3052. push___%eax
  3053. mov____$i32,%eax %0x1
  3054. mov____%eax,%edx
  3055. pop____%eax
  3056. xor____%edx,%eax
  3057. test___%eax,%eax
  3058. # jmp test LABEL
  3059. test___%eax,%eax
  3060. je32 %_print_hex_7_break
  3061. # fprintf(destination_file, "\n%s", i->Expression);
  3062. mov____%ebp,%eax
  3063. add____$i8,%eax !0x-4
  3064. mov____(%eax),%eax
  3065. add____$i8,%eax !0xc
  3066. # i->Expression
  3067. mov____(%eax),%eax
  3068. push___%eax
  3069. push___$i32 &string_open_13
  3070. mov____0x32,%eax &destination_file
  3071. push___%eax
  3072. call32 %fprintf
  3073. add____$i8,%esp !0xc
  3074. test___%eax,%eax
  3075. jmp32 %_print_hex_7_break
  3076. :_print_hex_7_break
  3077. :_print_hex_1_continue
  3078. # i = i->next
  3079. mov____%ebp,%eax
  3080. add____$i8,%eax !0x-4
  3081. mov____(%eax),%eax
  3082. add____$i8,%eax !0x0
  3083. # i->next
  3084. mov____(%eax),%eax
  3085. mov____%eax,0x8(%ebp) !0x-4
  3086. :_print_hex_1_initial_skip
  3087. mov____$i32,%eax %0x0
  3088. push___%eax
  3089. mov____0x8(%ebp),%eax !0x-4
  3090. mov____%eax,%edx
  3091. pop____%eax
  3092. push___%eax
  3093. sub____%edx,%eax
  3094. setne__%al
  3095. movzbl_%al,%eax
  3096. xchg___%eax,(%esp)
  3097. sub____%edx,%eax
  3098. lahf
  3099. xor____$i8,%ah !0x40
  3100. sahf
  3101. pop____%eax
  3102. # jmp test LABEL
  3103. jne32 %_print_hex_1_break
  3104. jmp32 %_print_hex_1_loop
  3105. :_print_hex_1_break
  3106. # fprintf(destination_file, "\n");
  3107. push___$i32 &string_open_14
  3108. mov____0x32,%eax &destination_file
  3109. push___%eax
  3110. call32 %fprintf
  3111. add____$i8,%esp !0x8
  3112. test___%eax,%eax
  3113. leave
  3114. ret
  3115. :main
  3116. push___%ebp
  3117. mov____%esp,%ebp
  3118. sub____%esp,$i32 %0x1054
  3119. # BigEndian = 0
  3120. mov____$i32,%eax %0x0
  3121. mov____%eax,0x32 &BigEndian
  3122. test___%eax,%eax
  3123. # struct Token *head = 0;
  3124. mov____$i32,%eax %0x0
  3125. mov____%eax,0x8(%ebp) !0x-4
  3126. # Architecture = 0
  3127. mov____$i32,%eax %0x0
  3128. mov____%eax,0x32 &Architecture
  3129. test___%eax,%eax
  3130. # destination_file = 1
  3131. mov____$i32,%eax %0x1
  3132. mov____%eax,0x32 &destination_file
  3133. test___%eax,%eax
  3134. # int c;
  3135. # int option_index = 0;
  3136. mov____$i32,%eax %0x0
  3137. mov____%eax,0x8(%ebp) !0x-c
  3138. # while ((c = getopt_long(argc, argv, "f:h:o:V", long_options, &option_index)) != -1) ...
  3139. jmp32 %_main_20_continue
  3140. :_main_20_loop
  3141. # switch (c) { ...}
  3142. mov____0x8(%ebp),%eax !0x-8
  3143. :_main_23_clause0
  3144. cmp____$i8,%eax !0x0
  3145. je32 %_main_23_body0
  3146. jmp32 %_main_23_clause1
  3147. :_main_23_body0
  3148. jmp32 %_main_23_break
  3149. jmp32 %_main_23_body1
  3150. :_main_23_clause1
  3151. cmp____$i8,%eax !0x41
  3152. je32 %_main_23_body1
  3153. jmp32 %_main_23_clause2
  3154. :_main_23_body1
  3155. # Architecture = atoi(optarg)
  3156. mov____0x32,%eax &optarg
  3157. push___%eax
  3158. call32 %atoi
  3159. add____$i8,%esp !0x4
  3160. mov____%eax,0x32 &Architecture
  3161. test___%eax,%eax
  3162. jmp32 %_main_23_break
  3163. jmp32 %_main_23_body2
  3164. :_main_23_clause2
  3165. cmp____$i8,%eax !0x68
  3166. je32 %_main_23_body2
  3167. jmp32 %_main_23_clause3
  3168. :_main_23_body2
  3169. # fprintf(2, "Usage: %s -f FILENAME1 {-f FILENAME2} (--BigEndian|--LittleEndian) [--BaseAddress 12345] [--Architecture 12345]\n" , argv[0]);
  3170. mov____$i32,%eax %0x0
  3171. shl____$i8,%eax !0x2
  3172. push___%eax
  3173. mov____0x8(%ebp),%eax !0xc
  3174. mov____%eax,%edx
  3175. pop____%eax
  3176. add____%edx,%eax
  3177. mov____(%eax),%eax
  3178. push___%eax
  3179. push___$i32 &string_open_22
  3180. mov____$i32,%eax %0x2
  3181. push___%eax
  3182. call32 %fprintf
  3183. add____$i8,%esp !0xc
  3184. test___%eax,%eax
  3185. # fprintf(2, "Architecture 0: Knight; 1: x86; 2: AMD64");
  3186. push___$i32 &string_open_23
  3187. mov____$i32,%eax %0x2
  3188. push___%eax
  3189. call32 %fprintf
  3190. add____$i8,%esp !0x8
  3191. test___%eax,%eax
  3192. # exit(0);
  3193. mov____$i32,%eax %0x0
  3194. push___%eax
  3195. call32 %exit
  3196. add____$i8,%esp !0x4
  3197. test___%eax,%eax
  3198. jmp32 %_main_23_body3
  3199. :_main_23_clause3
  3200. cmp____$i8,%eax !0x66
  3201. je32 %_main_23_body3
  3202. jmp32 %_main_23_clause4
  3203. :_main_23_body3
  3204. # source_file = open(optarg, 0)
  3205. mov____$i32,%eax %0x0
  3206. push___%eax
  3207. mov____0x32,%eax &optarg
  3208. push___%eax
  3209. call32 %open
  3210. add____$i8,%esp !0x8
  3211. mov____%eax,0x32 &source_file
  3212. test___%eax,%eax
  3213. # Reached_EOF = 0
  3214. mov____$i32,%eax %0x0
  3215. mov____%eax,0x32 &Reached_EOF
  3216. test___%eax,%eax
  3217. # while (!Reached_EOF) ...
  3218. jmp32 %_main_91_continue
  3219. :_main_91_loop
  3220. # head = Tokenize_Line(head)
  3221. push___0x8(%ebp) !0x-4
  3222. call32 %Tokenize_Line
  3223. add____$i8,%esp !0x4
  3224. mov____%eax,0x8(%ebp) !0x-4
  3225. test___%eax,%eax
  3226. :_main_91_continue
  3227. mov____0x32,%eax &Reached_EOF
  3228. test___%eax,%eax
  3229. sete___%al
  3230. movzbl_%al,%eax
  3231. test___%eax,%eax
  3232. # jmp test LABEL
  3233. je32 %_main_91_break
  3234. jmp32 %_main_91_loop
  3235. :_main_91_break
  3236. jmp32 %_main_23_break
  3237. jmp32 %_main_23_body4
  3238. :_main_23_clause4
  3239. cmp____$i8,%eax !0x6f
  3240. je32 %_main_23_body4
  3241. jmp32 %_main_23_clause5
  3242. :_main_23_body4
  3243. # destination_file = open(optarg, (64 | 512) | 1, 00400 | 00200)
  3244. mov____$i32,%eax %0x100
  3245. push___%eax
  3246. mov____$i32,%eax %0x80
  3247. mov____%eax,%edx
  3248. pop____%eax
  3249. or_____%edx,%eax
  3250. push___%eax
  3251. mov____$i32,%eax %0x40
  3252. push___%eax
  3253. mov____$i32,%eax %0x200
  3254. mov____%eax,%edx
  3255. pop____%eax
  3256. or_____%edx,%eax
  3257. push___%eax
  3258. mov____$i32,%eax %0x1
  3259. mov____%eax,%edx
  3260. pop____%eax
  3261. or_____%edx,%eax
  3262. push___%eax
  3263. mov____0x32,%eax &optarg
  3264. push___%eax
  3265. call32 %open
  3266. add____$i8,%esp !0xc
  3267. mov____%eax,0x32 &destination_file
  3268. test___%eax,%eax
  3269. jmp32 %_main_23_break
  3270. jmp32 %_main_23_body5
  3271. :_main_23_clause5
  3272. cmp____$i8,%eax !0x56
  3273. je32 %_main_23_body5
  3274. jmp32 %_main_23_clause6
  3275. :_main_23_body5
  3276. # fprintf(1, "M1 0.3\n");
  3277. push___$i32 &string_open_24
  3278. mov____$i32,%eax %0x1
  3279. push___%eax
  3280. call32 %fprintf
  3281. add____$i8,%esp !0x8
  3282. test___%eax,%eax
  3283. # exit(0);
  3284. mov____$i32,%eax %0x0
  3285. push___%eax
  3286. call32 %exit
  3287. add____$i8,%esp !0x4
  3288. test___%eax,%eax
  3289. jmp32 %_main_23_body6
  3290. :_main_23_clause6
  3291. :_main_23_body6
  3292. # fprintf(2, "Unknown option\n");
  3293. push___$i32 &string_open_25
  3294. mov____$i32,%eax %0x2
  3295. push___%eax
  3296. call32 %fprintf
  3297. add____$i8,%esp !0x8
  3298. test___%eax,%eax
  3299. # exit(1);
  3300. mov____$i32,%eax %0x1
  3301. push___%eax
  3302. call32 %exit
  3303. add____$i8,%esp !0x4
  3304. test___%eax,%eax
  3305. :_main_23_break
  3306. :_main_20_continue
  3307. # c = getopt_long(argc, argv, "f:h:o:V", long_options, &option_index)
  3308. lea____0x8(%ebp),%eax !0x-c
  3309. push___%eax
  3310. push___$i32 &long_options
  3311. push___$i32 &string_open_26
  3312. push___0x8(%ebp) !0xc
  3313. push___0x8(%ebp) !0x8
  3314. call32 %getopt_long
  3315. add____$i8,%esp !0x14
  3316. mov____%eax,0x8(%ebp) !0x-8
  3317. push___%eax
  3318. push___%eax
  3319. mov____$i32,%eax %0x1
  3320. mov____%eax,%edx
  3321. pop____%eax
  3322. mov____$i32,%eax %0x0
  3323. sub____%edx,%eax
  3324. mov____%eax,%edx
  3325. pop____%eax
  3326. push___%eax
  3327. sub____%edx,%eax
  3328. setne__%al
  3329. movzbl_%al,%eax
  3330. xchg___%eax,(%esp)
  3331. sub____%edx,%eax
  3332. lahf
  3333. xor____$i8,%ah !0x40
  3334. sahf
  3335. pop____%eax
  3336. # jmp test LABEL
  3337. jne32 %_main_20_break
  3338. jmp32 %_main_20_loop
  3339. :_main_20_break
  3340. # if (0 == head) ...
  3341. mov____$i32,%eax %0x0
  3342. push___%eax
  3343. mov____0x8(%ebp),%eax !0x-4
  3344. mov____%eax,%edx
  3345. pop____%eax
  3346. sub____%edx,%eax
  3347. sete___%al
  3348. movzbl_%al,%eax
  3349. # jmp test LABEL
  3350. jne32 %_main_190_break
  3351. # fprintf(2, "Either no input files were given or they were empty\n");
  3352. push___$i32 &string_open_27
  3353. mov____$i32,%eax %0x2
  3354. push___%eax
  3355. call32 %fprintf
  3356. add____$i8,%esp !0x8
  3357. test___%eax,%eax
  3358. # exit(1);
  3359. mov____$i32,%eax %0x1
  3360. push___%eax
  3361. call32 %exit
  3362. add____$i8,%esp !0x4
  3363. test___%eax,%eax
  3364. jmp32 %_main_190_break
  3365. :_main_190_break
  3366. # head = reverse_list(head)
  3367. push___0x8(%ebp) !0x-4
  3368. call32 %reverse_list
  3369. add____$i8,%esp !0x4
  3370. mov____%eax,0x8(%ebp) !0x-4
  3371. test___%eax,%eax
  3372. # identify_macros(head);
  3373. push___0x8(%ebp) !0x-4
  3374. call32 %identify_macros
  3375. add____$i8,%esp !0x4
  3376. test___%eax,%eax
  3377. # line_macro(head);
  3378. push___0x8(%ebp) !0x-4
  3379. call32 %line_macro
  3380. add____$i8,%esp !0x4
  3381. test___%eax,%eax
  3382. # process_string(head);
  3383. push___0x8(%ebp) !0x-4
  3384. call32 %process_string
  3385. add____$i8,%esp !0x4
  3386. test___%eax,%eax
  3387. # eval_immediates(head);
  3388. push___0x8(%ebp) !0x-4
  3389. call32 %eval_immediates
  3390. add____$i8,%esp !0x4
  3391. test___%eax,%eax
  3392. # preserve_other(head);
  3393. push___0x8(%ebp) !0x-4
  3394. call32 %preserve_other
  3395. add____$i8,%esp !0x4
  3396. test___%eax,%eax
  3397. # print_hex(head);
  3398. push___0x8(%ebp) !0x-4
  3399. call32 %print_hex
  3400. add____$i8,%esp !0x4
  3401. test___%eax,%eax
  3402. mov____$i32,%eax %0x0
  3403. leave
  3404. ret
  3405. :ELF_data
  3406. :HEX2_data
  3407. :g_environment
  3408. !0x00 !0x00 !0x00 !0x00
  3409. :g_stdin
  3410. !0x00 !0x00 !0x00 !0x00
  3411. :g_stdout
  3412. !0x00 !0x00 !0x00 !0x00
  3413. :optarg
  3414. !0x00 !0x00 !0x00 !0x00
  3415. :optind
  3416. !0x00 !0x00 !0x00 !0x00
  3417. :opterr
  3418. !0x00 !0x00 !0x00 !0x00
  3419. :source_file
  3420. !0x00 !0x00 !0x00 !0x00
  3421. :destination_file
  3422. !0x00 !0x00 !0x00 !0x00
  3423. :Reached_EOF
  3424. !0x00 !0x00 !0x00 !0x00
  3425. :BigEndian
  3426. !0x00 !0x00 !0x00 !0x00
  3427. :Architecture
  3428. !0x00 !0x00 !0x00 !0x00
  3429. :string_open_0
  3430. "calloc failed.
  3431. "
  3432. :string_open_1
  3433. "Exhusted available memory
  3434. "
  3435. :string_open_2
  3436. !0x55 !0x6e !0x6d !0x61 !0x74 !0x63 !0x68 !0x65 !0x64 !0x20 !0x22 !0x21 !0x0a !0x00
  3437. :string_open_3
  3438. "String: %s exceeds max string size
  3439. "
  3440. :string_open_4
  3441. "DEFINE"
  3442. :string_open_5
  3443. "A displacement of %d does not fit in 3 bytes"
  3444. :string_open_6
  3445. "A displacement of %d does not fit in 2 bytes"
  3446. :string_open_7
  3447. "A displacement of %d does not fit in 1 byte"
  3448. :string_open_8
  3449. "Received invalid number of bytes in LittleEndian %d
  3450. "
  3451. :string_open_9
  3452. "%02X"
  3453. :string_open_10
  3454. "%04X"
  3455. :string_open_11
  3456. "%08X"
  3457. :string_open_12
  3458. "Given symbol %c to express immediate value %d
  3459. "
  3460. :string_open_13
  3461. "
  3462. %s"
  3463. :string_open_14
  3464. "
  3465. "
  3466. :string_open_15
  3467. "Architecture"
  3468. :string_open_16
  3469. "BigEndian"
  3470. :string_open_17
  3471. "LittleEndian"
  3472. :string_open_18
  3473. "file"
  3474. :string_open_19
  3475. "output"
  3476. :string_open_20
  3477. "help"
  3478. :string_open_21
  3479. "version"
  3480. :long_options
  3481. &string_open_15 !0x01 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x41 !0x00 !0x00 !0x00 &string_open_16 !0x00 !0x00 !0x00 !0x00 &BigEndian !0x01 !0x00 !0x00 !0x00 &string_open_17 !0x00 !0x00 !0x00 !0x00 &BigEndian !0x00 !0x00 !0x00 !0x00 &string_open_18 !0x01 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x66 !0x00 !0x00 !0x00 &string_open_19 !0x01 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x6f !0x00 !0x00 !0x00 &string_open_20 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x68 !0x00 !0x00 !0x00 &string_open_21 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x56 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00 !0x00
  3482. :string_open_22
  3483. !0x55 !0x73 !0x61 !0x67 !0x65 !0x3a !0x20 !0x25 !0x73 !0x20 !0x2d !0x66 !0x20 !0x46 !0x49 !0x4c !0x45 !0x4e !0x41 !0x4d !0x45 !0x31 !0x20 !0x7b !0x2d !0x66 !0x20 !0x46 !0x49 !0x4c !0x45 !0x4e !0x41 !0x4d !0x45 !0x32 !0x7d !0x20 !0x28 !0x2d !0x2d !0x42 !0x69 !0x67 !0x45 !0x6e !0x64 !0x69 !0x61 !0x6e !0x7c !0x2d !0x2d !0x4c !0x69 !0x74 !0x74 !0x6c !0x65 !0x45 !0x6e !0x64 !0x69 !0x61 !0x6e !0x29 !0x20 !0x5b !0x2d !0x2d !0x42 !0x61 !0x73 !0x65 !0x41 !0x64 !0x64 !0x72 !0x65 !0x73 !0x73 !0x20 !0x31 !0x32 !0x33 !0x34 !0x35 !0x5d !0x20 !0x5b !0x2d !0x2d !0x41 !0x72 !0x63 !0x68 !0x69 !0x74 !0x65 !0x63 !0x74 !0x75 !0x72 !0x65 !0x20 !0x31 !0x32 !0x33 !0x34 !0x35 !0x5d !0x0a !0x00
  3484. :string_open_23
  3485. "Architecture 0: Knight; 1: x86; 2: AMD64"
  3486. :string_open_24
  3487. "M1 0.3
  3488. "
  3489. :string_open_25
  3490. "Unknown option
  3491. "
  3492. :string_open_26
  3493. "f:h:o:V"
  3494. :string_open_27
  3495. "Either no input files were given or they were empty
  3496. "