#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 sas_sinx_x(double);
double square(double const);
double Iqabc(double qa, double qb, double qc, double sld, double solvent_sld,
             double length_a, double b2a_ratio, double c2a_ratio,
             double thickness) {
  const double length_b = length_a * b2a_ratio;
  const double length_c = length_a * c2a_ratio;
  const double a_half = 0.5 * length_a;
  const double b_half = 0.5 * length_b;
  const double c_half = 0.5 * length_c;
  const double vol_total = length_a * length_b * length_c;
  const double vol_core =
      8.0 * (a_half - thickness) * (b_half - thickness) * (c_half - thickness);
  const double termA1 = sas_sinx_x(qa * a_half);
  const double termA2 = sas_sinx_x(qa * (a_half - thickness));
  const double termB1 = sas_sinx_x(qb * b_half);
  const double termB2 = sas_sinx_x(qb * (b_half - thickness));
  const double termC1 = sas_sinx_x(qc * c_half);
  const double termC2 = sas_sinx_x(qc * (c_half - thickness));
  const double AP1 = vol_total * termA1 * termB1 * termC1;
  const double AP2 = vol_core * termA2 * termB2 * termC2;
  const double delrho = sld - solvent_sld;
  return 1.0e-4 * square(delrho * (AP1 - AP2));
}


x86 assembly (clang, -O0):
<Iqabc>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movsd  0x10(%rbp),%xmm8
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  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe91(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe7f(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe6d(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm1
subsd  0x10(%rbp),%xmm1
movsd  0xe35(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x60(%rbp),%xmm1
subsd  0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
subsd  0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
call   1040 <sas_sinx_x@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
subsd  0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <sas_sinx_x@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
call   1040 <sas_sinx_x@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
subsd  0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <sas_sinx_x@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
call   1040 <sas_sinx_x@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
subsd  0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <sas_sinx_x@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
subsd  -0xb8(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
call   1030 <square@plt>
movaps %xmm0,%xmm1
movsd  0xce1(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Iqabc>:
sub    $0xb8,%rsp
movsd  %xmm4,0x68(%rsp)
movsd  %xmm3,0x60(%rsp)
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x10(%rsp)
movapd %xmm0,%xmm1
movsd  %xmm0,0x58(%rsp)
movsd  0xc0(%rsp),%xmm8
mulsd  %xmm5,%xmm7
movsd  0xea1(%rip),%xmm3
movapd %xmm5,%xmm0
mulsd  %xmm3,%xmm0
movapd %xmm0,%xmm4
subsd  %xmm8,%xmm4
movapd %xmm4,0x30(%rsp)
movapd %xmm5,%xmm2
unpcklpd %xmm4,%xmm2
shufpd $0x2,0xe89(%rip),%xmm6
mulpd  %xmm6,%xmm2
movapd %xmm2,%xmm4
mulsd  %xmm3,%xmm4
movapd %xmm4,0x20(%rsp)
mulsd  %xmm7,%xmm3
movsd  %xmm3,0x40(%rsp)
subsd  %xmm8,%xmm4
movapd %xmm4,0x70(%rsp)
unpcklpd %xmm4,%xmm5
mulpd  %xmm5,%xmm2
movapd %xmm3,%xmm4
subsd  %xmm8,%xmm4
movapd %xmm4,0x90(%rsp)
unpcklpd %xmm4,%xmm7
mulpd  %xmm7,%xmm2
movapd %xmm2,0xa0(%rsp)
mulsd  %xmm1,%xmm0
call   1040 <sas_sinx_x@plt>
movapd %xmm0,0x80(%rsp)
movapd 0x30(%rsp),%xmm0
mulsd  0x58(%rsp),%xmm0
call   1040 <sas_sinx_x@plt>
movapd %xmm0,0x30(%rsp)
movapd 0x20(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1040 <sas_sinx_x@plt>
movapd %xmm0,0x20(%rsp)
movapd 0x70(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1040 <sas_sinx_x@plt>
movapd %xmm0,0x10(%rsp)
movsd  0x40(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <sas_sinx_x@plt>
movapd %xmm0,0x40(%rsp)
movapd 0x90(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <sas_sinx_x@plt>
movapd 0x80(%rsp),%xmm1
unpcklpd 0x30(%rsp),%xmm1
mulpd  0xa0(%rsp),%xmm1
movapd 0x20(%rsp),%xmm2
unpcklpd 0x10(%rsp),%xmm2
mulpd  %xmm1,%xmm2
movapd 0x40(%rsp),%xmm3
unpcklpd %xmm0,%xmm3
mulpd  %xmm2,%xmm3
movsd  0x60(%rsp),%xmm1
subsd  0x68(%rsp),%xmm1
movapd %xmm3,%xmm0
unpckhpd %xmm3,%xmm0
subsd  %xmm0,%xmm3
mulsd  %xmm1,%xmm3
movapd %xmm3,%xmm0
call   1030 <square@plt>
mulsd  0xd4a(%rip),%xmm0
add    $0xb8,%rsp
ret

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

LLVM IR (-O2):
define double @Iqabc(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
%10 = fmul double %5, %7
%11 = fmul double %5, 5.000000e-01
%12 = fsub double %11, %8
%13 = insertelement <2 x double> poison, double %5, i64 0
%14 = insertelement <2 x double> %13, double %12, i64 1
%15 = insertelement <2 x double> <double poison, double 8.000000e+00>, double %6, i64 0
%16 = fmul <2 x double> %14, %15
%17 = extractelement <2 x double> %16, i64 0
%18 = fmul double %17, 5.000000e-01
%19 = fmul double %10, 5.000000e-01
%20 = fsub double %18, %8
%21 = insertelement <2 x double> %13, double %20, i64 1
%22 = fmul <2 x double> %16, %21
%23 = fsub double %19, %8
%24 = insertelement <2 x double> poison, double %10, i64 0
%25 = insertelement <2 x double> %24, double %23, i64 1
%26 = fmul <2 x double> %22, %25
%27 = fmul double %11, %0
%28 = tail call double @sas_sinx_x(double %27)
%29 = fmul double %12, %0
%30 = tail call double @sas_sinx_x(double %29)
%31 = fmul double %18, %1
%32 = tail call double @sas_sinx_x(double %31)
%33 = fmul double %20, %1
%34 = tail call double @sas_sinx_x(double %33)
%35 = fmul double %19, %2
%36 = tail call double @sas_sinx_x(double %35)
%37 = fmul double %23, %2
%38 = tail call double @sas_sinx_x(double %37)
%39 = insertelement <2 x double> poison, double %28, i64 0
%40 = insertelement <2 x double> %39, double %30, i64 1
%41 = fmul <2 x double> %26, %40
%42 = insertelement <2 x double> poison, double %32, i64 0
%43 = insertelement <2 x double> %42, double %34, i64 1
%44 = fmul <2 x double> %41, %43
%45 = insertelement <2 x double> poison, double %36, i64 0
%46 = insertelement <2 x double> %45, double %38, i64 1
%47 = fmul <2 x double> %44, %46
%48 = fsub double %3, %4
%49 = shufflevector <2 x double> %47, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%50 = fsub <2 x double> %47, %49
%51 = extractelement <2 x double> %50, i64 0
%52 = fmul double %48, %51
%53 = tail call double @square(double %52)
%54 = fmul double %53, 1.000000e-04
ret double %54
}