#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 /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ SEEK_END;
int STDOUT_FILENO;
scalar_t__ calloc(int, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fork();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ pipe(int *);
int read(int, char *, int);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ wait(int /*<<< orphan*/ *);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char *argv[]) {
  if (argc == 1) {
    fprintf(stderr, "No arguments.\n");
    exit(EXIT_FAILURE);
  }
  FILE *FilePointer = fopen(argv[1], "r");
  if (FilePointer == NULL) {
    fprintf(stderr, "File not exist.\n");
    exit(EXIT_FAILURE);
  }
  int fd[2];
  pipe(fd);
  fseek(FilePointer, 0, SEEK_END);
  int FileLength = ftell(FilePointer);
  rewind(FilePointer);
  int pid = fork();
  if (pid == -1) {
    fprintf(stderr, "Can't create proccess!\n");
    exit(EXIT_FAILURE);
  }
  if (pid == 0) {
    close(fd[0]);
    char *Buffer = (char *)calloc(4096, sizeof(*Buffer));
    int CurrentBuf = 0;
    if (FileLength >= 4096) {
      CurrentBuf = 4096;
      FileLength -= CurrentBuf;
    } else
      CurrentBuf = FileLength;
    while (fread(Buffer, CurrentBuf, 1, FilePointer) > 0) {
      write(fd[1], Buffer, CurrentBuf);
      if (FileLength >= 4096) {
        CurrentBuf = 4096;
        FileLength -= CurrentBuf;
      } else
        CurrentBuf = FileLength;
    }
    close(fd[1]);
    fclose(FilePointer);
    free(Buffer);
    exit(EXIT_SUCCESS);
  } else {
    close(fd[1]);
    int buf = 0;
    char *Buffer = (char *)calloc(4096, sizeof(*Buffer));
    while ((buf = read(fd[0], Buffer, 4096)) > 0) {
      write(STDOUT_FILENO, Buffer, buf);
    }
    wait(NULL);
    close(fd[0]);
    free(Buffer);
  }
  fclose(FilePointer);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1243 <main+0x43>
mov    0x2da9(%rip),%rax
mov    (%rax),%edi
lea    0xdd0(%rip),%rsi
call   10c0 <fprintf@plt>
mov    0x2d8c(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdbd(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1289 <main+0x89>
mov    0x2d63(%rip),%rax
mov    (%rax),%edi
lea    0xd9b(%rip),%rsi
call   10c0 <fprintf@plt>
mov    0x2d46(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
lea    -0x20(%rbp),%rdi
call   1090 <pipe@plt>
mov    -0x18(%rbp),%rdi
mov    0x2d43(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10e0 <fseek@plt>
mov    -0x18(%rbp),%rdi
call   10d0 <ftell@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
call   1070 <rewind@plt>
mov    $0x0,%al
call   1120 <fork@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0xffffffff,-0x28(%rbp)
jne    12f2 <main+0xf2>
mov    0x2cfa(%rip),%rax
mov    (%rax),%edi
lea    0xd43(%rip),%rsi
call   10c0 <fprintf@plt>
mov    0x2cdd(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
cmpl   $0x0,-0x28(%rbp)
jne    13d2 <main+0x1d2>
mov    -0x20(%rbp),%edi
call   1080 <close@plt>
mov    $0x1000,%edi
mov    $0x1,%esi
call   10b0 <calloc@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x1000,-0x24(%rbp)
jl     1342 <main+0x142>
movl   $0x1000,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x24(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x24(%rbp)
jmp    1348 <main+0x148>
mov    -0x24(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    134d <main+0x14d>
mov    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x18(%rbp),%rcx
mov    $0x1,%edx
call   1040 <fread@plt>
cmp    $0x0,%rax
jle    13aa <main+0x1aa>
mov    -0x1c(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   1050 <write@plt>
cmpl   $0x1000,-0x24(%rbp)
jl     139f <main+0x19f>
movl   $0x1000,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x24(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x24(%rbp)
jmp    13a5 <main+0x1a5>
mov    -0x24(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    134d <main+0x14d>
mov    -0x1c(%rbp),%edi
call   1080 <close@plt>
mov    -0x18(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    0x2bf5(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    -0x1c(%rbp),%edi
call   1080 <close@plt>
movl   $0x0,-0x38(%rbp)
mov    $0x1000,%edi
mov    $0x1,%esi
call   10b0 <calloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%edi
mov    -0x40(%rbp),%rsi
mov    $0x1000,%edx
call   10a0 <read@plt>
mov    %eax,-0x38(%rbp)
cmp    $0x0,%eax
jle    142b <main+0x22b>
mov    0x2bd8(%rip),%rax
mov    (%rax),%edi
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%edx
call   1050 <write@plt>
jmp    13f4 <main+0x1f4>
xor    %eax,%eax
mov    %eax,%edi
call   1110 <wait@plt>
mov    -0x20(%rbp),%edi
call   1080 <close@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1060 <fclose@plt>
mov    0x2b6b(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x1,%edi
jne    1222 <main+0x22>
mov    0x2db9(%rip),%rax
mov    (%rax),%edi
lea    0xde0(%rip),%rsi
jmp    129e <main+0x9e>
mov    0x8(%rsi),%rdi
lea    0xde2(%rip),%rsi
call   10f0 <fopen@plt>
test   %rax,%rax
jne    1249 <main+0x49>
mov    0x2d92(%rip),%rax
mov    (%rax),%edi
lea    0xdca(%rip),%rsi
jmp    129e <main+0x9e>
mov    %rax,%r14
mov    %rsp,%rdi
call   1090 <pipe@plt>
mov    0x2d85(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   10e0 <fseek@plt>
mov    %r14,%rdi
call   10d0 <ftell@plt>
mov    %eax,%r15d
mov    %r14,%rdi
call   1070 <rewind@plt>
xor    %eax,%eax
call   1120 <fork@plt>
test   %eax,%eax
je     12b1 <main+0xb1>
cmp    $0xffffffff,%eax
jne    136a <main+0x16a>
mov    0x2d3b(%rip),%rax
mov    (%rax),%edi
lea    0xd84(%rip),%rsi
call   10c0 <fprintf@plt>
mov    0x2d1e(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    (%rsp),%edi
call   1080 <close@plt>
mov    $0x1000,%r12d
mov    $0x1000,%edi
mov    $0x1,%esi
call   10b0 <calloc@plt>
mov    %rax,%r13
cmp    $0x1000,%r15d
mov    %r15d,%ebp
cmovge %r12d,%ebp
mov    %rax,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1040 <fread@plt>
test   %rax,%rax
jle    134f <main+0x14f>
lea    -0x1000(%r15),%ebx
cmp    $0x1000,%r15d
cmovl  %r15d,%ebx
nopl   0x0(%rax,%rax,1)
mov    0x4(%rsp),%edi
mov    %r13,%rsi
mov    %ebp,%edx
call   1050 <write@plt>
lea    -0x1000(%rbx),%r15d
cmp    $0x1000,%ebx
mov    %ebx,%ebp
cmovge %r12d,%ebp
cmovl  %ebx,%r15d
mov    %r13,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1040 <fread@plt>
mov    %r15d,%ebx
test   %rax,%rax
jg     1310 <main+0x110>
mov    0x4(%rsp),%edi
call   1080 <close@plt>
mov    %r14,%rdi
call   1060 <fclose@plt>
mov    %r13,%rdi
call   1030 <free@plt>
jmp    13e0 <main+0x1e0>
mov    0x4(%rsp),%edi
call   1080 <close@plt>
mov    $0x1000,%edi
mov    $0x1,%esi
call   10b0 <calloc@plt>
mov    %rax,%rbx
mov    (%rsp),%edi
mov    %rax,%rsi
mov    $0x1000,%edx
call   10a0 <read@plt>
test   %eax,%eax
jle    13c1 <main+0x1c1>
mov    0x2c50(%rip),%rbp
mov    0x0(%rbp),%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1050 <write@plt>
mov    (%rsp),%edi
mov    %rbx,%rsi
mov    $0x1000,%edx
call   10a0 <read@plt>
test   %eax,%eax
jg     13a0 <main+0x1a0>
xor    %edi,%edi
call   1110 <wait@plt>
mov    (%rsp),%edi
call   1080 <close@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1060 <fclose@plt>
mov    0x2bd9(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"No arguments.\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [17 x i8] c"File not exist.\0A\00"
@SEEK_END = global i32 0
@.str.3 = [24 x i8] c"Can't create proccess!\0A\00"
@EXIT_SUCCESS = global i32 0
@STDOUT_FILENO = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca [2 x i32]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %21
16: ; preds = %2
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%19 = load i32, i32* @EXIT_FAILURE
%20 = call i32 @exit(i32 %19)
unreachable
21: ; preds = %2
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i32* @fopen(i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %25, i32** %6
%26 = load i32*, i32** %6
%27 = icmp eq i32* %26, null
br i1 %27, label %28, label %33
28: ; preds = %21
%29 = load i32, i32* @stderr
%30 = call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%31 = load i32, i32* @EXIT_FAILURE
%32 = call i32 @exit(i32 %31)
unreachable
33: ; preds = %21
%34 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%35 = call i32 @pipe(i32* %34)
%36 = load i32*, i32** %6
%37 = load i32, i32* @SEEK_END
%38 = call i32 @fseek(i32* %36, i32 0, i32 %37)
%39 = load i32*, i32** %6
%40 = call i32 @ftell(i32* %39)
store i32 %40, i32* %8
%41 = load i32*, i32** %6
%42 = call i32 @rewind(i32* %41)
%43 = call i32 (...) @fork()
store i32 %43, i32* %9
%44 = load i32, i32* %9
%45 = icmp eq i32 %44, -1
br i1 %45, label %46, label %51
46: ; preds = %33
%47 = load i32, i32* @stderr
%48 = call i32 @fprintf(i32 %47, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%49 = load i32, i32* @EXIT_FAILURE
%50 = call i32 @exit(i32 %49)
unreachable
51: ; preds = %33
%52 = load i32, i32* %9
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %100
54: ; preds = %51
%55 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%56 = load i32, i32* %55
%57 = call i32 @close(i32 %56)
%58 = call i64 @calloc(i32 4096, i32 1)
%59 = inttoptr i64 %58 to i8*
store i8* %59, i8** %10
store i32 0, i32* %11
%60 = load i32, i32* %8
%61 = icmp sge i32 %60, 4096
br i1 %61, label %62, label %66
62: ; preds = %54
store i32 4096, i32* %11
%63 = load i32, i32* %11
%64 = load i32, i32* %8
%65 = sub nsw i32 %64, %63
store i32 %65, i32* %8
br label %68
66: ; preds = %54
%67 = load i32, i32* %8
store i32 %67, i32* %11
br label %68
68: ; preds = %66, %62
br label %69
69: ; preds = %89, %68
%70 = load i8*, i8** %10
%71 = load i32, i32* %11
%72 = load i32*, i32** %6
%73 = call i64 @fread(i8* %70, i32 %71, i32 1, i32* %72)
%74 = icmp sgt i64 %73, 0
br i1 %74, label %75, label %90
75: ; preds = %69
%76 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%77 = load i32, i32* %76
%78 = load i8*, i8** %10
%79 = load i32, i32* %11
%80 = call i32 @write(i32 %77, i8* %78, i32 %79)
%81 = load i32, i32* %8
%82 = icmp sge i32 %81, 4096
br i1 %82, label %83, label %87
83: ; preds = %75
store i32 4096, i32* %11
%84 = load i32, i32* %11
%85 = load i32, i32* %8
%86 = sub nsw i32 %85, %84
store i32 %86, i32* %8
br label %89
87: ; preds = %75
%88 = load i32, i32* %8
store i32 %88, i32* %11
br label %89
89: ; preds = %87, %83
br label %69
90: ; preds = %69
%91 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%92 = load i32, i32* %91
%93 = call i32 @close(i32 %92)
%94 = load i32*, i32** %6
%95 = call i32 @fclose(i32* %94)
%96 = load i8*, i8** %10
%97 = call i32 @free(i8* %96)
%98 = load i32, i32* @EXIT_SUCCESS
%99 = call i32 @exit(i32 %98)
unreachable
100: ; preds = %51
%101 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%102 = load i32, i32* %101
%103 = call i32 @close(i32 %102)
store i32 0, i32* %12
%104 = call i64 @calloc(i32 4096, i32 1)
%105 = inttoptr i64 %104 to i8*
store i8* %105, i8** %13
br label %106
106: ; preds = %112, %100
%107 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%108 = load i32, i32* %107
%109 = load i8*, i8** %13
%110 = call i32 @read(i32 %108, i8* %109, i32 4096)
store i32 %110, i32* %12
%111 = icmp sgt i32 %110, 0
br i1 %111, label %112, label %117
112: ; preds = %106
%113 = load i32, i32* @STDOUT_FILENO
%114 = load i8*, i8** %13
%115 = load i32, i32* %12
%116 = call i32 @write(i32 %113, i8* %114, i32 %115)
br label %106
117: ; preds = %106
%118 = call i32 @wait(i32* null)
%119 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%120 = load i32, i32* %119
%121 = call i32 @close(i32 %120)
%122 = load i8*, i8** %13
%123 = call i32 @free(i8* %122)
br label %124
124: ; preds = %117
%125 = load i32*, i32** %6
%126 = call i32 @fclose(i32* %125)
%127 = load i32, i32* @EXIT_SUCCESS
%128 = call i32 @exit(i32 %127)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"No arguments.\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [17 x i8] c"File not exist.\0A\00"
@SEEK_END = global i32 0
@.str.3 = [24 x i8] c"Can't create proccess!\0A\00"
@EXIT_SUCCESS = global i32 0
@STDOUT_FILENO = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [2 x i32]
%4 = icmp eq i32 %0, 1
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = tail call i32* @fopen(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %20
15: ; preds = %10
%16 = load i32, i32* @stderr
%17 = tail call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%18 = load i32, i32* @EXIT_FAILURE
%19 = tail call i32 @exit(i32 %18)
unreachable
20: ; preds = %10
%21 = bitcast [2 x i32]* %3 to i8*
%22 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%23 = call i32 @pipe(i32* %22)
%24 = load i32, i32* @SEEK_END
%25 = call i32 @fseek(i32* %13, i32 0, i32 %24)
%26 = call i32 @ftell(i32* %13)
%27 = call i32 @rewind(i32* %13)
%28 = call i32 (...) @fork()
switch i32 %28, label %66 [
i32 -1, label %29
i32 0, label %34
]
29: ; preds = %20
%30 = load i32, i32* @stderr
%31 = call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%32 = load i32, i32* @EXIT_FAILURE
%33 = call i32 @exit(i32 %32)
unreachable
34: ; preds = %20
%35 = load i32, i32* %22
%36 = call i32 @close(i32 %35)
%37 = call i64 @calloc(i32 4096, i32 1)
%38 = inttoptr i64 %37 to i8*
%39 = icmp sgt i32 %26, 4095
%40 = select i1 %39, i32 4096, i32 %26
%41 = call i64 @fread(i8* %38, i32 %40, i32 1, i32* %13)
%42 = icmp sgt i64 %41, 0
br i1 %42, label %43, label %58
43: ; preds = %34
%44 = add nsw i32 %26, -4096
%45 = select i1 %39, i32 %44, i32 %26
%46 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
br label %47
47: ; preds = %43, %47
%48 = phi i32 [ %45, %43 ], [ %55, %47 ]
%49 = phi i32 [ %40, %43 ], [ %54, %47 ]
%50 = load i32, i32* %46
%51 = call i32 @write(i32 %50, i8* %38, i32 %49)
%52 = icmp sgt i32 %48, 4095
%53 = add nsw i32 %48, -4096
%54 = select i1 %52, i32 4096, i32 %48
%55 = select i1 %52, i32 %53, i32 %48
%56 = call i64 @fread(i8* %38, i32 %54, i32 1, i32* %13)
%57 = icmp sgt i64 %56, 0
br i1 %57, label %47, label %58
58: ; preds = %47, %34
%59 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%60 = load i32, i32* %59
%61 = call i32 @close(i32 %60)
%62 = call i32 @fclose(i32* %13)
%63 = call i32 @free(i8* %38)
%64 = load i32, i32* @EXIT_SUCCESS
%65 = call i32 @exit(i32 %64)
unreachable
66: ; preds = %20
%67 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%68 = load i32, i32* %67
%69 = call i32 @close(i32 %68)
%70 = call i64 @calloc(i32 4096, i32 1)
%71 = inttoptr i64 %70 to i8*
%72 = load i32, i32* %22
%73 = call i32 @read(i32 %72, i8* %71, i32 4096)
%74 = icmp sgt i32 %73, 0
br i1 %74, label %75, label %82
75: ; preds = %66, %75
%76 = phi i32 [ %80, %75 ], [ %73, %66 ]
%77 = load i32, i32* @STDOUT_FILENO
%78 = call i32 @write(i32 %77, i8* %71, i32 %76)
%79 = load i32, i32* %22
%80 = call i32 @read(i32 %79, i8* %71, i32 4096)
%81 = icmp sgt i32 %80, 0
br i1 %81, label %75, label %82
82: ; preds = %75, %66
%83 = call i32 @wait(i32* null)
%84 = load i32, i32* %22
%85 = call i32 @close(i32 %84)
%86 = call i32 @free(i8* %71)
%87 = call i32 @fclose(i32* %13)
%88 = load i32, i32* @EXIT_SUCCESS
%89 = call i32 @exit(i32 %88)
unreachable
}