#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 div1(int);
int div2(int);
int div3(int, int);
int div4(int, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ mod1(int);
scalar_t__ mod2(int);
scalar_t__ mod3(int, int);
scalar_t__ mod4(int, int);
scalar_t__ mod5(int, int);
scalar_t__ mod6(int, int);
main() {
  if (div1(-(1 << 7)) != 1 << 7)
    abort();
  if (div2(-(1 << 15)) != 1 << 15)
    abort();
  if (div3(-(1 << 7), -1) != 1 << 7)
    abort();
  if (div4(-(1 << 15), -1) != 1 << 15)
    abort();
  if (mod1(-(1 << 7)) != 0)
    abort();
  if (mod2(-(1 << 15)) != 0)
    abort();
  if (mod3(-(1 << 7), -1) != 0)
    abort();
  if (mod4(-(1 << 15), -1) != 0)
    abort();
  if (mod5(0x50000000, 2) != 0)
    abort();
  if (mod6(0x50000000, 2) != 0)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xffffff80,%edi
call   1080 <div1@plt>
cmp    $0x80,%eax
je     11eb <main+0x2b>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffff8000,%edi
call   1040 <div2@plt>
cmp    $0x8000,%eax
je     1207 <main+0x47>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffffff80,%edi
mov    $0xffffffff,%esi
call   1090 <div3@plt>
cmp    $0x80,%eax
je     1228 <main+0x68>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffff8000,%edi
mov    $0xffffffff,%esi
call   10e0 <div4@plt>
cmp    $0x8000,%eax
je     1249 <main+0x89>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffffff80,%edi
call   10a0 <mod1@plt>
cmp    $0x0,%rax
je     1264 <main+0xa4>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffff8000,%edi
call   1050 <mod2@plt>
cmp    $0x0,%rax
je     127f <main+0xbf>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffffff80,%edi
mov    $0xffffffff,%esi
call   10b0 <mod3@plt>
cmp    $0x0,%rax
je     129f <main+0xdf>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffff8000,%edi
mov    $0xffffffff,%esi
call   1070 <mod4@plt>
cmp    $0x0,%rax
je     12bf <main+0xff>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x50000000,%edi
mov    $0x2,%esi
call   10c0 <mod5@plt>
cmp    $0x0,%rax
je     12df <main+0x11f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x50000000,%edi
mov    $0x2,%esi
call   1060 <mod6@plt>
cmp    $0x0,%rax
je     12ff <main+0x13f>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   10d0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffff80,%edi
call   1080 <div1@plt>
cmp    $0x80,%eax
jne    1290 <main+0xd0>
mov    $0xffff8000,%edi
call   1040 <div2@plt>
cmp    $0x8000,%eax
jne    1290 <main+0xd0>
mov    $0xffffff80,%edi
mov    $0xffffffff,%esi
call   1090 <div3@plt>
cmp    $0x80,%eax
jne    1290 <main+0xd0>
mov    $0xffff8000,%edi
mov    $0xffffffff,%esi
call   10e0 <div4@plt>
cmp    $0x8000,%eax
jne    1290 <main+0xd0>
mov    $0xffffff80,%edi
call   10a0 <mod1@plt>
test   %rax,%rax
jne    1290 <main+0xd0>
mov    $0xffff8000,%edi
call   1050 <mod2@plt>
test   %rax,%rax
jne    1290 <main+0xd0>
mov    $0xffffff80,%edi
mov    $0xffffffff,%esi
call   10b0 <mod3@plt>
test   %rax,%rax
jne    1290 <main+0xd0>
mov    $0xffff8000,%edi
mov    $0xffffffff,%esi
call   1070 <mod4@plt>
test   %rax,%rax
jne    1290 <main+0xd0>
mov    $0x50000000,%edi
mov    $0x2,%esi
call   10c0 <mod5@plt>
test   %rax,%rax
jne    1290 <main+0xd0>
mov    $0x50000000,%edi
mov    $0x2,%esi
call   1060 <mod6@plt>
test   %rax,%rax
jne    1290 <main+0xd0>
xor    %edi,%edi
call   10d0 <exit@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 @div1(i32 -128)
%3 = icmp ne i32 %2, 128
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @div2(i32 -32768)
%8 = icmp ne i32 %7, 32768
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = call i32 @div3(i32 -128, i32 -1)
%13 = icmp ne i32 %12, 128
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %11
%17 = call i32 @div4(i32 -32768, i32 -1)
%18 = icmp ne i32 %17, 32768
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %16
%22 = call i64 @mod1(i32 -128)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 (...) @abort()
unreachable
26: ; preds = %21
%27 = call i64 @mod2(i32 -32768)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 (...) @abort()
unreachable
31: ; preds = %26
%32 = call i64 @mod3(i32 -128, i32 -1)
%33 = icmp ne i64 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 (...) @abort()
unreachable
36: ; preds = %31
%37 = call i64 @mod4(i32 -32768, i32 -1)
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 (...) @abort()
unreachable
41: ; preds = %36
%42 = call i64 @mod5(i32 1342177280, i32 2)
%43 = icmp ne i64 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 (...) @abort()
unreachable
46: ; preds = %41
%47 = call i64 @mod6(i32 1342177280, i32 2)
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = call i32 (...) @abort()
unreachable
51: ; preds = %46
%52 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @div1(i32 -128)
%2 = icmp eq i32 %1, 128
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @div2(i32 -32768)
%7 = icmp eq i32 %6, 32768
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i32 @div3(i32 -128, i32 -1)
%12 = icmp eq i32 %11, 128
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = tail call i32 @div4(i32 -32768, i32 -1)
%17 = icmp eq i32 %16, 32768
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %15
%21 = tail call i64 @mod1(i32 -128)
%22 = icmp eq i64 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 (...) @abort()
unreachable
25: ; preds = %20
%26 = tail call i64 @mod2(i32 -32768)
%27 = icmp eq i64 %26, 0
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = tail call i32 (...) @abort()
unreachable
30: ; preds = %25
%31 = tail call i64 @mod3(i32 -128, i32 -1)
%32 = icmp eq i64 %31, 0
br i1 %32, label %35, label %33
33: ; preds = %30
%34 = tail call i32 (...) @abort()
unreachable
35: ; preds = %30
%36 = tail call i64 @mod4(i32 -32768, i32 -1)
%37 = icmp eq i64 %36, 0
br i1 %37, label %40, label %38
38: ; preds = %35
%39 = tail call i32 (...) @abort()
unreachable
40: ; preds = %35
%41 = tail call i64 @mod5(i32 1342177280, i32 2)
%42 = icmp eq i64 %41, 0
br i1 %42, label %45, label %43
43: ; preds = %40
%44 = tail call i32 (...) @abort()
unreachable
45: ; preds = %40
%46 = tail call i64 @mod6(i32 1342177280, i32 2)
%47 = icmp eq i64 %46, 0
br i1 %47, label %50, label %48
48: ; preds = %45
%49 = tail call i32 (...) @abort()
unreachable
50: ; preds = %45
%51 = tail call i32 @exit(i32 0)
unreachable
}