#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[2], 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(press ^C to stop)\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[1] = 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--;
              break;
            }
          }
          tmp[1] *= 16;
          tmp[1] += b;
          while (buf[++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 '&':
        tmp[0] = 0;
        tmp[1] = 0;
        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--;
              break;
            }
          }
          tmp[i / 2] *= 16;
          tmp[i / 2] += b;
          while (buf[++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--;
      count = 1;
      printf("[%02x] ", opcode);
      do {
        c = rom[++oldscan] & 127;
        switch (c) {
        case '@':
          printf("$%02x", tmp[1]);
          count++;
          break;
        case '&':
          printf("$%02x%02x", tmp[0], tmp[1]);
          count += 2;
          break;
        default:
          printf("%c", c);
        }
      } while (rom[oldscan] < 128);
    } else {
      count = 0;
      printf("***ERROR***");
    }
    printf("\n");
    ptr += count;
  } 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    1a58 <main+0x8f8>
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    0xe11(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x10640(%rbp),%rdi
call   1060 <gets@plt>
movl   $0x0,-0x1065c(%rbp)
movl   $0x0,-0x10660(%rbp)
movl   $0x0,-0x10664(%rbp)
movb   $0x0,-0x105eb(%rbp)
jmp    1285 <main+0x125>
movslq -0x10664(%rbp),%rax
movsbl -0x10640(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    12b1 <main+0x151>
mov    -0x10664(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10664(%rbp)
jmp    1285 <main+0x125>
movslq -0x10664(%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 -0x1065c(%rbp),%rax
movzbl -0x5e0(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    1328 <main+0x1c8>
mov    -0x1065c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1065c(%rbp)
jmp    12fc <main+0x19c>
movslq -0x1065c(%rbp),%rax
mov    -0x5e0(%rbp,%rax,1),%al
and    $0x7f,%al
mov    %al,-0x105ec(%rbp)
movslq -0x1065c(%rbp),%rax
mov    -0x5e0(%rbp,%rax,1),%al
and    $0x80,%al
mov    %al,-0x105ed(%rbp)
movzbl -0x105ec(%rbp),%eax
mov    %eax,-0x10668(%rbp)
sub    $0x26,%eax
je     1571 <main+0x411>
jmp    136f <main+0x20f>
mov    -0x10668(%rbp),%eax
sub    $0x40,%eax
jne    178f <main+0x62f>
jmp    1383 <main+0x223>
movl   $0x0,-0x10654(%rbp)
movb   $0x0,-0x105ea(%rbp)
movzbl -0x105ea(%rbp),%eax
cmp    $0x2,%eax
jge    14d5 <main+0x375>
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    142e <main+0x2ce>
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    1429 <main+0x2c9>
movb   $0xff,-0x105e9(%rbp)
mov    -0x10664(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10664(%rbp)
jmp    14d5 <main+0x375>
jmp    142e <main+0x2ce>
mov    -0x10654(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x10654(%rbp)
movzbl -0x105e9(%rbp),%eax
add    -0x10654(%rbp),%eax
mov    %eax,-0x10654(%rbp)
mov    -0x10664(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10664(%rbp)
cltq
movsbl -0x10640(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    1477 <main+0x317>
jmp    1450 <main+0x2f0>
movslq -0x10664(%rbp),%rax
mov    -0x10640(%rbp,%rax,1),%al
mov    %al,-0x105e9(%rbp)
movzbl -0x105e9(%rbp),%eax
cmp    $0x61,%eax
jl     14bd <main+0x35d>
movzbl -0x105e9(%rbp),%eax
cmp    $0x7a,%eax
jg     14bd <main+0x35d>
movzbl -0x105e9(%rbp),%eax
and    $0xdf,%eax
mov    %al,-0x105e9(%rbp)
jmp    14c2 <main+0x362>
mov    -0x105ea(%rbp),%al
add    $0x1,%al
mov    %al,-0x105ea(%rbp)
jmp    1394 <main+0x234>
mov    -0x1065c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1065c(%rbp)
movzbl -0x105ed(%rbp),%eax
cmp    $0x80,%eax
jne    156c <main+0x40c>
jmp    14fb <main+0x39b>
movslq -0x10664(%rbp),%rax
movsbl -0x10640(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    1527 <main+0x3c7>
mov    -0x10664(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10664(%rbp)
jmp    14fb <main+0x39b>
movslq -0x10664(%rbp),%rax
cmpb   $0x0,-0x10640(%rbp,%rax,1)
je     1567 <main+0x407>
mov    -0x1065c(%rbp),%eax
mov    %eax,-0x10660(%rbp)
mov    -0x105eb(%rbp),%al
add    $0x1,%al
mov    %al,-0x105eb(%rbp)
movl   $0x0,-0x10664(%rbp)
movb   $0x0,-0x105ed(%rbp)
jmp    156c <main+0x40c>
jmp    18ce <main+0x76e>
movl   $0x0,-0x10658(%rbp)
movl   $0x0,-0x10654(%rbp)
movb   $0x0,-0x105ea(%rbp)
movzbl -0x105ea(%rbp),%eax
cmp    $0x4,%eax
jge    16f3 <main+0x593>
movzbl -0x105e9(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x105e9(%rbp)
movzbl -0x105e9(%rbp),%eax
cmp    $0x0,%eax
jl     15d1 <main+0x471>
movzbl -0x105e9(%rbp),%eax
cmp    $0xa,%eax
jge    15d1 <main+0x471>
jmp    1626 <main+0x4c6>
movzbl -0x105e9(%rbp),%eax
cmp    $0x11,%eax
jl     1606 <main+0x4a6>
movzbl -0x105e9(%rbp),%eax
cmp    $0x16,%eax
jg     1606 <main+0x4a6>
movzbl -0x105e9(%rbp),%eax
sub    $0x7,%eax
mov    %al,-0x105e9(%rbp)
jmp    1621 <main+0x4c1>
movb   $0xff,-0x105e9(%rbp)
mov    -0x10664(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10664(%rbp)
jmp    16f3 <main+0x593>
jmp    1626 <main+0x4c6>
movzbl -0x105ea(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cltq
mov    -0x10658(%rbp,%rax,4),%ecx
shl    $0x4,%ecx
mov    %ecx,-0x10658(%rbp,%rax,4)
movzbl -0x105e9(%rbp),%ecx
movzbl -0x105ea(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
cltq
add    -0x10658(%rbp,%rax,4),%ecx
mov    %ecx,-0x10658(%rbp,%rax,4)
mov    -0x10664(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10664(%rbp)
cltq
movsbl -0x10640(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    1695 <main+0x535>
jmp    166e <main+0x50e>
movslq -0x10664(%rbp),%rax
mov    -0x10640(%rbp,%rax,1),%al
mov    %al,-0x105e9(%rbp)
movzbl -0x105e9(%rbp),%eax
cmp    $0x61,%eax
jl     16db <main+0x57b>
movzbl -0x105e9(%rbp),%eax
cmp    $0x7a,%eax
jg     16db <main+0x57b>
movzbl -0x105e9(%rbp),%eax
and    $0xdf,%eax
mov    %al,-0x105e9(%rbp)
jmp    16e0 <main+0x580>
mov    -0x105ea(%rbp),%al
add    $0x1,%al
mov    %al,-0x105ea(%rbp)
jmp    158c <main+0x42c>
mov    -0x1065c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1065c(%rbp)
movzbl -0x105ed(%rbp),%eax
cmp    $0x80,%eax
jne    178a <main+0x62a>
jmp    1719 <main+0x5b9>
movslq -0x10664(%rbp),%rax
movsbl -0x10640(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    1745 <main+0x5e5>
mov    -0x10664(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10664(%rbp)
jmp    1719 <main+0x5b9>
movslq -0x10664(%rbp),%rax
cmpb   $0x0,-0x10640(%rbp,%rax,1)
je     1785 <main+0x625>
mov    -0x1065c(%rbp),%eax
mov    %eax,-0x10660(%rbp)
mov    -0x105eb(%rbp),%al
add    $0x1,%al
mov    %al,-0x105eb(%rbp)
movl   $0x0,-0x10664(%rbp)
movb   $0x0,-0x105ed(%rbp)
jmp    178a <main+0x62a>
jmp    18ce <main+0x76e>
movzbl -0x105e9(%rbp),%eax
movzbl -0x105ec(%rbp),%ecx
cmp    %ecx,%eax
je     181e <main+0x6be>
jmp    17aa <main+0x64a>
mov    -0x1065c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1065c(%rbp)
cltq
movzbl -0x5e0(%rbp,%rax,1),%eax
ff
cmp    $0x80,%eax
jge    17d5 <main+0x675>
jmp    17aa <main+0x64a>
mov    -0x1065c(%rbp),%eax
mov    %eax,-0x10660(%rbp)
mov    -0x105eb(%rbp),%al
add    $0x1,%al
mov    %al,-0x105eb(%rbp)
cmpb   $0x0,-0x105eb(%rbp)
jne    1808 <main+0x6a8>
movb   $0x1,-0x105ed(%rbp)
jmp    1819 <main+0x6b9>
movl   $0x0,-0x10664(%rbp)
movb   $0x0,-0x105ed(%rbp)
jmp    18c9 <main+0x769>
mov    -0x10664(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10664(%rbp)
mov    -0x1065c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1065c(%rbp)
movzbl -0x105ed(%rbp),%eax
cmp    $0x80,%eax
jne    18c4 <main+0x764>
jmp    1853 <main+0x6f3>
movslq -0x10664(%rbp),%rax
movsbl -0x10640(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    187f <main+0x71f>
mov    -0x10664(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10664(%rbp)
jmp    1853 <main+0x6f3>
movslq -0x10664(%rbp),%rax
cmpb   $0x0,-0x10640(%rbp,%rax,1)
je     18bf <main+0x75f>
mov    -0x1065c(%rbp),%eax
mov    %eax,-0x10660(%rbp)
mov    -0x105eb(%rbp),%al
add    $0x1,%al
mov    %al,-0x105eb(%rbp)
movl   $0x0,-0x10664(%rbp)
movb   $0x0,-0x105ed(%rbp)
jmp    18c4 <main+0x764>
jmp    18c9 <main+0x769>
jmp    18ce <main+0x76e>
jmp    18d3 <main+0x773>
cmpb   $0x0,-0x105ed(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1280 <main+0x120>
movzbl -0x105ed(%rbp),%eax
cmp    $0x80,%eax
jne    1a0a <main+0x8aa>
mov    -0x10660(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10660(%rbp)
movl   $0x1,-0x10650(%rbp)
movzbl -0x105eb(%rbp),%esi
lea    0x740(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x10660(%rbp),%rax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x10660(%rbp)
lea    -0x5e0(%rbp),%rcx
mov    0x1(%rax,%rcx,1),%al
and    $0x7f,%al
mov    %al,-0x105ec(%rbp)
movzbl -0x105ec(%rbp),%eax
mov    %eax,-0x1066c(%rbp)
sub    $0x26,%eax
je     19a3 <main+0x843>
jmp    1967 <main+0x807>
mov    -0x1066c(%rbp),%eax
sub    $0x40,%eax
jne    19d1 <main+0x871>
jmp    197b <main+0x81b>
mov    -0x10654(%rbp),%esi
lea    0x6e0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10650(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10650(%rbp)
jmp    19e6 <main+0x886>
mov    -0x10658(%rbp),%esi
mov    -0x10654(%rbp),%edx
lea    0x6b8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10650(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10650(%rbp)
jmp    19e6 <main+0x886>
movzbl -0x105ec(%rbp),%esi
lea    0x699(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19eb <main+0x88b>
movslq -0x10660(%rbp),%rax
movzbl -0x5e0(%rbp,%rax,1),%eax
ff
cmp    $0x80,%eax
jl     1927 <main+0x7c7>
jmp    1a22 <main+0x8c2>
movl   $0x0,-0x10650(%rbp)
lea    0x660(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x62e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10650(%rbp),%eax
add    -0x10644(%rbp),%eax
mov    %eax,-0x10644(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    123b <main+0xdb>
jmp    1a51 <main+0x8f1>
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     175c <main+0x5dc>
mov    %rax,%rbx
movabs $0xffffffff00000000,%r12
ff ff ff
movabs $0x100000000,%r13
mov    0x2e1d(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1090 <fseek@plt>
mov    %rbx,%rdi
call   1070 <ftell@plt>
mov    %eax,%ebp
mov    0x2df0(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1090 <fseek@plt>
lea    0x70(%rsp),%rdi
mov    %ebp,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fread@plt>
lea    0xe29(%rip),%rdi
call   1040 <puts@plt>
mov    $0x400,%r14d
jmp    124d <main+0xcd>
xor    %r15d,%r15d
lea    0xe06(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movabs $0xffffffff00000000,%r12
ff ff ff
mov    0x1c(%rsp),%r14d
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    %r15d,%r14d
lea    0xdb9(%rip),%rdi
mov    %r14d,0x1c(%rsp)
mov    %r14d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x20(%rsp),%rdi
call   1080 <gets@plt>
movl   $0x0,0xc(%rsp)
xor    %r10d,%r10d
movl   $0x0,0x10(%rsp)
xor    %r14d,%r14d
jmp    12ad <main+0x12d>
mov    0xc(%rsp),%eax
add    $0x1,%al
mov    %eax,0xc(%rsp)
xor    %r12d,%r12d
mov    %r10d,0x10(%rsp)
xor    %r14d,%r14d
test   %r12b,%r12b
movabs $0xffffffff00000000,%r12
ff ff ff
jne    16c0 <main+0x540>
movslq %r14d,%rdx
mov    %rdx,%rax
shl    $0x20,%rax
add    %r12,%rax
lea    (%rsp,%rdx,1),%rbp
add    $0x20,%rbp
lea    0x1(%rdx),%edi
lea    0x2(%rdx),%ebx
add    $0x3,%edx
nopl   0x0(%rax,%rax,1)
mov    %r14d,%r11d
mov    %edi,%r8d
mov    %ebx,%ecx
mov    %edx,%r15d
movzbl 0x0(%rbp),%esi
add    %r13,%rax
lea    0x1(%r11),%r14d
add    $0x1,%rbp
lea    0x1(%r8),%edi
lea    0x1(%rcx),%ebx
lea    0x1(%r15),%edx
cmp    $0x20,%sil
je     12d0 <main+0x150>
lea    -0x61(%rsi),%ebp
mov    %esi,%edx
and    $0xdf,%dl
movslq %r10d,%rdi
lea    (%rsp,%rdi,1),%rbx
add    $0x70,%rbx
shl    $0x20,%rdi
add    %r12,%rdi
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r10d,%eax
movzbl (%rbx),%r9d
add    %r13,%rdi
lea    0x1(%rax),%r10d
add    $0x1,%rbx
cmp    $0x20,%r9d
je     1320 <main+0x1a0>
cmp    $0x1a,%bpl
movzbl %dl,%edx
movzbl %sil,%esi
cmovb  %edx,%esi
lea    -0x1(%r14),%ebp
mov    %r9d,%edx
and    $0x7f,%edx
mov    %r9d,%r12d
and    $0x80,%r12b
cmp    $0x26,%edx
je     1410 <main+0x290>
cmp    $0x40,%edx
jne    15b0 <main+0x430>
lea    -0x30(%rsi),%eax
cmp    $0xa,%al
jb     1381 <main+0x201>
lea    -0x41(%rsi),%eax
cmp    $0x5,%al
ja     161b <main+0x49b>
add    $0xc9,%sil
mov    %esi,%eax
movslq %r11d,%rcx
lea    0x21(%rsp),%rdx
add    %rcx,%rdx
shl    $0x20,%rcx
mov    %r8d,%r14d
movzbl (%rdx),%esi
add    %r13,%rcx
add    $0x1,%r11d
add    $0x1,%rdx
lea    0x1(%r14),%r8d
cmp    $0x20,%sil
je     1390 <main+0x210>
movzbl %al,%edi
lea    -0x61(%rsi),%eax
movzbl %sil,%edx
and    $0xdf,%sil
cmp    $0x1a,%al
movzbl %sil,%ecx
cmovae %edx,%ecx
lea    -0x30(%rcx),%eax
cmp    $0xa,%al
jb     13d9 <main+0x259>
lea    -0x41(%rcx),%eax
cmp    $0x5,%al
ja     1620 <main+0x4a0>
add    $0xc9,%cl
mov    %ecx,%eax
movslq %r14d,%rcx
lea    0x21(%rsp),%rdx
add    %rdx,%rcx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r14d
cmpb   $0x20,(%rcx)
lea    0x1(%rcx),%rcx
je     13f0 <main+0x270>
movzbl %al,%eax
shl    $0x4,%edi
add    %eax,%edi
jmp    1627 <main+0x4a7>
nopw   0x0(%rax,%rax,1)
lea    -0x30(%rsi),%eax
cmp    $0xa,%al
jb     1432 <main+0x2b2>
lea    -0x41(%rsi),%eax
xor    %ebx,%ebx
movl   $0x0,0x14(%rsp)
cmp    $0x5,%al
ja     166a <main+0x4ea>
add    $0xc9,%sil
mov    %esi,%eax
movzbl %al,%eax
mov    %eax,0x14(%rsp)
movslq %r11d,%rsi
lea    0x21(%rsp),%rax
add    %rsi,%rax
shl    $0x20,%rsi
nopl   0x0(%rax,%rax,1)
mov    %r8d,%r14d
mov    %ecx,%edi
mov    %r15d,%edx
movzbl (%rax),%ebp
add    %r13,%rsi
add    $0x1,%r11d
add    $0x1,%rax
lea    0x1(%r14),%r8d
lea    0x1(%rdi),%ecx
lea    0x1(%rdx),%r15d
cmp    $0x20,%bpl
je     1450 <main+0x2d0>
lea    -0x61(%rbp),%eax
movzbl %bpl,%ecx
and    $0xdf,%bpl
cmp    $0x1a,%al
movzbl %bpl,%eax
cmovae %ecx,%eax
lea    -0x30(%rax),%ecx
cmp    $0xa,%cl
jb     14a5 <main+0x325>
lea    -0x41(%rax),%ecx
xor    %ebx,%ebx
cmp    $0x5,%cl
ja     1652 <main+0x4d2>
add    $0xc9,%al
mov    %eax,%ecx
mov    0x14(%rsp),%eax
shl    $0x4,%eax
movzbl %cl,%ecx
add    %eax,%ecx
mov    %ecx,0x14(%rsp)
movslq %r14d,%rax
lea    0x21(%rsp),%rcx
lea    (%rcx,%rax,1),%rsi
shl    $0x20,%rax
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edi,%ebp
mov    %edx,%ecx
movzbl (%rsi),%ebx
add    %r13,%rax
add    $0x1,%r14d
add    $0x1,%rsi
lea    0x1(%rbp),%edi
lea    0x1(%rcx),%edx
cmp    $0x20,%bl
je     14d0 <main+0x350>
lea    -0x61(%rbx),%eax
movzbl %bl,%edx
and    $0xdf,%bl
cmp    $0x1a,%al
movzbl %bl,%eax
cmovae %edx,%eax
lea    -0x30(%rax),%edx
cmp    $0xa,%dl
jb     1518 <main+0x398>
lea    -0x41(%rax),%edx
xor    %ebx,%ebx
cmp    $0x5,%dl
ja     1667 <main+0x4e7>
add    $0xc9,%al
mov    %eax,%edx
movzbl %dl,%ebx
movslq %ebp,%rax
lea    0x21(%rsp),%rdx
add    %rax,%rdx
shl    $0x20,%rax
nopw   0x0(%rax,%rax,1)
mov    %ecx,%r14d
movzbl (%rdx),%esi
add    %r13,%rax
add    $0x1,%ebp
add    $0x1,%rdx
lea    0x1(%r14),%ecx
cmp    $0x20,%sil
je     1530 <main+0x3b0>
lea    -0x61(%rsi),%eax
movzbl %sil,%ecx
and    $0xdf,%sil
cmp    $0x1a,%al
movzbl %sil,%eax
cmovae %ecx,%eax
lea    -0x30(%rax),%ecx
cmp    $0xa,%cl
jb     1576 <main+0x3f6>
lea    -0x41(%rax),%ecx
cmp    $0x5,%cl
ja     166a <main+0x4ea>
add    $0xc9,%al
mov    %eax,%ecx
mov    %ebx,%eax
shl    $0x4,%eax
movzbl %cl,%ebx
add    %eax,%ebx
movslq %r14d,%rax
lea    0x21(%rsp),%rcx
add    %rcx,%rax
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14d
cmpb   $0x20,(%rax)
lea    0x1(%rax),%rax
je     1590 <main+0x410>
jmp    1670 <main+0x4f0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    %dl,%sil
jne    15e2 <main+0x462>
test   %r9b,%r9b
jns    129a <main+0x11a>
movslq %r8d,%rax
add    %rsp,%rax
add    $0x20,%rax
nopl   0x0(%rax,%rax,1)
movzbl (%rax),%ecx
cmp    $0x20,%cl
jne    1657 <main+0x4d7>
add    $0x1,%r8d
add    $0x1,%rax
jmp    15d0 <main+0x450>
movslq %eax,%rcx
add    %rsp,%rcx
add    $0x70,%rcx
nopl   0x0(%rax)
add    $0x1,%eax
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jns    15f0 <main+0x470>
xor    %r12d,%r12d
mov    0xc(%rsp),%ecx
inc    %cl
je     121c <main+0x9c>
mov    %ecx,0xc(%rsp)
mov    %eax,%r10d
mov    %eax,0x10(%rsp)
jmp    1297 <main+0x117>
xor    %edi,%edi
mov    %ebp,%r11d
add    $0xffffffff,%r11d
mov    %r11d,%r14d
test   %r9b,%r9b
mov    %edi,0x18(%rsp)
jns    129a <main+0x11a>
movslq %r14d,%rax
add    %rsp,%rax
add    $0x20,%rax
xchg   %ax,%ax
movzbl (%rax),%ecx
cmp    $0x20,%cl
jne    16b0 <main+0x530>
add    $0x1,%r14d
add    $0x1,%rax
jmp    1640 <main+0x4c0>
mov    %r11d,%ebp
jmp    166a <main+0x4ea>
test   %cl,%cl
jne    1285 <main+0x105>
mov    %r8d,%r14d
jmp    129a <main+0x11a>
mov    %r14d,%ebp
add    $0xffffffff,%ebp
mov    %ebp,%r14d
test   %r9b,%r9b
mov    %ebx,0x18(%rsp)
jns    129a <main+0x11a>
movslq %r14d,%rax
add    %rsp,%rax
add    $0x20,%rax
nopw   0x0(%rax,%rax,1)
movzbl (%rax),%ecx
cmp    $0x20,%cl
jne    16b0 <main+0x530>
add    $0x1,%r14d
add    $0x1,%rax
jmp    1690 <main+0x510>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %cl,%cl
jne    1285 <main+0x105>
jmp    129a <main+0x11a>
nopl   (%rax)
mov    0x10(%rsp),%ebx
add    $0xffffffff,%ebx
movzbl 0xc(%rsp),%esi
lea    0x941(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movslq %ebx,%rbp
lea    0x71(%rsp),%rax
add    %rax,%rbp
mov    $0x1,%r15d
mov    0x1c(%rsp),%r14d
jmp    1711 <main+0x591>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
call   1030 <putchar@plt>
add    $0x1,%rbp
test   %bl,%bl
js     1240 <main+0xc0>
movzbl 0x0(%rbp),%ebx
mov    %ebx,%edi
and    $0x7f,%edi
cmp    $0x26,%edi
je     1740 <main+0x5c0>
cmp    $0x40,%edi
jne    1700 <main+0x580>
lea    0x8f1(%rip),%rdi
mov    0x18(%rsp),%esi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r15d
jmp    1705 <main+0x585>
nopl   0x0(%rax)
lea    0x8db(%rip),%rdi
mov    0x14(%rsp),%esi
mov    0x18(%rsp),%edx
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x2,%r15d
jmp    1705 <main+0x585>
lea    0x8ef(%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 = [27 x i8] c">0400[\0A(press ^C to stop)\0A\00"
@.str.4 = [7 x i8] c"%04x: \00"
@.str.5 = [8 x i8] c"[%02x] \00"
@.str.6 = [6 x i8] c"$%02x\00"
@.str.7 = [10 x i8] c"$%02x%02x\00"
@.str.8 = [3 x i8] c"%c\00"
@.str.9 = [12 x i8] c"***ERROR***\00"
@.str.10 = [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 [2 x 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 %436
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 ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
store i32 1024, i32* %12
br label %39
39: ; preds = %434, %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 = %375, %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 %317 [
i32 64, label %100
i32 38, label %204
]
100: ; preds = %83
%101 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 1
store i32 0, i32* %101
store i8 0, i8* %6
br label %102
102: ; preds = %172, %100
%103 = load i8, i8* %6
%104 = zext i8 %103 to i32
%105 = icmp slt i32 %104, 2
br i1 %105, label %106, label %175
106: ; preds = %102
%107 = load i8, i8* %5
%108 = zext i8 %107 to i32
%109 = sub nsw i32 %108, 48
%110 = trunc i32 %109 to i8
store i8 %110, i8* %5
%111 = load i8, i8* %5
%112 = zext i8 %111 to i32
%113 = icmp sge i32 %112, 0
br i1 %113, label %114, label %119
114: ; preds = %106
%115 = load i8, i8* %5
%116 = zext i8 %115 to i32
%117 = icmp slt i32 %116, 10
br i1 %117, label %118, label %119
118: ; preds = %114
br label %136
119: ; preds = %114, %106
%120 = load i8, i8* %5
%121 = zext i8 %120 to i32
%122 = icmp sge i32 %121, 17
br i1 %122, label %123, label %132
123: ; preds = %119
%124 = load i8, i8* %5
%125 = zext i8 %124 to i32
%126 = icmp sle i32 %125, 22
br i1 %126, label %127, label %132
127: ; preds = %123
%128 = load i8, i8* %5
%129 = zext i8 %128 to i32
%130 = sub nsw i32 %129, 7
%131 = trunc i32 %130 to i8
store i8 %131, i8* %5
br label %135
132: ; preds = %123, %119
store i8 -1, i8* %5
%133 = load i32, i32* %19
%134 = add nsw i32 %133, -1
store i32 %134, i32* %19
br label %175
135: ; preds = %127
br label %136
136: ; preds = %135, %118
%137 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 1
%138 = load i32, i32* %137
%139 = mul nsw i32 %138, 16
store i32 %139, i32* %137
%140 = load i8, i8* %5
%141 = zext i8 %140 to i32
%142 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 1
%143 = load i32, i32* %142
%144 = add nsw i32 %143, %141
store i32 %144, i32* %142
br label %145
145: ; preds = %153, %136
%146 = load i32, i32* %19
%147 = add nsw i32 %146, 1
store i32 %147, i32* %19
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %148
%150 = load i8, i8* %149
%151 = sext i8 %150 to i32
%152 = icmp eq i32 %151, 32
br i1 %152, label %153, label %154
153: ; preds = %145
br label %145
154: ; preds = %145
%155 = load i32, i32* %19
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %156
%158 = load i8, i8* %157
store i8 %158, i8* %5
%159 = load i8, i8* %5
%160 = zext i8 %159 to i32
%161 = icmp sge i32 %160, 97
br i1 %161, label %162, label %171
162: ; preds = %154
%163 = load i8, i8* %5
%164 = zext i8 %163 to i32
%165 = icmp sle i32 %164, 122
br i1 %165, label %166, label %171
166: ; preds = %162
%167 = load i8, i8* %5
%168 = zext i8 %167 to i32
%169 = and i32 %168, 223
%170 = trunc i32 %169 to i8
store i8 %170, i8* %5
br label %171
171: ; preds = %166, %162, %154
br label %172
172: ; preds = %171
%173 = load i8, i8* %6
%174 = add i8 %173, 1
store i8 %174, i8* %6
br label %102
175: ; preds = %132, %102
%176 = load i32, i32* %17
%177 = add nsw i32 %176, 1
store i32 %177, i32* %17
%178 = load i8, i8* %9
%179 = zext i8 %178 to i32
%180 = icmp eq i32 %179, 128
br i1 %180, label %181, label %203
181: ; preds = %175
br label %182
182: ; preds = %189, %181
%183 = load i32, i32* %19
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %184
%186 = load i8, i8* %185
%187 = sext i8 %186 to i32
%188 = icmp eq i32 %187, 32
br i1 %188, label %189, label %192
189: ; preds = %182
%190 = load i32, i32* %19
%191 = add nsw i32 %190, 1
store i32 %191, i32* %19
br label %182
192: ; preds = %182
%193 = load i32, i32* %19
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %194
%196 = load i8, i8* %195
%197 = icmp ne i8 %196, 0
br i1 %197, label %198, label %202
198: ; preds = %192
%199 = load i32, i32* %17
store i32 %199, i32* %18
%200 = load i8, i8* %7
%201 = add i8 %200, 1
store i8 %201, i8* %7
store i32 0, i32* %19
store i8 0, i8* %9
br label %202
202: ; preds = %198, %192
br label %203
203: ; preds = %202, %175
br label %374
204: ; preds = %83
%205 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 0
store i32 0, i32* %205
%206 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 1
store i32 0, i32* %206
store i8 0, i8* %6
br label %207
207: ; preds = %285, %204
%208 = load i8, i8* %6
%209 = zext i8 %208 to i32
%210 = icmp slt i32 %209, 4
br i1 %210, label %211, label %288
211: ; preds = %207
%212 = load i8, i8* %5
%213 = zext i8 %212 to i32
%214 = sub nsw i32 %213, 48
%215 = trunc i32 %214 to i8
store i8 %215, i8* %5
%216 = load i8, i8* %5
%217 = zext i8 %216 to i32
%218 = icmp sge i32 %217, 0
br i1 %218, label %219, label %224
219: ; preds = %211
%220 = load i8, i8* %5
%221 = zext i8 %220 to i32
%222 = icmp slt i32 %221, 10
br i1 %222, label %223, label %224
223: ; preds = %219
br label %241
224: ; preds = %219, %211
%225 = load i8, i8* %5
%226 = zext i8 %225 to i32
%227 = icmp sge i32 %226, 17
br i1 %227, label %228, label %237
228: ; preds = %224
%229 = load i8, i8* %5
%230 = zext i8 %229 to i32
%231 = icmp sle i32 %230, 22
br i1 %231, label %232, label %237
232: ; preds = %228
%233 = load i8, i8* %5
%234 = zext i8 %233 to i32
%235 = sub nsw i32 %234, 7
%236 = trunc i32 %235 to i8
store i8 %236, i8* %5
br label %240
237: ; preds = %228, %224
store i8 -1, i8* %5
%238 = load i32, i32* %19
%239 = add nsw i32 %238, -1
store i32 %239, i32* %19
br label %288
240: ; preds = %232
br label %241
241: ; preds = %240, %223
%242 = load i8, i8* %6
%243 = zext i8 %242 to i32
%244 = sdiv i32 %243, 2
%245 = sext i32 %244 to i64
%246 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 %245
%247 = load i32, i32* %246
%248 = mul nsw i32 %247, 16
store i32 %248, i32* %246
%249 = load i8, i8* %5
%250 = zext i8 %249 to i32
%251 = load i8, i8* %6
%252 = zext i8 %251 to i32
%253 = sdiv i32 %252, 2
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 %254
%256 = load i32, i32* %255
%257 = add nsw i32 %256, %250
store i32 %257, i32* %255
br label %258
258: ; preds = %266, %241
%259 = load i32, i32* %19
%260 = add nsw i32 %259, 1
store i32 %260, i32* %19
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %261
%263 = load i8, i8* %262
%264 = sext i8 %263 to i32
%265 = icmp eq i32 %264, 32
br i1 %265, label %266, label %267
266: ; preds = %258
br label %258
267: ; preds = %258
%268 = load i32, i32* %19
%269 = sext i32 %268 to i64
%270 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %269
%271 = load i8, i8* %270
store i8 %271, i8* %5
%272 = load i8, i8* %5
%273 = zext i8 %272 to i32
%274 = icmp sge i32 %273, 97
br i1 %274, label %275, label %284
275: ; preds = %267
%276 = load i8, i8* %5
%277 = zext i8 %276 to i32
%278 = icmp sle i32 %277, 122
br i1 %278, label %279, label %284
279: ; preds = %275
%280 = load i8, i8* %5
%281 = zext i8 %280 to i32
%282 = and i32 %281, 223
%283 = trunc i32 %282 to i8
store i8 %283, i8* %5
br label %284
284: ; preds = %279, %275, %267
br label %285
285: ; preds = %284
%286 = load i8, i8* %6
%287 = add i8 %286, 1
store i8 %287, i8* %6
br label %207
288: ; preds = %237, %207
%289 = load i32, i32* %17
%290 = add nsw i32 %289, 1
store i32 %290, i32* %17
%291 = load i8, i8* %9
%292 = zext i8 %291 to i32
%293 = icmp eq i32 %292, 128
br i1 %293, label %294, label %316
294: ; preds = %288
br label %295
295: ; preds = %302, %294
%296 = load i32, i32* %19
%297 = sext i32 %296 to i64
%298 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %297
%299 = load i8, i8* %298
%300 = sext i8 %299 to i32
%301 = icmp eq i32 %300, 32
br i1 %301, label %302, label %305
302: ; preds = %295
%303 = load i32, i32* %19
%304 = add nsw i32 %303, 1
store i32 %304, i32* %19
br label %295
305: ; preds = %295
%306 = load i32, i32* %19
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %307
%309 = load i8, i8* %308
%310 = icmp ne i8 %309, 0
br i1 %310, label %311, label %315
311: ; preds = %305
%312 = load i32, i32* %17
store i32 %312, i32* %18
%313 = load i8, i8* %7
%314 = add i8 %313, 1
store i8 %314, i8* %7
store i32 0, i32* %19
store i8 0, i8* %9
br label %315
315: ; preds = %311, %305
br label %316
316: ; preds = %315, %288
br label %374
317: ; preds = %83
%318 = load i8, i8* %5
%319 = zext i8 %318 to i32
%320 = load i8, i8* %8
%321 = zext i8 %320 to i32
%322 = icmp ne i32 %319, %321
br i1 %322, label %323, label %342
323: ; preds = %317
br label %324
324: ; preds = %332, %323
%325 = load i32, i32* %17
%326 = add nsw i32 %325, 1
store i32 %326, i32* %17
%327 = sext i32 %325 to i64
%328 = getelementptr inbounds [1500 x i8], [1500 x i8]* %2, i64 0, i64 %327
%329 = load i8, i8* %328
%330 = zext i8 %329 to i32
%331 = icmp slt i32 %330, 128
br i1 %331, label %332, label %333
332: ; preds = %324
br label %324
333: ; preds = %324
%334 = load i32, i32* %17
store i32 %334, i32* %18
%335 = load i8, i8* %7
%336 = add i8 %335, 1
store i8 %336, i8* %7
%337 = load i8, i8* %7
%338 = icmp ne i8 %337, 0
br i1 %338, label %340, label %339
339: ; preds = %333
store i8 1, i8* %9
br label %341
340: ; preds = %333
store i32 0, i32* %19
store i8 0, i8* %9
br label %341
341: ; preds = %340, %339
br label %373
342: ; preds = %317
%343 = load i32, i32* %19
%344 = add nsw i32 %343, 1
store i32 %344, i32* %19
%345 = load i32, i32* %17
%346 = add nsw i32 %345, 1
store i32 %346, i32* %17
%347 = load i8, i8* %9
%348 = zext i8 %347 to i32
%349 = icmp eq i32 %348, 128
br i1 %349, label %350, label %372
350: ; preds = %342
br label %351
351: ; preds = %358, %350
%352 = load i32, i32* %19
%353 = sext i32 %352 to i64
%354 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %353
%355 = load i8, i8* %354
%356 = sext i8 %355 to i32
%357 = icmp eq i32 %356, 32
br i1 %357, label %358, label %361
358: ; preds = %351
%359 = load i32, i32* %19
%360 = add nsw i32 %359, 1
store i32 %360, i32* %19
br label %351
361: ; preds = %351
%362 = load i32, i32* %19
%363 = sext i32 %362 to i64
%364 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 %363
%365 = load i8, i8* %364
%366 = icmp ne i8 %365, 0
br i1 %366, label %367, label %371
367: ; preds = %361
%368 = load i32, i32* %17
store i32 %368, i32* %18
%369 = load i8, i8* %7
%370 = add i8 %369, 1
store i8 %370, i8* %7
store i32 0, i32* %19
store i8 0, i8* %9
br label %371
371: ; preds = %367, %361
br label %372
372: ; preds = %371, %342
br label %373
373: ; preds = %372, %341
br label %374
374: ; preds = %373, %316, %203
br label %375
375: ; preds = %374
%376 = load i8, i8* %9
%377 = icmp ne i8 %376, 0
%378 = xor i1 %377, true
br i1 %378, label %44, label %379
379: ; preds = %375
%380 = load i8, i8* %9
%381 = zext i8 %380 to i32
%382 = icmp eq i32 %381, 128
br i1 %382, label %383, label %427
383: ; preds = %379
%384 = load i32, i32* %18
%385 = add nsw i32 %384, -1
store i32 %385, i32* %18
store i32 1, i32* %15
%386 = load i8, i8* %7
%387 = zext i8 %386 to i32
%388 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 %387)
br label %389
389: ; preds = %419, %383
%390 = load i32, i32* %18
%391 = add nsw i32 %390, 1
store i32 %391, i32* %18
%392 = sext i32 %391 to i64
%393 = getelementptr inbounds [1500 x i8], [1500 x i8]* %2, i64 0, i64 %392
%394 = load i8, i8* %393
%395 = zext i8 %394 to i32
%396 = and i32 %395, 127
%397 = trunc i32 %396 to i8
store i8 %397, i8* %8
%398 = load i8, i8* %8
%399 = zext i8 %398 to i32
switch i32 %399, label %414 [
i32 64, label %400
i32 38, label %406
]
400: ; preds = %389
%401 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 1
%402 = load i32, i32* %401
%403 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 %402)
%404 = load i32, i32* %15
%405 = add nsw i32 %404, 1
store i32 %405, i32* %15
br label %418
406: ; preds = %389
%407 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 0
%408 = load i32, i32* %407
%409 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 1
%410 = load i32, i32* %409
%411 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 %408, i32 %410)
%412 = load i32, i32* %15
%413 = add nsw i32 %412, 2
store i32 %413, i32* %15
br label %418
414: ; preds = %389
%415 = load i8, i8* %8
%416 = zext i8 %415 to i32
%417 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 %416)
br label %418
418: ; preds = %414, %406, %400
br label %419
419: ; preds = %418
%420 = load i32, i32* %18
%421 = sext i32 %420 to i64
%422 = getelementptr inbounds [1500 x i8], [1500 x i8]* %2, i64 0, i64 %421
%423 = load i8, i8* %422
%424 = zext i8 %423 to i32
%425 = icmp slt i32 %424, 128
br i1 %425, label %389, label %426
426: ; preds = %419
br label %429
427: ; preds = %379
store i32 0, i32* %15
%428 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0))
br label %429
429: ; preds = %427, %426
%430 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%431 = load i32, i32* %15
%432 = load i32, i32* %12
%433 = add nsw i32 %432, %431
store i32 %433, i32* %12
br label %434
434: ; preds = %429
br i1 true, label %39, label %435
435: ; preds = %434
store i32 0, i32* %1
br label %436
436: ; preds = %435, %23
%437 = load i32, i32* %1
ret i32 %437
}

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