#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(char *);
int /*<<< orphan*/ print_num(int);
int main(void) {
  int a;
  a = 1 + 5 * 8 + 1;
  print_num(a);
  print("\n");
  a = 100 / 200 * 200;
  print_num(a);
  print("\n");
  a = 1 - 20 / 10 * 4 + 10;
  print_num(a);
  print("\n");
  a = 1 - 10 - 100;
  print_num(a);
  print("\n");
  a = 1024 / 512 / 2;
  print_num(a);
  print("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <print_num@plt>
lea    0xebb(%rip),%rdi
call   1030 <print@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <print_num@plt>
lea    0xea0(%rip),%rdi
call   1030 <print@plt>
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <print_num@plt>
lea    0xe85(%rip),%rdi
call   1030 <print@plt>
movl   $0xffffff93,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <print_num@plt>
lea    0xe6a(%rip),%rdi
call   1030 <print@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <print_num@plt>
lea    0xe4f(%rip),%rdi
call   1030 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2a,%edi
call   1040 <print_num@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
call   1030 <print@plt>
xor    %edi,%edi
call   1040 <print_num@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    $0x3,%edi
call   1040 <print_num@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    $0xffffff93,%edi
call   1040 <print_num@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    $0x1,%edi
call   1040 <print_num@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 42, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @print_num(i32 %3)
%5 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @print_num(i32 %6)
%8 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 3, i32* %2
%9 = load i32, i32* %2
%10 = call i32 @print_num(i32 %9)
%11 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 -109, i32* %2
%12 = load i32, i32* %2
%13 = call i32 @print_num(i32 %12)
%14 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %2
%15 = load i32, i32* %2
%16 = call i32 @print_num(i32 %15)
%17 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call i32 @print_num(i32 42)
%2 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @print_num(i32 0)
%4 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @print_num(i32 3)
%6 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @print_num(i32 -109)
%8 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @print_num(i32 1)
%10 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}