#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 EXIT_SUCCESS;
double ceil(double);
double fabs(double);
double fdim(double, double);
double floor(double);
double fmax(double, double);
double fmin(double, double);
int /*<<< orphan*/ printf(char *, double);
double round(double);
double trunc(double);
int main(int argc, char *argv[]) {
  double param = -5.6;
  int n = 2;
  printf("param is :%f\n", param);
  printf("n is :%d\n", n);
  printf("ceil(PI)"
         " is: %f\n",
         ceil(3.14159265));
  printf("floor(PI)"
         " is: %f\n",
         floor(3.14159265));
  printf("round(PI)"
         " is: %f\n",
         round(3.14159265));
  printf("trunc(PI)"
         " is: %f\n",
         trunc(3.14159265));
  printf("ceil(param)"
         " is: %f\n",
         ceil(param));
  printf("floor(param)"
         " is: %f\n",
         floor(param));
  printf("round(param)"
         " is: %f\n",
         round(param));
  printf("trunc(param)"
         " is: %f\n",
         trunc(param));
  printf("fabs(param)"
         " is: %f\n",
         fabs(param));
  printf("fmin(param, PI)"
         " is: %f\n",
         fmin(param, 3.14159265));
  printf("fmax(param, PI)"
         " is: %f\n",
         fmax(param, 3.14159265));
  printf("fdim(param, PI)"
         " is: %f\n",
         fdim(param, 3.14159265));
  printf("fdim(PI, param)"
         " is: %f\n",
         fdim(3.14159265, param));
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xe9a(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x2,-0x1c(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
cvtsi2sdl -0x1c(%rbp),%xmm0
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
movsd  0xe5c(%rip),%xmm0
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
movsd  0xe40(%rip),%xmm0
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
movsd  0xe24(%rip),%xmm0
call   1070 <round@plt>
lea    0xe83(%rip),%rdi
call   1040 <printf@plt>
movsd  0xe13(%rip),%xmm0
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
call   1030 <ceil@plt>
lea    0xe7d(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
call   1080 <floor@plt>
lea    0xe7b(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
call   1070 <round@plt>
lea    0xe7a(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
call   1060 <trunc@plt>
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movaps 0xdbb(%rip),%xmm1
pand   %xmm1,%xmm0
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  0xd7e(%rip),%xmm1
minsd  %xmm1,%xmm0
lea    0xe69(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  0xd61(%rip),%xmm1
maxsd  %xmm1,%xmm0
lea    0xe64(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  0xd44(%rip),%xmm1
call   1050 <fdim@plt>
lea    0xe5e(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xd26(%rip),%xmm0
call   1050 <fdim@plt>
lea    0xe58(%rip),%rdi
call   1040 <printf@plt>
mov    0x2cee(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf18(%rip),%rdi
movsd  0xed0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf12(%rip),%rdi
movsd  0xec4(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf08(%rip),%rdi
movsd  0xeb8(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
movsd  0xeac(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
movsd  0xe98(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
movsd  0xe84(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
movsd  0xe78(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
movsd  0xe6c(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
movsd  0xe58(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
movsd  0xe3c(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
movsd  0xe38(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
movsd  0xdf4(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
movsd  0xe18(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xdd3(%rip),%xmm0
movsd  0xe03(%rip),%xmm1
call   1040 <fdim@plt>
lea    0xef5(%rip),%rdi
call   1030 <printf@plt>
movsd  0xdea(%rip),%xmm0
movsd  0xdaa(%rip),%xmm1
call   1040 <fdim@plt>
lea    0xeec(%rip),%rdi
call   1030 <printf@plt>
mov    0x2d72(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"param is :%f\0A\00"
@.str.1 = [10 x i8] c"n is :%d\0A\00"
@.str.2 = [17 x i8] c"ceil(PI) is: %f\0A\00"
@.str.3 = [18 x i8] c"floor(PI) is: %f\0A\00"
@.str.4 = [18 x i8] c"round(PI) is: %f\0A\00"
@.str.5 = [18 x i8] c"trunc(PI) is: %f\0A\00"
@.str.6 = [20 x i8] c"ceil(param) is: %f\0A\00"
@.str.7 = [21 x i8] c"floor(param) is: %f\0A\00"
@.str.8 = [21 x i8] c"round(param) is: %f\0A\00"
@.str.9 = [21 x i8] c"trunc(param) is: %f\0A\00"
@.str.10 = [20 x i8] c"fabs(param) is: %f\0A\00"
@.str.11 = [24 x i8] c"fmin(param, PI) is: %f\0A\00"
@.str.12 = [24 x i8] c"fmax(param, PI) is: %f\0A\00"
@.str.13 = [24 x i8] c"fdim(param, PI) is: %f\0A\00"
@.str.14 = [24 x i8] c"fdim(PI, param) is: %f\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double -5.600000e+00, double* %6
store i32 2, i32* %7
%8 = load double, double* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double %8)
%10 = load i32, i32* %7
%11 = sitofp i32 %10 to double
%12 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %11)
%13 = call double @llvm.ceil.f64(double 0x400921FB53C8D4F1)
%14 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double %13)
%15 = call double @llvm.floor.f64(double 0x400921FB53C8D4F1)
%16 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), double %15)
%17 = call double @llvm.round.f64(double 0x400921FB53C8D4F1)
%18 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), double %17)
%19 = call double @llvm.trunc.f64(double 0x400921FB53C8D4F1)
%20 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), double %19)
%21 = load double, double* %6
%22 = call double @llvm.ceil.f64(double %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), double %22)
%24 = load double, double* %6
%25 = call double @llvm.floor.f64(double %24)
%26 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), double %25)
%27 = load double, double* %6
%28 = call double @llvm.round.f64(double %27)
%29 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), double %28)
%30 = load double, double* %6
%31 = call double @llvm.trunc.f64(double %30)
%32 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), double %31)
%33 = load double, double* %6
%34 = call double @llvm.fabs.f64(double %33)
%35 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), double %34)
%36 = load double, double* %6
%37 = call double @llvm.minnum.f64(double %36, double 0x400921FB53C8D4F1)
%38 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), double %37)
%39 = load double, double* %6
%40 = call double @llvm.maxnum.f64(double %39, double 0x400921FB53C8D4F1)
%41 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), double %40)
%42 = load double, double* %6
%43 = call double @fdim(double %42, double 0x400921FB53C8D4F1)
%44 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), double %43)
%45 = load double, double* %6
%46 = call double @fdim(double 0x400921FB53C8D4F1, double %45)
%47 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0), double %46)
%48 = load i32, i32* @EXIT_SUCCESS
ret i32 %48
}

LLVM IR (-O2):
@.str = [14 x i8] c"param is :%f\0A\00"
@.str.1 = [10 x i8] c"n is :%d\0A\00"
@.str.2 = [17 x i8] c"ceil(PI) is: %f\0A\00"
@.str.3 = [18 x i8] c"floor(PI) is: %f\0A\00"
@.str.4 = [18 x i8] c"round(PI) is: %f\0A\00"
@.str.5 = [18 x i8] c"trunc(PI) is: %f\0A\00"
@.str.6 = [20 x i8] c"ceil(param) is: %f\0A\00"
@.str.7 = [21 x i8] c"floor(param) is: %f\0A\00"
@.str.8 = [21 x i8] c"round(param) is: %f\0A\00"
@.str.9 = [21 x i8] c"trunc(param) is: %f\0A\00"
@.str.10 = [20 x i8] c"fabs(param) is: %f\0A\00"
@.str.11 = [24 x i8] c"fmin(param, PI) is: %f\0A\00"
@.str.12 = [24 x i8] c"fmax(param, PI) is: %f\0A\00"
@.str.13 = [24 x i8] c"fdim(param, PI) is: %f\0A\00"
@.str.14 = [24 x i8] c"fdim(PI, param) is: %f\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double -5.600000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double 2.000000e+00)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double 4.000000e+00)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), double 3.000000e+00)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), double 3.000000e+00)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), double 3.000000e+00)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), double -5.000000e+00)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), double -6.000000e+00)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), double -6.000000e+00)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), double -5.000000e+00)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), double 5.600000e+00)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), double -5.600000e+00)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), double 0x400921FB53C8D4F1)
%16 = tail call double @fdim(double -5.600000e+00, double 0x400921FB53C8D4F1)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), double %16)
%18 = tail call double @fdim(double 0x400921FB53C8D4F1, double -5.600000e+00)
%19 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0), double %18)
%20 = load i32, i32* @EXIT_SUCCESS
ret i32 %20
}