#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*/ check(int, int);
int /*<<< orphan*/ ucheck(int, int);
int main() {
  check(0LL, 0LL);
  check(1LL, 0x7fffffffffffffffLL);
  check(0x000000007fffffffLL, 0x7fffffffffffffffLL);
  check(0x00000000ffffffffLL, 0x7fffffffffffffffLL);
  check(0x0000000100000000LL, 0x7fffffffffffffffLL);
  check(0x7fffffffffffffffLL, 0x7fffffffffffffffLL);
  check(-1LL, 0x8000000000000000LL);
  check(-0x000000007fffffffLL, 0x8000000000000000LL);
  check(-0x00000000ffffffffLL, 0x8000000000000000LL);
  check(-0x0000000100000000LL, 0x8000000000000000LL);
  check(0x8000000000000000LL, 0x8000000000000000LL);
  ucheck(0ULL, 0ULL);
  ucheck(1ULL, 0xffffffffffffffffULL);
  ucheck(0x000000007fffffffULL, 0xffffffffffffffffULL);
  ucheck(0x00000000ffffffffULL, 0xffffffffffffffffULL);
  ucheck(0x0000000100000000ULL, 0xffffffffffffffffULL);
  ucheck((unsigned long long)0x7fffffffffffffffLL, 0xffffffffffffffffULL);
  ucheck(0xffffffffffffffffULL, 0xffffffffffffffffULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1040 <check@plt>
mov    $0x1,%edi
mov    $0xffffffff,%esi
call   1040 <check@plt>
mov    $0x7fffffff,%edi
mov    $0xffffffff,%esi
call   1040 <check@plt>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1040 <check@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1040 <check@plt>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1040 <check@plt>
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <check@plt>
mov    $0x80000001,%edi
xor    %esi,%esi
call   1040 <check@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <check@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <check@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <check@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <ucheck@plt>
mov    $0x1,%edi
mov    $0xffffffff,%esi
call   1030 <ucheck@plt>
mov    $0x7fffffff,%edi
mov    $0xffffffff,%esi
call   1030 <ucheck@plt>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1030 <ucheck@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1030 <ucheck@plt>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1030 <ucheck@plt>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1030 <ucheck@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1040 <check@plt>
mov    $0x1,%edi
mov    $0xffffffff,%esi
call   1040 <check@plt>
mov    $0x7fffffff,%edi
mov    $0xffffffff,%esi
call   1040 <check@plt>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1040 <check@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1040 <check@plt>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1040 <check@plt>
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <check@plt>
mov    $0x80000001,%edi
xor    %esi,%esi
call   1040 <check@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <check@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <check@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <check@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <ucheck@plt>
mov    $0x1,%edi
mov    $0xffffffff,%esi
call   1030 <ucheck@plt>
mov    $0x7fffffff,%edi
mov    $0xffffffff,%esi
call   1030 <ucheck@plt>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1030 <ucheck@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1030 <ucheck@plt>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1030 <ucheck@plt>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1030 <ucheck@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @check(i32 0, i32 0)
%3 = call i32 @check(i32 1, i32 -1)
%4 = call i32 @check(i32 2147483647, i32 -1)
%5 = call i32 @check(i32 -1, i32 -1)
%6 = call i32 @check(i32 0, i32 -1)
%7 = call i32 @check(i32 -1, i32 -1)
%8 = call i32 @check(i32 -1, i32 0)
%9 = call i32 @check(i32 -2147483647, i32 0)
%10 = call i32 @check(i32 1, i32 0)
%11 = call i32 @check(i32 0, i32 0)
%12 = call i32 @check(i32 0, i32 0)
%13 = call i32 @ucheck(i32 0, i32 0)
%14 = call i32 @ucheck(i32 1, i32 -1)
%15 = call i32 @ucheck(i32 2147483647, i32 -1)
%16 = call i32 @ucheck(i32 -1, i32 -1)
%17 = call i32 @ucheck(i32 0, i32 -1)
%18 = call i32 @ucheck(i32 -1, i32 -1)
%19 = call i32 @ucheck(i32 -1, i32 -1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @check(i32 0, i32 0)
%2 = tail call i32 @check(i32 1, i32 -1)
%3 = tail call i32 @check(i32 2147483647, i32 -1)
%4 = tail call i32 @check(i32 -1, i32 -1)
%5 = tail call i32 @check(i32 0, i32 -1)
%6 = tail call i32 @check(i32 -1, i32 -1)
%7 = tail call i32 @check(i32 -1, i32 0)
%8 = tail call i32 @check(i32 -2147483647, i32 0)
%9 = tail call i32 @check(i32 1, i32 0)
%10 = tail call i32 @check(i32 0, i32 0)
%11 = tail call i32 @check(i32 0, i32 0)
%12 = tail call i32 @ucheck(i32 0, i32 0)
%13 = tail call i32 @ucheck(i32 1, i32 -1)
%14 = tail call i32 @ucheck(i32 2147483647, i32 -1)
%15 = tail call i32 @ucheck(i32 -1, i32 -1)
%16 = tail call i32 @ucheck(i32 0, i32 -1)
%17 = tail call i32 @ucheck(i32 -1, i32 -1)
%18 = tail call i32 @ucheck(i32 -1, i32 -1)
ret i32 0
}