#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*/ F_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ debug_write(char *);
int remove(char *);
int delete_output_files() {
  if (access("404Data.txt", F_OK) == 0) {
    int err = remove("404Data.txt");
    if (err != 0) {
      debug_write("Failed to delete 404Data.txt\n");
      return 1;
    }
  }
  if (access("stats.txt", F_OK) == 0) {
    int err = remove("stats.txt");
    if (err != 0) {
      debug_write("Failed to delete stats.txt\n");
      return 1;
    }
  }
  if (access("errorFile.txt", F_OK) == 0) {
    int err = remove("errorFile.txt");
    if (err != 0) {
      debug_write("Failed to delete errorFile.txt\n");
      return 1;
    }
  }
  if (access("topRequests.txt", F_OK) == 0) {
    int err = remove("topRequests.txt");
    if (err != 0) {
      debug_write("Failed to delete topRequests.txt\n");
      return 1;
    }
  }
  if (access("injectFile.txt", F_OK) == 0) {
    int err = remove("injectFile.txt");
    if (err != 0) {
      debug_write("Failed to delete injectFile.txt\n");
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<delete_output_files>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
lea    0xeb8(%rip),%rdi
call   1040 <access@plt>
cmp    $0x0,%rax
jne    118d <delete_output_files+0x5d>
lea    0xea2(%rip),%rdi
call   1030 <remove@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1188 <delete_output_files+0x58>
lea    0xe95(%rip),%rdi
call   1050 <debug_write@plt>
movl   $0x1,-0x4(%rbp)
jmp    12e8 <delete_output_files+0x1b8>
jmp    118d <delete_output_files+0x5d>
mov    0x2e44(%rip),%rax
mov    (%rax),%esi
lea    0xe8d(%rip),%rdi
call   1040 <access@plt>
cmp    $0x0,%rax
jne    11e2 <delete_output_files+0xb2>
lea    0xe77(%rip),%rdi
call   1030 <remove@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     11dd <delete_output_files+0xad>
lea    0xe68(%rip),%rdi
call   1050 <debug_write@plt>
movl   $0x1,-0x4(%rbp)
jmp    12e8 <delete_output_files+0x1b8>
jmp    11e2 <delete_output_files+0xb2>
mov    0x2def(%rip),%rax
mov    (%rax),%esi
lea    0xe5e(%rip),%rdi
call   1040 <access@plt>
cmp    $0x0,%rax
jne    1237 <delete_output_files+0x107>
lea    0xe48(%rip),%rdi
call   1030 <remove@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1232 <delete_output_files+0x102>
lea    0xe3d(%rip),%rdi
call   1050 <debug_write@plt>
movl   $0x1,-0x4(%rbp)
jmp    12e8 <delete_output_files+0x1b8>
jmp    1237 <delete_output_files+0x107>
mov    0x2d9a(%rip),%rax
mov    (%rax),%esi
lea    0xe37(%rip),%rdi
call   1040 <access@plt>
cmp    $0x0,%rax
jne    128c <delete_output_files+0x15c>
lea    0xe21(%rip),%rdi
call   1030 <remove@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1287 <delete_output_files+0x157>
lea    0xe18(%rip),%rdi
call   1050 <debug_write@plt>
movl   $0x1,-0x4(%rbp)
jmp    12e8 <delete_output_files+0x1b8>
jmp    128c <delete_output_files+0x15c>
mov    0x2d45(%rip),%rax
mov    (%rax),%esi
lea    0xe14(%rip),%rdi
call   1040 <access@plt>
cmp    $0x0,%rax
jne    12e1 <delete_output_files+0x1b1>
lea    0xdfe(%rip),%rdi
call   1030 <remove@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     12dc <delete_output_files+0x1ac>
lea    0xdf4(%rip),%rdi
call   1050 <debug_write@plt>
movl   $0x1,-0x4(%rbp)
jmp    12e8 <delete_output_files+0x1b8>
jmp    12e1 <delete_output_files+0x1b1>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_output_files>:
push   %rbx
mov    0x2ea0(%rip),%rbx
mov    (%rbx),%esi
lea    0xebf(%rip),%rdi
call   1040 <access@plt>
test   %rax,%rax
je     11c6 <delete_output_files+0x96>
mov    (%rbx),%esi
lea    0xed6(%rip),%rdi
call   1040 <access@plt>
test   %rax,%rax
je     11e3 <delete_output_files+0xb3>
mov    (%rbx),%esi
lea    0xee5(%rip),%rdi
call   1040 <access@plt>
test   %rax,%rax
je     1200 <delete_output_files+0xd0>
mov    (%rbx),%esi
lea    0xefc(%rip),%rdi
call   1040 <access@plt>
test   %rax,%rax
je     121d <delete_output_files+0xed>
mov    (%rbx),%esi
lea    0xf17(%rip),%rdi
call   1040 <access@plt>
xor    %ebx,%ebx
test   %rax,%rax
jne    1242 <delete_output_files+0x112>
lea    0xf00(%rip),%rdi
call   1030 <remove@plt>
test   %eax,%eax
je     1242 <delete_output_files+0x112>
lea    0xefb(%rip),%rdi
jmp    1238 <delete_output_files+0x108>
lea    0xe33(%rip),%rdi
call   1030 <remove@plt>
test   %eax,%eax
je     114b <delete_output_files+0x1b>
lea    0xe2b(%rip),%rdi
jmp    1238 <delete_output_files+0x108>
lea    0xe40(%rip),%rdi
call   1030 <remove@plt>
test   %eax,%eax
je     1162 <delete_output_files+0x32>
lea    0xe36(%rip),%rdi
jmp    1238 <delete_output_files+0x108>
lea    0xe49(%rip),%rdi
call   1030 <remove@plt>
test   %eax,%eax
je     1179 <delete_output_files+0x49>
lea    0xe43(%rip),%rdi
jmp    1238 <delete_output_files+0x108>
lea    0xe5a(%rip),%rdi
call   1030 <remove@plt>
test   %eax,%eax
je     1190 <delete_output_files+0x60>
lea    0xe56(%rip),%rdi
call   1050 <debug_write@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"404Data.txt\00"
@F_OK = global i32 0
@.str.1 = [30 x i8] c"Failed to delete 404Data.txt\0A\00"
@.str.2 = [10 x i8] c"stats.txt\00"
@.str.3 = [28 x i8] c"Failed to delete stats.txt\0A\00"
@.str.4 = [14 x i8] c"errorFile.txt\00"
@.str.5 = [32 x i8] c"Failed to delete errorFile.txt\0A\00"
@.str.6 = [16 x i8] c"topRequests.txt\00"
@.str.7 = [34 x i8] c"Failed to delete topRequests.txt\0A\00"
@.str.8 = [15 x i8] c"injectFile.txt\00"
@.str.9 = [33 x i8] c"Failed to delete injectFile.txt\0A\00"
define i32 @delete_output_files() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = load i32, i32* @F_OK
%8 = call i64 @access(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %0
%11 = call i32 @remove(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = call i32 @debug_write(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %1
br label %62
16: ; preds = %10
br label %17
17: ; preds = %16, %0
%18 = load i32, i32* @F_OK
%19 = call i64 @access(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %18)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %28
21: ; preds = %17
%22 = call i32 @remove(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
store i32 %22, i32* %3
%23 = load i32, i32* %3
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = call i32 @debug_write(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %1
br label %62
27: ; preds = %21
br label %28
28: ; preds = %27, %17
%29 = load i32, i32* @F_OK
%30 = call i64 @access(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %29)
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %39
32: ; preds = %28
%33 = call i32 @remove(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
store i32 %33, i32* %4
%34 = load i32, i32* %4
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = call i32 @debug_write(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %1
br label %62
38: ; preds = %32
br label %39
39: ; preds = %38, %28
%40 = load i32, i32* @F_OK
%41 = call i64 @access(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %40)
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %50
43: ; preds = %39
%44 = call i32 @remove(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
store i32 %44, i32* %5
%45 = load i32, i32* %5
%46 = icmp ne i32 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 @debug_write(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
store i32 1, i32* %1
br label %62
49: ; preds = %43
br label %50
50: ; preds = %49, %39
%51 = load i32, i32* @F_OK
%52 = call i64 @access(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 %51)
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %61
54: ; preds = %50
%55 = call i32 @remove(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0))
store i32 %55, i32* %6
%56 = load i32, i32* %6
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %60
58: ; preds = %54
%59 = call i32 @debug_write(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
store i32 1, i32* %1
br label %62
60: ; preds = %54
br label %61
61: ; preds = %60, %50
store i32 0, i32* %1
br label %62
62: ; preds = %61, %58, %47, %36, %25, %14
%63 = load i32, i32* %1
ret i32 %63
}

LLVM IR (-O2):
@.str = [12 x i8] c"404Data.txt\00"
@F_OK = global i32 0
@.str.1 = [30 x i8] c"Failed to delete 404Data.txt\0A\00"
@.str.2 = [10 x i8] c"stats.txt\00"
@.str.3 = [28 x i8] c"Failed to delete stats.txt\0A\00"
@.str.4 = [14 x i8] c"errorFile.txt\00"
@.str.5 = [32 x i8] c"Failed to delete errorFile.txt\0A\00"
@.str.6 = [16 x i8] c"topRequests.txt\00"
@.str.7 = [34 x i8] c"Failed to delete topRequests.txt\0A\00"
@.str.8 = [15 x i8] c"injectFile.txt\00"
@.str.9 = [33 x i8] c"Failed to delete injectFile.txt\0A\00"
define i32 @delete_output_files() {
%1 = load i32, i32* @F_OK
%2 = tail call i64 @access(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = tail call i32 @remove(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %35
7: ; preds = %4, %0
%8 = load i32, i32* @F_OK
%9 = tail call i64 @access(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = tail call i32 @remove(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %35
14: ; preds = %11, %7
%15 = load i32, i32* @F_OK
%16 = tail call i64 @access(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %15)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = tail call i32 @remove(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %35
21: ; preds = %18, %14
%22 = load i32, i32* @F_OK
%23 = tail call i64 @access(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %22)
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %21
%26 = tail call i32 @remove(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %35
28: ; preds = %25, %21
%29 = load i32, i32* @F_OK
%30 = tail call i64 @access(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 %29)
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %38
32: ; preds = %28
%33 = tail call i32 @remove(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0))
%34 = icmp eq i32 %33, 0
br i1 %34, label %38, label %35
35: ; preds = %32, %25, %18, %11, %4
%36 = phi i8* [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), %4 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), %11 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), %18 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0), %25 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0), %32 ]
%37 = tail call i32 @debug_write(i8* %36)
br label %38
38: ; preds = %35, %32, %28
%39 = phi i32 [ 0, %28 ], [ 0, %32 ], [ 1, %35 ]
ret i32 %39
}