#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 */
scalar_t__ EOF;
int atoi(char *);
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int main() {
  char first_line[33];
  size_t n = 0;
  int skip = 0;
  for (size_t i = 0; i < 33; i++) {
    scanf("%c", &first_line[i]);
    if (first_line[i] == '\n') {
      first_line[i + 1] = '\0';
      break;
    }
    if (!skip) {
      n++;
      if (n % 3 == 0)
        skip = 1;
    } else {
      skip = 0;
    }
  }
  n /= 3;
  int first_index = 0;
  char numbers[n][16];
  for (int height = 0; height < 5; height++) {
    int letter = 0, offset = 0;
    char c;
    while (1) {
      if (height) {
        if (scanf("%c", &c) == EOF)
          break;
      } else {
        c = first_line[first_index++];
      }
      if (c == '\n')
        break;
      if (offset == 3) {
        letter++;
        offset = 0;
      } else {
        numbers[letter][height * 3 + offset] = c;
        offset++;
      }
    }
  }
  for (int i = 0; i < n; i++)
    numbers[i][15] = '\0';
  char number_string[9];
  int max_index = 0;
  int legit = 1;
  for (int i = 0; i < n; i++) {
    max_index = i;
    if (!strncmp(numbers[i], "**** ** ** ****", 15)) {
      number_string[i] = '0';
      continue;
    }
    if (!strncmp(numbers[i], "  *  *  *  *  *", 15)) {
      number_string[i] = '1';
      continue;
    }
    if (!strncmp(numbers[i], "***  *****  ***", 15)) {
      number_string[i] = '2';
      continue;
    }
    if (!strncmp(numbers[i], "***  ****  ****", 15)) {
      number_string[i] = '3';
      continue;
    }
    if (!strncmp(numbers[i], "* ** ****  *  *", 15)) {
      number_string[i] = '4';
      continue;
    }
    if (!strncmp(numbers[i], "****  ***  ****", 15)) {
      number_string[i] = '5';
      continue;
    }
    if (!strncmp(numbers[i], "****  **** ****", 15)) {
      number_string[i] = '6';
      continue;
    }
    if (!strncmp(numbers[i], "***  *  *  *  *", 15)) {
      number_string[i] = '7';
      continue;
    }
    if (!strncmp(numbers[i], "**** ***** ****", 15)) {
      number_string[i] = '8';
      continue;
    }
    if (!strncmp(numbers[i], "**** ****  ****", 15)) {
      number_string[i] = '9';
      continue;
    }
    legit = 0;
    break;
  }
  if (legit) {
    number_string[max_index + 1] = '\0';
    printf(atoi(number_string) % 6 == 0 ? "BEER!!\n" : "BOOM!!\n");
  } else {
    printf("BOOM!!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movq   $0x0,-0x48(%rbp)
cmpq   $0x21,-0x48(%rbp)
jae    11ff <main+0xbf>
lea    -0x30(%rbp),%rsi
add    -0x48(%rbp),%rsi
lea    0xe7d(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x48(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%eax
cmp    $0xa,%eax
jne    11a8 <main+0x68>
mov    -0x48(%rbp),%rax
movb   $0x0,-0x2f(%rbp,%rax,1)
jmp    11ff <main+0xbf>
cmpl   $0x0,-0x3c(%rbp)
jne    11e2 <main+0xa2>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
cmp    $0x0,%rdx
jne    11dd <main+0x9d>
movl   $0x1,-0x3c(%rbp)
jmp    11e9 <main+0xa9>
movl   $0x0,-0x3c(%rbp)
jmp    11ee <main+0xae>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1169 <main+0x29>
mov    -0x38(%rbp),%rax
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mul    %rcx
shr    %rdx
mov    %rdx,-0x38(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x38(%rbp),%rax
mov    %rsp,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rax,%rdx
shl    $0x4,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x98(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
cmpl   $0x5,-0x64(%rbp)
jge    1324 <main+0x1e4>
movl   $0x0,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
jmp    1268 <main+0x128>
cmpl   $0x0,-0x64(%rbp)
je     129c <main+0x15c>
lea    0xd87(%rip),%rdi
lea    -0x6d(%rbp),%rsi
call   1050 <scanf@plt>
mov    0x2d5f(%rip),%rcx
cmp    (%rcx),%rax
jne    1297 <main+0x157>
jmp    1311 <main+0x1d1>
jmp    12b0 <main+0x170>
mov    -0x4c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4c(%rbp)
cltq
mov    -0x30(%rbp,%rax,1),%al
mov    %al,-0x6d(%rbp)
movsbl -0x6d(%rbp),%eax
cmp    $0xa,%eax
jne    12c2 <main+0x182>
jmp    1311 <main+0x1d1>
cmpl   $0x3,-0x6c(%rbp)
jne    12e1 <main+0x1a1>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
jmp    130c <main+0x1cc>
mov    -0x98(%rbp),%rax
mov    -0x6d(%rbp),%dl
movslq -0x68(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
imul   $0x3,-0x64(%rbp),%ecx
add    -0x6c(%rbp),%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1263 <main+0x123>
jmp    1316 <main+0x1d6>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    124b <main+0x10b>
movl   $0x0,-0x74(%rbp)
movslq -0x74(%rbp),%rax
cmp    -0x38(%rbp),%rax
jae    135d <main+0x21d>
mov    -0x98(%rbp),%rax
movslq -0x74(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movb   $0x0,0xf(%rax)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    132b <main+0x1eb>
movl   $0x0,-0x84(%rbp)
movl   $0x1,-0x88(%rbp)
movl   $0x0,-0x8c(%rbp)
movslq -0x8c(%rbp),%rax
cmp    -0x38(%rbp),%rax
jae    163b <main+0x4fb>
mov    -0x98(%rbp),%rdi
mov    -0x8c(%rbp),%eax
mov    %eax,-0x84(%rbp)
movslq -0x8c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdi
lea    0xc4f(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    13d8 <main+0x298>
movslq -0x8c(%rbp),%rax
movb   $0x30,-0x7d(%rbp,%rax,1)
jmp    1627 <main+0x4e7>
mov    -0x98(%rbp),%rdi
movslq -0x8c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdi
lea    0xc1f(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1418 <main+0x2d8>
movslq -0x8c(%rbp),%rax
movb   $0x31,-0x7d(%rbp,%rax,1)
jmp    1627 <main+0x4e7>
mov    -0x98(%rbp),%rdi
movslq -0x8c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdi
lea    0xbef(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1458 <main+0x318>
movslq -0x8c(%rbp),%rax
movb   $0x32,-0x7d(%rbp,%rax,1)
jmp    1627 <main+0x4e7>
mov    -0x98(%rbp),%rdi
movslq -0x8c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdi
lea    0xbbf(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1498 <main+0x358>
movslq -0x8c(%rbp),%rax
movb   $0x33,-0x7d(%rbp,%rax,1)
jmp    1627 <main+0x4e7>
mov    -0x98(%rbp),%rdi
movslq -0x8c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdi
lea    0xb8f(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    14d8 <main+0x398>
movslq -0x8c(%rbp),%rax
movb   $0x34,-0x7d(%rbp,%rax,1)
jmp    1627 <main+0x4e7>
mov    -0x98(%rbp),%rdi
movslq -0x8c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdi
lea    0xb5f(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1518 <main+0x3d8>
movslq -0x8c(%rbp),%rax
movb   $0x35,-0x7d(%rbp,%rax,1)
jmp    1627 <main+0x4e7>
mov    -0x98(%rbp),%rdi
movslq -0x8c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdi
lea    0xb2f(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1558 <main+0x418>
movslq -0x8c(%rbp),%rax
movb   $0x36,-0x7d(%rbp,%rax,1)
jmp    1627 <main+0x4e7>
mov    -0x98(%rbp),%rdi
movslq -0x8c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdi
lea    0xaff(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1598 <main+0x458>
movslq -0x8c(%rbp),%rax
movb   $0x37,-0x7d(%rbp,%rax,1)
jmp    1627 <main+0x4e7>
mov    -0x98(%rbp),%rdi
movslq -0x8c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdi
lea    0xacf(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    15d8 <main+0x498>
movslq -0x8c(%rbp),%rax
movb   $0x38,-0x7d(%rbp,%rax,1)
jmp    1627 <main+0x4e7>
mov    -0x98(%rbp),%rdi
movslq -0x8c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdi
lea    0xa9f(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1618 <main+0x4d8>
movslq -0x8c(%rbp),%rax
movb   $0x39,-0x7d(%rbp,%rax,1)
jmp    1627 <main+0x4e7>
movl   $0x0,-0x88(%rbp)
jmp    163b <main+0x4fb>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    137b <main+0x23b>
cmpl   $0x0,-0x88(%rbp)
je     1688 <main+0x548>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x0,-0x7d(%rbp,%rax,1)
lea    -0x7d(%rbp),%rdi
call   1060 <atoi@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
lea    0xa3b(%rip),%rdi
lea    0xa2c(%rip),%rax
cmp    $0x0,%edx
cmove  %rax,%rdi
call   1040 <printf@plt>
jmp    1694 <main+0x554>
lea    0xa1c(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
xor    %eax,%eax
mov    %rax,-0x40(%rbp)
lea    0xe92(%rip),%r12
movabs $0xaaaaaaaaaaaaaaab,%r14
aa aa aa
movabs $0x5555555555555556,%r15
55 55 55
xor    %ebx,%ebx
xor    %r13d,%r13d
jmp    119d <main+0x4d>
nopl   0x0(%rax)
add    $0x1,%rbx
mov    %eax,%r13d
cmp    $0x21,%rbx
je     11e6 <main+0x96>
lea    (%rbx,%rbp,1),%rsi
add    $0xffffffffffffff70,%rsi
mov    %r12,%rdi
call   1060 <scanf@plt>
cmpb   $0xa,-0x90(%rbp,%rbx,1)
0a
je     11de <main+0x8e>
xor    %eax,%eax
test   %r13d,%r13d
jne    1190 <main+0x40>
mov    -0x40(%rbp),%rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,-0x40(%rbp)
imul   %r14,%rcx
xor    %eax,%eax
cmp    %r15,%rcx
setb   %al
jmp    1190 <main+0x40>
movb   $0x0,-0x8f(%rbp,%rbx,1)
mov    %rsp,-0x58(%rbp)
mov    -0x40(%rbp),%rax
mul    %r14
shr    %rdx
mov    %rdx,-0x50(%rbp)
mov    %rdx,%rax
shl    $0x4,%rax
mov    %rsp,%rcx
mov    %rcx,%rdx
sub    %rax,%rdx
mov    %rdx,-0x48(%rbp)
mov    %rdx,%rsp
neg    %rax
lea    (%rcx,%rax,1),%r12
add    $0x2,%r12
xor    %r14d,%r14d
lea    0xddc(%rip),%r13
lea    -0x31(%rbp),%rbx
xor    %r15d,%r15d
jmp    1246 <main+0xf6>
nopl   (%rax)
add    $0x1,%r14d
mov    -0x60(%rbp),%r12
add    $0x3,%r12
cmp    $0x5,%r14d
je     1381 <main+0x231>
mov    %r12,-0x60(%rbp)
jmp    126a <main+0x11a>
nopl   0x0(%rax)
movslq %r15d,%rax
add    $0x1,%r15d
movzbl -0x90(%rbp,%rax,1),%eax
ff
mov    %al,-0x31(%rbp)
cmp    $0xa,%al
je     1230 <main+0xe0>
add    $0x10,%r12
test   %r14d,%r14d
je     1290 <main+0x140>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    0x2d67(%rip),%rcx
cmp    (%rcx),%rax
je     1230 <main+0xe0>
movzbl -0x31(%rbp),%eax
cmp    $0xa,%al
jne    12a6 <main+0x156>
jmp    1230 <main+0xe0>
movslq %r15d,%rax
add    $0x1,%r15d
movzbl -0x90(%rbp,%rax,1),%eax
ff
mov    %al,-0x31(%rbp)
cmp    $0xa,%al
je     1230 <main+0xe0>
mov    %al,-0x2(%r12)
test   %r14d,%r14d
je     12e0 <main+0x190>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    0x2d26(%rip),%rcx
cmp    (%rcx),%rax
je     1230 <main+0xe0>
movzbl -0x31(%rbp),%eax
cmp    $0xa,%al
jne    12fa <main+0x1aa>
jmp    1230 <main+0xe0>
nopl   0x0(%rax,%rax,1)
movslq %r15d,%rax
add    $0x1,%r15d
movzbl -0x90(%rbp,%rax,1),%eax
ff
mov    %al,-0x31(%rbp)
cmp    $0xa,%al
je     1230 <main+0xe0>
mov    %al,-0x1(%r12)
test   %r14d,%r14d
je     1330 <main+0x1e0>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    0x2cd2(%rip),%rcx
cmp    (%rcx),%rax
je     1230 <main+0xe0>
movzbl -0x31(%rbp),%eax
cmp    $0xa,%al
jne    134a <main+0x1fa>
jmp    1230 <main+0xe0>
nopl   0x0(%rax)
movslq %r15d,%rax
add    $0x1,%r15d
movzbl -0x90(%rbp,%rax,1),%eax
ff
mov    %al,-0x31(%rbp)
cmp    $0xa,%al
je     1230 <main+0xe0>
mov    %al,(%r12)
test   %r14d,%r14d
je     1250 <main+0x100>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    0x2c7f(%rip),%rcx
cmp    (%rcx),%rax
je     1230 <main+0xe0>
cmpb   $0xa,-0x31(%rbp)
jne    1266 <main+0x116>
jmp    1230 <main+0xe0>
cmpq   $0x2,-0x40(%rbp)
ja     1392 <main+0x242>
mov    $0x1,%eax
jmp    15d3 <main+0x483>
mov    -0x50(%rbp),%rdi
cmp    $0x2,%rdi
mov    $0x1,%ecx
cmovae %rdi,%rcx
lea    -0x1(%rcx),%rdx
mov    %ecx,%eax
and    $0x3,%eax
cmp    $0x3,%rdx
jae    13b6 <main+0x266>
xor    %edx,%edx
jmp    13ec <main+0x29c>
and    $0xfffffffffffffffc,%rcx
mov    -0x48(%rbp),%rdx
lea    0x3f(%rdx),%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movb   $0x0,-0x30(%rsi)
movb   $0x0,-0x20(%rsi)
movb   $0x0,-0x10(%rsi)
movb   $0x0,(%rsi)
add    $0x4,%rdx
add    $0x40,%rsi
cmp    %rdx,%rcx
jne    13d0 <main+0x280>
test   %rax,%rax
je     141d <main+0x2cd>
shl    $0x4,%rdx
mov    -0x48(%rbp),%rcx
add    %rdx,%rcx
add    $0xf,%rcx
shl    $0x4,%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movb   $0x0,(%rcx,%rdx,1)
add    $0x10,%rdx
cmp    %rdx,%rax
jne    1410 <main+0x2c0>
mov    $0x1,%eax
cmpq   $0x3,-0x40(%rbp)
jb     15d3 <main+0x483>
cmp    $0x2,%rdi
mov    $0x1,%ebx
cmovae %rdi,%rbx
xor    %r13d,%r13d
lea    0xbbf(%rip),%r12
mov    -0x48(%rbp),%r15
jmp    146e <main+0x31e>
nopw   0x0(%rax,%rax,1)
mov    %r15,%r14
mov    $0x30,%cl
mov    %cl,-0x31(%rbp,%r13,1)
add    $0x1,%r13
mov    %r14,%r15
add    $0x10,%r15
cmp    %r13,%rbx
je     15d0 <main+0x480>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1450 <main+0x300>
mov    %r15,%rdi
lea    0xb87(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1580 <main+0x430>
mov    %r15,%rdi
lea    0xb7b(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     158a <main+0x43a>
mov    %r15,%rdi
lea    0xb6f(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1594 <main+0x444>
mov    %r15,%rdi
lea    0xb63(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     159e <main+0x44e>
mov    %r15,%rdi
lea    0xb57(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     15a8 <main+0x458>
mov    %r15,%rdi
lea    0xb4b(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     15b2 <main+0x462>
mov    %r15,%rdi
lea    0xb3f(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     15bc <main+0x46c>
mov    %r15,%rdi
lea    0xb37(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     15c6 <main+0x476>
mov    %r15,%r14
mov    %r15,%rdi
lea    0xb2c(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
mov    $0x39,%cl
test   %eax,%eax
je     1455 <main+0x305>
jmp    161f <main+0x4cf>
mov    %r15,%r14
mov    $0x31,%cl
jmp    1455 <main+0x305>
mov    %r15,%r14
mov    $0x32,%cl
jmp    1455 <main+0x305>
mov    %r15,%r14
mov    $0x33,%cl
jmp    1455 <main+0x305>
mov    %r15,%r14
mov    $0x34,%cl
jmp    1455 <main+0x305>
mov    %r15,%r14
mov    $0x35,%cl
jmp    1455 <main+0x305>
mov    %r15,%r14
mov    $0x36,%cl
jmp    1455 <main+0x305>
mov    %r15,%r14
mov    $0x37,%cl
jmp    1455 <main+0x305>
mov    %r15,%r14
mov    $0x38,%cl
jmp    1455 <main+0x305>
mov    %r13d,%eax
movb   $0x0,-0x31(%rbp,%rax,1)
lea    -0x31(%rbp),%rdi
call   1070 <atoi@plt>
imul   $0xaaaaaaab,%eax,%eax
add    $0x2aaaaaaa,%eax
ror    %eax
cmp    $0x2aaaaaab,%eax
lea    0xaa9(%rip),%rax
lea    0xaaa(%rip),%rdi
cmovb  %rax,%rdi
call   1050 <printf@plt>
mov    -0x58(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xa8d(%rip),%rdi
call   1040 <puts@plt>
jmp    160a <main+0x4ba>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@EOF = global i64 0
@.str.1 = [16 x i8] c"**** ** ** ****\00"
@.str.2 = [16 x i8] c" * * * * *\00"
@.str.3 = [16 x i8] c"*** ***** ***\00"
@.str.4 = [16 x i8] c"*** **** ****\00"
@.str.5 = [16 x i8] c"* ** **** * *\00"
@.str.6 = [16 x i8] c"**** *** ****\00"
@.str.7 = [16 x i8] c"**** **** ****\00"
@.str.8 = [16 x i8] c"*** * * * *\00"
@.str.9 = [16 x i8] c"**** ***** ****\00"
@.str.10 = [16 x i8] c"**** **** ****\00"
@.str.11 = [8 x i8] c"BEER!!\0A\00"
@.str.12 = [8 x i8] c"BOOM!!\0A\00"
@str = [7 x i8] c"BOOM!!\00"
define i32 @main() {
%1 = alloca [33 x i8]
%2 = alloca i8
%3 = alloca [9 x i8]
%4 = getelementptr inbounds [33 x i8], [33 x i8]* %1, i64 0, i64 0
br label %5
5: ; preds = %0, %23
%6 = phi i64 [ 0, %0 ], [ %25, %23 ]
%7 = phi i64 [ 0, %0 ], [ %26, %23 ]
%8 = phi i32 [ 0, %0 ], [ %24, %23 ]
%9 = getelementptr inbounds [33 x i8], [33 x i8]* %1, i64 0, i64 %7
%10 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 10
br i1 %12, label %13, label %16
13: ; preds = %5
%14 = add nuw nsw i64 %7, 1
%15 = getelementptr inbounds [33 x i8], [33 x i8]* %1, i64 0, i64 %14
store i8 0, i8* %15
br label %28
16: ; preds = %5
%17 = icmp eq i32 %8, 0
br i1 %17, label %18, label %23
18: ; preds = %16
%19 = add i64 %6, 1
%20 = urem i64 %19, 3
%21 = icmp eq i64 %20, 0
%22 = zext i1 %21 to i32
br label %23
23: ; preds = %18, %16
%24 = phi i32 [ %22, %18 ], [ 0, %16 ]
%25 = phi i64 [ %19, %18 ], [ %6, %16 ]
%26 = add nuw nsw i64 %7, 1
%27 = icmp eq i64 %26, 33
br i1 %27, label %28, label %5
28: ; preds = %23, %13
%29 = phi i64 [ %6, %13 ], [ %25, %23 ]
%30 = udiv i64 %29, 3
%31 = call i8* @llvm.stacksave()
%32 = alloca [16 x i8], i64 %30
br label %44
33: ; preds = %127
%34 = icmp ult i64 %29, 3
br i1 %34, label %35, label %37
35: ; preds = %33
%36 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
br label %198
37: ; preds = %33
%38 = call i64 @llvm.umax.i64(i64 %30, i64 1)
%39 = add nsw i64 %38, -1
%40 = and i64 %38, 3
%41 = icmp ult i64 %39, 3
br i1 %41, label %131, label %42
42: ; preds = %37
%43 = and i64 %38, 9223372036854775804
br label %145
44: ; preds = %28, %127
%45 = phi i32 [ 0, %28 ], [ %129, %127 ]
%46 = phi i32 [ 0, %28 ], [ %128, %127 ]
%47 = icmp eq i32 %45, 0
%48 = mul nuw nsw i32 %45, 3
%49 = zext i32 %48 to i64
%50 = add nuw nsw i32 %48, 1
%51 = zext i32 %50 to i64
%52 = add nuw nsw i32 %48, 2
%53 = zext i32 %52 to i64
br label %54
54: ; preds = %124, %44
%55 = phi i32 [ %125, %124 ], [ %46, %44 ]
%56 = phi i32 [ %126, %124 ], [ 0, %44 ]
br i1 %47, label %64, label %57
57: ; preds = %54
%58 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%59 = load i64, i64* @EOF
%60 = icmp eq i64 %58, %59
%61 = load i8, i8* %2
%62 = icmp eq i8 %61, 10
%63 = select i1 %60, i1 true, i1 %62
br i1 %63, label %127, label %70
64: ; preds = %54
%65 = add nsw i32 %55, 1
%66 = sext i32 %55 to i64
%67 = getelementptr inbounds [33 x i8], [33 x i8]* %1, i64 0, i64 %66
%68 = load i8, i8* %67
store i8 %68, i8* %2
%69 = icmp eq i8 %68, 10
br i1 %69, label %127, label %70
70: ; preds = %64, %57
%71 = phi i8 [ %61, %57 ], [ %68, %64 ]
%72 = phi i32 [ %55, %57 ], [ %65, %64 ]
%73 = zext i32 %56 to i64
%74 = getelementptr inbounds [16 x i8], [16 x i8]* %32, i64 %73, i64 %49
store i8 %71, i8* %74
br i1 %47, label %82, label %75
75: ; preds = %70
%76 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%77 = load i64, i64* @EOF
%78 = icmp eq i64 %76, %77
%79 = load i8, i8* %2
%80 = icmp eq i8 %79, 10
%81 = select i1 %78, i1 true, i1 %80
br i1 %81, label %127, label %88
82: ; preds = %70
%83 = add nsw i32 %72, 1
%84 = sext i32 %72 to i64
%85 = getelementptr inbounds [33 x i8], [33 x i8]* %1, i64 0, i64 %84
%86 = load i8, i8* %85
store i8 %86, i8* %2
%87 = icmp eq i8 %86, 10
br i1 %87, label %127, label %88
88: ; preds = %75, %82
%89 = phi i8 [ %79, %75 ], [ %86, %82 ]
%90 = phi i32 [ %72, %75 ], [ %83, %82 ]
%91 = zext i32 %56 to i64
%92 = getelementptr inbounds [16 x i8], [16 x i8]* %32, i64 %91, i64 %51
store i8 %89, i8* %92
br i1 %47, label %100, label %93
93: ; preds = %88
%94 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%95 = load i64, i64* @EOF
%96 = icmp eq i64 %94, %95
%97 = load i8, i8* %2
%98 = icmp eq i8 %97, 10
%99 = select i1 %96, i1 true, i1 %98
br i1 %99, label %127, label %106
100: ; preds = %88
%101 = add nsw i32 %90, 1
%102 = sext i32 %90 to i64
%103 = getelementptr inbounds [33 x i8], [33 x i8]* %1, i64 0, i64 %102
%104 = load i8, i8* %103
store i8 %104, i8* %2
%105 = icmp eq i8 %104, 10
br i1 %105, label %127, label %106
106: ; preds = %93, %100
%107 = phi i8 [ %97, %93 ], [ %104, %100 ]
%108 = phi i32 [ %90, %93 ], [ %101, %100 ]
%109 = zext i32 %56 to i64
%110 = getelementptr inbounds [16 x i8], [16 x i8]* %32, i64 %109, i64 %53
store i8 %107, i8* %110
br i1 %47, label %118, label %111
111: ; preds = %106
%112 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%113 = load i64, i64* @EOF
%114 = icmp eq i64 %112, %113
%115 = load i8, i8* %2
%116 = icmp eq i8 %115, 10
%117 = select i1 %114, i1 true, i1 %116
br i1 %117, label %127, label %124
118: ; preds = %106
%119 = add nsw i32 %108, 1
%120 = sext i32 %108 to i64
%121 = getelementptr inbounds [33 x i8], [33 x i8]* %1, i64 0, i64 %120
%122 = load i8, i8* %121
store i8 %122, i8* %2
%123 = icmp eq i8 %122, 10
br i1 %123, label %127, label %124
124: ; preds = %118, %111
%125 = phi i32 [ %108, %111 ], [ %119, %118 ]
%126 = add nuw nsw i32 %56, 1
br label %54
127: ; preds = %118, %111, %100, %93, %82, %75, %64, %57
%128 = phi i32 [ %55, %57 ], [ %65, %64 ], [ %72, %75 ], [ %83, %82 ], [ %90, %93 ], [ %101, %100 ], [ %108, %111 ], [ %119, %118 ]
%129 = add nuw nsw i32 %45, 1
%130 = icmp eq i32 %129, 5
br i1 %130, label %33, label %44
131: ; preds = %145, %37
%132 = phi i64 [ 0, %37 ], [ %155, %145 ]
%133 = icmp eq i64 %40, 0
br i1 %133, label %141, label %134
134: ; preds = %131, %134
%135 = phi i64 [ %138, %134 ], [ %132, %131 ]
%136 = phi i64 [ %139, %134 ], [ 0, %131 ]
%137 = getelementptr inbounds [16 x i8], [16 x i8]* %32, i64 %135, i64 15
store i8 0, i8* %137
%138 = add nuw nsw i64 %135, 1
%139 = add i64 %136, 1
%140 = icmp eq i64 %139, %40
br i1 %140, label %141, label %134
141: ; preds = %134, %131
%142 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
br i1 %34, label %198, label %143
143: ; preds = %141
%144 = call i64 @llvm.umax.i64(i64 %30, i64 1)
br label %158
145: ; preds = %145, %42
%146 = phi i64 [ 0, %42 ], [ %155, %145 ]
%147 = phi i64 [ 0, %42 ], [ %156, %145 ]
%148 = getelementptr inbounds [16 x i8], [16 x i8]* %32, i64 %146, i64 15
store i8 0, i8* %148
%149 = or i64 %146, 1
%150 = getelementptr inbounds [16 x i8], [16 x i8]* %32, i64 %149, i64 15
store i8 0, i8* %150
%151 = or i64 %146, 2
%152 = getelementptr inbounds [16 x i8], [16 x i8]* %32, i64 %151, i64 15
store i8 0, i8* %152
%153 = or i64 %146, 3
%154 = getelementptr inbounds [16 x i8], [16 x i8]* %32, i64 %153, i64 15
store i8 0, i8* %154
%155 = add nuw nsw i64 %146, 4
%156 = add i64 %147, 4
%157 = icmp eq i64 %156, %43
br i1 %157, label %131, label %145
158: ; preds = %143, %190
%159 = phi i64 [ 0, %143 ], [ %193, %190 ]
%160 = getelementptr inbounds [16 x i8], [16 x i8]* %32, i64 %159, i64 0
%161 = call i32 @strncmp(i8* %160, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 15)
%162 = icmp eq i32 %161, 0
br i1 %162, label %190, label %163
163: ; preds = %158
%164 = call i32 @strncmp(i8* %160, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 15)
%165 = icmp eq i32 %164, 0
br i1 %165, label %190, label %166
166: ; preds = %163
%167 = call i32 @strncmp(i8* %160, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 15)
%168 = icmp eq i32 %167, 0
br i1 %168, label %190, label %169
169: ; preds = %166
%170 = call i32 @strncmp(i8* %160, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 15)
%171 = icmp eq i32 %170, 0
br i1 %171, label %190, label %172
172: ; preds = %169
%173 = call i32 @strncmp(i8* %160, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 15)
%174 = icmp eq i32 %173, 0
br i1 %174, label %190, label %175
175: ; preds = %172
%176 = call i32 @strncmp(i8* %160, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 15)
%177 = icmp eq i32 %176, 0
br i1 %177, label %190, label %178
178: ; preds = %175
%179 = call i32 @strncmp(i8* %160, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i32 15)
%180 = icmp eq i32 %179, 0
br i1 %180, label %190, label %181
181: ; preds = %178
%182 = call i32 @strncmp(i8* %160, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i32 15)
%183 = icmp eq i32 %182, 0
br i1 %183, label %190, label %184
184: ; preds = %181
%185 = call i32 @strncmp(i8* %160, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i32 15)
%186 = icmp eq i32 %185, 0
br i1 %186, label %190, label %187
187: ; preds = %184
%188 = call i32 @strncmp(i8* %160, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i32 15)
%189 = icmp eq i32 %188, 0
br i1 %189, label %190, label %207
190: ; preds = %187, %184, %181, %178, %175, %172, %169, %166, %163, %158
%191 = phi i8 [ 48, %158 ], [ 49, %163 ], [ 50, %166 ], [ 51, %169 ], [ 52, %172 ], [ 53, %175 ], [ 54, %178 ], [ 55, %181 ], [ 56, %184 ], [ 57, %187 ]
%192 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 %159
store i8 %191, i8* %192
%193 = add nuw nsw i64 %159, 1
%194 = icmp eq i64 %193, %144
br i1 %194, label %195, label %158
195: ; preds = %190
%196 = add nuw i64 %159, 1
%197 = and i64 %196, 4294967295
br label %198
198: ; preds = %35, %195, %141
%199 = phi i64 [ 1, %141 ], [ %197, %195 ], [ 1, %35 ]
%200 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%201 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 %199
store i8 0, i8* %201
%202 = call i32 @atoi(i8* %200)
%203 = srem i32 %202, 6
%204 = icmp eq i32 %203, 0
%205 = select i1 %204, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0)
%206 = call i32 @printf(i8* dereferenceable(1) %205)
br label %209
207: ; preds = %187
%208 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
br label %209
209: ; preds = %207, %198
%210 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
ret i32 0
}