#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 cos(double);
double cosh(double);
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *, double, ...);
double sin(double);
double sinh(double);
double tan(double);
double tanh(double);
main() {
  double number = 123.54, x = 0.5;
  double result1, result2, result3, result4, result5, result6;
  double up;
  up = ceil(number);
  result1 = cos(x);
  result2 = cosh(x);
  result3 = sin(x);
  result4 = sinh(x);
  result5 = tan(x);
  result6 = tanh(x);
  printf("original number %5.2lf\n", number);
  printf("number rounded up %5.2lf\n", up);
  printf("%lf%lf%lf%lf%lf%lf", result1, result2, result3, result4, result5,
         result6);
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  0xe68(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xe53(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <ceil@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
call   10b0 <cos@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1060 <cosh@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1080 <sin@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sinh@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1090 <tan@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <tanh@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xde9(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  -0x48(%rbp),%xmm0
lea    0xdee(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
movsd  -0x40(%rbp),%xmm5
lea    0xddc(%rip),%rdi
mov    $0x6,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   10a0 <getch@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xec7(%rip),%xmm0
call   1030 <tanh@plt>
lea    0xf03(%rip),%rdi
movsd  0xebb(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xf05(%rip),%rdi
movsd  0xead(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xf09(%rip),%rdi
movsd  0xe9f(%rip),%xmm0
movsd  0xe9f(%rip),%xmm1
movsd  0xe9f(%rip),%xmm2
movsd  0xe9f(%rip),%xmm3
movsd  0xe9f(%rip),%xmm4
movsd  0xe9f(%rip),%xmm5
mov    $0x6,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getch@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"original number %5.2lf\0A\00"
@.str.1 = [26 x i8] c"number rounded up %5.2lf\0A\00"
@.str.2 = [19 x i8] c"%lf%lf%lf%lf%lf%lf\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double 1.235400e+02, double* %1
store double 5.000000e-01, double* %2
%10 = load double, double* %1
%11 = call double @llvm.ceil.f64(double %10)
store double %11, double* %9
%12 = load double, double* %2
%13 = call double @cos(double %12)
store double %13, double* %3
%14 = load double, double* %2
%15 = call double @cosh(double %14)
store double %15, double* %4
%16 = load double, double* %2
%17 = call double @sin(double %16)
store double %17, double* %5
%18 = load double, double* %2
%19 = call double @sinh(double %18)
store double %19, double* %6
%20 = load double, double* %2
%21 = call double @tan(double %20)
store double %21, double* %7
%22 = load double, double* %2
%23 = call double @tanh(double %22)
store double %23, double* %8
%24 = load double, double* %1
%25 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double %24)
%26 = load double, double* %9
%27 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), double %26)
%28 = load double, double* %3
%29 = load double, double* %4
%30 = load double, double* %5
%31 = load double, double* %6
%32 = load double, double* %7
%33 = load double, double* %8
%34 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %28, double %29, double %30, double %31, double %32, double %33)
%35 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"original number %5.2lf\0A\00"
@.str.1 = [26 x i8] c"number rounded up %5.2lf\0A\00"
@.str.2 = [19 x i8] c"%lf%lf%lf%lf%lf%lf\00"
define i32 @main() {
%1 = tail call double @tanh(double 5.000000e-01)
%2 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double 1.235400e+02)
%3 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), double 1.240000e+02)
%4 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double 0x3FEC1528065B7D50, double 0x3FF20AC1862AE8D0, double 0x3FDEAEE8744B05F0, double 0x3FE0ACD00FE63B97, double 0x3FE17B4F5BF3474A, double 0x3FDD9353D7568AF3)
%5 = tail call i32 (...) @getch()
ret i32 0
}