LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/test/test-vcf-api.c
// Function: check_alleles
static int check_alleles(bcf1_t *rec, const char **alleles, int num) {
    int i;
    if (rec->n_allele !=  num) {
        fprintf(stderr, "Wrong number of alleles - expected %d, got %d\n",
                num, rec->n_allele);
        return -1;
    }
    if (bcf_unpack(rec, BCF_UN_STR) != 0)
        return -1;
    for (i = 0; i < num; i++) {
        if (0 != strcmp(alleles[i], rec->d.allele[i])) {
            fprintf(stderr,
                    "Mismatch for allele %d : expected '%s' got '%s'\n",
                    i, alleles[i], rec->d.allele[i]);
            return -1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl 0x18(%rdi), %ecx
shrl $0x10, %ecx
cmpl %edx, %ecx
jne 0x7305
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %esi
callq 0x3b4fd
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x72f4
testl %ebp, %ebp
jle 0x72f2
movq 0x88(%r15), %rbx
movl %ebp, %ebp
xorl %r15d, %r15d
movq (%r14,%r15,8), %r12
movq (%rbx,%r15,8), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x46e0
testl %eax, %eax
jne 0x7326
incq %r15
cmpq %r15, %rbp
jne 0x72d3
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xcccd4(%rip), %rax     # 0xd3fe0
movq (%rax), %rdi
leaq 0xa7225(%rip), %rsi     # 0xae53b
movl %ebp, %edx
xorl %eax, %eax
callq 0x4720
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x72f4
movq 0xcccb3(%rip), %rax     # 0xd3fe0
movq (%rax), %rdi
leaq 0xa7233(%rip), %rsi     # 0xae56a
movl %r15d, %edx
movq %r12, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x4720
jmp 0x731f
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/test/test-vcf-api.c
// Function: iterator
void iterator(const char *fname)
{
    htsFile *fp = hts_open(fname, "r");
    if (!fp) error("Failed to open \"%s\" : %s", fname, strerror(errno));
    bcf_hdr_t *hdr = bcf_hdr_read(fp);
    if (!hdr) error("bcf_hdr_read : %s", strerror(errno));
    hts_idx_t *idx;
    hts_itr_t *iter;

    bcf_index_build(fname, 0);
    idx = bcf_index_load(fname);

    iter = bcf_itr_queryi(idx, bcf_hdr_name2id(hdr, "20"), 1110600, 1110800);
    bcf_itr_destroy(iter);

    iter = bcf_itr_querys(idx, hdr, "20:1110600-1110800");
    bcf_itr_destroy(iter);

    hts_idx_destroy(idx);
    bcf_hdr_destroy(hdr);
    int ret;
    if ( (ret=hts_close(fp)) )
    {
        fprintf(stderr,"hts_close(%s): non-zero status %d\n",fname,ret);
        exit(ret);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa9ace(%rip), %rsi     # 0xb1599
callq 0xbee7
testq %rax, %rax
je 0x7b9a
movq %rax, %r14
movq %rax, %rdi
callq 0x31e8f
testq %rax, %rax
je 0x7bba
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3e915
movq %rbx, %rdi
xorl %esi, %esi
callq 0x13252
movq %rax, %r12
leaq 0xa573f(%rip), %rdx     # 0xad24d
movq %r15, %rdi
movl $0x1, %esi
callq 0x30be5
leaq 0x2c6a7(%rip), %r13     # 0x341c9
movl $0x10f248, %edx         # imm = 0x10F248
movl $0x10f310, %ecx         # imm = 0x10F310
movq %r12, %rdi
movl %eax, %esi
movq %r13, %r8
callq 0xf905
leaq 0x7dc5(%rip), %rbp      # 0xf905
movq %rax, %rdi
callq 0x104bf
leaq 0xa5f49(%rip), %rsi     # 0xada98
leaq -0x8d0(%rip), %rdx      # 0x7286
movq %r12, %rdi
movq %r15, %rcx
movq %rbp, %r8
movq %r13, %r9
callq 0x1239d
movq %rax, %rdi
callq 0x104bf
movq %r12, %rdi
callq 0xd2ca
movq %r15, %rdi
callq 0x31cf6
movq %r14, %rdi
callq 0xd151
testl %eax, %eax
jne 0x7bd7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0xa44a2(%rip), %rdi     # 0xac04f
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x600c
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0xa5b31(%rip), %rdi     # 0xad6fe
movq %rax, %rsi
xorl %eax, %eax
callq 0x600c
movq %rbx, %rdi
movl %eax, %esi
callq 0x4aa0
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/test/test-vcf-api.c
// Function: check_format_values
void check_format_values(const char *fname)
{
    htsFile *fp = hts_open(fname, "r");
    bcf_hdr_t *hdr = bcf_hdr_read(fp);
    bcf1_t *line = bcf_init();

    while (bcf_read(fp, hdr, line) == 0)
    {
        float *values = 0;
        int count = 0;
        int ret = bcf_get_format_float(hdr, line, "TF", &values, &count);

        // NOTE the return value from bcf_get_format_float is different from
        // bcf_get_info_float in the sense that vector-end markers also count.
        if (ret != 4 ||
            count < ret ||
            !bcf_float_is_missing(values[0]) ||
            values[1] != 47.11f ||
            !bcf_float_is_vector_end(values[2]) ||
            !bcf_float_is_vector_end(values[3]))
        {
            fprintf(stderr, "bcf_get_format_float didn't produce the expected output.\n");
            exit(-1);
        }

        free(values);
    }

    bcf_destroy(line);
    bcf_hdr_destroy(hdr);
    hts_close(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0xa9537(%rip), %rsi     # 0xb1599
callq 0xbee7
movq %rax, %rbx
movq %rax, %rdi
callq 0x31e8f
movq %rax, %r14
callq 0x32e93
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3346e
testl %eax, %eax
jne 0x8125
leaq 0xc(%rsp), %rbp
leaq 0xcd431(%rip), %r12     # 0xd54d0
leaq 0xcd42e(%rip), %r13     # 0xd54d4
movq $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movq %r14, %rdi
movq %r15, %rsi
leaq 0xa5bb2(%rip), %rdx     # 0xadc76
leaq 0x10(%rsp), %rcx
movq %rbp, %r8
movl $0x2, %r9d
callq 0x44097
cmpl $0x4, %eax
jne 0x814c
cmpl $0x4, 0xc(%rsp)
jl 0x814c
movq 0x10(%rsp), %rdi
movl (%r12), %eax
cmpl (%rdi), %eax
jne 0x814c
movss 0x4(%rdi), %xmm0
ucomiss 0xa3f4c(%rip), %xmm0    # 0xac048
jne 0x814c
jp 0x814c
movl (%r13), %eax
cmpl 0x8(%rdi), %eax
jne 0x814c
cmpl 0xc(%rdi), %eax
jne 0x814c
callq 0x45c0
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3346e
testl %eax, %eax
je 0x80a6
movq %r15, %rdi
callq 0x33036
movq %r14, %rdi
callq 0x31cf6
movq %rbx, %rdi
callq 0xd151
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4b38
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/test/test-vcf-api.c
// Function: test_open_format
void test_open_format(void) {
    char mode[5];
    int ret;
    strcpy(mode, "r");
    ret = vcf_open_mode(mode+1, "mode1.bcf", NULL);
    if (strncmp(mode, "rb", 2) || ret)
        error("Mode '%s' does not match the expected value '%s'", mode, "rb");
    mode[1] = 0;
    ret = vcf_open_mode(mode+1, "mode1.vcf", NULL);
    if (strncmp(mode, "r", 1) || ret)
        error("Mode '%s' does not match the expected value '%s'", mode, "r");
    mode[1] = 0;
    ret = vcf_open_mode(mode+1, "mode1.vcf.gz", NULL);
    if (strncmp(mode, "rz", 2) || ret)
        error("Mode '%s' does not match the expected value '%s'", mode, "rz");
    mode[1] = 0;
    ret = vcf_open_mode(mode+1, "mode1.vcf.bgz", NULL);
    if (strncmp(mode, "rz", 2) || ret)
        error("Mode '%s' does not match the expected value '%s'", mode, "rz");
    mode[1] = 0;
    ret = vcf_open_mode(mode+1, "mode1.xcf", NULL);
    if (!ret)
        error("Expected failure for wrong extension 'xcf'");
    mode[1] = 0;
    ret = vcf_open_mode(mode+1, "mode1.vcf.gbz", NULL);
    if (!ret)
        error("Expected failure for wrong extension 'vcf.gbz'");
    mode[1] = 0;
    ret = vcf_open_mode(mode+1, "mode1.bvcf.bgz", NULL);
    if (!ret)
        error("Expected failure for wrong extension 'vcf.bvcf.bgz'");
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xb(%rsp), %rbx
movw $0x72, -0x1(%rbx)
leaq 0xa5b18(%rip), %rsi     # 0xade5b
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3b357
cmpw $0x6272, -0x1(%rbx)     # imm = 0x6272
jne 0x8434
testl %eax, %eax
jne 0x8434
movb $0x0, 0xb(%rsp)
leaq 0xa5b29(%rip), %rsi     # 0xade96
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3b357
cmpb $0x72, 0xa(%rsp)
jne 0x8444
testl %eax, %eax
jne 0x8444
movb $0x0, 0xb(%rsp)
leaq 0xa5b0a(%rip), %rsi     # 0xadea0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3b357
cmpw $0x7a72, 0xa(%rsp)      # imm = 0x7A72
jne 0x8424
testl %eax, %eax
jne 0x8424
movb $0x0, 0xb(%rsp)
leaq 0xa5af7(%rip), %rsi     # 0xadeb0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3b357
cmpw $0x7a72, 0xa(%rsp)      # imm = 0x7A72
jne 0x8424
testl %eax, %eax
jne 0x8424
movb $0x0, 0xb(%rsp)
leaq 0xa5ae2(%rip), %rsi     # 0xadebe
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3b357
testl %eax, %eax
je 0x845e
movb $0x0, 0xb(%rsp)
leaq 0xa5afd(%rip), %rsi     # 0xadef3
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3b357
testl %eax, %eax
je 0x8467
movb $0x0, 0xb(%rsp)
leaq 0xa5b20(%rip), %rsi     # 0xadf30
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3b357
testl %eax, %eax
je 0x8470
addq $0x10, %rsp
popq %rbx
retq
leaq 0xa5a3a(%rip), %rdi     # 0xade65
leaq 0xa5a7b(%rip), %rdx     # 0xadead
jmp 0x8452
leaq 0xa5a2a(%rip), %rdi     # 0xade65
leaq 0xa52b9(%rip), %rdx     # 0xad6fb
jmp 0x8452
leaq 0xa5a1a(%rip), %rdi     # 0xade65
leaq 0xa9147(%rip), %rdx     # 0xb1599
leaq 0xa(%rsp), %rsi
xorl %eax, %eax
callq 0x600c
leaq 0xa5a63(%rip), %rdi     # 0xadec8
jmp 0x8477
leaq 0xa5a93(%rip), %rdi     # 0xadf01
jmp 0x8477
leaq 0xa5ac8(%rip), %rdi     # 0xadf3f
xorl %eax, %eax
callq 0x600c
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/test/test-vcf-api.c
// Function: main
int main(int argc, char **argv)
{
    char *fname = argc>1 ? argv[1] : "rmme.bcf";

    // format test. quiet unless there's a failure
    test_get_format_values(fname);

    // main test. writes to stdout
    write_bcf(fname);
    bcf_to_vcf(fname);
    iterator(fname);

    // additional tests. quiet unless there's a failure.
    test_get_info_values(fname);
    test_invalid_end_tag();
    test_open_format();
    test_rlen_values();
    return 0;
}

// Assembly:
pushq %rbx
cmpl $0x2, %edi
jl 0x8a1d
movq 0x8(%rsi), %rbx
jmp 0x8a24
leaq 0xa5852(%rip), %rbx     # 0xae276
movq %rbx, %rdi
callq 0x7e4d
movq %rbx, %rdi
callq 0x804d
movq %rbx, %rdi
callq 0x60c8
movq %rbx, %rdi
callq 0x7349
movq %rbx, %rdi
callq 0x7ab6
movq %rbx, %rdi
callq 0x7be1
callq 0x8163
callq 0x832c
callq 0x847e
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/oceankeyakv2/generic64lc/KeccakP-1600-opt64.c
// Function: KeccakP1600_Initialize
void KeccakP1600_Initialize(void *state)
{
    memset(state, 0, 200);
#ifdef KeccakP1600_useLaneComplementing
    ((UINT64*)state)[ 1] = ~(UINT64)0;
    ((UINT64*)state)[ 2] = ~(UINT64)0;
    ((UINT64*)state)[ 8] = ~(UINT64)0;
    ((UINT64*)state)[12] = ~(UINT64)0;
    ((UINT64*)state)[17] = ~(UINT64)0;
    ((UINT64*)state)[20] = ~(UINT64)0;
#endif
}

// Assembly:
vpxor %xmm0, %xmm0, %xmm0
vmovdqu %ymm0, 0x40(%rdi)
vmovdqu %ymm0, 0x60(%rdi)
vmovdqu %ymm0, 0x80(%rdi)
vmovdqu %ymm0, 0xa0(%rdi)
vmovdqu %ymm0, (%rdi)
vmovdqu %ymm0, 0x20(%rdi)
movq $0x0, 0xc0(%rdi)
movq $-0x1, %rax
movq %rax, 0x40(%rdi)
movq %rax, 0x60(%rdi)
movq %rax, 0x88(%rdi)
movq %rax, 0xa0(%rdi)
vpcmpeqd %xmm0, %xmm0, %xmm0
vmovdqu %xmm0, 0x8(%rdi)
vzeroupper
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/oceankeyakv2/generic64lc/KeccakP-1600-opt64.c
// Function: KeccakP1600_AddBytesInLane
void KeccakP1600_AddBytesInLane(void *state, unsigned int lanePosition, const unsigned char *data, unsigned int offset, unsigned int length)
{
#if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
    UINT64 lane;
    if (length == 0)
        return;
    if (length == 1)
        lane = data[0];
    else {
        lane = 0;
        memcpy(&lane, data, length);
    }
    lane <<= offset*8;
#else
    UINT64 lane = 0;
    unsigned int i;
    for(i=0; i<length; i++)
        lane |= ((UINT64)data[i]) << ((i+offset)*8);
#endif
    ((UINT64*)state)[lanePosition] ^= lane;
}

// Assembly:
testl %r8d, %r8d
je 0x5845
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %ecx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x1, %r8d
jne 0x580d
movzbl (%rdx), %eax
movq %rax, 0x8(%rsp)
jmp 0x5827
leaq 0x8(%rsp), %rdi
movq $0x0, (%rdi)
movl %r8d, %eax
movq %rdx, %rsi
movq %rax, %rdx
callq 0x5650
shll $0x3, %r14d
shlxq %r14, 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movl %ebp, %ecx
xorq %rax, (%rbx,%rcx,8)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/oceankeyakv2/generic64lc/KeccakP-1600-opt64.c
// Function: KeccakP1600_OverwriteBytesInLane
void KeccakP1600_OverwriteBytesInLane(void *state, unsigned int lanePosition, const unsigned char *data, unsigned int offset, unsigned int length)
{
#if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
#ifdef KeccakP1600_useLaneComplementing
    if ((lanePosition == 1) || (lanePosition == 2) || (lanePosition == 8) || (lanePosition == 12) || (lanePosition == 17) || (lanePosition == 20)) {
        unsigned int i;
        for(i=0; i<length; i++)
            ((unsigned char*)state)[lanePosition*8+offset+i] = ~data[i];
    }
    else
#endif
    {
        memcpy((unsigned char*)state+lanePosition*8+offset, data, length);
    }
#else
#error "Not yet implemented"
#endif
}

// Assembly:
cmpl $0x14, %esi
ja 0x5a61
movl $0x121106, %eax         # imm = 0x121106
btl %esi, %eax
jae 0x5a61
testl %r8d, %r8d
je 0x5a60
movl %r8d, %eax
leal (%rcx,%rsi,8), %ecx
xorl %esi, %esi
movb (%rdx,%rsi), %r8b
notb %r8b
leal (%rcx,%rsi), %r9d
movb %r8b, (%rdi,%r9)
incq %rsi
cmpq %rsi, %rax
jne 0x5a49
retq
shll $0x3, %esi
addq %rsi, %rdi
movl %ecx, %eax
addq %rdi, %rax
movl %r8d, %ecx
movq %rax, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
jmp 0x5650
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/oceankeyakv2/generic64lc/KeccakP-1600-opt64.c
// Function: KeccakP1600_OverwriteLanes
void KeccakP1600_OverwriteLanes(void *state, const unsigned char *data, unsigned int laneCount)
{
#if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
#ifdef KeccakP1600_useLaneComplementing
    unsigned int lanePosition;

    for(lanePosition=0; lanePosition<laneCount; lanePosition++)
        if ((lanePosition == 1) || (lanePosition == 2) || (lanePosition == 8) || (lanePosition == 12) || (lanePosition == 17) || (lanePosition == 20))
            ((UINT64*)state)[lanePosition] = ~((const UINT64*)data)[lanePosition];
        else
            ((UINT64*)state)[lanePosition] = ((const UINT64*)data)[lanePosition];
#else
    memcpy(state, data, laneCount*8);
#endif
#else
#error "Not yet implemented"
#endif
}

// Assembly:
testl %edx, %edx
je 0x5aaf
movl %edx, %eax
xorl %ecx, %ecx
movl $0x121106, %edx         # imm = 0x121106
cmpl $0x14, %ecx
ja 0x5aa9
btl %ecx, %edx
jae 0x5aa9
movq (%rsi,%rcx,8), %r8
notq %r8
movq %r8, (%rdi,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x5a8a
jmp 0x5aaf
movq (%rsi,%rcx,8), %r8
jmp 0x5a9b
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/oceankeyakv2/generic64lc/KeccakP-1600-opt64.c
// Function: KeccakP1600_OverwriteWithZeroes
void KeccakP1600_OverwriteWithZeroes(void *state, unsigned int byteCount)
{
#if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
#ifdef KeccakP1600_useLaneComplementing
    unsigned int lanePosition;

    for(lanePosition=0; lanePosition<byteCount/8; lanePosition++)
        if ((lanePosition == 1) || (lanePosition == 2) || (lanePosition == 8) || (lanePosition == 12) || (lanePosition == 17) || (lanePosition == 20))
            ((UINT64*)state)[lanePosition] = ~0;
        else
            ((UINT64*)state)[lanePosition] = 0;
    if (byteCount%8 != 0) {
        lanePosition = byteCount/8;
        if ((lanePosition == 1) || (lanePosition == 2) || (lanePosition == 8) || (lanePosition == 12) || (lanePosition == 17) || (lanePosition == 20))
            memset((unsigned char*)state+lanePosition*8, 0xFF, byteCount%8);
        else
            memset((unsigned char*)state+lanePosition*8, 0, byteCount%8);
    }
#else
    memset(state, 0, byteCount);
#endif
#else
#error "Not yet implemented"
#endif
}

// Assembly:
movl %esi, %eax
shrl $0x3, %eax
cmpl $0x8, %esi
jae 0x5c33
movl %esi, %ecx
andl $0x7, %ecx
je 0x5c72
movl %esi, %edx
andl $-0x28, %edx
cmpl $0x40, %edx
je 0x5c21
cmpl $0x14, %eax
ja 0x5c73
movl $0x120006, %edx         # imm = 0x120006
btl %eax, %edx
jae 0x5c73
andl $-0x8, %esi
addq %rsi, %rdi
movl %ecx, %edx
movl $0xff, %esi
jmp 0x5070
movl %eax, %ecx
xorl %edx, %edx
movl $0x120006, %r8d         # imm = 0x120006
movl %edx, %r10d
andl $0x7ffffffb, %r10d      # imm = 0x7FFFFFFB
movq $-0x1, %r9
cmpl $0x8, %r10d
je 0x5c5f
cmpl $0x14, %edx
ja 0x5c6d
btl %edx, %r8d
jae 0x5c6d
movq %r9, (%rdi,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x5c3d
jmp 0x5c01
xorl %r9d, %r9d
jmp 0x5c5f
retq
andl $-0x8, %esi
addq %rsi, %rdi
movl %ecx, %edx
xorl %esi, %esi
jmp 0x5070
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/oceankeyakv2/generic64lc/KeccakP-1600-opt64.c
// Function: KeccakP1600_ExtractLanes
void KeccakP1600_ExtractLanes(const void *state, unsigned char *data, unsigned int laneCount)
{
#if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
    memcpy(data, state, laneCount*8);
#else
    unsigned int i;

    for(i=0; i<laneCount; i++)
        fromWordToBytes(data+(i*8), ((const UINT64*)state)[i]);
#endif
#ifdef KeccakP1600_useLaneComplementing
    if (laneCount > 1) {
        ((UINT64*)data)[ 1] = ~((UINT64*)data)[ 1];
        if (laneCount > 2) {
            ((UINT64*)data)[ 2] = ~((UINT64*)data)[ 2];
            if (laneCount > 8) {
                ((UINT64*)data)[ 8] = ~((UINT64*)data)[ 8];
                if (laneCount > 12) {
                    ((UINT64*)data)[12] = ~((UINT64*)data)[12];
                    if (laneCount > 17) {
                        ((UINT64*)data)[17] = ~((UINT64*)data)[17];
                        if (laneCount > 20) {
                            ((UINT64*)data)[20] = ~((UINT64*)data)[20];
                        }
                    }
                }
            }
        }
    }
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %rsi
leal (,%r14,8), %edx
movq %rbx, %rdi
callq 0x5650
cmpl $0x2, %r14d
jb 0xd45e
notq 0x8(%rbx)
je 0xd45e
notq 0x10(%rbx)
cmpl $0x9, %r14d
jb 0xd45e
notq 0x40(%rbx)
cmpl $0xd, %r14d
jb 0xd45e
notq 0x60(%rbx)
cmpl $0x12, %r14d
jb 0xd45e
notq 0x88(%rbx)
cmpl $0x15, %r14d
jb 0xd45e
notq 0xa0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/oceankeyakv2/generic64lc/encrypt.c
// Function: crypto_aead_encrypt
int crypto_aead_encrypt(
    unsigned char *c,unsigned long long *clen,
    const unsigned char *m,unsigned long long mlen,
    const unsigned char *ad,unsigned long long adlen,
    const unsigned char *nsec,
    const unsigned char *npub,
    const unsigned char *k
    )
{
    OceanKeyak_Instance instance;

    OceanKeyak_Initialize( &instance, k, 16, npub, 150, 0, 0, 0, 0 );
    OceanKeyak_Wrap( &instance, m, c, (size_t)mlen, ad, (size_t)adlen, c+mlen, 0, 0 );
    *clen = mlen + 16;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movq %r9, (%rsp)
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, 0x8(%rsp)
movq %rdi, %rbp
movq 0x390(%rsp), %rsi
movq 0x388(%rsp), %rcx
subq $0x8, %rsp
xorl %r15d, %r15d
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movl $0x10, %edx
movl $0x96, %r8d
xorl %r9d, %r9d
pushq %r15
pushq %r15
pushq $0x0
callq 0x54a0
addq $0x20, %rsp
leaq (%rbx,%rbp), %rax
subq $0x8, %rsp
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
movq %r12, %r8
movq 0x8(%rsp), %r9
pushq %r15
pushq %r15
pushq %rax
callq 0x53d0
addq $0x20, %rsp
addq $0x10, %rbx
movq 0x8(%rsp), %rax
movq %rbx, (%rax)
xorl %eax, %eax
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/oceankeyakv2/generic64lc/encrypt.c
// Function: crypto_aead_decrypt
int crypto_aead_decrypt(
    unsigned char *m,unsigned long long *mlen,
    unsigned char *nsec,
    const unsigned char *c,unsigned long long clen,
    const unsigned char *ad,unsigned long long adlen,
    const unsigned char *npub,
    const unsigned char *k
    )
{
    OceanKeyak_Instance instance;
    unsigned long long mlen_;

    if (clen < 16)
        return -1;
    OceanKeyak_Initialize( &instance, k, 16, npub, 150, 0, 0, 1, 0 );
    mlen_ = clen - 16;
    *mlen = mlen_;
    if ( OceanKeyak_Wrap( &instance, c, m, (size_t)mlen_, ad, (size_t)adlen, (unsigned char*)c+mlen_, 1, 0 ) == 1 )
        return 0;
    return -1;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x10, %r8
jb 0x228a5
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x338, %rsp            # imm = 0x338
movq %r9, %rbx
movq %r8, %r12
movq %rcx, %r14
movq %rsi, %r13
movq %rdi, %r15
movq 0x380(%rsp), %rsi
movq 0x378(%rsp), %rcx
subq $0x8, %rsp
xorl %r10d, %r10d
movl $0x1, %eax
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
movl $0x10, %edx
movl $0x96, %r8d
xorl %r9d, %r9d
pushq %r10
pushq %rax
pushq $0x0
callq 0x54a0
addq $0x20, %rsp
leaq -0x10(%r12), %rcx
movq %rcx, (%r13)
leaq (%r14,%r12), %rax
addq $-0x10, %rax
subq $0x8, %rsp
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %r8
movq 0x378(%rsp), %r9
xorl %r10d, %r10d
pushq %r10
movl $0x1, %ebx
pushq %rbx
pushq %rax
callq 0x53d0
addq $0x20, %rsp
movl %eax, %ecx
xorl %eax, %eax
cmpl %ebx, %ecx
setne %al
negl %eax
addq $0x338, %rsp            # imm = 0x338
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/twine80n6t4clocv2/vperm/encrypt.c
// Function: load_partial_block
void load_partial_block(word* dst, const unsigned char* m, int len, unsigned choice)
{
    unsigned char temp[STATE_LEN];
    if(choice == ZERO_APPEND){
        memcpy(temp, m, len);
        memset(temp+len, 0, STATE_LEN-len);
        *dst = LOADS(temp);
    }
    else if(choice == ONE_ZERO_PADDING){
        memcpy(temp, m, len);
        memset(temp+len, 0, STATE_LEN-len);
        if(len < STATE_LEN)
            temp[len] = 0x80;
        *dst = LOADS(temp);
    }
    else if(choice == ZERO_PREPEND){
        memcpy(temp+STATE_LEN-len, m, len);
        memset(temp, 0, STATE_LEN-len);
        *dst = LOADS(temp);
    }
    else if(choice == PARAM_OZP){
        temp[0] = PARAM;
        memcpy(temp+1, m, len);
        memset(temp+len+1, 0, STATE_LEN-len-1);
        if(len < (STATE_LEN-1))
            temp[len+1] = 0x80;
        *dst = LOADS(temp);
    }
    else{
        // do nothing
    }
}

// Assembly:
cmpl $0x3, %ecx
ja 0x15be
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movl %ecx, %eax
leaq 0x1b54(%rip), %rcx      # 0x3018
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq %ebp, %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x1080
leaq (%rsp,%r14), %rdi
addq $0x8, %rdi
movl $0x8, %eax
subl %ebp, %eax
movslq %eax, %rdx
jmp 0x158f
movslq %ebp, %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x1080
leaq (%rsp,%r14), %rdi
addq $0x8, %rdi
movl $0x8, %eax
subl %ebp, %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x1030
cmpl $0x7, %ebp
jg 0x1596
movb $-0x80, 0x8(%rsp,%r14)
jmp 0x1596
leaq 0x9(%rsp), %rdi
movb $-0x34, -0x1(%rdi)
movslq %ebp, %r14
movq %r14, %rdx
callq 0x1080
leaq (%rsp,%r14), %rdi
addq $0x9, %rdi
movl $0x7, %eax
subl %r14d, %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x1030
cmpl $0x6, %r14d
jg 0x1596
leaq 0x8(%rsp), %rax
movb $-0x80, 0x1(%r14,%rax)
jmp 0x1596
movslq %ebp, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
subq %rdx, %rdi
addq $0x8, %rdi
callq 0x1080
movl $0x8, %eax
subl %ebp, %eax
movslq %eax, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x1030
vmovq 0x8(%rsp), %xmm0
vpsrlw $0x4, %xmm0, %xmm1
vpunpcklbw %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
vpbroadcastb 0x1a66(%rip), %xmm1 # 0x3014
vpand %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/giometti[P]mastering_UNIX_programming/chapter_02/open.c
// Function: main
int main(void)
{
	int fd;
	mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;

	/* Opens a file for writing creating the file if it does not
	 * already exist.
	 */
	fd = open(TMP_FILE, O_WRONLY | O_CREAT | O_TRUNC, mode);
	if (fd < 0)
		perror("open(O_WRONLY | O_CREAT | O_TRUNC)");
	else
		close(fd);

	/* Try to create TMP_FILE file and then to open it for writing.
	 * Thanks to the O_EXCL flag the call fails if the file already
	 * exists otherwise the file existence and creation is done
	 * atomically.
	 */
	fd = open(TMP_FILE, O_WRONLY | O_CREAT | O_EXCL, mode);
	if (fd < 0)
		perror("open(O_WRONLY | O_CREAT | O_EXCL)");
	else
		close(fd);

	return 0;
}

// Assembly:
pushq %rax
leaq 0xea0(%rip), %rdi       # 0x2004
movl $0x241, %esi            # imm = 0x241
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x1040
testl %eax, %eax
js 0x11a7
movl %eax, %edi
callq 0x1030
leaq 0xe7d(%rip), %rdi       # 0x2004
movl $0xc1, %esi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x1040
testl %eax, %eax
js 0x11b5
movl %eax, %edi
callq 0x1030
xorl %eax, %eax
popq %rcx
retq
leaq 0xe60(%rip), %rdi       # 0x200e
callq 0x1050
jmp 0x1180
leaq 0xe75(%rip), %rdi       # 0x2031
callq 0x1050
jmp 0x11a3
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/page_fault2.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	char tmpfile[] = "/tmp/willitscale.XXXXXX";
	int fd = mkstemp(tmpfile);
	unsigned long pgsize = getpagesize();

	assert(fd >= 0);
	assert(ftruncate(fd, MEMSIZE) == 0);
	unlink(tmpfile);

	while (1) {
		unsigned long i;

		char *c = mmap(NULL, MEMSIZE, PROT_READ|PROT_WRITE,
			       MAP_PRIVATE, fd, 0);
		assert(c != MAP_FAILED);

		for (i = 0; i < MEMSIZE; i += pgsize) {
			c[i] = 0;
			(*iterations)++;
		}

		munmap(c, MEMSIZE);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movaps 0x722(%rip), %xmm0      # 0x3310
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movabsq $0x5858585858582e, %rax # imm = 0x5858585858582E
movq %rax, 0x10(%rdi)
callq 0x21c0
movl %eax, %ebp
callq 0x2270
testl %ebp, %ebp
js 0x2cbd
movl %eax, %r14d
movl $0x8000000, %esi        # imm = 0x8000000
movl %ebp, %edi
callq 0x2110
testl %eax, %eax
jne 0x2cdc
movq %rsp, %rdi
callq 0x2080
movl $0x8000000, %esi        # imm = 0x8000000
xorl %edi, %edi
movl $0x3, %edx
movl $0x2, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x20e0
cmpq $-0x1, %rax
je 0x2c9e
movslq %r14d, %r14
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
incq (%rbx)
addq %r14, %rcx
cmpq $0x8000000, %rcx        # imm = 0x8000000
jb 0x2c5c
movl $0x8000000, %esi        # imm = 0x8000000
movq %rax, %rdi
callq 0x21d0
movl $0x8000000, %esi        # imm = 0x8000000
xorl %edi, %edi
movl $0x3, %edx
movl $0x2, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x20e0
cmpq $-0x1, %rax
jne 0x2c5a
leaq 0x657(%rip), %rdi       # 0x32fc
leaq 0x5ed(%rip), %rsi       # 0x3299
leaq 0x5fa(%rip), %rcx       # 0x32ad
movl $0x19, %edx
callq 0x2120
leaq 0x5cd(%rip), %rdi       # 0x3291
leaq 0x5ce(%rip), %rsi       # 0x3299
leaq 0x5db(%rip), %rcx       # 0x32ad
movl $0x10, %edx
callq 0x2120
leaq 0x5fd(%rip), %rdi       # 0x32e0
leaq 0x5af(%rip), %rsi       # 0x3299
leaq 0x5bc(%rip), %rcx       # 0x32ad
movl $0x11, %edx
callq 0x2120
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/main.c
// Function: yes_or_no
static inline void yes_or_no(mm_mapopt_t *opt, int64_t flag, int long_idx, const char *arg, int yes_to_set)
{
	if (yes_to_set) {
		if (strcmp(arg, "yes") == 0 || strcmp(arg, "y") == 0) opt->flag |= flag;
		else if (strcmp(arg, "no") == 0 || strcmp(arg, "n") == 0) opt->flag &= ~flag;
		else fprintf(stderr, "[WARNING]\033[1;31m option '--%s' only accepts 'yes' or 'no'.\033[0m\n", long_options[long_idx].name);
	} else {
		if (strcmp(arg, "yes") == 0 || strcmp(arg, "y") == 0) opt->flag &= ~flag;
		else if (strcmp(arg, "no") == 0 || strcmp(arg, "n") == 0) opt->flag |= flag;
		else fprintf(stderr, "[WARNING]\033[1;31m option '--%s' only accepts 'yes' or 'no'.\033[0m\n", long_options[long_idx].name);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %r12d
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x26302(%rip), %rsi     # 0x2b9c2
movq %rcx, %rdi
callq 0x2240
testl %r12d, %r12d
je 0x5713
testl %eax, %eax
je 0x5750
leaq 0x27dd3(%rip), %rsi     # 0x2d4ab
movq %r15, %rdi
callq 0x2240
testl %eax, %eax
je 0x5750
leaq 0x24d44(%rip), %rsi     # 0x2a42f
movq %r15, %rdi
callq 0x2240
testl %eax, %eax
je 0x5755
leaq 0x26f44(%rip), %rsi     # 0x2c642
movq %r15, %rdi
callq 0x2240
testl %eax, %eax
je 0x5755
movl %ebp, %edi
callq 0x2908
jmp 0x575b
testl %eax, %eax
je 0x5755
leaq 0x27d8d(%rip), %rsi     # 0x2d4ab
movq %r15, %rdi
callq 0x2240
testl %eax, %eax
je 0x5755
leaq 0x24cfe(%rip), %rsi     # 0x2a42f
movq %r15, %rdi
callq 0x2240
testl %eax, %eax
je 0x5750
leaq 0x26efe(%rip), %rsi     # 0x2c642
movq %r15, %rdi
callq 0x2240
testl %eax, %eax
jne 0x5764
orq %rbx, (%r14)
jmp 0x575b
notq %rbx
andq %rbx, (%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %edi
callq 0x2935
jmp 0x575b
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/main.c
// Function: mm_parse_num2
static inline int64_t mm_parse_num2(const char *str, char **q)
{
	double x;
	char *p;
	x = strtod(str, &p);
	if (*p == 'G' || *p == 'g') x *= 1e9, ++p;
	else if (*p == 'M' || *p == 'm') x *= 1e6, ++p;
	else if (*p == 'K' || *p == 'k') x *= 1e3, ++p;
	if (q) *q = p;
	return (int64_t)(x + .499);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsp, %r14
movq %r14, %rsi
callq 0x20d0
movq (%r14), %rax
movzbl (%rax), %ecx
addl $-0x47, %ecx
cmpl $0x26, %ecx
ja 0x57e0
movabsq $0x100000001, %rdx      # imm = 0x100000001
btq %rcx, %rdx
jb 0x57d1
movabsq $0x1000000010, %rdx     # imm = 0x1000000010
btq %rcx, %rdx
jb 0x57c7
movabsq $0x4000000040, %rdx     # imm = 0x4000000040
btq %rcx, %rdx
jae 0x57e0
mulsd 0x2484b(%rip), %xmm0    # 0x2a010
jmp 0x57d9
mulsd 0x24839(%rip), %xmm0    # 0x2a008
jmp 0x57d9
mulsd 0x2483f(%rip), %xmm0    # 0x2a018
incq %rax
movq %rax, (%rsp)
testq %rbx, %rbx
je 0x57ec
movq (%rsp), %rax
movq %rax, (%rbx)
addsd 0x2482c(%rip), %xmm0    # 0x2a020
cvttsd2si %xmm0, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/options.c
// Function: mm_idxopt_init
void mm_idxopt_init(mm_idxopt_t *opt)
{
	memset(opt, 0, sizeof(mm_idxopt_t));
	opt->k = 15, opt->w = 10, opt->flag = 0;
	opt->bucket_bits = 14;
	opt->mini_batch_size = 50000000;
	opt->batch_size = 8000000000ULL;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movabsq $0xe0000000a000f, %rax  # imm = 0xE0000000A000F
movq %rax, (%rdi)
movq $0x2faf080, 0x8(%rdi)   # imm = 0x2FAF080
movabsq $0x1dcd65000, %rax      # imm = 0x1DCD65000
movq %rax, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/options.c
// Function: mm_mapopt_update
void mm_mapopt_update(mm_mapopt_t *opt, const mm_idx_t *mi)
{
	if ((opt->flag & MM_F_SPLICE_FOR) || (opt->flag & MM_F_SPLICE_REV))
		opt->flag |= MM_F_SPLICE;
	if (opt->mid_occ <= 0) {
		opt->mid_occ = mm_idx_cal_max_occ(mi, opt->mid_occ_frac);
		if (opt->mid_occ < opt->min_mid_occ)
			opt->mid_occ = opt->min_mid_occ;
		if (opt->max_mid_occ > opt->min_mid_occ && opt->mid_occ > opt->max_mid_occ)
			opt->mid_occ = opt->max_mid_occ;
	}
	if (opt->bw_long < opt->bw) opt->bw_long = opt->bw;
	if (mm_verbose >= 3)
		fprintf(stderr, "[M::%s::%.3f*%.2f] mid_occ = %d\n", __func__, realtime() - mm_realtime0, cputime() / (realtime() - mm_realtime0), opt->mid_occ);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
testl $0x300, %eax            # imm = 0x300
je 0x61ae
orq $0x80, %rax
movq %rax, (%rbx)
cmpl $0x0, 0xd4(%rbx)
jg 0x61ea
movss 0xc4(%rbx), %xmm0
movq %rsi, %rdi
callq 0x735a
movl 0xcc(%rbx), %ecx
movl 0xd0(%rbx), %edx
cmpl %ecx, %eax
cmovlel %ecx, %eax
cmpl %edx, %eax
movl %edx, %esi
cmovll %eax, %esi
cmpl %ecx, %edx
cmovlel %eax, %esi
movl %esi, 0xd4(%rbx)
movl 0x14(%rbx), %eax
cmpl %eax, 0x18(%rbx)
jge 0x61f5
movl %eax, 0x18(%rbx)
leaq 0x2f504(%rip), %rax     # 0x35700
cmpl $0x3, (%rax)
jge 0x6203
popq %rbx
retq
addq $0xd4, %rbx
movq %rbx, %rdi
callq 0x29a1
jmp 0x6201
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_init
mm_idx_t *mm_idx_init(int w, int k, int b, int flag)
{
	mm_idx_t *mi;
	if (k*2 < b) b = k * 2;
	if (w < 1) w = 1;
	mi = (mm_idx_t*)calloc(1, sizeof(mm_idx_t));
	mi->w = w, mi->k = k, mi->b = b, mi->flag = flag;
	mi->B = (mm_idx_bucket_t*)calloc(1<<b, sizeof(mm_idx_bucket_t));
	if (!(mm_dbg_flag & 1)) mi->km = km_init();
	return mi;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %esi, %r14d
movl %edi, %r15d
leal (%r14,%r14), %r12d
cmpl %edx, %r12d
cmovgel %edx, %r12d
cmpl $0x2, %edi
movl $0x1, %r13d
cmovll %r13d, %r15d
movl $0x1, %edi
movl $0x60, %esi
callq 0x2230
movq %rax, %rbx
movl %r15d, 0x4(%rax)
movl %r14d, 0x8(%rax)
movl %r12d, (%rax)
movl %ebp, 0xc(%rax)
movl %r12d, %ecx
shll %cl, %r13d
movslq %r13d, %rdi
movl $0x30, %esi
callq 0x2230
movq %rax, 0x30(%rbx)
leaq 0x2ed83(%rip), %rax     # 0x35928
testb $0x1, (%rax)
jne 0x6bb3
callq 0x125bf
movq %rax, 0x50(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_destroy
void mm_idx_destroy(mm_idx_t *mi)
{
	uint32_t i;
	if (mi == 0) return;
	if (mi->h) kh_destroy(str, (khash_t(str)*)mi->h);
	if (mi->B) {
		for (i = 0; i < 1U<<mi->b; ++i) {
			free(mi->B[i].p);
			free(mi->B[i].a.a);
			kh_destroy(idx, (idxhash_t*)mi->B[i].h);
		}
	}
	if (mi->spsc) free(mi->spsc);
	if (mi->I) {
		for (i = 0; i < mi->n_seq; ++i)
			free(mi->I[i].a);
		free(mi->I);
	}
	if (mi->J) {
		for (i = 0; i < mi->n_seq; ++i)
			free(mi->J[i].a);
		free(mi->J);
	}
	if (!mi->km) {
		for (i = 0; i < mi->n_seq; ++i)
			free(mi->seq[i].name);
		free(mi->seq);
	} else km_destroy(mi->km);
	free(mi->B); free(mi->S); free(mi);
}

// Assembly:
testq %rdi, %rdi
je 0x6d1a
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %r14
testq %r14, %r14
je 0x6c0a
movq 0x18(%r14), %rsi
xorl %edi, %edi
callq 0x1261e
movq 0x10(%r14), %rsi
xorl %edi, %edi
callq 0x1261e
movq 0x20(%r14), %rsi
xorl %edi, %edi
callq 0x1261e
xorl %edi, %edi
movq %r14, %rsi
callq 0x1261e
cmpq $0x0, 0x30(%rbx)
je 0x6c86
movl $0x1, %r15d
leal -0x1(%r15), %eax
movq 0x30(%rbx), %rcx
shlq $0x4, %rax
leaq (%rax,%rax,2), %r14
movq 0x20(%rcx,%r14), %rdi
callq 0x2040
movq 0x30(%rbx), %rax
movq 0x10(%rax,%r14), %rdi
callq 0x2040
movq 0x30(%rbx), %rax
movq 0x28(%rax,%r14), %r14
testq %r14, %r14
je 0x6c78
movq 0x18(%r14), %rsi
xorl %edi, %edi
callq 0x1261e
movq 0x10(%r14), %rsi
xorl %edi, %edi
callq 0x1261e
movq 0x20(%r14), %rsi
xorl %edi, %edi
callq 0x1261e
xorl %edi, %edi
movq %r14, %rsi
callq 0x1261e
movb (%rbx), %cl
movl %r15d, %eax
shrl %cl, %eax
incl %r15d
testl %eax, %eax
je 0x6c17
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x6c94
callq 0x2040
cmpq $0x0, 0x38(%rbx)
je 0x6ccf
cmpl $0x0, 0x10(%rbx)
je 0x6cc6
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x38(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2040
incq %r15
movl 0x10(%rbx), %eax
addq $0x10, %r14
cmpq %rax, %r15
jb 0x6caa
movq 0x38(%rbx), %rdi
callq 0x2040
cmpq $0x0, 0x48(%rbx)
je 0x6d0a
cmpl $0x0, 0x10(%rbx)
je 0x6d01
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x48(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2040
incq %r15
movl 0x10(%rbx), %eax
addq $0x10, %r14
cmpq %rax, %r15
jb 0x6ce5
movq 0x48(%rbx), %rdi
callq 0x2040
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x6d1b
callq 0x125e0
jmp 0x6d4c
retq
cmpl $0x0, 0x10(%rbx)
je 0x6d43
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2040
incq %r15
movl 0x10(%rbx), %eax
addq $0x18, %r14
cmpq %rax, %r15
jb 0x6d27
movq 0x20(%rbx), %rdi
callq 0x2040
movq 0x30(%rbx), %rdi
callq 0x2040
movq 0x28(%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_index_name
int mm_idx_index_name(mm_idx_t *mi)
{
	khash_t(str) *h;
	uint32_t i;
	int has_dup = 0, absent;
	if (mi->h) return 0;
	h = kh_init(str);
	for (i = 0; i < mi->n_seq; ++i) {
		khint_t k;
		k = kh_put(str, h, mi->seq[i].name, &absent);
		if (absent) kh_val(h, k) = i;
		else has_dup = 1;
	}
	mi->h = h;
	if (has_dup && mm_verbose >= 2)
		fprintf(stderr, "[WARNING] some database sequences have identical sequence names\n");
	return has_dup;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpq $0x0, 0x58(%rdi)
jne 0x6ef1
movq %rdi, %r14
xorl %ebx, %ebx
movl $0x1, %esi
movl $0x28, %edx
xorl %edi, %edi
callq 0x1257c
movq %rax, %r15
cmpl $0x0, 0x10(%r14)
je 0x6edd
xorl %r13d, %r13d
leaq 0x4(%rsp), %r12
xorl %ebp, %ebp
xorl %ebx, %ebx
movq 0x20(%r14), %rax
movq (%rax,%r13), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x6f09
cmpl $0x0, 0x4(%rsp)
je 0x6ec8
movq 0x20(%r15), %rcx
movl %eax, %eax
movl %ebp, (%rcx,%rax,4)
jmp 0x6ecd
movl $0x1, %ebx
incq %rbp
movl 0x10(%r14), %eax
addq $0x18, %r13
cmpq %rax, %rbp
jb 0x6ea3
movq %r15, 0x58(%r14)
testl %ebx, %ebx
je 0x6ef1
leaq 0x2e814(%rip), %rax     # 0x35700
cmpl $0x2, (%rax)
jge 0x6f02
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2d90
jmp 0x6ef1
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_name2id
int mm_idx_name2id(const mm_idx_t *mi, const char *name)
{
	khash_t(str) *h = (khash_t(str)*)mi->h;
	khint_t k;
	if (h == 0) return -2;
	k = kh_get(str, h, name);
	return k == kh_end(h)? -1 : kh_val(h, k);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x58(%rdi), %rbx
testq %rbx, %rbx
je 0x715c
movl (%rbx), %ecx
testl %ecx, %ecx
je 0x7166
leal -0x1(%rcx), %edi
movsbl (%rsi), %r13d
testl %r13d, %r13d
movq %rcx, 0x10(%rsp)
je 0x716e
movb 0x1(%rsi), %al
testb %al, %al
je 0x7171
leaq 0x2(%rsi), %rcx
movl %r13d, %edx
shll $0x5, %edx
subl %r13d, %edx
movsbl %al, %r13d
addl %edx, %r13d
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x7141
jmp 0x7171
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x7215
xorl %r15d, %r15d
jmp 0x7201
xorl %r13d, %r13d
andl %edi, %r13d
movq 0x10(%rbx), %rdx
movl $0x1, %r14d
movl %r13d, %r15d
movq %rbx, 0x20(%rsp)
movl %edi, 0xc(%rsp)
movq %rsi, 0x18(%rsp)
movl %r15d, %eax
shrl $0x4, %eax
movl (%rdx,%rax,4), %r12d
leal (%r15,%r15), %ebp
andl $0x1e, %ebp
movl %r12d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x71ef
testb $0x1, %al
jne 0x71d7
movq 0x18(%rbx), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rdx, %rbx
callq 0x2240
movq %rbx, %rdx
movl 0xc(%rsp), %edi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rbx
testl %eax, %eax
je 0x71ef
addl %r14d, %r15d
andl %edi, %r15d
incl %r14d
cmpl %r13d, %r15d
jne 0x718f
movq 0x10(%rsp), %rcx
movl %ecx, %r15d
jmp 0x7201
movl %ebp, %ecx
shrl %cl, %r12d
testb $0x3, %r12b
movq 0x10(%rsp), %rcx
cmovnel %ecx, %r15d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %r15d
je 0x7215
movq 0x20(%rbx), %rax
movl %r15d, %ecx
movl (%rax,%rcx,4), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_getseq
int mm_idx_getseq(const mm_idx_t *mi, uint32_t rid, uint32_t st, uint32_t en, uint8_t *seq)
{
	uint64_t i, st1, en1;
	if (rid >= mi->n_seq || st >= mi->seq[rid].len) return -1;
	if (en > mi->seq[rid].len) en = mi->seq[rid].len;
	st1 = mi->seq[rid].offset + st;
	en1 = mi->seq[rid].offset + en;
	for (i = st1; i < en1; ++i)
		seq[i - st1] = mm_seq4_get(mi->S, i);
	return en - st;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %esi, 0x10(%rdi)
jbe 0x729e
movl %ecx, %r9d
movq 0x20(%rdi), %rcx
movl %esi, %esi
leaq (%rsi,%rsi,2), %rsi
movl 0x10(%rcx,%rsi,8), %r10d
cmpl %edx, %r10d
jbe 0x729e
pushq %rbx
cmpl %r9d, %r10d
cmovbl %r10d, %r9d
movq 0x8(%rcx,%rsi,8), %rax
movl %edx, %ecx
leaq (%rax,%rcx), %rsi
leaq (%rax,%r9), %r10
cmpq %r10, %rsi
jae 0x7297
movq %r9, %r10
subq %rcx, %r10
addl %edx, %eax
shll $0x2, %eax
xorl %r11d, %r11d
leaq (%rsi,%r11), %rcx
movq 0x28(%rdi), %rbx
shrq $0x3, %rcx
movl (%rbx,%rcx,4), %ebx
movl %eax, %ecx
andb $0x1c, %cl
shrl %cl, %ebx
andb $0xf, %bl
movb %bl, (%r8,%r11)
incq %r11
addl $0x4, %eax
cmpq %r11, %r10
jne 0x726f
subl %edx, %r9d
movl %r9d, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_getseq_rev
int mm_idx_getseq_rev(const mm_idx_t *mi, uint32_t rid, uint32_t st, uint32_t en, uint8_t *seq)
{
	uint64_t i, st1, en1;
	const mm_idx_seq_t *s;
	if (rid >= mi->n_seq || st >= mi->seq[rid].len) return -1;
	s = &mi->seq[rid];
	if (en > s->len) en = s->len;
	st1 = s->offset + (s->len - en);
	en1 = s->offset + (s->len - st);
	for (i = st1; i < en1; ++i) {
		uint8_t c = mm_seq4_get(mi->S, i);
		seq[en1 - i - 1] = c < 4? 3 - c : c;
	}
	return en - st;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %esi, 0x10(%rdi)
jbe 0x7337
movl %ecx, %r9d
movq 0x20(%rdi), %rcx
movl %esi, %esi
leaq (%rsi,%rsi,2), %r11
movl 0x10(%rcx,%r11,8), %esi
movl %esi, %r10d
subl %edx, %r10d
jbe 0x7337
pushq %rbx
leaq (%rcx,%r11,8), %rax
cmpl %r9d, %esi
cmovbl %esi, %r9d
movq 0x8(%rax), %rcx
movl %esi, %r11d
subl %r9d, %r11d
leaq (%rcx,%r11), %rax
leaq (%rcx,%r10), %rbx
cmpq %rbx, %rax
jae 0x7330
subq %r11, %r10
addl %ecx, %esi
subl %r9d, %esi
shll $0x2, %esi
movq 0x28(%rdi), %rcx
movq %rax, %r11
shrq $0x3, %r11
movl (%rcx,%r11,4), %r11d
movl %esi, %ecx
andb $0x1c, %cl
shrl %cl, %r11d
andl $0xf, %r11d
movb $0x3, %cl
subb %r11b, %cl
cmpl $0x4, %r11d
movzbl %cl, %ecx
cmovael %r11d, %ecx
movb %cl, -0x1(%r8,%r10)
incq %rax
addl $0x4, %esi
decq %r10
jne 0x72f5
subl %edx, %r9d
movl %r9d, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_cal_max_occ
int32_t mm_idx_cal_max_occ(const mm_idx_t *mi, float f)
{
	int i;
	size_t n = 0;
	uint32_t thres;
	khint_t *a, k;
	if (f <= 0.) return INT32_MAX;
	for (i = 0; i < 1<<mi->b; ++i)
		if (mi->B[i].h) n += kh_size((idxhash_t*)mi->B[i].h);
	if (n == 0) return INT32_MAX;
	a = (uint32_t*)malloc(n * 4);
	for (i = n = 0; i < 1<<mi->b; ++i) {
		idxhash_t *h = (idxhash_t*)mi->B[i].h;
		if (h == 0) continue;
		for (k = 0; k < kh_end(h); ++k) {
			if (!kh_exist(h, k)) continue;
			a[n++] = kh_key(h, k)&1? 1 : (uint32_t)kh_val(h, k);
		}
	}
	thres = ks_ksmall_uint32_t(n, a, (uint32_t)((1. - f) * n)) + 1;
	free(a);
	return thres;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jae 0x74d1
movq %rdi, %r14
movl (%rdi), %r15d
movl $0x1, %edx
movl $0x1, %r12d
movl %r15d, %ecx
shll %cl, %r12d
cmpl $0x1f, %r15d
jne 0x7398
xorl %edi, %edi
jmp 0x73c9
movq 0x30(%r14), %rax
cmpl $0x2, %r12d
cmovgel %r12d, %edx
shlq $0x4, %rdx
leaq (%rdx,%rdx,2), %rcx
xorl %edx, %edx
xorl %edi, %edi
movq 0x28(%rax,%rdx), %rsi
testq %rsi, %rsi
je 0x73c0
movl 0x4(%rsi), %esi
addq %rsi, %rdi
addq $0x30, %rdx
cmpq %rdx, %rcx
jne 0x73b0
testq %rdi, %rdi
je 0x74d1
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
shlq $0x2, %rdi
callq 0x22f0
movq %rax, %rbx
cmpl $0x1f, %r15d
jne 0x73fb
xorl %edi, %edi
movsd 0x8(%rsp), %xmm2
jmp 0x7485
movq 0x30(%r14), %rax
cmpl $0x2, %r12d
movl $0x1, %edx
cmovgel %r12d, %edx
xorl %esi, %esi
xorl %edi, %edi
movsd 0x8(%rsp), %xmm2
leaq (%rsi,%rsi,2), %rcx
shlq $0x4, %rcx
movq 0x28(%rax,%rcx), %r8
testq %r8, %r8
je 0x747d
cmpl $0x0, (%r8)
je 0x747d
movq 0x10(%r8), %r9
xorl %r10d, %r10d
xorl %r11d, %r11d
movl %r11d, %ecx
shrl $0x4, %ecx
movl (%r9,%rcx,4), %ebp
movl %r10d, %ecx
andb $0x1e, %cl
shrl %cl, %ebp
testb $0x3, %bpl
jne 0x746e
movq 0x18(%r8), %r14
movl $0x1, %ecx
testb $0x1, (%r14,%r11,8)
jne 0x7468
movq 0x20(%r8), %rcx
movl (%rcx,%r11,8), %ecx
movl %ecx, (%rbx,%rdi,4)
incq %rdi
incq %r11
movl (%r8), %ecx
addl $0x2, %r10d
cmpq %rcx, %r11
jb 0x7438
incq %rsi
cmpq %rdx, %rsi
jne 0x7416
movsd 0x22b9b(%rip), %xmm0    # 0x2a028
movq %rdi, %xmm1
punpckldq 0x24c16(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x24c1e(%rip), %xmm1    # 0x2c0c0
subsd %xmm2, %xmm0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %rax
movl %eax, %edx
movq %rbx, %rsi
callq 0x5e25
movl %eax, %ebp
incl %ebp
movq %rbx, %rdi
callq 0x2040
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_gen
mm_idx_t *mm_idx_gen(mm_bseq_file_t *fp, int w, int k, int b, int flag, int mini_batch_size, int n_threads, uint64_t batch_size)
{
	pipeline_t pl;
	if (fp == 0 || mm_bseq_eof(fp)) return 0;
	memset(&pl, 0, sizeof(pipeline_t));
	pl.mini_batch_size = (uint64_t)mini_batch_size < batch_size? mini_batch_size : batch_size;
	pl.batch_size = batch_size;
	pl.fp = fp;
	pl.mi = mm_idx_init(w, k, b, flag);

	kt_pipeline(n_threads < 3? n_threads : 3, worker_pipeline, &pl, 3);
	if (mm_verbose >= 3)
		fprintf(stderr, "[M::%s::%.3f*%.2f] collected minimizers\n", __func__, realtime() - mm_realtime0, cputime() / (realtime() - mm_realtime0));

	mm_idx_post(pl.mi, n_threads);
	if (mm_verbose >= 3)
		fprintf(stderr, "[M::%s::%.3f*%.2f] sorted minimizers\n", __func__, realtime() - mm_realtime0, cputime() / (realtime() - mm_realtime0));

	return pl.mi;
}

// Assembly:
testq %rdi, %rdi
je 0x7515
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r13
callq 0x1374a
testl %eax, %eax
je 0x7518
xorl %eax, %eax
jmp 0x75b9
xorl %eax, %eax
retq
movq 0x68(%rsp), %rax
movl 0x60(%rsp), %r8d
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movslq %ebx, %rcx
cmpq %rax, %rcx
cmovaeq %rax, %rcx
movq $0x0, 0x20(%rdx)
movl %ecx, (%rdx)
movq %rax, 0x8(%rdx)
movq %r13, 0x18(%rdx)
movq %rdx, %rbx
movl %r12d, %edi
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
movl %r8d, %ebp
callq 0x6b3c
movq %rax, 0x20(%rbx)
cmpl $0x3, %ebp
movl $0x3, %edi
cmovll %ebp, %edi
leaq 0x5f(%rip), %rsi        # 0x75d6
movq %rbx, %rdx
movl $0x3, %ecx
callq 0x12308
leaq 0x2e175(%rip), %rbx     # 0x35700
cmpl $0x3, (%rbx)
jge 0x75c8
movq 0x20(%rsp), %rdx
movb (%rdx), %cl
movl $0x1, %eax
shll %cl, %eax
movslq %eax, %rcx
leaq 0x3410(%rip), %rsi      # 0xa9b8
movl %ebp, %edi
callq 0x12138
cmpl $0x3, (%rbx)
jge 0x75cf
movq 0x20(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2dac
jmp 0x7590
callq 0x2e19
jmp 0x75b4
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_build
mm_idx_t *mm_idx_build(const char *fn, int w, int k, int flag, int n_threads) // a simpler interface; deprecated
{
	mm_bseq_file_t *fp;
	mm_idx_t *mi;
	fp = mm_bseq_open(fn);
	if (fp == 0) return 0;
	mi = mm_idx_gen(fp, w, k, 14, flag, 1<<18, n_threads, UINT64_MAX);
	mm_bseq_close(fp);
	return mi;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
callq 0x13084
testq %rax, %rax
je 0x7a48
movq %rax, %r14
movq %rax, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl $0xe, %ecx
movl %ebp, %r8d
movl $0x40000, %r9d          # imm = 0x40000
pushq $-0x1
pushq %rbx
callq 0x74e0
addq $0x10, %rsp
movq %rax, %rbx
movq %r14, %rdi
callq 0x130f8
movq %rbx, %rax
jmp 0x7a4a
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq