#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 */
int ff_dd_up(double);
double f_dd_fup2(double x) {
  if (x <= 2. && x >= -2.)
    return 36. / 13. *
           (ff_dd_up(0.25 * x - 0.5) - 2. * ff_dd_up(0.25 * x - 0.75) +
            2. * ff_dd_up(0.25 * x - 1.) - 2. * ff_dd_up(0.25 * x - 1.25));
  else
    return 0.;
}


x86 assembly (clang, -O0):
<f_dd_fup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     122b <f_dd_fup2+0x11b>
movsd  -0x10(%rbp),%xmm0
movsd  0xecb(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     122b <f_dd_fup2+0x11b>
movsd  -0x10(%rbp),%xmm0
movsd  0xec4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed8(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <ff_dd_up@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe99(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea5(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <ff_dd_up@plt>
movsd  -0x28(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe61(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe65(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <ff_dd_up@plt>
movsd  -0x20(%rbp),%xmm1
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe29(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe25(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <ff_dd_up@plt>
movsd  -0x18(%rbp),%xmm1
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm0
subsd  %xmm0,%xmm1
movsd  0xdf3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1233 <f_dd_fup2+0x123>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_dd_fup2>:
sub    $0x18,%rsp
movapd %xmm0,%xmm1
movsd  0xee0(%rip),%xmm0
ucomisd %xmm1,%xmm0
xorpd  %xmm0,%xmm0
jb     11f4 <f_dd_fup2+0xe4>
ucomisd 0xed2(%rip),%xmm1
jb     11f4 <f_dd_fup2+0xe4>
mulsd  0xecc(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0xec6(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1030 <ff_dd_up@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xeb0(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
call   1030 <ff_dd_up@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xe8a(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
call   1030 <ff_dd_up@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0xe62(%rip),%xmm0
call   1030 <ff_dd_up@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
mulsd  0xe44(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @f_dd_fup2(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ole double %4, 2.000000e+00
br i1 %5, label %6, label %30
6: ; preds = %1
%7 = load double, double* %3
%8 = fcmp oge double %7, -2.000000e+00
br i1 %8, label %9, label %30
9: ; preds = %6
%10 = load double, double* %3
%11 = call double @llvm.fmuladd.f64(double 2.500000e-01, double %10, double -5.000000e-01)
%12 = call i32 @ff_dd_up(double %11)
%13 = sitofp i32 %12 to double
%14 = load double, double* %3
%15 = call double @llvm.fmuladd.f64(double 2.500000e-01, double %14, double -7.500000e-01)
%16 = call i32 @ff_dd_up(double %15)
%17 = sitofp i32 %16 to double
%18 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %17, double %13)
%19 = load double, double* %3
%20 = call double @llvm.fmuladd.f64(double 2.500000e-01, double %19, double -1.000000e+00)
%21 = call i32 @ff_dd_up(double %20)
%22 = sitofp i32 %21 to double
%23 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %22, double %18)
%24 = load double, double* %3
%25 = call double @llvm.fmuladd.f64(double 2.500000e-01, double %24, double -1.250000e+00)
%26 = call i32 @ff_dd_up(double %25)
%27 = sitofp i32 %26 to double
%28 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %27, double %23)
%29 = fmul double 0x4006276276276276, %28
store double %29, double* %2
br label %31
30: ; preds = %6, %1
store double 0.000000e+00, double* %2
br label %31
31: ; preds = %30, %9
%32 = load double, double* %2
ret double %32
}

LLVM IR (-O2):
define double @f_dd_fup2(double %0) {
%2 = fcmp ole double %0, 2.000000e+00
%3 = fcmp oge double %0, -2.000000e+00
%4 = and i1 %2, %3
br i1 %4, label %5, label %22
5: ; preds = %1
%6 = tail call double @llvm.fmuladd.f64(double %0, double 2.500000e-01, double -5.000000e-01)
%7 = tail call i32 @ff_dd_up(double %6)
%8 = sitofp i32 %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %0, double 2.500000e-01, double -7.500000e-01)
%10 = tail call i32 @ff_dd_up(double %9)
%11 = sitofp i32 %10 to double
%12 = tail call double @llvm.fmuladd.f64(double %11, double -2.000000e+00, double %8)
%13 = tail call double @llvm.fmuladd.f64(double %0, double 2.500000e-01, double -1.000000e+00)
%14 = tail call i32 @ff_dd_up(double %13)
%15 = sitofp i32 %14 to double
%16 = tail call double @llvm.fmuladd.f64(double %15, double 2.000000e+00, double %12)
%17 = tail call double @llvm.fmuladd.f64(double %0, double 2.500000e-01, double -1.250000e+00)
%18 = tail call i32 @ff_dd_up(double %17)
%19 = sitofp i32 %18 to double
%20 = tail call double @llvm.fmuladd.f64(double %19, double -2.000000e+00, double %16)
%21 = fmul double %20, 0x4006276276276276
br label %22
22: ; preds = %1, %5
%23 = phi double [ %21, %5 ], [ 0.000000e+00, %1 ]
ret double %23
}