#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 */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  unsigned char rom[1500];
  unsigned char ram[65536];
  FILE *arch;
  unsigned char b, i, opcode, c, x, exit = 0;
  char buf[80];
  int ptr = 0, oldptr, siz, count, tmp, scan, oldscan, index;
  arch = fopen("65C02.bin", "rb");
  if (arch == NULL) {
    printf("\n***Problem opening Opcode List '65C02.bin'!***\n");
    return -1;
  }
  fseek(arch, 0, SEEK_END);
  siz = ftell(arch);
  fseek(arch, 0, SEEK_SET);
  fread(rom, siz, 1, arch);
  printf(">0400[\n");
  ptr = 0x400;
  do {
    printf("%04x: ", ptr);
    gets(buf);
    scan = 0;
    oldscan = 0;
    index = 0;
    opcode = 0;
    do {
      while (buf[index] == ' ')
        index++;
      b = buf[index];
      if (b >= 'a' && b <= 'z')
        b &= 223;
      while (rom[scan] == ' ')
        scan++;
      c = rom[scan] & 127;
      x = rom[scan] & 128;
      switch (c) {
      case '@':
        tmp = 0;
        for (i = 0; i < 2; i++) {
          b -= '0';
          if (b >= 0 && b < 10) {
          } else {
            if (b >= 'A' - '0' && b <= 'F' - '0') {
              b -= 'A' - '0' - 10;
            } else {
              b = -1;
              index--;
              printf("?");
              break;
            }
          }
          printf("\nNibble=%01x\n", b);
          tmp *= 16;
          tmp += b;
          index++;
          while (buf[index] == ' ')
            index++;
          b = buf[index];
          if (b >= 'a' && b <= 'z')
            b &= 223;
        }
        scan++;
        if (x == 128) {
          while (buf[index] == ' ')
            index++;
          if (buf[index]) {
            oldscan = scan;
            opcode++;
            index = 0;
            x = 0;
          }
        }
        break;
      case '&':
        printf("word...");
        for (i = 0; i < 4; i++) {
          b -= '0';
          if (b >= 0 && b < 10) {
          } else {
            if (b >= 'A' - '0' && b <= 'F' - '0') {
              b -= 'A' - '0' - 10;
            } else {
              b = -1;
              index--;
              printf("?");
              break;
            }
          }
          printf("\nNibble=%01x\n", b);
          index++;
          while (buf[index] == ' ')
            index++;
          b = buf[index];
          if (b >= 'a' && b <= 'z')
            b &= 223;
        }
        scan++;
        if (x == 128) {
          while (buf[index] == ' ')
            index++;
          if (buf[index]) {
            oldscan = scan;
            opcode++;
            index = 0;
            x = 0;
          }
        }
        break;
      default:
        if (b != c) {
          while (rom[scan++] < 128)
            ;
          oldscan = scan;
          opcode++;
          if (!opcode) {
            x = 1;
          } else {
            index = 0;
            x = 0;
          }
        } else {
          index++;
          scan++;
          if (x == 128) {
            while (buf[index] == ' ')
              index++;
            if (buf[index]) {
              oldscan = scan;
              opcode++;
              index = 0;
              x = 0;
            }
          }
        }
      }
    } while (!x);
    if (x == 128) {
      oldscan--;
      printf("[%02x] ", opcode);
      do {
        c = rom[++oldscan] & 127;
        switch (c) {
        case '@':
          printf("$%02x", tmp);
          break;
        case '&':
        default:
          printf("%c", c);
        }
      } while (rom[oldscan] < 128);
    } else {
      printf("***ERROR***");
    }
    printf("\n");
    ptr++;
  } while (-1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10670,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x105ee(%rbp)
movl   $0x0,-0x10644(%rbp)
lea    0xe76(%rip),%rdi
lea    0xe79(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x105e8(%rbp)
cmpq   $0x0,-0x105e8(%rbp)
jne    11c5 <main+0x65>
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1a29 <main+0x8c9>
mov    -0x105e8(%rbp),%rdi
mov    0x2e15(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1070 <fseek@plt>
mov    -0x105e8(%rbp),%rdi
call   1050 <ftell@plt>
mov    %eax,-0x1064c(%rbp)
mov    -0x105e8(%rbp),%rdi
mov    0x2ddc(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1070 <fseek@plt>
lea    -0x5e0(%rbp),%rdi
mov    -0x1064c(%rbp),%esi
mov    -0x105e8(%rbp),%rcx
mov    $0x1,%edx
call   1030 <fread@plt>
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x400,-0x10644(%rbp)
mov    -0x10644(%rbp),%esi
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x10640(%rbp),%rdi
call   1060 <gets@plt>
movl   $0x0,-0x10658(%rbp)
movl   $0x0,-0x1065c(%rbp)
movl   $0x0,-0x10660(%rbp)
movb   $0x0,-0x105eb(%rbp)
jmp    1285 <main+0x125>
movslq -0x10660(%rbp),%rax
movsbl -0x10640(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    12b1 <main+0x151>
mov    -0x10660(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10660(%rbp)
jmp    1285 <main+0x125>
movslq -0x10660(%rbp),%rax
mov    -0x10640(%rbp,%rax,1),%al
mov    %al,-0x105e9(%rbp)
movzbl -0x105e9(%rbp),%eax
cmp    $0x61,%eax
jl     12f7 <main+0x197>
movzbl -0x105e9(%rbp),%eax
cmp    $0x7a,%eax
jg     12f7 <main+0x197>
movzbl -0x105e9(%rbp),%eax
and    $0xdf,%eax
mov    %al,-0x105e9(%rbp)
jmp    12fc <main+0x19c>
movslq -0x10658(%rbp),%rax
movzbl -0x5e0(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    1328 <main+0x1c8>
mov    -0x10658(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10658(%rbp)
jmp    12fc <main+0x19c>
movslq -0x10658(%rbp),%rax
mov    -0x5e0(%rbp,%rax,1),%al
and    $0x7f,%al
mov    %al,-0x105ec(%rbp)
movslq -0x10658(%rbp),%rax
mov    -0x5e0(%rbp,%rax,1),%al
and    $0x80,%al
mov    %al,-0x105ed(%rbp)
movzbl -0x105ec(%rbp),%eax
mov    %eax,-0x10664(%rbp)
sub    $0x26,%eax
je     15a8 <main+0x448>
jmp    136f <main+0x20f>
mov    -0x10664(%rbp),%eax
sub    $0x40,%eax
jne    17af <main+0x64f>
jmp    1383 <main+0x223>
movl   $0x0,-0x10654(%rbp)
movb   $0x0,-0x105ea(%rbp)
movzbl -0x105ea(%rbp),%eax
cmp    $0x2,%eax
jge    150c <main+0x3ac>
movzbl -0x105e9(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x105e9(%rbp)
movzbl -0x105e9(%rbp),%eax
cmp    $0x0,%eax
jl     13d9 <main+0x279>
movzbl -0x105e9(%rbp),%eax
cmp    $0xa,%eax
jge    13d9 <main+0x279>
jmp    143c <main+0x2dc>
movzbl -0x105e9(%rbp),%eax
cmp    $0x11,%eax
jl     140e <main+0x2ae>
movzbl -0x105e9(%rbp),%eax
cmp    $0x16,%eax
jg     140e <main+0x2ae>
movzbl -0x105e9(%rbp),%eax
sub    $0x7,%eax
mov    %al,-0x105e9(%rbp)
jmp    1437 <main+0x2d7>
movb   $0xff,-0x105e9(%rbp)
mov    -0x10660(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10660(%rbp)
lea    0xc22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    150c <main+0x3ac>
jmp    143c <main+0x2dc>
movzbl -0x105e9(%rbp),%esi
lea    0xc05(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10654(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x10654(%rbp)
movzbl -0x105e9(%rbp),%eax
add    -0x10654(%rbp),%eax
mov    %eax,-0x10654(%rbp)
mov    -0x10660(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10660(%rbp)
movslq -0x10660(%rbp),%rax
movsbl -0x10640(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    14ae <main+0x34e>
mov    -0x10660(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10660(%rbp)
jmp    1482 <main+0x322>
movslq -0x10660(%rbp),%rax
mov    -0x10640(%rbp,%rax,1),%al
mov    %al,-0x105e9(%rbp)
movzbl -0x105e9(%rbp),%eax
cmp    $0x61,%eax
jl     14f4 <main+0x394>
movzbl -0x105e9(%rbp),%eax
cmp    $0x7a,%eax
jg     14f4 <main+0x394>
movzbl -0x105e9(%rbp),%eax
and    $0xdf,%eax
mov    %al,-0x105e9(%rbp)
jmp    14f9 <main+0x399>
mov    -0x105ea(%rbp),%al
add    $0x1,%al
mov    %al,-0x105ea(%rbp)
jmp    1394 <main+0x234>
mov    -0x10658(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10658(%rbp)
movzbl -0x105ed(%rbp),%eax
cmp    $0x80,%eax
jne    15a3 <main+0x443>
jmp    1532 <main+0x3d2>
movslq -0x10660(%rbp),%rax
movsbl -0x10640(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    155e <main+0x3fe>
mov    -0x10660(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10660(%rbp)
jmp    1532 <main+0x3d2>
movslq -0x10660(%rbp),%rax
cmpb   $0x0,-0x10640(%rbp,%rax,1)
je     159e <main+0x43e>
mov    -0x10658(%rbp),%eax
mov    %eax,-0x1065c(%rbp)
mov    -0x105eb(%rbp),%al
add    $0x1,%al
mov    %al,-0x105eb(%rbp)
movl   $0x0,-0x10660(%rbp)
movb   $0x0,-0x105ed(%rbp)
jmp    15a3 <main+0x443>
jmp    18ee <main+0x78e>
lea    0xaae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movb   $0x0,-0x105ea(%rbp)
movzbl -0x105ea(%rbp),%eax
cmp    $0x4,%eax
jge    1713 <main+0x5b3>
movzbl -0x105e9(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x105e9(%rbp)
movzbl -0x105e9(%rbp),%eax
cmp    $0x0,%eax
jl     1602 <main+0x4a2>
movzbl -0x105e9(%rbp),%eax
cmp    $0xa,%eax
jge    1602 <main+0x4a2>
jmp    1665 <main+0x505>
movzbl -0x105e9(%rbp),%eax
cmp    $0x11,%eax
jl     1637 <main+0x4d7>
movzbl -0x105e9(%rbp),%eax
cmp    $0x16,%eax
jg     1637 <main+0x4d7>
movzbl -0x105e9(%rbp),%eax
sub    $0x7,%eax
mov    %al,-0x105e9(%rbp)
jmp    1660 <main+0x500>
movb   $0xff,-0x105e9(%rbp)
mov    -0x10660(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10660(%rbp)
lea    0x9f9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1713 <main+0x5b3>
jmp    1665 <main+0x505>
movzbl -0x105e9(%rbp),%esi
lea    0x9dc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10660(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10660(%rbp)
movslq -0x10660(%rbp),%rax
movsbl -0x10640(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    16b5 <main+0x555>
mov    -0x10660(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10660(%rbp)
jmp    1689 <main+0x529>
movslq -0x10660(%rbp),%rax
mov    -0x10640(%rbp,%rax,1),%al
mov    %al,-0x105e9(%rbp)
movzbl -0x105e9(%rbp),%eax
cmp    $0x61,%eax
jl     16fb <main+0x59b>
movzbl -0x105e9(%rbp),%eax
cmp    $0x7a,%eax
jg     16fb <main+0x59b>
movzbl -0x105e9(%rbp),%eax
and    $0xdf,%eax
mov    %al,-0x105e9(%rbp)
jmp    1700 <main+0x5a0>
mov    -0x105ea(%rbp),%al
add    $0x1,%al
mov    %al,-0x105ea(%rbp)
jmp    15bd <main+0x45d>
mov    -0x10658(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10658(%rbp)
movzbl -0x105ed(%rbp),%eax
cmp    $0x80,%eax
jne    17aa <main+0x64a>
jmp    1739 <main+0x5d9>
movslq -0x10660(%rbp),%rax
movsbl -0x10640(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    1765 <main+0x605>
mov    -0x10660(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10660(%rbp)
jmp    1739 <main+0x5d9>
movslq -0x10660(%rbp),%rax
cmpb   $0x0,-0x10640(%rbp,%rax,1)
je     17a5 <main+0x645>
mov    -0x10658(%rbp),%eax
mov    %eax,-0x1065c(%rbp)
mov    -0x105eb(%rbp),%al
add    $0x1,%al
mov    %al,-0x105eb(%rbp)
movl   $0x0,-0x10660(%rbp)
movb   $0x0,-0x105ed(%rbp)
jmp    17aa <main+0x64a>
jmp    18ee <main+0x78e>
movzbl -0x105e9(%rbp),%eax
movzbl -0x105ec(%rbp),%ecx
cmp    %ecx,%eax
je     183e <main+0x6de>
jmp    17ca <main+0x66a>
mov    -0x10658(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x10658(%rbp)
cltq
movzbl -0x5e0(%rbp,%rax,1),%eax
ff
cmp    $0x80,%eax
jge    17f5 <main+0x695>
jmp    17ca <main+0x66a>
mov    -0x10658(%rbp),%eax
mov    %eax,-0x1065c(%rbp)
mov    -0x105eb(%rbp),%al
add    $0x1,%al
mov    %al,-0x105eb(%rbp)
cmpb   $0x0,-0x105eb(%rbp)
jne    1828 <main+0x6c8>
movb   $0x1,-0x105ed(%rbp)
jmp    1839 <main+0x6d9>
movl   $0x0,-0x10660(%rbp)
movb   $0x0,-0x105ed(%rbp)
jmp    18e9 <main+0x789>
mov    -0x10660(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10660(%rbp)
mov    -0x10658(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10658(%rbp)
movzbl -0x105ed(%rbp),%eax
cmp    $0x80,%eax
jne    18e4 <main+0x784>
jmp    1873 <main+0x713>
movslq -0x10660(%rbp),%rax
movsbl -0x10640(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    189f <main+0x73f>
mov    -0x10660(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10660(%rbp)
jmp    1873 <main+0x713>
movslq -0x10660(%rbp),%rax
cmpb   $0x0,-0x10640(%rbp,%rax,1)
je     18df <main+0x77f>
mov    -0x10658(%rbp),%eax
mov    %eax,-0x1065c(%rbp)
mov    -0x105eb(%rbp),%al
add    $0x1,%al
mov    %al,-0x105eb(%rbp)
movl   $0x0,-0x10660(%rbp)
movb   $0x0,-0x105ed(%rbp)
jmp    18e4 <main+0x784>
jmp    18e9 <main+0x789>
jmp    18ee <main+0x78e>
jmp    18f3 <main+0x793>
cmpb   $0x0,-0x105ed(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1280 <main+0x120>
movzbl -0x105ed(%rbp),%eax
cmp    $0x80,%eax
jne    19e8 <main+0x888>
mov    -0x1065c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1065c(%rbp)
movzbl -0x105eb(%rbp),%esi
lea    0x72f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x1065c(%rbp),%rax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1065c(%rbp)
lea    -0x5e0(%rbp),%rcx
mov    0x1(%rax,%rcx,1),%al
and    $0x7f,%al
mov    %al,-0x105ec(%rbp)
movzbl -0x105ec(%rbp),%eax
mov    %eax,-0x10668(%rbp)
sub    $0x26,%eax
je     19aa <main+0x84a>
jmp    197d <main+0x81d>
mov    -0x10668(%rbp),%eax
sub    $0x40,%eax
jne    19af <main+0x84f>
jmp    1991 <main+0x831>
mov    -0x10654(%rbp),%esi
lea    0x6cf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19c4 <main+0x864>
jmp    19af <main+0x84f>
movzbl -0x105ec(%rbp),%esi
lea    0x6b6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19c9 <main+0x869>
movslq -0x1065c(%rbp),%rax
movzbl -0x5e0(%rbp,%rax,1),%eax
ff
cmp    $0x80,%eax
jl     193d <main+0x7dd>
jmp    19f6 <main+0x896>
lea    0x687(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x63f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10644(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10644(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    123b <main+0xdb>
jmp    1a22 <main+0x8c2>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10670,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x658,%rsp
lea    0xe68(%rip),%rdi
lea    0xe6b(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     18af <main+0x72f>
mov    %rax,%rbp
mov    0x2e31(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   1090 <fseek@plt>
mov    %rbp,%rdi
call   1070 <ftell@plt>
mov    %eax,%r14d
mov    0x2e03(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   1090 <fseek@plt>
lea    0x70(%rsp),%rdi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   1050 <fread@plt>
lea    0xe47(%rip),%rdi
call   1040 <puts@plt>
mov    $0x400,%r14d
jmp    1243 <main+0xc3>
lea    0xe27(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x10(%rsp),%r14d
mov    0x8(%rsp),%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r12d,0x8(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r14d
lea    0xdc3(%rip),%rdi
mov    %r14d,0x10(%rsp)
mov    %r14d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x20(%rsp),%rdi
call   1080 <gets@plt>
movl   $0x0,0x4(%rsp)
xor    %r10d,%r10d
movl   $0x0,0xc(%rsp)
xor    %r12d,%r12d
movabs $0xffffffff00000000,%r8
ff ff ff
movabs $0x100000000,%r9
jmp    12a3 <main+0x123>
nop
movabs $0x100000000,%r9
test   %r11b,%r11b
jne    1840 <main+0x6c0>
movslq %r12d,%rsi
mov    %rsi,%rax
shl    $0x20,%rax
add    %r8,%rax
lea    (%rsp,%rsi,1),%rdx
add    $0x20,%rdx
lea    0x1(%rsi),%edi
lea    0x2(%rsi),%ebp
add    $0x3,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12d,%ebx
mov    %edi,%r14d
mov    %ebp,%r13d
mov    %esi,%r15d
movzbl (%rdx),%ecx
add    %r9,%rax
lea    0x1(%rbx),%r12d
add    $0x1,%rdx
lea    0x1(%r14),%edi
lea    0x1(%r13),%ebp
lea    0x1(%r15),%esi
cmp    $0x20,%cl
je     12d0 <main+0x150>
lea    -0x61(%rcx),%esi
mov    %ecx,%r11d
and    $0xdf,%r11b
movslq %r10d,%rdi
lea    (%rsp,%rdi,1),%rbp
add    $0x70,%rbp
shl    $0x20,%rdi
add    %r8,%rdi
nopw   0x0(%rax,%rax,1)
mov    %r10d,%eax
movzbl 0x0(%rbp),%edx
add    %r9,%rdi
lea    0x1(%rax),%r10d
add    $0x1,%rbp
cmp    $0x20,%edx
je     1320 <main+0x1a0>
cmp    $0x1a,%sil
movzbl %r11b,%esi
movzbl %cl,%ebp
cmovb  %esi,%ebp
lea    -0x1(%r12),%esi
mov    %edx,%ecx
and    $0x7f,%ecx
mov    %edx,%r11d
and    $0x80,%r11b
cmp    $0x26,%ecx
je     1480 <main+0x300>
cmp    $0x40,%ecx
jne    16a0 <main+0x520>
lea    -0x30(%rbp),%eax
cmp    $0xa,%al
jb     1388 <main+0x208>
lea    -0x41(%rbp),%eax
movl   $0x0,0x8(%rsp)
cmp    $0x5,%al
ja     179a <main+0x61a>
add    $0xc9,%bpl
mov    %ebp,%eax
mov    %edx,%ebp
mov    %r11d,%r15d
mov    %r10d,%r13d
movzbl %al,%esi
lea    0xc7a(%rip),%rdi
mov    %esi,0x8(%rsp)
xor    %eax,%eax
call   1060 <printf@plt>
movabs $0x100000000,%rsi
movslq %ebx,%rax
lea    0x21(%rsp),%rcx
add    %rax,%rcx
shl    $0x20,%rax
xchg   %ax,%ax
mov    %r14d,%r12d
movzbl (%rcx),%edx
add    %rsi,%rax
add    $0x1,%ebx
add    $0x1,%rcx
lea    0x1(%r12),%r14d
cmp    $0x20,%dl
je     13c0 <main+0x240>
lea    -0x61(%rdx),%eax
movzbl %dl,%ecx
and    $0xdf,%dl
cmp    $0x1a,%al
movzbl %dl,%eax
cmovae %ecx,%eax
lea    -0x30(%rax),%ecx
cmp    $0xa,%cl
jb     1403 <main+0x283>
lea    -0x41(%rax),%ecx
cmp    $0x5,%cl
ja     1790 <main+0x610>
add    $0xc9,%al
mov    %eax,%ecx
movzbl %cl,%ebx
lea    0xc07(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
movslq %r12d,%rax
lea    0x21(%rsp),%rcx
add    %rcx,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12d
cmpb   $0x20,(%rax)
lea    0x1(%rax),%rax
je     1430 <main+0x2b0>
mov    0x8(%rsp),%eax
shl    $0x4,%eax
add    %ebx,%eax
mov    %eax,0x8(%rsp)
movabs $0xffffffff00000000,%r8
ff ff ff
movabs $0x100000000,%r9
mov    %r13d,%r10d
mov    %r15d,%r11d
mov    %ebp,%eax
test   %al,%al
jns    129a <main+0x11a>
jmp    17db <main+0x65b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %esi,%r12d
mov    %edx,0x14(%rsp)
mov    %r11d,0x18(%rsp)
mov    %r10d,0x1c(%rsp)
lea    0xb8a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    -0x30(%rbp),%eax
cmp    $0xa,%al
jb     14ba <main+0x33a>
lea    -0x41(%rbp),%eax
cmp    $0x5,%al
mov    %r12d,%edx
ja     16e0 <main+0x560>
add    $0xc9,%bpl
mov    %ebp,%eax
movzbl %al,%esi
lea    0xb50(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movslq %ebx,%rax
lea    0x21(%rsp),%rcx
add    %rax,%rcx
shl    $0x20,%rax
movabs $0x100000000,%rsi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14d,%edi
mov    %r13d,%r12d
mov    %r15d,%ebp
movzbl (%rcx),%edx
add    %rsi,%rax
add    $0x1,%ebx
add    $0x1,%rcx
lea    0x1(%rdi),%r14d
lea    0x1(%r12),%r13d
lea    0x1(%rbp),%r15d
cmp    $0x20,%dl
je     14f0 <main+0x370>
lea    -0x61(%rdx),%eax
movzbl %dl,%ecx
and    $0xdf,%dl
cmp    $0x1a,%al
movzbl %dl,%eax
cmovae %ecx,%eax
lea    -0x30(%rax),%ecx
cmp    $0xa,%cl
jb     1543 <main+0x3c3>
lea    -0x41(%rax),%ecx
mov    %ebx,%edx
cmp    $0x5,%cl
ja     16e0 <main+0x560>
add    $0xc9,%al
mov    %eax,%ecx
movzbl %cl,%esi
mov    %rdi,%rbx
lea    0xac4(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
movslq %edi,%rax
lea    0x21(%rsp),%rcx
add    %rax,%rcx
shl    $0x20,%rax
movabs $0x100000000,%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r12d,%r14d
mov    %ebp,%ebx
movzbl (%rcx),%edx
add    %rsi,%rax
add    $0x1,%edi
add    $0x1,%rcx
lea    0x1(%r14),%r12d
lea    0x1(%rbx),%ebp
cmp    $0x20,%dl
je     1580 <main+0x400>
lea    -0x61(%rdx),%eax
movzbl %dl,%ecx
and    $0xdf,%dl
cmp    $0x1a,%al
movzbl %dl,%eax
cmovae %ecx,%eax
lea    -0x30(%rax),%ecx
cmp    $0xa,%cl
jb     15c9 <main+0x449>
lea    -0x41(%rax),%ecx
mov    %edi,%edx
cmp    $0x5,%cl
ja     16e0 <main+0x560>
add    $0xc9,%al
mov    %eax,%ecx
movzbl %cl,%esi
lea    0xa41(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movslq %r14d,%rax
lea    0x21(%rsp),%rcx
add    %rax,%rcx
shl    $0x20,%rax
movabs $0x100000000,%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%r12d
movzbl (%rcx),%edx
add    %rsi,%rax
add    $0x1,%r14d
add    $0x1,%rcx
lea    0x1(%r12),%ebx
cmp    $0x20,%dl
je     1600 <main+0x480>
lea    -0x61(%rdx),%eax
movzbl %dl,%ecx
and    $0xdf,%dl
cmp    $0x1a,%al
movzbl %dl,%eax
cmovae %ecx,%eax
lea    -0x30(%rax),%ecx
cmp    $0xa,%cl
jb     1647 <main+0x4c7>
lea    -0x41(%rax),%ecx
mov    %r14d,%edx
cmp    $0x5,%cl
ja     16e0 <main+0x560>
add    $0xc9,%al
mov    %eax,%ecx
movzbl %cl,%esi
lea    0x9c3(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movslq %r12d,%rax
lea    0x21(%rsp),%rcx
add    %rcx,%rax
movabs $0xffffffff00000000,%r8
ff ff ff
mov    0x1c(%rsp),%r10d
mov    0x18(%rsp),%r11d
mov    0x14(%rsp),%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12d
cmpb   $0x20,(%rax)
lea    0x1(%rax),%rax
je     1680 <main+0x500>
test   %cl,%cl
jns    1290 <main+0x110>
jmp    1712 <main+0x592>
nopw   0x0(%rax,%rax,1)
cmp    %cl,%bpl
jne    1732 <main+0x5b2>
test   %dl,%dl
jns    129a <main+0x11a>
movslq %r14d,%rax
add    %rsp,%rax
add    $0x20,%rax
nopl   0x0(%rax,%rax,1)
movzbl (%rax),%ecx
cmp    $0x20,%cl
jne    180c <main+0x68c>
add    $0x1,%r14d
add    $0x1,%rax
jmp    16c0 <main+0x540>
cs nopw 0x0(%rax,%rax,1)
add    $0xffffffff,%edx
mov    $0x3f,%edi
mov    %edx,%ebx
call   1030 <putchar@plt>
mov    %ebx,%r12d
movabs $0xffffffff00000000,%r8
ff ff ff
mov    0x1c(%rsp),%r10d
mov    0x18(%rsp),%r11d
mov    0x14(%rsp),%ecx
test   %cl,%cl
jns    1290 <main+0x110>
movslq %r12d,%rax
add    %rsp,%rax
add    $0x20,%rax
nopl   0x0(%rax)
movzbl (%rax),%ecx
cmp    $0x20,%cl
jne    176e <main+0x5ee>
add    $0x1,%r12d
add    $0x1,%rax
jmp    1720 <main+0x5a0>
movslq %eax,%rcx
add    %rsp,%rcx
add    $0x70,%rcx
nopl   0x0(%rax)
add    $0x1,%eax
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jns    1740 <main+0x5c0>
xor    %r11d,%r11d
mov    0x4(%rsp),%ecx
inc    %cl
mov    %ecx,0x4(%rsp)
je     120a <main+0x8a>
mov    %eax,%r10d
mov    %eax,0xc(%rsp)
xor    %r12d,%r12d
jmp    129a <main+0x11a>
test   %cl,%cl
je     1290 <main+0x110>
mov    0x4(%rsp),%eax
add    $0x1,%al
mov    %eax,0x4(%rsp)
xor    %r11d,%r11d
mov    %r10d,0xc(%rsp)
xor    %r12d,%r12d
jmp    1290 <main+0x110>
mov    %ebx,%esi
mov    %r13d,%r10d
mov    %r15d,%r11d
mov    %ebp,%edx
add    $0xffffffff,%esi
mov    $0x3f,%edi
mov    %r10d,%ebx
mov    %r11d,%ebp
mov    %edx,%r14d
mov    %esi,%r15d
call   1030 <putchar@plt>
mov    %r14d,%eax
mov    %ebp,%r11d
mov    %ebx,%r10d
movabs $0x100000000,%r9
movabs $0xffffffff00000000,%r8
ff ff ff
mov    %r15d,%r12d
test   %al,%al
jns    129a <main+0x11a>
movslq %r12d,%rax
add    %rsp,%rax
add    $0x20,%rax
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rax),%ecx
cmp    $0x20,%cl
jne    1802 <main+0x682>
add    $0x1,%r12d
add    $0x1,%rax
jmp    17f0 <main+0x670>
test   %cl,%cl
je     129a <main+0x11a>
jmp    1818 <main+0x698>
test   %cl,%cl
jne    1818 <main+0x698>
mov    %r14d,%r12d
jmp    129a <main+0x11a>
mov    0x4(%rsp),%eax
add    $0x1,%al
mov    %eax,0x4(%rsp)
xor    %r11d,%r11d
mov    %r10d,0xc(%rsp)
xor    %r12d,%r12d
jmp    129a <main+0x11a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0xc(%rsp),%ebx
add    $0xffffffff,%ebx
movzbl 0x4(%rsp),%esi
lea    0x7d7(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movslq %ebx,%rbx
lea    0x71(%rsp),%rax
add    %rax,%rbx
mov    0x10(%rsp),%r14d
lea    0x7c1(%rip),%r15
mov    0x8(%rsp),%r12d
jmp    1892 <main+0x712>
nopl   0x0(%rax,%rax,1)
call   1030 <putchar@plt>
add    $0x1,%rbx
test   %bpl,%bpl
js     1230 <main+0xb0>
movzbl (%rbx),%ebp
mov    %ebp,%edi
and    $0x7f,%edi
cmp    $0x40,%dil
jne    1880 <main+0x700>
mov    %r15,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1885 <main+0x705>
lea    0x795(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%eax
add    $0x658,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"65C02.bin\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [49 x i8] c"\0A***Problem opening Opcode List '65C02.bin'!***\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.3 = [8 x i8] c">0400[\0A\00"
@.str.4 = [7 x i8] c"%04x: \00"
@.str.5 = [2 x i8] c"?\00"
@.str.6 = [14 x i8] c"\0ANibble=%01x\0A\00"
@.str.7 = [8 x i8] c"word...\00"
@.str.8 = [8 x i8] c"[%02x] \00"
@.str.9 = [6 x i8] c"$%02x\00"
@.str.10 = [3 x i8] c"%c\00"
@.str.11 = [12 x i8] c"***ERROR***\00"
@.str.12 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1500 x i8]
%3 = alloca [65536 x i8]
%4 = alloca i32*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
%11 = alloca [80 x i8]
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
store i32 0, i32* %1
store i8 0, i8* %10
store i32 0, i32* %12
%20 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %20, i32** %4
%21 = load i32*, i32** %4
%22 = icmp eq i32* %21, null
br i1 %22, label %23, label %25
23: ; preds = %0
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %1
br label %419
25: ; preds = %0
%26 = load i32*, i32** %4
%27 = load i32, i32* @SEEK_END
%28 = call i32 @fseek(i32* %26, i32 0, i32 %27)
%29 = load i32*, i32** %4
%30 = call i32 @ftell(i32* %29)
store i32 %30, i32* %14
%31 = load i32*, i32** %4
%32 = load i32, i32* @SEEK_SET
%33 = call i32 @fseek(i32* %31, i32 0, i32 %32)
%34 = getelementptr inbounds [1500 x i8], [1500 x i8]* %2, i64 0, i64 0
%35 = load i32, i32* %14
%36 = load i32*, i32** %4
%37 = call i32 @fread(i8* %34, i32 %35, i32 1, i32* %36)
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
store i32 1024, i32* %12
br label %39
39: ; preds = %417, %25
%40 = load i32, i32* %12
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %40)
%42 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 0
%43 = call i32 @gets(i8* %42)
store i32 0, i32* %17
store i32 0, i32* %18
store i32 0, i32* %19
store i8 0, i8* %7
br label %44
44: ; preds = %369, %39
br label %45
45: ; preds = %52, %44
%46 = load i32, i32* %19
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %47
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 32
br i1 %51, label %52, label %55
52: ; preds = %45
%53 = load i32, i32* %19
%54 = add nsw i32 %53, 1
store i32 %54, i32* %19
br label %45
55: ; preds = %45
%56 = load i32, i32* %19
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %57
%59 = load i8, i8* %58
store i8 %59, i8* %5
%60 = load i8, i8* %5
%61 = zext i8 %60 to i32
%62 = icmp sge i32 %61, 97
br i1 %62, label %63, label %72
63: ; preds = %55
%64 = load i8, i8* %5
%65 = zext i8 %64 to i32
%66 = icmp sle i32 %65, 122
br i1 %66, label %67, label %72
67: ; preds = %63
%68 = load i8, i8* %5
%69 = zext i8 %68 to i32
%70 = and i32 %69, 223
%71 = trunc i32 %70 to i8
store i8 %71, i8* %5
br label %72
72: ; preds = %67, %63, %55
br label %73
73: ; preds = %80, %72
%74 = load i32, i32* %17
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [1500 x i8], [1500 x i8]* %2, i64 0, i64 %75
%77 = load i8, i8* %76
%78 = zext i8 %77 to i32
%79 = icmp eq i32 %78, 32
br i1 %79, label %80, label %83
80: ; preds = %73
%81 = load i32, i32* %17
%82 = add nsw i32 %81, 1
store i32 %82, i32* %17
br label %73
83: ; preds = %73
%84 = load i32, i32* %17
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [1500 x i8], [1500 x i8]* %2, i64 0, i64 %85
%87 = load i8, i8* %86
%88 = zext i8 %87 to i32
%89 = and i32 %88, 127
%90 = trunc i32 %89 to i8
store i8 %90, i8* %8
%91 = load i32, i32* %17
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [1500 x i8], [1500 x i8]* %2, i64 0, i64 %92
%94 = load i8, i8* %93
%95 = zext i8 %94 to i32
%96 = and i32 %95, 128
%97 = trunc i32 %96 to i8
store i8 %97, i8* %9
%98 = load i8, i8* %8
%99 = zext i8 %98 to i32
switch i32 %99, label %311 [
i32 64, label %100
i32 38, label %208
]
100: ; preds = %83
store i32 0, i32* %16
store i8 0, i8* %6
br label %101
101: ; preds = %176, %100
%102 = load i8, i8* %6
%103 = zext i8 %102 to i32
%104 = icmp slt i32 %103, 2
br i1 %104, label %105, label %179
105: ; preds = %101
%106 = load i8, i8* %5
%107 = zext i8 %106 to i32
%108 = sub nsw i32 %107, 48
%109 = trunc i32 %108 to i8
store i8 %109, i8* %5
%110 = load i8, i8* %5
%111 = zext i8 %110 to i32
%112 = icmp sge i32 %111, 0
br i1 %112, label %113, label %118
113: ; preds = %105
%114 = load i8, i8* %5
%115 = zext i8 %114 to i32
%116 = icmp slt i32 %115, 10
br i1 %116, label %117, label %118
117: ; preds = %113
br label %136
118: ; preds = %113, %105
%119 = load i8, i8* %5
%120 = zext i8 %119 to i32
%121 = icmp sge i32 %120, 17
br i1 %121, label %122, label %131
122: ; preds = %118
%123 = load i8, i8* %5
%124 = zext i8 %123 to i32
%125 = icmp sle i32 %124, 22
br i1 %125, label %126, label %131
126: ; preds = %122
%127 = load i8, i8* %5
%128 = zext i8 %127 to i32
%129 = sub nsw i32 %128, 7
%130 = trunc i32 %129 to i8
store i8 %130, i8* %5
br label %135
131: ; preds = %122, %118
store i8 -1, i8* %5
%132 = load i32, i32* %19
%133 = add nsw i32 %132, -1
store i32 %133, i32* %19
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %179
135: ; preds = %126
br label %136
136: ; preds = %135, %117
%137 = load i8, i8* %5
%138 = zext i8 %137 to i32
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %138)
%140 = load i32, i32* %16
%141 = mul nsw i32 %140, 16
store i32 %141, i32* %16
%142 = load i8, i8* %5
%143 = zext i8 %142 to i32
%144 = load i32, i32* %16
%145 = add nsw i32 %144, %143
store i32 %145, i32* %16
%146 = load i32, i32* %19
%147 = add nsw i32 %146, 1
store i32 %147, i32* %19
br label %148
148: ; preds = %155, %136
%149 = load i32, i32* %19
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %150
%152 = load i8, i8* %151
%153 = sext i8 %152 to i32
%154 = icmp eq i32 %153, 32
br i1 %154, label %155, label %158
155: ; preds = %148
%156 = load i32, i32* %19
%157 = add nsw i32 %156, 1
store i32 %157, i32* %19
br label %148
158: ; preds = %148
%159 = load i32, i32* %19
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %160
%162 = load i8, i8* %161
store i8 %162, i8* %5
%163 = load i8, i8* %5
%164 = zext i8 %163 to i32
%165 = icmp sge i32 %164, 97
br i1 %165, label %166, label %175
166: ; preds = %158
%167 = load i8, i8* %5
%168 = zext i8 %167 to i32
%169 = icmp sle i32 %168, 122
br i1 %169, label %170, label %175
170: ; preds = %166
%171 = load i8, i8* %5
%172 = zext i8 %171 to i32
%173 = and i32 %172, 223
%174 = trunc i32 %173 to i8
store i8 %174, i8* %5
br label %175
175: ; preds = %170, %166, %158
br label %176
176: ; preds = %175
%177 = load i8, i8* %6
%178 = add i8 %177, 1
store i8 %178, i8* %6
br label %101
179: ; preds = %131, %101
%180 = load i32, i32* %17
%181 = add nsw i32 %180, 1
store i32 %181, i32* %17
%182 = load i8, i8* %9
%183 = zext i8 %182 to i32
%184 = icmp eq i32 %183, 128
br i1 %184, label %185, label %207
185: ; preds = %179
br label %186
186: ; preds = %193, %185
%187 = load i32, i32* %19
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %188
%190 = load i8, i8* %189
%191 = sext i8 %190 to i32
%192 = icmp eq i32 %191, 32
br i1 %192, label %193, label %196
193: ; preds = %186
%194 = load i32, i32* %19
%195 = add nsw i32 %194, 1
store i32 %195, i32* %19
br label %186
196: ; preds = %186
%197 = load i32, i32* %19
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %198
%200 = load i8, i8* %199
%201 = icmp ne i8 %200, 0
br i1 %201, label %202, label %206
202: ; preds = %196
%203 = load i32, i32* %17
store i32 %203, i32* %18
%204 = load i8, i8* %7
%205 = add i8 %204, 1
store i8 %205, i8* %7
store i32 0, i32* %19
store i8 0, i8* %9
br label %206
206: ; preds = %202, %196
br label %207
207: ; preds = %206, %179
br label %368
208: ; preds = %83
%209 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
store i8 0, i8* %6
br label %210
210: ; preds = %279, %208
%211 = load i8, i8* %6
%212 = zext i8 %211 to i32
%213 = icmp slt i32 %212, 4
br i1 %213, label %214, label %282
214: ; preds = %210
%215 = load i8, i8* %5
%216 = zext i8 %215 to i32
%217 = sub nsw i32 %216, 48
%218 = trunc i32 %217 to i8
store i8 %218, i8* %5
%219 = load i8, i8* %5
%220 = zext i8 %219 to i32
%221 = icmp sge i32 %220, 0
br i1 %221, label %222, label %227
222: ; preds = %214
%223 = load i8, i8* %5
%224 = zext i8 %223 to i32
%225 = icmp slt i32 %224, 10
br i1 %225, label %226, label %227
226: ; preds = %222
br label %245
227: ; preds = %222, %214
%228 = load i8, i8* %5
%229 = zext i8 %228 to i32
%230 = icmp sge i32 %229, 17
br i1 %230, label %231, label %240
231: ; preds = %227
%232 = load i8, i8* %5
%233 = zext i8 %232 to i32
%234 = icmp sle i32 %233, 22
br i1 %234, label %235, label %240
235: ; preds = %231
%236 = load i8, i8* %5
%237 = zext i8 %236 to i32
%238 = sub nsw i32 %237, 7
%239 = trunc i32 %238 to i8
store i8 %239, i8* %5
br label %244
240: ; preds = %231, %227
store i8 -1, i8* %5
%241 = load i32, i32* %19
%242 = add nsw i32 %241, -1
store i32 %242, i32* %19
%243 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %282
244: ; preds = %235
br label %245
245: ; preds = %244, %226
%246 = load i8, i8* %5
%247 = zext i8 %246 to i32
%248 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %247)
%249 = load i32, i32* %19
%250 = add nsw i32 %249, 1
store i32 %250, i32* %19
br label %251
251: ; preds = %258, %245
%252 = load i32, i32* %19
%253 = sext i32 %252 to i64
%254 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %253
%255 = load i8, i8* %254
%256 = sext i8 %255 to i32
%257 = icmp eq i32 %256, 32
br i1 %257, label %258, label %261
258: ; preds = %251
%259 = load i32, i32* %19
%260 = add nsw i32 %259, 1
store i32 %260, i32* %19
br label %251
261: ; preds = %251
%262 = load i32, i32* %19
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %263
%265 = load i8, i8* %264
store i8 %265, i8* %5
%266 = load i8, i8* %5
%267 = zext i8 %266 to i32
%268 = icmp sge i32 %267, 97
br i1 %268, label %269, label %278
269: ; preds = %261
%270 = load i8, i8* %5
%271 = zext i8 %270 to i32
%272 = icmp sle i32 %271, 122
br i1 %272, label %273, label %278
273: ; preds = %269
%274 = load i8, i8* %5
%275 = zext i8 %274 to i32
%276 = and i32 %275, 223
%277 = trunc i32 %276 to i8
store i8 %277, i8* %5
br label %278
278: ; preds = %273, %269, %261
br label %279
279: ; preds = %278
%280 = load i8, i8* %6
%281 = add i8 %280, 1
store i8 %281, i8* %6
br label %210
282: ; preds = %240, %210
%283 = load i32, i32* %17
%284 = add nsw i32 %283, 1
store i32 %284, i32* %17
%285 = load i8, i8* %9
%286 = zext i8 %285 to i32
%287 = icmp eq i32 %286, 128
br i1 %287, label %288, label %310
288: ; preds = %282
br label %289
289: ; preds = %296, %288
%290 = load i32, i32* %19
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %291
%293 = load i8, i8* %292
%294 = sext i8 %293 to i32
%295 = icmp eq i32 %294, 32
br i1 %295, label %296, label %299
296: ; preds = %289
%297 = load i32, i32* %19
%298 = add nsw i32 %297, 1
store i32 %298, i32* %19
br label %289
299: ; preds = %289
%300 = load i32, i32* %19
%301 = sext i32 %300 to i64
%302 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %301
%303 = load i8, i8* %302
%304 = icmp ne i8 %303, 0
br i1 %304, label %305, label %309
305: ; preds = %299
%306 = load i32, i32* %17
store i32 %306, i32* %18
%307 = load i8, i8* %7
%308 = add i8 %307, 1
store i8 %308, i8* %7
store i32 0, i32* %19
store i8 0, i8* %9
br label %309
309: ; preds = %305, %299
br label %310
310: ; preds = %309, %282
br label %368
311: ; preds = %83
%312 = load i8, i8* %5
%313 = zext i8 %312 to i32
%314 = load i8, i8* %8
%315 = zext i8 %314 to i32
%316 = icmp ne i32 %313, %315
br i1 %316, label %317, label %336
317: ; preds = %311
br label %318
318: ; preds = %326, %317
%319 = load i32, i32* %17
%320 = add nsw i32 %319, 1
store i32 %320, i32* %17
%321 = sext i32 %319 to i64
%322 = getelementptr inbounds [1500 x i8], [1500 x i8]* %2, i64 0, i64 %321
%323 = load i8, i8* %322
%324 = zext i8 %323 to i32
%325 = icmp slt i32 %324, 128
br i1 %325, label %326, label %327
326: ; preds = %318
br label %318
327: ; preds = %318
%328 = load i32, i32* %17
store i32 %328, i32* %18
%329 = load i8, i8* %7
%330 = add i8 %329, 1
store i8 %330, i8* %7
%331 = load i8, i8* %7
%332 = icmp ne i8 %331, 0
br i1 %332, label %334, label %333
333: ; preds = %327
store i8 1, i8* %9
br label %335
334: ; preds = %327
store i32 0, i32* %19
store i8 0, i8* %9
br label %335
335: ; preds = %334, %333
br label %367
336: ; preds = %311
%337 = load i32, i32* %19
%338 = add nsw i32 %337, 1
store i32 %338, i32* %19
%339 = load i32, i32* %17
%340 = add nsw i32 %339, 1
store i32 %340, i32* %17
%341 = load i8, i8* %9
%342 = zext i8 %341 to i32
%343 = icmp eq i32 %342, 128
br i1 %343, label %344, label %366
344: ; preds = %336
br label %345
345: ; preds = %352, %344
%346 = load i32, i32* %19
%347 = sext i32 %346 to i64
%348 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %347
%349 = load i8, i8* %348
%350 = sext i8 %349 to i32
%351 = icmp eq i32 %350, 32
br i1 %351, label %352, label %355
352: ; preds = %345
%353 = load i32, i32* %19
%354 = add nsw i32 %353, 1
store i32 %354, i32* %19
br label %345
355: ; preds = %345
%356 = load i32, i32* %19
%357 = sext i32 %356 to i64
%358 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %357
%359 = load i8, i8* %358
%360 = icmp ne i8 %359, 0
br i1 %360, label %361, label %365
361: ; preds = %355
%362 = load i32, i32* %17
store i32 %362, i32* %18
%363 = load i8, i8* %7
%364 = add i8 %363, 1
store i8 %364, i8* %7
store i32 0, i32* %19
store i8 0, i8* %9
br label %365
365: ; preds = %361, %355
br label %366
366: ; preds = %365, %336
br label %367
367: ; preds = %366, %335
br label %368
368: ; preds = %367, %310, %207
br label %369
369: ; preds = %368
%370 = load i8, i8* %9
%371 = icmp ne i8 %370, 0
%372 = xor i1 %371, true
br i1 %372, label %44, label %373
373: ; preds = %369
%374 = load i8, i8* %9
%375 = zext i8 %374 to i32
%376 = icmp eq i32 %375, 128
br i1 %376, label %377, label %411
377: ; preds = %373
%378 = load i32, i32* %18
%379 = add nsw i32 %378, -1
store i32 %379, i32* %18
%380 = load i8, i8* %7
%381 = zext i8 %380 to i32
%382 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %381)
br label %383
383: ; preds = %403, %377
%384 = load i32, i32* %18
%385 = add nsw i32 %384, 1
store i32 %385, i32* %18
%386 = sext i32 %385 to i64
%387 = getelementptr inbounds [1500 x i8], [1500 x i8]* %2, i64 0, i64 %386
%388 = load i8, i8* %387
%389 = zext i8 %388 to i32
%390 = and i32 %389, 127
%391 = trunc i32 %390 to i8
store i8 %391, i8* %8
%392 = load i8, i8* %8
%393 = zext i8 %392 to i32
switch i32 %393, label %398 [
i32 64, label %394
i32 38, label %397
]
394: ; preds = %383
%395 = load i32, i32* %16
%396 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %395)
br label %402
397: ; preds = %383
br label %398
398: ; preds = %383, %397
%399 = load i8, i8* %8
%400 = zext i8 %399 to i32
%401 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 %400)
br label %402
402: ; preds = %398, %394
br label %403
403: ; preds = %402
%404 = load i32, i32* %18
%405 = sext i32 %404 to i64
%406 = getelementptr inbounds [1500 x i8], [1500 x i8]* %2, i64 0, i64 %405
%407 = load i8, i8* %406
%408 = zext i8 %407 to i32
%409 = icmp slt i32 %408, 128
br i1 %409, label %383, label %410
410: ; preds = %403
br label %413
411: ; preds = %373
%412 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
br label %413
413: ; preds = %411, %410
%414 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%415 = load i32, i32* %12
%416 = add nsw i32 %415, 1
store i32 %416, i32* %12
br label %417
417: ; preds = %413
br i1 true, label %39, label %418
418: ; preds = %417
store i32 0, i32* %1
br label %419
419: ; preds = %418, %23
%420 = load i32, i32* %1
ret i32 %420
}

LLVM IR (-O2):
@.str = [10 x i8] c"65C02.bin\00"
@.str.1 = [3 x i8] c"rb\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.4 = [7 x i8] c"%04x: \00"
@.str.6 = [14 x i8] c"\0ANibble=%01x\0A\00"
@.str.7 = [8 x i8] c"word...\00"
@.str.8 = [8 x i8] c"[%02x] \00"
@.str.9 = [6 x i8] c"$%02x\00"
@.str.11 = [12 x i8] c"***ERROR***\00"
@str = [7 x i8] c">0400[\00"
@str.13 = [48 x i8] c"\0A***Problem opening Opcode List '65C02.bin'!***\00"
define i32 @main() {
%1 = alloca [1500 x i8]
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [1500 x i8], [1500 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.13, i64 0, i64 0))
ret i32 -1
9: ; preds = %0
%10 = load i32, i32* @SEEK_END
%11 = tail call i32 @fseek(i32* %5, i32 0, i32 %10)
%12 = tail call i32 @ftell(i32* %5)
%13 = load i32, i32* @SEEK_SET
%14 = tail call i32 @fseek(i32* %5, i32 0, i32 %13)
%15 = call i32 @fread(i8* %3, i32 %12, i32 1, i32* %5)
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
br label %17
17: ; preds = %302, %9
%18 = phi i32 [ 1024, %9 ], [ %305, %302 ]
%19 = phi i32 [ undef, %9 ], [ %303, %302 ]
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %18)
%21 = call i32 @gets(i8* %4)
br label %22
22: ; preds = %273, %17
%23 = phi i8 [ 0, %17 ], [ %275, %273 ]
%24 = phi i32 [ %19, %17 ], [ %276, %273 ]
%25 = phi i32 [ 0, %17 ], [ %277, %273 ]
%26 = phi i32 [ 0, %17 ], [ %278, %273 ]
%27 = phi i32 [ 0, %17 ], [ %279, %273 ]
%28 = sext i32 %27 to i64
br label %29
29: ; preds = %29, %22
%30 = phi i64 [ %34, %29 ], [ %28, %22 ]
%31 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %30
%32 = load i8, i8* %31
%33 = icmp eq i8 %32, 32
%34 = add i64 %30, 1
br i1 %33, label %29, label %35
35: ; preds = %29
%36 = add i8 %32, -97
%37 = and i8 %32, -33
%38 = sext i32 %25 to i64
br label %39
39: ; preds = %39, %35
%40 = phi i64 [ %44, %39 ], [ %38, %35 ]
%41 = getelementptr inbounds [1500 x i8], [1500 x i8]* %1, i64 0, i64 %40
%42 = load i8, i8* %41
%43 = icmp eq i8 %42, 32
%44 = add i64 %40, 1
br i1 %43, label %39, label %45
45: ; preds = %39
%46 = trunc i64 %30 to i32
%47 = icmp ult i8 %36, 26
%48 = select i1 %47, i8 %37, i8 %32
%49 = trunc i64 %40 to i32
%50 = and i8 %42, 127
%51 = and i8 %42, -128
%52 = zext i8 %50 to i32
switch i32 %52, label %238 [
i32 64, label %53
i32 38, label %122
]
53: ; preds = %45
%54 = add i8 %48, -48
%55 = icmp ult i8 %54, 10
br i1 %55, label %66, label %56
56: ; preds = %53
%57 = add i8 %48, -65
%58 = icmp ult i8 %57, 6
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = add nsw i8 %48, -55
br label %66
61: ; preds = %85, %56
%62 = phi i32 [ %46, %56 ], [ %86, %85 ]
%63 = phi i32 [ 0, %56 ], [ %68, %85 ]
%64 = add nsw i32 %62, -1
%65 = call i32 @putchar(i32 63)
br label %107
66: ; preds = %53, %59
%67 = phi i8 [ %54, %53 ], [ %60, %59 ]
%68 = zext i8 %67 to i32
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %68)
%70 = shl i64 %30, 32
%71 = ashr exact i64 %70, 32
br label %72
72: ; preds = %72, %66
%73 = phi i64 [ %74, %72 ], [ %71, %66 ]
%74 = add i64 %73, 1
%75 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %74
%76 = load i8, i8* %75
%77 = icmp eq i8 %76, 32
br i1 %77, label %72, label %78
78: ; preds = %72
%79 = add i8 %76, -97
%80 = icmp ult i8 %79, 26
%81 = and i8 %76, -33
%82 = select i1 %80, i8 %81, i8 %76
%83 = add i8 %82, -48
%84 = icmp ult i8 %83, 10
br i1 %84, label %91, label %85
85: ; preds = %78
%86 = trunc i64 %74 to i32
%87 = add i8 %82, -65
%88 = icmp ult i8 %87, 6
br i1 %88, label %89, label %61
89: ; preds = %85
%90 = add nsw i8 %82, -55
br label %91
91: ; preds = %89, %78
%92 = phi i8 [ %83, %78 ], [ %90, %89 ]
%93 = zext i8 %92 to i32
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %93)
%95 = shl i64 %74, 32
%96 = ashr exact i64 %95, 32
br label %97
97: ; preds = %97, %91
%98 = phi i64 [ %99, %97 ], [ %96, %91 ]
%99 = add i64 %98, 1
%100 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %99
%101 = load i8, i8* %100
%102 = icmp eq i8 %101, 32
br i1 %102, label %97, label %103
103: ; preds = %97
%104 = shl nuw nsw i32 %68, 4
%105 = add nuw nsw i32 %104, %93
%106 = trunc i64 %99 to i32
br label %107
107: ; preds = %103, %61
%108 = phi i32 [ %63, %61 ], [ %105, %103 ]
%109 = phi i32 [ %64, %61 ], [ %106, %103 ]
%110 = add nsw i32 %49, 1
%111 = icmp slt i8 %42, 0
br i1 %111, label %112, label %273
112: ; preds = %107
%113 = sext i32 %109 to i64
br label %114
114: ; preds = %112, %118
%115 = phi i64 [ %113, %112 ], [ %119, %118 ]
%116 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %115
%117 = load i8, i8* %116
switch i8 %117, label %120 [
i8 32, label %118
i8 0, label %269
]
118: ; preds = %114
%119 = add i64 %115, 1
br label %114
120: ; preds = %114
%121 = add i8 %23, 1
br label %273
122: ; preds = %45
%123 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%124 = add i8 %48, -48
%125 = icmp ult i8 %124, 10
br i1 %125, label %135, label %126
126: ; preds = %122
%127 = add i8 %48, -65
%128 = icmp ult i8 %127, 6
br i1 %128, label %129, label %131
129: ; preds = %126
%130 = add nsw i8 %48, -55
br label %135
131: ; preds = %204, %179, %154, %126
%132 = phi i32 [ %46, %126 ], [ %155, %154 ], [ %180, %179 ], [ %205, %204 ]
%133 = add nsw i32 %132, -1
%134 = call i32 @putchar(i32 63)
br label %224
135: ; preds = %122, %129
%136 = phi i8 [ %124, %122 ], [ %130, %129 ]
%137 = zext i8 %136 to i32
%138 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %137)
%139 = shl i64 %30, 32
%140 = ashr exact i64 %139, 32
br label %141
141: ; preds = %141, %135
%142 = phi i64 [ %143, %141 ], [ %140, %135 ]
%143 = add i64 %142, 1
%144 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %143
%145 = load i8, i8* %144
%146 = icmp eq i8 %145, 32
br i1 %146, label %141, label %147
147: ; preds = %141
%148 = add i8 %145, -97
%149 = icmp ult i8 %148, 26
%150 = and i8 %145, -33
%151 = select i1 %149, i8 %150, i8 %145
%152 = add i8 %151, -48
%153 = icmp ult i8 %152, 10
br i1 %153, label %160, label %154
154: ; preds = %147
%155 = trunc i64 %143 to i32
%156 = add i8 %151, -65
%157 = icmp ult i8 %156, 6
br i1 %157, label %158, label %131
158: ; preds = %154
%159 = add nsw i8 %151, -55
br label %160
160: ; preds = %158, %147
%161 = phi i8 [ %152, %147 ], [ %159, %158 ]
%162 = zext i8 %161 to i32
%163 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %162)
%164 = shl i64 %143, 32
%165 = ashr exact i64 %164, 32
br label %166
166: ; preds = %166, %160
%167 = phi i64 [ %168, %166 ], [ %165, %160 ]
%168 = add i64 %167, 1
%169 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %168
%170 = load i8, i8* %169
%171 = icmp eq i8 %170, 32
br i1 %171, label %166, label %172
172: ; preds = %166
%173 = add i8 %170, -97
%174 = icmp ult i8 %173, 26
%175 = and i8 %170, -33
%176 = select i1 %174, i8 %175, i8 %170
%177 = add i8 %176, -48
%178 = icmp ult i8 %177, 10
br i1 %178, label %185, label %179
179: ; preds = %172
%180 = trunc i64 %168 to i32
%181 = add i8 %176, -65
%182 = icmp ult i8 %181, 6
br i1 %182, label %183, label %131
183: ; preds = %179
%184 = add nsw i8 %176, -55
br label %185
185: ; preds = %183, %172
%186 = phi i8 [ %177, %172 ], [ %184, %183 ]
%187 = zext i8 %186 to i32
%188 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %187)
%189 = shl i64 %168, 32
%190 = ashr exact i64 %189, 32
br label %191
191: ; preds = %191, %185
%192 = phi i64 [ %193, %191 ], [ %190, %185 ]
%193 = add i64 %192, 1
%194 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %193
%195 = load i8, i8* %194
%196 = icmp eq i8 %195, 32
br i1 %196, label %191, label %197
197: ; preds = %191
%198 = add i8 %195, -97
%199 = icmp ult i8 %198, 26
%200 = and i8 %195, -33
%201 = select i1 %199, i8 %200, i8 %195
%202 = add i8 %201, -48
%203 = icmp ult i8 %202, 10
br i1 %203, label %210, label %204
204: ; preds = %197
%205 = trunc i64 %193 to i32
%206 = add i8 %201, -65
%207 = icmp ult i8 %206, 6
br i1 %207, label %208, label %131
208: ; preds = %204
%209 = add nsw i8 %201, -55
br label %210
210: ; preds = %208, %197
%211 = phi i8 [ %202, %197 ], [ %209, %208 ]
%212 = zext i8 %211 to i32
%213 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %212)
%214 = shl i64 %193, 32
%215 = ashr exact i64 %214, 32
br label %216
216: ; preds = %216, %210
%217 = phi i64 [ %218, %216 ], [ %215, %210 ]
%218 = add i64 %217, 1
%219 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %218
%220 = load i8, i8* %219
%221 = icmp eq i8 %220, 32
br i1 %221, label %216, label %222
222: ; preds = %216
%223 = trunc i64 %218 to i32
br label %224
224: ; preds = %222, %131
%225 = phi i32 [ %133, %131 ], [ %223, %222 ]
%226 = add nsw i32 %49, 1
%227 = icmp slt i8 %42, 0
br i1 %227, label %228, label %273
228: ; preds = %224
%229 = sext i32 %225 to i64
br label %230
230: ; preds = %228, %234
%231 = phi i64 [ %229, %228 ], [ %235, %234 ]
%232 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %231
%233 = load i8, i8* %232
switch i8 %233, label %236 [
i8 32, label %234
i8 0, label %271
]
234: ; preds = %230
%235 = add i64 %231, 1
br label %230
236: ; preds = %230
%237 = add i8 %23, 1
br label %273
238: ; preds = %45
%239 = icmp eq i8 %48, %50
br i1 %239, label %253, label %240
240: ; preds = %238
%241 = shl i64 %40, 32
%242 = ashr exact i64 %241, 32
br label %243
243: ; preds = %240, %243
%244 = phi i64 [ %242, %240 ], [ %245, %243 ]
%245 = add i64 %244, 1
%246 = getelementptr inbounds [1500 x i8], [1500 x i8]* %1, i64 0, i64 %244
%247 = load i8, i8* %246
%248 = icmp sgt i8 %247, -1
br i1 %248, label %243, label %249
249: ; preds = %243
%250 = trunc i64 %245 to i32
%251 = add i8 %23, 1
%252 = icmp eq i8 %251, 0
br i1 %252, label %300, label %273
253: ; preds = %238
%254 = add i32 %46, 1
%255 = add nsw i32 %49, 1
%256 = icmp slt i8 %42, 0
br i1 %256, label %257, label %273
257: ; preds = %253
%258 = sext i32 %254 to i64
br label %259
259: ; preds = %257, %263
%260 = phi i64 [ %258, %257 ], [ %264, %263 ]
%261 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %260
%262 = load i8, i8* %261
switch i8 %262, label %265 [
i8 32, label %263
i8 0, label %267
]
263: ; preds = %259
%264 = add i64 %260, 1
br label %259
265: ; preds = %259
%266 = add i8 %23, 1
br label %273
267: ; preds = %259
%268 = trunc i64 %260 to i32
br label %273
269: ; preds = %114
%270 = trunc i64 %115 to i32
br label %273
271: ; preds = %230
%272 = trunc i64 %231 to i32
br label %273
273: ; preds = %271, %269, %267, %249, %120, %107, %236, %224, %253, %265
%274 = phi i8 [ 0, %265 ], [ %51, %253 ], [ 0, %236 ], [ %51, %224 ], [ 0, %120 ], [ %51, %107 ], [ 0, %249 ], [ %51, %267 ], [ %51, %269 ], [ %51, %271 ]
%275 = phi i8 [ %266, %265 ], [ %23, %253 ], [ %237, %236 ], [ %23, %224 ], [ %121, %120 ], [ %23, %107 ], [ %251, %249 ], [ %23, %267 ], [ %23, %269 ], [ %23, %271 ]
%276 = phi i32 [ %24, %265 ], [ %24, %253 ], [ %24, %236 ], [ %24, %224 ], [ %108, %120 ], [ %108, %107 ], [ %24, %249 ], [ %24, %267 ], [ %108, %269 ], [ %24, %271 ]
%277 = phi i32 [ %255, %265 ], [ %255, %253 ], [ %226, %236 ], [ %226, %224 ], [ %110, %120 ], [ %110, %107 ], [ %250, %249 ], [ %255, %267 ], [ %110, %269 ], [ %226, %271 ]
%278 = phi i32 [ %255, %265 ], [ %26, %253 ], [ %226, %236 ], [ %26, %224 ], [ %110, %120 ], [ %26, %107 ], [ %250, %249 ], [ %26, %267 ], [ %26, %269 ], [ %26, %271 ]
%279 = phi i32 [ 0, %265 ], [ %254, %253 ], [ 0, %236 ], [ %225, %224 ], [ 0, %120 ], [ %109, %107 ], [ 0, %249 ], [ %268, %267 ], [ %270, %269 ], [ %272, %271 ]
%280 = icmp eq i8 %274, 0
br i1 %280, label %22, label %281
281: ; preds = %273
%282 = add i32 %278, -1
%283 = zext i8 %275 to i32
%284 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %283)
%285 = sext i32 %282 to i64
br label %286
286: ; preds = %298, %281
%287 = phi i64 [ %288, %298 ], [ %285, %281 ]
%288 = add i64 %287, 1
%289 = getelementptr inbounds [1500 x i8], [1500 x i8]* %1, i64 0, i64 %288
%290 = load i8, i8* %289
%291 = and i8 %290, 127
%292 = icmp eq i8 %291, 64
br i1 %292, label %293, label %295
293: ; preds = %286
%294 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %276)
br label %298
295: ; preds = %286
%296 = zext i8 %291 to i32
%297 = call i32 @putchar(i32 %296)
br label %298
298: ; preds = %293, %295
%299 = icmp sgt i8 %290, -1
br i1 %299, label %286, label %302
300: ; preds = %249
%301 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
br label %302
302: ; preds = %298, %300
%303 = phi i32 [ %24, %300 ], [ %276, %298 ]
%304 = call i32 @putchar(i32 10)
%305 = add nuw nsw i32 %18, 1
br label %17
}