#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*/ SEEK_END;
char *calloc(long, int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
size_t scan_input(char *infile, char **buffer) {
  FILE *input;
  long filesize;
  int character;
  bool comment = false, hadspace = true;
  size_t scanned_length = 0;
  printf(" M:SCAN: Opening %s for mode rb\n", infile);
  input = fopen(infile, "rb");
  if (!input) {
    printf(" E:SCAN: Could not open input file\n");
    return 0;
  }
  fseek(input, 0, SEEK_END);
  filesize = ftell(input);
  rewind(input);
  printf(" M:SCAN: Input file is %ld bytes long\n", filesize);
  *buffer = calloc(filesize + 1, sizeof(char));
  if (!(*buffer)) {
    printf(" E:SCAN: Failed to allocate memory for input buffer\n");
    fclose(input);
    return 0;
  }
  while (!feof(input)) {
    character = fgetc(input);
    switch (character) {
    case ';':
      comment = true;
      break;
    case ' ':
    case '\t':
      if (!hadspace && !comment) {
        (*buffer)[scanned_length++] = ' ';
      }
      hadspace = true;
    case -1:
    case '\r':
      break;
    case '\n':
      if (scanned_length > 0 && (*buffer)[scanned_length - 1] == ' ') {
        scanned_length--;
      }
      (*buffer)[scanned_length++] = '\n';
      comment = false;
      hadspace = true;
      break;
    case '=':
    case ':':
      if (!comment && scanned_length > 0 &&
          (*buffer)[scanned_length - 1] == ' ') {
        scanned_length--;
      }
    default:
      hadspace = false;
      if (!comment) {
        (*buffer)[scanned_length++] = character;
      }
      break;
    }
  }
  fclose(input);
  printf(" M:SCAN: Scanner pass returned %zu bytes\n", scanned_length);
  return scanned_length;
}


x86 assembly (clang, -O0):
<scan_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x1,-0x34(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xf3b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
lea    0xf4a(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1202 <scan_input+0x72>
lea    0xf32(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x0,-0x8(%rbp)
jmp    1428 <scan_input+0x298>
mov    -0x20(%rbp),%rdi
mov    0x2ddb(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10a0 <fseek@plt>
mov    -0x20(%rbp),%rdi
call   1080 <ftell@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <rewind@plt>
mov    -0x28(%rbp),%rsi
lea    0xf0d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%rdi
add    $0x1,%rdi
mov    $0x1,%esi
call   1070 <calloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
jne    128c <scan_input+0xfc>
lea    0xefc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
movq   $0x0,-0x8(%rbp)
jmp    1428 <scan_input+0x298>
jmp    1291 <scan_input+0x101>
mov    -0x20(%rbp),%rdi
call   1090 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    12af <scan_input+0x11f>
jmp    1405 <scan_input+0x275>
mov    -0x20(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,%ecx
mov    %rcx,-0x48(%rbp)
sub    $0x3e,%eax
ja     13cc <scan_input+0x23c>
mov    -0x48(%rbp),%rax
lea    0xd25(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x30(%rbp)
jmp    1400 <scan_input+0x270>
cmpl   $0x0,-0x34(%rbp)
jne    131e <scan_input+0x18e>
cmpl   $0x0,-0x30(%rbp)
jne    131e <scan_input+0x18e>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x40(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x40(%rbp)
movb   $0x20,(%rax,%rcx,1)
movl   $0x1,-0x34(%rbp)
jmp    1400 <scan_input+0x270>
cmpq   $0x0,-0x40(%rbp)
jbe    135d <scan_input+0x1cd>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x40(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    135d <scan_input+0x1cd>
mov    -0x40(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x40(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x40(%rbp)
movb   $0xa,(%rax,%rcx,1)
movl   $0x0,-0x30(%rbp)
movl   $0x1,-0x34(%rbp)
jmp    1400 <scan_input+0x270>
cmpl   $0x0,-0x30(%rbp)
jne    13c7 <scan_input+0x237>
cmpq   $0x0,-0x40(%rbp)
jbe    13c7 <scan_input+0x237>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x40(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    13c7 <scan_input+0x237>
mov    -0x40(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x40(%rbp)
jmp    13cc <scan_input+0x23c>
movl   $0x0,-0x34(%rbp)
cmpl   $0x0,-0x30(%rbp)
jne    13fb <scan_input+0x26b>
mov    -0x2c(%rbp),%eax
mov    %al,%dl
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x40(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x40(%rbp)
mov    %dl,(%rax,%rcx,1)
jmp    1400 <scan_input+0x270>
jmp    1291 <scan_input+0x101>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x40(%rbp),%rsi
lea    0xd87(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_input>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xf44(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf54(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1255 <scan_input+0xb5>
mov    %rax,%r12
mov    0x2e08(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
xor    %esi,%esi
call   10b0 <fseek@plt>
mov    %r12,%rdi
call   1090 <ftell@plt>
mov    %rax,%rbx
mov    %r12,%rdi
call   1060 <rewind@plt>
lea    0xf1a(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1080 <calloc@plt>
mov    %rax,(%r14)
test   %rax,%rax
je     1263 <scan_input+0xc3>
mov    %r12,%rdi
call   10a0 <feof@plt>
xor    %ebx,%ebx
test   %eax,%eax
je     128c <scan_input+0xec>
xor    %r15d,%r15d
mov    %r12,%rdi
call   1040 <fclose@plt>
lea    0xefe(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    127a <scan_input+0xda>
lea    0xf15(%rip),%rdi
call   1030 <puts@plt>
jmp    1277 <scan_input+0xd7>
lea    0xf2a(%rip),%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
call   1040 <fclose@plt>
xor    %r15d,%r15d
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%ebp
lea    0xd68(%rip),%r13
xor    %r15d,%r15d
jmp    12c0 <scan_input+0x120>
mov    (%r14),%rcx
mov    %al,(%rcx,%r15,1)
add    $0x1,%r15
xor    %ebx,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    %r12,%rdi
call   10a0 <feof@plt>
test   %eax,%eax
jne    123a <scan_input+0x9a>
mov    %r12,%rdi
call   1070 <fgetc@plt>
lea    0x1(%rax),%ecx
cmp    $0x3e,%ecx
ja     1310 <scan_input+0x170>
movslq 0x0(%r13,%rcx,4),%rcx
add    %r13,%rcx
jmp    *%rcx
or     %ebx,%ebp
je     133d <scan_input+0x19d>
mov    $0x1,%ebp
jmp    12b0 <scan_input+0x110>
cs nopw 0x0(%rax,%rax,1)
nop
test   %ebx,%ebx
jne    1310 <scan_input+0x170>
test   %r15,%r15
je     1310 <scan_input+0x170>
mov    (%r14),%rcx
cmpb   $0x20,-0x1(%rcx,%r15,1)
jne    12a0 <scan_input+0x100>
add    $0xffffffffffffffff,%r15
jmp    12a0 <scan_input+0x100>
nopw   0x0(%rax,%rax,1)
test   %ebx,%ebx
je     129d <scan_input+0xfd>
xor    %ebp,%ebp
mov    $0x1,%ebx
jmp    12b0 <scan_input+0x110>
mov    (%r14),%rax
test   %r15,%r15
je     1355 <scan_input+0x1b5>
cmpb   $0x20,-0x1(%rax,%r15,1)
jne    1358 <scan_input+0x1b8>
add    $0xffffffffffffffff,%r15
jmp    1358 <scan_input+0x1b8>
mov    $0x1,%ebx
jmp    12b0 <scan_input+0x110>
mov    (%r14),%rax
movb   $0x20,(%rax,%r15,1)
add    $0x1,%r15
xor    %ebx,%ebx
mov    $0x1,%ebp
jmp    12b0 <scan_input+0x110>
xor    %r15d,%r15d
movb   $0xa,(%rax,%r15,1)
add    $0x1,%r15
mov    $0x1,%ebp
xor    %ebx,%ebx
jmp    12b0 <scan_input+0x110>

LLVM IR (-O0):
@.str = [33 x i8] c" M:SCAN: Opening %s for mode rb\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [36 x i8] c" E:SCAN: Could not open input file\0A\00"
@SEEK_END = global i32 0
@.str.3 = [39 x i8] c" M:SCAN: Input file is %ld bytes long\0A\00"
@.str.4 = [53 x i8] c" E:SCAN: Failed to allocate memory for input buffer\0A\00"
@.str.5 = [42 x i8] c" M:SCAN: Scanner pass returned %zu bytes\0A\00"
define i64 @scan_input(i8* %0, i8** %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i64
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 0, i32* %9
store i32 1, i32* %10
store i64 0, i64* %11
%12 = load i8*, i8** %4
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %4
%15 = call i32* @fopen(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %15, i32** %6
%16 = load i32*, i32** %6
%17 = icmp ne i32* %16, null
br i1 %17, label %20, label %18
18: ; preds = %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
store i64 0, i64* %3
br label %125
20: ; preds = %2
%21 = load i32*, i32** %6
%22 = load i32, i32* @SEEK_END
%23 = call i32 @fseek(i32* %21, i32 0, i32 %22)
%24 = load i32*, i32** %6
%25 = call i64 @ftell(i32* %24)
store i64 %25, i64* %7
%26 = load i32*, i32** %6
%27 = call i32 @rewind(i32* %26)
%28 = load i64, i64* %7
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i64 %28)
%30 = load i64, i64* %7
%31 = add nsw i64 %30, 1
%32 = call i8* @calloc(i64 %31, i32 1)
%33 = load i8**, i8*** %5
store i8* %32, i8** %33
%34 = load i8**, i8*** %5
%35 = load i8*, i8** %34
%36 = icmp ne i8* %35, null
br i1 %36, label %41, label %37
37: ; preds = %20
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.4, i64 0, i64 0))
%39 = load i32*, i32** %6
%40 = call i32 @fclose(i32* %39)
store i64 0, i64* %3
br label %125
41: ; preds = %20
br label %42
42: ; preds = %118, %41
%43 = load i32*, i32** %6
%44 = call i32 @feof(i32* %43)
%45 = icmp ne i32 %44, 0
%46 = xor i1 %45, true
br i1 %46, label %47, label %119
47: ; preds = %42
%48 = load i32*, i32** %6
%49 = call i32 @fgetc(i32* %48)
store i32 %49, i32* %8
%50 = load i32, i32* %8
switch i32 %50, label %106 [
i32 59, label %51
i32 32, label %52
i32 9, label %52
i32 -1, label %65
i32 13, label %65
i32 10, label %66
i32 61, label %87
i32 58, label %87
]
51: ; preds = %47
store i32 1, i32* %9
br label %118
52: ; preds = %47, %47
%53 = load i32, i32* %10
%54 = icmp ne i32 %53, 0
br i1 %54, label %64, label %55
55: ; preds = %52
%56 = load i32, i32* %9
%57 = icmp ne i32 %56, 0
br i1 %57, label %64, label %58
58: ; preds = %55
%59 = load i8**, i8*** %5
%60 = load i8*, i8** %59
%61 = load i64, i64* %11
%62 = add i64 %61, 1
store i64 %62, i64* %11
%63 = getelementptr inbounds i8, i8* %60, i64 %61
store i8 32, i8* %63
br label %64
64: ; preds = %58, %55, %52
store i32 1, i32* %10
br label %65
65: ; preds = %47, %47, %64
br label %118
66: ; preds = %47
%67 = load i64, i64* %11
%68 = icmp ugt i64 %67, 0
br i1 %68, label %69, label %81
69: ; preds = %66
%70 = load i8**, i8*** %5
%71 = load i8*, i8** %70
%72 = load i64, i64* %11
%73 = sub i64 %72, 1
%74 = getelementptr inbounds i8, i8* %71, i64 %73
%75 = load i8, i8* %74
%76 = sext i8 %75 to i32
%77 = icmp eq i32 %76, 32
br i1 %77, label %78, label %81
78: ; preds = %69
%79 = load i64, i64* %11
%80 = add i64 %79, -1
store i64 %80, i64* %11
br label %81
81: ; preds = %78, %69, %66
%82 = load i8**, i8*** %5
%83 = load i8*, i8** %82
%84 = load i64, i64* %11
%85 = add i64 %84, 1
store i64 %85, i64* %11
%86 = getelementptr inbounds i8, i8* %83, i64 %84
store i8 10, i8* %86
store i32 0, i32* %9
store i32 1, i32* %10
br label %118
87: ; preds = %47, %47
%88 = load i32, i32* %9
%89 = icmp ne i32 %88, 0
br i1 %89, label %105, label %90
90: ; preds = %87
%91 = load i64, i64* %11
%92 = icmp ugt i64 %91, 0
br i1 %92, label %93, label %105
93: ; preds = %90
%94 = load i8**, i8*** %5
%95 = load i8*, i8** %94
%96 = load i64, i64* %11
%97 = sub i64 %96, 1
%98 = getelementptr inbounds i8, i8* %95, i64 %97
%99 = load i8, i8* %98
%100 = sext i8 %99 to i32
%101 = icmp eq i32 %100, 32
br i1 %101, label %102, label %105
102: ; preds = %93
%103 = load i64, i64* %11
%104 = add i64 %103, -1
store i64 %104, i64* %11
br label %105
105: ; preds = %102, %93, %90, %87
br label %106
106: ; preds = %47, %105
store i32 0, i32* %10
%107 = load i32, i32* %9
%108 = icmp ne i32 %107, 0
br i1 %108, label %117, label %109
109: ; preds = %106
%110 = load i32, i32* %8
%111 = trunc i32 %110 to i8
%112 = load i8**, i8*** %5
%113 = load i8*, i8** %112
%114 = load i64, i64* %11
%115 = add i64 %114, 1
store i64 %115, i64* %11
%116 = getelementptr inbounds i8, i8* %113, i64 %114
store i8 %111, i8* %116
br label %117
117: ; preds = %109, %106
br label %118
118: ; preds = %117, %81, %65, %51
br label %42
119: ; preds = %42
%120 = load i32*, i32** %6
%121 = call i32 @fclose(i32* %120)
%122 = load i64, i64* %11
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i64 %122)
%124 = load i64, i64* %11
store i64 %124, i64* %3
br label %125
125: ; preds = %119, %37, %18
%126 = load i64, i64* %3
ret i64 %126
}

LLVM IR (-O2):
@.str = [33 x i8] c" M:SCAN: Opening %s for mode rb\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@SEEK_END = global i32 0
@.str.3 = [39 x i8] c" M:SCAN: Input file is %ld bytes long\0A\00"
@.str.5 = [42 x i8] c" M:SCAN: Scanner pass returned %zu bytes\0A\00"
@str = [35 x i8] c" E:SCAN: Could not open input file\00"
@str.6 = [52 x i8] c" E:SCAN: Failed to allocate memory for input buffer\00"
define i64 @scan_input(i8* %0, i8** nocapture %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
br label %81
8: ; preds = %2
%9 = load i32, i32* @SEEK_END
%10 = tail call i32 @fseek(i32* %4, i32 0, i32 %9)
%11 = tail call i64 @ftell(i32* %4)
%12 = tail call i32 @rewind(i32* %4)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i64 %11)
%14 = add nsw i64 %11, 1
%15 = tail call i8* @calloc(i64 %14, i32 1)
store i8* %15, i8** %1
%16 = icmp eq i8* %15, null
br i1 %16, label %20, label %17
17: ; preds = %8
%18 = tail call i32 @feof(i32* %4)
%19 = icmp eq i32 %18, 0
br i1 %19, label %23, label %77
20: ; preds = %8
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.6, i64 0, i64 0))
%22 = tail call i32 @fclose(i32* %4)
br label %81
23: ; preds = %17, %71
%24 = phi i64 [ %74, %71 ], [ 0, %17 ]
%25 = phi i32 [ %73, %71 ], [ 1, %17 ]
%26 = phi i32 [ %72, %71 ], [ 0, %17 ]
%27 = tail call i32 @fgetc(i32* %4)
switch i32 %27, label %61 [
i32 59, label %28
i32 32, label %29
i32 9, label %29
i32 -1, label %71
i32 13, label %71
i32 10, label %37
i32 61, label %50
i32 58, label %50
]
28: ; preds = %23
br label %71
29: ; preds = %23, %23
%30 = icmp ne i32 %25, 0
%31 = icmp ne i32 %26, 0
%32 = select i1 %30, i1 true, i1 %31
br i1 %32, label %71, label %33
33: ; preds = %29
%34 = load i8*, i8** %1
%35 = add i64 %24, 1
%36 = getelementptr inbounds i8, i8* %34, i64 %24
store i8 32, i8* %36
br label %71
37: ; preds = %23
%38 = icmp eq i64 %24, 0
%39 = load i8*, i8** %1
br i1 %38, label %46, label %40
40: ; preds = %37
%41 = add i64 %24, -1
%42 = getelementptr inbounds i8, i8* %39, i64 %41
%43 = load i8, i8* %42
%44 = icmp eq i8 %43, 32
%45 = select i1 %44, i64 %41, i64 %24
br label %46
46: ; preds = %37, %40
%47 = phi i64 [ %45, %40 ], [ 0, %37 ]
%48 = add i64 %47, 1
%49 = getelementptr inbounds i8, i8* %39, i64 %47
store i8 10, i8* %49
br label %71
50: ; preds = %23, %23
%51 = icmp eq i32 %26, 0
%52 = icmp ne i64 %24, 0
%53 = select i1 %51, i1 %52, i1 false
br i1 %53, label %54, label %61
54: ; preds = %50
%55 = load i8*, i8** %1
%56 = add i64 %24, -1
%57 = getelementptr inbounds i8, i8* %55, i64 %56
%58 = load i8, i8* %57
%59 = icmp eq i8 %58, 32
%60 = select i1 %59, i64 %56, i64 %24
br label %65
61: ; preds = %50, %23
%62 = icmp eq i32 %26, 0
br i1 %62, label %63, label %71
63: ; preds = %61
%64 = load i8*, i8** %1
br label %65
65: ; preds = %63, %54
%66 = phi i8* [ %55, %54 ], [ %64, %63 ]
%67 = phi i64 [ %60, %54 ], [ %24, %63 ]
%68 = trunc i32 %27 to i8
%69 = add i64 %67, 1
%70 = getelementptr inbounds i8, i8* %66, i64 %67
store i8 %68, i8* %70
br label %71
71: ; preds = %29, %33, %61, %65, %23, %23, %46, %28
%72 = phi i32 [ 1, %61 ], [ 0, %65 ], [ 0, %46 ], [ %26, %23 ], [ %26, %23 ], [ 1, %28 ], [ 0, %33 ], [ %26, %29 ]
%73 = phi i32 [ 0, %61 ], [ 0, %65 ], [ 1, %46 ], [ %25, %23 ], [ %25, %23 ], [ %25, %28 ], [ 1, %33 ], [ 1, %29 ]
%74 = phi i64 [ %24, %61 ], [ %69, %65 ], [ %48, %46 ], [ %24, %23 ], [ %24, %23 ], [ %24, %28 ], [ %35, %33 ], [ %24, %29 ]
%75 = tail call i32 @feof(i32* %4)
%76 = icmp eq i32 %75, 0
br i1 %76, label %23, label %77
77: ; preds = %71, %17
%78 = phi i64 [ 0, %17 ], [ %74, %71 ]
%79 = tail call i32 @fclose(i32* %4)
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i64 %78)
br label %81
81: ; preds = %77, %20, %6
%82 = phi i64 [ %78, %77 ], [ 0, %20 ], [ 0, %6 ]
ret i64 %82
}