#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*/ test(int, int, int, int);
int main() {
  test(0, 0, 0, 0);
  test(-1, -1, -1, 1);
  test(0x10000000, 0x10000000, 0x12345678, 2);
  test(0x10000000, 0x20000000, 0x12345678, 2);
  test(-1, 3, -3, 0);
  test(0, -1, -1, 1);
  test(-1, 0x10000000, 0x12345678, 2);
  test(0x10000000, 0x7fffffff, 1, 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %ecx,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <test@plt>
mov    $0xffffffff,%edx
mov    $0x1,%ecx
mov    %edx,%edi
mov    %edx,%esi
call   1030 <test@plt>
mov    $0x10000000,%esi
mov    $0x12345678,%edx
mov    $0x2,%ecx
mov    %esi,%edi
call   1030 <test@plt>
mov    $0x10000000,%edi
mov    $0x20000000,%esi
mov    $0x12345678,%edx
mov    $0x2,%ecx
call   1030 <test@plt>
mov    $0xffffffff,%edi
mov    $0x3,%esi
mov    $0xfffffffd,%edx
xor    %ecx,%ecx
call   1030 <test@plt>
xor    %edi,%edi
mov    $0xffffffff,%edx
mov    $0x1,%ecx
mov    %edx,%esi
call   1030 <test@plt>
mov    $0xffffffff,%edi
mov    $0x10000000,%esi
mov    $0x12345678,%edx
mov    $0x2,%ecx
call   1030 <test@plt>
mov    $0x10000000,%edi
mov    $0x7fffffff,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
call   1030 <test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <test@plt>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
mov    $0x1,%ecx
call   1030 <test@plt>
mov    $0x10000000,%edi
mov    $0x10000000,%esi
mov    $0x12345678,%edx
mov    $0x2,%ecx
call   1030 <test@plt>
mov    $0x10000000,%edi
mov    $0x20000000,%esi
mov    $0x12345678,%edx
mov    $0x2,%ecx
call   1030 <test@plt>
mov    $0xffffffff,%edi
mov    $0x3,%esi
mov    $0xfffffffd,%edx
xor    %ecx,%ecx
call   1030 <test@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
mov    $0x1,%ecx
call   1030 <test@plt>
mov    $0xffffffff,%edi
mov    $0x10000000,%esi
mov    $0x12345678,%edx
mov    $0x2,%ecx
call   1030 <test@plt>
mov    $0x10000000,%edi
mov    $0x7fffffff,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
call   1030 <test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test(i32 0, i32 0, i32 0, i32 0)
%3 = call i32 @test(i32 -1, i32 -1, i32 -1, i32 1)
%4 = call i32 @test(i32 268435456, i32 268435456, i32 305419896, i32 2)
%5 = call i32 @test(i32 268435456, i32 536870912, i32 305419896, i32 2)
%6 = call i32 @test(i32 -1, i32 3, i32 -3, i32 0)
%7 = call i32 @test(i32 0, i32 -1, i32 -1, i32 1)
%8 = call i32 @test(i32 -1, i32 268435456, i32 305419896, i32 2)
%9 = call i32 @test(i32 268435456, i32 2147483647, i32 1, i32 3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 0, i32 0, i32 0, i32 0)
%2 = tail call i32 @test(i32 -1, i32 -1, i32 -1, i32 1)
%3 = tail call i32 @test(i32 268435456, i32 268435456, i32 305419896, i32 2)
%4 = tail call i32 @test(i32 268435456, i32 536870912, i32 305419896, i32 2)
%5 = tail call i32 @test(i32 -1, i32 3, i32 -3, i32 0)
%6 = tail call i32 @test(i32 0, i32 -1, i32 -1, i32 1)
%7 = tail call i32 @test(i32 -1, i32 268435456, i32 305419896, i32 2)
%8 = tail call i32 @test(i32 268435456, i32 2147483647, i32 1, i32 3)
ret i32 0
}