#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 exp(double);
double const form_volume(double, double);
double sas_3j1x_x(double const);
double square(double);
void Fq(double q, double *F1, double *F2, double sld, double sld_solvent,
        double radius, double fuzziness) {
  const double qr = q * radius;
  const double bes = sas_3j1x_x(qr);
  const double qf = exp(-0.5 * square(q * fuzziness));
  const double contrast = (sld - sld_solvent);
  const double form = contrast * form_volume(radius, fuzziness) * bes * qf;
  *F1 = 1.0e-2 * form;
  *F2 = 1.0e-4 * form * form;
}


x86 assembly (clang, -O0):
<Fq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%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  %xmm4,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1060 <sas_3j1x_x@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1030 <square@plt>
movaps %xmm0,%xmm1
movsd  0xe6f(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
call   1050 <form_volume@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe0e(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xdf1(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fq>:
push   %r14
push   %rbx
sub    $0x38,%rsp
movsd  %xmm4,0x18(%rsp)
movsd  %xmm3,0x20(%rsp)
movsd  %xmm2,0x30(%rsp)
movsd  %xmm1,0x10(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
mulsd  %xmm3,%xmm0
call   1060 <sas_3j1x_x@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
call   1030 <square@plt>
mulsd  0xe6d(%rip),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
subsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
call   1050 <form_volume@plt>
mulsd  0x10(%rsp),%xmm0
mulsd  0x28(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  0xe2d(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx)
movsd  0xe25(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @Fq(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
%17 = alloca double
%18 = alloca double
%19 = 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
%20 = load double, double* %8
%21 = load double, double* %13
%22 = fmul double %20, %21
store double %22, double* %15
%23 = load double, double* %15
%24 = call double @sas_3j1x_x(double %23)
store double %24, double* %16
%25 = load double, double* %8
%26 = load double, double* %14
%27 = fmul double %25, %26
%28 = call double @square(double %27)
%29 = fmul double -5.000000e-01, %28
%30 = call double @exp(double %29)
store double %30, double* %17
%31 = load double, double* %11
%32 = load double, double* %12
%33 = fsub double %31, %32
store double %33, double* %18
%34 = load double, double* %18
%35 = load double, double* %13
%36 = load double, double* %14
%37 = call double @form_volume(double %35, double %36)
%38 = fmul double %34, %37
%39 = load double, double* %16
%40 = fmul double %38, %39
%41 = load double, double* %17
%42 = fmul double %40, %41
store double %42, double* %19
%43 = load double, double* %19
%44 = fmul double 1.000000e-02, %43
%45 = load double*, double** %9
store double %44, double* %45
%46 = load double, double* %19
%47 = fmul double 1.000000e-04, %46
%48 = load double, double* %19
%49 = fmul double %47, %48
%50 = load double*, double** %10
store double %49, double* %50
ret void
}

LLVM IR (-O2):
define void @Fq(double %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double %3, double %4, double %5, double %6) {
%8 = fmul double %0, %5
%9 = tail call double @sas_3j1x_x(double %8)
%10 = fmul double %0, %6
%11 = tail call double @square(double %10)
%12 = fmul double %11, -5.000000e-01
%13 = tail call double @exp(double %12)
%14 = fsub double %3, %4
%15 = tail call double @form_volume(double %5, double %6)
%16 = fmul double %14, %15
%17 = fmul double %9, %16
%18 = fmul double %13, %17
%19 = fmul double %18, 1.000000e-02
store double %19, double* %1
%20 = fmul double %18, 1.000000e-04
%21 = fmul double %18, %20
store double %21, double* %2
ret void
}