#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 _fq(double, double, double, double, double);
double shell_volume(double, double, double);
double square(double const);
double Iqac(double qab, double qc, double radius, double thickness,
            double length, double sld, double solvent_sld) {
  const double form = _fq(qab, qc, radius, thickness, length);
  const double s =
      (sld - solvent_sld) * shell_volume(radius, thickness, length);
  return 1.0e-4 * square(s * form);
}


x86 assembly (clang, -O0):
<Iqac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%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  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
call   1030 <_fq@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
call   1050 <shell_volume@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
call   1040 <square@plt>
movaps %xmm0,%xmm1
movsd  0xe34(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Iqac>:
sub    $0x38,%rsp
movsd  %xmm6,0x30(%rsp)
movsd  %xmm5,0x8(%rsp)
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x10(%rsp)
call   1030 <_fq@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x8(%rsp),%xmm0
subsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
call   1050 <shell_volume@plt>
mulsd  0x8(%rsp),%xmm0
mulsd  0x28(%rsp),%xmm0
call   1040 <square@plt>
mulsd  0xe61(%rip),%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @Iqac(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%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
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double %6, double* %14
%17 = load double, double* %8
%18 = load double, double* %9
%19 = load double, double* %10
%20 = load double, double* %11
%21 = load double, double* %12
%22 = call double @_fq(double %17, double %18, double %19, double %20, double %21)
store double %22, double* %15
%23 = load double, double* %13
%24 = load double, double* %14
%25 = fsub double %23, %24
%26 = load double, double* %10
%27 = load double, double* %11
%28 = load double, double* %12
%29 = call double @shell_volume(double %26, double %27, double %28)
%30 = fmul double %25, %29
store double %30, double* %16
%31 = load double, double* %16
%32 = load double, double* %15
%33 = fmul double %31, %32
%34 = call double @square(double %33)
%35 = fmul double 1.000000e-04, %34
ret double %35
}

LLVM IR (-O2):
define double @Iqac(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = tail call double @_fq(double %0, double %1, double %2, double %3, double %4)
%9 = fsub double %5, %6
%10 = tail call double @shell_volume(double %2, double %3, double %4)
%11 = fmul double %9, %10
%12 = fmul double %8, %11
%13 = tail call double @square(double %12)
%14 = fmul double %13, 1.000000e-04
ret double %14
}