#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 atoi(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
int getopt(int, char **, char *);
int /*<<< orphan*/ optarg;
int optind;
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
int main(int argc, char **argv) {
  int c;
  int amount = 10;
  FILE *file;
  while ((c = getopt(argc, argv, "b:")) != -1) {
    switch (c) {
    case 'b':
      amount = atoi(optarg);
      break;
    default:
      fprintf(stderr, "usage: %s file [-b bytes]\n", argv[0]);
      return (1);
    }
  }
  if (optind == argc) {
    file = stdin;
  } else {
    for (; optind < argc; optind++) {
      if ((file = fopen(argv[optind], "rb")) == NULL) {
        perror(argv[optind]);
        return (1);
      }
    }
  }
  char name[4] = {'x', 'a', 'a', '\0'};
  int numfiles = 0;
  while (1) {
    char buffer[amount];
    FILE *newfile;
    if (feof(file)) {
      break;
    }
    if (fgets(buffer, amount + 1, file) == NULL) {
      break;
    }
    if (numfiles < 676) {
      name[1] = numfiles / 26 + 'a';
      name[2] = numfiles % 26 + 'a';
    } else {
      break;
    }
    if ((newfile = fopen(name, "wb")) == NULL) {
      perror(name);
      exit(1);
    }
    fwrite(buffer, amount, 1, newfile);
    fclose(newfile);
    numfiles++;
  }
  fclose(file);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe35(%rip),%rdx
call   1090 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     1230 <main+0x90>
mov    -0x14(%rbp),%eax
sub    $0x62,%eax
jne    1203 <main+0x63>
jmp    11ed <main+0x4d>
mov    0x2e04(%rip),%rax
mov    (%rax),%edi
call   10a0 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    122b <main+0x8b>
mov    0x2dbe(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xde9(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    142f <main+0x28f>
jmp    11bd <main+0x1d>
mov    0x2da1(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jne    1255 <main+0xb5>
mov    0x2d97(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    12df <main+0x13f>
jmp    125a <main+0xba>
mov    0x2d77(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jge    12da <main+0x13a>
mov    -0x10(%rbp),%rax
mov    0x2d61(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd99(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    12bb <main+0x11b>
mov    -0x10(%rbp),%rax
mov    0x2d35(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
call   1080 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    142f <main+0x28f>
jmp    12c0 <main+0x120>
mov    0x2d11(%rip),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    0x2d05(%rip),%rax
mov    %ecx,(%rax)
jmp    125a <main+0xba>
jmp    12df <main+0x13f>
mov    0xd3c(%rip),%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x18(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%rax
je     1334 <main+0x194>
movl   $0x9,-0x44(%rbp)
jmp    13fe <main+0x25e>
mov    -0x50(%rbp),%rdi
mov    -0x18(%rbp),%esi
add    $0x1,%esi
mov    -0x20(%rbp),%rdx
call   1040 <fgets@plt>
cmp    $0x0,%rax
jne    135d <main+0x1bd>
movl   $0x9,-0x44(%rbp)
jmp    13fe <main+0x25e>
cmpl   $0x2a4,-0x28(%rbp)
jge    1393 <main+0x1f3>
mov    -0x28(%rbp),%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x61,%eax
mov    %al,-0x23(%rbp)
mov    -0x28(%rbp),%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x61,%edx
mov    %dl,%al
mov    %al,-0x22(%rbp)
jmp    139f <main+0x1ff>
movl   $0x9,-0x44(%rbp)
jmp    13fe <main+0x25e>
lea    -0x24(%rbp),%rdi
lea    0xc7b(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
jne    13d0 <main+0x230>
lea    -0x24(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0x50(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x40(%rbp),%rcx
mov    $0x1,%edx
call   10c0 <fwrite@plt>
mov    -0x40(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    -0x44(%rbp),%eax
test   %eax,%eax
je     141a <main+0x27a>
jmp    1415 <main+0x275>
jmp    141f <main+0x27f>
jmp    12ef <main+0x14f>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r15
mov    %edi,%r14d
mov    $0xa,%r13d
lea    0xe3c(%rip),%r12
mov    0x2e2d(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14d,%edi
mov    %r15,%rsi
mov    %r12,%rdx
call   1090 <getopt@plt>
cmp    $0x62,%eax
jne    11ef <main+0x4f>
mov    (%rbx),%edi
call   10a0 <atoi@plt>
mov    %eax,%r13d
jmp    11d0 <main+0x30>
cmp    $0xffffffff,%eax
jne    1210 <main+0x70>
mov    0x2ddd(%rip),%r12
mov    (%r12),%eax
cmp    %r14d,%eax
jne    1232 <main+0x92>
mov    0x2dd5(%rip),%rax
mov    (%rax),%rbx
jmp    126e <main+0xce>
mov    0x2db1(%rip),%rax
mov    (%rax),%edi
mov    (%r15),%rdx
lea    0xde0(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%eax
jmp    139d <main+0x1fd>
mov    %r13,-0x40(%rbp)
lea    0xde1(%rip),%r13
nopl   (%rax)
cltq
mov    (%r15,%rax,8),%rdi
mov    %r13,%rsi
call   1070 <fopen@plt>
mov    %rax,%rbx
movslq (%r12),%rax
test   %rbx,%rbx
je     13ac <main+0x20c>
add    $0x1,%eax
mov    %eax,(%r12)
cmp    %r14d,%eax
jl     1240 <main+0xa0>
mov    -0x40(%rbp),%r13
mov    %rsp,-0x50(%rbp)
movl   $0x616178,-0x30(%rbp)
mov    %r13d,%r15d
mov    %rsp,%r14
add    $0xf,%r15
and    $0xfffffffffffffff0,%r15
sub    %r15,%r14
mov    %r14,%rsp
mov    %rbx,%rdi
call   1060 <feof@plt>
test   %rax,%rax
jne    138f <main+0x1ef>
mov    %r15,-0x58(%rbp)
mov    %r13,-0x40(%rbp)
lea    0x1(%r13),%eax
mov    %eax,-0x44(%rbp)
xor    %r13d,%r13d
mov    $0x61,%r15b
movl   $0x0,-0x34(%rbp)
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    -0x44(%rbp),%esi
mov    %rbx,%rdx
call   1040 <fgets@plt>
test   %rax,%rax
je     138f <main+0x1ef>
mov    -0x34(%rbp),%r12d
cmp    $0x2a3,%r12d
ja     138f <main+0x1ef>
movzwl %r13w,%eax
imul   $0x4ec5,%eax,%eax
shr    $0x13,%eax
lea    (%rax,%rax,4),%ecx
lea    (%rcx,%rcx,4),%ecx
add    %eax,%ecx
mov    %r15d,%eax
mov    %r15b,-0x29(%rbp)
sub    %cl,%al
movzwl %r12w,%ecx
imul   $0x4ec5,%ecx,%ecx
shr    $0x13,%ecx
add    $0x61,%cl
mov    %cl,-0x2f(%rbp)
mov    %al,-0x2e(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xcfa(%rip),%rsi
call   1070 <fopen@plt>
test   %rax,%rax
je     13bc <main+0x21c>
mov    %r13d,%r15d
mov    %rax,%r13
mov    %r14,%rdi
mov    -0x40(%rbp),%rsi
mov    $0x1,%edx
mov    %rax,%rcx
call   10c0 <fwrite@plt>
mov    %r13,%rdi
call   1030 <fclose@plt>
add    $0x1,%r12d
mov    %r12d,-0x34(%rbp)
mov    -0x50(%rbp),%rsp
mov    %rsp,%r14
sub    -0x58(%rbp),%r14
mov    %r14,%rsp
mov    %rbx,%rdi
call   1060 <feof@plt>
movzbl -0x29(%rbp),%ecx
add    $0x1,%cl
add    $0x1,%r15d
test   %rax,%rax
mov    %r15d,%r13d
mov    %ecx,%r15d
je     12c0 <main+0x120>
mov    -0x50(%rbp),%rsp
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%r15,%rax,8),%rdi
call   1080 <perror@plt>
mov    $0x1,%eax
jmp    139d <main+0x1fd>
lea    -0x30(%rbp),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"b:\00"
@optarg = global i32 0
@stderr = global i32 0
@.str.1 = [27 x i8] c"usage: %s file [-b bytes]\0A\00"
@optind = global i32 0
@stdin = global i32* null
@.str.2 = [3 x i8] c"rb\00"
@__const.main.name = [4 x i8] c"xaa\00"
@.str.3 = [3 x i8] c"wb\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca [4 x i8]
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i32*
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10, i32* %7
br label %15
15: ; preds = %31, %2
%16 = load i32, i32* %4
%17 = load i8**, i8*** %5
%18 = call i32 @getopt(i32 %16, i8** %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 %18, i32* %6
%19 = icmp ne i32 %18, -1
br i1 %19, label %20, label %32
20: ; preds = %15
%21 = load i32, i32* %6
switch i32 %21, label %25 [
i32 98, label %22
]
22: ; preds = %20
%23 = load i32, i32* @optarg
%24 = call i32 @atoi(i32 %23)
store i32 %24, i32* %7
br label %31
25: ; preds = %20
%26 = load i32, i32* @stderr
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 0
%29 = load i8*, i8** %28
%30 = call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %29)
store i32 1, i32* %3
br label %119
31: ; preds = %22
br label %15
32: ; preds = %15
%33 = load i32, i32* @optind
%34 = load i32, i32* %4
%35 = icmp eq i32 %33, %34
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = load i32*, i32** @stdin
store i32* %37, i32** %8
br label %63
38: ; preds = %32
br label %39
39: ; preds = %59, %38
%40 = load i32, i32* @optind
%41 = load i32, i32* %4
%42 = icmp slt i32 %40, %41
br i1 %42, label %43, label %62
43: ; preds = %39
%44 = load i8**, i8*** %5
%45 = load i32, i32* @optind
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8*, i8** %44, i64 %46
%48 = load i8*, i8** %47
%49 = call i32* @fopen(i8* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32* %49, i32** %8
%50 = icmp eq i32* %49, null
br i1 %50, label %51, label %58
51: ; preds = %43
%52 = load i8**, i8*** %5
%53 = load i32, i32* @optind
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i8*, i8** %52, i64 %54
%56 = load i8*, i8** %55
%57 = call i32 @perror(i8* %56)
store i32 1, i32* %3
br label %119
58: ; preds = %43
br label %59
59: ; preds = %58
%60 = load i32, i32* @optind
%61 = add nsw i32 %60, 1
store i32 %61, i32* @optind
br label %39
62: ; preds = %39
br label %63
63: ; preds = %62, %36
%64 = bitcast [4 x i8]* %9 to i8*
store i32 0, i32* %10
br label %65
65: ; preds = %63, %115
%66 = load i32, i32* %7
%67 = zext i32 %66 to i64
%68 = call i8* @llvm.stacksave()
store i8* %68, i8** %11
%69 = alloca i8, i64 %67
store i64 %67, i64* %12
%70 = load i32*, i32** %8
%71 = call i64 @feof(i32* %70)
%72 = icmp ne i64 %71, 0
br i1 %72, label %73, label %74
73: ; preds = %65
store i32 9, i32* %14
br label %112
74: ; preds = %65
%75 = load i32, i32* %7
%76 = add nsw i32 %75, 1
%77 = load i32*, i32** %8
%78 = call i32* @fgets(i8* %69, i32 %76, i32* %77)
%79 = icmp eq i32* %78, null
br i1 %79, label %80, label %81
80: ; preds = %74
store i32 9, i32* %14
br label %112
81: ; preds = %74
%82 = load i32, i32* %10
%83 = icmp slt i32 %82, 676
br i1 %83, label %84, label %95
84: ; preds = %81
%85 = load i32, i32* %10
%86 = sdiv i32 %85, 26
%87 = add nsw i32 %86, 97
%88 = trunc i32 %87 to i8
%89 = getelementptr inbounds [4 x i8], [4 x i8]* %9, i64 0, i64 1
store i8 %88, i8* %89
%90 = load i32, i32* %10
%91 = srem i32 %90, 26
%92 = add nsw i32 %91, 97
%93 = trunc i32 %92 to i8
%94 = getelementptr inbounds [4 x i8], [4 x i8]* %9, i64 0, i64 2
store i8 %93, i8* %94
br label %96
95: ; preds = %81
store i32 9, i32* %14
br label %112
96: ; preds = %84
%97 = getelementptr inbounds [4 x i8], [4 x i8]* %9, i64 0, i64 0
%98 = call i32* @fopen(i8* %97, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %98, i32** %13
%99 = icmp eq i32* %98, null
br i1 %99, label %100, label %104
100: ; preds = %96
%101 = getelementptr inbounds [4 x i8], [4 x i8]* %9, i64 0, i64 0
%102 = call i32 @perror(i8* %101)
%103 = call i32 @exit(i32 1)
unreachable
104: ; preds = %96
%105 = load i32, i32* %7
%106 = load i32*, i32** %13
%107 = call i32 @fwrite(i8* %69, i32 %105, i32 1, i32* %106)
%108 = load i32*, i32** %13
%109 = call i32 @fclose(i32* %108)
%110 = load i32, i32* %10
%111 = add nsw i32 %110, 1
store i32 %111, i32* %10
store i32 0, i32* %14
br label %112
112: ; preds = %104, %95, %80, %73
%113 = load i8*, i8** %11
%114 = load i32, i32* %14
switch i32 %114, label %121 [
i32 0, label %115
i32 9, label %116
]
115: ; preds = %112
br label %65
116: ; preds = %112
%117 = load i32*, i32** %8
%118 = call i32 @fclose(i32* %117)
store i32 0, i32* %3
br label %119
119: ; preds = %116, %51, %25
%120 = load i32, i32* %3
ret i32 %120
121: ; preds = %112
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"b:\00"
@optarg = global i32 0
@stderr = global i32 0
@.str.1 = [27 x i8] c"usage: %s file [-b bytes]\0A\00"
@optind = global i32 0
@stdin = global i32* null
@.str.2 = [3 x i8] c"rb\00"
@.str.3 = [3 x i8] c"wb\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to [4 x i8]*
br label %5
5: ; preds = %8, %2
%6 = phi i32 [ 10, %2 ], [ %10, %8 ]
%7 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
switch i32 %7, label %11 [
i32 -1, label %15
i32 98, label %8
]
8: ; preds = %5
%9 = load i32, i32* @optarg
%10 = tail call i32 @atoi(i32 %9)
br label %5
11: ; preds = %5
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %1
%14 = tail call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %13)
br label %83
15: ; preds = %5
%16 = load i32, i32* @optind
%17 = icmp eq i32 %16, %0
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = icmp slt i32 %16, %0
br label %22
20: ; preds = %15
%21 = load i32*, i32** @stdin
br label %38
22: ; preds = %18, %35
%23 = phi i32 [ %36, %35 ], [ %16, %18 ]
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8*, i8** %1, i64 %24
%26 = load i8*, i8** %25
%27 = tail call i32* @fopen(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%28 = icmp eq i32* %27, null
%29 = load i32, i32* @optind
br i1 %28, label %30, label %35
30: ; preds = %22
%31 = sext i32 %29 to i64
%32 = getelementptr inbounds i8*, i8** %1, i64 %31
%33 = load i8*, i8** %32
%34 = tail call i32 @perror(i8* %33)
br label %83
35: ; preds = %22
%36 = add nsw i32 %29, 1
store i32 %36, i32* @optind
%37 = icmp slt i32 %36, %0
br i1 %37, label %22, label %38
38: ; preds = %35, %20
%39 = phi i32* [ %21, %20 ], [ %27, %35 ]
%40 = bitcast i32* %3 to i8*
store i32 6381944, i32* %3
%41 = zext i32 %6 to i64
%42 = call i8* @llvm.stacksave()
%43 = alloca i8, i64 %41
%44 = call i64 @feof(i32* %39)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %80
46: ; preds = %38
%47 = add nsw i32 %6, 1
%48 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 1
%49 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 2
br label %50
50: ; preds = %46, %72
%51 = phi i8* [ %43, %46 ], [ %77, %72 ]
%52 = phi i8* [ %42, %46 ], [ %76, %72 ]
%53 = phi i32 [ 0, %46 ], [ %75, %72 ]
%54 = call i32* @fgets(i8* %51, i32 %47, i32* %39)
%55 = icmp ne i32* %54, null
%56 = icmp ult i32 %53, 676
%57 = select i1 %55, i1 %56, i1 false
br i1 %57, label %58, label %80
58: ; preds = %50
%59 = trunc i32 %53 to i16
%60 = udiv i16 %59, 26
%61 = trunc i16 %60 to i8
%62 = add nuw nsw i8 %61, 97
store i8 %62, i8* %48
%63 = trunc i32 %53 to i16
%64 = urem i16 %63, 26
%65 = trunc i16 %64 to i8
%66 = add nuw nsw i8 %65, 97
store i8 %66, i8* %49
%67 = call i32* @fopen(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%68 = icmp eq i32* %67, null
br i1 %68, label %69, label %72
69: ; preds = %58
%70 = call i32 @perror(i8* %40)
%71 = call i32 @exit(i32 1)
unreachable
72: ; preds = %58
%73 = call i32 @fwrite(i8* %51, i32 %6, i32 1, i32* %67)
%74 = call i32 @fclose(i32* %67)
%75 = add nuw nsw i32 %53, 1
%76 = call i8* @llvm.stacksave()
%77 = alloca i8, i64 %41
%78 = call i64 @feof(i32* %39)
%79 = icmp eq i64 %78, 0
br i1 %79, label %50, label %80
80: ; preds = %50, %72, %38
%81 = phi i8* [ %42, %38 ], [ %76, %72 ], [ %52, %50 ]
%82 = call i32 @fclose(i32* %39)
br label %83
83: ; preds = %80, %30, %11
%84 = phi i32 [ 1, %11 ], [ 0, %80 ], [ 1, %30 ]
ret i32 %84
}