#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 core_shell_fq(double, double, double, double, double, double);
double fractal_sq(double, double const, double, double);
double Iq(double q, double radius, double thickness, double core_sld,
          double shell_sld, double solvent_sld, double volfraction,
          double fractal_dim, double cor_length) {
  const double cs_radius = radius + thickness;
  const double sq = fractal_sq(q, cs_radius, fractal_dim, cor_length);
  const double fq =
      core_shell_fq(q, radius, thickness, core_sld, shell_sld, solvent_sld);
  return 1.0e-4 * volfraction * sq * fq * fq;
}


x86 assembly (clang, -O0):
<Iq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
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  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movsd  0x10(%rbp),%xmm3
call   1040 <fractal_sq@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
movsd  -0x30(%rbp),%xmm5
call   1030 <core_shell_fq@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  0xe4d(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Iq>:
sub    $0x48,%rsp
movsd  %xmm6,0x40(%rsp)
movsd  %xmm5,0x38(%rsp)
movsd  %xmm4,0x30(%rsp)
movsd  %xmm3,0x28(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
movsd  0x50(%rsp),%xmm3
addsd  %xmm2,%xmm1
movaps %xmm7,%xmm2
call   1040 <fractal_sq@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x28(%rsp),%xmm3
movsd  0x30(%rsp),%xmm4
movsd  0x38(%rsp),%xmm5
call   1030 <core_shell_fq@plt>
movsd  0x40(%rsp),%xmm1
mulsd  0xe63(%rip),%xmm1
mulsd  0x20(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
add    $0x48,%rsp
ret

LLVM IR (-O0):
define double @Iq(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
%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
store double %0, double* %10
store double %1, double* %11
store double %2, double* %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store double %6, double* %16
store double %7, double* %17
store double %8, double* %18
%22 = load double, double* %11
%23 = load double, double* %12
%24 = fadd double %22, %23
store double %24, double* %19
%25 = load double, double* %10
%26 = load double, double* %19
%27 = load double, double* %17
%28 = load double, double* %18
%29 = call double @fractal_sq(double %25, double %26, double %27, double %28)
store double %29, double* %20
%30 = load double, double* %10
%31 = load double, double* %11
%32 = load double, double* %12
%33 = load double, double* %13
%34 = load double, double* %14
%35 = load double, double* %15
%36 = call double @core_shell_fq(double %30, double %31, double %32, double %33, double %34, double %35)
store double %36, double* %21
%37 = load double, double* %16
%38 = fmul double 1.000000e-04, %37
%39 = load double, double* %20
%40 = fmul double %38, %39
%41 = load double, double* %21
%42 = fmul double %40, %41
%43 = load double, double* %21
%44 = fmul double %42, %43
ret double %44
}

LLVM IR (-O2):
define double @Iq(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
%10 = fadd double %1, %2
%11 = tail call double @fractal_sq(double %0, double %10, double %7, double %8)
%12 = tail call double @core_shell_fq(double %0, double %1, double %2, double %3, double %4, double %5)
%13 = fmul double %6, 1.000000e-04
%14 = fmul double %13, %11
%15 = fmul double %14, %12
%16 = fmul double %12, %15
ret double %16
}