#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*/ string;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *, int);
scalar_t__ strcmp(char *, char *);
int string_length(char *);
char *strtok(char *, char *);
int determine_length(char *input, char *output) {
  FILE *source = fopen(input, "r");
  FILE *target = fopen(output, "w");
  char string[256];
  int length = 0;
  char *token;
  while (fgets(string, sizeof(string), source) != NULL) {
    int size_string = 0;
    int ch = 0;
    int stop = 0;
    if (string[0] == '.') {
      if (strcmp(string, ".ascii\n") == 0) {
        fgets(string, sizeof(string), source);
        length = length + string_length(string);
      } else if (strcmp(string, ".asciz\n") == 0) {
        fgets(string, sizeof(string), source);
        length = length + string_length(string) + 1;
      }
    } else {
      if (strcmp(string, "ret\n") == 0 || strcmp(string, "cli\n") == 0 ||
          strcmp(string, "sti\n") == 0 || strcmp(string, "clc\n") == 0 ||
          strcmp(string, "stc\n") == 0 || strcmp(string, "cld\n") == 0 ||
          strcmp(string, "std\n") == 0 || strcmp(string, "hlt\n") == 0 ||
          strcmp(string, "pusha\n") == 0 || strcmp(string, "popa\n") == 0 ||
          strcmp(string, "lodsw\n") == 0 || strcmp(string, "lodsb\n") == 0 ||
          strcmp(string, "int3\n") == 0 || strcmp(string, "nop\n") == 0) {
        length++;
      } else if (strcmp(string, "int\n") == 0 ||
                 strcmp(string, "pause\n") == 0 ||
                 strcmp(string, "fnop\n") == 0 ||
                 strcmp(string, "cpuid\n") == 0) {
        length = length + 2;
        fgets(string, sizeof(string), source);
      } else if (strcmp(string, "mov\n") == 0) {
        fgets(string, sizeof(string), source);
        if (strcmp(string, "ah\n") == 0 || strcmp(string, "al\n") == 0) {
          length = length + 2;
          fgets(string, sizeof(string), source);
        } else if (strcmp(string, "dx\n") == 0) {
          length = length + 3;
          fgets(string, sizeof(string), source);
        }
      } else {
        while (string[ch] != '\0' && stop == 0) {
          if (string[ch] == ':') {
            token = strtok(string, ":");
            fprintf(target, "%s\n", token);
            stop++;
            fprintf(target, "%d\n", length);
          } else {
            ch++;
          }
        }
      }
    }
  }
  printf("%d\n", length);
  fclose(source);
  fclose(target);
}


x86 assembly (clang, -O0):
<determine_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe62(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe50(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x134(%rbp)
lea    -0x130(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x100,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     16eb <determine_length+0x56b>
movl   $0x0,-0x144(%rbp)
movl   $0x0,-0x148(%rbp)
movl   $0x0,-0x14c(%rbp)
movsbl -0x130(%rbp),%eax
cmp    $0x2e,%eax
jne    12d8 <determine_length+0x158>
lea    -0x130(%rbp),%rdi
lea    0xde4(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1271 <determine_length+0xf1>
lea    -0x130(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x100,%esi
call   1050 <fgets@plt>
mov    -0x134(%rbp),%eax
mov    %eax,-0x150(%rbp)
lea    -0x130(%rbp),%rdi
call   1080 <string_length@plt>
mov    %eax,%ecx
mov    -0x150(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x134(%rbp)
jmp    12d3 <determine_length+0x153>
lea    -0x130(%rbp),%rdi
lea    0xd8d(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    12ce <determine_length+0x14e>
lea    -0x130(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x100,%esi
call   1050 <fgets@plt>
mov    -0x134(%rbp),%eax
mov    %eax,-0x154(%rbp)
lea    -0x130(%rbp),%rdi
call   1080 <string_length@plt>
mov    %eax,%ecx
mov    -0x154(%rbp),%eax
add    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
jmp    12d3 <determine_length+0x153>
jmp    16e6 <determine_length+0x566>
lea    -0x130(%rbp),%rdi
lea    0xd2e(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     146e <determine_length+0x2ee>
lea    -0x130(%rbp),%rdi
lea    0xd16(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     146e <determine_length+0x2ee>
lea    -0x130(%rbp),%rdi
lea    0xcfe(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     146e <determine_length+0x2ee>
lea    -0x130(%rbp),%rdi
lea    0xce6(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     146e <determine_length+0x2ee>
lea    -0x130(%rbp),%rdi
lea    0xcce(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     146e <determine_length+0x2ee>
lea    -0x130(%rbp),%rdi
lea    0xcb6(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     146e <determine_length+0x2ee>
lea    -0x130(%rbp),%rdi
lea    0xc9e(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     146e <determine_length+0x2ee>
lea    -0x130(%rbp),%rdi
lea    0xc86(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     146e <determine_length+0x2ee>
lea    -0x130(%rbp),%rdi
lea    0xc6e(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     146e <determine_length+0x2ee>
lea    -0x130(%rbp),%rdi
lea    0xc58(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     146e <determine_length+0x2ee>
lea    -0x130(%rbp),%rdi
lea    0xc41(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     146e <determine_length+0x2ee>
lea    -0x130(%rbp),%rdi
lea    0xc2b(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     146e <determine_length+0x2ee>
lea    -0x130(%rbp),%rdi
lea    0xc15(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     146e <determine_length+0x2ee>
lea    -0x130(%rbp),%rdi
lea    0xc0b(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1482 <determine_length+0x302>
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
jmp    16e1 <determine_length+0x561>
lea    -0x130(%rbp),%rdi
lea    0xbcd(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14f6 <determine_length+0x376>
lea    -0x130(%rbp),%rdi
lea    0xbb5(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14f6 <determine_length+0x376>
lea    -0x130(%rbp),%rdi
lea    0xb9f(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14f6 <determine_length+0x376>
lea    -0x130(%rbp),%rdi
lea    0xb88(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    151f <determine_length+0x39f>
mov    -0x134(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x134(%rbp)
lea    -0x130(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x100,%esi
call   1050 <fgets@plt>
jmp    16dc <determine_length+0x55c>
lea    -0x130(%rbp),%rdi
lea    0xb49(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    15ff <determine_length+0x47f>
lea    -0x130(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x100,%esi
call   1050 <fgets@plt>
lea    -0x130(%rbp),%rdi
lea    0xb1c(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     158b <determine_length+0x40b>
lea    -0x130(%rbp),%rdi
lea    0xb03(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    15b4 <determine_length+0x434>
mov    -0x134(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x134(%rbp)
lea    -0x130(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x100,%esi
call   1050 <fgets@plt>
jmp    15fa <determine_length+0x47a>
lea    -0x130(%rbp),%rdi
lea    0xac1(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    15f5 <determine_length+0x475>
mov    -0x134(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x134(%rbp)
lea    -0x130(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x100,%esi
call   1050 <fgets@plt>
jmp    15fa <determine_length+0x47a>
jmp    16d7 <determine_length+0x557>
jmp    1604 <determine_length+0x484>
movslq -0x148(%rbp),%rax
movsbl -0x130(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x155(%rbp)
je     1634 <determine_length+0x4b4>
cmpl   $0x0,-0x14c(%rbp)
sete   %al
mov    %al,-0x155(%rbp)
mov    -0x155(%rbp),%al
test   $0x1,%al
jne    1647 <determine_length+0x4c7>
jmp    16d2 <determine_length+0x552>
movslq -0x148(%rbp),%rax
movsbl -0x130(%rbp,%rax,1),%eax
ff
cmp    $0x3a,%eax
jne    16be <determine_length+0x53e>
lea    -0x130(%rbp),%rdi
lea    0xa1a(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0x140(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x140(%rbp),%rdx
lea    0x9fe(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x14c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14c(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x134(%rbp),%edx
lea    0x9db(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    16cd <determine_length+0x54d>
mov    -0x148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x148(%rbp)
jmp    1604 <determine_length+0x484>
jmp    16d7 <determine_length+0x557>
jmp    16dc <determine_length+0x55c>
jmp    16e1 <determine_length+0x561>
jmp    16e6 <determine_length+0x566>
jmp    11c5 <determine_length+0x45>
mov    -0x134(%rbp),%esi
lea    0x995(%rip),%rdi
call   1040 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<determine_length>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
mov    %rsi,%rbx
lea    0xe65(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%r12
lea    0xe58(%rip),%rsi
mov    %rbx,%rdi
call   1090 <fopen@plt>
mov    %rax,0x8(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x100,%esi
mov    %r12,%rdx
call   1050 <fgets@plt>
test   %rax,%rax
je     1524 <determine_length+0x3a4>
lea    0xe2b(%rip),%r15
lea    0x10(%rsp),%rbx
lea    0xe2f(%rip),%rbp
lea    0xe2d(%rip),%r14
xor    %r13d,%r13d
jmp    121d <determine_length+0x9d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r13d
mov    %rbx,%rdi
mov    $0x100,%esi
mov    %r12,%rdx
call   1050 <fgets@plt>
test   %rax,%rax
je     1527 <determine_length+0x3a7>
cmpb   $0x2e,0x10(%rsp)
jne    1270 <determine_length+0xf0>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <strcmp@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     1458 <determine_length+0x2d8>
lea    0xdca(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1204 <determine_length+0x84>
mov    %rbx,%rdi
mov    $0x100,%esi
mov    %r12,%rdx
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1080 <string_length@plt>
add    %eax,%r13d
add    $0x1,%r13d
jmp    1204 <determine_length+0x84>
nopl   (%rax)
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
lea    0xd80(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
lea    0xd6d(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
lea    0xd5a(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
lea    0xd47(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
lea    0xd34(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
lea    0xd21(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
lea    0xd0e(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
lea    0xcfd(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
lea    0xceb(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
lea    0xcda(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
lea    0xcc9(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
lea    0xcc4(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1200 <determine_length+0x80>
mov    %rbx,%rdi
lea    0xc9f(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     14cb <determine_length+0x34b>
mov    %rbx,%rdi
lea    0xc8c(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     14cb <determine_length+0x34b>
mov    %rbx,%rdi
lea    0xc7b(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     14cb <determine_length+0x34b>
mov    %rbx,%rdi
lea    0xc69(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     14cb <determine_length+0x34b>
mov    %rbx,%rdi
lea    0xc58(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1475 <determine_length+0x2f5>
mov    0x10(%rsp),%cl
test   %cl,%cl
je     1204 <determine_length+0x84>
lea    0x11(%rsp),%rax
cmp    $0x3a,%cl
je     14e4 <determine_length+0x364>
je     1204 <determine_length+0x84>
movzbl (%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1439 <determine_length+0x2b9>
jmp    1204 <determine_length+0x84>
mov    $0x100,%esi
mov    %r12,%rdx
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1080 <string_length@plt>
add    %eax,%r13d
jmp    1204 <determine_length+0x84>
mov    %rbx,%rdi
mov    $0x100,%esi
mov    %r12,%rdx
call   1050 <fgets@plt>
mov    %rbx,%rdi
lea    0xbec(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     14cb <determine_length+0x34b>
mov    %rbx,%rdi
lea    0xbdc(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     14cb <determine_length+0x34b>
mov    %rbx,%rdi
lea    0xbcc(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1204 <determine_length+0x84>
add    $0x3,%r13d
jmp    14cf <determine_length+0x34f>
add    $0x2,%r13d
mov    %rbx,%rdi
mov    $0x100,%esi
mov    %r12,%rdx
call   1050 <fgets@plt>
jmp    1204 <determine_length+0x84>
mov    %rbx,%rdi
lea    0xb99(%rip),%rsi
call   10a0 <strtok@plt>
mov    0x8(%rsp),%rdi
lea    0xb8a(%rip),%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x8(%rsp),%rdi
lea    0xb78(%rip),%rsi
mov    %r13d,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    1204 <determine_length+0x84>
xor    %r13d,%r13d
lea    0xb5f(%rip),%rdi
mov    %r13d,%esi
call   1040 <printf@plt>
mov    %r12,%rdi
call   1030 <fclose@plt>
mov    0x8(%rsp),%rdi
call   1030 <fclose@plt>
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [8 x i8] c".ascii\0A\00"
@.str.3 = [8 x i8] c".asciz\0A\00"
@.str.4 = [5 x i8] c"ret\0A\00"
@.str.5 = [5 x i8] c"cli\0A\00"
@.str.6 = [5 x i8] c"sti\0A\00"
@.str.7 = [5 x i8] c"clc\0A\00"
@.str.8 = [5 x i8] c"stc\0A\00"
@.str.9 = [5 x i8] c"cld\0A\00"
@.str.10 = [5 x i8] c"std\0A\00"
@.str.11 = [5 x i8] c"hlt\0A\00"
@.str.12 = [7 x i8] c"pusha\0A\00"
@.str.13 = [6 x i8] c"popa\0A\00"
@.str.14 = [7 x i8] c"lodsw\0A\00"
@.str.15 = [7 x i8] c"lodsb\0A\00"
@.str.16 = [6 x i8] c"int3\0A\00"
@.str.17 = [5 x i8] c"nop\0A\00"
@.str.18 = [5 x i8] c"int\0A\00"
@.str.19 = [7 x i8] c"pause\0A\00"
@.str.20 = [6 x i8] c"fnop\0A\00"
@.str.21 = [7 x i8] c"cpuid\0A\00"
@.str.22 = [5 x i8] c"mov\0A\00"
@.str.23 = [4 x i8] c"ah\0A\00"
@.str.24 = [4 x i8] c"al\0A\00"
@.str.25 = [4 x i8] c"dx\0A\00"
@.str.26 = [2 x i8] c":\00"
@.str.27 = [4 x i8] c"%s\0A\00"
@.str.28 = [4 x i8] c"%d\0A\00"
define i32 @determine_length(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca [256 x i8]
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%14 = load i8*, i8** %4
%15 = call i32* @fopen(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %15, i32** %6
%16 = load i8*, i8** %5
%17 = call i32* @fopen(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %17, i32** %7
store i32 0, i32* %9
br label %18
18: ; preds = %208, %2
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%20 = load i32*, i32** %6
%21 = call i32* @fgets(i8* %19, i32 256, i32* %20)
%22 = icmp ne i32* %21, null
br i1 %22, label %23, label %209
23: ; preds = %18
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
%24 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 46
br i1 %27, label %28, label %55
28: ; preds = %23
%29 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%30 = call i64 @strcmp(i8* %29, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %40
32: ; preds = %28
%33 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%34 = load i32*, i32** %6
%35 = call i32* @fgets(i8* %33, i32 256, i32* %34)
%36 = load i32, i32* %9
%37 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%38 = call i32 @string_length(i8* %37)
%39 = add nsw i32 %36, %38
store i32 %39, i32* %9
br label %54
40: ; preds = %28
%41 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%42 = call i64 @strcmp(i8* %41, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %53
44: ; preds = %40
%45 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%46 = load i32*, i32** %6
%47 = call i32* @fgets(i8* %45, i32 256, i32* %46)
%48 = load i32, i32* %9
%49 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%50 = call i32 @string_length(i8* %49)
%51 = add nsw i32 %48, %50
%52 = add nsw i32 %51, 1
store i32 %52, i32* %9
br label %53
53: ; preds = %44, %40
br label %54
54: ; preds = %53, %32
br label %208
55: ; preds = %23
%56 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%57 = call i64 @strcmp(i8* %56, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%58 = icmp eq i64 %57, 0
br i1 %58, label %111, label %59
59: ; preds = %55
%60 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%61 = call i64 @strcmp(i8* %60, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %111, label %63
63: ; preds = %59
%64 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%65 = call i64 @strcmp(i8* %64, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%66 = icmp eq i64 %65, 0
br i1 %66, label %111, label %67
67: ; preds = %63
%68 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%69 = call i64 @strcmp(i8* %68, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%70 = icmp eq i64 %69, 0
br i1 %70, label %111, label %71
71: ; preds = %67
%72 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%73 = call i64 @strcmp(i8* %72, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%74 = icmp eq i64 %73, 0
br i1 %74, label %111, label %75
75: ; preds = %71
%76 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%77 = call i64 @strcmp(i8* %76, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%78 = icmp eq i64 %77, 0
br i1 %78, label %111, label %79
79: ; preds = %75
%80 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%81 = call i64 @strcmp(i8* %80, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%82 = icmp eq i64 %81, 0
br i1 %82, label %111, label %83
83: ; preds = %79
%84 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%85 = call i64 @strcmp(i8* %84, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0))
%86 = icmp eq i64 %85, 0
br i1 %86, label %111, label %87
87: ; preds = %83
%88 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%89 = call i64 @strcmp(i8* %88, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%90 = icmp eq i64 %89, 0
br i1 %90, label %111, label %91
91: ; preds = %87
%92 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%93 = call i64 @strcmp(i8* %92, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
%94 = icmp eq i64 %93, 0
br i1 %94, label %111, label %95
95: ; preds = %91
%96 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%97 = call i64 @strcmp(i8* %96, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
%98 = icmp eq i64 %97, 0
br i1 %98, label %111, label %99
99: ; preds = %95
%100 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%101 = call i64 @strcmp(i8* %100, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%102 = icmp eq i64 %101, 0
br i1 %102, label %111, label %103
103: ; preds = %99
%104 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%105 = call i64 @strcmp(i8* %104, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0))
%106 = icmp eq i64 %105, 0
br i1 %106, label %111, label %107
107: ; preds = %103
%108 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%109 = call i64 @strcmp(i8* %108, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
%110 = icmp eq i64 %109, 0
br i1 %110, label %111, label %114
111: ; preds = %107, %103, %99, %95, %91, %87, %83, %79, %75, %71, %67, %63, %59, %55
%112 = load i32, i32* %9
%113 = add nsw i32 %112, 1
store i32 %113, i32* %9
br label %207
114: ; preds = %107
%115 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%116 = call i64 @strcmp(i8* %115, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
%117 = icmp eq i64 %116, 0
br i1 %117, label %130, label %118
118: ; preds = %114
%119 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%120 = call i64 @strcmp(i8* %119, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0))
%121 = icmp eq i64 %120, 0
br i1 %121, label %130, label %122
122: ; preds = %118
%123 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%124 = call i64 @strcmp(i8* %123, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0))
%125 = icmp eq i64 %124, 0
br i1 %125, label %130, label %126
126: ; preds = %122
%127 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%128 = call i64 @strcmp(i8* %127, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i64 0, i64 0))
%129 = icmp eq i64 %128, 0
br i1 %129, label %130, label %136
130: ; preds = %126, %122, %118, %114
%131 = load i32, i32* %9
%132 = add nsw i32 %131, 2
store i32 %132, i32* %9
%133 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%134 = load i32*, i32** %6
%135 = call i32* @fgets(i8* %133, i32 256, i32* %134)
br label %206
136: ; preds = %126
%137 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%138 = call i64 @strcmp(i8* %137, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i64 0, i64 0))
%139 = icmp eq i64 %138, 0
br i1 %139, label %140, label %169
140: ; preds = %136
%141 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%142 = load i32*, i32** %6
%143 = call i32* @fgets(i8* %141, i32 256, i32* %142)
%144 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%145 = call i64 @strcmp(i8* %144, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i64 0, i64 0))
%146 = icmp eq i64 %145, 0
br i1 %146, label %151, label %147
147: ; preds = %140
%148 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%149 = call i64 @strcmp(i8* %148, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0))
%150 = icmp eq i64 %149, 0
br i1 %150, label %151, label %157
151: ; preds = %147, %140
%152 = load i32, i32* %9
%153 = add nsw i32 %152, 2
store i32 %153, i32* %9
%154 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%155 = load i32*, i32** %6
%156 = call i32* @fgets(i8* %154, i32 256, i32* %155)
br label %168
157: ; preds = %147
%158 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%159 = call i64 @strcmp(i8* %158, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i64 0, i64 0))
%160 = icmp eq i64 %159, 0
br i1 %160, label %161, label %167
161: ; preds = %157
%162 = load i32, i32* %9
%163 = add nsw i32 %162, 3
store i32 %163, i32* %9
%164 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%165 = load i32*, i32** %6
%166 = call i32* @fgets(i8* %164, i32 256, i32* %165)
br label %167
167: ; preds = %161, %157
br label %168
168: ; preds = %167, %151
br label %205
169: ; preds = %136
br label %170
170: ; preds = %203, %169
%171 = load i32, i32* %12
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 %172
%174 = load i8, i8* %173
%175 = sext i8 %174 to i32
%176 = icmp ne i32 %175, 0
br i1 %176, label %177, label %180
177: ; preds = %170
%178 = load i32, i32* %13
%179 = icmp eq i32 %178, 0
br label %180
180: ; preds = %177, %170
%181 = phi i1 [ false, %170 ], [ %179, %177 ]
br i1 %181, label %182, label %204
182: ; preds = %180
%183 = load i32, i32* %12
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 %184
%186 = load i8, i8* %185
%187 = sext i8 %186 to i32
%188 = icmp eq i32 %187, 58
br i1 %188, label %189, label %200
189: ; preds = %182
%190 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%191 = call i8* @strtok(i8* %190, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
store i8* %191, i8** %10
%192 = load i32*, i32** %7
%193 = load i8*, i8** %10
%194 = call i32 (i32*, i8*, ...) @fprintf(i32* %192, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.27, i64 0, i64 0), i8* %193)
%195 = load i32, i32* %13
%196 = add nsw i32 %195, 1
store i32 %196, i32* %13
%197 = load i32*, i32** %7
%198 = load i32, i32* %9
%199 = call i32 (i32*, i8*, ...) @fprintf(i32* %197, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0), i32 %198)
br label %203
200: ; preds = %182
%201 = load i32, i32* %12
%202 = add nsw i32 %201, 1
store i32 %202, i32* %12
br label %203
203: ; preds = %200, %189
br label %170
204: ; preds = %180
br label %205
205: ; preds = %204, %168
br label %206
206: ; preds = %205, %130
br label %207
207: ; preds = %206, %111
br label %208
208: ; preds = %207, %54
br label %18
209: ; preds = %18
%210 = load i32, i32* %9
%211 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0), i32 %210)
%212 = load i32*, i32** %6
%213 = call i32 @fclose(i32* %212)
%214 = load i32*, i32** %7
%215 = call i32 @fclose(i32* %214)
%216 = load i32, i32* %3
ret i32 %216
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [8 x i8] c".ascii\0A\00"
@.str.3 = [8 x i8] c".asciz\0A\00"
@.str.4 = [5 x i8] c"ret\0A\00"
@.str.5 = [5 x i8] c"cli\0A\00"
@.str.6 = [5 x i8] c"sti\0A\00"
@.str.7 = [5 x i8] c"clc\0A\00"
@.str.8 = [5 x i8] c"stc\0A\00"
@.str.9 = [5 x i8] c"cld\0A\00"
@.str.10 = [5 x i8] c"std\0A\00"
@.str.11 = [5 x i8] c"hlt\0A\00"
@.str.12 = [7 x i8] c"pusha\0A\00"
@.str.13 = [6 x i8] c"popa\0A\00"
@.str.14 = [7 x i8] c"lodsw\0A\00"
@.str.15 = [7 x i8] c"lodsb\0A\00"
@.str.16 = [6 x i8] c"int3\0A\00"
@.str.17 = [5 x i8] c"nop\0A\00"
@.str.18 = [5 x i8] c"int\0A\00"
@.str.19 = [7 x i8] c"pause\0A\00"
@.str.20 = [6 x i8] c"fnop\0A\00"
@.str.21 = [7 x i8] c"cpuid\0A\00"
@.str.22 = [5 x i8] c"mov\0A\00"
@.str.23 = [4 x i8] c"ah\0A\00"
@.str.24 = [4 x i8] c"al\0A\00"
@.str.25 = [4 x i8] c"dx\0A\00"
@.str.26 = [2 x i8] c":\00"
@.str.27 = [4 x i8] c"%s\0A\00"
@.str.28 = [4 x i8] c"%d\0A\00"
define i32 @determine_length(i8* nocapture %0, i8* nocapture %1) {
%3 = alloca [256 x i8]
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%7 = call i32* @fgets(i8* %6, i32 256, i32* %4)
%8 = icmp eq i32* %7, null
br i1 %8, label %128, label %9
9: ; preds = %2, %124
%10 = phi i32 [ %125, %124 ], [ 0, %2 ]
%11 = load i8, i8* %6
%12 = icmp eq i8 %11, 46
br i1 %12, label %13, label %28
13: ; preds = %9
%14 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = call i32* @fgets(i8* %6, i32 256, i32* %4)
%18 = call i32 @string_length(i8* %6)
%19 = add nsw i32 %18, %10
br label %124
20: ; preds = %13
%21 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %124
23: ; preds = %20
%24 = call i32* @fgets(i8* %6, i32 256, i32* %4)
%25 = call i32 @string_length(i8* %6)
%26 = add i32 %10, 1
%27 = add i32 %26, %25
br label %124
28: ; preds = %9
%29 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %70, label %31
31: ; preds = %28
%32 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %70, label %34
34: ; preds = %31
%35 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %70, label %37
37: ; preds = %34
%38 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %70, label %40
40: ; preds = %37
%41 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %70, label %43
43: ; preds = %40
%44 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %70, label %46
46: ; preds = %43
%47 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %70, label %49
49: ; preds = %46
%50 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0))
%51 = icmp eq i64 %50, 0
br i1 %51, label %70, label %52
52: ; preds = %49
%53 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %70, label %55
55: ; preds = %52
%56 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
%57 = icmp eq i64 %56, 0
br i1 %57, label %70, label %58
58: ; preds = %55
%59 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
%60 = icmp eq i64 %59, 0
br i1 %60, label %70, label %61
61: ; preds = %58
%62 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%63 = icmp eq i64 %62, 0
br i1 %63, label %70, label %64
64: ; preds = %61
%65 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0))
%66 = icmp eq i64 %65, 0
br i1 %66, label %70, label %67
67: ; preds = %64
%68 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %67, %64, %61, %58, %55, %52, %49, %46, %43, %40, %37, %34, %31, %28
%71 = add nsw i32 %10, 1
br label %124
72: ; preds = %67
%73 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
%74 = icmp eq i64 %73, 0
br i1 %74, label %84, label %75
75: ; preds = %72
%76 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0))
%77 = icmp eq i64 %76, 0
br i1 %77, label %84, label %78
78: ; preds = %75
%79 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0))
%80 = icmp eq i64 %79, 0
br i1 %80, label %84, label %81
81: ; preds = %78
%82 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i64 0, i64 0))
%83 = icmp eq i64 %82, 0
br i1 %83, label %84, label %87
84: ; preds = %81, %78, %75, %72
%85 = add nsw i32 %10, 2
%86 = call i32* @fgets(i8* %6, i32 256, i32* %4)
br label %124
87: ; preds = %81
%88 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i64 0, i64 0))
%89 = icmp eq i64 %88, 0
br i1 %89, label %93, label %90
90: ; preds = %87
%91 = load i8, i8* %6
%92 = icmp eq i8 %91, 0
br i1 %92, label %124, label %109
93: ; preds = %87
%94 = call i32* @fgets(i8* %6, i32 256, i32* %4)
%95 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i64 0, i64 0))
%96 = icmp eq i64 %95, 0
br i1 %96, label %100, label %97
97: ; preds = %93
%98 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0))
%99 = icmp eq i64 %98, 0
br i1 %99, label %100, label %103
100: ; preds = %97, %93
%101 = add nsw i32 %10, 2
%102 = call i32* @fgets(i8* %6, i32 256, i32* %4)
br label %124
103: ; preds = %97
%104 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i64 0, i64 0))
%105 = icmp eq i64 %104, 0
br i1 %105, label %106, label %124
106: ; preds = %103
%107 = add nsw i32 %10, 3
%108 = call i32* @fgets(i8* %6, i32 256, i32* %4)
br label %124
109: ; preds = %90, %117
%110 = phi i8 [ %121, %117 ], [ %91, %90 ]
%111 = phi i32 [ %118, %117 ], [ 0, %90 ]
%112 = icmp eq i8 %110, 58
br i1 %112, label %113, label %117
113: ; preds = %109
%114 = call i8* @strtok(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%115 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.27, i64 0, i64 0), i8* %114)
%116 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0), i32 %10)
br label %124
117: ; preds = %109
%118 = add nuw nsw i32 %111, 1
%119 = zext i32 %118 to i64
%120 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %119
%121 = load i8, i8* %120
%122 = icmp eq i8 %121, 0
%123 = or i1 %112, %122
br i1 %123, label %124, label %109
124: ; preds = %117, %113, %90, %70, %103, %106, %100, %84, %16, %23, %20
%125 = phi i32 [ %19, %16 ], [ %27, %23 ], [ %10, %20 ], [ %71, %70 ], [ %85, %84 ], [ %101, %100 ], [ %107, %106 ], [ %10, %103 ], [ %10, %90 ], [ %10, %113 ], [ %10, %117 ]
%126 = call i32* @fgets(i8* %6, i32 256, i32* %4)
%127 = icmp eq i32* %126, null
br i1 %127, label %128, label %9
128: ; preds = %124, %2
%129 = phi i32 [ 0, %2 ], [ %125, %124 ]
%130 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0), i32 %129)
%131 = call i32 @fclose(i32* %4)
%132 = call i32 @fclose(i32* %5)
ret i32 undef
}