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

/* Variables and functions */
int EXIT_SUCCESS;
int O_CREAT;
int O_EXCL;
int /*<<< orphan*/ O_RDONLY;
int O_TRUNC;
int O_WRONLY;
int close(int);
int errno;
int fprintf(int /*<<< orphan*/, char *, ...);
scalar_t__ memset(void *, int /*<<< orphan*/, size_t);
int open(char *, int, ...);
int /*<<< orphan*/ perror(char *);
int read(int, void *, size_t);
int /*<<< orphan*/ stdout;
int write(int, void const *, size_t);
int main(int argc, char **argv) {
  int error = 0;
  int fprintf_return = 0;
  int close_return = 0;
  int file_to_read = 0;
  int file_to_write = 0;
  ssize_t read_return = 0;
  ssize_t write_return = 0;
  char read_buffer[1024] = "";
  if (argc != 3) {
    fprintf_return = fprintf(
        stdout, "Usage: %s <fichier a lire> <fichier a ecrire> \n", argv[0]);
    if (fprintf_return < 0) {
      perror("Error fprintf");
      return fprintf_return;
    }
    return -1;
  }
  file_to_read = open(argv[1], O_RDONLY);
  if (file_to_read == -1) {
    error = errno;
    perror("Error open");
    return error;
  }
  file_to_write = open(argv[2], O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 00600);
  if (file_to_write == -1) {
    error = errno;
    perror("Error open");
    return error;
  }
  while (
      (read_return = read(file_to_read,
                          (void *)memset((void *)read_buffer, 0, (size_t)1024),
                          (size_t)1024)) != 0) {
    if (read_return == -1) {
      error = errno;
      perror("Error read");
      return error;
    }
    write_return =
        write(file_to_write, (const void *)read_buffer, (size_t)read_return);
    if (write_return == -1) {
      error = errno;
      perror("Error write");
      return error;
    }
  }
  close_return = close(file_to_read);
  if (close_return == -1) {
    error = errno;
    perror("Error close");
    return error;
  }
  close_return = close(file_to_write);
  if (close_return == -1) {
    error = errno;
    perror("Error close");
    return error;
  }
  fprintf_return = fprintf(stdout, "Fichier copie ! \n");
  if (fprintf_return < 0) {
    perror("Error fprintf");
    return fprintf_return;
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x440,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
lea    -0x430(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
cmpl   $0x3,-0x8(%rbp)
je     1225 <main+0xb5>
mov    0x2dda(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe12(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1219 <main+0xa9>
lea    0xe27(%rip),%rdi
call   1090 <perror@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1441 <main+0x2d1>
movl   $0xffffffff,-0x4(%rbp)
jmp    1441 <main+0x2d1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2da4(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1080 <open@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0xffffffff,-0x20(%rbp)
jne    126d <main+0xfd>
mov    0x2d6f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xde1(%rip),%rdi
call   1090 <perror@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1441 <main+0x2d1>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    0x2d7c(%rip),%rax
mov    (%rax),%esi
mov    0x2d43(%rip),%rax
or     (%rax),%esi
mov    0x2d12(%rip),%rax
or     (%rax),%esi
mov    0x2d59(%rip),%rax
or     (%rax),%esi
mov    $0x180,%edx
mov    $0x0,%al
call   1080 <open@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xffffffff,-0x24(%rbp)
jne    12d5 <main+0x165>
mov    0x2d07(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xd79(%rip),%rdi
call   1090 <perror@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1441 <main+0x2d1>
jmp    12da <main+0x16a>
mov    -0x20(%rbp),%eax
mov    %eax,-0x434(%rbp)
lea    -0x430(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
mov    -0x434(%rbp),%edi
mov    %rax,%rsi
mov    $0x400,%edx
call   1060 <read@plt>
mov    %eax,-0x28(%rbp)
cmp    $0x0,%eax
je     138a <main+0x21a>
cmpl   $0xffffffff,-0x28(%rbp)
jne    1342 <main+0x1d2>
mov    0x2c9a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xd17(%rip),%rdi
call   1090 <perror@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1441 <main+0x2d1>
mov    -0x24(%rbp),%edi
lea    -0x430(%rbp),%rsi
movslq -0x28(%rbp),%rdx
call   1030 <write@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0xffffffff,-0x2c(%rbp)
jne    1385 <main+0x215>
mov    0x2c57(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xcdf(%rip),%rdi
call   1090 <perror@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1441 <main+0x2d1>
jmp    12da <main+0x16a>
mov    -0x20(%rbp),%edi
call   1050 <close@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    13c2 <main+0x252>
mov    0x2c1a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xcae(%rip),%rdi
call   1090 <perror@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1441 <main+0x2d1>
mov    -0x24(%rbp),%edi
call   1050 <close@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    13fa <main+0x28a>
mov    0x2be2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xc76(%rip),%rdi
call   1090 <perror@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1441 <main+0x2d1>
mov    0x2bb7(%rip),%rax
mov    (%rax),%edi
lea    0xc62(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1435 <main+0x2c5>
lea    0xc0b(%rip),%rdi
call   1090 <perror@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1441 <main+0x2d1>
mov    0x2b74(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x440,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%rbp
mov    %edi,%ebx
mov    %rsp,%rdi
mov    $0x400,%edx
xor    %esi,%esi
call   1040 <memset@plt>
cmp    $0x3,%ebx
jne    1255 <main+0xe5>
mov    0x8(%rbp),%rdi
mov    0x2e35(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1080 <open@plt>
cmp    $0xffffffff,%eax
je     12d6 <main+0x166>
mov    %eax,%r14d
mov    0x2e39(%rip),%rax
mov    0x2e02(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2dcf(%rip),%rax
or     (%rax),%esi
mov    0x10(%rbp),%rdi
mov    0x2e12(%rip),%rax
or     (%rax),%esi
mov    $0x180,%edx
xor    %eax,%eax
call   1080 <open@plt>
cmp    $0xffffffff,%eax
je     12d6 <main+0x166>
mov    %eax,%ebp
mov    %rsp,%rbx
nopw   0x0(%rax,%rax,1)
mov    $0x400,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    $0x400,%edx
mov    %r14d,%edi
mov    %rax,%rsi
call   1060 <read@plt>
test   %eax,%eax
je     128b <main+0x11b>
cmp    $0xffffffff,%eax
je     1304 <main+0x194>
movslq %eax,%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <write@plt>
cmp    $0xffffffff,%eax
jne    1200 <main+0x90>
mov    0x2d7b(%rip),%rax
mov    (%rax),%ebx
lea    0xe06(%rip),%rdi
call   1090 <perror@plt>
jmp    12c8 <main+0x158>
mov    0x2d5c(%rip),%rax
mov    (%rax),%edi
mov    0x0(%rbp),%rdx
lea    0xd97(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xffffffff,%ebx
test   %eax,%eax
jns    12c8 <main+0x158>
mov    %eax,%ebp
lea    0xdae(%rip),%rdi
call   1090 <perror@plt>
mov    %ebp,%ebx
jmp    12c8 <main+0x158>
mov    %r14d,%edi
call   1050 <close@plt>
cmp    $0xffffffff,%eax
je     12ed <main+0x17d>
mov    %ebp,%edi
call   1050 <close@plt>
cmp    $0xffffffff,%eax
je     12ed <main+0x17d>
mov    0x2d0d(%rip),%rax
mov    (%rax),%edi
lea    0xdb8(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %eax,%eax
js     131b <main+0x1ab>
mov    0x2cea(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    0x2ce3(%rip),%rax
mov    (%rax),%ebx
lea    0xd58(%rip),%rdi
call   1090 <perror@plt>
jmp    12c8 <main+0x158>
mov    0x2ccc(%rip),%rax
mov    (%rax),%ebx
lea    0xd63(%rip),%rdi
call   1090 <perror@plt>
jmp    12c8 <main+0x158>
mov    0x2cb5(%rip),%rax
mov    (%rax),%ebx
lea    0xd35(%rip),%rdi
call   1090 <perror@plt>
jmp    12c8 <main+0x158>
mov    %eax,%ebx
lea    0xd0c(%rip),%rdi
call   1090 <perror@plt>
jmp    12c8 <main+0x158>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [48 x i8] c"Usage: %s <fichier a lire> <fichier a ecrire> \0A\00"
@.str.1 = [14 x i8] c"Error fprintf\00"
@O_RDONLY = global i32 0
@errno = global i32 0
@.str.2 = [11 x i8] c"Error open\00"
@O_CREAT = global i32 0
@O_EXCL = global i32 0
@O_WRONLY = global i32 0
@O_TRUNC = global i32 0
@.str.3 = [11 x i8] c"Error read\00"
@.str.4 = [12 x i8] c"Error write\00"
@.str.5 = [12 x i8] c"Error close\00"
@.str.6 = [18 x i8] c"Fichier copie ! \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 i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [1024 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
%14 = bitcast [1024 x i8]* %13 to i8*
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 3
br i1 %16, label %17, label %29
17: ; preds = %2
%18 = load i32, i32* @stdout
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %21)
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %17
%26 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%27 = load i32, i32* %7
store i32 %27, i32* %3
br label %115
28: ; preds = %17
store i32 -1, i32* %3
br label %115
29: ; preds = %2
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = load i32, i32* @O_RDONLY
%34 = call i32 (i8*, i32, ...) @open(i8* %32, i32 %33)
store i32 %34, i32* %9
%35 = load i32, i32* %9
%36 = icmp eq i32 %35, -1
br i1 %36, label %37, label %41
37: ; preds = %29
%38 = load i32, i32* @errno
store i32 %38, i32* %6
%39 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%40 = load i32, i32* %6
store i32 %40, i32* %3
br label %115
41: ; preds = %29
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 2
%44 = load i8*, i8** %43
%45 = load i32, i32* @O_CREAT
%46 = load i32, i32* @O_EXCL
%47 = or i32 %45, %46
%48 = load i32, i32* @O_WRONLY
%49 = or i32 %47, %48
%50 = load i32, i32* @O_TRUNC
%51 = or i32 %49, %50
%52 = call i32 (i8*, i32, ...) @open(i8* %44, i32 %51, i32 384)
store i32 %52, i32* %10
%53 = load i32, i32* %10
%54 = icmp eq i32 %53, -1
br i1 %54, label %55, label %59
55: ; preds = %41
%56 = load i32, i32* @errno
store i32 %56, i32* %6
%57 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%58 = load i32, i32* %6
store i32 %58, i32* %3
br label %115
59: ; preds = %41
br label %60
60: ; preds = %86, %59
%61 = load i32, i32* %9
%62 = getelementptr inbounds [1024 x i8], [1024 x i8]* %13, i64 0, i64 0
%63 = call i64 @memset(i8* %62, i32 0, i64 1024)
%64 = inttoptr i64 %63 to i8*
%65 = call i32 @read(i32 %61, i8* %64, i64 1024)
store i32 %65, i32* %11
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %87
67: ; preds = %60
%68 = load i32, i32* %11
%69 = icmp eq i32 %68, -1
br i1 %69, label %70, label %74
70: ; preds = %67
%71 = load i32, i32* @errno
store i32 %71, i32* %6
%72 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%73 = load i32, i32* %6
store i32 %73, i32* %3
br label %115
74: ; preds = %67
%75 = load i32, i32* %10
%76 = getelementptr inbounds [1024 x i8], [1024 x i8]* %13, i64 0, i64 0
%77 = load i32, i32* %11
%78 = sext i32 %77 to i64
%79 = call i32 @write(i32 %75, i8* %76, i64 %78)
store i32 %79, i32* %12
%80 = load i32, i32* %12
%81 = icmp eq i32 %80, -1
br i1 %81, label %82, label %86
82: ; preds = %74
%83 = load i32, i32* @errno
store i32 %83, i32* %6
%84 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%85 = load i32, i32* %6
store i32 %85, i32* %3
br label %115
86: ; preds = %74
br label %60
87: ; preds = %60
%88 = load i32, i32* %9
%89 = call i32 @close(i32 %88)
store i32 %89, i32* %8
%90 = load i32, i32* %8
%91 = icmp eq i32 %90, -1
br i1 %91, label %92, label %96
92: ; preds = %87
%93 = load i32, i32* @errno
store i32 %93, i32* %6
%94 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
%95 = load i32, i32* %6
store i32 %95, i32* %3
br label %115
96: ; preds = %87
%97 = load i32, i32* %10
%98 = call i32 @close(i32 %97)
store i32 %98, i32* %8
%99 = load i32, i32* %8
%100 = icmp eq i32 %99, -1
br i1 %100, label %101, label %105
101: ; preds = %96
%102 = load i32, i32* @errno
store i32 %102, i32* %6
%103 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
%104 = load i32, i32* %6
store i32 %104, i32* %3
br label %115
105: ; preds = %96
%106 = load i32, i32* @stdout
%107 = call i32 (i32, i8*, ...) @fprintf(i32 %106, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
store i32 %107, i32* %7
%108 = load i32, i32* %7
%109 = icmp slt i32 %108, 0
br i1 %109, label %110, label %113
110: ; preds = %105
%111 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%112 = load i32, i32* %7
store i32 %112, i32* %3
br label %115
113: ; preds = %105
%114 = load i32, i32* @EXIT_SUCCESS
store i32 %114, i32* %3
br label %115
115: ; preds = %113, %110, %101, %92, %82, %70, %55, %37, %28, %25
%116 = load i32, i32* %3
ret i32 %116
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [48 x i8] c"Usage: %s <fichier a lire> <fichier a ecrire> \0A\00"
@.str.1 = [14 x i8] c"Error fprintf\00"
@O_RDONLY = global i32 0
@errno = global i32 0
@.str.2 = [11 x i8] c"Error open\00"
@O_CREAT = global i32 0
@O_EXCL = global i32 0
@O_WRONLY = global i32 0
@O_TRUNC = global i32 0
@.str.3 = [11 x i8] c"Error read\00"
@.str.4 = [12 x i8] c"Error write\00"
@.str.5 = [12 x i8] c"Error close\00"
@.str.6 = [18 x i8] c"Fichier copie ! \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32 %0, 3
br i1 %5, label %13, label %6
6: ; preds = %2
%7 = load i32, i32* @stdout
%8 = load i8*, i8** %1
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %71
11: ; preds = %6
%12 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %71
13: ; preds = %2
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = load i32, i32* @O_RDONLY
%17 = tail call i32 (i8*, i32, ...) @open(i8* %15, i32 %16)
%18 = icmp eq i32 %17, -1
br i1 %18, label %19, label %22
19: ; preds = %13
%20 = load i32, i32* @errno
%21 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %71
22: ; preds = %13
%23 = getelementptr inbounds i8*, i8** %1, i64 2
%24 = load i8*, i8** %23
%25 = load i32, i32* @O_CREAT
%26 = load i32, i32* @O_EXCL
%27 = or i32 %26, %25
%28 = load i32, i32* @O_WRONLY
%29 = or i32 %27, %28
%30 = load i32, i32* @O_TRUNC
%31 = or i32 %29, %30
%32 = tail call i32 (i8*, i32, ...) @open(i8* %24, i32 %31, i32 384)
%33 = icmp eq i32 %32, -1
br i1 %33, label %34, label %37
34: ; preds = %22
%35 = load i32, i32* @errno
%36 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %71
37: ; preds = %22, %44
%38 = call i64 @memset(i8* %4, i32 0, i64 1024)
%39 = inttoptr i64 %38 to i8*
%40 = call i32 @read(i32 %17, i8* %39, i64 1024)
switch i32 %40, label %44 [
i32 0, label %51
i32 -1, label %41
]
41: ; preds = %37
%42 = load i32, i32* @errno
%43 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
br label %71
44: ; preds = %37
%45 = sext i32 %40 to i64
%46 = call i32 @write(i32 %32, i8* %4, i64 %45)
%47 = icmp eq i32 %46, -1
br i1 %47, label %48, label %37
48: ; preds = %44
%49 = load i32, i32* @errno
%50 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
br label %71
51: ; preds = %37
%52 = call i32 @close(i32 %17)
%53 = icmp eq i32 %52, -1
br i1 %53, label %54, label %57
54: ; preds = %51
%55 = load i32, i32* @errno
%56 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
br label %71
57: ; preds = %51
%58 = call i32 @close(i32 %32)
%59 = icmp eq i32 %58, -1
br i1 %59, label %60, label %63
60: ; preds = %57
%61 = load i32, i32* @errno
%62 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
br label %71
63: ; preds = %57
%64 = load i32, i32* @stdout
%65 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%66 = icmp slt i32 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %63
%68 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %71
69: ; preds = %63
%70 = load i32, i32* @EXIT_SUCCESS
br label %71
71: ; preds = %6, %69, %67, %60, %54, %48, %41, %34, %19, %11
%72 = phi i32 [ %9, %11 ], [ %20, %19 ], [ %35, %34 ], [ %42, %41 ], [ %49, %48 ], [ %55, %54 ], [ %61, %60 ], [ %65, %67 ], [ %70, %69 ], [ -1, %6 ]
ret i32 %72
}