#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*/ chcolor(char *);
int /*<<< orphan*/ printf(char *, ...);
void gprintf(char **g1, char **g2, int n, int sh1, int sh2) {
  char row = 'h';
  int i, j;
  printf("Round %d! ", n);
  if (n % 2 == 1)
    printf("You play!\n\n");
  else
    printf("I play!\n\n");
  printf("              Your turrets                         Your bombs        "
         "  \n");
  printf("             %d turrets left                     %d turrets left\n\n",
         sh1, sh2);
  printf("  +---+---+---+---+---+---+---+---+     "
         "+---+---+---+---+---+---+---+---+\n");
  for (i = 7; i >= 0; i--) {
    printf("%c |", row);
    for (j = 0; j <= 7; j++) {
      if (g1[i][j] == 'T')
        chcolor("\033[01;34m");
      if (g1[i][j] == 'M')
        chcolor("\033[22;32m");
      if (g1[i][j] == 'H')
        chcolor("\033[22;31m");
      printf(" %c ", g1[i][j]);
      chcolor("\033[01;37m");
      printf("|");
    }
    printf("   %c |", row);
    for (j = 0; j <= 7; j++) {
      if (g2[i][j] != 'T' && g2[i][j] != ' ') {
        if (g2[i][j] == 'M')
          chcolor("\033[22;32m");
        if (g2[i][j] == 'H')
          chcolor("\033[22;31m");
        printf(" %c ", g2[i][j]);
        chcolor("\033[01;37m");
        printf("|");
      } else
        printf("   |");
    }
    printf("\n");
    --row;
    printf("  +---+---+---+---+---+---+---+---+     "
           "+---+---+---+---+---+---+---+---+\n");
  }
  printf("    1   2   3   4   5   6   7   8         1   2   3   4   5   6   7  "
         " 8\n\n");
}


x86 assembly (clang, -O0):
<gprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
movb   $0x68,-0x1d(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1176 <gprintf+0x56>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1184 <gprintf+0x64>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x7,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jl     13f0 <gprintf+0x2d0>
movsbl -0x1d(%rbp),%esi
lea    0xf54(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x28(%rbp)
cmpl   $0x7,-0x28(%rbp)
jg     12ad <gprintf+0x18d>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x54,%eax
jne    1211 <gprintf+0xf1>
lea    0xeec(%rip),%rdi
call   1030 <chcolor@plt>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x4d,%eax
jne    123a <gprintf+0x11a>
lea    0xecc(%rip),%rdi
call   1030 <chcolor@plt>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x48,%eax
jne    1263 <gprintf+0x143>
lea    0xeac(%rip),%rdi
call   1030 <chcolor@plt>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe8c(%rip),%rdi
call   1030 <chcolor@plt>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11de <gprintf+0xbe>
movsbl -0x1d(%rbp),%esi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x28(%rbp)
cmpl   $0x7,-0x28(%rbp)
jg     13be <gprintf+0x29e>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x54,%eax
je     139d <gprintf+0x27d>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     139d <gprintf+0x27d>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x4d,%eax
jne    1333 <gprintf+0x213>
lea    0xdd3(%rip),%rdi
call   1030 <chcolor@plt>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x48,%eax
jne    135c <gprintf+0x23c>
lea    0xdb3(%rip),%rdi
call   1030 <chcolor@plt>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xd9c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd93(%rip),%rdi
call   1030 <chcolor@plt>
lea    0xd9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13ab <gprintf+0x28b>
lea    0xd85(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13b0 <gprintf+0x290>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12c6 <gprintf+0x1a6>
lea    0xc5a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1d(%rbp),%al
add    $0xff,%al
mov    %al,-0x1d(%rbp)
lea    0xcd2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    11bb <gprintf+0x9b>
lea    0xd37(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gprintf>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xea0(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebp,%eax
shr    $0x1f,%eax
add    %ebp,%eax
and    $0xfffffffe,%eax
sub    %eax,%ebp
cmp    $0x1,%ebp
lea    0xfe9(%rip),%rax
lea    0xefe(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
lea    0xef7(%rip),%rdi
call   1040 <puts@plt>
lea    0xe69(%rip),%rdi
mov    %r12d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xf68(%rip),%rdi
call   1040 <puts@plt>
mov    $0x7,%r12d
mov    $0x68,%ebp
lea    0xea1(%rip),%r13
jmp    11f3 <gprintf+0xb3>
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
lea    0xf3a(%rip),%rdi
call   1040 <puts@plt>
sub    $0x1,%r12
jb     1354 <gprintf+0x214>
lea    0xe80(%rip),%rdi
mov    %ebp,%r15d
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %ebp,%ebp
jmp    123d <gprintf+0xfd>
nopw   0x0(%rax,%rax,1)
movsbl %al,%esi
lea    0xe4f(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r13,%rdi
call   1050 <chcolor@plt>
mov    $0x7c,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    $0x8,%rbp
je     12b0 <gprintf+0x170>
mov    (%rbx,%r12,8),%rax
movzbl (%rax,%rbp,1),%eax
cmp    $0x54,%al
je     1260 <gprintf+0x120>
cmp    $0x4d,%al
je     1278 <gprintf+0x138>
cmp    $0x48,%al
jne    1210 <gprintf+0xd0>
jmp    1290 <gprintf+0x150>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xde7(%rip),%rdi
call   1050 <chcolor@plt>
mov    (%rbx,%r12,8),%rax
movzbl (%rax,%rbp,1),%eax
cmp    $0x4d,%al
jne    124d <gprintf+0x10d>
lea    0xdd8(%rip),%rdi
call   1050 <chcolor@plt>
mov    (%rbx,%r12,8),%rax
movzbl (%rax,%rbp,1),%eax
cmp    $0x48,%al
jne    1210 <gprintf+0xd0>
lea    0xdc9(%rip),%rdi
call   1050 <chcolor@plt>
mov    (%rbx,%r12,8),%rax
movzbl (%rax,%rbp,1),%eax
jmp    1210 <gprintf+0xd0>
nopl   0x0(%rax)
lea    0xdc0(%rip),%rdi
mov    %r15d,%ebp
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %r15d,%r15d
jmp    12ec <gprintf+0x1ac>
nopl   0x0(%rax)
lea    0xda8(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r15
cmp    $0x8,%r15
je     11d0 <gprintf+0x90>
mov    (%r14,%r12,8),%rax
movzbl (%rax,%r15,1),%eax
cmp    $0x20,%al
je     12d0 <gprintf+0x190>
cmp    $0x54,%al
je     12d0 <gprintf+0x190>
cmp    $0x4d,%al
jne    1316 <gprintf+0x1d6>
lea    0xd4f(%rip),%rdi
call   1050 <chcolor@plt>
mov    (%r14,%r12,8),%rax
movzbl (%rax,%r15,1),%eax
cmp    $0x48,%al
jne    132f <gprintf+0x1ef>
lea    0xd3f(%rip),%rdi
call   1050 <chcolor@plt>
mov    (%r14,%r12,8),%rax
movzbl (%rax,%r15,1),%eax
movsbl %al,%esi
lea    0xd30(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r13,%rdi
call   1050 <chcolor@plt>
mov    $0x7c,%edi
call   1030 <putchar@plt>
jmp    12de <gprintf+0x19e>
lea    0xd7a(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"Round %d! \00"
@.str.4 = [67 x i8] c" %d turrets left %d turrets left\0A\0A\00"
@.str.6 = [5 x i8] c"%c |\00"
@.str.7 = [9 x i8] c"\1B[01;34m\00"
@.str.8 = [9 x i8] c"\1B[22;32m\00"
@.str.9 = [9 x i8] c"\1B[22;31m\00"
@.str.10 = [5 x i8] c" %c \00"
@.str.11 = [9 x i8] c"\1B[01;37m\00"
@.str.13 = [8 x i8] c" %c |\00"
@.str.14 = [5 x i8] c" |\00"
@str = [9 x i8] c"I play!\0A\00"
@str.17 = [72 x i8] c" Your turrets Your bombs \00"
@str.19 = [73 x i8] c" 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8\0A\00"
@str.20 = [74 x i8] c" +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+\00"
@str.21 = [11 x i8] c"You play!\0A\00"
define void @gprintf(i8** nocapture %0, i8** nocapture %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %2)
%7 = srem i32 %2, 2
%8 = icmp eq i32 %7, 1
%9 = select i1 %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.21, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0)
%10 = tail call i32 @puts(i8* dereferenceable(1) %9)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.17, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.4, i64 0, i64 0), i32 %3, i32 %4)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.20, i64 0, i64 0))
br label %14
14: ; preds = %5, %86
%15 = phi i32 [ 104, %5 ], [ %88, %86 ]
%16 = phi i64 [ 7, %5 ], [ %90, %86 ]
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %15)
%18 = getelementptr inbounds i8*, i8** %0, i64 %16
br label %19
19: ; preds = %14, %46
%20 = phi i64 [ 0, %14 ], [ %52, %46 ]
%21 = load i8*, i8** %18
%22 = getelementptr inbounds i8, i8* %21, i64 %20
%23 = load i8, i8* %22
%24 = icmp eq i8 %23, 84
br i1 %24, label %25, label %30
25: ; preds = %19
%26 = tail call i32 @chcolor(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%27 = load i8*, i8** %18
%28 = getelementptr inbounds i8, i8* %27, i64 %20
%29 = load i8, i8* %28
br label %30
30: ; preds = %25, %19
%31 = phi i8 [ %29, %25 ], [ %23, %19 ]
%32 = icmp eq i8 %31, 77
br i1 %32, label %33, label %38
33: ; preds = %30
%34 = tail call i32 @chcolor(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%35 = load i8*, i8** %18
%36 = getelementptr inbounds i8, i8* %35, i64 %20
%37 = load i8, i8* %36
br label %38
38: ; preds = %33, %30
%39 = phi i8 [ %37, %33 ], [ %31, %30 ]
%40 = icmp eq i8 %39, 72
br i1 %40, label %41, label %46
41: ; preds = %38
%42 = tail call i32 @chcolor(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%43 = load i8*, i8** %18
%44 = getelementptr inbounds i8, i8* %43, i64 %20
%45 = load i8, i8* %44
br label %46
46: ; preds = %41, %38
%47 = phi i8 [ %45, %41 ], [ %39, %38 ]
%48 = sext i8 %47 to i32
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i32 %48)
%50 = tail call i32 @chcolor(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
%51 = tail call i32 @putchar(i32 124)
%52 = add nuw nsw i64 %20, 1
%53 = icmp eq i64 %52, 8
br i1 %53, label %54, label %19
54: ; preds = %46
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i32 %15)
%56 = getelementptr inbounds i8*, i8** %1, i64 %16
br label %57
57: ; preds = %54, %83
%58 = phi i64 [ 0, %54 ], [ %84, %83 ]
%59 = load i8*, i8** %56
%60 = getelementptr inbounds i8, i8* %59, i64 %58
%61 = load i8, i8* %60
switch i8 %61, label %67 [
i8 84, label %81
i8 32, label %81
i8 77, label %62
]
62: ; preds = %57
%63 = tail call i32 @chcolor(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%64 = load i8*, i8** %56
%65 = getelementptr inbounds i8, i8* %64, i64 %58
%66 = load i8, i8* %65
br label %67
67: ; preds = %57, %62
%68 = phi i8 [ %61, %57 ], [ %66, %62 ]
%69 = icmp eq i8 %68, 72
br i1 %69, label %70, label %75
70: ; preds = %67
%71 = tail call i32 @chcolor(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%72 = load i8*, i8** %56
%73 = getelementptr inbounds i8, i8* %72, i64 %58
%74 = load i8, i8* %73
br label %75
75: ; preds = %70, %67
%76 = phi i8 [ %74, %70 ], [ %68, %67 ]
%77 = sext i8 %76 to i32
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i32 %77)
%79 = tail call i32 @chcolor(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
%80 = tail call i32 @putchar(i32 124)
br label %83
81: ; preds = %57, %57
%82 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
br label %83
83: ; preds = %75, %81
%84 = add nuw nsw i64 %58, 1
%85 = icmp eq i64 %84, 8
br i1 %85, label %86, label %57
86: ; preds = %83
%87 = tail call i32 @putchar(i32 10)
%88 = add nsw i32 %15, -1
%89 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.20, i64 0, i64 0))
%90 = add nsw i64 %16, -1
%91 = icmp eq i64 %16, 0
br i1 %91, label %92, label %14
92: ; preds = %86
%93 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.19, i64 0, i64 0))
ret void
}