#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_CUR;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int fread(char *, int, int, int /*<<< orphan*/ *);
scalar_t__ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int wfh_readint(int /*<<< orphan*/ *, int);
int wfh_getlength(const char *filename) {
  FILE *file1 = NULL;
  int ret = -1;
  char com1[100];
  int s;
  file1 = fopen(filename, "rb");
  if (!file1) {
    return ret;
  }
  if (fread(com1, 1, 4, file1) != 4) {
    fclose(file1);
    return ret;
  }
  if (com1[0] != 'R' || com1[1] != 'I' || com1[2] != 'F' || com1[3] != 'F') {
    fclose(file1);
    return ret;
  }
  if (fseek(file1, 4, SEEK_CUR) != 0) {
    fclose(file1);
    return ret;
  }
  if (fread(com1, 1, 4, file1) != 4) {
    fclose(file1);
    return ret;
  }
  if (com1[0] != 'W' || com1[1] != 'A' || com1[2] != 'V' || com1[3] != 'E') {
    fclose(file1);
    return ret;
  }
  if (fread(com1, 1, 4, file1) != 4) {
    fclose(file1);
    return ret;
  }
  if (com1[0] != 'f' || com1[1] != 'm' || com1[2] != 't' || com1[3] != ' ') {
    fclose(file1);
    return ret;
  }
  s = wfh_readint(file1, 4);
  if (fseek(file1, s, SEEK_CUR) != 0) {
    fclose(file1);
    return ret;
  }
  if (fread(com1, 1, 4, file1) != 4) {
    fclose(file1);
    return ret;
  }
  if (com1[0] != 'd' || com1[1] != 'a' || com1[2] != 't' || com1[3] != 'a') {
    fclose(file1);
    return ret;
  }
  ret = wfh_readint(file1, 4);
  fclose(file1);
  return ret;
}


x86 assembly (clang, -O0):
<wfh_getlength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe87(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1198 <wfh_getlength+0x48>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1427 <wfh_getlength+0x2d7>
lea    -0x80(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
mov    $0x4,%edx
call   1040 <fread@plt>
cmp    $0x4,%eax
je     11cc <wfh_getlength+0x7c>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1427 <wfh_getlength+0x2d7>
movsbl -0x80(%rbp),%eax
cmp    $0x52,%eax
jne    1200 <wfh_getlength+0xb0>
movsbl -0x7f(%rbp),%eax
cmp    $0x49,%eax
jne    1200 <wfh_getlength+0xb0>
movsbl -0x7e(%rbp),%eax
cmp    $0x46,%eax
jne    1200 <wfh_getlength+0xb0>
movsbl -0x7d(%rbp),%eax
cmp    $0x46,%eax
je     1214 <wfh_getlength+0xc4>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1427 <wfh_getlength+0x2d7>
mov    -0x18(%rbp),%rdi
mov    0x2dc9(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%esi
call   1060 <fseek@plt>
cmp    $0x0,%rax
je     1249 <wfh_getlength+0xf9>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1427 <wfh_getlength+0x2d7>
lea    -0x80(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
mov    $0x4,%edx
call   1040 <fread@plt>
cmp    $0x4,%eax
je     127d <wfh_getlength+0x12d>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1427 <wfh_getlength+0x2d7>
movsbl -0x80(%rbp),%eax
cmp    $0x57,%eax
jne    12b1 <wfh_getlength+0x161>
movsbl -0x7f(%rbp),%eax
cmp    $0x41,%eax
jne    12b1 <wfh_getlength+0x161>
movsbl -0x7e(%rbp),%eax
cmp    $0x56,%eax
jne    12b1 <wfh_getlength+0x161>
movsbl -0x7d(%rbp),%eax
cmp    $0x45,%eax
je     12c5 <wfh_getlength+0x175>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1427 <wfh_getlength+0x2d7>
lea    -0x80(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
mov    $0x4,%edx
call   1040 <fread@plt>
cmp    $0x4,%eax
je     12f9 <wfh_getlength+0x1a9>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1427 <wfh_getlength+0x2d7>
movsbl -0x80(%rbp),%eax
cmp    $0x66,%eax
jne    132d <wfh_getlength+0x1dd>
movsbl -0x7f(%rbp),%eax
cmp    $0x6d,%eax
jne    132d <wfh_getlength+0x1dd>
movsbl -0x7e(%rbp),%eax
cmp    $0x74,%eax
jne    132d <wfh_getlength+0x1dd>
movsbl -0x7d(%rbp),%eax
cmp    $0x20,%eax
je     1341 <wfh_getlength+0x1f1>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1427 <wfh_getlength+0x2d7>
mov    -0x18(%rbp),%rdi
mov    $0x4,%esi
call   1030 <wfh_readint@plt>
mov    %eax,-0x84(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x84(%rbp),%esi
mov    0x2c82(%rip),%rax
mov    (%rax),%edx
call   1060 <fseek@plt>
cmp    $0x0,%rax
je     138b <wfh_getlength+0x23b>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1427 <wfh_getlength+0x2d7>
lea    -0x80(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
mov    $0x4,%edx
call   1040 <fread@plt>
cmp    $0x4,%eax
je     13bf <wfh_getlength+0x26f>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1427 <wfh_getlength+0x2d7>
movsbl -0x80(%rbp),%eax
cmp    $0x64,%eax
jne    13f3 <wfh_getlength+0x2a3>
movsbl -0x7f(%rbp),%eax
cmp    $0x61,%eax
jne    13f3 <wfh_getlength+0x2a3>
movsbl -0x7e(%rbp),%eax
cmp    $0x74,%eax
jne    13f3 <wfh_getlength+0x2a3>
movsbl -0x7d(%rbp),%eax
cmp    $0x61,%eax
je     1407 <wfh_getlength+0x2b7>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1427 <wfh_getlength+0x2d7>
mov    -0x18(%rbp),%rdi
mov    $0x4,%esi
call   1030 <wfh_readint@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wfh_getlength>:
push   %rbp
push   %r14
push   %rbx
sub    $0x70,%rsp
lea    0xea1(%rip),%rsi
call   1070 <fopen@plt>
test   %rax,%rax
je     11c1 <wfh_getlength+0x71>
mov    %rax,%rbx
mov    %rsp,%rdi
mov    $0x1,%esi
mov    $0x4,%edx
mov    %rax,%rcx
call   1040 <fread@plt>
mov    $0xffffffff,%ebp
cmp    $0x4,%eax
jne    11b7 <wfh_getlength+0x67>
movdqa (%rsp),%xmm0
movd   %xmm0,%eax
cmp    $0x46464952,%eax
jne    11b7 <wfh_getlength+0x67>
mov    0x2e46(%rip),%r14
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1060 <fseek@plt>
test   %rax,%rax
je     11d1 <wfh_getlength+0x81>
mov    %rbx,%rdi
call   1050 <fclose@plt>
jmp    11c6 <wfh_getlength+0x76>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %rsp,%rdi
mov    $0x1,%esi
mov    $0x4,%edx
mov    %rbx,%rcx
call   1040 <fread@plt>
cmp    $0x4,%eax
jne    11b7 <wfh_getlength+0x67>
movdqa (%rsp),%xmm0
movd   %xmm0,%eax
cmp    $0x45564157,%eax
jne    11b7 <wfh_getlength+0x67>
mov    %rsp,%rdi
mov    $0x1,%esi
mov    $0x4,%edx
mov    %rbx,%rcx
call   1040 <fread@plt>
cmp    $0x4,%eax
jne    11b7 <wfh_getlength+0x67>
movdqa (%rsp),%xmm0
movd   %xmm0,%eax
cmp    $0x20746d66,%eax
jne    11b7 <wfh_getlength+0x67>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <wfh_readint@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <fseek@plt>
test   %rax,%rax
jne    11b7 <wfh_getlength+0x67>
mov    %rsp,%rdi
mov    $0x1,%esi
mov    $0x4,%edx
mov    %rbx,%rcx
call   1040 <fread@plt>
cmp    $0x4,%eax
jne    11b7 <wfh_getlength+0x67>
movdqa (%rsp),%xmm0
movd   %xmm0,%eax
cmp    $0x61746164,%eax
jne    11b7 <wfh_getlength+0x67>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <wfh_readint@plt>
mov    %eax,%ebp
jmp    11b7 <wfh_getlength+0x67>

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
@SEEK_CUR = global i32 0
define i32 @wfh_getlength(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca [100 x i8]
%7 = alloca i32
store i8* %0, i8** %3
store i32* null, i32** %4
store i32 -1, i32* %5
%8 = load i8*, i8** %3
%9 = call i32* @fopen(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %9, i32** %4
%10 = load i32*, i32** %4
%11 = icmp ne i32* %10, null
br i1 %11, label %14, label %12
12: ; preds = %1
%13 = load i32, i32* %5
store i32 %13, i32* %2
br label %173
14: ; preds = %1
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%16 = load i32*, i32** %4
%17 = call i32 @fread(i8* %15, i32 1, i32 4, i32* %16)
%18 = icmp ne i32 %17, 4
br i1 %18, label %19, label %23
19: ; preds = %14
%20 = load i32*, i32** %4
%21 = call i32 @fclose(i32* %20)
%22 = load i32, i32* %5
store i32 %22, i32* %2
br label %173
23: ; preds = %14
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %26, 82
br i1 %27, label %43, label %28
28: ; preds = %23
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 1
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp ne i32 %31, 73
br i1 %32, label %43, label %33
33: ; preds = %28
%34 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 2
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp ne i32 %36, 70
br i1 %37, label %43, label %38
38: ; preds = %33
%39 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 3
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = icmp ne i32 %41, 70
br i1 %42, label %43, label %47
43: ; preds = %38, %33, %28, %23
%44 = load i32*, i32** %4
%45 = call i32 @fclose(i32* %44)
%46 = load i32, i32* %5
store i32 %46, i32* %2
br label %173
47: ; preds = %38
%48 = load i32*, i32** %4
%49 = load i32, i32* @SEEK_CUR
%50 = call i64 @fseek(i32* %48, i32 4, i32 %49)
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %56
52: ; preds = %47
%53 = load i32*, i32** %4
%54 = call i32 @fclose(i32* %53)
%55 = load i32, i32* %5
store i32 %55, i32* %2
br label %173
56: ; preds = %47
%57 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%58 = load i32*, i32** %4
%59 = call i32 @fread(i8* %57, i32 1, i32 4, i32* %58)
%60 = icmp ne i32 %59, 4
br i1 %60, label %61, label %65
61: ; preds = %56
%62 = load i32*, i32** %4
%63 = call i32 @fclose(i32* %62)
%64 = load i32, i32* %5
store i32 %64, i32* %2
br label %173
65: ; preds = %56
%66 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%67 = load i8, i8* %66
%68 = sext i8 %67 to i32
%69 = icmp ne i32 %68, 87
br i1 %69, label %85, label %70
70: ; preds = %65
%71 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 1
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = icmp ne i32 %73, 65
br i1 %74, label %85, label %75
75: ; preds = %70
%76 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 2
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
%79 = icmp ne i32 %78, 86
br i1 %79, label %85, label %80
80: ; preds = %75
%81 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 3
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = icmp ne i32 %83, 69
br i1 %84, label %85, label %89
85: ; preds = %80, %75, %70, %65
%86 = load i32*, i32** %4
%87 = call i32 @fclose(i32* %86)
%88 = load i32, i32* %5
store i32 %88, i32* %2
br label %173
89: ; preds = %80
%90 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%91 = load i32*, i32** %4
%92 = call i32 @fread(i8* %90, i32 1, i32 4, i32* %91)
%93 = icmp ne i32 %92, 4
br i1 %93, label %94, label %98
94: ; preds = %89
%95 = load i32*, i32** %4
%96 = call i32 @fclose(i32* %95)
%97 = load i32, i32* %5
store i32 %97, i32* %2
br label %173
98: ; preds = %89
%99 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = icmp ne i32 %101, 102
br i1 %102, label %118, label %103
103: ; preds = %98
%104 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 1
%105 = load i8, i8* %104
%106 = sext i8 %105 to i32
%107 = icmp ne i32 %106, 109
br i1 %107, label %118, label %108
108: ; preds = %103
%109 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 2
%110 = load i8, i8* %109
%111 = sext i8 %110 to i32
%112 = icmp ne i32 %111, 116
br i1 %112, label %118, label %113
113: ; preds = %108
%114 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 3
%115 = load i8, i8* %114
%116 = sext i8 %115 to i32
%117 = icmp ne i32 %116, 32
br i1 %117, label %118, label %122
118: ; preds = %113, %108, %103, %98
%119 = load i32*, i32** %4
%120 = call i32 @fclose(i32* %119)
%121 = load i32, i32* %5
store i32 %121, i32* %2
br label %173
122: ; preds = %113
%123 = load i32*, i32** %4
%124 = call i32 @wfh_readint(i32* %123, i32 4)
store i32 %124, i32* %7
%125 = load i32*, i32** %4
%126 = load i32, i32* %7
%127 = load i32, i32* @SEEK_CUR
%128 = call i64 @fseek(i32* %125, i32 %126, i32 %127)
%129 = icmp ne i64 %128, 0
br i1 %129, label %130, label %134
130: ; preds = %122
%131 = load i32*, i32** %4
%132 = call i32 @fclose(i32* %131)
%133 = load i32, i32* %5
store i32 %133, i32* %2
br label %173
134: ; preds = %122
%135 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%136 = load i32*, i32** %4
%137 = call i32 @fread(i8* %135, i32 1, i32 4, i32* %136)
%138 = icmp ne i32 %137, 4
br i1 %138, label %139, label %143
139: ; preds = %134
%140 = load i32*, i32** %4
%141 = call i32 @fclose(i32* %140)
%142 = load i32, i32* %5
store i32 %142, i32* %2
br label %173
143: ; preds = %134
%144 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = icmp ne i32 %146, 100
br i1 %147, label %163, label %148
148: ; preds = %143
%149 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 1
%150 = load i8, i8* %149
%151 = sext i8 %150 to i32
%152 = icmp ne i32 %151, 97
br i1 %152, label %163, label %153
153: ; preds = %148
%154 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 2
%155 = load i8, i8* %154
%156 = sext i8 %155 to i32
%157 = icmp ne i32 %156, 116
br i1 %157, label %163, label %158
158: ; preds = %153
%159 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 3
%160 = load i8, i8* %159
%161 = sext i8 %160 to i32
%162 = icmp ne i32 %161, 97
br i1 %162, label %163, label %167
163: ; preds = %158, %153, %148, %143
%164 = load i32*, i32** %4
%165 = call i32 @fclose(i32* %164)
%166 = load i32, i32* %5
store i32 %166, i32* %2
br label %173
167: ; preds = %158
%168 = load i32*, i32** %4
%169 = call i32 @wfh_readint(i32* %168, i32 4)
store i32 %169, i32* %5
%170 = load i32*, i32** %4
%171 = call i32 @fclose(i32* %170)
%172 = load i32, i32* %5
store i32 %172, i32* %2
br label %173
173: ; preds = %167, %163, %139, %130, %118, %94, %85, %61, %52, %43, %19, %12
%174 = load i32, i32* %2
ret i32 %174
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@SEEK_CUR = global i32 0
define i32 @wfh_getlength(i8* nocapture %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32* %4, null
br i1 %5, label %56, label %6
6: ; preds = %1
%7 = call i32 @fread(i8* %3, i32 1, i32 4, i32* %4)
%8 = icmp eq i32 %7, 4
%9 = bitcast [100 x i8]* %2 to <4 x i8>*
%10 = load <4 x i8>, <4 x i8>* %9
%11 = freeze <4 x i8> %10
%12 = bitcast <4 x i8> %11 to i32
%13 = icmp eq i32 %12, 1179011410
%14 = and i1 %8, %13
br i1 %14, label %15, label %53
15: ; preds = %6
%16 = load i32, i32* @SEEK_CUR
%17 = tail call i64 @fseek(i32* %4, i32 4, i32 %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %53
19: ; preds = %15
%20 = call i32 @fread(i8* %3, i32 1, i32 4, i32* %4)
%21 = icmp eq i32 %20, 4
%22 = bitcast [100 x i8]* %2 to <4 x i8>*
%23 = load <4 x i8>, <4 x i8>* %22
%24 = freeze <4 x i8> %23
%25 = bitcast <4 x i8> %24 to i32
%26 = icmp eq i32 %25, 1163280727
%27 = and i1 %21, %26
br i1 %27, label %28, label %53
28: ; preds = %19
%29 = call i32 @fread(i8* %3, i32 1, i32 4, i32* %4)
%30 = icmp eq i32 %29, 4
%31 = bitcast [100 x i8]* %2 to <4 x i8>*
%32 = load <4 x i8>, <4 x i8>* %31
%33 = freeze <4 x i8> %32
%34 = bitcast <4 x i8> %33 to i32
%35 = icmp eq i32 %34, 544501094
%36 = and i1 %30, %35
br i1 %36, label %37, label %53
37: ; preds = %28
%38 = tail call i32 @wfh_readint(i32* %4, i32 4)
%39 = load i32, i32* @SEEK_CUR
%40 = tail call i64 @fseek(i32* %4, i32 %38, i32 %39)
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %53
42: ; preds = %37
%43 = call i32 @fread(i8* %3, i32 1, i32 4, i32* %4)
%44 = icmp eq i32 %43, 4
%45 = bitcast [100 x i8]* %2 to <4 x i8>*
%46 = load <4 x i8>, <4 x i8>* %45
%47 = freeze <4 x i8> %46
%48 = bitcast <4 x i8> %47 to i32
%49 = icmp eq i32 %48, 1635017060
%50 = and i1 %44, %49
br i1 %50, label %51, label %53
51: ; preds = %42
%52 = tail call i32 @wfh_readint(i32* %4, i32 4)
br label %53
53: ; preds = %42, %37, %28, %19, %15, %6, %51
%54 = phi i32 [ %52, %51 ], [ -1, %6 ], [ -1, %15 ], [ -1, %19 ], [ -1, %28 ], [ -1, %37 ], [ -1, %42 ]
%55 = tail call i32 @fclose(i32* %4)
br label %56
56: ; preds = %53, %1
%57 = phi i32 [ -1, %1 ], [ %54, %53 ]
ret i32 %57
}