#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*/ printf(char *, ...);
int rollDice();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int gameStatus, sum, myPoint;
  int winRolls[22] = {0};
  int loseRolls[22] = {0};
  int totalWon = 0, totalLost = 0;
  srand(time(NULL));
  int rollNumber;
  int totalRolls = 0;
  int i;
  for (i = 1; i <= 5000; i++) {
    gameStatus = 0;
    sum = rollDice();
    rollNumber = 1;
    switch (sum) {
    case 7:
    case 11:
      gameStatus = 1;
      break;
    case 2:
    case 3:
    case 12:
      gameStatus = 2;
      break;
    default:
      gameStatus = 0;
      myPoint = sum;
      break;
    }
    while (gameStatus == 0) {
      ++rollNumber;
      sum = rollDice();
      if (sum == myPoint)
        gameStatus = 1;
      else if (sum == 7)
        gameStatus = 2;
    }
    totalRolls += rollNumber;
    if (gameStatus == 1) {
      if (rollNumber <= 20)
        ++winRolls[rollNumber];
      else
        ++winRolls[21];
    } else {
      if (rollNumber <= 20)
        ++loseRolls[rollNumber];
      else
        ++loseRolls[21];
    }
  }
  printf("WINNING ROLLS\n");
  for (i = 1; i < 21; i++) {
    if (i < 10)
      printf("%4d", i);
    else
      printf("%3d", i);
  }
  printf(" >20\n");
  for (i = 1; i <= 21; i++) {
    totalWon += winRolls[i];
    if (i < 10)
      printf("%4d", winRolls[i]);
    else
      printf("%3d", winRolls[i]);
  }
  printf("\n\nLOSING ROLLS\n");
  for (i = 1; i < 21; i++) {
    if (i < 10)
      printf("%4d", i);
    else
      printf("%3d", i);
  }
  printf(" >20\n");
  for (i = 1; i <= 21; i++) {
    totalLost += loseRolls[i];
    if (i < 10)
      printf("%4d", loseRolls[i]);
    else
      printf("%3d", loseRolls[i]);
  }
  printf("\n\nTotal games won:\t%3d\n", totalWon);
  printf("Total games lost:\t%3d\n", totalLost);
  printf("Average game length:\t%3d\n", totalRolls / 5000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x58,%edx
call   1040 <memset@plt>
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0x58,%edx
call   1040 <memset@plt>
movl   $0x0,-0xd4(%rbp)
movl   $0x0,-0xd8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
movl   $0x0,-0xe0(%rbp)
movl   $0x1,-0xe4(%rbp)
cmpl   $0x1388,-0xe4(%rbp)
jg     135d <main+0x20d>
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
call   1050 <rollDice@plt>
mov    %eax,-0xc(%rbp)
movl   $0x1,-0xdc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0xe8(%rbp)
add    $0xfffffffe,%eax
sub    $0x2,%eax
jb     124a <main+0xfa>
jmp    1202 <main+0xb2>
mov    -0xe8(%rbp),%eax
sub    $0x7,%eax
je     123e <main+0xee>
jmp    1216 <main+0xc6>
mov    -0xe8(%rbp),%eax
sub    $0xb,%eax
je     123e <main+0xee>
jmp    122a <main+0xda>
mov    -0xe8(%rbp),%eax
sub    $0xc,%eax
je     124a <main+0xfa>
jmp    1256 <main+0x106>
movl   $0x1,-0x8(%rbp)
jmp    1263 <main+0x113>
movl   $0x2,-0x8(%rbp)
jmp    1263 <main+0x113>
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1268 <main+0x118>
cmpl   $0x0,-0x8(%rbp)
jne    12be <main+0x16e>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
mov    $0x0,%al
call   1050 <rollDice@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    12a3 <main+0x153>
movl   $0x1,-0x8(%rbp)
jmp    12b9 <main+0x169>
cmpl   $0x7,-0xc(%rbp)
jne    12b4 <main+0x164>
movl   $0x2,-0x8(%rbp)
jmp    12b9 <main+0x169>
jmp    1268 <main+0x118>
mov    -0xdc(%rbp),%eax
add    -0xe0(%rbp),%eax
mov    %eax,-0xe0(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    130c <main+0x1bc>
cmpl   $0x14,-0xdc(%rbp)
jg     12fe <main+0x1ae>
movslq -0xdc(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x70(%rbp,%rax,4)
jmp    1307 <main+0x1b7>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1344 <main+0x1f4>
cmpl   $0x14,-0xdc(%rbp)
jg     1336 <main+0x1e6>
movslq -0xdc(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0xd0(%rbp,%rax,4)
jmp    133f <main+0x1ef>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1344 <main+0x1f4>
jmp    1349 <main+0x1f9>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    11bd <main+0x6d>
lea    0xc9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0xe4(%rbp)
cmpl   $0x15,-0xe4(%rbp)
jge    13d5 <main+0x285>
cmpl   $0xa,-0xe4(%rbp)
jge    13a8 <main+0x258>
mov    -0xe4(%rbp),%esi
lea    0xc73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13bc <main+0x26c>
mov    -0xe4(%rbp),%esi
lea    0xc5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13c1 <main+0x271>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    1375 <main+0x225>
lea    0xc3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0xe4(%rbp)
cmpl   $0x15,-0xe4(%rbp)
jg     146e <main+0x31e>
movslq -0xe4(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%eax
add    -0xd4(%rbp),%eax
mov    %eax,-0xd4(%rbp)
cmpl   $0xa,-0xe4(%rbp)
jge    143c <main+0x2ec>
movslq -0xe4(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%esi
lea    0xbdf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1455 <main+0x305>
movslq -0xe4(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%esi
lea    0xbc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    145a <main+0x30a>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    13ed <main+0x29d>
lea    0xba8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0xe4(%rbp)
cmpl   $0x15,-0xe4(%rbp)
jge    14e6 <main+0x396>
cmpl   $0xa,-0xe4(%rbp)
jge    14b9 <main+0x369>
mov    -0xe4(%rbp),%esi
lea    0xb62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14cd <main+0x37d>
mov    -0xe4(%rbp),%esi
lea    0xb4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14d2 <main+0x382>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    1486 <main+0x336>
lea    0xb2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0xe4(%rbp)
cmpl   $0x15,-0xe4(%rbp)
jg     1588 <main+0x438>
movslq -0xe4(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%eax
add    -0xd8(%rbp),%eax
mov    %eax,-0xd8(%rbp)
cmpl   $0xa,-0xe4(%rbp)
jge    1553 <main+0x403>
movslq -0xe4(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%esi
lea    0xac8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    156f <main+0x41f>
movslq -0xe4(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%esi
lea    0xaab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1574 <main+0x424>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    14fe <main+0x3ae>
mov    -0xd4(%rbp),%esi
lea    0xa98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xd8(%rbp),%esi
lea    0xa9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xe0(%rbp),%eax
mov    $0x1388,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xa95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x108,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movq   $0x0,0x100(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movq   $0x0,0xa0(%rsp)
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    $0x1,%ebp
mov    $0x100c,%r13d
mov    $0x880,%r14d
xor    %r15d,%r15d
jmp    1217 <main+0xc7>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r15d
mov    $0x1,%r12d
mov    %r12d,%eax
lea    (%rsp,%rax,4),%rax
add    $0x50,%rax
addl   $0x1,(%rax)
add    $0x1,%ebp
cmp    $0x1389,%ebp
je     1295 <main+0x145>
xor    %eax,%eax
call   1050 <rollDice@plt>
mov    %eax,%ebx
cmp    $0xc,%eax
ja     124a <main+0xfa>
bt     %ebx,%r13d
jb     11f0 <main+0xa0>
bt     %ebx,%r14d
jae    124a <main+0xfa>
add    $0x1,%r15d
mov    $0x1,%r12d
mov    %r12d,%eax
lea    (%rsp,%rax,4),%rax
add    $0xb0,%rax
jmp    1205 <main+0xb5>
mov    $0x1,%r12d
add    $0x1,%r12d
xor    %eax,%eax
call   1050 <rollDice@plt>
cmp    %ebx,%eax
je     1264 <main+0x114>
cmp    $0x7,%eax
jne    1250 <main+0x100>
add    %r12d,%r15d
lea    -0x1(%r12),%ecx
cmp    %ebx,%eax
jne    127f <main+0x12f>
lea    0x104(%rsp),%rax
cmp    $0x13,%ecx
ja     1205 <main+0xb5>
jmp    123b <main+0xeb>
lea    0xa4(%rsp),%rax
cmp    $0x13,%ecx
jbe    11fa <main+0xaa>
jmp    1205 <main+0xb5>
lea    0xdb5(%rip),%rdi
call   1030 <puts@plt>
lea    0xd58(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xcce(%rip),%r12
mov    %r12,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0x11,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc8c(%rip),%rdi
call   1030 <puts@plt>
mov    0xb4(%rsp),%esi
mov    %esi,0x4c(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xb8(%rsp),%ebp
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xbc(%rsp),%esi
mov    %esi,0x48(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc0(%rsp),%esi
mov    %esi,0x44(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc4(%rsp),%esi
mov    %esi,0x40(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc8(%rsp),%esi
mov    %esi,0x3c(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xcc(%rsp),%esi
mov    %esi,0x38(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xd0(%rsp),%esi
mov    %esi,0x34(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xd4(%rsp),%esi
mov    %esi,0x30(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xd8(%rsp),%esi
mov    %esi,0x2c(%rsp)
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xdc(%rsp),%esi
mov    %esi,0x28(%rsp)
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xe0(%rsp),%esi
mov    %esi,0x24(%rsp)
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xe4(%rsp),%esi
mov    %esi,0x20(%rsp)
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xe8(%rsp),%esi
mov    %esi,0x1c(%rsp)
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xec(%rsp),%esi
mov    %esi,0x18(%rsp)
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xf0(%rsp),%esi
mov    %esi,0x14(%rsp)
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xf4(%rsp),%esi
mov    %esi,0x10(%rsp)
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xf8(%rsp),%esi
mov    %esi,0xc(%rsp)
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xfc(%rsp),%esi
mov    %esi,0x8(%rsp)
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x100(%rsp),%ebx
mov    %r12,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x104(%rsp),%r13d
mov    %r12,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xabc(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0x11,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x993(%rip),%rdi
call   1030 <puts@plt>
add    0x4c(%rsp),%ebp
add    0x48(%rsp),%ebp
add    0x44(%rsp),%ebp
add    0x40(%rsp),%ebp
add    0x3c(%rsp),%ebp
add    0x38(%rsp),%ebp
add    0x34(%rsp),%ebp
add    0x30(%rsp),%ebp
add    0x2c(%rsp),%ebp
add    0x28(%rsp),%ebp
add    0x24(%rsp),%ebp
add    0x20(%rsp),%ebp
add    0x1c(%rsp),%ebp
add    0x18(%rsp),%ebp
add    0x14(%rsp),%ebp
add    0x10(%rsp),%ebp
add    0xc(%rsp),%ebp
add    0x8(%rsp),%ebp
add    %ebx,%ebp
add    %r13d,%ebp
mov    0x54(%rsp),%ebx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x58(%rsp),%esi
add    %esi,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x5c(%rsp),%esi
add    %esi,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x60(%rsp),%esi
add    %esi,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x64(%rsp),%esi
add    %esi,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x68(%rsp),%esi
add    %esi,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x6c(%rsp),%esi
add    %esi,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x70(%rsp),%esi
add    %esi,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x74(%rsp),%esi
add    %esi,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x78(%rsp),%esi
add    %esi,%ebx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x7c(%rsp),%esi
add    %esi,%ebx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x80(%rsp),%esi
add    %esi,%ebx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x84(%rsp),%esi
add    %esi,%ebx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x88(%rsp),%esi
add    %esi,%ebx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8c(%rsp),%esi
add    %esi,%ebx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x90(%rsp),%esi
add    %esi,%ebx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x94(%rsp),%esi
add    %esi,%ebx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x98(%rsp),%esi
add    %esi,%ebx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x9c(%rsp),%esi
add    %esi,%ebx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xa0(%rsp),%esi
add    %esi,%ebx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xa4(%rsp),%esi
add    %esi,%ebx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x766(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x76e(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15d,%eax
mov    $0xd1b71759,%esi
imul   %rax,%rsi
shr    $0x2c,%rsi
lea    0x765(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"WINNING ROLLS\0A\00"
@.str.1 = [4 x i8] c"%4d\00"
@.str.2 = [4 x i8] c"%3d\00"
@.str.3 = [6 x i8] c" >20\0A\00"
@.str.4 = [16 x i8] c"\0A\0ALOSING ROLLS\0A\00"
@.str.5 = [24 x i8] c"\0A\0ATotal games won:\09%3d\0A\00"
@.str.6 = [23 x i8] c"Total games lost:\09%3d\0A\00"
@.str.7 = [26 x i8] c"Average game length:\09%3d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [22 x i32]
%6 = alloca [22 x i32]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
%12 = bitcast [22 x i32]* %5 to i8*
%13 = bitcast [22 x i32]* %6 to i8*
store i32 0, i32* %7
store i32 0, i32* %8
%14 = call i32 @time(i32* null)
%15 = call i32 @srand(i32 %14)
store i32 0, i32* %10
store i32 1, i32* %11
br label %16
16: ; preds = %79, %0
%17 = load i32, i32* %11
%18 = icmp sle i32 %17, 5000
br i1 %18, label %19, label %82
19: ; preds = %16
store i32 0, i32* %2
%20 = call i32 (...) @rollDice()
store i32 %20, i32* %3
store i32 1, i32* %9
%21 = load i32, i32* %3
switch i32 %21, label %24 [
i32 7, label %22
i32 11, label %22
i32 2, label %23
i32 3, label %23
i32 12, label %23
]
22: ; preds = %19, %19
store i32 1, i32* %2
br label %26
23: ; preds = %19, %19, %19
store i32 2, i32* %2
br label %26
24: ; preds = %19
store i32 0, i32* %2
%25 = load i32, i32* %3
store i32 %25, i32* %4
br label %26
26: ; preds = %24, %23, %22
br label %27
27: ; preds = %43, %26
%28 = load i32, i32* %2
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %44
30: ; preds = %27
%31 = load i32, i32* %9
%32 = add nsw i32 %31, 1
store i32 %32, i32* %9
%33 = call i32 (...) @rollDice()
store i32 %33, i32* %3
%34 = load i32, i32* %3
%35 = load i32, i32* %4
%36 = icmp eq i32 %34, %35
br i1 %36, label %37, label %38
37: ; preds = %30
store i32 1, i32* %2
br label %43
38: ; preds = %30
%39 = load i32, i32* %3
%40 = icmp eq i32 %39, 7
br i1 %40, label %41, label %42
41: ; preds = %38
store i32 2, i32* %2
br label %42
42: ; preds = %41, %38
br label %43
43: ; preds = %42, %37
br label %27
44: ; preds = %27
%45 = load i32, i32* %9
%46 = load i32, i32* %10
%47 = add nsw i32 %46, %45
store i32 %47, i32* %10
%48 = load i32, i32* %2
%49 = icmp eq i32 %48, 1
br i1 %49, label %50, label %64
50: ; preds = %44
%51 = load i32, i32* %9
%52 = icmp sle i32 %51, 20
br i1 %52, label %53, label %59
53: ; preds = %50
%54 = load i32, i32* %9
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [22 x i32], [22 x i32]* %5, i64 0, i64 %55
%57 = load i32, i32* %56
%58 = add nsw i32 %57, 1
store i32 %58, i32* %56
br label %63
59: ; preds = %50
%60 = getelementptr inbounds [22 x i32], [22 x i32]* %5, i64 0, i64 21
%61 = load i32, i32* %60
%62 = add nsw i32 %61, 1
store i32 %62, i32* %60
br label %63
63: ; preds = %59, %53
br label %78
64: ; preds = %44
%65 = load i32, i32* %9
%66 = icmp sle i32 %65, 20
br i1 %66, label %67, label %73
67: ; preds = %64
%68 = load i32, i32* %9
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [22 x i32], [22 x i32]* %6, i64 0, i64 %69
%71 = load i32, i32* %70
%72 = add nsw i32 %71, 1
store i32 %72, i32* %70
br label %77
73: ; preds = %64
%74 = getelementptr inbounds [22 x i32], [22 x i32]* %6, i64 0, i64 21
%75 = load i32, i32* %74
%76 = add nsw i32 %75, 1
store i32 %76, i32* %74
br label %77
77: ; preds = %73, %67
br label %78
78: ; preds = %77, %63
br label %79
79: ; preds = %78
%80 = load i32, i32* %11
%81 = add nsw i32 %80, 1
store i32 %81, i32* %11
br label %16
82: ; preds = %16
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %11
br label %84
84: ; preds = %97, %82
%85 = load i32, i32* %11
%86 = icmp slt i32 %85, 21
br i1 %86, label %87, label %100
87: ; preds = %84
%88 = load i32, i32* %11
%89 = icmp slt i32 %88, 10
br i1 %89, label %90, label %93
90: ; preds = %87
%91 = load i32, i32* %11
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %91)
br label %96
93: ; preds = %87
%94 = load i32, i32* %11
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %94)
br label %96
96: ; preds = %93, %90
br label %97
97: ; preds = %96
%98 = load i32, i32* %11
%99 = add nsw i32 %98, 1
store i32 %99, i32* %11
br label %84
100: ; preds = %84
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %11
br label %102
102: ; preds = %127, %100
%103 = load i32, i32* %11
%104 = icmp sle i32 %103, 21
br i1 %104, label %105, label %130
105: ; preds = %102
%106 = load i32, i32* %11
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [22 x i32], [22 x i32]* %5, i64 0, i64 %107
%109 = load i32, i32* %108
%110 = load i32, i32* %7
%111 = add nsw i32 %110, %109
store i32 %111, i32* %7
%112 = load i32, i32* %11
%113 = icmp slt i32 %112, 10
br i1 %113, label %114, label %120
114: ; preds = %105
%115 = load i32, i32* %11
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [22 x i32], [22 x i32]* %5, i64 0, i64 %116
%118 = load i32, i32* %117
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %118)
br label %126
120: ; preds = %105
%121 = load i32, i32* %11
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [22 x i32], [22 x i32]* %5, i64 0, i64 %122
%124 = load i32, i32* %123
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %124)
br label %126
126: ; preds = %120, %114
br label %127
127: ; preds = %126
%128 = load i32, i32* %11
%129 = add nsw i32 %128, 1
store i32 %129, i32* %11
br label %102
130: ; preds = %102
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %11
br label %132
132: ; preds = %145, %130
%133 = load i32, i32* %11
%134 = icmp slt i32 %133, 21
br i1 %134, label %135, label %148
135: ; preds = %132
%136 = load i32, i32* %11
%137 = icmp slt i32 %136, 10
br i1 %137, label %138, label %141
138: ; preds = %135
%139 = load i32, i32* %11
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %139)
br label %144
141: ; preds = %135
%142 = load i32, i32* %11
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %142)
br label %144
144: ; preds = %141, %138
br label %145
145: ; preds = %144
%146 = load i32, i32* %11
%147 = add nsw i32 %146, 1
store i32 %147, i32* %11
br label %132
148: ; preds = %132
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %11
br label %150
150: ; preds = %175, %148
%151 = load i32, i32* %11
%152 = icmp sle i32 %151, 21
br i1 %152, label %153, label %178
153: ; preds = %150
%154 = load i32, i32* %11
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds [22 x i32], [22 x i32]* %6, i64 0, i64 %155
%157 = load i32, i32* %156
%158 = load i32, i32* %8
%159 = add nsw i32 %158, %157
store i32 %159, i32* %8
%160 = load i32, i32* %11
%161 = icmp slt i32 %160, 10
br i1 %161, label %162, label %168
162: ; preds = %153
%163 = load i32, i32* %11
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds [22 x i32], [22 x i32]* %6, i64 0, i64 %164
%166 = load i32, i32* %165
%167 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %166)
br label %174
168: ; preds = %153
%169 = load i32, i32* %11
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds [22 x i32], [22 x i32]* %6, i64 0, i64 %170
%172 = load i32, i32* %171
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %172)
br label %174
174: ; preds = %168, %162
br label %175
175: ; preds = %174
%176 = load i32, i32* %11
%177 = add nsw i32 %176, 1
store i32 %177, i32* %11
br label %150
178: ; preds = %150
%179 = load i32, i32* %7
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %179)
%181 = load i32, i32* %8
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %181)
%183 = load i32, i32* %10
%184 = sdiv i32 %183, 5000
%185 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 %184)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%4d\00"
@.str.2 = [4 x i8] c"%3d\00"
@.str.5 = [24 x i8] c"\0A\0ATotal games won:\09%3d\0A\00"
@.str.6 = [23 x i8] c"Total games lost:\09%3d\0A\00"
@.str.7 = [26 x i8] c"Average game length:\09%3d\0A\00"
@str = [14 x i8] c"WINNING ROLLS\00"
@str.9 = [15 x i8] c"\0A\0ALOSING ROLLS\00"
@str.10 = [5 x i8] c" >20\00"
define i32 @main() {
%1 = alloca [22 x i32]
%2 = alloca [22 x i32]
%3 = bitcast [22 x i32]* %1 to i8*
%4 = bitcast [22 x i32]* %2 to i8*
%5 = tail call i32 @time(i32* null)
%6 = tail call i32 @srand(i32 %5)
%7 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 21
%8 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 21
br label %9
9: ; preds = %0, %39
%10 = phi i32 [ 1, %0 ], [ %44, %39 ]
%11 = phi i32 [ 0, %0 ], [ %41, %39 ]
%12 = tail call i32 (...) @rollDice()
switch i32 %12, label %13 [
i32 7, label %25
i32 11, label %25
i32 2, label %23
i32 3, label %23
i32 12, label %23
]
13: ; preds = %9, %13
%14 = phi i32 [ %15, %13 ], [ 1, %9 ]
%15 = add nuw nsw i32 %14, 1
%16 = tail call i32 (...) @rollDice()
%17 = icmp eq i32 %16, %12
%18 = icmp eq i32 %16, 7
%19 = or i1 %17, %18
br i1 %19, label %20, label %13
20: ; preds = %13
%21 = add nuw nsw i32 %15, %11
%22 = icmp ult i32 %14, 20
br i1 %17, label %27, label %33
23: ; preds = %9, %9, %9
%24 = add nuw nsw i32 %11, 1
br label %34
25: ; preds = %9, %9
%26 = add nuw nsw i32 %11, 1
br label %28
27: ; preds = %20
br i1 %22, label %28, label %39
28: ; preds = %25, %27
%29 = phi i32 [ 1, %25 ], [ %15, %27 ]
%30 = phi i32 [ %26, %25 ], [ %21, %27 ]
%31 = zext i32 %29 to i64
%32 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 %31
br label %39
33: ; preds = %20
br i1 %22, label %34, label %39
34: ; preds = %23, %33
%35 = phi i32 [ 1, %23 ], [ %15, %33 ]
%36 = phi i32 [ %24, %23 ], [ %21, %33 ]
%37 = zext i32 %35 to i64
%38 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 %37
br label %39
39: ; preds = %33, %27, %28, %34
%40 = phi i32* [ %32, %28 ], [ %38, %34 ], [ %8, %27 ], [ %7, %33 ]
%41 = phi i32 [ %30, %28 ], [ %36, %34 ], [ %21, %27 ], [ %21, %33 ]
%42 = load i32, i32* %40
%43 = add nsw i32 %42, 1
store i32 %43, i32* %40
%44 = add nuw nsw i32 %10, 1
%45 = icmp eq i32 %44, 5001
br i1 %45, label %46, label %9
46: ; preds = %39
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 2)
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 4)
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 5)
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 6)
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 7)
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 8)
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 9)
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 10)
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 11)
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 12)
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 13)
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 14)
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 15)
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 16)
%64 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 17)
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 18)
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 19)
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 20)
%68 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.10, i64 0, i64 0))
%69 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 1
%70 = load i32, i32* %69
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %70)
%72 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 2
%73 = load i32, i32* %72
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %73)
%75 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 3
%76 = load i32, i32* %75
%77 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %76)
%78 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 4
%79 = load i32, i32* %78
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %79)
%81 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 5
%82 = load i32, i32* %81
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %82)
%84 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 6
%85 = load i32, i32* %84
%86 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %85)
%87 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 7
%88 = load i32, i32* %87
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %88)
%90 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 8
%91 = load i32, i32* %90
%92 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %91)
%93 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 9
%94 = load i32, i32* %93
%95 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %94)
%96 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 10
%97 = load i32, i32* %96
%98 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %97)
%99 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 11
%100 = load i32, i32* %99
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %100)
%102 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 12
%103 = load i32, i32* %102
%104 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %103)
%105 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 13
%106 = load i32, i32* %105
%107 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %106)
%108 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 14
%109 = load i32, i32* %108
%110 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %109)
%111 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 15
%112 = load i32, i32* %111
%113 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %112)
%114 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 16
%115 = load i32, i32* %114
%116 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %115)
%117 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 17
%118 = load i32, i32* %117
%119 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %118)
%120 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 18
%121 = load i32, i32* %120
%122 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %121)
%123 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 19
%124 = load i32, i32* %123
%125 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %124)
%126 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 20
%127 = load i32, i32* %126
%128 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %127)
%129 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 21
%130 = load i32, i32* %129
%131 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %130)
%132 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.9, i64 0, i64 0))
%133 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
%134 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 2)
%135 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%136 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 4)
%137 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 5)
%138 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 6)
%139 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 7)
%140 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 8)
%141 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 9)
%142 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 10)
%143 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 11)
%144 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 12)
%145 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 13)
%146 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 14)
%147 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 15)
%148 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 16)
%149 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 17)
%150 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 18)
%151 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 19)
%152 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 20)
%153 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.10, i64 0, i64 0))
%154 = add nsw i32 %73, %70
%155 = add nsw i32 %76, %154
%156 = add nsw i32 %79, %155
%157 = add nsw i32 %82, %156
%158 = add nsw i32 %85, %157
%159 = add nsw i32 %88, %158
%160 = add nsw i32 %91, %159
%161 = add nsw i32 %94, %160
%162 = add nsw i32 %97, %161
%163 = add nsw i32 %100, %162
%164 = add nsw i32 %103, %163
%165 = add nsw i32 %106, %164
%166 = add nsw i32 %109, %165
%167 = add nsw i32 %112, %166
%168 = add nsw i32 %115, %167
%169 = add nsw i32 %118, %168
%170 = add nsw i32 %121, %169
%171 = add nsw i32 %124, %170
%172 = add nsw i32 %127, %171
%173 = add nsw i32 %130, %172
%174 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 1
%175 = load i32, i32* %174
%176 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %175)
%177 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 2
%178 = load i32, i32* %177
%179 = add nsw i32 %178, %175
%180 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %178)
%181 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 3
%182 = load i32, i32* %181
%183 = add nsw i32 %182, %179
%184 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %182)
%185 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 4
%186 = load i32, i32* %185
%187 = add nsw i32 %186, %183
%188 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %186)
%189 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 5
%190 = load i32, i32* %189
%191 = add nsw i32 %190, %187
%192 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %190)
%193 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 6
%194 = load i32, i32* %193
%195 = add nsw i32 %194, %191
%196 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %194)
%197 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 7
%198 = load i32, i32* %197
%199 = add nsw i32 %198, %195
%200 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %198)
%201 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 8
%202 = load i32, i32* %201
%203 = add nsw i32 %202, %199
%204 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %202)
%205 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 9
%206 = load i32, i32* %205
%207 = add nsw i32 %206, %203
%208 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %206)
%209 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 10
%210 = load i32, i32* %209
%211 = add nsw i32 %210, %207
%212 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %210)
%213 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 11
%214 = load i32, i32* %213
%215 = add nsw i32 %214, %211
%216 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %214)
%217 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 12
%218 = load i32, i32* %217
%219 = add nsw i32 %218, %215
%220 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %218)
%221 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 13
%222 = load i32, i32* %221
%223 = add nsw i32 %222, %219
%224 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %222)
%225 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 14
%226 = load i32, i32* %225
%227 = add nsw i32 %226, %223
%228 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %226)
%229 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 15
%230 = load i32, i32* %229
%231 = add nsw i32 %230, %227
%232 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %230)
%233 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 16
%234 = load i32, i32* %233
%235 = add nsw i32 %234, %231
%236 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %234)
%237 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 17
%238 = load i32, i32* %237
%239 = add nsw i32 %238, %235
%240 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %238)
%241 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 18
%242 = load i32, i32* %241
%243 = add nsw i32 %242, %239
%244 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %242)
%245 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 19
%246 = load i32, i32* %245
%247 = add nsw i32 %246, %243
%248 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %246)
%249 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 20
%250 = load i32, i32* %249
%251 = add nsw i32 %250, %247
%252 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %250)
%253 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 21
%254 = load i32, i32* %253
%255 = add nsw i32 %254, %251
%256 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %254)
%257 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %173)
%258 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %255)
%259 = udiv i32 %41, 5000
%260 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 %259)
ret i32 0
}