#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*/ clrscr();
int /*<<< orphan*/ getVoidInput();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ remove(char *);
void gameOver(char *messg) {
  remove("save");
  clrscr();
  printf("\33[0;97;40m"
         "%s\n\nPress any key to continue.",
         messg);
  getVoidInput();
  for (int j = 0; j < 100; j++)
    printf("\33[0m"
           "\n");
}


x86 assembly (clang, -O0):
<gameOver>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
call   1030 <remove@plt>
mov    $0x0,%al
call   1040 <clrscr@plt>
mov    -0x8(%rbp),%rsi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <getVoidInput@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    11a5 <gameOver+0x65>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    117f <gameOver+0x3f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gameOver>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xea3(%rip),%rdi
call   1030 <remove@plt>
xor    %eax,%eax
call   1040 <clrscr@plt>
lea    0xe95(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1070 <getVoidInput@plt>
mov    $0x64,%ebp
lea    0xea1(%rip),%rbx
nopl   (%rax)
mov    %rbx,%rdi
call   1050 <puts@plt>
add    $0xffffffff,%ebp
jne    1190 <gameOver+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"save\00"
@.str.1 = [41 x i8] c"\1B[0;97;40m%s\0A\0APress any key to continue.\00"
@.str.2 = [6 x i8] c"\1B[0m\0A\00"
define void @gameOver(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @remove(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @clrscr()
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = call i32 (...) @getVoidInput()
store i32 0, i32* %3
br label %9
9: ; preds = %14, %1
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 100
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %9
17: ; preds = %9
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"save\00"
@.str.1 = [41 x i8] c"\1B[0;97;40m%s\0A\0APress any key to continue.\00"
@str = [5 x i8] c"\1B[0m\00"
define void @gameOver(i8* %0) {
%2 = tail call i32 @remove(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @clrscr()
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%5 = tail call i32 (...) @getVoidInput()
br label %7
6: ; preds = %7
ret void
7: ; preds = %1, %7
%8 = phi i32 [ 0, %1 ], [ %10, %7 ]
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, 100
br i1 %11, label %6, label %7
}