#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 pnorm(double, int /*<<< orphan*/, int);
double qnorm(double, int /*<<< orphan*/, int);
double _bias_corrected_endpoint(double z0, double a, double alpha) {
  return pnorm(z0 + (z0 + qnorm(alpha, 0, 1)) /
                        (1.0 - a * (z0 + qnorm(alpha, 0, 1))),
               0, 1);
}


x86 assembly (clang, -O0):
<_bias_corrected_endpoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <qnorm@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <qnorm@plt>
movsd  -0x38(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm4
movsd  -0x20(%rbp),%xmm0
addsd  %xmm4,%xmm3
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
movsd  0xe30(%rip),%xmm3
addsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <pnorm@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_bias_corrected_endpoint>:
sub    $0x28,%rsp
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x20(%rsp)
movsd  %xmm0,0x8(%rsp)
movapd %xmm2,%xmm0
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <qnorm@plt>
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <qnorm@plt>
movsd  0x8(%rsp),%xmm2
addsd  %xmm2,%xmm0
mulsd  0x20(%rsp),%xmm0
movsd  0xe84(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
divsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
xor    %edi,%edi
mov    $0x1,%esi
add    $0x28,%rsp
jmp    1030 <pnorm@plt>

LLVM IR (-O0):
define double @_bias_corrected_endpoint(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %4
%9 = load double, double* %6
%10 = call double @qnorm(double %9, i32 0, i32 1)
%11 = fadd double %8, %10
%12 = load double, double* %5
%13 = load double, double* %4
%14 = load double, double* %6
%15 = call double @qnorm(double %14, i32 0, i32 1)
%16 = fadd double %13, %15
%17 = fneg double %12
%18 = call double @llvm.fmuladd.f64(double %17, double %16, double 1.000000e+00)
%19 = fdiv double %11, %18
%20 = fadd double %7, %19
%21 = call double @pnorm(double %20, i32 0, i32 1)
ret double %21
}

LLVM IR (-O2):
define double @_bias_corrected_endpoint(double %0, double %1, double %2) {
%4 = tail call double @qnorm(double %2, i32 0, i32 1)
%5 = fadd double %4, %0
%6 = tail call double @qnorm(double %2, i32 0, i32 1)
%7 = fadd double %6, %0
%8 = fneg double %1
%9 = tail call double @llvm.fmuladd.f64(double %8, double %7, double 1.000000e+00)
%10 = fdiv double %5, %9
%11 = fadd double %10, %0
%12 = tail call double @pnorm(double %11, i32 0, i32 1)
ret double %12
}