#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 */

/* Variables and functions */
int /*<<< orphan*/ drawline(int *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int rand();
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  int op, max, q1, q2, ans, input, strikes, s, v, z, line[6], score[4];
  double cscore;
  srand(time(NULL));
  s = 0;
  puts(
      "\n\n\n\n\n\n\n\n\tCymon's Games\n\n\thttp://WWW.CYMONSGAMES.COM\n\n\n"
      "   This game and its code is a 2008 Cymon's Games game.\n"
      "   If you have enjoyed this game or would just like to have a new game\n"
      "   each week please visit:\n"
      "   http://WWW.CYMONSGAMES.COM for C/C++ programming resources and "
      "programs\n"
      "   for everyone, beginners and advanced users alike.\n\n");
  printf("Choose an option:\n 1) Addition (easy)\n 2) Addition (hard)\n"
         " 3) Subtraction (easy)\n 4) Subtraction (hard)\n"
         " 5) Multiplication\n 6) Division\n 7) Shuffle\n ? ");
  scanf("%d", &input);
  while (input < 1 || input > 7) {
    printf("Please type a number between 1 and 7 ? ");
    scanf("%d", &input);
  }
  switch (input) {
  case 1:
    max = 10;
    op = 1;
    break;
  case 2:
    max = 99;
    op = 1;
    break;
  case 3:
    max = 10;
    op = 2;
    break;
  case 4:
    max = 99;
    op = 2;
    break;
  case 5:
    max = 10;
    op = 3;
    break;
  case 6:
    max = 10;
    op = 4;
    break;
  case 7:
    max = 10;
    s = 1;
  }
  for (z = 0; z < 4; z++)
    score[z] = 0;
  for (z = 0; z < 25; z++) {
    q1 = rand() % max;
    q2 = rand() % (max - 1) + 1;
    ans = rand() % max;
    v = 1;
    strikes = 0;
    if (s)
      op = rand() % 4 + 1;
    switch (op) {
    case 1:
      ans = q1 + q2;
      break;
    case 2:
      if (q1 < q2) {
        q1 ^= q2;
        q2 ^= q1;
        q1 ^= q2;
      }
      ans = q1 - q2;
      break;
    case 3:
      ans = q1 * q2;
      break;
    case 4:
      q1 = ans * q2;
      ans = q1 / q2;
      break;
    }
    do {
      if (v) {
        line[0] = (q1 / 10) ? (q1 / 10) : 20;
        line[1] = q1 % 10;
        line[2] = 9 + op;
        line[3] = (q2 / 10) ? (q2 / 10) : 20;
        line[4] = q2 % 10;
        line[5] = 14;
        drawline(line);
      } else {
        line[0] = line[1] = line[4] = line[5] = 20;
        line[2] = (q1 / 10) ? (q1 / 10) : 20;
        line[3] = q1 % 10;
        drawline(line);
        line[0] = line[4] = line[5] = 20;
        line[1] = 9 + op;
        line[2] = (q2 / 10) ? (q2 / 10) : 20;
        line[3] = q2 % 10;
        drawline(line);
        line[0] = line[4] = line[5] = 20;
        line[1] = line[2] = line[3] = 15;
        drawline(line);
      }
      scanf("%d", &input);
      if (input != ans) {
        line[0] = line[2] = line[4] = 20;
        line[1] = (++strikes > 1) ? 16 : 20;
        line[3] = 16;
        line[5] = (strikes > 2) ? 16 : 20;
        drawline(line);
      }
    } while (input != ans && strikes < 3);
    line[0] = line[1] = line[4] = line[5] = 20;
    line[2] = (ans / 10) ? (ans / 10) : 20;
    ;
    line[3] = ans % 10;
    drawline(line);
    if (input == ans) {
      line[0] = line[4] = line[5] = 20;
      line[1] = 17;
      line[2] = 18;
      line[3] = 19;
      drawline(line);
    }
    score[strikes]++;
    puts("Press any key...");
    getchar();
    getchar();
  }
  printf("Report Card\n------ ----\n\n"
         "Out of %d:\n %d on first try (%2.1f%%)\n %d on second try "
         "(%2.1f%%)\n %d on"
         " last try (%2.1f%%)\n %d missed (%2.1f%%)\n\n",
         25, score[0], (float)score[0] * 100 / 25, score[1],
         (float)score[1] * 100 / 25, score[2], (float)score[2] * 100 / 25,
         score[3], (float)score[3] * 100 / 25);
  cscore = (float)score[0] * 100.0 / 25 + (float)score[1] * 50.0 / 25 +
           (float)score[2] * 25.0 / 25;
  printf("Grade: %c, (%2.2f%%)\n",
         'A' + (cscore < 90.0) + (cscore < 80.0) + (cscore < 70.0) +
             2 * (cscore < 60.0),
         cscore);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
movl   $0x0,-0x24(%rbp)
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
lea    0xff2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x107c(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1080 <scanf@plt>
mov    $0x1,%al
cmpl   $0x1,-0x1c(%rbp)
mov    %al,-0x69(%rbp)
jl     11fc <main+0x6c>
cmpl   $0x7,-0x1c(%rbp)
setg   %al
mov    %al,-0x69(%rbp)
mov    -0x69(%rbp),%al
test   $0x1,%al
jne    120c <main+0x7c>
jmp    122f <main+0x9f>
lea    0x1046(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x1035(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1080 <scanf@plt>
jmp    11e3 <main+0x53>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x78(%rbp)
sub    $0x6,%eax
ja     12d8 <main+0x148>
mov    -0x78(%rbp),%rax
lea    0xdf1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xa,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
jmp    12d8 <main+0x148>
movl   $0x63,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
jmp    12d8 <main+0x148>
movl   $0xa,-0xc(%rbp)
movl   $0x2,-0x8(%rbp)
jmp    12d8 <main+0x148>
movl   $0x63,-0xc(%rbp)
movl   $0x2,-0x8(%rbp)
jmp    12d8 <main+0x148>
movl   $0xa,-0xc(%rbp)
movl   $0x3,-0x8(%rbp)
jmp    12d8 <main+0x148>
movl   $0xa,-0xc(%rbp)
movl   $0x4,-0x8(%rbp)
jmp    12d8 <main+0x148>
movl   $0xa,-0xc(%rbp)
movl   $0x1,-0x24(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x4,-0x2c(%rbp)
jge    1303 <main+0x173>
movslq -0x2c(%rbp),%rax
movl   $0x0,-0x60(%rbp,%rax,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12df <main+0x14f>
movl   $0x0,-0x2c(%rbp)
cmpl   $0x19,-0x2c(%rbp)
jge    1785 <main+0x5f5>
mov    $0x0,%al
call   10b0 <rand@plt>
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0x0,%al
call   10b0 <rand@plt>
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   10b0 <rand@plt>
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x1,-0x28(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1373 <main+0x1e3>
mov    $0x0,%al
call   10b0 <rand@plt>
mov    $0x4,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x80(%rbp)
sub    $0x3,%eax
ja     1402 <main+0x272>
mov    -0x80(%rbp),%rax
lea    0xcc9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1402 <main+0x272>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13d1 <main+0x241>
mov    -0x14(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1402 <main+0x272>
mov    -0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1402 <main+0x272>
mov    -0x18(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    %eax,-0x18(%rbp)
jmp    1407 <main+0x277>
cmpl   $0x0,-0x28(%rbp)
je     14d1 <main+0x341>
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     143b <main+0x2ab>
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x84(%rbp)
jmp    144b <main+0x2bb>
mov    $0x14,%eax
mov    %eax,-0x84(%rbp)
jmp    144b <main+0x2bb>
mov    -0x84(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x9,%eax
mov    %eax,-0x48(%rbp)
mov    -0x14(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     1495 <main+0x305>
mov    -0x14(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x88(%rbp)
jmp    14a5 <main+0x315>
mov    $0x14,%eax
mov    %eax,-0x88(%rbp)
jmp    14a5 <main+0x315>
mov    -0x88(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x14(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x40(%rbp)
movl   $0xe,-0x3c(%rbp)
lea    -0x50(%rbp),%rdi
call   10a0 <drawline@plt>
jmp    15f2 <main+0x462>
movl   $0x14,-0x3c(%rbp)
movl   $0x14,-0x40(%rbp)
movl   $0x14,-0x4c(%rbp)
movl   $0x14,-0x50(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     1517 <main+0x387>
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8c(%rbp)
jmp    1527 <main+0x397>
mov    $0x14,%eax
mov    %eax,-0x8c(%rbp)
jmp    1527 <main+0x397>
mov    -0x8c(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x44(%rbp)
lea    -0x50(%rbp),%rdi
call   10a0 <drawline@plt>
movl   $0x14,-0x3c(%rbp)
movl   $0x14,-0x40(%rbp)
movl   $0x14,-0x50(%rbp)
mov    -0x8(%rbp),%eax
add    $0x9,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x14(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     158f <main+0x3ff>
mov    -0x14(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x90(%rbp)
jmp    159f <main+0x40f>
mov    $0x14,%eax
mov    %eax,-0x90(%rbp)
jmp    159f <main+0x40f>
mov    -0x90(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x14(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x44(%rbp)
lea    -0x50(%rbp),%rdi
call   10a0 <drawline@plt>
movl   $0x14,-0x3c(%rbp)
movl   $0x14,-0x40(%rbp)
movl   $0x14,-0x50(%rbp)
movl   $0xf,-0x44(%rbp)
movl   $0xf,-0x48(%rbp)
movl   $0xf,-0x4c(%rbp)
lea    -0x50(%rbp),%rdi
call   10a0 <drawline@plt>
lea    0xc5d(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1080 <scanf@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
je     1665 <main+0x4d5>
movl   $0x14,-0x40(%rbp)
movl   $0x14,-0x48(%rbp)
movl   $0x14,-0x50(%rbp)
mov    -0x20(%rbp),%edx
add    $0x1,%edx
mov    %edx,-0x20(%rbp)
mov    $0x14,%eax
mov    $0x10,%ecx
cmp    $0x1,%edx
cmovg  %ecx,%eax
mov    %eax,-0x4c(%rbp)
movl   $0x10,-0x44(%rbp)
mov    -0x20(%rbp),%edx
mov    $0x14,%eax
mov    $0x10,%ecx
cmp    $0x2,%edx
cmovg  %ecx,%eax
mov    %eax,-0x3c(%rbp)
lea    -0x50(%rbp),%rdi
call   10a0 <drawline@plt>
jmp    166a <main+0x4da>
mov    -0x1c(%rbp),%ecx
xor    %eax,%eax
cmp    -0x18(%rbp),%ecx
mov    %al,-0x91(%rbp)
je     168b <main+0x4fb>
cmpl   $0x3,-0x20(%rbp)
setl   %al
mov    %al,-0x91(%rbp)
mov    -0x91(%rbp),%al
test   $0x1,%al
jne    1407 <main+0x277>
movl   $0x14,-0x3c(%rbp)
movl   $0x14,-0x40(%rbp)
movl   $0x14,-0x4c(%rbp)
movl   $0x14,-0x50(%rbp)
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     16df <main+0x54f>
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x98(%rbp)
jmp    16ef <main+0x55f>
mov    $0x14,%eax
mov    %eax,-0x98(%rbp)
jmp    16ef <main+0x55f>
mov    -0x98(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x44(%rbp)
lea    -0x50(%rbp),%rdi
call   10a0 <drawline@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    174e <main+0x5be>
movl   $0x14,-0x3c(%rbp)
movl   $0x14,-0x40(%rbp)
movl   $0x14,-0x50(%rbp)
movl   $0x11,-0x4c(%rbp)
movl   $0x12,-0x48(%rbp)
movl   $0x13,-0x44(%rbp)
lea    -0x50(%rbp),%rdi
call   10a0 <drawline@plt>
movslq -0x20(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x60(%rbp,%rax,4)
lea    0xb1d(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    130a <main+0x17a>
mov    -0x60(%rbp),%edx
cvtsi2ssl -0x60(%rbp),%xmm0
movss  0x8a7(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0x897(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x5c(%rbp),%ecx
cvtsi2ssl -0x5c(%rbp),%xmm1
movss  0x883(%rip),%xmm2
mulss  %xmm2,%xmm1
movss  0x873(%rip),%xmm2
divss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x58(%rbp),%r8d
cvtsi2ssl -0x58(%rbp),%xmm2
movss  0x85e(%rip),%xmm3
mulss  %xmm3,%xmm2
movss  0x84e(%rip),%xmm3
divss  %xmm3,%xmm2
cvtss2sd %xmm2,%xmm2
mov    -0x54(%rbp),%r9d
cvtsi2ssl -0x54(%rbp),%xmm3
movss  0x839(%rip),%xmm4
mulss  %xmm4,%xmm3
movss  0x829(%rip),%xmm4
divss  %xmm4,%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xa74(%rip),%rdi
mov    $0x19,%esi
mov    $0x4,%al
call   1040 <printf@plt>
cvtsi2ssl -0x60(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0x7f5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x7d9(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2ssl -0x5c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0x7cc(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x7b8(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
cvtsi2ssl -0x58(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0x79f(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x793(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0x776(%rip),%xmm0
ucomisd -0x68(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%esi
add    $0x41,%esi
movsd  0x756(%rip),%xmm0
ucomisd -0x68(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    %eax,%esi
movsd  0x737(%rip),%xmm0
ucomisd -0x68(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    %eax,%esi
movsd  0x718(%rip),%xmm0
ucomisd -0x68(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
shl    $0x1,%eax
add    %eax,%esi
movsd  -0x68(%rbp),%xmm0
lea    0xa18(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
lea    0x1020(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10aa(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1080 <scanf@plt>
mov    0xc(%rsp),%eax
lea    -0x8(%rax),%ecx
cmp    $0xfffffff8,%ecx
ja     1221 <main+0x91>
lea    0x1090(%rip),%r14
lea    0x1086(%rip),%rbp
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1080 <scanf@plt>
mov    0xc(%rsp),%eax
lea    -0x8(%rax),%ecx
cmp    $0xfffffff9,%ecx
jb     1200 <main+0x70>
mov    $0x1,%r14d
mov    $0xa,%ecx
mov    %rcx,0x38(%rsp)
mov    $0x1,%cl
mov    %ecx,0x34(%rsp)
add    $0xfffffffe,%eax
cmp    $0x5,%eax
ja     1281 <main+0xf1>
lea    0xe22(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x2,%r14d
jmp    1281 <main+0xf1>
mov    $0x2,%r14d
mov    $0x63,%eax
mov    %rax,0x38(%rsp)
jmp    1281 <main+0xf1>
mov    $0x3,%r14d
jmp    1281 <main+0xf1>
mov    $0x4,%r14d
jmp    1281 <main+0xf1>
movl   $0x0,0x34(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
mov    0x38(%rsp),%rax
add    $0xffffffff,%eax
mov    %eax,0x48(%rsp)
xor    %eax,%eax
jmp    12d2 <main+0x142>
nopl   0x0(%rax)
movslq %r13d,%rax
addl   $0x1,0x50(%rsp,%rax,4)
lea    0xff6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
mov    0x4c(%rsp),%eax
add    $0x1,%eax
cmp    $0x19,%eax
je     15bc <main+0x42c>
mov    %eax,0x4c(%rsp)
xor    %eax,%eax
call   10b0 <rand@plt>
cltd
mov    0x38(%rsp),%rbx
idiv   %ebx
mov    %edx,%ebp
xor    %eax,%eax
call   10b0 <rand@plt>
cltd
idivl  0x48(%rsp)
mov    %edx,%r12d
xor    %eax,%eax
call   10b0 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%ebx
cmpb   $0x0,0x34(%rsp)
jne    1325 <main+0x195>
xor    %eax,%eax
call   10b0 <rand@plt>
lea    0x3(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffffc,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%r14d
add    $0x1,%r14d
lea    0x1(%r12),%eax
lea    -0x1(%r14),%ecx
cmp    $0x3,%ecx
ja     1390 <main+0x200>
lea    0xd46(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    %ebp,%ebx
add    %eax,%ebx
jmp    1390 <main+0x200>
nopl   0x0(%rax)
cmp    %r12d,%ebp
mov    %ebp,%ecx
cmovg  %eax,%ecx
cmovg  %ebp,%eax
mov    %eax,%ebp
mov    %eax,%ebx
sub    %ecx,%ebx
mov    %ecx,%eax
jmp    1390 <main+0x200>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebp,%ebx
imul   %eax,%ebx
jmp    1390 <main+0x200>
nopw   0x0(%rax,%rax,1)
mov    %ebx,%ebp
imul   %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x9(%rbp),%edx
mov    $0x14,%ecx
mov    %rcx,0x40(%rsp)
movslq %ebp,%rcx
mov    $0x14,%esi
mov    %rsi,0x68(%rsp)
cmp    $0x13,%edx
jb     13c8 <main+0x238>
imul   $0x66666667,%rcx,%rsi
mov    %rsi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rsi
add    %edx,%esi
mov    %rsi,0x68(%rsp)
mov    %rbx,0x70(%rsp)
imul   $0x66666667,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    0x9(%rax),%edx
movslq %eax,%rsi
cmp    $0x13,%edx
jb     1407 <main+0x277>
imul   $0x66666667,%rsi,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x22,%rdx
add    %eax,%edx
mov    %rdx,0x40(%rsp)
lea    (%rcx,%rcx,4),%eax
sub    %eax,%ebp
mov    %rbp,0x90(%rsp)
mov    %r14,0x88(%rsp)
add    $0x9,%r14d
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
xor    %r12d,%r12d
xchg   %ax,%ax
mov    0x68(%rsp),%rax
mov    %eax,0x10(%rsp)
mov    0x90(%rsp),%rax
mov    %eax,0x14(%rsp)
mov    %r14d,0x18(%rsp)
mov    0x40(%rsp),%rax
mov    %eax,0x1c(%rsp)
mov    %rsi,%rbp
mov    %esi,0x20(%rsp)
movl   $0xe,0x24(%rsp)
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   10a0 <drawline@plt>
lea    0xdf4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1080 <scanf@plt>
mov    0x70(%rsp),%r15
cmp    %r15d,0xc(%rsp)
je     1510 <main+0x380>
movl   $0x14,0x18(%rsp)
movl   $0x14,0x10(%rsp)
lea    0x1(%r12),%r13d
xor    %eax,%eax
test   %r12d,%r12d
sete   %al
lea    0x10(,%rax,4),%eax
mov    %eax,0x14(%rsp)
movabs $0x1400000010,%rax
mov    %rax,0x1c(%rsp)
xor    %eax,%eax
cmp    $0x2,%r12d
setb   %al
lea    0x10(,%rax,4),%eax
mov    %eax,0x24(%rsp)
mov    %rbx,%rdi
call   10a0 <drawline@plt>
cmp    %r15d,0xc(%rsp)
je     1513 <main+0x383>
cmp    $0x2,%r12d
mov    %r13d,%r12d
mov    %rbp,%rsi
jb     1440 <main+0x2b0>
jmp    1513 <main+0x383>
nopl   0x0(%rax,%rax,1)
mov    %r12d,%r13d
movabs $0x1400000014,%rax
mov    %rax,0x20(%rsp)
mov    %rax,0x10(%rsp)
mov    0x70(%rsp),%rdx
lea    0x9(%rdx),%ecx
mov    $0x14,%eax
movslq %edx,%rbx
cmp    $0x13,%ecx
jb     1550 <main+0x3c0>
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
mov    %eax,0x18(%rsp)
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
mov    %ebx,%ecx
sub    %eax,%ecx
mov    %ecx,0x1c(%rsp)
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
call   10a0 <drawline@plt>
cmp    %ebx,0xc(%rsp)
mov    0x88(%rsp),%r14
jne    12a0 <main+0x110>
movabs $0x1400000014,%rax
mov    %rax,0x20(%rsp)
movaps 0xa56(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
mov    %rbp,%rdi
call   10a0 <drawline@plt>
jmp    12a0 <main+0x110>
mov    0x58(%rsp),%r8d
movd   %r8d,%xmm0
mov    0x50(%rsp),%edx
mov    0x54(%rsp),%ecx
movd   %edx,%xmm1
punpckldq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
movss  0xa4f(%rip),%xmm3
movaps %xmm1,%xmm0
movaps %xmm1,%xmm5
movaps %xmm1,0x70(%rsp)
mulss  %xmm3,%xmm0
movss  0xa3c(%rip),%xmm4
xorps  %xmm1,%xmm1
cvtsi2ss %ecx,%xmm1
movss  %xmm1,0x40(%rsp)
divss  %xmm4,%xmm0
cvtss2sd %xmm0,%xmm0
mulss  %xmm3,%xmm1
divss  %xmm4,%xmm1
cvtss2sd %xmm1,%xmm1
movaps %xmm5,%xmm2
shufps $0x55,%xmm5,%xmm2
mulss  %xmm3,%xmm2
divss  %xmm4,%xmm2
mov    0x5c(%rsp),%r9d
xorps  %xmm5,%xmm5
cvtsi2ss %r9d,%xmm5
cvtss2sd %xmm2,%xmm2
mulss  %xmm3,%xmm5
divss  %xmm4,%xmm5
xorps  %xmm3,%xmm3
cvtss2sd %xmm5,%xmm3
lea    0xc67(%rip),%rdi
mov    $0x19,%esi
mov    $0x4,%al
call   1040 <printf@plt>
movss  0x40(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
mulsd  0x9c8(%rip),%xmm1
divsd  0x9c8(%rip),%xmm1
cvtps2pd 0x70(%rsp),%xmm0
mulpd  0x98b(%rip),%xmm0
divpd  0x993(%rip),%xmm0
addsd  %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0x9a7(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
movsd  0x99e(%rip),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
add    %eax,%ecx
movsd  0x993(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
add    %ecx,%eax
movsd  0x988(%rip),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
lea    (%rax,%rcx,2),%esi
add    $0x41,%esi
lea    0xc54(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [338 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\09Cymon's Games\0A\0A\09http://WWW.CYMONSGAMES.COM\0A\0A\0A This game and its code is a 2008 Cymon's Games game.\0A If you have enjoyed this game or would just like to have a new game\0A each week please visit:\0A http://WWW.CYMONSGAMES.COM for C/C++ programming resources and programs\0A for everyone, beginners and advanced users alike.\0A\0A\00"
@.str.1 = [152 x i8] c"Choose an option:\0A 1) Addition (easy)\0A 2) Addition (hard)\0A 3) Subtraction (easy)\0A 4) Subtraction (hard)\0A 5) Multiplication\0A 6) Division\0A 7) Shuffle\0A ? \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [40 x i8] c"Please type a number between 1 and 7 ? \00"
@.str.4 = [17 x i8] c"Press any key...\00"
@.str.5 = [140 x i8] c"Report Card\0A------ ----\0A\0AOut of %d:\0A %d on first try (%2.1f%%)\0A %d on second try (%2.1f%%)\0A %d on last try (%2.1f%%)\0A %d missed (%2.1f%%)\0A\0A\00"
@.str.6 = [22 x i8] c"Grade: %c, (%2.2f%%)\0A\00"
define i32 @main() {
%1 = alloca i32
%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 [6 x i32]
%13 = alloca [4 x i32]
%14 = alloca double
store i32 0, i32* %1
%15 = call i32 @time(i32* null)
%16 = call i32 @srand(i32 %15)
store i32 0, i32* %9
%17 = call i32 @puts(i8* getelementptr inbounds ([338 x i8], [338 x i8]* @.str, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %7)
br label %20
20: ; preds = %28, %0
%21 = load i32, i32* %7
%22 = icmp slt i32 %21, 1
br i1 %22, label %26, label %23
23: ; preds = %20
%24 = load i32, i32* %7
%25 = icmp sgt i32 %24, 7
br label %26
26: ; preds = %23, %20
%27 = phi i1 [ true, %20 ], [ %25, %23 ]
br i1 %27, label %28, label %31
28: ; preds = %26
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
%30 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %7)
br label %20
31: ; preds = %26
%32 = load i32, i32* %7
switch i32 %32, label %40 [
i32 1, label %33
i32 2, label %34
i32 3, label %35
i32 4, label %36
i32 5, label %37
i32 6, label %38
i32 7, label %39
]
33: ; preds = %31
store i32 10, i32* %3
store i32 1, i32* %2
br label %40
34: ; preds = %31
store i32 99, i32* %3
store i32 1, i32* %2
br label %40
35: ; preds = %31
store i32 10, i32* %3
store i32 2, i32* %2
br label %40
36: ; preds = %31
store i32 99, i32* %3
store i32 2, i32* %2
br label %40
37: ; preds = %31
store i32 10, i32* %3
store i32 3, i32* %2
br label %40
38: ; preds = %31
store i32 10, i32* %3
store i32 4, i32* %2
br label %40
39: ; preds = %31
store i32 10, i32* %3
store i32 1, i32* %9
br label %40
40: ; preds = %39, %31, %38, %37, %36, %35, %34, %33
store i32 0, i32* %11
br label %41
41: ; preds = %48, %40
%42 = load i32, i32* %11
%43 = icmp slt i32 %42, 4
br i1 %43, label %44, label %51
44: ; preds = %41
%45 = load i32, i32* %11
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 %46
store i32 0, i32* %47
br label %48
48: ; preds = %44
%49 = load i32, i32* %11
%50 = add nsw i32 %49, 1
store i32 %50, i32* %11
br label %41
51: ; preds = %41
store i32 0, i32* %11
br label %52
52: ; preds = %268, %51
%53 = load i32, i32* %11
%54 = icmp slt i32 %53, 25
br i1 %54, label %55, label %271
55: ; preds = %52
%56 = call i32 (...) @rand()
%57 = load i32, i32* %3
%58 = srem i32 %56, %57
store i32 %58, i32* %4
%59 = call i32 (...) @rand()
%60 = load i32, i32* %3
%61 = sub nsw i32 %60, 1
%62 = srem i32 %59, %61
%63 = add nsw i32 %62, 1
store i32 %63, i32* %5
%64 = call i32 (...) @rand()
%65 = load i32, i32* %3
%66 = srem i32 %64, %65
store i32 %66, i32* %6
store i32 1, i32* %10
store i32 0, i32* %8
%67 = load i32, i32* %9
%68 = icmp ne i32 %67, 0
br i1 %68, label %69, label %73
69: ; preds = %55
%70 = call i32 (...) @rand()
%71 = srem i32 %70, 4
%72 = add nsw i32 %71, 1
store i32 %72, i32* %2
br label %73
73: ; preds = %69, %55
%74 = load i32, i32* %2
switch i32 %74, label %108 [
i32 1, label %75
i32 2, label %79
i32 3, label %97
i32 4, label %101
]
75: ; preds = %73
%76 = load i32, i32* %4
%77 = load i32, i32* %5
%78 = add nsw i32 %76, %77
store i32 %78, i32* %6
br label %108
79: ; preds = %73
%80 = load i32, i32* %4
%81 = load i32, i32* %5
%82 = icmp slt i32 %80, %81
br i1 %82, label %83, label %93
83: ; preds = %79
%84 = load i32, i32* %5
%85 = load i32, i32* %4
%86 = xor i32 %85, %84
store i32 %86, i32* %4
%87 = load i32, i32* %4
%88 = load i32, i32* %5
%89 = xor i32 %88, %87
store i32 %89, i32* %5
%90 = load i32, i32* %5
%91 = load i32, i32* %4
%92 = xor i32 %91, %90
store i32 %92, i32* %4
br label %93
93: ; preds = %83, %79
%94 = load i32, i32* %4
%95 = load i32, i32* %5
%96 = sub nsw i32 %94, %95
store i32 %96, i32* %6
br label %108
97: ; preds = %73
%98 = load i32, i32* %4
%99 = load i32, i32* %5
%100 = mul nsw i32 %98, %99
store i32 %100, i32* %6
br label %108
101: ; preds = %73
%102 = load i32, i32* %6
%103 = load i32, i32* %5
%104 = mul nsw i32 %102, %103
store i32 %104, i32* %4
%105 = load i32, i32* %4
%106 = load i32, i32* %5
%107 = sdiv i32 %105, %106
store i32 %107, i32* %6
br label %108
108: ; preds = %73, %101, %97, %93, %75
br label %109
109: ; preds = %225, %108
%110 = load i32, i32* %10
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %145
112: ; preds = %109
%113 = load i32, i32* %4
%114 = sdiv i32 %113, 10
%115 = icmp ne i32 %114, 0
br i1 %115, label %116, label %119
116: ; preds = %112
%117 = load i32, i32* %4
%118 = sdiv i32 %117, 10
br label %120
119: ; preds = %112
br label %120
120: ; preds = %119, %116
%121 = phi i32 [ %118, %116 ], [ 20, %119 ]
%122 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
store i32 %121, i32* %122
%123 = load i32, i32* %4
%124 = srem i32 %123, 10
%125 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 1
store i32 %124, i32* %125
%126 = load i32, i32* %2
%127 = add nsw i32 9, %126
%128 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 2
store i32 %127, i32* %128
%129 = load i32, i32* %5
%130 = sdiv i32 %129, 10
%131 = icmp ne i32 %130, 0
br i1 %131, label %132, label %135
132: ; preds = %120
%133 = load i32, i32* %5
%134 = sdiv i32 %133, 10
br label %136
135: ; preds = %120
br label %136
136: ; preds = %135, %132
%137 = phi i32 [ %134, %132 ], [ 20, %135 ]
%138 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 3
store i32 %137, i32* %138
%139 = load i32, i32* %5
%140 = srem i32 %139, 10
%141 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 4
store i32 %140, i32* %141
%142 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 5
store i32 14, i32* %142
%143 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
%144 = call i32 @drawline(i32* %143)
br label %194
145: ; preds = %109
%146 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 5
store i32 20, i32* %146
%147 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 4
store i32 20, i32* %147
%148 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 1
store i32 20, i32* %148
%149 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
store i32 20, i32* %149
%150 = load i32, i32* %4
%151 = sdiv i32 %150, 10
%152 = icmp ne i32 %151, 0
br i1 %152, label %153, label %156
153: ; preds = %145
%154 = load i32, i32* %4
%155 = sdiv i32 %154, 10
br label %157
156: ; preds = %145
br label %157
157: ; preds = %156, %153
%158 = phi i32 [ %155, %153 ], [ 20, %156 ]
%159 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 2
store i32 %158, i32* %159
%160 = load i32, i32* %4
%161 = srem i32 %160, 10
%162 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 3
store i32 %161, i32* %162
%163 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
%164 = call i32 @drawline(i32* %163)
%165 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 5
store i32 20, i32* %165
%166 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 4
store i32 20, i32* %166
%167 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
store i32 20, i32* %167
%168 = load i32, i32* %2
%169 = add nsw i32 9, %168
%170 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 1
store i32 %169, i32* %170
%171 = load i32, i32* %5
%172 = sdiv i32 %171, 10
%173 = icmp ne i32 %172, 0
br i1 %173, label %174, label %177
174: ; preds = %157
%175 = load i32, i32* %5
%176 = sdiv i32 %175, 10
br label %178
177: ; preds = %157
br label %178
178: ; preds = %177, %174
%179 = phi i32 [ %176, %174 ], [ 20, %177 ]
%180 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 2
store i32 %179, i32* %180
%181 = load i32, i32* %5
%182 = srem i32 %181, 10
%183 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 3
store i32 %182, i32* %183
%184 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
%185 = call i32 @drawline(i32* %184)
%186 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 5
store i32 20, i32* %186
%187 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 4
store i32 20, i32* %187
%188 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
store i32 20, i32* %188
%189 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 3
store i32 15, i32* %189
%190 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 2
store i32 15, i32* %190
%191 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 1
store i32 15, i32* %191
%192 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
%193 = call i32 @drawline(i32* %192)
br label %194
194: ; preds = %178, %136
%195 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %7)
%196 = load i32, i32* %7
%197 = load i32, i32* %6
%198 = icmp ne i32 %196, %197
br i1 %198, label %199, label %217
199: ; preds = %194
%200 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 4
store i32 20, i32* %200
%201 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 2
store i32 20, i32* %201
%202 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
store i32 20, i32* %202
%203 = load i32, i32* %8
%204 = add nsw i32 %203, 1
store i32 %204, i32* %8
%205 = icmp sgt i32 %204, 1
%206 = zext i1 %205 to i64
%207 = select i1 %205, i32 16, i32 20
%208 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 1
store i32 %207, i32* %208
%209 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 3
store i32 16, i32* %209
%210 = load i32, i32* %8
%211 = icmp sgt i32 %210, 2
%212 = zext i1 %211 to i64
%213 = select i1 %211, i32 16, i32 20
%214 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 5
store i32 %213, i32* %214
%215 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
%216 = call i32 @drawline(i32* %215)
br label %217
217: ; preds = %199, %194
br label %218
218: ; preds = %217
%219 = load i32, i32* %7
%220 = load i32, i32* %6
%221 = icmp ne i32 %219, %220
br i1 %221, label %222, label %225
222: ; preds = %218
%223 = load i32, i32* %8
%224 = icmp slt i32 %223, 3
br label %225
225: ; preds = %222, %218
%226 = phi i1 [ false, %218 ], [ %224, %222 ]
br i1 %226, label %109, label %227
227: ; preds = %225
%228 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 5
store i32 20, i32* %228
%229 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 4
store i32 20, i32* %229
%230 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 1
store i32 20, i32* %230
%231 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
store i32 20, i32* %231
%232 = load i32, i32* %6
%233 = sdiv i32 %232, 10
%234 = icmp ne i32 %233, 0
br i1 %234, label %235, label %238
235: ; preds = %227
%236 = load i32, i32* %6
%237 = sdiv i32 %236, 10
br label %239
238: ; preds = %227
br label %239
239: ; preds = %238, %235
%240 = phi i32 [ %237, %235 ], [ 20, %238 ]
%241 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 2
store i32 %240, i32* %241
%242 = load i32, i32* %6
%243 = srem i32 %242, 10
%244 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 3
store i32 %243, i32* %244
%245 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
%246 = call i32 @drawline(i32* %245)
%247 = load i32, i32* %7
%248 = load i32, i32* %6
%249 = icmp eq i32 %247, %248
br i1 %249, label %250, label %259
250: ; preds = %239
%251 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 5
store i32 20, i32* %251
%252 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 4
store i32 20, i32* %252
%253 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
store i32 20, i32* %253
%254 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 1
store i32 17, i32* %254
%255 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 2
store i32 18, i32* %255
%256 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 3
store i32 19, i32* %256
%257 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
%258 = call i32 @drawline(i32* %257)
br label %259
259: ; preds = %250, %239
%260 = load i32, i32* %8
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 %261
%263 = load i32, i32* %262
%264 = add nsw i32 %263, 1
store i32 %264, i32* %262
%265 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%266 = call i32 (...) @getchar()
%267 = call i32 (...) @getchar()
br label %268
268: ; preds = %259
%269 = load i32, i32* %11
%270 = add nsw i32 %269, 1
store i32 %270, i32* %11
br label %52
271: ; preds = %52
%272 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 0
%273 = load i32, i32* %272
%274 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 0
%275 = load i32, i32* %274
%276 = sitofp i32 %275 to float
%277 = fmul float %276, 1.000000e+02
%278 = fdiv float %277, 2.500000e+01
%279 = fpext float %278 to double
%280 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 1
%281 = load i32, i32* %280
%282 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 1
%283 = load i32, i32* %282
%284 = sitofp i32 %283 to float
%285 = fmul float %284, 1.000000e+02
%286 = fdiv float %285, 2.500000e+01
%287 = fpext float %286 to double
%288 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 2
%289 = load i32, i32* %288
%290 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 2
%291 = load i32, i32* %290
%292 = sitofp i32 %291 to float
%293 = fmul float %292, 1.000000e+02
%294 = fdiv float %293, 2.500000e+01
%295 = fpext float %294 to double
%296 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 3
%297 = load i32, i32* %296
%298 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 3
%299 = load i32, i32* %298
%300 = sitofp i32 %299 to float
%301 = fmul float %300, 1.000000e+02
%302 = fdiv float %301, 2.500000e+01
%303 = fpext float %302 to double
%304 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.5, i64 0, i64 0), i32 25, i32 %273, double %279, i32 %281, double %287, i32 %289, double %295, i32 %297, double %303)
%305 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 0
%306 = load i32, i32* %305
%307 = sitofp i32 %306 to float
%308 = fpext float %307 to double
%309 = fmul double %308, 1.000000e+02
%310 = fdiv double %309, 2.500000e+01
%311 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 1
%312 = load i32, i32* %311
%313 = sitofp i32 %312 to float
%314 = fpext float %313 to double
%315 = fmul double %314, 5.000000e+01
%316 = fdiv double %315, 2.500000e+01
%317 = fadd double %310, %316
%318 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 2
%319 = load i32, i32* %318
%320 = sitofp i32 %319 to float
%321 = fpext float %320 to double
%322 = fmul double %321, 2.500000e+01
%323 = fdiv double %322, 2.500000e+01
%324 = fadd double %317, %323
store double %324, double* %14
%325 = load double, double* %14
%326 = fcmp olt double %325, 9.000000e+01
%327 = zext i1 %326 to i32
%328 = add nsw i32 65, %327
%329 = load double, double* %14
%330 = fcmp olt double %329, 8.000000e+01
%331 = zext i1 %330 to i32
%332 = add nsw i32 %328, %331
%333 = load double, double* %14
%334 = fcmp olt double %333, 7.000000e+01
%335 = zext i1 %334 to i32
%336 = add nsw i32 %332, %335
%337 = load double, double* %14
%338 = fcmp olt double %337, 6.000000e+01
%339 = zext i1 %338 to i32
%340 = mul nsw i32 2, %339
%341 = add nsw i32 %336, %340
%342 = load double, double* %14
%343 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %341, double %342)
%344 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [338 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\09Cymon's Games\0A\0A\09http://WWW.CYMONSGAMES.COM\0A\0A\0A This game and its code is a 2008 Cymon's Games game.\0A If you have enjoyed this game or would just like to have a new game\0A each week please visit:\0A http://WWW.CYMONSGAMES.COM for C/C++ programming resources and programs\0A for everyone, beginners and advanced users alike.\0A\0A\00"
@.str.1 = [152 x i8] c"Choose an option:\0A 1) Addition (easy)\0A 2) Addition (hard)\0A 3) Subtraction (easy)\0A 4) Subtraction (hard)\0A 5) Multiplication\0A 6) Division\0A 7) Shuffle\0A ? \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [40 x i8] c"Please type a number between 1 and 7 ? \00"
@.str.4 = [17 x i8] c"Press any key...\00"
@.str.5 = [140 x i8] c"Report Card\0A------ ----\0A\0AOut of %d:\0A %d on first try (%2.1f%%)\0A %d on second try (%2.1f%%)\0A %d on last try (%2.1f%%)\0A %d missed (%2.1f%%)\0A\0A\00"
@.str.6 = [22 x i8] c"Grade: %c, (%2.2f%%)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %3 to i8*
%5 = bitcast i32* %1 to i8*
%6 = bitcast [6 x i32]* %2 to i8*
%7 = tail call i32 @time(i32* null)
%8 = tail call i32 @srand(i32 %7)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([338 x i8], [338 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%12 = load i32, i32* %1
%13 = add i32 %12, -8
%14 = icmp ult i32 %13, -7
br i1 %14, label %15, label %21
15: ; preds = %0, %15
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%18 = load i32, i32* %1
%19 = add i32 %18, -8
%20 = icmp ult i32 %19, -7
br i1 %20, label %15, label %21
21: ; preds = %15, %0
%22 = phi i32 [ %12, %0 ], [ %18, %15 ]
switch i32 %22, label %29 [
i32 7, label %28
i32 2, label %23
i32 3, label %24
i32 4, label %25
i32 5, label %26
i32 6, label %27
]
23: ; preds = %21
br label %29
24: ; preds = %21
br label %29
25: ; preds = %21
br label %29
26: ; preds = %21
br label %29
27: ; preds = %21
br label %29
28: ; preds = %21
br label %29
29: ; preds = %28, %21, %27, %26, %25, %24, %23
%30 = phi i1 [ false, %28 ], [ true, %27 ], [ true, %26 ], [ true, %25 ], [ true, %24 ], [ true, %23 ], [ true, %21 ]
%31 = phi i32 [ 10, %28 ], [ 10, %27 ], [ 10, %26 ], [ 99, %25 ], [ 10, %24 ], [ 99, %23 ], [ 10, %21 ]
%32 = phi i32 [ undef, %28 ], [ 4, %27 ], [ 3, %26 ], [ 2, %25 ], [ 2, %24 ], [ 1, %23 ], [ 1, %21 ]
%33 = add nsw i32 %31, -1
%34 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%35 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 1
%36 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 2
%37 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 3
%38 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 4
%39 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 5
%40 = bitcast [6 x i32]* %2 to <4 x i32>*
br label %41
41: ; preds = %29, %112
%42 = phi i32 [ %32, %29 ], [ %56, %112 ]
%43 = phi i32 [ 0, %29 ], [ %120, %112 ]
%44 = call i32 (...) @rand()
%45 = srem i32 %44, %31
%46 = call i32 (...) @rand()
%47 = srem i32 %46, %33
%48 = add nsw i32 %47, 1
%49 = call i32 (...) @rand()
%50 = srem i32 %49, %31
br i1 %30, label %55, label %51
51: ; preds = %41
%52 = call i32 (...) @rand()
%53 = srem i32 %52, 4
%54 = add nsw i32 %53, 1
br label %55
55: ; preds = %51, %41
%56 = phi i32 [ %54, %51 ], [ %42, %41 ]
switch i32 %56, label %68 [
i32 1, label %57
i32 2, label %59
i32 3, label %64
i32 4, label %66
]
57: ; preds = %55
%58 = add nsw i32 %48, %45
br label %68
59: ; preds = %55
%60 = icmp sgt i32 %45, %47
%61 = select i1 %60, i32 %45, i32 %48
%62 = select i1 %60, i32 %48, i32 %45
%63 = sub nsw i32 %61, %62
br label %68
64: ; preds = %55
%65 = mul nsw i32 %48, %45
br label %68
66: ; preds = %55
%67 = mul nsw i32 %50, %48
br label %68
68: ; preds = %55, %66, %64, %59, %57
%69 = phi i32 [ %45, %55 ], [ %67, %66 ], [ %45, %64 ], [ %61, %59 ], [ %45, %57 ]
%70 = phi i32 [ %48, %55 ], [ %48, %66 ], [ %48, %64 ], [ %62, %59 ], [ %48, %57 ]
%71 = phi i32 [ %50, %55 ], [ %50, %66 ], [ %65, %64 ], [ %63, %59 ], [ %58, %57 ]
%72 = add i32 %69, 9
%73 = icmp ult i32 %72, 19
%74 = sdiv i32 %69, 10
%75 = select i1 %73, i32 20, i32 %74
%76 = srem i32 %69, 10
%77 = add nsw i32 %56, 9
%78 = add i32 %70, 9
%79 = icmp ult i32 %78, 19
%80 = sdiv i32 %70, 10
%81 = select i1 %79, i32 20, i32 %80
%82 = srem i32 %70, 10
br label %83
83: ; preds = %89, %68
%84 = phi i32 [ 0, %68 ], [ %90, %89 ]
store i32 %75, i32* %34
store i32 %76, i32* %35
store i32 %77, i32* %36
store i32 %81, i32* %37
store i32 %82, i32* %38
store i32 14, i32* %39
%85 = call i32 @drawline(i32* %34)
%86 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%87 = load i32, i32* %1
%88 = icmp eq i32 %87, %71
br i1 %88, label %100, label %89
89: ; preds = %83
store i32 20, i32* %38
store i32 20, i32* %36
store i32 20, i32* %34
%90 = add nuw nsw i32 %84, 1
%91 = icmp eq i32 %84, 0
%92 = select i1 %91, i32 20, i32 16
store i32 %92, i32* %35
store i32 16, i32* %37
%93 = icmp ugt i32 %84, 1
%94 = select i1 %93, i32 16, i32 20
store i32 %94, i32* %39
%95 = call i32 @drawline(i32* %34)
%96 = load i32, i32* %1
%97 = icmp ne i32 %96, %71
%98 = icmp ult i32 %84, 2
%99 = select i1 %97, i1 %98, i1 false
br i1 %99, label %83, label %100
100: ; preds = %83, %89
%101 = phi i32 [ %90, %89 ], [ %84, %83 ]
store i32 20, i32* %39
store i32 20, i32* %38
store i32 20, i32* %35
store i32 20, i32* %34
%102 = add i32 %71, 9
%103 = icmp ult i32 %102, 19
%104 = sdiv i32 %71, 10
%105 = select i1 %103, i32 20, i32 %104
store i32 %105, i32* %36
%106 = srem i32 %71, 10
store i32 %106, i32* %37
%107 = call i32 @drawline(i32* %34)
%108 = load i32, i32* %1
%109 = icmp eq i32 %108, %71
br i1 %109, label %110, label %112
110: ; preds = %100
store i32 20, i32* %39
store i32 20, i32* %38
store <4 x i32> <i32 20, i32 17, i32 18, i32 19>, <4 x i32>* %40
%111 = call i32 @drawline(i32* %34)
br label %112
112: ; preds = %110, %100
%113 = sext i32 %101 to i64
%114 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 %113
%115 = load i32, i32* %114
%116 = add nsw i32 %115, 1
store i32 %116, i32* %114
%117 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%118 = call i32 (...) @getchar()
%119 = call i32 (...) @getchar()
%120 = add nuw nsw i32 %43, 1
%121 = icmp eq i32 %120, 25
br i1 %121, label %122, label %41
122: ; preds = %112
%123 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%124 = load i32, i32* %123
%125 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 2
%126 = load i32, i32* %125
%127 = insertelement <2 x i32> poison, i32 %124, i64 0
%128 = insertelement <2 x i32> %127, i32 %126, i64 1
%129 = sitofp <2 x i32> %128 to <2 x float>
%130 = extractelement <2 x float> %129, i64 0
%131 = fmul float %130, 1.000000e+02
%132 = fdiv float %131, 2.500000e+01
%133 = fpext float %132 to double
%134 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 1
%135 = load i32, i32* %134
%136 = sitofp i32 %135 to float
%137 = fmul float %136, 1.000000e+02
%138 = fdiv float %137, 2.500000e+01
%139 = fpext float %138 to double
%140 = extractelement <2 x float> %129, i64 1
%141 = fmul float %140, 1.000000e+02
%142 = fdiv float %141, 2.500000e+01
%143 = fpext float %142 to double
%144 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%145 = load i32, i32* %144
%146 = sitofp i32 %145 to float
%147 = fmul float %146, 1.000000e+02
%148 = fdiv float %147, 2.500000e+01
%149 = fpext float %148 to double
%150 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([140 x i8], [140 x i8]* @.str.5, i64 0, i64 0), i32 25, i32 %124, double %133, i32 %135, double %139, i32 %126, double %143, i32 %145, double %149)
%151 = fpext float %136 to double
%152 = fmul double %151, 5.000000e+01
%153 = fdiv double %152, 2.500000e+01
%154 = fpext <2 x float> %129 to <2 x double>
%155 = fmul <2 x double> %154, <double 1.000000e+02, double 2.500000e+01>
%156 = fdiv <2 x double> %155, <double 2.500000e+01, double 2.500000e+01>
%157 = extractelement <2 x double> %156, i64 0
%158 = fadd double %157, %153
%159 = extractelement <2 x double> %156, i64 1
%160 = fadd double %158, %159
%161 = fcmp olt double %160, 9.000000e+01
%162 = select i1 %161, i32 66, i32 65
%163 = fcmp olt double %160, 8.000000e+01
%164 = zext i1 %163 to i32
%165 = add nuw nsw i32 %162, %164
%166 = fcmp olt double %160, 7.000000e+01
%167 = zext i1 %166 to i32
%168 = add nuw nsw i32 %165, %167
%169 = fcmp olt double %160, 6.000000e+01
%170 = select i1 %169, i32 2, i32 0
%171 = add nuw nsw i32 %168, %170
%172 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %171, double %160)
%173 = call i32 @exit(i32 0)
unreachable
}