#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 */
char EOF;
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ fscanf(int /*<<< orphan*/ *, char *, unsigned int *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
char getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  FILE *fp;
  unsigned d;
  int s = 0;
  char c;
  if (argc != 2) {
    printf("Usage: %s [FILE]\n", argv[0]);
    return 1;
  }
  fp = fopen(*++argv, "r");
  while (fscanf(fp, "%x", &d) != EOF) {
    s += d;
    while (fscanf(fp, "%x", &d) > 0)
      s += d;
    fseek(fp, 2, SEEK_CUR);
    d = 0;
    do {
      c = getc(fp);
      if (c == '0' || c == '1') {
        d = 2 * d + c - '0';
      } else {
        s -= d;
        d = 0;
      }
    } while (c != '\n' && c != EOF);
    puts(s > 0 ? "False" : "True");
    s = 0;
  }
  return 0;
}


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)
movl   $0x0,-0x20(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11a6 <main+0x46>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe6b(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    12fb <main+0x19b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rdi
lea    0xe52(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe40(%rip),%rsi
lea    -0x1c(%rbp),%rdx
call   1050 <fscanf@plt>
mov    0x2dfc(%rip),%rcx
movsbq (%rcx),%rcx
cmp    %rcx,%rax
je     12f4 <main+0x194>
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe0f(%rip),%rsi
lea    -0x1c(%rbp),%rdx
call   1050 <fscanf@plt>
cmp    $0x0,%rax
jle    1226 <main+0xc6>
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    11fa <main+0x9a>
mov    -0x18(%rbp),%rdi
mov    0x2db7(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%esi
call   1060 <fseek@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1080 <getc@plt>
mov    %al,-0x21(%rbp)
movsbl -0x21(%rbp),%eax
cmp    $0x30,%eax
je     126a <main+0x10a>
movsbl -0x21(%rbp),%eax
cmp    $0x31,%eax
jne    1281 <main+0x121>
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
movsbl -0x21(%rbp),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0x1c(%rbp)
jmp    1293 <main+0x133>
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
jmp    1298 <main+0x138>
movsbl -0x21(%rbp),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x22(%rbp)
je     12c0 <main+0x160>
movsbl -0x21(%rbp),%eax
mov    0x2d2b(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x22(%rbp)
mov    -0x22(%rbp),%al
test   $0x1,%al
jne    1244 <main+0xe4>
mov    -0x20(%rbp),%ecx
lea    0xd48(%rip),%rdi
lea    0xd3b(%rip),%rax
cmp    $0x0,%ecx
cmovg  %rax,%rdi
call   1030 <puts@plt>
movl   $0x0,-0x20(%rbp)
jmp    11c9 <main+0x69>
movl   $0x0,-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    129d <main+0x13d>
mov    0x8(%rsi),%rdi
lea    0xe93(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,%rbx
lea    0xe86(%rip),%rsi
lea    0x4(%rsp),%rdx
mov    %rax,%rdi
call   1050 <fscanf@plt>
mov    0x2e3e(%rip),%rbp
movsbq 0x0(%rbp),%rcx
xor    %edx,%edx
cmp    %rcx,%rax
je     12b5 <main+0x155>
lea    0xe5b(%rip),%r15
lea    0x4(%rsp),%r12
lea    0xe58(%rip),%r13
jmp    1202 <main+0xa2>
nopw   0x0(%rax,%rax,1)
test   %r14d,%r14d
mov    %r13,%rdi
lea    0xe3a(%rip),%rax
cmovg  %rax,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1050 <fscanf@plt>
movsbq 0x0(%rbp),%rcx
cmp    %rcx,%rax
je     12b3 <main+0x153>
mov    0x4(%rsp),%r14d
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1050 <fscanf@plt>
test   %rax,%rax
jle    1230 <main+0xd0>
add    0x4(%rsp),%r14d
jmp    1210 <main+0xb0>
nopw   0x0(%rax,%rax,1)
mov    0x2db1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1060 <fseek@plt>
movl   $0x0,0x4(%rsp)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1080 <getc@plt>
mov    %eax,%ecx
and    $0xfe,%cl
cmp    $0x30,%cl
jne    1280 <main+0x120>
movzbl %al,%ecx
mov    0x4(%rsp),%edx
lea    (%rcx,%rdx,2),%ecx
add    $0xffffffd0,%ecx
jmp    1287 <main+0x127>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
sub    0x4(%rsp),%r14d
xor    %ecx,%ecx
mov    %ecx,0x4(%rsp)
cmp    $0xa,%al
je     11d0 <main+0x70>
cmp    0x0(%rbp),%al
jne    1250 <main+0xf0>
jmp    11d0 <main+0x70>
mov    (%rsi),%rsi
lea    0xd59(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edx
jmp    12b5 <main+0x155>
xor    %edx,%edx
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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"%x\00"
@EOF = global i8 0
@SEEK_CUR = global i32 0
@.str.3 = [6 x i8] c"False\00"
@.str.4 = [5 x i8] c"True\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 i32
%9 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
%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 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %15)
store i32 1, i32* %3
br label %85
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 = %78, %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), i32* %7)
%25 = load i8, i8* @EOF
%26 = sext i8 %25 to i64
%27 = icmp ne i64 %24, %26
br i1 %27, label %28, label %84
28: ; preds = %22
%29 = load i32, i32* %7
%30 = load i32, i32* %8
%31 = add i32 %30, %29
store i32 %31, i32* %8
br label %32
32: ; preds = %36, %28
%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), i32* %7)
%35 = icmp sgt i64 %34, 0
br i1 %35, label %36, label %40
36: ; preds = %32
%37 = load i32, i32* %7
%38 = load i32, i32* %8
%39 = add i32 %38, %37
store i32 %39, i32* %8
br label %32
40: ; preds = %32
%41 = load i32*, i32** %6
%42 = load i32, i32* @SEEK_CUR
%43 = call i32 @fseek(i32* %41, i32 2, i32 %42)
store i32 0, i32* %7
br label %44
44: ; preds = %76, %40
%45 = load i32*, i32** %6
%46 = call signext i8 @getc(i32* %45)
store i8 %46, i8* %9
%47 = load i8, i8* %9
%48 = sext i8 %47 to i32
%49 = icmp eq i32 %48, 48
br i1 %49, label %54, label %50
50: ; preds = %44
%51 = load i8, i8* %9
%52 = sext i8 %51 to i32
%53 = icmp eq i32 %52, 49
br i1 %53, label %54, label %61
54: ; preds = %50, %44
%55 = load i32, i32* %7
%56 = mul i32 2, %55
%57 = load i8, i8* %9
%58 = sext i8 %57 to i32
%59 = add i32 %56, %58
%60 = sub i32 %59, 48
store i32 %60, i32* %7
br label %65
61: ; preds = %50
%62 = load i32, i32* %7
%63 = load i32, i32* %8
%64 = sub i32 %63, %62
store i32 %64, i32* %8
store i32 0, i32* %7
br label %65
65: ; preds = %61, %54
br label %66
66: ; preds = %65
%67 = load i8, i8* %9
%68 = sext i8 %67 to i32
%69 = icmp ne i32 %68, 10
br i1 %69, label %70, label %76
70: ; preds = %66
%71 = load i8, i8* %9
%72 = sext i8 %71 to i32
%73 = load i8, i8* @EOF
%74 = sext i8 %73 to i32
%75 = icmp ne i32 %72, %74
br label %76
76: ; preds = %70, %66
%77 = phi i1 [ false, %66 ], [ %75, %70 ]
br i1 %77, label %44, label %78
78: ; preds = %76
%79 = load i32, i32* %8
%80 = icmp sgt i32 %79, 0
%81 = zext i1 %80 to i64
%82 = select i1 %80, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0)
%83 = call i32 @puts(i8* %82)
store i32 0, i32* %8
br label %22
84: ; preds = %22
store i32 0, i32* %3
br label %85
85: ; preds = %84, %12
%86 = load i32, i32* %3
ret i32 %86
}

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"%x\00"
@EOF = global i8 0
@SEEK_CUR = global i32 0
@.str.3 = [6 x i8] c"False\00"
@.str.4 = [5 x i8] c"True\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = icmp eq i32 %0, 2
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %60
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32* @fopen(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = call i64 @fscanf(i32* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%14 = load i8, i8* @EOF
%15 = sext i8 %14 to i64
%16 = icmp eq i64 %13, %15
br i1 %16, label %60, label %17
17: ; preds = %9, %52
%18 = load i32, i32* %3
%19 = call i64 @fscanf(i32* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%20 = icmp sgt i64 %19, 0
br i1 %20, label %21, label %27
21: ; preds = %17, %21
%22 = phi i32 [ %24, %21 ], [ %18, %17 ]
%23 = load i32, i32* %3
%24 = add i32 %23, %22
%25 = call i64 @fscanf(i32* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%26 = icmp sgt i64 %25, 0
br i1 %26, label %21, label %27
27: ; preds = %21, %17
%28 = phi i32 [ %18, %17 ], [ %24, %21 ]
%29 = load i32, i32* @SEEK_CUR
%30 = call i32 @fseek(i32* %12, i32 2, i32 %29)
store i32 0, i32* %3
br label %31
31: ; preds = %45, %27
%32 = phi i32 [ %28, %27 ], [ %47, %45 ]
%33 = call signext i8 @getc(i32* %12)
%34 = and i8 %33, -2
%35 = icmp eq i8 %34, 48
br i1 %35, label %36, label %42
36: ; preds = %31
%37 = zext i8 %33 to i32
%38 = load i32, i32* %3
%39 = shl i32 %38, 1
%40 = add nsw i32 %37, -48
%41 = add nuw i32 %40, %39
br label %45
42: ; preds = %31
%43 = load i32, i32* %3
%44 = sub i32 %32, %43
br label %45
45: ; preds = %36, %42
%46 = phi i32 [ 0, %42 ], [ %41, %36 ]
%47 = phi i32 [ %44, %42 ], [ %32, %36 ]
store i32 %46, i32* %3
%48 = icmp ne i8 %33, 10
%49 = load i8, i8* @EOF
%50 = icmp ne i8 %33, %49
%51 = select i1 %48, i1 %50, i1 false
br i1 %51, label %31, label %52
52: ; preds = %45
%53 = icmp sgt i32 %47, 0
%54 = select i1 %53, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0)
%55 = call i32 @puts(i8* dereferenceable(1) %54)
%56 = call i64 @fscanf(i32* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%57 = load i8, i8* @EOF
%58 = sext i8 %57 to i64
%59 = icmp eq i64 %56, %58
br i1 %59, label %60, label %17
60: ; preds = %52, %9, %6
%61 = phi i32 [ 1, %6 ], [ 0, %9 ], [ 0, %52 ]
ret i32 %61
}