#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int);
int /*<<< orphan*/ stderr;
scalar_t__ strncmp(char *, char *, int);
int x3dread_checkfile(char *filnam) {
  int i, chkend;
  char magic[20], filetype[9];
  char rdend[21];
  FILE *x3dchk;
  x3dchk = fopen(filnam, "r");
  if (x3dchk == NULL) {
    fprintf(stderr, "Cannot open X3D input file %s\n", filnam);
    return 1;
  }
  fscanf(x3dchk, "%s", magic);
  if (strncmp(magic, "x3dtoflag", 9) != 0) {
    fprintf(stderr, "This is not a X3D input file.\n");
    fclose(x3dchk);
    return 2;
  }
  if (strncmp(magic, "x3dtoflag", 8) == 0) {
    fseek(x3dchk, -20L, 2);
    fread(rdend, sizeof(char), 20, x3dchk);
    chkend = 0;
    for (i = 0; i < 15; i++)
      if (strncmp((rdend + i), "end_dump", 8) == 0)
        chkend = 1;
    if (!chkend) {
      fprintf(stderr, "Error - end_dump not found.\n");
      fclose(x3dchk);
      return 3;
    }
  }
  fclose(x3dchk);
  return 0;
}


x86 assembly (clang, -O0):
<x3dread_checkfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe79(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
jne    11c2 <x3dread_checkfile+0x52>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe53(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    130f <x3dread_checkfile+0x19f>
mov    -0x58(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xe50(%rip),%rsi
call   1060 <fscanf@plt>
lea    -0x30(%rbp),%rdi
lea    0xe43(%rip),%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1221 <x3dread_checkfile+0xb1>
mov    0x2de4(%rip),%rax
mov    (%rax),%edi
lea    0xe29(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x58(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x2,-0x4(%rbp)
jmp    130f <x3dread_checkfile+0x19f>
lea    -0x30(%rbp),%rdi
lea    0xdf8(%rip),%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12ff <x3dread_checkfile+0x18f>
mov    -0x58(%rbp),%rdi
mov    $0xffffffffffffffec,%rsi
mov    $0x2,%edx
call   1080 <fseek@plt>
lea    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rcx
mov    $0x1,%esi
mov    $0x14,%edx
call   1040 <fread@plt>
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xf,-0x14(%rbp)
jge    12c4 <x3dread_checkfile+0x154>
lea    -0x50(%rbp),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
lea    0xdb7(%rip),%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12b1 <x3dread_checkfile+0x141>
movl   $0x1,-0x18(%rbp)
jmp    12b6 <x3dread_checkfile+0x146>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    127a <x3dread_checkfile+0x10a>
cmpl   $0x0,-0x18(%rbp)
jne    12fa <x3dread_checkfile+0x18a>
mov    0x2d0b(%rip),%rax
mov    (%rax),%edi
lea    0xd78(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x58(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x3,-0x4(%rbp)
jmp    130f <x3dread_checkfile+0x19f>
jmp    12ff <x3dread_checkfile+0x18f>
mov    -0x58(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x3dread_checkfile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%rbp
lea    0xe75(%rip),%rsi
call   1090 <fopen@plt>
test   %rax,%rax
je     11f1 <x3dread_checkfile+0x81>
mov    %rax,%rbx
lea    0xe82(%rip),%rsi
lea    0x70(%rsp),%rbp
mov    %rax,%rdi
mov    %rbp,%rdx
call   1060 <fscanf@plt>
lea    0xe6e(%rip),%rsi
mov    %rbp,%rdi
mov    $0x9,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1215 <x3dread_checkfile+0xa5>
mov    0x2e11(%rip),%rax
mov    (%rax),%edi
lea    0xe56(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    $0x2,%eax
jmp    1485 <x3dread_checkfile+0x315>
mov    0x2de8(%rip),%rax
mov    (%rax),%edi
lea    0xe01(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x1,%eax
jmp    1485 <x3dread_checkfile+0x315>
lea    0xe08(%rip),%rsi
lea    0x70(%rsp),%rdi
mov    $0x8,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     123f <x3dread_checkfile+0xcf>
mov    %rbx,%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
jmp    1485 <x3dread_checkfile+0x315>
mov    %rbx,%rdi
mov    $0xffffffffffffffec,%rsi
mov    $0x2,%edx
call   1080 <fseek@plt>
mov    %rsp,%rbp
mov    %rbp,%rdi
mov    $0x1,%esi
mov    $0x14,%edx
mov    %rbx,%rcx
call   1040 <fread@plt>
lea    0xddb(%rip),%r14
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,0x20(%rsp)
lea    0x1(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,0x28(%rsp)
lea    0x2(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,0x68(%rsp)
lea    0x3(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,0x60(%rsp)
lea    0x4(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,0x58(%rsp)
lea    0x5(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,0x50(%rsp)
lea    0x6(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,0x48(%rsp)
lea    0x7(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,0x40(%rsp)
lea    0x8(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,0x38(%rsp)
lea    0x9(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,0x30(%rsp)
lea    0xa(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,%r12
lea    0xb(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,%r13
lea    0xc(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,%rbp
lea    0xd(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
mov    %rax,%r15
lea    0xe(%rsp),%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1230 <x3dread_checkfile+0xc0>
test   %r15,%r15
je     1230 <x3dread_checkfile+0xc0>
test   %rbp,%rbp
je     1230 <x3dread_checkfile+0xc0>
test   %r13,%r13
je     1230 <x3dread_checkfile+0xc0>
test   %r12,%r12
je     1230 <x3dread_checkfile+0xc0>
cmpq   $0x0,0x30(%rsp)
je     1230 <x3dread_checkfile+0xc0>
cmpq   $0x0,0x38(%rsp)
je     1230 <x3dread_checkfile+0xc0>
cmpq   $0x0,0x40(%rsp)
je     1230 <x3dread_checkfile+0xc0>
cmpq   $0x0,0x48(%rsp)
je     1230 <x3dread_checkfile+0xc0>
cmpq   $0x0,0x50(%rsp)
je     1230 <x3dread_checkfile+0xc0>
cmpq   $0x0,0x58(%rsp)
je     1230 <x3dread_checkfile+0xc0>
cmpq   $0x0,0x60(%rsp)
je     1230 <x3dread_checkfile+0xc0>
cmpq   $0x0,0x68(%rsp)
je     1230 <x3dread_checkfile+0xc0>
cmpq   $0x0,0x28(%rsp)
je     1230 <x3dread_checkfile+0xc0>
cmpq   $0x0,0x20(%rsp)
je     1230 <x3dread_checkfile+0xc0>
mov    0x2b78(%rip),%rax
mov    (%rax),%edi
lea    0xbe5(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    $0x3,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [31 x i8] c"Cannot open X3D input file %s\0A\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [10 x i8] c"x3dtoflag\00"
@.str.4 = [31 x i8] c"This is not a X3D input file.\0A\00"
@.str.5 = [9 x i8] c"end_dump\00"
@.str.6 = [29 x i8] c"Error - end_dump not found.\0A\00"
define i32 @x3dread_checkfile(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca [20 x i8]
%7 = alloca [9 x i8]
%8 = alloca [21 x i8]
%9 = alloca i32*
store i8* %0, i8** %3
%10 = load i8*, i8** %3
%11 = call i32* @fopen(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %11, i32** %9
%12 = load i32*, i32** %9
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %18
14: ; preds = %1
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %3
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* %16)
store i32 1, i32* %2
br label %67
18: ; preds = %1
%19 = load i32*, i32** %9
%20 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%21 = call i32 @fscanf(i32* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %20)
%22 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%23 = call i64 @strncmp(i8* %22, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 9)
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %30
25: ; preds = %18
%26 = load i32, i32* @stderr
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%28 = load i32*, i32** %9
%29 = call i32 @fclose(i32* %28)
store i32 2, i32* %2
br label %67
30: ; preds = %18
%31 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%32 = call i64 @strncmp(i8* %31, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 8)
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %64
34: ; preds = %30
%35 = load i32*, i32** %9
%36 = call i32 @fseek(i32* %35, i64 -20, i32 2)
%37 = getelementptr inbounds [21 x i8], [21 x i8]* %8, i64 0, i64 0
%38 = load i32*, i32** %9
%39 = call i32 @fread(i8* %37, i32 1, i32 20, i32* %38)
store i32 0, i32* %5
store i32 0, i32* %4
br label %40
40: ; preds = %52, %34
%41 = load i32, i32* %4
%42 = icmp slt i32 %41, 15
br i1 %42, label %43, label %55
43: ; preds = %40
%44 = getelementptr inbounds [21 x i8], [21 x i8]* %8, i64 0, i64 0
%45 = load i32, i32* %4
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8, i8* %44, i64 %46
%48 = call i64 @strncmp(i8* %47, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %51
50: ; preds = %43
store i32 1, i32* %5
br label %51
51: ; preds = %50, %43
br label %52
52: ; preds = %51
%53 = load i32, i32* %4
%54 = add nsw i32 %53, 1
store i32 %54, i32* %4
br label %40
55: ; preds = %40
%56 = load i32, i32* %5
%57 = icmp ne i32 %56, 0
br i1 %57, label %63, label %58
58: ; preds = %55
%59 = load i32, i32* @stderr
%60 = call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
%61 = load i32*, i32** %9
%62 = call i32 @fclose(i32* %61)
store i32 3, i32* %2
br label %67
63: ; preds = %55
br label %64
64: ; preds = %63, %30
%65 = load i32*, i32** %9
%66 = call i32 @fclose(i32* %65)
store i32 0, i32* %2
br label %67
67: ; preds = %64, %58, %25, %14
%68 = load i32, i32* %2
ret i32 %68
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [31 x i8] c"Cannot open X3D input file %s\0A\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [10 x i8] c"x3dtoflag\00"
@.str.4 = [31 x i8] c"This is not a X3D input file.\0A\00"
@.str.5 = [9 x i8] c"end_dump\00"
@.str.6 = [29 x i8] c"Error - end_dump not found.\0A\00"
define i32 @x3dread_checkfile(i8* %0) {
%2 = alloca [20 x i8]
%3 = alloca [21 x i8]
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 0
%6 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %89
11: ; preds = %1
%12 = call i32 @fscanf(i32* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%13 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 9)
%14 = icmp eq i64 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i32, i32* @stderr
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%18 = call i32 @fclose(i32* %6)
br label %89
19: ; preds = %11
%20 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 8)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %87
22: ; preds = %19
%23 = call i32 @fseek(i32* %6, i64 -20, i32 2)
%24 = call i32 @fread(i8* %5, i32 1, i32 20, i32* %6)
%25 = call i64 @strncmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%26 = icmp ne i64 %25, 0
%27 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 1
%28 = call i64 @strncmp(i8* %27, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%29 = icmp ne i64 %28, 0
%30 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 2
%31 = call i64 @strncmp(i8* %30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%32 = icmp ne i64 %31, 0
%33 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 3
%34 = call i64 @strncmp(i8* %33, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%35 = icmp ne i64 %34, 0
%36 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 4
%37 = call i64 @strncmp(i8* %36, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%38 = icmp ne i64 %37, 0
%39 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 5
%40 = call i64 @strncmp(i8* %39, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%41 = icmp ne i64 %40, 0
%42 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 6
%43 = call i64 @strncmp(i8* %42, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%44 = icmp ne i64 %43, 0
%45 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 7
%46 = call i64 @strncmp(i8* %45, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%47 = icmp ne i64 %46, 0
%48 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 8
%49 = call i64 @strncmp(i8* %48, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%50 = icmp ne i64 %49, 0
%51 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 9
%52 = call i64 @strncmp(i8* %51, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%53 = icmp ne i64 %52, 0
%54 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 10
%55 = call i64 @strncmp(i8* %54, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%56 = icmp ne i64 %55, 0
%57 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 11
%58 = call i64 @strncmp(i8* %57, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%59 = icmp ne i64 %58, 0
%60 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 12
%61 = call i64 @strncmp(i8* %60, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%62 = icmp ne i64 %61, 0
%63 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 13
%64 = call i64 @strncmp(i8* %63, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%65 = icmp ne i64 %64, 0
%66 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 14
%67 = call i64 @strncmp(i8* %66, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%68 = icmp ne i64 %67, 0
%69 = select i1 %68, i1 %65, i1 false
%70 = select i1 %69, i1 %62, i1 false
%71 = select i1 %70, i1 %59, i1 false
%72 = select i1 %71, i1 %56, i1 false
%73 = select i1 %72, i1 %53, i1 false
%74 = select i1 %73, i1 %50, i1 false
%75 = select i1 %74, i1 %47, i1 false
%76 = select i1 %75, i1 %44, i1 false
%77 = select i1 %76, i1 %41, i1 false
%78 = select i1 %77, i1 %38, i1 false
%79 = select i1 %78, i1 %35, i1 false
%80 = select i1 %79, i1 %32, i1 false
%81 = select i1 %80, i1 %29, i1 false
%82 = select i1 %81, i1 %26, i1 false
br i1 %82, label %83, label %87
83: ; preds = %22
%84 = load i32, i32* @stderr
%85 = call i32 (i32, i8*, ...) @fprintf(i32 %84, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
%86 = call i32 @fclose(i32* %6)
br label %89
87: ; preds = %22, %19
%88 = call i32 @fclose(i32* %6)
br label %89
89: ; preds = %87, %83, %15, %8
%90 = phi i32 [ 1, %8 ], [ 2, %15 ], [ 0, %87 ], [ 3, %83 ]
ret i32 %90
}