#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 sas_2J1x_x(double);
double sas_sinx_x(double);
double square(double);
double _fq(double qab, double qc, double radius, double thickness,
           double length) {
  const double lam1 = sas_2J1x_x((radius + thickness) * qab);
  const double lam2 = sas_2J1x_x(radius * qab);
  const double gamma_sq = square(radius / (radius + thickness));
  const double psi = (lam1 - gamma_sq * lam2) / (1.0 - gamma_sq);
  const double t2 = sas_sinx_x(0.5 * length * qc);
  return psi * t2;
}


x86 assembly (clang, -O0):
<_fq>:
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  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <sas_2J1x_x@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <sas_2J1x_x@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
addsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <square@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe37(%rip),%xmm1
subsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe19(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1050 <sas_sinx_x@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fq>:
sub    $0x38,%rsp
movsd  %xmm4,0x30(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x28(%rsp)
movapd %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
movapd %xmm3,%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x20(%rsp)
mulsd  %xmm1,%xmm0
call   1040 <sas_2J1x_x@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
call   1040 <sas_2J1x_x@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
divsd  0x20(%rsp),%xmm0
call   1030 <square@plt>
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x10(%rsp),%xmm2
subsd  %xmm1,%xmm2
movsd  0xe4f(%rip),%xmm1
subsd  %xmm0,%xmm1
divsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
movsd  0x30(%rsp),%xmm0
mulsd  0xe3b(%rip),%xmm0
mulsd  0x28(%rsp),%xmm0
call   1050 <sas_sinx_x@plt>
mulsd  0x10(%rsp),%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @_fq(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%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* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%16 = load double, double* %8
%17 = load double, double* %9
%18 = fadd double %16, %17
%19 = load double, double* %6
%20 = fmul double %18, %19
%21 = call double @sas_2J1x_x(double %20)
store double %21, double* %11
%22 = load double, double* %8
%23 = load double, double* %6
%24 = fmul double %22, %23
%25 = call double @sas_2J1x_x(double %24)
store double %25, double* %12
%26 = load double, double* %8
%27 = load double, double* %8
%28 = load double, double* %9
%29 = fadd double %27, %28
%30 = fdiv double %26, %29
%31 = call double @square(double %30)
store double %31, double* %13
%32 = load double, double* %11
%33 = load double, double* %13
%34 = load double, double* %12
%35 = fneg double %33
%36 = call double @llvm.fmuladd.f64(double %35, double %34, double %32)
%37 = load double, double* %13
%38 = fsub double 1.000000e+00, %37
%39 = fdiv double %36, %38
store double %39, double* %14
%40 = load double, double* %10
%41 = fmul double 5.000000e-01, %40
%42 = load double, double* %7
%43 = fmul double %41, %42
%44 = call double @sas_sinx_x(double %43)
store double %44, double* %15
%45 = load double, double* %14
%46 = load double, double* %15
%47 = fmul double %45, %46
ret double %47
}

LLVM IR (-O2):
define double @_fq(double %0, double %1, double %2, double %3, double %4) {
%6 = fadd double %2, %3
%7 = fmul double %6, %0
%8 = tail call double @sas_2J1x_x(double %7)
%9 = fmul double %0, %2
%10 = tail call double @sas_2J1x_x(double %9)
%11 = fdiv double %2, %6
%12 = tail call double @square(double %11)
%13 = fneg double %12
%14 = tail call double @llvm.fmuladd.f64(double %13, double %10, double %8)
%15 = fsub double 1.000000e+00, %12
%16 = fdiv double %14, %15
%17 = fmul double %4, 5.000000e-01
%18 = fmul double %17, %1
%19 = tail call double @sas_sinx_x(double %18)
%20 = fmul double %19, %16
ret double %20
}