#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) {
  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 termA = sas_sinx_x(qa * a_half);
  const double termB = sas_sinx_x(qb * b_half);
  const double termC = sas_sinx_x(qc * c_half);
  const double AP = termA * termB * termC;
  const double s = (sld - solvent_sld) * (length_a * length_b * length_c);
  return 1.0e-4 * square(s * AP);
}


x86 assembly (clang, -O0):
<Iqabc>:
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)
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  0xe8f(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe7d(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe6b(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
call   1040 <sas_sinx_x@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
call   1040 <sas_sinx_x@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
call   1040 <sas_sinx_x@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
call   1030 <square@plt>
movaps %xmm0,%xmm1
movsd  0xdc1(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Iqabc>:
sub    $0x58,%rsp
movsd  %xmm4,0x50(%rsp)
movsd  %xmm3,0x48(%rsp)
movsd  %xmm2,0x28(%rsp)
movsd  %xmm1,0x8(%rsp)
movapd %xmm5,%xmm1
movsd  %xmm5,0x40(%rsp)
mulsd  %xmm5,%xmm6
movsd  %xmm6,0x38(%rsp)
mulsd  %xmm5,%xmm7
movsd  %xmm7,0x30(%rsp)
movsd  0xe9e(%rip),%xmm2
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm6
movsd  %xmm6,0x10(%rsp)
mulsd  %xmm7,%xmm2
movsd  %xmm2,0x18(%rsp)
mulsd  %xmm1,%xmm0
call   1040 <sas_sinx_x@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <sas_sinx_x@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0x28(%rsp),%xmm0
call   1040 <sas_sinx_x@plt>
movsd  0x8(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x48(%rsp),%xmm2
subsd  0x50(%rsp),%xmm2
movsd  0x38(%rsp),%xmm1
mulsd  0x40(%rsp),%xmm1
mulsd  0x30(%rsp),%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <square@plt>
mulsd  0xe14(%rip),%xmm0
add    $0x58,%rsp
ret

LLVM IR (-O0):
define double @Iqabc(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%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
store double %0, double* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double %5, double* %14
store double %6, double* %15
store double %7, double* %16
%27 = load double, double* %14
%28 = load double, double* %15
%29 = fmul double %27, %28
store double %29, double* %17
%30 = load double, double* %14
%31 = load double, double* %16
%32 = fmul double %30, %31
store double %32, double* %18
%33 = load double, double* %14
%34 = fmul double 5.000000e-01, %33
store double %34, double* %19
%35 = load double, double* %17
%36 = fmul double 5.000000e-01, %35
store double %36, double* %20
%37 = load double, double* %18
%38 = fmul double 5.000000e-01, %37
store double %38, double* %21
%39 = load double, double* %9
%40 = load double, double* %19
%41 = fmul double %39, %40
%42 = call double @sas_sinx_x(double %41)
store double %42, double* %22
%43 = load double, double* %10
%44 = load double, double* %20
%45 = fmul double %43, %44
%46 = call double @sas_sinx_x(double %45)
store double %46, double* %23
%47 = load double, double* %11
%48 = load double, double* %21
%49 = fmul double %47, %48
%50 = call double @sas_sinx_x(double %49)
store double %50, double* %24
%51 = load double, double* %22
%52 = load double, double* %23
%53 = fmul double %51, %52
%54 = load double, double* %24
%55 = fmul double %53, %54
store double %55, double* %25
%56 = load double, double* %12
%57 = load double, double* %13
%58 = fsub double %56, %57
%59 = load double, double* %14
%60 = load double, double* %17
%61 = fmul double %59, %60
%62 = load double, double* %18
%63 = fmul double %61, %62
%64 = fmul double %58, %63
store double %64, double* %26
%65 = load double, double* %26
%66 = load double, double* %25
%67 = fmul double %65, %66
%68 = call double @square(double %67)
%69 = fmul double 1.000000e-04, %68
ret double %69
}

LLVM IR (-O2):
define double @Iqabc(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = fmul double %5, %6
%10 = fmul double %5, %7
%11 = fmul double %5, 5.000000e-01
%12 = fmul double %9, 5.000000e-01
%13 = fmul double %10, 5.000000e-01
%14 = fmul double %11, %0
%15 = tail call double @sas_sinx_x(double %14)
%16 = fmul double %12, %1
%17 = tail call double @sas_sinx_x(double %16)
%18 = fmul double %13, %2
%19 = tail call double @sas_sinx_x(double %18)
%20 = fmul double %15, %17
%21 = fmul double %20, %19
%22 = fsub double %3, %4
%23 = fmul double %9, %5
%24 = fmul double %23, %10
%25 = fmul double %22, %24
%26 = fmul double %25, %21
%27 = tail call double @square(double %26)
%28 = fmul double %27, 1.000000e-04
ret double %28
}