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


x86 assembly (clang, -O0):
<HHNa_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    11fa <HHNa_alpha1+0xda>
movsd  -0x8(%rbp),%xmm0
movsd  0xe9a(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeb4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb0(%rip),%xmm1
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  0xe76(%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  0xe40(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1257 <HHNa_alpha1+0x137>
movsd  0xe06(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
movsd  0xe11(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xde8(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xdeb(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xdc6(%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):
<HHNa_alpha1>:
sub    $0x18,%rsp
movapd %xmm0,%xmm1
movsd  0xed0(%rip),%xmm0
movsd  %xmm1,0x8(%rsp)
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
call   1030 <fabs@plt>
test   %eax,%eax
jle    1195 <HHNa_alpha1+0x75>
movsd  0xeb7(%rip),%xmm0
subsd  0x8(%rsp),%xmm0
movsd  0xeb1(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
divsd  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  0x8(%rsp),%xmm2
mulsd  0xe85(%rip),%xmm2
addsd  0xe85(%rip),%xmm2
movsd  0x10(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  0xe7b(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm0
mulsd  0xe6f(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @HHNa_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, 2.500000e+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 %27
10: ; preds = %1
%11 = load double, double* %2
%12 = fsub double %11, 2.500000e+01
store double %12, double* %4
%13 = load double, double* %2
%14 = call double @llvm.fmuladd.f64(double %13, double 5.000000e-02, double -2.500000e-01)
store double %14, double* %3
%15 = load double, double* %4
%16 = load double, double* %4
%17 = fmul double %16, %15
store double %17, double* %4
%18 = load double, double* %4
%19 = load double, double* %3
%20 = call double @llvm.fmuladd.f64(double 0x3F4B4E81B4E81B4E, double %18, double %19)
store double %20, double* %3
%21 = load double, double* %4
%22 = load double, double* %4
%23 = fmul double %22, %21
store double %23, double* %4
%24 = load double, double* %4
%25 = load double, double* %3
%26 = call double @llvm.fmuladd.f64(double 0xBE82A42F961F79BA, double %24, double %25)
store double %26, double* %3
br label %38
27: ; preds = %1
%28 = load double, double* %2
%29 = fsub double 2.500000e+01, %28
%30 = fmul double 1.000000e-01, %29
%31 = load double, double* %2
%32 = fsub double 2.500000e+01, %31
%33 = fdiv double %32, 1.000000e+01
%34 = fptosi double %33 to i32
%35 = call double @exp(i32 %34)
%36 = fsub double %35, 1.000000e+00
%37 = fdiv double %30, %36
store double %37, double* %3
br label %38
38: ; preds = %27, %10
%39 = load double, double* %3
ret double %39
}

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