#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 findzero2(double, double, double, double, double (*)(double, void *),
                 void *, double *, int *);
double stub1(double, void *);
double stub2(double, void *);
double findzero(double ax, double bx, double (*f)(double x, void *info),
                void *info, double *Tol, int *Maxit) {
  double fa = (*f)(ax, info);
  double fb = (*f)(bx, info);
  return findzero2(ax, bx, fa, fb, f, info, Tol, Maxit);
}


x86 assembly (clang, -O0):
<findzero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  -0x8(%rbp),%xmm0
mov    -0x20(%rbp),%rdi
call   *%rax
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  -0x10(%rbp),%xmm0
mov    -0x20(%rbp),%rdi
call   *%rax
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   1030 <findzero2@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findzero>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    %rsi,%rdi
call   *%rbx
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
mov    %r12,%rdi
call   *%rbx
movaps %xmm0,%xmm3
movsd  0x10(%rsp),%xmm0
movsd  (%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <findzero2@plt>

LLVM IR (-O0):
define double @findzero(double %0, double %1, double (double, i8*)* %2, i8* %3, double* %4, i32* %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double (double, i8*)*
%10 = alloca i8*
%11 = alloca double*
%12 = alloca i32*
%13 = alloca double
%14 = alloca double
store double %0, double* %7
store double %1, double* %8
store double (double, i8*)* %2, double (double, i8*)** %9
store i8* %3, i8** %10
store double* %4, double** %11
store i32* %5, i32** %12
%15 = load double (double, i8*)*, double (double, i8*)** %9
%16 = load double, double* %7
%17 = load i8*, i8** %10
%18 = call double %15(double %16, i8* %17)
store double %18, double* %13
%19 = load double (double, i8*)*, double (double, i8*)** %9
%20 = load double, double* %8
%21 = load i8*, i8** %10
%22 = call double %19(double %20, i8* %21)
store double %22, double* %14
%23 = load double, double* %7
%24 = load double, double* %8
%25 = load double, double* %13
%26 = load double, double* %14
%27 = load double (double, i8*)*, double (double, i8*)** %9
%28 = load i8*, i8** %10
%29 = load double*, double** %11
%30 = load i32*, i32** %12
%31 = call double @findzero2(double %23, double %24, double %25, double %26, double (double, i8*)* %27, i8* %28, double* %29, i32* %30)
ret double %31
}

LLVM IR (-O2):
define double @findzero(double %0, double %1, double (double, i8*)* %2, i8* %3, double* %4, i32* %5) {
%7 = tail call double %2(double %0, i8* %3)
%8 = tail call double %2(double %1, i8* %3)
%9 = tail call double @findzero2(double %0, double %1, double %7, double %8, double (double, i8*)* %2, i8* %3, double* %4, i32* %5)
ret double %9
}