#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*/ SEEK_SET;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int fread(unsigned char *, int, int, int /*<<< orphan*/ *);
scalar_t__ fseek(int /*<<< orphan*/ *, unsigned long, int /*<<< orphan*/);
int fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int collect_crypto_bytes(const char *in_file, const char *section_name,
                         unsigned long offset, unsigned long size,
                         const char *out_file) {
  FILE *in_fp = NULL;
  FILE *out_fp = NULL;
  unsigned int i = 0;
  unsigned char data = 0;
  if (!in_file || !section_name || !offset || !size || !out_file) {
    printf("collect_crypto_bytes : Invalid arguments");
    return -1;
  }
  printf("Section : %s\n", section_name);
  in_fp = fopen(in_file, "r");
  if (!in_fp) {
    printf("Unable to open file : %s", in_file);
    return -1;
  }
  if (fseek(in_fp, offset, SEEK_SET) != 0) {
    printf("Unable to seek file : %s", in_file);
    fclose(in_fp);
    return -1;
  }
  out_fp = fopen(out_file, "ab");
  if (!out_fp) {
    printf("Unable to open file : %s", out_file);
    fclose(in_fp);
    return -1;
  }
  for (i = 1; i <= size; i++) {
    if (1 != fread(&data, sizeof(unsigned char), 1, in_fp)) {
      printf("Unable to read 1 byte from  file : %s", in_file);
      fclose(in_fp);
      fclose(out_fp);
      return -1;
    }
    printf("%02x ", data);
    if (1 != fwrite(&data, 1, 1, out_fp)) {
      printf("Unable to write 1 byte to file : %s", out_file);
      fclose(in_fp);
      fclose(out_fp);
      return -1;
    }
    if (!(i % 16))
      printf("\n");
  }
  fclose(in_fp);
  fclose(out_fp);
  return 0;
}


x86 assembly (clang, -O0):
<collect_crypto_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movb   $0x0,-0x45(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     11ce <collect_crypto_bytes+0x6e>
cmpq   $0x0,-0x18(%rbp)
je     11ce <collect_crypto_bytes+0x6e>
cmpq   $0x0,-0x20(%rbp)
je     11ce <collect_crypto_bytes+0x6e>
cmpq   $0x0,-0x28(%rbp)
je     11ce <collect_crypto_bytes+0x6e>
cmpq   $0x0,-0x30(%rbp)
jne    11e8 <collect_crypto_bytes+0x88>
lea    0xe2b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13d9 <collect_crypto_bytes+0x279>
mov    -0x18(%rbp),%rsi
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
lea    0xe32(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1237 <collect_crypto_bytes+0xd7>
mov    -0x10(%rbp),%rsi
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13d9 <collect_crypto_bytes+0x279>
mov    -0x38(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    0x2d9a(%rip),%rax
mov    (%rax),%edx
call   1060 <fseek@plt>
cmp    $0x0,%rax
je     127e <collect_crypto_bytes+0x11e>
mov    -0x10(%rbp),%rsi
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13d9 <collect_crypto_bytes+0x279>
mov    -0x30(%rbp),%rdi
lea    0xde2(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    12c4 <collect_crypto_bytes+0x164>
mov    -0x30(%rbp),%rsi
lea    0xd91(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13d9 <collect_crypto_bytes+0x279>
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x28(%rbp),%rax
ja     13c0 <collect_crypto_bytes+0x260>
mov    -0x38(%rbp),%rcx
lea    -0x45(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
je     132b <collect_crypto_bytes+0x1cb>
mov    -0x10(%rbp),%rsi
lea    0xd68(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x40(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13d9 <collect_crypto_bytes+0x279>
movzbl -0x45(%rbp),%esi
lea    0xd5e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x40(%rbp),%rcx
lea    -0x45(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1080 <fwrite@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
je     1390 <collect_crypto_bytes+0x230>
mov    -0x30(%rbp),%rsi
lea    0xd2f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x40(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13d9 <collect_crypto_bytes+0x279>
mov    -0x44(%rbp),%eax
and    $0xf,%eax
cmp    $0x0,%eax
jne    13ad <collect_crypto_bytes+0x24d>
lea    0xc8f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13b2 <collect_crypto_bytes+0x252>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12cb <collect_crypto_bytes+0x16b>
mov    -0x38(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x40(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<collect_crypto_bytes>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movb   $0x0,0xf(%rsp)
test   %rdi,%rdi
je     1201 <collect_crypto_bytes+0x91>
test   %rsi,%rsi
je     1201 <collect_crypto_bytes+0x91>
mov    %rdx,%rbp
test   %rdx,%rdx
je     1201 <collect_crypto_bytes+0x91>
mov    %rcx,%r12
test   %rcx,%rcx
je     1201 <collect_crypto_bytes+0x91>
mov    %r8,%r14
test   %r8,%r8
je     1201 <collect_crypto_bytes+0x91>
mov    %rdi,%rbx
lea    0xe7a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe7a(%rip),%rsi
mov    %rbx,%rdi
call   1080 <fopen@plt>
test   %rax,%rax
je     1211 <collect_crypto_bytes+0xa1>
mov    %rax,%r15
mov    0x2e0c(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    %rbp,%rsi
call   1070 <fseek@plt>
test   %rax,%rax
je     1236 <collect_crypto_bytes+0xc6>
lea    0xe65(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1050 <fclose@plt>
jmp    1222 <collect_crypto_bytes+0xb2>
lea    0xdf8(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1222 <collect_crypto_bytes+0xb2>
lea    0xe21(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xffffffff,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe2e(%rip),%rsi
mov    %r14,%rdi
call   1080 <fopen@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     12c9 <collect_crypto_bytes+0x159>
mov    $0x2,%r13d
lea    0xf(%rsp),%rbp
jmp    126c <collect_crypto_bytes+0xfc>
nopl   0x0(%rax)
mov    %r13d,%eax
add    $0x1,%r13d
cmp    %r12,%rax
ja     12d8 <collect_crypto_bytes+0x168>
mov    %rbp,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1040 <fread@plt>
cmp    $0x1,%eax
jne    12f1 <collect_crypto_bytes+0x181>
movzbl 0xf(%rsp),%esi
lea    0xe02(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    0x10(%rsp),%rcx
call   1090 <fwrite@plt>
cmp    $0x1,%eax
jne    12fd <collect_crypto_bytes+0x18d>
lea    -0x1(%r13),%eax
test   $0xf,%al
jne    1260 <collect_crypto_bytes+0xf0>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1260 <collect_crypto_bytes+0xf0>
lea    0xd69(%rip),%rdi
mov    %r14,%rsi
jmp    11f0 <collect_crypto_bytes+0x80>
mov    %r15,%rdi
call   1050 <fclose@plt>
mov    0x10(%rsp),%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
jmp    1227 <collect_crypto_bytes+0xb7>
lea    0xd76(%rip),%rdi
mov    %rbx,%rsi
jmp    1307 <collect_crypto_bytes+0x197>
lea    0xd96(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1050 <fclose@plt>
mov    0x10(%rsp),%rdi
jmp    11fa <collect_crypto_bytes+0x8a>

LLVM IR (-O0):
@.str = [41 x i8] c"collect_crypto_bytes : Invalid arguments\00"
@.str.1 = [14 x i8] c"Section : %s\0A\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [25 x i8] c"Unable to open file : %s\00"
@SEEK_SET = global i32 0
@.str.4 = [25 x i8] c"Unable to seek file : %s\00"
@.str.5 = [3 x i8] c"ab\00"
@.str.6 = [38 x i8] c"Unable to read 1 byte from file : %s\00"
@.str.7 = [6 x i8] c"%02x \00"
@.str.8 = [36 x i8] c"Unable to write 1 byte to file : %s\00"
@.str.9 = [2 x i8] c"\0A\00"
define i32 @collect_crypto_bytes(i8* %0, i8* %1, i64 %2, i64 %3, i8* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i8
store i8* %0, i8** %7
store i8* %1, i8** %8
store i64 %2, i64* %9
store i64 %3, i64* %10
store i8* %4, i8** %11
store i32* null, i32** %12
store i32* null, i32** %13
store i32 0, i32* %14
store i8 0, i8* %15
%16 = load i8*, i8** %7
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %30
18: ; preds = %5
%19 = load i8*, i8** %8
%20 = icmp ne i8* %19, null
br i1 %20, label %21, label %30
21: ; preds = %18
%22 = load i64, i64* %9
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %30
24: ; preds = %21
%25 = load i64, i64* %10
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = load i8*, i8** %11
%29 = icmp ne i8* %28, null
br i1 %29, label %32, label %30
30: ; preds = %27, %24, %21, %18, %5
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %6
br label %109
32: ; preds = %27
%33 = load i8*, i8** %8
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %33)
%35 = load i8*, i8** %7
%36 = call i32* @fopen(i8* %35, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %36, i32** %12
%37 = load i32*, i32** %12
%38 = icmp ne i32* %37, null
br i1 %38, label %42, label %39
39: ; preds = %32
%40 = load i8*, i8** %7
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* %40)
store i32 -1, i32* %6
br label %109
42: ; preds = %32
%43 = load i32*, i32** %12
%44 = load i64, i64* %9
%45 = load i32, i32* @SEEK_SET
%46 = call i64 @fseek(i32* %43, i64 %44, i32 %45)
%47 = icmp ne i64 %46, 0
br i1 %47, label %48, label %53
48: ; preds = %42
%49 = load i8*, i8** %7
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %49)
%51 = load i32*, i32** %12
%52 = call i32 @fclose(i32* %51)
store i32 -1, i32* %6
br label %109
53: ; preds = %42
%54 = load i8*, i8** %11
%55 = call i32* @fopen(i8* %54, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i32* %55, i32** %13
%56 = load i32*, i32** %13
%57 = icmp ne i32* %56, null
br i1 %57, label %63, label %58
58: ; preds = %53
%59 = load i8*, i8** %11
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* %59)
%61 = load i32*, i32** %12
%62 = call i32 @fclose(i32* %61)
store i32 -1, i32* %6
br label %109
63: ; preds = %53
store i32 1, i32* %14
br label %64
64: ; preds = %101, %63
%65 = load i32, i32* %14
%66 = zext i32 %65 to i64
%67 = load i64, i64* %10
%68 = icmp ule i64 %66, %67
br i1 %68, label %69, label %104
69: ; preds = %64
%70 = load i32*, i32** %12
%71 = call i32 @fread(i8* %15, i32 1, i32 1, i32* %70)
%72 = icmp ne i32 1, %71
br i1 %72, label %73, label %80
73: ; preds = %69
%74 = load i8*, i8** %7
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i8* %74)
%76 = load i32*, i32** %12
%77 = call i32 @fclose(i32* %76)
%78 = load i32*, i32** %13
%79 = call i32 @fclose(i32* %78)
store i32 -1, i32* %6
br label %109
80: ; preds = %69
%81 = load i8, i8* %15
%82 = zext i8 %81 to i32
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 %82)
%84 = load i32*, i32** %13
%85 = call i32 @fwrite(i8* %15, i32 1, i32 1, i32* %84)
%86 = icmp ne i32 1, %85
br i1 %86, label %87, label %94
87: ; preds = %80
%88 = load i8*, i8** %11
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0), i8* %88)
%90 = load i32*, i32** %12
%91 = call i32 @fclose(i32* %90)
%92 = load i32*, i32** %13
%93 = call i32 @fclose(i32* %92)
store i32 -1, i32* %6
br label %109
94: ; preds = %80
%95 = load i32, i32* %14
%96 = urem i32 %95, 16
%97 = icmp ne i32 %96, 0
br i1 %97, label %100, label %98
98: ; preds = %94
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %100
100: ; preds = %98, %94
br label %101
101: ; preds = %100
%102 = load i32, i32* %14
%103 = add i32 %102, 1
store i32 %103, i32* %14
br label %64
104: ; preds = %64
%105 = load i32*, i32** %12
%106 = call i32 @fclose(i32* %105)
%107 = load i32*, i32** %13
%108 = call i32 @fclose(i32* %107)
store i32 0, i32* %6
br label %109
109: ; preds = %104, %87, %73, %58, %48, %39, %30
%110 = load i32, i32* %6
ret i32 %110
}

LLVM IR (-O2):
@.str = [41 x i8] c"collect_crypto_bytes : Invalid arguments\00"
@.str.1 = [14 x i8] c"Section : %s\0A\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [25 x i8] c"Unable to open file : %s\00"
@SEEK_SET = global i32 0
@.str.4 = [25 x i8] c"Unable to seek file : %s\00"
@.str.5 = [3 x i8] c"ab\00"
@.str.6 = [38 x i8] c"Unable to read 1 byte from file : %s\00"
@.str.7 = [6 x i8] c"%02x \00"
@.str.8 = [36 x i8] c"Unable to write 1 byte to file : %s\00"
define i32 @collect_crypto_bytes(i8* %0, i8* %1, i64 %2, i64 %3, i8* %4) {
%6 = alloca i8
store i8 0, i8* %6
%7 = icmp ne i8* %0, null
%8 = icmp ne i8* %1, null
%9 = and i1 %7, %8
%10 = icmp ne i64 %2, 0
%11 = and i1 %9, %10
%12 = icmp ne i64 %3, 0
%13 = and i1 %11, %12
%14 = icmp ne i8* %4, null
%15 = and i1 %13, %14
br i1 %15, label %18, label %16
16: ; preds = %5
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
br label %67
18: ; preds = %5
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%20 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp eq i32* %20, null
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* %0)
br label %67
24: ; preds = %18
%25 = load i32, i32* @SEEK_SET
%26 = tail call i64 @fseek(i32* %20, i64 %2, i32 %25)
%27 = icmp eq i64 %26, 0
br i1 %27, label %31, label %28
28: ; preds = %24
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%30 = tail call i32 @fclose(i32* %20)
br label %67
31: ; preds = %24
%32 = tail call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%33 = icmp eq i32* %32, null
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* %4)
%36 = tail call i32 @fclose(i32* %20)
br label %67
37: ; preds = %31, %60
%38 = phi i32 [ %61, %60 ], [ 1, %31 ]
%39 = call i32 @fread(i8* %6, i32 1, i32 1, i32* %20)
%40 = icmp eq i32 %39, 1
br i1 %40, label %45, label %41
41: ; preds = %37
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i8* %0)
%43 = tail call i32 @fclose(i32* %20)
%44 = tail call i32 @fclose(i32* %32)
br label %67
45: ; preds = %37
%46 = load i8, i8* %6
%47 = zext i8 %46 to i32
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 %47)
%49 = call i32 @fwrite(i8* %6, i32 1, i32 1, i32* %32)
%50 = icmp eq i32 %49, 1
br i1 %50, label %55, label %51
51: ; preds = %45
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0), i8* %4)
%53 = tail call i32 @fclose(i32* %20)
%54 = tail call i32 @fclose(i32* %32)
br label %67
55: ; preds = %45
%56 = and i32 %38, 15
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = tail call i32 @putchar(i32 10)
br label %60
60: ; preds = %55, %58
%61 = add i32 %38, 1
%62 = zext i32 %61 to i64
%63 = icmp ugt i64 %62, %3
br i1 %63, label %64, label %37
64: ; preds = %60
%65 = tail call i32 @fclose(i32* %20)
%66 = tail call i32 @fclose(i32* %32)
br label %67
67: ; preds = %64, %51, %41, %34, %28, %22, %16
%68 = phi i32 [ -1, %28 ], [ -1, %41 ], [ -1, %51 ], [ 0, %64 ], [ -1, %34 ], [ -1, %22 ], [ -1, %16 ]
ret i32 %68
}