#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*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int, int, int);
scalar_t__ fscanf(int /*<<< orphan*/ *, char *, int *, int *, int *, int *);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ remove(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
void delete_arena() {
  FILE *file1, *file2;
  int class = 0, win = 0, lost = 0, i = 0, delete = 0, choice = 0;
  int win_c = 0, lost_c = 0, runs = 0;
  double winp = 0.00;
  file1 = fopen("Stats.txt", "r");
  file2 = fopen("Stats1.txt", "w");
  printf("\n __________________________________\n"
         ": Pick the run you want deleted or :\n"
         ": 0 for back to main screen        :\n");
  printf(": -------------------------------- :\n"
         ":                                  :\n");
  while (fscanf(file1, "%d %d %d %d", &class, &win, &lost, &delete) != EOF) {
    if (delete == 0) {
      printf(": %#02d ~ Wins - %4d   Loss - %4d   :\n", i + 1, win, lost);
      i++;
    }
  }
  printf(":__________________________________:\n\n");
  fclose(file1);
  file1 = fopen("Stats.txt", "r");
  scanf("%d", &choice);
  i = 1;
  system("cls");
  if (choice != 0) {
    while (fscanf(file1, "%d %d %d %d", &class, &win, &lost, &delete) != EOF) {
      if (delete == 0) {
        if (i == choice)
          fprintf(file2, " %d %d %d %d", class, win, lost, 1);
        else {
          fprintf(file2, " %d %d %d %d", class, win, lost, delete);
        }
        i++;
      } else
        fprintf(file2, " %d %d %d %d", class, win, lost, delete);
    }
    fclose(file1);
    fclose(file2);
    file1 = fopen("Stats.txt", "w");
    file2 = fopen("Stats1.txt", "r");
    while (fscanf(file2, "%d %d %d %d", &class, &win, &lost, &delete) != EOF) {
      fprintf(file1, " %d %d %d %d", class, win, lost, delete);
    }
    fclose(file1);
    fclose(file2);
    if (remove("Stats1.txt") == 0)
      printf("\n __________________________________ \n"
             ": Deleted                          :\n"
             ":__________________________________:\n\n");
    else {
      printf("\n __________________________________ \n"
             ": Unable to delete                 :\n"
             ":__________________________________:\n\n");
    }
  }
}


x86 assembly (clang, -O0):
<delete_arena>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
lea    0xe2a(%rip),%rdi
lea    0xe2d(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x8(%rbp)
lea    0xe1f(%rip),%rdi
lea    0xe23(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xedc(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
lea    -0x1c(%rbp),%r8
lea    -0x24(%rbp),%r9
call   1070 <fscanf@plt>
mov    0x2da8(%rip),%rcx
cmp    (%rcx),%rax
je     127b <delete_arena+0xfb>
cmpl   $0x0,-0x24(%rbp)
jne    1276 <delete_arena+0xf6>
mov    -0x20(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1219 <delete_arena+0x99>
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fclose@plt>
lea    0xd67(%rip),%rdi
lea    0xd6a(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x8(%rbp)
lea    0xe59(%rip),%rdi
lea    -0x28(%rbp),%rsi
call   1090 <scanf@plt>
movl   $0x1,-0x20(%rbp)
lea    0xe34(%rip),%rdi
call   1050 <system@plt>
cmpl   $0x0,-0x28(%rbp)
je     1476 <delete_arena+0x2f6>
jmp    12db <delete_arena+0x15b>
mov    -0x8(%rbp),%rdi
lea    0xe1a(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
lea    -0x1c(%rbp),%r8
lea    -0x24(%rbp),%r9
call   1070 <fscanf@plt>
mov    0x2ce6(%rip),%rcx
cmp    (%rcx),%rax
je     1395 <delete_arena+0x215>
cmpl   $0x0,-0x24(%rbp)
jne    1372 <delete_arena+0x1f2>
mov    -0x20(%rbp),%eax
cmp    -0x28(%rbp),%eax
jne    1346 <delete_arena+0x1c6>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
lea    0xdc9(%rip),%rsi
mov    $0x1,%r9d
call   1080 <fprintf@plt>
jmp    1364 <delete_arena+0x1e4>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x24(%rbp),%r9d
lea    0xda0(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1390 <delete_arena+0x210>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x24(%rbp),%r9d
lea    0xd74(%rip),%rsi
call   1080 <fprintf@plt>
jmp    12db <delete_arena+0x15b>
mov    -0x8(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
lea    0xc52(%rip),%rdi
lea    0xc62(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x8(%rbp)
lea    0xc47(%rip),%rdi
lea    0xc3e(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xd20(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
lea    -0x1c(%rbp),%r8
lea    -0x24(%rbp),%r9
call   1070 <fscanf@plt>
mov    0x2bec(%rip),%rcx
cmp    (%rcx),%rax
je     1428 <delete_arena+0x2a8>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x24(%rbp),%r9d
lea    0xce1(%rip),%rsi
call   1080 <fprintf@plt>
jmp    13d5 <delete_arena+0x255>
mov    -0x8(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
lea    0xbcb(%rip),%rdi
call   1030 <remove@plt>
cmp    $0x0,%rax
jne    1463 <delete_arena+0x2e3>
lea    0xcb5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1471 <delete_arena+0x2f1>
lea    0xd14(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1476 <delete_arena+0x2f6>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_arena>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movl   $0x0,0x18(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0x1c(%rsp)
lea    0xe33(%rip),%rdi
lea    0xe36(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbx
lea    0xe29(%rip),%rdi
lea    0xe2d(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,0x20(%rsp)
lea    0xe56(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb9(%rip),%rdi
call   1040 <puts@plt>
lea    0xe32(%rip),%rsi
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
lea    0x14(%rsp),%r9
mov    %rbx,%rdi
call   1080 <fscanf@plt>
mov    0x2db2(%rip),%rcx
cmp    (%rcx),%rax
jne    13dd <delete_arena+0x24d>
lea    0xf80(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
lea    0xda6(%rip),%rdi
lea    0xda9(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbx
lea    0xdde(%rip),%rdi
lea    0x1c(%rsp),%rsi
call   10a0 <scanf@plt>
lea    0xdbf(%rip),%rdi
call   1060 <system@plt>
cmpl   $0x0,0x1c(%rsp)
je     13ce <delete_arena+0x23e>
lea    0xdad(%rip),%rsi
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
lea    0x14(%rsp),%r9
mov    %rbx,%rdi
call   1080 <fscanf@plt>
mov    0x2d2d(%rip),%rcx
cmp    (%rcx),%rax
jne    1451 <delete_arena+0x2c1>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    0x20(%rsp),%rdi
call   1050 <fclose@plt>
lea    0xd23(%rip),%rdi
lea    0xd33(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbx
lea    0xd19(%rip),%rdi
lea    0xd10(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbp
lea    0xd3c(%rip),%rsi
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
lea    0x14(%rsp),%r9
mov    %rax,%rdi
call   1080 <fscanf@plt>
mov    0x2cbc(%rip),%rcx
cmp    (%rcx),%rax
je     1398 <delete_arena+0x208>
lea    0x18(%rsp),%r12
lea    0x10(%rsp),%r13
lea    0xc(%rsp),%r14
lea    0x14(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x18(%rsp),%edx
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%r8d
mov    0x14(%rsp),%r9d
mov    %rbx,%rdi
lea    0xcd8(%rip),%rsi
call   1090 <fprintf@plt>
mov    %rbp,%rdi
lea    0xcca(%rip),%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %r14,%r8
mov    %r15,%r9
call   1080 <fscanf@plt>
mov    0x2c55(%rip),%rcx
cmp    (%rcx),%rax
jne    1350 <delete_arena+0x1c0>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    %rbp,%rdi
call   1050 <fclose@plt>
lea    0xc5d(%rip),%rdi
call   1030 <remove@plt>
test   %rax,%rax
lea    0xdbd(%rip),%rax
lea    0xd45(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x18(%rsp),%r12
lea    0x10(%rsp),%r13
lea    0xc(%rsp),%rbp
lea    0x14(%rsp),%r14
xor    %r15d,%r15d
jmp    142b <delete_arena+0x29b>
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0xc3b(%rip),%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %rbp,%r8
mov    %r14,%r9
call   1080 <fscanf@plt>
mov    0x2bc6(%rip),%rcx
cmp    (%rcx),%rax
je     123f <delete_arena+0xaf>
cmpl   $0x0,0x14(%rsp)
jne    1400 <delete_arena+0x270>
add    $0x1,%r15d
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
lea    0xbd4(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    1400 <delete_arena+0x270>
mov    $0x1,%r12d
lea    0x18(%rsp),%r13
lea    0x10(%rsp),%rbp
lea    0xc(%rsp),%r14
lea    0x14(%rsp),%r15
jmp    14b9 <delete_arena+0x329>
nopl   (%rax)
mov    0x18(%rsp),%edx
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%r8d
mov    0x20(%rsp),%rdi
lea    0xbbb(%rip),%rsi
call   1090 <fprintf@plt>
mov    %rbx,%rdi
lea    0xbad(%rip),%rsi
mov    %r13,%rdx
mov    %rbp,%rcx
mov    %r14,%r8
mov    %r15,%r9
call   1080 <fscanf@plt>
mov    0x2b38(%rip),%rcx
cmp    (%rcx),%rax
je     12c4 <delete_arena+0x134>
mov    0x14(%rsp),%r9d
test   %r9d,%r9d
jne    1470 <delete_arena+0x2e0>
xor    %r9d,%r9d
cmp    0x1c(%rsp),%r12d
sete   %r9b
mov    0x18(%rsp),%edx
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%r8d
mov    0x20(%rsp),%rdi
lea    0xb5c(%rip),%rsi
call   1090 <fprintf@plt>
add    $0x1,%r12d
jmp    148e <delete_arena+0x2fe>

LLVM IR (-O0):
@.str = [10 x i8] c"Stats.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [11 x i8] c"Stats1.txt\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [112 x i8] c"\0A __________________________________\0A: Pick the run you want deleted or :\0A: 0 for back to main screen :\0A\00"
@.str.5 = [75 x i8] c": -------------------------------- :\0A: :\0A\00"
@.str.6 = [12 x i8] c"%d %d %d %d\00"
@EOF = global i64 0
@.str.7 = [39 x i8] c": %d ~ Wins - %4d Loss - %4d :\0A\00"
@.str.8 = [39 x i8] c":__________________________________:\0A\0A\00"
@.str.9 = [3 x i8] c"%d\00"
@.str.10 = [4 x i8] c"cls\00"
@.str.11 = [13 x i8] c" %d %d %d %d\00"
@.str.12 = [114 x i8] c"\0A __________________________________ \0A: Deleted :\0A:__________________________________:\0A\0A\00"
@.str.13 = [114 x i8] c"\0A __________________________________ \0A: Unable to delete :\0A:__________________________________:\0A\0A\00"
define void @delete_arena() {
%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 double
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store double 0.000000e+00, double* %12
%13 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %13, i32** %1
%14 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %14, i32** %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.5, i64 0, i64 0))
br label %17
17: ; preds = %33, %0
%18 = load i32*, i32** %1
%19 = call i64 @fscanf(i32* %18, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32* %3, i32* %4, i32* %5, i32* %7)
%20 = load i64, i64* @EOF
%21 = icmp ne i64 %19, %20
br i1 %21, label %22, label %34
22: ; preds = %17
%23 = load i32, i32* %7
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %33
25: ; preds = %22
%26 = load i32, i32* %6
%27 = add nsw i32 %26, 1
%28 = load i32, i32* %4
%29 = load i32, i32* %5
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i32 %27, i32 %28, i32 %29)
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
br label %33
33: ; preds = %25, %22
br label %17
34: ; preds = %17
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0))
%36 = load i32*, i32** %1
%37 = call i32 @fclose(i32* %36)
%38 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %38, i32** %1
%39 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32* %8)
store i32 1, i32* %6
%40 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%41 = load i32, i32* %8
%42 = icmp ne i32 %41, 0
br i1 %42, label %43, label %111
43: ; preds = %34
br label %44
44: ; preds = %79, %43
%45 = load i32*, i32** %1
%46 = call i64 @fscanf(i32* %45, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32* %3, i32* %4, i32* %5, i32* %7)
%47 = load i64, i64* @EOF
%48 = icmp ne i64 %46, %47
br i1 %48, label %49, label %80
49: ; preds = %44
%50 = load i32, i32* %7
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %72
52: ; preds = %49
%53 = load i32, i32* %6
%54 = load i32, i32* %8
%55 = icmp eq i32 %53, %54
br i1 %55, label %56, label %62
56: ; preds = %52
%57 = load i32*, i32** %2
%58 = load i32, i32* %3
%59 = load i32, i32* %4
%60 = load i32, i32* %5
%61 = call i32 @fprintf(i32* %57, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %58, i32 %59, i32 %60, i32 1)
br label %69
62: ; preds = %52
%63 = load i32*, i32** %2
%64 = load i32, i32* %3
%65 = load i32, i32* %4
%66 = load i32, i32* %5
%67 = load i32, i32* %7
%68 = call i32 @fprintf(i32* %63, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %64, i32 %65, i32 %66, i32 %67)
br label %69
69: ; preds = %62, %56
%70 = load i32, i32* %6
%71 = add nsw i32 %70, 1
store i32 %71, i32* %6
br label %79
72: ; preds = %49
%73 = load i32*, i32** %2
%74 = load i32, i32* %3
%75 = load i32, i32* %4
%76 = load i32, i32* %5
%77 = load i32, i32* %7
%78 = call i32 @fprintf(i32* %73, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %74, i32 %75, i32 %76, i32 %77)
br label %79
79: ; preds = %72, %69
br label %44
80: ; preds = %44
%81 = load i32*, i32** %1
%82 = call i32 @fclose(i32* %81)
%83 = load i32*, i32** %2
%84 = call i32 @fclose(i32* %83)
%85 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %85, i32** %1
%86 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %86, i32** %2
br label %87
87: ; preds = %92, %80
%88 = load i32*, i32** %2
%89 = call i64 @fscanf(i32* %88, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32* %3, i32* %4, i32* %5, i32* %7)
%90 = load i64, i64* @EOF
%91 = icmp ne i64 %89, %90
br i1 %91, label %92, label %99
92: ; preds = %87
%93 = load i32*, i32** %1
%94 = load i32, i32* %3
%95 = load i32, i32* %4
%96 = load i32, i32* %5
%97 = load i32, i32* %7
%98 = call i32 @fprintf(i32* %93, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %94, i32 %95, i32 %96, i32 %97)
br label %87
99: ; preds = %87
%100 = load i32*, i32** %1
%101 = call i32 @fclose(i32* %100)
%102 = load i32*, i32** %2
%103 = call i32 @fclose(i32* %102)
%104 = call i64 @remove(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%105 = icmp eq i64 %104, 0
br i1 %105, label %106, label %108
106: ; preds = %99
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str.12, i64 0, i64 0))
br label %110
108: ; preds = %99
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str.13, i64 0, i64 0))
br label %110
110: ; preds = %108, %106
br label %111
111: ; preds = %110, %34
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Stats.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [11 x i8] c"Stats1.txt\00"
@.str.3 = [2 x i8] c"w\00"
@.str.6 = [12 x i8] c"%d %d %d %d\00"
@EOF = global i64 0
@.str.7 = [39 x i8] c": %d ~ Wins - %4d Loss - %4d :\0A\00"
@.str.9 = [3 x i8] c"%d\00"
@.str.10 = [4 x i8] c"cls\00"
@.str.11 = [13 x i8] c" %d %d %d %d\00"
@str = [111 x i8] c"\0A __________________________________\0A: Pick the run you want deleted or :\0A: 0 for back to main screen :\00"
@str.14 = [74 x i8] c": -------------------------------- :\0A: :\00"
@str.15 = [38 x i8] c":__________________________________:\0A\00"
@str.16 = [113 x i8] c"\0A __________________________________ \0A: Unable to delete :\0A:__________________________________:\0A\00"
@str.17 = [113 x i8] c"\0A __________________________________ \0A: Deleted :\0A:__________________________________:\0A\00"
define void @delete_arena() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%7 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%8 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%9 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%10 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%11 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([111 x i8], [111 x i8]* @str, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.14, i64 0, i64 0))
%15 = call i64 @fscanf(i32* %11, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%16 = load i64, i64* @EOF
%17 = icmp eq i64 %15, %16
br i1 %17, label %32, label %18
18: ; preds = %0, %27
%19 = phi i32 [ %28, %27 ], [ 0, %0 ]
%20 = load i32, i32* %4
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %18
%23 = add nsw i32 %19, 1
%24 = load i32, i32* %2
%25 = load i32, i32* %3
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i32 %23, i32 %24, i32 %25)
br label %27
27: ; preds = %22, %18
%28 = phi i32 [ %23, %22 ], [ %19, %18 ]
%29 = call i64 @fscanf(i32* %11, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%30 = load i64, i64* @EOF
%31 = icmp eq i64 %29, %30
br i1 %31, label %32, label %18
32: ; preds = %27, %0
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.15, i64 0, i64 0))
%34 = call i32 @fclose(i32* %11)
%35 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32* %5)
%37 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%38 = load i32, i32* %5
%39 = icmp eq i32 %38, 0
br i1 %39, label %91, label %40
40: ; preds = %32
%41 = call i64 @fscanf(i32* %35, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%42 = load i64, i64* @EOF
%43 = icmp eq i64 %41, %42
br i1 %43, label %67, label %44
44: ; preds = %40, %62
%45 = phi i32 [ %63, %62 ], [ 1, %40 ]
%46 = load i32, i32* %4
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %57
48: ; preds = %44
%49 = load i32, i32* %5
%50 = icmp eq i32 %45, %49
%51 = load i32, i32* %1
%52 = load i32, i32* %2
%53 = load i32, i32* %3
%54 = zext i1 %50 to i32
%55 = call i32 @fprintf(i32* %12, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %51, i32 %52, i32 %53, i32 %54)
%56 = add nsw i32 %45, 1
br label %62
57: ; preds = %44
%58 = load i32, i32* %1
%59 = load i32, i32* %2
%60 = load i32, i32* %3
%61 = call i32 @fprintf(i32* %12, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %58, i32 %59, i32 %60, i32 %46)
br label %62
62: ; preds = %57, %48
%63 = phi i32 [ %56, %48 ], [ %45, %57 ]
%64 = call i64 @fscanf(i32* %35, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%65 = load i64, i64* @EOF
%66 = icmp eq i64 %64, %65
br i1 %66, label %67, label %44
67: ; preds = %62, %40
%68 = call i32 @fclose(i32* %35)
%69 = call i32 @fclose(i32* %12)
%70 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%71 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%72 = call i64 @fscanf(i32* %71, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%73 = load i64, i64* @EOF
%74 = icmp eq i64 %72, %73
br i1 %74, label %84, label %75
75: ; preds = %67, %75
%76 = load i32, i32* %1
%77 = load i32, i32* %2
%78 = load i32, i32* %3
%79 = load i32, i32* %4
%80 = call i32 @fprintf(i32* %70, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %76, i32 %77, i32 %78, i32 %79)
%81 = call i64 @fscanf(i32* %71, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%82 = load i64, i64* @EOF
%83 = icmp eq i64 %81, %82
br i1 %83, label %84, label %75
84: ; preds = %75, %67
%85 = call i32 @fclose(i32* %70)
%86 = call i32 @fclose(i32* %71)
%87 = call i64 @remove(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%88 = icmp eq i64 %87, 0
%89 = select i1 %88, i8* getelementptr inbounds ([113 x i8], [113 x i8]* @str.17, i64 0, i64 0), i8* getelementptr inbounds ([113 x i8], [113 x i8]* @str.16, i64 0, i64 0)
%90 = call i32 @puts(i8* dereferenceable(1) %89)
br label %91
91: ; preds = %84, %32
ret void
}