#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*/ printf(char *, int);
int /*<<< orphan*/ system(char *);
int main(void) {
  int a = 2, b = 5, c = 10, d = -10, e = -1;
  printf("%d\n", c / 10 + b - d * e * (c + 12));
  printf("%d\n", (a * ((c + b) - (a * a))) * (-1));
  printf("%d\n", -d * -e * c * b * a);
  printf("%d\n", a + b + c + d + e);
  printf("%d\n", a * b / (-c + d) + e);
  system("PAUSE");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0xa,-0x10(%rbp)
movl   $0xfffffff6,-0x14(%rbp)
movl   $0xffffffff,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
add    -0xc(%rbp),%esi
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    $0xc,%ecx
imul   %ecx,%eax
sub    %eax,%esi
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x8(%rbp),%edx
sub    %edx,%ecx
imul   %ecx,%eax
imul   $0xffffffff,%eax,%esi
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
xor    %esi,%esi
sub    -0x14(%rbp),%esi
xor    %eax,%eax
sub    -0x18(%rbp),%eax
imul   %eax,%esi
imul   -0x10(%rbp),%esi
imul   -0xc(%rbp),%esi
imul   -0x8(%rbp),%esi
lea    0xe3c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
add    -0x10(%rbp),%esi
add    -0x14(%rbp),%esi
add    -0x18(%rbp),%esi
lea    0xe21(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%ecx
add    -0x14(%rbp),%ecx
cltd
idiv   %ecx
mov    %eax,%esi
add    -0x18(%rbp),%esi
lea    0xdfe(%rip),%rdi
call   1040 <printf@plt>
lea    0xdf6(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xffffff2a,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffffea,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
call   1040 <printf@plt>
lea    0xe94(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [6 x i8] c"PAUSE\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i32 5, i32* %3
store i32 10, i32* %4
store i32 -10, i32* %5
store i32 -1, i32* %6
%7 = load i32, i32* %4
%8 = sdiv i32 %7, 10
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = mul nsw i32 %11, %12
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 12
%16 = mul nsw i32 %13, %15
%17 = sub nsw i32 %10, %16
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %2
%20 = load i32, i32* %4
%21 = load i32, i32* %3
%22 = add nsw i32 %20, %21
%23 = load i32, i32* %2
%24 = load i32, i32* %2
%25 = mul nsw i32 %23, %24
%26 = sub nsw i32 %22, %25
%27 = mul nsw i32 %19, %26
%28 = mul nsw i32 %27, -1
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %28)
%30 = load i32, i32* %5
%31 = sub nsw i32 0, %30
%32 = load i32, i32* %6
%33 = sub nsw i32 0, %32
%34 = mul nsw i32 %31, %33
%35 = load i32, i32* %4
%36 = mul nsw i32 %34, %35
%37 = load i32, i32* %3
%38 = mul nsw i32 %36, %37
%39 = load i32, i32* %2
%40 = mul nsw i32 %38, %39
%41 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %40)
%42 = load i32, i32* %2
%43 = load i32, i32* %3
%44 = add nsw i32 %42, %43
%45 = load i32, i32* %4
%46 = add nsw i32 %44, %45
%47 = load i32, i32* %5
%48 = add nsw i32 %46, %47
%49 = load i32, i32* %6
%50 = add nsw i32 %48, %49
%51 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %50)
%52 = load i32, i32* %2
%53 = load i32, i32* %3
%54 = mul nsw i32 %52, %53
%55 = load i32, i32* %4
%56 = sub nsw i32 0, %55
%57 = load i32, i32* %5
%58 = add nsw i32 %56, %57
%59 = sdiv i32 %54, %58
%60 = load i32, i32* %6
%61 = add nsw i32 %59, %60
%62 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %61)
%63 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [6 x i8] c"PAUSE\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -214)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -22)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -1)
%6 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}