#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 build(int, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  if (build(0, 1) != 0x0000000000000001LL)
    abort();
  if (build(0, 0) != 0x0000000000000000LL)
    abort();
  if (build(0, 0xFFFFFFFF) != 0x00000000FFFFFFFFLL)
    abort();
  if (build(0, 0xFFFFFFFE) != 0x00000000FFFFFFFELL)
    abort();
  if (build(1, 1) != 0x0000000100000001LL)
    abort();
  if (build(1, 0) != 0x0000000100000000LL)
    abort();
  if (build(1, 0xFFFFFFFF) != 0x00000001FFFFFFFFLL)
    abort();
  if (build(1, 0xFFFFFFFE) != 0x00000001FFFFFFFELL)
    abort();
  if (build(0xFFFFFFFF, 1) != 0xFFFFFFFF00000001LL)
    abort();
  if (build(0xFFFFFFFF, 0) != 0xFFFFFFFF00000000LL)
    abort();
  if (build(0xFFFFFFFF, 0xFFFFFFFF) != 0xFFFFFFFFFFFFFFFFLL)
    abort();
  if (build(0xFFFFFFFF, 0xFFFFFFFE) != 0xFFFFFFFFFFFFFFFELL)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <build@plt>
cltq
cmp    $0x1,%rax
je     115e <main+0x2e>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <build@plt>
cltq
cmp    $0x0,%rax
je     117a <main+0x4a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1040 <build@plt>
cltq
mov    $0xffffffff,%ecx
cmp    %rcx,%rax
je     119d <main+0x6d>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
mov    $0xfffffffe,%esi
call   1040 <build@plt>
cltq
mov    $0xfffffffe,%ecx
cmp    %rcx,%rax
je     11c0 <main+0x90>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <build@plt>
cltq
movabs $0x100000001,%rcx
cmp    %rcx,%rax
je     11e8 <main+0xb8>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <build@plt>
cltq
movabs $0x100000000,%rcx
cmp    %rcx,%rax
je     1210 <main+0xe0>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x1,%edi
mov    $0xffffffff,%esi
call   1040 <build@plt>
cltq
movabs $0x1ffffffff,%rcx
cmp    %rcx,%rax
je     123b <main+0x10b>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x1,%edi
mov    $0xfffffffe,%esi
call   1040 <build@plt>
cltq
movabs $0x1fffffffe,%rcx
cmp    %rcx,%rax
je     1266 <main+0x136>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1040 <build@plt>
cltq
movabs $0xffffffff00000001,%rcx
ff ff ff
cmp    %rcx,%rax
je     1291 <main+0x161>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <build@plt>
cltq
movabs $0xffffffff00000000,%rcx
ff ff ff
cmp    %rcx,%rax
je     12b9 <main+0x189>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1040 <build@plt>
cltq
cmp    $0xffffffffffffffff,%rax
je     12d8 <main+0x1a8>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffffffff,%edi
mov    $0xfffffffe,%esi
call   1040 <build@plt>
cltq
cmp    $0xfffffffffffffffe,%rax
je     12fa <main+0x1ca>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <build@plt>
cmp    $0x1,%eax
jne    114b <main+0x2b>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <build@plt>
test   %eax,%eax
jne    114b <main+0x2b>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1040 <build@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 @build(i32 0, i32 1)
%3 = sext i32 %2 to i64
%4 = icmp ne i64 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
%8 = call i32 @build(i32 0, i32 0)
%9 = sext i32 %8 to i64
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %7
%14 = call i32 @build(i32 0, i32 -1)
%15 = sext i32 %14 to i64
%16 = icmp ne i64 %15, 4294967295
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 (...) @abort()
unreachable
19: ; preds = %13
%20 = call i32 @build(i32 0, i32 -2)
%21 = sext i32 %20 to i64
%22 = icmp ne i64 %21, 4294967294
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = call i32 (...) @abort()
unreachable
25: ; preds = %19
%26 = call i32 @build(i32 1, i32 1)
%27 = sext i32 %26 to i64
%28 = icmp ne i64 %27, 4294967297
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = call i32 (...) @abort()
unreachable
31: ; preds = %25
%32 = call i32 @build(i32 1, i32 0)
%33 = sext i32 %32 to i64
%34 = icmp ne i64 %33, 4294967296
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = call i32 (...) @abort()
unreachable
37: ; preds = %31
%38 = call i32 @build(i32 1, i32 -1)
%39 = sext i32 %38 to i64
%40 = icmp ne i64 %39, 8589934591
br i1 %40, label %41, label %43
41: ; preds = %37
%42 = call i32 (...) @abort()
unreachable
43: ; preds = %37
%44 = call i32 @build(i32 1, i32 -2)
%45 = sext i32 %44 to i64
%46 = icmp ne i64 %45, 8589934590
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 (...) @abort()
unreachable
49: ; preds = %43
%50 = call i32 @build(i32 -1, i32 1)
%51 = sext i32 %50 to i64
%52 = icmp ne i64 %51, -4294967295
br i1 %52, label %53, label %55
53: ; preds = %49
%54 = call i32 (...) @abort()
unreachable
55: ; preds = %49
%56 = call i32 @build(i32 -1, i32 0)
%57 = sext i32 %56 to i64
%58 = icmp ne i64 %57, -4294967296
br i1 %58, label %59, label %61
59: ; preds = %55
%60 = call i32 (...) @abort()
unreachable
61: ; preds = %55
%62 = call i32 @build(i32 -1, i32 -1)
%63 = sext i32 %62 to i64
%64 = icmp ne i64 %63, -1
br i1 %64, label %65, label %67
65: ; preds = %61
%66 = call i32 (...) @abort()
unreachable
67: ; preds = %61
%68 = call i32 @build(i32 -1, i32 -2)
%69 = sext i32 %68 to i64
%70 = icmp ne i64 %69, -2
br i1 %70, label %71, label %73
71: ; preds = %67
%72 = call i32 (...) @abort()
unreachable
73: ; preds = %67
%74 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @build(i32 0, i32 1)
%2 = icmp eq i32 %1, 1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @build(i32 0, i32 0)
%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 @build(i32 0, i32 -1)
%12 = tail call i32 (...) @abort()
unreachable
}