#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 pow(double, double const);
double dcs_photonuclear_f2a_BM(double Z, double A, double shadowing, double x,
                               double Q2) {
  Q2 *= 1E+06;
  const double a = 0.2513E+06;
  const double b = 0.6186E+06;
  const double c = 3.0292E+06;
  const double d = 1.4817E+06;
  const double intercept_pomeron = 0.0988;
  const double intercept_reggeon = 0.4056;
  const double tau = 1.8152;
  const double A_s = 0.12;
  const double B_up = 1.2437;
  const double B_down = 0.1853;
  const double n = 1.5 * (1. + Q2 / (Q2 + c));
  const double dl = intercept_pomeron * (1. + 2. * Q2 / (Q2 + d));
  double aux = A_s * pow(x, -dl) * pow(Q2 / (Q2 + a), 1. + dl);
  const double F_proton_singlet = aux * pow(1. - x, n + 4.);
  const double F_neutron_singlet = aux * pow(1. - x, n + tau);
  aux = pow(x, 1. - intercept_reggeon) * pow(1. - x, n) *
        pow(Q2 / (Q2 + b), intercept_reggeon);
  const double Up_valence = B_up * aux;
  const double Down_valence = B_down * aux * (1. - x);
  const double F_proton_non_singlet = Up_valence + Down_valence;
  const double F_neutron_non_singlet = Up_valence / 4. + Down_valence * 4.;
  const double structure_function_proton =
      F_proton_singlet + F_proton_non_singlet;
  const double structure_function_neutron =
      F_neutron_singlet + F_neutron_non_singlet;
  return shadowing *
         (Z * structure_function_proton + (A - Z) * structure_function_neutron);
}


x86 assembly (clang, -O0):
<dcs_photonuclear_f2a_BM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  0xf3c(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xef2(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xecd(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xf08(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xee3(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xece(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe91(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe9c(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe9f(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xe62(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xe4d(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe9b(%rip),%xmm1
addsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe22(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xe76(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xe5d(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  0xe48(%rip),%xmm1
addsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xde7(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xe23(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xddb(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  0xdba(%rip),%xmm1
addsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xd71(%rip),%xmm1
addsd  -0x88(%rbp),%xmm1
ff
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0xd35(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  0xd20(%rip),%xmm1
addsd  -0x80(%rbp),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0xcef(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  0xd12(%rip),%xmm1
addsd  -0x80(%rbp),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  0xcdc(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  0xc9f(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  0xc8c(%rip),%xmm1
addsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xc73(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xc47(%rip),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xc27(%rip),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  0xc0f(%rip),%xmm1
subsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm1
ff
movsd  0xbce(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
movsd  0xbba(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
addsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
addsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0xc8(%rbp),%xmm3
ff
movsd  -0x10(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
mulsd  -0xd0(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcs_photonuclear_f2a_BM>:
sub    $0x58,%rsp
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x50(%rsp)
movsd  %xmm1,0x48(%rsp)
movsd  %xmm0,0x40(%rsp)
mulsd  0xecc(%rip),%xmm4
movsd  %xmm4,0x30(%rsp)
movsd  0xec6(%rip),%xmm0
addsd  %xmm4,%xmm0
movapd %xmm4,%xmm1
divsd  %xmm0,%xmm1
movsd  0xeba(%rip),%xmm0
addsd  %xmm0,%xmm1
movapd %xmm0,%xmm2
mulsd  0xeb2(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
movapd %xmm4,%xmm5
addsd  %xmm4,%xmm5
movsd  0xea4(%rip),%xmm0
addsd  %xmm4,%xmm0
divsd  %xmm0,%xmm5
addsd  %xmm2,%xmm5
mulsd  0xe98(%rip),%xmm5
movapd %xmm5,0x20(%rsp)
movapd 0xee2(%rip),%xmm1
xorpd  %xmm5,%xmm1
movapd %xmm3,%xmm0
call   1030 <pow@plt>
mulsd  0xe7d(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe77(%rip),%xmm1
movsd  0x30(%rsp),%xmm0
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
movapd 0x20(%rsp),%xmm1
addsd  0xe33(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe1a(%rip),%xmm0
subsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x10(%rsp),%xmm1
addsd  0xe30(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  0xe1f(%rip),%xmm1
addsd  0x10(%rsp),%xmm1
movsd  0x20(%rsp),%xmm0
call   1030 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe02(%rip),%xmm1
movsd  0x18(%rsp),%xmm0
call   1030 <pow@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <pow@plt>
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xdd4(%rip),%xmm0
movsd  0x30(%rsp),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
movsd  0xdc2(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0xdb7(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xdb3(%rip),%xmm0
mulsd  0x20(%rsp),%xmm0
movapd %xmm1,%xmm2
addsd  %xmm0,%xmm2
addsd  0x38(%rsp),%xmm2
mulsd  0xd9f(%rip),%xmm1
mulsd  0xd5f(%rip),%xmm0
addsd  %xmm1,%xmm0
addsd  0x8(%rsp),%xmm0
movsd  0x40(%rsp),%xmm1
movsd  0x48(%rsp),%xmm3
subsd  %xmm1,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
mulsd  0x50(%rsp),%xmm0
add    $0x58,%rsp
ret

LLVM IR (-O0):
define double @dcs_photonuclear_f2a_BM(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%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
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%32 = load double, double* %10
%33 = fmul double %32, 1.000000e+06
store double %33, double* %10
store double 2.513000e+05, double* %11
store double 6.186000e+05, double* %12
store double 3.029200e+06, double* %13
store double 1.481700e+06, double* %14
store double 0x3FB94AF4F0D844D0, double* %15
store double 4.056000e-01, double* %16
store double 1.815200e+00, double* %17
store double 1.200000e-01, double* %18
store double 1.243700e+00, double* %19
store double 1.853000e-01, double* %20
%34 = load double, double* %10
%35 = load double, double* %10
%36 = fadd double %35, 3.029200e+06
%37 = fdiv double %34, %36
%38 = fadd double 1.000000e+00, %37
%39 = fmul double 1.500000e+00, %38
store double %39, double* %21
%40 = load double, double* %10
%41 = fmul double 2.000000e+00, %40
%42 = load double, double* %10
%43 = fadd double %42, 1.481700e+06
%44 = fdiv double %41, %43
%45 = fadd double 1.000000e+00, %44
%46 = fmul double 0x3FB94AF4F0D844D0, %45
store double %46, double* %22
%47 = load double, double* %9
%48 = load double, double* %22
%49 = fneg double %48
%50 = call double @pow(double %47, double %49)
%51 = fmul double 1.200000e-01, %50
%52 = load double, double* %10
%53 = load double, double* %10
%54 = fadd double %53, 2.513000e+05
%55 = fdiv double %52, %54
%56 = load double, double* %22
%57 = fadd double 1.000000e+00, %56
%58 = call double @pow(double %55, double %57)
%59 = fmul double %51, %58
store double %59, double* %23
%60 = load double, double* %23
%61 = load double, double* %9
%62 = fsub double 1.000000e+00, %61
%63 = load double, double* %21
%64 = fadd double %63, 4.000000e+00
%65 = call double @pow(double %62, double %64)
%66 = fmul double %60, %65
store double %66, double* %24
%67 = load double, double* %23
%68 = load double, double* %9
%69 = fsub double 1.000000e+00, %68
%70 = load double, double* %21
%71 = fadd double %70, 1.815200e+00
%72 = call double @pow(double %69, double %71)
%73 = fmul double %67, %72
store double %73, double* %25
%74 = load double, double* %9
%75 = call double @pow(double %74, double 5.944000e-01)
%76 = load double, double* %9
%77 = fsub double 1.000000e+00, %76
%78 = load double, double* %21
%79 = call double @pow(double %77, double %78)
%80 = fmul double %75, %79
%81 = load double, double* %10
%82 = load double, double* %10
%83 = fadd double %82, 6.186000e+05
%84 = fdiv double %81, %83
%85 = call double @pow(double %84, double 4.056000e-01)
%86 = fmul double %80, %85
store double %86, double* %23
%87 = load double, double* %23
%88 = fmul double 1.243700e+00, %87
store double %88, double* %26
%89 = load double, double* %23
%90 = fmul double 1.853000e-01, %89
%91 = load double, double* %9
%92 = fsub double 1.000000e+00, %91
%93 = fmul double %90, %92
store double %93, double* %27
%94 = load double, double* %26
%95 = load double, double* %27
%96 = fadd double %94, %95
store double %96, double* %28
%97 = load double, double* %26
%98 = fdiv double %97, 4.000000e+00
%99 = load double, double* %27
%100 = call double @llvm.fmuladd.f64(double %99, double 4.000000e+00, double %98)
store double %100, double* %29
%101 = load double, double* %24
%102 = load double, double* %28
%103 = fadd double %101, %102
store double %103, double* %30
%104 = load double, double* %25
%105 = load double, double* %29
%106 = fadd double %104, %105
store double %106, double* %31
%107 = load double, double* %8
%108 = load double, double* %6
%109 = load double, double* %30
%110 = load double, double* %7
%111 = load double, double* %6
%112 = fsub double %110, %111
%113 = load double, double* %31
%114 = fmul double %112, %113
%115 = call double @llvm.fmuladd.f64(double %108, double %109, double %114)
%116 = fmul double %107, %115
ret double %116
}

LLVM IR (-O2):
define double @dcs_photonuclear_f2a_BM(double %0, double %1, double %2, double %3, double %4) {
%6 = fmul double %4, 1.000000e+06
%7 = fadd double %6, 3.029200e+06
%8 = fdiv double %6, %7
%9 = fadd double %8, 1.000000e+00
%10 = fmul double %9, 1.500000e+00
%11 = fmul double %6, 2.000000e+00
%12 = fadd double %6, 1.481700e+06
%13 = fdiv double %11, %12
%14 = fadd double %13, 1.000000e+00
%15 = fmul double %14, 0x3FB94AF4F0D844D0
%16 = fneg double %15
%17 = tail call double @pow(double %3, double %16)
%18 = fmul double %17, 1.200000e-01
%19 = fadd double %6, 2.513000e+05
%20 = fdiv double %6, %19
%21 = fadd double %15, 1.000000e+00
%22 = tail call double @pow(double %20, double %21)
%23 = fmul double %18, %22
%24 = fsub double 1.000000e+00, %3
%25 = fadd double %10, 4.000000e+00
%26 = tail call double @pow(double %24, double %25)
%27 = fmul double %23, %26
%28 = fadd double %10, 1.815200e+00
%29 = tail call double @pow(double %24, double %28)
%30 = fmul double %23, %29
%31 = tail call double @pow(double %3, double 5.944000e-01)
%32 = tail call double @pow(double %24, double %10)
%33 = fmul double %31, %32
%34 = fadd double %6, 6.186000e+05
%35 = fdiv double %6, %34
%36 = tail call double @pow(double %35, double 4.056000e-01)
%37 = fmul double %33, %36
%38 = fmul double %37, 1.243700e+00
%39 = fmul double %37, 1.853000e-01
%40 = fmul double %24, %39
%41 = fadd double %38, %40
%42 = fmul double %38, 2.500000e-01
%43 = tail call double @llvm.fmuladd.f64(double %40, double 4.000000e+00, double %42)
%44 = fadd double %27, %41
%45 = fadd double %30, %43
%46 = fsub double %1, %0
%47 = fmul double %46, %45
%48 = tail call double @llvm.fmuladd.f64(double %0, double %44, double %47)
%49 = fmul double %48, %2
ret double %49
}