#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 */
scalar_t__ EOF;
int atoi(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ fscanf(int /*<<< orphan*/ *, char *, char *);
char pick_heatmap(int *);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int main() {
  FILE *fp = fopen("input", "r");
  char data[64];
  int real_rooms = 0, sector_id_sum = 0;
  if (fp == NULL) {
    printf("could not open input file\n");
    return -1;
  }
  while (fscanf(fp, "%s", data) != EOF) {
    int i = -1, sector_id = 0, heatmap['z' - 'a' + 1] = {0};
    char checksum[6], calc[6] = {'\0'};
    while (data[++i] != ']') {
      if (!sector_id && data[i] >= 'a' && data[i] <= 'z') {
        heatmap[(int)data[i] - 'a']++;
      }
      if (!sector_id && data[i] >= '0' && data[i] <= '9') {
        sector_id = atoi(data + i);
      }
      if (data[i] == '[') {
        strncpy(checksum, data + (++i), 5);
      }
    }
    for (i = 0; i < 5; i++) {
      calc[i] = pick_heatmap(heatmap) + 'a';
    }
    if (strcmp(checksum, calc) == 0) {
      real_rooms++;
      sector_id_sum = sector_id_sum + sector_id;
    }
  }
  printf("There were %i valid rooms, with a sector id sum of %i\n", real_rooms,
         sector_id_sum);
  fclose(fp);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe57(%rip),%rdi
lea    0xe56(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11ec <main+0x5c>
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13c0 <main+0x230>
jmp    11f1 <main+0x61>
mov    -0x10(%rbp),%rdi
lea    -0x50(%rbp),%rdx
lea    0xe23(%rip),%rsi
call   1080 <fscanf@plt>
mov    0x2ddc(%rip),%rcx
cmp    (%rcx),%rax
je     139c <main+0x20c>
movl   $0xffffffff,-0x5c(%rbp)
movl   $0x0,-0x60(%rbp)
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0x68,%edx
call   1070 <memset@plt>
lea    -0xdc(%rbp),%rdi
xor    %esi,%esi
mov    $0x6,%edx
call   1070 <memset@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
cltq
movsbl -0x50(%rbp,%rax,1),%eax
cmp    $0x5d,%eax
je     132a <main+0x19a>
cmpl   $0x0,-0x60(%rbp)
jne    12af <main+0x11f>
movslq -0x5c(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%eax
cmp    $0x61,%eax
jl     12af <main+0x11f>
movslq -0x5c(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%eax
cmp    $0x7a,%eax
jg     12af <main+0x11f>
movslq -0x5c(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%eax
sub    $0x61,%eax
cltq
mov    -0xd0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0xd0(%rbp,%rax,4)
cmpl   $0x0,-0x60(%rbp)
jne    12f0 <main+0x160>
movslq -0x5c(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%eax
cmp    $0x30,%eax
jl     12f0 <main+0x160>
movslq -0x5c(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%eax
cmp    $0x39,%eax
jg     12f0 <main+0x160>
lea    -0x50(%rbp),%rdi
movslq -0x5c(%rbp),%rax
add    %rax,%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x60(%rbp)
movslq -0x5c(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%eax
cmp    $0x5b,%eax
jne    1325 <main+0x195>
lea    -0xd6(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
cltq
add    %rax,%rsi
mov    $0x5,%edx
call   1040 <strncpy@plt>
jmp    1249 <main+0xb9>
movl   $0x0,-0x5c(%rbp)
cmpl   $0x5,-0x5c(%rbp)
jge    1368 <main+0x1d8>
lea    -0xd0(%rbp),%rdi
call   1030 <pick_heatmap@plt>
movsbl %al,%eax
add    $0x61,%eax
mov    %al,%cl
movslq -0x5c(%rbp),%rax
mov    %cl,-0xdc(%rbp,%rax,1)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1331 <main+0x1a1>
lea    -0xd6(%rbp),%rdi
lea    -0xdc(%rbp),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1397 <main+0x207>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x58(%rbp),%eax
add    -0x60(%rbp),%eax
mov    %eax,-0x58(%rbp)
jmp    11f1 <main+0x61>
mov    -0x54(%rbp),%esi
mov    -0x58(%rbp),%edx
lea    0xc7d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
lea    0xe58(%rip),%rdi
lea    0xe57(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     1206 <main+0x76>
mov    %rax,%rbx
lea    0xe45(%rip),%rsi
lea    0x20(%rsp),%rdx
mov    %rax,%rdi
call   1080 <fscanf@plt>
mov    0x2e11(%rip),%rcx
mov    $0x0,%r13d
mov    $0x0,%ebp
cmp    (%rcx),%rax
jne    1229 <main+0x99>
lea    0xe1d(%rip),%rdi
mov    %r13d,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
xor    %eax,%eax
jmp    1217 <main+0x87>
lea    0xe35(%rip),%rdi
call   1050 <puts@plt>
mov    $0xffffffff,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebp,%ebp
xor    %r13d,%r13d
jmp    12d9 <main+0x149>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x60(%rsp),%rbp
mov    %rbp,%rdi
call   1030 <pick_heatmap@plt>
add    $0x61,%al
mov    %al,0xc(%rsp)
mov    %rbp,%rdi
call   1030 <pick_heatmap@plt>
add    $0x61,%al
mov    %al,0xd(%rsp)
mov    %rbp,%rdi
call   1030 <pick_heatmap@plt>
add    $0x61,%al
mov    %al,0xe(%rsp)
mov    %rbp,%rdi
call   1030 <pick_heatmap@plt>
add    $0x61,%al
mov    %al,0xf(%rsp)
mov    %rbp,%rdi
call   1030 <pick_heatmap@plt>
add    $0x61,%al
mov    %al,0x10(%rsp)
lea    0x1a(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1090 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    $0x0,%eax
cmovne %eax,%r15d
add    %ecx,%r13d
mov    0x14(%rsp),%ebp
add    %r15d,%ebp
mov    %rbx,%rdi
lea    0xd49(%rip),%rsi
lea    0x20(%rsp),%rdx
call   1080 <fscanf@plt>
mov    0x2d18(%rip),%rcx
cmp    (%rcx),%rax
je     11e7 <main+0x57>
mov    %ebp,0x14(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movq   $0x0,0xc0(%rsp)
movw   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
mov    0x20(%rsp),%al
mov    $0x0,%r15d
cmp    $0x5d,%al
je     1240 <main+0xb0>
mov    $0xffffffff,%r12d
xor    %r14d,%r14d
lea    0x20(%rsp),%rdi
xor    %r15d,%r15d
jmp    137d <main+0x1ed>
nopw   0x0(%rax,%rax,1)
movzbl %al,%eax
add    $0xffffff9f,%eax
addl   $0x1,0x60(%rsp,%rax,4)
xor    %r15d,%r15d
mov    %r14d,%r12d
movslq %r14d,%rax
lea    0x1(%rax),%r14
lea    (%rsp,%rax,1),%rdi
add    $0x21,%rdi
movzbl 0x21(%rsp,%rax,1),%eax
cmp    $0x5d,%al
je     1240 <main+0xb0>
test   %r15d,%r15d
jne    138a <main+0x1fa>
cmp    $0x61,%al
jl     138a <main+0x1fa>
cmp    $0x7a,%al
jle    1350 <main+0x1c0>
test   %r15d,%r15d
jne    13b0 <main+0x220>
lea    -0x30(%rax),%ecx
cmp    $0x9,%cl
ja     13b0 <main+0x220>
call   10b0 <atoi@plt>
mov    %eax,%r15d
jmp    135e <main+0x1ce>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    $0x5b,%al
jne    135e <main+0x1ce>
movslq %r12d,%rax
add    $0x2,%r12d
lea    0x20(%rsp),%rcx
lea    (%rax,%rcx,1),%rsi
add    $0x2,%rsi
lea    0x1a(%rsp),%rdi
mov    $0x5,%edx
call   1040 <strncpy@plt>
mov    %r12d,%r14d
jmp    135e <main+0x1ce>

LLVM IR (-O0):
@.str = [6 x i8] c"input\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [27 x i8] c"could not open input file\0A\00"
@.str.3 = [3 x i8] c"%s\00"
@EOF = global i64 0
@.str.4 = [55 x i8] c"There were %i valid rooms, with a sector id sum of %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [64 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [26 x i32]
%9 = alloca [6 x i8]
%10 = alloca [6 x i8]
store i32 0, i32* %1
%11 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %11, i32** %2
store i32 0, i32* %4
store i32 0, i32* %5
%12 = load i32*, i32** %2
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %16
14: ; preds = %0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %1
br label %135
16: ; preds = %0
br label %17
17: ; preds = %128, %16
%18 = load i32*, i32** %2
%19 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%20 = call i64 @fscanf(i32* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %19)
%21 = load i64, i64* @EOF
%22 = icmp ne i64 %20, %21
br i1 %22, label %23, label %129
23: ; preds = %17
store i32 -1, i32* %6
store i32 0, i32* %7
%24 = bitcast [26 x i32]* %8 to i8*
%25 = bitcast [6 x i8]* %10 to i8*
br label %26
26: ; preds = %100, %23
%27 = load i32, i32* %6
%28 = add nsw i32 %27, 1
store i32 %28, i32* %6
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %29
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp ne i32 %32, 93
br i1 %33, label %34, label %101
34: ; preds = %26
%35 = load i32, i32* %7
%36 = icmp ne i32 %35, 0
br i1 %36, label %62, label %37
37: ; preds = %34
%38 = load i32, i32* %6
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %39
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp sge i32 %42, 97
br i1 %43, label %44, label %62
44: ; preds = %37
%45 = load i32, i32* %6
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %46
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = icmp sle i32 %49, 122
br i1 %50, label %51, label %62
51: ; preds = %44
%52 = load i32, i32* %6
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %53
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = sub nsw i32 %56, 97
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [26 x i32], [26 x i32]* %8, i64 0, i64 %58
%60 = load i32, i32* %59
%61 = add nsw i32 %60, 1
store i32 %61, i32* %59
br label %62
62: ; preds = %51, %44, %37, %34
%63 = load i32, i32* %7
%64 = icmp ne i32 %63, 0
br i1 %64, label %85, label %65
65: ; preds = %62
%66 = load i32, i32* %6
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %67
%69 = load i8, i8* %68
%70 = sext i8 %69 to i32
%71 = icmp sge i32 %70, 48
br i1 %71, label %72, label %85
72: ; preds = %65
%73 = load i32, i32* %6
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %74
%76 = load i8, i8* %75
%77 = sext i8 %76 to i32
%78 = icmp sle i32 %77, 57
br i1 %78, label %79, label %85
79: ; preds = %72
%80 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%81 = load i32, i32* %6
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i8, i8* %80, i64 %82
%84 = call i32 @atoi(i8* %83)
store i32 %84, i32* %7
br label %85
85: ; preds = %79, %72, %65, %62
%86 = load i32, i32* %6
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %87
%89 = load i8, i8* %88
%90 = sext i8 %89 to i32
%91 = icmp eq i32 %90, 91
br i1 %91, label %92, label %100
92: ; preds = %85
%93 = getelementptr inbounds [6 x i8], [6 x i8]* %9, i64 0, i64 0
%94 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%95 = load i32, i32* %6
%96 = add nsw i32 %95, 1
store i32 %96, i32* %6
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i8, i8* %94, i64 %97
%99 = call i32 @strncpy(i8* %93, i8* %98, i32 5)
br label %100
100: ; preds = %92, %85
br label %26
101: ; preds = %26
store i32 0, i32* %6
br label %102
102: ; preds = %114, %101
%103 = load i32, i32* %6
%104 = icmp slt i32 %103, 5
br i1 %104, label %105, label %117
105: ; preds = %102
%106 = getelementptr inbounds [26 x i32], [26 x i32]* %8, i64 0, i64 0
%107 = call signext i8 @pick_heatmap(i32* %106)
%108 = sext i8 %107 to i32
%109 = add nsw i32 %108, 97
%110 = trunc i32 %109 to i8
%111 = load i32, i32* %6
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 %112
store i8 %110, i8* %113
br label %114
114: ; preds = %105
%115 = load i32, i32* %6
%116 = add nsw i32 %115, 1
store i32 %116, i32* %6
br label %102
117: ; preds = %102
%118 = getelementptr inbounds [6 x i8], [6 x i8]* %9, i64 0, i64 0
%119 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 0
%120 = call i64 @strcmp(i8* %118, i8* %119)
%121 = icmp eq i64 %120, 0
br i1 %121, label %122, label %128
122: ; preds = %117
%123 = load i32, i32* %4
%124 = add nsw i32 %123, 1
store i32 %124, i32* %4
%125 = load i32, i32* %5
%126 = load i32, i32* %7
%127 = add nsw i32 %125, %126
store i32 %127, i32* %5
br label %128
128: ; preds = %122, %117
br label %17
129: ; preds = %17
%130 = load i32, i32* %4
%131 = load i32, i32* %5
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 %130, i32 %131)
%133 = load i32*, i32** %2
%134 = call i32 @fclose(i32* %133)
store i32 0, i32* %1
br label %135
135: ; preds = %129, %14
%136 = load i32, i32* %1
ret i32 %136
}

LLVM IR (-O2):
@.str = [6 x i8] c"input\00"
@.str.1 = [2 x i8] c"r\00"
@.str.3 = [3 x i8] c"%s\00"
@EOF = global i64 0
@.str.4 = [55 x i8] c"There were %i valid rooms, with a sector id sum of %i\0A\00"
@str = [26 x i8] c"could not open input file\00"
define i32 @main() {
%1 = alloca [64 x i8]
%2 = alloca [26 x i32]
%3 = alloca [6 x i8]
%4 = alloca [6 x i8]
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%7 = icmp eq i32* %5, null
br i1 %7, label %21, label %8
8: ; preds = %0
%9 = call i64 @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%10 = load i64, i64* @EOF
%11 = icmp eq i64 %9, %10
br i1 %11, label %88, label %12
12: ; preds = %8
%13 = bitcast [26 x i32]* %2 to i8*
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%15 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%16 = getelementptr inbounds [26 x i32], [26 x i32]* %2, i64 0, i64 0
%17 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 1
%18 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 2
%19 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 3
%20 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 4
br label %23
21: ; preds = %0
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %93
23: ; preds = %12, %28
%24 = phi i32 [ 0, %12 ], [ %45, %28 ]
%25 = phi i32 [ 0, %12 ], [ %43, %28 ]
%26 = load i8, i8* %6
%27 = icmp eq i8 %26, 93
br i1 %27, label %28, label %49
28: ; preds = %80, %23
%29 = phi i32 [ 0, %23 ], [ %81, %80 ]
%30 = call signext i8 @pick_heatmap(i32* %16)
%31 = add i8 %30, 97
store i8 %31, i8* %15
%32 = call signext i8 @pick_heatmap(i32* %16)
%33 = add i8 %32, 97
store i8 %33, i8* %17
%34 = call signext i8 @pick_heatmap(i32* %16)
%35 = add i8 %34, 97
store i8 %35, i8* %18
%36 = call signext i8 @pick_heatmap(i32* %16)
%37 = add i8 %36, 97
store i8 %37, i8* %19
%38 = call signext i8 @pick_heatmap(i32* %16)
%39 = add i8 %38, 97
store i8 %39, i8* %20
%40 = call i64 @strcmp(i8* %14, i8* %15)
%41 = icmp eq i64 %40, 0
%42 = zext i1 %41 to i32
%43 = add nuw nsw i32 %25, %42
%44 = select i1 %41, i32 %29, i32 0
%45 = add nsw i32 %44, %24
%46 = call i64 @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%47 = load i64, i64* @EOF
%48 = icmp eq i64 %46, %47
br i1 %48, label %88, label %23
49: ; preds = %23, %80
%50 = phi i8 [ %86, %80 ], [ %26, %23 ]
%51 = phi i8* [ %85, %80 ], [ %6, %23 ]
%52 = phi i32 [ %83, %80 ], [ 0, %23 ]
%53 = phi i32 [ %81, %80 ], [ 0, %23 ]
%54 = phi i32 [ %82, %80 ], [ -1, %23 ]
%55 = icmp eq i32 %53, 0
%56 = icmp sgt i8 %50, 96
%57 = select i1 %55, i1 %56, i1 false
%58 = icmp slt i8 %50, 123
%59 = select i1 %57, i1 %58, i1 false
br i1 %59, label %60, label %67
60: ; preds = %49
%61 = zext i8 %50 to i64
%62 = add nuw nsw i64 %61, 4294967199
%63 = and i64 %62, 4294967295
%64 = getelementptr inbounds [26 x i32], [26 x i32]* %2, i64 0, i64 %63
%65 = load i32, i32* %64
%66 = add nsw i32 %65, 1
store i32 %66, i32* %64
br label %80
67: ; preds = %49
%68 = add i8 %50, -48
%69 = icmp ult i8 %68, 10
%70 = select i1 %55, i1 %69, i1 false
br i1 %70, label %71, label %73
71: ; preds = %67
%72 = call i32 @atoi(i8* %51)
br label %80
73: ; preds = %67
%74 = icmp eq i8 %50, 91
br i1 %74, label %75, label %80
75: ; preds = %73
%76 = add nsw i32 %54, 2
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 %77
%79 = call i32 @strncpy(i8* %14, i8* %78, i32 5)
br label %80
80: ; preds = %60, %71, %75, %73
%81 = phi i32 [ %53, %75 ], [ %53, %73 ], [ %72, %71 ], [ 0, %60 ]
%82 = phi i32 [ %76, %75 ], [ %52, %73 ], [ %52, %71 ], [ %52, %60 ]
%83 = add nsw i32 %82, 1
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 %84
%86 = load i8, i8* %85
%87 = icmp eq i8 %86, 93
br i1 %87, label %28, label %49
88: ; preds = %28, %8
%89 = phi i32 [ 0, %8 ], [ %43, %28 ]
%90 = phi i32 [ 0, %8 ], [ %45, %28 ]
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 %89, i32 %90)
%92 = call i32 @fclose(i32* %5)
br label %93
93: ; preds = %88, %21
%94 = phi i32 [ -1, %21 ], [ 0, %88 ]
ret i32 %94
}