#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 milne(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 * f3 - f2 + 2 * f1);
  f4 = f(x + h, yp);
  yp = y[2] + (h / 3) * (f4 + 4 * f3 + f2);
  return yp;
}


x86 assembly (clang, -O0):
<milne>:
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   0x20(%rax)
movsd  -0x20(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
fldl   -0xa0(%rbp)
fldt   -0x70(%rbp)
fldt   -0x60(%rbp)
flds   0xda0(%rip)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fldt   -0x50(%rbp)
faddp  %st,%st(1)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  -0x80(%rbp)
fldt   -0x80(%rbp)
add    $0xd0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @milne(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 2
%67 = load x86_fp80, x86_fp80* %66
%68 = load double, double* %6
%69 = fdiv double %68, 3.000000e+00
%70 = fpext double %69 to x86_fp80
%71 = load x86_fp80, x86_fp80* %11
%72 = load x86_fp80, x86_fp80* %10
%73 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK40018000000000000000, x86_fp80 %72, x86_fp80 %71)
%74 = load x86_fp80, x86_fp80* %9
%75 = fadd x86_fp80 %73, %74
%76 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %70, x86_fp80 %75, x86_fp80 %67)
store x86_fp80 %76, x86_fp80* %12
%77 = load x86_fp80, x86_fp80* %12
ret x86_fp80 %77
}

LLVM IR (-O2):
define x86_fp80 @milne(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* %17
%34 = fdiv double %2, 3.000000e+00
%35 = fpext double %34 to x86_fp80
%36 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %22, x86_fp80 0xK40018000000000000000, x86_fp80 %32)
%37 = fadd x86_fp80 %19, %36
%38 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %35, x86_fp80 %37, x86_fp80 %33)
ret x86_fp80 %38
}