module_fusion_text.ll 145 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555
  1. ; ModuleID = 'output/module_fusion.bc'
  2. source_filename = "llvm-link"
  3. target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
  4. target triple = "x86_64-pc-linux-gnu"
  5. %struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, %struct._IO_codecvt*, %struct._IO_wide_data*, %struct._IO_FILE*, i8*, i64, i32, [20 x i8] }
  6. %struct._IO_marker = type opaque
  7. %struct._IO_codecvt = type opaque
  8. %struct._IO_wide_data = type opaque
  9. %struct.DynamicArray = type { i32*, i32, i32, i32, i32 }
  10. %struct.Matrix = type { i32**, i32, i32, i32, double }
  11. %struct.Node = type { i32, %struct.Node*, %struct.Node*, i32, i32 }
  12. %fused_return_multiplyMatrices_testPoints = type { i32, %struct.Matrix* }
  13. %struct.Circle = type { %struct.Point, double, i32, [256 x i8] }
  14. %struct.Point = type { i32, i32, [256 x i8], double }
  15. %fused_return_calculateDistance_memoizedFib = type { i32, double }
  16. %fused_return_validateMatrix_processMatrix = type { i32, i32 }
  17. @globalCounter = dso_local global i32 0, align 4
  18. @globalErrorMessage = dso_local global i8* null, align 8
  19. @recursionDepth = dso_local global i32 0, align 4
  20. @.str = private unnamed_addr constant [9 x i8] c"No error\00", align 1
  21. @stderr = external dso_local global %struct._IO_FILE*, align 8
  22. @.str.1 = private unnamed_addr constant [55 x i8] c"Critical: Failed to allocate memory for error message\0A\00", align 1
  23. @.str.2 = private unnamed_addr constant [33 x i8] c"Maximum recursion depth exceeded\00", align 1
  24. @.str.3 = private unnamed_addr constant [29 x i8] c"Factorial of negative number\00", align 1
  25. @.str.4 = private unnamed_addr constant [36 x i8] c"Input too large, potential overflow\00", align 1
  26. @.str.5 = private unnamed_addr constant [31 x i8] c"Factorial calculation overflow\00", align 1
  27. @.str.6 = private unnamed_addr constant [25 x i8] c"Invalid initial capacity\00", align 1
  28. @.str.7 = private unnamed_addr constant [46 x i8] c"Initial capacity exceeds maximum allowed size\00", align 1
  29. @.str.8 = private unnamed_addr constant [49 x i8] c"Memory allocation failed for DynamicArray struct\00", align 1
  30. @.str.9 = private unnamed_addr constant [35 x i8] c"Memory allocation failed for array\00", align 1
  31. @.str.10 = private unnamed_addr constant [19 x i8] c"Null array pointer\00", align 1
  32. @.str.11 = private unnamed_addr constant [25 x i8] c"Array size limit reached\00", align 1
  33. @.str.12 = private unnamed_addr constant [27 x i8] c"Memory reallocation failed\00", align 1
  34. @.str.13 = private unnamed_addr constant [46 x i8] c"Maximum recursion depth exceeded in quickSort\00", align 1
  35. @.str.14 = private unnamed_addr constant [32 x i8] c"Null array pointer in quickSort\00", align 1
  36. @.str.15 = private unnamed_addr constant [39 x i8] c"Array index out of bounds in quickSort\00", align 1
  37. @.str.16 = private unnamed_addr constant [28 x i8] c"Matrix dimensions too small\00", align 1
  38. @.str.17 = private unnamed_addr constant [46 x i8] c"Matrix dimensions exceed maximum allowed size\00", align 1
  39. @.str.18 = private unnamed_addr constant [43 x i8] c"Memory allocation failed for matrix struct\00", align 1
  40. @.str.19 = private unnamed_addr constant [41 x i8] c"Memory allocation failed for matrix rows\00", align 1
  41. @.str.20 = private unnamed_addr constant [44 x i8] c"Memory allocation failed for matrix columns\00", align 1
  42. @.str.21 = private unnamed_addr constant [20 x i8] c"Null matrix pointer\00", align 1
  43. @.str.22 = private unnamed_addr constant [20 x i8] c"Invalid matrix data\00", align 1
  44. @.str.23 = private unnamed_addr constant [45 x i8] c"Invalid matrix dimensions for multiplication\00", align 1
  45. @.str.24 = private unnamed_addr constant [42 x i8] c"Integer overflow in matrix multiplication\00", align 1
  46. @.str.25 = private unnamed_addr constant [38 x i8] c"Memory allocation failed for new node\00", align 1
  47. @insertNode.maxDepth = internal global i32 0, align 4
  48. @.str.26 = private unnamed_addr constant [34 x i8] c"List exceeds maximum allowed size\00", align 1
  49. @calculationResult = internal global i32 0, align 4
  50. @.str.27 = private unnamed_addr constant [30 x i8] c"Final calculation result: %d\0A\00", align 1
  51. @.str.28 = private unnamed_addr constant [11 x i8] c"Error: %s\0A\00", align 1
  52. @.str.29 = private unnamed_addr constant [29 x i8] c"Error during array push: %s\0A\00", align 1
  53. @.str.30 = private unnamed_addr constant [33 x i8] c"Error during list insertion: %s\0A\00", align 1
  54. @.str.31 = private unnamed_addr constant [43 x i8] c"Circular reference detected in linked list\00", align 1
  55. @.str.32 = private unnamed_addr constant [22 x i8] c"Invalid point weights\00", align 1
  56. @.str.33 = private unnamed_addr constant [31 x i8] c"Coordinates out of valid range\00", align 1
  57. @.str.34 = private unnamed_addr constant [30 x i8] c"Distance calculation overflow\00", align 1
  58. @.str.35 = private unnamed_addr constant [36 x i8] c"Invalid distance calculation result\00", align 1
  59. @.str.36 = private unnamed_addr constant [15 x i8] c"Invalid circle\00", align 1
  60. @.str.37 = private unnamed_addr constant [22 x i8] c"Invalid circle radius\00", align 1
  61. @.str.38 = private unnamed_addr constant [24 x i8] c"Circle radius too large\00", align 1
  62. @.str.39 = private unnamed_addr constant [45 x i8] c"Circle center coordinates out of valid range\00", align 1
  63. @.str.40 = private unnamed_addr constant [26 x i8] c"Area calculation overflow\00", align 1
  64. @.str.41 = private unnamed_addr constant [9 x i8] c"standard\00", align 1
  65. @.str.42 = private unnamed_addr constant [9 x i8] c"weighted\00", align 1
  66. @.str.43 = private unnamed_addr constant [35 x i8] c"Invalid weight for weighted circle\00", align 1
  67. @.str.44 = private unnamed_addr constant [20 x i8] c"Unknown circle type\00", align 1
  68. @.str.45 = private unnamed_addr constant [17 x i8] c"Null matrix data\00", align 1
  69. @.str.46 = private unnamed_addr constant [28 x i8] c"Matrix dimensions too large\00", align 1
  70. @.str.47 = private unnamed_addr constant [27 x i8] c"Invalid matrix row pointer\00", align 1
  71. @.str.48 = private unnamed_addr constant [32 x i8] c"Inconsistent square matrix flag\00", align 1
  72. @.str.49 = private unnamed_addr constant [14 x i8] c"Invalid array\00", align 1
  73. @.str.50 = private unnamed_addr constant [21 x i8] c"Invalid points array\00", align 1
  74. @.str.51 = private unnamed_addr constant [16 x i8] c"Too many points\00", align 1
  75. @.str.52 = private unnamed_addr constant [39 x i8] c"Failed to allocate memory for centroid\00", align 1
  76. @.str.53 = private unnamed_addr constant [21 x i8] c"Invalid point weight\00", align 1
  77. @.str.54 = private unnamed_addr constant [30 x i8] c"Centroid calculation overflow\00", align 1
  78. @.str.55 = private unnamed_addr constant [21 x i8] c"Total weight is zero\00", align 1
  79. @.str.56 = private unnamed_addr constant [9 x i8] c"Centroid\00", align 1
  80. @cache = internal global [100 x i32] zeroinitializer, align 16
  81. @__const.projectB_main.str = private unnamed_addr constant [14 x i8] c"Hello, World!\00", align 1
  82. @__const.projectB_main.arr = private unnamed_addr constant [8 x i32] [i32 10, i32 22, i32 9, i32 33, i32 21, i32 50, i32 41, i32 60], align 16
  83. @__const.projectB_main.matrix = private unnamed_addr constant <{ <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, [97 x <{ i32, i32, i32, [97 x i32] }>] }> <{ <{ i32, i32, i32, [97 x i32] }> <{ i32 1, i32 2, i32 3, [97 x i32] zeroinitializer }>, <{ i32, i32, i32, [97 x i32] }> <{ i32 4, i32 5, i32 6, [97 x i32] zeroinitializer }>, <{ i32, i32, i32, [97 x i32] }> <{ i32 7, i32 8, i32 9, [97 x i32] zeroinitializer }>, [97 x <{ i32, i32, i32, [97 x i32] }>] zeroinitializer }>, align 16
  84. ; Function Attrs: noinline nounwind optnone uwtable
  85. define dso_local void @setErrorMessage(i8* %0) #0 !project_source !2 {
  86. %2 = alloca i8*, align 8
  87. store i8* %0, i8** %2, align 8
  88. %3 = load i8*, i8** @globalErrorMessage, align 8
  89. %4 = icmp ne i8* %3, null
  90. br i1 %4, label %5, label %7
  91. 5: ; preds = %1
  92. %6 = load i8*, i8** @globalErrorMessage, align 8
  93. call void @free(i8* %6) #7
  94. br label %7
  95. 7: ; preds = %5, %1
  96. %8 = load i8*, i8** %2, align 8
  97. %9 = icmp ne i8* %8, null
  98. br i1 %9, label %10, label %19
  99. 10: ; preds = %7
  100. %11 = load i8*, i8** %2, align 8
  101. %12 = call noalias i8* @strdup(i8* %11) #7
  102. store i8* %12, i8** @globalErrorMessage, align 8
  103. %13 = load i8*, i8** @globalErrorMessage, align 8
  104. %14 = icmp eq i8* %13, null
  105. br i1 %14, label %15, label %18
  106. 15: ; preds = %10
  107. %16 = load %struct._IO_FILE*, %struct._IO_FILE** @stderr, align 8
  108. %17 = call i32 (%struct._IO_FILE*, i8*, ...) @fprintf(%struct._IO_FILE* %16, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
  109. br label %18
  110. 18: ; preds = %15, %10
  111. br label %20
  112. 19: ; preds = %7
  113. store i8* null, i8** @globalErrorMessage, align 8
  114. br label %20
  115. 20: ; preds = %19, %18
  116. ret void
  117. }
  118. ; Function Attrs: nounwind
  119. declare dso_local void @free(i8*) #1
  120. ; Function Attrs: nounwind
  121. declare dso_local noalias i8* @strdup(i8*) #1
  122. declare dso_local i32 @fprintf(%struct._IO_FILE*, i8*, ...) #2
  123. ; Function Attrs: noinline nounwind optnone uwtable
  124. define dso_local i32 @factorial(i32 %0) #0 !project_source !2 {
  125. %2 = alloca i32, align 4
  126. %3 = alloca i32, align 4
  127. %4 = alloca i32, align 4
  128. %5 = alloca i32, align 4
  129. store i32 %0, i32* %3, align 4
  130. %6 = load i32, i32* @recursionDepth, align 4
  131. %7 = add nsw i32 %6, 1
  132. store i32 %7, i32* @recursionDepth, align 4
  133. %8 = icmp sgt i32 %7, 1000
  134. br i1 %8, label %9, label %12
  135. 9: ; preds = %1
  136. call void @setErrorMessage(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
  137. %10 = load i32, i32* @recursionDepth, align 4
  138. %11 = add nsw i32 %10, -1
  139. store i32 %11, i32* @recursionDepth, align 4
  140. store i32 -1, i32* %2, align 4
  141. br label %53
  142. 12: ; preds = %1
  143. %13 = load i32, i32* %3, align 4
  144. %14 = icmp slt i32 %13, 0
  145. br i1 %14, label %15, label %18
  146. 15: ; preds = %12
  147. call void @setErrorMessage(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
  148. %16 = load i32, i32* @recursionDepth, align 4
  149. %17 = add nsw i32 %16, -1
  150. store i32 %17, i32* @recursionDepth, align 4
  151. store i32 -1, i32* %2, align 4
  152. br label %53
  153. 18: ; preds = %12
  154. %19 = load i32, i32* %3, align 4
  155. %20 = icmp sgt i32 %19, 20
  156. br i1 %20, label %21, label %24
  157. 21: ; preds = %18
  158. call void @setErrorMessage(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
  159. %22 = load i32, i32* @recursionDepth, align 4
  160. %23 = add nsw i32 %22, -1
  161. store i32 %23, i32* @recursionDepth, align 4
  162. store i32 -1, i32* %2, align 4
  163. br label %53
  164. 24: ; preds = %18
  165. %25 = load i32, i32* %3, align 4
  166. %26 = icmp sle i32 %25, 1
  167. br i1 %26, label %27, label %28
  168. 27: ; preds = %24
  169. store i32 1, i32* %4, align 4
  170. br label %49
  171. 28: ; preds = %24
  172. %29 = load i32, i32* %3, align 4
  173. %30 = sub nsw i32 %29, 1
  174. %31 = call i32 @factorial(i32 %30)
  175. store i32 %31, i32* %5, align 4
  176. %32 = load i32, i32* %5, align 4
  177. %33 = icmp eq i32 %32, -1
  178. br i1 %33, label %34, label %37
  179. 34: ; preds = %28
  180. %35 = load i32, i32* @recursionDepth, align 4
  181. %36 = add nsw i32 %35, -1
  182. store i32 %36, i32* @recursionDepth, align 4
  183. store i32 -1, i32* %2, align 4
  184. br label %53
  185. 37: ; preds = %28
  186. %38 = load i32, i32* %5, align 4
  187. %39 = load i32, i32* %3, align 4
  188. %40 = sdiv i32 2147483647, %39
  189. %41 = icmp sgt i32 %38, %40
  190. br i1 %41, label %42, label %45
  191. 42: ; preds = %37
  192. call void @setErrorMessage(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
  193. %43 = load i32, i32* @recursionDepth, align 4
  194. %44 = add nsw i32 %43, -1
  195. store i32 %44, i32* @recursionDepth, align 4
  196. store i32 -1, i32* %2, align 4
  197. br label %53
  198. 45: ; preds = %37
  199. %46 = load i32, i32* %3, align 4
  200. %47 = load i32, i32* %5, align 4
  201. %48 = mul nsw i32 %46, %47
  202. store i32 %48, i32* %4, align 4
  203. br label %49
  204. 49: ; preds = %45, %27
  205. %50 = load i32, i32* @recursionDepth, align 4
  206. %51 = add nsw i32 %50, -1
  207. store i32 %51, i32* @recursionDepth, align 4
  208. %52 = load i32, i32* %4, align 4
  209. store i32 %52, i32* %2, align 4
  210. br label %53
  211. 53: ; preds = %49, %42, %34, %21, %15, %9
  212. %54 = load i32, i32* %2, align 4
  213. ret i32 %54
  214. }
  215. ; Function Attrs: noinline nounwind optnone uwtable
  216. define dso_local %struct.DynamicArray* @createDynamicArray(i32 %0) #0 !project_source !2 {
  217. %2 = alloca %struct.DynamicArray*, align 8
  218. %3 = alloca i32, align 4
  219. %4 = alloca %struct.DynamicArray*, align 8
  220. store i32 %0, i32* %3, align 4
  221. %5 = load i32, i32* %3, align 4
  222. %6 = icmp sle i32 %5, 0
  223. br i1 %6, label %7, label %8
  224. 7: ; preds = %1
  225. call void @setErrorMessage(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
  226. store %struct.DynamicArray* null, %struct.DynamicArray** %2, align 8
  227. br label %44
  228. 8: ; preds = %1
  229. %9 = load i32, i32* %3, align 4
  230. %10 = icmp sgt i32 %9, 1000
  231. br i1 %10, label %11, label %12
  232. 11: ; preds = %8
  233. call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0))
  234. store %struct.DynamicArray* null, %struct.DynamicArray** %2, align 8
  235. br label %44
  236. 12: ; preds = %8
  237. %13 = call noalias i8* @malloc(i64 24) #7
  238. %14 = bitcast i8* %13 to %struct.DynamicArray*
  239. store %struct.DynamicArray* %14, %struct.DynamicArray** %4, align 8
  240. %15 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8
  241. %16 = icmp ne %struct.DynamicArray* %15, null
  242. br i1 %16, label %18, label %17
  243. 17: ; preds = %12
  244. call void @setErrorMessage(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0))
  245. store %struct.DynamicArray* null, %struct.DynamicArray** %2, align 8
  246. br label %44
  247. 18: ; preds = %12
  248. %19 = load i32, i32* %3, align 4
  249. %20 = sext i32 %19 to i64
  250. %21 = mul i64 4, %20
  251. %22 = call noalias i8* @malloc(i64 %21) #7
  252. %23 = bitcast i8* %22 to i32*
  253. %24 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8
  254. %25 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %24, i32 0, i32 0
  255. store i32* %23, i32** %25, align 8
  256. %26 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8
  257. %27 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %26, i32 0, i32 0
  258. %28 = load i32*, i32** %27, align 8
  259. %29 = icmp ne i32* %28, null
  260. br i1 %29, label %33, label %30
  261. 30: ; preds = %18
  262. %31 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8
  263. %32 = bitcast %struct.DynamicArray* %31 to i8*
  264. call void @free(i8* %32) #7
  265. call void @setErrorMessage(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
  266. store %struct.DynamicArray* null, %struct.DynamicArray** %2, align 8
  267. br label %44
  268. 33: ; preds = %18
  269. %34 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8
  270. %35 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %34, i32 0, i32 1
  271. store i32 0, i32* %35, align 8
  272. %36 = load i32, i32* %3, align 4
  273. %37 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8
  274. %38 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %37, i32 0, i32 2
  275. store i32 %36, i32* %38, align 4
  276. %39 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8
  277. %40 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %39, i32 0, i32 3
  278. store i32 1, i32* %40, align 8
  279. %41 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8
  280. %42 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %41, i32 0, i32 4
  281. store i32 0, i32* %42, align 4
  282. %43 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8
  283. store %struct.DynamicArray* %43, %struct.DynamicArray** %2, align 8
  284. br label %44
  285. 44: ; preds = %33, %30, %17, %11, %7
  286. %45 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  287. ret %struct.DynamicArray* %45
  288. }
  289. ; Function Attrs: nounwind
  290. declare dso_local noalias i8* @malloc(i64) #1
  291. ; Function Attrs: nounwind
  292. declare dso_local i8* @realloc(i8*, i64) #1
  293. ; Function Attrs: noinline nounwind optnone uwtable
  294. define dso_local void @quickSort(i32* %0, i32 %1, i32 %2, i32* %3) #0 !project_source !2 {
  295. %5 = alloca i32*, align 8
  296. %6 = alloca i32, align 4
  297. %7 = alloca i32, align 4
  298. %8 = alloca i32*, align 8
  299. %9 = alloca i32, align 4
  300. %10 = alloca i32, align 4
  301. %11 = alloca i32, align 4
  302. %12 = alloca i32, align 4
  303. %13 = alloca i32, align 4
  304. %14 = alloca i32, align 4
  305. store i32* %0, i32** %5, align 8
  306. store i32 %1, i32* %6, align 4
  307. store i32 %2, i32* %7, align 4
  308. store i32* %3, i32** %8, align 8
  309. %15 = load i32, i32* @recursionDepth, align 4
  310. %16 = add nsw i32 %15, 1
  311. store i32 %16, i32* @recursionDepth, align 4
  312. %17 = icmp sgt i32 %16, 1000
  313. br i1 %17, label %18, label %22
  314. 18: ; preds = %4
  315. call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.13, i64 0, i64 0))
  316. %19 = load i32*, i32** %8, align 8
  317. store i32 1, i32* %19, align 4
  318. %20 = load i32, i32* @recursionDepth, align 4
  319. %21 = add nsw i32 %20, -1
  320. store i32 %21, i32* @recursionDepth, align 4
  321. br label %247
  322. 22: ; preds = %4
  323. %23 = load i32*, i32** %5, align 8
  324. %24 = icmp ne i32* %23, null
  325. br i1 %24, label %29, label %25
  326. 25: ; preds = %22
  327. call void @setErrorMessage(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.14, i64 0, i64 0))
  328. %26 = load i32*, i32** %8, align 8
  329. store i32 1, i32* %26, align 4
  330. %27 = load i32, i32* @recursionDepth, align 4
  331. %28 = add nsw i32 %27, -1
  332. store i32 %28, i32* @recursionDepth, align 4
  333. br label %247
  334. 29: ; preds = %22
  335. %30 = load i32, i32* %6, align 4
  336. %31 = icmp slt i32 %30, 0
  337. br i1 %31, label %41, label %32
  338. 32: ; preds = %29
  339. %33 = load i32, i32* %7, align 4
  340. %34 = icmp slt i32 %33, 0
  341. br i1 %34, label %41, label %35
  342. 35: ; preds = %32
  343. %36 = load i32, i32* %6, align 4
  344. %37 = icmp sge i32 %36, 1000
  345. br i1 %37, label %41, label %38
  346. 38: ; preds = %35
  347. %39 = load i32, i32* %7, align 4
  348. %40 = icmp sge i32 %39, 1000
  349. br i1 %40, label %41, label %45
  350. 41: ; preds = %38, %35, %32, %29
  351. call void @setErrorMessage(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0))
  352. %42 = load i32*, i32** %8, align 8
  353. store i32 1, i32* %42, align 4
  354. %43 = load i32, i32* @recursionDepth, align 4
  355. %44 = add nsw i32 %43, -1
  356. store i32 %44, i32* @recursionDepth, align 4
  357. br label %247
  358. 45: ; preds = %38
  359. %46 = load i32, i32* %6, align 4
  360. %47 = load i32, i32* %7, align 4
  361. %48 = icmp slt i32 %46, %47
  362. br i1 %48, label %49, label %244
  363. 49: ; preds = %45
  364. %50 = load i32, i32* %6, align 4
  365. %51 = load i32, i32* %7, align 4
  366. %52 = load i32, i32* %6, align 4
  367. %53 = sub nsw i32 %51, %52
  368. %54 = sdiv i32 %53, 2
  369. %55 = add nsw i32 %50, %54
  370. store i32 %55, i32* %9, align 4
  371. %56 = load i32*, i32** %5, align 8
  372. %57 = load i32, i32* %6, align 4
  373. %58 = sext i32 %57 to i64
  374. %59 = getelementptr inbounds i32, i32* %56, i64 %58
  375. %60 = load i32, i32* %59, align 4
  376. %61 = load i32*, i32** %5, align 8
  377. %62 = load i32, i32* %9, align 4
  378. %63 = sext i32 %62 to i64
  379. %64 = getelementptr inbounds i32, i32* %61, i64 %63
  380. %65 = load i32, i32* %64, align 4
  381. %66 = icmp sle i32 %60, %65
  382. br i1 %66, label %67, label %99
  383. 67: ; preds = %49
  384. %68 = load i32*, i32** %5, align 8
  385. %69 = load i32, i32* %9, align 4
  386. %70 = sext i32 %69 to i64
  387. %71 = getelementptr inbounds i32, i32* %68, i64 %70
  388. %72 = load i32, i32* %71, align 4
  389. %73 = load i32*, i32** %5, align 8
  390. %74 = load i32, i32* %7, align 4
  391. %75 = sext i32 %74 to i64
  392. %76 = getelementptr inbounds i32, i32* %73, i64 %75
  393. %77 = load i32, i32* %76, align 4
  394. %78 = icmp sle i32 %72, %77
  395. br i1 %78, label %79, label %81
  396. 79: ; preds = %67
  397. %80 = load i32, i32* %9, align 4
  398. store i32 %80, i32* %10, align 4
  399. br label %98
  400. 81: ; preds = %67
  401. %82 = load i32*, i32** %5, align 8
  402. %83 = load i32, i32* %6, align 4
  403. %84 = sext i32 %83 to i64
  404. %85 = getelementptr inbounds i32, i32* %82, i64 %84
  405. %86 = load i32, i32* %85, align 4
  406. %87 = load i32*, i32** %5, align 8
  407. %88 = load i32, i32* %7, align 4
  408. %89 = sext i32 %88 to i64
  409. %90 = getelementptr inbounds i32, i32* %87, i64 %89
  410. %91 = load i32, i32* %90, align 4
  411. %92 = icmp sle i32 %86, %91
  412. br i1 %92, label %93, label %95
  413. 93: ; preds = %81
  414. %94 = load i32, i32* %7, align 4
  415. store i32 %94, i32* %10, align 4
  416. br label %97
  417. 95: ; preds = %81
  418. %96 = load i32, i32* %6, align 4
  419. store i32 %96, i32* %10, align 4
  420. br label %97
  421. 97: ; preds = %95, %93
  422. br label %98
  423. 98: ; preds = %97, %79
  424. br label %131
  425. 99: ; preds = %49
  426. %100 = load i32*, i32** %5, align 8
  427. %101 = load i32, i32* %6, align 4
  428. %102 = sext i32 %101 to i64
  429. %103 = getelementptr inbounds i32, i32* %100, i64 %102
  430. %104 = load i32, i32* %103, align 4
  431. %105 = load i32*, i32** %5, align 8
  432. %106 = load i32, i32* %7, align 4
  433. %107 = sext i32 %106 to i64
  434. %108 = getelementptr inbounds i32, i32* %105, i64 %107
  435. %109 = load i32, i32* %108, align 4
  436. %110 = icmp sle i32 %104, %109
  437. br i1 %110, label %111, label %113
  438. 111: ; preds = %99
  439. %112 = load i32, i32* %6, align 4
  440. store i32 %112, i32* %10, align 4
  441. br label %130
  442. 113: ; preds = %99
  443. %114 = load i32*, i32** %5, align 8
  444. %115 = load i32, i32* %9, align 4
  445. %116 = sext i32 %115 to i64
  446. %117 = getelementptr inbounds i32, i32* %114, i64 %116
  447. %118 = load i32, i32* %117, align 4
  448. %119 = load i32*, i32** %5, align 8
  449. %120 = load i32, i32* %7, align 4
  450. %121 = sext i32 %120 to i64
  451. %122 = getelementptr inbounds i32, i32* %119, i64 %121
  452. %123 = load i32, i32* %122, align 4
  453. %124 = icmp sle i32 %118, %123
  454. br i1 %124, label %125, label %127
  455. 125: ; preds = %113
  456. %126 = load i32, i32* %7, align 4
  457. store i32 %126, i32* %10, align 4
  458. br label %129
  459. 127: ; preds = %113
  460. %128 = load i32, i32* %9, align 4
  461. store i32 %128, i32* %10, align 4
  462. br label %129
  463. 129: ; preds = %127, %125
  464. br label %130
  465. 130: ; preds = %129, %111
  466. br label %131
  467. 131: ; preds = %130, %98
  468. %132 = load i32*, i32** %5, align 8
  469. %133 = load i32, i32* %7, align 4
  470. %134 = sext i32 %133 to i64
  471. %135 = getelementptr inbounds i32, i32* %132, i64 %134
  472. %136 = load i32, i32* %135, align 4
  473. store i32 %136, i32* %11, align 4
  474. %137 = load i32*, i32** %5, align 8
  475. %138 = load i32, i32* %10, align 4
  476. %139 = sext i32 %138 to i64
  477. %140 = getelementptr inbounds i32, i32* %137, i64 %139
  478. %141 = load i32, i32* %140, align 4
  479. %142 = load i32*, i32** %5, align 8
  480. %143 = load i32, i32* %7, align 4
  481. %144 = sext i32 %143 to i64
  482. %145 = getelementptr inbounds i32, i32* %142, i64 %144
  483. store i32 %141, i32* %145, align 4
  484. %146 = load i32, i32* %11, align 4
  485. %147 = load i32*, i32** %5, align 8
  486. %148 = load i32, i32* %10, align 4
  487. %149 = sext i32 %148 to i64
  488. %150 = getelementptr inbounds i32, i32* %147, i64 %149
  489. store i32 %146, i32* %150, align 4
  490. %151 = load i32*, i32** %5, align 8
  491. %152 = load i32, i32* %7, align 4
  492. %153 = sext i32 %152 to i64
  493. %154 = getelementptr inbounds i32, i32* %151, i64 %153
  494. %155 = load i32, i32* %154, align 4
  495. store i32 %155, i32* %12, align 4
  496. %156 = load i32, i32* %6, align 4
  497. %157 = sub nsw i32 %156, 1
  498. store i32 %157, i32* %13, align 4
  499. %158 = load i32, i32* %6, align 4
  500. store i32 %158, i32* %14, align 4
  501. br label %159
  502. 159: ; preds = %196, %131
  503. %160 = load i32, i32* %14, align 4
  504. %161 = load i32, i32* %7, align 4
  505. %162 = icmp slt i32 %160, %161
  506. br i1 %162, label %163, label %199
  507. 163: ; preds = %159
  508. %164 = load i32*, i32** %5, align 8
  509. %165 = load i32, i32* %14, align 4
  510. %166 = sext i32 %165 to i64
  511. %167 = getelementptr inbounds i32, i32* %164, i64 %166
  512. %168 = load i32, i32* %167, align 4
  513. %169 = load i32, i32* %12, align 4
  514. %170 = icmp sle i32 %168, %169
  515. br i1 %170, label %171, label %195
  516. 171: ; preds = %163
  517. %172 = load i32, i32* %13, align 4
  518. %173 = add nsw i32 %172, 1
  519. store i32 %173, i32* %13, align 4
  520. %174 = load i32*, i32** %5, align 8
  521. %175 = load i32, i32* %13, align 4
  522. %176 = sext i32 %175 to i64
  523. %177 = getelementptr inbounds i32, i32* %174, i64 %176
  524. %178 = load i32, i32* %177, align 4
  525. store i32 %178, i32* %11, align 4
  526. %179 = load i32*, i32** %5, align 8
  527. %180 = load i32, i32* %14, align 4
  528. %181 = sext i32 %180 to i64
  529. %182 = getelementptr inbounds i32, i32* %179, i64 %181
  530. %183 = load i32, i32* %182, align 4
  531. %184 = load i32*, i32** %5, align 8
  532. %185 = load i32, i32* %13, align 4
  533. %186 = sext i32 %185 to i64
  534. %187 = getelementptr inbounds i32, i32* %184, i64 %186
  535. store i32 %183, i32* %187, align 4
  536. %188 = load i32, i32* %11, align 4
  537. %189 = load i32*, i32** %5, align 8
  538. %190 = load i32, i32* %14, align 4
  539. %191 = sext i32 %190 to i64
  540. %192 = getelementptr inbounds i32, i32* %189, i64 %191
  541. store i32 %188, i32* %192, align 4
  542. %193 = load i32, i32* @globalCounter, align 4
  543. %194 = add nsw i32 %193, 1
  544. store i32 %194, i32* @globalCounter, align 4
  545. br label %195
  546. 195: ; preds = %171, %163
  547. br label %196
  548. 196: ; preds = %195
  549. %197 = load i32, i32* %14, align 4
  550. %198 = add nsw i32 %197, 1
  551. store i32 %198, i32* %14, align 4
  552. br label %159
  553. 199: ; preds = %159
  554. %200 = load i32*, i32** %5, align 8
  555. %201 = load i32, i32* %13, align 4
  556. %202 = add nsw i32 %201, 1
  557. %203 = sext i32 %202 to i64
  558. %204 = getelementptr inbounds i32, i32* %200, i64 %203
  559. %205 = load i32, i32* %204, align 4
  560. store i32 %205, i32* %11, align 4
  561. %206 = load i32*, i32** %5, align 8
  562. %207 = load i32, i32* %7, align 4
  563. %208 = sext i32 %207 to i64
  564. %209 = getelementptr inbounds i32, i32* %206, i64 %208
  565. %210 = load i32, i32* %209, align 4
  566. %211 = load i32*, i32** %5, align 8
  567. %212 = load i32, i32* %13, align 4
  568. %213 = add nsw i32 %212, 1
  569. %214 = sext i32 %213 to i64
  570. %215 = getelementptr inbounds i32, i32* %211, i64 %214
  571. store i32 %210, i32* %215, align 4
  572. %216 = load i32, i32* %11, align 4
  573. %217 = load i32*, i32** %5, align 8
  574. %218 = load i32, i32* %7, align 4
  575. %219 = sext i32 %218 to i64
  576. %220 = getelementptr inbounds i32, i32* %217, i64 %219
  577. store i32 %216, i32* %220, align 4
  578. %221 = load i32*, i32** %5, align 8
  579. %222 = load i32, i32* %6, align 4
  580. %223 = load i32, i32* %13, align 4
  581. %224 = load i32*, i32** %8, align 8
  582. call void @quickSort(i32* %221, i32 %222, i32 %223, i32* %224)
  583. %225 = load i32*, i32** %8, align 8
  584. %226 = load i32, i32* %225, align 4
  585. %227 = icmp ne i32 %226, 0
  586. br i1 %227, label %228, label %231
  587. 228: ; preds = %199
  588. %229 = load i32, i32* @recursionDepth, align 4
  589. %230 = add nsw i32 %229, -1
  590. store i32 %230, i32* @recursionDepth, align 4
  591. br label %247
  592. 231: ; preds = %199
  593. %232 = load i32*, i32** %5, align 8
  594. %233 = load i32, i32* %13, align 4
  595. %234 = add nsw i32 %233, 2
  596. %235 = load i32, i32* %7, align 4
  597. %236 = load i32*, i32** %8, align 8
  598. call void @quickSort(i32* %232, i32 %234, i32 %235, i32* %236)
  599. %237 = load i32*, i32** %8, align 8
  600. %238 = load i32, i32* %237, align 4
  601. %239 = icmp ne i32 %238, 0
  602. br i1 %239, label %240, label %243
  603. 240: ; preds = %231
  604. %241 = load i32, i32* @recursionDepth, align 4
  605. %242 = add nsw i32 %241, -1
  606. store i32 %242, i32* @recursionDepth, align 4
  607. br label %247
  608. 243: ; preds = %231
  609. br label %244
  610. 244: ; preds = %243, %45
  611. %245 = load i32, i32* @recursionDepth, align 4
  612. %246 = add nsw i32 %245, -1
  613. store i32 %246, i32* @recursionDepth, align 4
  614. br label %247
  615. 247: ; preds = %244, %240, %228, %41, %25, %18
  616. ret void
  617. }
  618. ; Function Attrs: noinline nounwind optnone uwtable
  619. define dso_local %struct.Matrix* @createMatrix(i32 %0, i32 %1) #0 !project_source !2 {
  620. %3 = alloca %struct.Matrix*, align 8
  621. %4 = alloca i32, align 4
  622. %5 = alloca i32, align 4
  623. %6 = alloca %struct.Matrix*, align 8
  624. %7 = alloca i32, align 4
  625. %8 = alloca i32, align 4
  626. store i32 %0, i32* %4, align 4
  627. store i32 %1, i32* %5, align 4
  628. %9 = load i32, i32* %4, align 4
  629. %10 = icmp slt i32 %9, 1
  630. br i1 %10, label %14, label %11
  631. 11: ; preds = %2
  632. %12 = load i32, i32* %5, align 4
  633. %13 = icmp slt i32 %12, 1
  634. br i1 %13, label %14, label %15
  635. 14: ; preds = %11, %2
  636. call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))
  637. store %struct.Matrix* null, %struct.Matrix** %3, align 8
  638. br label %111
  639. 15: ; preds = %11
  640. %16 = load i32, i32* %4, align 4
  641. %17 = icmp sgt i32 %16, 100
  642. br i1 %17, label %21, label %18
  643. 18: ; preds = %15
  644. %19 = load i32, i32* %5, align 4
  645. %20 = icmp sgt i32 %19, 100
  646. br i1 %20, label %21, label %22
  647. 21: ; preds = %18, %15
  648. call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))
  649. store %struct.Matrix* null, %struct.Matrix** %3, align 8
  650. br label %111
  651. 22: ; preds = %18
  652. %23 = call noalias i8* @malloc(i64 32) #7
  653. %24 = bitcast i8* %23 to %struct.Matrix*
  654. store %struct.Matrix* %24, %struct.Matrix** %6, align 8
  655. %25 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  656. %26 = icmp ne %struct.Matrix* %25, null
  657. br i1 %26, label %28, label %27
  658. 27: ; preds = %22
  659. call void @setErrorMessage(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.18, i64 0, i64 0))
  660. store %struct.Matrix* null, %struct.Matrix** %3, align 8
  661. br label %111
  662. 28: ; preds = %22
  663. %29 = load i32, i32* %4, align 4
  664. %30 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  665. %31 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %30, i32 0, i32 1
  666. store i32 %29, i32* %31, align 8
  667. %32 = load i32, i32* %5, align 4
  668. %33 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  669. %34 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %33, i32 0, i32 2
  670. store i32 %32, i32* %34, align 4
  671. %35 = load i32, i32* %4, align 4
  672. %36 = load i32, i32* %5, align 4
  673. %37 = icmp eq i32 %35, %36
  674. %38 = zext i1 %37 to i32
  675. %39 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  676. %40 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %39, i32 0, i32 3
  677. store i32 %38, i32* %40, align 8
  678. %41 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  679. %42 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %41, i32 0, i32 4
  680. store double 0.000000e+00, double* %42, align 8
  681. %43 = load i32, i32* %4, align 4
  682. %44 = sext i32 %43 to i64
  683. %45 = mul i64 %44, 8
  684. %46 = call noalias i8* @malloc(i64 %45) #7
  685. %47 = bitcast i8* %46 to i32**
  686. %48 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  687. %49 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %48, i32 0, i32 0
  688. store i32** %47, i32*** %49, align 8
  689. %50 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  690. %51 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %50, i32 0, i32 0
  691. %52 = load i32**, i32*** %51, align 8
  692. %53 = icmp ne i32** %52, null
  693. br i1 %53, label %57, label %54
  694. 54: ; preds = %28
  695. %55 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  696. %56 = bitcast %struct.Matrix* %55 to i8*
  697. call void @free(i8* %56) #7
  698. call void @setErrorMessage(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.19, i64 0, i64 0))
  699. store %struct.Matrix* null, %struct.Matrix** %3, align 8
  700. br label %111
  701. 57: ; preds = %28
  702. store i32 0, i32* %7, align 4
  703. br label %58
  704. 58: ; preds = %106, %57
  705. %59 = load i32, i32* %7, align 4
  706. %60 = load i32, i32* %4, align 4
  707. %61 = icmp slt i32 %59, %60
  708. br i1 %61, label %62, label %109
  709. 62: ; preds = %58
  710. %63 = load i32, i32* %5, align 4
  711. %64 = sext i32 %63 to i64
  712. %65 = call noalias i8* @calloc(i64 %64, i64 4) #7
  713. %66 = bitcast i8* %65 to i32*
  714. %67 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  715. %68 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %67, i32 0, i32 0
  716. %69 = load i32**, i32*** %68, align 8
  717. %70 = load i32, i32* %7, align 4
  718. %71 = sext i32 %70 to i64
  719. %72 = getelementptr inbounds i32*, i32** %69, i64 %71
  720. store i32* %66, i32** %72, align 8
  721. %73 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  722. %74 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %73, i32 0, i32 0
  723. %75 = load i32**, i32*** %74, align 8
  724. %76 = load i32, i32* %7, align 4
  725. %77 = sext i32 %76 to i64
  726. %78 = getelementptr inbounds i32*, i32** %75, i64 %77
  727. %79 = load i32*, i32** %78, align 8
  728. %80 = icmp ne i32* %79, null
  729. br i1 %80, label %105, label %81
  730. 81: ; preds = %62
  731. store i32 0, i32* %8, align 4
  732. br label %82
  733. 82: ; preds = %95, %81
  734. %83 = load i32, i32* %8, align 4
  735. %84 = load i32, i32* %7, align 4
  736. %85 = icmp slt i32 %83, %84
  737. br i1 %85, label %86, label %98
  738. 86: ; preds = %82
  739. %87 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  740. %88 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %87, i32 0, i32 0
  741. %89 = load i32**, i32*** %88, align 8
  742. %90 = load i32, i32* %8, align 4
  743. %91 = sext i32 %90 to i64
  744. %92 = getelementptr inbounds i32*, i32** %89, i64 %91
  745. %93 = load i32*, i32** %92, align 8
  746. %94 = bitcast i32* %93 to i8*
  747. call void @free(i8* %94) #7
  748. br label %95
  749. 95: ; preds = %86
  750. %96 = load i32, i32* %8, align 4
  751. %97 = add nsw i32 %96, 1
  752. store i32 %97, i32* %8, align 4
  753. br label %82
  754. 98: ; preds = %82
  755. %99 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  756. %100 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %99, i32 0, i32 0
  757. %101 = load i32**, i32*** %100, align 8
  758. %102 = bitcast i32** %101 to i8*
  759. call void @free(i8* %102) #7
  760. %103 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  761. %104 = bitcast %struct.Matrix* %103 to i8*
  762. call void @free(i8* %104) #7
  763. call void @setErrorMessage(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.20, i64 0, i64 0))
  764. store %struct.Matrix* null, %struct.Matrix** %3, align 8
  765. br label %111
  766. 105: ; preds = %62
  767. br label %106
  768. 106: ; preds = %105
  769. %107 = load i32, i32* %7, align 4
  770. %108 = add nsw i32 %107, 1
  771. store i32 %108, i32* %7, align 4
  772. br label %58
  773. 109: ; preds = %58
  774. %110 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  775. store %struct.Matrix* %110, %struct.Matrix** %3, align 8
  776. br label %111
  777. 111: ; preds = %109, %98, %54, %27, %21, %14
  778. %112 = load %struct.Matrix*, %struct.Matrix** %3, align 8
  779. ret %struct.Matrix* %112
  780. }
  781. ; Function Attrs: nounwind
  782. declare dso_local noalias i8* @calloc(i64, i64) #1
  783. ; Function Attrs: nounwind readnone
  784. declare dso_local i32 @abs(i32) #3
  785. ; Function Attrs: noinline nounwind optnone uwtable
  786. define dso_local %struct.Node* @insertNode(%struct.Node* %0, i32 %1) #0 !project_source !2 {
  787. %3 = alloca %struct.Node*, align 8
  788. %4 = alloca %struct.Node*, align 8
  789. %5 = alloca i32, align 4
  790. %6 = alloca %struct.Node*, align 8
  791. %7 = alloca %struct.Node*, align 8
  792. %8 = alloca %struct.Node*, align 8
  793. %9 = alloca i32, align 4
  794. store %struct.Node* %0, %struct.Node** %4, align 8
  795. store i32 %1, i32* %5, align 4
  796. %10 = call noalias i8* @malloc(i64 32) #7
  797. %11 = bitcast i8* %10 to %struct.Node*
  798. store %struct.Node* %11, %struct.Node** %6, align 8
  799. %12 = load %struct.Node*, %struct.Node** %6, align 8
  800. %13 = icmp ne %struct.Node* %12, null
  801. br i1 %13, label %16, label %14
  802. 14: ; preds = %2
  803. call void @setErrorMessage(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.25, i64 0, i64 0))
  804. %15 = load %struct.Node*, %struct.Node** %4, align 8
  805. store %struct.Node* %15, %struct.Node** %3, align 8
  806. br label %92
  807. 16: ; preds = %2
  808. %17 = load i32, i32* %5, align 4
  809. %18 = load %struct.Node*, %struct.Node** %6, align 8
  810. %19 = getelementptr inbounds %struct.Node, %struct.Node* %18, i32 0, i32 0
  811. store i32 %17, i32* %19, align 8
  812. %20 = load %struct.Node*, %struct.Node** %6, align 8
  813. %21 = getelementptr inbounds %struct.Node, %struct.Node* %20, i32 0, i32 1
  814. store %struct.Node* null, %struct.Node** %21, align 8
  815. %22 = load %struct.Node*, %struct.Node** %6, align 8
  816. %23 = getelementptr inbounds %struct.Node, %struct.Node* %22, i32 0, i32 2
  817. store %struct.Node* null, %struct.Node** %23, align 8
  818. %24 = load %struct.Node*, %struct.Node** %6, align 8
  819. %25 = getelementptr inbounds %struct.Node, %struct.Node* %24, i32 0, i32 3
  820. store i32 0, i32* %25, align 8
  821. %26 = load %struct.Node*, %struct.Node** %4, align 8
  822. %27 = icmp ne %struct.Node* %26, null
  823. br i1 %27, label %32, label %28
  824. 28: ; preds = %16
  825. %29 = load %struct.Node*, %struct.Node** %6, align 8
  826. %30 = getelementptr inbounds %struct.Node, %struct.Node* %29, i32 0, i32 4
  827. store i32 0, i32* %30, align 4
  828. store i32 0, i32* @insertNode.maxDepth, align 4
  829. %31 = load %struct.Node*, %struct.Node** %6, align 8
  830. store %struct.Node* %31, %struct.Node** %3, align 8
  831. br label %92
  832. 32: ; preds = %16
  833. %33 = load %struct.Node*, %struct.Node** %4, align 8
  834. store %struct.Node* %33, %struct.Node** %7, align 8
  835. store %struct.Node* null, %struct.Node** %8, align 8
  836. store i32 0, i32* %9, align 4
  837. br label %34
  838. 34: ; preds = %58, %32
  839. %35 = load %struct.Node*, %struct.Node** %7, align 8
  840. %36 = icmp ne %struct.Node* %35, null
  841. br i1 %36, label %37, label %43
  842. 37: ; preds = %34
  843. %38 = load %struct.Node*, %struct.Node** %7, align 8
  844. %39 = getelementptr inbounds %struct.Node, %struct.Node* %38, i32 0, i32 0
  845. %40 = load i32, i32* %39, align 8
  846. %41 = load i32, i32* %5, align 4
  847. %42 = icmp slt i32 %40, %41
  848. br label %43
  849. 43: ; preds = %37, %34
  850. %44 = phi i1 [ false, %34 ], [ %42, %37 ]
  851. br i1 %44, label %45, label %59
  852. 45: ; preds = %43
  853. %46 = load %struct.Node*, %struct.Node** %7, align 8
  854. store %struct.Node* %46, %struct.Node** %8, align 8
  855. %47 = load %struct.Node*, %struct.Node** %7, align 8
  856. %48 = getelementptr inbounds %struct.Node, %struct.Node* %47, i32 0, i32 1
  857. %49 = load %struct.Node*, %struct.Node** %48, align 8
  858. store %struct.Node* %49, %struct.Node** %7, align 8
  859. %50 = load i32, i32* %9, align 4
  860. %51 = add nsw i32 %50, 1
  861. store i32 %51, i32* %9, align 4
  862. %52 = load i32, i32* %9, align 4
  863. %53 = icmp sgt i32 %52, 1000
  864. br i1 %53, label %54, label %58
  865. 54: ; preds = %45
  866. call void @setErrorMessage(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.26, i64 0, i64 0))
  867. %55 = load %struct.Node*, %struct.Node** %6, align 8
  868. %56 = bitcast %struct.Node* %55 to i8*
  869. call void @free(i8* %56) #7
  870. %57 = load %struct.Node*, %struct.Node** %4, align 8
  871. store %struct.Node* %57, %struct.Node** %3, align 8
  872. br label %92
  873. 58: ; preds = %45
  874. br label %34
  875. 59: ; preds = %43
  876. %60 = load i32, i32* %9, align 4
  877. %61 = load i32, i32* @insertNode.maxDepth, align 4
  878. %62 = icmp sgt i32 %60, %61
  879. br i1 %62, label %63, label %65
  880. 63: ; preds = %59
  881. %64 = load i32, i32* %9, align 4
  882. store i32 %64, i32* @insertNode.maxDepth, align 4
  883. br label %65
  884. 65: ; preds = %63, %59
  885. %66 = load i32, i32* %9, align 4
  886. %67 = load %struct.Node*, %struct.Node** %6, align 8
  887. %68 = getelementptr inbounds %struct.Node, %struct.Node* %67, i32 0, i32 4
  888. store i32 %66, i32* %68, align 4
  889. %69 = load %struct.Node*, %struct.Node** %7, align 8
  890. %70 = load %struct.Node*, %struct.Node** %6, align 8
  891. %71 = getelementptr inbounds %struct.Node, %struct.Node* %70, i32 0, i32 1
  892. store %struct.Node* %69, %struct.Node** %71, align 8
  893. %72 = load %struct.Node*, %struct.Node** %8, align 8
  894. %73 = icmp ne %struct.Node* %72, null
  895. br i1 %73, label %74, label %81
  896. 74: ; preds = %65
  897. %75 = load %struct.Node*, %struct.Node** %6, align 8
  898. %76 = load %struct.Node*, %struct.Node** %8, align 8
  899. %77 = getelementptr inbounds %struct.Node, %struct.Node* %76, i32 0, i32 1
  900. store %struct.Node* %75, %struct.Node** %77, align 8
  901. %78 = load %struct.Node*, %struct.Node** %8, align 8
  902. %79 = load %struct.Node*, %struct.Node** %6, align 8
  903. %80 = getelementptr inbounds %struct.Node, %struct.Node* %79, i32 0, i32 2
  904. store %struct.Node* %78, %struct.Node** %80, align 8
  905. br label %83
  906. 81: ; preds = %65
  907. %82 = load %struct.Node*, %struct.Node** %6, align 8
  908. store %struct.Node* %82, %struct.Node** %3, align 8
  909. br label %92
  910. 83: ; preds = %74
  911. %84 = load %struct.Node*, %struct.Node** %7, align 8
  912. %85 = icmp ne %struct.Node* %84, null
  913. br i1 %85, label %86, label %90
  914. 86: ; preds = %83
  915. %87 = load %struct.Node*, %struct.Node** %6, align 8
  916. %88 = load %struct.Node*, %struct.Node** %7, align 8
  917. %89 = getelementptr inbounds %struct.Node, %struct.Node* %88, i32 0, i32 2
  918. store %struct.Node* %87, %struct.Node** %89, align 8
  919. br label %90
  920. 90: ; preds = %86, %83
  921. %91 = load %struct.Node*, %struct.Node** %4, align 8
  922. store %struct.Node* %91, %struct.Node** %3, align 8
  923. br label %92
  924. 92: ; preds = %90, %81, %54, %28, %14
  925. %93 = load %struct.Node*, %struct.Node** %3, align 8
  926. ret %struct.Node* %93
  927. }
  928. declare dso_local i32 @printf(i8*, ...) #2
  929. ; Function Attrs: noinline nounwind optnone uwtable
  930. define dso_local i32 @projectA_main() #0 !project_source !2 {
  931. %1 = alloca i32, align 4
  932. %2 = alloca %struct.DynamicArray*, align 8
  933. %3 = alloca i32, align 4
  934. %4 = alloca %struct.Matrix*, align 8
  935. %5 = alloca %struct.Matrix*, align 8
  936. %6 = alloca i32, align 4
  937. %7 = alloca i32, align 4
  938. %8 = alloca %struct.Matrix*, align 8
  939. %9 = alloca i32, align 4
  940. %10 = alloca %struct.Node*, align 8
  941. %11 = alloca i32, align 4
  942. %12 = alloca i32, align 4
  943. %13 = alloca %struct.Node*, align 8
  944. %14 = alloca %struct.Node*, align 8
  945. %15 = alloca i32, align 4
  946. %16 = alloca %struct.Node*, align 8
  947. %17 = alloca i32, align 4
  948. %18 = alloca i32, align 4
  949. %19 = alloca %struct.Node*, align 8
  950. %20 = call i64 @time(i64* null) #7
  951. %21 = trunc i64 %20 to i32
  952. call void @srand(i32 %21) #7
  953. %22 = call %struct.DynamicArray* @createDynamicArray(i32 10)
  954. store %struct.DynamicArray* %22, %struct.DynamicArray** %2, align 8
  955. %23 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  956. %24 = icmp ne %struct.DynamicArray* %23, null
  957. br i1 %24, label %28, label %25
  958. 25: ; preds = %0
  959. %26 = call i8* @fused_getErrorMessage(i1 false, i8* null)
  960. %27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.28, i64 0, i64 0), i8* %26)
  961. store i32 -1, i32* %1, align 4
  962. br label %324
  963. 28: ; preds = %0
  964. store i32 0, i32* %3, align 4
  965. br label %29
  966. 29: ; preds = %43, %28
  967. %30 = load i32, i32* %3, align 4
  968. %31 = icmp slt i32 %30, 15
  969. br i1 %31, label %32, label %46
  970. 32: ; preds = %29
  971. %33 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  972. %34 = call i32 @rand() #7
  973. %35 = srem i32 %34, 100
  974. %36 = call i32 @fused_pushBack(i1 false, %struct.DynamicArray* %33, i32 %35)
  975. %37 = load i8*, i8** @globalErrorMessage, align 8
  976. %38 = icmp ne i8* %37, null
  977. br i1 %38, label %39, label %42
  978. 39: ; preds = %32
  979. %40 = call i8* @fused_getErrorMessage(i1 false, i8* null)
  980. %41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.29, i64 0, i64 0), i8* %40)
  981. br label %46
  982. 42: ; preds = %32
  983. br label %43
  984. 43: ; preds = %42
  985. %44 = load i32, i32* %3, align 4
  986. %45 = add nsw i32 %44, 1
  987. store i32 %45, i32* %3, align 4
  988. br label %29
  989. 46: ; preds = %39, %29
  990. %47 = call %struct.Matrix* @createMatrix(i32 3, i32 3)
  991. store %struct.Matrix* %47, %struct.Matrix** %4, align 8
  992. %48 = call %struct.Matrix* @createMatrix(i32 3, i32 3)
  993. store %struct.Matrix* %48, %struct.Matrix** %5, align 8
  994. %49 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  995. %50 = icmp ne %struct.Matrix* %49, null
  996. br i1 %50, label %51, label %54
  997. 51: ; preds = %46
  998. %52 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  999. %53 = icmp ne %struct.Matrix* %52, null
  1000. br i1 %53, label %75, label %54
  1001. 54: ; preds = %51, %46
  1002. %55 = call i8* @fused_getErrorMessage(i1 false, i8* null)
  1003. %56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.28, i64 0, i64 0), i8* %55)
  1004. %57 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  1005. %58 = icmp ne %struct.Matrix* %57, null
  1006. br i1 %58, label %59, label %62
  1007. 59: ; preds = %54
  1008. %60 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  1009. %61 = bitcast %struct.Matrix* %60 to i8*
  1010. call void @free(i8* %61) #7
  1011. br label %62
  1012. 62: ; preds = %59, %54
  1013. %63 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  1014. %64 = icmp ne %struct.Matrix* %63, null
  1015. br i1 %64, label %65, label %68
  1016. 65: ; preds = %62
  1017. %66 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  1018. %67 = bitcast %struct.Matrix* %66 to i8*
  1019. call void @free(i8* %67) #7
  1020. br label %68
  1021. 68: ; preds = %65, %62
  1022. %69 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1023. %70 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %69, i32 0, i32 0
  1024. %71 = load i32*, i32** %70, align 8
  1025. %72 = bitcast i32* %71 to i8*
  1026. call void @free(i8* %72) #7
  1027. %73 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1028. %74 = bitcast %struct.DynamicArray* %73 to i8*
  1029. call void @free(i8* %74) #7
  1030. store i32 -1, i32* %1, align 4
  1031. br label %324
  1032. 75: ; preds = %51
  1033. store i32 0, i32* %6, align 4
  1034. br label %76
  1035. 76: ; preds = %112, %75
  1036. %77 = load i32, i32* %6, align 4
  1037. %78 = icmp slt i32 %77, 3
  1038. br i1 %78, label %79, label %115
  1039. 79: ; preds = %76
  1040. store i32 0, i32* %7, align 4
  1041. br label %80
  1042. 80: ; preds = %108, %79
  1043. %81 = load i32, i32* %7, align 4
  1044. %82 = icmp slt i32 %81, 3
  1045. br i1 %82, label %83, label %111
  1046. 83: ; preds = %80
  1047. %84 = call i32 @rand() #7
  1048. %85 = srem i32 %84, 10
  1049. %86 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  1050. %87 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %86, i32 0, i32 0
  1051. %88 = load i32**, i32*** %87, align 8
  1052. %89 = load i32, i32* %6, align 4
  1053. %90 = sext i32 %89 to i64
  1054. %91 = getelementptr inbounds i32*, i32** %88, i64 %90
  1055. %92 = load i32*, i32** %91, align 8
  1056. %93 = load i32, i32* %7, align 4
  1057. %94 = sext i32 %93 to i64
  1058. %95 = getelementptr inbounds i32, i32* %92, i64 %94
  1059. store i32 %85, i32* %95, align 4
  1060. %96 = call i32 @rand() #7
  1061. %97 = srem i32 %96, 10
  1062. %98 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  1063. %99 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %98, i32 0, i32 0
  1064. %100 = load i32**, i32*** %99, align 8
  1065. %101 = load i32, i32* %6, align 4
  1066. %102 = sext i32 %101 to i64
  1067. %103 = getelementptr inbounds i32*, i32** %100, i64 %102
  1068. %104 = load i32*, i32** %103, align 8
  1069. %105 = load i32, i32* %7, align 4
  1070. %106 = sext i32 %105 to i64
  1071. %107 = getelementptr inbounds i32, i32* %104, i64 %106
  1072. store i32 %97, i32* %107, align 4
  1073. br label %108
  1074. 108: ; preds = %83
  1075. %109 = load i32, i32* %7, align 4
  1076. %110 = add nsw i32 %109, 1
  1077. store i32 %110, i32* %7, align 4
  1078. br label %80
  1079. 111: ; preds = %80
  1080. br label %112
  1081. 112: ; preds = %111
  1082. %113 = load i32, i32* %6, align 4
  1083. %114 = add nsw i32 %113, 1
  1084. store i32 %114, i32* %6, align 4
  1085. br label %76
  1086. 115: ; preds = %76
  1087. %116 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  1088. %117 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  1089. %118 = call %fused_return_multiplyMatrices_testPoints @fused_multiplyMatrices(i1 false, %struct.Matrix* %116, %struct.Matrix* %117, i32 0)
  1090. %extracted_bunker_return = extractvalue %fused_return_multiplyMatrices_testPoints %118, 1
  1091. store %struct.Matrix* %extracted_bunker_return, %struct.Matrix** %8, align 8
  1092. %119 = load %struct.Matrix*, %struct.Matrix** %8, align 8
  1093. %120 = icmp ne %struct.Matrix* %119, null
  1094. br i1 %120, label %169, label %121
  1095. 121: ; preds = %115
  1096. %122 = call i8* @fused_getErrorMessage(i1 false, i8* null)
  1097. %123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.28, i64 0, i64 0), i8* %122)
  1098. store i32 0, i32* %9, align 4
  1099. br label %124
  1100. 124: ; preds = %147, %121
  1101. %125 = load i32, i32* %9, align 4
  1102. %126 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  1103. %127 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %126, i32 0, i32 1
  1104. %128 = load i32, i32* %127, align 8
  1105. %129 = icmp slt i32 %125, %128
  1106. br i1 %129, label %130, label %150
  1107. 130: ; preds = %124
  1108. %131 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  1109. %132 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %131, i32 0, i32 0
  1110. %133 = load i32**, i32*** %132, align 8
  1111. %134 = load i32, i32* %9, align 4
  1112. %135 = sext i32 %134 to i64
  1113. %136 = getelementptr inbounds i32*, i32** %133, i64 %135
  1114. %137 = load i32*, i32** %136, align 8
  1115. %138 = bitcast i32* %137 to i8*
  1116. call void @free(i8* %138) #7
  1117. %139 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  1118. %140 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %139, i32 0, i32 0
  1119. %141 = load i32**, i32*** %140, align 8
  1120. %142 = load i32, i32* %9, align 4
  1121. %143 = sext i32 %142 to i64
  1122. %144 = getelementptr inbounds i32*, i32** %141, i64 %143
  1123. %145 = load i32*, i32** %144, align 8
  1124. %146 = bitcast i32* %145 to i8*
  1125. call void @free(i8* %146) #7
  1126. br label %147
  1127. 147: ; preds = %130
  1128. %148 = load i32, i32* %9, align 4
  1129. %149 = add nsw i32 %148, 1
  1130. store i32 %149, i32* %9, align 4
  1131. br label %124
  1132. 150: ; preds = %124
  1133. %151 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  1134. %152 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %151, i32 0, i32 0
  1135. %153 = load i32**, i32*** %152, align 8
  1136. %154 = bitcast i32** %153 to i8*
  1137. call void @free(i8* %154) #7
  1138. %155 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  1139. %156 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %155, i32 0, i32 0
  1140. %157 = load i32**, i32*** %156, align 8
  1141. %158 = bitcast i32** %157 to i8*
  1142. call void @free(i8* %158) #7
  1143. %159 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  1144. %160 = bitcast %struct.Matrix* %159 to i8*
  1145. call void @free(i8* %160) #7
  1146. %161 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  1147. %162 = bitcast %struct.Matrix* %161 to i8*
  1148. call void @free(i8* %162) #7
  1149. %163 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1150. %164 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %163, i32 0, i32 0
  1151. %165 = load i32*, i32** %164, align 8
  1152. %166 = bitcast i32* %165 to i8*
  1153. call void @free(i8* %166) #7
  1154. %167 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1155. %168 = bitcast %struct.DynamicArray* %167 to i8*
  1156. call void @free(i8* %168) #7
  1157. store i32 -1, i32* %1, align 4
  1158. br label %324
  1159. 169: ; preds = %115
  1160. store %struct.Node* null, %struct.Node** %10, align 8
  1161. store i32 0, i32* %11, align 4
  1162. br label %170
  1163. 170: ; preds = %184, %169
  1164. %171 = load i32, i32* %11, align 4
  1165. %172 = icmp slt i32 %171, 5
  1166. br i1 %172, label %173, label %187
  1167. 173: ; preds = %170
  1168. %174 = load %struct.Node*, %struct.Node** %10, align 8
  1169. %175 = call i32 @rand() #7
  1170. %176 = srem i32 %175, 50
  1171. %177 = call %struct.Node* @insertNode(%struct.Node* %174, i32 %176)
  1172. store %struct.Node* %177, %struct.Node** %10, align 8
  1173. %178 = load i8*, i8** @globalErrorMessage, align 8
  1174. %179 = icmp ne i8* %178, null
  1175. br i1 %179, label %180, label %183
  1176. 180: ; preds = %173
  1177. %181 = call i8* @fused_getErrorMessage(i1 false, i8* null)
  1178. %182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.30, i64 0, i64 0), i8* %181)
  1179. br label %187
  1180. 183: ; preds = %173
  1181. br label %184
  1182. 184: ; preds = %183
  1183. %185 = load i32, i32* %11, align 4
  1184. %186 = add nsw i32 %185, 1
  1185. store i32 %186, i32* %11, align 4
  1186. br label %170
  1187. 187: ; preds = %180, %170
  1188. %188 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1189. %189 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %188, i32 0, i32 0
  1190. %190 = load i32*, i32** %189, align 8
  1191. %191 = bitcast i32* %190 to i8*
  1192. call void @free(i8* %191) #7
  1193. %192 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1194. %193 = bitcast %struct.DynamicArray* %192 to i8*
  1195. call void @free(i8* %193) #7
  1196. store i32 0, i32* %12, align 4
  1197. br label %194
  1198. 194: ; preds = %225, %187
  1199. %195 = load i32, i32* %12, align 4
  1200. %196 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  1201. %197 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %196, i32 0, i32 1
  1202. %198 = load i32, i32* %197, align 8
  1203. %199 = icmp slt i32 %195, %198
  1204. br i1 %199, label %200, label %228
  1205. 200: ; preds = %194
  1206. %201 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  1207. %202 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %201, i32 0, i32 0
  1208. %203 = load i32**, i32*** %202, align 8
  1209. %204 = load i32, i32* %12, align 4
  1210. %205 = sext i32 %204 to i64
  1211. %206 = getelementptr inbounds i32*, i32** %203, i64 %205
  1212. %207 = load i32*, i32** %206, align 8
  1213. %208 = bitcast i32* %207 to i8*
  1214. call void @free(i8* %208) #7
  1215. %209 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  1216. %210 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %209, i32 0, i32 0
  1217. %211 = load i32**, i32*** %210, align 8
  1218. %212 = load i32, i32* %12, align 4
  1219. %213 = sext i32 %212 to i64
  1220. %214 = getelementptr inbounds i32*, i32** %211, i64 %213
  1221. %215 = load i32*, i32** %214, align 8
  1222. %216 = bitcast i32* %215 to i8*
  1223. call void @free(i8* %216) #7
  1224. %217 = load %struct.Matrix*, %struct.Matrix** %8, align 8
  1225. %218 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %217, i32 0, i32 0
  1226. %219 = load i32**, i32*** %218, align 8
  1227. %220 = load i32, i32* %12, align 4
  1228. %221 = sext i32 %220 to i64
  1229. %222 = getelementptr inbounds i32*, i32** %219, i64 %221
  1230. %223 = load i32*, i32** %222, align 8
  1231. %224 = bitcast i32* %223 to i8*
  1232. call void @free(i8* %224) #7
  1233. br label %225
  1234. 225: ; preds = %200
  1235. %226 = load i32, i32* %12, align 4
  1236. %227 = add nsw i32 %226, 1
  1237. store i32 %227, i32* %12, align 4
  1238. br label %194
  1239. 228: ; preds = %194
  1240. %229 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  1241. %230 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %229, i32 0, i32 0
  1242. %231 = load i32**, i32*** %230, align 8
  1243. %232 = bitcast i32** %231 to i8*
  1244. call void @free(i8* %232) #7
  1245. %233 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  1246. %234 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %233, i32 0, i32 0
  1247. %235 = load i32**, i32*** %234, align 8
  1248. %236 = bitcast i32** %235 to i8*
  1249. call void @free(i8* %236) #7
  1250. %237 = load %struct.Matrix*, %struct.Matrix** %8, align 8
  1251. %238 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %237, i32 0, i32 0
  1252. %239 = load i32**, i32*** %238, align 8
  1253. %240 = bitcast i32** %239 to i8*
  1254. call void @free(i8* %240) #7
  1255. %241 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  1256. %242 = bitcast %struct.Matrix* %241 to i8*
  1257. call void @free(i8* %242) #7
  1258. %243 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  1259. %244 = bitcast %struct.Matrix* %243 to i8*
  1260. call void @free(i8* %244) #7
  1261. %245 = load %struct.Matrix*, %struct.Matrix** %8, align 8
  1262. %246 = bitcast %struct.Matrix* %245 to i8*
  1263. call void @free(i8* %246) #7
  1264. %247 = load %struct.Node*, %struct.Node** %10, align 8
  1265. %248 = icmp ne %struct.Node* %247, null
  1266. br i1 %248, label %249, label %317
  1267. 249: ; preds = %228
  1268. %250 = load %struct.Node*, %struct.Node** %10, align 8
  1269. store %struct.Node* %250, %struct.Node** %13, align 8
  1270. %251 = load %struct.Node*, %struct.Node** %10, align 8
  1271. store %struct.Node* %251, %struct.Node** %14, align 8
  1272. store i32 0, i32* %15, align 4
  1273. br label %252
  1274. 252: ; preds = %275, %249
  1275. %253 = load %struct.Node*, %struct.Node** %14, align 8
  1276. %254 = icmp ne %struct.Node* %253, null
  1277. br i1 %254, label %255, label %260
  1278. 255: ; preds = %252
  1279. %256 = load %struct.Node*, %struct.Node** %14, align 8
  1280. %257 = getelementptr inbounds %struct.Node, %struct.Node* %256, i32 0, i32 1
  1281. %258 = load %struct.Node*, %struct.Node** %257, align 8
  1282. %259 = icmp ne %struct.Node* %258, null
  1283. br label %260
  1284. 260: ; preds = %255, %252
  1285. %261 = phi i1 [ false, %252 ], [ %259, %255 ]
  1286. br i1 %261, label %262, label %276
  1287. 262: ; preds = %260
  1288. %263 = load %struct.Node*, %struct.Node** %13, align 8
  1289. %264 = getelementptr inbounds %struct.Node, %struct.Node* %263, i32 0, i32 1
  1290. %265 = load %struct.Node*, %struct.Node** %264, align 8
  1291. store %struct.Node* %265, %struct.Node** %13, align 8
  1292. %266 = load %struct.Node*, %struct.Node** %14, align 8
  1293. %267 = getelementptr inbounds %struct.Node, %struct.Node* %266, i32 0, i32 1
  1294. %268 = load %struct.Node*, %struct.Node** %267, align 8
  1295. %269 = getelementptr inbounds %struct.Node, %struct.Node* %268, i32 0, i32 1
  1296. %270 = load %struct.Node*, %struct.Node** %269, align 8
  1297. store %struct.Node* %270, %struct.Node** %14, align 8
  1298. %271 = load %struct.Node*, %struct.Node** %13, align 8
  1299. %272 = load %struct.Node*, %struct.Node** %14, align 8
  1300. %273 = icmp eq %struct.Node* %271, %272
  1301. br i1 %273, label %274, label %275
  1302. 274: ; preds = %262
  1303. store i32 1, i32* %15, align 4
  1304. br label %276
  1305. 275: ; preds = %262
  1306. br label %252
  1307. 276: ; preds = %274, %260
  1308. %277 = load i32, i32* %15, align 4
  1309. %278 = icmp ne i32 %277, 0
  1310. br i1 %278, label %279, label %305
  1311. 279: ; preds = %276
  1312. call void @setErrorMessage(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.31, i64 0, i64 0))
  1313. %280 = load %struct.Node*, %struct.Node** %10, align 8
  1314. store %struct.Node* %280, %struct.Node** %16, align 8
  1315. store i32 1000, i32* %17, align 4
  1316. store i32 0, i32* %18, align 4
  1317. br label %281
  1318. 281: ; preds = %296, %279
  1319. %282 = load %struct.Node*, %struct.Node** %16, align 8
  1320. %283 = icmp ne %struct.Node* %282, null
  1321. br i1 %283, label %284, label %288
  1322. 284: ; preds = %281
  1323. %285 = load i32, i32* %18, align 4
  1324. %286 = load i32, i32* %17, align 4
  1325. %287 = icmp slt i32 %285, %286
  1326. br label %288
  1327. 288: ; preds = %284, %281
  1328. %289 = phi i1 [ false, %281 ], [ %287, %284 ]
  1329. br i1 %289, label %290, label %304
  1330. 290: ; preds = %288
  1331. %291 = load %struct.Node*, %struct.Node** %16, align 8
  1332. %292 = getelementptr inbounds %struct.Node, %struct.Node* %291, i32 0, i32 3
  1333. %293 = load i32, i32* %292, align 8
  1334. %294 = icmp ne i32 %293, 0
  1335. br i1 %294, label %295, label %296
  1336. 295: ; preds = %290
  1337. br label %304
  1338. 296: ; preds = %290
  1339. %297 = load %struct.Node*, %struct.Node** %16, align 8
  1340. %298 = getelementptr inbounds %struct.Node, %struct.Node* %297, i32 0, i32 3
  1341. store i32 1, i32* %298, align 8
  1342. %299 = load %struct.Node*, %struct.Node** %16, align 8
  1343. %300 = getelementptr inbounds %struct.Node, %struct.Node* %299, i32 0, i32 1
  1344. %301 = load %struct.Node*, %struct.Node** %300, align 8
  1345. store %struct.Node* %301, %struct.Node** %16, align 8
  1346. %302 = load i32, i32* %18, align 4
  1347. %303 = add nsw i32 %302, 1
  1348. store i32 %303, i32* %18, align 4
  1349. br label %281
  1350. 304: ; preds = %295, %288
  1351. br label %305
  1352. 305: ; preds = %304, %276
  1353. br label %306
  1354. 306: ; preds = %309, %305
  1355. %307 = load %struct.Node*, %struct.Node** %10, align 8
  1356. %308 = icmp ne %struct.Node* %307, null
  1357. br i1 %308, label %309, label %316
  1358. 309: ; preds = %306
  1359. %310 = load %struct.Node*, %struct.Node** %10, align 8
  1360. store %struct.Node* %310, %struct.Node** %19, align 8
  1361. %311 = load %struct.Node*, %struct.Node** %10, align 8
  1362. %312 = getelementptr inbounds %struct.Node, %struct.Node* %311, i32 0, i32 1
  1363. %313 = load %struct.Node*, %struct.Node** %312, align 8
  1364. store %struct.Node* %313, %struct.Node** %10, align 8
  1365. %314 = load %struct.Node*, %struct.Node** %19, align 8
  1366. %315 = bitcast %struct.Node* %314 to i8*
  1367. call void @free(i8* %315) #7
  1368. br label %306
  1369. 316: ; preds = %306
  1370. br label %317
  1371. 317: ; preds = %316, %228
  1372. %318 = load i8*, i8** @globalErrorMessage, align 8
  1373. %319 = icmp ne i8* %318, null
  1374. br i1 %319, label %320, label %322
  1375. 320: ; preds = %317
  1376. %321 = load i8*, i8** @globalErrorMessage, align 8
  1377. call void @free(i8* %321) #7
  1378. br label %322
  1379. 322: ; preds = %320, %317
  1380. %323 = call i32 @fused_performSimpleCalculations(i1 false, i32 0)
  1381. store i32 0, i32* %1, align 4
  1382. br label %324
  1383. 324: ; preds = %322, %150, %68, %25
  1384. %325 = load i32, i32* %1, align 4
  1385. ret i32 %325
  1386. }
  1387. ; Function Attrs: nounwind
  1388. declare dso_local i64 @time(i64*) #1
  1389. ; Function Attrs: nounwind
  1390. declare dso_local void @srand(i32) #1
  1391. ; Function Attrs: nounwind
  1392. declare dso_local i32 @rand() #1
  1393. ; Function Attrs: nounwind
  1394. declare dso_local double @sqrt(double) #1
  1395. ; Function Attrs: nounwind readnone speculatable willreturn
  1396. declare double @llvm.fabs.f64(double) #4
  1397. ; Function Attrs: noinline nounwind optnone uwtable
  1398. define dso_local double @calculateCircleArea(%struct.Circle* byval(%struct.Circle) align 8 %0, i32* %1) #0 !project_source !2 {
  1399. %3 = alloca double, align 8
  1400. %4 = alloca i32*, align 8
  1401. %5 = alloca double, align 8
  1402. store i32* %1, i32** %4, align 8
  1403. %6 = load i32*, i32** %4, align 8
  1404. store i32 0, i32* %6, align 4
  1405. %7 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 2
  1406. %8 = load i32, i32* %7, align 8
  1407. %9 = icmp ne i32 %8, 0
  1408. br i1 %9, label %12, label %10
  1409. 10: ; preds = %2
  1410. %11 = load i32*, i32** %4, align 8
  1411. store i32 1, i32* %11, align 4
  1412. call void @setErrorMessage(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.36, i64 0, i64 0))
  1413. store double -1.000000e+00, double* %3, align 8
  1414. br label %85
  1415. 12: ; preds = %2
  1416. %13 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 1
  1417. %14 = load double, double* %13, align 8
  1418. %15 = fcmp ole double %14, 0.000000e+00
  1419. br i1 %15, label %16, label %18
  1420. 16: ; preds = %12
  1421. %17 = load i32*, i32** %4, align 8
  1422. store i32 1, i32* %17, align 4
  1423. call void @setErrorMessage(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.37, i64 0, i64 0))
  1424. store double -1.000000e+00, double* %3, align 8
  1425. br label %85
  1426. 18: ; preds = %12
  1427. %19 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 1
  1428. %20 = load double, double* %19, align 8
  1429. %21 = fcmp ogt double %20, 1.000000e+03
  1430. br i1 %21, label %22, label %24
  1431. 22: ; preds = %18
  1432. %23 = load i32*, i32** %4, align 8
  1433. store i32 3, i32* %23, align 4
  1434. call void @setErrorMessage(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.38, i64 0, i64 0))
  1435. store double -1.000000e+00, double* %3, align 8
  1436. br label %85
  1437. 24: ; preds = %18
  1438. %25 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 0
  1439. %26 = getelementptr inbounds %struct.Point, %struct.Point* %25, i32 0, i32 0
  1440. %27 = load i32, i32* %26, align 8
  1441. %28 = call i32 @abs(i32 %27) #8
  1442. %29 = icmp sgt i32 %28, 1000
  1443. br i1 %29, label %36, label %30
  1444. 30: ; preds = %24
  1445. %31 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 0
  1446. %32 = getelementptr inbounds %struct.Point, %struct.Point* %31, i32 0, i32 1
  1447. %33 = load i32, i32* %32, align 4
  1448. %34 = call i32 @abs(i32 %33) #8
  1449. %35 = icmp sgt i32 %34, 1000
  1450. br i1 %35, label %36, label %38
  1451. 36: ; preds = %30, %24
  1452. %37 = load i32*, i32** %4, align 8
  1453. store i32 3, i32* %37, align 4
  1454. call void @setErrorMessage(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.39, i64 0, i64 0))
  1455. store double -1.000000e+00, double* %3, align 8
  1456. br label %85
  1457. 38: ; preds = %30
  1458. %39 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 1
  1459. %40 = load double, double* %39, align 8
  1460. %41 = fmul double 3.141590e+00, %40
  1461. %42 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 1
  1462. %43 = load double, double* %42, align 8
  1463. %44 = fmul double %41, %43
  1464. store double %44, double* %5, align 8
  1465. %45 = load double, double* %5, align 8
  1466. %46 = fcmp uno double %45, %45
  1467. br i1 %46, label %56, label %47
  1468. 47: ; preds = %38
  1469. %48 = load double, double* %5, align 8
  1470. %49 = call double @llvm.fabs.f64(double %48) #9
  1471. %50 = fcmp oeq double %49, 0x7FF0000000000000
  1472. %51 = bitcast double %48 to i64
  1473. %52 = icmp slt i64 %51, 0
  1474. %53 = select i1 %52, i32 -1, i32 1
  1475. %54 = select i1 %50, i32 %53, i32 0
  1476. %55 = icmp ne i32 %54, 0
  1477. br i1 %55, label %56, label %58
  1478. 56: ; preds = %47, %38
  1479. %57 = load i32*, i32** %4, align 8
  1480. store i32 5, i32* %57, align 4
  1481. call void @setErrorMessage(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.40, i64 0, i64 0))
  1482. store double -1.000000e+00, double* %3, align 8
  1483. br label %85
  1484. 58: ; preds = %47
  1485. %59 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 3
  1486. %60 = getelementptr inbounds [256 x i8], [256 x i8]* %59, i64 0, i64 0
  1487. %61 = call i32 @strcmp(i8* %60, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.41, i64 0, i64 0)) #10
  1488. %62 = icmp eq i32 %61, 0
  1489. br i1 %62, label %63, label %65
  1490. 63: ; preds = %58
  1491. %64 = load double, double* %5, align 8
  1492. store double %64, double* %3, align 8
  1493. br label %85
  1494. 65: ; preds = %58
  1495. %66 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 3
  1496. %67 = getelementptr inbounds [256 x i8], [256 x i8]* %66, i64 0, i64 0
  1497. %68 = call i32 @strcmp(i8* %67, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.42, i64 0, i64 0)) #10
  1498. %69 = icmp eq i32 %68, 0
  1499. br i1 %69, label %70, label %83
  1500. 70: ; preds = %65
  1501. %71 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 0
  1502. %72 = getelementptr inbounds %struct.Point, %struct.Point* %71, i32 0, i32 3
  1503. %73 = load double, double* %72, align 8
  1504. %74 = fcmp ole double %73, 0.000000e+00
  1505. br i1 %74, label %75, label %77
  1506. 75: ; preds = %70
  1507. %76 = load i32*, i32** %4, align 8
  1508. store i32 1, i32* %76, align 4
  1509. call void @setErrorMessage(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.43, i64 0, i64 0))
  1510. store double -1.000000e+00, double* %3, align 8
  1511. br label %85
  1512. 77: ; preds = %70
  1513. %78 = load double, double* %5, align 8
  1514. %79 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 0
  1515. %80 = getelementptr inbounds %struct.Point, %struct.Point* %79, i32 0, i32 3
  1516. %81 = load double, double* %80, align 8
  1517. %82 = fmul double %78, %81
  1518. store double %82, double* %3, align 8
  1519. br label %85
  1520. 83: ; preds = %65
  1521. %84 = load i32*, i32** %4, align 8
  1522. store i32 1, i32* %84, align 4
  1523. call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.44, i64 0, i64 0))
  1524. store double -1.000000e+00, double* %3, align 8
  1525. br label %85
  1526. 85: ; preds = %83, %77, %75, %63, %56, %36, %22, %16, %10
  1527. %86 = load double, double* %3, align 8
  1528. ret double %86
  1529. }
  1530. ; Function Attrs: nounwind readonly
  1531. declare dso_local i32 @strcmp(i8*, i8*) #5
  1532. ; Function Attrs: noinline nounwind optnone uwtable
  1533. define dso_local void @removeDuplicates(%struct.DynamicArray* %0) #0 !project_source !2 {
  1534. %2 = alloca %struct.DynamicArray*, align 8
  1535. %3 = alloca i32, align 4
  1536. %4 = alloca i32, align 4
  1537. %5 = alloca i32, align 4
  1538. store %struct.DynamicArray* %0, %struct.DynamicArray** %2, align 8
  1539. %6 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1540. %7 = icmp ne %struct.DynamicArray* %6, null
  1541. br i1 %7, label %8, label %13
  1542. 8: ; preds = %1
  1543. %9 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1544. %10 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %9, i32 0, i32 0
  1545. %11 = load i32*, i32** %10, align 8
  1546. %12 = icmp ne i32* %11, null
  1547. br i1 %12, label %14, label %13
  1548. 13: ; preds = %8, %1
  1549. call void @setErrorMessage(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.49, i64 0, i64 0))
  1550. br label %81
  1551. 14: ; preds = %8
  1552. %15 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1553. %16 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %15, i32 0, i32 1
  1554. %17 = load i32, i32* %16, align 8
  1555. %18 = icmp sle i32 %17, 1
  1556. br i1 %18, label %19, label %20
  1557. 19: ; preds = %14
  1558. br label %81
  1559. 20: ; preds = %14
  1560. store i32 0, i32* %3, align 4
  1561. %21 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1562. %22 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %21, i32 0, i32 0
  1563. %23 = load i32*, i32** %22, align 8
  1564. %24 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1565. %25 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %24, i32 0, i32 1
  1566. %26 = load i32, i32* %25, align 8
  1567. %27 = sub nsw i32 %26, 1
  1568. call void @quickSort(i32* %23, i32 0, i32 %27, i32* %3)
  1569. %28 = load i32, i32* %3, align 4
  1570. %29 = icmp ne i32 %28, 0
  1571. br i1 %29, label %30, label %31
  1572. 30: ; preds = %20
  1573. br label %81
  1574. 31: ; preds = %20
  1575. store i32 1, i32* %4, align 4
  1576. store i32 1, i32* %5, align 4
  1577. br label %32
  1578. 32: ; preds = %72, %31
  1579. %33 = load i32, i32* %5, align 4
  1580. %34 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1581. %35 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %34, i32 0, i32 1
  1582. %36 = load i32, i32* %35, align 8
  1583. %37 = icmp slt i32 %33, %36
  1584. br i1 %37, label %38, label %75
  1585. 38: ; preds = %32
  1586. %39 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1587. %40 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %39, i32 0, i32 0
  1588. %41 = load i32*, i32** %40, align 8
  1589. %42 = load i32, i32* %5, align 4
  1590. %43 = sext i32 %42 to i64
  1591. %44 = getelementptr inbounds i32, i32* %41, i64 %43
  1592. %45 = load i32, i32* %44, align 4
  1593. %46 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1594. %47 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %46, i32 0, i32 0
  1595. %48 = load i32*, i32** %47, align 8
  1596. %49 = load i32, i32* %5, align 4
  1597. %50 = sub nsw i32 %49, 1
  1598. %51 = sext i32 %50 to i64
  1599. %52 = getelementptr inbounds i32, i32* %48, i64 %51
  1600. %53 = load i32, i32* %52, align 4
  1601. %54 = icmp ne i32 %45, %53
  1602. br i1 %54, label %55, label %71
  1603. 55: ; preds = %38
  1604. %56 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1605. %57 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %56, i32 0, i32 0
  1606. %58 = load i32*, i32** %57, align 8
  1607. %59 = load i32, i32* %5, align 4
  1608. %60 = sext i32 %59 to i64
  1609. %61 = getelementptr inbounds i32, i32* %58, i64 %60
  1610. %62 = load i32, i32* %61, align 4
  1611. %63 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1612. %64 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %63, i32 0, i32 0
  1613. %65 = load i32*, i32** %64, align 8
  1614. %66 = load i32, i32* %4, align 4
  1615. %67 = sext i32 %66 to i64
  1616. %68 = getelementptr inbounds i32, i32* %65, i64 %67
  1617. store i32 %62, i32* %68, align 4
  1618. %69 = load i32, i32* %4, align 4
  1619. %70 = add nsw i32 %69, 1
  1620. store i32 %70, i32* %4, align 4
  1621. br label %71
  1622. 71: ; preds = %55, %38
  1623. br label %72
  1624. 72: ; preds = %71
  1625. %73 = load i32, i32* %5, align 4
  1626. %74 = add nsw i32 %73, 1
  1627. store i32 %74, i32* %5, align 4
  1628. br label %32
  1629. 75: ; preds = %32
  1630. %76 = load i32, i32* %4, align 4
  1631. %77 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1632. %78 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %77, i32 0, i32 1
  1633. store i32 %76, i32* %78, align 8
  1634. %79 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8
  1635. %80 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %79, i32 0, i32 3
  1636. store i32 1, i32* %80, align 8
  1637. br label %81
  1638. 81: ; preds = %75, %30, %19, %13
  1639. ret void
  1640. }
  1641. ; Function Attrs: noinline nounwind optnone uwtable
  1642. define dso_local %struct.Point* @findCentroid(%struct.Point* %0, i32 %1, i32* %2) #0 !project_source !2 {
  1643. %4 = alloca %struct.Point*, align 8
  1644. %5 = alloca %struct.Point*, align 8
  1645. %6 = alloca i32, align 4
  1646. %7 = alloca i32*, align 8
  1647. %8 = alloca %struct.Point*, align 8
  1648. %9 = alloca double, align 8
  1649. %10 = alloca double, align 8
  1650. %11 = alloca double, align 8
  1651. %12 = alloca i32, align 4
  1652. store %struct.Point* %0, %struct.Point** %5, align 8
  1653. store i32 %1, i32* %6, align 4
  1654. store i32* %2, i32** %7, align 8
  1655. %13 = load i32*, i32** %7, align 8
  1656. store i32 0, i32* %13, align 4
  1657. %14 = load %struct.Point*, %struct.Point** %5, align 8
  1658. %15 = icmp ne %struct.Point* %14, null
  1659. br i1 %15, label %16, label %19
  1660. 16: ; preds = %3
  1661. %17 = load i32, i32* %6, align 4
  1662. %18 = icmp sle i32 %17, 0
  1663. br i1 %18, label %19, label %21
  1664. 19: ; preds = %16, %3
  1665. %20 = load i32*, i32** %7, align 8
  1666. store i32 1, i32* %20, align 4
  1667. call void @setErrorMessage(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.50, i64 0, i64 0))
  1668. store %struct.Point* null, %struct.Point** %4, align 8
  1669. br label %165
  1670. 21: ; preds = %16
  1671. %22 = load i32, i32* %6, align 4
  1672. %23 = icmp sgt i32 %22, 1000
  1673. br i1 %23, label %24, label %26
  1674. 24: ; preds = %21
  1675. %25 = load i32*, i32** %7, align 8
  1676. store i32 3, i32* %25, align 4
  1677. call void @setErrorMessage(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.51, i64 0, i64 0))
  1678. store %struct.Point* null, %struct.Point** %4, align 8
  1679. br label %165
  1680. 26: ; preds = %21
  1681. %27 = call noalias i8* @malloc(i64 272) #7
  1682. %28 = bitcast i8* %27 to %struct.Point*
  1683. store %struct.Point* %28, %struct.Point** %8, align 8
  1684. %29 = load %struct.Point*, %struct.Point** %8, align 8
  1685. %30 = icmp ne %struct.Point* %29, null
  1686. br i1 %30, label %33, label %31
  1687. 31: ; preds = %26
  1688. %32 = load i32*, i32** %7, align 8
  1689. store i32 2, i32* %32, align 4
  1690. call void @setErrorMessage(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.52, i64 0, i64 0))
  1691. store %struct.Point* null, %struct.Point** %4, align 8
  1692. br label %165
  1693. 33: ; preds = %26
  1694. store double 0.000000e+00, double* %9, align 8
  1695. store double 0.000000e+00, double* %10, align 8
  1696. store double 0.000000e+00, double* %11, align 8
  1697. store i32 0, i32* %12, align 4
  1698. br label %34
  1699. 34: ; preds = %131, %33
  1700. %35 = load i32, i32* %12, align 4
  1701. %36 = load i32, i32* %6, align 4
  1702. %37 = icmp slt i32 %35, %36
  1703. br i1 %37, label %38, label %134
  1704. 38: ; preds = %34
  1705. %39 = load %struct.Point*, %struct.Point** %5, align 8
  1706. %40 = load i32, i32* %12, align 4
  1707. %41 = sext i32 %40 to i64
  1708. %42 = getelementptr inbounds %struct.Point, %struct.Point* %39, i64 %41
  1709. %43 = getelementptr inbounds %struct.Point, %struct.Point* %42, i32 0, i32 3
  1710. %44 = load double, double* %43, align 8
  1711. %45 = fcmp ole double %44, 0.000000e+00
  1712. br i1 %45, label %46, label %50
  1713. 46: ; preds = %38
  1714. %47 = load i32*, i32** %7, align 8
  1715. store i32 1, i32* %47, align 4
  1716. call void @setErrorMessage(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.53, i64 0, i64 0))
  1717. %48 = load %struct.Point*, %struct.Point** %8, align 8
  1718. %49 = bitcast %struct.Point* %48 to i8*
  1719. call void @free(i8* %49) #7
  1720. store %struct.Point* null, %struct.Point** %4, align 8
  1721. br label %165
  1722. 50: ; preds = %38
  1723. %51 = load %struct.Point*, %struct.Point** %5, align 8
  1724. %52 = load i32, i32* %12, align 4
  1725. %53 = sext i32 %52 to i64
  1726. %54 = getelementptr inbounds %struct.Point, %struct.Point* %51, i64 %53
  1727. %55 = getelementptr inbounds %struct.Point, %struct.Point* %54, i32 0, i32 3
  1728. %56 = load double, double* %55, align 8
  1729. %57 = load double, double* %9, align 8
  1730. %58 = fadd double %57, %56
  1731. store double %58, double* %9, align 8
  1732. %59 = load %struct.Point*, %struct.Point** %5, align 8
  1733. %60 = load i32, i32* %12, align 4
  1734. %61 = sext i32 %60 to i64
  1735. %62 = getelementptr inbounds %struct.Point, %struct.Point* %59, i64 %61
  1736. %63 = getelementptr inbounds %struct.Point, %struct.Point* %62, i32 0, i32 0
  1737. %64 = load i32, i32* %63, align 8
  1738. %65 = sitofp i32 %64 to double
  1739. %66 = load %struct.Point*, %struct.Point** %5, align 8
  1740. %67 = load i32, i32* %12, align 4
  1741. %68 = sext i32 %67 to i64
  1742. %69 = getelementptr inbounds %struct.Point, %struct.Point* %66, i64 %68
  1743. %70 = getelementptr inbounds %struct.Point, %struct.Point* %69, i32 0, i32 3
  1744. %71 = load double, double* %70, align 8
  1745. %72 = fmul double %65, %71
  1746. %73 = load double, double* %10, align 8
  1747. %74 = fadd double %73, %72
  1748. store double %74, double* %10, align 8
  1749. %75 = load %struct.Point*, %struct.Point** %5, align 8
  1750. %76 = load i32, i32* %12, align 4
  1751. %77 = sext i32 %76 to i64
  1752. %78 = getelementptr inbounds %struct.Point, %struct.Point* %75, i64 %77
  1753. %79 = getelementptr inbounds %struct.Point, %struct.Point* %78, i32 0, i32 1
  1754. %80 = load i32, i32* %79, align 4
  1755. %81 = sitofp i32 %80 to double
  1756. %82 = load %struct.Point*, %struct.Point** %5, align 8
  1757. %83 = load i32, i32* %12, align 4
  1758. %84 = sext i32 %83 to i64
  1759. %85 = getelementptr inbounds %struct.Point, %struct.Point* %82, i64 %84
  1760. %86 = getelementptr inbounds %struct.Point, %struct.Point* %85, i32 0, i32 3
  1761. %87 = load double, double* %86, align 8
  1762. %88 = fmul double %81, %87
  1763. %89 = load double, double* %11, align 8
  1764. %90 = fadd double %89, %88
  1765. store double %90, double* %11, align 8
  1766. %91 = load double, double* %9, align 8
  1767. %92 = fcmp uno double %91, %91
  1768. br i1 %92, label %126, label %93
  1769. 93: ; preds = %50
  1770. %94 = load double, double* %10, align 8
  1771. %95 = fcmp uno double %94, %94
  1772. br i1 %95, label %126, label %96
  1773. 96: ; preds = %93
  1774. %97 = load double, double* %11, align 8
  1775. %98 = fcmp uno double %97, %97
  1776. br i1 %98, label %126, label %99
  1777. 99: ; preds = %96
  1778. %100 = load double, double* %9, align 8
  1779. %101 = call double @llvm.fabs.f64(double %100) #9
  1780. %102 = fcmp oeq double %101, 0x7FF0000000000000
  1781. %103 = bitcast double %100 to i64
  1782. %104 = icmp slt i64 %103, 0
  1783. %105 = select i1 %104, i32 -1, i32 1
  1784. %106 = select i1 %102, i32 %105, i32 0
  1785. %107 = icmp ne i32 %106, 0
  1786. br i1 %107, label %126, label %108
  1787. 108: ; preds = %99
  1788. %109 = load double, double* %10, align 8
  1789. %110 = call double @llvm.fabs.f64(double %109) #9
  1790. %111 = fcmp oeq double %110, 0x7FF0000000000000
  1791. %112 = bitcast double %109 to i64
  1792. %113 = icmp slt i64 %112, 0
  1793. %114 = select i1 %113, i32 -1, i32 1
  1794. %115 = select i1 %111, i32 %114, i32 0
  1795. %116 = icmp ne i32 %115, 0
  1796. br i1 %116, label %126, label %117
  1797. 117: ; preds = %108
  1798. %118 = load double, double* %11, align 8
  1799. %119 = call double @llvm.fabs.f64(double %118) #9
  1800. %120 = fcmp oeq double %119, 0x7FF0000000000000
  1801. %121 = bitcast double %118 to i64
  1802. %122 = icmp slt i64 %121, 0
  1803. %123 = select i1 %122, i32 -1, i32 1
  1804. %124 = select i1 %120, i32 %123, i32 0
  1805. %125 = icmp ne i32 %124, 0
  1806. br i1 %125, label %126, label %130
  1807. 126: ; preds = %117, %108, %99, %96, %93, %50
  1808. %127 = load i32*, i32** %7, align 8
  1809. store i32 5, i32* %127, align 4
  1810. call void @setErrorMessage(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.54, i64 0, i64 0))
  1811. %128 = load %struct.Point*, %struct.Point** %8, align 8
  1812. %129 = bitcast %struct.Point* %128 to i8*
  1813. call void @free(i8* %129) #7
  1814. store %struct.Point* null, %struct.Point** %4, align 8
  1815. br label %165
  1816. 130: ; preds = %117
  1817. br label %131
  1818. 131: ; preds = %130
  1819. %132 = load i32, i32* %12, align 4
  1820. %133 = add nsw i32 %132, 1
  1821. store i32 %133, i32* %12, align 4
  1822. br label %34
  1823. 134: ; preds = %34
  1824. %135 = load double, double* %9, align 8
  1825. %136 = fcmp oeq double %135, 0.000000e+00
  1826. br i1 %136, label %137, label %141
  1827. 137: ; preds = %134
  1828. %138 = load i32*, i32** %7, align 8
  1829. store i32 1, i32* %138, align 4
  1830. call void @setErrorMessage(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.55, i64 0, i64 0))
  1831. %139 = load %struct.Point*, %struct.Point** %8, align 8
  1832. %140 = bitcast %struct.Point* %139 to i8*
  1833. call void @free(i8* %140) #7
  1834. store %struct.Point* null, %struct.Point** %4, align 8
  1835. br label %165
  1836. 141: ; preds = %134
  1837. %142 = load double, double* %10, align 8
  1838. %143 = load double, double* %9, align 8
  1839. %144 = fdiv double %142, %143
  1840. %145 = fptosi double %144 to i32
  1841. %146 = load %struct.Point*, %struct.Point** %8, align 8
  1842. %147 = getelementptr inbounds %struct.Point, %struct.Point* %146, i32 0, i32 0
  1843. store i32 %145, i32* %147, align 8
  1844. %148 = load double, double* %11, align 8
  1845. %149 = load double, double* %9, align 8
  1846. %150 = fdiv double %148, %149
  1847. %151 = fptosi double %150 to i32
  1848. %152 = load %struct.Point*, %struct.Point** %8, align 8
  1849. %153 = getelementptr inbounds %struct.Point, %struct.Point* %152, i32 0, i32 1
  1850. store i32 %151, i32* %153, align 4
  1851. %154 = load double, double* %9, align 8
  1852. %155 = load i32, i32* %6, align 4
  1853. %156 = sitofp i32 %155 to double
  1854. %157 = fdiv double %154, %156
  1855. %158 = load %struct.Point*, %struct.Point** %8, align 8
  1856. %159 = getelementptr inbounds %struct.Point, %struct.Point* %158, i32 0, i32 3
  1857. store double %157, double* %159, align 8
  1858. %160 = load %struct.Point*, %struct.Point** %8, align 8
  1859. %161 = getelementptr inbounds %struct.Point, %struct.Point* %160, i32 0, i32 2
  1860. %162 = getelementptr inbounds [256 x i8], [256 x i8]* %161, i64 0, i64 0
  1861. %163 = call i8* @strcpy(i8* %162, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.56, i64 0, i64 0)) #7
  1862. %164 = load %struct.Point*, %struct.Point** %8, align 8
  1863. store %struct.Point* %164, %struct.Point** %4, align 8
  1864. br label %165
  1865. 165: ; preds = %141, %137, %126, %46, %31, %24, %19
  1866. %166 = load %struct.Point*, %struct.Point** %4, align 8
  1867. ret %struct.Point* %166
  1868. }
  1869. ; Function Attrs: nounwind
  1870. declare dso_local i8* @strcpy(i8*, i8*) #1
  1871. ; Function Attrs: nounwind readonly
  1872. declare dso_local i64 @strlen(i8*) #5
  1873. ; Function Attrs: argmemonly nounwind willreturn
  1874. declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #6
  1875. ; Function Attrs: argmemonly nounwind willreturn
  1876. declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #6
  1877. define i32 @fused_performSimpleCalculations(i1 %0, i32 %1) {
  1878. entry:
  1879. %2 = alloca i32
  1880. %3 = alloca i32
  1881. %4 = alloca i32
  1882. %5 = xor i1 %0, true
  1883. br label %target_cond_0
  1884. target_cond_0: ; preds = %entry
  1885. br i1 %0, label %6, label %target_skip_0
  1886. target_skip_0: ; preds = %target_cond_0
  1887. br label %target_phi_0
  1888. target_phi_0: ; preds = %6, %target_skip_0
  1889. br label %bunker_cond_0
  1890. 6: ; preds = %target_cond_0
  1891. store i32 %1, i32* %3, align 4
  1892. store i32 0, i32* %4, align 4
  1893. br label %target_phi_0
  1894. bunker_cond_0: ; preds = %target_phi_0
  1895. br i1 %5, label %7, label %bunker_skip_0
  1896. bunker_skip_0: ; preds = %bunker_cond_0
  1897. br label %bunker_phi_0
  1898. bunker_phi_0: ; preds = %bunker_skip_0
  1899. br label %target_cond_1
  1900. 7: ; preds = %bunker_cond_0
  1901. store i32 100, i32* %2, align 4
  1902. %8 = load i32, i32* %2, align 4
  1903. %9 = icmp sgt i32 %8, 50
  1904. br i1 %9, label %10, label %15
  1905. 10: ; preds = %7
  1906. %11 = load i32, i32* %2, align 4
  1907. %12 = mul nsw i32 %11, 2
  1908. %13 = load i32, i32* @calculationResult, align 4
  1909. %14 = add nsw i32 %13, %12
  1910. store i32 %14, i32* @calculationResult, align 4
  1911. br label %20
  1912. 15: ; preds = %7
  1913. %16 = load i32, i32* %2, align 4
  1914. %17 = sdiv i32 %16, 2
  1915. %18 = load i32, i32* @calculationResult, align 4
  1916. %19 = add nsw i32 %18, %17
  1917. store i32 %19, i32* @calculationResult, align 4
  1918. br label %20
  1919. 20: ; preds = %15, %10
  1920. %21 = load i32, i32* %2, align 4
  1921. %22 = srem i32 %21, 3
  1922. %23 = icmp eq i32 %22, 0
  1923. br i1 %23, label %24, label %27
  1924. 24: ; preds = %20
  1925. %25 = load i32, i32* @calculationResult, align 4
  1926. %26 = mul nsw i32 %25, 3
  1927. store i32 %26, i32* @calculationResult, align 4
  1928. br label %30
  1929. 27: ; preds = %20
  1930. %28 = load i32, i32* @calculationResult, align 4
  1931. %29 = add nsw i32 %28, 3
  1932. store i32 %29, i32* @calculationResult, align 4
  1933. br label %30
  1934. 30: ; preds = %27, %24
  1935. %31 = load i32, i32* @calculationResult, align 4
  1936. %32 = icmp sge i32 %31, 150
  1937. br i1 %32, label %33, label %39
  1938. 33: ; preds = %30
  1939. %34 = load i32, i32* @calculationResult, align 4
  1940. %35 = icmp sle i32 %34, 300
  1941. br i1 %35, label %36, label %39
  1942. 36: ; preds = %33
  1943. %37 = load i32, i32* @calculationResult, align 4
  1944. %38 = sub nsw i32 %37, 50
  1945. store i32 %38, i32* @calculationResult, align 4
  1946. br label %42
  1947. 39: ; preds = %33, %30
  1948. %40 = load i32, i32* @calculationResult, align 4
  1949. %41 = add nsw i32 %40, 50
  1950. store i32 %41, i32* @calculationResult, align 4
  1951. br label %42
  1952. 42: ; preds = %39, %36
  1953. %43 = load i32, i32* @calculationResult, align 4
  1954. %44 = srem i32 %43, 2
  1955. %45 = icmp eq i32 %44, 0
  1956. br i1 %45, label %46, label %49
  1957. 46: ; preds = %42
  1958. %47 = load i32, i32* @calculationResult, align 4
  1959. %48 = sdiv i32 %47, 2
  1960. store i32 %48, i32* @calculationResult, align 4
  1961. br label %52
  1962. 49: ; preds = %42
  1963. %50 = load i32, i32* @calculationResult, align 4
  1964. %51 = mul nsw i32 %50, 2
  1965. store i32 %51, i32* @calculationResult, align 4
  1966. br label %52
  1967. 52: ; preds = %49, %46
  1968. %53 = load i32, i32* @calculationResult, align 4
  1969. %54 = srem i32 %53, 10
  1970. %55 = icmp slt i32 %54, 5
  1971. br i1 %55, label %56, label %59
  1972. 56: ; preds = %52
  1973. %57 = load i32, i32* @calculationResult, align 4
  1974. %58 = add nsw i32 %57, 5
  1975. store i32 %58, i32* @calculationResult, align 4
  1976. br label %62
  1977. 59: ; preds = %52
  1978. %60 = load i32, i32* @calculationResult, align 4
  1979. %61 = sub nsw i32 %60, 5
  1980. store i32 %61, i32* @calculationResult, align 4
  1981. br label %62
  1982. 62: ; preds = %59, %56
  1983. %63 = load i32, i32* @calculationResult, align 4
  1984. %64 = icmp sgt i32 %63, 1000
  1985. br i1 %64, label %65, label %66
  1986. 65: ; preds = %62
  1987. store i32 1000, i32* @calculationResult, align 4
  1988. br label %69
  1989. 66: ; preds = %62
  1990. %67 = load i32, i32* @calculationResult, align 4
  1991. %68 = add nsw i32 %67, 10
  1992. store i32 %68, i32* @calculationResult, align 4
  1993. br label %69
  1994. 69: ; preds = %66, %65
  1995. %70 = load i32, i32* @calculationResult, align 4
  1996. %71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0), i32 %70)
  1997. ret i32 0
  1998. target_cond_1: ; preds = %bunker_phi_0
  1999. br i1 %0, label %72, label %target_skip_1
  2000. target_skip_1: ; preds = %target_cond_1
  2001. br label %target_phi_1
  2002. target_phi_1: ; preds = %target_skip_1
  2003. ret i32 0
  2004. 72: ; preds = %75, %target_cond_1
  2005. %73 = load i32, i32* %3, align 4
  2006. %74 = icmp ne i32 %73, 0
  2007. br i1 %74, label %75, label %82
  2008. 75: ; preds = %72
  2009. %76 = load i32, i32* %3, align 4
  2010. %77 = and i32 %76, 1
  2011. %78 = load i32, i32* %4, align 4
  2012. %79 = add nsw i32 %78, %77
  2013. store i32 %79, i32* %4, align 4
  2014. %80 = load i32, i32* %3, align 4
  2015. %81 = ashr i32 %80, 1
  2016. store i32 %81, i32* %3, align 4
  2017. br label %72
  2018. 82: ; preds = %72
  2019. %83 = load i32, i32* %4, align 4
  2020. ret i32 %83
  2021. }
  2022. define %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 %0, %struct.Point* %1, %struct.Point* %2, i32* %3, i32 %4) {
  2023. entry:
  2024. %5 = alloca double
  2025. %6 = alloca i32*
  2026. %7 = alloca double
  2027. %8 = alloca double
  2028. %9 = alloca double
  2029. %10 = alloca i32
  2030. %11 = alloca i32
  2031. %12 = xor i1 %0, true
  2032. br label %target_cond_0
  2033. target_cond_0: ; preds = %entry
  2034. br i1 %0, label %13, label %target_skip_0
  2035. target_skip_0: ; preds = %target_cond_0
  2036. br label %target_phi_0
  2037. target_phi_0: ; preds = %13, %target_skip_0
  2038. br label %bunker_cond_0
  2039. 13: ; preds = %target_cond_0
  2040. store i32 %4, i32* %11, align 4
  2041. %14 = load i32, i32* %11, align 4
  2042. %15 = sext i32 %14 to i64
  2043. %16 = getelementptr inbounds [100 x i32], [100 x i32]* @cache, i64 0, i64 %15
  2044. %17 = load i32, i32* %16, align 4
  2045. %18 = icmp ne i32 %17, -1
  2046. br label %target_phi_0
  2047. bunker_cond_0: ; preds = %target_phi_0
  2048. br i1 %12, label %19, label %bunker_skip_0
  2049. bunker_skip_0: ; preds = %bunker_cond_0
  2050. br label %bunker_phi_0
  2051. bunker_phi_0: ; preds = %bunker_skip_0
  2052. br label %target_cond_1
  2053. 19: ; preds = %bunker_cond_0
  2054. store i32* %3, i32** %6, align 8
  2055. %20 = load i32*, i32** %6, align 8
  2056. store i32 0, i32* %20, align 4
  2057. %21 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3
  2058. %22 = load double, double* %21, align 8
  2059. %23 = fcmp ole double %22, 0.000000e+00
  2060. br i1 %23, label %28, label %24
  2061. 24: ; preds = %19
  2062. %25 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3
  2063. %26 = load double, double* %25, align 8
  2064. %27 = fcmp ole double %26, 0.000000e+00
  2065. br i1 %27, label %28, label %30
  2066. 28: ; preds = %24, %19
  2067. %29 = load i32*, i32** %6, align 8
  2068. store i32 1, i32* %29, align 4
  2069. call void @setErrorMessage(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.32, i64 0, i64 0))
  2070. store double -1.000000e+00, double* %5, align 8
  2071. br label %112
  2072. 30: ; preds = %24
  2073. %31 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0
  2074. %32 = load i32, i32* %31, align 8
  2075. %33 = call i32 @abs(i32 %32) #8
  2076. %34 = icmp sgt i32 %33, 1000
  2077. br i1 %34, label %50, label %35
  2078. 35: ; preds = %30
  2079. %36 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1
  2080. %37 = load i32, i32* %36, align 4
  2081. %38 = call i32 @abs(i32 %37) #8
  2082. %39 = icmp sgt i32 %38, 1000
  2083. br i1 %39, label %50, label %40
  2084. 40: ; preds = %35
  2085. %41 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 0
  2086. %42 = load i32, i32* %41, align 8
  2087. %43 = call i32 @abs(i32 %42) #8
  2088. %44 = icmp sgt i32 %43, 1000
  2089. br i1 %44, label %50, label %45
  2090. 45: ; preds = %40
  2091. %46 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 1
  2092. %47 = load i32, i32* %46, align 4
  2093. %48 = call i32 @abs(i32 %47) #8
  2094. %49 = icmp sgt i32 %48, 1000
  2095. br i1 %49, label %50, label %52
  2096. 50: ; preds = %45, %40, %35, %30
  2097. %51 = load i32*, i32** %6, align 8
  2098. store i32 3, i32* %51, align 4
  2099. call void @setErrorMessage(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.33, i64 0, i64 0))
  2100. store double -1.000000e+00, double* %5, align 8
  2101. br label %112
  2102. 52: ; preds = %45
  2103. %53 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 0
  2104. %54 = load i32, i32* %53, align 8
  2105. %55 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0
  2106. %56 = load i32, i32* %55, align 8
  2107. %57 = sub nsw i32 %54, %56
  2108. %58 = sitofp i32 %57 to double
  2109. %59 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3
  2110. %60 = load double, double* %59, align 8
  2111. %61 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3
  2112. %62 = load double, double* %61, align 8
  2113. %63 = fdiv double %60, %62
  2114. %64 = call double @sqrt(double %63) #7
  2115. %65 = fmul double %58, %64
  2116. store double %65, double* %7, align 8
  2117. %66 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 1
  2118. %67 = load i32, i32* %66, align 4
  2119. %68 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1
  2120. %69 = load i32, i32* %68, align 4
  2121. %70 = sub nsw i32 %67, %69
  2122. %71 = sitofp i32 %70 to double
  2123. %72 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3
  2124. %73 = load double, double* %72, align 8
  2125. %74 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3
  2126. %75 = load double, double* %74, align 8
  2127. %76 = fdiv double %73, %75
  2128. %77 = call double @sqrt(double %76) #7
  2129. %78 = fmul double %71, %77
  2130. store double %78, double* %8, align 8
  2131. %79 = load double, double* %7, align 8
  2132. %80 = call double @llvm.fabs.f64(double %79)
  2133. %81 = fcmp ogt double %80, 1.000000e+03
  2134. br i1 %81, label %86, label %82
  2135. 82: ; preds = %52
  2136. %83 = load double, double* %8, align 8
  2137. %84 = call double @llvm.fabs.f64(double %83)
  2138. %85 = fcmp ogt double %84, 1.000000e+03
  2139. br i1 %85, label %86, label %88
  2140. 86: ; preds = %82, %52
  2141. %87 = load i32*, i32** %6, align 8
  2142. store i32 5, i32* %87, align 4
  2143. call void @setErrorMessage(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.34, i64 0, i64 0))
  2144. store double -1.000000e+00, double* %5, align 8
  2145. br label %112
  2146. 88: ; preds = %82
  2147. %89 = load double, double* %7, align 8
  2148. %90 = load double, double* %7, align 8
  2149. %91 = fmul double %89, %90
  2150. %92 = load double, double* %8, align 8
  2151. %93 = load double, double* %8, align 8
  2152. %94 = fmul double %92, %93
  2153. %95 = fadd double %91, %94
  2154. %96 = call double @sqrt(double %95) #7
  2155. store double %96, double* %9, align 8
  2156. %97 = load double, double* %9, align 8
  2157. %98 = fcmp uno double %97, %97
  2158. br i1 %98, label %108, label %99
  2159. 99: ; preds = %88
  2160. %100 = load double, double* %9, align 8
  2161. %101 = call double @llvm.fabs.f64(double %100) #9
  2162. %102 = fcmp oeq double %101, 0x7FF0000000000000
  2163. %103 = bitcast double %100 to i64
  2164. %104 = icmp slt i64 %103, 0
  2165. %105 = select i1 %104, i32 -1, i32 1
  2166. %106 = select i1 %102, i32 %105, i32 0
  2167. %107 = icmp ne i32 %106, 0
  2168. br i1 %107, label %108, label %110
  2169. 108: ; preds = %99, %88
  2170. %109 = load i32*, i32** %6, align 8
  2171. store i32 8, i32* %109, align 4
  2172. call void @setErrorMessage(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.35, i64 0, i64 0))
  2173. store double -1.000000e+00, double* %5, align 8
  2174. br label %112
  2175. 110: ; preds = %99
  2176. %111 = load double, double* %9, align 8
  2177. store double %111, double* %5, align 8
  2178. br label %112
  2179. 112: ; preds = %110, %108, %86, %50, %28
  2180. %113 = load double, double* %5, align 8
  2181. %114 = insertvalue %fused_return_calculateDistance_memoizedFib { i32 0, double undef }, double %113, 1
  2182. ret %fused_return_calculateDistance_memoizedFib %114
  2183. target_cond_1: ; preds = %bunker_phi_0
  2184. br i1 %0, label %115, label %target_skip_1
  2185. target_skip_1: ; preds = %target_cond_1
  2186. br label %target_phi_1
  2187. target_phi_1: ; preds = %target_skip_1
  2188. ret %fused_return_calculateDistance_memoizedFib zeroinitializer
  2189. 115: ; preds = %target_cond_1
  2190. %116 = load i32, i32* %10, align 4
  2191. %117 = insertvalue %fused_return_calculateDistance_memoizedFib undef, i32 %116, 0
  2192. %118 = insertvalue %fused_return_calculateDistance_memoizedFib %117, double 0.000000e+00, 1
  2193. ret %fused_return_calculateDistance_memoizedFib %118
  2194. }
  2195. define %fused_return_validateMatrix_processMatrix @fused_validateMatrix(i1 %0, %struct.Matrix* %1, [100 x i32]* %2, i32 %3) {
  2196. entry:
  2197. %4 = alloca i32
  2198. %5 = alloca %struct.Matrix*
  2199. %6 = alloca i32
  2200. %7 = alloca [100 x i32]*
  2201. %8 = alloca i32
  2202. %9 = alloca i32
  2203. %10 = alloca i32
  2204. %11 = alloca i32
  2205. %12 = xor i1 %0, true
  2206. br label %target_cond_0
  2207. target_cond_0: ; preds = %entry
  2208. br i1 %0, label %13, label %target_skip_0
  2209. target_skip_0: ; preds = %target_cond_0
  2210. br label %target_phi_0
  2211. target_phi_0: ; preds = %13, %target_skip_0
  2212. br label %bunker_cond_0
  2213. 13: ; preds = %target_cond_0
  2214. store [100 x i32]* %2, [100 x i32]** %7, align 8
  2215. store i32 %3, i32* %8, align 4
  2216. store i32 0, i32* %9, align 4
  2217. store i32 0, i32* %10, align 4
  2218. br label %target_phi_0
  2219. bunker_cond_0: ; preds = %target_phi_0
  2220. br i1 %12, label %14, label %bunker_skip_0
  2221. bunker_skip_0: ; preds = %bunker_cond_0
  2222. br label %bunker_phi_0
  2223. bunker_phi_0: ; preds = %bunker_skip_0
  2224. br label %target_cond_1
  2225. 14: ; preds = %bunker_cond_0
  2226. store %struct.Matrix* %1, %struct.Matrix** %5, align 8
  2227. %15 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2228. %16 = icmp ne %struct.Matrix* %15, null
  2229. br i1 %16, label %18, label %17
  2230. 17: ; preds = %14
  2231. call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))
  2232. store i32 7, i32* %4, align 4
  2233. br label %82
  2234. 18: ; preds = %14
  2235. %19 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2236. %20 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %19, i32 0, i32 0
  2237. %21 = load i32**, i32*** %20, align 8
  2238. %22 = icmp ne i32** %21, null
  2239. br i1 %22, label %24, label %23
  2240. 23: ; preds = %18
  2241. call void @setErrorMessage(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.45, i64 0, i64 0))
  2242. store i32 7, i32* %4, align 4
  2243. br label %82
  2244. 24: ; preds = %18
  2245. %25 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2246. %26 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %25, i32 0, i32 1
  2247. %27 = load i32, i32* %26, align 8
  2248. %28 = icmp slt i32 %27, 1
  2249. br i1 %28, label %34, label %29
  2250. 29: ; preds = %24
  2251. %30 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2252. %31 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %30, i32 0, i32 2
  2253. %32 = load i32, i32* %31, align 4
  2254. %33 = icmp slt i32 %32, 1
  2255. br i1 %33, label %34, label %35
  2256. 34: ; preds = %29, %24
  2257. call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))
  2258. store i32 1, i32* %4, align 4
  2259. br label %82
  2260. 35: ; preds = %29
  2261. %36 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2262. %37 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %36, i32 0, i32 1
  2263. %38 = load i32, i32* %37, align 8
  2264. %39 = icmp sgt i32 %38, 100
  2265. br i1 %39, label %45, label %40
  2266. 40: ; preds = %35
  2267. %41 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2268. %42 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %41, i32 0, i32 2
  2269. %43 = load i32, i32* %42, align 4
  2270. %44 = icmp sgt i32 %43, 100
  2271. br i1 %44, label %45, label %46
  2272. 45: ; preds = %40, %35
  2273. call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.46, i64 0, i64 0))
  2274. store i32 3, i32* %4, align 4
  2275. br label %82
  2276. 46: ; preds = %40
  2277. store i32 0, i32* %6, align 4
  2278. br label %47
  2279. 47: ; preds = %64, %46
  2280. %48 = load i32, i32* %6, align 4
  2281. %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2282. %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %49, i32 0, i32 1
  2283. %51 = load i32, i32* %50, align 8
  2284. %52 = icmp slt i32 %48, %51
  2285. br i1 %52, label %53, label %67
  2286. 53: ; preds = %47
  2287. %54 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2288. %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %54, i32 0, i32 0
  2289. %56 = load i32**, i32*** %55, align 8
  2290. %57 = load i32, i32* %6, align 4
  2291. %58 = sext i32 %57 to i64
  2292. %59 = getelementptr inbounds i32*, i32** %56, i64 %58
  2293. %60 = load i32*, i32** %59, align 8
  2294. %61 = icmp ne i32* %60, null
  2295. br i1 %61, label %63, label %62
  2296. 62: ; preds = %53
  2297. call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.47, i64 0, i64 0))
  2298. store i32 7, i32* %4, align 4
  2299. br label %82
  2300. 63: ; preds = %53
  2301. br label %64
  2302. 64: ; preds = %63
  2303. %65 = load i32, i32* %6, align 4
  2304. %66 = add nsw i32 %65, 1
  2305. store i32 %66, i32* %6, align 4
  2306. br label %47
  2307. 67: ; preds = %47
  2308. %68 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2309. %69 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %68, i32 0, i32 1
  2310. %70 = load i32, i32* %69, align 8
  2311. %71 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2312. %72 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %71, i32 0, i32 2
  2313. %73 = load i32, i32* %72, align 4
  2314. %74 = icmp eq i32 %70, %73
  2315. %75 = zext i1 %74 to i32
  2316. %76 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2317. %77 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %76, i32 0, i32 3
  2318. %78 = load i32, i32* %77, align 8
  2319. %79 = icmp ne i32 %75, %78
  2320. br i1 %79, label %80, label %81
  2321. 80: ; preds = %67
  2322. call void @setErrorMessage(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.48, i64 0, i64 0))
  2323. store i32 1, i32* %4, align 4
  2324. br label %82
  2325. 81: ; preds = %67
  2326. store i32 0, i32* %4, align 4
  2327. br label %82
  2328. 82: ; preds = %81, %80, %62, %45, %34, %23, %17
  2329. %83 = load i32, i32* %4, align 4
  2330. %84 = insertvalue %fused_return_validateMatrix_processMatrix { i32 0, i32 undef }, i32 %83, 1
  2331. ret %fused_return_validateMatrix_processMatrix %84
  2332. target_cond_1: ; preds = %bunker_phi_0
  2333. br i1 %0, label %85, label %target_skip_1
  2334. target_skip_1: ; preds = %target_cond_1
  2335. br label %target_phi_1
  2336. target_phi_1: ; preds = %158, %target_skip_1
  2337. ret %fused_return_validateMatrix_processMatrix zeroinitializer
  2338. 85: ; preds = %86, %target_cond_1
  2339. store i32 0, i32* %11, align 4
  2340. br label %94
  2341. 86: ; No predecessors!
  2342. %87 = load i32, i32* %10, align 4
  2343. %88 = load i32, i32* %8, align 4
  2344. %89 = icmp slt i32 %87, %88
  2345. br i1 %89, label %85, label %90
  2346. 90: ; preds = %86
  2347. %91 = load i32, i32* %9, align 4
  2348. %92 = insertvalue %fused_return_validateMatrix_processMatrix undef, i32 %91, 0
  2349. %93 = insertvalue %fused_return_validateMatrix_processMatrix %92, i32 0, 1
  2350. ret %fused_return_validateMatrix_processMatrix %93
  2351. 94: ; preds = %155, %85
  2352. %95 = load i32, i32* %11, align 4
  2353. %96 = load i32, i32* %8, align 4
  2354. %97 = icmp slt i32 %95, %96
  2355. br i1 %97, label %98, label %102
  2356. 98: ; preds = %94
  2357. %99 = load i32, i32* %10, align 4
  2358. %100 = load i32, i32* %11, align 4
  2359. %101 = icmp eq i32 %99, %100
  2360. br i1 %101, label %103, label %114
  2361. 102: ; preds = %94
  2362. br label %158
  2363. 103: ; preds = %98
  2364. %104 = load [100 x i32]*, [100 x i32]** %7, align 8
  2365. %105 = load i32, i32* %10, align 4
  2366. %106 = sext i32 %105 to i64
  2367. %107 = getelementptr inbounds [100 x i32], [100 x i32]* %104, i64 %106
  2368. %108 = load i32, i32* %11, align 4
  2369. %109 = sext i32 %108 to i64
  2370. %110 = getelementptr inbounds [100 x i32], [100 x i32]* %107, i64 0, i64 %109
  2371. %111 = load i32, i32* %110, align 4
  2372. %112 = srem i32 %111, 2
  2373. %113 = icmp eq i32 %112, 0
  2374. br i1 %113, label %118, label %129
  2375. 114: ; preds = %98
  2376. %115 = load i32, i32* %10, align 4
  2377. %116 = load i32, i32* %11, align 4
  2378. %117 = icmp slt i32 %115, %116
  2379. br i1 %117, label %142, label %154
  2380. 118: ; preds = %103
  2381. %119 = load [100 x i32]*, [100 x i32]** %7, align 8
  2382. %120 = load i32, i32* %10, align 4
  2383. %121 = sext i32 %120 to i64
  2384. %122 = getelementptr inbounds [100 x i32], [100 x i32]* %119, i64 %121
  2385. %123 = load i32, i32* %11, align 4
  2386. %124 = sext i32 %123 to i64
  2387. %125 = getelementptr inbounds [100 x i32], [100 x i32]* %122, i64 0, i64 %124
  2388. %126 = load i32, i32* %125, align 4
  2389. %127 = load i32, i32* %9, align 4
  2390. %128 = add nsw i32 %127, %126
  2391. store i32 %128, i32* %9, align 4
  2392. br label %140
  2393. 129: ; preds = %103
  2394. %130 = load [100 x i32]*, [100 x i32]** %7, align 8
  2395. %131 = load i32, i32* %10, align 4
  2396. %132 = sext i32 %131 to i64
  2397. %133 = getelementptr inbounds [100 x i32], [100 x i32]* %130, i64 %132
  2398. %134 = load i32, i32* %11, align 4
  2399. %135 = sext i32 %134 to i64
  2400. %136 = getelementptr inbounds [100 x i32], [100 x i32]* %133, i64 0, i64 %135
  2401. %137 = load i32, i32* %136, align 4
  2402. %138 = load i32, i32* %9, align 4
  2403. %139 = sub nsw i32 %138, %137
  2404. store i32 %139, i32* %9, align 4
  2405. br label %140
  2406. 140: ; preds = %129, %118
  2407. br label %141
  2408. 141: ; preds = %154, %140
  2409. br label %155
  2410. 142: ; preds = %114
  2411. %143 = load [100 x i32]*, [100 x i32]** %7, align 8
  2412. %144 = load i32, i32* %10, align 4
  2413. %145 = sext i32 %144 to i64
  2414. %146 = getelementptr inbounds [100 x i32], [100 x i32]* %143, i64 %145
  2415. %147 = load i32, i32* %11, align 4
  2416. %148 = sext i32 %147 to i64
  2417. %149 = getelementptr inbounds [100 x i32], [100 x i32]* %146, i64 0, i64 %148
  2418. %150 = load i32, i32* %149, align 4
  2419. %151 = call i32 @fused_performSimpleCalculations(i1 true, i32 %150)
  2420. %152 = load i32, i32* %9, align 4
  2421. %153 = add nsw i32 %152, %151
  2422. store i32 %153, i32* %9, align 4
  2423. br label %154
  2424. 154: ; preds = %142, %114
  2425. br label %141
  2426. 155: ; preds = %141
  2427. %156 = load i32, i32* %11, align 4
  2428. %157 = add nsw i32 %156, 1
  2429. store i32 %157, i32* %11, align 4
  2430. br label %94
  2431. 158: ; preds = %102
  2432. %159 = load i32, i32* %10, align 4
  2433. %160 = add nsw i32 %159, 1
  2434. store i32 %160, i32* %10, align 4
  2435. br label %target_phi_1
  2436. }
  2437. define i32 @fused_pushBack(i1 %0, %struct.DynamicArray* %1, i32 %2) {
  2438. entry:
  2439. %3 = alloca %struct.DynamicArray*
  2440. %4 = alloca i32
  2441. %5 = alloca i32
  2442. %6 = alloca i32*
  2443. %7 = alloca [14 x i8]
  2444. %8 = alloca [8 x i32]
  2445. %9 = alloca i32
  2446. %10 = alloca [100 x [100 x i32]]
  2447. %11 = alloca i32
  2448. %12 = alloca i32
  2449. %13 = alloca i32
  2450. %14 = xor i1 %0, true
  2451. br label %target_cond_0
  2452. target_cond_0: ; preds = %entry
  2453. br i1 %0, label %15, label %target_skip_0
  2454. target_skip_0: ; preds = %target_cond_0
  2455. br label %target_phi_0
  2456. target_phi_0: ; preds = %15, %target_skip_0
  2457. br label %bunker_cond_0
  2458. 15: ; preds = %target_cond_0
  2459. %16 = call %fused_return_multiplyMatrices_testPoints @fused_multiplyMatrices(i1 true, %struct.Matrix* null, %struct.Matrix* null, i32 5)
  2460. %extracted_target_return = extractvalue %fused_return_multiplyMatrices_testPoints %16, 0
  2461. call void @llvm.memset.p0i8.i64(i8* align 16 bitcast ([100 x i32]* @cache to i8*), i8 -1, i64 400, i1 false)
  2462. %17 = bitcast [14 x i8]* %7 to i8*
  2463. call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %17, i8* align 1 getelementptr inbounds ([14 x i8], [14 x i8]* @__const.projectB_main.str, i32 0, i32 0), i64 14, i1 false)
  2464. %18 = getelementptr inbounds [14 x i8], [14 x i8]* %7, i64 0, i64 0
  2465. %19 = call i8* @fused_getErrorMessage(i1 true, i8* %18)
  2466. %20 = bitcast [8 x i32]* %8 to i8*
  2467. call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %20, i8* align 16 bitcast ([8 x i32]* @__const.projectB_main.arr to i8*), i64 32, i1 false)
  2468. store i32 8, i32* %9, align 4
  2469. %21 = bitcast [100 x [100 x i32]]* %10 to i8*
  2470. call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %21, i8* align 16 bitcast (<{ <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, [97 x <{ i32, i32, i32, [97 x i32] }>] }>* @__const.projectB_main.matrix to i8*), i64 40000, i1 false)
  2471. %22 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %10, i64 0, i64 0
  2472. %23 = call %fused_return_validateMatrix_processMatrix @fused_validateMatrix(i1 true, %struct.Matrix* null, [100 x i32]* %22, i32 3)
  2473. %extracted_target_return2target_ = extractvalue %fused_return_validateMatrix_processMatrix %23, 0
  2474. store i32 %extracted_target_return2target_, i32* %11, align 4
  2475. store i32 0, i32* %12, align 4
  2476. br label %target_phi_0
  2477. bunker_cond_0: ; preds = %target_phi_0
  2478. br i1 %14, label %24, label %bunker_skip_0
  2479. bunker_skip_0: ; preds = %bunker_cond_0
  2480. br label %bunker_phi_0
  2481. bunker_phi_0: ; preds = %bunker_skip_0
  2482. br label %target_cond_1
  2483. 24: ; preds = %bunker_cond_0
  2484. store %struct.DynamicArray* %1, %struct.DynamicArray** %3, align 8
  2485. store i32 %2, i32* %4, align 4
  2486. %25 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2487. %26 = icmp ne %struct.DynamicArray* %25, null
  2488. br i1 %26, label %28, label %27
  2489. 27: ; preds = %24
  2490. call void @setErrorMessage(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))
  2491. br label %109
  2492. 28: ; preds = %24
  2493. %29 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2494. %30 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %29, i32 0, i32 1
  2495. %31 = load i32, i32* %30, align 8
  2496. %32 = icmp sge i32 %31, 1000
  2497. br i1 %32, label %33, label %34
  2498. 33: ; preds = %28
  2499. call void @setErrorMessage(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))
  2500. br label %109
  2501. 34: ; preds = %28
  2502. %35 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2503. %36 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %35, i32 0, i32 1
  2504. %37 = load i32, i32* %36, align 8
  2505. %38 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2506. %39 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %38, i32 0, i32 2
  2507. %40 = load i32, i32* %39, align 4
  2508. %41 = icmp sge i32 %37, %40
  2509. br i1 %41, label %42, label %70
  2510. 42: ; preds = %34
  2511. %43 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2512. %44 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %43, i32 0, i32 2
  2513. %45 = load i32, i32* %44, align 4
  2514. %46 = mul nsw i32 %45, 2
  2515. store i32 %46, i32* %5, align 4
  2516. %47 = load i32, i32* %5, align 4
  2517. %48 = icmp sgt i32 %47, 1000
  2518. br i1 %48, label %49, label %50
  2519. 49: ; preds = %42
  2520. store i32 1000, i32* %5, align 4
  2521. br label %50
  2522. 50: ; preds = %49, %42
  2523. %51 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2524. %52 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %51, i32 0, i32 0
  2525. %53 = load i32*, i32** %52, align 8
  2526. %54 = bitcast i32* %53 to i8*
  2527. %55 = load i32, i32* %5, align 4
  2528. %56 = sext i32 %55 to i64
  2529. %57 = mul i64 4, %56
  2530. %58 = call i8* @realloc(i8* %54, i64 %57) #7
  2531. %59 = bitcast i8* %58 to i32*
  2532. store i32* %59, i32** %6, align 8
  2533. %60 = load i32*, i32** %6, align 8
  2534. %61 = icmp ne i32* %60, null
  2535. br i1 %61, label %63, label %62
  2536. 62: ; preds = %50
  2537. call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))
  2538. br label %109
  2539. 63: ; preds = %50
  2540. %64 = load i32*, i32** %6, align 8
  2541. %65 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2542. %66 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %65, i32 0, i32 0
  2543. store i32* %64, i32** %66, align 8
  2544. %67 = load i32, i32* %5, align 4
  2545. %68 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2546. %69 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %68, i32 0, i32 2
  2547. store i32 %67, i32* %69, align 4
  2548. br label %70
  2549. 70: ; preds = %63, %34
  2550. %71 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2551. %72 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %71, i32 0, i32 3
  2552. %73 = load i32, i32* %72, align 8
  2553. %74 = icmp ne i32 %73, 0
  2554. br i1 %74, label %75, label %96
  2555. 75: ; preds = %70
  2556. %76 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2557. %77 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %76, i32 0, i32 1
  2558. %78 = load i32, i32* %77, align 8
  2559. %79 = icmp sgt i32 %78, 0
  2560. br i1 %79, label %80, label %96
  2561. 80: ; preds = %75
  2562. %81 = load i32, i32* %4, align 4
  2563. %82 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2564. %83 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %82, i32 0, i32 0
  2565. %84 = load i32*, i32** %83, align 8
  2566. %85 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2567. %86 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %85, i32 0, i32 1
  2568. %87 = load i32, i32* %86, align 8
  2569. %88 = sub nsw i32 %87, 1
  2570. %89 = sext i32 %88 to i64
  2571. %90 = getelementptr inbounds i32, i32* %84, i64 %89
  2572. %91 = load i32, i32* %90, align 4
  2573. %92 = icmp slt i32 %81, %91
  2574. br i1 %92, label %93, label %96
  2575. 93: ; preds = %80
  2576. %94 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2577. %95 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %94, i32 0, i32 3
  2578. store i32 0, i32* %95, align 8
  2579. br label %96
  2580. 96: ; preds = %93, %80, %75, %70
  2581. %97 = load i32, i32* %4, align 4
  2582. %98 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2583. %99 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %98, i32 0, i32 0
  2584. %100 = load i32*, i32** %99, align 8
  2585. %101 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2586. %102 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %101, i32 0, i32 1
  2587. %103 = load i32, i32* %102, align 8
  2588. %104 = add nsw i32 %103, 1
  2589. store i32 %104, i32* %102, align 8
  2590. %105 = sext i32 %103 to i64
  2591. %106 = getelementptr inbounds i32, i32* %100, i64 %105
  2592. store i32 %97, i32* %106, align 4
  2593. %107 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8
  2594. %108 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %107, i32 0, i32 4
  2595. store i32 1, i32* %108, align 4
  2596. br label %109
  2597. 109: ; preds = %96, %62, %33, %27
  2598. ret i32 0
  2599. target_cond_1: ; preds = %bunker_phi_0
  2600. br i1 %0, label %110, label %target_skip_1
  2601. target_skip_1: ; preds = %target_cond_1
  2602. br label %target_phi_1
  2603. target_phi_1: ; preds = %target_skip_1
  2604. ret i32 0
  2605. 110: ; preds = %115, %target_cond_1
  2606. %111 = load i32, i32* %12, align 4
  2607. %112 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 %111)
  2608. %extracted_target_return1target_ = extractvalue %fused_return_calculateDistance_memoizedFib %112, 0
  2609. %113 = load i32, i32* %12, align 4
  2610. %114 = add nsw i32 %113, 1
  2611. store i32 %114, i32* %12, align 4
  2612. br label %115
  2613. 115: ; preds = %110
  2614. %116 = load i32, i32* %12, align 4
  2615. %117 = icmp slt i32 %116, 10
  2616. br i1 %117, label %110, label %118
  2617. 118: ; preds = %115
  2618. %119 = load i32, i32* %11, align 4
  2619. %120 = icmp sgt i32 %119, 0
  2620. br i1 %120, label %121, label %123
  2621. 121: ; preds = %118
  2622. %122 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 7)
  2623. %extracted_target_returntarget_ = extractvalue %fused_return_calculateDistance_memoizedFib %122, 0
  2624. store i32 %extracted_target_returntarget_, i32* %13, align 4
  2625. br label %126
  2626. 123: ; preds = %118
  2627. %124 = load i32, i32* %11, align 4
  2628. %125 = call i32 @fused_performSimpleCalculations(i1 true, i32 %124)
  2629. store i32 %125, i32* %13, align 4
  2630. br label %126
  2631. 126: ; preds = %123, %121
  2632. %127 = load i32, i32* %13, align 4
  2633. ret i32 %127
  2634. }
  2635. define i8* @fused_getErrorMessage(i1 %0, i8* %1) {
  2636. entry:
  2637. %2 = alloca i8*
  2638. %3 = alloca i32
  2639. %4 = alloca i32
  2640. %5 = alloca i8
  2641. %6 = xor i1 %0, true
  2642. br label %target_cond_0
  2643. target_cond_0: ; preds = %entry
  2644. br i1 %0, label %7, label %target_skip_0
  2645. target_skip_0: ; preds = %target_cond_0
  2646. br label %target_phi_0
  2647. target_phi_0: ; preds = %7, %target_skip_0
  2648. br label %bunker_cond_0
  2649. 7: ; preds = %target_cond_0
  2650. store i8* %1, i8** %2, align 8
  2651. %8 = load i8*, i8** %2, align 8
  2652. %9 = call i64 @strlen(i8* %8) #10
  2653. %10 = trunc i64 %9 to i32
  2654. store i32 %10, i32* %3, align 4
  2655. store i32 0, i32* %4, align 4
  2656. br label %target_phi_0
  2657. bunker_cond_0: ; preds = %target_phi_0
  2658. br i1 %6, label %11, label %bunker_skip_0
  2659. bunker_skip_0: ; preds = %bunker_cond_0
  2660. br label %bunker_phi_0
  2661. bunker_phi_0: ; preds = %bunker_skip_0
  2662. br label %target_cond_1
  2663. 11: ; preds = %bunker_cond_0
  2664. %12 = load i8*, i8** @globalErrorMessage, align 8
  2665. %13 = icmp ne i8* %12, null
  2666. br i1 %13, label %14, label %16
  2667. 14: ; preds = %11
  2668. %15 = load i8*, i8** @globalErrorMessage, align 8
  2669. br label %17
  2670. 16: ; preds = %11
  2671. br label %17
  2672. 17: ; preds = %16, %14
  2673. %18 = phi i8* [ %15, %14 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %16 ]
  2674. ret i8* %18
  2675. target_cond_1: ; preds = %bunker_phi_0
  2676. br i1 %0, label %19, label %target_skip_1
  2677. target_skip_1: ; preds = %target_cond_1
  2678. br label %target_phi_1
  2679. target_phi_1: ; preds = %51, %target_skip_1
  2680. ret i8* null
  2681. 19: ; preds = %target_cond_1
  2682. %20 = load i32, i32* %4, align 4
  2683. %21 = load i32, i32* %3, align 4
  2684. %22 = sdiv i32 %21, 2
  2685. %23 = icmp slt i32 %20, %22
  2686. br i1 %23, label %24, label %50
  2687. 24: ; preds = %19
  2688. %25 = load i8*, i8** %2, align 8
  2689. %26 = load i32, i32* %4, align 4
  2690. %27 = sext i32 %26 to i64
  2691. %28 = getelementptr inbounds i8, i8* %25, i64 %27
  2692. %29 = load i8, i8* %28, align 1
  2693. store i8 %29, i8* %5, align 1
  2694. %30 = load i8*, i8** %2, align 8
  2695. %31 = load i32, i32* %3, align 4
  2696. %32 = sub nsw i32 %31, 1
  2697. %33 = load i32, i32* %4, align 4
  2698. %34 = sub nsw i32 %32, %33
  2699. %35 = sext i32 %34 to i64
  2700. %36 = getelementptr inbounds i8, i8* %30, i64 %35
  2701. %37 = load i8, i8* %36, align 1
  2702. %38 = load i8*, i8** %2, align 8
  2703. %39 = load i32, i32* %4, align 4
  2704. %40 = sext i32 %39 to i64
  2705. %41 = getelementptr inbounds i8, i8* %38, i64 %40
  2706. store i8 %37, i8* %41, align 1
  2707. %42 = load i8, i8* %5, align 1
  2708. %43 = load i8*, i8** %2, align 8
  2709. %44 = load i32, i32* %3, align 4
  2710. %45 = sub nsw i32 %44, 1
  2711. %46 = load i32, i32* %4, align 4
  2712. %47 = sub nsw i32 %45, %46
  2713. %48 = sext i32 %47 to i64
  2714. %49 = getelementptr inbounds i8, i8* %43, i64 %48
  2715. store i8 %42, i8* %49, align 1
  2716. br label %51
  2717. 50: ; preds = %19
  2718. ret i8* null
  2719. 51: ; preds = %24
  2720. %52 = load i32, i32* %4, align 4
  2721. %53 = add nsw i32 %52, 1
  2722. store i32 %53, i32* %4, align 4
  2723. br label %target_phi_1
  2724. }
  2725. define %fused_return_multiplyMatrices_testPoints @fused_multiplyMatrices(i1 %0, %struct.Matrix* %1, %struct.Matrix* %2, i32 %3) {
  2726. entry:
  2727. %4 = alloca %struct.Matrix*
  2728. %5 = alloca %struct.Matrix*
  2729. %6 = alloca %struct.Matrix*
  2730. %7 = alloca %struct.Matrix*
  2731. %8 = alloca i64
  2732. %9 = alloca i32
  2733. %10 = alloca i32
  2734. %11 = alloca i64
  2735. %12 = alloca i32
  2736. %13 = alloca i64
  2737. %14 = alloca i32
  2738. %15 = alloca i32
  2739. %16 = alloca i32
  2740. %17 = alloca i32
  2741. %18 = alloca i32
  2742. %19 = xor i1 %0, true
  2743. br label %target_cond_0
  2744. target_cond_0: ; preds = %entry
  2745. br i1 %0, label %20, label %target_skip_0
  2746. target_skip_0: ; preds = %target_cond_0
  2747. br label %target_phi_0
  2748. target_phi_0: ; preds = %20, %target_skip_0
  2749. br label %bunker_cond_0
  2750. 20: ; preds = %target_cond_0
  2751. store i32 %3, i32* %16, align 4
  2752. store i32 0, i32* %17, align 4
  2753. store i32 1, i32* %18, align 4
  2754. br label %target_phi_0
  2755. bunker_cond_0: ; preds = %target_phi_0
  2756. br i1 %19, label %21, label %bunker_skip_0
  2757. bunker_skip_0: ; preds = %bunker_cond_0
  2758. br label %bunker_phi_0
  2759. bunker_phi_0: ; preds = %bunker_skip_0
  2760. br label %target_cond_1
  2761. 21: ; preds = %bunker_cond_0
  2762. store %struct.Matrix* %1, %struct.Matrix** %5, align 8
  2763. store %struct.Matrix* %2, %struct.Matrix** %6, align 8
  2764. %22 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2765. %23 = icmp ne %struct.Matrix* %22, null
  2766. br i1 %23, label %24, label %27
  2767. 24: ; preds = %21
  2768. %25 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  2769. %26 = icmp ne %struct.Matrix* %25, null
  2770. br i1 %26, label %28, label %27
  2771. 27: ; preds = %24, %21
  2772. call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))
  2773. store %struct.Matrix* null, %struct.Matrix** %4, align 8
  2774. br label %217
  2775. 28: ; preds = %24
  2776. %29 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2777. %30 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %29, i32 0, i32 0
  2778. %31 = load i32**, i32*** %30, align 8
  2779. %32 = icmp ne i32** %31, null
  2780. br i1 %32, label %33, label %38
  2781. 33: ; preds = %28
  2782. %34 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  2783. %35 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %34, i32 0, i32 0
  2784. %36 = load i32**, i32*** %35, align 8
  2785. %37 = icmp ne i32** %36, null
  2786. br i1 %37, label %39, label %38
  2787. 38: ; preds = %33, %28
  2788. call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0))
  2789. store %struct.Matrix* null, %struct.Matrix** %4, align 8
  2790. br label %217
  2791. 39: ; preds = %33
  2792. %40 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2793. %41 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %40, i32 0, i32 2
  2794. %42 = load i32, i32* %41, align 4
  2795. %43 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  2796. %44 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %43, i32 0, i32 1
  2797. %45 = load i32, i32* %44, align 8
  2798. %46 = icmp ne i32 %42, %45
  2799. br i1 %46, label %47, label %48
  2800. 47: ; preds = %39
  2801. call void @setErrorMessage(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.23, i64 0, i64 0))
  2802. store %struct.Matrix* null, %struct.Matrix** %4, align 8
  2803. br label %217
  2804. 48: ; preds = %39
  2805. %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2806. %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %49, i32 0, i32 2
  2807. %51 = load i32, i32* %50, align 4
  2808. %52 = icmp sgt i32 %51, 100
  2809. br i1 %52, label %58, label %53
  2810. 53: ; preds = %48
  2811. %54 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  2812. %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %54, i32 0, i32 1
  2813. %56 = load i32, i32* %55, align 8
  2814. %57 = icmp sgt i32 %56, 100
  2815. br i1 %57, label %58, label %59
  2816. 58: ; preds = %53, %48
  2817. call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))
  2818. store %struct.Matrix* null, %struct.Matrix** %4, align 8
  2819. br label %217
  2820. 59: ; preds = %53
  2821. %60 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2822. %61 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %60, i32 0, i32 1
  2823. %62 = load i32, i32* %61, align 8
  2824. %63 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  2825. %64 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %63, i32 0, i32 2
  2826. %65 = load i32, i32* %64, align 4
  2827. %66 = call %struct.Matrix* @createMatrix(i32 %62, i32 %65)
  2828. store %struct.Matrix* %66, %struct.Matrix** %7, align 8
  2829. %67 = load %struct.Matrix*, %struct.Matrix** %7, align 8
  2830. %68 = icmp ne %struct.Matrix* %67, null
  2831. br i1 %68, label %70, label %69
  2832. 69: ; preds = %59
  2833. store %struct.Matrix* null, %struct.Matrix** %4, align 8
  2834. br label %217
  2835. 70: ; preds = %59
  2836. store i64 0, i64* %8, align 8
  2837. store i32 0, i32* %9, align 4
  2838. br label %71
  2839. 71: ; preds = %202, %70
  2840. %72 = load i32, i32* %9, align 4
  2841. %73 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2842. %74 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %73, i32 0, i32 1
  2843. %75 = load i32, i32* %74, align 8
  2844. %76 = icmp slt i32 %72, %75
  2845. br i1 %76, label %77, label %205
  2846. 77: ; preds = %71
  2847. store i32 0, i32* %10, align 4
  2848. br label %78
  2849. 78: ; preds = %198, %77
  2850. %79 = load i32, i32* %10, align 4
  2851. %80 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  2852. %81 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %80, i32 0, i32 2
  2853. %82 = load i32, i32* %81, align 4
  2854. %83 = icmp slt i32 %79, %82
  2855. br i1 %83, label %84, label %201
  2856. 84: ; preds = %78
  2857. store i64 0, i64* %11, align 8
  2858. store i32 0, i32* %12, align 4
  2859. br label %85
  2860. 85: ; preds = %152, %84
  2861. %86 = load i32, i32* %12, align 4
  2862. %87 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2863. %88 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %87, i32 0, i32 2
  2864. %89 = load i32, i32* %88, align 4
  2865. %90 = icmp slt i32 %86, %89
  2866. br i1 %90, label %91, label %155
  2867. 91: ; preds = %85
  2868. %92 = load %struct.Matrix*, %struct.Matrix** %5, align 8
  2869. %93 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %92, i32 0, i32 0
  2870. %94 = load i32**, i32*** %93, align 8
  2871. %95 = load i32, i32* %9, align 4
  2872. %96 = sext i32 %95 to i64
  2873. %97 = getelementptr inbounds i32*, i32** %94, i64 %96
  2874. %98 = load i32*, i32** %97, align 8
  2875. %99 = load i32, i32* %12, align 4
  2876. %100 = sext i32 %99 to i64
  2877. %101 = getelementptr inbounds i32, i32* %98, i64 %100
  2878. %102 = load i32, i32* %101, align 4
  2879. %103 = sext i32 %102 to i64
  2880. %104 = load %struct.Matrix*, %struct.Matrix** %6, align 8
  2881. %105 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %104, i32 0, i32 0
  2882. %106 = load i32**, i32*** %105, align 8
  2883. %107 = load i32, i32* %12, align 4
  2884. %108 = sext i32 %107 to i64
  2885. %109 = getelementptr inbounds i32*, i32** %106, i64 %108
  2886. %110 = load i32*, i32** %109, align 8
  2887. %111 = load i32, i32* %10, align 4
  2888. %112 = sext i32 %111 to i64
  2889. %113 = getelementptr inbounds i32, i32* %110, i64 %112
  2890. %114 = load i32, i32* %113, align 4
  2891. %115 = sext i32 %114 to i64
  2892. %116 = mul nsw i64 %103, %115
  2893. store i64 %116, i64* %13, align 8
  2894. %117 = load i64, i64* %13, align 8
  2895. %118 = load i64, i64* %11, align 8
  2896. %119 = add nsw i64 %118, %117
  2897. store i64 %119, i64* %11, align 8
  2898. %120 = load i64, i64* %11, align 8
  2899. %121 = icmp sgt i64 %120, 2147483647
  2900. br i1 %121, label %125, label %122
  2901. 122: ; preds = %91
  2902. %123 = load i64, i64* %11, align 8
  2903. %124 = icmp slt i64 %123, -2147483648
  2904. br i1 %124, label %125, label %151
  2905. 125: ; preds = %122, %91
  2906. call void @setErrorMessage(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.24, i64 0, i64 0))
  2907. store i32 0, i32* %14, align 4
  2908. br label %126
  2909. 126: ; preds = %141, %125
  2910. %127 = load i32, i32* %14, align 4
  2911. %128 = load %struct.Matrix*, %struct.Matrix** %7, align 8
  2912. %129 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %128, i32 0, i32 1
  2913. %130 = load i32, i32* %129, align 8
  2914. %131 = icmp slt i32 %127, %130
  2915. br i1 %131, label %132, label %144
  2916. 132: ; preds = %126
  2917. %133 = load %struct.Matrix*, %struct.Matrix** %7, align 8
  2918. %134 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %133, i32 0, i32 0
  2919. %135 = load i32**, i32*** %134, align 8
  2920. %136 = load i32, i32* %14, align 4
  2921. %137 = sext i32 %136 to i64
  2922. %138 = getelementptr inbounds i32*, i32** %135, i64 %137
  2923. %139 = load i32*, i32** %138, align 8
  2924. %140 = bitcast i32* %139 to i8*
  2925. call void @free(i8* %140) #7
  2926. br label %141
  2927. 141: ; preds = %132
  2928. %142 = load i32, i32* %14, align 4
  2929. %143 = add nsw i32 %142, 1
  2930. store i32 %143, i32* %14, align 4
  2931. br label %126
  2932. 144: ; preds = %126
  2933. %145 = load %struct.Matrix*, %struct.Matrix** %7, align 8
  2934. %146 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %145, i32 0, i32 0
  2935. %147 = load i32**, i32*** %146, align 8
  2936. %148 = bitcast i32** %147 to i8*
  2937. call void @free(i8* %148) #7
  2938. %149 = load %struct.Matrix*, %struct.Matrix** %7, align 8
  2939. %150 = bitcast %struct.Matrix* %149 to i8*
  2940. call void @free(i8* %150) #7
  2941. store %struct.Matrix* null, %struct.Matrix** %4, align 8
  2942. br label %217
  2943. 151: ; preds = %122
  2944. br label %152
  2945. 152: ; preds = %151
  2946. %153 = load i32, i32* %12, align 4
  2947. %154 = add nsw i32 %153, 1
  2948. store i32 %154, i32* %12, align 4
  2949. br label %85
  2950. 155: ; preds = %85
  2951. %156 = load i64, i64* %11, align 8
  2952. %157 = trunc i64 %156 to i32
  2953. %158 = load %struct.Matrix*, %struct.Matrix** %7, align 8
  2954. %159 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %158, i32 0, i32 0
  2955. %160 = load i32**, i32*** %159, align 8
  2956. %161 = load i32, i32* %9, align 4
  2957. %162 = sext i32 %161 to i64
  2958. %163 = getelementptr inbounds i32*, i32** %160, i64 %162
  2959. %164 = load i32*, i32** %163, align 8
  2960. %165 = load i32, i32* %10, align 4
  2961. %166 = sext i32 %165 to i64
  2962. %167 = getelementptr inbounds i32, i32* %164, i64 %166
  2963. store i32 %157, i32* %167, align 4
  2964. %168 = load %struct.Matrix*, %struct.Matrix** %7, align 8
  2965. %169 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %168, i32 0, i32 0
  2966. %170 = load i32**, i32*** %169, align 8
  2967. %171 = load i32, i32* %9, align 4
  2968. %172 = sext i32 %171 to i64
  2969. %173 = getelementptr inbounds i32*, i32** %170, i64 %172
  2970. %174 = load i32*, i32** %173, align 8
  2971. %175 = load i32, i32* %10, align 4
  2972. %176 = sext i32 %175 to i64
  2973. %177 = getelementptr inbounds i32, i32* %174, i64 %176
  2974. %178 = load i32, i32* %177, align 4
  2975. %179 = call i32 @abs(i32 %178) #8
  2976. %180 = sext i32 %179 to i64
  2977. %181 = load i64, i64* %8, align 8
  2978. %182 = icmp sgt i64 %180, %181
  2979. br i1 %182, label %183, label %197
  2980. 183: ; preds = %155
  2981. %184 = load %struct.Matrix*, %struct.Matrix** %7, align 8
  2982. %185 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %184, i32 0, i32 0
  2983. %186 = load i32**, i32*** %185, align 8
  2984. %187 = load i32, i32* %9, align 4
  2985. %188 = sext i32 %187 to i64
  2986. %189 = getelementptr inbounds i32*, i32** %186, i64 %188
  2987. %190 = load i32*, i32** %189, align 8
  2988. %191 = load i32, i32* %10, align 4
  2989. %192 = sext i32 %191 to i64
  2990. %193 = getelementptr inbounds i32, i32* %190, i64 %192
  2991. %194 = load i32, i32* %193, align 4
  2992. %195 = call i32 @abs(i32 %194) #8
  2993. %196 = sext i32 %195 to i64
  2994. store i64 %196, i64* %8, align 8
  2995. br label %197
  2996. 197: ; preds = %183, %155
  2997. br label %198
  2998. 198: ; preds = %197
  2999. %199 = load i32, i32* %10, align 4
  3000. %200 = add nsw i32 %199, 1
  3001. store i32 %200, i32* %10, align 4
  3002. br label %78
  3003. 201: ; preds = %78
  3004. br label %202
  3005. 202: ; preds = %201
  3006. %203 = load i32, i32* %9, align 4
  3007. %204 = add nsw i32 %203, 1
  3008. store i32 %204, i32* %9, align 4
  3009. br label %71
  3010. 205: ; preds = %71
  3011. %206 = load %struct.Matrix*, %struct.Matrix** %7, align 8
  3012. %207 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %206, i32 0, i32 1
  3013. %208 = load i32, i32* %207, align 8
  3014. %209 = load %struct.Matrix*, %struct.Matrix** %7, align 8
  3015. %210 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %209, i32 0, i32 2
  3016. %211 = load i32, i32* %210, align 4
  3017. %212 = icmp eq i32 %208, %211
  3018. %213 = zext i1 %212 to i32
  3019. %214 = load %struct.Matrix*, %struct.Matrix** %7, align 8
  3020. %215 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %214, i32 0, i32 3
  3021. store i32 %213, i32* %215, align 8
  3022. %216 = load %struct.Matrix*, %struct.Matrix** %7, align 8
  3023. store %struct.Matrix* %216, %struct.Matrix** %4, align 8
  3024. br label %217
  3025. 217: ; preds = %205, %144, %69, %58, %47, %38, %27
  3026. %218 = load %struct.Matrix*, %struct.Matrix** %4, align 8
  3027. %219 = insertvalue %fused_return_multiplyMatrices_testPoints { i32 0, %struct.Matrix* undef }, %struct.Matrix* %218, 1
  3028. ret %fused_return_multiplyMatrices_testPoints %219
  3029. target_cond_1: ; preds = %bunker_phi_0
  3030. br i1 %0, label %220, label %target_skip_1
  3031. target_skip_1: ; preds = %target_cond_1
  3032. br label %target_phi_1
  3033. target_phi_1: ; preds = %236, %target_skip_1
  3034. ret %fused_return_multiplyMatrices_testPoints zeroinitializer
  3035. 220: ; preds = %225, %target_cond_1
  3036. %221 = load i32, i32* %17, align 4
  3037. %222 = add nsw i32 %221, 1
  3038. store i32 %222, i32* %17, align 4
  3039. %223 = load i32, i32* %16, align 4
  3040. %224 = icmp sgt i32 %223, 2
  3041. br i1 %224, label %230, label %231
  3042. 225: ; No predecessors!
  3043. %226 = load i32, i32* %18, align 4
  3044. %227 = icmp slt i32 %226, 5
  3045. br i1 %227, label %220, label %228
  3046. 228: ; preds = %225
  3047. %229 = load i32, i32* %17, align 4
  3048. store i32 %229, i32* %15, align 4
  3049. br label %232
  3050. 230: ; preds = %220
  3051. store i32 23, i32* %15, align 4
  3052. br label %232
  3053. 231: ; preds = %220
  3054. br label %236
  3055. 232: ; preds = %230, %228
  3056. %233 = load i32, i32* %15, align 4
  3057. %234 = insertvalue %fused_return_multiplyMatrices_testPoints undef, i32 %233, 0
  3058. %235 = insertvalue %fused_return_multiplyMatrices_testPoints %234, %struct.Matrix* null, 1
  3059. ret %fused_return_multiplyMatrices_testPoints %235
  3060. 236: ; preds = %231
  3061. %237 = load i32, i32* %18, align 4
  3062. %238 = add nsw i32 %237, 1
  3063. store i32 %238, i32* %18, align 4
  3064. br label %target_phi_1
  3065. }
  3066. attributes #0 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  3067. attributes #1 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  3068. attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  3069. attributes #3 = { nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  3070. attributes #4 = { nounwind readnone speculatable willreturn }
  3071. attributes #5 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  3072. attributes #6 = { argmemonly nounwind willreturn }
  3073. attributes #7 = { nounwind }
  3074. attributes #8 = { nounwind readnone }
  3075. attributes #9 = { readnone }
  3076. attributes #10 = { nounwind readonly }
  3077. !llvm.ident = !{!0, !0}
  3078. !llvm.module.flags = !{!1}
  3079. !0 = !{!"clang version 10.0.0-4ubuntu1 "}
  3080. !1 = !{i32 1, !"wchar_size", i32 4}
  3081. !2 = !{!"Bunker"}