#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*/ addTimes(int, int);
int /*<<< orphan*/ calculateSmallestMoney(int);
int /*<<< orphan*/ calculateVolume(double);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Question 1 : Volume of a sphere\n");
  calculateVolume(1.0);
  calculateVolume(4.657);
  calculateVolume(10.0);
  calculateVolume(42.0);
  printf("\n\nQuestion 2 : Smallest money\n");
  calculateSmallestMoney(20);
  calculateSmallestMoney(79);
  calculateSmallestMoney(10);
  calculateSmallestMoney(42);
  printf("\n\nQuestion 3 : Adding times\n");
  addTimes(1045, 345);
  addTimes(800, 435);
  addTimes(2300, 300);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
movsd  0xeae(%rip),%xmm0
call   1050 <calculateVolume@plt>
movsd  0xe99(%rip),%xmm0
call   1050 <calculateVolume@plt>
movsd  0xe84(%rip),%xmm0
call   1050 <calculateVolume@plt>
movsd  0xe6f(%rip),%xmm0
call   1050 <calculateVolume@plt>
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
mov    $0x14,%edi
call   1060 <calculateSmallestMoney@plt>
mov    $0x4f,%edi
call   1060 <calculateSmallestMoney@plt>
mov    $0xa,%edi
call   1060 <calculateSmallestMoney@plt>
mov    $0x2a,%edi
call   1060 <calculateSmallestMoney@plt>
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
mov    $0x415,%edi
mov    $0x159,%esi
call   1030 <addTimes@plt>
mov    $0x320,%edi
mov    $0x1b3,%esi
call   1030 <addTimes@plt>
mov    $0x8fc,%edi
mov    $0x12c,%esi
call   1030 <addTimes@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
movsd  0xeab(%rip),%xmm0
call   1050 <calculateVolume@plt>
movsd  0xea6(%rip),%xmm0
call   1050 <calculateVolume@plt>
movsd  0xea1(%rip),%xmm0
call   1050 <calculateVolume@plt>
movsd  0xe9c(%rip),%xmm0
call   1050 <calculateVolume@plt>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x14,%edi
call   1060 <calculateSmallestMoney@plt>
mov    $0x4f,%edi
call   1060 <calculateSmallestMoney@plt>
mov    $0xa,%edi
call   1060 <calculateSmallestMoney@plt>
mov    $0x2a,%edi
call   1060 <calculateSmallestMoney@plt>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x415,%edi
mov    $0x159,%esi
call   1040 <addTimes@plt>
mov    $0x320,%edi
mov    $0x1b3,%esi
call   1040 <addTimes@plt>
mov    $0x8fc,%edi
mov    $0x12c,%esi
call   1040 <addTimes@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Question 1 : Volume of a sphere\0A\00"
@.str.1 = [31 x i8] c"\0A\0AQuestion 2 : Smallest money\0A\00"
@.str.2 = [29 x i8] c"\0A\0AQuestion 3 : Adding times\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @calculateVolume(double 1.000000e+00)
%8 = call i32 @calculateVolume(double 4.657000e+00)
%9 = call i32 @calculateVolume(double 1.000000e+01)
%10 = call i32 @calculateVolume(double 4.200000e+01)
%11 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @calculateSmallestMoney(i32 20)
%13 = call i32 @calculateSmallestMoney(i32 79)
%14 = call i32 @calculateSmallestMoney(i32 10)
%15 = call i32 @calculateSmallestMoney(i32 42)
%16 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 @addTimes(i32 1045, i32 345)
%18 = call i32 @addTimes(i32 800, i32 435)
%19 = call i32 @addTimes(i32 2300, i32 300)
ret i32 0
}

LLVM IR (-O2):
@str = [32 x i8] c"Question 1 : Volume of a sphere\00"
@str.3 = [30 x i8] c"\0A\0AQuestion 2 : Smallest money\00"
@str.4 = [28 x i8] c"\0A\0AQuestion 3 : Adding times\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @calculateVolume(double 1.000000e+00)
%5 = tail call i32 @calculateVolume(double 4.657000e+00)
%6 = tail call i32 @calculateVolume(double 1.000000e+01)
%7 = tail call i32 @calculateVolume(double 4.200000e+01)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.3, i64 0, i64 0))
%9 = tail call i32 @calculateSmallestMoney(i32 20)
%10 = tail call i32 @calculateSmallestMoney(i32 79)
%11 = tail call i32 @calculateSmallestMoney(i32 10)
%12 = tail call i32 @calculateSmallestMoney(i32 42)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.4, i64 0, i64 0))
%14 = tail call i32 @addTimes(i32 1045, i32 345)
%15 = tail call i32 @addTimes(i32 800, i32 435)
%16 = tail call i32 @addTimes(i32 2300, i32 300)
ret i32 0
}