#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/ *);
int create_asm(const char *filename, const unsigned char *mem,
               unsigned long num_bytes, unsigned long starting_address) {
  FILE *asm_fp;
  unsigned long n;
  asm_fp = fopen(filename, "w");
  if (asm_fp == NULL) {
    perror(filename);
    return -1;
  }
  fprintf(asm_fp,
          ".text\n"
          ".set ., 0x%lX\n"
          ".globl main\n"
          "main:\n"
          ".globl _main\n"
          "_main:\n",
          starting_address);
  for (n = 0; n < num_bytes; n += 8) {
    unsigned long i;
    fputs("\t.byte ", asm_fp);
    for (i = 0; i < 8 && n + i < num_bytes; i++)
      fprintf(asm_fp, "%s0x%02X", (i != 0) ? "," : "", (unsigned)mem[n + i]);
    putc('\n', asm_fp);
  }
  fprintf(asm_fp, "\t.byte 0x4E,0x71,0x4E,0x71,0x4E,0x71,0x4E,0x71\n");
  fputs(".set _nilhandle,0x00\n"
        ".globl _nilhandle\n"
        ".set _trapvectors,0x80\n"
        ".globl _trapvectors\n"
        ".set _dodusesit,0xE4\n"
        ".globl _dodusesit\n"
        ".set _monkeylives,0x100\n"
        ".globl _monkeylives\n"
        ".set _ScrVRes,0x102\n"
        ".globl _ScrVRes\n"
        ".set _ScrHRes,0x104\n"
        ".globl _ScrHRes\n"
        ".set _ScreenRow,0x106\n"
        ".globl _ScreenRow\n"
        ".set _MemTop,0x108\n"
        ".globl _MemTop\n"
        ".set _BufPtr,0x10C\n"
        ".globl _BufPtr\n"
        ".set _HeapEnd,0x114\n"
        ".globl _HeapEnd\n"
        ".set _TheZone,0x118\n"
        ".globl _TheZone\n"
        ".set _UTableBase,0x11C\n"
        ".globl _UTableBase\n"
        ".set _loadtrap,0x12D\n"
        ".globl _loadtrap\n"
        ".set _CPUFlag,0x12F\n"
        ".globl _CPUFlag\n"
        ".set _ApplLimit,0x130\n"
        ".globl _ApplLimit\n"
        ".set _SysEvtMask,0x144\n"
        ".globl _SysEvtMask\n"
        ".set _EventQueue,0x14A\n"
        ".globl _EventQueue\n"
        ".set _RndSeed_L,0x156\n"
        ".globl _RndSeed_L\n"
        ".set _SysVersion,0x15A\n"
        ".globl _SysVersion\n"
        ".set _SEvtEnb,0x15C\n"
        ".globl _SEvtEnb\n"
        ".set _VBLQueue,0x160\n"
        ".globl _VBLQueue\n"
        ".set _Ticks,0x16A\n"
        ".globl _Ticks\n"
        ".set _KeyMap,0x174\n"
        ".globl _KeyMap\n"
        ".set _KeyThresh,0x18E\n"
        ".globl _KeyThresh\n"
        ".set _KeyRepThresh,0x190\n"
        ".globl _KeyRepThresh\n"
        ".set _Lvl1DT,0x192\n"
        ".globl _Lvl1DT\n"
        ".set _hyperlong,0x1AA\n"
        ".globl _hyperlong\n"
        ".set _Lvl2DT,0x1B2\n"
        ".globl _Lvl2DT\n"
        ".set _UnitNtryCnt,0x1D2\n"
        ".globl _UnitNtryCnt\n"
        ".set _VIA,0x1D4\n"
        ".globl _VIA\n"
        ".set _SCCRd,0x1D8\n"
        ".globl _SCCRd\n"
        ".set _SCCWr,0x1DC\n"
        ".globl _SCCWr\n"
        ".set _IWM,0x1E0\n"
        ".globl _IWM\n"
        ".set _Scratch20,0x1E4\n"
        ".globl _Scratch20\n"
        ".set _SPValid,0x1F8\n"
        ".globl _SPValid\n"
        ".set _SPATalkA,0x1F9\n"
        ".globl _SPATalkA\n"
        ".set _SPATalkB,0x1FA\n"
        ".globl _SPATalkB\n"
        ".set _SPConfig,0x1FB\n"
        ".globl _SPConfig\n"
        ".set _SPPortA,0x1FC\n"
        ".globl _SPPortA\n"
        ".set _SPPortB,0x1FE\n"
        ".globl _SPPortB\n"
        ".set _SPAlarm,0x200\n"
        ".globl _SPAlarm\n"
        ".set _SPFont,0x204\n"
        ".globl _SPFont\n"
        ".set _SPKbd,0x206\n"
        ".globl _SPKbd\n"
        ".set _SPPrint,0x207\n"
        ".globl _SPPrint\n"
        ".set _SPVolCtl,0x208\n"
        ".globl _SPVolCtl\n"
        ".set _SPClikCaret,0x209\n"
        ".globl _SPClikCaret\n"
        ".set _SPMisc2,0x20B\n"
        ".globl _SPMisc2\n"
        ".set _Time,0x20C\n"
        ".globl _Time\n"
        ".set _BootDrive,0x210\n"
        ".globl _BootDrive\n"
        ".set _SFSaveDisk,0x214\n"
        ".globl _SFSaveDisk\n"
        ".set _KbdLast,0x218\n"
        ".globl _KbdLast\n"
        ".set _KbdType,0x21E\n"
        ".globl _KbdType\n"
        ".set _MemErr,0x220\n"
        ".globl _MemErr\n"
        ".set _SdVolume,0x260\n"
        ".globl _SdVolume\n"
        ".set _SoundPtr,0x262\n"
        ".globl _SoundPtr\n"
        ".set _SoundBase,0x266\n"
        ".globl _SoundBase\n"
        ".set _SoundActive,0x27E\n"
        ".globl _SoundActive\n"
        ".set _SoundLevel,0x27F\n"
        ".globl _SoundLevel\n"
        ".set _CurPitch,0x280\n"
        ".globl _CurPitch\n"
        ".set _mathones,0x282\n"
        ".globl _mathones\n"
        ".set _ROM85,0x28E\n"
        ".globl _ROM85\n"
        ".set _PortBUse,0x291\n"
        ".globl _PortBUse\n"
        ".set _ScreenVars,0x292\n"
        ".globl _ScreenVars\n"
        ".set _Key1Trans,0x29E\n"
        ".globl _Key1Trans\n"
        ".set _Key2Trans,0x2A2\n"
        ".globl _Key2Trans\n"
        ".set _SysZone,0x2A6\n"
        ".globl _SysZone\n"
        ".set _ApplZone,0x2AA\n"
        ".globl _ApplZone\n"
        ".set _ROMBase,0x2AE\n"
        ".globl _ROMBase\n"
        ".set _RAMBase,0x2B2\n"
        ".globl _RAMBase\n"
        ".set _DSAlertTab,0x2BA\n"
        ".globl _DSAlertTab\n"
        ".set _ExtStsDT,0x2BE\n"
        ".globl _ExtStsDT\n"
        ".set _ABusVars,0x2D8\n"
        ".globl _ABusVars\n"
        ".set _FinderName,0x2E0\n"
        ".globl _FinderName\n"
        ".set _DoubleTime,0x2F0\n"
        ".globl _DoubleTime\n"
        ".set _CaretTime,0x2F4\n"
        ".globl _CaretTime\n"
        ".set _ScrDmpEnb,0x2F8\n"
        ".globl _ScrDmpEnb\n"
        ".set _BufTgFNum,0x2FC\n"
        ".globl _BufTgFNum\n"
        ".set _BufTgFFlg,0x300\n"
        ".globl _BufTgFFlg\n"
        ".set _BufTgFBkNum,0x302\n"
        ".globl _BufTgFBkNum\n"
        ".set _BufTgDate,0x304\n"
        ".globl _BufTgDate\n"
        ".set _DrvQHdr,0x308\n"
        ".globl _DrvQHdr\n"
        ".set _heapcheck,0x316\n"
        ".globl _heapcheck\n"
        ".set _Lo3Bytes,0x31A\n"
        ".globl _Lo3Bytes\n"
        ".set _MinStack,0x31E\n"
        ".globl _MinStack\n"
        ".set _DefltStack,0x322\n"
        ".globl _DefltStack\n"
        ".set _GZRootHnd,0x328\n"
        ".globl _GZRootHnd\n"
        ".set _EjectNotify,0x338\n"
        ".globl _EjectNotify\n"
        ".set _IAZNotify,0x33C\n"
        ".globl _IAZNotify\n"
        ".set _FCBSPtr,0x34E\n"
        ".globl _FCBSPtr\n"
        ".set _DefVCBPtr,0x352\n"
        ".globl _DefVCBPtr\n"
        ".set _VCBQHdr,0x356\n"
        ".globl _VCBQHdr\n"
        ".set _FSQHdr,0x360\n"
        ".globl _FSQHdr\n"
        ".set _WDCBsPtr,0x372\n"
        ".globl _WDCBsPtr\n"
        ".set _DefVRefNum,0x384\n"
        ".globl _DefVRefNum\n"
        ".set _CurDirStore,0x398\n"
        ".globl _CurDirStore\n"
        ".set _MCLKPCmiss1,0x3A0\n"
        ".globl _MCLKPCmiss1\n"
        ".set _MCLKPCmiss2,0x3A6\n"
        ".globl _MCLKPCmiss2\n"
        ".set _ToExtFS,0x3F2\n"
        ".globl _ToExtFS\n"
        ".set _FSFCBLen,0x3F6\n"
        ".globl _FSFCBLen\n"
        ".set _DSAlertRect,0x3F8\n"
        ".globl _DSAlertRect\n"
        ".set _JADBProc,0x6B8\n"
        ".globl _JADBProc\n"
        ".set _JFLUSH,0x6F4\n"
        ".globl _JFLUSH\n"
        ".set _JResUnknown1,0x700\n"
        ".globl _JResUnknown1\n"
        ".set _JResUnknown2,0x714\n"
        ".globl _JResUnknown2\n"
        ".set _JHideCursor,0x800\n"
        ".globl _JHideCursor\n"
        ".set _JShowCursor,0x804\n"
        ".globl _JShowCursor\n"
        ".set _JShieldCursor,0x808\n"
        ".globl _JShieldCursor\n"
        ".set _JScrnAddr,0x80C\n"
        ".globl _JScrnAddr\n"
        ".set _JScrnSize,0x810\n"
        ".globl _JScrnSize\n"
        ".set _JInitCrsr,0x814\n"
        ".globl _JInitCrsr\n"
        ".set _JSetCrsr,0x818\n"
        ".globl _JSetCrsr\n"
        ".set _JCrsrOdirure,0x81C\n"
        ".globl _JCrsrOdirure\n"
        ".set _JUpdateProc,0x820\n"
        ".globl _JUpdateProc\n"
        ".set _ScrnBase,0x824\n"
        ".globl _ScrnBase\n"
        ".set _MouseLocation,0x82C\n"
        ".globl _MouseLocation\n"
        ".set _CrsrPin,0x834\n"
        ".globl _CrsrPin\n"
        ".set _MainDevice,0x8A4\n"
        ".globl _MainDevice\n"
        ".set _DeviceList,0x8A8\n"
        ".globl _DeviceList\n"
        ".set _QDColors,0x8B0\n"
        ".globl _QDColors\n"
        ".set _CrsrVis,0x8CC\n"
        ".globl _CrsrVis\n"
        ".set _CrsrState,0x8D0\n"
        ".globl _CrsrState\n"
        ".set _mousemask,0x8D6\n"
        ".globl _mousemask\n"
        ".set _mouseoffset,0x8DA\n"
        ".globl _mouseoffset\n"
        ".set _JournalFlag,0x8DE\n"
        ".globl _JournalFlag\n"
        ".set _JSwapFont,0x8E0\n"
        ".globl _JSwapFont\n"
        ".set _WidthListHand,0x8E4\n"
        ".globl _WidthListHand\n"
        ".set _JournalRef,0x8E8\n"
        ".globl _JournalRef\n"
        ".set _CrsrThresh,0x8EC\n"
        ".globl _CrsrThresh\n"
        ".set _WWExist,0x8F2\n"
        ".globl _WWExist\n"
        ".set _QDExist,0x8F3\n"
        ".globl _QDExist\n"
        ".set _JFetch,0x8F4\n"
        ".globl _JFetch\n"
        ".set _JStash,0x8F8\n"
        ".globl _JStash\n"
        ".set _JIODone,0x8FC\n"
        ".globl _JIODone\n"
        ".set _CurApRefNum,0x900\n"
        ".globl _CurApRefNum\n"
        ".set _CurrentA5,0x904\n"
        ".globl _CurrentA5\n"
        ".set _CurStackBase,0x908\n"
        ".globl _CurStackBase\n"
        ".set _CurApName,0x910\n"
        ".globl _CurApName\n"
        ".set _CurJTOffset,0x934\n"
        ".globl _CurJTOffset\n"
        ".set _CurPageOption,0x936\n"
        ".globl _CurPageOption\n"
        ".set _HiliteMode,0x938\n"
        ".globl _HiliteMode\n"
        ".set _PrintErr,0x944\n"
        ".globl _PrintErr\n"
        ".set _graphlooksat,0x952\n"
        ".globl _graphlooksat\n"
        ".set _macwritespace,0x954\n"
        ".globl _macwritespace\n"
        ".set _ScrapSize,0x960\n"
        ".globl _ScrapSize\n"
        ".set _ScrapHandle,0x964\n"
        ".globl _ScrapHandle\n"
        ".set _ScrapCount,0x968\n"
        ".globl _ScrapCount\n"
        ".set _ScrapState,0x96A\n"
        ".globl _ScrapState\n"
        ".set _ScrapName,0x96C\n"
        ".globl _ScrapName\n"
        ".set _ROMFont0,0x980\n"
        ".globl _ROMFont0\n"
        ".set _ApFontID,0x984\n"
        ".globl _ApFontID\n"
        ".set _ROMlib_myfmi,0x988\n"
        ".globl _ROMlib_myfmi\n"
        ".set _ROMlib_fmo,0x998\n"
        ".globl _ROMlib_fmo\n"
        ".set _ToolScratch,0x9CE\n"
        ".globl _ToolScratch\n"
        ".set _WindowList,0x9D6\n"
        ".globl _WindowList\n"
        ".set _SaveUpdate,0x9DA\n"
        ".globl _SaveUpdate\n"
        ".set _PaintWhite,0x9DC\n"
        ".globl _PaintWhite\n"
        ".set _WMgrPort,0x9DE\n"
        ".globl _WMgrPort\n"
        ".set _OldStructure,0x9E6\n"
        ".globl _OldStructure\n"
        ".set _OldContent,0x9EA\n"
        ".globl _OldContent\n"
        ".set _GrayRgn,0x9EE\n"
        ".globl _GrayRgn\n"
        ".set _SaveVisRgn,0x9F2\n"
        ".globl _SaveVisRgn\n"
        ".set _DragHook,0x9F6\n"
        ".globl _DragHook\n"
        ".set _Scratch8,0x9FA\n"
        ".globl _Scratch8\n"
        ".set _OneOne,0xA02\n"
        ".globl _OneOne\n"
        ".set _MinusOne,0xA06\n"
        ".globl _MinusOne\n"
        ".set _TopMenuItem,0xA0A\n"
        ".globl _TopMenuItem\n"
        ".set _AtMenuBottom,0xA0C\n"
        ".globl _AtMenuBottom\n"
        ".set _MenuList,0xA1C\n"
        ".globl _MenuList\n"
        ".set _MBarEnable,0xA20\n"
        ".globl _MBarEnable\n"
        ".set _MenuFlash,0xA24\n"
        ".globl _MenuFlash\n"
        ".set _TheMenu,0xA26\n"
        ".globl _TheMenu\n"
        ".set _MBarHook,0xA2C\n"
        ".globl _MBarHook\n"
        ".set _MenuHook,0xA30\n"
        ".globl _MenuHook\n"
        ".set _DragPattern,0xA34\n"
        ".globl _DragPattern\n"
        ".set _DeskPattern,0xA3C\n"
        ".globl _DeskPattern\n"
        ".set _fpstate,0xA4A\n"
        ".globl _fpstate\n"
        ".set _TopMapHndl,0xA50\n"
        ".globl _TopMapHndl\n"
        ".set _SysMapHndl,0xA54\n"
        ".globl _SysMapHndl\n"
        ".set _SysMap,0xA58\n"
        ".globl _SysMap\n"
        ".set _CurMap,0xA5A\n"
        ".globl _CurMap\n"
        ".set _resreadonly,0xA5C\n"
        ".globl _resreadonly\n"
        ".set _ResLoad,0xA5E\n"
        ".globl _ResLoad\n"
        ".set _ResErr,0xA60\n"
        ".globl _ResErr\n"
        ".set _FScaleDisable,0xA63\n"
        ".globl _FScaleDisable\n"
        ".set _CurActivate,0xA64\n"
        ".globl _CurActivate\n"
        ".set _CurDeactive,0xA68\n"
        ".globl _CurDeactive\n"
        ".set _DeskHook,0xA6C\n"
        ".globl _DeskHook\n"
        ".set _TEDoText,0xA70\n"
        ".globl _TEDoText\n"
        ".set _TERecal,0xA74\n"
        ".globl _TERecal\n"
        ".set _ApplScratch,0xA78\n"
        ".globl _ApplScratch\n"
        ".set _GhostWindow,0xA84\n"
        ".globl _GhostWindow\n"
        ".set _ResumeProc,0xA8C\n"
        ".globl _ResumeProc\n"
        ".set _ANumber,0xA98\n"
        ".globl _ANumber\n"
        ".set _ACount,0xA9A\n"
        ".globl _ACount\n"
        ".set _DABeeper,0xA9C\n"
        ".globl _DABeeper\n"
        ".set _DAStrings,0xAA0\n"
        ".globl _DAStrings\n"
        ".set _TEScrpLength,0xAB0\n"
        ".globl _TEScrpLength\n"
        ".set _TEScrpHandle,0xAB4\n"
        ".globl _TEScrpHandle\n"
        ".set _AppPacks,0xAB8\n"
        ".globl _AppPacks\n"
        ".set _SysResName,0xAD8\n"
        ".globl _SysResName\n"
        ".set _AppParmHandle,0xAEC\n"
        ".globl _AppParmHandle\n"
        ".set _DSErrCode,0xAF0\n"
        ".globl _DSErrCode\n"
        ".set _ResErrProc,0xAF2\n"
        ".globl _ResErrProc\n"
        ".set _DlgFont,0xAFA\n"
        ".globl _DlgFont\n"
        ".set _WidthPtr,0xB10\n"
        ".globl _WidthPtr\n"
        ".set _SCSIFlags,0xB22\n"
        ".globl _SCSIFlags\n"
        ".set _WidthTabHandle,0xB2A\n"
        ".globl _WidthTabHandle\n"
        ".set _hyperwritesto,0xB4C\n"
        ".globl _hyperwritesto\n"
        ".set _MenuDisable,0xB54\n"
        ".globl _MenuDisable\n"
        ".set _MBDFHndl,0xB58\n"
        ".globl _MBDFHndl\n"
        ".set _MBSaveLoc,0xB5C\n"
        ".globl _MBSaveLoc\n"
        ".set _RomMapInsert,0xB9E\n"
        ".globl _RomMapInsert\n"
        ".set _TmpResLoad,0xB9F\n"
        ".globl _TmpResLoad\n"
        ".set _IntlSpec,0xBA0\n"
        ".globl _IntlSpec\n"
        ".set _SysFontFam,0xBA6\n"
        ".globl _SysFontFam\n"
        ".set _SysFontSiz,0xBA8\n"
        ".globl _SysFontSiz\n"
        ".set _MBarHeight,0xBAA\n"
        ".globl _MBarHeight\n"
        ".set _TESysJust,0xBAC\n"
        ".globl _TESysJust\n"
        ".set _LastFOND,0xBC2\n"
        ".globl _LastFOND\n"
        ".set _fondid,0xBC6\n"
        ".globl _fondid\n"
        ".set _FractEnable,0xBF4\n"
        ".globl _FractEnable\n"
        ".set _MMU32Bit,0xCB2\n"
        ".globl _MMU32Bit\n"
        ".set _TheGDevice,0xCC8\n"
        ".globl _TheGDevice\n"
        ".set _AuxWinHead,0xCD0\n"
        ".globl _AuxWinHead\n"
        ".set _AuxCtlHead,0xCD4\n"
        ".globl _AuxCtlHead\n"
        ".set _TimeDBRA,0xD00\n"
        ".globl _TimeDBRA\n"
        ".set _TimeSCCDB,0xD02\n"
        ".globl _TimeSCCDB\n"
        ".set _JVBLTask,0xD28\n"
        ".globl _JVBLTask\n"
        ".set _WMgrCPort,0xD2C\n"
        ".globl _WMgrCPort\n"
        ".set _SynListHandle,0xD32\n"
        ".globl _SynListHandle\n"
        ".set _MenuCInfo,0xD50\n"
        ".globl _MenuCInfo\n"
        ".set _DTQueue,0xD92\n"
        ".globl _DTQueue\n"
        ".set _JDTInstall,0xD9C\n"
        ".globl _JDTInstall\n"
        ".set _HiliteRGB,0xDA0\n"
        ".globl _HiliteRGB\n"
        ".set _TimeSCSIDB,0xDA6\n"
        ".globl _TimeSCSIDB\n",
        asm_fp);
  if (fclose(asm_fp)) {
    perror(filename);
    return -2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<create_asm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe7d(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    11ac <create_asm+0x4c>
mov    -0x10(%rbp),%rdi
call   1080 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    12df <create_asm+0x17f>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rdx
lea    0xe47(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    128e <create_asm+0x12e>
mov    -0x30(%rbp),%rsi
lea    0xe5a(%rip),%rdi
call   1040 <fputs@plt>
movq   $0x0,-0x40(%rbp)
xor    %eax,%eax
cmpq   $0x8,-0x40(%rbp)
mov    %al,-0x41(%rbp)
jae    1212 <create_asm+0xb2>
mov    -0x38(%rbp),%rax
add    -0x40(%rbp),%rax
cmp    -0x20(%rbp),%rax
setb   %al
mov    %al,-0x41(%rbp)
mov    -0x41(%rbp),%al
test   $0x1,%al
jne    1222 <create_asm+0xc2>
jmp    126f <create_asm+0x10f>
mov    -0x30(%rbp),%rdi
mov    -0x40(%rbp),%rcx
lea    0xe4e(%rip),%rdx
lea    0xe16(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdx
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%rcx
add    -0x40(%rbp),%rcx
movzbl (%rax,%rcx,1),%ecx
lea    0xdee(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    11f0 <create_asm+0x90>
mov    -0x30(%rbp),%rsi
mov    $0xa,%edi
call   1050 <putc@plt>
mov    -0x38(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x38(%rbp)
jmp    11ca <create_asm+0x6a>
mov    -0x30(%rbp),%rdi
lea    0xdb7(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rsi
lea    0xdd5(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
cmp    $0x0,%rax
je     12d8 <create_asm+0x178>
mov    -0x10(%rbp),%rdi
call   1080 <perror@plt>
movl   $0xfffffffe,-0x4(%rbp)
jmp    12df <create_asm+0x17f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_asm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbp
mov    %rsi,%r12
mov    %rdi,%r15
lea    0xe82(%rip),%rsi
call   1060 <fopen@plt>
test   %rax,%rax
je     1366 <create_asm+0x206>
mov    %rax,%rbx
mov    %r15,(%rsp)
lea    0xe68(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
test   %rbp,%rbp
je     1311 <create_asm+0x1b1>
mov    $0x7,%r15d
lea    0xe88(%rip),%r14
lea    0xe8a(%rip),%r13
jmp    11f1 <create_asm+0x91>
cs nopw 0x0(%rax,%rax,1)
mov    $0xa,%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
lea    0x8(%r15),%rax
add    $0x1,%r15
cmp    %rbp,%r15
mov    %rax,%r15
jae    1311 <create_asm+0x1b1>
mov    $0x7,%esi
mov    $0x1,%edx
lea    0xe3b(%rip),%rdi
mov    %rbx,%rcx
call   1080 <fwrite@plt>
movzbl -0x7(%r12,%r15,1),%ecx
mov    %rbx,%rdi
mov    %r14,%rsi
lea    0xe62(%rip),%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    -0x6(%r15),%rax
cmp    %rbp,%rax
jae    11d0 <create_asm+0x70>
movzbl -0x6(%r12,%r15,1),%ecx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    -0x5(%r15),%rax
cmp    %rbp,%rax
jae    11d0 <create_asm+0x70>
movzbl -0x5(%r12,%r15,1),%ecx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    -0x4(%r15),%rax
cmp    %rbp,%rax
jae    11d0 <create_asm+0x70>
movzbl -0x4(%r12,%r15,1),%ecx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    -0x3(%r15),%rax
cmp    %rbp,%rax
jae    11d0 <create_asm+0x70>
movzbl -0x3(%r12,%r15,1),%ecx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    -0x2(%r15),%rax
cmp    %rbp,%rax
jae    11d0 <create_asm+0x70>
movzbl -0x2(%r12,%r15,1),%ecx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    -0x1(%r15),%rax
cmp    %rbp,%rax
jae    11d0 <create_asm+0x70>
movzbl -0x1(%r12,%r15,1),%ecx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
cmp    %rbp,%r15
jae    11d0 <create_asm+0x70>
movzbl (%r12,%r15,1),%ecx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    11d0 <create_asm+0x70>
lea    0xd38(%rip),%rdi
mov    $0x2f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xd4f(%rip),%rdi
mov    $0x2489,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
test   %rax,%rax
mov    $0x0,%ebx
jne    136d <create_asm+0x20d>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0xffffffff,%ebx
jmp    1376 <create_asm+0x216>
mov    $0xfffffffe,%ebx
mov    (%rsp),%r15
mov    %r15,%rdi
call   1070 <perror@plt>
jmp    1355 <create_asm+0x1f5>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@.str.1 = [59 x i8] c".text\0A.set ., 0x%lX\0A.globl main\0Amain:\0A.globl _main\0A_main:\0A\00"
@.str.2 = [8 x i8] c"\09.byte \00"
@.str.3 = [9 x i8] c"%s0x%02X\00"
@.str.4 = [2 x i8] c",\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [48 x i8] c"\09.byte 0x4E,0x71,0x4E,0x71,0x4E,0x71,0x4E,0x71\0A\00"
@.str.7 = [9354 x i8] c".set _nilhandle,0x00\0A.globl _nilhandle\0A.set _trapvectors,0x80\0A.globl _trapvectors\0A.set _dodusesit,0xE4\0A.globl _dodusesit\0A.set _monkeylives,0x100\0A.globl _monkeylives\0A.set _ScrVRes,0x102\0A.globl _ScrVRes\0A.set _ScrHRes,0x104\0A.globl _ScrHRes\0A.set _ScreenRow,0x106\0A.globl _ScreenRow\0A.set _MemTop,0x108\0A.globl _MemTop\0A.set _BufPtr,0x10C\0A.globl _BufPtr\0A.set _HeapEnd,0x114\0A.globl _HeapEnd\0A.set _TheZone,0x118\0A.globl _TheZone\0A.set _UTableBase,0x11C\0A.globl _UTableBase\0A.set _loadtrap,0x12D\0A.globl _loadtrap\0A.set _CPUFlag,0x12F\0A.globl _CPUFlag\0A.set _ApplLimit,0x130\0A.globl _ApplLimit\0A.set _SysEvtMask,0x144\0A.globl _SysEvtMask\0A.set _EventQueue,0x14A\0A.globl _EventQueue\0A.set _RndSeed_L,0x156\0A.globl _RndSeed_L\0A.set _SysVersion,0x15A\0A.globl _SysVersion\0A.set _SEvtEnb,0x15C\0A.globl _SEvtEnb\0A.set _VBLQueue,0x160\0A.globl _VBLQueue\0A.set _Ticks,0x16A\0A.globl _Ticks\0A.set _KeyMap,0x174\0A.globl _KeyMap\0A.set _KeyThresh,0x18E\0A.globl _KeyThresh\0A.set _KeyRepThresh,0x190\0A.globl _KeyRepThresh\0A.set _Lvl1DT,0x192\0A.globl _Lvl1DT\0A.set _hyperlong,0x1AA\0A.globl _hyperlong\0A.set _Lvl2DT,0x1B2\0A.globl _Lvl2DT\0A.set _UnitNtryCnt,0x1D2\0A.globl _UnitNtryCnt\0A.set _VIA,0x1D4\0A.globl _VIA\0A.set _SCCRd,0x1D8\0A.globl _SCCRd\0A.set _SCCWr,0x1DC\0A.globl _SCCWr\0A.set _IWM,0x1E0\0A.globl _IWM\0A.set _Scratch20,0x1E4\0A.globl _Scratch20\0A.set _SPValid,0x1F8\0A.globl _SPValid\0A.set _SPATalkA,0x1F9\0A.globl _SPATalkA\0A.set _SPATalkB,0x1FA\0A.globl _SPATalkB\0A.set _SPConfig,0x1FB\0A.globl _SPConfig\0A.set _SPPortA,0x1FC\0A.globl _SPPortA\0A.set _SPPortB,0x1FE\0A.globl _SPPortB\0A.set _SPAlarm,0x200\0A.globl _SPAlarm\0A.set _SPFont,0x204\0A.globl _SPFont\0A.set _SPKbd,0x206\0A.globl _SPKbd\0A.set _SPPrint,0x207\0A.globl _SPPrint\0A.set _SPVolCtl,0x208\0A.globl _SPVolCtl\0A.set _SPClikCaret,0x209\0A.globl _SPClikCaret\0A.set _SPMisc2,0x20B\0A.globl _SPMisc2\0A.set _Time,0x20C\0A.globl _Time\0A.set _BootDrive,0x210\0A.globl _BootDrive\0A.set _SFSaveDisk,0x214\0A.globl _SFSaveDisk\0A.set _KbdLast,0x218\0A.globl _KbdLast\0A.set _KbdType,0x21E\0A.globl _KbdType\0A.set _MemErr,0x220\0A.globl _MemErr\0A.set _SdVolume,0x260\0A.globl _SdVolume\0A.set _SoundPtr,0x262\0A.globl _SoundPtr\0A.set _SoundBase,0x266\0A.globl _SoundBase\0A.set _SoundActive,0x27E\0A.globl _SoundActive\0A.set _SoundLevel,0x27F\0A.globl _SoundLevel\0A.set _CurPitch,0x280\0A.globl _CurPitch\0A.set _mathones,0x282\0A.globl _mathones\0A.set _ROM85,0x28E\0A.globl _ROM85\0A.set _PortBUse,0x291\0A.globl _PortBUse\0A.set _ScreenVars,0x292\0A.globl _ScreenVars\0A.set _Key1Trans,0x29E\0A.globl _Key1Trans\0A.set _Key2Trans,0x2A2\0A.globl _Key2Trans\0A.set _SysZone,0x2A6\0A.globl _SysZone\0A.set _ApplZone,0x2AA\0A.globl _ApplZone\0A.set _ROMBase,0x2AE\0A.globl _ROMBase\0A.set _RAMBase,0x2B2\0A.globl _RAMBase\0A.set _DSAlertTab,0x2BA\0A.globl _DSAlertTab\0A.set _ExtStsDT,0x2BE\0A.globl _ExtStsDT\0A.set _ABusVars,0x2D8\0A.globl _ABusVars\0A.set _FinderName,0x2E0\0A.globl _FinderName\0A.set _DoubleTime,0x2F0\0A.globl _DoubleTime\0A.set _CaretTime,0x2F4\0A.globl _CaretTime\0A.set _ScrDmpEnb,0x2F8\0A.globl _ScrDmpEnb\0A.set _BufTgFNum,0x2FC\0A.globl _BufTgFNum\0A.set _BufTgFFlg,0x300\0A.globl _BufTgFFlg\0A.set _BufTgFBkNum,0x302\0A.globl _BufTgFBkNum\0A.set _BufTgDate,0x304\0A.globl _BufTgDate\0A.set _DrvQHdr,0x308\0A.globl _DrvQHdr\0A.set _heapcheck,0x316\0A.globl _heapcheck\0A.set _Lo3Bytes,0x31A\0A.globl _Lo3Bytes\0A.set _MinStack,0x31E\0A.globl _MinStack\0A.set _DefltStack,0x322\0A.globl _DefltStack\0A.set _GZRootHnd,0x328\0A.globl _GZRootHnd\0A.set _EjectNotify,0x338\0A.globl _EjectNotify\0A.set _IAZNotify,0x33C\0A.globl _IAZNotify\0A.set _FCBSPtr,0x34E\0A.globl _FCBSPtr\0A.set _DefVCBPtr,0x352\0A.globl _DefVCBPtr\0A.set _VCBQHdr,0x356\0A.globl _VCBQHdr\0A.set _FSQHdr,0x360\0A.globl _FSQHdr\0A.set _WDCBsPtr,0x372\0A.globl _WDCBsPtr\0A.set _DefVRefNum,0x384\0A.globl _DefVRefNum\0A.set _CurDirStore,0x398\0A.globl _CurDirStore\0A.set _MCLKPCmiss1,0x3A0\0A.globl _MCLKPCmiss1\0A.set _MCLKPCmiss2,0x3A6\0A.globl _MCLKPCmiss2\0A.set _ToExtFS,0x3F2\0A.globl _ToExtFS\0A.set _FSFCBLen,0x3F6\0A.globl _FSFCBLen\0A.set _DSAlertRect,0x3F8\0A.globl _DSAlertRect\0A.set _JADBProc,0x6B8\0A.globl _JADBProc\0A.set _JFLUSH,0x6F4\0A.globl _JFLUSH\0A.set _JResUnknown1,0x700\0A.globl _JResUnknown1\0A.set _JResUnknown2,0x714\0A.globl _JResUnknown2\0A.set _JHideCursor,0x800\0A.globl _JHideCursor\0A.set _JShowCursor,0x804\0A.globl _JShowCursor\0A.set _JShieldCursor,0x808\0A.globl _JShieldCursor\0A.set _JScrnAddr,0x80C\0A.globl _JScrnAddr\0A.set _JScrnSize,0x810\0A.globl _JScrnSize\0A.set _JInitCrsr,0x814\0A.globl _JInitCrsr\0A.set _JSetCrsr,0x818\0A.globl _JSetCrsr\0A.set _JCrsrOdirure,0x81C\0A.globl _JCrsrOdirure\0A.set _JUpdateProc,0x820\0A.globl _JUpdateProc\0A.set _ScrnBase,0x824\0A.globl _ScrnBase\0A.set _MouseLocation,0x82C\0A.globl _MouseLocation\0A.set _CrsrPin,0x834\0A.globl _CrsrPin\0A.set _MainDevice,0x8A4\0A.globl _MainDevice\0A.set _DeviceList,0x8A8\0A.globl _DeviceList\0A.set _QDColors,0x8B0\0A.globl _QDColors\0A.set _CrsrVis,0x8CC\0A.globl _CrsrVis\0A.set _CrsrState,0x8D0\0A.globl _CrsrState\0A.set _mousemask,0x8D6\0A.globl _mousemask\0A.set _mouseoffset,0x8DA\0A.globl _mouseoffset\0A.set _JournalFlag,0x8DE\0A.globl _JournalFlag\0A.set _JSwapFont,0x8E0\0A.globl _JSwapFont\0A.set _WidthListHand,0x8E4\0A.globl _WidthListHand\0A.set _JournalRef,0x8E8\0A.globl _JournalRef\0A.set _CrsrThresh,0x8EC\0A.globl _CrsrThresh\0A.set _WWExist,0x8F2\0A.globl _WWExist\0A.set _QDExist,0x8F3\0A.globl _QDExist\0A.set _JFetch,0x8F4\0A.globl _JFetch\0A.set _JStash,0x8F8\0A.globl _JStash\0A.set _JIODone,0x8FC\0A.globl _JIODone\0A.set _CurApRefNum,0x900\0A.globl _CurApRefNum\0A.set _CurrentA5,0x904\0A.globl _CurrentA5\0A.set _CurStackBase,0x908\0A.globl _CurStackBase\0A.set _CurApName,0x910\0A.globl _CurApName\0A.set _CurJTOffset,0x934\0A.globl _CurJTOffset\0A.set _CurPageOption,0x936\0A.globl _CurPageOption\0A.set _HiliteMode,0x938\0A.globl _HiliteMode\0A.set _PrintErr,0x944\0A.globl _PrintErr\0A.set _graphlooksat,0x952\0A.globl _graphlooksat\0A.set _macwritespace,0x954\0A.globl _macwritespace\0A.set _ScrapSize,0x960\0A.globl _ScrapSize\0A.set _ScrapHandle,0x964\0A.globl _ScrapHandle\0A.set _ScrapCount,0x968\0A.globl _ScrapCount\0A.set _ScrapState,0x96A\0A.globl _ScrapState\0A.set _ScrapName,0x96C\0A.globl _ScrapName\0A.set _ROMFont0,0x980\0A.globl _ROMFont0\0A.set _ApFontID,0x984\0A.globl _ApFontID\0A.set _ROMlib_myfmi,0x988\0A.globl _ROMlib_myfmi\0A.set _ROMlib_fmo,0x998\0A.globl _ROMlib_fmo\0A.set _ToolScratch,0x9CE\0A.globl _ToolScratch\0A.set _WindowList,0x9D6\0A.globl _WindowList\0A.set _SaveUpdate,0x9DA\0A.globl _SaveUpdate\0A.set _PaintWhite,0x9DC\0A.globl _PaintWhite\0A.set _WMgrPort,0x9DE\0A.globl _WMgrPort\0A.set _OldStructure,0x9E6\0A.globl _OldStructure\0A.set _OldContent,0x9EA\0A.globl _OldContent\0A.set _GrayRgn,0x9EE\0A.globl _GrayRgn\0A.set _SaveVisRgn,0x9F2\0A.globl _SaveVisRgn\0A.set _DragHook,0x9F6\0A.globl _DragHook\0A.set _Scratch8,0x9FA\0A.globl _Scratch8\0A.set _OneOne,0xA02\0A.globl _OneOne\0A.set _MinusOne,0xA06\0A.globl _MinusOne\0A.set _TopMenuItem,0xA0A\0A.globl _TopMenuItem\0A.set _AtMenuBottom,0xA0C\0A.globl _AtMenuBottom\0A.set _MenuList,0xA1C\0A.globl _MenuList\0A.set _MBarEnable,0xA20\0A.globl _MBarEnable\0A.set _MenuFlash,0xA24\0A.globl _MenuFlash\0A.set _TheMenu,0xA26\0A.globl _TheMenu\0A.set _MBarHook,0xA2C\0A.globl _MBarHook\0A.set _MenuHook,0xA30\0A.globl _MenuHook\0A.set _DragPattern,0xA34\0A.globl _DragPattern\0A.set _DeskPattern,0xA3C\0A.globl _DeskPattern\0A.set _fpstate,0xA4A\0A.globl _fpstate\0A.set _TopMapHndl,0xA50\0A.globl _TopMapHndl\0A.set _SysMapHndl,0xA54\0A.globl _SysMapHndl\0A.set _SysMap,0xA58\0A.globl _SysMap\0A.set _CurMap,0xA5A\0A.globl _CurMap\0A.set _resreadonly,0xA5C\0A.globl _resreadonly\0A.set _ResLoad,0xA5E\0A.globl _ResLoad\0A.set _ResErr,0xA60\0A.globl _ResErr\0A.set _FScaleDisable,0xA63\0A.globl _FScaleDisable\0A.set _CurActivate,0xA64\0A.globl _CurActivate\0A.set _CurDeactive,0xA68\0A.globl _CurDeactive\0A.set _DeskHook,0xA6C\0A.globl _DeskHook\0A.set _TEDoText,0xA70\0A.globl _TEDoText\0A.set _TERecal,0xA74\0A.globl _TERecal\0A.set _ApplScratch,0xA78\0A.globl _ApplScratch\0A.set _GhostWindow,0xA84\0A.globl _GhostWindow\0A.set _ResumeProc,0xA8C\0A.globl _ResumeProc\0A.set _ANumber,0xA98\0A.globl _ANumber\0A.set _ACount,0xA9A\0A.globl _ACount\0A.set _DABeeper,0xA9C\0A.globl _DABeeper\0A.set _DAStrings,0xAA0\0A.globl _DAStrings\0A.set _TEScrpLength,0xAB0\0A.globl _TEScrpLength\0A.set _TEScrpHandle,0xAB4\0A.globl _TEScrpHandle\0A.set _AppPacks,0xAB8\0A.globl _AppPacks\0A.set _SysResName,0xAD8\0A.globl _SysResName\0A.set _AppParmHandle,0xAEC\0A.globl _AppParmHandle\0A.set _DSErrCode,0xAF0\0A.globl _DSErrCode\0A.set _ResErrProc,0xAF2\0A.globl _ResErrProc\0A.set _DlgFont,0xAFA\0A.globl _DlgFont\0A.set _WidthPtr,0xB10\0A.globl _WidthPtr\0A.set _SCSIFlags,0xB22\0A.globl _SCSIFlags\0A.set _WidthTabHandle,0xB2A\0A.globl _WidthTabHandle\0A.set _hyperwritesto,0xB4C\0A.globl _hyperwritesto\0A.set _MenuDisable,0xB54\0A.globl _MenuDisable\0A.set _MBDFHndl,0xB58\0A.globl _MBDFHndl\0A.set _MBSaveLoc,0xB5C\0A.globl _MBSaveLoc\0A.set _RomMapInsert,0xB9E\0A.globl _RomMapInsert\0A.set _TmpResLoad,0xB9F\0A.globl _TmpResLoad\0A.set _IntlSpec,0xBA0\0A.globl _IntlSpec\0A.set _SysFontFam,0xBA6\0A.globl _SysFontFam\0A.set _SysFontSiz,0xBA8\0A.globl _SysFontSiz\0A.set _MBarHeight,0xBAA\0A.globl _MBarHeight\0A.set _TESysJust,0xBAC\0A.globl _TESysJust\0A.set _LastFOND,0xBC2\0A.globl _LastFOND\0A.set _fondid,0xBC6\0A.globl _fondid\0A.set _FractEnable,0xBF4\0A.globl _FractEnable\0A.set _MMU32Bit,0xCB2\0A.globl _MMU32Bit\0A.set _TheGDevice,0xCC8\0A.globl _TheGDevice\0A.set _AuxWinHead,0xCD0\0A.globl _AuxWinHead\0A.set _AuxCtlHead,0xCD4\0A.globl _AuxCtlHead\0A.set _TimeDBRA,0xD00\0A.globl _TimeDBRA\0A.set _TimeSCCDB,0xD02\0A.globl _TimeSCCDB\0A.set _JVBLTask,0xD28\0A.globl _JVBLTask\0A.set _WMgrCPort,0xD2C\0A.globl _WMgrCPort\0A.set _SynListHandle,0xD32\0A.globl _SynListHandle\0A.set _MenuCInfo,0xD50\0A.globl _MenuCInfo\0A.set _DTQueue,0xD92\0A.globl _DTQueue\0A.set _JDTInstall,0xD9C\0A.globl _JDTInstall\0A.set _HiliteRGB,0xDA0\0A.globl _HiliteRGB\0A.set _TimeSCSIDB,0xDA6\0A.globl _TimeSCSIDB\0A\00"
define i32 @create_asm(i8* %0, i8* %1, i64 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32*
%11 = alloca i64
%12 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i64 %3, i64* %9
%13 = load i8*, i8** %6
%14 = call i32* @fopen(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %14, i32** %10
%15 = load i32*, i32** %10
%16 = icmp eq i32* %15, null
br i1 %16, label %17, label %20
17: ; preds = %4
%18 = load i8*, i8** %6
%19 = call i32 @perror(i8* %18)
store i32 -1, i32* %5
br label %77
20: ; preds = %4
%21 = load i32*, i32** %10
%22 = load i64, i64* %9
%23 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i64 %22)
store i64 0, i64* %11
br label %24
24: ; preds = %62, %20
%25 = load i64, i64* %11
%26 = load i64, i64* %8
%27 = icmp ult i64 %25, %26
br i1 %27, label %28, label %65
28: ; preds = %24
%29 = load i32*, i32** %10
%30 = call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32* %29)
store i64 0, i64* %12
br label %31
31: ; preds = %56, %28
%32 = load i64, i64* %12
%33 = icmp ult i64 %32, 8
br i1 %33, label %34, label %40
34: ; preds = %31
%35 = load i64, i64* %11
%36 = load i64, i64* %12
%37 = add i64 %35, %36
%38 = load i64, i64* %8
%39 = icmp ult i64 %37, %38
br label %40
40: ; preds = %34, %31
%41 = phi i1 [ false, %31 ], [ %39, %34 ]
br i1 %41, label %42, label %59
42: ; preds = %40
%43 = load i32*, i32** %10
%44 = load i64, i64* %12
%45 = icmp ne i64 %44, 0
%46 = zext i1 %45 to i64
%47 = select i1 %45, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0)
%48 = load i8*, i8** %7
%49 = load i64, i64* %11
%50 = load i64, i64* %12
%51 = add i64 %49, %50
%52 = getelementptr inbounds i8, i8* %48, i64 %51
%53 = load i8, i8* %52
%54 = zext i8 %53 to i32
%55 = call i32 (i32*, i8*, ...) @fprintf(i32* %43, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %47, i32 %54)
br label %56
56: ; preds = %42
%57 = load i64, i64* %12
%58 = add i64 %57, 1
store i64 %58, i64* %12
br label %31
59: ; preds = %40
%60 = load i32*, i32** %10
%61 = call i32 @putc(i8 signext 10, i32* %60)
br label %62
62: ; preds = %59
%63 = load i64, i64* %11
%64 = add i64 %63, 8
store i64 %64, i64* %11
br label %24
65: ; preds = %24
%66 = load i32*, i32** %10
%67 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%68 = load i32*, i32** %10
%69 = call i32 @fputs(i8* getelementptr inbounds ([9354 x i8], [9354 x i8]* @.str.7, i64 0, i64 0), i32* %68)
%70 = load i32*, i32** %10
%71 = call i64 @fclose(i32* %70)
%72 = icmp ne i64 %71, 0
br i1 %72, label %73, label %76
73: ; preds = %65
%74 = load i8*, i8** %6
%75 = call i32 @perror(i8* %74)
store i32 -2, i32* %5
br label %77
76: ; preds = %65
store i32 0, i32* %5
br label %77
77: ; preds = %76, %73, %17
%78 = load i32, i32* %5
ret i32 %78
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@.str.1 = [59 x i8] c".text\0A.set ., 0x%lX\0A.globl main\0Amain:\0A.globl _main\0A_main:\0A\00"
@.str.2 = [8 x i8] c"\09.byte \00"
@.str.3 = [9 x i8] c"%s0x%02X\00"
@.str.4 = [2 x i8] c",\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [48 x i8] c"\09.byte 0x4E,0x71,0x4E,0x71,0x4E,0x71,0x4E,0x71\0A\00"
@.str.7 = [9354 x i8] c".set _nilhandle,0x00\0A.globl _nilhandle\0A.set _trapvectors,0x80\0A.globl _trapvectors\0A.set _dodusesit,0xE4\0A.globl _dodusesit\0A.set _monkeylives,0x100\0A.globl _monkeylives\0A.set _ScrVRes,0x102\0A.globl _ScrVRes\0A.set _ScrHRes,0x104\0A.globl _ScrHRes\0A.set _ScreenRow,0x106\0A.globl _ScreenRow\0A.set _MemTop,0x108\0A.globl _MemTop\0A.set _BufPtr,0x10C\0A.globl _BufPtr\0A.set _HeapEnd,0x114\0A.globl _HeapEnd\0A.set _TheZone,0x118\0A.globl _TheZone\0A.set _UTableBase,0x11C\0A.globl _UTableBase\0A.set _loadtrap,0x12D\0A.globl _loadtrap\0A.set _CPUFlag,0x12F\0A.globl _CPUFlag\0A.set _ApplLimit,0x130\0A.globl _ApplLimit\0A.set _SysEvtMask,0x144\0A.globl _SysEvtMask\0A.set _EventQueue,0x14A\0A.globl _EventQueue\0A.set _RndSeed_L,0x156\0A.globl _RndSeed_L\0A.set _SysVersion,0x15A\0A.globl _SysVersion\0A.set _SEvtEnb,0x15C\0A.globl _SEvtEnb\0A.set _VBLQueue,0x160\0A.globl _VBLQueue\0A.set _Ticks,0x16A\0A.globl _Ticks\0A.set _KeyMap,0x174\0A.globl _KeyMap\0A.set _KeyThresh,0x18E\0A.globl _KeyThresh\0A.set _KeyRepThresh,0x190\0A.globl _KeyRepThresh\0A.set _Lvl1DT,0x192\0A.globl _Lvl1DT\0A.set _hyperlong,0x1AA\0A.globl _hyperlong\0A.set _Lvl2DT,0x1B2\0A.globl _Lvl2DT\0A.set _UnitNtryCnt,0x1D2\0A.globl _UnitNtryCnt\0A.set _VIA,0x1D4\0A.globl _VIA\0A.set _SCCRd,0x1D8\0A.globl _SCCRd\0A.set _SCCWr,0x1DC\0A.globl _SCCWr\0A.set _IWM,0x1E0\0A.globl _IWM\0A.set _Scratch20,0x1E4\0A.globl _Scratch20\0A.set _SPValid,0x1F8\0A.globl _SPValid\0A.set _SPATalkA,0x1F9\0A.globl _SPATalkA\0A.set _SPATalkB,0x1FA\0A.globl _SPATalkB\0A.set _SPConfig,0x1FB\0A.globl _SPConfig\0A.set _SPPortA,0x1FC\0A.globl _SPPortA\0A.set _SPPortB,0x1FE\0A.globl _SPPortB\0A.set _SPAlarm,0x200\0A.globl _SPAlarm\0A.set _SPFont,0x204\0A.globl _SPFont\0A.set _SPKbd,0x206\0A.globl _SPKbd\0A.set _SPPrint,0x207\0A.globl _SPPrint\0A.set _SPVolCtl,0x208\0A.globl _SPVolCtl\0A.set _SPClikCaret,0x209\0A.globl _SPClikCaret\0A.set _SPMisc2,0x20B\0A.globl _SPMisc2\0A.set _Time,0x20C\0A.globl _Time\0A.set _BootDrive,0x210\0A.globl _BootDrive\0A.set _SFSaveDisk,0x214\0A.globl _SFSaveDisk\0A.set _KbdLast,0x218\0A.globl _KbdLast\0A.set _KbdType,0x21E\0A.globl _KbdType\0A.set _MemErr,0x220\0A.globl _MemErr\0A.set _SdVolume,0x260\0A.globl _SdVolume\0A.set _SoundPtr,0x262\0A.globl _SoundPtr\0A.set _SoundBase,0x266\0A.globl _SoundBase\0A.set _SoundActive,0x27E\0A.globl _SoundActive\0A.set _SoundLevel,0x27F\0A.globl _SoundLevel\0A.set _CurPitch,0x280\0A.globl _CurPitch\0A.set _mathones,0x282\0A.globl _mathones\0A.set _ROM85,0x28E\0A.globl _ROM85\0A.set _PortBUse,0x291\0A.globl _PortBUse\0A.set _ScreenVars,0x292\0A.globl _ScreenVars\0A.set _Key1Trans,0x29E\0A.globl _Key1Trans\0A.set _Key2Trans,0x2A2\0A.globl _Key2Trans\0A.set _SysZone,0x2A6\0A.globl _SysZone\0A.set _ApplZone,0x2AA\0A.globl _ApplZone\0A.set _ROMBase,0x2AE\0A.globl _ROMBase\0A.set _RAMBase,0x2B2\0A.globl _RAMBase\0A.set _DSAlertTab,0x2BA\0A.globl _DSAlertTab\0A.set _ExtStsDT,0x2BE\0A.globl _ExtStsDT\0A.set _ABusVars,0x2D8\0A.globl _ABusVars\0A.set _FinderName,0x2E0\0A.globl _FinderName\0A.set _DoubleTime,0x2F0\0A.globl _DoubleTime\0A.set _CaretTime,0x2F4\0A.globl _CaretTime\0A.set _ScrDmpEnb,0x2F8\0A.globl _ScrDmpEnb\0A.set _BufTgFNum,0x2FC\0A.globl _BufTgFNum\0A.set _BufTgFFlg,0x300\0A.globl _BufTgFFlg\0A.set _BufTgFBkNum,0x302\0A.globl _BufTgFBkNum\0A.set _BufTgDate,0x304\0A.globl _BufTgDate\0A.set _DrvQHdr,0x308\0A.globl _DrvQHdr\0A.set _heapcheck,0x316\0A.globl _heapcheck\0A.set _Lo3Bytes,0x31A\0A.globl _Lo3Bytes\0A.set _MinStack,0x31E\0A.globl _MinStack\0A.set _DefltStack,0x322\0A.globl _DefltStack\0A.set _GZRootHnd,0x328\0A.globl _GZRootHnd\0A.set _EjectNotify,0x338\0A.globl _EjectNotify\0A.set _IAZNotify,0x33C\0A.globl _IAZNotify\0A.set _FCBSPtr,0x34E\0A.globl _FCBSPtr\0A.set _DefVCBPtr,0x352\0A.globl _DefVCBPtr\0A.set _VCBQHdr,0x356\0A.globl _VCBQHdr\0A.set _FSQHdr,0x360\0A.globl _FSQHdr\0A.set _WDCBsPtr,0x372\0A.globl _WDCBsPtr\0A.set _DefVRefNum,0x384\0A.globl _DefVRefNum\0A.set _CurDirStore,0x398\0A.globl _CurDirStore\0A.set _MCLKPCmiss1,0x3A0\0A.globl _MCLKPCmiss1\0A.set _MCLKPCmiss2,0x3A6\0A.globl _MCLKPCmiss2\0A.set _ToExtFS,0x3F2\0A.globl _ToExtFS\0A.set _FSFCBLen,0x3F6\0A.globl _FSFCBLen\0A.set _DSAlertRect,0x3F8\0A.globl _DSAlertRect\0A.set _JADBProc,0x6B8\0A.globl _JADBProc\0A.set _JFLUSH,0x6F4\0A.globl _JFLUSH\0A.set _JResUnknown1,0x700\0A.globl _JResUnknown1\0A.set _JResUnknown2,0x714\0A.globl _JResUnknown2\0A.set _JHideCursor,0x800\0A.globl _JHideCursor\0A.set _JShowCursor,0x804\0A.globl _JShowCursor\0A.set _JShieldCursor,0x808\0A.globl _JShieldCursor\0A.set _JScrnAddr,0x80C\0A.globl _JScrnAddr\0A.set _JScrnSize,0x810\0A.globl _JScrnSize\0A.set _JInitCrsr,0x814\0A.globl _JInitCrsr\0A.set _JSetCrsr,0x818\0A.globl _JSetCrsr\0A.set _JCrsrOdirure,0x81C\0A.globl _JCrsrOdirure\0A.set _JUpdateProc,0x820\0A.globl _JUpdateProc\0A.set _ScrnBase,0x824\0A.globl _ScrnBase\0A.set _MouseLocation,0x82C\0A.globl _MouseLocation\0A.set _CrsrPin,0x834\0A.globl _CrsrPin\0A.set _MainDevice,0x8A4\0A.globl _MainDevice\0A.set _DeviceList,0x8A8\0A.globl _DeviceList\0A.set _QDColors,0x8B0\0A.globl _QDColors\0A.set _CrsrVis,0x8CC\0A.globl _CrsrVis\0A.set _CrsrState,0x8D0\0A.globl _CrsrState\0A.set _mousemask,0x8D6\0A.globl _mousemask\0A.set _mouseoffset,0x8DA\0A.globl _mouseoffset\0A.set _JournalFlag,0x8DE\0A.globl _JournalFlag\0A.set _JSwapFont,0x8E0\0A.globl _JSwapFont\0A.set _WidthListHand,0x8E4\0A.globl _WidthListHand\0A.set _JournalRef,0x8E8\0A.globl _JournalRef\0A.set _CrsrThresh,0x8EC\0A.globl _CrsrThresh\0A.set _WWExist,0x8F2\0A.globl _WWExist\0A.set _QDExist,0x8F3\0A.globl _QDExist\0A.set _JFetch,0x8F4\0A.globl _JFetch\0A.set _JStash,0x8F8\0A.globl _JStash\0A.set _JIODone,0x8FC\0A.globl _JIODone\0A.set _CurApRefNum,0x900\0A.globl _CurApRefNum\0A.set _CurrentA5,0x904\0A.globl _CurrentA5\0A.set _CurStackBase,0x908\0A.globl _CurStackBase\0A.set _CurApName,0x910\0A.globl _CurApName\0A.set _CurJTOffset,0x934\0A.globl _CurJTOffset\0A.set _CurPageOption,0x936\0A.globl _CurPageOption\0A.set _HiliteMode,0x938\0A.globl _HiliteMode\0A.set _PrintErr,0x944\0A.globl _PrintErr\0A.set _graphlooksat,0x952\0A.globl _graphlooksat\0A.set _macwritespace,0x954\0A.globl _macwritespace\0A.set _ScrapSize,0x960\0A.globl _ScrapSize\0A.set _ScrapHandle,0x964\0A.globl _ScrapHandle\0A.set _ScrapCount,0x968\0A.globl _ScrapCount\0A.set _ScrapState,0x96A\0A.globl _ScrapState\0A.set _ScrapName,0x96C\0A.globl _ScrapName\0A.set _ROMFont0,0x980\0A.globl _ROMFont0\0A.set _ApFontID,0x984\0A.globl _ApFontID\0A.set _ROMlib_myfmi,0x988\0A.globl _ROMlib_myfmi\0A.set _ROMlib_fmo,0x998\0A.globl _ROMlib_fmo\0A.set _ToolScratch,0x9CE\0A.globl _ToolScratch\0A.set _WindowList,0x9D6\0A.globl _WindowList\0A.set _SaveUpdate,0x9DA\0A.globl _SaveUpdate\0A.set _PaintWhite,0x9DC\0A.globl _PaintWhite\0A.set _WMgrPort,0x9DE\0A.globl _WMgrPort\0A.set _OldStructure,0x9E6\0A.globl _OldStructure\0A.set _OldContent,0x9EA\0A.globl _OldContent\0A.set _GrayRgn,0x9EE\0A.globl _GrayRgn\0A.set _SaveVisRgn,0x9F2\0A.globl _SaveVisRgn\0A.set _DragHook,0x9F6\0A.globl _DragHook\0A.set _Scratch8,0x9FA\0A.globl _Scratch8\0A.set _OneOne,0xA02\0A.globl _OneOne\0A.set _MinusOne,0xA06\0A.globl _MinusOne\0A.set _TopMenuItem,0xA0A\0A.globl _TopMenuItem\0A.set _AtMenuBottom,0xA0C\0A.globl _AtMenuBottom\0A.set _MenuList,0xA1C\0A.globl _MenuList\0A.set _MBarEnable,0xA20\0A.globl _MBarEnable\0A.set _MenuFlash,0xA24\0A.globl _MenuFlash\0A.set _TheMenu,0xA26\0A.globl _TheMenu\0A.set _MBarHook,0xA2C\0A.globl _MBarHook\0A.set _MenuHook,0xA30\0A.globl _MenuHook\0A.set _DragPattern,0xA34\0A.globl _DragPattern\0A.set _DeskPattern,0xA3C\0A.globl _DeskPattern\0A.set _fpstate,0xA4A\0A.globl _fpstate\0A.set _TopMapHndl,0xA50\0A.globl _TopMapHndl\0A.set _SysMapHndl,0xA54\0A.globl _SysMapHndl\0A.set _SysMap,0xA58\0A.globl _SysMap\0A.set _CurMap,0xA5A\0A.globl _CurMap\0A.set _resreadonly,0xA5C\0A.globl _resreadonly\0A.set _ResLoad,0xA5E\0A.globl _ResLoad\0A.set _ResErr,0xA60\0A.globl _ResErr\0A.set _FScaleDisable,0xA63\0A.globl _FScaleDisable\0A.set _CurActivate,0xA64\0A.globl _CurActivate\0A.set _CurDeactive,0xA68\0A.globl _CurDeactive\0A.set _DeskHook,0xA6C\0A.globl _DeskHook\0A.set _TEDoText,0xA70\0A.globl _TEDoText\0A.set _TERecal,0xA74\0A.globl _TERecal\0A.set _ApplScratch,0xA78\0A.globl _ApplScratch\0A.set _GhostWindow,0xA84\0A.globl _GhostWindow\0A.set _ResumeProc,0xA8C\0A.globl _ResumeProc\0A.set _ANumber,0xA98\0A.globl _ANumber\0A.set _ACount,0xA9A\0A.globl _ACount\0A.set _DABeeper,0xA9C\0A.globl _DABeeper\0A.set _DAStrings,0xAA0\0A.globl _DAStrings\0A.set _TEScrpLength,0xAB0\0A.globl _TEScrpLength\0A.set _TEScrpHandle,0xAB4\0A.globl _TEScrpHandle\0A.set _AppPacks,0xAB8\0A.globl _AppPacks\0A.set _SysResName,0xAD8\0A.globl _SysResName\0A.set _AppParmHandle,0xAEC\0A.globl _AppParmHandle\0A.set _DSErrCode,0xAF0\0A.globl _DSErrCode\0A.set _ResErrProc,0xAF2\0A.globl _ResErrProc\0A.set _DlgFont,0xAFA\0A.globl _DlgFont\0A.set _WidthPtr,0xB10\0A.globl _WidthPtr\0A.set _SCSIFlags,0xB22\0A.globl _SCSIFlags\0A.set _WidthTabHandle,0xB2A\0A.globl _WidthTabHandle\0A.set _hyperwritesto,0xB4C\0A.globl _hyperwritesto\0A.set _MenuDisable,0xB54\0A.globl _MenuDisable\0A.set _MBDFHndl,0xB58\0A.globl _MBDFHndl\0A.set _MBSaveLoc,0xB5C\0A.globl _MBSaveLoc\0A.set _RomMapInsert,0xB9E\0A.globl _RomMapInsert\0A.set _TmpResLoad,0xB9F\0A.globl _TmpResLoad\0A.set _IntlSpec,0xBA0\0A.globl _IntlSpec\0A.set _SysFontFam,0xBA6\0A.globl _SysFontFam\0A.set _SysFontSiz,0xBA8\0A.globl _SysFontSiz\0A.set _MBarHeight,0xBAA\0A.globl _MBarHeight\0A.set _TESysJust,0xBAC\0A.globl _TESysJust\0A.set _LastFOND,0xBC2\0A.globl _LastFOND\0A.set _fondid,0xBC6\0A.globl _fondid\0A.set _FractEnable,0xBF4\0A.globl _FractEnable\0A.set _MMU32Bit,0xCB2\0A.globl _MMU32Bit\0A.set _TheGDevice,0xCC8\0A.globl _TheGDevice\0A.set _AuxWinHead,0xCD0\0A.globl _AuxWinHead\0A.set _AuxCtlHead,0xCD4\0A.globl _AuxCtlHead\0A.set _TimeDBRA,0xD00\0A.globl _TimeDBRA\0A.set _TimeSCCDB,0xD02\0A.globl _TimeSCCDB\0A.set _JVBLTask,0xD28\0A.globl _JVBLTask\0A.set _WMgrCPort,0xD2C\0A.globl _WMgrCPort\0A.set _SynListHandle,0xD32\0A.globl _SynListHandle\0A.set _MenuCInfo,0xD50\0A.globl _MenuCInfo\0A.set _DTQueue,0xD92\0A.globl _DTQueue\0A.set _JDTInstall,0xD9C\0A.globl _JDTInstall\0A.set _HiliteRGB,0xDA0\0A.globl _HiliteRGB\0A.set _TimeSCSIDB,0xDA6\0A.globl _TimeSCSIDB\0A\00"
define i32 @create_asm(i8* nocapture %0, i8* nocapture %1, i64 %2, i64 %3) {
%5 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32* %5, null
br i1 %6, label %75, label %7
7: ; preds = %4
%8 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i64 %3)
%9 = icmp eq i64 %2, 0
br i1 %9, label %70, label %10
10: ; preds = %7, %66
%11 = phi i64 [ %68, %66 ], [ 0, %7 ]
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i64 7, i64 1, i32* %5)
%13 = getelementptr inbounds i8, i8* %1, i64 %11
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i32 %15)
%17 = or i64 %11, 1
%18 = icmp ult i64 %17, %2
br i1 %18, label %19, label %66
19: ; preds = %10
%20 = getelementptr inbounds i8, i8* %1, i64 %17
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 %22)
%24 = or i64 %11, 2
%25 = icmp ult i64 %24, %2
br i1 %25, label %26, label %66
26: ; preds = %19
%27 = getelementptr inbounds i8, i8* %1, i64 %24
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 %29)
%31 = or i64 %11, 3
%32 = icmp ult i64 %31, %2
br i1 %32, label %33, label %66
33: ; preds = %26
%34 = getelementptr inbounds i8, i8* %1, i64 %31
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 %36)
%38 = or i64 %11, 4
%39 = icmp ult i64 %38, %2
br i1 %39, label %40, label %66
40: ; preds = %33
%41 = getelementptr inbounds i8, i8* %1, i64 %38
%42 = load i8, i8* %41
%43 = zext i8 %42 to i32
%44 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 %43)
%45 = or i64 %11, 5
%46 = icmp ult i64 %45, %2
br i1 %46, label %47, label %66
47: ; preds = %40
%48 = getelementptr inbounds i8, i8* %1, i64 %45
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 %50)
%52 = or i64 %11, 6
%53 = icmp ult i64 %52, %2
br i1 %53, label %54, label %66
54: ; preds = %47
%55 = getelementptr inbounds i8, i8* %1, i64 %52
%56 = load i8, i8* %55
%57 = zext i8 %56 to i32
%58 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 %57)
%59 = or i64 %11, 7
%60 = icmp ult i64 %59, %2
br i1 %60, label %61, label %66
61: ; preds = %54
%62 = getelementptr inbounds i8, i8* %1, i64 %59
%63 = load i8, i8* %62
%64 = zext i8 %63 to i32
%65 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %61, %54, %47, %40, %33, %26, %19, %10
%67 = tail call i32 @putc(i8 signext 10, i32* %5)
%68 = add i64 %11, 8
%69 = icmp ult i64 %68, %2
br i1 %69, label %10, label %70
70: ; preds = %66, %7
%71 = tail call i64 @fwrite(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0), i64 47, i64 1, i32* %5)
%72 = tail call i64 @fwrite(i8* getelementptr inbounds ([9354 x i8], [9354 x i8]* @.str.7, i64 0, i64 0), i64 9353, i64 1, i32* %5)
%73 = tail call i64 @fclose(i32* %5)
%74 = icmp eq i64 %73, 0
br i1 %74, label %78, label %75
75: ; preds = %70, %4
%76 = phi i32 [ -1, %4 ], [ -2, %70 ]
%77 = tail call i32 @perror(i8* %0)
br label %78
78: ; preds = %75, %70
%79 = phi i32 [ 0, %70 ], [ %76, %75 ]
ret i32 %79
}