#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ playerName;
typedef int /*<<< orphan*/ playerInput;

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
int main() {
  int x;
  int playerHP, playerDef, playerAtk;
  int enemyHP, enemyDef, enemyAtk;
  int gameOn, battleOn;
  int playerDamage, enemyDamage;
  char playerName[200];
  gameOn = 1;
  while (gameOn == 1) {
    playerHP = 10;
    playerDef = 0;
    playerAtk = 3;
    enemyHP = 5;
    enemyDef = 0;
    enemyAtk = 0;
    printf("BattleArena v1.0 alpha  ----- Sapein\n");
    printf("Welcome to the Battle Arena!\n");
    printf("Please insert your name to get started\n");
    fgets(playerName, 200, stdin);
    for (x = 0; x <= sizeof(playerName); x++) {
      if (playerName[x] == '\n') {
        playerName[x] = '\0';
      }
    }
    printf("Hello %s\n", playerName);
    printf("Beggining Game...\n");
    enemyDamage = enemyHP - playerAtk;
    battleOn = 1;
    while (battleOn == 1) {
      char playerInput[40];
      playerInput == "";
      printf("///////////////////////////////////////\n");
      printf("%s - HP: %d Atk: %d Def: %d\n", playerName, playerHP, playerAtk,
             playerDef);
      printf("Enemy = HP: %d Atk: %d Def %d\n", enemyHP, enemyAtk, enemyDef);
      printf("//////////////////////////////////////\n");
      printf("\n");
      printf("What would you like to do?\n");
      printf("1. Attack\n");
      printf("2. Exit\n");
      for (x = 0; x <= sizeof(playerInput) + 1; x++) {
        if (playerInput[x] == '\n') {
          playerInput[x] = '\0';
        }
      }
      fgets(playerInput, 40, stdin);
      if (strcmp(playerInput, "1\n") == 0 ||
          strcmp(playerInput, "Attk\n") == 0 ||
          strcmp(playerInput, "Attack\n") == 0 ||
          strcmp(playerInput, "attack\n") == 0 ||
          strcmp(playerInput, "atk\n") == 0 ||
          strcmp(playerInput, "atk\n") == 0 ||
          strcmp(playerInput, "Atk\n") == 0) {
        enemyHP = enemyDamage;
        printf("You attacked the Enemy!\n");
        if (enemyHP <= 0) {
          enemyHP = 0;
          printf("You Win! Summoning next Monster!\n");
        }
      } else if (strcmp(playerInput, "2\n") == 0 ||
                 strcmp(playerInput, "exit\n") ||
                 strcmp(playerInput, "Exit\n") == 0 ||
                 strcmp(playerInput, "ext\n") == 0 ||
                 strcmp(playerInput, "Ext\n") == 0) {
        battleOn = 0;
        gameOn = 0;
      } else {
        printf("Input Unknown!\n");
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
jne    14fa <main+0x3ca>
movl   $0xa,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
movl   $0x5,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x100(%rbp),%rdi
mov    0x2e33(%rip),%rax
mov    (%rax),%edx
mov    $0xc8,%esi
call   1040 <fgets@plt>
movl   $0x0,-0x8(%rbp)
movslq -0x8(%rbp),%rax
cmp    $0xc8,%rax
ja     120c <main+0xdc>
movslq -0x8(%rbp),%rax
movsbl -0x100(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    11f9 <main+0xc9>
movslq -0x8(%rbp),%rax
movb   $0x0,-0x100(%rbp,%rax,1)
jmp    11fe <main+0xce>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11c8 <main+0x98>
lea    -0x100(%rbp),%rsi
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x30(%rbp)
movl   $0x1,-0x28(%rbp)
cmpl   $0x1,-0x28(%rbp)
jne    14f5 <main+0x3c5>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x100(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xda0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
movslq -0x8(%rbp),%rax
cmp    $0x29,%rax
ja     131c <main+0x1ec>
movslq -0x8(%rbp),%rax
movsbl -0x130(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    1309 <main+0x1d9>
movslq -0x8(%rbp),%rax
movb   $0x0,-0x130(%rbp,%rax,1)
jmp    130e <main+0x1de>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12da <main+0x1aa>
lea    -0x130(%rbp),%rdi
mov    0x2cbe(%rip),%rax
mov    (%rax),%edx
mov    $0x28,%esi
call   1040 <fgets@plt>
lea    -0x130(%rbp),%rdi
lea    0xdda(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1401 <main+0x2d1>
lea    -0x130(%rbp),%rdi
lea    0xdc0(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1401 <main+0x2d1>
lea    -0x130(%rbp),%rdi
lea    0xd8f(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1401 <main+0x2d1>
lea    -0x130(%rbp),%rdi
lea    0xd8c(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1401 <main+0x2d1>
lea    -0x130(%rbp),%rdi
lea    0xd77(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1401 <main+0x2d1>
lea    -0x130(%rbp),%rdi
lea    0xd5a(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1401 <main+0x2d1>
lea    -0x130(%rbp),%rdi
lea    0xd42(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1439 <main+0x309>
mov    -0x30(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    0xd2b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x18(%rbp)
jg     1434 <main+0x304>
movl   $0x0,-0x18(%rbp)
lea    0xd25(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f0 <main+0x3c0>
lea    -0x130(%rbp),%rdi
lea    0xd2d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     14ca <main+0x39a>
lea    -0x130(%rbp),%rdi
lea    0xd13(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    14ca <main+0x39a>
lea    -0x130(%rbp),%rdi
lea    0xc97(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     14ca <main+0x39a>
lea    -0x130(%rbp),%rdi
lea    0xcdf(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     14ca <main+0x39a>
lea    -0x130(%rbp),%rdi
lea    0xcc7(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    14dd <main+0x3ad>
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
jmp    14eb <main+0x3bb>
lea    0xca3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f0 <main+0x3c0>
jmp    123f <main+0x10f>
jmp    1149 <main+0x19>
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
lea    0xf3a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf53(%rip),%rdi
call   1040 <puts@plt>
lea    0xf64(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edx
lea    0x30(%rsp),%rdi
mov    $0xc8,%esi
call   1060 <fgets@plt>
xor    %eax,%eax
movdqa 0xe59(%rip),%xmm3
movdqa 0xe61(%rip),%xmm4
jmp    11d0 <main+0x80>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x10,%rax
cmp    $0xc0,%rax
je     134b <main+0x1fb>
movq   0x30(%rsp,%rax,1),%xmm1
movdqa %xmm1,%xmm0
pcmpeqb %xmm3,%xmm0
movd   %xmm0,%ecx
test   $0x1,%cl
je     11ec <main+0x9c>
movb   $0x0,0x30(%rsp,%rax,1)
movdqa %xmm0,%xmm2
pslld  $0x8,%xmm2
movd   %xmm2,%ecx
shr    $0x10,%ecx
test   $0x1,%cl
je     1206 <main+0xb6>
movb   $0x0,0x31(%rsp,%rax,1)
pshuflw $0x55,%xmm1,%xmm2
pcmpeqb %xmm3,%xmm2
pextrw $0x2,%xmm2,%ecx
test   $0x1,%cl
je     121e <main+0xce>
movb   $0x0,0x32(%rsp,%rax,1)
movdqa %xmm0,%xmm2
psllq  $0x18,%xmm2
pextrw $0x3,%xmm2,%ecx
test   $0x1,%cl
je     1236 <main+0xe6>
movb   $0x0,0x33(%rsp,%rax,1)
pshufd $0x55,%xmm1,%xmm1
pcmpeqb %xmm4,%xmm1
pextrw $0x4,%xmm1,%ecx
test   $0x1,%cl
je     124e <main+0xfe>
movb   $0x0,0x34(%rsp,%rax,1)
movdqa %xmm0,%xmm1
pslldq $0x5,%xmm1
pextrw $0x5,%xmm1,%ecx
test   $0x1,%cl
je     1266 <main+0x116>
movb   $0x0,0x35(%rsp,%rax,1)
pextrw $0x3,%xmm0,%ecx
test   $0x1,%cl
je     1275 <main+0x125>
movb   $0x0,0x36(%rsp,%rax,1)
pslldq $0x7,%xmm0
pextrw $0x7,%xmm0,%ecx
test   $0x1,%cl
je     1289 <main+0x139>
movb   $0x0,0x37(%rsp,%rax,1)
movq   0x38(%rsp,%rax,1),%xmm1
movdqa %xmm1,%xmm0
pcmpeqb %xmm3,%xmm0
movd   %xmm0,%ecx
test   $0x1,%cl
je     12a5 <main+0x155>
movb   $0x0,0x38(%rsp,%rax,1)
movdqa %xmm0,%xmm2
pslld  $0x8,%xmm2
movd   %xmm2,%ecx
shr    $0x10,%ecx
test   $0x1,%cl
je     12bf <main+0x16f>
movb   $0x0,0x39(%rsp,%rax,1)
pshuflw $0x55,%xmm1,%xmm2
pcmpeqb %xmm3,%xmm2
pextrw $0x2,%xmm2,%ecx
test   $0x1,%cl
je     12d7 <main+0x187>
movb   $0x0,0x3a(%rsp,%rax,1)
movdqa %xmm0,%xmm2
psllq  $0x18,%xmm2
pextrw $0x3,%xmm2,%ecx
test   $0x1,%cl
je     12ef <main+0x19f>
movb   $0x0,0x3b(%rsp,%rax,1)
pshufd $0x55,%xmm1,%xmm1
pcmpeqb %xmm4,%xmm1
pextrw $0x4,%xmm1,%ecx
test   $0x1,%cl
je     1307 <main+0x1b7>
movb   $0x0,0x3c(%rsp,%rax,1)
movdqa %xmm0,%xmm1
pslldq $0x5,%xmm1
pextrw $0x5,%xmm1,%ecx
test   $0x1,%cl
je     131f <main+0x1cf>
movb   $0x0,0x3d(%rsp,%rax,1)
pextrw $0x3,%xmm0,%ecx
test   $0x1,%cl
je     132e <main+0x1de>
movb   $0x0,0x3e(%rsp,%rax,1)
pslldq $0x7,%xmm0
pextrw $0x7,%xmm0,%ecx
test   $0x1,%cl
je     11c0 <main+0x70>
movb   $0x0,0x3f(%rsp,%rax,1)
jmp    11c0 <main+0x70>
cmpb   $0xa,0xf0(%rsp)
0a
jne    1723 <main+0x5d3>
movb   $0x0,0xf0(%rsp)
cmpb   $0xa,0xf1(%rsp)
0a
je     1731 <main+0x5e1>
cmpb   $0xa,0xf2(%rsp)
0a
jne    1747 <main+0x5f7>
movb   $0x0,0xf2(%rsp)
cmpb   $0xa,0xf3(%rsp)
0a
je     1755 <main+0x605>
cmpb   $0xa,0xf4(%rsp)
0a
jne    176b <main+0x61b>
movb   $0x0,0xf4(%rsp)
cmpb   $0xa,0xf5(%rsp)
0a
je     1779 <main+0x629>
cmpb   $0xa,0xf6(%rsp)
0a
jne    178f <main+0x63f>
movb   $0x0,0xf6(%rsp)
cmpb   $0xa,0xf7(%rsp)
0a
je     179d <main+0x64d>
cmpb   $0xa,0xf8(%rsp)
0a
jne    13ed <main+0x29d>
movb   $0x0,0xf8(%rsp)
lea    0xc2c(%rip),%rdi
lea    0x30(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd04(%rip),%rdi
call   1040 <puts@plt>
mov    $0x5,%r14d
lea    0xd51(%rip),%r15
mov    %rsp,%r12
lea    0xc43(%rip),%rbp
lea    0xc55(%rip),%r13
jmp    143f <main+0x2ef>
nopl   0x0(%rax)
lea    0xd4a(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%r14d
lea    0xcd7(%rip),%rdi
call   1040 <puts@plt>
lea    0xbd8(%rip),%rdi
lea    0x30(%rsp),%rsi
mov    $0xa,%edx
mov    $0x3,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xbd5(%rip),%rdi
mov    %r14d,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc97(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xca8(%rip),%rdi
call   1040 <puts@plt>
lea    0xcb7(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
movdqa 0xb40(%rip),%xmm3
movdqa 0xb48(%rip),%xmm4
jmp    14de <main+0x38e>
nopw   0x0(%rax,%rax,1)
add    $0x8,%rax
cmp    $0x28,%rax
je     15a0 <main+0x450>
movq   (%rsp,%rax,1),%xmm1
movdqa %xmm1,%xmm0
pcmpeqb %xmm3,%xmm0
movd   %xmm0,%ecx
test   $0x1,%cl
je     14f8 <main+0x3a8>
movb   $0x0,(%rsp,%rax,1)
movdqa %xmm0,%xmm2
pslld  $0x8,%xmm2
movd   %xmm2,%ecx
shr    $0x10,%ecx
test   $0x1,%cl
je     1512 <main+0x3c2>
movb   $0x0,0x1(%rsp,%rax,1)
pshuflw $0x55,%xmm1,%xmm2
pcmpeqb %xmm3,%xmm2
pextrw $0x2,%xmm2,%ecx
test   $0x1,%cl
je     152a <main+0x3da>
movb   $0x0,0x2(%rsp,%rax,1)
movdqa %xmm0,%xmm2
psllq  $0x18,%xmm2
pextrw $0x3,%xmm2,%ecx
test   $0x1,%cl
je     1542 <main+0x3f2>
movb   $0x0,0x3(%rsp,%rax,1)
pshufd $0x55,%xmm1,%xmm1
pcmpeqb %xmm4,%xmm1
pextrw $0x4,%xmm1,%ecx
test   $0x1,%cl
je     155a <main+0x40a>
movb   $0x0,0x4(%rsp,%rax,1)
movdqa %xmm0,%xmm1
pslldq $0x5,%xmm1
pextrw $0x5,%xmm1,%ecx
test   $0x1,%cl
je     1572 <main+0x422>
movb   $0x0,0x5(%rsp,%rax,1)
pextrw $0x3,%xmm0,%ecx
test   $0x1,%cl
je     1581 <main+0x431>
movb   $0x0,0x6(%rsp,%rax,1)
pslldq $0x7,%xmm0
pextrw $0x7,%xmm0,%ecx
test   $0x1,%cl
je     14d0 <main+0x380>
movb   $0x0,0x7(%rsp,%rax,1)
jmp    14d0 <main+0x380>
xchg   %ax,%ax
cmpb   $0xa,0x28(%rsp)
jne    15ac <main+0x45c>
movb   $0x0,0x28(%rsp)
cmpb   $0xa,0x29(%rsp)
jne    15b8 <main+0x468>
movb   $0x0,0x29(%rsp)
mov    0x2a29(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    $0x28,%esi
call   1060 <fgets@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
call   1070 <strcmp@plt>
mov    $0x2,%ebx
test   %rax,%rax
je     1430 <main+0x2e0>
mov    %r12,%rdi
lea    0xa78(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1430 <main+0x2e0>
mov    %r12,%rdi
lea    0xa66(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1430 <main+0x2e0>
mov    %r12,%rdi
lea    0xa56(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1430 <main+0x2e0>
mov    %r15,%rbp
mov    %r12,%rdi
mov    %r13,%r15
mov    %r13,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     170d <main+0x5bd>
mov    %r12,%rdi
mov    %r15,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     170d <main+0x5bd>
mov    %r12,%rdi
lea    0xa1d(%rip),%rsi
call   1070 <strcmp@plt>
lea    0xb0e(%rip),%rdi
test   %rax,%rax
mov    %rbp,%r15
lea    0x9e6(%rip),%rbp
je     1437 <main+0x2e7>
mov    %r12,%rdi
lea    0x9f9(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     17b8 <main+0x668>
mov    %r12,%rdi
lea    0x9e4(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    17b8 <main+0x668>
mov    %r12,%rdi
lea    0x9d2(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     17b8 <main+0x668>
mov    %r12,%rdi
lea    0x9c0(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     17b8 <main+0x668>
mov    %r12,%rdi
lea    0x9ad(%rip),%rsi
call   1070 <strcmp@plt>
lea    0xa76(%rip),%rdi
mov    %r14d,%ebx
test   %rax,%rax
jne    1437 <main+0x2e7>
jmp    17b8 <main+0x668>
lea    0xa6d(%rip),%rdi
mov    %rbp,%r15
lea    0x948(%rip),%rbp
jmp    1437 <main+0x2e7>
cmpb   $0xa,0xf1(%rsp)
0a
jne    136f <main+0x21f>
movb   $0x0,0xf1(%rsp)
cmpb   $0xa,0xf2(%rsp)
0a
je     137d <main+0x22d>
cmpb   $0xa,0xf3(%rsp)
0a
jne    1393 <main+0x243>
movb   $0x0,0xf3(%rsp)
cmpb   $0xa,0xf4(%rsp)
0a
je     13a1 <main+0x251>
cmpb   $0xa,0xf5(%rsp)
0a
jne    13b7 <main+0x267>
movb   $0x0,0xf5(%rsp)
cmpb   $0xa,0xf6(%rsp)
0a
je     13c5 <main+0x275>
cmpb   $0xa,0xf7(%rsp)
0a
jne    13db <main+0x28b>
movb   $0x0,0xf7(%rsp)
cmpb   $0xa,0xf8(%rsp)
0a
je     13e5 <main+0x295>
jmp    13ed <main+0x29d>
xor    %eax,%eax
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"BattleArena v1.0 alpha ----- Sapein\0A\00"
@.str.1 = [30 x i8] c"Welcome to the Battle Arena!\0A\00"
@.str.2 = [40 x i8] c"Please insert your name to get started\0A\00"
@stdin = global i32 0
@.str.3 = [10 x i8] c"Hello %s\0A\00"
@.str.4 = [19 x i8] c"Beggining Game...\0A\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [41 x i8] c"///////////////////////////////////////\0A\00"
@.str.7 = [29 x i8] c"%s - HP: %d Atk: %d Def: %d\0A\00"
@.str.8 = [31 x i8] c"Enemy = HP: %d Atk: %d Def %d\0A\00"
@.str.9 = [40 x i8] c"//////////////////////////////////////\0A\00"
@.str.10 = [2 x i8] c"\0A\00"
@.str.11 = [28 x i8] c"What would you like to do?\0A\00"
@.str.12 = [11 x i8] c"1. Attack\0A\00"
@.str.13 = [9 x i8] c"2. Exit\0A\00"
@.str.14 = [3 x i8] c"1\0A\00"
@.str.15 = [6 x i8] c"Attk\0A\00"
@.str.16 = [8 x i8] c"Attack\0A\00"
@.str.17 = [8 x i8] c"attack\0A\00"
@.str.18 = [5 x i8] c"atk\0A\00"
@.str.19 = [5 x i8] c"Atk\0A\00"
@.str.20 = [25 x i8] c"You attacked the Enemy!\0A\00"
@.str.21 = [34 x i8] c"You Win! Summoning next Monster!\0A\00"
@.str.22 = [3 x i8] c"2\0A\00"
@.str.23 = [6 x i8] c"exit\0A\00"
@.str.24 = [6 x i8] c"Exit\0A\00"
@.str.25 = [5 x i8] c"ext\0A\00"
@.str.26 = [5 x i8] c"Ext\0A\00"
@.str.27 = [16 x i8] c"Input Unknown!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [200 x i8]
%14 = alloca [40 x i8]
store i32 0, i32* %1
store i32 1, i32* %9
br label %15
15: ; preds = %156, %0
%16 = load i32, i32* %9
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %157
18: ; preds = %15
store i32 10, i32* %3
store i32 0, i32* %4
store i32 3, i32* %5
store i32 5, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%22 = getelementptr inbounds [200 x i8], [200 x i8]* %13, i64 0, i64 0
%23 = load i32, i32* @stdin
%24 = call i32 @fgets(i8* %22, i32 200, i32 %23)
store i32 0, i32* %2
br label %25
25: ; preds = %41, %18
%26 = load i32, i32* %2
%27 = sext i32 %26 to i64
%28 = icmp ule i64 %27, 200
br i1 %28, label %29, label %44
29: ; preds = %25
%30 = load i32, i32* %2
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [200 x i8], [200 x i8]* %13, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 10
br i1 %35, label %36, label %40
36: ; preds = %29
%37 = load i32, i32* %2
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [200 x i8], [200 x i8]* %13, i64 0, i64 %38
store i8 0, i8* %39
br label %40
40: ; preds = %36, %29
br label %41
41: ; preds = %40
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 1
store i32 %43, i32* %2
br label %25
44: ; preds = %25
%45 = getelementptr inbounds [200 x i8], [200 x i8]* %13, i64 0, i64 0
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* %45)
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%48 = load i32, i32* %6
%49 = load i32, i32* %5
%50 = sub nsw i32 %48, %49
store i32 %50, i32* %12
store i32 1, i32* %10
br label %51
51: ; preds = %155, %44
%52 = load i32, i32* %10
%53 = icmp eq i32 %52, 1
br i1 %53, label %54, label %156
54: ; preds = %51
%55 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%56 = icmp eq i8* %55, getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0)
%57 = zext i1 %56 to i32
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0))
%59 = getelementptr inbounds [200 x i8], [200 x i8]* %13, i64 0, i64 0
%60 = load i32, i32* %3
%61 = load i32, i32* %5
%62 = load i32, i32* %4
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i8* %59, i32 %60, i32 %61, i32 %62)
%64 = load i32, i32* %6
%65 = load i32, i32* %8
%66 = load i32, i32* %7
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i32 %64, i32 %65, i32 %66)
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0))
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0))
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %2
br label %73
73: ; preds = %89, %54
%74 = load i32, i32* %2
%75 = sext i32 %74 to i64
%76 = icmp ule i64 %75, 41
br i1 %76, label %77, label %92
77: ; preds = %73
%78 = load i32, i32* %2
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 %79
%81 = load i8, i8* %80
%82 = sext i8 %81 to i32
%83 = icmp eq i32 %82, 10
br i1 %83, label %84, label %88
84: ; preds = %77
%85 = load i32, i32* %2
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 %86
store i8 0, i8* %87
br label %88
88: ; preds = %84, %77
br label %89
89: ; preds = %88
%90 = load i32, i32* %2
%91 = add nsw i32 %90, 1
store i32 %91, i32* %2
br label %73
92: ; preds = %73
%93 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%94 = load i32, i32* @stdin
%95 = call i32 @fgets(i8* %93, i32 40, i32 %94)
%96 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%97 = call i64 @strcmp(i8* %96, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%98 = icmp eq i64 %97, 0
br i1 %98, label %123, label %99
99: ; preds = %92
%100 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%101 = call i64 @strcmp(i8* %100, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%102 = icmp eq i64 %101, 0
br i1 %102, label %123, label %103
103: ; preds = %99
%104 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%105 = call i64 @strcmp(i8* %104, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
%106 = icmp eq i64 %105, 0
br i1 %106, label %123, label %107
107: ; preds = %103
%108 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%109 = call i64 @strcmp(i8* %108, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%110 = icmp eq i64 %109, 0
br i1 %110, label %123, label %111
111: ; preds = %107
%112 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%113 = call i64 @strcmp(i8* %112, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
%114 = icmp eq i64 %113, 0
br i1 %114, label %123, label %115
115: ; preds = %111
%116 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%117 = call i64 @strcmp(i8* %116, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
%118 = icmp eq i64 %117, 0
br i1 %118, label %123, label %119
119: ; preds = %115
%120 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%121 = call i64 @strcmp(i8* %120, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0))
%122 = icmp eq i64 %121, 0
br i1 %122, label %123, label %131
123: ; preds = %119, %115, %111, %107, %103, %99, %92
%124 = load i32, i32* %12
store i32 %124, i32* %6
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.20, i64 0, i64 0))
%126 = load i32, i32* %6
%127 = icmp sle i32 %126, 0
br i1 %127, label %128, label %130
128: ; preds = %123
store i32 0, i32* %6
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.21, i64 0, i64 0))
br label %130
130: ; preds = %128, %123
br label %155
131: ; preds = %119
%132 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%133 = call i64 @strcmp(i8* %132, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0))
%134 = icmp eq i64 %133, 0
br i1 %134, label %151, label %135
135: ; preds = %131
%136 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%137 = call i64 @strcmp(i8* %136, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.23, i64 0, i64 0))
%138 = icmp ne i64 %137, 0
br i1 %138, label %151, label %139
139: ; preds = %135
%140 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%141 = call i64 @strcmp(i8* %140, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.24, i64 0, i64 0))
%142 = icmp eq i64 %141, 0
br i1 %142, label %151, label %143
143: ; preds = %139
%144 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%145 = call i64 @strcmp(i8* %144, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.25, i64 0, i64 0))
%146 = icmp eq i64 %145, 0
br i1 %146, label %151, label %147
147: ; preds = %143
%148 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%149 = call i64 @strcmp(i8* %148, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.26, i64 0, i64 0))
%150 = icmp eq i64 %149, 0
br i1 %150, label %151, label %152
151: ; preds = %147, %143, %139, %135, %131
store i32 0, i32* %10
store i32 0, i32* %9
br label %154
152: ; preds = %147
%153 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.27, i64 0, i64 0))
br label %154
154: ; preds = %152, %151
br label %155
155: ; preds = %154, %130
br label %51
156: ; preds = %51
br label %15
157: ; preds = %15
ret i32 0
}

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