#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 euler_modificado(long double x, long double y, double h) {
  long double k1, k2;
  k1 = f(x, y);
  k2 = f(x + 0.5 * h, y + 0.5 * h * k1);
  y = y + h * k2;
  return y;
}


x86 assembly (clang, -O0):
<euler_modificado>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <f@plt>
fstpt  -0x40(%rbp)
fldt   -0x10(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xeae(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
fldl   -0x58(%rbp)
fadd   %st,%st(1)
fldt   -0x20(%rbp)
fldt   -0x40(%rbp)
fmulp  %st,%st(2)
faddp  %st,%st(1)
mov    %rsp,%rax
fxch   %st(1)
fstpt  (%rax)
fstpt  0x10(%rax)
call   1030 <f@plt>
fstpt  -0x50(%rbp)
fldt   -0x20(%rbp)
fldl   -0x28(%rbp)
fldt   -0x50(%rbp)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<euler_modificado>:
sub    $0x58,%rsp
movsd  %xmm0,0x20(%rsp)
fldt   0x60(%rsp)
fld    %st(0)
fstpt  0x4c(%rsp)
fldt   0x70(%rsp)
fld    %st(0)
fstpt  0x2c(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <f@plt>
movsd  0xebe(%rip),%xmm0
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
fldl   0x38(%rsp)
fldt   0x4c(%rsp)
fadd   %st(1),%st
fxch   %st(1)
fmulp  %st,%st(2)
fldt   0x2c(%rsp)
faddp  %st,%st(2)
fxch   %st(1)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <f@plt>
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
fmull  0x40(%rsp)
fldt   0x2c(%rsp)
faddp  %st,%st(1)
add    $0x58,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @euler_modificado(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
store x86_fp80 %0, x86_fp80* %4
store x86_fp80 %1, x86_fp80* %5
store double %2, double* %6
%9 = load x86_fp80, x86_fp80* %4
%10 = load x86_fp80, x86_fp80* %5
%11 = call x86_fp80 @f(x86_fp80 %9, x86_fp80 %10)
store x86_fp80 %11, x86_fp80* %7
%12 = load x86_fp80, x86_fp80* %4
%13 = load double, double* %6
%14 = fmul double 5.000000e-01, %13
%15 = fpext double %14 to x86_fp80
%16 = fadd x86_fp80 %12, %15
%17 = load x86_fp80, x86_fp80* %5
%18 = load double, double* %6
%19 = fmul double 5.000000e-01, %18
%20 = fpext double %19 to x86_fp80
%21 = load x86_fp80, x86_fp80* %7
%22 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %20, x86_fp80 %21, x86_fp80 %17)
%23 = call x86_fp80 @f(x86_fp80 %16, x86_fp80 %22)
store x86_fp80 %23, x86_fp80* %8
%24 = load x86_fp80, x86_fp80* %5
%25 = load double, double* %6
%26 = fpext double %25 to x86_fp80
%27 = load x86_fp80, x86_fp80* %8
%28 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %26, x86_fp80 %27, x86_fp80 %24)
store x86_fp80 %28, x86_fp80* %5
%29 = load x86_fp80, x86_fp80* %5
ret x86_fp80 %29
}

LLVM IR (-O2):
define x86_fp80 @euler_modificado(x86_fp80 %0, x86_fp80 %1, double %2) {
%4 = tail call x86_fp80 @f(x86_fp80 %0, x86_fp80 %1)
%5 = fmul double %2, 5.000000e-01
%6 = fpext double %5 to x86_fp80
%7 = fadd x86_fp80 %6, %0
%8 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %6, x86_fp80 %4, x86_fp80 %1)
%9 = tail call x86_fp80 @f(x86_fp80 %7, x86_fp80 %8)
%10 = fpext double %2 to x86_fp80
%11 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %10, x86_fp80 %9, x86_fp80 %1)
ret x86_fp80 %11
}