#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 addSum(int, int);
double divSum(int, int);
int multiSum(int, int);
int /*<<< orphan*/ printf(char *, int);
int subSum(int, int);
int main() {
  int resultAdd = addSum(2, 3);
  printf("The addition of 2 and 3 is: %i\n", resultAdd);
  int resultSub = subSum(2, 3);
  printf("The subtraction of 2 and 3 is: %i\n", resultSub);
  double resultDiv = divSum(2, 3);
  printf("The division of 2 and 3 is: %f\n", resultDiv);
  int resultMulti = multiSum(2, 3);
  printf("The multiplication of 2 and 3 is: %i\n", resultMulti);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0x3,%esi
call   1040 <addSum@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1070 <subSum@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1050 <divSum@plt>
movsd  %xmm0,-0x18(%rbp)
cvttsd2si -0x18(%rbp),%esi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1060 <multiSum@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0x3,%esi
call   1040 <addSum@plt>
lea    0xe99(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1070 <subSum@plt>
lea    0xe9c(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1050 <divSum@plt>
cvttsd2si %xmm0,%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1060 <multiSum@plt>
lea    0xea3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"The addition of 2 and 3 is: %i\0A\00"
@.str.1 = [35 x i8] c"The subtraction of 2 and 3 is: %i\0A\00"
@.str.2 = [32 x i8] c"The division of 2 and 3 is: %f\0A\00"
@.str.3 = [38 x i8] c"The multiplication of 2 and 3 is: %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @addSum(i32 2, i32 3)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 @subSum(i32 2, i32 3)
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = call double @divSum(i32 2, i32 3)
store double %12, double* %4
%13 = load double, double* %4
%14 = fptosi double %13 to i32
%15 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = call i32 @multiSum(i32 2, i32 3)
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"The addition of 2 and 3 is: %i\0A\00"
@.str.1 = [35 x i8] c"The subtraction of 2 and 3 is: %i\0A\00"
@.str.2 = [32 x i8] c"The division of 2 and 3 is: %f\0A\00"
@.str.3 = [38 x i8] c"The multiplication of 2 and 3 is: %i\0A\00"
define i32 @main() {
%1 = tail call i32 @addSum(i32 2, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @subSum(i32 2, i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call double @divSum(i32 2, i32 3)
%6 = fptosi double %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = tail call i32 @multiSum(i32 2, i32 3)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 %8)
ret i32 0
}