#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 exp(double);
double transition_rate_from_energies(double from, double to, double num_from) {
  return (((1.) < (exp(-(to - from) / (1e-3 * 1.9872041 * (273.15 + 37)))))
              ? (1.)
              : (exp(-(to - from) / (1e-3 * 1.9872041 * (273.15 + 37))))) /
         num_from;
}


x86 assembly (clang, -O0):
<transition_rate_from_energies>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xeb8(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
cvtsi2sd %eax,%xmm0
movsd  0xe9b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1181 <transition_rate_from_energies+0x71>
movsd  0xe89(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    11bc <transition_rate_from_energies+0xac>
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe5e(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transition_rate_from_energies>:
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
subsd  %xmm0,%xmm1
divsd  0xeda(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
call   1030 <exp@plt>
cmp    $0x1,%eax
jle    1144 <transition_rate_from_energies+0x34>
movsd  0xec6(%rip),%xmm0
jmp    1156 <transition_rate_from_energies+0x46>
movsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @transition_rate_from_energies(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = load double, double* %4
%9 = fsub double %7, %8
%10 = fneg double %9
%11 = fdiv double %10, 0x3FE3B8FC86D5F2E9
%12 = call i32 @exp(double %11)
%13 = sitofp i32 %12 to double
%14 = fcmp olt double 1.000000e+00, %13
br i1 %14, label %15, label %16
15: ; preds = %3
br label %24
16: ; preds = %3
%17 = load double, double* %5
%18 = load double, double* %4
%19 = fsub double %17, %18
%20 = fneg double %19
%21 = fdiv double %20, 0x3FE3B8FC86D5F2E9
%22 = call i32 @exp(double %21)
%23 = sitofp i32 %22 to double
br label %24
24: ; preds = %16, %15
%25 = phi double [ 1.000000e+00, %15 ], [ %23, %16 ]
%26 = load double, double* %6
%27 = fdiv double %25, %26
ret double %27
}

LLVM IR (-O2):
define double @transition_rate_from_energies(double %0, double %1, double %2) {
%4 = fsub double %1, %0
%5 = fdiv double %4, 0xBFE3B8FC86D5F2E9
%6 = tail call i32 @exp(double %5)
%7 = icmp sgt i32 %6, 1
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = tail call i32 @exp(double %5)
%10 = sitofp i32 %9 to double
br label %11
11: ; preds = %3, %8
%12 = phi double [ %10, %8 ], [ 1.000000e+00, %3 ]
%13 = fdiv double %12, %2
ret double %13
}