#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 _f(double);
double difm3(double x, double h) {
  double f1, f2, f3;
  f1 = _f(x + h) - _f(x - h);
  f2 = _f(x + 2. * h) - _f(x - 2. * h);
  f3 = _f(x + 3. * h) - _f(x - 3. * h);
  return (0.75 * f1 - 0.15 * f2 + f3 / 60.) / h;
}


x86 assembly (clang, -O0):
<difm3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1030 <_f@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
call   1030 <_f@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
call   1030 <_f@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
call   1030 <_f@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xe74(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <_f@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xe48(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <_f@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe15(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xde9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xdcc(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
divsd  -0x10(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<difm3>:
sub    $0x28,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
addsd  %xmm1,%xmm0
call   1030 <_f@plt>
movsd  %xmm0,0x20(%rsp)
movsd  (%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
call   1030 <_f@plt>
movsd  0x20(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
addsd  (%rsp),%xmm0
call   1030 <_f@plt>
movsd  %xmm0,0x18(%rsp)
movsd  (%rsp),%xmm0
subsd  0x10(%rsp),%xmm0
call   1030 <_f@plt>
movsd  0x18(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0xe6a(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  (%rsp),%xmm0
call   1030 <_f@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xe54(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  (%rsp),%xmm0
call   1030 <_f@plt>
movsd  0x18(%rsp),%xmm1
mulsd  0xe3e(%rip),%xmm1
movsd  0x10(%rsp),%xmm2
subsd  %xmm0,%xmm2
movsd  0x20(%rsp),%xmm0
mulsd  0xe2e(%rip),%xmm0
addsd  %xmm1,%xmm0
divsd  0xe2a(%rip),%xmm2
addsd  %xmm0,%xmm2
divsd  0x8(%rsp),%xmm2
movapd %xmm2,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @difm3(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %3
store double %1, double* %4
%8 = load double, double* %3
%9 = load double, double* %4
%10 = fadd double %8, %9
%11 = call double @_f(double %10)
%12 = load double, double* %3
%13 = load double, double* %4
%14 = fsub double %12, %13
%15 = call double @_f(double %14)
%16 = fsub double %11, %15
store double %16, double* %5
%17 = load double, double* %3
%18 = load double, double* %4
%19 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %18, double %17)
%20 = call double @_f(double %19)
%21 = load double, double* %3
%22 = load double, double* %4
%23 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %22, double %21)
%24 = call double @_f(double %23)
%25 = fsub double %20, %24
store double %25, double* %6
%26 = load double, double* %3
%27 = load double, double* %4
%28 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %27, double %26)
%29 = call double @_f(double %28)
%30 = load double, double* %3
%31 = load double, double* %4
%32 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %31, double %30)
%33 = call double @_f(double %32)
%34 = fsub double %29, %33
store double %34, double* %7
%35 = load double, double* %5
%36 = load double, double* %6
%37 = fmul double 1.500000e-01, %36
%38 = fneg double %37
%39 = call double @llvm.fmuladd.f64(double 7.500000e-01, double %35, double %38)
%40 = load double, double* %7
%41 = fdiv double %40, 6.000000e+01
%42 = fadd double %39, %41
%43 = load double, double* %4
%44 = fdiv double %42, %43
ret double %44
}

LLVM IR (-O2):
define double @difm3(double %0, double %1) {
%3 = fadd double %0, %1
%4 = tail call double @_f(double %3)
%5 = fsub double %0, %1
%6 = tail call double @_f(double %5)
%7 = fsub double %4, %6
%8 = tail call double @llvm.fmuladd.f64(double %1, double 2.000000e+00, double %0)
%9 = tail call double @_f(double %8)
%10 = tail call double @llvm.fmuladd.f64(double %1, double -2.000000e+00, double %0)
%11 = tail call double @_f(double %10)
%12 = fsub double %9, %11
%13 = tail call double @llvm.fmuladd.f64(double %1, double 3.000000e+00, double %0)
%14 = tail call double @_f(double %13)
%15 = tail call double @llvm.fmuladd.f64(double %1, double -3.000000e+00, double %0)
%16 = tail call double @_f(double %15)
%17 = fsub double %14, %16
%18 = fmul double %12, -1.500000e-01
%19 = tail call double @llvm.fmuladd.f64(double %7, double 7.500000e-01, double %18)
%20 = fdiv double %17, 6.000000e+01
%21 = fadd double %19, %20
%22 = fdiv double %21, %1
ret double %22
}