#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 addition(int, int);
int division(int, int);
int multiplication(int, int);
int /*<<< orphan*/ printf(char *, int);
int subtraction(int, int);
int main() {
  int res;
  res = addition(5, 15);
  printf("Addition: %d\n", res);
  res = subtraction(45, 30);
  printf("Subtraction: %d\n", res);
  res = division(300, 10);
  printf("Division: %d\n", res);
  res = multiplication(8, 5);
  printf("Multiplication: %d\n", res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
mov    $0xf,%esi
call   1030 <addition@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe85(%rip),%rdi
call   1050 <printf@plt>
mov    $0x2d,%edi
mov    $0x1e,%esi
call   1070 <subtraction@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe72(%rip),%rdi
call   1050 <printf@plt>
mov    $0x12c,%edi
mov    $0xa,%esi
call   1060 <division@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe62(%rip),%rdi
call   1050 <printf@plt>
mov    $0x8,%edi
mov    $0x5,%esi
call   1040 <multiplication@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe4f(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0xf,%esi
call   1030 <addition@plt>
lea    0xe99(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    $0x2d,%edi
mov    $0x1e,%esi
call   1070 <subtraction@plt>
lea    0xe8a(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    $0x12c,%edi
mov    $0xa,%esi
call   1060 <division@plt>
lea    0xe7e(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    $0x8,%edi
mov    $0x5,%esi
call   1040 <multiplication@plt>
lea    0xe6f(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Addition: %d\0A\00"
@.str.1 = [17 x i8] c"Subtraction: %d\0A\00"
@.str.2 = [14 x i8] c"Division: %d\0A\00"
@.str.3 = [20 x i8] c"Multiplication: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @addition(i32 5, i32 15)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @subtraction(i32 45, i32 30)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 @division(i32 300, i32 10)
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%12 = call i32 @multiplication(i32 8, i32 5)
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Addition: %d\0A\00"
@.str.1 = [17 x i8] c"Subtraction: %d\0A\00"
@.str.2 = [14 x i8] c"Division: %d\0A\00"
@.str.3 = [20 x i8] c"Multiplication: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @addition(i32 5, i32 15)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @subtraction(i32 45, i32 30)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @division(i32 300, i32 10)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 @multiplication(i32 8, i32 5)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %7)
ret i32 0
}