#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 off_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ F_GETFL;
int O_CREAT;
int O_RDWR;
int O_TRUNC;
int /*<<< orphan*/ SEEK_CUR;
int S_IRUSR;
int S_IWUSR;
int close(int);
int dup(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fcntl(int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
int open(char *, int, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int write(int, char *, int);
int main(int argc, char *argv[]) {
  int fd1, fd2, flags;
  char *file = "foo";
  off_t off1, off2;
  fd1 = open(file, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
  if (fd1 == -1) {
    fprintf(stderr, "error on open\n");
    exit(EXIT_FAILURE);
  } else {
    fd2 = dup(fd1);
    fprintf(stdout, "fd1 is %d and fd2 is %d\n", fd1, fd2);
    if (write(fd1, "hello_world", 11) == -1) {
      fprintf(stderr, "error on write\n");
      exit(EXIT_FAILURE);
    }
    if ((off1 = lseek(fd1, 0, SEEK_CUR)) != -1) {
      fprintf(stdout, "%ld is offset for %d\n", off1, fd1);
    }
    if ((off2 = lseek(fd2, 0, SEEK_CUR)) != -1) {
      fprintf(stdout, "%ld is offset for %d\n", off2, fd2);
    }
    if ((flags = fcntl(fd1, F_GETFL) != -1)) {
      fprintf(stdout, "%d are flags for %d\n", flags, fd1);
    }
    if ((flags = fcntl(fd2, F_GETFL) != -1)) {
      fprintf(stdout, "%d are flags for %d\n", flags, fd2);
    }
    if (close(fd1) == -1) {
      fprintf(stderr, "error on close\n");
      exit(EXIT_FAILURE);
    }
    if (close(fd2) == -1) {
      fprintf(stderr, "error on close\n");
      exit(EXIT_FAILURE);
    }
  }
  exit(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    0xe63(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    0x2e2c(%rip),%rax
mov    (%rax),%esi
mov    0x2e43(%rip),%rax
or     (%rax),%esi
mov    0x2e32(%rip),%rax
or     (%rax),%esi
mov    0x2dd9(%rip),%rax
mov    (%rax),%edx
mov    0x2df8(%rip),%rax
or     (%rax),%edx
call   1090 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1209 <main+0x89>
mov    0x2dcd(%rip),%rax
mov    (%rax),%edi
lea    0xe10(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2da6(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
mov    -0x14(%rbp),%edi
call   1050 <dup@plt>
mov    %eax,-0x18(%rbp)
mov    0x2d7d(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xde9(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x14(%rbp),%edi
lea    0xdf1(%rip),%rsi
mov    $0xb,%edx
call   1040 <write@plt>
cmp    $0xffffffff,%eax
jne    1273 <main+0xf3>
mov    0x2d63(%rip),%rax
mov    (%rax),%edi
lea    0xdda(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2d3c(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
mov    -0x14(%rbp),%edi
mov    0x2d53(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1060 <lseek@plt>
mov    %eax,-0x2c(%rbp)
cmp    $0xffffffff,%eax
je     12af <main+0x12f>
mov    0x2cff(%rip),%rax
mov    (%rax),%edi
mov    -0x2c(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xda0(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%edi
mov    0x2d17(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1060 <lseek@plt>
mov    %eax,-0x30(%rbp)
cmp    $0xffffffff,%eax
je     12eb <main+0x16b>
mov    0x2cc3(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xd64(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x14(%rbp),%edi
mov    0x2cbb(%rip),%rax
mov    (%rax),%esi
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
setne  %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x1c(%rbp)
test   $0x1,%al
jne    131a <main+0x19a>
jmp    1337 <main+0x1b7>
mov    0x2c77(%rip),%rax
mov    (%rax),%edi
mov    -0x1c(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xd2e(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%edi
mov    0x2c6f(%rip),%rax
mov    (%rax),%esi
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
setne  %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x1c(%rbp)
test   $0x1,%al
jne    1366 <main+0x1e6>
jmp    1383 <main+0x203>
mov    0x2c2b(%rip),%rax
mov    (%rax),%edi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xce2(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x14(%rbp),%edi
call   1070 <close@plt>
cmp    $0xffffffff,%eax
jne    13b9 <main+0x239>
mov    0x2c1d(%rip),%rax
mov    (%rax),%edi
lea    0xccf(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2bf6(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
mov    -0x18(%rbp),%edi
call   1070 <close@plt>
cmp    $0xffffffff,%eax
jne    13ef <main+0x26f>
mov    0x2be7(%rip),%rax
mov    (%rax),%edi
lea    0xc99(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2bc0(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
jmp    13f4 <main+0x274>
mov    0x2b95(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    0x2e4a(%rip),%rax
mov    0x2e63(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e50(%rip),%rax
or     (%rax),%esi
mov    0x2df7(%rip),%rax
mov    0x2e18(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
lea    0xe45(%rip),%rdi
call   1090 <open@plt>
cmp    $0xffffffff,%eax
jne    11da <main+0x5a>
mov    0x2dec(%rip),%rax
mov    (%rax),%edi
lea    0xe2f(%rip),%rsi
jmp    12fe <main+0x17e>
mov    %eax,%ebx
mov    %eax,%edi
call   1050 <dup@plt>
mov    %eax,%ebp
mov    0x2dac(%rip),%r14
mov    (%r14),%edi
lea    0xe1d(%rip),%rsi
mov    %ebx,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1080 <fprintf@plt>
lea    0xe24(%rip),%rsi
mov    %ebx,%edi
mov    $0xb,%edx
call   1040 <write@plt>
cmp    $0xffffffff,%eax
jne    122e <main+0xae>
mov    0x2d98(%rip),%rax
mov    (%rax),%edi
lea    0xe0f(%rip),%rsi
jmp    12fe <main+0x17e>
mov    0x2d9b(%rip),%r15
mov    (%r15),%edx
mov    %ebx,%edi
xor    %esi,%esi
call   1060 <lseek@plt>
cmp    $0xffffffff,%eax
je     125b <main+0xdb>
mov    (%r14),%edi
lea    0xdf8(%rip),%rsi
mov    %eax,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    (%r15),%edx
mov    %ebp,%edi
xor    %esi,%esi
call   1060 <lseek@plt>
cmp    $0xffffffff,%eax
je     1281 <main+0x101>
mov    (%r14),%edi
lea    0xdd2(%rip),%rsi
mov    %eax,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x2d28(%rip),%r15
mov    (%r15),%esi
mov    %ebx,%edi
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
je     12af <main+0x12f>
mov    (%r14),%edi
lea    0xdbd(%rip),%rsi
mov    $0x1,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    (%r15),%esi
mov    %ebp,%edi
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
je     12d6 <main+0x156>
mov    (%r14),%edi
lea    0xd96(%rip),%rsi
mov    $0x1,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %ebx,%edi
call   1070 <close@plt>
cmp    $0xffffffff,%eax
je     12ee <main+0x16e>
mov    %ebp,%edi
call   1070 <close@plt>
cmp    $0xffffffff,%eax
jne    1313 <main+0x193>
mov    0x2cc3(%rip),%rax
mov    (%rax),%edi
lea    0xd75(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x2c9c(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
mov    0x2c76(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"foo\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@stderr = global i32 0
@.str.1 = [15 x i8] c"error on open\0A\00"
@EXIT_FAILURE = global i32 0
@stdout = global i32 0
@.str.2 = [25 x i8] c"fd1 is %d and fd2 is %d\0A\00"
@.str.3 = [12 x i8] c"hello_world\00"
@.str.4 = [16 x i8] c"error on write\0A\00"
@SEEK_CUR = global i32 0
@.str.5 = [22 x i8] c"%ld is offset for %d\0A\00"
@F_GETFL = global i32 0
@.str.6 = [21 x i8] c"%d are flags for %d\0A\00"
@.str.7 = [16 x i8] c"error on close\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 i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %9
%12 = load i8*, i8** %9
%13 = load i32, i32* @O_RDWR
%14 = load i32, i32* @O_CREAT
%15 = or i32 %13, %14
%16 = load i32, i32* @O_TRUNC
%17 = or i32 %15, %16
%18 = load i32, i32* @S_IRUSR
%19 = load i32, i32* @S_IWUSR
%20 = or i32 %18, %19
%21 = call i32 @open(i8* %12, i32 %17, i32 %20)
store i32 %21, i32* %6
%22 = load i32, i32* %6
%23 = icmp eq i32 %22, -1
br i1 %23, label %24, label %29
24: ; preds = %2
%25 = load i32, i32* @stderr
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%27 = load i32, i32* @EXIT_FAILURE
%28 = call i32 @exit(i32 %27)
unreachable
29: ; preds = %2
%30 = load i32, i32* %6
%31 = call i32 @dup(i32 %30)
store i32 %31, i32* %7
%32 = load i32, i32* @stdout
%33 = load i32, i32* %6
%34 = load i32, i32* %7
%35 = call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %33, i32 %34)
%36 = load i32, i32* %6
%37 = call i32 @write(i32 %36, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 11)
%38 = icmp eq i32 %37, -1
br i1 %38, label %39, label %44
39: ; preds = %29
%40 = load i32, i32* @stderr
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%42 = load i32, i32* @EXIT_FAILURE
%43 = call i32 @exit(i32 %42)
unreachable
44: ; preds = %29
%45 = load i32, i32* %6
%46 = load i32, i32* @SEEK_CUR
%47 = call i32 @lseek(i32 %45, i32 0, i32 %46)
store i32 %47, i32* %10
%48 = icmp ne i32 %47, -1
br i1 %48, label %49, label %54
49: ; preds = %44
%50 = load i32, i32* @stdout
%51 = load i32, i32* %10
%52 = load i32, i32* %6
%53 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 %51, i32 %52)
br label %54
54: ; preds = %49, %44
%55 = load i32, i32* %7
%56 = load i32, i32* @SEEK_CUR
%57 = call i32 @lseek(i32 %55, i32 0, i32 %56)
store i32 %57, i32* %11
%58 = icmp ne i32 %57, -1
br i1 %58, label %59, label %64
59: ; preds = %54
%60 = load i32, i32* @stdout
%61 = load i32, i32* %11
%62 = load i32, i32* %7
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 %61, i32 %62)
br label %64
64: ; preds = %59, %54
%65 = load i32, i32* %6
%66 = load i32, i32* @F_GETFL
%67 = call i32 @fcntl(i32 %65, i32 %66)
%68 = icmp ne i32 %67, -1
%69 = zext i1 %68 to i32
store i32 %69, i32* %8
br i1 %68, label %70, label %75
70: ; preds = %64
%71 = load i32, i32* @stdout
%72 = load i32, i32* %8
%73 = load i32, i32* %6
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i32 %72, i32 %73)
br label %75
75: ; preds = %70, %64
%76 = load i32, i32* %7
%77 = load i32, i32* @F_GETFL
%78 = call i32 @fcntl(i32 %76, i32 %77)
%79 = icmp ne i32 %78, -1
%80 = zext i1 %79 to i32
store i32 %80, i32* %8
br i1 %79, label %81, label %86
81: ; preds = %75
%82 = load i32, i32* @stdout
%83 = load i32, i32* %8
%84 = load i32, i32* %7
%85 = call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i32 %83, i32 %84)
br label %86
86: ; preds = %81, %75
%87 = load i32, i32* %6
%88 = call i32 @close(i32 %87)
%89 = icmp eq i32 %88, -1
br i1 %89, label %90, label %95
90: ; preds = %86
%91 = load i32, i32* @stderr
%92 = call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%93 = load i32, i32* @EXIT_FAILURE
%94 = call i32 @exit(i32 %93)
unreachable
95: ; preds = %86
%96 = load i32, i32* %7
%97 = call i32 @close(i32 %96)
%98 = icmp eq i32 %97, -1
br i1 %98, label %99, label %104
99: ; preds = %95
%100 = load i32, i32* @stderr
%101 = call i32 (i32, i8*, ...) @fprintf(i32 %100, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%102 = load i32, i32* @EXIT_FAILURE
%103 = call i32 @exit(i32 %102)
unreachable
104: ; preds = %95
br label %105
105: ; preds = %104
%106 = load i32, i32* @EXIT_SUCCESS
%107 = call i32 @exit(i32 %106)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"foo\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@stderr = global i32 0
@.str.1 = [15 x i8] c"error on open\0A\00"
@EXIT_FAILURE = global i32 0
@stdout = global i32 0
@.str.2 = [25 x i8] c"fd1 is %d and fd2 is %d\0A\00"
@.str.3 = [12 x i8] c"hello_world\00"
@.str.4 = [16 x i8] c"error on write\0A\00"
@SEEK_CUR = global i32 0
@.str.5 = [22 x i8] c"%ld is offset for %d\0A\00"
@F_GETFL = global i32 0
@.str.6 = [21 x i8] c"%d are flags for %d\0A\00"
@.str.7 = [16 x i8] c"error on close\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @O_RDWR
%4 = load i32, i32* @O_CREAT
%5 = or i32 %4, %3
%6 = load i32, i32* @O_TRUNC
%7 = or i32 %5, %6
%8 = load i32, i32* @S_IRUSR
%9 = load i32, i32* @S_IWUSR
%10 = or i32 %9, %8
%11 = tail call i32 @open(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %10)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load i32, i32* @stderr
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%16 = load i32, i32* @EXIT_FAILURE
%17 = tail call i32 @exit(i32 %16)
unreachable
18: ; preds = %2
%19 = tail call i32 @dup(i32 %11)
%20 = load i32, i32* @stdout
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32 %19)
%22 = tail call i32 @write(i32 %11, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 11)
%23 = icmp eq i32 %22, -1
br i1 %23, label %24, label %29
24: ; preds = %18
%25 = load i32, i32* @stderr
%26 = tail call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%27 = load i32, i32* @EXIT_FAILURE
%28 = tail call i32 @exit(i32 %27)
unreachable
29: ; preds = %18
%30 = load i32, i32* @SEEK_CUR
%31 = tail call i32 @lseek(i32 %11, i32 0, i32 %30)
%32 = icmp eq i32 %31, -1
br i1 %32, label %36, label %33
33: ; preds = %29
%34 = load i32, i32* @stdout
%35 = tail call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 %31, i32 %11)
br label %36
36: ; preds = %33, %29
%37 = load i32, i32* @SEEK_CUR
%38 = tail call i32 @lseek(i32 %19, i32 0, i32 %37)
%39 = icmp eq i32 %38, -1
br i1 %39, label %43, label %40
40: ; preds = %36
%41 = load i32, i32* @stdout
%42 = tail call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 %38, i32 %19)
br label %43
43: ; preds = %40, %36
%44 = load i32, i32* @F_GETFL
%45 = tail call i32 @fcntl(i32 %11, i32 %44)
%46 = icmp eq i32 %45, -1
br i1 %46, label %50, label %47
47: ; preds = %43
%48 = load i32, i32* @stdout
%49 = tail call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i32 1, i32 %11)
br label %50
50: ; preds = %47, %43
%51 = load i32, i32* @F_GETFL
%52 = tail call i32 @fcntl(i32 %19, i32 %51)
%53 = icmp eq i32 %52, -1
br i1 %53, label %57, label %54
54: ; preds = %50
%55 = load i32, i32* @stdout
%56 = tail call i32 (i32, i8*, ...) @fprintf(i32 %55, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i32 1, i32 %19)
br label %57
57: ; preds = %54, %50
%58 = tail call i32 @close(i32 %11)
%59 = icmp eq i32 %58, -1
br i1 %59, label %60, label %65
60: ; preds = %57
%61 = load i32, i32* @stderr
%62 = tail call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%63 = load i32, i32* @EXIT_FAILURE
%64 = tail call i32 @exit(i32 %63)
unreachable
65: ; preds = %57
%66 = tail call i32 @close(i32 %19)
%67 = icmp eq i32 %66, -1
br i1 %67, label %68, label %73
68: ; preds = %65
%69 = load i32, i32* @stderr
%70 = tail call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%71 = load i32, i32* @EXIT_FAILURE
%72 = tail call i32 @exit(i32 %71)
unreachable
73: ; preds = %65
%74 = load i32, i32* @EXIT_SUCCESS
%75 = tail call i32 @exit(i32 %74)
unreachable
}