#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 */
float adapt24(float (*)(float), float, float, float, float, float, float,
              float *);
float stub1(float);
float stub2(float);
float adapt(float (*func)(float), float a, float b, float acc, float eps,
            float *error) {
  float f2 = (*func)(a + (b - a) / 3);
  float f3 = (*func)(a + 2 * (b - a) / 3);
  float integ = adapt24(func, a, b, f2, f3, acc, eps, error);
  return integ;
}


x86 assembly (clang, -O0):
<adapt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  %xmm3,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
movss  0xeb1(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
call   *%rax
movss  %xmm0,-0x24(%rbp)
mov    -0x8(%rbp),%rax
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
subss  -0xc(%rbp),%xmm2
movss  0xe8b(%rip),%xmm1
mulss  %xmm2,%xmm1
movss  0xe7b(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
call   *%rax
movss  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x24(%rbp),%xmm2
movss  -0x28(%rbp),%xmm3
movss  -0x14(%rbp),%xmm4
movss  -0x18(%rbp),%xmm5
mov    -0x20(%rbp),%rsi
call   1030 <adapt24@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adapt>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
movss  %xmm3,0x14(%rsp)
movss  %xmm2,0x10(%rsp)
movss  %xmm1,0xc(%rsp)
mov    %rdi,%rbx
movaps %xmm1,%xmm2
movaps %xmm0,%xmm1
movss  %xmm0,(%rsp)
subss  %xmm0,%xmm2
movss  %xmm2,0x4(%rsp)
movaps %xmm2,%xmm0
divss  0xeb1(%rip),%xmm0
addss  %xmm1,%xmm0
call   *%rdi
movss  %xmm0,0x8(%rsp)
movss  0x4(%rsp),%xmm0
addss  %xmm0,%xmm0
divss  0xe93(%rip),%xmm0
addss  (%rsp),%xmm0
call   *%rbx
movaps %xmm0,%xmm3
mov    %rbx,%rdi
movss  (%rsp),%xmm0
movss  0xc(%rsp),%xmm1
movss  0x8(%rsp),%xmm2
movss  0x10(%rsp),%xmm4
movss  0x14(%rsp),%xmm5
mov    %r14,%rsi
add    $0x18,%rsp
pop    %rbx
pop    %r14
jmp    1030 <adapt24@plt>

LLVM IR (-O0):
define float @adapt(float (float)* %0, float %1, float %2, float %3, float %4, float* %5) {
%7 = alloca float (float)*
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float*
%13 = alloca float
%14 = alloca float
%15 = alloca float
store float (float)* %0, float (float)** %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float* %5, float** %12
%16 = load float (float)*, float (float)** %7
%17 = load float, float* %8
%18 = load float, float* %9
%19 = load float, float* %8
%20 = fsub float %18, %19
%21 = fdiv float %20, 3.000000e+00
%22 = fadd float %17, %21
%23 = call float %16(float %22)
store float %23, float* %13
%24 = load float (float)*, float (float)** %7
%25 = load float, float* %8
%26 = load float, float* %9
%27 = load float, float* %8
%28 = fsub float %26, %27
%29 = fmul float 2.000000e+00, %28
%30 = fdiv float %29, 3.000000e+00
%31 = fadd float %25, %30
%32 = call float %24(float %31)
store float %32, float* %14
%33 = load float (float)*, float (float)** %7
%34 = load float, float* %8
%35 = load float, float* %9
%36 = load float, float* %13
%37 = load float, float* %14
%38 = load float, float* %10
%39 = load float, float* %11
%40 = load float*, float** %12
%41 = call float @adapt24(float (float)* %33, float %34, float %35, float %36, float %37, float %38, float %39, float* %40)
store float %41, float* %15
%42 = load float, float* %15
ret float %42
}

LLVM IR (-O2):
define float @adapt(float (float)* %0, float %1, float %2, float %3, float %4, float* %5) {
%7 = fsub float %2, %1
%8 = fdiv float %7, 3.000000e+00
%9 = fadd float %8, %1
%10 = tail call float %0(float %9)
%11 = fmul float %7, 2.000000e+00
%12 = fdiv float %11, 3.000000e+00
%13 = fadd float %12, %1
%14 = tail call float %0(float %13)
%15 = tail call float @adapt24(float (float)* %0, float %1, float %2, float %10, float %14, float %3, float %4, float* %5)
ret float %15
}