#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 uint8_t;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int EXIT_SUCCESS;
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int sscanf(char *, char *, int *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strlen(char *);
scalar_t__ strncmp(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  int i = 0;
  uint8_t regs[8];
  uint8_t PC = 0;
  int flags[8] = {0, 0, 0, 0, 0, 0, 0, 0};
  uint8_t SR = 0;
  uint8_t MAR = 0;
  uint8_t MDR = 0;
  uint8_t mem[256];
  uint8_t stack[32];
  int stack_top = 0;
  int val1 = 0;
  int op1 = 0;
  int op2 = 0;
  int op3 = 0;
  uint8_t temp = 0;
  char buf[1000];
  buf[0] = '\0';
  srand(time(NULL));
  for (i = 0; i < 8; i++) {
    regs[i] = rand();
  }
  i = 0;
  for (i = 0; i < 256; i++) {
    mem[i] = rand();
  }
  i = 0;
  while (fgets(buf, sizeof(buf), stdin)) {
    if (buf[0] == '.') {
      if (strncmp(buf, ".help", strlen(".help")) == 0) {
        printf("Instructions:\n");
        printf("add a, b, dst\n");
        printf("sub a, b, dst\n");
        printf("mov src, dst\n");
        printf("mov dst, num\n");
        printf("xchg a, b\n");
        printf("push reg\n");
        printf("pop\n");
        printf("hlt\n");
        printf("load\n");
        printf("read dst\n");
        printf("rst\n\n");
        printf("and a, b, dst\n");
        printf("Commands:\n");
        printf(".help\n");
        printf(".show\n");
        printf(".quit\n");
      } else if (strncmp(buf, ".show", strlen(".show")) == 0) {
        for (i = 0; i < 8; i++) {
          printf("r%d: %d\n", i, regs[i]);
        }
        i = 0;
        printf("SR: %d\n", SR);
        printf("PC: %d\n", PC);
        printf("FLAGS: %d %d %d %d %d %d %d %d\n", flags[0], flags[1], flags[2],
               flags[3], flags[4], flags[5], flags[6], flags[7]);
        printf("MAR: %d\n", MAR);
        printf("MDR: %d\n", MDR);
        printf("-----------------------------------------------------"
               "---------------------------\n");
      } else if (strncmp(buf, ".quit", strlen(".quit")) == 0) {
        return EXIT_SUCCESS;
      }
    } else {
      PC = MAR;
      for (i = 0; i < 8; i++) {
        flags[i] = 0;
      }
      i = 0;
      if (sscanf(buf, "jmp %d", &val1) == 1) {
        MAR = val1;
      } else if (sscanf(buf, "add r%d, r%d, r%d", &op1, &op2, &op3) == 3) {
        regs[op3] = regs[op1] + regs[op2];
      } else if (sscanf(buf, "sub r%d, r%d, r%d", &op1, &op2, &op3) == 3) {
        regs[op3] = regs[op1] - regs[op2];
        if (regs[op2] > regs[op1]) {
          flags[0] = 1;
        }
      } else if (sscanf(buf, "mov r%d, r%d", &op1, &op2) == 2) {
        regs[op2] = regs[op1];
      } else if (sscanf(buf, "mov r%d, %d", &op1, &val1) == 2) {
        regs[op1] = val1;
        if (val1 > 255) {
          flags[0] = 1;
        } else if (val1 < 0) {
          flags[1] = 1;
        }
      } else if (sscanf(buf, "push r%d", &op1) == 1) {
        if (stack_top == 32) {
          flags[2] = 1;
        } else {
          stack_top++;
          stack[stack_top] = regs[op1];
          SR = stack[stack_top];
        }
      } else if (sscanf(buf, "read r%d", &op1) == 1) {
        regs[op1] = MDR;
      } else if (sscanf(buf, "and r%d, r%d, r%d", &op1, &op2, &op3) == 3) {
        if (regs[op1] && regs[op2]) {
          regs[op3] = 1;
        } else {
          regs[op3] = 0;
        }
      } else if (sscanf(buf, "or r%d, r%d, r%d", &op1, &op2, &op3) == 3) {
        if (regs[op1] || regs[op2]) {
          regs[op3] = 1;
        } else {
          regs[op3] = 0;
        }
      } else if (sscanf(buf, "xchg r%d, r%d", &op1, &op2) == 2) {
        temp = regs[op1];
        regs[op1] = regs[op2];
        regs[op2] = temp;
      } else if (sscanf(buf, "write r%d", &op1) == 1) {
        MDR = regs[op1];
      } else if (strncmp(buf, "save", strlen("save")) == 0) {
        mem[MAR] = MDR;
      } else if (strncmp(buf, "pop", strlen("pop")) == 0) {
        if (stack_top == 0) {
          flags[3] = 1;
        } else {
          stack[stack_top] = 0;
          stack_top--;
          SR = stack[stack_top];
        }
      } else if (strncmp(buf, "hlt", strlen("hlt")) == 0) {
        break;
      } else if (strncmp(buf, "load", strlen("load")) == 0) {
        MDR = mem[MAR];
      } else if (strncmp(buf, "nop", strlen("nop")) == 0) {
      } else if (strncmp(buf, "rst", strlen("rst")) == 0) {
        for (i = 0; i < 8; i++) {
          regs[i] = 0;
        }
        i = 0;
      } else {
        fprintf(stderr, "Invalid input.\n");
        MAR--;
      }
      MAR++;
      PC = MAR;
      for (i = 0; i < 8; i++) {
        printf("r%d: %d\n", i, regs[i]);
      }
      i = 0;
      printf("SR: %d\n", SR);
      printf("PC: %d\n", PC);
      printf("FLAGS: %d %d %d %d %d %d %d %d\n", flags[0], flags[1], flags[2],
             flags[3], flags[4], flags[5], flags[6], flags[7]);
      printf("MAR: %d\n", MAR);
      printf("MDR: %d\n", MDR);
      printf("---------------------------------------------------------"
             "-----------------------\n");
    }
    op1 = 0;
    op2 = 0;
    op3 = 0;
    val1 = 0;
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x950,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x34(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1060 <memset@plt>
movl   $0x0,-0x64(%rbp)
movl   $0x0,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x0,-0x4f4(%rbp)
movl   $0x0,-0x4f8(%rbp)
movl   $0x0,-0x4fc(%rbp)
movl   $0x0,-0x500(%rbp)
movl   $0x0,-0x504(%rbp)
movl   $0x0,-0x508(%rbp)
movb   $0x0,-0x8f0(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10a0 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1268 <main+0xc8>
mov    $0x0,%al
call   10c0 <rand@plt>
mov    %eax,%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    123f <main+0x9f>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x100,-0x8(%rbp)
jge    12a5 <main+0x105>
mov    $0x0,%al
call   10c0 <rand@plt>
mov    %eax,%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x470(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1276 <main+0xd6>
movl   $0x0,-0x8(%rbp)
lea    -0x8f0(%rbp),%rdi
mov    0x2d2e(%rip),%rax
mov    (%rax),%edx
mov    $0x3e8,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     1d3b <main+0xb9b>
movsbl -0x8f0(%rbp),%eax
cmp    $0x2e,%eax
jne    156b <main+0x3cb>
lea    -0x8f0(%rbp),%rax
mov    %rax,-0x8f8(%rbp)
lea    0xd0b(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x8f8(%rbp),%rdi
mov    %eax,%edx
lea    0xcf6(%rip),%rsi
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    140c <main+0x26c>
lea    0xce6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xce7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xce8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xce6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcd9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcd0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcc8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcc4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcbc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcbd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcba(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcb3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcac(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1566 <main+0x3c6>
lea    -0x8f0(%rbp),%rax
mov    %rax,-0x900(%rbp)
lea    0xc92(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x900(%rbp),%rdi
mov    %eax,%edx
lea    0xc7d(%rip),%rsi
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1512 <main+0x372>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    147d <main+0x2dd>
mov    -0x8(%rbp),%esi
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
lea    0xc51(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    144c <main+0x2ac>
movl   $0x0,-0x8(%rbp)
mov    -0x64(%rbp),%esi
lea    0xc34(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0xc2b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x60(%rbp),%esi
mov    -0x5c(%rbp),%edx
mov    -0x58(%rbp),%ecx
mov    -0x54(%rbp),%r8d
mov    -0x50(%rbp),%r9d
mov    -0x4c(%rbp),%r11d
mov    -0x48(%rbp),%r10d
mov    -0x44(%rbp),%eax
lea    0xc09(%rip),%rdi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x68(%rbp),%esi
lea    0xc0b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x6c(%rbp),%esi
lea    0xc03(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xbfe(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1561 <main+0x3c1>
lea    -0x8f0(%rbp),%rax
mov    %rax,-0x908(%rbp)
lea    0xc2f(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x908(%rbp),%rdi
mov    %eax,%edx
lea    0xc1a(%rip),%rsi
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    155c <main+0x3bc>
mov    0x2a7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1d47 <main+0xba7>
jmp    1561 <main+0x3c1>
jmp    1566 <main+0x3c6>
jmp    1d0e <main+0xb6e>
mov    -0x68(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    159c <main+0x3fc>
movslq -0x8(%rbp),%rax
movl   $0x0,-0x60(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1578 <main+0x3d8>
movl   $0x0,-0x8(%rbp)
lea    -0x8f0(%rbp),%rdi
lea    0xbab(%rip),%rsi
lea    -0x4f8(%rbp),%rdx
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
jne    15d6 <main+0x436>
mov    -0x4f8(%rbp),%eax
mov    %eax,-0x68(%rbp)
jmp    1c37 <main+0xa97>
lea    -0x8f0(%rbp),%rdi
lea    0xb7f(%rip),%rsi
lea    -0x4fc(%rbp),%rdx
lea    -0x500(%rbp),%rcx
lea    -0x504(%rbp),%r8
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x3,%eax
jne    162f <main+0x48f>
movslq -0x4fc(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
movslq -0x500(%rbp),%rax
add    -0x30(%rbp,%rax,4),%ecx
movslq -0x504(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
jmp    1c32 <main+0xa92>
lea    -0x8f0(%rbp),%rdi
lea    0xb38(%rip),%rsi
lea    -0x4fc(%rbp),%rdx
lea    -0x500(%rbp),%rcx
lea    -0x504(%rbp),%r8
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x3,%eax
jne    16ab <main+0x50b>
movslq -0x4fc(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
movslq -0x500(%rbp),%rax
sub    -0x30(%rbp,%rax,4),%ecx
movslq -0x504(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
movslq -0x500(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
movslq -0x4fc(%rbp),%rcx
cmp    -0x30(%rbp,%rcx,4),%eax
jle    16a6 <main+0x506>
movl   $0x1,-0x60(%rbp)
jmp    1c2d <main+0xa8d>
lea    -0x8f0(%rbp),%rdi
lea    0xace(%rip),%rsi
lea    -0x4fc(%rbp),%rdx
lea    -0x500(%rbp),%rcx
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jne    16f2 <main+0x552>
movslq -0x4fc(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
movslq -0x500(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
jmp    1c28 <main+0xa88>
lea    -0x8f0(%rbp),%rdi
lea    0xa94(%rip),%rsi
lea    -0x4fc(%rbp),%rdx
lea    -0x4f8(%rbp),%rcx
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jne    1769 <main+0x5c9>
mov    -0x4f8(%rbp),%ecx
movslq -0x4fc(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
cmpl   $0xff,-0x4f8(%rbp)
jle    174b <main+0x5ab>
movl   $0x1,-0x60(%rbp)
jmp    1764 <main+0x5c4>
cmpl   $0x0,-0x4f8(%rbp)
jge    175f <main+0x5bf>
movl   $0x1,-0x5c(%rbp)
jmp    1764 <main+0x5c4>
jmp    1c23 <main+0xa83>
lea    -0x8f0(%rbp),%rdi
lea    0xa29(%rip),%rsi
lea    -0x4fc(%rbp),%rdx
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
jne    17e5 <main+0x645>
cmpl   $0x20,-0x4f4(%rbp)
jne    17a7 <main+0x607>
movl   $0x1,-0x58(%rbp)
jmp    17e0 <main+0x640>
mov    -0x4f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4f4(%rbp)
movslq -0x4fc(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
movslq -0x4f4(%rbp),%rax
mov    %ecx,-0x4f0(%rbp,%rax,4)
movslq -0x4f4(%rbp),%rax
mov    -0x4f0(%rbp,%rax,4),%eax
mov    %eax,-0x64(%rbp)
jmp    1c1e <main+0xa7e>
lea    -0x8f0(%rbp),%rdi
lea    0x9b6(%rip),%rsi
lea    -0x4fc(%rbp),%rdx
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
jne    181d <main+0x67d>
mov    -0x6c(%rbp),%ecx
movslq -0x4fc(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
jmp    1c19 <main+0xa79>
lea    -0x8f0(%rbp),%rdi
lea    0x987(%rip),%rsi
lea    -0x4fc(%rbp),%rdx
lea    -0x500(%rbp),%rcx
lea    -0x504(%rbp),%r8
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x3,%eax
jne    189c <main+0x6fc>
movslq -0x4fc(%rbp),%rax
cmpl   $0x0,-0x30(%rbp,%rax,4)
je     1888 <main+0x6e8>
movslq -0x500(%rbp),%rax
cmpl   $0x0,-0x30(%rbp,%rax,4)
je     1888 <main+0x6e8>
movslq -0x504(%rbp),%rax
movl   $0x1,-0x30(%rbp,%rax,4)
jmp    1897 <main+0x6f7>
movslq -0x504(%rbp),%rax
movl   $0x0,-0x30(%rbp,%rax,4)
jmp    1c14 <main+0xa74>
lea    -0x8f0(%rbp),%rdi
lea    0x91a(%rip),%rsi
lea    -0x4fc(%rbp),%rdx
lea    -0x500(%rbp),%rcx
lea    -0x504(%rbp),%r8
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x3,%eax
jne    191b <main+0x77b>
movslq -0x4fc(%rbp),%rax
cmpl   $0x0,-0x30(%rbp,%rax,4)
jne    18f3 <main+0x753>
movslq -0x500(%rbp),%rax
cmpl   $0x0,-0x30(%rbp,%rax,4)
je     1907 <main+0x767>
movslq -0x504(%rbp),%rax
movl   $0x1,-0x30(%rbp,%rax,4)
jmp    1916 <main+0x776>
movslq -0x504(%rbp),%rax
movl   $0x0,-0x30(%rbp,%rax,4)
jmp    1c0f <main+0xa6f>
lea    -0x8f0(%rbp),%rdi
lea    0x8ac(%rip),%rsi
lea    -0x4fc(%rbp),%rdx
lea    -0x500(%rbp),%rcx
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jne    1984 <main+0x7e4>
movslq -0x4fc(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
mov    %eax,-0x508(%rbp)
movslq -0x500(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
movslq -0x4fc(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x508(%rbp),%ecx
movslq -0x500(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
jmp    1c0a <main+0xa6a>
lea    -0x8f0(%rbp),%rdi
lea    0x851(%rip),%rsi
lea    -0x4fc(%rbp),%rdx
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
jne    19bc <main+0x81c>
movslq -0x4fc(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
mov    %eax,-0x6c(%rbp)
jmp    1c05 <main+0xa65>
lea    -0x8f0(%rbp),%rax
mov    %rax,-0x910(%rbp)
lea    0x81c(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x910(%rbp),%rdi
mov    %eax,%edx
lea    0x807(%rip),%rsi
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1a08 <main+0x868>
mov    -0x6c(%rbp),%ecx
movslq -0x68(%rbp),%rax
mov    %ecx,-0x470(%rbp,%rax,4)
jmp    1c00 <main+0xa60>
lea    -0x8f0(%rbp),%rax
mov    %rax,-0x918(%rbp)
lea    0x7d5(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x918(%rbp),%rdi
mov    %eax,%edx
lea    0x7c0(%rip),%rsi
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1a91 <main+0x8f1>
cmpl   $0x0,-0x4f4(%rbp)
jne    1a5a <main+0x8ba>
movl   $0x1,-0x54(%rbp)
jmp    1a8c <main+0x8ec>
movslq -0x4f4(%rbp),%rax
movl   $0x0,-0x4f0(%rbp,%rax,4)
mov    -0x4f4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4f4(%rbp)
movslq -0x4f4(%rbp),%rax
mov    -0x4f0(%rbp,%rax,4),%eax
mov    %eax,-0x64(%rbp)
jmp    1bfb <main+0xa5b>
lea    -0x8f0(%rbp),%rax
mov    %rax,-0x920(%rbp)
lea    0x750(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x920(%rbp),%rdi
mov    %eax,%edx
lea    0x73b(%rip),%rsi
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1acf <main+0x92f>
jmp    1d3b <main+0xb9b>
lea    -0x8f0(%rbp),%rax
mov    %rax,-0x928(%rbp)
lea    0x716(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x928(%rbp),%rdi
mov    %eax,%edx
lea    0x701(%rip),%rsi
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1b1b <main+0x97b>
movslq -0x68(%rbp),%rax
mov    -0x470(%rbp,%rax,4),%eax
mov    %eax,-0x6c(%rbp)
jmp    1bf1 <main+0xa51>
lea    -0x8f0(%rbp),%rax
mov    %rax,-0x930(%rbp)
lea    0x6cf(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x930(%rbp),%rdi
mov    %eax,%edx
lea    0x6ba(%rip),%rsi
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1b59 <main+0x9b9>
jmp    1bec <main+0xa4c>
lea    -0x8f0(%rbp),%rax
mov    %rax,-0x938(%rbp)
lea    0x695(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x938(%rbp),%rdi
mov    %eax,%edx
lea    0x680(%rip),%rsi
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1bc9 <main+0xa29>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1bbd <main+0xa1d>
movslq -0x8(%rbp),%rax
movl   $0x0,-0x30(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1b99 <main+0x9f9>
movl   $0x0,-0x8(%rbp)
jmp    1be7 <main+0xa47>
mov    0x2408(%rip),%rax
mov    (%rax),%edi
lea    0x62e(%rip),%rsi
call   1090 <fprintf@plt>
mov    -0x68(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x68(%rbp)
jmp    1bec <main+0xa4c>
jmp    1bf1 <main+0xa51>
jmp    1bf6 <main+0xa56>
jmp    1bfb <main+0xa5b>
jmp    1c00 <main+0xa60>
jmp    1c05 <main+0xa65>
jmp    1c0a <main+0xa6a>
jmp    1c0f <main+0xa6f>
jmp    1c14 <main+0xa74>
jmp    1c19 <main+0xa79>
jmp    1c1e <main+0xa7e>
jmp    1c23 <main+0xa83>
jmp    1c28 <main+0xa88>
jmp    1c2d <main+0xa8d>
jmp    1c32 <main+0xa92>
jmp    1c37 <main+0xa97>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1c7e <main+0xade>
mov    -0x8(%rbp),%esi
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
lea    0x450(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1c4d <main+0xaad>
movl   $0x0,-0x8(%rbp)
mov    -0x64(%rbp),%esi
lea    0x433(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0x42a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x60(%rbp),%esi
mov    -0x5c(%rbp),%edx
mov    -0x58(%rbp),%ecx
mov    -0x54(%rbp),%r8d
mov    -0x50(%rbp),%r9d
mov    -0x4c(%rbp),%r11d
mov    -0x48(%rbp),%r10d
mov    -0x44(%rbp),%eax
lea    0x408(%rip),%rdi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x68(%rbp),%esi
lea    0x40a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x6c(%rbp),%esi
lea    0x402(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x3fd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4fc(%rbp)
movl   $0x0,-0x500(%rbp)
movl   $0x0,-0x504(%rbp)
movl   $0x0,-0x4f8(%rbp)
jmp    12ac <main+0x10c>
mov    0x228e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x950,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x8d8,%rsp
movl   $0x0,0x4c(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0xc(%rsp)
movb   $0x0,0xe0(%rsp)
xor    %edi,%edi
call   10a0 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %eax,0x20(%rsp)
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %eax,0x24(%rsp)
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %eax,0x28(%rsp)
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %eax,0x2c(%rsp)
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %eax,0x30(%rsp)
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %eax,0x34(%rsp)
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %eax,0x38(%rsp)
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %eax,0x3c(%rsp)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %eax,0x4d0(%rsp,%rbx,4)
add    $0x1,%rbx
cmp    $0x100,%rbx
jne    1250 <main+0xb0>
mov    0x2d76(%rip),%rax
mov    (%rax),%edx
lea    0xe0(%rsp),%rdi
mov    $0x3e8,%esi
call   1080 <fgets@plt>
test   %rax,%rax
je     1b56 <main+0x9b6>
lea    0xc(%rsp),%r12
movl   $0x0,0x5c(%rsp)
xor    %r14d,%r14d
xor    %r13d,%r13d
xor    %ebx,%ebx
movl   $0x0,0x18(%rsp)
movl   $0x0,0x1c(%rsp)
xor    %r15d,%r15d
movl   $0x0,0x50(%rsp)
movl   $0x0,0x58(%rsp)
jmp    13e1 <main+0x241>
lea    0xe77(%rip),%rdi
call   1040 <puts@plt>
lea    0xe79(%rip),%rdi
call   1040 <puts@plt>
lea    0xe7b(%rip),%rdi
call   1040 <puts@plt>
lea    0xe7d(%rip),%rdi
call   1040 <puts@plt>
lea    0xe7e(%rip),%rdi
call   1040 <puts@plt>
lea    0xe7f(%rip),%rdi
call   1040 <puts@plt>
lea    0xe7d(%rip),%rdi
call   1040 <puts@plt>
lea    0xe7a(%rip),%rdi
call   1040 <puts@plt>
lea    0xe72(%rip),%rdi
call   1040 <puts@plt>
lea    0xe6a(%rip),%rdi
call   1040 <puts@plt>
lea    0xe63(%rip),%rdi
call   1040 <puts@plt>
lea    0xe60(%rip),%rdi
call   1040 <puts@plt>
lea    0xe59(%rip),%rdi
call   1040 <puts@plt>
lea    0xe5b(%rip),%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
lea    0xe57(%rip),%rdi
call   1040 <puts@plt>
lea    0xe51(%rip),%rdi
lea    0xc(%rsp),%r12
mov    0x54(%rsp),%ebx
call   1040 <puts@plt>
movl   $0x0,0x10(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x4c(%rsp)
mov    0x2c24(%rip),%rax
mov    (%rax),%edx
lea    0xe0(%rsp),%rdi
mov    $0x3e8,%esi
call   1080 <fgets@plt>
test   %rax,%rax
je     1b56 <main+0x9b6>
cmpb   $0x2e,0xe0(%rsp)
2e
jne    1490 <main+0x2f0>
mov    %ebx,0x54(%rsp)
lea    0xe0(%rsp),%rbx
lea    0xdd2(%rip),%r12
mov    %r12,%rdi
call   1050 <strlen@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12cc <main+0x12c>
lea    0xbe2(%rip),%r12
lea    0xdac(%rip),%rbp
mov    %rbp,%rdi
call   1050 <strlen@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1698 <main+0x4f8>
lea    0xd8d(%rip),%rbp
mov    %rbp,%rdi
call   1050 <strlen@plt>
lea    0xe0(%rsp),%rdi
mov    %rbp,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
lea    0xc(%rsp),%r12
mov    0x54(%rsp),%ebx
jne    139d <main+0x1fd>
jmp    1b56 <main+0x9b6>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xe0(%rsp),%rdi
lea    0xbac(%rip),%rsi
lea    0x4c(%rsp),%rdx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
jne    14c0 <main+0x320>
xor    %eax,%eax
mov    0x4c(%rsp),%r15d
jmp    1560 <main+0x3c0>
nopl   0x0(%rax)
lea    0xe0(%rsp),%rdi
lea    0xb83(%rip),%rsi
lea    0x10(%rsp),%r14
mov    %r14,%rdx
lea    0x14(%rsp),%rbp
mov    %rbp,%rcx
mov    %r12,%r8
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x3,%eax
jne    150d <main+0x36d>
movslq 0x10(%rsp),%rax
movslq 0x14(%rsp),%rcx
mov    0x20(%rsp,%rcx,4),%ecx
add    0x20(%rsp,%rax,4),%ecx
movslq 0xc(%rsp),%rax
mov    %ecx,0x20(%rsp,%rax,4)
xor    %eax,%eax
jmp    1560 <main+0x3c0>
lea    0xe0(%rsp),%rdi
lea    0xb48(%rip),%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    %r12,%r8
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x3,%eax
jne    17b3 <main+0x613>
movslq 0x10(%rsp),%rax
mov    0x20(%rsp,%rax,4),%ecx
movslq 0x14(%rsp),%rdx
sub    0x20(%rsp,%rdx,4),%ecx
movslq 0xc(%rsp),%rsi
mov    %ecx,0x20(%rsp,%rsi,4)
mov    0x20(%rsp,%rdx,4),%ecx
cmp    0x20(%rsp,%rax,4),%ecx
setg   %al
nopl   0x0(%rax,%rax,1)
xor    %r14d,%r14d
xor    %r13d,%r13d
xor    %ebx,%ebx
movzbl %al,%r12d
mov    0x20(%rsp),%edx
lea    0xa89(%rip),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x24(%rsp),%edx
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x28(%rsp),%edx
mov    %rbp,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2c(%rsp),%edx
mov    %rbp,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x30(%rsp),%edx
mov    %rbp,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x34(%rsp),%edx
mov    %rbp,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x38(%rsp),%edx
mov    %rbp,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x3c(%rsp),%edx
mov    %rbp,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r15d
lea    0x9f6(%rip),%rdi
mov    0x50(%rsp),%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x9ec(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
sub    $0x8,%rsp
lea    0x9df(%rip),%rdi
mov    %r12d,0x64(%rsp)
mov    %r12d,%esi
mov    %r14d,%edx
mov    %r13d,%ecx
mov    %ebx,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
push   $0x0
push   $0x0
push   $0x0
call   1060 <printf@plt>
add    $0x20,%rsp
lea    0x9d3(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x9cb(%rip),%rdi
mov    0x1c(%rsp),%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xa70(%rip),%rdi
mov    %r15d,0x58(%rsp)
lea    0xc(%rsp),%r12
jmp    1398 <main+0x1f8>
mov    0x20(%rsp),%edx
lea    0x95d(%rip),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x24(%rsp),%edx
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x28(%rsp),%edx
mov    %rbp,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2c(%rsp),%edx
mov    %rbp,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x30(%rsp),%edx
mov    %rbp,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x34(%rsp),%edx
mov    %rbp,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x38(%rsp),%edx
mov    %rbp,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x3c(%rsp),%edx
mov    %rbp,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r12,%rdi
mov    0x50(%rsp),%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x8c8(%rip),%rdi
mov    0x58(%rsp),%esi
xor    %eax,%eax
call   1060 <printf@plt>
sub    $0x8,%rsp
lea    0x8ba(%rip),%rdi
mov    0x64(%rsp),%esi
mov    %r14d,%edx
mov    %r13d,%ecx
mov    0x5c(%rsp),%ebx
mov    %ebx,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
push   $0x0
push   $0x0
push   $0x0
call   1060 <printf@plt>
add    $0x20,%rsp
lea    0x8ae(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x8a6(%rip),%rdi
mov    0x1c(%rsp),%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x94b(%rip),%rdi
jmp    168e <main+0x4ee>
lea    0xe0(%rsp),%rdi
lea    0x8b4(%rip),%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jne    17eb <main+0x64b>
movslq 0x10(%rsp),%rax
mov    0x20(%rsp,%rax,4),%eax
movslq 0x14(%rsp),%rcx
mov    %eax,0x20(%rsp,%rcx,4)
jmp    1509 <main+0x369>
lea    0xe0(%rsp),%rdi
lea    0x889(%rip),%rsi
mov    %r14,%rdx
lea    0x4c(%rsp),%rcx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jne    1836 <main+0x696>
mov    0x4c(%rsp),%eax
movslq 0x10(%rsp),%rcx
mov    %eax,0x20(%rsp,%rcx,4)
mov    %eax,%r14d
shr    $0x1f,%r14d
xor    %r13d,%r13d
cmp    $0x100,%eax
setge  %al
cmovge %r13d,%r14d
jmp    1566 <main+0x3c6>
lea    0xe0(%rsp),%rdi
lea    0x84a(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
jne    1875 <main+0x6d5>
mov    0x18(%rsp),%edx
cmp    $0x20,%edx
jne    18a1 <main+0x701>
movl   $0x20,0x18(%rsp)
mov    $0x1,%r13d
xor    %eax,%eax
xor    %r14d,%r14d
jmp    1566 <main+0x3c6>
lea    0xe0(%rsp),%rdi
lea    0x814(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
jne    18c1 <main+0x721>
movslq 0x10(%rsp),%rax
mov    0x1c(%rsp),%ecx
jmp    1505 <main+0x365>
movslq 0x10(%rsp),%rax
mov    0x20(%rsp,%rax,4),%ecx
movslq %edx,%rax
add    $0x1,%edx
mov    %edx,0x18(%rsp)
mov    %ecx,0x50(%rsp)
mov    %ecx,0x64(%rsp,%rax,4)
jmp    1509 <main+0x369>
lea    0xe0(%rsp),%rdi
lea    0x7d1(%rip),%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    %r12,%r8
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x3,%eax
jne    18f3 <main+0x753>
movslq 0x10(%rsp),%rax
cmpl   $0x0,0x20(%rsp,%rax,4)
jne    1923 <main+0x783>
jmp    1941 <main+0x7a1>
lea    0xe0(%rsp),%rdi
lea    0x7b1(%rip),%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    %r12,%r8
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x3,%eax
jne    1953 <main+0x7b3>
movslq 0x10(%rsp),%rax
cmpl   $0x0,0x20(%rsp,%rax,4)
jne    192f <main+0x78f>
movslq 0x14(%rsp),%rax
cmpl   $0x0,0x20(%rsp,%rax,4)
je     1941 <main+0x7a1>
movslq 0xc(%rsp),%rax
movl   $0x1,0x20(%rsp,%rax,4)
jmp    1509 <main+0x369>
movslq 0xc(%rsp),%rax
movl   $0x0,0x20(%rsp,%rax,4)
jmp    1509 <main+0x369>
lea    0xe0(%rsp),%rdi
lea    0x762(%rip),%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jne    1993 <main+0x7f3>
movslq 0x10(%rsp),%rax
mov    0x20(%rsp,%rax,4),%ecx
movslq 0x14(%rsp),%rdx
mov    0x20(%rsp,%rdx,4),%esi
mov    %esi,0x20(%rsp,%rax,4)
mov    %ecx,0x20(%rsp,%rdx,4)
jmp    1509 <main+0x369>
lea    0xe0(%rsp),%rdi
lea    0x730(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
jne    19c3 <main+0x823>
movslq 0x10(%rsp),%rax
mov    0x20(%rsp,%rax,4),%eax
mov    %eax,0x1c(%rsp)
jmp    1509 <main+0x369>
lea    0x712(%rip),%rbp
mov    %rbp,%rdi
call   1050 <strlen@plt>
lea    0xe0(%rsp),%rdi
mov    %rbp,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1add <main+0x93d>
lea    0x7ad(%rip),%r14
mov    %r14,%rdi
call   1050 <strlen@plt>
lea    0xe0(%rsp),%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1af0 <main+0x950>
lea    0x787(%rip),%r14
mov    %r14,%rdi
call   1050 <strlen@plt>
lea    0xe0(%rsp),%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1b56 <main+0x9b6>
lea    0x761(%rip),%r14
mov    %r14,%rdi
call   1050 <strlen@plt>
lea    0xe0(%rsp),%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1b17 <main+0x977>
lea    0x66f(%rip),%rbp
mov    %rbp,%rdi
call   1050 <strlen@plt>
lea    0xe0(%rsp),%rdi
mov    %rbp,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1509 <main+0x369>
lea    0x649(%rip),%rbp
mov    %rbp,%rdi
call   1050 <strlen@plt>
lea    0xe0(%rsp),%rdi
mov    %rbp,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1b44 <main+0x9a4>
mov    0x2512(%rip),%rax
mov    (%rax),%edi
lea    0x61a(%rip),%rsi
call   1090 <fprintf@plt>
add    $0xffffffff,%r15d
jmp    1509 <main+0x369>
movslq %r15d,%rax
mov    0x1c(%rsp),%ecx
mov    %ecx,0x4d0(%rsp,%rax,4)
jmp    1509 <main+0x369>
mov    0x18(%rsp),%ecx
test   %ecx,%ecx
je     1b2a <main+0x98a>
movslq %ecx,%rax
movl   $0x0,0x60(%rsp,%rax,4)
add    $0xffffffff,%ecx
mov    %ecx,0x18(%rsp)
mov    0x5c(%rsp,%rax,4),%eax
mov    %eax,0x50(%rsp)
jmp    1509 <main+0x369>
movslq %r15d,%rax
mov    0x4d0(%rsp,%rax,4),%eax
mov    %eax,0x1c(%rsp)
jmp    1509 <main+0x369>
mov    $0x1,%ebx
xor    %eax,%eax
xor    %r14d,%r14d
xor    %r13d,%r13d
movl   $0x0,0x18(%rsp)
jmp    1568 <main+0x3c8>
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
jmp    1509 <main+0x369>
mov    0x2473(%rip),%rax
mov    (%rax),%eax
add    $0x8d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [6 x i8] c".help\00"
@.str.1 = [15 x i8] c"Instructions:\0A\00"
@.str.2 = [15 x i8] c"add a, b, dst\0A\00"
@.str.3 = [15 x i8] c"sub a, b, dst\0A\00"
@.str.4 = [14 x i8] c"mov src, dst\0A\00"
@.str.5 = [14 x i8] c"mov dst, num\0A\00"
@.str.6 = [11 x i8] c"xchg a, b\0A\00"
@.str.7 = [10 x i8] c"push reg\0A\00"
@.str.8 = [5 x i8] c"pop\0A\00"
@.str.9 = [5 x i8] c"hlt\0A\00"
@.str.10 = [6 x i8] c"load\0A\00"
@.str.11 = [10 x i8] c"read dst\0A\00"
@.str.12 = [6 x i8] c"rst\0A\0A\00"
@.str.13 = [15 x i8] c"and a, b, dst\0A\00"
@.str.14 = [11 x i8] c"Commands:\0A\00"
@.str.15 = [7 x i8] c".help\0A\00"
@.str.16 = [7 x i8] c".show\0A\00"
@.str.17 = [7 x i8] c".quit\0A\00"
@.str.18 = [6 x i8] c".show\00"
@.str.19 = [9 x i8] c"r%d: %d\0A\00"
@.str.20 = [8 x i8] c"SR: %d\0A\00"
@.str.21 = [8 x i8] c"PC: %d\0A\00"
@.str.22 = [32 x i8] c"FLAGS: %d %d %d %d %d %d %d %d\0A\00"
@.str.23 = [9 x i8] c"MAR: %d\0A\00"
@.str.24 = [9 x i8] c"MDR: %d\0A\00"
@.str.25 = [82 x i8] c"--------------------------------------------------------------------------------\0A\00"
@.str.26 = [6 x i8] c".quit\00"
@EXIT_SUCCESS = global i32 0
@.str.27 = [7 x i8] c"jmp %d\00"
@.str.28 = [18 x i8] c"add r%d, r%d, r%d\00"
@.str.29 = [18 x i8] c"sub r%d, r%d, r%d\00"
@.str.30 = [13 x i8] c"mov r%d, r%d\00"
@.str.31 = [12 x i8] c"mov r%d, %d\00"
@.str.32 = [9 x i8] c"push r%d\00"
@.str.33 = [9 x i8] c"read r%d\00"
@.str.34 = [18 x i8] c"and r%d, r%d, r%d\00"
@.str.35 = [17 x i8] c"or r%d, r%d, r%d\00"
@.str.36 = [14 x i8] c"xchg r%d, r%d\00"
@.str.37 = [10 x i8] c"write r%d\00"
@.str.38 = [5 x i8] c"save\00"
@.str.39 = [4 x i8] c"pop\00"
@.str.40 = [4 x i8] c"hlt\00"
@.str.41 = [5 x i8] c"load\00"
@.str.42 = [4 x i8] c"nop\00"
@.str.43 = [4 x i8] c"rst\00"
@stderr = global i32 0
@.str.44 = [16 x i8] c"Invalid input.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [8 x i32]
%4 = alloca i32
%5 = alloca [8 x i32]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [256 x i32]
%10 = alloca [32 x i32]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca [1000 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %4
%18 = bitcast [8 x i32]* %5 to i8*
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
%19 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
store i8 0, i8* %19
%20 = call i32 @time(i32* null)
%21 = call i32 @srand(i32 %20)
store i32 0, i32* %2
br label %22
22: ; preds = %30, %0
%23 = load i32, i32* %2
%24 = icmp slt i32 %23, 8
br i1 %24, label %25, label %33
25: ; preds = %22
%26 = call i32 (...) @rand()
%27 = load i32, i32* %2
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %28
store i32 %26, i32* %29
br label %30
30: ; preds = %25
%31 = load i32, i32* %2
%32 = add nsw i32 %31, 1
store i32 %32, i32* %2
br label %22
33: ; preds = %22
store i32 0, i32* %2
store i32 0, i32* %2
br label %34
34: ; preds = %42, %33
%35 = load i32, i32* %2
%36 = icmp slt i32 %35, 256
br i1 %36, label %37, label %45
37: ; preds = %34
%38 = call i32 (...) @rand()
%39 = load i32, i32* %2
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [256 x i32], [256 x i32]* %9, i64 0, i64 %40
store i32 %38, i32* %41
br label %42
42: ; preds = %37
%43 = load i32, i32* %2
%44 = add nsw i32 %43, 1
store i32 %44, i32* %2
br label %34
45: ; preds = %34
store i32 0, i32* %2
br label %46
46: ; preds = %478, %45
%47 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%48 = load i32, i32* @stdin
%49 = call i64 @fgets(i8* %47, i32 1000, i32 %48)
%50 = icmp ne i64 %49, 0
br i1 %50, label %51, label %479
51: ; preds = %46
%52 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = icmp eq i32 %54, 46
br i1 %55, label %56, label %135
56: ; preds = %51
%57 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%58 = call i32 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%59 = call i64 @strncmp(i8* %57, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %58)
%60 = icmp eq i64 %59, 0
br i1 %60, label %61, label %79
61: ; preds = %56
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0))
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0))
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0))
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0))
br label %134
79: ; preds = %56
%80 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%81 = call i32 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0))
%82 = call i64 @strncmp(i8* %80, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0), i32 %81)
%83 = icmp eq i64 %82, 0
br i1 %83, label %84, label %125
84: ; preds = %79
store i32 0, i32* %2
br label %85
85: ; preds = %95, %84
%86 = load i32, i32* %2
%87 = icmp slt i32 %86, 8
br i1 %87, label %88, label %98
88: ; preds = %85
%89 = load i32, i32* %2
%90 = load i32, i32* %2
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %91
%93 = load i32, i32* %92
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 %89, i32 %93)
br label %95
95: ; preds = %88
%96 = load i32, i32* %2
%97 = add nsw i32 %96, 1
store i32 %97, i32* %2
br label %85
98: ; preds = %85
store i32 0, i32* %2
%99 = load i32, i32* %6
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), i32 %99)
%101 = load i32, i32* %4
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0), i32 %101)
%103 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
%104 = load i32, i32* %103
%105 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 1
%106 = load i32, i32* %105
%107 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 2
%108 = load i32, i32* %107
%109 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 3
%110 = load i32, i32* %109
%111 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 4
%112 = load i32, i32* %111
%113 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 5
%114 = load i32, i32* %113
%115 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 6
%116 = load i32, i32* %115
%117 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 7
%118 = load i32, i32* %117
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.22, i64 0, i64 0), i32 %104, i32 %106, i32 %108, i32 %110, i32 %112, i32 %114, i32 %116, i32 %118)
%120 = load i32, i32* %7
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i32 %120)
%122 = load i32, i32* %8
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.24, i64 0, i64 0), i32 %122)
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.25, i64 0, i64 0))
br label %133
125: ; preds = %79
%126 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%127 = call i32 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.26, i64 0, i64 0))
%128 = call i64 @strncmp(i8* %126, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.26, i64 0, i64 0), i32 %127)
%129 = icmp eq i64 %128, 0
br i1 %129, label %130, label %132
130: ; preds = %125
%131 = load i32, i32* @EXIT_SUCCESS
store i32 %131, i32* %1
br label %481
132: ; preds = %125
br label %133
133: ; preds = %132, %98
br label %134
134: ; preds = %133, %61
br label %478
135: ; preds = %51
%136 = load i32, i32* %7
store i32 %136, i32* %4
store i32 0, i32* %2
br label %137
137: ; preds = %144, %135
%138 = load i32, i32* %2
%139 = icmp slt i32 %138, 8
br i1 %139, label %140, label %147
140: ; preds = %137
%141 = load i32, i32* %2
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 %142
store i32 0, i32* %143
br label %144
144: ; preds = %140
%145 = load i32, i32* %2
%146 = add nsw i32 %145, 1
store i32 %146, i32* %2
br label %137
147: ; preds = %137
store i32 0, i32* %2
%148 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%149 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %148, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.27, i64 0, i64 0), i32* %12)
%150 = icmp eq i32 %149, 1
br i1 %150, label %151, label %153
151: ; preds = %147
%152 = load i32, i32* %12
store i32 %152, i32* %7
br label %434
153: ; preds = %147
%154 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%155 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %154, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.28, i64 0, i64 0), i32* %13, i32* %14, i32* %15)
%156 = icmp eq i32 %155, 3
br i1 %156, label %157, label %170
157: ; preds = %153
%158 = load i32, i32* %13
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %159
%161 = load i32, i32* %160
%162 = load i32, i32* %14
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %163
%165 = load i32, i32* %164
%166 = add nsw i32 %161, %165
%167 = load i32, i32* %15
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %168
store i32 %166, i32* %169
br label %433
170: ; preds = %153
%171 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%172 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %171, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.29, i64 0, i64 0), i32* %13, i32* %14, i32* %15)
%173 = icmp eq i32 %172, 3
br i1 %173, label %174, label %199
174: ; preds = %170
%175 = load i32, i32* %13
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %176
%178 = load i32, i32* %177
%179 = load i32, i32* %14
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %180
%182 = load i32, i32* %181
%183 = sub nsw i32 %178, %182
%184 = load i32, i32* %15
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %185
store i32 %183, i32* %186
%187 = load i32, i32* %14
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %188
%190 = load i32, i32* %189
%191 = load i32, i32* %13
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %192
%194 = load i32, i32* %193
%195 = icmp sgt i32 %190, %194
br i1 %195, label %196, label %198
196: ; preds = %174
%197 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
store i32 1, i32* %197
br label %198
198: ; preds = %196, %174
br label %432
199: ; preds = %170
%200 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%201 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %200, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.30, i64 0, i64 0), i32* %13, i32* %14)
%202 = icmp eq i32 %201, 2
br i1 %202, label %203, label %211
203: ; preds = %199
%204 = load i32, i32* %13
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %205
%207 = load i32, i32* %206
%208 = load i32, i32* %14
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %209
store i32 %207, i32* %210
br label %431
211: ; preds = %199
%212 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%213 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %212, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.31, i64 0, i64 0), i32* %13, i32* %12)
%214 = icmp eq i32 %213, 2
br i1 %214, label %215, label %231
215: ; preds = %211
%216 = load i32, i32* %12
%217 = load i32, i32* %13
%218 = sext i32 %217 to i64
%219 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %218
store i32 %216, i32* %219
%220 = load i32, i32* %12
%221 = icmp sgt i32 %220, 255
br i1 %221, label %222, label %224
222: ; preds = %215
%223 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
store i32 1, i32* %223
br label %230
224: ; preds = %215
%225 = load i32, i32* %12
%226 = icmp slt i32 %225, 0
br i1 %226, label %227, label %229
227: ; preds = %224
%228 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 1
store i32 1, i32* %228
br label %229
229: ; preds = %227, %224
br label %230
230: ; preds = %229, %222
br label %430
231: ; preds = %211
%232 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%233 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %232, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.32, i64 0, i64 0), i32* %13)
%234 = icmp eq i32 %233, 1
br i1 %234, label %235, label %255
235: ; preds = %231
%236 = load i32, i32* %11
%237 = icmp eq i32 %236, 32
br i1 %237, label %238, label %240
238: ; preds = %235
%239 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 2
store i32 1, i32* %239
br label %254
240: ; preds = %235
%241 = load i32, i32* %11
%242 = add nsw i32 %241, 1
store i32 %242, i32* %11
%243 = load i32, i32* %13
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %244
%246 = load i32, i32* %245
%247 = load i32, i32* %11
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds [32 x i32], [32 x i32]* %10, i64 0, i64 %248
store i32 %246, i32* %249
%250 = load i32, i32* %11
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds [32 x i32], [32 x i32]* %10, i64 0, i64 %251
%253 = load i32, i32* %252
store i32 %253, i32* %6
br label %254
254: ; preds = %240, %238
br label %429
255: ; preds = %231
%256 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%257 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %256, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.33, i64 0, i64 0), i32* %13)
%258 = icmp eq i32 %257, 1
br i1 %258, label %259, label %264
259: ; preds = %255
%260 = load i32, i32* %8
%261 = load i32, i32* %13
%262 = sext i32 %261 to i64
%263 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %262
store i32 %260, i32* %263
br label %428
264: ; preds = %255
%265 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%266 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %265, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.34, i64 0, i64 0), i32* %13, i32* %14, i32* %15)
%267 = icmp eq i32 %266, 3
br i1 %267, label %268, label %289
268: ; preds = %264
%269 = load i32, i32* %13
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %270
%272 = load i32, i32* %271
%273 = icmp ne i32 %272, 0
br i1 %273, label %274, label %284
274: ; preds = %268
%275 = load i32, i32* %14
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %276
%278 = load i32, i32* %277
%279 = icmp ne i32 %278, 0
br i1 %279, label %280, label %284
280: ; preds = %274
%281 = load i32, i32* %15
%282 = sext i32 %281 to i64
%283 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %282
store i32 1, i32* %283
br label %288
284: ; preds = %274, %268
%285 = load i32, i32* %15
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %286
store i32 0, i32* %287
br label %288
288: ; preds = %284, %280
br label %427
289: ; preds = %264
%290 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%291 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %290, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.35, i64 0, i64 0), i32* %13, i32* %14, i32* %15)
%292 = icmp eq i32 %291, 3
br i1 %292, label %293, label %314
293: ; preds = %289
%294 = load i32, i32* %13
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %295
%297 = load i32, i32* %296
%298 = icmp ne i32 %297, 0
br i1 %298, label %305, label %299
299: ; preds = %293
%300 = load i32, i32* %14
%301 = sext i32 %300 to i64
%302 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %301
%303 = load i32, i32* %302
%304 = icmp ne i32 %303, 0
br i1 %304, label %305, label %309
305: ; preds = %299, %293
%306 = load i32, i32* %15
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %307
store i32 1, i32* %308
br label %313
309: ; preds = %299
%310 = load i32, i32* %15
%311 = sext i32 %310 to i64
%312 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %311
store i32 0, i32* %312
br label %313
313: ; preds = %309, %305
br label %426
314: ; preds = %289
%315 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%316 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %315, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.36, i64 0, i64 0), i32* %13, i32* %14)
%317 = icmp eq i32 %316, 2
br i1 %317, label %318, label %334
318: ; preds = %314
%319 = load i32, i32* %13
%320 = sext i32 %319 to i64
%321 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %320
%322 = load i32, i32* %321
store i32 %322, i32* %16
%323 = load i32, i32* %14
%324 = sext i32 %323 to i64
%325 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %324
%326 = load i32, i32* %325
%327 = load i32, i32* %13
%328 = sext i32 %327 to i64
%329 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %328
store i32 %326, i32* %329
%330 = load i32, i32* %16
%331 = load i32, i32* %14
%332 = sext i32 %331 to i64
%333 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %332
store i32 %330, i32* %333
br label %425
334: ; preds = %314
%335 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%336 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %335, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.37, i64 0, i64 0), i32* %13)
%337 = icmp eq i32 %336, 1
br i1 %337, label %338, label %343
338: ; preds = %334
%339 = load i32, i32* %13
%340 = sext i32 %339 to i64
%341 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %340
%342 = load i32, i32* %341
store i32 %342, i32* %8
br label %424
343: ; preds = %334
%344 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%345 = call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.38, i64 0, i64 0))
%346 = call i64 @strncmp(i8* %344, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.38, i64 0, i64 0), i32 %345)
%347 = icmp eq i64 %346, 0
br i1 %347, label %348, label %353
348: ; preds = %343
%349 = load i32, i32* %8
%350 = load i32, i32* %7
%351 = sext i32 %350 to i64
%352 = getelementptr inbounds [256 x i32], [256 x i32]* %9, i64 0, i64 %351
store i32 %349, i32* %352
br label %423
353: ; preds = %343
%354 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%355 = call i32 @strlen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.39, i64 0, i64 0))
%356 = call i64 @strncmp(i8* %354, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.39, i64 0, i64 0), i32 %355)
%357 = icmp eq i64 %356, 0
br i1 %357, label %358, label %374
358: ; preds = %353
%359 = load i32, i32* %11
%360 = icmp eq i32 %359, 0
br i1 %360, label %361, label %363
361: ; preds = %358
%362 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 3
store i32 1, i32* %362
br label %373
363: ; preds = %358
%364 = load i32, i32* %11
%365 = sext i32 %364 to i64
%366 = getelementptr inbounds [32 x i32], [32 x i32]* %10, i64 0, i64 %365
store i32 0, i32* %366
%367 = load i32, i32* %11
%368 = add nsw i32 %367, -1
store i32 %368, i32* %11
%369 = load i32, i32* %11
%370 = sext i32 %369 to i64
%371 = getelementptr inbounds [32 x i32], [32 x i32]* %10, i64 0, i64 %370
%372 = load i32, i32* %371
store i32 %372, i32* %6
br label %373
373: ; preds = %363, %361
br label %422
374: ; preds = %353
%375 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%376 = call i32 @strlen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.40, i64 0, i64 0))
%377 = call i64 @strncmp(i8* %375, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.40, i64 0, i64 0), i32 %376)
%378 = icmp eq i64 %377, 0
br i1 %378, label %379, label %380
379: ; preds = %374
br label %479
380: ; preds = %374
%381 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%382 = call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.41, i64 0, i64 0))
%383 = call i64 @strncmp(i8* %381, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.41, i64 0, i64 0), i32 %382)
%384 = icmp eq i64 %383, 0
br i1 %384, label %385, label %390
385: ; preds = %380
%386 = load i32, i32* %7
%387 = sext i32 %386 to i64
%388 = getelementptr inbounds [256 x i32], [256 x i32]* %9, i64 0, i64 %387
%389 = load i32, i32* %388
store i32 %389, i32* %8
br label %420
390: ; preds = %380
%391 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%392 = call i32 @strlen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.42, i64 0, i64 0))
%393 = call i64 @strncmp(i8* %391, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.42, i64 0, i64 0), i32 %392)
%394 = icmp eq i64 %393, 0
br i1 %394, label %395, label %396
395: ; preds = %390
br label %419
396: ; preds = %390
%397 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%398 = call i32 @strlen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.43, i64 0, i64 0))
%399 = call i64 @strncmp(i8* %397, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.43, i64 0, i64 0), i32 %398)
%400 = icmp eq i64 %399, 0
br i1 %400, label %401, label %413
401: ; preds = %396
store i32 0, i32* %2
br label %402
402: ; preds = %409, %401
%403 = load i32, i32* %2
%404 = icmp slt i32 %403, 8
br i1 %404, label %405, label %412
405: ; preds = %402
%406 = load i32, i32* %2
%407 = sext i32 %406 to i64
%408 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %407
store i32 0, i32* %408
br label %409
409: ; preds = %405
%410 = load i32, i32* %2
%411 = add nsw i32 %410, 1
store i32 %411, i32* %2
br label %402
412: ; preds = %402
store i32 0, i32* %2
br label %418
413: ; preds = %396
%414 = load i32, i32* @stderr
%415 = call i32 @fprintf(i32 %414, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.44, i64 0, i64 0))
%416 = load i32, i32* %7
%417 = add nsw i32 %416, -1
store i32 %417, i32* %7
br label %418
418: ; preds = %413, %412
br label %419
419: ; preds = %418, %395
br label %420
420: ; preds = %419, %385
br label %421
421: ; preds = %420
br label %422
422: ; preds = %421, %373
br label %423
423: ; preds = %422, %348
br label %424
424: ; preds = %423, %338
br label %425
425: ; preds = %424, %318
br label %426
426: ; preds = %425, %313
br label %427
427: ; preds = %426, %288
br label %428
428: ; preds = %427, %259
br label %429
429: ; preds = %428, %254
br label %430
430: ; preds = %429, %230
br label %431
431: ; preds = %430, %203
br label %432
432: ; preds = %431, %198
br label %433
433: ; preds = %432, %157
br label %434
434: ; preds = %433, %151
%435 = load i32, i32* %7
%436 = add nsw i32 %435, 1
store i32 %436, i32* %7
%437 = load i32, i32* %7
store i32 %437, i32* %4
store i32 0, i32* %2
br label %438
438: ; preds = %448, %434
%439 = load i32, i32* %2
%440 = icmp slt i32 %439, 8
br i1 %440, label %441, label %451
441: ; preds = %438
%442 = load i32, i32* %2
%443 = load i32, i32* %2
%444 = sext i32 %443 to i64
%445 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %444
%446 = load i32, i32* %445
%447 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 %442, i32 %446)
br label %448
448: ; preds = %441
%449 = load i32, i32* %2
%450 = add nsw i32 %449, 1
store i32 %450, i32* %2
br label %438
451: ; preds = %438
store i32 0, i32* %2
%452 = load i32, i32* %6
%453 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), i32 %452)
%454 = load i32, i32* %4
%455 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0), i32 %454)
%456 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
%457 = load i32, i32* %456
%458 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 1
%459 = load i32, i32* %458
%460 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 2
%461 = load i32, i32* %460
%462 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 3
%463 = load i32, i32* %462
%464 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 4
%465 = load i32, i32* %464
%466 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 5
%467 = load i32, i32* %466
%468 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 6
%469 = load i32, i32* %468
%470 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 7
%471 = load i32, i32* %470
%472 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.22, i64 0, i64 0), i32 %457, i32 %459, i32 %461, i32 %463, i32 %465, i32 %467, i32 %469, i32 %471)
%473 = load i32, i32* %7
%474 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i32 %473)
%475 = load i32, i32* %8
%476 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.24, i64 0, i64 0), i32 %475)
%477 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.25, i64 0, i64 0))
br label %478
478: ; preds = %451, %134
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %12
br label %46
479: ; preds = %379, %46
%480 = load i32, i32* @EXIT_SUCCESS
store i32 %480, i32* %1
br label %481
481: ; preds = %479, %130
%482 = load i32, i32* %1
ret i32 %482
}

LLVM IR (-O2):
@stdin = global i32 0
@.str.19 = [9 x i8] c"r%d: %d\0A\00"
@.str.20 = [8 x i8] c"SR: %d\0A\00"
@.str.21 = [8 x i8] c"PC: %d\0A\00"
@.str.22 = [32 x i8] c"FLAGS: %d %d %d %d %d %d %d %d\0A\00"
@.str.23 = [9 x i8] c"MAR: %d\0A\00"
@.str.24 = [9 x i8] c"MDR: %d\0A\00"
@EXIT_SUCCESS = global i32 0
@.str.27 = [7 x i8] c"jmp %d\00"
@.str.28 = [18 x i8] c"add r%d, r%d, r%d\00"
@.str.29 = [18 x i8] c"sub r%d, r%d, r%d\00"
@.str.30 = [13 x i8] c"mov r%d, r%d\00"
@.str.31 = [12 x i8] c"mov r%d, %d\00"
@.str.32 = [9 x i8] c"push r%d\00"
@.str.33 = [9 x i8] c"read r%d\00"
@.str.34 = [18 x i8] c"and r%d, r%d, r%d\00"
@.str.35 = [17 x i8] c"or r%d, r%d, r%d\00"
@.str.36 = [14 x i8] c"xchg r%d, r%d\00"
@.str.37 = [10 x i8] c"write r%d\00"
@.str.38 = [5 x i8] c"save\00"
@.str.42 = [4 x i8] c"nop\00"
@.str.43 = [4 x i8] c"rst\00"
@stderr = global i32 0
@.str.44 = [16 x i8] c"Invalid input.\0A\00"
@str.45 = [81 x i8] c"--------------------------------------------------------------------------------\00"
@str.46 = [14 x i8] c"Instructions:\00"
@str.47 = [14 x i8] c"add a, b, dst\00"
@str.48 = [14 x i8] c"sub a, b, dst\00"
@str.49 = [13 x i8] c"mov src, dst\00"
@str.50 = [13 x i8] c"mov dst, num\00"
@str.51 = [10 x i8] c"xchg a, b\00"
@str.52 = [9 x i8] c"push reg\00"
@str.53 = [4 x i8] c"pop\00"
@str.54 = [4 x i8] c"hlt\00"
@str.55 = [5 x i8] c"load\00"
@str.56 = [9 x i8] c"read dst\00"
@str.57 = [5 x i8] c"rst\0A\00"
@str.58 = [14 x i8] c"and a, b, dst\00"
@str.59 = [10 x i8] c"Commands:\00"
@str.60 = [6 x i8] c".help\00"
@str.61 = [6 x i8] c".show\00"
@str.62 = [6 x i8] c".quit\00"
define i32 @main() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = alloca [256 x i32]
%4 = alloca [32 x i32]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [1000 x i8]
%10 = bitcast [256 x i32]* %3 to i8*
%11 = bitcast [32 x i32]* %4 to i8*
%12 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%13 = bitcast i32* %6 to i8*
store i32 0, i32* %6
%14 = bitcast i32* %7 to i8*
store i32 0, i32* %7
%15 = bitcast i32* %8 to i8*
store i32 0, i32* %8
%16 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
store i8 0, i8* %16
%17 = tail call i32 @time(i32* null)
%18 = tail call i32 @srand(i32 %17)
%19 = tail call i32 (...) @rand()
%20 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
store i32 %19, i32* %20
%21 = tail call i32 (...) @rand()
%22 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 1
store i32 %21, i32* %22
%23 = tail call i32 (...) @rand()
%24 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 2
store i32 %23, i32* %24
%25 = tail call i32 (...) @rand()
%26 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 3
store i32 %25, i32* %26
%27 = tail call i32 (...) @rand()
%28 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 4
store i32 %27, i32* %28
%29 = tail call i32 (...) @rand()
%30 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 5
store i32 %29, i32* %30
%31 = tail call i32 (...) @rand()
%32 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 6
store i32 %31, i32* %32
%33 = tail call i32 (...) @rand()
%34 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 7
store i32 %33, i32* %34
br label %39
35: ; preds = %39
%36 = load i32, i32* @stdin
%37 = call i64 @fgets(i8* %16, i32 1000, i32 %36)
%38 = icmp eq i64 %37, 0
br i1 %38, label %358, label %45
39: ; preds = %0, %39
%40 = phi i64 [ 0, %0 ], [ %43, %39 ]
%41 = tail call i32 (...) @rand()
%42 = getelementptr inbounds [256 x i32], [256 x i32]* %3, i64 0, i64 %40
store i32 %41, i32* %42
%43 = add nuw nsw i64 %40, 1
%44 = icmp eq i64 %43, 256
br i1 %44, label %35, label %39
45: ; preds = %35, %345
%46 = phi i32 [ %346, %345 ], [ 0, %35 ]
%47 = phi i32 [ %347, %345 ], [ 0, %35 ]
%48 = phi i32 [ %348, %345 ], [ 0, %35 ]
%49 = phi i32 [ %349, %345 ], [ 0, %35 ]
%50 = phi i32 [ %354, %345 ], [ 0, %35 ]
%51 = phi i32 [ %353, %345 ], [ 0, %35 ]
%52 = phi i32 [ %352, %345 ], [ 0, %35 ]
%53 = phi i32 [ %351, %345 ], [ 0, %35 ]
%54 = phi i32 [ %350, %345 ], [ 0, %35 ]
%55 = load i8, i8* %16
%56 = icmp eq i8 %55, 46
br i1 %56, label %60, label %57
57: ; preds = %45
%58 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.27, i64 0, i64 0), i32* %5)
%59 = icmp eq i32 %58, 1
br i1 %59, label %111, label %113
60: ; preds = %45
%61 = call i32 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.60, i64 0, i64 0))
%62 = call i64 @strncmp(i8* %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.60, i64 0, i64 0), i32 %61)
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %81
64: ; preds = %60
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.46, i64 0, i64 0))
%66 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.47, i64 0, i64 0))
%67 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.48, i64 0, i64 0))
%68 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.49, i64 0, i64 0))
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.50, i64 0, i64 0))
%70 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.51, i64 0, i64 0))
%71 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.52, i64 0, i64 0))
%72 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.53, i64 0, i64 0))
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.54, i64 0, i64 0))
%74 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.55, i64 0, i64 0))
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.56, i64 0, i64 0))
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.57, i64 0, i64 0))
%77 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.58, i64 0, i64 0))
%78 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.59, i64 0, i64 0))
%79 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.60, i64 0, i64 0))
%80 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.61, i64 0, i64 0))
br label %333
81: ; preds = %60
%82 = call i32 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.61, i64 0, i64 0))
%83 = call i64 @strncmp(i8* %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.61, i64 0, i64 0), i32 %82)
%84 = icmp eq i64 %83, 0
br i1 %84, label %85, label %107
85: ; preds = %81
%86 = load i32, i32* %20
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 0, i32 %86)
%88 = load i32, i32* %22
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 1, i32 %88)
%90 = load i32, i32* %24
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 2, i32 %90)
%92 = load i32, i32* %26
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 3, i32 %92)
%94 = load i32, i32* %28
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 4, i32 %94)
%96 = load i32, i32* %30
%97 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 5, i32 %96)
%98 = load i32, i32* %32
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 6, i32 %98)
%100 = load i32, i32* %34
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 7, i32 %100)
%102 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), i32 %53)
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0), i32 %54)
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.22, i64 0, i64 0), i32 %46, i32 %47, i32 %48, i32 %49, i32 0, i32 0, i32 0, i32 0)
%105 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i32 %52)
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.24, i64 0, i64 0), i32 %51)
br label %333
107: ; preds = %81
%108 = call i32 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.62, i64 0, i64 0))
%109 = call i64 @strncmp(i8* %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.62, i64 0, i64 0), i32 %108)
%110 = icmp eq i64 %109, 0
br i1 %110, label %358, label %345
111: ; preds = %57
%112 = load i32, i32* %5
br label %301
113: ; preds = %57
%114 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.28, i64 0, i64 0), i32* %6, i32* %7, i32* %8)
%115 = icmp eq i32 %114, 3
br i1 %115, label %116, label %129
116: ; preds = %113
%117 = load i32, i32* %6
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %118
%120 = load i32, i32* %119
%121 = load i32, i32* %7
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %122
%124 = load i32, i32* %123
%125 = add nsw i32 %124, %120
%126 = load i32, i32* %8
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %127
store i32 %125, i32* %128
br label %301
129: ; preds = %113
%130 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.29, i64 0, i64 0), i32* %6, i32* %7, i32* %8)
%131 = icmp eq i32 %130, 3
br i1 %131, label %132, label %148
132: ; preds = %129
%133 = load i32, i32* %6
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %134
%136 = load i32, i32* %135
%137 = load i32, i32* %7
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %138
%140 = load i32, i32* %139
%141 = sub nsw i32 %136, %140
%142 = load i32, i32* %8
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %143
store i32 %141, i32* %144
%145 = load i32, i32* %139
%146 = load i32, i32* %135
%147 = icmp sgt i32 %145, %146
br label %301
148: ; preds = %129
%149 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.30, i64 0, i64 0), i32* %6, i32* %7)
%150 = icmp eq i32 %149, 2
br i1 %150, label %151, label %159
151: ; preds = %148
%152 = load i32, i32* %6
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %153
%155 = load i32, i32* %154
%156 = load i32, i32* %7
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %157
store i32 %155, i32* %158
br label %301
159: ; preds = %148
%160 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.31, i64 0, i64 0), i32* %6, i32* %5)
%161 = icmp eq i32 %160, 2
br i1 %161, label %162, label %170
162: ; preds = %159
%163 = load i32, i32* %5
%164 = load i32, i32* %6
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %165
store i32 %163, i32* %166
%167 = icmp sgt i32 %163, 255
%168 = lshr i32 %163, 31
%169 = select i1 %167, i32 0, i32 %168
br label %301
170: ; preds = %159
%171 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.32, i64 0, i64 0), i32* %6)
%172 = icmp eq i32 %171, 1
br i1 %172, label %173, label %183
173: ; preds = %170
%174 = icmp eq i32 %50, 32
br i1 %174, label %301, label %175
175: ; preds = %173
%176 = add nsw i32 %50, 1
%177 = load i32, i32* %6
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %178
%180 = load i32, i32* %179
%181 = sext i32 %176 to i64
%182 = getelementptr inbounds [32 x i32], [32 x i32]* %4, i64 0, i64 %181
store i32 %180, i32* %182
br label %301
183: ; preds = %170
%184 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.33, i64 0, i64 0), i32* %6)
%185 = icmp eq i32 %184, 1
br i1 %185, label %186, label %190
186: ; preds = %183
%187 = load i32, i32* %6
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %188
store i32 %51, i32* %189
br label %301
190: ; preds = %183
%191 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.34, i64 0, i64 0), i32* %6, i32* %7, i32* %8)
%192 = icmp eq i32 %191, 3
br i1 %192, label %193, label %213
193: ; preds = %190
%194 = load i32, i32* %6
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %195
%197 = load i32, i32* %196
%198 = icmp eq i32 %197, 0
br i1 %198, label %209, label %199
199: ; preds = %193
%200 = load i32, i32* %7
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %201
%203 = load i32, i32* %202
%204 = icmp eq i32 %203, 0
br i1 %204, label %209, label %205
205: ; preds = %199
%206 = load i32, i32* %8
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %207
store i32 1, i32* %208
br label %301
209: ; preds = %199, %193
%210 = load i32, i32* %8
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %211
store i32 0, i32* %212
br label %301
213: ; preds = %190
%214 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.35, i64 0, i64 0), i32* %6, i32* %7, i32* %8)
%215 = icmp eq i32 %214, 3
br i1 %215, label %216, label %236
216: ; preds = %213
%217 = load i32, i32* %6
%218 = sext i32 %217 to i64
%219 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %218
%220 = load i32, i32* %219
%221 = icmp eq i32 %220, 0
br i1 %221, label %222, label %228
222: ; preds = %216
%223 = load i32, i32* %7
%224 = sext i32 %223 to i64
%225 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %224
%226 = load i32, i32* %225
%227 = icmp eq i32 %226, 0
br i1 %227, label %232, label %228
228: ; preds = %222, %216
%229 = load i32, i32* %8
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %230
store i32 1, i32* %231
br label %301
232: ; preds = %222
%233 = load i32, i32* %8
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %234
store i32 0, i32* %235
br label %301
236: ; preds = %213
%237 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.36, i64 0, i64 0), i32* %6, i32* %7)
%238 = icmp eq i32 %237, 2
br i1 %238, label %239, label %248
239: ; preds = %236
%240 = load i32, i32* %6
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %241
%243 = load i32, i32* %242
%244 = load i32, i32* %7
%245 = sext i32 %244 to i64
%246 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %245
%247 = load i32, i32* %246
store i32 %247, i32* %242
store i32 %243, i32* %246
br label %301
248: ; preds = %236
%249 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.37, i64 0, i64 0), i32* %6)
%250 = icmp eq i32 %249, 1
br i1 %250, label %251, label %256
251: ; preds = %248
%252 = load i32, i32* %6
%253 = sext i32 %252 to i64
%254 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 %253
%255 = load i32, i32* %254
br label %301
256: ; preds = %248
%257 = call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.38, i64 0, i64 0))
%258 = call i64 @strncmp(i8* %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.38, i64 0, i64 0), i32 %257)
%259 = icmp eq i64 %258, 0
br i1 %259, label %260, label %263
260: ; preds = %256
%261 = sext i32 %52 to i64
%262 = getelementptr inbounds [256 x i32], [256 x i32]* %3, i64 0, i64 %261
store i32 %51, i32* %262
br label %301
263: ; preds = %256
%264 = call i32 @strlen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.53, i64 0, i64 0))
%265 = call i64 @strncmp(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.53, i64 0, i64 0), i32 %264)
%266 = icmp eq i64 %265, 0
br i1 %266, label %267, label %276
267: ; preds = %263
%268 = icmp eq i32 %50, 0
br i1 %268, label %301, label %269
269: ; preds = %267
%270 = sext i32 %50 to i64
%271 = getelementptr inbounds [32 x i32], [32 x i32]* %4, i64 0, i64 %270
store i32 0, i32* %271
%272 = add nsw i32 %50, -1
%273 = sext i32 %272 to i64
%274 = getelementptr inbounds [32 x i32], [32 x i32]* %4, i64 0, i64 %273
%275 = load i32, i32* %274
br label %301
276: ; preds = %263
%277 = call i32 @strlen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.54, i64 0, i64 0))
%278 = call i64 @strncmp(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.54, i64 0, i64 0), i32 %277)
%279 = icmp eq i64 %278, 0
br i1 %279, label %358, label %280
280: ; preds = %276
%281 = call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.55, i64 0, i64 0))
%282 = call i64 @strncmp(i8* %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.55, i64 0, i64 0), i32 %281)
%283 = icmp eq i64 %282, 0
br i1 %283, label %284, label %288
284: ; preds = %280
%285 = sext i32 %52 to i64
%286 = getelementptr inbounds [256 x i32], [256 x i32]* %3, i64 0, i64 %285
%287 = load i32, i32* %286
br label %301
288: ; preds = %280
%289 = call i32 @strlen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.42, i64 0, i64 0))
%290 = call i64 @strncmp(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.42, i64 0, i64 0), i32 %289)
%291 = icmp eq i64 %290, 0
br i1 %291, label %301, label %292
292: ; preds = %288
%293 = call i32 @strlen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.43, i64 0, i64 0))
%294 = call i64 @strncmp(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.43, i64 0, i64 0), i32 %293)
%295 = icmp eq i64 %294, 0
br i1 %295, label %296, label %297
296: ; preds = %292
br label %301
297: ; preds = %292
%298 = load i32, i32* @stderr
%299 = call i32 @fprintf(i32 %298, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.44, i64 0, i64 0))
%300 = add nsw i32 %52, -1
br label %301
301: ; preds = %162, %132, %267, %173, %296, %116, %151, %175, %209, %205, %239, %260, %288, %297, %284, %269, %251, %228, %232, %186, %111
%302 = phi i1 [ false, %111 ], [ false, %116 ], [ false, %151 ], [ false, %175 ], [ false, %186 ], [ false, %209 ], [ false, %205 ], [ false, %232 ], [ false, %228 ], [ false, %239 ], [ false, %251 ], [ false, %260 ], [ false, %269 ], [ false, %284 ], [ false, %288 ], [ false, %296 ], [ false, %297 ], [ false, %173 ], [ false, %267 ], [ %147, %132 ], [ %167, %162 ]
%303 = phi i32 [ 0, %111 ], [ 0, %116 ], [ 0, %151 ], [ 0, %175 ], [ 0, %186 ], [ 0, %209 ], [ 0, %205 ], [ 0, %232 ], [ 0, %228 ], [ 0, %239 ], [ 0, %251 ], [ 0, %260 ], [ 0, %269 ], [ 0, %284 ], [ 0, %288 ], [ 0, %296 ], [ 0, %297 ], [ 0, %173 ], [ 0, %267 ], [ 0, %132 ], [ %169, %162 ]
%304 = phi i32 [ 0, %111 ], [ 0, %116 ], [ 0, %151 ], [ 0, %175 ], [ 0, %186 ], [ 0, %209 ], [ 0, %205 ], [ 0, %232 ], [ 0, %228 ], [ 0, %239 ], [ 0, %251 ], [ 0, %260 ], [ 0, %269 ], [ 0, %284 ], [ 0, %288 ], [ 0, %296 ], [ 0, %297 ], [ 1, %173 ], [ 0, %267 ], [ 0, %132 ], [ 0, %162 ]
%305 = phi i32 [ 0, %111 ], [ 0, %116 ], [ 0, %151 ], [ 0, %175 ], [ 0, %186 ], [ 0, %209 ], [ 0, %205 ], [ 0, %232 ], [ 0, %228 ], [ 0, %239 ], [ 0, %251 ], [ 0, %260 ], [ 0, %269 ], [ 0, %284 ], [ 0, %288 ], [ 0, %296 ], [ 0, %297 ], [ 0, %173 ], [ 1, %267 ], [ 0, %132 ], [ 0, %162 ]
%306 = phi i32 [ %53, %111 ], [ %53, %116 ], [ %53, %151 ], [ %180, %175 ], [ %53, %186 ], [ %53, %209 ], [ %53, %205 ], [ %53, %232 ], [ %53, %228 ], [ %53, %239 ], [ %53, %251 ], [ %53, %260 ], [ %275, %269 ], [ %53, %284 ], [ %53, %288 ], [ %53, %296 ], [ %53, %297 ], [ %53, %173 ], [ %53, %267 ], [ %53, %132 ], [ %53, %162 ]
%307 = phi i32 [ %112, %111 ], [ %52, %116 ], [ %52, %151 ], [ %52, %175 ], [ %52, %186 ], [ %52, %209 ], [ %52, %205 ], [ %52, %232 ], [ %52, %228 ], [ %52, %239 ], [ %52, %251 ], [ %52, %260 ], [ %52, %269 ], [ %52, %284 ], [ %52, %288 ], [ %52, %296 ], [ %300, %297 ], [ %52, %173 ], [ %52, %267 ], [ %52, %132 ], [ %52, %162 ]
%308 = phi i32 [ %51, %111 ], [ %51, %116 ], [ %51, %151 ], [ %51, %175 ], [ %51, %186 ], [ %51, %209 ], [ %51, %205 ], [ %51, %232 ], [ %51, %228 ], [ %51, %239 ], [ %255, %251 ], [ %51, %260 ], [ %51, %269 ], [ %287, %284 ], [ %51, %288 ], [ %51, %296 ], [ %51, %297 ], [ %51, %173 ], [ %51, %267 ], [ %51, %132 ], [ %51, %162 ]
%309 = phi i32 [ %50, %111 ], [ %50, %116 ], [ %50, %151 ], [ %176, %175 ], [ %50, %186 ], [ %50, %209 ], [ %50, %205 ], [ %50, %232 ], [ %50, %228 ], [ %50, %239 ], [ %50, %251 ], [ %50, %260 ], [ %272, %269 ], [ %50, %284 ], [ %50, %288 ], [ %50, %296 ], [ %50, %297 ], [ 32, %173 ], [ 0, %267 ], [ %50, %132 ], [ %50, %162 ]
%310 = zext i1 %302 to i32
%311 = load i32, i32* %20
%312 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 0, i32 %311)
%313 = load i32, i32* %22
%314 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 1, i32 %313)
%315 = load i32, i32* %24
%316 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 2, i32 %315)
%317 = load i32, i32* %26
%318 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 3, i32 %317)
%319 = load i32, i32* %28
%320 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 4, i32 %319)
%321 = load i32, i32* %30
%322 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 5, i32 %321)
%323 = load i32, i32* %32
%324 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 6, i32 %323)
%325 = load i32, i32* %34
%326 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i32 7, i32 %325)
%327 = add nsw i32 %307, 1
%328 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), i32 %306)
%329 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0), i32 %327)
%330 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.22, i64 0, i64 0), i32 %310, i32 %303, i32 %304, i32 %305, i32 0, i32 0, i32 0, i32 0)
%331 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i32 %327)
%332 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.24, i64 0, i64 0), i32 %308)
br label %333
333: ; preds = %301, %85, %64
%334 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.62, i64 0, i64 0), %64 ], [ getelementptr inbounds ([81 x i8], [81 x i8]* @str.45, i64 0, i64 0), %85 ], [ getelementptr inbounds ([81 x i8], [81 x i8]* @str.45, i64 0, i64 0), %301 ]
%335 = phi i32 [ %46, %64 ], [ %46, %85 ], [ %310, %301 ]
%336 = phi i32 [ %47, %64 ], [ %47, %85 ], [ %303, %301 ]
%337 = phi i32 [ %48, %64 ], [ %48, %85 ], [ %304, %301 ]
%338 = phi i32 [ %49, %64 ], [ %49, %85 ], [ %305, %301 ]
%339 = phi i32 [ %54, %64 ], [ %54, %85 ], [ %327, %301 ]
%340 = phi i32 [ %53, %64 ], [ %53, %85 ], [ %306, %301 ]
%341 = phi i32 [ %52, %64 ], [ %52, %85 ], [ %327, %301 ]
%342 = phi i32 [ %51, %64 ], [ %51, %85 ], [ %308, %301 ]
%343 = phi i32 [ %50, %64 ], [ %50, %85 ], [ %309, %301 ]
%344 = call i32 @puts(i8* dereferenceable(1) %334)
br label %345
345: ; preds = %333, %107
%346 = phi i32 [ %46, %107 ], [ %335, %333 ]
%347 = phi i32 [ %47, %107 ], [ %336, %333 ]
%348 = phi i32 [ %48, %107 ], [ %337, %333 ]
%349 = phi i32 [ %49, %107 ], [ %338, %333 ]
%350 = phi i32 [ %54, %107 ], [ %339, %333 ]
%351 = phi i32 [ %53, %107 ], [ %340, %333 ]
%352 = phi i32 [ %52, %107 ], [ %341, %333 ]
%353 = phi i32 [ %51, %107 ], [ %342, %333 ]
%354 = phi i32 [ %50, %107 ], [ %343, %333 ]
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %5
%355 = load i32, i32* @stdin
%356 = call i64 @fgets(i8* %16, i32 1000, i32 %355)
%357 = icmp eq i64 %356, 0
br i1 %357, label %358, label %45
358: ; preds = %107, %276, %345, %35
%359 = load i32, i32* @EXIT_SUCCESS
ret i32 %359
}