#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 exp(double);
double log(double);
double hzd_ln_1min_e_negeX(double lnX) {
  if (lnX >= -2.25e0 && lnX <= 0.834e0)
    return log(1.0e0 - exp(-exp(lnX)));
  if (lnX < -35.351e0)
    return lnX;
  if (lnX > 5.159e0)
    return 0.0e0;
  return log(1.0e0 - exp(-exp(lnX)));
}


x86 assembly (clang, -O0):
<hzd_ln_1min_e_negeX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     119b <hzd_ln_1min_e_negeX+0x7b>
movsd  0xebc(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     119b <hzd_ln_1min_e_negeX+0x7b>
movsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe98(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1040 <log@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1220 <hzd_ln_1min_e_negeX+0x100>
movsd  0xe6d(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11bd <hzd_ln_1min_e_negeX+0x9d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1220 <hzd_ln_1min_e_negeX+0x100>
movsd  -0x10(%rbp),%xmm0
movsd  0xe4e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11e1 <hzd_ln_1min_e_negeX+0xc1>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1220 <hzd_ln_1min_e_negeX+0x100>
movsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe0e(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1040 <log@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hzd_ln_1min_e_negeX>:
push   %rax
ucomisd 0xed7(%rip),%xmm0
jb     1139 <hzd_ln_1min_e_negeX+0x19>
movsd  0xed5(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1161 <hzd_ln_1min_e_negeX+0x41>
movsd  0xecf(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    114d <hzd_ln_1min_e_negeX+0x2d>
movapd %xmm0,%xmm1
jmp    115b <hzd_ln_1min_e_negeX+0x3b>
xorpd  %xmm1,%xmm1
ucomisd 0xebf(%rip),%xmm0
jbe    1161 <hzd_ln_1min_e_negeX+0x41>
movapd %xmm1,%xmm0
pop    %rax
ret
call   1030 <exp@plt>
xorpd  0xec2(%rip),%xmm0
call   1030 <exp@plt>
movsd  0xea5(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
jmp    1040 <log@plt>

LLVM IR (-O0):
define double @hzd_ln_1min_e_negeX(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oge double %4, -2.250000e+00
br i1 %5, label %6, label %16
6: ; preds = %1
%7 = load double, double* %3
%8 = fcmp ole double %7, 8.340000e-01
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = load double, double* %3
%11 = call double @exp(double %10)
%12 = fneg double %11
%13 = call double @exp(double %12)
%14 = fsub double 1.000000e+00, %13
%15 = call double @log(double %14)
store double %15, double* %2
br label %32
16: ; preds = %6, %1
%17 = load double, double* %3
%18 = fcmp olt double %17, -3.535100e+01
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = load double, double* %3
store double %20, double* %2
br label %32
21: ; preds = %16
%22 = load double, double* %3
%23 = fcmp ogt double %22, 5.159000e+00
br i1 %23, label %24, label %25
24: ; preds = %21
store double 0.000000e+00, double* %2
br label %32
25: ; preds = %21
%26 = load double, double* %3
%27 = call double @exp(double %26)
%28 = fneg double %27
%29 = call double @exp(double %28)
%30 = fsub double 1.000000e+00, %29
%31 = call double @log(double %30)
store double %31, double* %2
br label %32
32: ; preds = %25, %24, %19, %9
%33 = load double, double* %2
ret double %33
}

LLVM IR (-O2):
define double @hzd_ln_1min_e_negeX(double %0) {
%2 = fcmp oge double %0, -2.250000e+00
%3 = fcmp ole double %0, 8.340000e-01
%4 = and i1 %2, %3
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = fcmp olt double %0, -3.535100e+01
br i1 %6, label %15, label %7
7: ; preds = %5
%8 = fcmp ogt double %0, 5.159000e+00
br i1 %8, label %15, label %9
9: ; preds = %7, %1
%10 = tail call double @exp(double %0)
%11 = fneg double %10
%12 = tail call double @exp(double %11)
%13 = fsub double 1.000000e+00, %12
%14 = tail call double @log(double %13)
br label %15
15: ; preds = %9, %7, %5
%16 = phi double [ %0, %5 ], [ 0.000000e+00, %7 ], [ %14, %9 ]
ret double %16
}