#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 pearl_necklace_kernel(double, double, double, double, int const, double,
                             double, double);
double Iq(double q, double radius, double edge_sep, double thick_string,
          double fp_num_pearls, double sld, double string_sld,
          double solvent_sld) {
  const int num_pearls = (int)(fp_num_pearls + 0.5);
  const double form =
      pearl_necklace_kernel(q, radius, edge_sep, thick_string, num_pearls, sld,
                            string_sld, solvent_sld);
  return form;
}


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  %xmm7,-0x40(%rbp)
movsd  0xeb8(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x44(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
mov    -0x44(%rbp),%edi
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
call   1030 <pearl_necklace_kernel@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Iq>:
addsd  0xee8(%rip),%xmm4
cvttsd2si %xmm4,%edi
movaps %xmm5,%xmm4
movaps %xmm6,%xmm5
movaps %xmm7,%xmm6
jmp    1030 <pearl_necklace_kernel@plt>

LLVM IR (-O0):
define double @Iq(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 i32
%18 = 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
%19 = load double, double* %13
%20 = fadd double %19, 5.000000e-01
%21 = fptosi double %20 to i32
store i32 %21, i32* %17
%22 = load double, double* %9
%23 = load double, double* %10
%24 = load double, double* %11
%25 = load double, double* %12
%26 = load i32, i32* %17
%27 = load double, double* %14
%28 = load double, double* %15
%29 = load double, double* %16
%30 = call double @pearl_necklace_kernel(double %22, double %23, double %24, double %25, i32 %26, double %27, double %28, double %29)
store double %30, double* %18
%31 = load double, double* %18
ret double %31
}

LLVM IR (-O2):
define double @Iq(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = fadd double %4, 5.000000e-01
%10 = fptosi double %9 to i32
%11 = tail call double @pearl_necklace_kernel(double %0, double %1, double %2, double %3, i32 %10, double %5, double %6, double %7)
ret double %11
}