#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*/ error2(char *);
double log(double);
double sqrt(double);
double PDFlogt2(double x, double loc, double s) {
  double y = (log(x) - loc) / s, pdf;
  y = 2 + y * y;
  y *= y * y;
  if (y < 1E-300)
    error2("y==0");
  pdf = 1 / (sqrt(y) * x * s);
  return pdf;
}


x86 assembly (clang, -O0):
<PDFlogt2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <log@plt>
subsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe92(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe65(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    11b2 <PDFlogt2+0x82>
lea    0xe6b(%rip),%rdi
call   1030 <error2@plt>
movsd  -0x20(%rbp),%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xe3f(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PDFlogt2>:
sub    $0x18,%rsp
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x10(%rsp)
call   1040 <log@plt>
subsd  (%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
mulsd  %xmm0,%xmm0
addsd  0xe9f(%rip),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe93(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1191 <PDFlogt2+0x61>
lea    0xe96(%rip),%rdi
movsd  %xmm1,(%rsp)
call   1030 <error2@plt>
movsd  (%rsp),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     11a4 <PDFlogt2+0x74>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    11ad <PDFlogt2+0x7d>
movapd %xmm1,%xmm0
call   1050 <sqrt@plt>
mulsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  0xe4f(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"y==0\00"
define double @PDFlogt2(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %4
%10 = call double @log(double %9)
%11 = load double, double* %5
%12 = fsub double %10, %11
%13 = load double, double* %6
%14 = fdiv double %12, %13
store double %14, double* %7
%15 = load double, double* %7
%16 = load double, double* %7
%17 = call double @llvm.fmuladd.f64(double %15, double %16, double 2.000000e+00)
store double %17, double* %7
%18 = load double, double* %7
%19 = load double, double* %7
%20 = fmul double %18, %19
%21 = load double, double* %7
%22 = fmul double %21, %20
store double %22, double* %7
%23 = load double, double* %7
%24 = fcmp olt double %23, 1.000000e-300
br i1 %24, label %25, label %27
25: ; preds = %3
%26 = call i32 @error2(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %27
27: ; preds = %25, %3
%28 = load double, double* %7
%29 = call double @sqrt(double %28)
%30 = load double, double* %4
%31 = fmul double %29, %30
%32 = load double, double* %6
%33 = fmul double %31, %32
%34 = fdiv double 1.000000e+00, %33
store double %34, double* %8
%35 = load double, double* %8
ret double %35
}

LLVM IR (-O2):
@.str = [5 x i8] c"y==0\00"
define double @PDFlogt2(double %0, double %1, double %2) {
%4 = tail call double @log(double %0)
%5 = fsub double %4, %1
%6 = fdiv double %5, %2
%7 = tail call double @llvm.fmuladd.f64(double %6, double %6, double 2.000000e+00)
%8 = fmul double %7, %7
%9 = fmul double %7, %8
%10 = fcmp olt double %9, 1.000000e-300
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = tail call i32 @error2(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %3
%14 = tail call double @sqrt(double %9)
%15 = fmul double %14, %0
%16 = fmul double %15, %2
%17 = fdiv double 1.000000e+00, %16
ret double %17
}