LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_credential_value
int
kmip_decode_credential_value(KMIP *ctx, enum credential_type type, void **value)
{
    int result = 0;
    
    switch(type)
    {
        case KMIP_CRED_USERNAME_AND_PASSWORD:
        *value = ctx->calloc_func(ctx->state, 1, sizeof(UsernamePasswordCredential));
        CHECK_NEW_MEMORY(ctx, *value, sizeof(UsernamePasswordCredential), "UsernamePasswordCredential structure");
        result = kmip_decode_username_password_credential(ctx, (UsernamePasswordCredential *)*value);
        break;
        
        case KMIP_CRED_DEVICE:
        *value = ctx->calloc_func(ctx->state, 1, sizeof(DeviceCredential));
        CHECK_NEW_MEMORY(ctx, *value, sizeof(DeviceCredential), "DeviceCredential structure");
        result = kmip_decode_device_credential(ctx, (DeviceCredential *)*value);
        break;
        
        case KMIP_CRED_ATTESTATION:
        *value = ctx->calloc_func(ctx->state, 1, sizeof(AttestationCredential));
        CHECK_NEW_MEMORY(ctx, *value, sizeof(AttestationCredential), "AttestationCredential structure");
        result = kmip_decode_attestation_credential(ctx, (AttestationCredential*)*value);
        break;
        
        default:
        kmip_push_error_frame(ctx, __func__, __LINE__);
        return(KMIP_NOT_IMPLEMENTED);
        break;
    }
    CHECK_RESULT(ctx, result);
    
    return(KMIP_OK);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
cmpl $0x3, %esi
je 0x1a9c7
cmpl $0x2, %esi
je 0x1a99b
cmpl $0x1, %esi
jne 0x1aa10
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x1aa79
movq %rbx, %rdi
movq %rax, %rsi
callq 0x66c0
jmp 0x1a9f1
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x30, %edx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x1aa2f
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6700
jmp 0x1a9f1
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x20, %edx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x1aa54
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6770
movl %eax, %ebp
testl %eax, %eax
je 0x1aa2b
leaq 0x674a(%rip), %rsi      # 0x21148
movq %rbx, %rdi
movl $0x29e8, %edx           # imm = 0x29E8
callq 0x6de0
jmp 0x1aaa6
leaq 0x6731(%rip), %rsi      # 0x21148
movq %rbx, %rdi
movl $0x29e4, %edx           # imm = 0x29E4
callq 0x6de0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x1aaa6
xorl %ebp, %ebp
jmp 0x1aaa6
leaq 0x672f(%rip), %rdx      # 0x21165
movl $0x30, %esi
movq %rbx, %rdi
callq 0x6ba0
leaq 0x66fe(%rip), %rsi      # 0x21148
movq %rbx, %rdi
movl $0x29d9, %edx           # imm = 0x29D9
jmp 0x1aa9c
leaq 0x6725(%rip), %rdx      # 0x21180
movl $0x20, %esi
movq %rbx, %rdi
callq 0x6ba0
leaq 0x66d9(%rip), %rsi      # 0x21148
movq %rbx, %rdi
movl $0x29df, %edx           # imm = 0x29DF
jmp 0x1aa9c
leaq 0x66a3(%rip), %rdx      # 0x21123
movl $0x10, %esi
movq %rbx, %rdi
callq 0x6ba0
leaq 0x66b4(%rip), %rsi      # 0x21148
movq %rbx, %rdi
movl $0x29d3, %edx           # imm = 0x29D3
callq 0x6de0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_operations
int
kmip_decode_operations(KMIP *ctx, Operations *value)
{
    int result = 0;

    value->operation_list = ctx->calloc_func(ctx->state, 1, sizeof(LinkedList));
    CHECK_NEW_MEMORY(ctx, value->operation_list, sizeof(LinkedList), "LinkedList");

    uint32 tag = kmip_peek_tag(ctx);
    while(tag == KMIP_TAG_OPERATION)
    {
        LinkedListItem *item = ctx->calloc_func(ctx->state, 1, sizeof(LinkedListItem));
        CHECK_NEW_MEMORY(ctx, item, sizeof(LinkedListItem), "LinkedListItem");
        kmip_linked_list_enqueue(value->operation_list, item);

        item->data = ctx->calloc_func(ctx->state, 1, sizeof(int32));
        CHECK_NEW_MEMORY(ctx, item->data, sizeof(int32), "Operation");


        result = kmip_decode_enum(ctx, KMIP_TAG_OPERATION, (int32 *)item->data);
        CHECK_RESULT(ctx, result);

        tag = kmip_peek_tag(ctx);
    }

    return(KMIP_OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x890(%rdi), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x1c9aa
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
addq (%rbx), %rcx
xorl %ebp, %ebp
cmpq $0x3, %rcx
jb 0x1c9d7
movzbl (%rax), %ecx
shll $0x10, %ecx
movzbl 0x1(%rax), %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl 0x2(%rax), %eax
orl %edx, %eax
cmpl $0x42005c, %eax         # imm = 0x42005C
jne 0x1c9d7
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *0x868(%rbx)
testq %rax, %rax
je 0x1c9e4
movq %rax, %r15
movq (%r14), %rax
testq %rax, %rax
je 0x1c95b
movq 0x8(%rax), %rcx
movq %r15, 0x8(%rax)
movq $0x0, (%r15)
movq %rcx, 0x8(%r15)
incq 0x10(%rax)
testq %rcx, %rcx
je 0x1c952
movq %r15, (%rcx)
cmpq $0x0, (%rax)
jne 0x1c95b
movq %r15, (%rax)
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x4, %edx
callq *0x868(%rbx)
movq %rax, 0x10(%r15)
testq %rax, %rax
je 0x1ca04
movq %rbx, %rdi
movl $0x42005c, %esi         # imm = 0x42005C
movq %rax, %rdx
callq 0x6ae0
testl %eax, %eax
jne 0x1ca24
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
addq (%rbx), %rcx
jmp 0x1c8de
leaq 0x3c94(%rip), %rdx      # 0x20645
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6ba0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x2b71, %edx           # imm = 0x2B71
leaq 0x49de(%rip), %rsi      # 0x213ad
movq %rbx, %rdi
callq 0x6de0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3c65(%rip), %rdx      # 0x20650
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6ba0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x2b77, %edx           # imm = 0x2B77
jmp 0x1c9c8
leaq 0x49b9(%rip), %rdx      # 0x213c4
movl $0x4, %esi
movq %rbx, %rdi
callq 0x6ba0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x2b7b, %edx           # imm = 0x2B7B
jmp 0x1c9c8
movl $0x2b7f, %edx           # imm = 0x2B7F
movl %eax, %ebp
jmp 0x1c9c8
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_object_types
int
kmip_decode_object_types(KMIP *ctx, ObjectTypes *value)
{
    int result = 0;

    value->object_list = ctx->calloc_func(ctx->state, 1, sizeof(LinkedList));
    CHECK_NEW_MEMORY(ctx, value->object_list, sizeof(LinkedList), "LinkedList");

    uint32 tag = kmip_peek_tag(ctx);
    while(tag == KMIP_TAG_OBJECT_TYPE)
    {
        LinkedListItem *item = ctx->calloc_func(ctx->state, 1, sizeof(LinkedListItem));
        CHECK_NEW_MEMORY(ctx, item, sizeof(LinkedListItem), "LinkedListItem");
        kmip_linked_list_enqueue(value->object_list, item);

        item->data = ctx->calloc_func(ctx->state, 1, sizeof(int32));
        CHECK_NEW_MEMORY(ctx, item->data, sizeof(int32), "Object");

        result = kmip_decode_enum(ctx, KMIP_TAG_OBJECT_TYPE, (int32 *)item->data);
        CHECK_RESULT(ctx, result);

        tag = kmip_peek_tag(ctx);
    }

    return(KMIP_OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x890(%rdi), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x1cb39
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
addq (%rbx), %rcx
xorl %ebp, %ebp
cmpq $0x3, %rcx
jb 0x1cb66
movzbl (%rax), %ecx
shll $0x10, %ecx
movzbl 0x1(%rax), %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl 0x2(%rax), %eax
orl %edx, %eax
cmpl $0x420057, %eax         # imm = 0x420057
jne 0x1cb66
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *0x868(%rbx)
testq %rax, %rax
je 0x1cb73
movq %rax, %r15
movq (%r14), %rax
testq %rax, %rax
je 0x1caea
movq 0x8(%rax), %rcx
movq %r15, 0x8(%rax)
movq $0x0, (%r15)
movq %rcx, 0x8(%r15)
incq 0x10(%rax)
testq %rcx, %rcx
je 0x1cae1
movq %r15, (%rcx)
cmpq $0x0, (%rax)
jne 0x1caea
movq %r15, (%rax)
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x4, %edx
callq *0x868(%rbx)
movq %rax, 0x10(%r15)
testq %rax, %rax
je 0x1cb93
movq %rbx, %rdi
movl $0x420057, %esi         # imm = 0x420057
movq %rax, %rdx
callq 0x6ae0
testl %eax, %eax
jne 0x1cbb3
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
addq (%rbx), %rcx
jmp 0x1ca6d
leaq 0x3b05(%rip), %rdx      # 0x20645
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6ba0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x2b8d, %edx           # imm = 0x2B8D
leaq 0x4870(%rip), %rsi      # 0x213ce
movq %rbx, %rdi
callq 0x6de0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3ad6(%rip), %rdx      # 0x20650
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6ba0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x2b93, %edx           # imm = 0x2B93
jmp 0x1cb57
leaq 0x484d(%rip), %rdx      # 0x213e7
movl $0x4, %esi
movq %rbx, %rdi
callq 0x6ba0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x2b97, %edx           # imm = 0x2B97
jmp 0x1cb57
movl $0x2b9a, %edx           # imm = 0x2B9A
movl %eax, %ebp
jmp 0x1cb57
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_alternative_endpoints
int
kmip_decode_alternative_endpoints(KMIP *ctx, AltEndpoints* value)
{
    int result = 0;

    value->endpoint_list = ctx->calloc_func(ctx->state, 1, sizeof(LinkedList));
    CHECK_NEW_MEMORY(ctx, value->endpoint_list, sizeof(LinkedList), "LinkedList");

    uint32 tag = kmip_peek_tag(ctx);
    while(tag == KMIP_TAG_ALTERNATE_FAILOVER_ENDPOINTS)
    {
        LinkedListItem *item = ctx->calloc_func(ctx->state, 1, sizeof(LinkedListItem));
        CHECK_NEW_MEMORY(ctx, item, sizeof(LinkedListItem), "LinkedListItem");
        kmip_linked_list_enqueue(value->endpoint_list, item);

        item->data = ctx->calloc_func(ctx->state, 1, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, item->data, sizeof(TextString), "Endpoint text string");

        result = kmip_decode_text_string(ctx, KMIP_TAG_ALTERNATE_FAILOVER_ENDPOINTS, item->data);
        CHECK_RESULT(ctx, result);

        tag = kmip_peek_tag(ctx);
    }

    return(KMIP_OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x890(%rdi), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x1ccc8
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
addq (%rbx), %rcx
xorl %ebp, %ebp
cmpq $0x3, %rcx
jb 0x1ccf5
movzbl (%rax), %ecx
shll $0x10, %ecx
movzbl 0x1(%rax), %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl 0x2(%rax), %eax
orl %edx, %eax
cmpl $0x420135, %eax         # imm = 0x420135
jne 0x1ccf5
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *0x868(%rbx)
testq %rax, %rax
je 0x1cd02
movq %rax, %r15
movq (%r14), %rax
testq %rax, %rax
je 0x1cc79
movq 0x8(%rax), %rcx
movq %r15, 0x8(%rax)
movq $0x0, (%r15)
movq %rcx, 0x8(%r15)
incq 0x10(%rax)
testq %rcx, %rcx
je 0x1cc70
movq %r15, (%rcx)
cmpq $0x0, (%rax)
jne 0x1cc79
movq %r15, (%rax)
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq *0x868(%rbx)
movq %rax, 0x10(%r15)
testq %rax, %rax
je 0x1cd22
movq %rbx, %rdi
movl $0x420135, %esi         # imm = 0x420135
movq %rax, %rdx
callq 0x6540
testl %eax, %eax
jne 0x1cd42
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
addq (%rbx), %rcx
jmp 0x1cbfc
leaq 0x3976(%rip), %rdx      # 0x20645
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6ba0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x2ba8, %edx           # imm = 0x2BA8
leaq 0x4701(%rip), %rsi      # 0x213ee
movq %rbx, %rdi
callq 0x6de0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3947(%rip), %rdx      # 0x20650
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6ba0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x2bae, %edx           # imm = 0x2BAE
jmp 0x1cce6
leaq 0x46e7(%rip), %rdx      # 0x21410
movl $0x10, %esi
movq %rbx, %rdi
callq 0x6ba0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x2bb2, %edx           # imm = 0x2BB2
jmp 0x1cce6
movl $0x2bb5, %edx           # imm = 0x2BB5
movl %eax, %ebp
jmp 0x1cce6
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: ha_hist_line
static void ha_hist_line(int c, int x, int exceed, int64_t cnt)
{
    int j;
    if (c >= 0)
        fprintf(stderr, "[M::%s] %5d: ", __func__, c);
    else 
        fprintf(stderr, "[M::%s] %5s: ", __func__, "rest");
    for (j = 0; j < x; ++j) fputc('*', stderr);
    if (exceed) fputc('>', stderr);
    fprintf(stderr, " %lld\n", (long long)cnt);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %ecx
movq 0x236d8(%rip), %r12     # 0x25ff0
movq (%r12), %rdi
testl %ecx, %ecx
js 0x2937
leaq 0x1db98(%rip), %rsi     # 0x204bf
leaq 0x1db9f(%rip), %rdx     # 0x204cd
xorl %eax, %eax
callq 0x2280
jmp 0x2953
leaq 0x1db9c(%rip), %rsi     # 0x204da
leaq 0x1db88(%rip), %rdx     # 0x204cd
leaq 0x1db9c(%rip), %rcx     # 0x204e8
xorl %eax, %eax
callq 0x2280
testl %r14d, %r14d
jle 0x296d
pushq $0x2a
popq %r15
movq (%r12), %rsi
movl %r15d, %edi
callq 0x2210
decl %r14d
jne 0x295c
testl %ebp, %ebp
je 0x297d
movq (%r12), %rsi
pushq $0x3e
popq %rdi
callq 0x2210
movq (%r12), %rdi
leaq 0x1db65(%rip), %rsi     # 0x204ed
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2280
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncasm.c
// Function: scg_meta_clean
void scg_meta_clean(scg_meta_t *meta)
{
    if (!meta) return;
    scg_destroy(meta->scg);
    syncmer_db_destroy(meta->scm_db);
    sr_db_destroy(meta->sr_db);
    scg_ra_v_destroy(meta->ra_db);
}

// Assembly:
testq %rdi, %rdi
je 0x4c87
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x4c1c
movq 0x10(%rbx), %rdi
callq 0xf03d
movq 0x18(%rbx), %rdi
callq 0xefb7
movq 0x20(%rbx), %rdi
popq %rbx
jmp 0x1aa60
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncasm.c
// Function: scg_is_empty
int scg_is_empty(scg_t *scg)
{
    uint64_t i, n, n_scm;
    syncmer_t *scm;
    scm = scg_a_scm(scg);
    n_scm = scg_n_scm(scg);
    for (i = 0, n = n_scm; i < n; ++i)
        if (scm[i].del) --n_scm;
    return n_scm == 0;
}

// Assembly:
movq (%rdi), %rcx
movq (%rcx), %rax
testq %rax, %rax
je 0x5b6d
movq 0x10(%rcx), %rcx
addq $0x10, %rcx
movq %rax, %rdx
movl (%rcx), %esi
sarl $0x1f, %esi
movslq %esi, %rsi
addq %rsi, %rdx
addq $0x20, %rcx
decq %rax
jne 0x5b50
xorl %eax, %eax
testq %rdx, %rdx
sete %al
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncasm.c
// Function: scg_stat
void scg_stat(scg_t *scg, FILE *fo, uint64_t *stats)
{
    uint64_t i, n, n_scm, u_scm, n_utg, n_arc;
    syncmer_t *scm;
    asmg_t *utg_asmg;

    scm = scg_a_scm(scg);
    u_scm = scg_n_scm(scg);
    utg_asmg = scg->utg_asmg;
    n_utg = utg_asmg->n_vtx;
    n_arc = utg_asmg->n_arc;

    n_scm = 0;
    for (i = 0, n = u_scm; i < n; ++i)
        if (scm[i].del)
            --u_scm;
    for (i = 0, n = n_arc; i < n; ++i)
        if (utg_asmg->arc[i].del)
            --n_arc;
    for (i = 0, n = n_utg; i < n; ++i) {
        if (utg_asmg->vtx[i].del)
            --n_utg;
        else
            n_scm += utg_asmg->vtx[i].n;
    }

    if (fo != 0) {
        fprintf(fo, "[M::%s] number unitigs  : %lu\n", __func__, n_utg);
        fprintf(fo, "[M::%s] number syncmers : %lu\n", __func__, n_scm);
        fprintf(fo, "[M::%s] number arcs     : %lu\n", __func__, n_arc);
    }

    if (stats != 0) {
        stats[0] = n_scm;
        stats[1] = u_scm;
        stats[2] = n_utg;
        stats[3] = n_arc;
    }

    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbp
movq %rsi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rcx
movq (%rsi), %rax
movq 0x18(%rcx), %rdx
testq %rax, %rax
je 0x5bb8
movq 0x10(%rsi), %rsi
addq $0x10, %rsi
movq %rax, %r14
movl (%rsi), %edi
sarl $0x1f, %edi
movslq %edi, %rdi
addq %rdi, %r14
addq $0x20, %rsi
decq %rax
jne 0x5ba2
jmp 0x5bbb
xorl %r14d, %r14d
movq (%rcx), %rax
testq %rdx, %rdx
je 0x5be6
movq 0x28(%rcx), %rsi
addq $0x20, %rsi
movq %rdx, %r15
movl (%rsi), %edi
addl %edi, %edi
sarl $0x1f, %edi
movslq %edi, %rdi
addq %rdi, %r15
addq $0x30, %rsi
decq %rdx
jne 0x5bce
jmp 0x5be9
xorl %r15d, %r15d
testq %rax, %rax
je 0x5c16
movq 0x10(%rcx), %rcx
addq $0x20, %rcx
xorl %r12d, %r12d
movq %rax, %r13
testb $0x40, 0x3(%rcx)
jne 0x5c08
addq -0x20(%rcx), %r12
jmp 0x5c0b
decq %r13
addq $0x28, %rcx
decq %rax
jne 0x5bfc
jmp 0x5c1c
xorl %r12d, %r12d
xorl %r13d, %r13d
testq %rbx, %rbx
je 0x5c72
leaq 0x19c60(%rip), %rsi     # 0x1f888
leaq 0x19c78(%rip), %rdx     # 0x1f8a7
movq %rbx, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x2280
leaq 0x19c6d(%rip), %rsi     # 0x1f8b0
movq %rbx, %rdi
leaq 0x19c5a(%rip), %rdx     # 0x1f8a7
movq %r12, %rcx
xorl %eax, %eax
callq 0x2280
leaq 0x19c71(%rip), %rsi     # 0x1f8cf
movq %rbx, %rdi
leaq 0x19c3f(%rip), %rdx     # 0x1f8a7
movq %r15, %rcx
xorl %eax, %eax
callq 0x2280
testq %rbp, %rbp
je 0x5c87
movq %r12, (%rbp)
movq %r14, 0x8(%rbp)
movq %r13, 0x10(%rbp)
movq %r15, 0x18(%rbp)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncasm.c
// Function: scg_update_utg_cov
void scg_update_utg_cov(scg_t *scg)
{
    uint64_t i, n;
    scg_utg_t *s;
    asmg_t *utg_asmg = scg->utg_asmg;
    for (i = 0, n = utg_asmg->n_vtx; i < n; ++i) {
        s = &utg_asmg->vtx[i];
        s->cov = utg_avg_cov(scg, s);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r14
movq (%r14), %r15
testq %r15, %r15
je 0x5ec9
movq %rdi, %rbx
xorl %r12d, %r12d
movl $0xc0000000, %ebp       # imm = 0xC0000000
movq 0x10(%r14), %r13
leaq (%r12,%r13), %rsi
movq %rbx, %rdi
callq 0x5ed8
cvttsd2si %xmm0, %rax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl 0x20(%r13,%r12), %ecx
andl %ebp, %ecx
orl %eax, %ecx
movl %ecx, 0x20(%r13,%r12)
addq $0x28, %r12
decq %r15
jne 0x5e98
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncasm.c
// Function: utg_avg_cov
static inline double utg_avg_cov(scg_t *scg, const scg_utg_t *s)
{
    if (s->del) return .0;

    uint64_t i, u;
    double *cov, avg_cov;
    syncmer_t *scm;
    
    scm = scg_a_scm(scg);
    MYCALLOC(cov, s->n);
    // try to use single copy syncmers
    for (i = 0; i < s->n; ++i) {
        u = s->a[i]>>1;
        if (scm_utg_n(scg, u) == 1)
            cov[i] = scm[u].cov;
    }
    qsort(cov, s->n, sizeof(double), dbl_cmpfunc);
    i = 0;
    while (i < s->n && cov[i] < DBL_EPSILON) ++i;

    if (i == s->n) {
        // using all syncmers
        MYBZERO(cov, s->n);
        for (i = 0; i < s->n; ++i)
            cov[i] = scm[s->a[i]>>1].cov;
        qsort(cov, s->n, sizeof(double), dbl_cmpfunc);
        i = 0;
    }
    // calculate average using [Q1-IQR, Q3+IQR]
    avg_cov = average_IQR(&cov[i], s->n - i, 1);
    
    free(cov);
    
    return avg_cov;
}

// Assembly:
testb $0x40, 0x23(%rsi)
jne 0x5fa5
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %r12
movq (%rdi), %rax
movq 0x10(%rax), %r13
movq (%rsi), %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x2250
movq %rax, %rbx
testq %r15, %r15
je 0x5f59
movq 0x8(%r14), %rax
movq 0x18(%r12), %rcx
xorl %edx, %edx
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq (%rax,%rdx,8), %rdi
shrq %rdi
movq 0x8(%rcx,%rdi,8), %r8
subq (%rcx,%rdi,8), %r8
cmpq $0x10, %r8
jne 0x5f51
shlq $0x5, %rdi
movl 0x10(%r13,%rdi), %edi
andl %esi, %edi
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
movsd %xmm0, (%rbx,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x5f24
leaq 0x5253(%rip), %rcx      # 0xb1b3
movl $0x8, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20d0
movq (%r14), %r15
testq %r15, %r15
je 0x5ff7
xorl %eax, %eax
movsd 0x198be(%rip), %xmm0    # 0x1f840
ucomisd (%rbx,%rax,8), %xmm0
jbe 0x5fa9
incq %rax
cmpq %rax, %r15
jne 0x5f82
leaq (,%r15,8), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x21e0
jmp 0x5fc5
xorps %xmm0, %xmm0
retq
cmpq %rax, %r15
jne 0x6013
leaq (,%r15,8), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x21e0
testq %r15, %r15
je 0x5ff7
movq 0x8(%r14), %rax
xorl %ecx, %ecx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq (%rax,%rcx,8), %rsi
shlq $0x4, %rsi
andq $-0x20, %rsi
movl 0x10(%r13,%rsi), %esi
andl %edx, %esi
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movsd %xmm0, (%rbx,%rcx,8)
incq %rcx
cmpq %rcx, %r15
jne 0x5fd0
leaq 0x51b5(%rip), %rcx      # 0xb1b3
movl $0x8, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20d0
movq (%r14), %r15
xorl %eax, %eax
leaq (%rbx,%rax,8), %rdi
subl %eax, %r15d
movl %r15d, %esi
movl $0x1, %edx
callq 0xb1d0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x2060
movsd 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncasm.c
// Function: process_mergeable_unitigs
void process_mergeable_unitigs(scg_t *g)
{
    // postprocessing for mergeable utgs
    asmg_t *utg_asmg;

    // make utgs from the unitig graph
    utg_asmg = asmg_unitigging(g->utg_asmg);

    // update utg
    asmg_destroy(g->utg_asmg);
    g->utg_asmg = utg_asmg;

    scg_scm_utg_index(g);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x17b1a
movq %rax, %r14
movq 0x8(%rbx), %rdi
callq 0x15a20
movq %r14, 0x8(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x513b
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncasm.c
// Function: average_IQR
static double average_IQR(double *a, int n, int sorted)
{
    if (n == 0) return 0.;

    double Q1, Q3, IQR, s;
    int i, n0;
    if (!sorted) qsort(a, n, sizeof(double), dbl_cmpfunc);
    Q1 = quantile(a, n, 0.25, 1);
    Q3 = quantile(a, n, 0.75, 1);
    IQR = Q3 - Q1;
    Q1 -= 1.5 * IQR;
    Q3 += 1.5 * IQR;
    n0 = 0;
    s = 0.;
    for (i = 0; i < n; ++i) {
        if (a[i] >= Q1 && a[i] <= Q3) {
            ++n0;
            s += a[i];
        }
    }
#ifdef DEBUG_UTG_RA_COV
    fprintf(stderr, "[DEBUG_UTG_RA_COV::%s] %d single copy syncmers:",
            __func__, n);
    for (i = 0; i < n; ++i) fprintf(stderr, " %.0f", a[i]);
    fputc('\n', stderr);
    fprintf(stderr, "[DEBUG_UTG_RA_COV::%s] %d outliers out of range [%.3f %.3f] removed\n",
            __func__, n - n0, Q1, Q3);
#endif
    return n0? s / n0 : 0.;
}

// Assembly:
xorpd %xmm0, %xmm0
testl %esi, %esi
je 0xb2b1
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
testl %edx, %edx
jne 0xb1ff
movslq %ebp, %rsi
leaq -0x3f(%rip), %rcx       # 0xb1b3
movl $0x8, %edx
movq %rbx, %rdi
callq 0x20d0
movsd 0x14659(%rip), %xmm0    # 0x1f860
movq %rbx, %rdi
movl %ebp, %esi
callq 0xd4ef
movsd %xmm0, (%rsp)
movsd 0x1464a(%rip), %xmm0    # 0x1f868
movq %rbx, %rdi
movl %ebp, %esi
callq 0xd4ef
testl %ebp, %ebp
jle 0xb2a7
movapd %xmm0, %xmm1
movsd (%rsp), %xmm3
subsd %xmm3, %xmm1
movsd 0x1462f(%rip), %xmm2    # 0x1f870
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
mulsd 0x14627(%rip), %xmm1    # 0x1f878
addsd %xmm0, %xmm1
movl %ebp, %eax
xorpd %xmm0, %xmm0
xorl %edx, %edx
xorl %ecx, %ecx
movsd (%rbx,%rdx,8), %xmm3
movapd %xmm2, %xmm4
cmplepd %xmm3, %xmm4
movapd %xmm3, %xmm5
cmplepd %xmm1, %xmm5
andpd %xmm4, %xmm5
movq %xmm5, %rsi
testb $0x1, %sil
je 0xb289
addsd %xmm3, %xmm0
andl $0x1, %esi
addl %esi, %ecx
incq %rdx
cmpq %rdx, %rax
jne 0xb25f
testl %ecx, %ecx
je 0xb2a7
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
divsd %xmm1, %xmm0
jmp 0xb2ab
xorpd %xmm0, %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncasm.c
// Function: quantile
static double quantile(double *a, int n, double q, int sorted)
{
    if (q < 0 || q > 1.0 || n <= 0) {
        fprintf(stderr, "[E::%s] numeric error", __func__);
        exit(EXIT_FAILURE);
    }
    if (n == 1) return a[0];
    if (!sorted) qsort(a, n, sizeof(double), dbl_cmpfunc);
    double fractpart, intpart;
    fractpart = modf(q * (n - 1), &intpart);
    int i = lround(intpart);
    if (i == n - 1) return a[i];
    return a[i] + (a[i + 1] - a[i]) * fractpart;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
testl %esi, %esi
jle 0xd5a1
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0xd5a1
ucomisd 0x12333(%rip), %xmm0    # 0x1f848
ja 0xd5a1
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x1, %esi
jne 0xd52b
movsd (%rbx), %xmm0
jmp 0xd598
decl %ebp
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
mulsd %xmm0, %xmm1
leaq 0x8(%rsp), %r14
movapd %xmm1, %xmm0
movq %r14, %rdi
callq 0x21a0
movsd %xmm0, (%rsp)
movsd (%r14), %xmm0
callq 0x2110
cmpl %eax, %ebp
jne 0xd565
movl %eax, %eax
movsd (%rbx,%rax,8), %xmm0
jmp 0xd598
shlq $0x20, %rax
movq %rax, %rcx
sarq $0x1d, %rcx
movsd (%rbx,%rcx), %xmm1
movabsq $0x100000000, %rcx      # imm = 0x100000000
addq %rax, %rcx
sarq $0x1d, %rcx
movsd (%rbx,%rcx), %xmm0
subsd %xmm1, %xmm0
mulsd (%rsp), %xmm0
addsd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x28d7
nop
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: MurmurHash64A
uint64_t MurmurHash64A(const void *key, uint32_t len, uint64_t seed)
{
    const uint64_t m = 0xc6a4a7935bd1e995LLU;
    const int r = 47;

    uint64_t h = seed ^ (len * m);

    const uint64_t *data = (const uint64_t *)key;
    const uint64_t *end = (len >> 3) + data;

    while(data != end) {
        uint64_t k = *data++;

        k *= m;
        k ^= k >> r;
        k *= m;

        h ^= k;
        h *= m;
    }

    const unsigned char *data2 = (const unsigned char *) data;

    switch(len & 7) {
        case 7: h ^= (uint64_t) (data2[6]) << 48;
        case 6: h ^= (uint64_t) (data2[5]) << 40;
        case 5: h ^= (uint64_t) (data2[4]) << 32;
        case 4: h ^= (uint64_t) (data2[3]) << 24;
        case 3: h ^= (uint64_t) (data2[2]) << 16;
        case 2: h ^= (uint64_t) (data2[1]) << 8;
        case 1: h ^= (uint64_t) (data2[0]);
                h *= m;
    };

    h ^= h >> r;
    h *= m;
    h ^= h >> r;

    return h;
}

// Assembly:
movabsq $-0x395b586ca42e166b, %rax # imm = 0xC6A4A7935BD1E995
movl %esi, %ecx
imulq %rax, %rcx
xorq %rdx, %rcx
cmpl $0x8, %esi
jb 0xd5fe
movl %esi, %edx
shrl $0x3, %edx
movl %esi, %r8d
andl $-0x8, %r8d
addq %rdi, %r8
shll $0x3, %edx
xorl %r9d, %r9d
movq (%rdi,%r9), %r10
imulq %rax, %r10
movq %r10, %r11
shrq $0x2f, %r11
xorq %r10, %r11
imulq %rax, %r11
xorq %r11, %rcx
imulq %rax, %rcx
addq $0x8, %r9
cmpq %r9, %rdx
jne 0xd5d5
movq %r8, %rdi
andl $0x7, %esi
leaq 0x127a8(%rip), %rdx     # 0x1fdb0
movslq (%rdx,%rsi,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
movzbl 0x6(%rdi), %edx
shlq $0x30, %rdx
xorq %rdx, %rcx
movzbl 0x5(%rdi), %edx
shlq $0x28, %rdx
xorq %rdx, %rcx
movzbl 0x4(%rdi), %edx
shlq $0x20, %rdx
xorq %rdx, %rcx
movzbl 0x3(%rdi), %edx
shll $0x18, %edx
xorq %rdx, %rcx
movzbl 0x2(%rdi), %edx
shll $0x10, %edx
xorq %rdx, %rcx
movzbl 0x1(%rdi), %edx
shll $0x8, %edx
xorq %rdx, %rcx
movzbl (%rdi), %edx
xorq %rcx, %rdx
imulq %rax, %rdx
movq %rdx, %rcx
movq %rcx, %rdx
shrq $0x2f, %rdx
xorq %rcx, %rdx
imulq %rax, %rdx
movq %rdx, %rax
shrq $0x2f, %rax
xorq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: sr_db_clean
void sr_db_clean(sr_db_t *sr_db)
{
    if (!sr_db) return;
    size_t i;
    for (i = 0; i < sr_db->n; ++i)
        sr_destroy(&sr_db->a[i]);
    kv_destroy(*sr_db);
    free(sr_db->stats);
}

// Assembly:
testq %rdi, %rdi
je 0xdb02
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0xdaeb
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
addq %r14, %rdi
callq 0xef3d
incq %r15
addq $0x58, %r14
cmpq (%rbx), %r15
jb 0xdad3
movq 0x10(%rbx), %rdi
callq 0x2060
movq 0x20(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: sr_db_init
void sr_db_init(sr_db_t *sr_db, int k, int s)
{
    if (!sr_db) return;
    kv_init(*sr_db);
    sr_db->k = k;
    sr_db->s = s;
    sr_db->stats = 0;
}

// Assembly:
testq %rdi, %rdi
je 0xdb1e
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movl %esi, 0x18(%rdi)
movl %edx, 0x1c(%rdi)
movq %rax, 0x20(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: do_analysis
static void do_analysis(p_data_t *dat, pthread_t *threads, int n_threads, sr_db_t *sr_db)
{
    int t;
    for (t = 1; t < n_threads; ++t)
        pthread_create(threads + t, NULL, sr_read_analysis_thread, &dat[t]);

    sr_read_analysis_thread(dat);

    for (t = 1; t < n_threads; ++t)
        pthread_join(threads[t], NULL);

    for (t = 0; t < n_threads; ++t) {
        kv_pushn(sr_t, *sr_db, dat[t].sr_db->a, dat[t].sr_db->n);
        dat[t].n_reads = 0;
        dat[t].sr_db->n = 0;
    }

    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movq %rdi, %r14
movl %edx, %r13d
cmpl $0x1, %edx
jle 0xdbba
movl %ebp, 0x4(%rsp)
movq %rsi, 0x8(%rsp)
leaq 0x8(%rsi), %r12
movq %r13, 0x10(%rsp)
movq %r13, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %r15
movl $0x30, %ebp
leaq 0x3bfb(%rip), %r13      # 0x11761
leaq (%r14,%rbp), %rcx
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x2360
addq $0x30, %rbp
addq $0x8, %r12
cmpq %rbp, %r15
jne 0xdb66
movq %r14, %rdi
callq 0x11761
movl 0x4(%rsp), %ebp
cmpl $0x2, %ebp
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %r12
jl 0xdbc2
movl $0x1, %r15d
movq (%r12,%r15,8), %rdi
xorl %esi, %esi
callq 0x24a0
incq %r15
cmpq %r15, %r13
jne 0xdba5
jmp 0xdbc2
movq %r14, %rdi
callq 0x11761
testl %ebp, %ebp
jle 0xdc86
shlq $0x4, %r13
leaq (,%r13,2), %r15
addq %r13, %r15
xorl %r12d, %r12d
movq (%rbx), %rdx
movq 0x10(%rbx), %rax
movq 0x28(%r14,%r12), %rcx
movq (%rcx), %r8
leaq (%r8,%rdx), %rsi
cmpq 0x8(%rbx), %rsi
jbe 0xdc4b
decq %rsi
movq %rsi, %rcx
shrq %rcx
orq %rsi, %rcx
movq %rcx, %rdx
shrq $0x2, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x4, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x8, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x10, %rcx
orq %rdx, %rcx
incq %rcx
movq %rcx, 0x8(%rbx)
imulq $0x58, %rcx, %rsi
movq %rax, %rdi
callq 0x2350
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
movq 0x28(%r14,%r12), %rcx
movq (%rcx), %r8
imulq $0x58, %rdx, %rdi
addq %rax, %rdi
movq 0x10(%rcx), %rsi
imulq $0x58, %r8, %rdx
callq 0x22b0
movq 0x28(%r14,%r12), %rax
movq (%rax), %rcx
addq %rcx, (%rbx)
movl $0x0, (%r14,%r12)
movq $0x0, (%rax)
addq $0x30, %r12
cmpq %r12, %r15
jne 0xdbdc
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: kh_ctab_stat
static double kh_ctab_stat(kh_ctab_t *ctab, int *uniq, int *singleton)
{
    khint_t k;
    double sum;
    int s, c, n;
    sum = .0;
    n = c = 0;
    if (kh_size(ctab) == 0)
        goto do_assign;

    for (k = (khint_t) 0; k != kh_end(ctab); ++k) {
        if (kh_exist(ctab, k)) {
            s = kh_key(ctab, k);
            c = kh_val(ctab, k);
            sum += (double) s * c;
            n += c;
        }
    }
    k = kh_ctab_get(ctab, 1);
    if (k < kh_end(ctab))
        c = kh_val(ctab, k);

do_assign:
    if (uniq) *uniq = n;
    if (singleton) *singleton = c;
    
    return sum / n;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpl $0x0, 0x4(%rdi)
je 0xe7dd
movq 0x10(%rdi), %r10
xorl %r11d, %r11d
xorpd %xmm0, %xmm0
xorl %r9d, %r9d
xorl %r8d, %r8d
testq %r10, %r10
je 0xe762
movl (%rdi), %eax
movl $0x1, %ebp
movl %eax, %ecx
shll %cl, %ebp
movq 0x8(%rdi), %rbx
cmpl %ebp, %r11d
jne 0xe76f
jmp 0xe7a7
testl %r11d, %r11d
je 0xe7ff
movq 0x8(%rdi), %rbx
movl %r11d, %eax
shrl $0x5, %eax
movl (%rbx,%rax,4), %eax
btl %r11d, %eax
jae 0xe7a2
movl %r11d, %eax
movl 0x4(%r10,%rax,8), %r9d
xorps %xmm1, %xmm1
cvtsi2sdl (%r10,%rax,8), %xmm1
xorps %xmm2, %xmm2
cvtsi2sd %r9d, %xmm2
mulsd %xmm1, %xmm2
addsd %xmm2, %xmm0
addl %r9d, %r8d
incl %r11d
jmp 0xe747
leal -0x1(%r11), %edi
movl %eax, %ecx
negb %cl
movl $0x3c9420a0, %ebp       # imm = 0x3C9420A0
shrl %cl, %ebp
movl %ebp, %ecx
movl %ecx, %r14d
shrl $0x5, %r14d
movl (%rbx,%r14,4), %r14d
btl %ecx, %r14d
jae 0xe7ec
movl %ecx, %r14d
cmpl $0x1, (%r10,%r14,8)
je 0xe7e9
incl %ecx
andl %edi, %ecx
cmpl %ebp, %ecx
jne 0xe7b8
jmp 0xe7ec
xorl %r9d, %r9d
xorpd %xmm0, %xmm0
xorl %r8d, %r8d
jmp 0xe7ff
movl %ecx, %r11d
movl %r11d, %edi
movl %eax, %ecx
shrl %cl, %edi
testl %edi, %edi
jne 0xe7ff
movl %r11d, %eax
movl 0x4(%r10,%rax,8), %r9d
testq %rsi, %rsi
je 0xe807
movl %r8d, (%rsi)
testq %rdx, %rdx
je 0xe80f
movl %r9d, (%rdx)
xorps %xmm1, %xmm1
cvtsi2sd %r8d, %xmm1
divsd %xmm1, %xmm0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: syncmer_s_cmpfunc
static int syncmer_s_cmpfunc(const void *a, const void *b)
{
    uint64_t x, y;
    uint64_t s, t;
    x = ((syncmer_t *) a)->s;
    y = ((syncmer_t *) b)->s;
    s = ((syncmer_t *) a)->h;
    t = ((syncmer_t *) b)->h;
    return x == y? ((s > t) - (s < t)) : ((x > y) - (x < y));
}

// Assembly:
movq 0x8(%rsi), %rax
cmpq %rax, 0x8(%rdi)
jne 0xe830
movq (%rdi), %rax
cmpq (%rsi), %rax
seta %al
setb %cl
movzbl %al, %eax
movzbl %cl, %ecx
subl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: kh_ctab_cnt
static int64_t *kh_ctab_cnt(kh_ctab_t *ctab, int max_n)
{
    int64_t *cnt;
    int s, c;
    khint_t k;

    MYCALLOC(cnt, max_n + 1);
    for (k = (khint_t) 0; k != kh_end(ctab); ++k) {
        if (kh_exist(ctab, k)) {
            s = kh_key(ctab, k);
            c = kh_val(ctab, k);
            if (s < max_n)
                cnt[s] = c;
            else
                cnt[max_n] += c;
        }
    }

    return cnt;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leal 0x1(%rbx), %eax
movslq %eax, %rdi
movl $0x8, %esi
callq 0x2250
movq 0x10(%r14), %rdx
movslq %ebx, %rsi
xorl %edi, %edi
movl $0x0, %r8d
testq %rdx, %rdx
je 0xe878
movb (%r14), %cl
movl $0x1, %r8d
shll %cl, %r8d
cmpl %r8d, %edi
je 0xe8af
movq 0x8(%r14), %rcx
movl %edi, %r8d
shrl $0x5, %r8d
movl (%rcx,%r8,4), %ecx
btl %edi, %ecx
jae 0xe8ab
movl %edi, %r8d
movslq (%rdx,%r8,8), %rcx
movslq 0x4(%rdx,%r8,8), %r8
cmpl %ebx, %ecx
jge 0xe8a7
movq %r8, (%rax,%rcx,8)
jmp 0xe8ab
addq %r8, (%rax,%rsi,8)
incl %edi
jmp 0xe861
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: kh_ctab_print
static void kh_ctab_print(kh_ctab_t *ctab, const char *h, FILE *fo, int more)
{
    khint_t k;
    uint32_t i, n = kh_size(ctab);
    int64_t hist[n];
    int s, c;
    i = 0;
    for (k = (khint_t) 0; k != kh_end(ctab); ++k) {
        if (kh_exist(ctab, k)) {
            s = kh_key(ctab, k);
            c = kh_val(ctab, k);
            hist[i++] = (int64_t) s << 32 | c;
        }
    }

    qsort(hist, n, sizeof(int64_t), int64_cmpfunc);
    hist_plot(hist, n, h, fo);

    if (more > 0) {
        for (i = 0; i < n; ++i)
            fprintf(fo, "[M::%s] [%s CNTS] %ld %d\n", __func__, h, hist[i] >> 32, (int) hist[i]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r13d
movq %rdx, %rbx
movq %rsi, %r14
movl 0x4(%rdi), %r15d
movq %rsp, %r12
leaq 0xf(,%r15,8), %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
movq 0x10(%rdi), %rax
xorl %edx, %edx
xorl %esi, %esi
movl $0x0, %r8d
testq %rax, %rax
je 0xee1f
movb (%rdi), %cl
movl $0x1, %r8d
shll %cl, %r8d
cmpl %r8d, %esi
je 0xee56
movq 0x8(%rdi), %rcx
movl %esi, %r8d
shrl $0x5, %r8d
movl (%rcx,%r8,4), %ecx
btl %esi, %ecx
jae 0xee52
movl %esi, %ecx
movslq 0x4(%rax,%rcx,8), %r8
movl (%rax,%rcx,8), %ecx
shlq $0x20, %rcx
orq %r8, %rcx
movl %edx, %r8d
incl %edx
movq %rcx, (%r12,%r8,8)
incl %esi
jmp 0xee09
leaq 0x3b8c(%rip), %rcx      # 0x129e9
movl $0x8, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x20d0
movq %r12, %rdi
movl %r15d, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x129fc
testl %r13d, %r13d
setg %al
testl %r15d, %r15d
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xeec5
movq %r14, %r13
xorl %r14d, %r14d
movq (%r12,%r14,8), %r9
movq %r9, %r8
sarq $0x20, %r8
movq %rbx, %rdi
leaq 0x11648(%rip), %rsi     # 0x204f4
leaq 0x1165b(%rip), %rdx     # 0x2050e
movq %r13, %rcx
xorl %eax, %eax
callq 0x2280
incq %r14
cmpq %r14, %r15
jne 0xee97
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: sr_db_validate
int sr_db_validate(sr_db_t *sr_db)
{
    if (sr_db->n > MAX_RD_NUM) {
        fprintf(stderr, "[E::%s] read number exceeds the limit %llu\n", __func__, MAX_RD_NUM);
        return 1;
    }
    size_t i;
    for (i = 0; i < sr_db->n; ++i) {
        sr_t *s = &sr_db->a[i];
        if (s->n > MAX_RD_SCM) {
            fprintf(stderr, "[E::%s] syncmer number (%u) on read exceeds the limit %llu: %s\n", __func__, s->n, MAX_RD_SCM, s->sname);
            return 2;
        }
    }
    return 0;
}

// Assembly:
pushq %rax
movq (%rdi), %rdx
movq %rdx, %rax
shrq $0x20, %rax
jne 0xef01
xorl %eax, %eax
testq %rdx, %rdx
je 0xeeff
movq 0x10(%rdi), %rsi
addq $0x38, %rsi
movl (%rsi), %ecx
testl %ecx, %ecx
js 0xef0d
addq $0x58, %rsi
decq %rdx
jne 0xeef0
popq %rcx
retq
callq 0x299a
movl $0x1, %eax
jmp 0xeeff
movq 0x170dc(%rip), %rax     # 0x25ff0
movq (%rax), %rdi
movq -0x30(%rsi), %r9
leaq 0x11355(%rip), %rsi     # 0x20277
leaq 0x1133f(%rip), %rdx     # 0x20268
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
xorl %eax, %eax
callq 0x2280
movl $0x2, %eax
jmp 0xeeff
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: sr_destroy
void sr_destroy(sr_t *sr)
{
    if (!sr) return;
    if (sr->sname) free(sr->sname);
    if (sr->hoco_s) free(sr->hoco_s);
    if (sr->ho_rl) free(sr->ho_rl);
    if (sr->ho_l_rl) free(sr->ho_l_rl);
    if (sr->n_nucl) free(sr->n_nucl);
    if (sr->s_mer) free(sr->s_mer);
    if (sr->k_mer) free(sr->k_mer);
    if (sr->m_pos) free(sr->m_pos);
}

// Assembly:
testq %rdi, %rdi
je 0xefb6
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xef54
callq 0x2060
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xef62
callq 0x2060
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xef70
callq 0x2060
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0xef7e
callq 0x2060
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0xef8c
callq 0x2060
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0xef9a
callq 0x2060
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0xefa8
callq 0x2060
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
popq %rbx
jne 0x2060
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: syncmer_db_clean
void syncmer_db_clean(syncmer_db_t *scm_db)
{
    if (!scm_db) return;
    size_t i;
    for (i = 0; i < scm_db->n; ++i)
        free(scm_db->a[i].m_pos);
    kv_destroy(*scm_db);
    free(scm_db->c);
    free(scm_db->h);
}

// Assembly:
testq %rdi, %rdi
je 0xf03c
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0xf01c
movl $0x18, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2060
incq %r15
addq $0x20, %r14
cmpq (%rbx), %r15
jb 0xf003
movq 0x10(%rbx), %rdi
callq 0x2060
movq 0x18(%rbx), %rdi
callq 0x2060
movq 0x20(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: print_aligned_syncmers_on_seq
void print_aligned_syncmers_on_seq(sr_t *sr, int w, uint32_t beg, uint32_t end, FILE *fo)
{
    uint32_t i, j, l, n, p;
    kstring_t s = {0, 0, 0};
    l = sr->hoco_l;
    n = sr->n;
    end = MIN(end, n);
    get_hoco_seq(sr, &s);
    fprintf(fo, "%.*s\n", (int) s.l, s.s);
    for (i = beg; i < end; ++i) {
        p = sr->m_pos[i]>>1;
        if (p == MAX_RD_LEN) continue;
        for (j = 0; j < p; ++j) fputc('*', fo);
        fprintf(fo, "%.*s", w, &s.s[p]);
        for (j = p + w; j < l; ++j) fputc('*', fo);
        fputc('\n', fo);
    }
    free(s.s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, 0xc(%rsp)
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movl 0x10(%rdi), %r13d
movl 0x38(%rdi), %eax
cmpl %ecx, %eax
cmovbl %eax, %ebp
movq %r15, %rsi
callq 0xf490
movl (%r15), %edx
movq 0x10(%r15), %rcx
leaq 0x11686(%rip), %rsi     # 0x20a4f
movq %rbx, %rdi
movq %rcx, 0x10(%rsp)
xorl %eax, %eax
callq 0x2280
cmpl %r12d, %ebp
jbe 0xf478
movl %r12d, %r12d
movl %ebp, %ecx
movq %rcx, 0x18(%rsp)
movq 0x40(%r14), %rax
movl (%rax,%r12,4), %eax
movl %eax, %ebp
shrl %ebp
cmpl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
je 0xf46c
movq %r14, %r15
cmpl $0x2, %eax
jb 0xf41c
movl %ebp, %r14d
movl $0x2a, %edi
movq %rbx, %rsi
callq 0x2210
decl %r14d
jne 0xf40a
movq 0x10(%rsp), %rax
leaq (%rax,%rbp), %rcx
movq %rbx, %rdi
leaq 0x10eb5(%rip), %rsi     # 0x202e4
movl 0xc(%rsp), %r14d
movl %r14d, %edx
xorl %eax, %eax
callq 0x2280
addl %r14d, %ebp
cmpl %r13d, %ebp
jae 0xf457
movl $0x2a, %edi
movq %rbx, %rsi
callq 0x2210
incl %ebp
jmp 0xf441
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2210
movq %r15, %r14
movq 0x18(%rsp), %rcx
incq %r12
cmpq %rcx, %r12
jne 0xf3eb
movq 0x10(%rsp), %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2060
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: get_kmer_seq
void get_kmer_seq(uint8_t *hoco_s, uint32_t pos, int l, uint32_t rev, uint8_t *kmer_s)
{
    int i, j;
    uint8_t t;
    uint32_t p;
    for (i = 0; i < l; ++i) {
        p = pos + i;
        kmer_s[i] = (hoco_s[p/4]>>(((p&3)^3)<<1))&3;
    }
    if (rev) {
        for (i = 0, j = l - 1; i < j; ++i, --j) {
            t = kmer_s[i];
            kmer_s[i] = (kmer_s[j]^3)&3;
            kmer_s[j] = (t^3)&3;
        }
        if (i == j) kmer_s[i] = (kmer_s[i]^3)&3;
    }
}

// Assembly:
pushq %rbx
movl %ecx, %eax
testl %edx, %edx
jle 0xf601
movl %edx, %r9d
movl %esi, %r10d
addl %esi, %esi
xorl %r11d, %r11d
leal (%r10,%r11), %ecx
shrl $0x2, %ecx
movzbl (%rdi,%rcx), %ebx
movl %esi, %ecx
notb %cl
andb $0x6, %cl
shrl %cl, %ebx
andb $0x3, %bl
movb %bl, (%r8,%r11)
incq %r11
addl $0x2, %esi
cmpq %r11, %r9
jne 0xf5db
testl %eax, %eax
je 0xf660
cmpl $0x2, %edx
jl 0xf649
movl %edx, %ecx
addq $-0x2, %rcx
xorl %eax, %eax
movb (%r8,%rax), %sil
notb %sil
movb 0x1(%r8,%rcx), %dil
notb %dil
andb $0x3, %dil
movb %dil, (%r8,%rax)
andb $0x3, %sil
movb %sil, 0x1(%r8,%rcx)
incq %rax
leaq -0x1(%rcx), %rsi
cmpq %rcx, %rax
movq %rsi, %rcx
jl 0xf612
movl %eax, %ecx
notl %ecx
addl %ecx, %edx
jmp 0xf64d
decl %edx
xorl %eax, %eax
cmpl %edx, %eax
jne 0xf660
movl %eax, %eax
movb (%r8,%rax), %cl
notb %cl
andb $0x3, %cl
movb %cl, (%r8,%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/syncmer.c
// Function: get_kmer_dna_seq
void get_kmer_dna_seq(uint8_t *hoco_s, uint32_t pos, int l, uint32_t rev, char *dna_seq)
{
    int i, j;
    uint32_t p;
    for (i = 0; i < l; ++i) {
        p = pos + i;
        dna_seq[i] = char_nt4_table[(hoco_s[p/4]>>(((p&3)^3)<<1))&3];
    }
    if (rev) {
        char t;
        for (i = 0, j = l - 1; i < j; ++i, --j) {
            t = dna_seq[i];
            dna_seq[i] = seq_nt4_comp_table[(int) dna_seq[j]];
            dna_seq[j] = seq_nt4_comp_table[(int) t];
        }
        if (i == j) dna_seq[i] = seq_nt4_comp_table[(int) dna_seq[j]];
    }
}

// Assembly:
pushq %r14
pushq %rbx
movl %ecx, %eax
testl %edx, %edx
jle 0xf6aa
movl %edx, %r9d
movl %esi, %r10d
addl %esi, %esi
xorl %r11d, %r11d
leaq 0x108d3(%rip), %rbx     # 0x1ff50
leal (%r10,%r11), %ecx
shrl $0x2, %ecx
movzbl (%rdi,%rcx), %r14d
movl %esi, %ecx
notb %cl
andb $0x6, %cl
shrl %cl, %r14d
andl $0x3, %r14d
movb (%r14,%rbx), %cl
movb %cl, (%r8,%r11)
incq %r11
addl $0x2, %esi
cmpq %r11, %r9
jne 0xf67d
testl %eax, %eax
je 0xf715
cmpl $0x2, %edx
jl 0xf6f5
movl %edx, %ecx
addq $-0x2, %rcx
xorl %eax, %eax
leaq 0x1080e(%rip), %rsi     # 0x1fed0
movsbq (%r8,%rax), %rdi
movsbq 0x1(%r8,%rcx), %r9
movb (%r9,%rsi), %r9b
movb %r9b, (%r8,%rax)
movb (%rdi,%rsi), %dil
movb %dil, 0x1(%r8,%rcx)
incq %rax
leaq -0x1(%rcx), %rdi
cmpq %rcx, %rax
movq %rdi, %rcx
jl 0xf6c2
movl %eax, %ecx
notl %ecx
addl %ecx, %edx
jmp 0xf6f9
decl %edx
xorl %eax, %eax
cmpl %edx, %eax
jne 0xf715
movslq %eax, %rcx
movsbq (%r8,%rcx), %rcx
leaq 0x107c4(%rip), %rdx     # 0x1fed0
movb (%rcx,%rdx), %cl
movl %eax, %eax
movb %cl, (%r8,%rax)
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/levdist.c
// Function: wf_tb_destroy
void wf_tb_destroy(wf_tb_t *wf_tb)
{
    if (wf_tb) {
        size_t i;
        for (i = 0; i < wf_tb->n; ++i)
            free(wf_tb->a[i].a);
        free(wf_tb->a);
    }
    free(wf_tb);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x143e0
cmpq $0x0, 0x8(%rbx)
je 0x143d7
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2060
incq %r15
addq $0x10, %r14
cmpq 0x8(%rbx), %r15
jb 0x143bd
movq 0x10(%rbx), %rdi
callq 0x2060
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2060
// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]oatk/levdist.c
// Function: wf_config_destroy
void wf_config_destroy(wf_config_t *conf, int clean_seq)
{
    if (clean_seq) {
        free(conf->ts);
        free(conf->qs);
    }
    if (conf->wf_diag) {
        free(conf->wf_diag->a);
        free(conf->wf_diag);
    }
    wf_tb_destroy(conf->wf_tb);
    free(conf->cigar);
    free(conf);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0x14406
movq (%rbx), %rdi
callq 0x2060
movq 0x8(%rbx), %rdi
callq 0x2060
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x14421
movq 0x10(%rax), %rdi
callq 0x2060
movq 0x18(%rbx), %rdi
callq 0x2060
movq 0x20(%rbx), %rdi
callq 0x143a0
movq 0x40(%rbx), %rdi
callq 0x2060
movq %rbx, %rdi
popq %rbx
jmp 0x2060