#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 check_file(char *);
int check_files() {
  if (check_file("/tmp/new_login") != -1)
    return 1;
  if (check_file("/tmp/new_config") != -1)
    return 1;
  if (check_file("/tmp/new_network") != -1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<check_files>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <check_file@plt>
cmp    $0xffffffff,%eax
je     1139 <check_files+0x29>
movl   $0x1,-0x4(%rbp)
jmp    1182 <check_files+0x72>
lea    0xecf(%rip),%rdi
call   1030 <check_file@plt>
cmp    $0xffffffff,%eax
je     115a <check_files+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1182 <check_files+0x72>
lea    0xebe(%rip),%rdi
call   1030 <check_file@plt>
cmp    $0xffffffff,%eax
je     117b <check_files+0x6b>
movl   $0x1,-0x4(%rbp)
jmp    1182 <check_files+0x72>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_files>:
push   %rbx
lea    0xee8(%rip),%rdi
call   1030 <check_file@plt>
mov    $0x1,%ebx
cmp    $0xffffffff,%eax
jne    114c <check_files+0x3c>
lea    0xee1(%rip),%rdi
call   1030 <check_file@plt>
cmp    $0xffffffff,%eax
jne    114c <check_files+0x3c>
lea    0xee0(%rip),%rdi
call   1030 <check_file@plt>
xor    %ebx,%ebx
cmp    $0xffffffff,%eax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"/tmp/new_login\00"
@.str.1 = [16 x i8] c"/tmp/new_config\00"
@.str.2 = [17 x i8] c"/tmp/new_network\00"
define i32 @check_files() {
%1 = alloca i32
%2 = call i32 @check_file(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32 %2, -1
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %14
5: ; preds = %0
%6 = call i32 @check_file(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp ne i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 1, i32* %1
br label %14
9: ; preds = %5
%10 = call i32 @check_file(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp ne i32 %10, -1
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 1, i32* %1
br label %14
13: ; preds = %9
store i32 0, i32* %1
br label %14
14: ; preds = %13, %12, %8, %4
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [15 x i8] c"/tmp/new_login\00"
@.str.1 = [16 x i8] c"/tmp/new_config\00"
@.str.2 = [17 x i8] c"/tmp/new_network\00"
define i32 @check_files() {
%1 = tail call i32 @check_file(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %10
3: ; preds = %0
%4 = tail call i32 @check_file(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i32 @check_file(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%8 = icmp ne i32 %7, -1
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %0
%11 = phi i32 [ 1, %0 ], [ 1, %3 ], [ %9, %6 ]
ret i32 %11
}