LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]yahs/link.c
// Function: estimate_intra_link_mat_init_rss
long estimate_intra_link_mat_init_rss(void *dict, uint32_t resolution, int use_gap_seq)
{
    long bytes, p;
    uint32_t i, n, b;
    uint64_t len;

    n = use_gap_seq? ((asm_dict_t *) dict)->n : ((sdict_t *) dict)->n;

    bytes = 0;
    bytes += sizeof(intra_link_mat_t);
    bytes += n * sizeof(intra_link_t);

    for (i = 0; i < n; ++i) {
        len = use_gap_seq? ((asm_dict_t *) dict)->s[i].len : ((sdict_t *) dict)->s[i].len;
        if (len < resolution)
            continue;
        b = div_ceil(len, resolution);
        p = (long) b * (b + 1) / 2;
        if (p > UINT32_MAX)
            return -1;

        bytes += p * sizeof(double);
    }
    return bytes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r15d
movq %rdi, %r12
movl (%rdi), %r14d
imulq $0x18, %r14, %r13
shlq $0x4, %r14
addq $0x10, %r14
movl %esi, 0xc(%rsp)
movl %esi, %ebx
xorl %ebp, %ebp
xorl %r11d, %r11d
cmpq %r11, %r13
je 0x9aff
movq 0x8(%r12), %rax
testl %r15d, %r15d
je 0x9ab2
movq 0x8(%rax,%rbp), %rdi
jmp 0x9ab7
movl 0x10(%rax,%r11), %edi
cmpq %rbx, %rdi
jb 0x9af1
movq %r11, 0x10(%rsp)
movl 0xc(%rsp), %esi
callq 0x28ff
movl %eax, %ecx
incl %eax
imulq %rcx, %rax
movq %rax, %rcx
shrq $0x21, %rcx
jne 0x9afb
movabsq $0x1fffffffe, %rcx      # imm = 0x1FFFFFFFE
andq %rcx, %rax
leaq (%r14,%rax,4), %r14
movq 0x10(%rsp), %r11
addq $0x18, %r11
addq $0x58, %rbp
jmp 0x9a9c
pushq $-0x1
popq %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]yahs/link.c
// Function: norm_destroy
void norm_destroy(norm_t *norm)
{
    if (!norm) return;
    //uint32_t i;
    free(norm->bs);
    //for (i = 0; i < norm->n; ++i)
    //    free(norm->link[i]);
    //free(norm->link);
    free(norm->linkc);
    free(norm->norms);
    free(norm);
}

// Assembly:
testq %rdi, %rdi
je 0xab99
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x2060
movq 0x18(%rbx), %rdi
callq 0x2060
movq 0x10(%rbx), %rdi
callq 0x2060
movq %rbx, %rdi
popq %rbx
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]yahs/link.c
// Function: print_inter_link_norms
void print_inter_link_norms(FILE *fp, inter_link_mat_t *link_mat, asm_dict_t *dict)
{
    uint32_t i, n;
    inter_link_t *link;

    n = link_mat->n;
    for (i = 0; i < n; ++i) {
        link = &link_mat->links[i];
        if (link->n)
            fprintf(fp, "NORM: %s %s (%u) [%.3f %.3f %.3f %.3f]\n", dict->s[link->c0].name, dict->s[link->c1].name, link->n0, link->norms[0], link->norms[1], link->norms[2], link->norms[3]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl (%rsi), %r13d
shlq $0x7, %r13
xorl %ebp, %ebp
leaq 0x13890(%rip), %r12     # 0x1e7da
cmpq %rbp, %r13
je 0xafa5
movq 0x10(%r14), %rax
cmpl $0x0, 0x14(%rax,%rbp)
je 0xaf9f
movq 0x8(%rbx), %rcx
movl (%rax,%rbp), %edx
movl 0x4(%rax,%rbp), %esi
imulq $0x58, %rdx, %rdx
movq (%rcx,%rdx), %rdx
imulq $0x58, %rsi, %rsi
movq (%rcx,%rsi), %rcx
movl 0x18(%rax,%rbp), %r8d
movsd 0x60(%rax,%rbp), %xmm0
movsd 0x68(%rax,%rbp), %xmm1
movsd 0x70(%rax,%rbp), %xmm2
movsd 0x78(%rax,%rbp), %xmm3
movq %r15, %rdi
movq %r12, %rsi
movb $0x4, %al
callq 0x22c0
subq $-0x80, %rbp
jmp 0xaf4a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]yahs/link.c
// Function: print_inter_link_bands
void print_inter_link_bands(FILE *fp, inter_link_mat_t *link_mat, asm_dict_t *dict)
{
    uint32_t i, j, k, n;
    inter_link_t *link;
    
    n = link_mat->n;
    for (i = 0; i < n; ++i) {
        link = &link_mat->links[i];
        if (link->n) {
            for (j = 0; j < 4; ++j) {
                fprintf(fp, "BAND [%u %u]: %s%s %s%s (%u, %u) [%.3f]", i, j, dict->s[link->c0].name, j < 2? "-" : "+", dict->s[link->c1].name, j & 1? "-" : "+", link->n0, link->r, link->norms[j]);
                for (k = 0; k < link->r; ++k)
                    fprintf(fp, " %.0f", link->linkb[j][k]);
                fprintf(fp, "\n");
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, 0x10(%rsp)
movq %rdi, %r15
movq %rsi, (%rsp)
movl (%rsi), %eax
movq %rax, 0x8(%rsp)
xorl %edx, %edx
leaq 0x1384e(%rip), %rbp     # 0x1e82c
cmpq 0x8(%rsp), %rdx
je 0xb0d7
movq (%rsp), %rax
movq 0x10(%rax), %r14
movq %rdx, %rax
shlq $0x7, %rax
cmpl $0x0, 0x14(%r14,%rax)
je 0xb0cf
addq %rax, %r14
xorl %r13d, %r13d
movq %rdx, 0x18(%rsp)
cmpq $0x4, %r13
je 0xb0cf
movq 0x10(%rsp), %rax
movq 0x8(%rax), %r10
movl (%r14), %eax
movl 0x4(%r14), %ecx
imulq $0x58, %rax, %rax
cmpq $0x2, %r13
leaq 0x137f2(%rip), %rsi     # 0x1e82a
movq %rsi, %r9
leaq 0x132e7(%rip), %rbx     # 0x1e329
cmovbq %rbx, %r9
imulq $0x58, %rcx, %rcx
movq %rcx, 0x20(%rsp)
testb $0x1, %r13b
cmoveq %rsi, %rbx
movq (%r10,%rax), %r8
movl 0x18(%r14), %r12d
movl 0x10(%r14), %r11d
movsd 0x60(%r14,%r13,8), %xmm0
movq %r15, %rdi
leaq 0x1378e(%rip), %rsi     # 0x1e802
movl %r13d, %ecx
movb $0x1, %al
pushq %r11
pushq %r12
pushq %rbx
movq 0x38(%rsp), %r11
pushq (%r10,%r11)
callq 0x22c0
addq $0x20, %rsp
xorl %ebx, %ebx
movl 0x10(%r14), %eax
cmpq %rax, %rbx
jae 0xb0b7
movq 0x40(%r14,%r13,8), %rax
movsd (%rax,%rbx,8), %xmm0
movq %r15, %rdi
movq %rbp, %rsi
movb $0x1, %al
callq 0x22c0
incq %rbx
jmp 0xb092
pushq $0xa
popq %rdi
movq %r15, %rsi
callq 0x2260
incq %r13
movq 0x18(%rsp), %rdx
jmp 0xb00f
incq %rdx
jmp 0xafde
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]yahs/link.c
// Function: get_max_inter_norms
double *get_max_inter_norms(inter_link_mat_t *link_mat, asm_dict_t *dict)
{
    uint32_t i, j, n, c0, c1;
    double *max_norms;
    inter_link_t *link;

    n = link_mat->n;
    max_norms = (double *) calloc(dict->n, sizeof(double));
    for (i = 0; i < n; ++i) {
        link = &link_mat->links[i];
        if (link->n) {
            c0 = link->c0;
            c1 = link->c1;
            for (j = 0; j < 4; ++j) {
                max_norms[c0] = MAX(max_norms[c0], link->norms[j]);
                max_norms[c1] = MAX(max_norms[c1], link->norms[j]);
            }
        }
    }
    return max_norms;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %r14d
movl (%rsi), %edi
pushq $0x8
popq %rsi
callq 0x2290
pushq $0x60
popq %rcx
xorl %edx, %edx
cmpq %r14, %rdx
je 0xb15f
movq 0x10(%rbx), %rsi
movq %rdx, %r8
shlq $0x7, %r8
cmpl $0x0, 0x14(%rsi,%r8)
je 0xb156
addq %rsi, %r8
movl (%r8), %edi
movl 0x4(%r8), %r8d
addq %rcx, %rsi
xorl %r9d, %r9d
cmpq $0x4, %r9
je 0xb156
movsd (%rax,%rdi,8), %xmm0
movsd (%rsi,%r9,8), %xmm1
maxsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rdi,8)
movsd (%rax,%r8,8), %xmm0
maxsd %xmm1, %xmm0
movsd %xmm0, (%rax,%r8,8)
incq %r9
jmp 0xb127
incq %rdx
subq $-0x80, %rcx
jmp 0xb0ff
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x136b6(%rip), %rdi     # 0x1e832
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x24d0
xorl %r12d, %r12d
leaq 0x136a5(%rip), %r15     # 0x1e839
movl (%r14), %eax
cmpq %rax, %r12
jae 0xb1b8
movq 0x10(%r14), %rax
movsd (%rax,%r12,8), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x22c0
incq %r12
jmp 0xb194
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x2260
leaq 0x13675(%rip), %rdi     # 0x1e83f
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x24d0
xorl %r12d, %r12d
leaq 0x1364a(%rip), %r15     # 0x1e82c
movl (%r14), %eax
cmpq %rax, %r12
jae 0xb206
movq 0x18(%r14), %rax
movsd (%rax,%r12,8), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x22c0
incq %r12
jmp 0xb1e2
pushq $0xa
popq %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2260
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x4
popq %rsi
movl $0x1000, %edi           # imm = 0x1000
callq 0x2290
movq %rax, %rbx
movl (%r14), %eax
pushq $0x20
popq %rcx
xorl %edx, %edx
xorpd %xmm0, %xmm0
movl $0xfff, %esi            # imm = 0xFFF
cmpq %rax, %rdx
je 0xb2a0
movq 0x10(%r14), %rdi
movq %rdx, %r8
shlq $0x7, %r8
movl 0x14(%rdi,%r8), %r8d
addq %rcx, %rdi
xorl %r9d, %r9d
cmpq %r8, %r9
je 0xb297
xorl %r10d, %r10d
cmpq $0x4, %r10
je 0xb292
movq (%rdi,%r10,8), %r11
movsd (%r11,%r9,8), %xmm1
ucomisd %xmm1, %xmm0
ja 0xb28d
cvttsd2si %xmm1, %r11d
cmpl %esi, %r11d
cmovael %esi, %r11d
incl (%rbx,%r11,4)
incq %r10
jmp 0xb267
incq %r9
jmp 0xb25f
incq %rdx
subq $-0x80, %rcx
jmp 0xb244
andl $0x0, (%rbx)
xorl %ecx, %ecx
xorl %eax, %eax
cmpq $0x1000, %rcx           # imm = 0x1000
je 0xb2bb
movl (%rbx,%rcx,4), %edx
addq %rdx, %rax
incq %rcx
jmp 0xb2a7
shrq %rax
xorl %r14d, %r14d
xorl %ecx, %ecx
movl %ecx, %edx
cmpq %rdx, %rax
jbe 0xb30c
cmpl $0xfff, %r14d           # imm = 0xFFF
je 0xb2e2
addl 0x4(%rbx,%r14,4), %ecx
movl %ecx, 0x4(%rbx,%r14,4)
incq %r14
jmp 0xb2c3
movq 0x1cd0f(%rip), %rax     # 0x27ff8
movq (%rax), %rdi
leaq 0x13553(%rip), %rsi     # 0x1e846
leaq 0x1357b(%rip), %rdx     # 0x1e875
movl $0x1000, %r14d          # imm = 0x1000
movl $0x1000, %ecx           # imm = 0x1000
xorl %eax, %eax
callq 0x22c0
movq %rbx, %rdi
callq 0x2060
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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
testw $0xf04, %ax             # imm = 0xF04
setne %cl
testw %ax, %ax
sete %al
orb %cl, %al
je 0xcbac
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 0x3362
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_O2/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
pushq $0x10
popq %rdi
callq 0x2330
movq %rax, %rbx
movl %ebp, (%rax)
movl %ebp, %eax
imulq $0x18, %rax, %r14
movq %r14, %rdi
callq 0x2330
movq %rax, 0x8(%rbx)
xorl %ecx, %ecx
xorps %xmm0, %xmm0
cmpq %rcx, %r14
je 0x1223b
movups %xmm0, (%rax,%rcx)
andq $0x0, 0x10(%rax,%rcx)
addq $0x18, %rcx
jmp 0x12226
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x12286
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x10
popq %r14
xorl %r15d, %r15d
movl (%rbx), %eax
movq 0x8(%rbx), %rdi
cmpq %rax, %r15
jae 0x12274
movq (%rdi,%r14), %rdi
callq 0x2060
incq %r15
addq $0x18, %r14
jmp 0x12257
callq 0x2060
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x122ae
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_O2/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
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r12d, %r12d
movl (%rbx), %eax
cmpq %rax, %r14
jae 0x12377
movq 0x8(%rbx), %rax
imulq $0x18, %r14, %r15
movq (%rax,%r15), %rbp
testq %rbp, %rbp
je 0x1236f
movq 0x10(%rax,%r15), %r13
movq %r13, %rdi
movq %rbp, %rsi
pushq $0x8
popq %rdx
leaq 0x91(%rip), %rcx        # 0x12389
callq 0x20e0
movq (%r13), %rdi
movq %rdi, %rdx
shrq $0x20, %rdx
pushq $0x1
popq %rcx
xorl %eax, %eax
movl %edi, %r9d
cmpq %rcx, %rbp
je 0x12351
movq (%r13,%rcx,8), %r8
movq %r8, %rsi
shrq $0x20, %rsi
cmpl %esi, %edx
jne 0x1232f
addl %r8d, %edi
movl %edi, %r8d
movl %edx, %esi
jmp 0x12347
testl %edi, %edi
je 0x12347
shlq $0x20, %rdx
orq %rdx, %r9
movq %r9, (%r13,%rax,8)
incq %rax
movq (%r13,%rcx,8), %r8
incq %rcx
movl %r8d, %edi
movl %esi, %edx
jmp 0x1230d
testl %edi, %edi
je 0x12364
shlq $0x20, %rdx
orq %rdx, %r9
movq %r9, (%r13,%rax,8)
incq %rax
movq 0x8(%rbx), %rcx
movq %rax, (%rcx,%r15)
addq %rax, %r12
incq %r14
jmp 0x122c3
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1313a
movl (%rbx), %esi
movl 0x4(%rbx), %eax
addl %eax, %eax
cmpl %eax, %esi
jbe 0x13128
decl %esi
jmp 0x1312a
incl %esi
movq %rbx, %rdi
callq 0x138bd
testl %eax, %eax
js 0x131d5
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 0x1317b
movl %r8d, %esi
jmp 0x131fc
pushq $0x1
popq %r11
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 0x131dc
testb $0x1, %r15b
jne 0x131b4
movq 0x18(%rbx), %r15
movl %r10d, %r12d
cmpq %rax, (%r15,%r12,8)
je 0x131dc
btl %ecx, %r14d
cmovbl %r10d, %esi
addl %r11d, %r10d
andl %r9d, %r10d
incl %r11d
cmpl %r8d, %r10d
jne 0x13184
movb $0x1, %cl
movl %edi, %r9d
cmpl %edi, %esi
je 0x131ec
jmp 0x131fc
movl (%rbx), %esi
jmp 0x1327a
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 0x1322c
testb $0x1, %r9b
jne 0x1325c
movslq %ebp, %rax
movq 0x20(%rbx), %rcx
movl %esi, %edx
addq %rax, (%rcx,%rdx,8)
jmp 0x13287
movq 0x18(%rbx), %r9
movl %esi, %r10d
pushq $0x3
popq %r11
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 0x1327a
movq 0x18(%rbx), %r9
pushq $0x3
popq %r10
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_O2/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)
xorl %ecx, %ecx
movq %rdi, 0x18(%rsp)
movl (%rdi), %eax
cmpq %rax, %rcx
jae 0x1367b
movq 0x8(%rdi), %rax
movq %rcx, 0x20(%rsp)
imulq $0x18, %rcx, %r15
movq (%rax,%r15), %r12
movq 0x10(%rax,%r15), %rbx
xorl %r13d, %r13d
xorl %ecx, %ecx
xorl %r14d, %r14d
cmpq %r14, %r12
je 0x1363a
movq (%rbx,%r14,8), %rax
movq %rax, %rbp
shrq $0x20, %rbp
cmpl %ebp, %ecx
jae 0x13630
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax,%r15), %rdx
movq 0x8(%rsp), %rdi
leaq 0xc14a(%rip), %rsi      # 0x1f769
movl %ebp, %r8d
movl %r13d, %r9d
xorl %eax, %eax
callq 0x22c0
movq (%rbx,%r14,8), %rax
addl %eax, %r13d
incq %r14
movl %ebp, %ecx
jmp 0x135f2
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax,%r15), %r8d
cmpl %r8d, %ecx
jae 0x13669
addq %r15, %rax
movq (%rax), %rdx
movq 0x8(%rsp), %rdi
leaq 0xc10a(%rip), %rsi      # 0x1f769
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x22c0
movq 0x20(%rsp), %rcx
incq %rcx
movq 0x18(%rsp), %rdi
jmp 0x135c9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xa250(%rip), %xmm0     # 0x1fcc0
andpd %xmm3, %xmm0
movsd 0x9e8c(%rip), %xmm1     # 0x1f908
ucomisd %xmm0, %xmm1
jae 0x15ac9
movapd %xmm3, %xmm0
movapd %xmm3, (%rsp)
callq 0x2550
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
movapd (%rsp), %xmm2
ucomisd %xmm0, %xmm2
jbe 0x15b27
movsd 0x9d01(%rip), %xmm0     # 0x1f7b0
divsd %xmm1, %xmm0
movsd 0x8725(%rip), %xmm2     # 0x1e1e0
addsd %xmm2, %xmm0
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
jmp 0x15b3b
movsd 0x9e3f(%rip), %xmm1     # 0x1f910
mulsd %xmm3, %xmm1
addsd 0x9e3b(%rip), %xmm1     # 0x1f918
mulsd %xmm3, %xmm1
addsd 0x9e37(%rip), %xmm1     # 0x1f920
movapd %xmm3, %xmm2
unpcklpd %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0]
movapd 0xa257(%rip), %xmm0     # 0x1fd50
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
mulpd %xmm2, %xmm0
addpd 0xa257(%rip), %xmm0     # 0x1fd60
mulpd %xmm2, %xmm0
addpd 0xa25b(%rip), %xmm0     # 0x1fd70
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
divsd %xmm1, %xmm0
mulsd %xmm3, %xmm0
jmp 0x15b3b
movsd 0x9c51(%rip), %xmm0     # 0x1f780
addsd %xmm0, %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x17172
jnp 0x171cc
ucomisd %xmm0, %xmm2
jne 0x1717a
jnp 0x171cc
testb %al, %al
jne 0x171cc
testb %dl, %dl
jne 0x171cc
movsd 0x7056(%rip), %xmm0     # 0x1e1e0
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 0x13b30
testl %ebx, %ebx
cmoveq %r15, %r14
movsd (%r14), %xmm0
jmp 0x17267
ucomisd %xmm0, %xmm1
jne 0x171f1
jp 0x171f1
ucomisd %xmm0, %xmm2
jne 0x171f1
jp 0x171f1
xorl %eax, %eax
testl %ecx, %ecx
sete %al
leaq 0x8ca6(%rip), %rcx      # 0x1fe90
movsd (%rcx,%rax,8), %xmm0
jmp 0x17267
ucomisd %xmm0, %xmm1
jne 0x171f9
jnp 0x17235
movapd %xmm1, %xmm3
divsd %xmm2, %xmm3
ucomisd %xmm0, %xmm3
jne 0x17209
jnp 0x17235
ucomisd %xmm0, %xmm2
jne 0x17211
jnp 0x1723f
divsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jne 0x1721d
jnp 0x1723f
movsd 0x6fbb(%rip), %xmm0     # 0x1e1e0
ucomisd %xmm4, %xmm0
jbe 0x17251
testl %ebx, %ebx
je 0x17255
xorpd %xmm0, %xmm0
jmp 0x17243
testl %ebx, %ebx
je 0x17243
testl %ecx, %ecx
je 0x1725f
jmp 0x17267
testl %ebx, %ebx
je 0x17239
testl %ecx, %ecx
je 0x17267
movsd 0x8529(%rip), %xmm0     # 0x1f778
jmp 0x17267
testl %ebx, %ebx
je 0x1722f
testl %ecx, %ecx
je 0x1725f
xorpd %xmm0, %xmm0
jmp 0x17267
movsd 0x73b1(%rip), %xmm0     # 0x1e618
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x17296
ucomisd 0x7395(%rip), %xmm0     # 0x1e618
jb 0x1712b
testl %edi, %edi
je 0x1729a
testl %esi, %esi
je 0x172ab
xorpd %xmm0, %xmm0
retq
testl %edi, %edi
je 0x1728d
xorpd %xmm0, %xmm0
testl %esi, %esi
je 0x172aa
movsd 0x84ce(%rip), %xmm0     # 0x1f778
retq
movsd 0x7365(%rip), %xmm0     # 0x1e618
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x172f1
testl %ebp, %ebp
jne 0x1735b
testl %ebx, %ebx
je 0x1734d
jmp 0x17367
movapd %xmm2, %xmm0
addsd 0x883b(%rip), %xmm0     # 0x1fb38
movsd %xmm1, 0x8(%rsp)
callq 0x2470
movsd 0x8(%rsp), %xmm2
ucomisd %xmm2, %xmm0
jae 0x1733f
movapd %xmm0, %xmm1
subsd %xmm0, %xmm2
addsd 0x72f4(%rip), %xmm1     # 0x1e618
xorl %edi, %edi
testl %ebp, %ebp
sete %dil
movsd 0x10(%rsp), %xmm0
movl %ebx, %esi
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x17271
testl %ebp, %ebp
je 0x17357
testl %ebx, %ebx
je 0x1734d
xorpd %xmm0, %xmm0
jmp 0x17367
movsd 0x72c3(%rip), %xmm0     # 0x1e618
jmp 0x17367
xorpd %xmm0, %xmm0
testl %ebx, %ebx
je 0x17367
movsd 0x8411(%rip), %xmm0     # 0x1f778
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]yahs/binomlite.c
// Function: do_search
static double do_search(double y, double *z, double p, double n, double pr, double incr)
{
    if (*z >= p) {
        /* search to the left */
        for (;;) {
            double newz;
            if (y == 0 || (newz = pbinom(y - incr, n, pr, 1, 0)) < p)
                return y;
            y = fmax2(0, y - incr);
            *z = newz;
        }
    } else {
        /* search to the right */
        for (;;) {
            y = fmin2(y + incr, n);
            if (y == n || (*z = pbinom(y, n, pr, 1, 0)) >= p)
                return y;
        }
    }
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x58, %rsp
movsd %xmm4, 0x18(%rsp)
movsd %xmm3, 0x10(%rsp)
movq %rdi, %rbx
movapd %xmm0, %xmm3
movsd (%rdi), %xmm0
movsd %xmm1, 0x8(%rsp)
ucomisd %xmm1, %xmm0
movapd %xmm2, 0x30(%rsp)
jae 0x17706
pushq $0x1
popq %rbp
movapd %xmm3, 0x20(%rsp)
movapd 0x20(%rsp), %xmm1
addsd 0x18(%rsp), %xmm1
movapd %xmm1, %xmm0
cmplesd %xmm2, %xmm0
andpd %xmm0, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm0, %xmm1
ucomisd %xmm2, %xmm1
movapd %xmm1, 0x20(%rsp)
jne 0x176d1
jnp 0x176fa
movapd %xmm1, %xmm0
movapd %xmm2, %xmm1
movsd 0x10(%rsp), %xmm2
movl %ebp, %edi
xorl %esi, %esi
callq 0x172b4
movapd 0x30(%rsp), %xmm2
movsd %xmm0, (%rbx)
ucomisd 0x8(%rsp), %xmm0
jb 0x176a2
movaps 0x20(%rsp), %xmm0
addq $0x58, %rsp
popq %rbx
popq %rbp
retq
xorpd %xmm0, %xmm0
pushq $0x1
popq %rbp
ucomisd %xmm0, %xmm3
movapd %xmm3, 0x20(%rsp)
jne 0x1771b
jnp 0x176fa
movapd %xmm3, %xmm0
subsd 0x18(%rsp), %xmm0
movapd %xmm0, 0x40(%rsp)
movapd %xmm2, %xmm1
movsd 0x10(%rsp), %xmm2
movl %ebp, %edi
xorl %esi, %esi
callq 0x172b4
movapd 0x30(%rsp), %xmm2
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x176fa
movsd %xmm0, (%rbx)
movapd 0x40(%rsp), %xmm1
movapd %xmm1, %xmm3
xorpd %xmm0, %xmm0
cmplesd %xmm0, %xmm3
andnpd %xmm1, %xmm3
jmp 0x1770d
// File: /workspace/github_c_makefile_star2_O2/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 0x7ded(%rip), %xmm1     # 0x1fcc0
andpd %xmm0, %xmm1
ucomisd 0x79f1(%rip), %xmm1     # 0x1f8d0
jbe 0x17eee
addsd 0x672f(%rip), %xmm0     # 0x1e618
jmp 0x2240
movsd 0x79ea(%rip), %xmm1     # 0x1f8e0
addsd %xmm0, %xmm1
divsd %xmm1, %xmm0
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
movapd 0x7f8e(%rip), %xmm2     # 0x1fea0
mulpd %xmm1, %xmm2
addpd 0x7f92(%rip), %xmm2     # 0x1feb0
mulpd %xmm1, %xmm2
addpd 0x7f96(%rip), %xmm2     # 0x1fec0
mulpd %xmm1, %xmm2
addpd 0x7e3a(%rip), %xmm2     # 0x1fd70
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_O2/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 0x183b6
cvtsi2sd %edi, %xmm0
addsd %xmm3, %xmm0
jmp 0x18429
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm3
jbe 0x183e3
testl %edi, %edi
jg 0x18403
cvtsi2sd %edi, %xmm1
movapd %xmm1, %xmm0
addsd %xmm3, %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm2
ja 0x183fd
addq $0x18, %rsp
jmp 0x2550
testl %edi, %edi
js 0x18403
cvtsi2sd %edi, %xmm1
movapd %xmm1, %xmm0
addsd %xmm3, %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jbe 0x183da
movapd %xmm1, %xmm0
jmp 0x18407
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_O2/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 0x7482(%rip), %xmm1     # 0x1f8b8
ucomisd %xmm0, %xmm1
jbe 0x184aa
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movapd 0x7ae4(%rip), %xmm2     # 0x1ff30
mulpd %xmm1, %xmm2
addpd 0x7ae8(%rip), %xmm2     # 0x1ff40
mulpd %xmm1, %xmm2
addpd 0x7aec(%rip), %xmm2     # 0x1ff50
mulpd %xmm1, %xmm2
addpd 0x7af0(%rip), %xmm2     # 0x1ff60
mulpd %xmm1, %xmm2
addpd 0x7af4(%rip), %xmm2     # 0x1ff70
mulpd %xmm1, %xmm2
addpd 0x7af8(%rip), %xmm2     # 0x1ff80
mulpd %xmm1, %xmm2
addpd 0x7afc(%rip), %xmm2     # 0x1ff90
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
divsd %xmm1, %xmm2
xorpd 0x7828(%rip), %xmm0     # 0x1fcd0
jmp 0x18512
movsd 0x72ce(%rip), %xmm1     # 0x1f780
addsd %xmm1, %xmm0
addsd %xmm1, %xmm0
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movapd 0x7a06(%rip), %xmm2     # 0x1fed0
mulpd %xmm1, %xmm2
addpd 0x7a0a(%rip), %xmm2     # 0x1fee0
mulpd %xmm1, %xmm2
addpd 0x7a0e(%rip), %xmm2     # 0x1fef0
mulpd %xmm1, %xmm2
addpd 0x7a12(%rip), %xmm2     # 0x1ff00
mulpd %xmm1, %xmm2
addpd 0x7a16(%rip), %xmm2     # 0x1ff10
mulpd %xmm1, %xmm2
addpd 0x7a1a(%rip), %xmm2     # 0x1ff20
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
divsd %xmm1, %xmm2
mulsd %xmm2, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x73a7(%rip), %xmm0     # 0x1fc48
ucomisd %xmm5, %xmm0
ja 0x188e5
ucomisd 0x73a1(%rip), %xmm5     # 0x1fc50
ja 0x188e5
movsd 0x739f(%rip), %xmm0     # 0x1fc58
ucomisd %xmm5, %xmm0
jbe 0x18913
movsd 0x6f61(%rip), %xmm0     # 0x1f828
addsd %xmm0, %xmm5
divsd 0x6f6d(%rip), %xmm5     # 0x1f840
mulsd %xmm5, %xmm0
movsd 0x7399(%rip), %xmm1     # 0x1fc78
subsd %xmm0, %xmm1
jmp 0x18945
pushq %rax
movsd 0x58f2(%rip), %xmm1     # 0x1e1e0
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 0x7341(%rip), %xmm5     # 0x1fc60
jbe 0x18945
mulsd 0x733f(%rip), %xmm5     # 0x1fc68
addsd 0x6e97(%rip), %xmm5     # 0x1f7c8
movapd %xmm5, %xmm1
divsd 0x6e9b(%rip), %xmm1     # 0x1f7d8
addsd 0x732b(%rip), %xmm1     # 0x1fc70
movsd 0x6f93(%rip), %xmm0     # 0x1f8e0
addsd %xmm5, %xmm0
divsd %xmm0, %xmm5
movapd %xmm5, %xmm2
mulsd %xmm5, %xmm2
movapd %xmm2, %xmm0
unpcklpd %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
movapd 0x7633(%rip), %xmm3     # 0x1ffa0
mulpd %xmm0, %xmm3
addpd 0x7637(%rip), %xmm3     # 0x1ffb0
mulpd %xmm0, %xmm3
addpd 0x763b(%rip), %xmm3     # 0x1ffc0
movapd %xmm3, %xmm0
unpckhpd %xmm3, %xmm0            # xmm0 = xmm0[1],xmm3[1]
divsd %xmm0, %xmm3
addsd %xmm2, %xmm2
movsd 0x5c7b(%rip), %xmm0     # 0x1e618
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_O2/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 0x713d(%rip), %xmm1     # 0x1fc80
ucomisd %xmm0, %xmm1
jae 0x18ba3
movsd 0x7137(%rip), %xmm1     # 0x1fc88
ucomisd %xmm0, %xmm1
jae 0x18bd2
movsd 0x5689(%rip), %xmm1     # 0x1e1e8
ucomisd %xmm0, %xmm1
jbe 0x18beb
movsd 0x7127(%rip), %xmm1     # 0x1fc98
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovgl %ecx, %eax
movsd 0x5a90(%rip), %xmm2     # 0x1e618
movsd 0x6c20(%rip), %xmm1     # 0x1f7b0
addsd %xmm1, %xmm0
subl $0x1, %eax
jb 0x18c7c
mulsd %xmm0, %xmm2
jmp 0x18b90
movsd %xmm0, 0x8(%rsp)
callq 0x1842e
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2240
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
jmp 0x18c9e
movsd 0x6ba6(%rip), %xmm1     # 0x1f780
addsd %xmm1, %xmm0
addsd %xmm1, %xmm0
addq $0x18, %rsp
jmp 0x1842e
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movsd 0x5a1d(%rip), %xmm1     # 0x1e618
divsd %xmm2, %xmm1
movsd 0x6f69(%rip), %xmm2     # 0x1fb70
mulsd %xmm1, %xmm2
addsd 0x6f65(%rip), %xmm2     # 0x1fb78
mulsd %xmm1, %xmm2
addsd 0x6f61(%rip), %xmm2     # 0x1fb80
mulsd %xmm1, %xmm2
addsd 0x6f5d(%rip), %xmm2     # 0x1fb88
mulsd %xmm1, %xmm2
addsd 0x6f59(%rip), %xmm2     # 0x1fb90
mulsd %xmm1, %xmm2
addsd 0x6f55(%rip), %xmm2     # 0x1fb98
divsd %xmm0, %xmm2
addsd 0x7041(%rip), %xmm2     # 0x1fc90
movsd %xmm2, 0x10(%rsp)
movsd 0x6b23(%rip), %xmm1     # 0x1f780
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
callq 0x2240
addsd 0x6b3c(%rip), %xmm0     # 0x1f7b0
mulsd 0x8(%rsp), %xmm0
jmp 0x18c98
movsd %xmm2, 0x8(%rsp)
callq 0x1842e
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2240
addsd 0x10(%rsp), %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6fed(%rip), %xmm2     # 0x1fca0
movsd 0x6c95(%rip), %xmm0     # 0x1f950
ucomisd %xmm2, %xmm0
jae 0x18d0d
subq $0x18, %rsp
movsd 0x6fdb(%rip), %xmm0     # 0x1fca8
ucomisd %xmm2, %xmm0
movsd %xmm2, 0x10(%rsp)
jae 0x18d1e
movsd 0x6acf(%rip), %xmm0     # 0x1f7b0
addsd %xmm2, %xmm0
callq 0x1842e
movsd %xmm0, 0x8(%rsp)
movsd 0x5920(%rip), %xmm0     # 0x1e618
movsd 0x10(%rsp), %xmm1
addsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
callq 0x2240
jmp 0x18d38
addsd 0x5903(%rip), %xmm2     # 0x1e618
movapd %xmm2, %xmm0
jmp 0x1842e
movapd %xmm2, %xmm0
callq 0x1842e
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x17ecb
addsd 0x8(%rsp), %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
movl %edi, %ebp
pushq $0x18
popq %rdi
callq 0x2330
movq %rax, %rbx
movl %ebp, (%rax)
andq $0x0, 0x8(%rax)
movl %ebp, %r14d
shlq $0x4, %r14
movq %r14, %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x18fd6
andq $0x0, 0x8(%rax,%rcx)
addq $0x10, %rcx
jmp 0x18fc5
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x19021
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x8
popq %r14
xorl %r15d, %r15d
movl (%rbx), %eax
movq 0x10(%rbx), %rdi
cmpq %rax, %r15
jae 0x1900f
movq (%rdi,%r14), %rdi
callq 0x2060
incq %r15
addq $0x10, %r14
jmp 0x18ff2
callq 0x2060
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1946c
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
movl (%rdi), %r15d
movq %r15, %rdi
shlq $0x3, %rdi
callq 0x2330
movl %ebx, %ecx
cvtsi2sd %rcx, %xmm2
xorl %r12d, %r12d
movq %rax, 0x8(%rsp)
movsd %xmm2, (%rsp)
movl %r15d, %ecx
cmpq %rcx, %r12
jae 0x1945d
movq 0x10(%r14), %rax
movq %r12, %rcx
shlq $0x4, %rcx
movl (%rax,%rcx), %edi
movl 0x4(%rax,%rcx), %r15d
movq 0x8(%rax,%rcx), %rbp
movq %rdi, 0x10(%rsp)
movl %ebx, %esi
callq 0x28ff
movl %eax, %r13d
movq %r13, %rdi
pushq $0x8
popq %rsi
callq 0x2290
movsd 0x527d(%rip), %xmm1     # 0x1e618
movsd (%rsp), %xmm2
movq %rax, %rcx
xorl %esi, %esi
cmpq %rsi, %r15
je 0x193c5
movl (%rbp,%rsi,4), %eax
xorl %edx, %edx
divl %ebx
movsd (%rcx,%rax,8), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rcx,%rax,8)
incq %rsi
jmp 0x193a5
leal -0x1(%r13), %eax
xorl %edx, %edx
movsd 0x6d0d(%rip), %xmm3     # 0x200e0
cmpq %rdx, %rax
je 0x193f5
movsd 0x8(%r14), %xmm0
mulsd %xmm2, %xmm0
movsd (%rcx,%rdx,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%rdx,8)
incq %rdx
jmp 0x193d3
movl 0x10(%rsp), %edx
cvtsi2sd %rdx, %xmm0
cvtsi2sd %rax, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
mulsd 0x8(%r14), %xmm0
movsd (%rcx,%rax,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%rax,8)
xorl %eax, %eax
movsd 0x51f7(%rip), %xmm1     # 0x1e620
cmpq %rax, %r13
je 0x19449
movsd (%rcx,%rax,8), %xmm0
ucomisd %xmm0, %xmm1
ja 0x1943f
ucomisd %xmm3, %xmm0
jbe 0x19444
andq $0x0, (%rcx,%rax,8)
incq %rax
jmp 0x19429
movq 0x8(%rsp), %rax
movq %rcx, (%rax,%r12,8)
incq %r12
movl (%r14), %r15d
jmp 0x19355
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_O2/c-zhou[P]yahs/enzyme.c
// Function: bin_search
static uint32_t bin_search(uint32_t *a, uint32_t n, uint32_t s)
{
    uint32_t low, high, mid;
    low = 0;
    high = n;
    while (low != high) {
        mid = (low >> 1) + (high >> 1);
        if (a[mid] < s)
            low = mid + 1;
        else
            high = mid;
    }
    return low;
}

// Assembly:
movl %esi, %eax
xorl %ecx, %ecx
cmpl %eax, %ecx
je 0x19719
movl %ecx, %esi
shrl %esi
movl %eax, %r8d
shrl %r8d
leal (%rsi,%r8), %r9d
cmpl %edx, (%rdi,%r9,4)
jb 0x19711
movl %r9d, %eax
jmp 0x196f4
leal (%rsi,%r8), %ecx
incl %ecx
jmp 0x196f4
retq
// File: /workspace/github_c_makefile_star2_O2/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:
testq %rdi, %rdi
je 0x19a6b
pushq %rbx
movq %rdi, %rbx
callq 0x2160
movq %rax, %rcx
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
leaq 0xea89(%rip), %rsi      # 0x284d0
pushq $0x1
popq %rdx
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x19a69
movzbl (%rbx,%rdi), %r8d
movb (%r8,%rsi), %r8b
addb $-0x5, %r8b
incq %rdi
cmpb $-0x5, %r8b
ja 0x19a4c
movl %edx, %eax
popq %rbx
retq
xorl %eax, %eax
retq