#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*/ FLine(int /*<<< orphan*/ *);
char *FLineSpace(int /*<<< orphan*/ *);
scalar_t__ charExists(char, char *, int);
int charLoc(char, char *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int intLoc(int, int *, int);
int numIntInArr(int, int *, int);
int /*<<< orphan*/ printf(char *, ...);
int secondLowestInt(int *, int);
int strtoi(int /*<<< orphan*/);
int /*<<< orphan*/ zero(int *, int);
int /*<<< orphan*/ zeroStr(char *, int);
int main(void) {
  FILE *file = fopen("notlast.in", "r");
  FILE *fout = fopen("notlast.out", "w");
  int logs = strtoi(FLine(file));
  char cows[logs];
  int amount[logs];
  int pos;
  char *grb;
  int i;
  zero(amount, logs);
  zeroStr(cows, logs);
  for (i = 0; i < logs; i++) {
    char nxtChr = fgetc(file);
    if (charExists(nxtChr, cows, logs) == 0) {
      pos = 0;
      while (*(cows + pos) != '0') {
        pos++;
      }
      *(cows + pos) = nxtChr;
      grb = FLineSpace(file);
      *(amount + pos) = strtoi(FLine(file));
    } else {
      grb = FLineSpace(file);
      *(amount + charLoc(nxtChr, cows)) += strtoi(FLine(file));
    }
  }
  int finalLen = 0;
  for (i = 0; i < logs; i++) {
    if (*(amount + finalLen) == 0) {
      break;
    } else {
      finalLen++;
    }
  }
  int secondLow = secondLowestInt(amount, finalLen);
  if (secondLow == 404) {
    fprintf(fout, "Tie\n");
    printf("404 Tie\n");
  } else if (numIntInArr(secondLow, amount, finalLen) > 1) {
    fprintf(fout, "Tie\n");
    printf("%d: Tie\n", numIntInArr(secondLow, amount, finalLen));
  } else {
    char secondLowCow = *(cows + intLoc(secondLow, amount, finalLen));
    if (secondLowCow == 'H') {
      fprintf(fout, "Henrietta\n");
      printf("Henrietta\n");
    } else if (secondLowCow == 'B') {
      fprintf(fout, "Bessie\n");
      printf("Bessie\n");
    } else if (secondLowCow == 'G') {
      fprintf(fout, "Gertie\n");
      printf("Gertie\n");
    } else if (secondLowCow == 'D') {
      fprintf(fout, "Daisy\n");
      printf("Daisy\n");
    } else if (secondLowCow == 'A') {
      fprintf(fout, "Annabelle\n");
      printf("Annabelle\n");
    } else if (secondLowCow == 'E') {
      fprintf(fout, "Elsie\n");
      printf("Elsie\n");
    } else {
      fprintf(fout, "Maggie\n");
      printf("Maggie\n");
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe07(%rip),%rdi
lea    0xe0b(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    0xdfd(%rip),%rdi
lea    0xe02(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   10b0 <FLine@plt>
mov    %eax,%edi
call   1080 <strtoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x68(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x1c(%rbp),%eax
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x70(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x1c(%rbp),%esi
call   10c0 <zero@plt>
mov    -0x68(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <zeroStr@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1381 <main+0x1a1>
mov    -0x10(%rbp),%rdi
call   1090 <fgetc@plt>
mov    -0x68(%rbp),%rsi
mov    %al,-0x4d(%rbp)
mov    -0x4d(%rbp),%al
mov    -0x1c(%rbp),%edx
movsbl %al,%edi
call   1060 <charExists@plt>
cmp    $0x0,%rax
jne    132f <main+0x14f>
movl   $0x0,-0x3c(%rbp)
mov    -0x68(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x30,%eax
je     12f2 <main+0x112>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12cf <main+0xef>
mov    -0x68(%rbp),%rax
mov    -0x4d(%rbp),%dl
movslq -0x3c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rdi
call   10e0 <FLineSpace@plt>
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
call   10b0 <FLine@plt>
mov    %eax,%edi
call   1080 <strtoi@plt>
mov    %eax,%edx
mov    -0x70(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    136e <main+0x18e>
mov    -0x10(%rbp),%rdi
call   10e0 <FLineSpace@plt>
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
call   10b0 <FLine@plt>
mov    %eax,%edi
call   1080 <strtoi@plt>
mov    -0x68(%rbp),%rsi
mov    %eax,-0x74(%rbp)
movsbl -0x4d(%rbp),%edi
call   10f0 <charLoc@plt>
mov    -0x74(%rbp),%edx
mov    %eax,%ecx
mov    -0x70(%rbp),%rax
movslq %ecx,%rcx
add    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
jmp    1373 <main+0x193>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1294 <main+0xb4>
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    13ce <main+0x1ee>
mov    -0x70(%rbp),%rax
movslq -0x54(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    13b2 <main+0x1d2>
jmp    13ce <main+0x1ee>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    13c0 <main+0x1e0>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    138f <main+0x1af>
mov    -0x70(%rbp),%rdi
mov    -0x54(%rbp),%esi
call   1030 <secondLowestInt@plt>
mov    %eax,-0x58(%rbp)
cmpl   $0x194,-0x58(%rbp)
jne    140d <main+0x22d>
mov    -0x18(%rbp),%rdi
lea    0xc2a(%rip),%rsi
call   10a0 <fprintf@plt>
lea    0xc1a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    15d8 <main+0x3f8>
mov    -0x70(%rbp),%rsi
mov    -0x58(%rbp),%edi
mov    -0x54(%rbp),%edx
call   1070 <numIntInArr@plt>
cmp    $0x1,%eax
jle    1459 <main+0x279>
mov    -0x18(%rbp),%rdi
lea    0xbef(%rip),%rsi
call   10a0 <fprintf@plt>
mov    -0x70(%rbp),%rsi
mov    -0x58(%rbp),%edi
mov    -0x54(%rbp),%edx
call   1070 <numIntInArr@plt>
mov    %eax,%esi
lea    0xbd7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    15d3 <main+0x3f3>
mov    -0x70(%rbp),%rsi
mov    -0x58(%rbp),%edi
mov    -0x54(%rbp),%edx
call   1100 <intLoc@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x59(%rbp)
movsbl -0x59(%rbp),%eax
cmp    $0x48,%eax
jne    14a7 <main+0x2c7>
mov    -0x18(%rbp),%rdi
lea    0xb9e(%rip),%rsi
call   10a0 <fprintf@plt>
lea    0xb92(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    15ce <main+0x3ee>
movsbl -0x59(%rbp),%eax
cmp    $0x42,%eax
jne    14d7 <main+0x2f7>
mov    -0x18(%rbp),%rdi
lea    0xb79(%rip),%rsi
call   10a0 <fprintf@plt>
lea    0xb6d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    15c9 <main+0x3e9>
movsbl -0x59(%rbp),%eax
cmp    $0x47,%eax
jne    1507 <main+0x327>
mov    -0x18(%rbp),%rdi
lea    0xb51(%rip),%rsi
call   10a0 <fprintf@plt>
lea    0xb45(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    15c4 <main+0x3e4>
movsbl -0x59(%rbp),%eax
cmp    $0x44,%eax
jne    1537 <main+0x357>
mov    -0x18(%rbp),%rdi
lea    0xb29(%rip),%rsi
call   10a0 <fprintf@plt>
lea    0xb1d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    15bf <main+0x3df>
movsbl -0x59(%rbp),%eax
cmp    $0x41,%eax
jne    1567 <main+0x387>
mov    -0x18(%rbp),%rdi
lea    0xb00(%rip),%rsi
call   10a0 <fprintf@plt>
lea    0xaf4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    15ba <main+0x3da>
movsbl -0x59(%rbp),%eax
cmp    $0x45,%eax
jne    1597 <main+0x3b7>
mov    -0x18(%rbp),%rdi
lea    0xadb(%rip),%rsi
call   10a0 <fprintf@plt>
lea    0xacf(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    15b5 <main+0x3d5>
mov    -0x18(%rbp),%rdi
lea    0xabf(%rip),%rsi
call   10a0 <fprintf@plt>
lea    0xab3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    15ba <main+0x3da>
jmp    15bf <main+0x3df>
jmp    15c4 <main+0x3e4>
jmp    15c9 <main+0x3e9>
jmp    15ce <main+0x3ee>
jmp    15d3 <main+0x3f3>
jmp    15d8 <main+0x3f8>
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
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    $0x28,%rsp
lea    0xe18(%rip),%rdi
lea    0xe1c(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,%rbx
lea    0xe0f(%rip),%rdi
lea    0xe14(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,%r15
mov    %rbx,-0x38(%rbp)
mov    %rbx,%rdi
call   10b0 <FLine@plt>
mov    %eax,%edi
call   1090 <strtoi@plt>
mov    %eax,%r14d
mov    %eax,%ecx
lea    0xf(%rcx),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rcx,-0x48(%rbp)
lea    0xf(,%rcx,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r12
sub    %rax,%r12
mov    %r12,%rsp
mov    %r12,%rdi
mov    %r14d,%esi
call   10c0 <zero@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <zeroStr@plt>
test   %r14d,%r14d
jle    1385 <main+0x195>
mov    %r12,-0x30(%rbp)
mov    %r15,-0x40(%rbp)
xor    %r12d,%r12d
mov    -0x48(%rbp),%r13
mov    -0x38(%rbp),%r14
jmp    12f0 <main+0x100>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    -0x38(%rbp),%r14
mov    %r14,%rdi
call   10e0 <FLineSpace@plt>
mov    %r14,%rdi
call   10b0 <FLine@plt>
mov    %eax,%edi
call   1090 <strtoi@plt>
mov    %eax,%r13d
mov    %r15d,%edi
mov    %rbx,%rsi
call   10f0 <charLoc@plt>
cltq
mov    -0x30(%rbp),%rcx
add    %r13d,(%rcx,%rax,4)
add    $0x1,%r12d
mov    -0x48(%rbp),%r13
cmp    %r13d,%r12d
je     1357 <main+0x167>
mov    %r14,%rdi
call   10a0 <fgetc@plt>
mov    %eax,%r14d
movsbl %al,%r15d
mov    %r15d,%edi
mov    %rbx,%rsi
mov    %r13d,%edx
call   1070 <charExists@plt>
test   %rax,%rax
jne    12b0 <main+0xc0>
mov    $0xffffffffffffffff,%rax
nopl   0x0(%rax)
cmpb   $0x30,0x1(%rbx,%rax,1)
lea    0x1(%rax),%rax
jne    1320 <main+0x130>
mov    %eax,%r15d
mov    %r14b,(%rbx,%r15,1)
mov    -0x38(%rbp),%r14
mov    %r14,%rdi
call   10e0 <FLineSpace@plt>
mov    %r14,%rdi
call   10b0 <FLine@plt>
mov    %eax,%edi
call   1090 <strtoi@plt>
mov    -0x30(%rbp),%rcx
mov    %eax,(%rcx,%r15,4)
jmp    12e3 <main+0xf3>
test   %r13d,%r13d
jle    138a <main+0x19a>
mov    %r13,%rax
xor    %r13d,%r13d
mov    -0x40(%rbp),%r15
mov    -0x30(%rbp),%r12
nopw   0x0(%rax,%rax,1)
cmpl   $0x0,(%r12,%r13,4)
je     1395 <main+0x1a5>
add    $0x1,%r13
cmp    %r13,%rax
jne    1370 <main+0x180>
mov    %eax,%r13d
jmp    1395 <main+0x1a5>
xor    %r13d,%r13d
jmp    1395 <main+0x1a5>
xor    %r13d,%r13d
mov    -0x40(%rbp),%r15
mov    -0x30(%rbp),%r12
mov    %r12,%rdi
mov    %r13d,%esi
call   1030 <secondLowestInt@plt>
cmp    $0x194,%eax
jne    13ce <main+0x1de>
lea    0xc91(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1100 <fwrite@plt>
lea    0xcee(%rip),%rdi
call   1050 <puts@plt>
jmp    141a <main+0x22a>
mov    %eax,%r14d
mov    %eax,%edi
mov    %r12,%rsi
mov    %r13d,%edx
call   1080 <numIntInArr@plt>
cmp    $0x2,%eax
jl     142b <main+0x23b>
lea    0xc55(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1100 <fwrite@plt>
mov    %r14d,%edi
mov    %r12,%rsi
mov    %r13d,%edx
call   1080 <numIntInArr@plt>
lea    0xc2a(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r14d,%edi
mov    %r12,%rsi
mov    %r13d,%edx
call   1110 <intLoc@plt>
cltq
mov    (%rbx,%rax,1),%al
add    $0xbf,%al
cmp    $0x7,%al
ja     14a1 <main+0x2b1>
movzbl %al,%eax
lea    0xbb2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xc08(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1100 <fwrite@plt>
lea    0xc16(%rip),%rdi
jmp    13c7 <main+0x1d7>
lea    0xbcc(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1100 <fwrite@plt>
lea    0xc08(%rip),%rdi
jmp    13c7 <main+0x1d7>
lea    0xbd0(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1100 <fwrite@plt>
lea    0xbbf(%rip),%rdi
jmp    13c7 <main+0x1d7>
lea    0xb92(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1100 <fwrite@plt>
lea    0xbb1(%rip),%rdi
jmp    13c7 <main+0x1d7>
lea    0xb7f(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1100 <fwrite@plt>
lea    0xb7c(%rip),%rdi
jmp    13c7 <main+0x1d7>
lea    0xb40(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1100 <fwrite@plt>
lea    0xb6d(%rip),%rdi
jmp    13c7 <main+0x1d7>
lea    0xb08(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1100 <fwrite@plt>
lea    0xb56(%rip),%rdi
jmp    13c7 <main+0x1d7>

LLVM IR (-O0):
@.str = [11 x i8] c"notlast.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [12 x i8] c"notlast.out\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [5 x i8] c"Tie\0A\00"
@.str.5 = [9 x i8] c"404 Tie\0A\00"
@.str.6 = [9 x i8] c"%d: Tie\0A\00"
@.str.7 = [11 x i8] c"Henrietta\0A\00"
@.str.8 = [8 x i8] c"Bessie\0A\00"
@.str.9 = [8 x i8] c"Gertie\0A\00"
@.str.10 = [7 x i8] c"Daisy\0A\00"
@.str.11 = [11 x i8] c"Annabelle\0A\00"
@.str.12 = [7 x i8] c"Elsie\0A\00"
@.str.13 = [8 x i8] c"Maggie\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8
store i32 0, i32* %1
%15 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %15, i32** %2
%16 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %16, i32** %3
%17 = load i32*, i32** %2
%18 = call i32 @FLine(i32* %17)
%19 = call i32 @strtoi(i32 %18)
store i32 %19, i32* %4
%20 = load i32, i32* %4
%21 = zext i32 %20 to i64
%22 = call i8* @llvm.stacksave()
store i8* %22, i8** %5
%23 = alloca i8, i64 %21
store i64 %21, i64* %6
%24 = load i32, i32* %4
%25 = zext i32 %24 to i64
%26 = alloca i32, i64 %25
store i64 %25, i64* %7
%27 = load i32, i32* %4
%28 = call i32 @zero(i32* %26, i32 %27)
%29 = load i32, i32* %4
%30 = call i32 @zeroStr(i8* %23, i32 %29)
store i32 0, i32* %10
br label %31
31: ; preds = %79, %0
%32 = load i32, i32* %10
%33 = load i32, i32* %4
%34 = icmp slt i32 %32, %33
br i1 %34, label %35, label %82
35: ; preds = %31
%36 = load i32*, i32** %2
%37 = call signext i8 @fgetc(i32* %36)
store i8 %37, i8* %11
%38 = load i8, i8* %11
%39 = load i32, i32* %4
%40 = call i64 @charExists(i8 signext %38, i8* %23, i32 %39)
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %66
42: ; preds = %35
store i32 0, i32* %8
br label %43
43: ; preds = %50, %42
%44 = load i32, i32* %8
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8, i8* %23, i64 %45
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp ne i32 %48, 48
br i1 %49, label %50, label %53
50: ; preds = %43
%51 = load i32, i32* %8
%52 = add nsw i32 %51, 1
store i32 %52, i32* %8
br label %43
53: ; preds = %43
%54 = load i8, i8* %11
%55 = load i32, i32* %8
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i8, i8* %23, i64 %56
store i8 %54, i8* %57
%58 = load i32*, i32** %2
%59 = call i8* @FLineSpace(i32* %58)
store i8* %59, i8** %9
%60 = load i32*, i32** %2
%61 = call i32 @FLine(i32* %60)
%62 = call i32 @strtoi(i32 %61)
%63 = load i32, i32* %8
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i32, i32* %26, i64 %64
store i32 %62, i32* %65
br label %78
66: ; preds = %35
%67 = load i32*, i32** %2
%68 = call i8* @FLineSpace(i32* %67)
store i8* %68, i8** %9
%69 = load i32*, i32** %2
%70 = call i32 @FLine(i32* %69)
%71 = call i32 @strtoi(i32 %70)
%72 = load i8, i8* %11
%73 = call i32 @charLoc(i8 signext %72, i8* %23)
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i32, i32* %26, i64 %74
%76 = load i32, i32* %75
%77 = add nsw i32 %76, %71
store i32 %77, i32* %75
br label %78
78: ; preds = %66, %53
br label %79
79: ; preds = %78
%80 = load i32, i32* %10
%81 = add nsw i32 %80, 1
store i32 %81, i32* %10
br label %31
82: ; preds = %31
store i32 0, i32* %12
store i32 0, i32* %10
br label %83
83: ; preds = %98, %82
%84 = load i32, i32* %10
%85 = load i32, i32* %4
%86 = icmp slt i32 %84, %85
br i1 %86, label %87, label %101
87: ; preds = %83
%88 = load i32, i32* %12
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i32, i32* %26, i64 %89
%91 = load i32, i32* %90
%92 = icmp eq i32 %91, 0
br i1 %92, label %93, label %94
93: ; preds = %87
br label %101
94: ; preds = %87
%95 = load i32, i32* %12
%96 = add nsw i32 %95, 1
store i32 %96, i32* %12
br label %97
97: ; preds = %94
br label %98
98: ; preds = %97
%99 = load i32, i32* %10
%100 = add nsw i32 %99, 1
store i32 %100, i32* %10
br label %83
101: ; preds = %93, %83
%102 = load i32, i32* %12
%103 = call i32 @secondLowestInt(i32* %26, i32 %102)
store i32 %103, i32* %13
%104 = load i32, i32* %13
%105 = icmp eq i32 %104, 404
br i1 %105, label %106, label %110
106: ; preds = %101
%107 = load i32*, i32** %3
%108 = call i32 @fprintf(i32* %107, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
br label %187
110: ; preds = %101
%111 = load i32, i32* %13
%112 = load i32, i32* %12
%113 = call i32 @numIntInArr(i32 %111, i32* %26, i32 %112)
%114 = icmp sgt i32 %113, 1
br i1 %114, label %115, label %122
115: ; preds = %110
%116 = load i32*, i32** %3
%117 = call i32 @fprintf(i32* %116, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%118 = load i32, i32* %13
%119 = load i32, i32* %12
%120 = call i32 @numIntInArr(i32 %118, i32* %26, i32 %119)
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %120)
br label %186
122: ; preds = %110
%123 = load i32, i32* %13
%124 = load i32, i32* %12
%125 = call i32 @intLoc(i32 %123, i32* %26, i32 %124)
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i8, i8* %23, i64 %126
%128 = load i8, i8* %127
store i8 %128, i8* %14
%129 = load i8, i8* %14
%130 = sext i8 %129 to i32
%131 = icmp eq i32 %130, 72
br i1 %131, label %132, label %136
132: ; preds = %122
%133 = load i32*, i32** %3
%134 = call i32 @fprintf(i32* %133, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
br label %185
136: ; preds = %122
%137 = load i8, i8* %14
%138 = sext i8 %137 to i32
%139 = icmp eq i32 %138, 66
br i1 %139, label %140, label %144
140: ; preds = %136
%141 = load i32*, i32** %3
%142 = call i32 @fprintf(i32* %141, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
br label %184
144: ; preds = %136
%145 = load i8, i8* %14
%146 = sext i8 %145 to i32
%147 = icmp eq i32 %146, 71
br i1 %147, label %148, label %152
148: ; preds = %144
%149 = load i32*, i32** %3
%150 = call i32 @fprintf(i32* %149, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%151 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
br label %183
152: ; preds = %144
%153 = load i8, i8* %14
%154 = sext i8 %153 to i32
%155 = icmp eq i32 %154, 68
br i1 %155, label %156, label %160
156: ; preds = %152
%157 = load i32*, i32** %3
%158 = call i32 @fprintf(i32* %157, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%159 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
br label %182
160: ; preds = %152
%161 = load i8, i8* %14
%162 = sext i8 %161 to i32
%163 = icmp eq i32 %162, 65
br i1 %163, label %164, label %168
164: ; preds = %160
%165 = load i32*, i32** %3
%166 = call i32 @fprintf(i32* %165, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%167 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
br label %181
168: ; preds = %160
%169 = load i8, i8* %14
%170 = sext i8 %169 to i32
%171 = icmp eq i32 %170, 69
br i1 %171, label %172, label %176
172: ; preds = %168
%173 = load i32*, i32** %3
%174 = call i32 @fprintf(i32* %173, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%175 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
br label %180
176: ; preds = %168
%177 = load i32*, i32** %3
%178 = call i32 @fprintf(i32* %177, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%179 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
br label %180
180: ; preds = %176, %172
br label %181
181: ; preds = %180, %164
br label %182
182: ; preds = %181, %156
br label %183
183: ; preds = %182, %148
br label %184
184: ; preds = %183, %140
br label %185
185: ; preds = %184, %132
br label %186
186: ; preds = %185, %115
br label %187
187: ; preds = %186, %106
%188 = load i8*, i8** %5
%189 = load i32, i32* %1
ret i32 %189
}

LLVM IR (-O2):
@.str = [11 x i8] c"notlast.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [12 x i8] c"notlast.out\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [5 x i8] c"Tie\0A\00"
@.str.6 = [9 x i8] c"%d: Tie\0A\00"
@.str.7 = [11 x i8] c"Henrietta\0A\00"
@.str.8 = [8 x i8] c"Bessie\0A\00"
@.str.9 = [8 x i8] c"Gertie\0A\00"
@.str.10 = [7 x i8] c"Daisy\0A\00"
@.str.11 = [11 x i8] c"Annabelle\0A\00"
@.str.12 = [7 x i8] c"Elsie\0A\00"
@.str.13 = [8 x i8] c"Maggie\0A\00"
@str = [7 x i8] c"Maggie\00"
@str.14 = [6 x i8] c"Elsie\00"
@str.15 = [10 x i8] c"Annabelle\00"
@str.16 = [6 x i8] c"Daisy\00"
@str.17 = [7 x i8] c"Gertie\00"
@str.18 = [7 x i8] c"Bessie\00"
@str.19 = [10 x i8] c"Henrietta\00"
@str.20 = [8 x i8] c"404 Tie\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @FLine(i32* %1)
%4 = tail call i32 @strtoi(i32 %3)
%5 = zext i32 %4 to i64
%6 = alloca i8, i64 %5
%7 = alloca i32, i64 %5
%8 = call i32 @zero(i32* %7, i32 %4)
%9 = call i32 @zeroStr(i8* %6, i32 %4)
%10 = icmp sgt i32 %4, 0
br i1 %10, label %12, label %52
11: ; preds = %39
br i1 %10, label %42, label %52
12: ; preds = %0, %39
%13 = phi i32 [ %40, %39 ], [ 0, %0 ]
%14 = call signext i8 @fgetc(i32* %1)
%15 = call i64 @charExists(i8 signext %14, i8* %6, i32 %4)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %30
17: ; preds = %12, %17
%18 = phi i64 [ %22, %17 ], [ 0, %12 ]
%19 = getelementptr inbounds i8, i8* %6, i64 %18
%20 = load i8, i8* %19
%21 = icmp eq i8 %20, 48
%22 = add nuw i64 %18, 1
br i1 %21, label %23, label %17
23: ; preds = %17
%24 = and i64 %18, 4294967295
%25 = getelementptr inbounds i8, i8* %6, i64 %24
store i8 %14, i8* %25
%26 = call i8* @FLineSpace(i32* %1)
%27 = call i32 @FLine(i32* %1)
%28 = call i32 @strtoi(i32 %27)
%29 = getelementptr inbounds i32, i32* %7, i64 %24
store i32 %28, i32* %29
br label %39
30: ; preds = %12
%31 = call i8* @FLineSpace(i32* %1)
%32 = call i32 @FLine(i32* %1)
%33 = call i32 @strtoi(i32 %32)
%34 = call i32 @charLoc(i8 signext %14, i8* %6)
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i32, i32* %7, i64 %35
%37 = load i32, i32* %36
%38 = add nsw i32 %37, %33
store i32 %38, i32* %36
br label %39
39: ; preds = %30, %23
%40 = add nuw nsw i32 %13, 1
%41 = icmp eq i32 %40, %4
br i1 %41, label %11, label %12
42: ; preds = %11, %47
%43 = phi i64 [ %48, %47 ], [ 0, %11 ]
%44 = getelementptr inbounds i32, i32* %7, i64 %43
%45 = load i32, i32* %44
%46 = icmp eq i32 %45, 0
br i1 %46, label %50, label %47
47: ; preds = %42
%48 = add nuw nsw i64 %43, 1
%49 = icmp eq i64 %48, %5
br i1 %49, label %52, label %42
50: ; preds = %42
%51 = trunc i64 %43 to i32
br label %52
52: ; preds = %47, %50, %0, %11
%53 = phi i32 [ 0, %11 ], [ 0, %0 ], [ %51, %50 ], [ %4, %47 ]
%54 = call i32 @secondLowestInt(i32* %7, i32 %53)
%55 = icmp eq i32 %54, 404
br i1 %55, label %56, label %59
56: ; preds = %52
%57 = call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i64 4, i64 1, i32* %2)
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.20, i64 0, i64 0))
br label %92
59: ; preds = %52
%60 = call i32 @numIntInArr(i32 %54, i32* %7, i32 %53)
%61 = icmp sgt i32 %60, 1
br i1 %61, label %62, label %66
62: ; preds = %59
%63 = call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i64 4, i64 1, i32* %2)
%64 = call i32 @numIntInArr(i32 %54, i32* %7, i32 %53)
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %64)
br label %92
66: ; preds = %59
%67 = call i32 @intLoc(i32 %54, i32* %7, i32 %53)
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i8, i8* %6, i64 %68
%70 = load i8, i8* %69
switch i8 %70, label %89 [
i8 72, label %71
i8 66, label %74
i8 71, label %77
i8 68, label %80
i8 65, label %83
i8 69, label %86
]
71: ; preds = %66
%72 = call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i64 10, i64 1, i32* %2)
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.19, i64 0, i64 0))
br label %92
74: ; preds = %66
%75 = call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i64 7, i64 1, i32* %2)
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.18, i64 0, i64 0))
br label %92
77: ; preds = %66
%78 = call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i64 7, i64 1, i32* %2)
%79 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.17, i64 0, i64 0))
br label %92
80: ; preds = %66
%81 = call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i64 6, i64 1, i32* %2)
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.16, i64 0, i64 0))
br label %92
83: ; preds = %66
%84 = call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i64 10, i64 1, i32* %2)
%85 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.15, i64 0, i64 0))
br label %92
86: ; preds = %66
%87 = call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i64 6, i64 1, i32* %2)
%88 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.14, i64 0, i64 0))
br label %92
89: ; preds = %66
%90 = call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i64 7, i64 1, i32* %2)
%91 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
br label %92
92: ; preds = %71, %77, %83, %89, %86, %80, %74, %62, %56
ret i32 0
}