#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*/ O_RDONLY;
int atoi(char *);
scalar_t__ checkFile(int);
int open(char *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  if (argc < 4)
    return 1;
  char *fic = argv[1];
  int alire = atoi(argv[2]);
  int pivot = atoi(argv[3]);
  int des = open(fic, O_RDONLY);
  if (checkFile(des))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    115c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    11c2 <main+0x92>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2e55(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
call   1030 <checkFile@plt>
cmp    $0x0,%rax
je     11bb <main+0x8b>
movl   $0x1,-0x4(%rbp)
jmp    11c2 <main+0x92>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x4,%edi
jl     1153 <main+0x33>
push   %rax
mov    0x8(%rsi),%rdi
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,%edi
call   1030 <checkFile@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 4
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 1, i32* %3
br label %33
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
store i8* %16, i8** %6
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = call i32 @atoi(i8* %19)
store i32 %20, i32* %7
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 3
%23 = load i8*, i8** %22
%24 = call i32 @atoi(i8* %23)
store i32 %24, i32* %8
%25 = load i8*, i8** %6
%26 = load i32, i32* @O_RDONLY
%27 = call i32 @open(i8* %25, i32 %26)
store i32 %27, i32* %9
%28 = load i32, i32* %9
%29 = call i64 @checkFile(i32 %28)
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %13
store i32 1, i32* %3
br label %33
32: ; preds = %13
store i32 0, i32* %3
br label %33
33: ; preds = %32, %31, %12
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 4
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = load i32, i32* @O_RDONLY
%8 = tail call i32 @open(i8* %6, i32 %7)
%9 = tail call i64 @checkFile(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %2, %4
%13 = phi i32 [ %11, %4 ], [ 1, %2 ]
ret i32 %13
}