#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 data_nuclear_radius(double, double);
double const pow(double const, double);
double const sqrt(double const);
double dcs_bremsstrahlung_tsai_d2_cutoff(double Z, double A, double m, double K,
                                         double nu, double *mu0_p,
                                         double *muni_p) {
  const double E = K + m;
  const double tmp = 0.5 * m * nu / (E * (E - nu));
  const double mu0 = tmp * tmp;
  const double muc = sqrt(mu0) - mu0;
  double mumax = 0., muni = 0.;
  if (muc > 0) {
    const double RN = data_nuclear_radius(Z, A);
    const double tmp2 = m * RN / 1.973269804E-16;
    muni = tmp2 * tmp2 / 6.;
    mumax = mu0 * pow(mu0 * muni * 1E-05, -0.25) - mu0;
    if (muc < mumax)
      mumax = muc;
  }
  if (mu0_p != NULL)
    *mu0_p = mu0;
  if (muni_p != NULL)
    *muni_p = muni;
  return (mumax >= 0.) ? mumax : 0.;
}


x86 assembly (clang, -O0):
<dcs_bremsstrahlung_tsai_d2_cutoff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe8d(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
subsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1050 <sqrt@plt>
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    12a9 <dcs_bremsstrahlung_tsai_d2_cutoff+0x179>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <data_nuclear_radius@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  0xe1c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  0xdf9(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  0xdcc(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdb8(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm2
movsd  -0x80(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    12a4 <dcs_bremsstrahlung_tsai_d2_cutoff+0x174>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    12a9 <dcs_bremsstrahlung_tsai_d2_cutoff+0x179>
cmpq   $0x0,-0x30(%rbp)
je     12c1 <dcs_bremsstrahlung_tsai_d2_cutoff+0x191>
movsd  -0x50(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
cmpq   $0x0,-0x38(%rbp)
je     12d9 <dcs_bremsstrahlung_tsai_d2_cutoff+0x1a9>
movsd  -0x68(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     12fd <dcs_bremsstrahlung_tsai_d2_cutoff+0x1cd>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    130d <dcs_bremsstrahlung_tsai_d2_cutoff+0x1dd>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    130d <dcs_bremsstrahlung_tsai_d2_cutoff+0x1dd>
movsd  -0x88(%rbp),%xmm0
ff
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcs_bremsstrahlung_tsai_d2_cutoff>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movapd %xmm0,%xmm6
addsd  %xmm2,%xmm3
movsd  0xeb3(%rip),%xmm5
movsd  %xmm2,0x10(%rsp)
mulsd  %xmm2,%xmm5
mulsd  %xmm4,%xmm5
movapd %xmm3,%xmm0
subsd  %xmm4,%xmm0
mulsd  %xmm3,%xmm0
divsd  %xmm0,%xmm5
mulsd  %xmm5,%xmm5
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm5
movsd  %xmm5,0x18(%rsp)
jb     1188 <dcs_bremsstrahlung_tsai_d2_cutoff+0x58>
xorps  %xmm2,%xmm2
sqrtsd %xmm5,%xmm2
jmp    11b7 <dcs_bremsstrahlung_tsai_d2_cutoff+0x87>
movapd %xmm5,%xmm0
movsd  %xmm1,0x8(%rsp)
movsd  %xmm6,0x20(%rsp)
call   1050 <sqrt@plt>
movsd  0x20(%rsp),%xmm6
movsd  0x8(%rsp),%xmm1
movsd  0x18(%rsp),%xmm5
movapd %xmm0,%xmm2
xorpd  %xmm0,%xmm0
subsd  %xmm5,%xmm2
ucomisd %xmm0,%xmm2
xorpd  %xmm3,%xmm3
jbe    1235 <dcs_bremsstrahlung_tsai_d2_cutoff+0x105>
movapd %xmm6,%xmm0
movsd  %xmm2,0x8(%rsp)
call   1030 <data_nuclear_radius@plt>
movapd %xmm0,%xmm1
mulsd  0x10(%rsp),%xmm1
divsd  0xe22(%rip),%xmm1
mulsd  %xmm1,%xmm1
divsd  0xe1e(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0xe0e(%rip),%xmm0
movsd  0xe0e(%rip),%xmm1
call   1040 <pow@plt>
movsd  0x18(%rsp),%xmm5
mulsd  %xmm5,%xmm0
subsd  %xmm5,%xmm0
movsd  0x8(%rsp),%xmm3
minsd  %xmm0,%xmm3
movsd  0x10(%rsp),%xmm0
test   %rbx,%rbx
je     123e <dcs_bremsstrahlung_tsai_d2_cutoff+0x10e>
movsd  %xmm5,(%rbx)
test   %r14,%r14
je     1248 <dcs_bremsstrahlung_tsai_d2_cutoff+0x118>
movsd  %xmm0,(%r14)
xorpd  %xmm0,%xmm0
cmplesd %xmm3,%xmm0
andpd  %xmm3,%xmm0
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define double @dcs_bremsstrahlung_tsai_d2_cutoff(double %0, double %1, double %2, double %3, double %4, double* %5, double* %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double*
%14 = alloca double*
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double* %5, double** %13
store double* %6, double** %14
%23 = load double, double* %11
%24 = load double, double* %10
%25 = fadd double %23, %24
store double %25, double* %15
%26 = load double, double* %10
%27 = fmul double 5.000000e-01, %26
%28 = load double, double* %12
%29 = fmul double %27, %28
%30 = load double, double* %15
%31 = load double, double* %15
%32 = load double, double* %12
%33 = fsub double %31, %32
%34 = fmul double %30, %33
%35 = fdiv double %29, %34
store double %35, double* %16
%36 = load double, double* %16
%37 = load double, double* %16
%38 = fmul double %36, %37
store double %38, double* %17
%39 = load double, double* %17
%40 = call double @sqrt(double %39)
%41 = load double, double* %17
%42 = fsub double %40, %41
store double %42, double* %18
store double 0.000000e+00, double* %19
store double 0.000000e+00, double* %20
%43 = load double, double* %18
%44 = fcmp ogt double %43, 0.000000e+00
br i1 %44, label %45, label %72
45: ; preds = %7
%46 = load double, double* %8
%47 = load double, double* %9
%48 = call double @data_nuclear_radius(double %46, double %47)
store double %48, double* %21
%49 = load double, double* %10
%50 = load double, double* %21
%51 = fmul double %49, %50
%52 = fdiv double %51, 0x3CAC7014A3063882
store double %52, double* %22
%53 = load double, double* %22
%54 = load double, double* %22
%55 = fmul double %53, %54
%56 = fdiv double %55, 6.000000e+00
store double %56, double* %20
%57 = load double, double* %17
%58 = load double, double* %17
%59 = load double, double* %20
%60 = fmul double %58, %59
%61 = fmul double %60, 1.000000e-05
%62 = call double @pow(double %61, double -2.500000e-01)
%63 = load double, double* %17
%64 = fneg double %63
%65 = call double @llvm.fmuladd.f64(double %57, double %62, double %64)
store double %65, double* %19
%66 = load double, double* %18
%67 = load double, double* %19
%68 = fcmp olt double %66, %67
br i1 %68, label %69, label %71
69: ; preds = %45
%70 = load double, double* %18
store double %70, double* %19
br label %71
71: ; preds = %69, %45
br label %72
72: ; preds = %71, %7
%73 = load double*, double** %13
%74 = icmp ne double* %73, null
br i1 %74, label %75, label %78
75: ; preds = %72
%76 = load double, double* %17
%77 = load double*, double** %13
store double %76, double* %77
br label %78
78: ; preds = %75, %72
%79 = load double*, double** %14
%80 = icmp ne double* %79, null
br i1 %80, label %81, label %84
81: ; preds = %78
%82 = load double, double* %20
%83 = load double*, double** %14
store double %82, double* %83
br label %84
84: ; preds = %81, %78
%85 = load double, double* %19
%86 = fcmp oge double %85, 0.000000e+00
br i1 %86, label %87, label %89
87: ; preds = %84
%88 = load double, double* %19
br label %90
89: ; preds = %84
br label %90
90: ; preds = %89, %87
%91 = phi double [ %88, %87 ], [ 0.000000e+00, %89 ]
ret double %91
}

LLVM IR (-O2):
define double @dcs_bremsstrahlung_tsai_d2_cutoff(double %0, double %1, double %2, double %3, double %4, double* writeonly %5, double* writeonly %6) {
%8 = fadd double %2, %3
%9 = fmul double %2, 5.000000e-01
%10 = fmul double %9, %4
%11 = fsub double %8, %4
%12 = fmul double %8, %11
%13 = fdiv double %10, %12
%14 = fmul double %13, %13
%15 = tail call double @sqrt(double %14)
%16 = fsub double %15, %14
%17 = fcmp ogt double %16, 0.000000e+00
br i1 %17, label %18, label %31
18: ; preds = %7
%19 = tail call double @data_nuclear_radius(double %0, double %1)
%20 = fmul double %19, %2
%21 = fdiv double %20, 0x3CAC7014A3063882
%22 = fmul double %21, %21
%23 = fdiv double %22, 6.000000e+00
%24 = fmul double %14, %23
%25 = fmul double %24, 1.000000e-05
%26 = tail call double @pow(double %25, double -2.500000e-01)
%27 = fneg double %14
%28 = tail call double @llvm.fmuladd.f64(double %14, double %26, double %27)
%29 = fcmp olt double %16, %28
%30 = select i1 %29, double %16, double %28
br label %31
31: ; preds = %18, %7
%32 = phi double [ %23, %18 ], [ 0.000000e+00, %7 ]
%33 = phi double [ %30, %18 ], [ 0.000000e+00, %7 ]
%34 = icmp eq double* %5, null
br i1 %34, label %36, label %35
35: ; preds = %31
store double %14, double* %5
br label %36
36: ; preds = %35, %31
%37 = icmp eq double* %6, null
br i1 %37, label %39, label %38
38: ; preds = %36
store double %32, double* %6
br label %39
39: ; preds = %38, %36
%40 = fcmp oge double %33, 0.000000e+00
%41 = select i1 %40, double %33, double 0.000000e+00
ret double %41
}