#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 log(double);
double pow(int, int);
int sqrt(double);
double beta_tau_finestructure(double tau) {
  if (tau == 0.0e0)
    return 0.5e0;
  else if (tau > 0e0 && tau < 7e0)
    return (1.0e0 - exp(-2.34 * tau)) / (4.68 * tau);
  else
    return pow(4e0 * tau * sqrt(log(tau / sqrt(3.1415926536))), -1e0);
}


x86 assembly (clang, -O0):
<beta_tau_finestructure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1177 <beta_tau_finestructure+0x37>
jp     1177 <beta_tau_finestructure+0x37>
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1238 <beta_tau_finestructure+0xf8>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11d8 <beta_tau_finestructure+0x98>
movsd  0xe6f(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11d8 <beta_tau_finestructure+0x98>
movsd  0xe84(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe67(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xe53(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1238 <beta_tau_finestructure+0xf8>
movsd  0xe30(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe0c(%rip),%xmm0
call   1060 <sqrt@plt>
movsd  -0x20(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
call   1040 <log@plt>
call   1060 <sqrt@plt>
movsd  -0x18(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
mov    $0xffffffff,%esi
call   1050 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<beta_tau_finestructure>:
sub    $0x18,%rsp
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    1161 <beta_tau_finestructure+0x21>
jp     1161 <beta_tau_finestructure+0x21>
movsd  0xea4(%rip),%xmm0
add    $0x18,%rsp
ret
movsd  %xmm1,0x8(%rsp)
jbe    11af <beta_tau_finestructure+0x6f>
movsd  0xe97(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11af <beta_tau_finestructure+0x6f>
movsd  0xea1(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movapd %xmm0,%xmm1
movsd  0xe94(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0xe8a(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x18,%rsp
ret
movsd  0xe59(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xe4f(%rip),%xmm0
call   1060 <sqrt@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm0
divsd  %xmm1,%xmm0
call   1040 <log@plt>
call   1060 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%edi
mov    $0xffffffff,%esi
add    $0x18,%rsp
jmp    1050 <pow@plt>

LLVM IR (-O0):
define double @beta_tau_finestructure(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oeq double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 5.000000e-01, double* %2
br label %34
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp ogt double %8, 0.000000e+00
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = load double, double* %3
%12 = fcmp olt double %11, 7.000000e+00
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = load double, double* %3
%15 = fmul double -2.340000e+00, %14
%16 = call double @exp(double %15)
%17 = fsub double 1.000000e+00, %16
%18 = load double, double* %3
%19 = fmul double 4.680000e+00, %18
%20 = fdiv double %17, %19
store double %20, double* %2
br label %34
21: ; preds = %10, %7
%22 = load double, double* %3
%23 = fmul double 4.000000e+00, %22
%24 = load double, double* %3
%25 = call i32 @sqrt(double 0x400921FB544486E0)
%26 = sitofp i32 %25 to double
%27 = fdiv double %24, %26
%28 = call double @log(double %27)
%29 = call i32 @sqrt(double %28)
%30 = sitofp i32 %29 to double
%31 = fmul double %23, %30
%32 = fptosi double %31 to i32
%33 = call double @pow(i32 %32, i32 -1)
store double %33, double* %2
br label %34
34: ; preds = %21, %13, %6
%35 = load double, double* %2
ret double %35
}

LLVM IR (-O2):
define double @beta_tau_finestructure(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %24, label %3
3: ; preds = %1
%4 = fcmp ogt double %0, 0.000000e+00
%5 = fcmp olt double %0, 7.000000e+00
%6 = and i1 %4, %5
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = fmul double %0, -2.340000e+00
%9 = tail call double @exp(double %8)
%10 = fsub double 1.000000e+00, %9
%11 = fmul double %0, 4.680000e+00
%12 = fdiv double %10, %11
br label %24
13: ; preds = %3
%14 = fmul double %0, 4.000000e+00
%15 = tail call i32 @sqrt(double 0x400921FB544486E0)
%16 = sitofp i32 %15 to double
%17 = fdiv double %0, %16
%18 = tail call double @log(double %17)
%19 = tail call i32 @sqrt(double %18)
%20 = sitofp i32 %19 to double
%21 = fmul double %14, %20
%22 = fptosi double %21 to i32
%23 = tail call double @pow(i32 %22, i32 -1)
br label %24
24: ; preds = %1, %13, %7
%25 = phi double [ %12, %7 ], [ %23, %13 ], [ 5.000000e-01, %1 ]
ret double %25
}