#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 dcs_photonuclear_f2a_DRSS(double, double, double const, double const,
                                 double const);
double dcs_photonuclear_f2p_ALLM97(double const, double);
double dcs_photonuclear_shadowing_DRSS(double, double, double const);
double dcs_photonuclear_d2_DRSS(double Z, double A, double ml, double K,
                                double q, double Q2) {
  const double cf = 4 * 3.14159265358979323846 * 7.2973525693E-03 *
                    7.2973525693E-03 * 1.973269804E-16 * 1.973269804E-16;
  const double M = 0.5 * (0.938272 + 0.939565);
  const double E = K + ml;
  const double y = q / E;
  const double x = 0.5 * Q2 / (M * q);
  const double F2p = dcs_photonuclear_f2p_ALLM97(x, Q2);
  const double shadowing = dcs_photonuclear_shadowing_DRSS(Z, A, x);
  const double F2A = dcs_photonuclear_f2a_DRSS(Z, A, F2p, shadowing, x);
  const double R = 0.;
  const double dds =
      (1 - y +
       0.5 * (1 - 2 * ml * ml / Q2) * (y * y + Q2 / (E * E)) / (1 + R)) /
          (Q2 * Q2) -
      0.25 / (E * E * Q2);
  return cf * F2A * dds / q;
}


x86 assembly (clang, -O0):
<dcs_photonuclear_d2_DRSS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  0xe9f(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xeba(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe7f(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  0xe82(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
call   1040 <dcs_photonuclear_f2p_ALLM97@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
call   1050 <dcs_photonuclear_shadowing_DRSS@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm3
movsd  -0x58(%rbp),%xmm4
call   1030 <dcs_photonuclear_f2a_DRSS@plt>
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xdfc(%rip),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  0xdff(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  -0x30(%rbp),%xmm1
movsd  0xdd8(%rip),%xmm2
subsd  %xmm1,%xmm2
movsd  0xdd4(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm5
mulsd  -0x48(%rbp),%xmm5
divsd  %xmm5,%xmm3
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd97(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  -0x48(%rbp),%xmm2
mulsd  -0x30(%rbp),%xmm2
movsd  0xd62(%rip),%xmm1
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xd45(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcs_photonuclear_d2_DRSS>:
sub    $0x78,%rsp
movsd  %xmm2,0x20(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
addsd  %xmm2,%xmm3
movapd %xmm3,0x60(%rsp)
movsd  %xmm4,0x28(%rsp)
movapd %xmm4,%xmm0
divsd  %xmm3,%xmm0
movapd %xmm0,0x50(%rsp)
movapd %xmm5,%xmm1
movapd %xmm5,0x40(%rsp)
movapd %xmm5,%xmm0
mulsd  0xe86(%rip),%xmm0
movsd  0xe86(%rip),%xmm2
mulsd  %xmm4,%xmm2
divsd  %xmm2,%xmm0
movapd %xmm0,0x30(%rsp)
call   1040 <dcs_photonuclear_f2p_ALLM97@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movaps 0x30(%rsp),%xmm2
call   1050 <dcs_photonuclear_shadowing_DRSS@plt>
movaps %xmm0,%xmm3
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movaps 0x30(%rsp),%xmm4
call   1030 <dcs_photonuclear_f2a_DRSS@plt>
movsd  0xe38(%rip),%xmm1
movapd %xmm1,%xmm2
movapd 0x50(%rsp),%xmm4
subsd  %xmm4,%xmm2
movsd  0x20(%rsp),%xmm5
movapd %xmm5,%xmm3
addsd  %xmm5,%xmm3
mulsd  %xmm5,%xmm3
movapd 0x40(%rsp),%xmm6
divsd  %xmm6,%xmm3
subsd  %xmm3,%xmm1
mulsd  0xdf2(%rip),%xmm1
movapd 0x60(%rsp),%xmm5
mulsd  %xmm5,%xmm5
movapd %xmm6,%xmm3
divsd  %xmm5,%xmm3
mulsd  %xmm4,%xmm4
addsd  %xmm3,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm2,%xmm4
movapd %xmm6,%xmm2
movapd %xmm6,%xmm1
unpcklpd %xmm6,%xmm1
unpcklpd %xmm5,%xmm2
shufpd $0x2,0xdd7(%rip),%xmm4
mulpd  %xmm1,%xmm2
divpd  %xmm2,%xmm4
movapd %xmm4,%xmm1
unpckhpd %xmm4,%xmm1
subsd  %xmm1,%xmm4
mulsd  0xdb3(%rip),%xmm0
mulsd  %xmm4,%xmm0
divsd  0x28(%rsp),%xmm0
add    $0x78,%rsp
ret

LLVM IR (-O0):
define double @dcs_photonuclear_d2_DRSS(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%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* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
store double 0x38C15141CD9A8F5A, double* %13
store double 0x3FEE0B9ECF638002, double* %14
%23 = load double, double* %10
%24 = load double, double* %9
%25 = fadd double %23, %24
store double %25, double* %15
%26 = load double, double* %11
%27 = load double, double* %15
%28 = fdiv double %26, %27
store double %28, double* %16
%29 = load double, double* %12
%30 = fmul double 5.000000e-01, %29
%31 = load double, double* %11
%32 = fmul double 0x3FEE0B9ECF638002, %31
%33 = fdiv double %30, %32
store double %33, double* %17
%34 = load double, double* %17
%35 = load double, double* %12
%36 = call double @dcs_photonuclear_f2p_ALLM97(double %34, double %35)
store double %36, double* %18
%37 = load double, double* %7
%38 = load double, double* %8
%39 = load double, double* %17
%40 = call double @dcs_photonuclear_shadowing_DRSS(double %37, double %38, double %39)
store double %40, double* %19
%41 = load double, double* %7
%42 = load double, double* %8
%43 = load double, double* %18
%44 = load double, double* %19
%45 = load double, double* %17
%46 = call double @dcs_photonuclear_f2a_DRSS(double %41, double %42, double %43, double %44, double %45)
store double %46, double* %20
store double 0.000000e+00, double* %21
%47 = load double, double* %16
%48 = fsub double 1.000000e+00, %47
%49 = load double, double* %9
%50 = fmul double 2.000000e+00, %49
%51 = load double, double* %9
%52 = fmul double %50, %51
%53 = load double, double* %12
%54 = fdiv double %52, %53
%55 = fsub double 1.000000e+00, %54
%56 = fmul double 5.000000e-01, %55
%57 = load double, double* %16
%58 = load double, double* %16
%59 = load double, double* %12
%60 = load double, double* %15
%61 = load double, double* %15
%62 = fmul double %60, %61
%63 = fdiv double %59, %62
%64 = call double @llvm.fmuladd.f64(double %57, double %58, double %63)
%65 = fmul double %56, %64
%66 = fdiv double %65, 1.000000e+00
%67 = fadd double %48, %66
%68 = load double, double* %12
%69 = load double, double* %12
%70 = fmul double %68, %69
%71 = fdiv double %67, %70
%72 = load double, double* %15
%73 = load double, double* %15
%74 = fmul double %72, %73
%75 = load double, double* %12
%76 = fmul double %74, %75
%77 = fdiv double 2.500000e-01, %76
%78 = fsub double %71, %77
store double %78, double* %22
%79 = load double, double* %20
%80 = fmul double 0x38C15141CD9A8F5A, %79
%81 = load double, double* %22
%82 = fmul double %80, %81
%83 = load double, double* %11
%84 = fdiv double %82, %83
ret double %84
}

LLVM IR (-O2):
define double @dcs_photonuclear_d2_DRSS(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fadd double %2, %3
%8 = fdiv double %4, %7
%9 = fmul double %5, 5.000000e-01
%10 = fmul double %4, 0x3FEE0B9ECF638002
%11 = fdiv double %9, %10
%12 = tail call double @dcs_photonuclear_f2p_ALLM97(double %11, double %5)
%13 = tail call double @dcs_photonuclear_shadowing_DRSS(double %0, double %1, double %11)
%14 = tail call double @dcs_photonuclear_f2a_DRSS(double %0, double %1, double %12, double %13, double %11)
%15 = fsub double 1.000000e+00, %8
%16 = fmul double %2, 2.000000e+00
%17 = fmul double %16, %2
%18 = fdiv double %17, %5
%19 = fsub double 1.000000e+00, %18
%20 = fmul double %19, 5.000000e-01
%21 = fmul double %7, %7
%22 = fdiv double %5, %21
%23 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %22)
%24 = fmul double %23, %20
%25 = fadd double %15, %24
%26 = insertelement <2 x double> poison, double %5, i64 0
%27 = shufflevector <2 x double> %26, <2 x double> poison, <2 x i32> zeroinitializer
%28 = insertelement <2 x double> %26, double %21, i64 1
%29 = fmul <2 x double> %27, %28
%30 = insertelement <2 x double> <double poison, double 2.500000e-01>, double %25, i64 0
%31 = fdiv <2 x double> %30, %29
%32 = shufflevector <2 x double> %31, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%33 = fsub <2 x double> %31, %32
%34 = extractelement <2 x double> %33, i64 0
%35 = fmul double %14, 0x38C15141CD9A8F5A
%36 = fmul double %34, %35
%37 = fdiv double %36, %4
ret double %37
}