#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 foo(int);
int foo2(int);
int foo3(int);
int foo4(int);
int foo5(int);
int foo6(int);
int foo7(int);
int main() {
  if (foo(0x1234567812345678LL) != 0x1234567812345679LL)
    return 1;
  if (foo2(0x1234567812345678LL) != 0x0LL)
    return 1;
  if (foo4(0x1234567812345678LL) != 0x1234567812345679LL)
    return 1;
  if (foo5(0x1234567812345678LL) != 0x1234567812345679LL)
    return 1;
  if (foo3(0x1234567812345678LL) != 0x1234567812345677LL)
    return 1;
  if (foo6(0x1234567812345678LL) != 0x1234567812345677LL)
    return 1;
  if (foo7(0x1234567812345678LL) != 0x1234567812345679LL)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x12345678,%edi
call   1060 <foo@plt>
cltq
movabs $0x1234567812345679,%rcx
56 34 12
cmp    %rcx,%rax
je     11aa <main+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    12aa <main+0x13a>
mov    $0x12345678,%edi
call   1050 <foo2@plt>
cltq
cmp    $0x0,%rax
je     11cc <main+0x5c>
movl   $0x1,-0x4(%rbp)
jmp    12aa <main+0x13a>
mov    $0x12345678,%edi
call   1030 <foo4@plt>
cltq
movabs $0x1234567812345679,%rcx
56 34 12
cmp    %rcx,%rax
je     11f7 <main+0x87>
movl   $0x1,-0x4(%rbp)
jmp    12aa <main+0x13a>
mov    $0x12345678,%edi
call   1080 <foo5@plt>
cltq
movabs $0x1234567812345679,%rcx
56 34 12
cmp    %rcx,%rax
je     1222 <main+0xb2>
movl   $0x1,-0x4(%rbp)
jmp    12aa <main+0x13a>
mov    $0x12345678,%edi
call   1070 <foo3@plt>
cltq
movabs $0x1234567812345677,%rcx
56 34 12
cmp    %rcx,%rax
je     124d <main+0xdd>
movl   $0x1,-0x4(%rbp)
jmp    12aa <main+0x13a>
mov    $0x12345678,%edi
call   1040 <foo6@plt>
cltq
movabs $0x1234567812345677,%rcx
56 34 12
cmp    %rcx,%rax
je     1278 <main+0x108>
movl   $0x1,-0x4(%rbp)
jmp    12aa <main+0x13a>
mov    $0x12345678,%edi
call   1090 <foo7@plt>
cltq
movabs $0x1234567812345679,%rcx
56 34 12
cmp    %rcx,%rax
je     12a3 <main+0x133>
movl   $0x1,-0x4(%rbp)
jmp    12aa <main+0x13a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x12345678,%edi
call   1030 <foo@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 305419896)
%3 = sext i32 %2 to i64
%4 = icmp ne i64 %3, 1311768465173141113
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 1, i32* %1
br label %37
6: ; preds = %0
%7 = call i32 @foo2(i32 305419896)
%8 = sext i32 %7 to i64
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i32 1, i32* %1
br label %37
11: ; preds = %6
%12 = call i32 @foo4(i32 305419896)
%13 = sext i32 %12 to i64
%14 = icmp ne i64 %13, 1311768465173141113
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 1, i32* %1
br label %37
16: ; preds = %11
%17 = call i32 @foo5(i32 305419896)
%18 = sext i32 %17 to i64
%19 = icmp ne i64 %18, 1311768465173141113
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %1
br label %37
21: ; preds = %16
%22 = call i32 @foo3(i32 305419896)
%23 = sext i32 %22 to i64
%24 = icmp ne i64 %23, 1311768465173141111
br i1 %24, label %25, label %26
25: ; preds = %21
store i32 1, i32* %1
br label %37
26: ; preds = %21
%27 = call i32 @foo6(i32 305419896)
%28 = sext i32 %27 to i64
%29 = icmp ne i64 %28, 1311768465173141111
br i1 %29, label %30, label %31
30: ; preds = %26
store i32 1, i32* %1
br label %37
31: ; preds = %26
%32 = call i32 @foo7(i32 305419896)
%33 = sext i32 %32 to i64
%34 = icmp ne i64 %33, 1311768465173141113
br i1 %34, label %35, label %36
35: ; preds = %31
store i32 1, i32* %1
br label %37
36: ; preds = %31
store i32 0, i32* %1
br label %37
37: ; preds = %36, %35, %30, %25, %20, %15, %10, %5
%38 = load i32, i32* %1
ret i32 %38
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 305419896)
ret i32 1
}