#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 foo_div(int, int);
int foo_mult(int, int);
int main() {
  if (foo_div(-10, 5) != -2)
    abort();
  if (foo_div(-16, 4) != -4)
    abort();
  if (foo_div(-15, -5) != 3)
    abort();
  if (foo_div(8, 2) != 4)
    abort();
  if (foo_div(10, -2) != -5)
    abort();
  if (foo_div(20, 5) != 4)
    abort();
  if (foo_div(15, -3) != -5)
    abort();
  if (foo_mult(-10, 5) != -50)
    abort();
  if (foo_mult(-16, 4) != -64)
    abort();
  if (foo_mult(-15, -5) != 75)
    abort();
  if (foo_mult(8, 2) != 16)
    abort();
  if (foo_mult(10, -2) != -20)
    abort();
  if (foo_mult(20, 5) != 100)
    abort();
  if (foo_mult(15, -3) != -45)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xfffffff6,%edi
mov    $0x5,%esi
call   1050 <foo_div@plt>
cmp    $0xfffffffe,%eax
je     115e <main+0x2e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0xfffffff0,%edi
mov    $0x4,%esi
call   1050 <foo_div@plt>
cmp    $0xfffffffc,%eax
je     117d <main+0x4d>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0xfffffff1,%edi
mov    $0xfffffffb,%esi
call   1050 <foo_div@plt>
cmp    $0x3,%eax
je     119c <main+0x6c>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0x8,%edi
mov    $0x2,%esi
call   1050 <foo_div@plt>
cmp    $0x4,%eax
je     11bb <main+0x8b>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0xa,%edi
mov    $0xfffffffe,%esi
call   1050 <foo_div@plt>
cmp    $0xfffffffb,%eax
je     11da <main+0xaa>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0x14,%edi
mov    $0x5,%esi
call   1050 <foo_div@plt>
cmp    $0x4,%eax
je     11f9 <main+0xc9>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0xf,%edi
mov    $0xfffffffd,%esi
call   1050 <foo_div@plt>
cmp    $0xfffffffb,%eax
je     1218 <main+0xe8>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0xfffffff6,%edi
mov    $0x5,%esi
call   1030 <foo_mult@plt>
cmp    $0xffffffce,%eax
je     1237 <main+0x107>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0xfffffff0,%edi
mov    $0x4,%esi
call   1030 <foo_mult@plt>
cmp    $0xffffffc0,%eax
je     1256 <main+0x126>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0xfffffff1,%edi
mov    $0xfffffffb,%esi
call   1030 <foo_mult@plt>
cmp    $0x4b,%eax
je     1275 <main+0x145>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0x8,%edi
mov    $0x2,%esi
call   1030 <foo_mult@plt>
cmp    $0x10,%eax
je     1294 <main+0x164>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0xa,%edi
mov    $0xfffffffe,%esi
call   1030 <foo_mult@plt>
cmp    $0xffffffec,%eax
je     12b3 <main+0x183>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0x14,%edi
mov    $0x5,%esi
call   1030 <foo_mult@plt>
cmp    $0x64,%eax
je     12d2 <main+0x1a2>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0xf,%edi
mov    $0xfffffffd,%esi
call   1030 <foo_mult@plt>
cmp    $0xffffffd3,%eax
je     12f1 <main+0x1c1>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xfffffff6,%edi
mov    $0x5,%esi
call   1050 <foo_div@plt>
cmp    $0xfffffffe,%eax
jne    1269 <main+0x139>
mov    $0xfffffff0,%edi
mov    $0x4,%esi
call   1050 <foo_div@plt>
cmp    $0xfffffffc,%eax
jne    1269 <main+0x139>
mov    $0xfffffff1,%edi
mov    $0xfffffffb,%esi
call   1050 <foo_div@plt>
cmp    $0x3,%eax
jne    1269 <main+0x139>
mov    $0x8,%edi
mov    $0x2,%esi
call   1050 <foo_div@plt>
cmp    $0x4,%eax
jne    1269 <main+0x139>
mov    $0xa,%edi
mov    $0xfffffffe,%esi
call   1050 <foo_div@plt>
cmp    $0xfffffffb,%eax
jne    1269 <main+0x139>
mov    $0x14,%edi
mov    $0x5,%esi
call   1050 <foo_div@plt>
cmp    $0x4,%eax
jne    1269 <main+0x139>
mov    $0xf,%edi
mov    $0xfffffffd,%esi
call   1050 <foo_div@plt>
cmp    $0xfffffffb,%eax
jne    1269 <main+0x139>
mov    $0xfffffff6,%edi
mov    $0x5,%esi
call   1030 <foo_mult@plt>
cmp    $0xffffffce,%eax
jne    1269 <main+0x139>
mov    $0xfffffff0,%edi
mov    $0x4,%esi
call   1030 <foo_mult@plt>
cmp    $0xffffffc0,%eax
jne    1269 <main+0x139>
mov    $0xfffffff1,%edi
mov    $0xfffffffb,%esi
call   1030 <foo_mult@plt>
cmp    $0x4b,%eax
jne    1269 <main+0x139>
mov    $0x8,%edi
mov    $0x2,%esi
call   1030 <foo_mult@plt>
cmp    $0x10,%eax
jne    1269 <main+0x139>
mov    $0xa,%edi
mov    $0xfffffffe,%esi
call   1030 <foo_mult@plt>
cmp    $0xffffffec,%eax
jne    1269 <main+0x139>
mov    $0x14,%edi
mov    $0x5,%esi
call   1030 <foo_mult@plt>
cmp    $0x64,%eax
jne    1269 <main+0x139>
mov    $0xf,%edi
mov    $0xfffffffd,%esi
call   1030 <foo_mult@plt>
cmp    $0xffffffd3,%eax
jne    1269 <main+0x139>
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 @foo_div(i32 -10, i32 5)
%3 = icmp ne i32 %2, -2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @foo_div(i32 -16, i32 4)
%8 = icmp ne i32 %7, -4
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = call i32 @foo_div(i32 -15, i32 -5)
%13 = icmp ne i32 %12, 3
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %11
%17 = call i32 @foo_div(i32 8, i32 2)
%18 = icmp ne i32 %17, 4
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %16
%22 = call i32 @foo_div(i32 10, i32 -2)
%23 = icmp ne i32 %22, -5
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 (...) @abort()
unreachable
26: ; preds = %21
%27 = call i32 @foo_div(i32 20, i32 5)
%28 = icmp ne i32 %27, 4
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 (...) @abort()
unreachable
31: ; preds = %26
%32 = call i32 @foo_div(i32 15, i32 -3)
%33 = icmp ne i32 %32, -5
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 (...) @abort()
unreachable
36: ; preds = %31
%37 = call i32 @foo_mult(i32 -10, i32 5)
%38 = icmp ne i32 %37, -50
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 (...) @abort()
unreachable
41: ; preds = %36
%42 = call i32 @foo_mult(i32 -16, i32 4)
%43 = icmp ne i32 %42, -64
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 (...) @abort()
unreachable
46: ; preds = %41
%47 = call i32 @foo_mult(i32 -15, i32 -5)
%48 = icmp ne i32 %47, 75
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = call i32 (...) @abort()
unreachable
51: ; preds = %46
%52 = call i32 @foo_mult(i32 8, i32 2)
%53 = icmp ne i32 %52, 16
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = call i32 (...) @abort()
unreachable
56: ; preds = %51
%57 = call i32 @foo_mult(i32 10, i32 -2)
%58 = icmp ne i32 %57, -20
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = call i32 (...) @abort()
unreachable
61: ; preds = %56
%62 = call i32 @foo_mult(i32 20, i32 5)
%63 = icmp ne i32 %62, 100
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = call i32 (...) @abort()
unreachable
66: ; preds = %61
%67 = call i32 @foo_mult(i32 15, i32 -3)
%68 = icmp ne i32 %67, -45
br i1 %68, label %69, label %71
69: ; preds = %66
%70 = call i32 (...) @abort()
unreachable
71: ; preds = %66
ret i32 0
}

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