#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*/ EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ F_OK;
int /*<<< orphan*/ O_CREAT;
int /*<<< orphan*/ R_OK;
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
int S_IWGRP;
int S_IWOTH;
int S_IWUSR;
int /*<<< orphan*/ W_OK;
int /*<<< orphan*/ X_OK;
int access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int open(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ umask(int);
int main(int argc, char *argv[]) {
  int fd1, fd2, verify_fd1;
  char *file_1 = "test1.txt";
  char *file_2 = "test2.txt";
  umask(0);
  if ((fd1 = open(
           file_1, O_CREAT,
           (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH))) < 0) {
    fprintf(stderr, "Err. create file\n");
    exit(EXIT_FAILURE);
  }
  umask(022);
  if ((fd2 = open(
           file_2, O_CREAT,
           (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH))) < 0) {
    fprintf(stderr, "Err. create file\n");
    exit(EXIT_FAILURE);
  }
  if ((verify_fd1 = access(file_1, F_OK)) < 0) {
    fprintf(stderr, "Il file '%s' non esiste \n", file_1);
    exit(EXIT_FAILURE);
  }
  if ((verify_fd1 = access(file_1, R_OK)) < 0) {
    fprintf(stderr, "Il file '%s' non e' leggibile \n", file_1);
    exit(EXIT_FAILURE);
  } else
    fprintf(stdout, "Il file '%s'  e' leggibile \n", file_1);
  if ((verify_fd1 = access(file_1, W_OK)) < 0) {
    fprintf(stderr, "Il file '%s' non e' scrivibile \n", file_1);
    exit(EXIT_FAILURE);
  } else
    fprintf(stdout, "Il file '%s'  e' scriviibile \n", file_1);
  if ((verify_fd1 = access(file_1, X_OK)) < 0) {
    fprintf(stderr, "Il file '%s' non e' eseguibile \n", file_1);
    exit(EXIT_FAILURE);
  } else
    fprintf(stdout, "Il file '%s'  e' eseguiibile \n", file_1);
  close(fd1);
  close(fd2);
  return (EXIT_SUCCESS);
}


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)
lea    0xe83(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xe82(%rip),%rax
mov    %rax,-0x30(%rbp)
xor    %edi,%edi
call   1050 <umask@plt>
mov    -0x28(%rbp),%rdi
mov    0x2e5a(%rip),%rax
mov    (%rax),%esi
mov    0x2df1(%rip),%rax
mov    (%rax),%edx
mov    0x2e20(%rip),%rax
or     (%rax),%edx
mov    0x2df7(%rip),%rax
or     (%rax),%edx
mov    0x2e1e(%rip),%rax
or     (%rax),%edx
mov    0x2ddd(%rip),%rax
or     (%rax),%edx
mov    0x2d9c(%rip),%rax
or     (%rax),%edx
call   1060 <open@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    120c <main+0xac>
mov    0x2dca(%rip),%rax
mov    (%rax),%edi
lea    0xe1d(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d9b(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    $0x12,%edi
call   1050 <umask@plt>
mov    -0x30(%rbp),%rdi
mov    0x2dd7(%rip),%rax
mov    (%rax),%esi
mov    0x2d6e(%rip),%rax
mov    (%rax),%edx
mov    0x2d9d(%rip),%rax
or     (%rax),%edx
mov    0x2d74(%rip),%rax
or     (%rax),%edx
mov    0x2d9b(%rip),%rax
or     (%rax),%edx
mov    0x2d5a(%rip),%rax
or     (%rax),%edx
mov    0x2d19(%rip),%rax
or     (%rax),%edx
call   1060 <open@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jge    128f <main+0x12f>
mov    0x2d47(%rip),%rax
mov    (%rax),%edi
lea    0xd9a(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d18(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    -0x28(%rbp),%rdi
mov    0x2cce(%rip),%rax
mov    (%rax),%esi
call   1070 <access@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    12d6 <main+0x176>
mov    0x2d04(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
lea    0xd65(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2cd1(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    -0x28(%rbp),%rdi
mov    0x2ca7(%rip),%rax
mov    (%rax),%esi
call   1070 <access@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    131d <main+0x1bd>
mov    0x2cbd(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
lea    0xd38(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2c8a(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    0x2c6c(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
lea    0xd2f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x28(%rbp),%rdi
mov    0x2c95(%rip),%rax
mov    (%rax),%esi
call   1070 <access@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    137f <main+0x21f>
mov    0x2c5b(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
lea    0xd13(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2c28(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    0x2c0a(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
lea    0xd0b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x28(%rbp),%rdi
mov    0x2c23(%rip),%rax
mov    (%rax),%esi
call   1070 <access@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    13e1 <main+0x281>
mov    0x2bf9(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
lea    0xcf1(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2bc6(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    0x2ba8(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
lea    0xce9(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x14(%rbp),%edi
call   1030 <close@plt>
mov    -0x18(%rbp),%edi
call   1030 <close@plt>
mov    0x2b6d(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %edi,%edi
call   1050 <umask@plt>
mov    0x2e1f(%rip),%rax
mov    0x2e50(%rip),%r13
mov    0x0(%r13),%edx
or     (%rax),%edx
mov    0x2e23(%rip),%r12
or     (%r12),%edx
mov    0x2e48(%rip),%rbx
or     (%rbx),%edx
mov    0x2e57(%rip),%r15
mov    0x2e00(%rip),%rbp
or     0x0(%rbp),%edx
mov    (%r15),%esi
mov    0x2dbb(%rip),%r14
or     (%r14),%edx
lea    0xe41(%rip),%rdi
call   1060 <open@plt>
mov    %eax,0x4(%rsp)
test   %eax,%eax
js     12f7 <main+0x197>
mov    $0x12,%edi
call   1050 <umask@plt>
mov    (%r15),%esi
mov    0x0(%r13),%edx
mov    0x2db0(%rip),%rax
or     (%rax),%edx
or     (%r12),%edx
or     (%rbx),%edx
or     0x0(%rbp),%edx
or     (%r14),%edx
lea    0xe0d(%rip),%rdi
call   1060 <open@plt>
test   %eax,%eax
js     12f7 <main+0x197>
mov    %eax,%r15d
mov    0x2d54(%rip),%rax
mov    (%rax),%esi
lea    0xde3(%rip),%rdi
call   1070 <access@plt>
test   %eax,%eax
js     1310 <main+0x1b0>
mov    0x2d57(%rip),%rax
mov    (%rax),%esi
lea    0xdc6(%rip),%rdi
call   1070 <access@plt>
test   %eax,%eax
js     1322 <main+0x1c2>
mov    0x2d42(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xe08(%rip),%rsi
lea    0xda1(%rip),%rbx
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2d68(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1070 <access@plt>
test   %eax,%eax
js     1334 <main+0x1d4>
mov    0x0(%rbp),%edi
lea    0xe12(%rip),%rsi
lea    0xd6d(%rip),%rbx
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2d24(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1070 <access@plt>
test   %eax,%eax
js     1346 <main+0x1e6>
mov    0x0(%rbp),%edi
lea    0xe1e(%rip),%rsi
lea    0xd39(%rip),%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x4(%rsp),%edi
call   1030 <close@plt>
mov    %r15d,%edi
call   1030 <close@plt>
mov    0x2c9a(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cba(%rip),%rax
mov    (%rax),%edi
lea    0xd0d(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1364 <main+0x204>
mov    0x2ca1(%rip),%rax
mov    (%rax),%edi
lea    0xd06(%rip),%rsi
jmp    1356 <main+0x1f6>
mov    0x2c8f(%rip),%rax
mov    (%rax),%edi
lea    0xd0e(%rip),%rsi
jmp    1356 <main+0x1f6>
mov    0x2c7d(%rip),%rax
mov    (%rax),%edi
lea    0xd39(%rip),%rsi
jmp    1356 <main+0x1f6>
mov    0x2c6b(%rip),%rax
mov    (%rax),%edi
lea    0xd67(%rip),%rsi
lea    0xca3(%rip),%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2c35(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"test1.txt\00"
@.str.1 = [10 x i8] c"test2.txt\00"
@O_CREAT = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@stderr = global i32 0
@.str.2 = [18 x i8] c"Err. create file\0A\00"
@EXIT_FAILURE = global i32 0
@F_OK = global i32 0
@.str.3 = [26 x i8] c"Il file '%s' non esiste \0A\00"
@R_OK = global i32 0
@.str.4 = [32 x i8] c"Il file '%s' non e' leggibile \0A\00"
@stdout = global i32 0
@.str.5 = [29 x i8] c"Il file '%s' e' leggibile \0A\00"
@W_OK = global i32 0
@.str.6 = [33 x i8] c"Il file '%s' non e' scrivibile \0A\00"
@.str.7 = [31 x i8] c"Il file '%s' e' scriviibile \0A\00"
@X_OK = global i32 0
@.str.8 = [33 x i8] c"Il file '%s' non e' eseguibile \0A\00"
@.str.9 = [31 x i8] c"Il file '%s' e' eseguiibile \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %9
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %10
%11 = call i32 @umask(i32 0)
%12 = load i8*, i8** %9
%13 = load i32, i32* @O_CREAT
%14 = load i32, i32* @S_IRUSR
%15 = load i32, i32* @S_IWUSR
%16 = or i32 %14, %15
%17 = load i32, i32* @S_IRGRP
%18 = or i32 %16, %17
%19 = load i32, i32* @S_IWGRP
%20 = or i32 %18, %19
%21 = load i32, i32* @S_IROTH
%22 = or i32 %20, %21
%23 = load i32, i32* @S_IWOTH
%24 = or i32 %22, %23
%25 = call i32 @open(i8* %12, i32 %13, i32 %24)
store i32 %25, i32* %6
%26 = icmp slt i32 %25, 0
br i1 %26, label %27, label %32
27: ; preds = %2
%28 = load i32, i32* @stderr
%29 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%30 = load i32, i32* @EXIT_FAILURE
%31 = call i32 @exit(i32 %30)
unreachable
32: ; preds = %2
%33 = call i32 @umask(i32 18)
%34 = load i8*, i8** %10
%35 = load i32, i32* @O_CREAT
%36 = load i32, i32* @S_IRUSR
%37 = load i32, i32* @S_IWUSR
%38 = or i32 %36, %37
%39 = load i32, i32* @S_IRGRP
%40 = or i32 %38, %39
%41 = load i32, i32* @S_IWGRP
%42 = or i32 %40, %41
%43 = load i32, i32* @S_IROTH
%44 = or i32 %42, %43
%45 = load i32, i32* @S_IWOTH
%46 = or i32 %44, %45
%47 = call i32 @open(i8* %34, i32 %35, i32 %46)
store i32 %47, i32* %7
%48 = icmp slt i32 %47, 0
br i1 %48, label %49, label %54
49: ; preds = %32
%50 = load i32, i32* @stderr
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%52 = load i32, i32* @EXIT_FAILURE
%53 = call i32 @exit(i32 %52)
unreachable
54: ; preds = %32
%55 = load i8*, i8** %9
%56 = load i32, i32* @F_OK
%57 = call i32 @access(i8* %55, i32 %56)
store i32 %57, i32* %8
%58 = icmp slt i32 %57, 0
br i1 %58, label %59, label %65
59: ; preds = %54
%60 = load i32, i32* @stderr
%61 = load i8*, i8** %9
%62 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i8* %61)
%63 = load i32, i32* @EXIT_FAILURE
%64 = call i32 @exit(i32 %63)
unreachable
65: ; preds = %54
%66 = load i8*, i8** %9
%67 = load i32, i32* @R_OK
%68 = call i32 @access(i8* %66, i32 %67)
store i32 %68, i32* %8
%69 = icmp slt i32 %68, 0
br i1 %69, label %70, label %76
70: ; preds = %65
%71 = load i32, i32* @stderr
%72 = load i8*, i8** %9
%73 = call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i8* %72)
%74 = load i32, i32* @EXIT_FAILURE
%75 = call i32 @exit(i32 %74)
unreachable
76: ; preds = %65
%77 = load i32, i32* @stdout
%78 = load i8*, i8** %9
%79 = call i32 (i32, i8*, ...) @fprintf(i32 %77, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8* %78)
br label %80
80: ; preds = %76
%81 = load i8*, i8** %9
%82 = load i32, i32* @W_OK
%83 = call i32 @access(i8* %81, i32 %82)
store i32 %83, i32* %8
%84 = icmp slt i32 %83, 0
br i1 %84, label %85, label %91
85: ; preds = %80
%86 = load i32, i32* @stderr
%87 = load i8*, i8** %9
%88 = call i32 (i32, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8* %87)
%89 = load i32, i32* @EXIT_FAILURE
%90 = call i32 @exit(i32 %89)
unreachable
91: ; preds = %80
%92 = load i32, i32* @stdout
%93 = load i8*, i8** %9
%94 = call i32 (i32, i8*, ...) @fprintf(i32 %92, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i8* %93)
br label %95
95: ; preds = %91
%96 = load i8*, i8** %9
%97 = load i32, i32* @X_OK
%98 = call i32 @access(i8* %96, i32 %97)
store i32 %98, i32* %8
%99 = icmp slt i32 %98, 0
br i1 %99, label %100, label %106
100: ; preds = %95
%101 = load i32, i32* @stderr
%102 = load i8*, i8** %9
%103 = call i32 (i32, i8*, ...) @fprintf(i32 %101, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i8* %102)
%104 = load i32, i32* @EXIT_FAILURE
%105 = call i32 @exit(i32 %104)
unreachable
106: ; preds = %95
%107 = load i32, i32* @stdout
%108 = load i8*, i8** %9
%109 = call i32 (i32, i8*, ...) @fprintf(i32 %107, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), i8* %108)
br label %110
110: ; preds = %106
%111 = load i32, i32* %6
%112 = call i32 @close(i32 %111)
%113 = load i32, i32* %7
%114 = call i32 @close(i32 %113)
%115 = load i32, i32* @EXIT_SUCCESS
ret i32 %115
}

LLVM IR (-O2):
@.str = [10 x i8] c"test1.txt\00"
@.str.1 = [10 x i8] c"test2.txt\00"
@O_CREAT = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@stderr = global i32 0
@.str.2 = [18 x i8] c"Err. create file\0A\00"
@EXIT_FAILURE = global i32 0
@F_OK = global i32 0
@.str.3 = [26 x i8] c"Il file '%s' non esiste \0A\00"
@R_OK = global i32 0
@.str.4 = [32 x i8] c"Il file '%s' non e' leggibile \0A\00"
@stdout = global i32 0
@.str.5 = [29 x i8] c"Il file '%s' e' leggibile \0A\00"
@W_OK = global i32 0
@.str.6 = [33 x i8] c"Il file '%s' non e' scrivibile \0A\00"
@.str.7 = [31 x i8] c"Il file '%s' e' scriviibile \0A\00"
@X_OK = global i32 0
@.str.8 = [33 x i8] c"Il file '%s' non e' eseguibile \0A\00"
@.str.9 = [31 x i8] c"Il file '%s' e' eseguiibile \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @umask(i32 0)
%4 = load i32, i32* @O_CREAT
%5 = load i32, i32* @S_IRUSR
%6 = load i32, i32* @S_IWUSR
%7 = or i32 %6, %5
%8 = load i32, i32* @S_IRGRP
%9 = or i32 %7, %8
%10 = load i32, i32* @S_IWGRP
%11 = or i32 %9, %10
%12 = load i32, i32* @S_IROTH
%13 = or i32 %11, %12
%14 = load i32, i32* @S_IWOTH
%15 = or i32 %13, %14
%16 = tail call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %15)
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %23
18: ; preds = %2
%19 = load i32, i32* @stderr
%20 = tail call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%21 = load i32, i32* @EXIT_FAILURE
%22 = tail call i32 @exit(i32 %21)
unreachable
23: ; preds = %2
%24 = tail call i32 @umask(i32 18)
%25 = load i32, i32* @O_CREAT
%26 = load i32, i32* @S_IRUSR
%27 = load i32, i32* @S_IWUSR
%28 = or i32 %27, %26
%29 = load i32, i32* @S_IRGRP
%30 = or i32 %28, %29
%31 = load i32, i32* @S_IWGRP
%32 = or i32 %30, %31
%33 = load i32, i32* @S_IROTH
%34 = or i32 %32, %33
%35 = load i32, i32* @S_IWOTH
%36 = or i32 %34, %35
%37 = tail call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %25, i32 %36)
%38 = icmp slt i32 %37, 0
br i1 %38, label %39, label %44
39: ; preds = %23
%40 = load i32, i32* @stderr
%41 = tail call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%42 = load i32, i32* @EXIT_FAILURE
%43 = tail call i32 @exit(i32 %42)
unreachable
44: ; preds = %23
%45 = load i32, i32* @F_OK
%46 = tail call i32 @access(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %45)
%47 = icmp slt i32 %46, 0
br i1 %47, label %48, label %53
48: ; preds = %44
%49 = load i32, i32* @stderr
%50 = tail call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%51 = load i32, i32* @EXIT_FAILURE
%52 = tail call i32 @exit(i32 %51)
unreachable
53: ; preds = %44
%54 = load i32, i32* @R_OK
%55 = tail call i32 @access(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %54)
%56 = icmp slt i32 %55, 0
br i1 %56, label %57, label %62
57: ; preds = %53
%58 = load i32, i32* @stderr
%59 = tail call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%60 = load i32, i32* @EXIT_FAILURE
%61 = tail call i32 @exit(i32 %60)
unreachable
62: ; preds = %53
%63 = load i32, i32* @stdout
%64 = tail call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%65 = load i32, i32* @W_OK
%66 = tail call i32 @access(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %65)
%67 = icmp slt i32 %66, 0
br i1 %67, label %68, label %73
68: ; preds = %62
%69 = load i32, i32* @stderr
%70 = tail call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%71 = load i32, i32* @EXIT_FAILURE
%72 = tail call i32 @exit(i32 %71)
unreachable
73: ; preds = %62
%74 = load i32, i32* @stdout
%75 = tail call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%76 = load i32, i32* @X_OK
%77 = tail call i32 @access(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %76)
%78 = icmp slt i32 %77, 0
br i1 %78, label %79, label %84
79: ; preds = %73
%80 = load i32, i32* @stderr
%81 = tail call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%82 = load i32, i32* @EXIT_FAILURE
%83 = tail call i32 @exit(i32 %82)
unreachable
84: ; preds = %73
%85 = load i32, i32* @stdout
%86 = tail call i32 (i32, i8*, ...) @fprintf(i32 %85, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%87 = tail call i32 @close(i32 %16)
%88 = tail call i32 @close(i32 %37)
%89 = load i32, i32* @EXIT_SUCCESS
ret i32 %89
}