#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*/ M_PI_4;
int /*<<< orphan*/ asinh(double);
int cosh(double);
double exp(double);
double pow(int /*<<< orphan*/, int /*<<< orphan*/);
double sqrt(int);
double ftrans(double x) {
  double val = pow(asinh(exp(x)), M_PI_4);
  return val / (exp(x) + exp(0.5 * x) * sqrt(2 * cosh(x)));
}


x86 assembly (clang, -O0):
<ftrans>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <exp@plt>
call   1070 <asinh@plt>
mov    %eax,%edi
mov    0x2e73(%rip),%rax
mov    (%rax),%esi
call   1050 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  0xe5e(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <cosh@plt>
mov    %eax,%edi
shl    $0x1,%edi
call   1060 <sqrt@plt>
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftrans>:
sub    $0x28,%rsp
movsd  %xmm0,0x8(%rsp)
call   1040 <exp@plt>
call   1070 <asinh@plt>
mov    0x2e7d(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1050 <pow@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0xe6d(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <cosh@plt>
lea    (%rax,%rax,1),%edi
call   1060 <sqrt@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
@M_PI_4 = global i32 0
define double @ftrans(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @exp(double %4)
%6 = call i32 @asinh(double %5)
%7 = load i32, i32* @M_PI_4
%8 = call double @pow(i32 %6, i32 %7)
store double %8, double* %3
%9 = load double, double* %3
%10 = load double, double* %2
%11 = call double @exp(double %10)
%12 = load double, double* %2
%13 = fmul double 5.000000e-01, %12
%14 = call double @exp(double %13)
%15 = load double, double* %2
%16 = call i32 @cosh(double %15)
%17 = mul nsw i32 2, %16
%18 = call double @sqrt(i32 %17)
%19 = call double @llvm.fmuladd.f64(double %14, double %18, double %11)
%20 = fdiv double %9, %19
ret double %20
}

LLVM IR (-O2):
@M_PI_4 = global i32 0
define double @ftrans(double %0) {
%2 = tail call double @exp(double %0)
%3 = tail call i32 @asinh(double %2)
%4 = load i32, i32* @M_PI_4
%5 = tail call double @pow(i32 %3, i32 %4)
%6 = tail call double @exp(double %0)
%7 = fmul double %0, 5.000000e-01
%8 = tail call double @exp(double %7)
%9 = tail call i32 @cosh(double %0)
%10 = shl nsw i32 %9, 1
%11 = tail call double @sqrt(i32 %10)
%12 = tail call double @llvm.fmuladd.f64(double %8, double %11, double %6)
%13 = fdiv double %5, %12
ret double %13
}