#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 expm1(double);
double Sdebye(double qsq) {
  if (qsq < 1.0) {
    const double x = qsq;
    const double A1 = 1. / 15., A2 = 1. / 60, A3 = 0., A4 = 1. / 75600.;
    const double B1 = 2. / 5., B2 = 1. / 15., B3 = 1. / 180., B4 = 1. / 5040.;
    return ((((A4 * x + A3) * x + A2) * x + A1) * x + 1.) /
           ((((B4 * x + B3) * x + B2) * x + B1) * x + 1.);
  } else {
    return 2. * (expm1(-qsq) + qsq) / (qsq * qsq);
  }
}


x86 assembly (clang, -O0):
<Sdebye>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    125e <Sdebye+0x14e>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xed6(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xee1(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xed4(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe9f(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe9a(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe9d(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe88(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe8e(%rip),%xmm1
mulsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe6a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe3d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe10(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xe1f(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe1b(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xdf6(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xdd9(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xdb4(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    12a6 <Sdebye+0x196>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <expm1@plt>
movaps %xmm0,%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  0xd79(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sdebye>:
sub    $0x18,%rsp
movapd %xmm0,%xmm2
movsd  0xee0(%rip),%xmm0
ucomisd %xmm2,%xmm0
jbe    1174 <Sdebye+0x64>
unpcklpd %xmm2,%xmm2
xorpd  %xmm1,%xmm1
movhpd 0xed2(%rip),%xmm1
movapd 0xee2(%rip),%xmm0
mulpd  %xmm2,%xmm0
addpd  %xmm1,%xmm0
mulpd  %xmm2,%xmm0
addpd  0xede(%rip),%xmm0
mulpd  %xmm2,%xmm0
addpd  0xee2(%rip),%xmm0
mulpd  %xmm2,%xmm0
addpd  0xee6(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
jmp    119b <Sdebye+0x8b>
movapd 0xe94(%rip),%xmm0
xorpd  %xmm2,%xmm0
movapd %xmm2,(%rsp)
call   1030 <expm1@plt>
movapd (%rsp),%xmm1
addsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @Sdebye(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %3
%13 = load double, double* %3
%14 = fcmp olt double %13, 1.000000e+00
br i1 %14, label %15, label %34
15: ; preds = %1
%16 = load double, double* %3
store double %16, double* %4
store double 0x3FB1111111111111, double* %5
store double 0x3F91111111111111, double* %6
store double 0.000000e+00, double* %7
store double 0x3EEBBD779334EF0B, double* %8
store double 4.000000e-01, double* %9
store double 0x3FB1111111111111, double* %10
store double 0x3F76C16C16C16C17, double* %11
store double 0x3F2A01A01A01A01A, double* %12
%17 = load double, double* %4
%18 = call double @llvm.fmuladd.f64(double 0x3EEBBD779334EF0B, double %17, double 0.000000e+00)
%19 = load double, double* %4
%20 = call double @llvm.fmuladd.f64(double %18, double %19, double 0x3F91111111111111)
%21 = load double, double* %4
%22 = call double @llvm.fmuladd.f64(double %20, double %21, double 0x3FB1111111111111)
%23 = load double, double* %4
%24 = call double @llvm.fmuladd.f64(double %22, double %23, double 1.000000e+00)
%25 = load double, double* %4
%26 = call double @llvm.fmuladd.f64(double 0x3F2A01A01A01A01A, double %25, double 0x3F76C16C16C16C17)
%27 = load double, double* %4
%28 = call double @llvm.fmuladd.f64(double %26, double %27, double 0x3FB1111111111111)
%29 = load double, double* %4
%30 = call double @llvm.fmuladd.f64(double %28, double %29, double 4.000000e-01)
%31 = load double, double* %4
%32 = call double @llvm.fmuladd.f64(double %30, double %31, double 1.000000e+00)
%33 = fdiv double %24, %32
store double %33, double* %2
br label %45
34: ; preds = %1
%35 = load double, double* %3
%36 = fneg double %35
%37 = call double @expm1(double %36)
%38 = load double, double* %3
%39 = fadd double %37, %38
%40 = fmul double 2.000000e+00, %39
%41 = load double, double* %3
%42 = load double, double* %3
%43 = fmul double %41, %42
%44 = fdiv double %40, %43
store double %44, double* %2
br label %45
45: ; preds = %34, %15
%46 = load double, double* %2
ret double %46
}

LLVM IR (-O2):
define double @Sdebye(double %0) {
%2 = fcmp olt double %0, 1.000000e+00
br i1 %2, label %3, label %13
3: ; preds = %1
%4 = insertelement <2 x double> poison, double %0, i64 0
%5 = shufflevector <2 x double> %4, <2 x double> poison, <2 x i32> zeroinitializer
%6 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %5, <2 x double> <double 0x3EEBBD779334EF0B, double 0x3F2A01A01A01A01A>, <2 x double> <double 0.000000e+00, double 0x3F76C16C16C16C17>)
%7 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %6, <2 x double> %5, <2 x double> <double 0x3F91111111111111, double 0x3FB1111111111111>)
%8 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %7, <2 x double> %5, <2 x double> <double 0x3FB1111111111111, double 4.000000e-01>)
%9 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %8, <2 x double> %5, <2 x double> <double 1.000000e+00, double 1.000000e+00>)
%10 = extractelement <2 x double> %9, i64 0
%11 = extractelement <2 x double> %9, i64 1
%12 = fdiv double %10, %11
br label %20
13: ; preds = %1
%14 = fneg double %0
%15 = tail call double @expm1(double %14)
%16 = fadd double %15, %0
%17 = fmul double %16, 2.000000e+00
%18 = fmul double %0, %0
%19 = fdiv double %17, %18
br label %20
20: ; preds = %13, %3
%21 = phi double [ %12, %3 ], [ %19, %13 ]
ret double %21
}