#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*/ *);
scalar_t__ feof(int /*<<< orphan*/ *);
scalar_t__ ferror(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc != 1) {
    printf("Usage: recover\n");
    return 1;
  }
  FILE *fp = fopen("card.raw", "rb");
  if (fp == NULL) {
    fprintf(stderr, "Could not open card.raw\n");
    return 2;
  }
  unsigned char buffer[512];
  FILE *fpjpg = NULL;
  int count = 0;
  while (1) {
    if (fread(buffer, sizeof(char) * 512, 1, fp) != 1) {
      if (feof(fp)) {
        break;
      } else if (ferror(fp)) {
        fprintf(stderr, "Error reading from file card.raw\n");
        return 3;
      }
    }
    char jpgname[50];
    if (buffer[0] == 0xff && buffer[1] == 0xd8 && buffer[2] == 0xff &&
        (buffer[3] == 0xe0 || buffer[3] == 0xe1)) {
      if (fpjpg != NULL) {
        fclose(fpjpg);
      }
      sprintf(jpgname, "%03d.jpg", count);
      printf("Found a file, writing it to %s\n", jpgname);
      fpjpg = fopen(jpgname, "wb");
      if (fpjpg == NULL) {
        fprintf(stderr, "Could not open file %s for writing\n", jpgname);
        return 4;
      }
      count++;
    }
    if (fpjpg != NULL) {
      if (fwrite(buffer, 512, 1, fpjpg) != 1) {
        fprintf(stderr, "Error writing to file %s\n", jpgname);
        return 5;
      }
    }
  }
  if (fpjpg != NULL) {
    fclose(fpjpg);
  }
  fclose(fp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x260,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     11cd <main+0x3d>
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1430 <main+0x2a0>
lea    0xe3c(%rip),%rdi
lea    0xe3e(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1212 <main+0x82>
mov    0x2dea(%rip),%rax
mov    (%rax),%edi
lea    0xe1d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    1430 <main+0x2a0>
movq   $0x0,-0x228(%rbp)
movl   $0x0,-0x22c(%rbp)
lea    -0x220(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x200,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
cmp    $0x1,%eax
je     12a2 <main+0x112>
mov    -0x18(%rbp),%rdi
call   1080 <feof@plt>
cmp    $0x0,%rax
je     1262 <main+0xd2>
jmp    140d <main+0x27d>
mov    -0x18(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     1298 <main+0x108>
mov    0x2d64(%rip),%rax
mov    (%rax),%edi
lea    0xdb0(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x3,-0x4(%rbp)
jmp    1430 <main+0x2a0>
jmp    129d <main+0x10d>
jmp    12a2 <main+0x112>
movzbl -0x220(%rbp),%eax
cmp    $0xff,%eax
jne    13a5 <main+0x215>
movzbl -0x21f(%rbp),%eax
cmp    $0xd8,%eax
jne    13a5 <main+0x215>
movzbl -0x21e(%rbp),%eax
cmp    $0xff,%eax
jne    13a5 <main+0x215>
movzbl -0x21d(%rbp),%eax
cmp    $0xe0,%eax
je     12fc <main+0x16c>
movzbl -0x21d(%rbp),%eax
cmp    $0xe1,%eax
jne    13a5 <main+0x215>
cmpq   $0x0,-0x228(%rbp)
je     1316 <main+0x186>
mov    -0x228(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0x260(%rbp),%rdi
mov    -0x22c(%rbp),%edx
lea    0xd2d(%rip),%rsi
call   10a0 <sprintf@plt>
lea    -0x260(%rbp),%rsi
lea    0xd23(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x260(%rbp),%rdi
lea    0xd2e(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x228(%rbp)
cmpq   $0x0,-0x228(%rbp)
jne    1396 <main+0x206>
mov    0x2c6d(%rip),%rax
mov    (%rax),%edi
lea    -0x260(%rbp),%rdx
lea    0xd00(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x4,-0x4(%rbp)
jmp    1430 <main+0x2a0>
mov    -0x22c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x22c(%rbp)
cmpq   $0x0,-0x228(%rbp)
je     1408 <main+0x278>
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rcx
mov    $0x200,%esi
mov    $0x1,%edx
call   10b0 <fwrite@plt>
cmp    $0x1,%eax
je     1403 <main+0x273>
mov    0x2c00(%rip),%rax
mov    (%rax),%edi
lea    -0x260(%rbp),%rdx
lea    0xcb7(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x5,-0x4(%rbp)
jmp    1430 <main+0x2a0>
jmp    1408 <main+0x278>
jmp    1227 <main+0x97>
cmpq   $0x0,-0x228(%rbp)
je     1427 <main+0x297>
mov    -0x228(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x248,%rsp
cmp    $0x1,%edi
jne    12d7 <main+0x137>
lea    0xe3f(%rip),%rdi
lea    0xe41(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     12ed <main+0x14d>
mov    %rax,%rbx
lea    0x40(%rsp),%r15
mov    %rsp,%r13
lea    0xe88(%rip),%r14
xor    %ebp,%ebp
xor    %r12d,%r12d
jmp    1217 <main+0x77>
nop
test   %rbp,%rbp
je     12d0 <main+0x130>
mov    %r15,%rdi
mov    $0x200,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10c0 <fwrite@plt>
cmp    $0x1,%eax
jne    130b <main+0x16b>
mov    %r15,%rdi
mov    $0x200,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fread@plt>
cmp    $0x1,%eax
je     1253 <main+0xb3>
mov    %rbx,%rdi
call   1090 <feof@plt>
test   %rax,%rax
jne    1319 <main+0x179>
mov    %rbx,%rdi
call   1040 <ferror@plt>
test   %rax,%rax
jne    1332 <main+0x192>
cmpb   $0xff,0x40(%rsp)
jne    11f0 <main+0x50>
cmpb   $0xd8,0x41(%rsp)
jne    11f0 <main+0x50>
cmpb   $0xff,0x42(%rsp)
jne    11f0 <main+0x50>
movzbl 0x43(%rsp),%eax
and    $0xfe,%al
cmp    $0xe0,%al
jne    11f0 <main+0x50>
test   %rbp,%rbp
je     1284 <main+0xe4>
mov    %rbp,%rdi
call   1060 <fclose@plt>
mov    %r13,%rdi
lea    0xdb9(%rip),%rsi
mov    %r12d,%edx
call   10b0 <sprintf@plt>
lea    0xdb3(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     1350 <main+0x1b0>
mov    %rax,%rbp
add    $0x1,%r12d
jmp    11f9 <main+0x59>
nopw   0x0(%rax,%rax,1)
xor    %ebp,%ebp
jmp    1217 <main+0x77>
lea    0xdd3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%ebx
jmp    136f <main+0x1cf>
mov    0x2cec(%rip),%rax
mov    (%rax),%edi
lea    0xd0f(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x2,%ebx
jmp    136f <main+0x1cf>
mov    $0x5,%ebx
lea    0xd80(%rip),%rsi
jmp    135c <main+0x1bc>
test   %rbp,%rbp
je     1326 <main+0x186>
mov    %rbp,%rdi
call   1060 <fclose@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
xor    %ebx,%ebx
jmp    136f <main+0x1cf>
mov    0x2ca7(%rip),%rax
mov    (%rax),%edi
lea    0xce3(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x3,%ebx
jmp    136f <main+0x1cf>
mov    $0x4,%ebx
lea    0xd17(%rip),%rsi
mov    0x2c7d(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %ebx,%eax
add    $0x248,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Usage: recover\0A\00"
@.str.1 = [9 x i8] c"card.raw\00"
@.str.2 = [3 x i8] c"rb\00"
@stderr = global i32 0
@.str.3 = [25 x i8] c"Could not open card.raw\0A\00"
@.str.4 = [34 x i8] c"Error reading from file card.raw\0A\00"
@.str.5 = [9 x i8] c"%03d.jpg\00"
@.str.6 = [32 x i8] c"Found a file, writing it to %s\0A\00"
@.str.7 = [3 x i8] c"wb\00"
@.str.8 = [36 x i8] c"Could not open file %s for writing\0A\00"
@.str.9 = [26 x i8] c"Error writing to file %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca [512 x i8]
%8 = alloca i32*
%9 = alloca i32
%10 = alloca [50 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %4
%12 = icmp ne i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %113
15: ; preds = %2
%16 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32* %16, i32** %6
%17 = load i32*, i32** %6
%18 = icmp eq i32* %17, null
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = load i32, i32* @stderr
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
store i32 2, i32* %3
br label %113
22: ; preds = %15
store i32* null, i32** %8
store i32 0, i32* %9
br label %23
23: ; preds = %22, %103
%24 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%25 = load i32*, i32** %6
%26 = call i32 @fread(i8* %24, i32 512, i32 1, i32* %25)
%27 = icmp ne i32 %26, 1
br i1 %27, label %28, label %42
28: ; preds = %23
%29 = load i32*, i32** %6
%30 = call i64 @feof(i32* %29)
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %28
br label %104
33: ; preds = %28
%34 = load i32*, i32** %6
%35 = call i64 @ferror(i32* %34)
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %40
37: ; preds = %33
%38 = load i32, i32* @stderr
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
store i32 3, i32* %3
br label %113
40: ; preds = %33
br label %41
41: ; preds = %40
br label %42
42: ; preds = %41, %23
%43 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = icmp eq i32 %45, 255
br i1 %46, label %47, label %90
47: ; preds = %42
%48 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 1
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = icmp eq i32 %50, 216
br i1 %51, label %52, label %90
52: ; preds = %47
%53 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 2
%54 = load i8, i8* %53
%55 = zext i8 %54 to i32
%56 = icmp eq i32 %55, 255
br i1 %56, label %57, label %90
57: ; preds = %52
%58 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 3
%59 = load i8, i8* %58
%60 = zext i8 %59 to i32
%61 = icmp eq i32 %60, 224
br i1 %61, label %67, label %62
62: ; preds = %57
%63 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 3
%64 = load i8, i8* %63
%65 = zext i8 %64 to i32
%66 = icmp eq i32 %65, 225
br i1 %66, label %67, label %90
67: ; preds = %62, %57
%68 = load i32*, i32** %8
%69 = icmp ne i32* %68, null
br i1 %69, label %70, label %73
70: ; preds = %67
%71 = load i32*, i32** %8
%72 = call i32 @fclose(i32* %71)
br label %73
73: ; preds = %70, %67
%74 = getelementptr inbounds [50 x i8], [50 x i8]* %10, i64 0, i64 0
%75 = load i32, i32* %9
%76 = call i32 @sprintf(i8* %74, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %75)
%77 = getelementptr inbounds [50 x i8], [50 x i8]* %10, i64 0, i64 0
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i8* %77)
%79 = getelementptr inbounds [50 x i8], [50 x i8]* %10, i64 0, i64 0
%80 = call i32* @fopen(i8* %79, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
store i32* %80, i32** %8
%81 = load i32*, i32** %8
%82 = icmp eq i32* %81, null
br i1 %82, label %83, label %87
83: ; preds = %73
%84 = load i32, i32* @stderr
%85 = getelementptr inbounds [50 x i8], [50 x i8]* %10, i64 0, i64 0
%86 = call i32 (i32, i8*, ...) @fprintf(i32 %84, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0), i8* %85)
store i32 4, i32* %3
br label %113
87: ; preds = %73
%88 = load i32, i32* %9
%89 = add nsw i32 %88, 1
store i32 %89, i32* %9
br label %90
90: ; preds = %87, %62, %52, %47, %42
%91 = load i32*, i32** %8
%92 = icmp ne i32* %91, null
br i1 %92, label %93, label %103
93: ; preds = %90
%94 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%95 = load i32*, i32** %8
%96 = call i32 @fwrite(i8* %94, i32 512, i32 1, i32* %95)
%97 = icmp ne i32 %96, 1
br i1 %97, label %98, label %102
98: ; preds = %93
%99 = load i32, i32* @stderr
%100 = getelementptr inbounds [50 x i8], [50 x i8]* %10, i64 0, i64 0
%101 = call i32 (i32, i8*, ...) @fprintf(i32 %99, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i8* %100)
store i32 5, i32* %3
br label %113
102: ; preds = %93
br label %103
103: ; preds = %102, %90
br label %23
104: ; preds = %32
%105 = load i32*, i32** %8
%106 = icmp ne i32* %105, null
br i1 %106, label %107, label %110
107: ; preds = %104
%108 = load i32*, i32** %8
%109 = call i32 @fclose(i32* %108)
br label %110
110: ; preds = %107, %104
%111 = load i32*, i32** %6
%112 = call i32 @fclose(i32* %111)
br label %113
113: ; preds = %110, %98, %83, %37, %19, %13
%114 = load i32, i32* %3
ret i32 %114
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"card.raw\00"
@.str.2 = [3 x i8] c"rb\00"
@stderr = global i32 0
@.str.3 = [25 x i8] c"Could not open card.raw\0A\00"
@.str.4 = [34 x i8] c"Error reading from file card.raw\0A\00"
@.str.5 = [9 x i8] c"%03d.jpg\00"
@.str.6 = [32 x i8] c"Found a file, writing it to %s\0A\00"
@.str.7 = [3 x i8] c"wb\00"
@.str.8 = [36 x i8] c"Could not open file %s for writing\0A\00"
@.str.9 = [26 x i8] c"Error writing to file %s\0A\00"
@str = [15 x i8] c"Usage: recover\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [512 x i8]
%4 = alloca [50 x i8]
%5 = icmp eq i32 %0, 1
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
br label %81
8: ; preds = %2
%9 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* @stderr
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %81
14: ; preds = %8
%15 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%16 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%17 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 1
%18 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 2
%19 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 3
br label %20
20: ; preds = %70, %14
%21 = phi i32* [ null, %14 ], [ %71, %70 ]
%22 = phi i32 [ 0, %14 ], [ %72, %70 ]
%23 = call i32 @fread(i8* %15, i32 512, i32 1, i32* %9)
%24 = icmp eq i32 %23, 1
br i1 %24, label %34, label %25
25: ; preds = %20
%26 = call i64 @feof(i32* %9)
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %73
28: ; preds = %25
%29 = call i64 @ferror(i32* %9)
%30 = icmp eq i64 %29, 0
br i1 %30, label %34, label %31
31: ; preds = %28
%32 = load i32, i32* @stderr
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
br label %79
34: ; preds = %28, %20
%35 = load i8, i8* %15
%36 = icmp eq i8 %35, -1
%37 = load i8, i8* %17
%38 = icmp eq i8 %37, -40
%39 = select i1 %36, i1 %38, i1 false
%40 = load i8, i8* %18
%41 = icmp eq i8 %40, -1
%42 = select i1 %39, i1 %41, i1 false
br i1 %42, label %43, label %58
43: ; preds = %34
%44 = load i8, i8* %19
%45 = and i8 %44, -2
%46 = icmp eq i8 %45, -32
br i1 %46, label %47, label %58
47: ; preds = %43
%48 = icmp eq i32* %21, null
br i1 %48, label %51, label %49
49: ; preds = %47
%50 = call i32 @fclose(i32* %21)
br label %51
51: ; preds = %49, %47
%52 = call i32 @sprintf(i8* %16, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %22)
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i8* %16)
%54 = call i32* @fopen(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%55 = icmp eq i32* %54, null
br i1 %55, label %65, label %56
56: ; preds = %51
%57 = add nsw i32 %22, 1
br label %60
58: ; preds = %43, %34
%59 = icmp eq i32* %21, null
br i1 %59, label %70, label %60
60: ; preds = %56, %58
%61 = phi i32 [ %57, %56 ], [ %22, %58 ]
%62 = phi i32* [ %54, %56 ], [ %21, %58 ]
%63 = call i32 @fwrite(i8* %15, i32 512, i32 1, i32* %62)
%64 = icmp eq i32 %63, 1
br i1 %64, label %70, label %65
65: ; preds = %60, %51
%66 = phi i8* [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0), %51 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), %60 ]
%67 = phi i32 [ 4, %51 ], [ 5, %60 ]
%68 = load i32, i32* @stderr
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* %66, i8* %16)
br label %79
70: ; preds = %58, %60
%71 = phi i32* [ %62, %60 ], [ null, %58 ]
%72 = phi i32 [ %61, %60 ], [ %22, %58 ]
br label %20
73: ; preds = %25
%74 = icmp eq i32* %21, null
br i1 %74, label %77, label %75
75: ; preds = %73
%76 = call i32 @fclose(i32* %21)
br label %77
77: ; preds = %75, %73
%78 = call i32 @fclose(i32* %9)
br label %79
79: ; preds = %65, %77, %31
%80 = phi i32 [ 0, %77 ], [ 3, %31 ], [ %67, %65 ]
br label %81
81: ; preds = %11, %79, %6
%82 = phi i32 [ 1, %6 ], [ 2, %11 ], [ %80, %79 ]
ret i32 %82
}