#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*/ GetLong(int *, int /*<<< orphan*/ *);
int /*<<< orphan*/ PutLong(int *, int /*<<< orphan*/ *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
int strtol(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int uidcsum(int *);
int changeAppUid(char *uid3, char *finname, char *foutname) {
  int l[3], id, oldid, count = 0;
  FILE *fpin, *fpout;
  if (!(fpin = fopen(finname, "rb"))) {
    perror(finname);
    return 1;
  }
  if (!(fpout = fopen(foutname, "wb"))) {
    perror(foutname);
    return 1;
  }
  GetLong(&l[0], fpin);
  GetLong(&l[1], fpin);
  GetLong(&l[2], fpin);
  GetLong(&id, fpin);
  if (!(l[0] == 0x10000079 && l[1] == 0x1000006c) &&
      !(l[0] == 0x1000007a && l[1] == 0x100039ce)) {
    fprintf(stderr, "Not an app file, aborting\n");
    return 1;
  }
  oldid = l[2];
  l[2] = strtol(uid3, 0, 0);
  fprintf(stderr, "Changing UID from %#x to %#x\n", oldid, l[2]);
  id = uidcsum(l);
  PutLong(&l[0], fpout);
  PutLong(&l[1], fpout);
  PutLong(&l[2], fpout);
  PutLong(&id, fpout);
  count++;
  while (!feof(fpin)) {
    GetLong(&id, fpin);
    if (id == oldid)
      count++, id = l[2];
    PutLong(&id, fpout);
  }
  fclose(fpin);
  fclose(fpout);
  if (count != 2) {
    fprintf(stderr, "Changed UID %d times (instead of 2).\n", count);
    fprintf(stderr, "The output is very probably unusable.\n");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<changeAppUid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe4a(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
jne    11de <changeAppUid+0x4e>
mov    -0x18(%rbp),%rdi
call   10a0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    13e0 <changeAppUid+0x250>
mov    -0x20(%rbp),%rdi
lea    0xe1a(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x48(%rbp)
cmp    $0x0,%rax
jne    1211 <changeAppUid+0x81>
mov    -0x20(%rbp),%rdi
call   10a0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    13e0 <changeAppUid+0x250>
lea    -0x2c(%rbp),%rdi
mov    -0x40(%rbp),%rsi
call   1030 <GetLong@plt>
lea    -0x2c(%rbp),%rdi
add    $0x4,%rdi
mov    -0x40(%rbp),%rsi
call   1030 <GetLong@plt>
lea    -0x2c(%rbp),%rdi
add    $0x8,%rdi
mov    -0x40(%rbp),%rsi
call   1030 <GetLong@plt>
mov    -0x40(%rbp),%rsi
lea    -0x30(%rbp),%rdi
call   1030 <GetLong@plt>
cmpl   $0x10000079,-0x2c(%rbp)
jne    1267 <changeAppUid+0xd7>
cmpl   $0x1000006c,-0x28(%rbp)
je     12a4 <changeAppUid+0x114>
cmpl   $0x1000007a,-0x2c(%rbp)
jne    1281 <changeAppUid+0xf1>
cmpl   $0x100039ce,-0x28(%rbp)
je     12a4 <changeAppUid+0x114>
mov    0x2d58(%rip),%rax
mov    (%rax),%edi
lea    0xd75(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13e0 <changeAppUid+0x250>
mov    -0x24(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1070 <strtol@plt>
mov    %eax,-0x24(%rbp)
mov    0x2d1f(%rip),%rax
mov    (%rax),%edi
mov    -0x34(%rbp),%edx
mov    -0x24(%rbp),%ecx
lea    0xd51(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
lea    -0x2c(%rbp),%rdi
call   1080 <uidcsum@plt>
mov    %eax,-0x30(%rbp)
lea    -0x2c(%rbp),%rdi
mov    -0x48(%rbp),%rsi
call   10b0 <PutLong@plt>
lea    -0x2c(%rbp),%rdi
add    $0x4,%rdi
mov    -0x48(%rbp),%rsi
call   10b0 <PutLong@plt>
lea    -0x2c(%rbp),%rdi
add    $0x8,%rdi
mov    -0x48(%rbp),%rsi
call   10b0 <PutLong@plt>
mov    -0x48(%rbp),%rsi
lea    -0x30(%rbp),%rdi
call   10b0 <PutLong@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1346 <changeAppUid+0x1b6>
jmp    1380 <changeAppUid+0x1f0>
mov    -0x40(%rbp),%rsi
lea    -0x30(%rbp),%rdi
call   1030 <GetLong@plt>
mov    -0x30(%rbp),%eax
cmp    -0x34(%rbp),%eax
jne    136e <changeAppUid+0x1de>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x48(%rbp),%rsi
lea    -0x30(%rbp),%rdi
call   10b0 <PutLong@plt>
jmp    1328 <changeAppUid+0x198>
mov    -0x40(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x48(%rbp),%rdi
call   1040 <fclose@plt>
cmpl   $0x2,-0x38(%rbp)
je     13d9 <changeAppUid+0x249>
mov    0x2c3d(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%edx
lea    0xc90(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2c23(%rip),%rax
mov    (%rax),%edi
lea    0xc9f(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13e0 <changeAppUid+0x250>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<changeAppUid>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %rdi,%r12
lea    0xe52(%rip),%rsi
mov    %rbp,%rdi
call   1090 <fopen@plt>
test   %rax,%rax
je     1386 <changeAppUid+0x1f6>
mov    %rax,%rbx
lea    0xe3a(%rip),%rsi
mov    %r15,%rdi
call   1090 <fopen@plt>
test   %rax,%rax
je     1390 <changeAppUid+0x200>
mov    %rax,%r14
lea    0xc(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <GetLong@plt>
lea    0x10(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <GetLong@plt>
lea    0x14(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <GetLong@plt>
lea    0x8(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <GetLong@plt>
mov    0xc(%rsp),%ecx
mov    0x10(%rsp),%eax
cmp    $0x10000079,%ecx
jne    1228 <changeAppUid+0x98>
cmp    $0x1000006c,%eax
je     123f <changeAppUid+0xaf>
cmp    $0x1000007a,%ecx
jne    1357 <changeAppUid+0x1c7>
cmp    $0x100039ce,%eax
jne    1357 <changeAppUid+0x1c7>
mov    0x14(%rsp),%r13d
xor    %r15d,%r15d
mov    %r12,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1070 <strtol@plt>
mov    %eax,0x14(%rsp)
mov    0x2d82(%rip),%rcx
mov    (%rcx),%edi
lea    0xdba(%rip),%rsi
mov    %r13d,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xc(%rsp),%rbp
mov    %rbp,%rdi
call   1080 <uidcsum@plt>
mov    %eax,0x8(%rsp)
mov    %rbp,%rdi
mov    %r14,%rsi
call   10b0 <PutLong@plt>
lea    0x10(%rsp),%rdi
mov    %r14,%rsi
call   10b0 <PutLong@plt>
lea    0x14(%rsp),%rdi
mov    %r14,%rsi
call   10b0 <PutLong@plt>
lea    0x8(%rsp),%rdi
mov    %r14,%rsi
call   10b0 <PutLong@plt>
mov    %rbx,%rdi
call   1060 <feof@plt>
mov    $0x1,%r12d
test   %eax,%eax
je     1307 <changeAppUid+0x177>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    %r14,%rdi
call   1040 <fclose@plt>
cmp    $0x2,%r12d
je     1374 <changeAppUid+0x1e4>
mov    0x2cf7(%rip),%rbx
mov    (%rbx),%edi
lea    0xd4d(%rip),%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xd60(%rip),%rsi
jmp    1367 <changeAppUid+0x1d7>
mov    $0x1,%r12d
lea    0x8(%rsp),%rbp
jmp    1337 <changeAppUid+0x1a7>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbp,%rdi
mov    %r14,%rsi
call   10b0 <PutLong@plt>
mov    %rbx,%rdi
call   1060 <feof@plt>
test   %eax,%eax
jne    12c8 <changeAppUid+0x138>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1030 <GetLong@plt>
cmp    %r13d,0x8(%rsp)
jne    1320 <changeAppUid+0x190>
add    $0x1,%r12d
mov    0x14(%rsp),%eax
mov    %eax,0x8(%rsp)
jmp    1320 <changeAppUid+0x190>
mov    0x2c82(%rip),%rax
mov    (%rax),%edi
lea    0xc9f(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%r15d
mov    %r15d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbp,%rdi
call   10a0 <perror@plt>
jmp    136e <changeAppUid+0x1de>
mov    %r15,%rdi
call   10a0 <perror@plt>
jmp    136e <changeAppUid+0x1de>

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
@.str.1 = [3 x i8] c"wb\00"
@stderr = global i32 0
@.str.2 = [27 x i8] c"Not an app file, aborting\0A\00"
@.str.3 = [30 x i8] c"Changing UID from %#x to %#x\0A\00"
@.str.4 = [38 x i8] c"Changed UID %d times (instead of 2).\0A\00"
@.str.5 = [39 x i8] c"The output is very probably unusable.\0A\00"
define i32 @changeAppUid(i8* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca [3 x i32]
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 0, i32* %11
%14 = load i8*, i8** %6
%15 = call i32* @fopen(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %15, i32** %12
%16 = icmp ne i32* %15, null
br i1 %16, label %20, label %17
17: ; preds = %3
%18 = load i8*, i8** %6
%19 = call i32 @perror(i8* %18)
store i32 1, i32* %4
br label %116
20: ; preds = %3
%21 = load i8*, i8** %7
%22 = call i32* @fopen(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %22, i32** %13
%23 = icmp ne i32* %22, null
br i1 %23, label %27, label %24
24: ; preds = %20
%25 = load i8*, i8** %7
%26 = call i32 @perror(i8* %25)
store i32 1, i32* %4
br label %116
27: ; preds = %20
%28 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 0
%29 = load i32*, i32** %12
%30 = call i32 @GetLong(i32* %28, i32* %29)
%31 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 1
%32 = load i32*, i32** %12
%33 = call i32 @GetLong(i32* %31, i32* %32)
%34 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 2
%35 = load i32*, i32** %12
%36 = call i32 @GetLong(i32* %34, i32* %35)
%37 = load i32*, i32** %12
%38 = call i32 @GetLong(i32* %9, i32* %37)
%39 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 0
%40 = load i32, i32* %39
%41 = icmp eq i32 %40, 268435577
br i1 %41, label %42, label %46
42: ; preds = %27
%43 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 1
%44 = load i32, i32* %43
%45 = icmp eq i32 %44, 268435564
br i1 %45, label %57, label %46
46: ; preds = %42, %27
%47 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 0
%48 = load i32, i32* %47
%49 = icmp eq i32 %48, 268435578
br i1 %49, label %50, label %54
50: ; preds = %46
%51 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 1
%52 = load i32, i32* %51
%53 = icmp eq i32 %52, 268450254
br i1 %53, label %57, label %54
54: ; preds = %50, %46
%55 = load i32, i32* @stderr
%56 = call i32 (i32, i8*, ...) @fprintf(i32 %55, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %4
br label %116
57: ; preds = %50, %42
%58 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 2
%59 = load i32, i32* %58
store i32 %59, i32* %10
%60 = load i8*, i8** %5
%61 = call i32 @strtol(i8* %60, i32 0, i32 0)
%62 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 2
store i32 %61, i32* %62
%63 = load i32, i32* @stderr
%64 = load i32, i32* %10
%65 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 2
%66 = load i32, i32* %65
%67 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 %64, i32 %66)
%68 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 0
%69 = call i32 @uidcsum(i32* %68)
store i32 %69, i32* %9
%70 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 0
%71 = load i32*, i32** %13
%72 = call i32 @PutLong(i32* %70, i32* %71)
%73 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 1
%74 = load i32*, i32** %13
%75 = call i32 @PutLong(i32* %73, i32* %74)
%76 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 2
%77 = load i32*, i32** %13
%78 = call i32 @PutLong(i32* %76, i32* %77)
%79 = load i32*, i32** %13
%80 = call i32 @PutLong(i32* %9, i32* %79)
%81 = load i32, i32* %11
%82 = add nsw i32 %81, 1
store i32 %82, i32* %11
br label %83
83: ; preds = %99, %57
%84 = load i32*, i32** %12
%85 = call i32 @feof(i32* %84)
%86 = icmp ne i32 %85, 0
%87 = xor i1 %86, true
br i1 %87, label %88, label %102
88: ; preds = %83
%89 = load i32*, i32** %12
%90 = call i32 @GetLong(i32* %9, i32* %89)
%91 = load i32, i32* %9
%92 = load i32, i32* %10
%93 = icmp eq i32 %91, %92
br i1 %93, label %94, label %99
94: ; preds = %88
%95 = load i32, i32* %11
%96 = add nsw i32 %95, 1
store i32 %96, i32* %11
%97 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 2
%98 = load i32, i32* %97
store i32 %98, i32* %9
br label %99
99: ; preds = %94, %88
%100 = load i32*, i32** %13
%101 = call i32 @PutLong(i32* %9, i32* %100)
br label %83
102: ; preds = %83
%103 = load i32*, i32** %12
%104 = call i32 @fclose(i32* %103)
%105 = load i32*, i32** %13
%106 = call i32 @fclose(i32* %105)
%107 = load i32, i32* %11
%108 = icmp ne i32 %107, 2
br i1 %108, label %109, label %115
109: ; preds = %102
%110 = load i32, i32* @stderr
%111 = load i32, i32* %11
%112 = call i32 (i32, i8*, ...) @fprintf(i32 %110, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i32 %111)
%113 = load i32, i32* @stderr
%114 = call i32 (i32, i8*, ...) @fprintf(i32 %113, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %4
br label %116
115: ; preds = %102
store i32 0, i32* %4
br label %116
116: ; preds = %115, %109, %54, %24, %17
%117 = load i32, i32* %4
ret i32 %117
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@.str.1 = [3 x i8] c"wb\00"
@stderr = global i32 0
@.str.2 = [27 x i8] c"Not an app file, aborting\0A\00"
@.str.3 = [30 x i8] c"Changing UID from %#x to %#x\0A\00"
@.str.4 = [38 x i8] c"Changed UID %d times (instead of 2).\0A\00"
@.str.5 = [39 x i8] c"The output is very probably unusable.\0A\00"
define i32 @changeAppUid(i8* %0, i8* nocapture %1, i8* nocapture %2) {
%4 = alloca [3 x i32]
%5 = alloca i32
%6 = bitcast [3 x i32]* %4 to i8*
%7 = bitcast i32* %5 to i8*
%8 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = tail call i32 @perror(i8* %1)
br label %72
12: ; preds = %3
%13 = tail call i32* @fopen(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = tail call i32 @perror(i8* %2)
br label %72
17: ; preds = %12
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%19 = call i32 @GetLong(i32* %18, i32* %8)
%20 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 1
%21 = call i32 @GetLong(i32* %20, i32* %8)
%22 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 2
%23 = call i32 @GetLong(i32* %22, i32* %8)
%24 = call i32 @GetLong(i32* %5, i32* %8)
%25 = load i32, i32* %18
%26 = icmp eq i32 %25, 268435577
%27 = load i32, i32* %20
%28 = icmp eq i32 %27, 268435564
%29 = select i1 %26, i1 %28, i1 false
br i1 %29, label %37, label %30
30: ; preds = %17
%31 = icmp eq i32 %25, 268435578
%32 = icmp eq i32 %27, 268450254
%33 = select i1 %31, i1 %32, i1 false
br i1 %33, label %37, label %34
34: ; preds = %30
%35 = load i32, i32* @stderr
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %72
37: ; preds = %30, %17
%38 = load i32, i32* %22
%39 = call i32 @strtol(i8* %0, i32 0, i32 0)
store i32 %39, i32* %22
%40 = load i32, i32* @stderr
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 %38, i32 %39)
%42 = call i32 @uidcsum(i32* %18)
store i32 %42, i32* %5
%43 = call i32 @PutLong(i32* %18, i32* %13)
%44 = call i32 @PutLong(i32* %20, i32* %13)
%45 = call i32 @PutLong(i32* %22, i32* %13)
%46 = call i32 @PutLong(i32* %5, i32* %13)
%47 = call i32 @feof(i32* %8)
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %62
49: ; preds = %37, %57
%50 = phi i32 [ %58, %57 ], [ 1, %37 ]
%51 = call i32 @GetLong(i32* %5, i32* %8)
%52 = load i32, i32* %5
%53 = icmp eq i32 %52, %38
br i1 %53, label %54, label %57
54: ; preds = %49
%55 = add nsw i32 %50, 1
%56 = load i32, i32* %22
store i32 %56, i32* %5
br label %57
57: ; preds = %54, %49
%58 = phi i32 [ %55, %54 ], [ %50, %49 ]
%59 = call i32 @PutLong(i32* %5, i32* %13)
%60 = call i32 @feof(i32* %8)
%61 = icmp eq i32 %60, 0
br i1 %61, label %49, label %62
62: ; preds = %57, %37
%63 = phi i32 [ 1, %37 ], [ %58, %57 ]
%64 = call i32 @fclose(i32* %8)
%65 = call i32 @fclose(i32* %13)
%66 = icmp eq i32 %63, 2
br i1 %66, label %72, label %67
67: ; preds = %62
%68 = load i32, i32* @stderr
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i32 %63)
%70 = load i32, i32* @stderr
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
br label %72
72: ; preds = %62, %67, %34, %15, %10
%73 = phi i32 [ 1, %67 ], [ 1, %34 ], [ 1, %15 ], [ 1, %10 ], [ 0, %62 ]
ret i32 %73
}