void DisassembleCH8(unsigned char *buffer, int pc) {
  unsigned char *code = &buffer[pc];
  unsigned char firstNibble = (code[0] >> 4);
  printf("%04x %02x %02x ", pc, code[0], code[1]);
  unsigned char secondNib = code[0] & 0x0f;
  unsigned char thirdNib = code[1] >> 4;
  unsigned char lastNib = code[1] & 0x0f;
  switch (firstNibble) {
  case 0x00:
    if (code[0] == 0x00 && code[1] == 0xE0) {
      printf("CLS");
    } else if (code[0] == 0x00 && code[1] == 0xee) {
      printf("RET");
    } else {
      printf("SYS %01x%02x", secondNib, code[1]);
    }
    break;
  case 0x01: {
    printf("JMP %01x%02x", secondNib, code[1]);
  } break;
  case 0x02: {
    printf("JSR %01x%02x", secondNib, code[1]);
  } break;
  case 0x03:
    printf("SE V%01x %02x", secondNib, code[1]);
    break;
  case 0x04:
    printf("SNE V%01x %02x", secondNib, code[1]);
    break;
  case 0x05:
    printf("SE V%01x V%01x", secondNib, code[1]);
    break;
  case 0x06: {
    printf("MOV V%01x %02x", secondNib, code[1]);
  } break;
  case 0x07:
    printf("ADD V%01x %02x", secondNib, code[1]);
    break;
  case 0x08: {
    switch (lastNib) {
    case 0:
      printf("MOV V%01x V%01x", secondNib, thirdNib);
      break;
    case 1:
      printf("OR V%01x V%01x", secondNib, thirdNib);
      break;
    case 2:
      printf("AND V%01x V%01x", secondNib, thirdNib);
      break;
    case 3:
      printf("XOR V%01x V%01x", secondNib, thirdNib);
      break;
    case 4:
      printf("ADD V%01x V%01x", secondNib, thirdNib);
      break;
    case 5:
      printf("SUB V%01x V%01x", secondNib, thirdNib);
      break;
    case 6:
      printf("SHR V%01x V%01x", secondNib, thirdNib);
      break;
    case 7:
      printf("SUBN V%01x V%01x", secondNib, thirdNib);
      break;
    case 0xe:
      printf("SHL V%01x V%01x", secondNib, thirdNib);
      break;
    }
  } break;
  case 0x09:
    printf("SNE %01x %01x", secondNib, code[1]);
    break;
  case 0x0a: {
    printf("MVI %01x%02x", secondNib, code[1]);
  } break;
  case 0x0b:
    printf("JMP V0 %02x", code[1]);
    break;
  case 0x0c:
    printf("RND %02x", code[1]);
    break;
  case 0x0d:
    printf("DRW V%01x V%01x %01x", secondNib, thirdNib, lastNib);
    break;
  case 0x0e:
    switch (code[1]) {
    case 0x9e:
      printf("SKP V%01x", secondNib);
      break;
    case 0xa1:
      printf("SKNP V%01x", secondNib);
      break;
    }
    break;
  case 0x0f:
    switch (code[1]) {
    case 0x07:
      printf("MOV V%01x DT", secondNib);
      break;
    case 0x0A:
      printf("MOV V%01x K", secondNib);
      break;
    case 0x15:
      printf("MOV DT V%01x", secondNib);
      break;
    case 0x18:
      printf("MOV ST V%01x", secondNib);
      break;
    case 0x1e:
      printf("ADD I V%01x", secondNib);
      break;
    case 0x29:
      printf("MOV I V%01x", secondNib);
      break;
    case 0x33:
      printf("MOV B V%01x", secondNib);
      break;
    case 0x55:
      printf("MOV [I] V%01x", secondNib);
      break;
    case 0x65:
      printf("MOV V%01x [I]", secondNib);
      break;
    }
    break;
  }
}


x86 assembly (clang, -O0):
<DisassembleCH8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
shr    $0x4,%eax
mov    %al,-0x19(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rax
movzbl (%rax),%edx
movzbl 0x1(%rax),%ecx
lea    0xf2c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%al
and    $0xf,%al
mov    %al,-0x1a(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
shr    $0x4,%eax
mov    %al,-0x1b(%rbp)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%al
and    $0xf,%al
mov    %al,-0x1c(%rbp)
movzbl -0x19(%rbp),%eax
mov    %rax,-0x28(%rbp)
sub    $0xf,%rax
ja     1683 <DisassembleCH8+0x573>
mov    -0x28(%rbp),%rax
lea    0xe67(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
jne    11d8 <DisassembleCH8+0xc8>
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0xe0,%eax
jne    11d8 <DisassembleCH8+0xc8>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122d <DisassembleCH8+0x11d>
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
jne    120e <DisassembleCH8+0xfe>
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0xee,%eax
jne    120e <DisassembleCH8+0xfe>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1228 <DisassembleCH8+0x118>
movzbl -0x1a(%rbp),%esi
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%edx
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122d <DisassembleCH8+0x11d>
jmp    1683 <DisassembleCH8+0x573>
movzbl -0x1a(%rbp),%esi
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%edx
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
movzbl -0x1a(%rbp),%esi
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%edx
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
movzbl -0x1a(%rbp),%esi
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%edx
lea    0xe38(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
movzbl -0x1a(%rbp),%esi
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%edx
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
movzbl -0x1a(%rbp),%esi
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%edx
lea    0xe17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
movzbl -0x1a(%rbp),%esi
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%edx
lea    0xe07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
movzbl -0x1a(%rbp),%esi
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%edx
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
movzbl -0x1c(%rbp),%eax
mov    %rax,-0x30(%rbp)
sub    $0xe,%rax
ja     141f <DisassembleCH8+0x30f>
mov    -0x30(%rbp),%rax
lea    0xd18(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movzbl -0x1a(%rbp),%esi
movzbl -0x1b(%rbp),%edx
lea    0xdc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    141f <DisassembleCH8+0x30f>
movzbl -0x1a(%rbp),%esi
movzbl -0x1b(%rbp),%edx
lea    0xdcb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    141f <DisassembleCH8+0x30f>
movzbl -0x1a(%rbp),%esi
movzbl -0x1b(%rbp),%edx
lea    0xd9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    141f <DisassembleCH8+0x30f>
movzbl -0x1a(%rbp),%esi
movzbl -0x1b(%rbp),%edx
lea    0xd94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    141f <DisassembleCH8+0x30f>
movzbl -0x1a(%rbp),%esi
movzbl -0x1b(%rbp),%edx
lea    0xd89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    141f <DisassembleCH8+0x30f>
movzbl -0x1a(%rbp),%esi
movzbl -0x1b(%rbp),%edx
lea    0xd7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    141f <DisassembleCH8+0x30f>
movzbl -0x1a(%rbp),%esi
movzbl -0x1b(%rbp),%edx
lea    0xd73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    141f <DisassembleCH8+0x30f>
movzbl -0x1a(%rbp),%esi
movzbl -0x1b(%rbp),%edx
lea    0xd68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    141f <DisassembleCH8+0x30f>
movzbl -0x1a(%rbp),%esi
movzbl -0x1b(%rbp),%edx
lea    0xd5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
movzbl -0x1a(%rbp),%esi
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%edx
lea    0xd4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
movzbl -0x1a(%rbp),%esi
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%edx
lea    0xd3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%esi
lea    0xd30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%esi
lea    0xd21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
movzbl -0x1a(%rbp),%esi
movzbl -0x1b(%rbp),%edx
movzbl -0x1c(%rbp),%ecx
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    %eax,-0x34(%rbp)
sub    $0x9e,%eax
je     14e5 <DisassembleCH8+0x3d5>
jmp    14d2 <DisassembleCH8+0x3c2>
mov    -0x34(%rbp),%eax
sub    $0xa1,%eax
je     14fc <DisassembleCH8+0x3ec>
jmp    150e <DisassembleCH8+0x3fe>
movzbl -0x1a(%rbp),%esi
lea    0xcdb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    150e <DisassembleCH8+0x3fe>
movzbl -0x1a(%rbp),%esi
lea    0xcce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    %eax,-0x38(%rbp)
sub    $0x7,%eax
je     15b4 <DisassembleCH8+0x4a4>
jmp    152c <DisassembleCH8+0x41c>
mov    -0x38(%rbp),%eax
sub    $0xa,%eax
je     15cb <DisassembleCH8+0x4bb>
jmp    153d <DisassembleCH8+0x42d>
mov    -0x38(%rbp),%eax
sub    $0x15,%eax
je     15e2 <DisassembleCH8+0x4d2>
jmp    154e <DisassembleCH8+0x43e>
mov    -0x38(%rbp),%eax
sub    $0x18,%eax
je     15f9 <DisassembleCH8+0x4e9>
jmp    155f <DisassembleCH8+0x44f>
mov    -0x38(%rbp),%eax
sub    $0x1e,%eax
je     1610 <DisassembleCH8+0x500>
jmp    1570 <DisassembleCH8+0x460>
mov    -0x38(%rbp),%eax
sub    $0x29,%eax
je     1627 <DisassembleCH8+0x517>
jmp    1581 <DisassembleCH8+0x471>
mov    -0x38(%rbp),%eax
sub    $0x33,%eax
je     163e <DisassembleCH8+0x52e>
jmp    1592 <DisassembleCH8+0x482>
mov    -0x38(%rbp),%eax
sub    $0x55,%eax
je     1655 <DisassembleCH8+0x545>
jmp    15a3 <DisassembleCH8+0x493>
mov    -0x38(%rbp),%eax
sub    $0x65,%eax
je     166c <DisassembleCH8+0x55c>
jmp    167e <DisassembleCH8+0x56e>
movzbl -0x1a(%rbp),%esi
lea    0xc21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    167e <DisassembleCH8+0x56e>
movzbl -0x1a(%rbp),%esi
lea    0xc17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    167e <DisassembleCH8+0x56e>
movzbl -0x1a(%rbp),%esi
lea    0xc0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    167e <DisassembleCH8+0x56e>
movzbl -0x1a(%rbp),%esi
lea    0xc02(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    167e <DisassembleCH8+0x56e>
movzbl -0x1a(%rbp),%esi
lea    0xbf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    167e <DisassembleCH8+0x56e>
movzbl -0x1a(%rbp),%esi
lea    0xbed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    167e <DisassembleCH8+0x56e>
movzbl -0x1a(%rbp),%esi
lea    0xbe2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    167e <DisassembleCH8+0x56e>
movzbl -0x1a(%rbp),%esi
lea    0xbd7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    167e <DisassembleCH8+0x56e>
movzbl -0x1a(%rbp),%esi
lea    0xbce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1683 <DisassembleCH8+0x573>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DisassembleCH8>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
movslq %esi,%rbx
movzbl (%rdi,%rbx,1),%r15d
movzbl 0x1(%rdi,%rbx,1),%ecx
lea    0x108c(%rip),%rdi
mov    %ebx,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1030 <printf@plt>
movzbl (%r14,%rbx,1),%r8d
mov    %r8d,%esi
and    $0xf,%esi
movzbl 0x1(%r14,%rbx,1),%edx
mov    %edx,%eax
shr    $0x4,%eax
mov    %edx,%edi
and    $0xf,%edi
shr    $0x4,%r15
lea    0xea2(%rip),%rbx
movslq (%rbx,%r15,4),%rcx
add    %rbx,%rcx
jmp    *%rcx
test   %r8b,%r8b
jne    12b2 <DisassembleCH8+0x1a2>
cmp    $0xe0,%dl
jne    12b2 <DisassembleCH8+0x1a2>
lea    0x1048(%rip),%rdi
jmp    12c3 <DisassembleCH8+0x1b3>
movzbl %sil,%esi
lea    0x104d(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
lea    0x104a(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
lea    0x1047(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
lea    0x1048(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
lea    0x104a(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
lea    0x104c(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
lea    0x104e(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
cmp    $0xe,%edi
ja     1300 <DisassembleCH8+0x1f0>
mov    %edi,%ecx
lea    0xf84(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
movzbl %sil,%esi
lea    0x1035(%rip),%rdi
mov    %eax,%edx
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
lea    0x10a7(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
lea    0x10a8(%rip),%rdi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printf@plt>
lea    0x10a2(%rip),%rdi
jmp    1244 <DisassembleCH8+0x134>
lea    0x10a5(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printf@plt>
movzbl %sil,%esi
movzbl %al,%edx
movzbl %dil,%ecx
lea    0x108e(%rip),%rdi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printf@plt>
cmp    $0xa1,%dl
je     12cf <DisassembleCH8+0x1bf>
cmp    $0x9e,%dl
jne    1300 <DisassembleCH8+0x1f0>
movzbl %sil,%esi
lea    0x107e(%rip),%rdi
jmp    1246 <DisassembleCH8+0x136>
lea    -0x7(%rdx),%eax
cmp    $0x4e,%al
ja     12eb <DisassembleCH8+0x1db>
movzbl %al,%eax
lea    0xda4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movzbl %sil,%esi
lea    0x106c(%rip),%rdi
jmp    1246 <DisassembleCH8+0x136>
test   %r8b,%r8b
jne    12df <DisassembleCH8+0x1cf>
cmp    $0xee,%dl
jne    12df <DisassembleCH8+0x1cf>
lea    0xf09(%rip),%rdi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printf@plt>
movzbl %sil,%esi
lea    0x1037(%rip),%rdi
jmp    1246 <DisassembleCH8+0x136>
lea    0xeea(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
cmp    $0x65,%dl
jne    1300 <DisassembleCH8+0x1f0>
movzbl %sil,%esi
lea    0x1086(%rip),%rdi
jmp    1246 <DisassembleCH8+0x136>
pop    %rbx
pop    %r14
pop    %r15
ret
movzbl %sil,%esi
movzbl %al,%edx
lea    0xf4e(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
movzbl %al,%edx
lea    0xf2a(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
movzbl %al,%edx
lea    0xf27(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
movzbl %al,%edx
lea    0xf24(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
movzbl %al,%edx
lea    0xf21(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
movzbl %al,%edx
lea    0xf1e(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
movzbl %al,%edx
lea    0xf1b(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
movzbl %al,%edx
lea    0xf19(%rip),%rdi
jmp    1228 <DisassembleCH8+0x118>
movzbl %sil,%esi
lea    0xf80(%rip),%rdi
jmp    1246 <DisassembleCH8+0x136>
movzbl %sil,%esi
lea    0xf7c(%rip),%rdi
jmp    1246 <DisassembleCH8+0x136>
movzbl %sil,%esi
lea    0xf79(%rip),%rdi
jmp    1246 <DisassembleCH8+0x136>
movzbl %sil,%esi
lea    0xf76(%rip),%rdi
jmp    1246 <DisassembleCH8+0x136>
movzbl %sil,%esi
lea    0xf72(%rip),%rdi
jmp    1246 <DisassembleCH8+0x136>
movzbl %sil,%esi
lea    0xf6e(%rip),%rdi
jmp    1246 <DisassembleCH8+0x136>
movzbl %sil,%esi
lea    0xf6a(%rip),%rdi
jmp    1246 <DisassembleCH8+0x136>

LLVM IR (-O0):
@.str = [16 x i8] c"%04x %02x %02x \00"
@.str.1 = [4 x i8] c"CLS\00"
@.str.2 = [4 x i8] c"RET\00"
@.str.3 = [13 x i8] c"SYS %01x%02x\00"
@.str.4 = [13 x i8] c"JMP %01x%02x\00"
@.str.5 = [13 x i8] c"JSR %01x%02x\00"
@.str.6 = [14 x i8] c"SE V%01x %02x\00"
@.str.7 = [15 x i8] c"SNE V%01x %02x\00"
@.str.8 = [15 x i8] c"SE V%01x V%01x\00"
@.str.9 = [15 x i8] c"MOV V%01x %02x\00"
@.str.10 = [15 x i8] c"ADD V%01x %02x\00"
@.str.11 = [16 x i8] c"MOV V%01x V%01x\00"
@.str.12 = [15 x i8] c"OR V%01x V%01x\00"
@.str.13 = [16 x i8] c"AND V%01x V%01x\00"
@.str.14 = [16 x i8] c"XOR V%01x V%01x\00"
@.str.15 = [16 x i8] c"ADD V%01x V%01x\00"
@.str.16 = [16 x i8] c"SUB V%01x V%01x\00"
@.str.17 = [16 x i8] c"SHR V%01x V%01x\00"
@.str.18 = [17 x i8] c"SUBN V%01x V%01x\00"
@.str.19 = [16 x i8] c"SHL V%01x V%01x\00"
@.str.20 = [14 x i8] c"SNE %01x %01x\00"
@.str.21 = [13 x i8] c"MVI %01x%02x\00"
@.str.22 = [12 x i8] c"JMP V0 %02x\00"
@.str.23 = [9 x i8] c"RND %02x\00"
@.str.24 = [21 x i8] c"DRW V%01x V%01x %01x\00"
@.str.25 = [10 x i8] c"SKP V%01x\00"
@.str.26 = [11 x i8] c"SKNP V%01x\00"
@.str.27 = [13 x i8] c"MOV V%01x DT\00"
@.str.28 = [12 x i8] c"MOV V%01x K\00"
@.str.29 = [13 x i8] c"MOV DT V%01x\00"
@.str.30 = [13 x i8] c"MOV ST V%01x\00"
@.str.31 = [12 x i8] c"ADD I V%01x\00"
@.str.32 = [12 x i8] c"MOV I V%01x\00"
@.str.33 = [12 x i8] c"MOV B V%01x\00"
@.str.34 = [14 x i8] c"MOV [I] V%01x\00"
@.str.35 = [14 x i8] c"MOV V%01x [I]\00"
define void @DisassembleCH8(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
store i8* %13, i8** %5
%14 = load i8*, i8** %5
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = ashr i32 %17, 4
%19 = trunc i32 %18 to i8
store i8 %19, i8* %6
%20 = load i32, i32* %4
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i64 0
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = load i8*, i8** %5
%26 = getelementptr inbounds i8, i8* %25, i64 1
%27 = load i8, i8* %26
%28 = zext i8 %27 to i32
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %24, i32 %28)
%30 = load i8*, i8** %5
%31 = getelementptr inbounds i8, i8* %30, i64 0
%32 = load i8, i8* %31
%33 = zext i8 %32 to i32
%34 = and i32 %33, 15
%35 = trunc i32 %34 to i8
store i8 %35, i8* %7
%36 = load i8*, i8** %5
%37 = getelementptr inbounds i8, i8* %36, i64 1
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = ashr i32 %39, 4
%41 = trunc i32 %40 to i8
store i8 %41, i8* %8
%42 = load i8*, i8** %5
%43 = getelementptr inbounds i8, i8* %42, i64 1
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = and i32 %45, 15
%47 = trunc i32 %46 to i8
store i8 %47, i8* %9
%48 = load i8, i8* %6
%49 = zext i8 %48 to i32
switch i32 %49, label %294 [
i32 0, label %50
i32 1, label %88
i32 2, label %96
i32 3, label %104
i32 4, label %112
i32 5, label %120
i32 6, label %128
i32 7, label %136
i32 8, label %144
i32 9, label %202
i32 10, label %210
i32 11, label %218
i32 12, label %224
i32 13, label %230
i32 14, label %238
i32 15, label %252
]
50: ; preds = %2
%51 = load i8*, i8** %5
%52 = getelementptr inbounds i8, i8* %51, i64 0
%53 = load i8, i8* %52
%54 = zext i8 %53 to i32
%55 = icmp eq i32 %54, 0
br i1 %55, label %56, label %64
56: ; preds = %50
%57 = load i8*, i8** %5
%58 = getelementptr inbounds i8, i8* %57, i64 1
%59 = load i8, i8* %58
%60 = zext i8 %59 to i32
%61 = icmp eq i32 %60, 224
br i1 %61, label %62, label %64
62: ; preds = %56
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %87
64: ; preds = %56, %50
%65 = load i8*, i8** %5
%66 = getelementptr inbounds i8, i8* %65, i64 0
%67 = load i8, i8* %66
%68 = zext i8 %67 to i32
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %78
70: ; preds = %64
%71 = load i8*, i8** %5
%72 = getelementptr inbounds i8, i8* %71, i64 1
%73 = load i8, i8* %72
%74 = zext i8 %73 to i32
%75 = icmp eq i32 %74, 238
br i1 %75, label %76, label %78
76: ; preds = %70
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %86
78: ; preds = %70, %64
%79 = load i8, i8* %7
%80 = zext i8 %79 to i32
%81 = load i8*, i8** %5
%82 = getelementptr inbounds i8, i8* %81, i64 1
%83 = load i8, i8* %82
%84 = zext i8 %83 to i32
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %80, i32 %84)
br label %86
86: ; preds = %78, %76
br label %87
87: ; preds = %86, %62
br label %294
88: ; preds = %2
%89 = load i8, i8* %7
%90 = zext i8 %89 to i32
%91 = load i8*, i8** %5
%92 = getelementptr inbounds i8, i8* %91, i64 1
%93 = load i8, i8* %92
%94 = zext i8 %93 to i32
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %90, i32 %94)
br label %294
96: ; preds = %2
%97 = load i8, i8* %7
%98 = zext i8 %97 to i32
%99 = load i8*, i8** %5
%100 = getelementptr inbounds i8, i8* %99, i64 1
%101 = load i8, i8* %100
%102 = zext i8 %101 to i32
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %98, i32 %102)
br label %294
104: ; preds = %2
%105 = load i8, i8* %7
%106 = zext i8 %105 to i32
%107 = load i8*, i8** %5
%108 = getelementptr inbounds i8, i8* %107, i64 1
%109 = load i8, i8* %108
%110 = zext i8 %109 to i32
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %106, i32 %110)
br label %294
112: ; preds = %2
%113 = load i8, i8* %7
%114 = zext i8 %113 to i32
%115 = load i8*, i8** %5
%116 = getelementptr inbounds i8, i8* %115, i64 1
%117 = load i8, i8* %116
%118 = zext i8 %117 to i32
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 %114, i32 %118)
br label %294
120: ; preds = %2
%121 = load i8, i8* %7
%122 = zext i8 %121 to i32
%123 = load i8*, i8** %5
%124 = getelementptr inbounds i8, i8* %123, i64 1
%125 = load i8, i8* %124
%126 = zext i8 %125 to i32
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 %122, i32 %126)
br label %294
128: ; preds = %2
%129 = load i8, i8* %7
%130 = zext i8 %129 to i32
%131 = load i8*, i8** %5
%132 = getelementptr inbounds i8, i8* %131, i64 1
%133 = load i8, i8* %132
%134 = zext i8 %133 to i32
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 %130, i32 %134)
br label %294
136: ; preds = %2
%137 = load i8, i8* %7
%138 = zext i8 %137 to i32
%139 = load i8*, i8** %5
%140 = getelementptr inbounds i8, i8* %139, i64 1
%141 = load i8, i8* %140
%142 = zext i8 %141 to i32
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i32 %138, i32 %142)
br label %294
144: ; preds = %2
%145 = load i8, i8* %9
%146 = zext i8 %145 to i32
switch i32 %146, label %201 [
i32 0, label %147
i32 1, label %153
i32 2, label %159
i32 3, label %165
i32 4, label %171
i32 5, label %177
i32 6, label %183
i32 7, label %189
i32 14, label %195
]
147: ; preds = %144
%148 = load i8, i8* %7
%149 = zext i8 %148 to i32
%150 = load i8, i8* %8
%151 = zext i8 %150 to i32
%152 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i32 %149, i32 %151)
br label %201
153: ; preds = %144
%154 = load i8, i8* %7
%155 = zext i8 %154 to i32
%156 = load i8, i8* %8
%157 = zext i8 %156 to i32
%158 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.12, i64 0, i64 0), i32 %155, i32 %157)
br label %201
159: ; preds = %144
%160 = load i8, i8* %7
%161 = zext i8 %160 to i32
%162 = load i8, i8* %8
%163 = zext i8 %162 to i32
%164 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i32 %161, i32 %163)
br label %201
165: ; preds = %144
%166 = load i8, i8* %7
%167 = zext i8 %166 to i32
%168 = load i8, i8* %8
%169 = zext i8 %168 to i32
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0), i32 %167, i32 %169)
br label %201
171: ; preds = %144
%172 = load i8, i8* %7
%173 = zext i8 %172 to i32
%174 = load i8, i8* %8
%175 = zext i8 %174 to i32
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i32 %173, i32 %175)
br label %201
177: ; preds = %144
%178 = load i8, i8* %7
%179 = zext i8 %178 to i32
%180 = load i8, i8* %8
%181 = zext i8 %180 to i32
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), i32 %179, i32 %181)
br label %201
183: ; preds = %144
%184 = load i8, i8* %7
%185 = zext i8 %184 to i32
%186 = load i8, i8* %8
%187 = zext i8 %186 to i32
%188 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.17, i64 0, i64 0), i32 %185, i32 %187)
br label %201
189: ; preds = %144
%190 = load i8, i8* %7
%191 = zext i8 %190 to i32
%192 = load i8, i8* %8
%193 = zext i8 %192 to i32
%194 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.18, i64 0, i64 0), i32 %191, i32 %193)
br label %201
195: ; preds = %144
%196 = load i8, i8* %7
%197 = zext i8 %196 to i32
%198 = load i8, i8* %8
%199 = zext i8 %198 to i32
%200 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.19, i64 0, i64 0), i32 %197, i32 %199)
br label %201
201: ; preds = %144, %195, %189, %183, %177, %171, %165, %159, %153, %147
br label %294
202: ; preds = %2
%203 = load i8, i8* %7
%204 = zext i8 %203 to i32
%205 = load i8*, i8** %5
%206 = getelementptr inbounds i8, i8* %205, i64 1
%207 = load i8, i8* %206
%208 = zext i8 %207 to i32
%209 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.20, i64 0, i64 0), i32 %204, i32 %208)
br label %294
210: ; preds = %2
%211 = load i8, i8* %7
%212 = zext i8 %211 to i32
%213 = load i8*, i8** %5
%214 = getelementptr inbounds i8, i8* %213, i64 1
%215 = load i8, i8* %214
%216 = zext i8 %215 to i32
%217 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.21, i64 0, i64 0), i32 %212, i32 %216)
br label %294
218: ; preds = %2
%219 = load i8*, i8** %5
%220 = getelementptr inbounds i8, i8* %219, i64 1
%221 = load i8, i8* %220
%222 = zext i8 %221 to i32
%223 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.22, i64 0, i64 0), i32 %222)
br label %294
224: ; preds = %2
%225 = load i8*, i8** %5
%226 = getelementptr inbounds i8, i8* %225, i64 1
%227 = load i8, i8* %226
%228 = zext i8 %227 to i32
%229 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i32 %228)
br label %294
230: ; preds = %2
%231 = load i8, i8* %7
%232 = zext i8 %231 to i32
%233 = load i8, i8* %8
%234 = zext i8 %233 to i32
%235 = load i8, i8* %9
%236 = zext i8 %235 to i32
%237 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.24, i64 0, i64 0), i32 %232, i32 %234, i32 %236)
br label %294
238: ; preds = %2
%239 = load i8*, i8** %5
%240 = getelementptr inbounds i8, i8* %239, i64 1
%241 = load i8, i8* %240
%242 = zext i8 %241 to i32
switch i32 %242, label %251 [
i32 158, label %243
i32 161, label %247
]
243: ; preds = %238
%244 = load i8, i8* %7
%245 = zext i8 %244 to i32
%246 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0), i32 %245)
br label %251
247: ; preds = %238
%248 = load i8, i8* %7
%249 = zext i8 %248 to i32
%250 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.26, i64 0, i64 0), i32 %249)
br label %251
251: ; preds = %238, %247, %243
br label %294
252: ; preds = %2
%253 = load i8*, i8** %5
%254 = getelementptr inbounds i8, i8* %253, i64 1
%255 = load i8, i8* %254
%256 = zext i8 %255 to i32
switch i32 %256, label %293 [
i32 7, label %257
i32 10, label %261
i32 21, label %265
i32 24, label %269
i32 30, label %273
i32 41, label %277
i32 51, label %281
i32 85, label %285
i32 101, label %289
]
257: ; preds = %252
%258 = load i8, i8* %7
%259 = zext i8 %258 to i32
%260 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.27, i64 0, i64 0), i32 %259)
br label %293
261: ; preds = %252
%262 = load i8, i8* %7
%263 = zext i8 %262 to i32
%264 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.28, i64 0, i64 0), i32 %263)
br label %293
265: ; preds = %252
%266 = load i8, i8* %7
%267 = zext i8 %266 to i32
%268 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.29, i64 0, i64 0), i32 %267)
br label %293
269: ; preds = %252
%270 = load i8, i8* %7
%271 = zext i8 %270 to i32
%272 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.30, i64 0, i64 0), i32 %271)
br label %293
273: ; preds = %252
%274 = load i8, i8* %7
%275 = zext i8 %274 to i32
%276 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.31, i64 0, i64 0), i32 %275)
br label %293
277: ; preds = %252
%278 = load i8, i8* %7
%279 = zext i8 %278 to i32
%280 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.32, i64 0, i64 0), i32 %279)
br label %293
281: ; preds = %252
%282 = load i8, i8* %7
%283 = zext i8 %282 to i32
%284 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.33, i64 0, i64 0), i32 %283)
br label %293
285: ; preds = %252
%286 = load i8, i8* %7
%287 = zext i8 %286 to i32
%288 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.34, i64 0, i64 0), i32 %287)
br label %293
289: ; preds = %252
%290 = load i8, i8* %7
%291 = zext i8 %290 to i32
%292 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.35, i64 0, i64 0), i32 %291)
br label %293
293: ; preds = %252, %289, %285, %281, %277, %273, %269, %265, %261, %257
br label %294
294: ; preds = %2, %293, %251, %230, %224, %218, %210, %202, %201, %136, %128, %120, %112, %104, %96, %88, %87
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"%04x %02x %02x \00"
@.str.1 = [4 x i8] c"CLS\00"
@.str.2 = [4 x i8] c"RET\00"
@.str.3 = [13 x i8] c"SYS %01x%02x\00"
@.str.4 = [13 x i8] c"JMP %01x%02x\00"
@.str.5 = [13 x i8] c"JSR %01x%02x\00"
@.str.6 = [14 x i8] c"SE V%01x %02x\00"
@.str.7 = [15 x i8] c"SNE V%01x %02x\00"
@.str.8 = [15 x i8] c"SE V%01x V%01x\00"
@.str.9 = [15 x i8] c"MOV V%01x %02x\00"
@.str.10 = [15 x i8] c"ADD V%01x %02x\00"
@.str.11 = [16 x i8] c"MOV V%01x V%01x\00"
@.str.12 = [15 x i8] c"OR V%01x V%01x\00"
@.str.13 = [16 x i8] c"AND V%01x V%01x\00"
@.str.14 = [16 x i8] c"XOR V%01x V%01x\00"
@.str.15 = [16 x i8] c"ADD V%01x V%01x\00"
@.str.16 = [16 x i8] c"SUB V%01x V%01x\00"
@.str.17 = [16 x i8] c"SHR V%01x V%01x\00"
@.str.18 = [17 x i8] c"SUBN V%01x V%01x\00"
@.str.19 = [16 x i8] c"SHL V%01x V%01x\00"
@.str.20 = [14 x i8] c"SNE %01x %01x\00"
@.str.21 = [13 x i8] c"MVI %01x%02x\00"
@.str.22 = [12 x i8] c"JMP V0 %02x\00"
@.str.23 = [9 x i8] c"RND %02x\00"
@.str.24 = [21 x i8] c"DRW V%01x V%01x %01x\00"
@.str.25 = [10 x i8] c"SKP V%01x\00"
@.str.26 = [11 x i8] c"SKNP V%01x\00"
@.str.27 = [13 x i8] c"MOV V%01x DT\00"
@.str.28 = [12 x i8] c"MOV V%01x K\00"
@.str.29 = [13 x i8] c"MOV DT V%01x\00"
@.str.30 = [13 x i8] c"MOV ST V%01x\00"
@.str.31 = [12 x i8] c"ADD I V%01x\00"
@.str.32 = [12 x i8] c"MOV I V%01x\00"
@.str.33 = [12 x i8] c"MOV B V%01x\00"
@.str.34 = [14 x i8] c"MOV [I] V%01x\00"
@.str.35 = [14 x i8] c"MOV V%01x [I]\00"
define void @DisassembleCH8(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = lshr i8 %5, 4
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %6, i32 %10)
%12 = load i8, i8* %4
%13 = and i8 %12, 15
%14 = load i8, i8* %8
%15 = zext i8 %14 to i32
%16 = lshr i8 %14, 4
%17 = and i8 %14, 15
%18 = zext i8 %7 to i32
switch i32 %18, label %142 [
i32 0, label %19
i32 1, label %33
i32 2, label %36
i32 3, label %39
i32 4, label %42
i32 5, label %45
i32 6, label %48
i32 7, label %51
i32 8, label %54
i32 9, label %92
i32 10, label %95
i32 11, label %98
i32 12, label %100
i32 13, label %102
i32 14, label %107
i32 15, label %114
]
19: ; preds = %2
%20 = icmp eq i8 %12, 0
%21 = icmp eq i8 %14, -32
%22 = select i1 %20, i1 %21, i1 false
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %143
25: ; preds = %19
%26 = icmp eq i8 %14, -18
%27 = select i1 %20, i1 %26, i1 false
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %143
30: ; preds = %25
%31 = zext i8 %13 to i32
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %31, i32 %15)
br label %143
33: ; preds = %2
%34 = zext i8 %13 to i32
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %34, i32 %15)
br label %143
36: ; preds = %2
%37 = zext i8 %13 to i32
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %37, i32 %15)
br label %143
39: ; preds = %2
%40 = zext i8 %13 to i32
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %40, i32 %15)
br label %143
42: ; preds = %2
%43 = zext i8 %13 to i32
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 %43, i32 %15)
br label %143
45: ; preds = %2
%46 = zext i8 %13 to i32
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 %46, i32 %15)
br label %143
48: ; preds = %2
%49 = zext i8 %13 to i32
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 %49, i32 %15)
br label %143
51: ; preds = %2
%52 = zext i8 %13 to i32
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i32 %52, i32 %15)
br label %143
54: ; preds = %2
%55 = zext i8 %17 to i32
switch i32 %55, label %143 [
i32 0, label %56
i32 1, label %60
i32 2, label %64
i32 3, label %68
i32 4, label %72
i32 5, label %76
i32 6, label %80
i32 7, label %84
i32 14, label %88
]
56: ; preds = %54
%57 = zext i8 %13 to i32
%58 = zext i8 %16 to i32
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i32 %57, i32 %58)
br label %143
60: ; preds = %54
%61 = zext i8 %13 to i32
%62 = zext i8 %16 to i32
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.12, i64 0, i64 0), i32 %61, i32 %62)
br label %143
64: ; preds = %54
%65 = zext i8 %13 to i32
%66 = zext i8 %16 to i32
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i32 %65, i32 %66)
br label %143
68: ; preds = %54
%69 = zext i8 %13 to i32
%70 = zext i8 %16 to i32
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0), i32 %69, i32 %70)
br label %143
72: ; preds = %54
%73 = zext i8 %13 to i32
%74 = zext i8 %16 to i32
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i32 %73, i32 %74)
br label %143
76: ; preds = %54
%77 = zext i8 %13 to i32
%78 = zext i8 %16 to i32
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), i32 %77, i32 %78)
br label %143
80: ; preds = %54
%81 = zext i8 %13 to i32
%82 = zext i8 %16 to i32
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.17, i64 0, i64 0), i32 %81, i32 %82)
br label %143
84: ; preds = %54
%85 = zext i8 %13 to i32
%86 = zext i8 %16 to i32
%87 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.18, i64 0, i64 0), i32 %85, i32 %86)
br label %143
88: ; preds = %54
%89 = zext i8 %13 to i32
%90 = zext i8 %16 to i32
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.19, i64 0, i64 0), i32 %89, i32 %90)
br label %143
92: ; preds = %2
%93 = zext i8 %13 to i32
%94 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.20, i64 0, i64 0), i32 %93, i32 %15)
br label %143
95: ; preds = %2
%96 = zext i8 %13 to i32
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.21, i64 0, i64 0), i32 %96, i32 %15)
br label %143
98: ; preds = %2
%99 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.22, i64 0, i64 0), i32 %15)
br label %143
100: ; preds = %2
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i32 %15)
br label %143
102: ; preds = %2
%103 = zext i8 %13 to i32
%104 = zext i8 %16 to i32
%105 = zext i8 %17 to i32
%106 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.24, i64 0, i64 0), i32 %103, i32 %104, i32 %105)
br label %143
107: ; preds = %2
switch i8 %14, label %143 [
i8 -98, label %108
i8 -95, label %111
]
108: ; preds = %107
%109 = zext i8 %13 to i32
%110 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0), i32 %109)
br label %143
111: ; preds = %107
%112 = zext i8 %13 to i32
%113 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.26, i64 0, i64 0), i32 %112)
br label %143
114: ; preds = %2
switch i8 %14, label %143 [
i8 7, label %115
i8 10, label %118
i8 21, label %121
i8 24, label %124
i8 30, label %127
i8 41, label %130
i8 51, label %133
i8 85, label %136
i8 101, label %139
]
115: ; preds = %114
%116 = zext i8 %13 to i32
%117 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.27, i64 0, i64 0), i32 %116)
br label %143
118: ; preds = %114
%119 = zext i8 %13 to i32
%120 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.28, i64 0, i64 0), i32 %119)
br label %143
121: ; preds = %114
%122 = zext i8 %13 to i32
%123 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.29, i64 0, i64 0), i32 %122)
br label %143
124: ; preds = %114
%125 = zext i8 %13 to i32
%126 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.30, i64 0, i64 0), i32 %125)
br label %143
127: ; preds = %114
%128 = zext i8 %13 to i32
%129 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.31, i64 0, i64 0), i32 %128)
br label %143
130: ; preds = %114
%131 = zext i8 %13 to i32
%132 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.32, i64 0, i64 0), i32 %131)
br label %143
133: ; preds = %114
%134 = zext i8 %13 to i32
%135 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.33, i64 0, i64 0), i32 %134)
br label %143
136: ; preds = %114
%137 = zext i8 %13 to i32
%138 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.34, i64 0, i64 0), i32 %137)
br label %143
139: ; preds = %114
%140 = zext i8 %13 to i32
%141 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.35, i64 0, i64 0), i32 %140)
br label %143
142: ; preds = %2
unreachable
143: ; preds = %115, %118, %121, %124, %127, %130, %133, %136, %139, %114, %108, %111, %107, %56, %60, %64, %68, %72, %76, %80, %84, %88, %54, %23, %30, %28, %102, %100, %98, %95, %92, %51, %48, %45, %42, %39, %36, %33
ret void
}