#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 _cyl(double const, double const, double const);
double form_volume(double, double, double);
double Iqac(double qab, double qc, double core_sld, double shell_sld,
            double solvent_sld, double radius, double thickness,
            double length) {
  const double core_r = radius;
  const double core_h = 0.5 * length;
  const double core_vd =
      form_volume(radius, 0, length) * (core_sld - shell_sld);
  const double shell_r = (radius + thickness);
  const double shell_h = (0.5 * length + thickness);
  const double shell_vd =
      form_volume(radius, thickness, length) * (shell_sld - solvent_sld);
  const double fq = _cyl(core_vd, core_r * qab, core_h * qc) +
                    _cyl(shell_vd, shell_r * qab, shell_h * qc);
  return 1.0e-4 * fq * fq;
}


x86 assembly (clang, -O0):
<Iqac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%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
movsd  %xmm0,-0x48(%rbp)
movsd  0xea3(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
xorps  %xmm1,%xmm1
call   1040 <form_volume@plt>
movsd  -0x18(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  0xe53(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
call   1040 <form_volume@plt>
movsd  -0x20(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
mulsd  -0x10(%rbp),%xmm2
call   1030 <_cyl@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
mulsd  -0x10(%rbp),%xmm2
call   1030 <_cyl@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xdbd(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Iqac>:
sub    $0x58,%rsp
movsd  %xmm6,0x40(%rsp)
movsd  %xmm5,0x18(%rsp)
movsd  %xmm4,0x50(%rsp)
movsd  %xmm3,0x8(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x28(%rsp)
movsd  %xmm0,0x20(%rsp)
movsd  0xeaa(%rip),%xmm0
movapd %xmm7,%xmm2
movsd  %xmm7,0x30(%rsp)
mulsd  %xmm7,%xmm0
movsd  %xmm0,(%rsp)
xorps  %xmm1,%xmm1
movapd %xmm5,%xmm0
call   1040 <form_volume@plt>
movsd  0x10(%rsp),%xmm1
subsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  0x18(%rsp),%xmm0
movapd %xmm0,%xmm1
movsd  0x40(%rsp),%xmm2
addsd  %xmm2,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  (%rsp),%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,0x48(%rsp)
movapd %xmm2,%xmm1
movsd  0x30(%rsp),%xmm2
call   1040 <form_volume@plt>
movsd  0x8(%rsp),%xmm1
subsd  0x50(%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
movsd  (%rsp),%xmm2
mulsd  0x28(%rsp),%xmm2
movsd  0x38(%rsp),%xmm0
call   1030 <_cyl@plt>
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
movsd  0x48(%rsp),%xmm2
mulsd  0x28(%rsp),%xmm2
movsd  0x8(%rsp),%xmm0
call   1030 <_cyl@plt>
addsd  (%rsp),%xmm0
movsd  0xdd8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
add    $0x58,%rsp
ret

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

LLVM IR (-O2):
define double @Iqac(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = fmul double %7, 5.000000e-01
%10 = tail call double @form_volume(double %5, double 0.000000e+00, double %7)
%11 = fsub double %2, %3
%12 = fmul double %11, %10
%13 = fadd double %5, %6
%14 = tail call double @llvm.fmuladd.f64(double %7, double 5.000000e-01, double %6)
%15 = tail call double @form_volume(double %5, double %6, double %7)
%16 = fsub double %3, %4
%17 = fmul double %16, %15
%18 = fmul double %0, %5
%19 = fmul double %9, %1
%20 = tail call double @_cyl(double %12, double %18, double %19)
%21 = fmul double %13, %0
%22 = fmul double %14, %1
%23 = tail call double @_cyl(double %17, double %21, double %22)
%24 = fadd double %20, %23
%25 = fmul double %24, 1.000000e-04
%26 = fmul double %24, %25
ret double %26
}