// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]yahs/binomlite.c
// Function: pbeta_raw
double pbeta_raw(double x, double a, double b, int lower_tail, int log_p)
{
    // treat limit cases correctly here:
    if(a == 0 || b == 0 || !R_FINITE(a) || !R_FINITE(b)) {
    // NB:  0 < x < 1 :
    if(a == 0 && b == 0) // point mass 1/2 at each of {0,1} :
        return (log_p ? -M_LN2 : 0.5);
    if (a == 0 || a/b == 0) // point mass 1 at 0 ==> P(X <= x) = 1, all x > 0
        return R_DT_1;
    if (b == 0 || b/a == 0) // point mass 1 at 1 ==> P(X <= x) = 0, all x < 1
        return R_DT_0;
    // else, remaining case:  a = b = Inf : point mass 1 at 1/2
    if (x < 0.5) return R_DT_0; else return R_DT_1;
    }
    // Now:  0 < a < Inf;  0 < b < Inf

    double x1 = 0.5 - x + 0.5, w, wc;
    int ierr;
    //====
    bratio(a, b, x, x1, &w, &wc, &ierr, log_p); /* -> ./toms708.c */
    //====
    // ierr in {10,14} <==> bgrat() error code ierr-10 in 1:4; for 1 and 4, warned *there*
    return lower_tail ? w : wc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm2, -0x20(%rbp)
movl %edi, -0x24(%rbp)
movl %esi, -0x28(%rbp)
movsd -0x18(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x242a2
jp 0x242a2
jmp 0x24310
movsd -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x242b4
jp 0x242b4
jmp 0x24310
movsd -0x18(%rbp), %xmm0
movq %xmm0, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq %rcx, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
subq %rcx, %rax
setl %al
testb $0x1, %al
jne 0x242e1
jmp 0x24310
movsd -0x20(%rbp), %xmm0
movq %xmm0, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq %rcx, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
subq %rcx, %rax
setl %al
testb $0x1, %al
jne 0x2462a
movsd -0x18(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2436b
jp 0x2436b
movsd -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2436b
jp 0x2436b
movl -0x28(%rbp), %eax
movsd 0xe485(%rip), %xmm0     # 0x327c0
movsd 0xd2bd(%rip), %xmm1     # 0x31600
movsd %xmm1, -0x58(%rbp)
cmpl $0x0, %eax
movsd %xmm0, -0x50(%rbp)
jne 0x2435c
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x2469f
movsd -0x18(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2437d
jp 0x2437d
jmp 0x24392
movsd -0x18(%rbp), %xmm0
divsd -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2440b
jp 0x2440b
cmpl $0x0, -0x24(%rbp)
je 0x243cb
movl -0x28(%rbp), %eax
xorps %xmm0, %xmm0
movsd 0xd252(%rip), %xmm1     # 0x315f8
movsd %xmm1, -0x68(%rbp)
cmpl $0x0, %eax
movsd %xmm0, -0x60(%rbp)
jne 0x243bf
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
jmp 0x243fc
movl -0x28(%rbp), %eax
movsd 0xe3aa(%rip), %xmm0     # 0x32780
xorps %xmm1, %xmm1
movsd %xmm1, -0x80(%rbp)
cmpl $0x0, %eax
movsd %xmm0, -0x78(%rbp)
jne 0x243f2
movsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x2469f
movsd -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2441d
jp 0x2441d
jmp 0x2443a
movsd -0x20(%rbp), %xmm0
divsd -0x18(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x244da
jp 0x244da
cmpl $0x0, -0x24(%rbp)
je 0x24485
movl -0x28(%rbp), %eax
movsd 0xe335(%rip), %xmm0     # 0x32780
xorps %xmm1, %xmm1
movsd %xmm1, -0x90(%rbp)
cmpl $0x0, %eax
movsd %xmm0, -0x88(%rbp)
jne 0x24473
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
jmp 0x244c8
movl -0x28(%rbp), %eax
xorps %xmm0, %xmm0
movsd 0xd165(%rip), %xmm1     # 0x315f8
movsd %xmm1, -0xa8(%rbp)
cmpl $0x0, %eax
movsd %xmm0, -0xa0(%rbp)
jne 0x244b8
movsd -0xa8(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd -0xa0(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x2469f
movsd 0xd11e(%rip), %xmm0     # 0x31600
ucomisd -0x10(%rbp), %xmm0
jbe 0x2458d
cmpl $0x0, -0x24(%rbp)
je 0x24538
movl -0x28(%rbp), %eax
movsd 0xe282(%rip), %xmm0     # 0x32780
xorps %xmm1, %xmm1
movsd %xmm1, -0xb8(%rbp)
cmpl $0x0, %eax
movsd %xmm0, -0xb0(%rbp)
jne 0x24526
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
movsd -0xb0(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
jmp 0x2457b
movl -0x28(%rbp), %eax
xorps %xmm0, %xmm0
movsd 0xd0b2(%rip), %xmm1     # 0x315f8
movsd %xmm1, -0xd0(%rbp)
cmpl $0x0, %eax
movsd %xmm0, -0xc8(%rbp)
jne 0x2456b
movsd -0xd0(%rbp), %xmm0
movsd %xmm0, -0xc8(%rbp)
movsd -0xc8(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
movsd -0xc0(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x2469f
cmpl $0x0, -0x24(%rbp)
je 0x245d8
movl -0x28(%rbp), %eax
xorps %xmm0, %xmm0
movsd 0xd057(%rip), %xmm1     # 0x315f8
movsd %xmm1, -0xe0(%rbp)
cmpl $0x0, %eax
movsd %xmm0, -0xd8(%rbp)
jne 0x245c6
movsd -0xe0(%rbp), %xmm0
movsd %xmm0, -0xd8(%rbp)
movsd -0xd8(%rbp), %xmm0
movsd %xmm0, -0xe8(%rbp)
jmp 0x2461b
movl -0x28(%rbp), %eax
movsd 0xe19d(%rip), %xmm0     # 0x32780
xorps %xmm1, %xmm1
movsd %xmm1, -0xf8(%rbp)
cmpl $0x0, %eax
movsd %xmm0, -0xf0(%rbp)
jne 0x2460b
movsd -0xf8(%rbp), %xmm0
movsd %xmm0, -0xf0(%rbp)
movsd -0xf0(%rbp), %xmm0
movsd %xmm0, -0xe8(%rbp)
movsd -0xe8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x2469f
movsd 0xcfce(%rip), %xmm0     # 0x31600
subsd -0x10(%rbp), %xmm0
movsd 0xcfc1(%rip), %xmm1     # 0x31600
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x18(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
movsd -0x10(%rbp), %xmm2
movsd -0x30(%rbp), %xmm3
movl -0x28(%rbp), %ecx
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x44(%rbp), %rdx
callq 0x20060
cmpl $0x0, -0x24(%rbp)
je 0x24685
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x100(%rbp)
jmp 0x24692
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x100(%rbp)
movsd -0x100(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopl (%rax)