LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/link.c
// Function: print_norms
void print_norms(FILE *fp, norm_t *norm)
{
    uint32_t i/**, j, n**/;
    //uint64_t link_count;
    //double *link;

    //link_count = 0;

    fprintf(fp, "norms:");
    for (i = 0; i < norm->n; ++i)
        fprintf(fp, " %.1f", norm->norms[i]);
    fprintf(fp, "\n");
    
    fprintf(fp, "links:");
    for (i = 0; i < norm->n; ++i)
        fprintf(fp, " %.0f", norm->linkc[i]);
    fprintf(fp, "\n");

    /***
    for (i = 0; i < norm->n; ++i) {
        fprintf(fp, "band %d:", i);
        n = norm->bs[i];
        link = norm->link[i];
        for (j = 0; j < n; ++j) {
            link_count += link[j];
            fprintf(fp, " %.0f", link[j]);
        }
        fprintf(fp, "\n");
    }
    **/
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x137e9(%rip), %rdi     # 0x2287a
movl $0x6, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x24d0
cmpl $0x0, (%r14)
je 0xf0d5
xorl %r12d, %r12d
leaq 0x137ce(%rip), %r15     # 0x22881
movq 0x10(%r14), %rax
movsd (%rax,%r12,8), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x22c0
incq %r12
movl (%r14), %eax
cmpq %rax, %r12
jb 0xf0b3
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2260
leaq 0x1379e(%rip), %rdi     # 0x22887
movl $0x6, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x24d0
cmpl $0x0, (%r14)
je 0xf12d
xorl %r12d, %r12d
leaq 0x13769(%rip), %r15     # 0x22874
movq 0x18(%r14), %rax
movsd (%rax,%r12,8), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x22c0
incq %r12
movl (%r14), %eax
cmpq %rax, %r12
jb 0xf10b
movl $0xa, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2260
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/link.c
// Function: estimate_noise
int estimate_noise(inter_link_mat_t *link_mat)
{
    uint32_t i, j, k, n;
    uint32_t bin, *hist;
    uint64_t total;
    double l;
    inter_link_t *inter_link;

    bin = 4096;
    hist = (uint32_t *) calloc(bin, sizeof(uint32_t));
    for (i = 0; i < link_mat->n; ++i) {
        inter_link = &link_mat->links[i];
        n = inter_link->n;
        for (j = 0; j < n; ++j) {
            for (k = 0; k < 4; ++k) {
                l = inter_link->link[k][j];
                if (l < .0) 
                    continue;
                ++hist[MIN(bin - 1, (int) l)];
            }
        }
    }
   
    hist[0] = 0;

    total = 0;
    for (i = 0; i < bin; ++i)
        total += hist[i];
    total >>= 1;

#ifdef DEBUG_NOISE
    for (i = 0; i < bin; ++i)
        fprintf(stderr, "[DEBUG_NOISE::%s] noise bin %d %d\n", __func__, i, hist[i]);
#endif

    n = 0;
    while (hist[n] < total) {
        ++n;
        if (n == bin)
            break;
        hist[n] += hist[n - 1];
    }

    if (n == 4096)
        fprintf(stderr, "[W::%s] noise esimation might be incorrect %d\n", __func__, n);
    
    free(hist);

    return n;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1000, %edi           # imm = 0x1000
movl $0x4, %esi
callq 0x2290
movq %rax, %rbx
movl (%r14), %eax
testq %rax, %rax
je 0xf1cd
movq 0x10(%r14), %rcx
leaq 0x20(%rcx), %rdx
xorl %esi, %esi
xorpd %xmm0, %xmm0
movl $0xfff, %edi            # imm = 0xFFF
movq %rsi, %r8
shlq $0x7, %r8
movl 0x14(%rcx,%r8), %r8d
testq %r8, %r8
je 0xf1c1
xorl %r9d, %r9d
xorl %r10d, %r10d
movq (%rdx,%r10,8), %r11
movsd (%r11,%r9,8), %xmm1
ucomisd %xmm1, %xmm0
ja 0xf1b0
cvttsd2si %xmm1, %r11d
cmpl %edi, %r11d
cmovael %edi, %r11d
incl (%rbx,%r11,4)
incq %r10
cmpq $0x4, %r10
jne 0xf190
incq %r9
cmpq %r8, %r9
jne 0xf18d
incq %rsi
subq $-0x80, %rdx
cmpq %rax, %rsi
jne 0xf179
movl $0x0, (%rbx)
xorpd %xmm0, %xmm0
xorl %eax, %eax
xorpd %xmm1, %xmm1
movsd (%rbx,%rax,4), %xmm2
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
paddq %xmm2, %xmm1
addq $0x2, %rax
cmpq $0x1000, %rax           # imm = 0x1000
jne 0xf1dd
pshufd $0xee, %xmm1, %xmm0     # xmm0 = xmm1[2,3,2,3]
paddq %xmm1, %xmm0
movq %xmm0, %rax
xorl %r14d, %r14d
cmpq $0x2, %rax
jb 0xf22f
shrq %rax
xorl %r14d, %r14d
xorl %ecx, %ecx
cmpq $0xfff, %r14            # imm = 0xFFF
je 0xf242
addl 0x4(%rbx,%r14,4), %ecx
movl %ecx, 0x4(%rbx,%r14,4)
incq %r14
cmpq %rcx, %rax
ja 0xf214
movq %rbx, %rdi
callq 0x2060
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x295f
movl $0x1000, %r14d          # imm = 0x1000
jmp 0xf22f
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/link.c
// Function: parse_bam_rec
static char *parse_bam_rec(bam1_t *b, bam_header_t *h, int32_t *s, int32_t *e, uint8_t *q, char **cname)
{
    // 0x4 0x100 0x200 0x400 0x800
    if ((b->core.flag & 0xF04) || (!b->core.flag))
        return 0;
    *cname = h->target_name[b->core.tid];
    *s = b->core.pos;
    *e = get_target_end(b);
    *q = b->core.qual;

    return strdup(bam1_qname(b));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r15
movq 0x8(%rdi), %rax
shrq $0x20, %rax
testl $0xf04, %eax            # imm = 0xF04
setne %cl
testw %ax, %ax
sete %al
orb %cl, %al
je 0x10b27
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r8, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rax
movslq (%rdi), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%r9)
movl 0x4(%rdi), %eax
movl %eax, (%rdx)
callq 0x5589
movl %eax, (%r15)
movb 0xa(%r14), %al
movb %al, (%rbx)
movq 0x30(%r14), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2510
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/cov.c
// Function: cov_init
cov_t *cov_init(uint32_t n)
{
    cov_t *cov = (cov_t *) malloc(sizeof(cov_t));
    cov->n = n;
    cov->p = (pos_t *) malloc(sizeof(pos_t) * n);
    uint32_t i;
    for (i = 0; i < n; ++i)
        kv_init(cov->p[i]);

    return cov;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
movl $0x10, %edi
callq 0x2330
movq %rax, %rbx
movl %ebp, (%rax)
movl %ebp, %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %r14
movq %r14, %rdi
callq 0x2330
movq %rax, 0x8(%rbx)
testl %ebp, %ebp
je 0x16f44
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x21e0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/cov.c
// Function: cov_destroy
void cov_destroy(cov_t* cov)
{
    if (!cov) return;
    uint32_t i;
    for (i = 0; i < cov->n; ++i)
        kv_destroy(cov->p[i]);
    free(cov->p);
    free(cov);

    return;
}

// Assembly:
testq %rdi, %rdi
je 0x16f98
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
je 0x16f82
movl $0x10, %r14d
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2060
incq %r15
movl (%rbx), %eax
addq $0x18, %r14
cmpq %rax, %r15
jb 0x16f67
movq 0x8(%rbx), %rdi
callq 0x2060
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/cov.c
// Function: cov_norm_destroy
void cov_norm_destroy(cov_norm_t *cov_norm)
{
    if (!cov_norm) return;
    free(cov_norm->norm[0]);
    free(cov_norm->norm);
    free(cov_norm);

    return;
}

// Assembly:
testq %rdi, %rdi
je 0x16fc0
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq (%rax), %rdi
callq 0x2060
movq 0x10(%rbx), %rdi
callq 0x2060
movq %rbx, %rdi
popq %rbx
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/cov.c
// Function: pos_compression
uint64_t pos_compression(cov_t *cov)
{
    uint32_t i, p, p1;
    int32_t c;
    size_t j, k, n;
    uint64_t m, *a;
    
    m = 0;
    for (i = 0; i < cov->n; ++i) {
        a = cov->p[i].a;
        n = cov->p[i].n;
        if (n == 0) continue;

        qsort(a, n, sizeof(uint64_t), u64_cmpfunc);
        p = (uint32_t) (a[0] >> 32);
        c = (int32_t) a[0];
        k = 0;
        for(j = 1; j < n; ++j) {
            p1 = (uint32_t) (a[j] >> 32);
            if (p != p1) {
                if (c != 0) a[k++] = (uint64_t) p << 32 | (uint32_t) c;
                p = p1;
                c = (int32_t) a[j];
            } else {
                c += (int32_t) a[j];
            }
        }
        if (c != 0) a[k++] = (uint64_t) p << 32 | (uint32_t) c;
        cov->p[i].n = k;
        m += k;
    }

    return m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %eax
testl %eax, %eax
je 0x170a0
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
xorl %ebp, %ebp
xorl %r14d, %r14d
leaq (,%rbp,2), %r15
addq %rbp, %r15
movq (%rcx,%r15,8), %r13
testq %r13, %r13
je 0x17090
movq 0x10(%rcx,%r15,8), %r12
movl $0x8, %edx
movq %r12, %rdi
movq %r13, %rsi
leaq 0xa4(%rip), %rcx        # 0x170b5
callq 0x20e0
movq (%r12), %rdx
movq %rdx, %rcx
shrq $0x20, %rcx
cmpq $0x1, %r13
jne 0x1702b
xorl %eax, %eax
jmp 0x1706f
movl $0x1, %esi
movl %ecx, %edi
xorl %eax, %eax
movq (%r12,%rsi,8), %r8
movq %r8, %rcx
shrq $0x20, %rcx
cmpl %ecx, %edi
jne 0x1704a
addl %r8d, %edx
movl %edi, %ecx
jmp 0x17065
testl %edx, %edx
je 0x17062
shlq $0x20, %rdi
movl %edx, %edx
orq %rdi, %rdx
movq %rdx, (%r12,%rax,8)
incq %rax
movq (%r12,%rsi,8), %r8
movl %r8d, %edx
incq %rsi
movl %ecx, %edi
cmpq %rsi, %r13
jne 0x17034
testl %edx, %edx
je 0x17083
shlq $0x20, %rcx
movl %edx, %edx
orq %rcx, %rdx
movq %rdx, (%r12,%rax,8)
incq %rax
movq 0x8(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
addq %rax, %r14
movl (%rbx), %eax
incq %rbp
movl %eax, %edx
cmpq %rdx, %rbp
jb 0x16fe2
jmp 0x170a3
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/cov.c
// Function: kh_ctab_put1
static void kh_ctab_put1(kh_ctab_t *ctab, int32_t c, int cnt)
{
    int absent;
    khint_t k;
    k = kh_put_ctab(ctab, c, &absent);
    if (absent)
        kh_val(ctab, k) = cnt;
    else
        kh_val(ctab, k) += cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl 0xc(%rdi), %eax
jb 0x17b70
movl (%rbx), %esi
movl 0x4(%rbx), %eax
addl %eax, %eax
cmpl %eax, %esi
jbe 0x17b5e
decl %esi
jmp 0x17b60
incl %esi
movq %rbx, %rdi
callq 0x1801f
testl %eax, %eax
js 0x17c0d
movslq %r14d, %rax
movl (%rbx), %edi
leal -0x1(%rdi), %r9d
movq %rax, %rcx
shrq $0x21, %rcx
movl %eax, %r8d
shll $0xb, %r8d
xorl %eax, %r8d
xorl %ecx, %r8d
andl %r9d, %r8d
movq 0x10(%rbx), %rdx
movl %r8d, %ecx
shrl $0x4, %ecx
movl (%rdx,%rcx,4), %esi
leal (%r8,%r8), %ecx
shrl %cl, %esi
testb $0x2, %sil
je 0x17bb1
movl %r8d, %esi
jmp 0x17c34
movl $0x1, %r11d
movl %r8d, %r10d
movl %edi, %esi
movl %r10d, %ecx
shrl $0x4, %ecx
movl (%rdx,%rcx,4), %r14d
leal (%r10,%r10), %ecx
andl $0x1e, %ecx
movl %r14d, %r15d
shrl %cl, %r15d
testb $0x2, %r15b
jne 0x17c14
testb $0x1, %r15b
jne 0x17bec
movq 0x18(%rbx), %r15
movl %r10d, %r12d
cmpq %rax, (%r15,%r12,8)
je 0x17c14
btl %ecx, %r14d
cmovbl %r10d, %esi
addl %r11d, %r10d
andl %r9d, %r10d
incl %r11d
cmpl %r8d, %r10d
jne 0x17bbc
movb $0x1, %cl
movl %edi, %r9d
cmpl %edi, %esi
je 0x17c24
jmp 0x17c34
movl (%rbx), %esi
jmp 0x17cb6
shrl %cl, %r14d
testb $0x2, %r14b
sete %cl
movl %esi, %r9d
movl %r10d, %r8d
cmpl %edi, %r9d
cmovel %r8d, %r9d
testb %cl, %cl
cmovnel %r8d, %r9d
movl %r9d, %esi
movl %esi, %edi
shrl $0x4, %edi
movl (%rdx,%rdi,4), %r8d
leal (%rsi,%rsi), %ecx
andl $0x1e, %ecx
movl %r8d, %r9d
shrl %cl, %r9d
testb $0x2, %r9b
jne 0x17c64
testb $0x1, %r9b
jne 0x17c96
movslq %ebp, %rax
movq 0x20(%rbx), %rcx
movl %esi, %edx
addq %rax, (%rcx,%rdx,8)
jmp 0x17cc3
movq 0x18(%rbx), %r9
movl %esi, %r10d
movl $0x3, %r11d
shll %cl, %r11d
movq %rax, (%r9,%r10,8)
notl %r11d
andl %r11d, %r8d
movl %r8d, (%rdx,%rdi,4)
movq 0x4(%rbx), %xmm0
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, 0x4(%rbx)
jmp 0x17cb6
movq 0x18(%rbx), %r9
movl $0x3, %r10d
shll %cl, %r10d
movl %esi, %ecx
movq %rax, (%r9,%rcx,8)
notl %r10d
andl %r10d, %r8d
movl %r8d, (%rdx,%rdi,4)
incl 0x4(%rbx)
movslq %ebp, %rax
movq 0x20(%rbx), %rcx
movl %esi, %edx
movq %rax, (%rcx,%rdx,8)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/cov.c
// Function: print_cov_in_bed
void print_cov_in_bed(cov_t *cov, sdict_t *sdict, FILE *fo)
{
    size_t i, j, s;
    int32_t c;
    uint32_t p, p1;
    uint64_t *a;

    for (i = 0; i < cov->n; ++i) {
        a = cov->p[i].a;
        s = cov->p[i].n;

        p = 0, c = 0;
        for (j = 0; j < s; ++j) {
            p1 = (uint32_t) (a[j] >> 32);
            if (p1 > p)
                fprintf(fo, "%s\t%u\t%u\t%d\n", sdict->s[i].name, p, p1, c);
            p = p1;
            c += (int32_t) a[j];
        }

        if (p < sdict->s[i].len)
            fprintf(fo, "%s\t%u\t%u\t%d\n", sdict->s[i].name, p, sdict->s[i].len, 0);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
cmpl $0x0, (%rdi)
je 0x17dc1
xorl %ecx, %ecx
movq %rdi, 0x18(%rsp)
movq 0x8(%rdi), %rax
movq %rcx, 0x20(%rsp)
leaq (%rcx,%rcx,2), %r12
movq (%rax,%r12,8), %r15
movl $0x0, %r13d
testq %r15, %r15
je 0x17d76
movq 0x10(%rax,%r12,8), %rbx
xorl %r14d, %r14d
xorl %ecx, %ecx
xorl %ebp, %ebp
movq (%rbx,%r14,8), %rax
movq %rax, %r13
shrq $0x20, %r13
cmpl %r13d, %ecx
jae 0x17d69
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax,%r12,8), %rdx
movq 0x8(%rsp), %rdi
leaq 0xbb49(%rip), %rsi      # 0x238a1
movl %r13d, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x22c0
movq (%rbx,%r14,8), %rax
addl %eax, %ebp
incq %r14
movl %r13d, %ecx
cmpq %r14, %r15
jne 0x17d2f
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax,%r12,8), %r8d
cmpl %r8d, %r13d
jae 0x17da9
leaq (%rax,%r12,8), %rax
movq (%rax), %rdx
movq 0x8(%rsp), %rdi
leaq 0xbb05(%rip), %rsi      # 0x238a1
movl %r13d, %ecx
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x22c0
movq 0x20(%rsp), %rcx
incq %rcx
movq 0x18(%rsp), %rdi
movl (%rdi), %eax
cmpq %rax, %rcx
jb 0x17d07
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/binomlite.c
// Function: fpser
double fpser(double a, double b, double x, double eps, int log_p)
{
/* ----------------------------------------------------------------------- *
 *                 EVALUATION OF I (A,B)
 *                                X
 *          FOR B < MIN(EPS, EPS*A) AND X <= 0.5
 * ----------------------------------------------------------------------- */

    double ans, c, s, t, an, tol;

    /* SET  ans := x^a : */
    if (log_p) {
        ans = a * log(x);
    } else if (a > eps * 0.001) {
        t = a * log(x);
        if (t < exparg(1)) { /* exp(t) would underflow */
            return 0.;
        }
        ans = exp(t);
    } else {
        ans = 1.;
    }

/*                NOTE THAT 1/B(A,B) = B */

    if (log_p)
        ans += log(b) - log(a);
    else
        ans *= b / a;

    tol = eps / a;
    an = a + 1.;
    t = x;
    s = t / an;
    do {
        an += 1.;
        t = x * t;
        c = t / an;
        s += c;
    } while (fabs(c) > tol);

    if (log_p)
        ans += log1p(a * s);
    else
        ans *= a * s + 1.;
    return ans;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movl %edi, %ebx
movapd %xmm0, %xmm8
testl %edi, %edi
je 0x18d03
movapd %xmm2, %xmm0
movsd %xmm1, (%rsp)
movsd %xmm8, 0x8(%rsp)
movsd %xmm2, 0x10(%rsp)
callq 0x2240
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd (%rsp), %xmm0
callq 0x2240
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2240
movsd 0x10(%rsp), %xmm2
movsd 0x8(%rsp), %xmm8
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
addsd 0x18(%rsp), %xmm1
jmp 0x18d6f
ucomisd 0xabbc(%rip), %xmm8     # 0x238c8
jbe 0x18d5e
movsd %xmm1, (%rsp)
movsd %xmm2, 0x10(%rsp)
movapd %xmm2, %xmm0
movsd %xmm8, 0x8(%rsp)
callq 0x2240
mulsd 0x8(%rsp), %xmm0
xorpd %xmm1, %xmm1
movsd 0xac05(%rip), %xmm2     # 0x23940
ucomisd %xmm0, %xmm2
ja 0x18df8
callq 0x2550
movsd 0x8(%rsp), %xmm8
movsd (%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
jmp 0x18d66
movsd 0x98fa(%rip), %xmm0     # 0x22660
divsd %xmm8, %xmm1
mulsd %xmm0, %xmm1
movsd 0xab59(%rip), %xmm7     # 0x238d0
divsd %xmm8, %xmm7
movsd 0x98db(%rip), %xmm9     # 0x22660
addsd %xmm8, %xmm9
movapd %xmm2, %xmm0
divsd %xmm9, %xmm0
movsd 0x98c5(%rip), %xmm3     # 0x22660
movapd 0xb03d(%rip), %xmm4     # 0x23de0
movapd %xmm2, %xmm5
addsd %xmm3, %xmm9
mulsd %xmm2, %xmm5
movapd %xmm5, %xmm6
divsd %xmm9, %xmm6
addsd %xmm6, %xmm0
andpd %xmm4, %xmm6
ucomisd %xmm7, %xmm6
ja 0x18da7
testl %ebx, %ebx
je 0x18de5
mulsd %xmm8, %xmm0
movsd %xmm1, (%rsp)
callq 0x2220
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
jmp 0x18df8
mulsd %xmm0, %xmm8
addsd 0x986d(%rip), %xmm8     # 0x22660
mulsd %xmm8, %xmm1
movapd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/binomlite.c
// Function: rexpm1
double rexpm1(double x)
{
/* ----------------------------------------------------------------------- */
/*            EVALUATION OF THE FUNCTION EXP(X) - 1 */
/* ----------------------------------------------------------------------- */

    static double p1 = 9.14041914819518e-10;
    static double p2 = .0238082361044469;
    static double q1 = -.499999999085958;
    static double q2 = .107141568980644;
    static double q3 = -.0119041179760821;
    static double q4 = 5.95130811860248e-4;

    if (fabs(x) <= 0.15) {
    return x * (((p2 * x + p1) * x + 1.) /
            ((((q4 * x + q3) * x + q2) * x + q1) * x + 1.));
    }
    else { /* |x| > 0.15 : */
    double w = exp(x);
    if (x > 0.)
        return w * (0.5 - 1. / w + 0.5);
    else
        return w - 0.5 - 0.5;
    }

}

// Assembly:
subq $0x18, %rsp
movapd %xmm0, %xmm3
movapd 0xafce(%rip), %xmm0     # 0x23de0
andpd %xmm3, %xmm0
movsd 0xab2a(%rip), %xmm1     # 0x23948
ucomisd %xmm0, %xmm1
jae 0x18e6b
movapd %xmm3, %xmm0
movapd %xmm3, (%rsp)
callq 0x2550
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
movapd (%rsp), %xmm2
ucomisd %xmm0, %xmm2
jbe 0x18ec9
movsd 0xab17(%rip), %xmm0     # 0x23968
divsd %xmm1, %xmm0
movsd 0x93bb(%rip), %xmm2     # 0x22218
addsd %xmm2, %xmm0
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
jmp 0x18edd
movsd 0xaadd(%rip), %xmm1     # 0x23950
mulsd %xmm3, %xmm1
addsd 0xaad9(%rip), %xmm1     # 0x23958
mulsd %xmm3, %xmm1
addsd 0xaad5(%rip), %xmm1     # 0x23960
movapd %xmm3, %xmm2
unpcklpd %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0]
movapd 0xaf65(%rip), %xmm0     # 0x23e00
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
mulpd %xmm2, %xmm0
addpd 0xaf65(%rip), %xmm0     # 0x23e10
mulpd %xmm2, %xmm0
addpd 0xaf69(%rip), %xmm0     # 0x23e20
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
divsd %xmm1, %xmm0
mulsd %xmm3, %xmm0
jmp 0x18edd
movsd 0xa9e7(%rip), %xmm0     # 0x238b8
addsd %xmm0, %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ecx
movl %edi, %ebx
movapd %xmm0, %xmm4
movq %xmm2, %rdx
movq %xmm1, %rax
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rsi # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rsi, %rax
setg %al
btrq $0x3f, %rdx
cmpq %rsi, %rdx
setg %dl
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x1b8e0
jnp 0x1b93a
ucomisd %xmm0, %xmm2
jne 0x1b8e8
jnp 0x1b93a
testb %al, %al
jne 0x1b93a
testb %dl, %dl
jne 0x1b93a
movsd 0x6920(%rip), %xmm0     # 0x22218
movapd %xmm0, %xmm3
subsd %xmm4, %xmm3
addsd %xmm0, %xmm3
leaq 0x18(%rsp), %r14
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %rdx
movapd %xmm1, %xmm0
movapd %xmm2, %xmm1
movapd %xmm4, %xmm2
movq %r14, %rdi
movq %r15, %rsi
callq 0x182ac
testl %ebx, %ebx
cmoveq %r15, %r14
movsd (%r14), %xmm0
jmp 0x1b9d5
ucomisd %xmm0, %xmm1
jne 0x1b95f
jp 0x1b95f
ucomisd %xmm0, %xmm2
jne 0x1b95f
jp 0x1b95f
xorl %eax, %eax
testl %ecx, %ecx
sete %al
leaq 0x8668(%rip), %rcx      # 0x23fc0
movsd (%rcx,%rax,8), %xmm0
jmp 0x1b9d5
ucomisd %xmm0, %xmm1
jne 0x1b967
jnp 0x1b9a3
movapd %xmm1, %xmm3
divsd %xmm2, %xmm3
ucomisd %xmm0, %xmm3
jne 0x1b977
jnp 0x1b9a3
ucomisd %xmm0, %xmm2
jne 0x1b97f
jnp 0x1b9ad
divsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jne 0x1b98b
jnp 0x1b9ad
movsd 0x6885(%rip), %xmm0     # 0x22218
ucomisd %xmm4, %xmm0
jbe 0x1b9bf
testl %ebx, %ebx
je 0x1b9c3
xorpd %xmm0, %xmm0
jmp 0x1b9b1
testl %ebx, %ebx
je 0x1b9b1
testl %ecx, %ecx
je 0x1b9cd
jmp 0x1b9d5
testl %ebx, %ebx
je 0x1b9a7
testl %ecx, %ecx
je 0x1b9d5
movsd 0x7ef3(%rip), %xmm0     # 0x238b0
jmp 0x1b9d5
testl %ebx, %ebx
je 0x1b99d
testl %ecx, %ecx
je 0x1b9cd
xorpd %xmm0, %xmm0
jmp 0x1b9d5
movsd 0x6c8b(%rip), %xmm0     # 0x22660
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/binomlite.c
// Function: pbeta
double pbeta(double x, double a, double b, int lower_tail, int log_p)
{
    if (x <= 0)
    return R_DT_0;
    if (x >= 1)
    return R_DT_1;

    return pbeta_raw(x, a, b, lower_tail, log_p);
}

// Assembly:
xorpd %xmm3, %xmm3
ucomisd %xmm0, %xmm3
jae 0x1ba04
ucomisd 0x6c6f(%rip), %xmm0     # 0x22660
jb 0x1b899
testl %edi, %edi
je 0x1ba08
testl %esi, %esi
je 0x1ba19
xorpd %xmm0, %xmm0
retq
testl %edi, %edi
je 0x1b9fb
xorpd %xmm0, %xmm0
testl %esi, %esi
je 0x1ba18
movsd 0x7e98(%rip), %xmm0     # 0x238b0
retq
movsd 0x6c3f(%rip), %xmm0     # 0x22660
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/binomlite.c
// Function: pbinom
double pbinom(double x, double n, double p, int lower_tail, int log_p)
{
    n = round(n);

    if (x < 0) return R_DT_0;
    x = floor(x + 1e-7);
    if (n <= x) return R_DT_1;
    return pbeta(p, x + 1, n - x, !lower_tail, log_p);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movl %edi, %ebp
movsd %xmm2, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movapd %xmm1, %xmm0
callq 0x2090
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
movsd 0x8(%rsp), %xmm2
ucomisd %xmm2, %xmm0
jbe 0x1ba5f
testl %ebp, %ebp
jne 0x1bac9
testl %ebx, %ebx
je 0x1babb
jmp 0x1bad5
movapd %xmm2, %xmm0
addsd 0x81ed(%rip), %xmm0     # 0x23c58
movsd %xmm1, 0x8(%rsp)
callq 0x2470
movsd 0x8(%rsp), %xmm2
ucomisd %xmm2, %xmm0
jae 0x1baad
movapd %xmm0, %xmm1
subsd %xmm0, %xmm2
addsd 0x6bce(%rip), %xmm1     # 0x22660
xorl %edi, %edi
testl %ebp, %ebp
sete %dil
movsd 0x10(%rsp), %xmm0
movl %ebx, %esi
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x1b9df
testl %ebp, %ebp
je 0x1bac5
testl %ebx, %ebx
je 0x1babb
xorpd %xmm0, %xmm0
jmp 0x1bad5
movsd 0x6b9d(%rip), %xmm0     # 0x22660
jmp 0x1bad5
xorpd %xmm0, %xmm0
testl %ebx, %ebx
je 0x1bad5
movsd 0x7ddb(%rip), %xmm0     # 0x238b0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/binomlite.c
// Function: alnrel
static double alnrel(double a)
{
/* -----------------------------------------------------------------------
 *            Evaluation of the function ln(1 + a)
 * ----------------------------------------------------------------------- */

    if (fabs(a) > 0.375)
    return log(1. + a);
    // else : |a| <= 0.375
    static double
    p1 = -1.29418923021993,
    p2 = .405303492862024,
    p3 = -.0178874546012214,
    q1 = -1.62752256355323,
    q2 = .747811014037616,
    q3 = -.0845104217945565;
    double
    t = a / (a + 2.),
    t2 = t * t,
    w = (((p3 * t2 + p2) * t2 + p1) * t2 + 1.) /
    (((q3 * t2 + q2) * t2 + q1) * t2 + 1.);
    return t * 2. * w;

}

// Assembly:
movapd 0x7578(%rip), %xmm1     # 0x23de0
andpd %xmm0, %xmm1
ucomisd 0x717c(%rip), %xmm1     # 0x239f0
jbe 0x1c883
addsd 0x5de2(%rip), %xmm0     # 0x22660
jmp 0x2240
movsd 0x7185(%rip), %xmm1     # 0x23a10
addsd %xmm0, %xmm1
divsd %xmm1, %xmm0
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
movapd 0x7729(%rip), %xmm2     # 0x23fd0
mulpd %xmm1, %xmm2
addpd 0x772d(%rip), %xmm2     # 0x23fe0
mulpd %xmm1, %xmm2
addpd 0x7731(%rip), %xmm2     # 0x23ff0
mulpd %xmm1, %xmm2
addpd 0x7555(%rip), %xmm2     # 0x23e20
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
divsd %xmm1, %xmm2
addsd %xmm0, %xmm0
mulsd %xmm2, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/binomlite.c
// Function: esum
static double esum(int mu, double x, int give_log)
{
/* ----------------------------------------------------------------------- */
/*                    EVALUATION OF EXP(MU + X) */
/* ----------------------------------------------------------------------- */

    if(give_log)
    return x + (double) mu;

    // else :
    double w;
    if (x > 0.) { /* L10: */
    if (mu > 0)  return exp((double) mu) * exp(x);
    w = mu + x;
    if (w < 0.) return exp((double) mu) * exp(x);
    }
    else { /* x <= 0 */
    if (mu < 0)  return exp((double) mu) * exp(x);
    w = mu + x;
    if (w > 0.) return exp((double) mu) * exp(x);
    }
    return exp(w);

}

// Assembly:
subq $0x18, %rsp
movapd %xmm0, %xmm3
testl %esi, %esi
je 0x1cd59
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
addsd %xmm3, %xmm0
jmp 0x1cdcf
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm3
jbe 0x1cd86
testl %edi, %edi
jg 0x1cda6
cvtsi2sd %edi, %xmm1
movapd %xmm1, %xmm0
addsd %xmm3, %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm2
ja 0x1cda0
addq $0x18, %rsp
jmp 0x2550
testl %edi, %edi
js 0x1cda6
cvtsi2sd %edi, %xmm1
movapd %xmm1, %xmm0
addsd %xmm3, %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jbe 0x1cd7d
movapd %xmm1, %xmm0
jmp 0x1cdad
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
movsd %xmm3, 0x10(%rsp)
callq 0x2550
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x2550
mulsd 0x8(%rsp), %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/binomlite.c
// Function: gamln1
static double gamln1(double a)
{
/* ----------------------------------------------------------------------- */
/*     EVALUATION OF LN(GAMMA(1 + A)) FOR -0.2 <= A <= 1.25 */
/* ----------------------------------------------------------------------- */

    double w;
    if (a < 0.6) {
    static double p0 = .577215664901533;
    static double p1 = .844203922187225;
    static double p2 = -.168860593646662;
    static double p3 = -.780427615533591;
    static double p4 = -.402055799310489;
    static double p5 = -.0673562214325671;
    static double p6 = -.00271935708322958;
    static double q1 = 2.88743195473681;
    static double q2 = 3.12755088914843;
    static double q3 = 1.56875193295039;
    static double q4 = .361951990101499;
    static double q5 = .0325038868253937;
    static double q6 = 6.67465618796164e-4;
    w = ((((((p6 * a + p5)* a + p4)* a + p3)* a + p2)* a + p1)* a + p0) /
        ((((((q6 * a + q5)* a + q4)* a + q3)* a + q2)* a + q1)* a + 1.);
    return -(a) * w;
    }
    else { /* 0.6 <= a <= 1.25 */
    static double r0 = .422784335098467;
    static double r1 = .848044614534529;
    static double r2 = .565221050691933;
    static double r3 = .156513060486551;
    static double r4 = .017050248402265;
    static double r5 = 4.97958207639485e-4;
    static double s1 = 1.24313399877507;
    static double s2 = .548042109832463;
    static double s3 = .10155218743983;
    static double s4 = .00713309612391;
    static double s5 = 1.16165475989616e-4;
    double x = a - 0.5 - 0.5;
    w = (((((r5 * x + r4) * x + r3) * x + r2) * x + r1) * x + r0) /
        (((((s5 * x + s4) * x + s3) * x + s2) * x + s1) * x + 1.);
    return x * w;
    }
}

// Assembly:
movsd 0x6db4(%rip), %xmm1     # 0x23b90
ucomisd %xmm0, %xmm1
jbe 0x1ce50
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movapd 0x726e(%rip), %xmm2     # 0x24060
mulpd %xmm1, %xmm2
addpd 0x7272(%rip), %xmm2     # 0x24070
mulpd %xmm1, %xmm2
addpd 0x7276(%rip), %xmm2     # 0x24080
mulpd %xmm1, %xmm2
addpd 0x727a(%rip), %xmm2     # 0x24090
mulpd %xmm1, %xmm2
addpd 0x727e(%rip), %xmm2     # 0x240a0
mulpd %xmm1, %xmm2
addpd 0x7282(%rip), %xmm2     # 0x240b0
mulpd %xmm1, %xmm2
addpd 0x7286(%rip), %xmm2     # 0x240c0
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
divsd %xmm1, %xmm2
xorpd 0x6fa2(%rip), %xmm0     # 0x23df0
jmp 0x1ceb8
movsd 0x6a60(%rip), %xmm1     # 0x238b8
addsd %xmm1, %xmm0
addsd %xmm1, %xmm0
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movapd 0x7190(%rip), %xmm2     # 0x24000
mulpd %xmm1, %xmm2
addpd 0x7194(%rip), %xmm2     # 0x24010
mulpd %xmm1, %xmm2
addpd 0x7198(%rip), %xmm2     # 0x24020
mulpd %xmm1, %xmm2
addpd 0x719c(%rip), %xmm2     # 0x24030
mulpd %xmm1, %xmm2
addpd 0x71a0(%rip), %xmm2     # 0x24040
mulpd %xmm1, %xmm2
addpd 0x71a4(%rip), %xmm2     # 0x24050
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
divsd %xmm1, %xmm2
mulsd %xmm2, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/binomlite.c
// Function: rlog1
static double rlog1(double x)
{
/* -----------------------------------------------------------------------
 *             Evaluation of the function  x - ln(1 + x)
 * ----------------------------------------------------------------------- */

    static double a = .0566749439387324;
    static double b = .0456512608815524;
    static double p0 = .333333333333333;
    static double p1 = -.224696413112536;
    static double p2 = .00620886815375787;
    static double q1 = -1.27408923933623;
    static double q2 = .354508718369557;

    double h, r, t, w, w1;
    if (x < -0.39 || x > 0.57) { /* direct evaluation */
    w = x + 0.5 + 0.5;
    return x - log(w);
    }
    /* else */
    if (x < -0.18) { /* L10: */
    h = x + .3;
    h /= .7;
    w1 = a - h * .3;
    }
    else if (x > 0.18) { /* L20: */
    h = x * .75 - .25;
    w1 = b + h / 3.;
    }
    else { /*        Argument Reduction */
    h = x;
    w1 = 0.;
    }

/* L30:                  Series Expansion */

    r = h / (h + 2.);
    t = r * r;
    w = ((p2 * t + p1) * t + p0) / ((q2 * t + q1) * t + 1.);
    return t * 2. * (1. / (1. - r) - r * w) + w1;

}

// Assembly:
movapd %xmm0, %xmm5
movsd 0x6b21(%rip), %xmm0     # 0x23d68
ucomisd %xmm5, %xmm0
ja 0x1d28b
ucomisd 0x6b1b(%rip), %xmm5     # 0x23d70
ja 0x1d28b
movsd 0x6b19(%rip), %xmm0     # 0x23d78
ucomisd %xmm5, %xmm0
jbe 0x1d2b9
movsd 0x6673(%rip), %xmm0     # 0x238e0
addsd %xmm0, %xmm5
divsd 0x667f(%rip), %xmm5     # 0x238f8
mulsd %xmm5, %xmm0
movsd 0x6b13(%rip), %xmm1     # 0x23d98
subsd %xmm0, %xmm1
jmp 0x1d2eb
pushq %rax
movsd 0x4f84(%rip), %xmm1     # 0x22218
movapd %xmm5, %xmm0
addsd %xmm1, %xmm0
addsd %xmm1, %xmm0
movsd %xmm5, (%rsp)
callq 0x2240
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
popq %rax
retq
xorpd %xmm1, %xmm1
ucomisd 0x6abb(%rip), %xmm5     # 0x23d80
jbe 0x1d2eb
mulsd 0x6ab9(%rip), %xmm5     # 0x23d88
addsd 0x66b9(%rip), %xmm5     # 0x23990
movapd %xmm5, %xmm1
divsd 0x66bd(%rip), %xmm1     # 0x239a0
addsd 0x6aa5(%rip), %xmm1     # 0x23d90
movsd 0x671d(%rip), %xmm0     # 0x23a10
addsd %xmm5, %xmm0
divsd %xmm0, %xmm5
movapd %xmm5, %xmm2
mulsd %xmm5, %xmm2
movapd %xmm2, %xmm0
unpcklpd %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
movapd 0x6dbd(%rip), %xmm3     # 0x240d0
mulpd %xmm0, %xmm3
addpd 0x6dc1(%rip), %xmm3     # 0x240e0
mulpd %xmm0, %xmm3
addpd 0x6dc5(%rip), %xmm3     # 0x240f0
movapd %xmm3, %xmm0
unpckhpd %xmm3, %xmm0            # xmm0 = xmm0[1],xmm3[1]
divsd %xmm0, %xmm3
addsd %xmm2, %xmm2
movsd 0x531d(%rip), %xmm0     # 0x22660
movapd %xmm0, %xmm4
subsd %xmm5, %xmm4
divsd %xmm4, %xmm0
mulsd %xmm5, %xmm3
subsd %xmm3, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/binomlite.c
// Function: gamln
static double gamln(double a)
{
/* -----------------------------------------------------------------------
 *            Evaluation of  ln(gamma(a))  for positive a
 * ----------------------------------------------------------------------- */
/*     Written by Alfred H. Morris */
/*          Naval Surface Warfare Center */
/*          Dahlgren, Virginia */
/* ----------------------------------------------------------------------- */

    static double d = .418938533204673;/* d == 0.5*(LN(2*PI) - 1) */

    static double c0 = .0833333333333333;
    static double c1 = -.00277777777760991;
    static double c2 = 7.9365066682539e-4;
    static double c3 = -5.9520293135187e-4;
    static double c4 = 8.37308034031215e-4;
    static double c5 = -.00165322962780713;

    if (a <= 0.8)
    return gamln1(a) - log(a); /* ln(G(a+1)) - ln(a) == ln(G(a+1)/a) = ln(G(a)) */
    else if (a <= 2.25)
    return gamln1(a - 0.5 - 0.5);

    else if (a < 10.) {
    int i, n = (int)(a - 1.25);
    double t = a;
    double w = 1.;
    for (i = 1; i <= n; ++i) {
        t += -1.;
        w *= t;
    }
    return gamln1(t - 1.) + log(w);
    }
    else { /* a >= 10 */
    double t = 1. / (a * a);
    double w = (((((c5 * t + c4) * t + c3) * t + c2) * t + c1) * t + c0) / a;
    return d + w + (a - 0.5) * (log(a) - 1.);
    }
}

// Assembly:
subq $0x18, %rsp
movsd 0x68b7(%rip), %xmm1     # 0x23da0
ucomisd %xmm0, %xmm1
jae 0x1d56c
movsd 0x68b1(%rip), %xmm1     # 0x23da8
ucomisd %xmm0, %xmm1
jae 0x1d59b
movsd 0x4d17(%rip), %xmm1     # 0x22220
ucomisd %xmm0, %xmm1
jbe 0x1d5b4
movsd 0x689d(%rip), %xmm1     # 0x23db8
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
movsd 0x5135(%rip), %xmm2     # 0x22660
testl %eax, %eax
jle 0x1d543
movsd 0x6431(%rip), %xmm1     # 0x23968
addsd %xmm1, %xmm0
mulsd %xmm0, %xmm2
decl %eax
jne 0x1d537
movsd %xmm2, 0x8(%rsp)
addsd 0x6417(%rip), %xmm0     # 0x23968
callq 0x1cdd4
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2240
jmp 0x1d643
movsd %xmm0, 0x8(%rsp)
callq 0x1cdd4
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2240
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
jmp 0x1d649
movsd 0x6315(%rip), %xmm1     # 0x238b8
addsd %xmm1, %xmm0
addsd %xmm1, %xmm0
addq $0x18, %rsp
jmp 0x1cdd4
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movsd 0x509c(%rip), %xmm1     # 0x22660
divsd %xmm2, %xmm1
movsd 0x66c0(%rip), %xmm2     # 0x23c90
mulsd %xmm1, %xmm2
addsd 0x66bc(%rip), %xmm2     # 0x23c98
mulsd %xmm1, %xmm2
addsd 0x66b8(%rip), %xmm2     # 0x23ca0
mulsd %xmm1, %xmm2
addsd 0x66b4(%rip), %xmm2     # 0x23ca8
mulsd %xmm1, %xmm2
addsd 0x66b0(%rip), %xmm2     # 0x23cb0
mulsd %xmm1, %xmm2
addsd 0x66ac(%rip), %xmm2     # 0x23cb8
divsd %xmm0, %xmm2
addsd 0x6798(%rip), %xmm2     # 0x23db0
movsd %xmm2, 0x10(%rsp)
movsd 0x6292(%rip), %xmm1     # 0x238b8
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
callq 0x2240
addsd 0x632b(%rip), %xmm0     # 0x23968
mulsd 0x8(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/binomlite.c
// Function: gsumln
static double gsumln(double a, double b)
{
/* ----------------------------------------------------------------------- */
/*          EVALUATION OF THE FUNCTION LN(GAMMA(A + B)) */
/*          FOR 1 <= A <= 2  AND  1 <= B <= 2 */
/* ----------------------------------------------------------------------- */

    double x = a + b - 2.;/* in [0, 2] */

    if (x <= 0.25)
    return gamln1(x + 1.);

    /* else */
    if (x <= 1.25)
    return gamln1(x) + alnrel(x);
    /* else x > 1.25 : */
    return gamln1(x - 1.) + log(x * (x + 1.));

}

// Assembly:
movapd %xmm0, %xmm2
addsd %xmm1, %xmm2
addsd 0x6762(%rip), %xmm2     # 0x23dc0
movsd 0x63b2(%rip), %xmm0     # 0x23a18
ucomisd %xmm2, %xmm0
jae 0x1d6b8
subq $0x18, %rsp
movsd 0x6750(%rip), %xmm0     # 0x23dc8
ucomisd %xmm2, %xmm0
movsd %xmm2, 0x10(%rsp)
jae 0x1d6c9
movsd 0x62dc(%rip), %xmm0     # 0x23968
addsd %xmm2, %xmm0
callq 0x1cdd4
movsd %xmm0, 0x8(%rsp)
movsd 0x4fbd(%rip), %xmm0     # 0x22660
movsd 0x10(%rsp), %xmm1
addsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
callq 0x2240
jmp 0x1d6e3
addsd 0x4fa0(%rip), %xmm2     # 0x22660
movapd %xmm2, %xmm0
jmp 0x1cdd4
movapd %xmm2, %xmm0
callq 0x1cdd4
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x1c860
addsd 0x8(%rsp), %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/enzyme.c
// Function: re_cuts_init
re_cuts_t *re_cuts_init(uint32_t n)
{
    re_cuts_t *re_cuts = (re_cuts_t *) malloc(sizeof(re_cuts_t));
    re_cuts->n = n;
    re_cuts->density = 0;
    re_cuts->re = (re_t *) malloc(n * sizeof(re_t));
    uint32_t i;
    for (i = 0; i < n; ++i)
        re_cuts->re[i].sites = 0;
    return re_cuts;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x18, %edi
callq 0x2330
movq %rax, %rbx
movl %ebp, (%rax)
movq $0x0, 0x8(%rax)
movl %ebp, %r15d
movq %r15, %r14
shlq $0x4, %r14
movq %r14, %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
testl %ebp, %ebp
je 0x1da17
decq %r15
movq %r15, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
addq $0x10, %r14
andq $-0x20, %r14
movdqa 0x4811(%rip), %xmm1     # 0x221b0
xorl %ecx, %ecx
movdqa 0x4817(%rip), %xmm2     # 0x221c0
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x4817(%rip), %xmm4     # 0x221d0
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %edx
notl %edx
testb $0x1, %dl
je 0x1d9f3
movq $0x0, 0x8(%rax,%rcx)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x1da0a
movq $0x0, 0x18(%rax,%rcx)
paddq %xmm4, %xmm1
addq $0x20, %rcx
cmpq %rcx, %r14
jne 0x1d9b9
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/enzyme.c
// Function: re_cuts_destroy
void re_cuts_destroy(re_cuts_t *re_cuts)
{
    if (!re_cuts) return;
    uint32_t i;
    for (i = 0; i < re_cuts->n; ++i)
        if (re_cuts->re[i].sites)
            free(re_cuts->re[i].sites);
    free(re_cuts->re);
    free(re_cuts);
}

// Assembly:
testq %rdi, %rdi
je 0x1da79
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %eax
testl %eax, %eax
je 0x1da63
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rcx
movq (%rcx,%r14), %rdi
testq %rdi, %rdi
je 0x1da55
callq 0x2060
movl (%rbx), %eax
incq %r15
movl %eax, %ecx
addq $0x10, %r14
cmpq %rcx, %r15
jb 0x1da41
movq 0x10(%rbx), %rdi
callq 0x2060
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/enzyme.c
// Function: calc_re_cuts_density
double **calc_re_cuts_density(re_cuts_t *re_cuts, uint32_t resolution)
{
    if (!re_cuts)
        return 0;

    uint32_t i, j, b;
    double **dens, *ds;
    re_t re;
    dens = (double **) malloc(re_cuts->n * sizeof(double *));
    for (i = 0; i < re_cuts->n; ++i) {
        re = re_cuts->re[i];
        b = div_ceil(re.l, resolution);
        ds = (double *) calloc(b, sizeof(double));
        for (j = 0; j < re.n; ++j)
            ds[re.sites[j] / resolution] += 1.;
        for (j = 0; j < b - 1; ++j)
            ds[j] /= (double) resolution * re_cuts->density;
        ds[b - 1] /= ((double) re.l - (double) (b - 1) * resolution) * re_cuts->density;
        
        for (j = 0; j < b; ++j)
            if (ds[j] < MIN_RE_DENS || ds[j] > MAX_RE_DENS)
                ds[j] = .0;
        
        dens[i] = ds;
#ifdef DEBUG_ENZ
        fprintf(stderr, "[DEBUG_ENZ::%s] DENS [%u/%u] (%u):", __func__, i, re_cuts->n, b);
        for (j = 0; j < b; ++j)
            fprintf(stderr, " %.6f", ds[j]);
        fprintf(stderr, "\n");
#endif
    }
    return dens;
}

// Assembly:
testq %rdi, %rdi
je 0x1df36
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r15
movl (%rdi), %r14d
leaq (,%r14,8), %rdi
callq 0x2330
testq %r14, %r14
je 0x1df27
movl %ebx, %ecx
cvtsi2sd %rcx, %xmm0
movsd %xmm0, (%rsp)
xorl %ebp, %ebp
movq %r15, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq 0x10(%r15), %rax
movq %rbp, %rcx
shlq $0x4, %rcx
movl (%rax,%rcx), %r13d
movl 0x4(%rax,%rcx), %r15d
movq 0x8(%rax,%rcx), %r14
movq %r13, %rdi
movl %ebx, %esi
callq 0x4b01
movl %eax, %r12d
movl $0x8, %esi
movq %r12, %rdi
callq 0x2290
movsd 0x481b(%rip), %xmm1     # 0x22660
movq %rax, %rcx
testq %r15, %r15
je 0x1de6d
xorl %esi, %esi
movl (%r14,%rsi,4), %eax
xorl %edx, %edx
divl %ebx
movsd (%rcx,%rax,8), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rcx,%rax,8)
incq %rsi
cmpq %rsi, %r15
jne 0x1de4f
movl %r12d, %eax
movq 0x10(%rsp), %r15
movsd 0x8(%r15), %xmm0
decl %eax
movl %eax, %eax
je 0x1dea7
movapd %xmm0, %xmm1
mulsd (%rsp), %xmm1
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm2
divsd %xmm1, %xmm2
movsd %xmm2, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x1de8c
movq %rax, %rdx
jmp 0x1dea9
xorl %edx, %edx
movl %r13d, %esi
xorps %xmm1, %xmm1
cvtsi2sd %rsi, %xmm1
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
mulsd (%rsp), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
movsd (%rcx,%rdx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rcx,%rdx,8)
testq %r12, %r12
movsd 0x4786(%rip), %xmm1     # 0x22668
movsd 0x6346(%rip), %xmm2     # 0x24230
je 0x1df0f
xorl %eax, %eax
movsd (%rcx,%rax,8), %xmm0
ucomisd %xmm0, %xmm1
ja 0x1deff
ucomisd %xmm2, %xmm0
jbe 0x1df07
movq $0x0, (%rcx,%rax,8)
incq %rax
cmpq %rax, %r12
jne 0x1deee
movq 0x8(%rsp), %rax
movq %rcx, (%rax,%rbp,8)
incq %rbp
movl (%r15), %ecx
cmpq %rcx, %rbp
jb 0x1de0a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/telo.c
// Function: check_motif
int check_motif(char *motif)
{
	int i, c, n;

	if (motif == NULL)
		return 0;

	n = strlen(motif);
	for (i = 0; i < n; i++) {
		c = seq_nt6_table[(uint8_t) motif[i]];
		if (c < 1 || c > 4)
			return 1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x1e5df
movq %rdi, %rbx
callq 0x2160
testl %eax, %eax
jle 0x1e5df
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
leaq 0xdf14(%rip), %rdx      # 0x2c4d0
movzbl (%rbx,%rcx), %esi
movb (%rsi,%rdx), %sil
addb $-0x5, %sil
cmpb $-0x5, %sil
jbe 0x1e5da
incq %rcx
cmpq %rcx, %rax
jne 0x1e5bc
xorl %ebp, %ebp
jmp 0x1e5df
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/yahs.c
// Function: find_aseq_telos
int8_t *find_aseq_telos(asm_dict_t *dict, int8_t *telo_ends)
{   
    int i, n;
    int8_t *telos;
    sdict_t *sdict;
    sd_aseq_t *aseq;
    sd_seg_t *segs, *seg;
    
    sdict = dict->sdict;
    n = dict->n;
    telos = (int8_t *) calloc(dict->n * 2, sizeof(int8_t));

    segs = dict->seg;
    for (i = 0; i < n; i++) {
        aseq = &dict->s[i];
        // first seg
        seg = &segs[aseq->s];
        if ((telo_ends[seg->c>>1<<1] && seg->x <= MAX_TELO_CLIP && (seg->c&1) == 0) ||
            (telo_ends[seg->c>>1<<1|1] && (seg->x + seg->y + MAX_TELO_CLIP) >= sdict->s[seg->c>>1].len && (seg->c&1) == 1))
            telos[i<<1] = 1;
        // last seg
        seg = &segs[aseq->s + aseq->n - 1];
        if ((telo_ends[seg->c>>1<<1] && seg->x <= MAX_TELO_CLIP && (seg->c&1) == 1) ||
            (telo_ends[seg->c>>1<<1|1] && (seg->x + seg->y + MAX_TELO_CLIP) >= sdict->s[seg->c>>1].len && (seg->c&1) == 0))
            telos[i<<1|1] = 1;
    }

    return telos;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x38(%rdi), %r15
movslq (%rdi), %r12
leal (%r12,%r12), %edi
movl $0x1, %esi
callq 0x2290
testq %r12, %r12
jle 0x1f4b4
movq 0x20(%r14), %rcx
movq 0x8(%r14), %rdx
addq $0x1c, %rdx
addq %r12, %r12
xorl %esi, %esi
movl (%rdx), %edi
leaq (%rdi,%rdi,2), %r8
shlq $0x4, %r8
leaq (%rcx,%r8), %r9
movl 0x18(%rcx,%r8), %r8d
movl %r8d, %r10d
andl $-0x2, %r10d
cmpb $0x0, (%rbx,%r10)
je 0x1f3f4
testb $0x1, %r8b
jne 0x1f3f4
cmpl $0x33, 0x1c(%r9)
jb 0x1f429
movq %r8, %r10
orq $0x1, %r10
cmpb $0x0, (%rbx,%r10)
je 0x1f431
testb $0x1, %r8b
je 0x1f431
shrl %r8d
movl 0x1c(%r9), %r10d
movl 0x20(%r9), %r9d
addl %r10d, %r9d
addl $0x32, %r9d
movq 0x8(%r15), %r10
leaq (%r8,%r8,2), %r8
cmpl 0x10(%r10,%r8,8), %r9d
jb 0x1f431
movslq %esi, %r8
movb $0x1, (%rax,%r8)
movl -0x4(%rdx), %r8d
addl %r8d, %edi
decl %edi
leaq (%rdi,%rdi,2), %rdi
shlq $0x4, %rdi
leaq (%rcx,%rdi), %r8
movl 0x18(%rcx,%rdi), %edi
movl %edi, %r9d
andl $-0x2, %r9d
cmpb $0x0, (%rbx,%r9)
je 0x1f465
testb $0x1, %dil
je 0x1f465
cmpl $0x33, 0x1c(%r8)
jb 0x1f499
movq %rdi, %r9
orq $0x1, %r9
cmpb $0x0, (%rbx,%r9)
je 0x1f4a3
testb $0x1, %dil
jne 0x1f4a3
shrl %edi
movl 0x1c(%r8), %r9d
movl 0x20(%r8), %r8d
addl %r9d, %r8d
addl $0x32, %r8d
movq 0x8(%r15), %r9
leaq (%rdi,%rdi,2), %rdi
cmpl 0x10(%r9,%rdi,8), %r8d
jb 0x1f4a3
leal 0x1(%rsi), %edi
movslq %edi, %rdi
movb $0x1, (%rax,%rdi)
addq $0x2, %rsi
addq $0x58, %rdx
cmpq %rsi, %r12
jne 0x1f3c6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/yahs.c
// Function: scaffold_error_break
int scaffold_error_break(char *fai, char *link_file, uint32_t ml, uint8_t mq, char *agp, int flank_size, double noise, char *out)
{
    int dist_thres;
    sdict_t *sdict = make_sdict_from_index(fai, ml);
    asm_dict_t *dict = make_asm_dict_from_agp(sdict, agp, 1);

    dist_thres = flank_size * 2;
    //dist_thres = estimate_dist_thres_from_file(link_file, dict, ec_min_frac, ec_resolution);
    //dist_thres = MAX(dist_thres, ec_min_window);
    //fprintf(stderr, "[I::%s] dist threshold for scaffold error break: %d\n", __func__, dist_thres);
    link_mat_t *link_mat = link_mat_from_file(link_file, dict, dist_thres, ec_bin, noise, ec_move_avg, mq);

#ifdef DEBUG_ERROR_BREAK
    fprintf(stderr, "[DEBUG_ERROR_BREAK::%s] link matrix\n", __func__);
    print_link_mat(link_mat, dict, stderr);
#endif

    uint32_t bp_n = 0;
    bp_t *breaks = detect_break_points_local_joint(link_mat, ec_bin, ec_fold_thresh, flank_size, dict, &bp_n);
#ifdef DEBUG
    fprintf(stderr, "[DEBUG::%s] number scaffold breaks: %u\n", __func__, bp_n);
#endif

    FILE *agp_out = fopen(out, "w");
    write_break_agp(dict, breaks, bp_n, agp_out);
    fclose(agp_out);
    link_mat_destroy(link_mat);
    asm_destroy(dict);
    sd_destroy(sdict);
    int i;
    for (i = 0; i < bp_n; ++i)
        free(breaks[i].p);
    free(breaks);
    
    return bp_n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, 0x10(%rsp)
movl %r9d, %ebx
movq %r8, %r15
movl %ecx, %ebp
movq %rsi, %r12
movq 0x50(%rsp), %r13
movl %edx, %esi
callq 0x12d2b
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x1373c
movq %rax, %r15
leal (%rbx,%rbx), %edx
movq %r12, %rdi
movq %rax, %rsi
movl $0x3e8, %ecx            # imm = 0x3E8
movsd 0x10(%rsp), %xmm0
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x5ac9
movq %rax, %rbp
leaq 0xc(%rsp), %r12
movl $0x0, (%r12)
movsd 0x3fa0(%rip), %xmm0     # 0x238d8
movq %rax, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movl %ebx, %edx
movq %r15, %rcx
movq %r12, %r8
callq 0x5f7e
movq %rax, %rbx
leaq 0x26b9(%rip), %rsi      # 0x22010
movq %r13, %rdi
callq 0x23e0
movq %rax, %r13
movl (%r12), %edx
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x6f46
movq %r13, %rdi
callq 0x2150
movq %rbp, %rdi
callq 0x57df
movq %r15, %rdi
callq 0x122d1
movq %r14, %rdi
callq 0x12233
cmpl $0x0, (%r12)
je 0x1f9bd
movq %rbx, %r14
addq $0x10, %r14
xorl %r15d, %r15d
movq (%r14), %rdi
callq 0x2060
incq %r15
movl 0xc(%rsp), %eax
addq $0x18, %r14
cmpq %rax, %r15
jb 0x1f9a5
movq %rbx, %rdi
callq 0x2060
movl 0xc(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq