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

/* Variables and functions */
scalar_t__ EINVAL;
scalar_t__ EOVERFLOW;
scalar_t__ errno;
scalar_t__ eslib_file_read_full(char *, char *, size_t, size_t *);
int /*<<< orphan*/ free(char *);
char *malloc(size_t);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ system(char *);
int test_file_read() {
  char *full;
  char buf[16];
  size_t flen;
  system("echo '123456789' > ./testfile");
  if (eslib_file_read_full("./testfile", buf, sizeof(buf) - 1, &flen))
    goto failure;
  buf[flen] = '\0';
  printf("file contents = {%s}\n", buf);
  if (eslib_file_read_full("./testfile", buf, 10, &flen))
    goto failure;
  if (eslib_file_read_full("./testfile", buf, 9, &flen)) {
    if (errno != EOVERFLOW || flen != 10)
      goto failure;
  }
  if (eslib_file_read_full("./testfile", buf, 0, &flen)) {
    if (errno != EINVAL || flen != 0)
      goto failure;
  }
  system("rm ./testfile");
  system("touch ./testfile");
  if (eslib_file_read_full("./testfile", buf, 1, &flen))
    goto failure;
  if (flen != 0)
    goto failure;
  if (eslib_file_read_full("./testfile", buf, sizeof(buf), &flen))
    goto failure;
  if (flen != 0)
    goto failure;
  if (eslib_file_read_full("/proc/self/maps", buf, 10, &flen) == 0) {
    goto failure;
  }
  if (errno != EOVERFLOW) {
    printf("*NOTE* procfs might have gained support for SEEK_END\n");
    goto failure;
  }
  full = malloc(flen + 1);
  if (full == NULL)
    goto failure;
  if (eslib_file_read_full("/proc/self/maps", full, flen + 1, &flen)) {
    goto failure;
  }
  printf("%s\n", full);
  free(full);
  return 0;
failure:
  printf("read failed in an unexpected way\n");
  return -1;
}


x86 assembly (clang, -O0):
<test_file_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xea1(%rip),%rdi
call   1040 <system@plt>
lea    -0x20(%rbp),%rsi
lea    0xea4(%rip),%rdi
mov    $0xf,%edx
lea    -0x28(%rbp),%rcx
call   1060 <eslib_file_read_full@plt>
cmp    $0x0,%rax
je     118c <test_file_read+0x3c>
jmp    13c2 <test_file_read+0x272>
mov    -0x28(%rbp),%rax
movb   $0x0,-0x20(%rbp,%rax,1)
lea    -0x20(%rbp),%rsi
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xe61(%rip),%rdi
mov    $0xa,%edx
lea    -0x28(%rbp),%rcx
call   1060 <eslib_file_read_full@plt>
cmp    $0x0,%rax
je     11cf <test_file_read+0x7f>
jmp    13c2 <test_file_read+0x272>
lea    -0x20(%rbp),%rsi
lea    0xe39(%rip),%rdi
mov    $0x9,%edx
lea    -0x28(%rbp),%rcx
call   1060 <eslib_file_read_full@plt>
cmp    $0x0,%rax
je     1221 <test_file_read+0xd1>
mov    0x2ddf(%rip),%rax
mov    (%rax),%rax
mov    0x2ded(%rip),%rcx
cmp    (%rcx),%rax
jne    1217 <test_file_read+0xc7>
cmpq   $0xa,-0x28(%rbp)
je     121c <test_file_read+0xcc>
jmp    13c2 <test_file_read+0x272>
jmp    1221 <test_file_read+0xd1>
lea    -0x20(%rbp),%rsi
lea    0xde7(%rip),%rdi
xor    %eax,%eax
mov    %eax,%edx
lea    -0x28(%rbp),%rcx
call   1060 <eslib_file_read_full@plt>
cmp    $0x0,%rax
je     1272 <test_file_read+0x122>
mov    0x2d8e(%rip),%rax
mov    (%rax),%rax
mov    0x2d7c(%rip),%rcx
cmp    (%rcx),%rax
jne    1268 <test_file_read+0x118>
cmpq   $0x0,-0x28(%rbp)
je     126d <test_file_read+0x11d>
jmp    13c2 <test_file_read+0x272>
jmp    1272 <test_file_read+0x122>
lea    0xdbb(%rip),%rdi
call   1040 <system@plt>
lea    0xdbd(%rip),%rdi
call   1040 <system@plt>
lea    -0x20(%rbp),%rsi
lea    0xd7e(%rip),%rdi
mov    $0x1,%edx
lea    -0x28(%rbp),%rcx
call   1060 <eslib_file_read_full@plt>
cmp    $0x0,%rax
je     12b2 <test_file_read+0x162>
jmp    13c2 <test_file_read+0x272>
cmpq   $0x0,-0x28(%rbp)
je     12c2 <test_file_read+0x172>
jmp    13c2 <test_file_read+0x272>
lea    -0x20(%rbp),%rsi
lea    0xd46(%rip),%rdi
mov    $0x10,%edx
lea    -0x28(%rbp),%rcx
call   1060 <eslib_file_read_full@plt>
cmp    $0x0,%rax
je     12ea <test_file_read+0x19a>
jmp    13c2 <test_file_read+0x272>
cmpq   $0x0,-0x28(%rbp)
je     12fa <test_file_read+0x1aa>
jmp    13c2 <test_file_read+0x272>
lea    -0x20(%rbp),%rsi
lea    0xd4e(%rip),%rdi
mov    $0xa,%edx
lea    -0x28(%rbp),%rcx
call   1060 <eslib_file_read_full@plt>
cmp    $0x0,%rax
jne    1322 <test_file_read+0x1d2>
jmp    13c2 <test_file_read+0x272>
mov    0x2caf(%rip),%rax
mov    (%rax),%rax
mov    0x2cbd(%rip),%rcx
cmp    (%rcx),%rax
je     134f <test_file_read+0x1ff>
lea    0xd20(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13c2 <test_file_read+0x272>
mov    -0x28(%rbp),%rdi
add    $0x1,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1370 <test_file_read+0x220>
jmp    13c2 <test_file_read+0x272>
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
add    $0x1,%rdx
lea    0xcd0(%rip),%rdi
lea    -0x28(%rbp),%rcx
call   1060 <eslib_file_read_full@plt>
cmp    $0x0,%rax
je     139b <test_file_read+0x24b>
jmp    13c2 <test_file_read+0x272>
mov    -0x10(%rbp),%rsi
lea    0xcf3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
jmp    13d7 <test_file_read+0x287>
lea    0xcd4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_file_read>:
push   %r14
push   %rbx
sub    $0x28,%rsp
lea    0xe92(%rip),%rdi
call   1050 <system@plt>
lea    0xe99(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rcx
mov    $0xf,%edx
call   1070 <eslib_file_read_full@plt>
test   %rax,%rax
jne    11d1 <test_file_read+0x71>
mov    0x8(%rsp),%rax
movb   $0x0,0x10(%rsp,%rax,1)
lea    0xe7a(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe59(%rip),%rdi
lea    0x8(%rsp),%rcx
mov    $0xa,%edx
mov    %rbx,%rsi
call   1070 <eslib_file_read_full@plt>
test   %rax,%rax
je     11ea <test_file_read+0x8a>
lea    0xe8b(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe22(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rcx
mov    $0x9,%edx
call   1070 <eslib_file_read_full@plt>
test   %rax,%rax
je     1228 <test_file_read+0xc8>
mov    0x2dc7(%rip),%rax
mov    (%rax),%rax
mov    0x2dd5(%rip),%rcx
cmp    (%rcx),%rax
jne    11d1 <test_file_read+0x71>
cmpq   $0xa,0x8(%rsp)
jne    11d1 <test_file_read+0x71>
lea    0xde4(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rcx
xor    %edx,%edx
call   1070 <eslib_file_read_full@plt>
test   %rax,%rax
je     126b <test_file_read+0x10b>
mov    0x2d8c(%rip),%rax
mov    (%rax),%rax
mov    0x2d7a(%rip),%rcx
cmp    (%rcx),%rax
jne    11d1 <test_file_read+0x71>
cmpq   $0x0,0x8(%rsp)
jne    11d1 <test_file_read+0x71>
lea    0xdc2(%rip),%rdi
call   1050 <system@plt>
lea    0xdc4(%rip),%rdi
call   1050 <system@plt>
lea    0xd89(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rcx
mov    $0x1,%edx
call   1070 <eslib_file_read_full@plt>
or     0x8(%rsp),%rax
jne    11d1 <test_file_read+0x71>
lea    0xd63(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rcx
mov    $0x10,%edx
call   1070 <eslib_file_read_full@plt>
or     0x8(%rsp),%rax
jne    11d1 <test_file_read+0x71>
lea    0xd7d(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rcx
mov    $0xa,%edx
call   1070 <eslib_file_read_full@plt>
test   %rax,%rax
je     11d1 <test_file_read+0x71>
mov    0x2cde(%rip),%rax
mov    (%rax),%rax
mov    0x2cec(%rip),%rcx
cmp    (%rcx),%rax
jne    135d <test_file_read+0x1fd>
mov    0x8(%rsp),%rbx
add    $0x1,%rbx
mov    %rbx,%rdi
call   1080 <malloc@plt>
test   %rax,%rax
je     11d1 <test_file_read+0x71>
mov    %rax,%r14
lea    0xd26(%rip),%rdi
lea    0x8(%rsp),%rcx
mov    %rax,%rsi
mov    %rbx,%rdx
call   1070 <eslib_file_read_full@plt>
test   %rax,%rax
jne    11d1 <test_file_read+0x71>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
jmp    11e2 <test_file_read+0x82>
lea    0xd20(%rip),%rdi
call   1040 <puts@plt>
jmp    11d1 <test_file_read+0x71>

LLVM IR (-O0):
@.str = [30 x i8] c"echo '123456789' > ./testfile\00"
@.str.1 = [11 x i8] c"./testfile\00"
@.str.2 = [22 x i8] c"file contents = {%s}\0A\00"
@errno = global i64 0
@EOVERFLOW = global i64 0
@EINVAL = global i64 0
@.str.3 = [14 x i8] c"rm ./testfile\00"
@.str.4 = [17 x i8] c"touch ./testfile\00"
@.str.5 = [16 x i8] c"/proc/self/maps\00"
@.str.6 = [54 x i8] c"*NOTE* procfs might have gained support for SEEK_END\0A\00"
@.str.7 = [4 x i8] c"%s\0A\00"
@.str.8 = [34 x i8] c"read failed in an unexpected way\0A\00"
define i32 @test_file_read() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca [16 x i8]
%4 = alloca i64
%5 = call i32 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%7 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %6, i64 15, i64* %4)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %0
br label %95
10: ; preds = %0
%11 = load i64, i64* %4
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 %11
store i8 0, i8* %12
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %13)
%15 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%16 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %15, i64 10, i64* %4)
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %10
br label %95
19: ; preds = %10
%20 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%21 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %20, i64 9, i64* %4)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %32
23: ; preds = %19
%24 = load i64, i64* @errno
%25 = load i64, i64* @EOVERFLOW
%26 = icmp ne i64 %24, %25
br i1 %26, label %30, label %27
27: ; preds = %23
%28 = load i64, i64* %4
%29 = icmp ne i64 %28, 10
br i1 %29, label %30, label %31
30: ; preds = %27, %23
br label %95
31: ; preds = %27
br label %32
32: ; preds = %31, %19
%33 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%34 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %33, i64 0, i64* %4)
%35 = icmp ne i64 %34, 0
br i1 %35, label %36, label %45
36: ; preds = %32
%37 = load i64, i64* @errno
%38 = load i64, i64* @EINVAL
%39 = icmp ne i64 %37, %38
br i1 %39, label %43, label %40
40: ; preds = %36
%41 = load i64, i64* %4
%42 = icmp ne i64 %41, 0
br i1 %42, label %43, label %44
43: ; preds = %40, %36
br label %95
44: ; preds = %40
br label %45
45: ; preds = %44, %32
%46 = call i32 @system(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%47 = call i32 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%48 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%49 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %48, i64 1, i64* %4)
%50 = icmp ne i64 %49, 0
br i1 %50, label %51, label %52
51: ; preds = %45
br label %95
52: ; preds = %45
%53 = load i64, i64* %4
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %56
55: ; preds = %52
br label %95
56: ; preds = %52
%57 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%58 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %57, i64 16, i64* %4)
%59 = icmp ne i64 %58, 0
br i1 %59, label %60, label %61
60: ; preds = %56
br label %95
61: ; preds = %56
%62 = load i64, i64* %4
%63 = icmp ne i64 %62, 0
br i1 %63, label %64, label %65
64: ; preds = %61
br label %95
65: ; preds = %61
%66 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%67 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* %66, i64 10, i64* %4)
%68 = icmp eq i64 %67, 0
br i1 %68, label %69, label %70
69: ; preds = %65
br label %95
70: ; preds = %65
%71 = load i64, i64* @errno
%72 = load i64, i64* @EOVERFLOW
%73 = icmp ne i64 %71, %72
br i1 %73, label %74, label %76
74: ; preds = %70
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.6, i64 0, i64 0))
br label %95
76: ; preds = %70
%77 = load i64, i64* %4
%78 = add i64 %77, 1
%79 = call i8* @malloc(i64 %78)
store i8* %79, i8** %2
%80 = load i8*, i8** %2
%81 = icmp eq i8* %80, null
br i1 %81, label %82, label %83
82: ; preds = %76
br label %95
83: ; preds = %76
%84 = load i8*, i8** %2
%85 = load i64, i64* %4
%86 = add i64 %85, 1
%87 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* %84, i64 %86, i64* %4)
%88 = icmp ne i64 %87, 0
br i1 %88, label %89, label %90
89: ; preds = %83
br label %95
90: ; preds = %83
%91 = load i8*, i8** %2
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %91)
%93 = load i8*, i8** %2
%94 = call i32 @free(i8* %93)
store i32 0, i32* %1
br label %97
95: ; preds = %89, %82, %74, %69, %64, %60, %55, %51, %43, %30, %18, %9
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
store i32 -1, i32* %1
br label %97
97: ; preds = %95, %90
%98 = load i32, i32* %1
ret i32 %98
}

LLVM IR (-O2):
@.str = [30 x i8] c"echo '123456789' > ./testfile\00"
@.str.1 = [11 x i8] c"./testfile\00"
@.str.2 = [22 x i8] c"file contents = {%s}\0A\00"
@errno = global i64 0
@EOVERFLOW = global i64 0
@EINVAL = global i64 0
@.str.3 = [14 x i8] c"rm ./testfile\00"
@.str.4 = [17 x i8] c"touch ./testfile\00"
@.str.5 = [16 x i8] c"/proc/self/maps\00"
@str = [33 x i8] c"read failed in an unexpected way\00"
@str.9 = [53 x i8] c"*NOTE* procfs might have gained support for SEEK_END\00"
define i32 @test_file_read() {
%1 = alloca [16 x i8]
%2 = alloca i64
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%4 = bitcast i64* %2 to i8*
%5 = tail call i32 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %3, i64 15, i64* %2)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %68
8: ; preds = %0
%9 = load i64, i64* %2
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 %9
store i8 0, i8* %10
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%12 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %3, i64 10, i64* %2)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %68
14: ; preds = %8
%15 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %3, i64 9, i64* %2)
%16 = icmp eq i64 %15, 0
br i1 %16, label %24, label %17
17: ; preds = %14
%18 = load i64, i64* @errno
%19 = load i64, i64* @EOVERFLOW
%20 = icmp ne i64 %18, %19
%21 = load i64, i64* %2
%22 = icmp ne i64 %21, 10
%23 = select i1 %20, i1 true, i1 %22
br i1 %23, label %68, label %24
24: ; preds = %17, %14
%25 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %3, i64 0, i64* %2)
%26 = icmp eq i64 %25, 0
br i1 %26, label %34, label %27
27: ; preds = %24
%28 = load i64, i64* @errno
%29 = load i64, i64* @EINVAL
%30 = icmp ne i64 %28, %29
%31 = load i64, i64* %2
%32 = icmp ne i64 %31, 0
%33 = select i1 %30, i1 true, i1 %32
br i1 %33, label %68, label %34
34: ; preds = %27, %24
%35 = call i32 @system(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%36 = call i32 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%37 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %3, i64 1, i64* %2)
%38 = icmp ne i64 %37, 0
%39 = load i64, i64* %2
%40 = icmp ne i64 %39, 0
%41 = select i1 %38, i1 true, i1 %40
br i1 %41, label %68, label %42
42: ; preds = %34
%43 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %3, i64 16, i64* %2)
%44 = icmp ne i64 %43, 0
%45 = load i64, i64* %2
%46 = icmp ne i64 %45, 0
%47 = select i1 %44, i1 true, i1 %46
br i1 %47, label %68, label %48
48: ; preds = %42
%49 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* %3, i64 10, i64* %2)
%50 = icmp eq i64 %49, 0
br i1 %50, label %68, label %51
51: ; preds = %48
%52 = load i64, i64* @errno
%53 = load i64, i64* @EOVERFLOW
%54 = icmp eq i64 %52, %53
br i1 %54, label %57, label %55
55: ; preds = %51
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.9, i64 0, i64 0))
br label %68
57: ; preds = %51
%58 = load i64, i64* %2
%59 = add i64 %58, 1
%60 = call i8* @malloc(i64 %59)
%61 = icmp eq i8* %60, null
br i1 %61, label %68, label %62
62: ; preds = %57
%63 = call i64 @eslib_file_read_full(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* %60, i64 %59, i64* %2)
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %68
65: ; preds = %62
%66 = call i32 @puts(i8* %60)
%67 = call i32 @free(i8* %60)
br label %70
68: ; preds = %62, %57, %48, %42, %34, %27, %17, %8, %0, %55
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
br label %70
70: ; preds = %68, %65
%71 = phi i32 [ -1, %68 ], [ 0, %65 ]
ret i32 %71
}