#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 stacked_disks_kernel(double, double, double, double, double, int, double,
                            double, double, double, double);
double Iqac(double qab, double qc, double thick_core, double thick_layer,
            double radius, double fp_n_stacking, double sigma_dnn,
            double core_sld, double layer_sld, double solvent_sld) {
  int n_stacking = (int)(fp_n_stacking + 0.5);
  double d = 2.0 * thick_layer + thick_core;
  double halfheight = 0.5 * thick_core;
  double answer =
      stacked_disks_kernel(qab, qc, halfheight, thick_layer, radius, n_stacking,
                           sigma_dnn, core_sld, layer_sld, solvent_sld, d);
  answer *= 1.0e-4;
  return answer;
}


x86 assembly (clang, -O0):
<Iqac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  0x18(%rbp),%xmm8
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  0xeb4(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x44(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe89(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
mov    -0x44(%rbp),%edi
movsd  -0x38(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
movsd  0x10(%rbp),%xmm7
movsd  0x18(%rbp),%xmm9
movsd  -0x50(%rbp),%xmm8
movsd  %xmm9,(%rsp)
movsd  %xmm8,0x8(%rsp)
call   1030 <stacked_disks_kernel@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  0xe21(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Iqac>:
sub    $0x18,%rsp
movaps %xmm7,%xmm8
movaps %xmm6,%xmm9
movsd  0x20(%rsp),%xmm7
movsd  0xed6(%rip),%xmm6
addsd  %xmm6,%xmm5
cvttsd2si %xmm5,%edi
movsd  0x28(%rsp),%xmm10
movapd %xmm3,%xmm5
addsd  %xmm3,%xmm5
addsd  %xmm2,%xmm5
mulsd  %xmm6,%xmm2
movsd  %xmm10,(%rsp)
movsd  %xmm5,0x8(%rsp)
movaps %xmm9,%xmm5
movaps %xmm8,%xmm6
call   1030 <stacked_disks_kernel@plt>
mulsd  0xe9e(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @Iqac(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9) {
%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 i32
%22 = alloca double
%23 = alloca double
%24 = alloca double
store double %0, double* %11
store double %1, double* %12
store double %2, double* %13
store double %3, double* %14
store double %4, double* %15
store double %5, double* %16
store double %6, double* %17
store double %7, double* %18
store double %8, double* %19
store double %9, double* %20
%25 = load double, double* %16
%26 = fadd double %25, 5.000000e-01
%27 = fptosi double %26 to i32
store i32 %27, i32* %21
%28 = load double, double* %14
%29 = load double, double* %13
%30 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %28, double %29)
store double %30, double* %22
%31 = load double, double* %13
%32 = fmul double 5.000000e-01, %31
store double %32, double* %23
%33 = load double, double* %11
%34 = load double, double* %12
%35 = load double, double* %23
%36 = load double, double* %14
%37 = load double, double* %15
%38 = load i32, i32* %21
%39 = load double, double* %17
%40 = load double, double* %18
%41 = load double, double* %19
%42 = load double, double* %20
%43 = load double, double* %22
%44 = call double @stacked_disks_kernel(double %33, double %34, double %35, double %36, double %37, i32 %38, double %39, double %40, double %41, double %42, double %43)
store double %44, double* %24
%45 = load double, double* %24
%46 = fmul double %45, 1.000000e-04
store double %46, double* %24
%47 = load double, double* %24
ret double %47
}

LLVM IR (-O2):
define double @Iqac(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9) {
%11 = fadd double %5, 5.000000e-01
%12 = fptosi double %11 to i32
%13 = tail call double @llvm.fmuladd.f64(double %3, double 2.000000e+00, double %2)
%14 = fmul double %2, 5.000000e-01
%15 = tail call double @stacked_disks_kernel(double %0, double %1, double %14, double %3, double %4, i32 %12, double %6, double %7, double %8, double %9, double %13)
%16 = fmul double %15, 1.000000e-04
ret double %16
}