#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 hoppingRateMillerAbraham(double Energy, double SiteDistance,
                                double alpha, double KT) {
  if (Energy < 0) {
    return exp(-SiteDistance * alpha * 2);
  } else {
    return exp(-SiteDistance * alpha * 2) * exp(-Energy / KT);
    ;
  }
}


x86 assembly (clang, -O0):
<hoppingRateMillerAbraham>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1176 <hoppingRateMillerAbraham+0x66>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xe9d(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    11e4 <hoppingRateMillerAbraham+0xd4>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xe61(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x28(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hoppingRateMillerAbraham>:
sub    $0x18,%rsp
movsd  %xmm3,0x10(%rsp)
movaps %xmm0,(%rsp)
xorpd  0xeda(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm1
movapd %xmm1,%xmm0
call   1030 <exp@plt>
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
movapd (%rsp),%xmm2
ucomisd %xmm2,%xmm0
ja     116f <hoppingRateMillerAbraham+0x5f>
movapd %xmm2,%xmm0
xorpd  0xeaa(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
movsd  %xmm1,(%rsp)
call   1030 <exp@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @hoppingRateMillerAbraham(double %0, double %1, double %2, double %3) {
%5 = fcmp olt double %0, 0.000000e+00
%6 = fneg double %1
%7 = fmul double %6, %2
%8 = fmul double %7, 2.000000e+00
%9 = tail call double @exp(double %8)
br i1 %5, label %15, label %10
10: ; preds = %4
%11 = fneg double %0
%12 = fdiv double %11, %3
%13 = tail call double @exp(double %12)
%14 = fmul double %9, %13
br label %15
15: ; preds = %4, %10
%16 = phi double [ %14, %10 ], [ %9, %4 ]
ret double %16
}