#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 pc;

/* Variables and functions */
int Fetch(int);
int LoadWord(int);
int /*<<< orphan*/ StoreWord(int, int);
int /*<<< orphan*/ cacheInit();
int /*<<< orphan*/ cacheReport();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void Interpret(int start) {
  cacheInit();
  register int instr, opcode, rs, rt, rd, shamt, funct, uimm, simm, addr;
  register int pc, hi, lo;
  int reg[32];
  register int cont = 1, count = 0;
  register long long wide;
  pc = start;
  reg[28] = 0x10008000;
  reg[29] = 0x10000000 + (1024 * 1024);
  while (cont) {
    count++;
    instr = Fetch(pc);
    pc += 4;
    reg[0] = 0;
    opcode = (unsigned)instr >> 26;
    rs = (instr >> 21) & 0x1f;
    rt = (instr >> 16) & 0x1f;
    rd = (instr >> 11) & 0x1f;
    shamt = (instr >> 6) & 0x1f;
    funct = instr & 0x3f;
    uimm = instr & 0xffff;
    simm = ((signed)uimm << 16) >> 16;
    addr = instr & 0x3ffffff;
    switch (opcode) {
    case 0x00:
      switch (funct) {
      case 0x00:
        reg[rd] = reg[rs] << shamt;
        break;
      case 0x03:
        reg[rd] = reg[rs] >> shamt;
        break;
      case 0x08:
        pc = reg[rs];
        break;
      case 0x10:
        reg[rd] = hi;
        break;
      case 0x12:
        reg[rd] = lo;
        break;
      case 0x18:
        wide = reg[rs];
        wide *= reg[rt];
        lo = wide & 0xffffffff;
        hi = wide >> 32;
        break;
      case 0x1a:
        if (reg[rt] == 0) {
          fprintf(stderr, "division by zero: pc = 0x%x\n", pc - 4);
          cont = 0;
        } else {
          lo = reg[rs] / reg[rt];
          hi = reg[rs] % reg[rt];
        }
        break;
      case 0x21:
        reg[rd] = reg[rs] + reg[rt];
        break;
      case 0x23:
        reg[rd] = reg[rs] - reg[rt];
        break;
      case 0x2a:
        if (reg[rs] < reg[rt]) {
          reg[rd] = 1;
        } else {
          reg[rd] = 0;
        }
        break;
      default:
        fprintf(stderr, "unimplemented instruction: pc = 0x%x\n", pc - 4);
        cont = 0;
      }
      break;
    case 0x02:
      pc = (pc & 0xf0000000) | (addr * 4);
      break;
    case 0x03:
      reg[31] = pc;
      pc = ((pc)&0xf0000000) | (addr * 4);
      break;
    case 0x04:
      if (reg[rs] == reg[rt]) {
        pc += 4 * simm;
      };
      break;
    case 0x05:
      if (reg[rs] != reg[rt]) {
        pc += 4 * simm;
      };
      break;
    case 0x09:
      reg[rt] = reg[rs] + simm;
      break;
    case 0x0c:
      reg[rt] = reg[rs] & uimm;
      break;
    case 0x0f:
      reg[rt] = (uimm << 16);
      break;
    case 0x1a:
      switch (addr & 0xf) {
      case 0x00:
        printf("\n");
        break;
      case 0x01:
        printf(" %d", reg[rs]);
        break;
      case 0x05:
        printf("\n? ");
        fflush(stdout);
        scanf("%d", &reg[rt]);
        break;
      case 0x0a:
        cont = 0;
        break;
      default:
        fprintf(stderr, "unimplemented trap: pc = 0x%x\n", pc - 4);
        cont = 0;
      }
      break;
    case 0x23:
      reg[rt] = LoadWord(reg[rs] + simm);
      break;
    case 0x2b:
      StoreWord(reg[rt], reg[rs] + simm);
      break;
    default:
      fprintf(stderr, "unimplemented instruction: pc = 0x%x\n", pc - 4);
      cont = 0;
    }
  }
  printf("\nprogram finished at pc = 0x%x  (%d instructions executed)\n", pc,
         count);
  cacheReport();
}


x86 assembly (clang, -O0):
<Interpret>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1090 <cacheInit@plt>
movl   $0x1,-0xc4(%rbp)
movl   $0x0,-0xc8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x30(%rbp)
movl   $0x10008000,-0x50(%rbp)
movl   $0x10100000,-0x4c(%rbp)
cmpl   $0x0,-0xc4(%rbp)
je     16e1 <Interpret+0x551>
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x30(%rbp),%edi
call   1030 <Fetch@plt>
mov    %eax,-0x8(%rbp)
mov    -0x30(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x30(%rbp)
movl   $0x0,-0xc0(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x1a,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x15,%eax
and    $0x1f,%eax
mov    %eax,-0x10(%rbp)
movzwl -0x6(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
shr    $0xb,%eax
and    $0x1f,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x6,%eax
and    $0x1f,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    $0x3f,%eax
mov    %eax,-0x20(%rbp)
movzwl -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
movswl -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
and    $0x3ffffff,%eax
mov    %eax,-0x2c(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0xd8(%rbp)
sub    $0x2b,%rax
ja     16b7 <Interpret+0x527>
mov    -0xd8(%rbp),%rax
lea    0xd7e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x20(%rbp),%eax
mov    %rax,-0xe0(%rbp)
sub    $0x2a,%rax
ja     148d <Interpret+0x2fd>
mov    -0xe0(%rbp),%rax
lea    0xe2f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%eax
mov    -0x1c(%rbp),%ecx
shl    %cl,%eax
mov    %eax,%ecx
movslq -0x18(%rbp),%rax
mov    %ecx,-0xc0(%rbp,%rax,4)
jmp    14b2 <Interpret+0x322>
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%eax
mov    -0x1c(%rbp),%ecx
sar    %cl,%eax
mov    %eax,%ecx
movslq -0x18(%rbp),%rax
mov    %ecx,-0xc0(%rbp,%rax,4)
jmp    14b2 <Interpret+0x322>
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%eax
mov    %eax,-0x30(%rbp)
jmp    14b2 <Interpret+0x322>
mov    -0x34(%rbp),%ecx
movslq -0x18(%rbp),%rax
mov    %ecx,-0xc0(%rbp,%rax,4)
jmp    14b2 <Interpret+0x322>
mov    -0x38(%rbp),%ecx
movslq -0x18(%rbp),%rax
mov    %ecx,-0xc0(%rbp,%rax,4)
jmp    14b2 <Interpret+0x322>
movslq -0x10(%rbp),%rax
movslq -0xc0(%rbp,%rax,4),%rax
ff
mov    %rax,-0xd0(%rbp)
movslq -0x14(%rbp),%rax
movslq -0xc0(%rbp,%rax,4),%rax
ff
imul   -0xd0(%rbp),%rax
ff
mov    %rax,-0xd0(%rbp)
movabs $0xffffffff,%rax
and    -0xd0(%rbp),%rax
mov    %eax,-0x38(%rbp)
mov    -0xd0(%rbp),%rax
sar    $0x20,%rax
mov    %eax,-0x34(%rbp)
jmp    14b2 <Interpret+0x322>
movslq -0x14(%rbp),%rax
cmpl   $0x0,-0xc0(%rbp,%rax,4)
jne    13c4 <Interpret+0x234>
mov    0x2c3f(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%edx
sub    $0x4,%edx
lea    0xdd8(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0x0,-0xc4(%rbp)
jmp    13f8 <Interpret+0x268>
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%eax
movslq -0x14(%rbp),%rcx
cltd
idivl  -0xc0(%rbp,%rcx,4)
mov    %eax,-0x38(%rbp)
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%eax
movslq -0x14(%rbp),%rcx
cltd
idivl  -0xc0(%rbp,%rcx,4)
mov    %edx,-0x34(%rbp)
jmp    14b2 <Interpret+0x322>
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%ecx
movslq -0x14(%rbp),%rax
add    -0xc0(%rbp,%rax,4),%ecx
movslq -0x18(%rbp),%rax
mov    %ecx,-0xc0(%rbp,%rax,4)
jmp    14b2 <Interpret+0x322>
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%ecx
movslq -0x14(%rbp),%rax
sub    -0xc0(%rbp,%rax,4),%ecx
movslq -0x18(%rbp),%rax
mov    %ecx,-0xc0(%rbp,%rax,4)
jmp    14b2 <Interpret+0x322>
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%eax
movslq -0x14(%rbp),%rcx
cmp    -0xc0(%rbp,%rcx,4),%eax
jge    1479 <Interpret+0x2e9>
movslq -0x18(%rbp),%rax
movl   $0x1,-0xc0(%rbp,%rax,4)
jmp    1488 <Interpret+0x2f8>
movslq -0x18(%rbp),%rax
movl   $0x0,-0xc0(%rbp,%rax,4)
jmp    14b2 <Interpret+0x322>
mov    0x2b4c(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%edx
sub    $0x4,%edx
lea    0xd02(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0x0,-0xc4(%rbp)
jmp    16dc <Interpret+0x54c>
mov    -0x30(%rbp),%eax
and    $0xf0000000,%eax
mov    -0x2c(%rbp),%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x30(%rbp)
jmp    16dc <Interpret+0x54c>
mov    -0x30(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x30(%rbp),%eax
and    $0xf0000000,%eax
mov    -0x2c(%rbp),%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x30(%rbp)
jmp    16dc <Interpret+0x54c>
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%eax
movslq -0x14(%rbp),%rcx
cmp    -0xc0(%rbp,%rcx,4),%eax
jne    1515 <Interpret+0x385>
mov    -0x28(%rbp),%eax
shl    $0x2,%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    16dc <Interpret+0x54c>
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%eax
movslq -0x14(%rbp),%rcx
cmp    -0xc0(%rbp,%rcx,4),%eax
je     1542 <Interpret+0x3b2>
mov    -0x28(%rbp),%eax
shl    $0x2,%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    16dc <Interpret+0x54c>
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%ecx
add    -0x28(%rbp),%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0xc0(%rbp,%rax,4)
jmp    16dc <Interpret+0x54c>
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%ecx
and    -0x24(%rbp),%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0xc0(%rbp,%rax,4)
jmp    16dc <Interpret+0x54c>
mov    -0x24(%rbp),%ecx
shl    $0x10,%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0xc0(%rbp,%rax,4)
jmp    16dc <Interpret+0x54c>
mov    -0x2c(%rbp),%eax
and    $0xf,%eax
mov    %rax,-0xe8(%rbp)
sub    $0xa,%eax
ja     1645 <Interpret+0x4b5>
mov    -0xe8(%rbp),%rax
lea    0xaf3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xc5f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    166a <Interpret+0x4da>
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%esi
lea    0xbe0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    166a <Interpret+0x4da>
lea    0xbd1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x29cc(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
movslq -0x14(%rbp),%rax
lea    -0xc0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xba0(%rip),%rdi
call   10a0 <scanf@plt>
jmp    166a <Interpret+0x4da>
movl   $0x0,-0xc4(%rbp)
jmp    166a <Interpret+0x4da>
mov    0x2994(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%edx
sub    $0x4,%edx
lea    0xb78(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0x0,-0xc4(%rbp)
jmp    16dc <Interpret+0x54c>
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%edi
add    -0x28(%rbp),%edi
call   1060 <LoadWord@plt>
mov    %eax,%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0xc0(%rbp,%rax,4)
jmp    16dc <Interpret+0x54c>
movslq -0x14(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%edi
movslq -0x10(%rbp),%rax
mov    -0xc0(%rbp,%rax,4),%esi
add    -0x28(%rbp),%esi
call   10b0 <StoreWord@plt>
jmp    16dc <Interpret+0x54c>
mov    0x2922(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%edx
sub    $0x4,%edx
lea    0xad8(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0x0,-0xc4(%rbp)
jmp    11cd <Interpret+0x3d>
mov    -0x30(%rbp),%esi
mov    -0xc8(%rbp),%edx
lea    0xb01(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <cacheReport@plt>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interpret>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %edi,%r15d
xor    %eax,%eax
call   10a0 <cacheInit@plt>
movabs $0x1010000010008000,%rax
mov    %rax,0x80(%rsp)
mov    $0x1,%r12d
mov    %rax,0x8(%rsp)
mov    %rax,(%rsp)
jmp    1207 <Interpret+0x67>
mov    %r14d,0x8c(%rsp)
and    $0xf0000000,%r14d
lea    (%r14,%rbp,4),%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12d
mov    %r14d,%r15d
mov    %r15d,%edi
call   1040 <Fetch@plt>
lea    0x4(%r15),%r14d
movl   $0x0,0x10(%rsp)
mov    %eax,%esi
shr    $0x1a,%esi
cmp    $0x2b,%esi
ja     14ac <Interpret+0x30c>
mov    %eax,%edx
shr    $0x15,%edx
and    $0x1f,%edx
mov    %eax,%r13d
shr    $0x10,%r13d
and    $0x1f,%r13d
mov    %eax,%edi
shl    $0x10,%edi
movswl %ax,%ecx
mov    %eax,%ebp
and    $0x3ffffff,%ebp
lea    0xdad(%rip),%r8
movslq (%r8,%rsi,4),%rbx
add    %r8,%rbx
lea    0xf44(%rip),%rsi
jmp    *%rbx
mov    %eax,%ecx
and    $0x3f,%ecx
cmp    $0x2a,%ecx
ja     14ac <Interpret+0x30c>
mov    %eax,%edi
shr    $0xb,%edi
and    $0x1f,%edi
shr    $0x6,%eax
and    $0x1f,%eax
lea    0xe56(%rip),%rsi
movslq (%rsi,%rcx,4),%rcx
add    %rsi,%rcx
lea    0xf11(%rip),%rsi
jmp    *%rcx
mov    %edx,%ecx
mov    0x10(%rsp,%rcx,4),%edx
mov    %eax,%ecx
shl    %cl,%edx
jmp    13cd <Interpret+0x22d>
mov    %edx,%eax
mov    0x10(%rsp,%rax,4),%eax
mov    %r13d,%ecx
cmp    0x10(%rsp,%rcx,4),%eax
jne    1200 <Interpret+0x60>
jmp    12cd <Interpret+0x12d>
mov    %edx,%eax
mov    0x10(%rsp,%rax,4),%eax
mov    %r13d,%ecx
cmp    0x10(%rsp,%rcx,4),%eax
je     1200 <Interpret+0x60>
sar    $0xe,%edi
add    %r14d,%edi
mov    %edi,%r14d
jmp    1200 <Interpret+0x60>
mov    %edx,%eax
add    0x10(%rsp,%rax,4),%ecx
mov    %r13d,%eax
mov    %ecx,0x10(%rsp,%rax,4)
jmp    1200 <Interpret+0x60>
mov    %edx,%ecx
movzwl 0x10(%rsp,%rcx,4),%ecx
and    %ecx,%eax
mov    %r13d,%ecx
mov    %eax,0x10(%rsp,%rcx,4)
jmp    1200 <Interpret+0x60>
mov    %r13d,%eax
mov    %edi,0x10(%rsp,%rax,4)
jmp    1200 <Interpret+0x60>
and    $0xf,%eax
cmp    $0xa,%eax
ja     14b5 <Interpret+0x315>
lea    0xd8f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
lea    0xea4(%rip),%rsi
jmp    *%rax
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1200 <Interpret+0x60>
mov    %edx,%eax
add    0x10(%rsp,%rax,4),%ecx
mov    %ecx,%edi
call   1070 <LoadWord@plt>
mov    %r13d,%ecx
mov    %eax,0x10(%rsp,%rcx,4)
jmp    1200 <Interpret+0x60>
mov    %r13d,%eax
mov    0x10(%rsp,%rax,4),%edi
mov    %edx,%eax
add    0x10(%rsp,%rax,4),%ecx
mov    %ecx,%esi
call   10c0 <StoreWord@plt>
jmp    1200 <Interpret+0x60>
mov    %edx,%eax
mov    0x10(%rsp,%rax,4),%esi
lea    0xe4c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1200 <Interpret+0x60>
lea    0xe3d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c38(%rip),%rax
mov    (%rax),%edi
call   1090 <fflush@plt>
mov    %r13d,%eax
lea    (%rsp,%rax,4),%rsi
add    $0x10,%rsi
lea    0xe13(%rip),%rdi
call   10b0 <scanf@plt>
jmp    1200 <Interpret+0x60>
mov    %edx,%ecx
mov    0x10(%rsp,%rcx,4),%edx
mov    %eax,%ecx
sar    %cl,%edx
mov    %edi,%eax
mov    %edx,0x10(%rsp,%rax,4)
jmp    1200 <Interpret+0x60>
mov    %edx,%eax
mov    0x10(%rsp,%rax,4),%r14d
jmp    1200 <Interpret+0x60>
mov    %edi,%eax
mov    (%rsp),%rcx
mov    %ecx,0x10(%rsp,%rax,4)
jmp    1200 <Interpret+0x60>
mov    %edi,%eax
mov    0x8(%rsp),%rcx
mov    %ecx,0x10(%rsp,%rax,4)
jmp    1200 <Interpret+0x60>
mov    %edx,%eax
movslq 0x10(%rsp,%rax,4),%rax
mov    %r13d,%ecx
movslq 0x10(%rsp,%rcx,4),%rcx
imul   %rax,%rcx
mov    %rcx,%rax
mov    %rcx,0x8(%rsp)
shr    $0x20,%rcx
mov    %rcx,(%rsp)
jmp    1200 <Interpret+0x60>
mov    %r13d,%eax
mov    0x10(%rsp,%rax,4),%ecx
test   %ecx,%ecx
je     14be <Interpret+0x31e>
mov    %edx,%eax
mov    0x10(%rsp,%rax,4),%eax
cltd
idiv   %ecx
mov    %rdx,(%rsp)
mov    %rax,0x8(%rsp)
jmp    1200 <Interpret+0x60>
mov    %edx,%eax
mov    %r13d,%ecx
mov    0x10(%rsp,%rcx,4),%ecx
add    0x10(%rsp,%rax,4),%ecx
mov    %edi,%eax
mov    %ecx,0x10(%rsp,%rax,4)
jmp    1200 <Interpret+0x60>
mov    %edx,%eax
mov    0x10(%rsp,%rax,4),%eax
mov    %r13d,%ecx
sub    0x10(%rsp,%rcx,4),%eax
mov    %edi,%ecx
mov    %eax,0x10(%rsp,%rcx,4)
jmp    1200 <Interpret+0x60>
mov    %edx,%eax
mov    0x10(%rsp,%rax,4),%ecx
mov    %r13d,%edx
mov    %edi,%eax
cmp    0x10(%rsp,%rdx,4),%ecx
jge    149f <Interpret+0x2ff>
movl   $0x1,0x10(%rsp,%rax,4)
jmp    1200 <Interpret+0x60>
movl   $0x0,0x10(%rsp,%rax,4)
jmp    1200 <Interpret+0x60>
lea    0xcf2(%rip),%rsi
jmp    14c5 <Interpret+0x325>
lea    0xd17(%rip),%rsi
jmp    14c5 <Interpret+0x325>
lea    0xcc3(%rip),%rsi
mov    0x2b14(%rip),%rax
mov    (%rax),%edi
mov    %r15d,%edx
call   1080 <fprintf@plt>
lea    0xd15(%rip),%rdi
mov    %r14d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <cacheReport@plt>
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"division by zero: pc = 0x%x\0A\00"
@.str.1 = [38 x i8] c"unimplemented instruction: pc = 0x%x\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [4 x i8] c" %d\00"
@.str.4 = [4 x i8] c"\0A? \00"
@stdout = global i32 0
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [31 x i8] c"unimplemented trap: pc = 0x%x\0A\00"
@.str.7 = [60 x i8] c"\0Aprogram finished at pc = 0x%x (%d instructions executed)\0A\00"
define void @Interpret(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca [32 x i32]
%17 = alloca i32
%18 = alloca i32
%19 = alloca i64
store i32 %0, i32* %2
%20 = call i32 (...) @cacheInit()
store i32 1, i32* %17
store i32 0, i32* %18
%21 = load i32, i32* %2
store i32 %21, i32* %13
%22 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 28
store i32 268468224, i32* %22
%23 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 29
store i32 269484032, i32* %23
br label %24
24: ; preds = %323, %1
%25 = load i32, i32* %17
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %324
27: ; preds = %24
%28 = load i32, i32* %18
%29 = add nsw i32 %28, 1
store i32 %29, i32* %18
%30 = load i32, i32* %13
%31 = call i32 @Fetch(i32 %30)
store i32 %31, i32* %3
%32 = load i32, i32* %13
%33 = add nsw i32 %32, 4
store i32 %33, i32* %13
%34 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 0
store i32 0, i32* %34
%35 = load i32, i32* %3
%36 = lshr i32 %35, 26
store i32 %36, i32* %4
%37 = load i32, i32* %3
%38 = ashr i32 %37, 21
%39 = and i32 %38, 31
store i32 %39, i32* %5
%40 = load i32, i32* %3
%41 = ashr i32 %40, 16
%42 = and i32 %41, 31
store i32 %42, i32* %6
%43 = load i32, i32* %3
%44 = ashr i32 %43, 11
%45 = and i32 %44, 31
store i32 %45, i32* %7
%46 = load i32, i32* %3
%47 = ashr i32 %46, 6
%48 = and i32 %47, 31
store i32 %48, i32* %8
%49 = load i32, i32* %3
%50 = and i32 %49, 63
store i32 %50, i32* %9
%51 = load i32, i32* %3
%52 = and i32 %51, 65535
store i32 %52, i32* %10
%53 = load i32, i32* %10
%54 = shl i32 %53, 16
%55 = ashr i32 %54, 16
store i32 %55, i32* %11
%56 = load i32, i32* %3
%57 = and i32 %56, 67108863
store i32 %57, i32* %12
%58 = load i32, i32* %4
switch i32 %58, label %318 [
i32 0, label %59
i32 2, label %197
i32 3, label %203
i32 4, label %211
i32 5, label %227
i32 9, label %243
i32 12, label %253
i32 15, label %263
i32 26, label %269
i32 35, label %295
i32 43, label %306
]
59: ; preds = %27
%60 = load i32, i32* %9
switch i32 %60, label %191 [
i32 0, label %61
i32 3, label %71
i32 8, label %81
i32 16, label %86
i32 18, label %91
i32 24, label %96
i32 26, label %115
i32 33, label %146
i32 35, label %159
i32 42, label %172
]
61: ; preds = %59
%62 = load i32, i32* %5
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %63
%65 = load i32, i32* %64
%66 = load i32, i32* %8
%67 = shl i32 %65, %66
%68 = load i32, i32* %7
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %69
store i32 %67, i32* %70
br label %196
71: ; preds = %59
%72 = load i32, i32* %5
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %73
%75 = load i32, i32* %74
%76 = load i32, i32* %8
%77 = ashr i32 %75, %76
%78 = load i32, i32* %7
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %79
store i32 %77, i32* %80
br label %196
81: ; preds = %59
%82 = load i32, i32* %5
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %83
%85 = load i32, i32* %84
store i32 %85, i32* %13
br label %196
86: ; preds = %59
%87 = load i32, i32* %14
%88 = load i32, i32* %7
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %89
store i32 %87, i32* %90
br label %196
91: ; preds = %59
%92 = load i32, i32* %15
%93 = load i32, i32* %7
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %94
store i32 %92, i32* %95
br label %196
96: ; preds = %59
%97 = load i32, i32* %5
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %98
%100 = load i32, i32* %99
%101 = sext i32 %100 to i64
store i64 %101, i64* %19
%102 = load i32, i32* %6
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %103
%105 = load i32, i32* %104
%106 = sext i32 %105 to i64
%107 = load i64, i64* %19
%108 = mul nsw i64 %107, %106
store i64 %108, i64* %19
%109 = load i64, i64* %19
%110 = and i64 %109, 4294967295
%111 = trunc i64 %110 to i32
store i32 %111, i32* %15
%112 = load i64, i64* %19
%113 = ashr i64 %112, 32
%114 = trunc i64 %113 to i32
store i32 %114, i32* %14
br label %196
115: ; preds = %59
%116 = load i32, i32* %6
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %117
%119 = load i32, i32* %118
%120 = icmp eq i32 %119, 0
br i1 %120, label %121, label %126
121: ; preds = %115
%122 = load i32, i32* @stderr
%123 = load i32, i32* %13
%124 = sub nsw i32 %123, 4
%125 = call i32 @fprintf(i32 %122, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %124)
store i32 0, i32* %17
br label %145
126: ; preds = %115
%127 = load i32, i32* %5
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %128
%130 = load i32, i32* %129
%131 = load i32, i32* %6
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %132
%134 = load i32, i32* %133
%135 = sdiv i32 %130, %134
store i32 %135, i32* %15
%136 = load i32, i32* %5
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %137
%139 = load i32, i32* %138
%140 = load i32, i32* %6
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %141
%143 = load i32, i32* %142
%144 = srem i32 %139, %143
store i32 %144, i32* %14
br label %145
145: ; preds = %126, %121
br label %196
146: ; preds = %59
%147 = load i32, i32* %5
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %148
%150 = load i32, i32* %149
%151 = load i32, i32* %6
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %152
%154 = load i32, i32* %153
%155 = add nsw i32 %150, %154
%156 = load i32, i32* %7
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %157
store i32 %155, i32* %158
br label %196
159: ; preds = %59
%160 = load i32, i32* %5
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %161
%163 = load i32, i32* %162
%164 = load i32, i32* %6
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %165
%167 = load i32, i32* %166
%168 = sub nsw i32 %163, %167
%169 = load i32, i32* %7
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %170
store i32 %168, i32* %171
br label %196
172: ; preds = %59
%173 = load i32, i32* %5
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %174
%176 = load i32, i32* %175
%177 = load i32, i32* %6
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %178
%180 = load i32, i32* %179
%181 = icmp slt i32 %176, %180
br i1 %181, label %182, label %186
182: ; preds = %172
%183 = load i32, i32* %7
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %184
store i32 1, i32* %185
br label %190
186: ; preds = %172
%187 = load i32, i32* %7
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %188
store i32 0, i32* %189
br label %190
190: ; preds = %186, %182
br label %196
191: ; preds = %59
%192 = load i32, i32* @stderr
%193 = load i32, i32* %13
%194 = sub nsw i32 %193, 4
%195 = call i32 @fprintf(i32 %192, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %194)
store i32 0, i32* %17
br label %196
196: ; preds = %191, %190, %159, %146, %145, %96, %91, %86, %81, %71, %61
br label %323
197: ; preds = %27
%198 = load i32, i32* %13
%199 = and i32 %198, -268435456
%200 = load i32, i32* %12
%201 = mul nsw i32 %200, 4
%202 = or i32 %199, %201
store i32 %202, i32* %13
br label %323
203: ; preds = %27
%204 = load i32, i32* %13
%205 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 31
store i32 %204, i32* %205
%206 = load i32, i32* %13
%207 = and i32 %206, -268435456
%208 = load i32, i32* %12
%209 = mul nsw i32 %208, 4
%210 = or i32 %207, %209
store i32 %210, i32* %13
br label %323
211: ; preds = %27
%212 = load i32, i32* %5
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %213
%215 = load i32, i32* %214
%216 = load i32, i32* %6
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %217
%219 = load i32, i32* %218
%220 = icmp eq i32 %215, %219
br i1 %220, label %221, label %226
221: ; preds = %211
%222 = load i32, i32* %11
%223 = mul nsw i32 4, %222
%224 = load i32, i32* %13
%225 = add nsw i32 %224, %223
store i32 %225, i32* %13
br label %226
226: ; preds = %221, %211
br label %323
227: ; preds = %27
%228 = load i32, i32* %5
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %229
%231 = load i32, i32* %230
%232 = load i32, i32* %6
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %233
%235 = load i32, i32* %234
%236 = icmp ne i32 %231, %235
br i1 %236, label %237, label %242
237: ; preds = %227
%238 = load i32, i32* %11
%239 = mul nsw i32 4, %238
%240 = load i32, i32* %13
%241 = add nsw i32 %240, %239
store i32 %241, i32* %13
br label %242
242: ; preds = %237, %227
br label %323
243: ; preds = %27
%244 = load i32, i32* %5
%245 = sext i32 %244 to i64
%246 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %245
%247 = load i32, i32* %246
%248 = load i32, i32* %11
%249 = add nsw i32 %247, %248
%250 = load i32, i32* %6
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %251
store i32 %249, i32* %252
br label %323
253: ; preds = %27
%254 = load i32, i32* %5
%255 = sext i32 %254 to i64
%256 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %255
%257 = load i32, i32* %256
%258 = load i32, i32* %10
%259 = and i32 %257, %258
%260 = load i32, i32* %6
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %261
store i32 %259, i32* %262
br label %323
263: ; preds = %27
%264 = load i32, i32* %10
%265 = shl i32 %264, 16
%266 = load i32, i32* %6
%267 = sext i32 %266 to i64
%268 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %267
store i32 %265, i32* %268
br label %323
269: ; preds = %27
%270 = load i32, i32* %12
%271 = and i32 %270, 15
switch i32 %271, label %289 [
i32 0, label %272
i32 1, label %274
i32 5, label %280
i32 10, label %288
]
272: ; preds = %269
%273 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %294
274: ; preds = %269
%275 = load i32, i32* %5
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %276
%278 = load i32, i32* %277
%279 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %278)
br label %294
280: ; preds = %269
%281 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%282 = load i32, i32* @stdout
%283 = call i32 @fflush(i32 %282)
%284 = load i32, i32* %6
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %285
%287 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %286)
br label %294
288: ; preds = %269
store i32 0, i32* %17
br label %294
289: ; preds = %269
%290 = load i32, i32* @stderr
%291 = load i32, i32* %13
%292 = sub nsw i32 %291, 4
%293 = call i32 @fprintf(i32 %290, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 %292)
store i32 0, i32* %17
br label %294
294: ; preds = %289, %288, %280, %274, %272
br label %323
295: ; preds = %27
%296 = load i32, i32* %5
%297 = sext i32 %296 to i64
%298 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %297
%299 = load i32, i32* %298
%300 = load i32, i32* %11
%301 = add nsw i32 %299, %300
%302 = call i32 @LoadWord(i32 %301)
%303 = load i32, i32* %6
%304 = sext i32 %303 to i64
%305 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %304
store i32 %302, i32* %305
br label %323
306: ; preds = %27
%307 = load i32, i32* %6
%308 = sext i32 %307 to i64
%309 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %308
%310 = load i32, i32* %309
%311 = load i32, i32* %5
%312 = sext i32 %311 to i64
%313 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %312
%314 = load i32, i32* %313
%315 = load i32, i32* %11
%316 = add nsw i32 %314, %315
%317 = call i32 @StoreWord(i32 %310, i32 %316)
br label %323
318: ; preds = %27
%319 = load i32, i32* @stderr
%320 = load i32, i32* %13
%321 = sub nsw i32 %320, 4
%322 = call i32 @fprintf(i32 %319, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %321)
store i32 0, i32* %17
br label %323
323: ; preds = %318, %306, %295, %294, %263, %253, %243, %242, %226, %203, %197, %196
br label %24
324: ; preds = %24
%325 = load i32, i32* %13
%326 = load i32, i32* %18
%327 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.7, i64 0, i64 0), i32 %325, i32 %326)
%328 = call i32 (...) @cacheReport()
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"division by zero: pc = 0x%x\0A\00"
@.str.1 = [38 x i8] c"unimplemented instruction: pc = 0x%x\0A\00"
@.str.3 = [4 x i8] c" %d\00"
@.str.4 = [4 x i8] c"\0A? \00"
@stdout = global i32 0
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [31 x i8] c"unimplemented trap: pc = 0x%x\0A\00"
@.str.7 = [60 x i8] c"\0Aprogram finished at pc = 0x%x (%d instructions executed)\0A\00"
define void @Interpret(i32 %0) {
%2 = alloca [32 x i32]
%3 = tail call i32 (...) @cacheInit()
%4 = bitcast [32 x i32]* %2 to i8*
%5 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 28
store i32 268468224, i32* %5
%6 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 29
store i32 269484032, i32* %6
%7 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%8 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 31
br label %9
9: ; preds = %163, %1
%10 = phi i32 [ %0, %1 ], [ %164, %163 ]
%11 = phi i32 [ 0, %1 ], [ %14, %163 ]
%12 = phi i32 [ undef, %1 ], [ %165, %163 ]
%13 = phi i32 [ undef, %1 ], [ %166, %163 ]
%14 = add nuw nsw i32 %11, 1
%15 = call i32 @Fetch(i32 %10)
%16 = add nsw i32 %10, 4
store i32 0, i32* %7
%17 = lshr i32 %15, 26
%18 = lshr i32 %15, 21
%19 = and i32 %18, 31
%20 = lshr i32 %15, 16
%21 = and i32 %20, 31
%22 = lshr i32 %15, 11
%23 = and i32 %22, 31
%24 = lshr i32 %15, 6
%25 = and i32 %24, 31
%26 = shl i32 %15, 16
%27 = ashr exact i32 %26, 16
%28 = and i32 %15, 67108863
switch i32 %17, label %196 [
i32 0, label %29
i32 2, label %111
i32 3, label %115
i32 4, label %119
i32 5, label %130
i32 9, label %141
i32 12, label %148
i32 15, label %156
i32 26, label %159
i32 35, label %179
i32 43, label %187
]
29: ; preds = %9
%30 = and i32 %15, 63
switch i32 %30, label %196 [
i32 0, label %31
i32 3, label %38
i32 8, label %45
i32 16, label %49
i32 18, label %52
i32 24, label %55
i32 26, label %68
i32 33, label %79
i32 35, label %89
i32 42, label %99
]
31: ; preds = %29
%32 = zext i32 %19 to i64
%33 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %32
%34 = load i32, i32* %33
%35 = shl i32 %34, %25
%36 = zext i32 %23 to i64
%37 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %36
store i32 %35, i32* %37
br label %163
38: ; preds = %29
%39 = zext i32 %19 to i64
%40 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %39
%41 = load i32, i32* %40
%42 = ashr i32 %41, %25
%43 = zext i32 %23 to i64
%44 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %43
store i32 %42, i32* %44
br label %163
45: ; preds = %29
%46 = zext i32 %19 to i64
%47 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %46
%48 = load i32, i32* %47
br label %163
49: ; preds = %29
%50 = zext i32 %23 to i64
%51 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %50
store i32 %13, i32* %51
br label %163
52: ; preds = %29
%53 = zext i32 %23 to i64
%54 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %53
store i32 %12, i32* %54
br label %163
55: ; preds = %29
%56 = zext i32 %19 to i64
%57 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %56
%58 = load i32, i32* %57
%59 = sext i32 %58 to i64
%60 = zext i32 %21 to i64
%61 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %60
%62 = load i32, i32* %61
%63 = sext i32 %62 to i64
%64 = mul nsw i64 %63, %59
%65 = trunc i64 %64 to i32
%66 = lshr i64 %64, 32
%67 = trunc i64 %66 to i32
br label %163
68: ; preds = %29
%69 = zext i32 %21 to i64
%70 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %69
%71 = load i32, i32* %70
%72 = icmp eq i32 %71, 0
br i1 %72, label %196, label %73
73: ; preds = %68
%74 = zext i32 %19 to i64
%75 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %74
%76 = load i32, i32* %75
%77 = sdiv i32 %76, %71
%78 = srem i32 %76, %71
br label %163
79: ; preds = %29
%80 = zext i32 %19 to i64
%81 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %80
%82 = load i32, i32* %81
%83 = zext i32 %21 to i64
%84 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %83
%85 = load i32, i32* %84
%86 = add nsw i32 %85, %82
%87 = zext i32 %23 to i64
%88 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %87
store i32 %86, i32* %88
br label %163
89: ; preds = %29
%90 = zext i32 %19 to i64
%91 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %90
%92 = load i32, i32* %91
%93 = zext i32 %21 to i64
%94 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %93
%95 = load i32, i32* %94
%96 = sub nsw i32 %92, %95
%97 = zext i32 %23 to i64
%98 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %97
store i32 %96, i32* %98
br label %163
99: ; preds = %29
%100 = zext i32 %19 to i64
%101 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %100
%102 = load i32, i32* %101
%103 = zext i32 %21 to i64
%104 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %103
%105 = load i32, i32* %104
%106 = icmp slt i32 %102, %105
%107 = zext i32 %23 to i64
%108 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %107
br i1 %106, label %109, label %110
109: ; preds = %99
store i32 1, i32* %108
br label %163
110: ; preds = %99
store i32 0, i32* %108
br label %163
111: ; preds = %9
%112 = and i32 %16, -268435456
%113 = shl nuw nsw i32 %28, 2
%114 = or i32 %113, %112
br label %163
115: ; preds = %9
store i32 %16, i32* %8
%116 = and i32 %16, -268435456
%117 = shl nuw nsw i32 %28, 2
%118 = or i32 %117, %116
br label %163
119: ; preds = %9
%120 = zext i32 %19 to i64
%121 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %120
%122 = load i32, i32* %121
%123 = zext i32 %21 to i64
%124 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %123
%125 = load i32, i32* %124
%126 = icmp eq i32 %122, %125
br i1 %126, label %127, label %163
127: ; preds = %119
%128 = ashr exact i32 %26, 14
%129 = add nsw i32 %128, %16
br label %163
130: ; preds = %9
%131 = zext i32 %19 to i64
%132 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %131
%133 = load i32, i32* %132
%134 = zext i32 %21 to i64
%135 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %134
%136 = load i32, i32* %135
%137 = icmp eq i32 %133, %136
br i1 %137, label %163, label %138
138: ; preds = %130
%139 = ashr exact i32 %26, 14
%140 = add nsw i32 %139, %16
br label %163
141: ; preds = %9
%142 = zext i32 %19 to i64
%143 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %142
%144 = load i32, i32* %143
%145 = add nsw i32 %144, %27
%146 = zext i32 %21 to i64
%147 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %146
store i32 %145, i32* %147
br label %163
148: ; preds = %9
%149 = and i32 %15, 65535
%150 = zext i32 %19 to i64
%151 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %150
%152 = load i32, i32* %151
%153 = and i32 %149, %152
%154 = zext i32 %21 to i64
%155 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %154
store i32 %153, i32* %155
br label %163
156: ; preds = %9
%157 = zext i32 %21 to i64
%158 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %157
store i32 %26, i32* %158
br label %163
159: ; preds = %9
%160 = and i32 %15, 15
switch i32 %160, label %196 [
i32 0, label %161
i32 1, label %167
i32 5, label %172
i32 10, label %200
]
161: ; preds = %159
%162 = call i32 @putchar(i32 10)
br label %163
163: ; preds = %161, %167, %172, %130, %138, %119, %127, %31, %38, %45, %49, %52, %55, %79, %89, %73, %110, %109, %187, %179, %156, %148, %141, %115, %111
%164 = phi i32 [ %16, %187 ], [ %16, %179 ], [ %16, %172 ], [ %16, %167 ], [ %16, %161 ], [ %16, %156 ], [ %16, %148 ], [ %16, %141 ], [ %140, %138 ], [ %16, %130 ], [ %129, %127 ], [ %16, %119 ], [ %118, %115 ], [ %114, %111 ], [ %16, %109 ], [ %16, %110 ], [ %16, %89 ], [ %16, %79 ], [ %16, %73 ], [ %16, %55 ], [ %16, %52 ], [ %16, %49 ], [ %48, %45 ], [ %16, %38 ], [ %16, %31 ]
%165 = phi i32 [ %12, %187 ], [ %12, %179 ], [ %12, %172 ], [ %12, %167 ], [ %12, %161 ], [ %12, %156 ], [ %12, %148 ], [ %12, %141 ], [ %12, %138 ], [ %12, %130 ], [ %12, %127 ], [ %12, %119 ], [ %12, %115 ], [ %12, %111 ], [ %12, %109 ], [ %12, %110 ], [ %12, %89 ], [ %12, %79 ], [ %77, %73 ], [ %65, %55 ], [ %12, %52 ], [ %12, %49 ], [ %12, %45 ], [ %12, %38 ], [ %12, %31 ]
%166 = phi i32 [ %13, %187 ], [ %13, %179 ], [ %13, %172 ], [ %13, %167 ], [ %13, %161 ], [ %13, %156 ], [ %13, %148 ], [ %13, %141 ], [ %13, %138 ], [ %13, %130 ], [ %13, %127 ], [ %13, %119 ], [ %13, %115 ], [ %13, %111 ], [ %13, %109 ], [ %13, %110 ], [ %13, %89 ], [ %13, %79 ], [ %78, %73 ], [ %67, %55 ], [ %13, %52 ], [ %13, %49 ], [ %13, %45 ], [ %13, %38 ], [ %13, %31 ]
br label %9
167: ; preds = %159
%168 = zext i32 %19 to i64
%169 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %168
%170 = load i32, i32* %169
%171 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %170)
br label %163
172: ; preds = %159
%173 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%174 = load i32, i32* @stdout
%175 = call i32 @fflush(i32 %174)
%176 = zext i32 %21 to i64
%177 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %176
%178 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %177)
br label %163
179: ; preds = %9
%180 = zext i32 %19 to i64
%181 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %180
%182 = load i32, i32* %181
%183 = add nsw i32 %182, %27
%184 = call i32 @LoadWord(i32 %183)
%185 = zext i32 %21 to i64
%186 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %185
store i32 %184, i32* %186
br label %163
187: ; preds = %9
%188 = zext i32 %21 to i64
%189 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %188
%190 = load i32, i32* %189
%191 = zext i32 %19 to i64
%192 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %191
%193 = load i32, i32* %192
%194 = add nsw i32 %193, %27
%195 = call i32 @StoreWord(i32 %190, i32 %194)
br label %163
196: ; preds = %9, %159, %29, %68
%197 = phi i8* [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), %68 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), %29 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), %159 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), %9 ]
%198 = load i32, i32* @stderr
%199 = call i32 @fprintf(i32 %198, i8* %197, i32 %10)
br label %200
200: ; preds = %159, %196
%201 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.7, i64 0, i64 0), i32 %16, i32 %14)
%202 = call i32 (...) @cacheReport()
ret void
}