#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 const form_volume(double);
double sas_3j1x_x(double);
void Fq(double q, double *f1, double *f2, double sld, double sld_solvent,
        double radius) {
  const double bes = sas_3j1x_x(q * radius);
  const double contrast = (sld - sld_solvent);
  const double form = contrast * form_volume(radius) * bes;
  *f1 = 1.0e-2 * form;
  *f2 = 1.0e-4 * form * form;
}


x86 assembly (clang, -O0):
<Fq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1040 <sas_3j1x_x@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1030 <form_volume@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe6f(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xe52(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fq>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movsd  %xmm3,0x10(%rsp)
movsd  %xmm2,0x20(%rsp)
movsd  %xmm1,0x8(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
mulsd  %xmm3,%xmm0
call   1040 <sas_3j1x_x@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
subsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <form_volume@plt>
mulsd  0x8(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  0xe81(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx)
movsd  0xe79(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @Fq(double %0, double* %1, double* %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double*
%9 = alloca double*
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
store double %0, double* %7
store double* %1, double** %8
store double* %2, double** %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%16 = load double, double* %7
%17 = load double, double* %12
%18 = fmul double %16, %17
%19 = call double @sas_3j1x_x(double %18)
store double %19, double* %13
%20 = load double, double* %10
%21 = load double, double* %11
%22 = fsub double %20, %21
store double %22, double* %14
%23 = load double, double* %14
%24 = load double, double* %12
%25 = call double @form_volume(double %24)
%26 = fmul double %23, %25
%27 = load double, double* %13
%28 = fmul double %26, %27
store double %28, double* %15
%29 = load double, double* %15
%30 = fmul double 1.000000e-02, %29
%31 = load double*, double** %8
store double %30, double* %31
%32 = load double, double* %15
%33 = fmul double 1.000000e-04, %32
%34 = load double, double* %15
%35 = fmul double %33, %34
%36 = load double*, double** %9
store double %35, double* %36
ret void
}

LLVM IR (-O2):
define void @Fq(double %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double %3, double %4, double %5) {
%7 = fmul double %0, %5
%8 = tail call double @sas_3j1x_x(double %7)
%9 = fsub double %3, %4
%10 = tail call double @form_volume(double %5)
%11 = fmul double %9, %10
%12 = fmul double %8, %11
%13 = fmul double %12, 1.000000e-02
store double %13, double* %1
%14 = fmul double %12, 1.000000e-04
%15 = fmul double %12, %14
store double %15, double* %2
ret void
}