#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 */
long double f(long double, long double);
long double hamming(long double x, long double y[], double h) {
  long double f0, f1, f2, f3, f4;
  long double yp;
  f0 = f(x - 3.0 * h, y[0]);
  f1 = f(x - 2.0 * h, y[1]);
  f2 = f(x - 1.0 * h, y[2]);
  f3 = f(x, y[3]);
  yp = y[0] + ((4.0 * h) / 3.0) * (2.0 * f3 - f2 + 2.0 * f1);
  f4 = f(x + h, yp);
  yp = (1.0 / 8.0) * (9 * y[3] - y[1]) + ((3.0 * h) / 8.0) * (f4 + 2 * f3 - f2);
  return yp;
}


x86 assembly (clang, -O0):
<hamming>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
fldt   -0x10(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
movsd  %xmm1,-0xa8(%rbp)
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
fldl   -0x88(%rbp)
fsubrp %st,%st(1)
mov    -0x18(%rbp),%rax
fldt   (%rax)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <f@plt>
fstpt  -0x30(%rbp)
fldt   -0x10(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
fldl   -0x90(%rbp)
fsubrp %st,%st(1)
mov    -0x18(%rbp),%rax
fldt   0x10(%rax)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <f@plt>
fstpt  -0x40(%rbp)
fldt   -0x10(%rbp)
fldl   -0x20(%rbp)
fsubrp %st,%st(1)
mov    -0x18(%rbp),%rax
fldt   0x20(%rax)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <f@plt>
fstpt  -0x50(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rax
fldt   0x30(%rax)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <f@plt>
movsd  -0xa8(%rbp),%xmm1
ff
fstpt  -0x60(%rbp)
mov    -0x18(%rbp),%rax
fldt   (%rax)
movsd  -0x20(%rbp),%xmm0
movsd  0xe15(%rip),%xmm2
mulsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
fldl   -0x98(%rbp)
fldt   -0x60(%rbp)
fldt   -0x50(%rbp)
fxch   %st(1)
fadd   %st,%st(0)
fsubp  %st,%st(1)
fldt   -0x40(%rbp)
fadd   %st,%st(0)
faddp  %st,%st(1)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  -0x80(%rbp)
fldt   -0x10(%rbp)
fldl   -0x20(%rbp)
faddp  %st,%st(1)
fldt   -0x80(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <f@plt>
movsd  -0xa8(%rbp),%xmm1
ff
fstpt  -0x70(%rbp)
mov    -0x18(%rbp),%rax
fldt   0x30(%rax)
fldt   0x10(%rax)
flds   0xdc2(%rip)
fmulp  %st,%st(2)
fsubrp %st,%st(1)
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xda5(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
fldl   -0xa0(%rbp)
fldt   -0x70(%rbp)
fldt   -0x60(%rbp)
fadd   %st,%st(0)
faddp  %st,%st(1)
fldt   -0x50(%rbp)
fsubrp %st,%st(1)
fmulp  %st,%st(1)
flds   0xd88(%rip)
fmulp  %st,%st(2)
faddp  %st,%st(1)
fstpt  -0x80(%rbp)
fldt   -0x80(%rbp)
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hamming>:
push   %rbx
sub    $0x90,%rsp
movsd  %xmm0,0x20(%rsp)
mov    %rdi,%rbx
fldt   0xa0(%rsp)
fld    %st(0)
fstpt  0x30(%rsp)
movapd %xmm0,%xmm1
mulsd  0xec6(%rip),%xmm1
movsd  %xmm1,0x48(%rsp)
movsd  %xmm1,0x60(%rsp)
fsubl  0x60(%rsp)
fldt   (%rdi)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <f@plt>
fstp   %st(0)
movsd  0x20(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x68(%rsp)
fldt   0x30(%rsp)
fsubl  0x68(%rsp)
fldt   0x10(%rbx)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <f@plt>
fstpt  0x78(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x70(%rsp)
fldl   0x70(%rsp)
fld    %st(0)
fstpt  0x84(%rsp)
fldt   0x30(%rsp)
fsubp  %st,%st(1)
fldt   0x20(%rbx)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <f@plt>
fstpt  0x3c(%rsp)
fldt   0x30(%rbx)
fstpt  0x10(%rsp)
fldt   0x30(%rsp)
fstpt  (%rsp)
call   1030 <f@plt>
fldt   (%rbx)
movsd  0x20(%rsp),%xmm0
mulsd  0xe2e(%rip),%xmm0
divsd  0xe1e(%rip),%xmm0
movsd  %xmm0,0x58(%rsp)
fxch   %st(1)
fadd   %st,%st(0)
fld    %st(0)
fstpt  0x20(%rsp)
fldt   0x3c(%rsp)
fsubrp %st,%st(1)
fldt   0x78(%rsp)
fadd   %st,%st(0)
faddp  %st,%st(1)
fmull  0x58(%rsp)
faddp  %st,%st(1)
fldt   0x30(%rsp)
fldt   0x84(%rsp)
faddp  %st,%st(1)
fstpt  (%rsp)
fstpt  0x10(%rsp)
call   1030 <f@plt>
fldt   0x30(%rbx)
fmuls  0xdf0(%rip)
fldt   0x10(%rbx)
movsd  0x48(%rsp),%xmm0
mulsd  0xdd7(%rip),%xmm0
movsd  %xmm0,0x50(%rsp)
fldt   0x20(%rsp)
faddp  %st,%st(3)
fldt   0x3c(%rsp)
fsubrp %st,%st(3)
fxch   %st(2)
fmull  0x50(%rsp)
fxch   %st(1)
fsubp  %st,%st(2)
fxch   %st(1)
fmuls  0xdbf(%rip)
faddp  %st,%st(1)
add    $0x90,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define x86_fp80 @hamming(x86_fp80 %0, x86_fp80* %1, double %2) {
%4 = alloca x86_fp80
%5 = alloca x86_fp80*
%6 = alloca double
%7 = alloca x86_fp80
%8 = alloca x86_fp80
%9 = alloca x86_fp80
%10 = alloca x86_fp80
%11 = alloca x86_fp80
%12 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
store x86_fp80* %1, x86_fp80** %5
store double %2, double* %6
%13 = load x86_fp80, x86_fp80* %4
%14 = load double, double* %6
%15 = fmul double 3.000000e+00, %14
%16 = fpext double %15 to x86_fp80
%17 = fsub x86_fp80 %13, %16
%18 = load x86_fp80*, x86_fp80** %5
%19 = getelementptr inbounds x86_fp80, x86_fp80* %18, i64 0
%20 = load x86_fp80, x86_fp80* %19
%21 = call x86_fp80 @f(x86_fp80 %17, x86_fp80 %20)
store x86_fp80 %21, x86_fp80* %7
%22 = load x86_fp80, x86_fp80* %4
%23 = load double, double* %6
%24 = fmul double 2.000000e+00, %23
%25 = fpext double %24 to x86_fp80
%26 = fsub x86_fp80 %22, %25
%27 = load x86_fp80*, x86_fp80** %5
%28 = getelementptr inbounds x86_fp80, x86_fp80* %27, i64 1
%29 = load x86_fp80, x86_fp80* %28
%30 = call x86_fp80 @f(x86_fp80 %26, x86_fp80 %29)
store x86_fp80 %30, x86_fp80* %8
%31 = load x86_fp80, x86_fp80* %4
%32 = load double, double* %6
%33 = fmul double 1.000000e+00, %32
%34 = fpext double %33 to x86_fp80
%35 = fsub x86_fp80 %31, %34
%36 = load x86_fp80*, x86_fp80** %5
%37 = getelementptr inbounds x86_fp80, x86_fp80* %36, i64 2
%38 = load x86_fp80, x86_fp80* %37
%39 = call x86_fp80 @f(x86_fp80 %35, x86_fp80 %38)
store x86_fp80 %39, x86_fp80* %9
%40 = load x86_fp80, x86_fp80* %4
%41 = load x86_fp80*, x86_fp80** %5
%42 = getelementptr inbounds x86_fp80, x86_fp80* %41, i64 3
%43 = load x86_fp80, x86_fp80* %42
%44 = call x86_fp80 @f(x86_fp80 %40, x86_fp80 %43)
store x86_fp80 %44, x86_fp80* %10
%45 = load x86_fp80*, x86_fp80** %5
%46 = getelementptr inbounds x86_fp80, x86_fp80* %45, i64 0
%47 = load x86_fp80, x86_fp80* %46
%48 = load double, double* %6
%49 = fmul double 4.000000e+00, %48
%50 = fdiv double %49, 3.000000e+00
%51 = fpext double %50 to x86_fp80
%52 = load x86_fp80, x86_fp80* %10
%53 = load x86_fp80, x86_fp80* %9
%54 = fneg x86_fp80 %53
%55 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK40008000000000000000, x86_fp80 %52, x86_fp80 %54)
%56 = load x86_fp80, x86_fp80* %8
%57 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK40008000000000000000, x86_fp80 %56, x86_fp80 %55)
%58 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %51, x86_fp80 %57, x86_fp80 %47)
store x86_fp80 %58, x86_fp80* %12
%59 = load x86_fp80, x86_fp80* %4
%60 = load double, double* %6
%61 = fpext double %60 to x86_fp80
%62 = fadd x86_fp80 %59, %61
%63 = load x86_fp80, x86_fp80* %12
%64 = call x86_fp80 @f(x86_fp80 %62, x86_fp80 %63)
store x86_fp80 %64, x86_fp80* %11
%65 = load x86_fp80*, x86_fp80** %5
%66 = getelementptr inbounds x86_fp80, x86_fp80* %65, i64 3
%67 = load x86_fp80, x86_fp80* %66
%68 = load x86_fp80*, x86_fp80** %5
%69 = getelementptr inbounds x86_fp80, x86_fp80* %68, i64 1
%70 = load x86_fp80, x86_fp80* %69
%71 = fneg x86_fp80 %70
%72 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK40029000000000000000, x86_fp80 %67, x86_fp80 %71)
%73 = load double, double* %6
%74 = fmul double 3.000000e+00, %73
%75 = fdiv double %74, 8.000000e+00
%76 = fpext double %75 to x86_fp80
%77 = load x86_fp80, x86_fp80* %11
%78 = load x86_fp80, x86_fp80* %10
%79 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK40008000000000000000, x86_fp80 %78, x86_fp80 %77)
%80 = load x86_fp80, x86_fp80* %9
%81 = fsub x86_fp80 %79, %80
%82 = fmul x86_fp80 %76, %81
%83 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK3FFC8000000000000000, x86_fp80 %72, x86_fp80 %82)
store x86_fp80 %83, x86_fp80* %12
%84 = load x86_fp80, x86_fp80* %12
ret x86_fp80 %84
}

LLVM IR (-O2):
define x86_fp80 @hamming(x86_fp80 %0, x86_fp80* nocapture %1, double %2) {
%4 = fmul double %2, 3.000000e+00
%5 = fpext double %4 to x86_fp80
%6 = fsub x86_fp80 %0, %5
%7 = load x86_fp80, x86_fp80* %1
%8 = tail call x86_fp80 @f(x86_fp80 %6, x86_fp80 %7)
%9 = fmul double %2, 2.000000e+00
%10 = fpext double %9 to x86_fp80
%11 = fsub x86_fp80 %0, %10
%12 = getelementptr inbounds x86_fp80, x86_fp80* %1, i64 1
%13 = load x86_fp80, x86_fp80* %12
%14 = tail call x86_fp80 @f(x86_fp80 %11, x86_fp80 %13)
%15 = fpext double %2 to x86_fp80
%16 = fsub x86_fp80 %0, %15
%17 = getelementptr inbounds x86_fp80, x86_fp80* %1, i64 2
%18 = load x86_fp80, x86_fp80* %17
%19 = tail call x86_fp80 @f(x86_fp80 %16, x86_fp80 %18)
%20 = getelementptr inbounds x86_fp80, x86_fp80* %1, i64 3
%21 = load x86_fp80, x86_fp80* %20
%22 = tail call x86_fp80 @f(x86_fp80 %0, x86_fp80 %21)
%23 = load x86_fp80, x86_fp80* %1
%24 = fmul double %2, 4.000000e+00
%25 = fdiv double %24, 3.000000e+00
%26 = fpext double %25 to x86_fp80
%27 = fneg x86_fp80 %19
%28 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %22, x86_fp80 0xK40008000000000000000, x86_fp80 %27)
%29 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %14, x86_fp80 0xK40008000000000000000, x86_fp80 %28)
%30 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %26, x86_fp80 %29, x86_fp80 %23)
%31 = fadd x86_fp80 %15, %0
%32 = tail call x86_fp80 @f(x86_fp80 %31, x86_fp80 %30)
%33 = load x86_fp80, x86_fp80* %20
%34 = load x86_fp80, x86_fp80* %12
%35 = fneg x86_fp80 %34
%36 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %33, x86_fp80 0xK40029000000000000000, x86_fp80 %35)
%37 = fmul double %4, 1.250000e-01
%38 = fpext double %37 to x86_fp80
%39 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %22, x86_fp80 0xK40008000000000000000, x86_fp80 %32)
%40 = fsub x86_fp80 %39, %19
%41 = fmul x86_fp80 %40, %38
%42 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %36, x86_fp80 0xK3FFC8000000000000000, x86_fp80 %41)
ret x86_fp80 %42
}