#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*/ print_int(int);
int /*<<< orphan*/ print_string(char *);
void main(void) {
  int num;
  num = 6 + 2 * 4;
  print_string("Should get 14\nGot: ");
  print_int(num);
  print_string("\n");
  num = 6 - 4 / 4;
  print_string("Should get 5\nGot: ");
  print_int(num);
  print_string("\n");
  num = 6 * 2 - 7;
  print_string("Should get 5\nGot: ");
  print_int(num);
  print_string("\n");
  num = 6 / 2 + 8;
  print_string("Should get 11\nGot: ");
  print_int(num);
  print_string("\n");
  num = '2' / 25 + 8;
  print_string("Should get 10\nGot: ");
  print_int(num);
  print_string("\n");
  num = 24 / ('1' - 37);
  print_string("Should get 2\nGot: ");
  print_int(num);
  print_string("\n");
  num = 8 + 8 + 8 - 64 / 2;
  print_string("Should get -8\nGot: ");
  print_int(num);
  print_string("\n");
  num = 8 / (8 - 4 * (1 - 0)) * 5 + 8 + 3;
  print_string("Should get 21\nGot: ");
  print_int(num);
  print_string("\n");
  num = (8 / 8) * (4 + 4) + 9;
  print_string("Should get 17\nGot: ");
  print_int(num);
  print_string("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xe,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xeca(%rip),%rdi
call   1030 <print_string@plt>
movl   $0x5,-0x4(%rbp)
lea    0xeb9(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xea3(%rip),%rdi
call   1030 <print_string@plt>
movl   $0x5,-0x4(%rbp)
lea    0xe92(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe7c(%rip),%rdi
call   1030 <print_string@plt>
movl   $0xb,-0x4(%rbp)
lea    0xe7e(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe55(%rip),%rdi
call   1030 <print_string@plt>
movl   $0xa,-0x4(%rbp)
lea    0xe6b(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe2e(%rip),%rdi
call   1030 <print_string@plt>
movl   $0x2,-0x4(%rbp)
lea    0xe58(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe07(%rip),%rdi
call   1030 <print_string@plt>
movl   $0xfffffff8,-0x4(%rbp)
lea    0xe44(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xde0(%rip),%rdi
call   1030 <print_string@plt>
movl   $0x15,-0x4(%rbp)
lea    0xe31(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xdb9(%rip),%rdi
call   1030 <print_string@plt>
movl   $0x11,-0x4(%rbp)
lea    0xe1e(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xd92(%rip),%rdi
call   1030 <print_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
call   1030 <print_string@plt>
mov    $0xe,%edi
call   1040 <print_int@plt>
lea    0xed3(%rip),%r14
mov    %r14,%rdi
call   1030 <print_string@plt>
lea    0xec6(%rip),%rbx
mov    %rbx,%rdi
call   1030 <print_string@plt>
mov    $0x5,%edi
call   1040 <print_int@plt>
mov    %r14,%rdi
call   1030 <print_string@plt>
mov    %rbx,%rdi
call   1030 <print_string@plt>
mov    $0x5,%edi
call   1040 <print_int@plt>
mov    %r14,%rdi
call   1030 <print_string@plt>
lea    0xe9e(%rip),%rdi
call   1030 <print_string@plt>
mov    $0xb,%edi
call   1040 <print_int@plt>
mov    %r14,%rdi
call   1030 <print_string@plt>
lea    0xe94(%rip),%rdi
call   1030 <print_string@plt>
mov    $0xa,%edi
call   1040 <print_int@plt>
mov    %r14,%rdi
call   1030 <print_string@plt>
lea    0xe8a(%rip),%rdi
call   1030 <print_string@plt>
mov    $0x2,%edi
call   1040 <print_int@plt>
mov    %r14,%rdi
call   1030 <print_string@plt>
lea    0xe7f(%rip),%rdi
call   1030 <print_string@plt>
mov    $0xfffffff8,%edi
call   1040 <print_int@plt>
mov    %r14,%rdi
call   1030 <print_string@plt>
lea    0xe75(%rip),%rdi
call   1030 <print_string@plt>
mov    $0x15,%edi
call   1040 <print_int@plt>
mov    %r14,%rdi
call   1030 <print_string@plt>
lea    0xe6b(%rip),%rdi
call   1030 <print_string@plt>
mov    $0x11,%edi
call   1040 <print_int@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <print_string@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Should get 14\0AGot: \00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [19 x i8] c"Should get 5\0AGot: \00"
@.str.3 = [20 x i8] c"Should get 11\0AGot: \00"
@.str.4 = [20 x i8] c"Should get 10\0AGot: \00"
@.str.5 = [19 x i8] c"Should get 2\0AGot: \00"
@.str.6 = [20 x i8] c"Should get -8\0AGot: \00"
@.str.7 = [20 x i8] c"Should get 21\0AGot: \00"
@.str.8 = [20 x i8] c"Should get 17\0AGot: \00"
define void @main() {
%1 = alloca i32
store i32 14, i32* %1
%2 = call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
%4 = call i32 @print_int(i32 %3)
%5 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 5, i32* %1
%6 = call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* %1
%8 = call i32 @print_int(i32 %7)
%9 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 5, i32* %1
%10 = call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* %1
%12 = call i32 @print_int(i32 %11)
%13 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 11, i32* %1
%14 = call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%15 = load i32, i32* %1
%16 = call i32 @print_int(i32 %15)
%17 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 10, i32* %1
%18 = call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%19 = load i32, i32* %1
%20 = call i32 @print_int(i32 %19)
%21 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 2, i32* %1
%22 = call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%23 = load i32, i32* %1
%24 = call i32 @print_int(i32 %23)
%25 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 -8, i32* %1
%26 = call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%27 = load i32, i32* %1
%28 = call i32 @print_int(i32 %27)
%29 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 21, i32* %1
%30 = call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
%31 = load i32, i32* %1
%32 = call i32 @print_int(i32 %31)
%33 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 17, i32* %1
%34 = call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%35 = load i32, i32* %1
%36 = call i32 @print_int(i32 %35)
%37 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Should get 14\0AGot: \00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [19 x i8] c"Should get 5\0AGot: \00"
@.str.3 = [20 x i8] c"Should get 11\0AGot: \00"
@.str.4 = [20 x i8] c"Should get 10\0AGot: \00"
@.str.5 = [19 x i8] c"Should get 2\0AGot: \00"
@.str.6 = [20 x i8] c"Should get -8\0AGot: \00"
@.str.7 = [20 x i8] c"Should get 21\0AGot: \00"
@.str.8 = [20 x i8] c"Should get 17\0AGot: \00"
define void @main() {
%1 = tail call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_int(i32 14)
%3 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @print_int(i32 5)
%6 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @print_int(i32 5)
%9 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%11 = tail call i32 @print_int(i32 11)
%12 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = tail call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%14 = tail call i32 @print_int(i32 10)
%15 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = tail call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%17 = tail call i32 @print_int(i32 2)
%18 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%19 = tail call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%20 = tail call i32 @print_int(i32 -8)
%21 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%22 = tail call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
%23 = tail call i32 @print_int(i32 21)
%24 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%25 = tail call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%26 = tail call i32 @print_int(i32 17)
%27 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}