#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 */

/* Variables and functions */
int /*<<< orphan*/ abort();
int bar(int);
int foo(int);
int main(void) {
  if (sizeof(long long) != 8)
    return 0;
  if (foo(0) != 0)
    abort();
  if (foo(0xffffffffULL) != 0)
    abort();
  if (foo(0x25ff00ff00ULL) != 0x25)
    abort();
  if (bar(0) != 0)
    abort();
  if (bar(0x25) != 0x2500000000ULL)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1050 <foo@plt>
cmp    $0x0,%eax
je     1156 <main+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffffffff,%edi
call   1050 <foo@plt>
cmp    $0x0,%eax
je     1170 <main+0x40>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xff00ff00,%edi
call   1050 <foo@plt>
cmp    $0x25,%eax
je     118a <main+0x5a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <bar@plt>
cmp    $0x0,%eax
je     11a1 <main+0x71>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x25,%edi
call   1040 <bar@plt>
cltq
movabs $0x2500000000,%rcx
cmp    %rcx,%rax
je     11c7 <main+0x97>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <foo@plt>
test   %eax,%eax
jne    116e <main+0x3e>
mov    $0xffffffff,%edi
call   1050 <foo@plt>
test   %eax,%eax
jne    116e <main+0x3e>
mov    $0xff00ff00,%edi
call   1050 <foo@plt>
cmp    $0x25,%eax
jne    116e <main+0x3e>
xor    %edi,%edi
call   1040 <bar@plt>
test   %eax,%eax
jne    116e <main+0x3e>
mov    $0x25,%edi
call   1040 <bar@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 0)
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @foo(i32 -1)
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = call i32 @foo(i32 -16711936)
%13 = icmp ne i32 %12, 37
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %11
%17 = call i32 @bar(i32 0)
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %16
%22 = call i32 @bar(i32 37)
%23 = sext i32 %22 to i64
%24 = icmp ne i64 %23, 158913789952
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = call i32 (...) @abort()
unreachable
27: ; preds = %21
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 0)
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @foo(i32 -1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i32 @foo(i32 -16711936)
%12 = icmp eq i32 %11, 37
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = tail call i32 @bar(i32 0)
%17 = icmp eq i32 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %15
%21 = tail call i32 @bar(i32 37)
%22 = tail call i32 (...) @abort()
unreachable
}