#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 */
scalar_t__ test__cmpdi2(int, int, int);
int main() {
  if (test__cmpdi2(0, 0, 1))
    return 1;
  if (test__cmpdi2(1, 1, 1))
    return 1;
  if (test__cmpdi2(2, 2, 1))
    return 1;
  if (test__cmpdi2(0x7FFFFFFF, 0x7FFFFFFF, 1))
    return 1;
  if (test__cmpdi2(0x80000000, 0x80000000, 1))
    return 1;
  if (test__cmpdi2(0x80000001, 0x80000001, 1))
    return 1;
  if (test__cmpdi2(0xFFFFFFFF, 0xFFFFFFFF, 1))
    return 1;
  if (test__cmpdi2(0x000000010000000LL, 0x000000010000000LL, 1))
    return 1;
  if (test__cmpdi2(0xFFFFFFFFFFFFFFFFLL, 0xFFFFFFFFFFFFFFFFLL, 1))
    return 1;
  if (test__cmpdi2(0x0000000200000002LL, 0x0000000300000001LL, 0))
    return 1;
  if (test__cmpdi2(0x0000000200000002LL, 0x0000000300000002LL, 0))
    return 1;
  if (test__cmpdi2(0x0000000200000002LL, 0x0000000300000003LL, 0))
    return 1;
  if (test__cmpdi2(0x0000000200000002LL, 0x0000000100000001LL, 2))
    return 1;
  if (test__cmpdi2(0x0000000200000002LL, 0x0000000100000002LL, 2))
    return 1;
  if (test__cmpdi2(0x0000000200000002LL, 0x0000000100000003LL, 2))
    return 1;
  if (test__cmpdi2(0x0000000200000002LL, 0x0000000200000001LL, 2))
    return 1;
  if (test__cmpdi2(0x0000000200000002LL, 0x0000000200000002LL, 1))
    return 1;
  if (test__cmpdi2(0x0000000200000002LL, 0x0000000200000003LL, 0))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %esi,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     1143 <main+0x33>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x1,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     1167 <main+0x57>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x2,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     118e <main+0x7e>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x7fffffff,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     11b5 <main+0xa5>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x80000000,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     11dc <main+0xcc>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x80000001,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     1203 <main+0xf3>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0xffffffff,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     122a <main+0x11a>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x10000000,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     1251 <main+0x141>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0xffffffff,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     1278 <main+0x168>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x2,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     129f <main+0x18f>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x2,%esi
xor    %edx,%edx
mov    %esi,%edi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     12c3 <main+0x1b3>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x2,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     12ea <main+0x1da>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x2,%edx
mov    $0x1,%esi
mov    %edx,%edi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     1311 <main+0x201>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x2,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     1335 <main+0x225>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x2,%edx
mov    $0x3,%esi
mov    %edx,%edi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     135c <main+0x24c>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x2,%edx
mov    $0x1,%esi
mov    %edx,%edi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     1383 <main+0x273>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x2,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     13aa <main+0x29a>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
mov    $0x2,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1030 <test__cmpdi2@plt>
cmp    $0x0,%rax
je     13d1 <main+0x2c1>
movl   $0x1,-0x4(%rbp)
jmp    13d8 <main+0x2c8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%ebx
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x1,%ebx
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x1,%ebx
mov    $0x2,%edi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x1,%ebx
mov    $0x7fffffff,%edi
mov    $0x7fffffff,%esi
mov    $0x1,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x1,%ebx
mov    $0x80000000,%edi
mov    $0x80000000,%esi
mov    $0x1,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x1,%ebx
mov    $0x80000001,%edi
mov    $0x80000001,%esi
mov    $0x1,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x1,%ebx
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
mov    $0x1,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x1,%ebx
mov    $0x10000000,%edi
mov    $0x10000000,%esi
mov    $0x1,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x1,%ebx
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
mov    $0x1,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x1,%ebx
mov    $0x2,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x2,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x2,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x1,%ebx
mov    $0x2,%edi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x2,%edi
mov    $0x2,%esi
mov    $0x2,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x2,%edi
mov    $0x3,%esi
mov    $0x2,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x1,%ebx
mov    $0x2,%edi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x1,%ebx
mov    $0x2,%edi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <test__cmpdi2@plt>
test   %rax,%rax
jne    1339 <main+0x229>
mov    $0x2,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1030 <test__cmpdi2@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @test__cmpdi2(i32 0, i32 0, i32 1)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %74
5: ; preds = %0
%6 = call i64 @test__cmpdi2(i32 1, i32 1, i32 1)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 1, i32* %1
br label %74
9: ; preds = %5
%10 = call i64 @test__cmpdi2(i32 2, i32 2, i32 1)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 1, i32* %1
br label %74
13: ; preds = %9
%14 = call i64 @test__cmpdi2(i32 2147483647, i32 2147483647, i32 1)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 1, i32* %1
br label %74
17: ; preds = %13
%18 = call i64 @test__cmpdi2(i32 -2147483648, i32 -2147483648, i32 1)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %17
store i32 1, i32* %1
br label %74
21: ; preds = %17
%22 = call i64 @test__cmpdi2(i32 -2147483647, i32 -2147483647, i32 1)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %21
store i32 1, i32* %1
br label %74
25: ; preds = %21
%26 = call i64 @test__cmpdi2(i32 -1, i32 -1, i32 1)
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %25
store i32 1, i32* %1
br label %74
29: ; preds = %25
%30 = call i64 @test__cmpdi2(i32 268435456, i32 268435456, i32 1)
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %29
store i32 1, i32* %1
br label %74
33: ; preds = %29
%34 = call i64 @test__cmpdi2(i32 -1, i32 -1, i32 1)
%35 = icmp ne i64 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %33
store i32 1, i32* %1
br label %74
37: ; preds = %33
%38 = call i64 @test__cmpdi2(i32 2, i32 1, i32 0)
%39 = icmp ne i64 %38, 0
br i1 %39, label %40, label %41
40: ; preds = %37
store i32 1, i32* %1
br label %74
41: ; preds = %37
%42 = call i64 @test__cmpdi2(i32 2, i32 2, i32 0)
%43 = icmp ne i64 %42, 0
br i1 %43, label %44, label %45
44: ; preds = %41
store i32 1, i32* %1
br label %74
45: ; preds = %41
%46 = call i64 @test__cmpdi2(i32 2, i32 3, i32 0)
%47 = icmp ne i64 %46, 0
br i1 %47, label %48, label %49
48: ; preds = %45
store i32 1, i32* %1
br label %74
49: ; preds = %45
%50 = call i64 @test__cmpdi2(i32 2, i32 1, i32 2)
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %53
52: ; preds = %49
store i32 1, i32* %1
br label %74
53: ; preds = %49
%54 = call i64 @test__cmpdi2(i32 2, i32 2, i32 2)
%55 = icmp ne i64 %54, 0
br i1 %55, label %56, label %57
56: ; preds = %53
store i32 1, i32* %1
br label %74
57: ; preds = %53
%58 = call i64 @test__cmpdi2(i32 2, i32 3, i32 2)
%59 = icmp ne i64 %58, 0
br i1 %59, label %60, label %61
60: ; preds = %57
store i32 1, i32* %1
br label %74
61: ; preds = %57
%62 = call i64 @test__cmpdi2(i32 2, i32 1, i32 2)
%63 = icmp ne i64 %62, 0
br i1 %63, label %64, label %65
64: ; preds = %61
store i32 1, i32* %1
br label %74
65: ; preds = %61
%66 = call i64 @test__cmpdi2(i32 2, i32 2, i32 1)
%67 = icmp ne i64 %66, 0
br i1 %67, label %68, label %69
68: ; preds = %65
store i32 1, i32* %1
br label %74
69: ; preds = %65
%70 = call i64 @test__cmpdi2(i32 2, i32 3, i32 0)
%71 = icmp ne i64 %70, 0
br i1 %71, label %72, label %73
72: ; preds = %69
store i32 1, i32* %1
br label %74
73: ; preds = %69
store i32 0, i32* %1
br label %74
74: ; preds = %73, %72, %68, %64, %60, %56, %52, %48, %44, %40, %36, %32, %28, %24, %20, %16, %12, %8, %4
%75 = load i32, i32* %1
ret i32 %75
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @test__cmpdi2(i32 0, i32 0, i32 1)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %55
3: ; preds = %0
%4 = tail call i64 @test__cmpdi2(i32 1, i32 1, i32 1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %55
6: ; preds = %3
%7 = tail call i64 @test__cmpdi2(i32 2, i32 2, i32 1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %55
9: ; preds = %6
%10 = tail call i64 @test__cmpdi2(i32 2147483647, i32 2147483647, i32 1)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %55
12: ; preds = %9
%13 = tail call i64 @test__cmpdi2(i32 -2147483648, i32 -2147483648, i32 1)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %55
15: ; preds = %12
%16 = tail call i64 @test__cmpdi2(i32 -2147483647, i32 -2147483647, i32 1)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %55
18: ; preds = %15
%19 = tail call i64 @test__cmpdi2(i32 -1, i32 -1, i32 1)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %55
21: ; preds = %18
%22 = tail call i64 @test__cmpdi2(i32 268435456, i32 268435456, i32 1)
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %55
24: ; preds = %21
%25 = tail call i64 @test__cmpdi2(i32 -1, i32 -1, i32 1)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %55
27: ; preds = %24
%28 = tail call i64 @test__cmpdi2(i32 2, i32 1, i32 0)
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %55
30: ; preds = %27
%31 = tail call i64 @test__cmpdi2(i32 2, i32 2, i32 0)
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %55
33: ; preds = %30
%34 = tail call i64 @test__cmpdi2(i32 2, i32 3, i32 0)
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %55
36: ; preds = %33
%37 = tail call i64 @test__cmpdi2(i32 2, i32 1, i32 2)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %55
39: ; preds = %36
%40 = tail call i64 @test__cmpdi2(i32 2, i32 2, i32 2)
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %55
42: ; preds = %39
%43 = tail call i64 @test__cmpdi2(i32 2, i32 3, i32 2)
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %55
45: ; preds = %42
%46 = tail call i64 @test__cmpdi2(i32 2, i32 1, i32 2)
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %55
48: ; preds = %45
%49 = tail call i64 @test__cmpdi2(i32 2, i32 2, i32 1)
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %55
51: ; preds = %48
%52 = tail call i64 @test__cmpdi2(i32 2, i32 3, i32 0)
%53 = icmp ne i64 %52, 0
%54 = zext i1 %53 to i32
br label %55
55: ; preds = %51, %48, %45, %42, %39, %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6, %3, %0
%56 = phi i32 [ 1, %0 ], [ 1, %3 ], [ 1, %6 ], [ 1, %9 ], [ 1, %12 ], [ 1, %15 ], [ 1, %18 ], [ 1, %21 ], [ 1, %24 ], [ 1, %27 ], [ 1, %30 ], [ 1, %33 ], [ 1, %36 ], [ 1, %39 ], [ 1, %42 ], [ 1, %45 ], [ 1, %48 ], [ %54, %51 ]
ret i32 %56
}