#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 log(double);
double pow(double, double);
double sinh(int);
double log_gamma_windschitl(double x) {
  return 0.918938533204673 + (x - 0.5) * log(x) - x +
         0.5 * x * log(x * sinh(1 / x) + 1 / (810.0 * pow(x, 6.0)));
}


x86 assembly (clang, -O0):
<log_gamma_windschitl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xece(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xeaf(%rip),%xmm1
addsd  %xmm1,%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe91(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe5d(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sinh@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe4d(%rip),%xmm1
call   1050 <pow@plt>
movsd  -0x28(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xe2b(%rip),%xmm3
mulsd  %xmm1,%xmm3
movsd  0xe17(%rip),%xmm1
divsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <log@plt>
movsd  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_gamma_windschitl>:
sub    $0x28,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  0xebe(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
call   1040 <log@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0xea9(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe99(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0xe8f(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sinh@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0xe7c(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
call   1050 <pow@plt>
mulsd  0xe71(%rip),%xmm0
movsd  0xe59(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  %xmm1,%xmm0
call   1040 <log@plt>
mulsd  0x20(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @log_gamma_windschitl(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 5.000000e-01
%5 = load double, double* %2
%6 = call double @log(double %5)
%7 = call double @llvm.fmuladd.f64(double %4, double %6, double 0x3FED67F1C864BEB7)
%8 = load double, double* %2
%9 = fsub double %7, %8
%10 = load double, double* %2
%11 = fmul double 5.000000e-01, %10
%12 = load double, double* %2
%13 = load double, double* %2
%14 = fdiv double 1.000000e+00, %13
%15 = fptosi double %14 to i32
%16 = call double @sinh(i32 %15)
%17 = load double, double* %2
%18 = call double @pow(double %17, double 6.000000e+00)
%19 = fmul double 8.100000e+02, %18
%20 = fdiv double 1.000000e+00, %19
%21 = call double @llvm.fmuladd.f64(double %12, double %16, double %20)
%22 = call double @log(double %21)
%23 = call double @llvm.fmuladd.f64(double %11, double %22, double %9)
ret double %23
}

LLVM IR (-O2):
define double @log_gamma_windschitl(double %0) {
%2 = fadd double %0, -5.000000e-01
%3 = tail call double @log(double %0)
%4 = tail call double @llvm.fmuladd.f64(double %2, double %3, double 0x3FED67F1C864BEB7)
%5 = fsub double %4, %0
%6 = fmul double %0, 5.000000e-01
%7 = fdiv double 1.000000e+00, %0
%8 = fptosi double %7 to i32
%9 = tail call double @sinh(i32 %8)
%10 = tail call double @pow(double %0, double 6.000000e+00)
%11 = fmul double %10, 8.100000e+02
%12 = fdiv double 1.000000e+00, %11
%13 = tail call double @llvm.fmuladd.f64(double %0, double %9, double %12)
%14 = tail call double @log(double %13)
%15 = tail call double @llvm.fmuladd.f64(double %6, double %14, double %5)
ret double %15
}