#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 fcc_Zq(double, double, double, double, double);
double const fcc_volume_fraction(double, double);
double sphere_form(double const, double, double, double);
double sqrt(double);
double Iqabc(double qa, double qb, double qc, double dnn, double d_factor,
             double radius, double sld, double solvent_sld) {
  const double q = sqrt(qa * qa + qb * qb + qc * qc);
  const double Pq = sphere_form(q, radius, sld, solvent_sld);
  const double Zq = fcc_Zq(qa, qb, qc, dnn, d_factor);
  return fcc_volume_fraction(radius, dnn) * Pq * Zq;
}


x86 assembly (clang, -O0):
<Iqabc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%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  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
call   1040 <sphere_form@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
call   1050 <fcc_Zq@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1030 <fcc_volume_fraction@plt>
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Iqabc>:
sub    $0x48,%rsp
movsd  %xmm5,0x20(%rsp)
movsd  %xmm4,0x10(%rsp)
movsd  %xmm3,0x18(%rsp)
movsd  %xmm1,0x38(%rsp)
movapd %xmm1,%xmm3
mulsd  %xmm1,%xmm3
movsd  %xmm0,0x30(%rsp)
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm3,%xmm1
movsd  %xmm2,0x40(%rsp)
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1198 <Iqabc+0x58>
sqrtsd %xmm0,%xmm0
jmp    11b5 <Iqabc+0x75>
movsd  %xmm7,0x8(%rsp)
movsd  %xmm6,0x28(%rsp)
call   1060 <sqrt@plt>
movsd  0x28(%rsp),%xmm6
movsd  0x8(%rsp),%xmm7
movsd  0x20(%rsp),%xmm1
movaps %xmm6,%xmm2
movaps %xmm7,%xmm3
call   1040 <sphere_form@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x30(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
movsd  0x40(%rsp),%xmm2
movsd  0x18(%rsp),%xmm3
movsd  0x10(%rsp),%xmm4
call   1050 <fcc_Zq@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
call   1030 <fcc_volume_fraction@plt>
mulsd  0x8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
add    $0x48,%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
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
%20 = load double, double* %9
%21 = load double, double* %9
%22 = load double, double* %10
%23 = load double, double* %10
%24 = fmul double %22, %23
%25 = call double @llvm.fmuladd.f64(double %20, double %21, double %24)
%26 = load double, double* %11
%27 = load double, double* %11
%28 = call double @llvm.fmuladd.f64(double %26, double %27, double %25)
%29 = call double @sqrt(double %28)
store double %29, double* %17
%30 = load double, double* %17
%31 = load double, double* %14
%32 = load double, double* %15
%33 = load double, double* %16
%34 = call double @sphere_form(double %30, double %31, double %32, double %33)
store double %34, double* %18
%35 = load double, double* %9
%36 = load double, double* %10
%37 = load double, double* %11
%38 = load double, double* %12
%39 = load double, double* %13
%40 = call double @fcc_Zq(double %35, double %36, double %37, double %38, double %39)
store double %40, double* %19
%41 = load double, double* %14
%42 = load double, double* %12
%43 = call double @fcc_volume_fraction(double %41, double %42)
%44 = load double, double* %18
%45 = fmul double %43, %44
%46 = load double, double* %19
%47 = fmul double %45, %46
ret double %47
}

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 %1, %1
%10 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %9)
%11 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %10)
%12 = tail call double @sqrt(double %11)
%13 = tail call double @sphere_form(double %12, double %5, double %6, double %7)
%14 = tail call double @fcc_Zq(double %0, double %1, double %2, double %3, double %4)
%15 = tail call double @fcc_volume_fraction(double %5, double %3)
%16 = fmul double %13, %15
%17 = fmul double %14, %16
ret double %17
}