#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 EXIT_FAILURE;
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ fscanf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  FILE *fp;
  bool r;
  char c;
  unsigned long long int res = 0;
  if (argc != 2) {
    printf("Usage: %s [FILE]\n", argv[0]);
    return 1;
  }
  fp = fopen(*++argv, "r");
  while (fscanf(fp, "%c", &c) != EOF) {
    if (c != '0')
      goto fail_nonzero;
    if (fscanf(fp, "%c", &c) == EOF)
      goto fail_eof;
    if (c == ' ') {
      r = false;
    } else if (c == '0') {
      r = true;
      if (fscanf(fp, "%c", &c) == EOF)
        goto fail_eof;
      if (c != ' ')
        goto fail_nonspace;
    } else {
      goto fail_input;
    }
    while (fscanf(fp, "%c", &c) != EOF) {
      if (c == ' ' || c == '\n') {
        break;
      }
      if (c != '0')
        goto fail_nonzero;
      if ((res << 1) < res) {
        goto fail_overflow;
      }
      res = (res << 1) + !!r;
    }
    if (c == '\n') {
      printf("%llu\n", res);
      res = 0;
    }
  }
  return 0;
fail_nonzero:
  printf("unexpected non-zero input: \"%c\"\n", c);
  return EXIT_FAILURE;
fail_nonspace:
  printf("unexpected non-space input: \"%c\"\n", c);
  return EXIT_FAILURE;
fail_eof:
  printf("unexpected end of input\n");
  return EXIT_FAILURE;
fail_input:
  printf("unexpected input: \"%c\"\n", c);
  return EXIT_FAILURE;
fail_overflow:
  printf("overflow\n");
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x28(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1179 <main+0x49>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13e7 <main+0x2b7>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rdi
lea    0xe7f(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe6d(%rip),%rsi
lea    -0x1d(%rbp),%rdx
call   1040 <fscanf@plt>
mov    0x2e31(%rip),%rcx
cmp    (%rcx),%rax
je     1339 <main+0x209>
movsbl -0x1d(%rbp),%eax
cmp    $0x30,%eax
je     11d2 <main+0xa2>
jmp    1345 <main+0x215>
mov    -0x18(%rbp),%rdi
lea    0xe37(%rip),%rsi
lea    -0x1d(%rbp),%rdx
call   1040 <fscanf@plt>
mov    0x2dfb(%rip),%rcx
cmp    (%rcx),%rax
jne    11fb <main+0xcb>
jmp    138b <main+0x25b>
movsbl -0x1d(%rbp),%eax
cmp    $0x20,%eax
jne    1214 <main+0xe4>
movl   $0x0,-0x1c(%rbp)
jmp    1272 <main+0x142>
movsbl -0x1d(%rbp),%eax
cmp    $0x30,%eax
jne    1268 <main+0x138>
movl   $0x1,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xde1(%rip),%rsi
lea    -0x1d(%rbp),%rdx
call   1040 <fscanf@plt>
mov    0x2da5(%rip),%rcx
cmp    (%rcx),%rax
jne    1251 <main+0x121>
jmp    138b <main+0x25b>
movsbl -0x1d(%rbp),%eax
cmp    $0x20,%eax
je     1263 <main+0x133>
jmp    1368 <main+0x238>
jmp    126d <main+0x13d>
jmp    13aa <main+0x27a>
jmp    1272 <main+0x142>
jmp    1277 <main+0x147>
mov    -0x18(%rbp),%rdi
lea    0xd92(%rip),%rsi
lea    -0x1d(%rbp),%rdx
call   1040 <fscanf@plt>
mov    0x2d56(%rip),%rcx
cmp    (%rcx),%rax
je     130d <main+0x1dd>
movsbl -0x1d(%rbp),%eax
cmp    $0x20,%eax
je     12b5 <main+0x185>
movsbl -0x1d(%rbp),%eax
cmp    $0xa,%eax
jne    12ba <main+0x18a>
jmp    130d <main+0x1dd>
movsbl -0x1d(%rbp),%eax
cmp    $0x30,%eax
je     12cc <main+0x19c>
jmp    1345 <main+0x215>
mov    -0x28(%rbp),%rax
shl    $0x1,%rax
cmp    -0x28(%rbp),%rax
jae    12e3 <main+0x1b3>
jmp    13cd <main+0x29d>
mov    -0x28(%rbp),%rax
shl    $0x1,%rax
cmpl   $0x0,-0x1c(%rbp)
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
jmp    1277 <main+0x147>
movsbl -0x1d(%rbp),%eax
cmp    $0xa,%eax
jne    1334 <main+0x204>
mov    -0x28(%rbp),%rsi
lea    0xcf2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x28(%rbp)
jmp    119c <main+0x6c>
movl   $0x0,-0x4(%rbp)
jmp    13e7 <main+0x2b7>
movsbl -0x1d(%rbp),%esi
lea    0xccd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2c7a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    13e7 <main+0x2b7>
movsbl -0x1d(%rbp),%esi
lea    0xccb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2c57(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    13e7 <main+0x2b7>
lea    0xcce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2c38(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    13e7 <main+0x2b7>
movsbl -0x1d(%rbp),%esi
lea    0xcc4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2c15(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    13e7 <main+0x2b7>
lea    0xcbd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2bf6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jne    12cb <main+0x18b>
mov    0x8(%rsi),%rdi
lea    0xeb3(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r13
lea    0xea6(%rip),%rsi
lea    0x7(%rsp),%rdx
mov    %rax,%rdi
call   1050 <fscanf@plt>
mov    %rax,%rcx
mov    0x2e63(%rip),%r12
xor    %eax,%eax
cmp    (%r12),%rcx
je     1301 <main+0x1c1>
lea    0xe7c(%rip),%r15
xor    %ebx,%ebx
jmp    11bf <main+0x7f>
nopl   0x0(%rax)
mov    %r13,%rdi
mov    %r15,%rsi
lea    0x7(%rsp),%rdx
call   1050 <fscanf@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    (%r12),%rcx
je     1301 <main+0x1c1>
mov    0x7(%rsp),%al
cmp    $0x30,%al
jne    12b8 <main+0x178>
mov    %r13,%rdi
mov    %r15,%rbp
mov    %r15,%rsi
lea    0x7(%rsp),%rdx
call   1050 <fscanf@plt>
cmp    (%r12),%rax
je     12ec <main+0x1ac>
movsbl 0x7(%rsp),%r15d
cmp    $0x20,%r15d
je     1226 <main+0xe6>
cmp    $0x30,%r15b
jne    1310 <main+0x1d0>
mov    %r13,%rdi
mov    %rbp,%rsi
lea    0x7(%rsp),%rdx
call   1050 <fscanf@plt>
cmp    (%r12),%rax
je     12ec <main+0x1ac>
movsbl 0x7(%rsp),%esi
cmp    $0x20,%esi
jne    131c <main+0x1dc>
mov    %r13,%rdi
mov    %rbp,%rsi
lea    0x7(%rsp),%rdx
call   1050 <fscanf@plt>
cmp    (%r12),%rax
jne    1270 <main+0x130>
mov    %rbp,%r15
mov    0x7(%rsp),%al
cmp    $0xa,%al
jne    11a0 <main+0x60>
lea    0xdc5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %ebx,%ebx
jmp    11a0 <main+0x60>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %r14d,%r14d
cmp    $0x20,%r15b
setne  %r14b
mov    %rbp,%r15
xchg   %ax,%ax
movzbl 0x7(%rsp),%eax
cmp    $0x30,%al
jne    12b0 <main+0x170>
lea    (%rbx,%rbx,1),%rax
cmp    %rbx,%rax
jb     12e3 <main+0x1a3>
lea    (%r14,%rbx,2),%rbx
mov    %r13,%rdi
mov    %r15,%rsi
lea    0x7(%rsp),%rdx
call   1050 <fscanf@plt>
cmp    (%r12),%rax
jne    1280 <main+0x140>
jmp    123f <main+0xff>
xchg   %ax,%ax
cmp    $0xa,%al
je     1243 <main+0x103>
cmp    $0x20,%al
je     1243 <main+0x103>
movsbl %al,%esi
lea    0xd5b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    12f8 <main+0x1b8>
mov    (%rsi),%rsi
lea    0xd2b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%eax
jmp    1301 <main+0x1c1>
lea    0xd8e(%rip),%rdi
jmp    12f3 <main+0x1b3>
lea    0xd8e(%rip),%rdi
call   1030 <puts@plt>
mov    0x2cd9(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd49(%rip),%rdi
mov    %r15d,%esi
jmp    12c2 <main+0x182>
lea    0xd1b(%rip),%rdi
jmp    12c2 <main+0x182>

LLVM IR (-O0):
@.str = [18 x i8] c"Usage: %s [FILE]\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%c\00"
@EOF = global i64 0
@.str.3 = [6 x i8] c"%llu\0A\00"
@.str.4 = [33 x i8] c"unexpected non-zero input: \22%c\22\0A\00"
@EXIT_FAILURE = global i32 0
@.str.5 = [34 x i8] c"unexpected non-space input: \22%c\22\0A\00"
@.str.6 = [25 x i8] c"unexpected end of input\0A\00"
@.str.7 = [24 x i8] c"unexpected input: \22%c\22\0A\00"
@.str.8 = [10 x i8] c"overflow\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i8
%9 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %9
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 2
br i1 %11, label %12, label %17
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %15)
store i32 1, i32* %3
br label %127
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i32 1
store i8** %19, i8*** %5
%20 = load i8*, i8** %19
%21 = call i32* @fopen(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %21, i32** %6
br label %22
22: ; preds = %104, %17
%23 = load i32*, i32** %6
%24 = call i64 @fscanf(i32* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%25 = load i64, i64* @EOF
%26 = icmp ne i64 %24, %25
br i1 %26, label %27, label %105
27: ; preds = %22
%28 = load i8, i8* %8
%29 = sext i8 %28 to i32
%30 = icmp ne i32 %29, 48
br i1 %30, label %31, label %32
31: ; preds = %27
br label %106
32: ; preds = %27
%33 = load i32*, i32** %6
%34 = call i64 @fscanf(i32* %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%35 = load i64, i64* @EOF
%36 = icmp eq i64 %34, %35
br i1 %36, label %37, label %38
37: ; preds = %32
br label %116
38: ; preds = %32
%39 = load i8, i8* %8
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 32
br i1 %41, label %42, label %43
42: ; preds = %38
store i32 0, i32* %7
br label %61
43: ; preds = %38
%44 = load i8, i8* %8
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %45, 48
br i1 %46, label %47, label %59
47: ; preds = %43
store i32 1, i32* %7
%48 = load i32*, i32** %6
%49 = call i64 @fscanf(i32* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%50 = load i64, i64* @EOF
%51 = icmp eq i64 %49, %50
br i1 %51, label %52, label %53
52: ; preds = %47
br label %116
53: ; preds = %47
%54 = load i8, i8* %8
%55 = sext i8 %54 to i32
%56 = icmp ne i32 %55, 32
br i1 %56, label %57, label %58
57: ; preds = %53
br label %111
58: ; preds = %53
br label %60
59: ; preds = %43
br label %119
60: ; preds = %58
br label %61
61: ; preds = %60, %42
br label %62
62: ; preds = %87, %61
%63 = load i32*, i32** %6
%64 = call i64 @fscanf(i32* %63, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%65 = load i64, i64* @EOF
%66 = icmp ne i64 %64, %65
br i1 %66, label %67, label %97
67: ; preds = %62
%68 = load i8, i8* %8
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %69, 32
br i1 %70, label %75, label %71
71: ; preds = %67
%72 = load i8, i8* %8
%73 = sext i8 %72 to i32
%74 = icmp eq i32 %73, 10
br i1 %74, label %75, label %76
75: ; preds = %71, %67
br label %97
76: ; preds = %71
%77 = load i8, i8* %8
%78 = sext i8 %77 to i32
%79 = icmp ne i32 %78, 48
br i1 %79, label %80, label %81
80: ; preds = %76
br label %106
81: ; preds = %76
%82 = load i64, i64* %9
%83 = shl i64 %82, 1
%84 = load i64, i64* %9
%85 = icmp ult i64 %83, %84
br i1 %85, label %86, label %87
86: ; preds = %81
br label %124
87: ; preds = %81
%88 = load i64, i64* %9
%89 = shl i64 %88, 1
%90 = load i32, i32* %7
%91 = icmp ne i32 %90, 0
%92 = xor i1 %91, true
%93 = xor i1 %92, true
%94 = zext i1 %93 to i32
%95 = sext i32 %94 to i64
%96 = add i64 %89, %95
store i64 %96, i64* %9
br label %62
97: ; preds = %75, %62
%98 = load i8, i8* %8
%99 = sext i8 %98 to i32
%100 = icmp eq i32 %99, 10
br i1 %100, label %101, label %104
101: ; preds = %97
%102 = load i64, i64* %9
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i64 %102)
store i64 0, i64* %9
br label %104
104: ; preds = %101, %97
br label %22
105: ; preds = %22
store i32 0, i32* %3
br label %127
106: ; preds = %80, %31
%107 = load i8, i8* %8
%108 = sext i8 %107 to i32
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %108)
%110 = load i32, i32* @EXIT_FAILURE
store i32 %110, i32* %3
br label %127
111: ; preds = %57
%112 = load i8, i8* %8
%113 = sext i8 %112 to i32
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i32 %113)
%115 = load i32, i32* @EXIT_FAILURE
store i32 %115, i32* %3
br label %127
116: ; preds = %52, %37
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%118 = load i32, i32* @EXIT_FAILURE
store i32 %118, i32* %3
br label %127
119: ; preds = %59
%120 = load i8, i8* %8
%121 = sext i8 %120 to i32
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32 %121)
%123 = load i32, i32* @EXIT_FAILURE
store i32 %123, i32* %3
br label %127
124: ; preds = %86
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%126 = load i32, i32* @EXIT_FAILURE
store i32 %126, i32* %3
br label %127
127: ; preds = %124, %119, %116, %111, %106, %105, %12
%128 = load i32, i32* %3
ret i32 %128
}

LLVM IR (-O2):
@.str = [18 x i8] c"Usage: %s [FILE]\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%c\00"
@EOF = global i64 0
@.str.3 = [6 x i8] c"%llu\0A\00"
@.str.4 = [33 x i8] c"unexpected non-zero input: \22%c\22\0A\00"
@EXIT_FAILURE = global i32 0
@.str.5 = [34 x i8] c"unexpected non-space input: \22%c\22\0A\00"
@.str.7 = [24 x i8] c"unexpected input: \22%c\22\0A\00"
@str = [9 x i8] c"overflow\00"
@str.9 = [24 x i8] c"unexpected end of input\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i8
%4 = icmp eq i32 %0, 2
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i8*, i8** %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %86
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32* @fopen(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = call i64 @fscanf(i32* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%13 = load i64, i64* @EOF
%14 = icmp eq i64 %12, %13
br i1 %14, label %86, label %15
15: ; preds = %8, %62
%16 = phi i64 [ %63, %62 ], [ 0, %8 ]
%17 = load i8, i8* %3
%18 = icmp eq i8 %17, 48
br i1 %18, label %19, label %67
19: ; preds = %15
%20 = call i64 @fscanf(i32* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%21 = load i64, i64* @EOF
%22 = icmp eq i64 %20, %21
br i1 %22, label %76, label %23
23: ; preds = %19
%24 = load i8, i8* %3
%25 = icmp eq i8 %24, 32
br i1 %25, label %35, label %26
26: ; preds = %23
%27 = icmp eq i8 %24, 48
br i1 %27, label %28, label %79
28: ; preds = %26
%29 = call i64 @fscanf(i32* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%30 = load i64, i64* @EOF
%31 = icmp eq i64 %29, %30
br i1 %31, label %76, label %32
32: ; preds = %28
%33 = load i8, i8* %3
%34 = icmp eq i8 %33, 32
br i1 %34, label %35, label %72
35: ; preds = %23, %32
%36 = call i64 @fscanf(i32* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%37 = load i64, i64* @EOF
%38 = icmp eq i64 %36, %37
br i1 %38, label %53, label %39
39: ; preds = %35
%40 = xor i1 %25, true
%41 = zext i1 %40 to i64
br label %46
42: ; preds = %49
%43 = call i64 @fscanf(i32* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%44 = load i64, i64* @EOF
%45 = icmp eq i64 %43, %44
br i1 %45, label %53, label %46
46: ; preds = %39, %42
%47 = phi i64 [ %16, %39 ], [ %52, %42 ]
%48 = load i8, i8* %3
switch i8 %48, label %67 [
i8 32, label %56
i8 10, label %56
i8 48, label %49
]
49: ; preds = %46
%50 = shl i64 %47, 1
%51 = icmp ult i64 %50, %47
%52 = or i64 %50, %41
br i1 %51, label %83, label %42
53: ; preds = %42, %35
%54 = phi i64 [ %16, %35 ], [ %52, %42 ]
%55 = load i8, i8* %3
br label %56
56: ; preds = %46, %46, %53
%57 = phi i64 [ %54, %53 ], [ %47, %46 ], [ %47, %46 ]
%58 = phi i8 [ %55, %53 ], [ %48, %46 ], [ %48, %46 ]
%59 = icmp eq i8 %58, 10
br i1 %59, label %60, label %62
60: ; preds = %56
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i64 %57)
br label %62
62: ; preds = %60, %56
%63 = phi i64 [ 0, %60 ], [ %57, %56 ]
%64 = call i64 @fscanf(i32* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%65 = load i64, i64* @EOF
%66 = icmp eq i64 %64, %65
br i1 %66, label %86, label %15
67: ; preds = %15, %46
%68 = phi i8 [ %48, %46 ], [ %17, %15 ]
%69 = sext i8 %68 to i32
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %69)
%71 = load i32, i32* @EXIT_FAILURE
br label %86
72: ; preds = %32
%73 = sext i8 %33 to i32
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i32 %73)
%75 = load i32, i32* @EXIT_FAILURE
br label %86
76: ; preds = %28, %19
%77 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.9, i64 0, i64 0))
%78 = load i32, i32* @EXIT_FAILURE
br label %86
79: ; preds = %26
%80 = sext i8 %24 to i32
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32 %80)
%82 = load i32, i32* @EXIT_FAILURE
br label %86
83: ; preds = %49
%84 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%85 = load i32, i32* @EXIT_FAILURE
br label %86
86: ; preds = %62, %8, %83, %79, %76, %72, %67, %5
%87 = phi i32 [ 1, %5 ], [ %71, %67 ], [ %78, %76 ], [ %85, %83 ], [ %75, %72 ], [ %82, %79 ], [ 0, %8 ], [ 0, %62 ]
ret i32 %87
}