#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 fooinvdi(int);
int fooinvsi(int);
int foonegdi(int);
int foonegsi(int);
int largefooinv(int);
int largefooneg(int);
int main(void) {
  if (foonegsi(1) != 30)
    abort();
  if (foonegsi(0) != -30)
    abort();
  if (fooinvsi(1) != 30)
    abort();
  if (fooinvsi(0) != ~30)
    abort();
  if (foonegdi(1) != 30)
    abort();
  if (foonegdi(0) != -30)
    abort();
  if (fooinvdi(1) != 30)
    abort();
  if (fooinvdi(0) != ~30)
    abort();
  if (largefooinv(0) != ~25089992)
    abort();
  if (largefooneg(0) != -25089992)
    abort();
  if (largefooinv(1) != 25089992)
    abort();
  if (largefooneg(1) != 25089992)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1060 <foonegsi@plt>
cmp    $0x1e,%eax
je     1199 <main+0x29>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %edi,%edi
call   1060 <foonegsi@plt>
cmp    $0xffffffe2,%eax
je     11b0 <main+0x40>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0x1,%edi
call   1070 <fooinvsi@plt>
cmp    $0x1e,%eax
je     11ca <main+0x5a>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %edi,%edi
call   1070 <fooinvsi@plt>
cmp    $0xffffffe1,%eax
je     11e1 <main+0x71>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0x1,%edi
call   1050 <foonegdi@plt>
cmp    $0x1e,%eax
je     11fb <main+0x8b>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %edi,%edi
call   1050 <foonegdi@plt>
cmp    $0xffffffe2,%eax
je     1212 <main+0xa2>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0x1,%edi
call   1090 <fooinvdi@plt>
cmp    $0x1e,%eax
je     122c <main+0xbc>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %edi,%edi
call   1090 <fooinvdi@plt>
cmp    $0xffffffe1,%eax
je     1243 <main+0xd3>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %edi,%edi
call   1030 <largefooinv@plt>
cmp    $0xfe812837,%eax
je     125c <main+0xec>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %edi,%edi
call   1080 <largefooneg@plt>
cmp    $0xfe812838,%eax
je     1275 <main+0x105>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0x1,%edi
call   1030 <largefooinv@plt>
cmp    $0x17ed7c8,%eax
je     1291 <main+0x121>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0x1,%edi
call   1080 <largefooneg@plt>
cmp    $0x17ed7c8,%eax
je     12ad <main+0x13d>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1060 <foonegsi@plt>
cmp    $0x1e,%eax
jne    122b <main+0xbb>
xor    %edi,%edi
call   1060 <foonegsi@plt>
cmp    $0xffffffe2,%eax
jne    122b <main+0xbb>
mov    $0x1,%edi
call   1070 <fooinvsi@plt>
cmp    $0x1e,%eax
jne    122b <main+0xbb>
xor    %edi,%edi
call   1070 <fooinvsi@plt>
cmp    $0xffffffe1,%eax
jne    122b <main+0xbb>
mov    $0x1,%edi
call   1050 <foonegdi@plt>
cmp    $0x1e,%eax
jne    122b <main+0xbb>
xor    %edi,%edi
call   1050 <foonegdi@plt>
cmp    $0xffffffe2,%eax
jne    122b <main+0xbb>
mov    $0x1,%edi
call   1090 <fooinvdi@plt>
cmp    $0x1e,%eax
jne    122b <main+0xbb>
xor    %edi,%edi
call   1090 <fooinvdi@plt>
cmp    $0xffffffe1,%eax
jne    122b <main+0xbb>
xor    %edi,%edi
call   1030 <largefooinv@plt>
cmp    $0xfe812837,%eax
jne    122b <main+0xbb>
xor    %edi,%edi
call   1080 <largefooneg@plt>
cmp    $0xfe812838,%eax
jne    122b <main+0xbb>
mov    $0x1,%edi
call   1030 <largefooinv@plt>
cmp    $0x17ed7c8,%eax
jne    122b <main+0xbb>
mov    $0x1,%edi
call   1080 <largefooneg@plt>
cmp    $0x17ed7c8,%eax
jne    122b <main+0xbb>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foonegsi(i32 1)
%3 = icmp ne i32 %2, 30
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @foonegsi(i32 0)
%8 = icmp ne i32 %7, -30
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = call i32 @fooinvsi(i32 1)
%13 = icmp ne i32 %12, 30
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %11
%17 = call i32 @fooinvsi(i32 0)
%18 = icmp ne i32 %17, -31
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %16
%22 = call i32 @foonegdi(i32 1)
%23 = icmp ne i32 %22, 30
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 (...) @abort()
unreachable
26: ; preds = %21
%27 = call i32 @foonegdi(i32 0)
%28 = icmp ne i32 %27, -30
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 (...) @abort()
unreachable
31: ; preds = %26
%32 = call i32 @fooinvdi(i32 1)
%33 = icmp ne i32 %32, 30
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 (...) @abort()
unreachable
36: ; preds = %31
%37 = call i32 @fooinvdi(i32 0)
%38 = icmp ne i32 %37, -31
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 (...) @abort()
unreachable
41: ; preds = %36
%42 = call i32 @largefooinv(i32 0)
%43 = icmp ne i32 %42, -25089993
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 (...) @abort()
unreachable
46: ; preds = %41
%47 = call i32 @largefooneg(i32 0)
%48 = icmp ne i32 %47, -25089992
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = call i32 (...) @abort()
unreachable
51: ; preds = %46
%52 = call i32 @largefooinv(i32 1)
%53 = icmp ne i32 %52, 25089992
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = call i32 (...) @abort()
unreachable
56: ; preds = %51
%57 = call i32 @largefooneg(i32 1)
%58 = icmp ne i32 %57, 25089992
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = call i32 (...) @abort()
unreachable
61: ; preds = %56
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foonegsi(i32 1)
%2 = icmp eq i32 %1, 30
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @foonegsi(i32 0)
%7 = icmp eq i32 %6, -30
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i32 @fooinvsi(i32 1)
%12 = icmp eq i32 %11, 30
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = tail call i32 @fooinvsi(i32 0)
%17 = icmp eq i32 %16, -31
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %15
%21 = tail call i32 @foonegdi(i32 1)
%22 = icmp eq i32 %21, 30
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 (...) @abort()
unreachable
25: ; preds = %20
%26 = tail call i32 @foonegdi(i32 0)
%27 = icmp eq i32 %26, -30
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = tail call i32 (...) @abort()
unreachable
30: ; preds = %25
%31 = tail call i32 @fooinvdi(i32 1)
%32 = icmp eq i32 %31, 30
br i1 %32, label %35, label %33
33: ; preds = %30
%34 = tail call i32 (...) @abort()
unreachable
35: ; preds = %30
%36 = tail call i32 @fooinvdi(i32 0)
%37 = icmp eq i32 %36, -31
br i1 %37, label %40, label %38
38: ; preds = %35
%39 = tail call i32 (...) @abort()
unreachable
40: ; preds = %35
%41 = tail call i32 @largefooinv(i32 0)
%42 = icmp eq i32 %41, -25089993
br i1 %42, label %45, label %43
43: ; preds = %40
%44 = tail call i32 (...) @abort()
unreachable
45: ; preds = %40
%46 = tail call i32 @largefooneg(i32 0)
%47 = icmp eq i32 %46, -25089992
br i1 %47, label %50, label %48
48: ; preds = %45
%49 = tail call i32 (...) @abort()
unreachable
50: ; preds = %45
%51 = tail call i32 @largefooinv(i32 1)
%52 = icmp eq i32 %51, 25089992
br i1 %52, label %55, label %53
53: ; preds = %50
%54 = tail call i32 (...) @abort()
unreachable
55: ; preds = %50
%56 = tail call i32 @largefooneg(i32 1)
%57 = icmp eq i32 %56, 25089992
br i1 %57, label %60, label %58
58: ; preds = %55
%59 = tail call i32 (...) @abort()
unreachable
60: ; preds = %55
ret i32 0
}