LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: add_next
static void add_next(llnode *node, struct list_node *next)
{
    if (node->n_m == node->n_n)
        MYEXPAND(node->next, node->n_m);
    node->next[node->n_n] = next;
    node->n_n++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rcx
cmpq %rcx, %rax
jne 0x7002
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x20, %rax
orq %rcx, %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%rbx)
movq 0x20(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x3330
movq %rax, 0x20(%rbx)
movq 0x18(%rbx), %rcx
jmp 0x7006
movq 0x20(%rbx), %rax
movq %r14, (%rax,%rcx,8)
incq %rcx
movq %rcx, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: rev_array
static inline void rev_array(uint32_t *arr, uint32_t n)
{
    uint32_t tmp, i, j;
    if (n == 0) return;
    for (i = 0, j = n - 1; i < j; ++i, --j) {
        tmp = arr[i];
        arr[i] = arr[j];
        arr[j] = tmp;
    }
}

// Assembly:
testl %esi, %esi
je 0x703d
movl %esi, %eax
decq %rax
xorl %ecx, %ecx
cmpq %rax, %rcx
jae 0x703d
movl (%rdi,%rcx,4), %edx
movl (%rdi,%rax,4), %esi
movl %esi, (%rdi,%rcx,4)
movl %edx, (%rdi,%rax,4)
incq %rcx
decq %rax
jmp 0x7024
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: llnode_destroy
static void llnode_destroy(llnode *node)
{
    size_t i;
    for (i = 0; i < node->n_n; ++i)
        llnode_destroy(node->next[i]);
    free(node->next);
    free(node);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x20(%rbx), %rdi
cmpq 0x18(%rbx), %r14
jae 0x710a
movq (%rdi,%r14,8), %rdi
callq 0x70e8
incq %r14
jmp 0x70f2
callq 0x3060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3060
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: strdup1
static char *strdup1(char *src, uint32_t n)
{
    char *dst;
    MYMALLOC(dst, n+1);
    memcpy(dst, src, n);
    dst[n] = '\0';
    return dst;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leal 0x1(%rbx), %edi
callq 0x32f0
movq %rax, %r15
movl %ebx, %ebx
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x32c0
movb $0x0, (%r15,%rbx)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: asg_name2id
uint32_t asg_name2id(asg_t *g, char *name)
{
    sdhash_t *h = g->h_seg;
    khint_t k;
    k = kh_sdict_get(h, name);
    return k == kh_end(h)? UINT32_MAX : kh_val(h, k);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x18(%rdi), %r12
movq 0x10(%r12), %rcx
pushq $-0x1
popq %rax
movq %rcx, 0x8(%rsp)
testq %rcx, %rcx
je 0x7615
movq %rsi, %r14
movb (%r12), %bpl
pushq $0x1
popq %rax
movl %ebp, %ecx
shll %cl, %eax
movq %rax, 0x10(%rsp)
leal -0x1(%rax), %r13d
movq %rsi, %rdi
callq 0xf20a
imull $0x9e3779b9, %eax, %ebx # imm = 0x9E3779B9
negb %bpl
movl %ebp, %ecx
shrl %cl, %ebx
movq 0x8(%r12), %r12
movl %ebx, %ebp
movl %ebp, %eax
shrl $0x5, %eax
movl (%r12,%rax,4), %eax
btl %ebp, %eax
jae 0x7612
movl %ebp, %r15d
imulq $0xc, %r15, %rax
movq 0x8(%rsp), %rcx
movq (%rcx,%rax), %rdi
movq %r14, %rsi
callq 0x3250
testl %eax, %eax
je 0x7624
incl %ebp
andl %r13d, %ebp
cmpl %ebx, %ebp
jne 0x75df
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl 0x10(%rsp), %ebp
pushq $-0x1
popq %rax
je 0x7615
imulq $0xc, %r15, %rax
movq 0x8(%rsp), %rcx
movl 0x8(%rcx,%rax), %eax
jmp 0x7615
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: path_sort
void path_sort(path_v *paths)
{
    // sort by wlen -> len -> circ -> nv
    qsort(paths->a, paths->n, sizeof(path_t), pcmpfunc);

    size_t i;
    double b_ll, b_cl;
    b_ll = b_cl = .0;
    for (i = 0 ; i < paths->n; ++i) {
        if (!paths->a[i].circ && paths->a[i].wlen > b_ll)
            b_ll = paths->a[i].wlen;
        if (paths->a[i].circ && paths->a[i].wlen > b_cl)
            b_cl = paths->a[i].wlen;
    }
    if (b_cl >= b_ll)
        b_ll = DBL_MAX;
    // find best
    for (i = 0 ; i < paths->n; ++i) {
        if (!paths->a[i].circ && paths->a[i].wlen >= b_ll)
            paths->a[i].best = 1;
        if (paths->a[i].circ && paths->a[i].wlen >= b_cl)
            paths->a[i].best = 1;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x10(%rdi), %rdi
leaq 0xc4(%rip), %rcx        # 0x7712
pushq $0x30
popq %rdx
callq 0x30c0
movq (%rbx), %rax
xorpd %xmm2, %xmm2
pushq $0x20
popq %rcx
movq %rax, %rdx
xorpd %xmm0, %xmm0
subq $0x1, %rdx
jb 0x7699
movq 0x10(%rbx), %rsi
testb $0x40, -0x15(%rsi,%rcx)
movsd (%rsi,%rcx), %xmm1
jne 0x7689
ucomisd %xmm2, %xmm1
jbe 0x7693
movapd %xmm1, %xmm2
jmp 0x7693
ucomisd %xmm0, %xmm1
jbe 0x7693
movapd %xmm1, %xmm0
addq $0x30, %rcx
jmp 0x7667
movapd %xmm2, %xmm1
cmpnlesd %xmm0, %xmm1
andpd %xmm1, %xmm2
movsd 0xedea(%rip), %xmm3     # 0x16498
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
pushq $0x8
popq %rcx
xorl %edx, %edx
cmpq %rax, %rdx
jae 0x7710
movq 0x10(%rbx), %rax
movl (%rax,%rcx), %esi
btl $0x1e, %esi
jb 0x76ef
movsd 0x18(%rax,%rcx), %xmm2
ucomisd %xmm1, %xmm2
jb 0x7704
orl $0x80000000, %esi       # imm = 0x80000000
movl %esi, (%rax,%rcx)
movq 0x10(%rbx), %rax
movl (%rax,%rcx), %esi
btl $0x1e, %esi
jae 0x7704
movsd 0x18(%rax,%rcx), %xmm2
ucomisd %xmm0, %xmm2
jb 0x7704
orl $0x80000000, %esi       # imm = 0x80000000
movl %esi, (%rax,%rcx)
incq %rdx
movq (%rbx), %rax
addq $0x30, %rcx
jmp 0x76bb
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: pcmpfunc
static int pcmpfunc(const void *a, const void *b)
{
    path_t x, y;
    x = *(path_t *) a;
    y = *(path_t *) b;
    if (x.wlen != y.wlen)
        return (x.wlen < y.wlen) - (x.wlen > y.wlen);
    if (x.len != y.len)
        return (x.len < y.len) - (x.len > y.len);
    if (x.circ != y.circ)
        return x.circ? -1 : 1;
    if (x.srcc != y.srcc)
        return (x.srcc < y.srcc) - (x.srcc > y.srcc);
    if (x.nv != y.nv)
        return (x.nv < y.nv) - (x.nv > y.nv);

    return 0;
}

// Assembly:
movsd 0x20(%rdi), %xmm0
movsd 0x20(%rsi), %xmm1
ucomisd %xmm1, %xmm0
jne 0x7724
jnp 0x7739
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
xorl %ecx, %ecx
ucomisd %xmm1, %xmm0
seta %cl
subl %ecx, %eax
retq
movl 0x18(%rsi), %eax
cmpl %eax, 0x18(%rdi)
jne 0x777d
movl 0x8(%rdi), %ecx
movl 0x8(%rsi), %edx
movl %ecx, %eax
shrl $0x1e, %eax
andl $0x1, %eax
btl $0x1e, %edx
movl %eax, %r8d
sbbl $0x0, %r8d
jne 0x7789
movsd 0x28(%rdi), %xmm0
movsd 0x28(%rsi), %xmm1
ucomisd %xmm1, %xmm0
jne 0x7724
jp 0x7724
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
andl %eax, %ecx
andl %eax, %edx
xorl %eax, %eax
cmpl %edx, %ecx
je 0x7788
seta %al
movzbl %al, %eax
sbbl $0x0, %eax
negl %eax
retq
negl %eax
orl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: path_rotate
void path_rotate(asg_t *g, path_t *path, hmm_annot_db_t *annots, OG_TYPE_t og_type)
{
    double coeff, coeff_rev;
    coeff = path_rotate_core(g, path, annots, og_type);

    rev_path(path);
    coeff_rev = path_rotate_core(g, path, annots, og_type);

    if (coeff > coeff_rev) {
        // redo rev complement
        rev_path(path);
        if (path->circ)
            // make the last element the first
            array_left_rotate(path->v, path->nv-1, path->nv);
    } else {
        coeff = coeff_rev;
    }

    path->srcc = coeff;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
callq 0x7806
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x8459
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x7806
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x77f6
movq %rbx, %rdi
callq 0x8459
movl 0x8(%rbx), %edx
btl $0x1e, %edx
jae 0x77f1
movq 0x10(%rbx), %rdi
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
leal -0x1(%rdx), %esi
callq 0x848d
movsd (%rsp), %xmm0
movsd %xmm0, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: rev_path
static inline void rev_path(path_t *path)
{
    size_t i;
    rev_array(path->v, path->nv);
    for (i = 0; i < path->nv; ++i)
        path->v[i] ^= 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
andl 0x8(%rbx), %esi
callq 0x7019
xorl %eax, %eax
movl 0x8(%rbx), %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
cmpq %rcx, %rax
jae 0x848b
movq 0x10(%rbx), %rcx
xorl $0x1, (%rcx,%rax,4)
incq %rax
jmp 0x8470
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: array_left_rotate
static void array_left_rotate(uint32_t arr[], uint32_t d, uint32_t n)
{
    uint32_t i, j;
    // if number of elements to be rotated is more than array size
    if(d > n)
        d = d % n;
    if(d == 0 || d == n)
        return;
    i = d;
    j = n - d;
    while (i != j) {
        if(i < j) { // left block arr[0..d-1] is shorter
            swap(arr, d-i, d+j-i, i);
            j -= i;
        } else { // rigth block arr[d..n-1] is shorter
            swap(arr, d-i, d, j);
            i -= j;
        }
    }
    // finally, block swap A and B
    swap(arr, d-i, d, i);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
cmpl %edx, %esi
jbe 0x84ab
movl %ebp, %eax
xorl %edx, %edx
divl %ebx
movl %edx, %ebp
testl %ebp, %ebp
sete %al
subl %ebp, %ebx
sete %cl
orb %al, %cl
je 0x84c8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %r15d
movl %ebp, %r12d
subl %r15d, %r12d
movl %r15d, %r13d
subl %ebx, %r13d
je 0x8506
jae 0x84f2
leal (%r12,%rbx), %edx
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %ecx
callq 0xf225
subl %r15d, %ebx
jmp 0x84d1
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
movl %ebx, %ecx
callq 0xf225
movl %r13d, %r15d
jmp 0x84cb
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
movl %r15d, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf225
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: put_chars
static void put_chars(char *seq, int len, int rv, int ow, FILE *fo, uint64_t *l, int line_wd)
{
    int i;
    if (!rv) {
        // forward
        for (i = ow; i < len; ++i) {
            fputc(seq[i], fo);
            if (++(*l) % line_wd == 0)
                fputc('\n', fo);
        }
    } else {
         // reverse
        for (i = len - ow - 1; i >= 0; --i) {
            fputc(comp_table[(int) seq[i]], fo);
            if (++(*l) % line_wd == 0)
                fputc('\n', fo);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movl %ecx, %ebp
movq %rdi, %r15
movl 0x40(%rsp), %eax
testl %edx, %edx
je 0x8c7d
notl %ebp
addl %esi, %ebp
movslq %eax, %r13
leaq 0xd9bd(%rip), %r12      # 0x16600
testl %ebp, %ebp
js 0x8cbb
movl %ebp, %eax
movsbq (%r15,%rax), %rax
movsbl (%rax,%r12), %edi
movq %r14, %rsi
callq 0x3200
movq (%rbx), %rax
incq %rax
movq %rax, (%rbx)
xorl %edx, %edx
divq %r13
testq %rdx, %rdx
jne 0x8c79
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0x3200
decl %ebp
jmp 0x8c43
movslq %eax, %r12
movslq %ebp, %r13
movslq %esi, %rbp
cmpq %rbp, %r13
jge 0x8cbb
movsbl (%r15,%r13), %edi
movq %r14, %rsi
callq 0x3200
movq (%rbx), %rax
incq %rax
movq %rax, (%rbx)
xorl %edx, %edx
divq %r12
testq %rdx, %rdx
jne 0x8cb6
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0x3200
incq %r13
jmp 0x8c86
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]oatk/path.c
// Function: print_all_best_seqs
void print_all_best_seqs(asg_t *g, path_v *paths, FILE *fo)
{
    if (paths->n == 0)
        return;

    size_t i;
    for (i = 0; i < paths->n; ++i)
        if (!!paths->a[i].best)
            print_seq(g, &paths->a[i], fo, i, 0, 60, 100);
}

// Assembly:
movq (%rsi), %rax
testq %rax, %rax
je 0x91a2
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
pushq $0x3c
popq %rbp
xorl %r12d, %r12d
cmpq %rax, %r12
jae 0x9194
movq 0x10(%r14), %rsi
cmpl $0x0, 0x8(%rsi,%r13)
jns 0x918b
addq %r13, %rsi
movl $0x64, (%rsp)
movq %r15, %rdi
movq %rbx, %rdx
movl %r12d, %ecx
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x8746
movq (%r14), %rax
incq %r12
addq $0x30, %r13
jmp 0x9159
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]oatk/path.c
// Function: asg_destroy
void asg_destroy(asg_t *g)
{
    if (!g) return;
    uint64_t i;
    for (i = 0; i < g->n_seg; ++i)
        asg_seg_destroy(&g->seg[i]);
    free(g->seg);
    // key has been freed by asg_seg_destroy
    if (g->h_seg) kh_sdict_destroy(g->h_seg);
    if (g->asmg) asmg_destroy(g->asmg);
    free(g);
}

// Assembly:
testq %rdi, %rdi
je 0x9282
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x8
popq %r15
xorl %r12d, %r12d
movq 0x10(%rbx), %r14
cmpq 0x8(%rbx), %r12
jae 0x9229
movq -0x8(%r14,%r15), %rdi
callq 0x3060
movq (%r14,%r15), %rdi
callq 0x3060
incq %r12
addq $0x18, %r15
jmp 0x9203
movq %r14, %rdi
callq 0x3060
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x9261
movq 0x10(%r14), %rsi
movq 0x18(%r14), %r15
movq %r15, %rdi
callq 0x1463f
movq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x1463f
movq %r15, %rdi
movq %r14, %rsi
callq 0x1463f
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x926f
callq 0xf9e0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3060
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: asg_add_seg
uint32_t asg_add_seg(asg_t *g, char *name, int allow_dups)
{
    if (!name)
        return UINT32_MAX;
    sdhash_t *h = g->h_seg;
    khint_t k;
    int absent;
    k = kh_sdict_put(h, name, &absent);
    if (absent) {
        asg_seg_t *s;
        if (g->n_seg == g->m_seg)
            MYEXPAND(g->seg, g->m_seg);
        s = &g->seg[g->n_seg];
        s->len = 0;
        s->seq = 0;
        s->cov = 0;
        kh_key(h, k) = s->name = strdup(name);
        kh_val(h, k) = g->n_seg++;
    } else if (!allow_dups) {
        fprintf(stderr, "[E::%s] duplicate segment '%s'\n", __func__, name);
        exit(EXIT_FAILURE);
    }
    return kh_val(h, k);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x9322
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %r15
leaq 0x4(%rsp), %r13
movq %r15, %rdi
movq %r13, %rdx
callq 0x93b5
cmpl $0x0, (%r13)
je 0x9328
movl %eax, (%rsp)
movq 0x8(%r14), %r12
cmpq (%r14), %r12
jne 0x933e
movq %r12, %rax
shrq %rax
orq %r12, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x10, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x20, %rcx
orq %rax, %rcx
incq %rcx
movq %rcx, (%r14)
movq 0x10(%r14), %rdi
imulq $0x18, %rcx, %rsi
callq 0x3330
movq %rax, %r13
movq %rax, 0x10(%r14)
movq 0x8(%r14), %r12
jmp 0x9342
pushq $-0x1
popq %r12
jmp 0x9379
testl %r12d, %r12d
je 0x938b
movq 0x10(%r15), %rdx
movl %eax, %ecx
imulq $0xc, %rcx, %rcx
movl 0x8(%rdx,%rcx), %r12d
jmp 0x9379
movq 0x10(%r14), %r13
imulq $0x18, %r12, %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r13,%rbp)
movq %rbx, %rdi
callq 0x3480
movq %rax, (%r13,%rbp)
movq 0x10(%r15), %rcx
movl (%rsp), %edx
imulq $0xc, %rdx, %rdx
movq %rax, (%rcx,%rdx)
leaq 0x1(%r12), %rax
movq %rax, 0x8(%r14)
movl %r12d, 0x8(%rcx,%rdx)
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x13c66(%rip), %rax     # 0x1cff8
movq (%rax), %rdi
leaq 0xd6c9(%rip), %rsi      # 0x16a65
leaq 0xd6e2(%rip), %rdx      # 0x16a85
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3290
pushq $0x1
popq %rdi
callq 0x3430
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: asg_add_seg1
uint32_t asg_add_seg1(asg_t *g, char *name, char *seq, uint32_t len, uint64_t cov, int allow_dups)
{
    uint32_t k = asg_add_seg(g, name, allow_dups);
    asg_seg_t *s = &g->seg[k];
    s->seq = strdup(seq);
    s->len = len;
    s->cov = cov;
    return k;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %r15
movl %r9d, %edx
callq 0x9283
movl %eax, %r12d
movq 0x10(%r15), %r15
movl %eax, %eax
imulq $0x18, %rax, %r13
movq %r14, %rdi
callq 0x3480
movq %rax, 0x8(%r15,%r13)
movl %ebp, 0x10(%r15,%r13)
movl %ebx, 0x14(%r15,%r13)
movl %r12d, %eax
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]oatk/path.c
// Function: asg_make_asmg_copy
asmg_t *asg_make_asmg_copy(asmg_t *g, asmg_t *_g)
{
    asmg_t *g1;
    
    if (_g)
        g1 = _g;
    else
        MYCALLOC(g1, 1);
    
    g1->n_vtx = g1->m_vtx = g->n_vtx;
    MYCALLOC(g1->vtx, g1->n_vtx);
    // this works as a and seq are always 0
    memcpy(g1->vtx, g->vtx, sizeof(asmg_vtx_t) * g1->n_vtx);
    g1->n_arc = g1->m_arc = g->n_arc;
    MYCALLOC(g1->arc, g1->n_arc);
    memcpy(g1->arc, g->arc, sizeof(asmg_arc_t) * g1->n_arc);

    uint64_t n_vtx = asmg_vtx_n(g1);
    MYCALLOC(g1->idx_p, n_vtx);
    memcpy(g1->idx_p, g->idx_p, sizeof(uint64_t) * n_vtx);
    MYCALLOC(g1->idx_n, n_vtx);
    memcpy(g1->idx_n, g->idx_n, sizeof(uint64_t) * n_vtx);
    
    return g1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
jne 0x979a
pushq $0x1
popq %rdi
pushq $0x40
popq %rsi
callq 0x3240
movq %rax, %r14
movq (%rbx), %r15
movq %r15, 0x8(%r14)
movq %r15, (%r14)
pushq $0x28
popq %rsi
movq %r15, %rdi
callq 0x3240
movq %rax, 0x10(%r14)
movq 0x10(%rbx), %rsi
imulq $0x28, %r15, %rdx
movq %rax, %rdi
callq 0x32c0
movq 0x18(%rbx), %r12
movq %r12, 0x20(%r14)
movq %r12, 0x18(%r14)
pushq $0x30
popq %rsi
movq %r12, %rdi
callq 0x3240
movq %rax, 0x28(%r14)
movq 0x28(%rbx), %rsi
imulq $0x30, %r12, %rdx
movq %rax, %rdi
callq 0x32c0
leaq (%r15,%r15), %r12
pushq $0x8
popq %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x3240
movq %rax, 0x30(%r14)
movq 0x30(%rbx), %rsi
shlq $0x4, %r15
movq %rax, %rdi
movq %r15, %rdx
callq 0x32c0
movq %r12, %rdi
movq %r13, %rsi
callq 0x3240
movq %rax, 0x38(%r14)
movq 0x38(%rbx), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x32c0
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: asg_make_copy
asg_t *asg_make_copy(asg_t *asg)
{
    uint64_t i;
    khint_t k;
    int absent;

    // seg sequence not copied
    asg_t *asg1 = asg_init();
    asg_seg_t *seg, *seg1;
    asg1->m_seg = asg1->n_seg = asg->n_seg;
    MYCALLOC(asg1->seg, asg1->n_seg);
    kh_sdict_t *h_seg = (kh_sdict_t *) asg1->h_seg;
    for (i = 0; i < asg1->n_seg; ++i) {
        seg = &asg->seg[i];
        seg1 = &asg1->seg[i];
        seg1->name = strdup(seg->name);
        seg1->len = seg->len;
        seg1->cov = seg->cov;
        k = kh_sdict_put(h_seg, seg1->name, &absent);
        kh_val(h_seg, k) = i;
    }
    asg_make_asmg_copy(asg->asmg, asg1->asmg);

    return asg1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
callq 0x91a3
movq %rax, %rbx
movq %r14, (%rsp)
movq 0x8(%r14), %r15
movq %r15, 0x8(%rax)
movq %r15, (%rax)
pushq $0x18
popq %rsi
movq %r15, %rdi
callq 0x3240
movq %rax, %r12
movq %rax, 0x10(%rbx)
movq %rbx, 0x8(%rsp)
movq 0x18(%rbx), %r13
pushq $0x10
popq %rbx
xorl %ebp, %ebp
cmpq %rbp, %r15
je 0x98d6
movq (%rsp), %rax
movq 0x10(%rax), %r14
movq -0x10(%r14,%rbx), %rdi
callq 0x3480
movq %rax, -0x10(%r12,%rbx)
movq (%r14,%rbx), %rcx
movq %rcx, (%r12,%rbx)
movq %r13, %rdi
movq %rax, %rsi
leaq 0x14(%rsp), %rdx
callq 0x93b5
movq 0x10(%r13), %rcx
movl %eax, %eax
imulq $0xc, %rax, %rax
movl %ebp, 0x8(%rcx,%rax)
incq %rbp
addq $0x18, %rbx
jmp 0x988b
movq (%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x8(%rsp), %rbx
movq 0x20(%rbx), %rsi
callq 0x9778
movq %rbx, %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]oatk/path.c
// Function: asg_print
void asg_print(asg_t *g, FILE *fo, int no_seq)
{
    uint32_t i, cov;
    uint64_t k;
    asmg_t *asmg = g->asmg;

    fprintf(fo, "H\tVN:Z:1.0\n");
    for (i = 0; i < g->n_seg; ++i) {
        const asg_seg_t *s = &g->seg[i];
        // seg and vtx indices are interchangeable
        if (asmg && asmg->vtx[i].del) continue;
        cov = asmg? asmg->vtx[i].cov : s->cov;
        fprintf(fo, "S\t%s\t", s->name);
        if (s->seq && !no_seq) fputs(s->seq, fo);
        else fputc('*', fo);
        fprintf(fo, "\tLN:i:%u\tKC:i:%lu\tSC:f:%.3f\n", s->len, (uint64_t)s->len*cov, (double)cov);
    }

    if (asmg == 0) return;
    for (k = 0; k < asmg->n_arc; ++k) {
        const asmg_arc_t *a = &asmg->arc[k];
        if (a->del || a->comp) continue;
        fprintf(fo, "L\t%s\t%c\t%s\t%c\t%luM\tEC:i:%u\n", g->seg[a->v>>1].name, "+-"[a->v&1], 
                g->seg[a->w>>1].name, "+-"[a->w&1], a->ls, a->cov);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, 0x4(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %r12
leaq 0xd039(%rip), %rdi      # 0x16c72
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x3450
xorl %r15d, %r15d
movl %r15d, %r15d
cmpq %r15, 0x8(%r14)
jbe 0x9ce8
imulq $0x18, %r15, %r13
addq 0x10(%r14), %r13
testq %r12, %r12
je 0x9c7f
movq 0x10(%r12), %rax
imulq $0x28, %r15, %rcx
movl 0x20(%rax,%rcx), %ebp
btl $0x1e, %ebp
jb 0x9ce0
andl $0x3fffffff, %ebp       # imm = 0x3FFFFFFF
jmp 0x9c83
movl 0x14(%r13), %ebp
movq (%r13), %rdx
movq %rbx, %rdi
leaq 0xcfed(%rip), %rsi      # 0x16c7e
xorl %eax, %eax
callq 0x3290
cmpl $0x0, 0x4(%rsp)
jne 0x9cb2
movq 0x8(%r13), %rdi
testq %rdi, %rdi
je 0x9cb2
movq %rbx, %rsi
callq 0x31a0
jmp 0x9cbd
pushq $0x2a
popq %rdi
movq %rbx, %rsi
callq 0x3200
movl 0x10(%r13), %edx
movl %ebp, %eax
movq %rdx, %rcx
imulq %rax, %rcx
cvtsi2sd %rax, %xmm0
movq %rbx, %rdi
leaq 0xcfab(%rip), %rsi      # 0x16c84
movb $0x1, %al
callq 0x3290
incl %r15d
jmp 0x9c4a
testq %r12, %r12
je 0x9d74
pushq $0x20
popq %r13
leaq 0xcb70(%rip), %rbp      # 0x1686c
xorl %r15d, %r15d
cmpq 0x18(%r12), %r15
jae 0x9d74
movq 0x28(%r12), %r10
movl (%r10,%r13), %r11d
cmpl $0x3fffffff, %r11d      # imm = 0x3FFFFFFF
ja 0x9d6b
movq 0x10(%r14), %rax
movq -0x20(%r10,%r13), %rcx
movq -0x18(%r10,%r13), %rsi
movq %rcx, %rdx
shrq %rdx
imulq $0x18, %rdx, %rdx
movq (%rax,%rdx), %rdx
andl $0x1, %ecx
movsbl (%rcx,%rbp), %ecx
movq %rsi, %rdi
shrq %rdi
imulq $0x18, %rdi, %rdi
movq (%rax,%rdi), %r8
andl $0x1, %esi
movsbl (%rsi,%rbp), %r9d
movq %rbx, %rdi
leaq 0xcf46(%rip), %rsi      # 0x16ca1
xorl %eax, %eax
pushq %r11
pushq -0x8(%r10,%r13)
callq 0x3290
popq %rcx
popq %rdx
incq %r15
addq $0x30, %r13
jmp 0x9cff
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]oatk/path.c
// Function: sequence_covered_by_path
double sequence_covered_by_path(asg_t *asg, path_t *path, uint32_t len)
{
    uint32_t i, n, l, *v;
    uint8_t *flag;
    MYCALLOC(flag, asg->n_seg);
    v = path->v;
    l = 0;
    for (i = 0, n = path->nv; i < n; ++i) {
        if (!flag[v[i]>>1]) {
            l += asg->seg[v[i]>>1].len;
            flag[v[i]>>1] = 1;
        }
    }
    free(flag);
    return (double) l / len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rdi
pushq $0x1
popq %rsi
callq 0x3240
movq 0x10(%r15), %rcx
movl 0x8(%r15), %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
xorl %esi, %esi
xorl %ebp, %ebp
cmpq %rsi, %rdx
je 0x9fd4
movl (%rcx,%rsi,4), %edi
shrl %edi
cmpb $0x0, (%rax,%rdi)
jne 0x9fcf
movq 0x10(%r14), %r8
imulq $0x18, %rdi, %r9
addl 0x10(%r8,%r9), %ebp
movb $0x1, (%rax,%rdi)
incq %rsi
jmp 0x9fae
movq %rax, %rdi
callq 0x3060
movl %ebp, %eax
cvtsi2sd %rax, %xmm0
movl %ebx, %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: is_valid_gfa_tag
int is_valid_gfa_tag(const char *tag)
{
    int is_valid = 0;
    if (strlen(tag) != 4)
        return is_valid;
    is_valid = isalpha(tag[0]) && 
        (isalpha(tag[1]) || isdigit(tag[1])) && 
        (tag[2] == ':') &&
        (tag[3] == 'A' || tag[3] == 'i' || tag[3] == 'f' || tag[3] == 'Z' || tag[3] == 'B');
    return is_valid;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x3130
xorl %ebx, %ebx
cmpq $0x4, %rax
jne 0xa053
callq 0x34d0
movq (%rax), %rax
movsbq (%r14), %rcx
testb $0x4, 0x1(%rax,%rcx,2)
je 0xa053
movsbq 0x1(%r14), %rcx
testb $0xc, 0x1(%rax,%rcx,2)
je 0xa053
cmpb $0x3a, 0x2(%r14)
jne 0xa053
movzbl 0x3(%r14), %eax
leal -0x41(%rax), %ecx
cmpl $0x28, %ecx
ja 0xa05d
movabsq $0x12002000001, %rdx    # imm = 0x12002000001
btq %rcx, %rdx
jae 0xa05d
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %ebx, %ebx
cmpb $0x42, %al
sete %bl
jmp 0xa053
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: asg_update_seg_seq
static void asg_update_seg_seq(asg_seg_t *seg, uint32_t l, char *s)
{
    if (seg->seq) free(seg->seq);
    MYMALLOC(seg->seq, l+1);
    memcpy(seg->seq, s, l);
    seg->seq[l] = 0;
    seg->len = l;
    seg->cov = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
movq 0x8(%rdi), %rdi
callq 0x3060
leal 0x1(%r14), %edi
callq 0x32f0
movq %rax, %r12
movq %rax, 0x8(%r15)
movl %r14d, %r13d
movq %rax, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x32c0
movb $0x0, (%r12,%r13)
movl %r14d, 0x10(%r15)
andl $0x0, 0x14(%r15)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: asg_parse_fa_hdr
static int asg_parse_fa_hdr(asg_t *g, char *s, asg_seg_t **seg)
{
    uint64_t i;
    char *c = s;
    while (*c != 0 && !isspace(*c))
        ++c;
    *c = 0;
    if (c - s == 1) // empty
        return PARSE_A_ERR;
    i = asg_add_seg(g, s + 1, 0);
    *seg = &g->seg[i];
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
xorl %r12d, %r12d
movsbq (%r15,%r12), %r13
testq %r13, %r13
je 0xae44
callq 0x34d0
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r13,2)
jne 0xae44
incq %r12
jmp 0xae25
movb $0x0, (%r15,%r12)
cmpq $0x1, %r12
je 0xae6c
incq %r15
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x9283
movl %eax, %eax
imulq $0x18, %rax, %rax
addq 0x10(%r14), %rax
movq %rax, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: asg_print_fa
void asg_print_fa(asg_t *g, FILE *fo, int line_wd)
{
    uint64_t i, l;
    for (i = 0; i < g->n_seg; ++i) {
        if (g->asmg && g->asmg->vtx[i].del)
            continue;
        if (g->seg[i].seq == 0)
            fprintf(stderr, "[W::%s] skip empty sequence: %s\n", __func__, g->seg[i].name);
        fprintf(fo, ">%s\n", g->seg[i].name);
        l = 0;
        put_chars(g->seg[i].seq, g->seg[i].len, 0, 0, fo, &l, line_wd);
        if (l % line_wd != 0) fputc('\n', fo);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movslq %edx, %r12
pushq $0x20
popq %r15
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpq 0x8(%r14), %rbp
jae 0xaf55
movq 0x20(%r14), %rax
testq %rax, %rax
je 0xaeb5
movq 0x10(%rax), %rax
testb $0x40, 0x3(%rax,%r15)
jne 0xaf19
movq 0x10(%r14), %rax
cmpq $0x0, 0x8(%rax,%r13)
je 0xaf29
movq (%rax,%r13), %rdx
movq %rbx, %rdi
leaq 0xbe1c(%rip), %rsi      # 0x16ceb
xorl %eax, %eax
callq 0x3290
andq $0x0, 0x10(%rsp)
movq 0x10(%r14), %rax
movq 0x8(%rax,%r13), %rdi
movl 0x10(%rax,%r13), %esi
movl %r12d, (%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
leaq 0x10(%rsp), %r9
callq 0x8c17
movq 0x10(%rsp), %rax
xorl %edx, %edx
divq %r12
testq %rdx, %rdx
je 0xaf19
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x3200
incq %rbp
addq $0x28, %r15
addq $0x18, %r13
jmp 0xae96
movq 0x120c8(%rip), %rcx     # 0x1cff8
movq (%rcx), %rdi
movq (%rax,%r13), %rcx
leaq 0xbd7f(%rip), %rsi      # 0x16cbd
leaq 0xbd99(%rip), %rdx      # 0x16cde
xorl %eax, %eax
callq 0x3290
movq 0x10(%r14), %rax
jmp 0xaec1
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]oatk/path.c
// Function: og_component_v_destroy
void og_component_v_destroy(og_component_v *component_v)
{
    if (!component_v) return;
    size_t i;
    for (i = 0; i < component_v->n; ++i)
        og_component_destroy(&component_v->a[i]);
    if (component_v->a)
        free(component_v->a);
    free(component_v);
}

// Assembly:
testq %rdi, %rdi
je 0xafca
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
cmpq (%rbx), %r15
jae 0xafb8
addq %r14, %rdi
callq 0xaf64
incq %r15
addq $0x40, %r14
jmp 0xaf9e
callq 0x3060
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3060
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: max2
static uint32_t max2(double *a, uint32_t n, uint32_t *_smax)
{
    uint32_t i, imax, smax;
    double max_a, smax_a;
    imax = smax = 0;
    max_a = smax_a = -DBL_MAX;
    for (i = 0; i < n; ++i) {
        if (a[i] > max_a) {
            smax = imax;
            smax_a = max_a;
            imax = i;
            max_a = a[i];
        } else if (a[i] > smax_a) {
            smax = i;
            smax_a = a[i];
        }
    }
    if (_smax) *_smax = smax;
    return imax;
}

// Assembly:
movsd 0xad29(%rip), %xmm0     # 0x16530
xorl %ecx, %ecx
xorl %eax, %eax
xorl %edx, %edx
movapd %xmm0, %xmm1
cmpq $0x4, %rcx
je 0xb85c
movsd (%rdi,%rcx,8), %xmm3
ucomisd %xmm0, %xmm3
jbe 0xb82b
movl %ecx, %r8d
movapd %xmm3, %xmm2
jmp 0xb84a
movl %eax, %r8d
ucomisd %xmm1, %xmm3
jbe 0xb840
movl %ecx, %eax
movapd %xmm0, %xmm2
movapd %xmm3, %xmm0
jmp 0xb84a
movl %edx, %eax
movapd %xmm0, %xmm2
movapd %xmm1, %xmm0
movapd %xmm0, %xmm1
movl %eax, %edx
incq %rcx
movl %r8d, %eax
movapd %xmm2, %xmm0
jmp 0xb811
testq %rsi, %rsi
je 0xb863
movl %edx, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: asg_vtx_name_list
char **asg_vtx_name_list(asg_t *g, uint64_t *_n)
{
    if (_n) *_n = 0;
    uint64_t i, n = 0;
    uint64_t *vlist = asmg_vtx_list(g->asmg, &n);
    char **names = 0;
    if (n) {
        MYMALLOC(names, n);
        for (i = 0; i < n; ++i)
            names[i] = g->seg[vlist[i]].name;
    }
    free(vlist);
    if (_n) *_n = n;
    return names;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r12
testq %rsi, %rsi
je 0xece4
andq $0x0, (%rbx)
leaq 0x8(%rsp), %r15
andq $0x0, (%r15)
movq 0x20(%r12), %rdi
movq %r15, %rsi
callq 0x10021
movq %rax, %r14
movq (%r15), %r13
testq %r13, %r13
je 0xed33
leaq (,%r13,8), %rdi
callq 0x32f0
movq %rax, %r15
movq 0x10(%r12), %rax
xorl %ecx, %ecx
cmpq %rcx, %r13
je 0xed36
imulq $0x18, (%r14,%rcx,8), %rdx
movq (%rax,%rdx), %rdx
movq %rdx, (%r15,%rcx,8)
incq %rcx
jmp 0xed1c
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x3060
testq %rbx, %rbx
je 0xed4b
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: fvals
static inline double fvals(func_t *funcs, int n_func)
{
    int i;
    double fval = 0.;
    for (i = 0; i < n_func; ++i) {
        FVAL(&funcs[i]);
        fval += funcs[i].VAL;
    }
    return fval;
}

// Assembly:
pushq %rbx
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
movapd 0x77fe(%rip), %xmm2     # 0x16580
movapd 0x7846(%rip), %xmm3     # 0x165d0
xorl %ecx, %ecx
cmpq %rsi, %rcx
je 0xee3b
imulq $0x30, %rcx, %r8
leaq (%rdi,%r8), %rdx
movl 0x18(%rdi,%r8), %r8d
movaps %xmm1, -0x10(%rsp)
testl %r8d, %r8d
cmovlel %eax, %r8d
xorl %r9d, %r9d
cmpq %r9, %r8
je 0xedeb
movq 0x10(%rdx), %r10
movq 0x20(%rdx), %r11
movl (%r11,%r9,4), %r11d
movl %r11d, %ebx
sarl %ebx
movslq %ebx, %rbx
movq (%r10,%rbx,8), %r10
cvtsi2sdl 0x4(%r10), %xmm4
andl $0x1, %r11d
addsd -0x10(%rsp,%r11,8), %xmm4
movsd %xmm4, -0x10(%rsp,%r11,8)
incq %r9
jmp 0xedb1
movapd -0x10(%rsp), %xmm4
movsd 0x8(%rdx), %xmm5
unpcklpd %xmm5, %xmm5            # xmm5 = xmm5[0,0]
subpd %xmm4, %xmm5
andpd %xmm2, %xmm5
mulpd %xmm3, %xmm5
movapd %xmm5, %xmm6
unpckhpd %xmm5, %xmm6            # xmm6 = xmm6[1],xmm5[1]
addsd %xmm5, %xmm6
movapd %xmm4, %xmm5
unpckhpd %xmm4, %xmm5            # xmm5 = xmm5[1],xmm4[1]
subsd %xmm5, %xmm4
andpd %xmm2, %xmm4
addsd %xmm6, %xmm4
mulsd (%rdx), %xmm4
movsd %xmm4, 0x28(%rdx)
addsd %xmm4, %xmm0
incq %rcx
jmp 0xed8c
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: kdq_pushp_llnodep
KDQ_INIT(llnodep)

static int path_contain_vertex(llnode *node, uint32_t v)
{
    int contained = 0;
    while (node != NULL) {
        if ((node->v >> 1) == (v >> 1)) {
            contained = 1;
            break;
        }
        node = node->prev;
    }

    return contained;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movabsq $0x3ffffffffffffff, %r15 # imm = 0x3FFFFFFFFFFFFFF
movq (%rdi), %rax
movq 0x8(%rdi), %r13
movq %rax, %rdx
shrq $0x3a, %rdx
pushq $0x1
popq %rbp
movq %rbp, %rsi
movl %edx, %ecx
shlq %cl, %rsi
cmpq %rsi, %r13
jne 0xf152
leal 0x1(%rdx), %r14d
movq %rbp, %rsi
movl %r14d, %ecx
shlq %cl, %rsi
pushq $-0x1
popq %r12
cmpq %r13, %rsi
jae 0xf0ba
movq %r12, %r14
incq %r14
movq %r13, %rsi
movl %r14d, %ecx
shrq %cl, %rsi
cmpq $0x3f, %r14
ja 0xf0a1
testq %rsi, %rsi
jne 0xf08a
cmpq %r14, %rdx
je 0xf152
movl %r14d, %ecx
shlq %cl, %rbp
cmpq %rdx, %r14
ja 0xf0bd
movq %r13, %rdx
jmp 0xf0de
movq %rsi, %rbp
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdi
pushq $0x8
popq %rdx
movl %r14d, %ecx
shlq %cl, %rdx
callq 0x1483c
movq %rax, 0x18(%rbx)
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
movq %rax, %rcx
andq %r15, %rcx
addq %rcx, %rdx
cmpq %r13, %rdx
jbe 0xf118
movq 0x18(%rbx), %rax
movq %r13, %rdx
subq %rcx, %rdx
movq %rbp, %rsi
subq %rdx, %rsi
leaq (%rax,%rsi,8), %rdi
leaq (%rax,%rcx,8), %rsi
shlq $0x3, %rdx
callq 0x3340
subq %r13, %rbp
addq (%rbx), %rbp
movq %rbp, %rax
jmp 0xf131
subq %rbp, %rdx
jbe 0xf131
movq 0x18(%rbx), %rdi
leaq (%rdi,%rbp,8), %rsi
shlq $0x3, %rdx
callq 0x3340
movq (%rbx), %rax
movq %r14, %rcx
shlq $0x3a, %rcx
andq %r15, %rax
orq %rcx, %rax
movl %r14d, %ecx
shlq %cl, %r12
movq %rax, (%rbx)
notq %r12
movq %r12, 0x10(%rbx)
movq 0x8(%rbx), %r13
leaq 0x1(%r13), %rcx
movq %rcx, 0x8(%rbx)
andq %r15, %rax
addq %r13, %rax
andq 0x10(%rbx), %rax
shlq $0x3, %rax
addq 0x18(%rbx), %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]oatk/path.c
// Function: swap
static void swap(uint32_t arr[], uint32_t f, uint32_t s, uint32_t d)
{
    // swaps d elements starting at index f with d elements starting at index s
    uint32_t i, temp;
    for(i = 0; i < d; i++) {
        temp = arr[f + i];
        arr[f + i] = arr[s + i];
        arr[s + i] = temp;
    }
}

// Assembly:
movl %ecx, %eax
subq $0x1, %rax
jb 0xf248
movl %esi, %ecx
movl (%rdi,%rcx,4), %r8d
movl %edx, %r9d
movl (%rdi,%r9,4), %r10d
movl %r10d, (%rdi,%rcx,4)
movl %r8d, (%rdi,%r9,4)
incl %edx
incl %esi
jmp 0xf227
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: gfa_aux_get
static uint8_t *gfa_aux_get(int l_data, const uint8_t *data, const char tag[2])
{
    const uint8_t *s = data;
    int y = tag[0]<<8 | tag[1];
    while (s < data + l_data) {
        int x = (int)s[0]<<8 | s[1];
        s += 2;
        if (x == y) return (uint8_t*)s;
        __skip_tag(s);
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movsbl (%rdx), %eax
shll $0x8, %eax
movsbl 0x1(%rdx), %ebp
orl %eax, %ebp
movslq %edi, %r15
addq %rsi, %r15
xorl %ebx, %ebx
cmpq %r15, %r14
jae 0xf6cc
movzwl (%r14), %eax
rolw $0x8, %ax
movzwl %ax, %eax
cmpl %ebp, %eax
je 0xf6c5
movzbl 0x2(%r14), %edi
leaq 0x3(%r14), %r12
cmpl $0x42, %edi
je 0xf698
cmpl $0x5a, %edi
jne 0xf6b6
leaq 0x1(%r12), %r14
cmpb $0x0, (%r12)
movq %r14, %r12
jne 0xf687
jmp 0xf660
movzbl 0x3(%r14), %edi
callq 0xf843
movslq 0x4(%r14), %rcx
cltq
imulq %rcx, %rax
leaq (%r12,%rax), %r14
addq $0x5, %r14
jmp 0xf660
callq 0xf843
movl %eax, %eax
addq %rax, %r12
movq %r12, %r14
jmp 0xf660
addq $0x2, %r14
movq %r14, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: gfa_aux_decimal_value
static double gfa_aux_decimal_value(uint8_t *aux)
{
    double val = .0;
    if (*aux == 'c') val = aux_decimal_val(int8_t, aux + 1);
    else if (*aux == 'C') val = aux_decimal_val(uint8_t, aux + 1);
    else if (*aux == 's') val = aux_decimal_val(int16_t, aux + 1);
    else if (*aux == 'S') val = aux_decimal_val(uint16_t, aux + 1);
    else if (*aux == 'i') val = aux_decimal_val(int64_t, aux + 1);
    else if (*aux == 'I') val = aux_decimal_val(uint64_t, aux + 1);
    else if (*aux == 'f') val = aux_decimal_val(double, aux + 1);
    return val;
}

// Assembly:
movzbl (%rdi), %eax
cmpl $0x43, %eax
je 0xf71a
cmpl $0x49, %eax
je 0xf729
cmpl $0x53, %eax
je 0xf720
cmpl $0x73, %eax
je 0xf707
cmpl $0x66, %eax
je 0xf714
cmpl $0x69, %eax
je 0xf70d
xorps %xmm0, %xmm0
cmpl $0x63, %eax
jne 0xf719
movsbl 0x1(%rdi), %eax
jmp 0xf724
movswl 0x1(%rdi), %eax
jmp 0xf724
cvtsi2sdq 0x1(%rdi), %xmm0
retq
movsd 0x1(%rdi), %xmm0
retq
movzbl 0x1(%rdi), %eax
jmp 0xf724
movzwl 0x1(%rdi), %eax
cvtsi2sd %eax, %xmm0
retq
movsd 0x1(%rdi), %xmm1
unpcklps 0x6e5b(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x6e63(%rip), %xmm1     # 0x165a0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/sharpyfox[P]citrusleaf-client/tests/key_c/src/main.c
// Function: atomic_int_create
atomic_int	*
atomic_int_create(uint32_t val)
{
	atomic_int *ai = malloc(sizeof(atomic_int));
	ai->val = val;
	pthread_mutex_init(&ai->lock,0);
	return(ai);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x30
popq %rdi
callq 0x22f0
leaq 0x8(%rax), %rdi
xorl %esi, %esi
movq %rax, %r14
movl %ebx, (%rax)
callq 0x2410
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/sharpyfox[P]citrusleaf-client/tests/key_c/src/main.c
// Function: atomic_int_add
uint32_t
atomic_int_add(atomic_int *ai, uint32_t val)
{
	uint32_t	rv;
	pthread_mutex_lock(&ai->lock);
	ai->val += val;
	rv = ai->val;
	pthread_mutex_unlock(&ai->lock);
	return(rv);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x8(%rdi), %r15
movq %rdi, %r14
movl %esi, %ebx
movq %r15, %rdi
callq 0x23c0
addl (%r14), %ebx
movq %r15, %rdi
movl %ebx, (%r14)
callq 0x2160
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sharpyfox[P]citrusleaf-client/tests/key_c/src/main.c
// Function: atomic_int_get
uint32_t		
atomic_int_get(atomic_int *ai)
{
	uint32_t	val;
	pthread_mutex_lock(&ai->lock);
	val = ai->val;
	pthread_mutex_unlock(&ai->lock);
	return(val);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x8(%rdi), %r14
movq %rdi, %rbx
movq %r14, %rdi
callq 0x23c0
movl (%rbx), %ebx
movq %r14, %rdi
callq 0x2160
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/sharpyfox[P]citrusleaf-client/tests/key_c/src/main.c
// Function: counter_fn
void *
counter_fn(void *arg)
{
	counter_thread_control *ctc = (counter_thread_control *) arg;
	
	uint64_t last_t = 0;
	
	while (ctc->death == 0) {
		
		sleep(1);
		
		int keys = atomic_int_get(ctc->keys);
		int tps = keys - last_t;
		last_t = keys;
		
		if ((ctc->gen_errs == 0) || (atomic_int_get(ctc->gen_errs) == 0) ) 
			fprintf(stderr, "%s: %d (tps %d)\n",ctc->msg,keys,tps);
		else
			fprintf(stderr, "%s: %d (tps %d) gen-errs %d\n",ctc->msg,keys,tps,atomic_int_get(ctc->gen_errs));
	}
	return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %r15
movq 0x158c9(%rip), %rbp     # 0x17fe0
xorl %r14d, %r14d
cmpl $0x0, 0x18(%rbx)
jne 0x27a9
movl %r15d, %edi
callq 0x2150
movq 0x8(%rbx), %rdi
callq 0x26d7
movq 0x10(%rbx), %rdi
movl %eax, %r13d
movl %eax, %r12d
subl %r14d, %r13d
testq %rdi, %rdi
je 0x2750
callq 0x26d7
testl %eax, %eax
jne 0x2770
movq (%rbp), %rdi
movq (%rbx), %rdx
leaq 0xd9ea(%rip), %rsi      # 0x10148
movl %r12d, %ecx
movl %r13d, %r8d
xorl %eax, %eax
callq 0x2390
movl %r12d, %r14d
jmp 0x271a
movq 0x10(%rbx), %rdi
movq (%rbp), %r15
movq (%rbx), %r14
callq 0x26d7
movq %r15, %rdi
pushq $0x1
popq %r15
movl %eax, %r9d
leaq 0xd9c8(%rip), %rsi      # 0x10159
movq %r14, %rdx
movl %r12d, %ecx
movl %r13d, %r8d
xorl %eax, %eax
callq 0x2390
movl %r12d, %r14d
jmp 0x271a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharpyfox[P]citrusleaf-client/tests/key_c/src/main.c
// Function: start_counter_thread
void *
start_counter_thread(char *msg, atomic_int *keys, atomic_int *gen_errs)
{
	counter_thread_control *ctc = (counter_thread_control *) malloc(sizeof(counter_thread_control));
	ctc->keys = keys;
	ctc->gen_errs = gen_errs;
	ctc->msg = strdup(msg);

	ctc->death = 0;
	pthread_create(&ctc->th, 0, counter_fn, ctc);
	return(ctc);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x28
popq %rdi
callq 0x22f0
movq %r15, %rdi
movq %r14, 0x8(%rax)
movq %rax, %r12
movq %rbx, 0x10(%rax)
callq 0x2500
movq %rax, (%r12)
andl $0x0, 0x18(%r12)
leaq 0x20(%r12), %rdi
leaq -0xfe(%rip), %rdx       # 0x26fe
xorl %esi, %esi
movq %r12, %rcx
callq 0x24f0
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sharpyfox[P]citrusleaf-client/tests/key_c/src/main.c
// Function: rand_64
uint64_t
rand_64()
{
	pthread_mutex_lock(&rand_buf_lock);
	if (rand_buf_off < sizeof(uint64_t) ) {
		if (seeded == 0) {
			int rfd = open("/dev/urandom",	O_RDONLY);
			int rsz = read(rfd, rand_buf, SEED_SZ);
			if (rsz < SEED_SZ) {
				fprintf(stderr, "warning! can't seed random number generator");
				return(0);
			}
			close(rfd);
			RAND_seed(rand_buf, rsz);
			seeded = 1;
		}
		if (1 != RAND_bytes(rand_buf, sizeof(rand_buf))) {
			fprintf(stderr, "RAND_bytes not so happy.\n");
			pthread_mutex_unlock(&rand_buf_lock);
			return(0);
		}
		rand_buf_off = sizeof(rand_buf);
	}
	
	rand_buf_off -= sizeof(uint64_t);
	uint64_t r = *(uint64_t *) (&rand_buf[rand_buf_off]);
	pthread_mutex_unlock(&rand_buf_lock);
	return(r);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x15ac1(%rip), %rdi     # 0x18300
callq 0x23c0
movl 0x15ade(%rip), %ebx     # 0x18328
cmpl $0x7, %ebx
ja 0x28c0
cmpb $0x0, 0x15ad6(%rip)     # 0x1832c
jne 0x28a5
leaq 0xd917(%rip), %rdi      # 0x10176
xorl %esi, %esi
xorl %eax, %eax
callq 0x24c0
movl %eax, %ebx
leaq 0x15abf(%rip), %rsi     # 0x18330
pushq $0x40
popq %rdx
movl %eax, %edi
callq 0x23a0
movq %rax, %r14
cmpl $0x40, %r14d
jl 0x2915
movl %ebx, %edi
callq 0x2560
leaq 0x15a9a(%rip), %rdi     # 0x18330
movl %r14d, %esi
callq 0x24b0
movb $0x1, 0x15a87(%rip)     # 0x1832c
leaq 0x15a84(%rip), %rdi     # 0x18330
movl $0x2000, %esi           # imm = 0x2000
movl $0x2000, %ebx           # imm = 0x2000
callq 0x23e0
cmpl $0x1, %eax
jne 0x28eb
addl $-0x8, %ebx
leaq 0x15a66(%rip), %rax     # 0x18330
leaq 0x15a2f(%rip), %rdi     # 0x18300
movl %ebx, 0x15a51(%rip)     # 0x18328
movq (%rbx,%rax), %rbx
callq 0x2160
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x156ee(%rip), %rax     # 0x17fe0
leaq 0xd8b6(%rip), %rdi      # 0x101af
movq (%rax), %rcx
pushq $0x19
popq %rsi
pushq $0x1
popq %rdx
callq 0x2550
leaq 0x159f2(%rip), %rdi     # 0x18300
callq 0x2160
jmp 0x2931
movq 0x156c4(%rip), %rax     # 0x17fe0
leaq 0xd860(%rip), %rdi      # 0x10183
movq (%rax), %rcx
pushq $0x2b
popq %rsi
pushq $0x1
popq %rdx
callq 0x2550
xorl %ebx, %ebx
jmp 0x28e0
// File: /workspace/github_c_makefile_star2_O2/sharpyfox[P]citrusleaf-client/tests/key_c/src/key.c
// Function: dump_buf
static void
dump_buf(char *msg, uint8_t *buf, size_t buf_len)
{
	fprintf(stderr, "dump_buf: %s\n",msg);
	uint i;
	for (i=0;i<buf_len;i++) {
		if (i % 16 == 8)
			fprintf(stderr, " : ");
		if (i && (i % 16 == 0))
			fprintf(stderr, "\n");
		fprintf(stderr, "%02x ",buf[i]);
	}
	fprintf(stderr, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x144f3(%rip), %r15     # 0x17fe0
movq %rdx, %rbx
movq %rdi, %rdx
movq %rsi, %r14
leaq 0xd3f6(%rip), %rsi      # 0x10ef3
xorl %eax, %eax
movq (%r15), %rdi
callq 0x2390
pushq $0x1
popq %r13
leaq 0xd3f3(%rip), %rbp      # 0x10f05
xorl %eax, %eax
movl %eax, %r12d
cmpq %rbx, %r12
jae 0x3b71
movl %r12d, %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x3b3e
movq (%r15), %rcx
leaq 0xd3d0(%rip), %rdi      # 0x10f01
pushq $0x3
popq %rsi
movq %r13, %rdx
callq 0x2550
jmp 0x3b58
testq %r12, %r12
sete %cl
testl %eax, %eax
setne %al
orb %cl, %al
jne 0x3b58
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x22e0
movq (%r15), %rdi
movzbl (%r14,%r12), %edx
movq %rbp, %rsi
xorl %eax, %eax
callq 0x2390
leal 0x1(%r12), %eax
jmp 0x3b14
movq (%r15), %rsi
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22e0
// File: /workspace/github_c_makefile_star2_O2/sharpyfox[P]citrusleaf-client/tests/key_c/src/histogram.c
// Function: histogram_create
histogram* histogram_create() {
	histogram* h = malloc(sizeof(histogram));

	if (h) {
		h->n_counts = 0;
		memset(&h->count, 0, sizeof(h->count));
	}

	return (h);
}

// Assembly:
pushq %rbx
movl $0x208, %edi            # imm = 0x208
callq 0x22f0
movq %rax, %rbx
testq %rax, %rax
je 0x5469
movq %rbx, %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
movq $0x0, (%rbx)
addq $0x8, %rdi
callq 0x2120
movq %rbx, %rax
popq %rbx
retq