#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 */
char EOF;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ get_hostname(char *);
int /*<<< orphan*/ get_time(char *);
char *malloc(int);
int /*<<< orphan*/ pkt_header(char *, int, int, int, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ sprintf(char *, char *, int, int, int);
int main(int argc, char **argv) {
  FILE *fh;
  int i, j;
  char c;
  bool eof = false;
  int mag = 1, ten = 0, page = 0;
  char *buffer = malloc(42);
  if (argc != 2) {
    printf("%s <filename>\n\n", argv[0]);
    return 5;
  }
  fh = fopen(argv[1], "r");
  while (1) {
    for (j = 0; j < 24; j++) {
      if (j > 0) {
        for (i = 0; i < 40; i++) {
          c = fgetc(fh);
          if ((c == EOF) || (c == 255))
            eof = true;
          if ((eof != true) && (c != '\n')) {
            buffer[i + 2] = c;
          } else {
            while (i < 40) {
              buffer[i + 2] = ' ';
              i++;
            }
            break;
          }
        }
      } else {
        get_hostname(buffer + 10);
        sprintf(buffer + 18, "\x06%d%d%d", mag, ten, page);
        get_time(buffer + 22);
      }
      pkt_header(buffer, j, mag, ten, page);
      for (i = 0; i < 42; i++) {
        putchar(buffer[i]);
      }
    }
    page++;
    if (page == 10) {
      page = 0;
      ten++;
      if (ten == 10) {
        ten = 0;
        mag++;
      }
    }
    if (eof == true) {
      fclose(fh);
      eof = false;
      mag = 1;
      ten = 0;
      page = 0;
      fh = fopen(argv[1], "r");
    }
  }
  free(buffer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    $0x2a,%edi
call   1090 <malloc@plt>
mov    %rax,-0x40(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1208 <main+0x68>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe08(%rip),%rdi
call   1060 <printf@plt>
mov    $0x5,%eax
add    $0x40,%rsp
pop    %rbp
ret
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf9(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x18,-0x20(%rbp)
jge    138f <main+0x1ef>
cmpl   $0x0,-0x20(%rbp)
jle    12fe <main+0x15e>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x28,-0x1c(%rbp)
jge    12f9 <main+0x159>
mov    -0x18(%rbp),%rdi
call   1070 <fgetc@plt>
mov    %al,-0x21(%rbp)
movsbl -0x21(%rbp),%eax
mov    0x2d85(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     127d <main+0xdd>
movsbl -0x21(%rbp),%eax
cmp    $0xff,%eax
jne    1284 <main+0xe4>
movl   $0x1,-0x28(%rbp)
cmpl   $0x1,-0x28(%rbp)
je     12b3 <main+0x113>
movsbl -0x21(%rbp),%eax
cmp    $0xa,%eax
je     12b3 <main+0x113>
mov    -0x21(%rbp),%dl
mov    -0x40(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    12e6 <main+0x146>
jmp    12b8 <main+0x118>
cmpl   $0x28,-0x1c(%rbp)
jge    12e1 <main+0x141>
mov    -0x40(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12b8 <main+0x118>
jmp    12f9 <main+0x159>
jmp    12eb <main+0x14b>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1242 <main+0xa2>
jmp    1336 <main+0x196>
mov    -0x40(%rbp),%rdi
add    $0xa,%rdi
call   10b0 <get_hostname@plt>
mov    -0x40(%rbp),%rdi
add    $0x12,%rdi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    -0x34(%rbp),%r8d
lea    0xcee(%rip),%rsi
call   10c0 <sprintf@plt>
mov    -0x40(%rbp),%rdi
add    $0x16,%rdi
call   1080 <get_time@plt>
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    -0x34(%rbp),%r8d
call   1030 <pkt_header@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2a,-0x1c(%rbp)
jge    137c <main+0x1dc>
mov    -0x40(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <putchar@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1353 <main+0x1b3>
jmp    1381 <main+0x1e1>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1227 <main+0x87>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jne    13d1 <main+0x231>
movl   $0x0,-0x34(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
cmpl   $0xa,-0x30(%rbp)
jne    13cc <main+0x22c>
movl   $0x0,-0x30(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    13d1 <main+0x231>
cmpl   $0x1,-0x28(%rbp)
jne    1418 <main+0x278>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xc01(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
jmp    1220 <main+0x80>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%rbp
mov    %edi,%r14d
mov    $0x2a,%edi
call   10a0 <malloc@plt>
cmp    $0x2,%r14d
jne    13b3 <main+0x203>
mov    %rax,%rbx
mov    0x8(%rbp),%rdi
lea    0xe2a(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,0x18(%rsp)
lea    0xa(%rbx),%rax
mov    %rax,0x40(%rsp)
lea    0x12(%rbx),%rax
mov    %rax,0x38(%rsp)
lea    0x16(%rbx),%rax
mov    %rax,0x30(%rsp)
mov    %rbx,%rax
add    $0x2,%rax
mov    %rax,0x20(%rsp)
mov    %rbp,0x28(%rsp)
jmp    1244 <main+0x94>
xchg   %ax,%ax
mov    0x18(%rsp),%rdi
call   1050 <fclose@plt>
mov    0x28(%rsp),%rbp
mov    0x8(%rbp),%rdi
lea    0xdd6(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,0x18(%rsp)
movl   $0x1,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
mov    0x20(%rsp),%rbp
jmp    1276 <main+0xc6>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0x1,%r15d
je     1220 <main+0x70>
xor    %r15d,%r15d
xor    %r14d,%r14d
nopl   0x0(%rax)
test   %r14d,%r14d
je     12d0 <main+0x120>
xor    %r12d,%r12d
nopl   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rdi
call   1080 <fgetc@plt>
mov    $0x1,%r13d
mov    0x2d41(%rip),%rcx
cmp    (%rcx),%al
je     12ae <main+0xfe>
mov    %r15d,%r13d
cmp    $0xa,%al
je     1310 <main+0x160>
cmp    $0x1,%r13d
je     1310 <main+0x160>
mov    %al,0x0(%rbp,%r12,1)
add    $0x1,%r12
xor    %r15d,%r15d
cmp    $0x28,%r12
jne    1290 <main+0xe0>
jmp    132f <main+0x17f>
nopl   0x0(%rax)
mov    0x40(%rsp),%rdi
call   10c0 <get_hostname@plt>
mov    0x38(%rsp),%rdi
lea    0xd2c(%rip),%rsi
mov    0x14(%rsp),%edx
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%r8d
call   10d0 <sprintf@plt>
mov    0x30(%rsp),%rdi
call   1090 <get_time@plt>
jmp    132f <main+0x17f>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0x27,%r12d
ja     132c <main+0x17c>
lea    (%r12,%rbp,1),%rdi
mov    $0x28,%edx
sub    %r12,%rdx
mov    $0x20,%esi
call   1070 <memset@plt>
mov    %r13d,%r15d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    0x14(%rsp),%edx
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%r8d
call   1030 <pkt_header@plt>
xor    %ebp,%ebp
nopl   0x0(%rax)
movsbl (%rbx,%rbp,1),%edi
call   1040 <putchar@plt>
add    $0x1,%rbp
cmp    $0x2a,%rbp
jne    1350 <main+0x1a0>
add    $0x1,%r14d
cmp    $0x18,%r14d
mov    0x20(%rsp),%rbp
jne    1280 <main+0xd0>
mov    0xc(%rsp),%eax
add    $0x1,%eax
mov    %eax,0xc(%rsp)
cmp    $0xa,%eax
jne    1270 <main+0xc0>
mov    0x10(%rsp),%ecx
add    $0x1,%ecx
xor    %edx,%edx
xor    %eax,%eax
cmp    $0xa,%ecx
sete   %al
movl   $0x0,0xc(%rsp)
cmove  %edx,%ecx
mov    %ecx,0x10(%rsp)
add    %eax,0x14(%rsp)
jmp    1270 <main+0xc0>
mov    0x0(%rbp),%rsi
lea    0xc42(%rip),%rdi
call   1060 <printf@plt>
mov    $0x5,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"%s <filename>\0A\0A\00"
@.str.1 = [2 x i8] c"r\00"
@EOF = global i8 0
@.str.2 = [8 x i8] c"\06%d%d%d\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 i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %10
store i32 1, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
%15 = call i8* @malloc(i32 42)
store i8* %15, i8** %14
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 2
br i1 %17, label %18, label %23
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %21)
ret i32 5
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32* @fopen(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %27, i32** %6
br label %28
28: ; preds = %23, %145
store i32 0, i32* %8
br label %29
29: ; preds = %118, %28
%30 = load i32, i32* %8
%31 = icmp slt i32 %30, 24
br i1 %31, label %32, label %121
32: ; preds = %29
%33 = load i32, i32* %8
%34 = icmp sgt i32 %33, 0
br i1 %34, label %35, label %84
35: ; preds = %32
store i32 0, i32* %7
br label %36
36: ; preds = %80, %35
%37 = load i32, i32* %7
%38 = icmp slt i32 %37, 40
br i1 %38, label %39, label %83
39: ; preds = %36
%40 = load i32*, i32** %6
%41 = call signext i8 @fgetc(i32* %40)
store i8 %41, i8* %9
%42 = load i8, i8* %9
%43 = sext i8 %42 to i32
%44 = load i8, i8* @EOF
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %43, %45
br i1 %46, label %51, label %47
47: ; preds = %39
%48 = load i8, i8* %9
%49 = sext i8 %48 to i32
%50 = icmp eq i32 %49, 255
br i1 %50, label %51, label %52
51: ; preds = %47, %39
store i32 1, i32* %10
br label %52
52: ; preds = %51, %47
%53 = load i32, i32* %10
%54 = icmp ne i32 %53, 1
br i1 %54, label %55, label %66
55: ; preds = %52
%56 = load i8, i8* %9
%57 = sext i8 %56 to i32
%58 = icmp ne i32 %57, 10
br i1 %58, label %59, label %66
59: ; preds = %55
%60 = load i8, i8* %9
%61 = load i8*, i8** %14
%62 = load i32, i32* %7
%63 = add nsw i32 %62, 2
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8, i8* %61, i64 %64
store i8 %60, i8* %65
br label %79
66: ; preds = %55, %52
br label %67
67: ; preds = %70, %66
%68 = load i32, i32* %7
%69 = icmp slt i32 %68, 40
br i1 %69, label %70, label %78
70: ; preds = %67
%71 = load i8*, i8** %14
%72 = load i32, i32* %7
%73 = add nsw i32 %72, 2
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8, i8* %71, i64 %74
store i8 32, i8* %75
%76 = load i32, i32* %7
%77 = add nsw i32 %76, 1
store i32 %77, i32* %7
br label %67
78: ; preds = %67
br label %83
79: ; preds = %59
br label %80
80: ; preds = %79
%81 = load i32, i32* %7
%82 = add nsw i32 %81, 1
store i32 %82, i32* %7
br label %36
83: ; preds = %78, %36
br label %97
84: ; preds = %32
%85 = load i8*, i8** %14
%86 = getelementptr inbounds i8, i8* %85, i64 10
%87 = call i32 @get_hostname(i8* %86)
%88 = load i8*, i8** %14
%89 = getelementptr inbounds i8, i8* %88, i64 18
%90 = load i32, i32* %11
%91 = load i32, i32* %12
%92 = load i32, i32* %13
%93 = call i32 @sprintf(i8* %89, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %90, i32 %91, i32 %92)
%94 = load i8*, i8** %14
%95 = getelementptr inbounds i8, i8* %94, i64 22
%96 = call i32 @get_time(i8* %95)
br label %97
97: ; preds = %84, %83
%98 = load i8*, i8** %14
%99 = load i32, i32* %8
%100 = load i32, i32* %11
%101 = load i32, i32* %12
%102 = load i32, i32* %13
%103 = call i32 @pkt_header(i8* %98, i32 %99, i32 %100, i32 %101, i32 %102)
store i32 0, i32* %7
br label %104
104: ; preds = %114, %97
%105 = load i32, i32* %7
%106 = icmp slt i32 %105, 42
br i1 %106, label %107, label %117
107: ; preds = %104
%108 = load i8*, i8** %14
%109 = load i32, i32* %7
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds i8, i8* %108, i64 %110
%112 = load i8, i8* %111
%113 = call i32 @putchar(i8 signext %112)
br label %114
114: ; preds = %107
%115 = load i32, i32* %7
%116 = add nsw i32 %115, 1
store i32 %116, i32* %7
br label %104
117: ; preds = %104
br label %118
118: ; preds = %117
%119 = load i32, i32* %8
%120 = add nsw i32 %119, 1
store i32 %120, i32* %8
br label %29
121: ; preds = %29
%122 = load i32, i32* %13
%123 = add nsw i32 %122, 1
store i32 %123, i32* %13
%124 = load i32, i32* %13
%125 = icmp eq i32 %124, 10
br i1 %125, label %126, label %135
126: ; preds = %121
store i32 0, i32* %13
%127 = load i32, i32* %12
%128 = add nsw i32 %127, 1
store i32 %128, i32* %12
%129 = load i32, i32* %12
%130 = icmp eq i32 %129, 10
br i1 %130, label %131, label %134
131: ; preds = %126
store i32 0, i32* %12
%132 = load i32, i32* %11
%133 = add nsw i32 %132, 1
store i32 %133, i32* %11
br label %134
134: ; preds = %131, %126
br label %135
135: ; preds = %134, %121
%136 = load i32, i32* %10
%137 = icmp eq i32 %136, 1
br i1 %137, label %138, label %145
138: ; preds = %135
%139 = load i32*, i32** %6
%140 = call i32 @fclose(i32* %139)
store i32 0, i32* %10
store i32 1, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
%141 = load i8**, i8*** %5
%142 = getelementptr inbounds i8*, i8** %141, i64 1
%143 = load i8*, i8** %142
%144 = call i32* @fopen(i8* %143, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %144, i32** %6
br label %145
145: ; preds = %138, %135
br label %28
}

LLVM IR (-O2):
@.str = [16 x i8] c"%s <filename>\0A\0A\00"
@.str.1 = [2 x i8] c"r\00"
@EOF = global i8 0
@.str.2 = [8 x i8] c"\06%d%d%d\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call dereferenceable_or_null(42) i8* @malloc(i32 42)
%4 = icmp eq i32 %0, 2
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i8*, i8** %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 5
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32* @fopen(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = getelementptr inbounds i8, i8* %3, i64 10
%13 = getelementptr inbounds i8, i8* %3, i64 18
%14 = getelementptr inbounds i8, i8* %3, i64 22
%15 = getelementptr i8, i8* %3, i64 2
br label %16
16: ; preds = %79, %8
%17 = phi i32* [ %82, %79 ], [ %11, %8 ]
br label %18
18: ; preds = %16, %74
%19 = phi i32 [ %75, %74 ], [ 1, %16 ]
%20 = phi i32 [ %76, %74 ], [ 0, %16 ]
%21 = phi i32 [ %77, %74 ], [ 0, %16 ]
br label %22
22: ; preds = %18, %62
%23 = phi i32 [ 0, %18 ], [ %53, %62 ]
%24 = phi i32 [ 0, %18 ], [ %63, %62 ]
%25 = icmp eq i32 %24, 0
br i1 %25, label %48, label %26
26: ; preds = %22, %43
%27 = phi i64 [ %46, %43 ], [ 0, %22 ]
%28 = phi i32 [ 0, %43 ], [ %23, %22 ]
%29 = tail call signext i8 @fgetc(i32* %17)
%30 = load i8, i8* @EOF
%31 = icmp eq i8 %29, %30
%32 = select i1 %31, i32 1, i32 %28
%33 = icmp ne i32 %32, 1
%34 = icmp ne i8 %29, 10
%35 = and i1 %34, %33
br i1 %35, label %43, label %36
36: ; preds = %26
%37 = trunc i64 %27 to i32
%38 = icmp ult i32 %37, 40
br i1 %38, label %39, label %52
39: ; preds = %36
%40 = getelementptr i8, i8* %15, i64 %27
%41 = sub nsw i64 40, %27
%42 = and i64 %41, 4294967295
br label %52
43: ; preds = %26
%44 = add nuw nsw i64 %27, 2
%45 = getelementptr inbounds i8, i8* %3, i64 %44
store i8 %29, i8* %45
%46 = add nuw nsw i64 %27, 1
%47 = icmp eq i64 %46, 40
br i1 %47, label %52, label %26
48: ; preds = %22
%49 = tail call i32 @get_hostname(i8* %12)
%50 = tail call i32 @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %19, i32 %20, i32 %21)
%51 = tail call i32 @get_time(i8* %14)
br label %52
52: ; preds = %43, %39, %36, %48
%53 = phi i32 [ %23, %48 ], [ %32, %36 ], [ %32, %39 ], [ 0, %43 ]
%54 = tail call i32 @pkt_header(i8* %3, i32 %24, i32 %19, i32 %20, i32 %21)
br label %55
55: ; preds = %52, %55
%56 = phi i64 [ 0, %52 ], [ %60, %55 ]
%57 = getelementptr inbounds i8, i8* %3, i64 %56
%58 = load i8, i8* %57
%59 = tail call i32 @putchar(i8 signext %58)
%60 = add nuw nsw i64 %56, 1
%61 = icmp eq i64 %60, 42
br i1 %61, label %62, label %55
62: ; preds = %55
%63 = add nuw nsw i32 %24, 1
%64 = icmp eq i32 %63, 24
br i1 %64, label %65, label %22
65: ; preds = %62
%66 = add nsw i32 %21, 1
%67 = icmp eq i32 %66, 10
br i1 %67, label %68, label %74
68: ; preds = %65
%69 = add nsw i32 %20, 1
%70 = icmp eq i32 %69, 10
%71 = zext i1 %70 to i32
%72 = add nsw i32 %19, %71
%73 = select i1 %70, i32 0, i32 %69
br label %74
74: ; preds = %68, %65
%75 = phi i32 [ %19, %65 ], [ %72, %68 ]
%76 = phi i32 [ %20, %65 ], [ %73, %68 ]
%77 = phi i32 [ %66, %65 ], [ 0, %68 ]
%78 = icmp eq i32 %53, 1
br i1 %78, label %79, label %18
79: ; preds = %74
%80 = tail call i32 @fclose(i32* %17)
%81 = load i8*, i8** %9
%82 = tail call i32* @fopen(i8* %81, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %16
}