#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 M_PI;
double M_PI_2;
scalar_t__ cos(int);
double cosh(double);
double sinh(double);
double sqrt(scalar_t__);
double ftrans(double y) {
  double x = M_PI_2 * sinh(y);
  double c = cosh(x);
  return (sqrt(cos(3 * x) + cosh(M_PI)) / c) / c;
}


x86 assembly (clang, -O0):
<ftrans>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2e8c(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sinh@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cosh@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xe71(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    0x2e3a(%rip),%rax
movsd  (%rax),%xmm0
call   1040 <cosh@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1060 <sqrt@plt>
divsd  -0x18(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftrans>:
sub    $0x18,%rsp
mov    0x2e95(%rip),%rax
movsd  (%rax),%xmm1
movsd  %xmm1,0x10(%rsp)
call   1030 <sinh@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1040 <cosh@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0xe81(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    0x2e4b(%rip),%rax
movsd  (%rax),%xmm0
call   1040 <cosh@plt>
addsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%rdi
call   1060 <sqrt@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm1,%xmm0
divsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@M_PI_2 = global double 0.000000e+00
@M_PI = global double 0.000000e+00
define double @ftrans(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* @M_PI_2
%6 = load double, double* %2
%7 = call double @sinh(double %6)
%8 = fmul double %5, %7
store double %8, double* %3
%9 = load double, double* %3
%10 = call double @cosh(double %9)
store double %10, double* %4
%11 = load double, double* %3
%12 = fmul double 3.000000e+00, %11
%13 = fptosi double %12 to i32
%14 = call i64 @cos(i32 %13)
%15 = sitofp i64 %14 to double
%16 = load double, double* @M_PI
%17 = call double @cosh(double %16)
%18 = fadd double %15, %17
%19 = fptosi double %18 to i64
%20 = call double @sqrt(i64 %19)
%21 = load double, double* %4
%22 = fdiv double %20, %21
%23 = load double, double* %4
%24 = fdiv double %22, %23
ret double %24
}

LLVM IR (-O2):
@M_PI_2 = global double 0.000000e+00
@M_PI = global double 0.000000e+00
define double @ftrans(double %0) {
%2 = load double, double* @M_PI_2
%3 = tail call double @sinh(double %0)
%4 = fmul double %2, %3
%5 = tail call double @cosh(double %4)
%6 = fmul double %4, 3.000000e+00
%7 = fptosi double %6 to i32
%8 = tail call i64 @cos(i32 %7)
%9 = sitofp i64 %8 to double
%10 = load double, double* @M_PI
%11 = tail call double @cosh(double %10)
%12 = fadd double %11, %9
%13 = fptosi double %12 to i64
%14 = tail call double @sqrt(i64 %13)
%15 = fdiv double %14, %5
%16 = fdiv double %15, %5
ret double %16
}