#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 */
double ceil(double);
double floor(double);
double pow(int, int);
int /*<<< orphan*/ printf(char *, double);
double sqrt(int);
void math() {
  printf("%f\n", pow(2, 3));
  printf("%f\n", pow(4, 3));
  printf("%f\n", sqrt(36));
  printf("%f\n", ceil(36.356));
  printf("%f\n", floor(36.356));
}


x86 assembly (clang, -O0):
<math>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x3,%esi
call   1040 <pow@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x4,%edi
mov    $0x3,%esi
call   1040 <pow@plt>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    $0x24,%edi
call   1050 <sqrt@plt>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe80(%rip),%xmm0
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe64(%rip),%xmm0
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<math>:
push   %rbx
mov    $0x2,%edi
mov    $0x3,%esi
call   1040 <pow@plt>
lea    0xec9(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x4,%edi
mov    $0x3,%esi
call   1040 <pow@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x24,%edi
call   1050 <sqrt@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xe80(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xe78(%rip),%xmm0
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define void @math() {
%1 = call double @pow(i32 2, i32 3)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
%3 = call double @pow(i32 4, i32 3)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
%5 = call double @sqrt(i32 36)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %5)
%7 = call double @llvm.ceil.f64(double 3.635600e+01)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %7)
%9 = call double @llvm.floor.f64(double 3.635600e+01)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %9)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define void @math() {
%1 = tail call double @pow(i32 2, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
%3 = tail call double @pow(i32 4, i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
%5 = tail call double @sqrt(i32 36)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 3.700000e+01)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 3.600000e+01)
ret void
}