#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 fabs(double);
double log(double);
double sqrt(double);
double charge_penetration_energy(double s_ij, double r_ij) {
  double ln_s;
  if (fabs(s_ij) < 1.0e-7)
    return 0.0;
  ln_s = log(fabs(s_ij));
  return -s_ij * s_ij / r_ij / sqrt(-2.0 * ln_s);
}


x86 assembly (clang, -O0):
<charge_penetration_energy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movaps 0xed2(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xeb6(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1161 <charge_penetration_energy+0x41>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11c9 <charge_penetration_energy+0xa9>
movsd  -0x10(%rbp),%xmm0
movaps 0xea3(%rip),%xmm1
pand   %xmm1,%xmm0
call   1030 <log@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe5a(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<charge_penetration_energy>:
sub    $0x28,%rsp
movapd %xmm0,%xmm4
movapd 0xed0(%rip),%xmm0
andpd  %xmm4,%xmm0
xorpd  %xmm2,%xmm2
movsd  0xee0(%rip),%xmm3
ucomisd %xmm0,%xmm3
ja     119c <charge_penetration_energy+0x7c>
movsd  %xmm1,(%rsp)
movapd %xmm4,0x10(%rsp)
call   1030 <log@plt>
movapd 0xeb2(%rip),%xmm2
movapd 0x10(%rsp),%xmm1
xorpd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
mulsd  0xeb4(%rip),%xmm0
divsd  (%rsp),%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1189 <charge_penetration_energy+0x69>
sqrtsd %xmm0,%xmm0
jmp    1198 <charge_penetration_energy+0x78>
movapd %xmm2,(%rsp)
call   1040 <sqrt@plt>
movapd (%rsp),%xmm2
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @charge_penetration_energy(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
%7 = load double, double* %4
%8 = call double @llvm.fabs.f64(double %7)
%9 = fcmp olt double %8, 0x3E7AD7F29ABCAF48
br i1 %9, label %10, label %11
10: ; preds = %2
store double 0.000000e+00, double* %3
br label %25
11: ; preds = %2
%12 = load double, double* %4
%13 = call double @llvm.fabs.f64(double %12)
%14 = call double @log(double %13)
store double %14, double* %6
%15 = load double, double* %4
%16 = fneg double %15
%17 = load double, double* %4
%18 = fmul double %16, %17
%19 = load double, double* %5
%20 = fdiv double %18, %19
%21 = load double, double* %6
%22 = fmul double -2.000000e+00, %21
%23 = call double @sqrt(double %22)
%24 = fdiv double %20, %23
store double %24, double* %3
br label %25
25: ; preds = %11, %10
%26 = load double, double* %3
ret double %26
}

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