#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 form_volume(double);
double fractal_sq(double, double, double, double);
double sas_3j1x_x(double);
double Iq(double q, double volfraction, double radius, double fractal_dim,
          double cor_length, double sld_block, double sld_solvent) {
  const double sq = fractal_sq(q, radius, fractal_dim, cor_length);
  const double fq =
      form_volume(radius) * (sld_block - sld_solvent) * sas_3j1x_x(q * radius);
  return 1.e-4 * volfraction * sq * fq * fq;
}


x86 assembly (clang, -O0):
<Iq>:
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  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
call   1040 <fractal_sq@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <form_volume@plt>
movsd  -0x30(%rbp),%xmm1
subsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1050 <sas_3j1x_x@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe42(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Iq>:
sub    $0x38,%rsp
movsd  %xmm6,0x8(%rsp)
movsd  %xmm5,0x20(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x30(%rsp)
movsd  %xmm0,0x18(%rsp)
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
movaps %xmm4,%xmm3
call   1040 <fractal_sq@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <form_volume@plt>
movsd  0x20(%rsp),%xmm1
subsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1050 <sas_3j1x_x@plt>
movsd  0x30(%rsp),%xmm1
mulsd  0xe5a(%rip),%xmm1
mulsd  0x8(%rsp),%xmm0
mulsd  0x28(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @Iq(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* %10
%19 = load double, double* %11
%20 = load double, double* %12
%21 = call double @fractal_sq(double %17, double %18, double %19, double %20)
store double %21, double* %15
%22 = load double, double* %10
%23 = call double @form_volume(double %22)
%24 = load double, double* %13
%25 = load double, double* %14
%26 = fsub double %24, %25
%27 = fmul double %23, %26
%28 = load double, double* %8
%29 = load double, double* %10
%30 = fmul double %28, %29
%31 = call double @sas_3j1x_x(double %30)
%32 = fmul double %27, %31
store double %32, double* %16
%33 = load double, double* %9
%34 = fmul double 1.000000e-04, %33
%35 = load double, double* %15
%36 = fmul double %34, %35
%37 = load double, double* %16
%38 = fmul double %36, %37
%39 = load double, double* %16
%40 = fmul double %38, %39
ret double %40
}

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