#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(int);
int fabs(double const);
double HHK_alpha1(const double v) {
  double t0 = 0.0;
  if (fabs(v - 10) < 1e-2) {
    double p = v - 10;
    t0 = 5.0E-2 * (1 + 0.1 * v);
    p *= p;
    t0 += 8.333333333333333E-5 * p;
    p *= p;
    t0 -= 1.388888888888889E-8 * p;
  } else
    t0 = 0.01 * (10 - v) / (exp(1 - 0.1 * v) - 1.0);
  return t0;
}


x86 assembly (clang, -O0):
<HHK_alpha1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xea9(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1206 <HHK_alpha1+0xe6>
movsd  -0x8(%rbp),%xmm0
movsd  0xe9a(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xeb4(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe80(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe94(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xe62(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xe2c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1267 <HHK_alpha1+0x147>
movsd  0xdfa(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
movsd  0xde5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xde7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdd3(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xdb6(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HHK_alpha1>:
sub    $0x18,%rsp
movsd  0xed4(%rip),%xmm1
movsd  %xmm0,0x10(%rsp)
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
call   1030 <fabs@plt>
test   %eax,%eax
jle    119d <HHK_alpha1+0x7d>
movsd  0xeb7(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
subsd  %xmm0,%xmm1
mulsd  0xead(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
mulsd  0xea7(%rip),%xmm0
addsd  0xea7(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <exp@plt>
addsd  0xe9e(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret
movsd  0x10(%rsp),%xmm1
mulsd  0xe85(%rip),%xmm1
addsd  0xe6d(%rip),%xmm1
mulsd  0xe7d(%rip),%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  0xe73(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm0
mulsd  0xe67(%rip),%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @HHK_alpha1(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %3
%5 = load double, double* %2
%6 = fsub double %5, 1.000000e+01
%7 = call i32 @fabs(double %6)
%8 = sitofp i32 %7 to double
%9 = fcmp olt double %8, 1.000000e-02
br i1 %9, label %10, label %28
10: ; preds = %1
%11 = load double, double* %2
%12 = fsub double %11, 1.000000e+01
store double %12, double* %4
%13 = load double, double* %2
%14 = call double @llvm.fmuladd.f64(double 1.000000e-01, double %13, double 1.000000e+00)
%15 = fmul double 5.000000e-02, %14
store double %15, double* %3
%16 = load double, double* %4
%17 = load double, double* %4
%18 = fmul double %17, %16
store double %18, double* %4
%19 = load double, double* %4
%20 = load double, double* %3
%21 = call double @llvm.fmuladd.f64(double 0x3F15D867C3ECE2A5, double %19, double %20)
store double %21, double* %3
%22 = load double, double* %4
%23 = load double, double* %4
%24 = fmul double %23, %22
store double %24, double* %4
%25 = load double, double* %4
%26 = load double, double* %3
%27 = call double @llvm.fmuladd.f64(double 0xBE4DD37F5698C2C3, double %25, double %26)
store double %27, double* %3
br label %38
28: ; preds = %1
%29 = load double, double* %2
%30 = fsub double 1.000000e+01, %29
%31 = fmul double 1.000000e-02, %30
%32 = load double, double* %2
%33 = call double @llvm.fmuladd.f64(double -1.000000e-01, double %32, double 1.000000e+00)
%34 = fptosi double %33 to i32
%35 = call double @exp(i32 %34)
%36 = fsub double %35, 1.000000e+00
%37 = fdiv double %31, %36
store double %37, double* %3
br label %38
38: ; preds = %28, %10
%39 = load double, double* %3
ret double %39
}

LLVM IR (-O2):
define double @HHK_alpha1(double %0) {
%2 = fadd double %0, -1.000000e+01
%3 = tail call i32 @fabs(double %2)
%4 = icmp slt i32 %3, 1
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = tail call double @llvm.fmuladd.f64(double %0, double 1.000000e-01, double 1.000000e+00)
%7 = fmul double %6, 5.000000e-02
%8 = fmul double %2, %2
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x3F15D867C3ECE2A5, double %7)
%10 = fmul double %8, %8
%11 = tail call double @llvm.fmuladd.f64(double %10, double 0xBE4DD37F5698C2C3, double %9)
br label %20
12: ; preds = %1
%13 = fsub double 1.000000e+01, %0
%14 = fmul double %13, 1.000000e-02
%15 = tail call double @llvm.fmuladd.f64(double %0, double -1.000000e-01, double 1.000000e+00)
%16 = fptosi double %15 to i32
%17 = tail call double @exp(i32 %16)
%18 = fadd double %17, -1.000000e+00
%19 = fdiv double %14, %18
br label %20
20: ; preds = %12, %5
%21 = phi double [ %11, %5 ], [ %19, %12 ]
ret double %21
}