LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/main.cpp
// Function: main
int main(int argc, const char **argv) {
    /* Use default configuration */
    ococo::params_t params = ococo::params_t(argc, argv);
    if (!params.correctly_initialized) {
        return EXIT_FAILURE;
    }

    switch (params.counter_configuration) {
        case ococo::OCOCO16: {
            ococo::caller_t<uint16_t, 3, 4> caller(&params);
            if (!caller.correctly_initialized) {
                return EXIT_FAILURE;
            }
            caller.run();
            return caller.return_code;
        }

        case ococo::OCOCO32: {
            ococo::caller_t<uint32_t, 7, 4> caller(&params);
            if (!caller.correctly_initialized) {
                return EXIT_FAILURE;
            }
            caller.run();
            return caller.return_code;
        }

        case ococo::OCOCO64: {
            ococo::caller_t<uint64_t, 15, 4> caller(&params);
            if (!caller.correctly_initialized) {
                return EXIT_FAILURE;
            }
            caller.run();
            return caller.return_code;
        }
    }

    return EXIT_FAILURE;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rsi, %rdx
movl %edi, %esi
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0xca46
movl $0x1, %ebx
cmpb $0x1, (%r14)
jne 0x669a
movl 0x68(%rsp), %eax
cmpl $0x2, %eax
je 0x6667
cmpl $0x1, %eax
je 0x6632
testl %eax, %eax
jne 0x669a
leaq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x6d52
movl $0x1, %ebx
cmpb $0x0, 0x8(%rsp)
je 0x6626
leaq 0x8(%rsp), %rdi
callq 0x73b8
movl 0xc(%rsp), %ebx
leaq 0x8(%rsp), %rdi
callq 0x7786
jmp 0x669a
leaq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x782c
movl $0x1, %ebx
cmpb $0x0, 0x8(%rsp)
je 0x665b
leaq 0x8(%rsp), %rdi
callq 0x7e92
movl 0xc(%rsp), %ebx
leaq 0x8(%rsp), %rdi
callq 0x825e
jmp 0x669a
leaq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x8304
movl $0x1, %ebx
cmpb $0x0, 0x8(%rsp)
je 0x6690
leaq 0x8(%rsp), %rdi
callq 0x896a
movl 0xc(%rsp), %ebx
leaq 0x8(%rsp), %rdi
callq 0x8d38
leaq 0x40(%rsp), %rdi
callq 0xd444
movl %ebx, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7786
jmp 0x66e5
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8d38
jmp 0x66e5
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x825e
jmp 0x66e5
jmp 0x66e2
jmp 0x66e2
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xd444
movq %rbx, %rdi
callq 0x4970
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/caller.h
// Function: ococo::caller_t<unsigned short, 3, 4>::~caller_t()
caller_t<T, counter_size, refbase_size>::~caller_t() {
    hts_itr_destroy(iter);
    bam_destroy1(b);
    bam_hdr_destroy(header);

    if (stats != nullptr) {
        delete stats;
    }

    if (return_code == EXIT_SUCCESS && correctly_initialized == true) {
        ococo::info("Ococo successfully finished. Bye.\n");
        ococo::info("%.3f sec; CPU: %.3f sec\n", realtime() - t_real, cputime());
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x12cea
movq 0x10(%rbx), %rdi
callq 0x1477c
movq 0x18(%rbx), %rdi
callq 0x1407f
movq 0x20(%rbx), %r14
testq %r14, %r14
je 0x77c9
movq %r14, %rdi
callq 0x979a
movl $0x38, %esi
movq %r14, %rdi
callq 0x4540
cmpl $0x0, 0x4(%rbx)
jne 0x781b
cmpb $0x1, (%rbx)
jne 0x781b
leaq 0x4921c(%rip), %rdi     # 0x509f7
xorl %eax, %eax
callq 0x4cae
callq 0xc59c
movsd %xmm0, 0x10(%rsp)
movsd 0x30(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0xc5cb
movapd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
subsd 0x8(%rsp), %xmm0
leaq 0x49206(%rip), %rdi     # 0x50a1a
movb $0x2, %al
callq 0x4cae
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x966e
nop
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::check_allocation() const
bool stats_t<T, counter_size, refbase_size>::check_allocation() const {
    if (seq_active == nullptr || seq_len == nullptr || seq_stats == nullptr ||
        seq_name == nullptr || seq_comment == nullptr) {
        return false;
    }

    for (int i = 0; i < n_seqs; i++) {
        if (seq_stats[i] == nullptr) {
            return false;
        }
    }

    return true;
}

// Assembly:
xorl %eax, %eax
cmpq $0x0, 0x8(%rdi)
je 0x9082
cmpq $0x0, 0x10(%rdi)
je 0x9082
movq 0x28(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x9082
cmpq $0x0, 0x18(%rdi)
je 0x9082
cmpq $0x0, 0x20(%rdi)
je 0x9082
movslq (%rdi), %rdx
testq %rdx, %rdx
setle %al
jle 0x9082
cmpq $0x0, (%rcx)
je 0x9082
movl $0x1, %esi
movq %rsi, %rax
cmpq %rsi, %rdx
je 0x907c
leaq 0x1(%rax), %rsi
cmpq $0x0, (%rcx,%rax,8)
jne 0x9069
cmpq %rdx, %rax
setae %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::~stats_t()
stats_t<T, counter_size, refbase_size>::~stats_t() {
    if (seq_stats != nullptr) {
        for (int32_t seqid = 0; seqid < n_seqs; seqid++) {
            delete[] seq_stats[seqid];
        }
    }
    delete[] seq_active;
    delete[] seq_len;
    delete[] seq_name;
    delete[] seq_comment;
    delete[] seq_stats;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x28(%rdi)
je 0x97d2
cmpl $0x0, (%rbx)
jle 0x97d2
xorl %r14d, %r14d
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x97c7
callq 0x46c0
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x97b5
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x97e0
callq 0x46c0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x97ee
callq 0x46c0
movq 0x18(%rbx), %r12
testq %r12, %r12
je 0x9843
leaq -0x8(%r12), %r14
movq -0x8(%r12), %r15
testq %r15, %r15
je 0x9830
addq $-0x10, %r12
movq %r15, %r13
shlq $0x5, %r13
leaq (%r12,%r13), %rax
movq -0x10(%r12,%r13), %rdi
cmpq %rdi, %rax
je 0x982a
movq (%rax), %rsi
incq %rsi
callq 0x4540
addq $-0x20, %r13
jne 0x9811
shlq $0x5, %r15
orq $0x8, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4a40
movq 0x20(%rbx), %r12
testq %r12, %r12
je 0x9898
leaq -0x8(%r12), %r14
movq -0x8(%r12), %r15
testq %r15, %r15
je 0x9885
addq $-0x10, %r12
movq %r15, %r13
shlq $0x5, %r13
leaq (%r12,%r13), %rax
movq -0x10(%r12,%r13), %rdi
cmpq %rdi, %rax
je 0x987f
movq (%rax), %rsi
incq %rsi
callq 0x4540
addq $-0x20, %r13
jne 0x9866
shlq $0x5, %r15
orq $0x8, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4a40
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x98af
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x46c0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::increment(unsigned short, unsigned char)
T stats_t<T, counter_size, refbase_size>::increment(T psc, nt4_t nt4) {
    assert(0 <= nt4 && nt4 < 4);

    pos_stats_uncompr_t psu;
    decompress_position_stats(psc, psu);

    if (psu.counters[nt4] == right_full_mask<uint16_t, counter_size>()) {
        psu.counters[0] >>= 1;
        psu.counters[1] >>= 1;
        psu.counters[2] >>= 1;
        psu.counters[3] >>= 1;
    }

    psu.counters[nt4]++;

    return compress_position_stats(psu);
}

// Assembly:
subq $0x18, %rsp
cmpb $0x4, %sil
jae 0x993f
movzwl %di, %eax
movl %eax, %ecx
andb $0xf, %cl
movb %cl, (%rsp)
shrl $0x4, %eax
movl $0x0, 0x14(%rsp)
movl $0x10, %ecx
movl %eax, %edx
andl $0x7, %edx
movl %edx, (%rsp,%rcx)
addl %edx, 0x14(%rsp)
movzwl %ax, %eax
shrl $0x3, %eax
addq $-0x4, %rcx
jne 0x98df
movzbl %sil, %eax
cmpl $0x7, 0x4(%rsp,%rax,4)
jne 0x9912
sarl 0x4(%rsp)
sarl 0x8(%rsp)
sarl 0xc(%rsp)
sarl 0x10(%rsp)
incl 0x4(%rsp,%rax,4)
movl $0x1, %ecx
xorl %eax, %eax
movzwl (%rsp,%rcx,4), %edx
andl $0x7, %edx
leal (%rdx,%rax,8), %eax
incq %rcx
cmpq $0x5, %rcx
jne 0x991d
shll $0x4, %eax
andl $0xf, %edi
orl %eax, %edi
movl %edi, %eax
addq $0x18, %rsp
retq
leaq 0x47174(%rip), %rdi     # 0x50aba
leaq 0x46a3d(%rip), %rsi     # 0x5038a
leaq 0x4717a(%rip), %rcx     # 0x50ace
movl $0x273, %edx            # imm = 0x273
callq 0x4350
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::call_consensus_position(_IO_FILE*, _IO_FILE*, int, long)
int stats_t<T, counter_size, refbase_size>::call_consensus_position(
    FILE *vcf_file, FILE *pileup_file, int32_t seqid, int64_t pos) {
    pos_stats_uncompr_t psu;
    decompress_position_stats(seq_stats[seqid][pos], psu);

    char old_base_nt256;
    get_nucl_nt256(seqid, pos, old_base_nt256);
    // const char new_base_nt256=cons_call_maj(psu);
    const char new_base_nt256 =
        (params->cons_alg[params->strategy])(psu, *params);

    if (old_base_nt256 != new_base_nt256) {
        if (vcf_file != nullptr) {
            print_vcf_substitution(vcf_file, seqid, pos, old_base_nt256,
                                   new_base_nt256, psu);
        }
        params->n_upd += 1;

        set_nucl_nt256(seqid, pos, new_base_nt256);
    }

    if (params->verbose) {
        if (old_base_nt256 == new_base_nt256) {
            if (vcf_file != nullptr) {
                print_vcf_substitution(vcf_file, seqid, pos, old_base_nt256,
                                       new_base_nt256, psu);
            }
        }
    }

    if (pileup_file != nullptr) {
        print_pileup_line(pileup_file, seqid, pos, psu);
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movq %rdx, 0x30(%rsp)
movq %rsi, %r12
movq %rdi, %r15
movq 0x28(%rdi), %rax
movl %ecx, 0x14(%rsp)
movslq %ecx, %r14
movq (%rax,%r14,8), %rax
movzwl (%rax,%r8,2), %eax
movl %eax, %ecx
andb $0xf, %cl
movb %cl, 0x18(%rsp)
movl %eax, %ecx
shrl $0x4, %ecx
movl $0x0, 0x2c(%rsp)
movl $0x10, %edx
movl %ecx, %esi
andl $0x7, %esi
movl %esi, 0x18(%rsp,%rdx)
addl %esi, 0x2c(%rsp)
movzwl %cx, %ecx
shrl $0x3, %ecx
addq $-0x4, %rdx
jne 0x99a9
andl $0xf, %eax
leaq 0x481a4(%rip), %rcx     # 0x51b70
movzbl (%rax,%rcx), %eax
movl $0x4e, %ebp
cmovnel %eax, %ebp
movq 0x30(%r15), %rsi
movl 0x1ac(%rsi), %eax
leaq 0x18(%rsp), %rdi
callq *0x210(%rsi,%rax,8)
movl %eax, %r13d
cmpb %al, %bpl
je 0x9a50
testq %r12, %r12
je 0x9a1e
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
movsbl %bpl, %r8d
movsbl %r13b, %r9d
movq %r15, %rdi
movq %r12, %rsi
movl 0x14(%rsp), %edx
movq %rbx, %rcx
callq 0x9e3a
movq 0x30(%r15), %rax
incq 0x208(%rax)
movsbq %r13b, %rax
leaq 0x47f1c(%rip), %rcx     # 0x51950
movzbl (%rax,%rcx), %eax
movq 0x28(%r15), %rcx
movq (%rcx,%r14,8), %rcx
movzwl (%rcx,%rbx,2), %edx
andl $-0x10, %edx
andl $0xf, %eax
orl %edx, %eax
movw %ax, (%rcx,%rbx,2)
cmpb %r13b, %bpl
jne 0x9a8a
testq %r12, %r12
je 0x9a8a
movq 0x30(%r15), %rax
cmpb $0x0, 0xd8(%rax)
je 0x9a8a
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
movsbl %bpl, %r8d
movsbl %r13b, %r9d
movq %r15, %rdi
movq %r12, %rsi
movl 0x14(%rsp), %edx
movq %rbx, %rcx
callq 0x9e3a
movq 0x30(%rsp), %rsi
testq %rsi, %rsi
je 0x9aa8
leaq 0x18(%rsp), %r8
movq %r15, %rdi
movl 0x14(%rsp), %edx
movq %rbx, %rcx
callq 0x9f6c
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::call_consensus(_IO_FILE*, _IO_FILE*)
int stats_t<T, counter_size, refbase_size>::call_consensus(FILE *vcf_file,
                                                           FILE *pileup_file) {
    assert(check_allocation());

    for (int32_t seqid = 0; seqid < n_seqs; seqid++) {
        for (int64_t pos = 0; pos < seq_len[seqid]; pos++) {
            call_consensus_position(vcf_file, pileup_file, seqid, pos);
        }
    }

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x902a
testb %al, %al
je 0x9b24
cmpl $0x0, (%r15)
jle 0x9b18
xorl %r12d, %r12d
movq 0x10(%r15), %rax
cmpq $0x0, (%rax,%r12,8)
jle 0x9b0d
xorl %r13d, %r13d
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
movq %r13, %r8
callq 0x995e
incq %r13
movq 0x10(%r15), %rax
cmpq (%rax,%r12,8), %r13
jl 0x9aec
incq %r12
movslq (%r15), %rax
cmpq %rax, %r12
jl 0x9ade
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x4684c(%rip), %rdi     # 0x50377
leaq 0x46858(%rip), %rsi     # 0x5038a
leaq 0x47202(%rip), %rcx     # 0x50d3b
movl $0x17d, %edx            # imm = 0x17D
callq 0x4350
nop
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::save_fasta(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
int stats_t<T, counter_size, refbase_size>::save_fasta(
    const std::string &fasta_fn) const {
    assert(check_allocation());

    FILE *fasta_file = nullptr;
    fasta_file       = fopen(fasta_fn.c_str(), "w+");

    char fasta_buffer[fasta_line_l];
    for (int s = 0; s < n_seqs; s++) {
        // printf("%s\n",seq_name[s]);
        if (!seq_comment[s].empty()) {
            fprintf(fasta_file, ">%s %s\n", seq_name[s].c_str(),
                    seq_comment[s].c_str());
        } else {
            fprintf(fasta_file, ">%s\n", seq_name[s].c_str());
        }

        for (int64_t i = 0, j = 0; i < seq_len[s]; i++, j++) {
            get_nucl_nt256(s, i, fasta_buffer[j]);

            if (j == fasta_line_l - 1 || i == seq_len[s] - 1) {
                fwrite(fasta_buffer, 1, j + 1, fasta_file);
                fwrite("\n", 1, 1, fasta_file);
                j = -1;
            }
        }
    }

    fclose(fasta_file);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x902a
testb %al, %al
je 0x9c7a
movq (%r14), %rdi
leaq 0x46708(%rip), %rsi     # 0x50277
callq 0x4600
movq %rax, %r14
cmpl $0x0, (%rbx)
jle 0x9c61
leaq 0x47fe9(%rip), %rbp     # 0x51b70
movl $0x4e, %r15d
xorl %r13d, %r13d
movq 0x20(%rbx), %rcx
movq %r13, %rax
shlq $0x5, %rax
cmpq $0x0, 0x8(%rcx,%rax)
je 0x9bc4
addq %rax, %rcx
movq 0x18(%rbx), %rdx
movq (%rdx,%rax), %rdx
movq (%rcx), %rcx
movq %r14, %rdi
leaq 0x4728b(%rip), %rsi     # 0x50e46
xorl %eax, %eax
callq 0x4770
jmp 0x9bdd
movq 0x18(%rbx), %rcx
movq (%rcx,%rax), %rdx
movq %r14, %rdi
leaq 0x47278(%rip), %rsi     # 0x50e4e
xorl %eax, %eax
callq 0x4770
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %rax
testq %rax, %rax
jle 0x9c52
xorl %edx, %edx
xorl %r12d, %r12d
movq 0x28(%rbx), %rcx
movq (%rcx,%r13,8), %rcx
movzwl (%rcx,%r12,2), %ecx
andl $0xf, %ecx
movzbl (%rcx,%rbp), %ecx
cmovel %r15d, %ecx
movb %cl, (%rsp,%rdx)
cmpq $0x31, %rdx
je 0x9c18
decq %rax
cmpq %rax, %r12
jne 0x9c3f
incq %rdx
movl $0x1, %esi
movq %rsp, %rdi
movq %r14, %rcx
callq 0x4a30
movl $0xa, %edi
movq %r14, %rsi
callq 0x4690
movq $-0x1, %rdx
incq %r12
incq %rdx
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %rax
cmpq %rax, %r12
jl 0x9bef
incq %r13
movslq (%rbx), %rax
cmpq %rax, %r13
jl 0x9b90
movq %r14, %rdi
callq 0x4530
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x466f6(%rip), %rdi     # 0x50377
leaq 0x46702(%rip), %rsi     # 0x5038a
leaq 0x4712e(%rip), %rcx     # 0x50dbd
movl $0xc7, %edx
callq 0x4350
nop
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::print_vcf_substitution(_IO_FILE*, int, long, char, char, ococo::pos_stats_uncompr_t const&) const
int stats_t<T, counter_size, refbase_size>::print_vcf_substitution(
    FILE *vcf_file, int32_t seqid, int64_t pos, char old_base, char new_base,
    const pos_stats_uncompr_t &psu) const {
    assert(check_allocation());
    assert(vcf_file != nullptr);

    float alt_freq =
        1.0 * psu.counters[nt256_nt4[static_cast<int16_t>(new_base)]] / psu.sum;

    fprintf(vcf_file,
            "%s\t%" PRId64 "\t.\t%c\t%c\t100\tPASS\tAF=%.2f;CS=%" PRId32
            ",%" PRId32 ",%" PRId32 ",%" PRId32 ";COV=%" PRId32 "\n",
            seq_name[seqid].c_str(), pos + 1, old_base, new_base,
            round(alt_freq * 100.0) / 100, psu.counters[0], psu.counters[1],
            psu.counters[2], psu.counters[3], psu.sum);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r13d
movl %r8d, %ebp
movq %rcx, %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %r12
callq 0x902a
testb %al, %al
je 0x9f2e
movq %r14, 0x10(%rsp)
testq %r14, %r14
je 0x9f4d
movq 0x50(%rsp), %r14
movsbq %r13b, %rax
leaq 0x47bcb(%rip), %rcx     # 0x51a50
movzbl (%rax,%rcx), %ecx
cvtsi2sdl 0x4(%r14,%rcx,4), %xmm0
movl 0x14(%r14), %r13d
cvtsi2sd %r13d, %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x18(%r12), %rcx
movslq %r15d, %rdx
shlq $0x5, %rdx
movq (%rcx,%rdx), %r15
incq %rbx
movsbl %bpl, %ebp
movsbl %al, %r12d
cvtss2sd %xmm0, %xmm0
mulsd 0x461b8(%rip), %xmm0    # 0x50080
callq 0x4220
divsd 0x461ab(%rip), %xmm0    # 0x50080
movl 0x4(%r14), %eax
movq %rax, 0x8(%rsp)
movl 0x8(%r14), %r11d
movl 0xc(%r14), %r10d
movl 0x10(%r14), %r14d
subq $0x8, %rsp
leaq 0x46d18(%rip), %rsi     # 0x50c0d
movq 0x18(%rsp), %rdi
movq %r15, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
movl %r12d, %r9d
movb $0x1, %al
pushq %r13
pushq %r14
pushq %r10
pushq %r11
pushq 0x30(%rsp)
callq 0x4770
addq $0x30, %rsp
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x46442(%rip), %rdi     # 0x50377
leaq 0x4644e(%rip), %rsi     # 0x5038a
leaq 0x46c07(%rip), %rcx     # 0x50b4a
movl $0x1fd, %edx            # imm = 0x1FD
callq 0x4350
leaq 0x46868(%rip), %rdi     # 0x507bc
leaq 0x4642f(%rip), %rsi     # 0x5038a
leaq 0x46be8(%rip), %rcx     # 0x50b4a
movl $0x1fe, %edx            # imm = 0x1FE
callq 0x4350
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/params.cpp
// Function: ococo::params_t::init_default_values()
void ococo::params_t::init_default_values() {
    verbose               = false;
    counters_str          = "ococo32";
    counter_configuration = OCOCO32;
    mode                  = BATCH;
    mode_str              = "batch";
    strategy              = MAJORITY;
    strategy_str          = "majority";
    min_mapq              = default_q;
    min_baseq             = default_Q;
    init_ref_weight       = default_w;
    min_coverage          = default_c;
    majority_threshold    = default_M;

    cons_alg[strategy_t::NO_UPDATES]     = &cons_call_no_updates;
    cons_alg[strategy_t::STOCHASTIC]     = &cons_call_stoch;
    cons_alg[strategy_t::STOCHASTIC_AMB] = &cons_call_stoch_amb;
    cons_alg[strategy_t::MAJORITY]       = &cons_call_maj;
    cons_alg[strategy_t::MAJORITY_AMB]   = &cons_call_maj_amb;

    vcf_file       = nullptr;
    pileup_file    = nullptr;
    fasta_out_file = nullptr;
    sam_file       = nullptr;
    log_file       = nullptr;

    n_upd = 0;

    correctly_initialized = true;
    return_code           = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x0, 0xd8(%rdi)
addq $0x30, %rdi
movq 0x38(%rbx), %rdx
leaq 0x4571b(%rip), %rcx     # 0x51d48
xorl %r14d, %r14d
movl $0x7, %r8d
xorl %esi, %esi
callq 0x4820
movl $0x1, 0x28(%rbx)
movl %r14d, 0x1a8(%rbx)
leaq 0x1e8(%rbx), %rdi
movq 0x1f0(%rbx), %rdx
leaq 0x456f0(%rip), %rcx     # 0x51d50
movl $0x5, %r8d
xorl %esi, %esi
callq 0x4820
movl $0x3, 0x1ac(%rbx)
leaq 0x1c8(%rbx), %rdi
movq 0x1d0(%rbx), %rdx
leaq 0x456ca(%rip), %rcx     # 0x51d56
movl $0x8, %r8d
xorl %esi, %esi
callq 0x4820
movaps 0x455d0(%rip), %xmm0    # 0x51c70
movups %xmm0, 0x1b0(%rbx)
movabsq $0x3fe051eb80000000, %rax # imm = 0x3FE051EB80000000
movq %rax, 0x1c0(%rbx)
leaq 0x10be(%rip), %rax      # 0xd77d
movq %rax, 0x210(%rbx)
leaq 0x10be(%rip), %rax      # 0xd78b
movq %rax, 0x218(%rbx)
leaq 0x114e(%rip), %rax      # 0xd829
movq %rax, 0x220(%rbx)
leaq 0x11c0(%rip), %rax      # 0xd8a9
movq %rax, 0x228(%rbx)
leaq 0x1240(%rip), %rax      # 0xd937
movq %rax, 0x230(%rbx)
movq %r14, 0x208(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x180(%rbx)
movups %xmm0, 0x190(%rbx)
movq %r14, 0x1a0(%rbx)
movb $0x1, (%rbx)
movl %r14d, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/consensus.h
// Function: ococo::cons_call_stoch(ococo::pos_stats_uncompr_t const&, ococo::params_t const&)
inline char cons_call_stoch(const pos_stats_uncompr_t &psu,
                            const params_t &params) {
    if (psu.sum == 0) {
        return nt16_nt256[psu.nt16];
    }

    if (psu.nt16 != nt256_nt16[static_cast<uint32_t>('N')]) {
        if (psu.sum < params.min_coverage + params.init_ref_weight) {
            return nt16_nt256[psu.nt16];
        }
    }

    const int32_t prefsum[] = {
        psu.counters[0], psu.counters[0] + psu.counters[1],
        psu.counters[0] + psu.counters[1] + psu.counters[2],
        psu.counters[0] + psu.counters[1] + psu.counters[2] + psu.counters[3]};

    assert(prefsum[3] == psu.sum);

    const int32_t rn = rand() % psu.sum;
    for (int32_t i = 0; i < 4; i++) {
        if (rn < prefsum[i]) {
            return nt4_nt256[i];
        }
    }

    return 'n';
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl 0x14(%rdi), %eax
movzbl (%rdi), %ecx
testl %eax, %eax
je 0xd7b2
movq %rdi, %rbx
cmpl $0xf, %ecx
je 0xd7be
movl 0x1b8(%rsi), %edx
addl 0x1bc(%rsi), %edx
cmpl %edx, %eax
jge 0xd7be
leaq 0x443b7(%rip), %rax     # 0x51b70
movb (%rcx,%rax), %al
jmp 0xd804
movl 0x4(%rbx), %ecx
movl %ecx, (%rsp)
addl 0x8(%rbx), %ecx
movl %ecx, 0x4(%rsp)
addl 0xc(%rbx), %ecx
movl %ecx, 0x8(%rsp)
addl 0x10(%rbx), %ecx
movl %ecx, 0xc(%rsp)
cmpl %eax, %ecx
jne 0xd80a
callq 0x4140
cltd
idivl 0x14(%rbx)
xorl %eax, %eax
cmpl (%rsp,%rax,4), %edx
jl 0xd7fa
incq %rax
cmpq $0x4, %rax
jne 0xd7e8
movb $0x6e, %al
jmp 0xd804
leaq 0x43520(%rip), %rcx     # 0x50d21
movb (%rax,%rcx), %al
addq $0x10, %rsp
popq %rbx
retq
leaq 0x4506e(%rip), %rdi     # 0x5287f
leaq 0x4507d(%rip), %rsi     # 0x52895
leaq 0x45086(%rip), %rcx     # 0x528a5
movl $0x21, %edx
callq 0x4350
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/consensus.h
// Function: ococo::cons_call_stoch_amb(ococo::pos_stats_uncompr_t const&, ococo::params_t const&)
inline char cons_call_stoch_amb(const pos_stats_uncompr_t &psu,
                                const params_t &params) {
    if (psu.sum == 0) {
        return nt16_nt256[psu.nt16];
    }

    if (psu.nt16 != nt256_nt16[static_cast<uint32_t>('N')]) {
        if (psu.sum < params.min_coverage + params.init_ref_weight) {
            return nt16_nt256[psu.nt16];
        }
    }

    nt16_t nucl_nt16 = nt256_nt16[static_cast<uint32_t>('N')];

    while (nucl_nt16 == nt256_nt16[static_cast<uint32_t>('N')]) {
        nucl_nt16 = 0;
        for (int32_t i = 0; i < 4; i++) {
            const int32_t rn = rand() % psu.sum;

            if (rn < psu.counters[i]) {
                nucl_nt16 |= nt4_nt16[i];
            }
        }
    }

    return nt16_nt256[nucl_nt16];
}

// Assembly:
movl 0x14(%rdi), %ecx
movb (%rdi), %al
testl %ecx, %ecx
je 0xd89b
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0xf, %al
je 0xd851
movl 0x1b8(%rsi), %edx
addl 0x1bc(%rsi), %edx
cmpl %edx, %ecx
jl 0xd890
xorl %r14d, %r14d
leaq 0x444d9(%rip), %r15     # 0x51d34
xorl %r12d, %r12d
callq 0x4140
cltd
idivl 0x14(%rbx)
cmpl 0x4(%rbx,%r14,4), %edx
jge 0xd877
orb (%r14,%r15), %r12b
movl %r12d, %eax
jmp 0xd87a
movl %r12d, %eax
incq %r14
cmpq $0x4, %r14
jne 0xd85e
xorl %r14d, %r14d
movl $0x0, %r12d
cmpb $0xf, %al
je 0xd85e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
movzbl %al, %eax
leaq 0x442cb(%rip), %rcx     # 0x51b70
movb (%rax,%rcx), %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/consensus.h
// Function: ococo::cons_call_maj(ococo::pos_stats_uncompr_t const&, ococo::params_t const&)
inline char cons_call_maj(const pos_stats_uncompr_t &psu,
                          const params_t &params) {
    if (psu.sum == 0) {
        return nt16_nt256[psu.nt16];
    }

    if (psu.nt16 != nt256_nt16[static_cast<uint32_t>('N')]) {
        if (psu.sum < params.min_coverage + params.init_ref_weight) {
            return nt16_nt256[psu.nt16];
        }
    }

    char nucl_nt256 = nt16_nt256[psu.nt16];

    int32_t required_min =
        static_cast<int32_t>(ceil(params.majority_threshold * psu.sum));
    int32_t max = 0;
    for (int32_t i = 0; i < 4; i++) {
        if (psu.counters[i] >= required_min) {
            if (psu.counters[i] > max) {
                max        = psu.counters[i];
                nucl_nt256 = nt4_nt256[i];
            }
        }
    }

    return nucl_nt256;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl 0x14(%rdi), %eax
movzbl (%rdi), %ecx
testl %eax, %eax
je 0xd8ce
movq %rdi, %rbx
cmpl $0xf, %ecx
je 0xd8db
movl 0x1b8(%rsi), %edx
addl 0x1bc(%rsi), %edx
cmpl %edx, %eax
jge 0xd8db
leaq 0x4429b(%rip), %rax     # 0x51b70
movb (%rcx,%rax), %bpl
jmp 0xd92e
leaq 0x4428e(%rip), %rdx     # 0x51b70
movb (%rcx,%rdx), %bpl
cvtsi2sd %eax, %xmm0
mulsd 0x1c0(%rsi), %xmm0
callq 0x40f0
cvttsd2si %xmm0, %eax
xorl %ecx, %ecx
leaq 0x4341d(%rip), %rdx     # 0x50d21
xorl %esi, %esi
movl 0x4(%rbx,%rcx,4), %edi
cmpl %eax, %edi
setge %r8b
cmpl %esi, %edi
setg %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0xd925
movb (%rcx,%rdx), %bpl
movl %edi, %esi
incq %rcx
cmpq $0x4, %rcx
jne 0xd906
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/src/consensus.h
// Function: ococo::cons_call_maj_amb(ococo::pos_stats_uncompr_t const&, ococo::params_t const&)
inline char cons_call_maj_amb(const pos_stats_uncompr_t &psu,
                              const params_t &params) {
    if (psu.sum == 0) {
        return nt16_nt256[psu.nt16];
    }

    if (psu.nt16 != nt256_nt16[static_cast<uint32_t>('N')]) {
        if (psu.sum < params.min_coverage + params.init_ref_weight) {
            return nt16_nt256[psu.nt16];
        }
    }

    char nucl_nt16 = psu.nt16;

    int32_t required_min =
        static_cast<int32_t>(round(params.majority_threshold * psu.sum));
    int32_t max = 0;
    for (int32_t i = 0; i < 4; i++) {
        if (psu.counters[i] >= required_min) {
            if (psu.counters[i] > max) {
                max       = psu.counters[i];
                nucl_nt16 = nt4_nt16[i];
            } else if (psu.counters[i] >= max) {
                nucl_nt16 |= nt4_nt16[i];
            }
        }
    }

    return nt16_nt256[static_cast<int32_t>(nucl_nt16)];
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl 0x14(%rdi), %ecx
movb (%rdi), %bpl
movzbl %bpl, %eax
testl %ecx, %ecx
je 0xd9ae
movq %rdi, %rbx
cmpb $0xf, %bpl
je 0xd961
movl 0x1b8(%rsi), %edx
addl 0x1bc(%rsi), %edx
cmpl %edx, %ecx
jl 0xd9ae
cvtsi2sd %ecx, %xmm0
mulsd 0x1c0(%rsi), %xmm0
callq 0x4220
cvttsd2si %xmm0, %eax
xorl %ecx, %ecx
leaq 0x443b5(%rip), %rdx     # 0x51d34
xorl %esi, %esi
movl 0x4(%rbx,%rcx,4), %edi
cmpl %eax, %edi
jge 0xd98d
movl %esi, %edi
jmp 0xd995
cmpl %esi, %edi
jle 0xd9a2
movb (%rcx,%rdx), %bpl
incq %rcx
movl %edi, %esi
cmpq $0x4, %rcx
jne 0xd981
jmp 0xd9aa
jl 0xd989
orb (%rcx,%rdx), %bpl
jmp 0xd989
movsbq %bpl, %rax
leaq 0x441bb(%rip), %rcx     # 0x51b70
movb (%rax,%rcx), %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: parse_version
static void
parse_version(htsFormat *fmt, const unsigned char *u, const unsigned char *ulim)
{
    const char *s    = (const char *) u;
    const char *slim = (const char *) ulim;
    short v;

    fmt->version.major = fmt->version.minor = -1;

    for (v = 0; s < slim && isdigit_c(*s); s++)
        v = 10 * v + *s - '0';

    if (s < slim) {
        fmt->version.major = v;
        if (*s == '.') {
            s++;
            for (v = 0; s < slim && isdigit_c(*s); s++)
                v = 10 * v + *s - '0';
            if (s < slim)
                fmt->version.minor = v;
        }
        else
            fmt->version.minor = 0;
    }
}

// Assembly:
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
cmpq %rdx, %rsi
jae 0xe765
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x4580
movq (%rax), %rax
xorl %ecx, %ecx
movzbl (%r15), %edx
testb $0x8, 0x1(%rax,%rdx,2)
je 0xe721
movsbl %dl, %edx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
movswl %dx, %edx
addl %edx, %ecx
addl $-0x30, %ecx
incq %r15
cmpq %r14, %r15
jne 0xe6fc
jmp 0xe760
movw %cx, 0x8(%rbx)
cmpb $0x2e, (%r15)
jne 0xe75a
incq %r15
cmpq %r14, %r15
jae 0xe760
xorl %ecx, %ecx
movzbl (%r15), %edx
testb $0x8, 0x1(%rax,%rdx,2)
je 0xe75c
movsbl %dl, %edx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
movswl %dx, %edx
addl %edx, %ecx
addl $-0x30, %ecx
incq %r15
cmpq %r14, %r15
jb 0xe735
jmp 0xe760
xorl %ecx, %ecx
movw %cx, 0xa(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_open_format
htsFile *hts_open_format(const char *fn, const char *mode, const htsFormat *fmt)
{
    char smode[102], *cp, *cp2, *mode_c;
    htsFile *fp = NULL;
    hFILE *hfile;
    char fmt_code = '\0';

    strncpy(smode, mode, 100);
    smode[100]=0;
    if ((cp = strchr(smode, ',')))
        *cp = '\0';

    // Migrate format code (b or c) to the end of the smode buffer.
    for (cp2 = cp = smode; *cp; cp++) {
        if (*cp == 'b')
            fmt_code = 'b';
        else if (*cp == 'c')
            fmt_code = 'c';
        else
            *cp2++ = *cp;
    }
    mode_c = cp2;
    *cp2++ = fmt_code;
    *cp2++ = 0;
    *cp2++ = 0;

    // Set or reset the format code if opts->format is used
    if (fmt && fmt->format != unknown_format)
        *mode_c = "\0g\0\0b\0c\0\0b\0g\0\0"[fmt->format];

    hfile = hopen(fn, smode);
    if (hfile == NULL) goto error;

    fp = hts_hopen(hfile, fn, smode);
    if (fp == NULL) goto error;

    if (fmt && fmt->specific)
        if (hts_opt_apply(fp, fmt->specific) != 0)
            goto error;

    return fp;

error:
    if (hts_verbose >= 2)
        fprintf(stderr, "[E::%s] fail to open file '%s'\n", __func__, fn);

    if (hfile)
        hclose_abruptly(hfile);

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsp, %r15
movl $0x64, %edx
movq %r15, %rdi
callq 0x42b0
movb $0x0, 0x64(%r15)
movq %r15, %rdi
movl $0x2c, %esi
callq 0x4200
testq %rax, %rax
je 0xf1b7
movb $0x0, (%rax)
xorl %ecx, %ecx
movq %r15, %rax
movb (%r15), %dl
movzbl %dl, %esi
leal -0x62(%rsi), %edi
cmpl $0x2, %edi
jae 0xf1ce
movl %edx, %ecx
jmp 0xf1d7
testl %esi, %esi
je 0xf1dc
movb %dl, (%rax)
incq %rax
incq %r15
jmp 0xf1bc
movb %cl, (%rax)
movw $0x0, 0x1(%rax)
testq %r14, %r14
je 0xf1fe
movl 0x4(%r14), %ecx
testq %rcx, %rcx
je 0xf1fe
leaq 0x43907(%rip), %rdx     # 0x52b00
movb (%rcx,%rdx), %cl
movb %cl, (%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4883b
movq %rax, %r15
testq %rax, %rax
je 0xf258
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xf2a4
testq %rax, %rax
je 0xf258
movq %rax, %r12
testq %r14, %r14
je 0xf271
movq 0x18(%r14), %r14
testq %r14, %r14
je 0xf271
movl 0x8(%r14), %esi
movq 0x10(%r14), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0xfaf8
testl %eax, %eax
jne 0xf258
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0xf235
testl %eax, %eax
je 0xf271
cmpl $0x2, 0x552f1(%rip)     # 0x64550
jge 0xf280
testq %r15, %r15
je 0xf26e
movq %r15, %rdi
callq 0x4850c
xorl %r12d, %r12d
movq %r12, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x54d41(%rip), %rax     # 0x63fc8
movq (%rax), %rdi
leaq 0x439a9(%rip), %rsi     # 0x52c3a
leaq 0x439c2(%rip), %rdx     # 0x52c5a
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4770
jmp 0xf261
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_set_opt
int hts_set_opt(htsFile *fp, enum hts_fmt_option opt, ...) {
    int r;
    va_list args;

    if (opt == HTS_OPT_NTHREADS) {
        va_start(args, opt);
        int nthreads = va_arg(args, int);
        va_end(args);
        return hts_set_threads(fp, nthreads);
    }

    if (fp->format.format != cram)
        return 0;

    va_start(args, opt);
    r = cram_set_voption(fp->fp.cram, opt, args);
    va_end(args);

    return r;
}

// Assembly:
subq $0xd8, %rsp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xfb4e
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpl $0x65, %esi
jne 0xfb95
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
movl $0x10, %ecx
cmpq $0x28, %rcx
ja 0xfbcd
movl $0x10, %eax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0xfbdb
xorl %eax, %eax
cmpl $0x6, 0x44(%rdi)
jne 0xfbe2
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq 0x38(%rdi), %rdi
callq 0x395f1
jmp 0xfbe2
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl (%rax), %esi
callq 0xfec5
addq $0xd8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_opt_free
void hts_opt_free(hts_opt *opts) {
    hts_opt *last = NULL;
    while (opts) {
        opts = (last=opts)->next;
        free(last->arg);
        free(last);
    }
}

// Assembly:
testq %rdi, %rdi
je 0xfc19
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rbx), %rdi
movq 0x18(%rbx), %r14
callq 0x4610
movq %rbx, %rdi
callq 0x4610
movq %r14, %rbx
testq %r14, %r14
jne 0xfbf6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_parse_opt_list
int hts_parse_opt_list(htsFormat *fmt, const char *str) {
    while (str && *str) {
        const char *str_start;
        int len;
        char arg[8001];

        while (*str && *str == ',')
            str++;

        for (str_start = str; *str && *str != ','; str++);
        len = str - str_start;

        // Produce a nul terminated copy of the option
        strncpy(arg, str_start, len < 8000 ? len : 8000);
        arg[len < 8000 ? len : 8000] = '\0';

        if (hts_opt_add((hts_opt **)&fmt->specific, arg) != 0)
            return -1;

        if (*str)
            str++;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1f50, %rsp           # imm = 0x1F50
movq %rsi, %r15
movq %rdi, %rbx
addq $0x18, %rbx
movl $0x1f40, %ebp           # imm = 0x1F40
movq %rsp, %r14
xorl %eax, %eax
testq %r15, %r15
je 0xfca9
cmpb $0x0, (%r15)
je 0xfca9
decq %r15
movq %r15, %rsi
cmpb $0x2c, 0x1(%rsi)
leaq 0x1(%rsi), %rsi
je 0xfc4e
xorl %eax, %eax
movq %rsi, %r15
movzbl (%r15), %ecx
testl %ecx, %ecx
je 0xfc71
cmpl $0x2c, %ecx
je 0xfc71
incq %r15
incl %eax
jmp 0xfc5d
cmpl %ebp, %eax
cmovgel %ebp, %eax
movslq %eax, %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x42b0
movb $0x0, (%rsp,%r12)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf681
testl %eax, %eax
jne 0xfca0
cmpb $0x1, (%r15)
sbbq $-0x1, %r15
testl %eax, %eax
je 0xfc3b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x1f50, %rsp           # imm = 0x1F50
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_parse_format
int hts_parse_format(htsFormat *format, const char *str) {
    char fmt[8];
    const char *cp = scan_keyword(str, ',', fmt, sizeof fmt);

    format->version.minor = 0; // unknown
    format->version.major = 0; // unknown

    if (strcmp(fmt, "sam") == 0) {
        format->category          = sequence_data;
        format->format            = sam;
        format->compression       = no_compression;;
        format->compression_level = 0;
    } else if (strcmp(fmt, "bam") == 0) {
        format->category          = sequence_data;
        format->format            = bam;
        format->compression       = bgzf;
        format->compression_level = -1;
    } else if (strcmp(fmt, "cram") == 0) {
        format->category          = sequence_data;
        format->format            = cram;
        format->compression       = custom;
        format->compression_level = -1;
    } else if (strcmp(fmt, "vcf") == 0) {
        format->category          = variant_data;
        format->format            = vcf;
        format->compression       = no_compression;;
        format->compression_level = 0;
    } else if (strcmp(fmt, "bcf") == 0) {
        format->category          = variant_data;
        format->format            = bcf;
        format->compression       = bgzf;
        format->compression_level = -1;
    } else {
        return -1;
    }

    return hts_parse_opt_list(format, cp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movzbl (%rbx), %r12d
testl %r12d, %r12d
je 0xfcf7
cmpl $0x2c, %r12d
je 0xfcf7
cmpq $0x6, %r15
ja 0xfcf2
callq 0x4100
movq (%rax), %rax
movb (%rax,%r12,4), %al
movb %al, (%rsp,%r15)
incq %r15
incq %rbx
jmp 0xfcca
movb $0x0, (%rsp,%r15)
cmpq $0x1, %r12
sbbq $-0x1, %rbx
movl $0x0, 0x8(%r14)
movl $0x1, %eax
cmpl $0x6d6173, (%rsp)       # imm = 0x6D6173
je 0xfd5b
movw $0xffff, %cx            # imm = 0xFFFF
cmpl $0x6d6162, (%rsp)       # imm = 0x6D6162
je 0xfd66
movl $0x6d617263, %edx       # imm = 0x6D617263
xorl (%rsp), %edx
movzbl 0x4(%rsp), %esi
orl %edx, %esi
je 0xfd72
cmpl $0x666376, (%rsp)       # imm = 0x666376
je 0xfd7e
cmpl $0x666362, (%rsp)       # imm = 0x666362
je 0xfd8c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %edx, %edx
movl $0x3, %esi
xorl %ecx, %ecx
jmp 0xfd9b
movl $0x2, %edx
movl $0x4, %esi
jmp 0xfd9b
movl $0x3, %edx
movl $0x6, %esi
jmp 0xfd9b
xorl %edx, %edx
movl $0x8, %esi
movl $0x2, %eax
jmp 0xfd62
movl $0x9, %esi
movl $0x2, %eax
movl $0x2, %edx
movl %eax, (%r14)
movl %esi, 0x4(%r14)
movl %edx, 0xc(%r14)
movw %cx, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xfc1a
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_close
int hts_close(htsFile *fp)
{
    int ret, save;

    switch (fp->format.format) {
    case binary_format:
    case bam:
    case bcf:
        ret = bgzf_close(fp->fp.bgzf);
        break;

    case cram:
        if (!fp->is_write) {
            switch (cram_eof(fp->fp.cram)) {
            case 2:
                fprintf(stderr, "[W::%s] EOF marker is absent. The input is probably truncated.\n", __func__);
                break;
            case 0:  /* not at EOF, but may not have wanted all seqs */
            default: /* case 1, expected EOF */
                break;
            }
        }
        ret = cram_close(fp->fp.cram);
        break;

    case text_format:
    case sam:
    case vcf:
        if (!fp->is_write) {
        #if KS_BGZF
            BGZF *gzfp = ((kstream_t*)fp->fp.voidp)->f;
            ret = bgzf_close(gzfp);
        #else
            gzFile gzfp = ((kstream_t*)fp->fp.voidp)->f;
            ret = gzclose(gzfp);
        #endif
            ks_destroy((kstream_t*)fp->fp.voidp);
        }
        else if (fp->format.compression != no_compression)
            ret = bgzf_close(fp->fp.bgzf);
        else
            ret = hclose(fp->fp.hfile);
        break;

    default:
        ret = -1;
        break;
    }

    save = errno;
    free(fp->fn);
    free(fp->fn_aux);
    free(fp->line.s);
    free(fp);
    errno = save;
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x44(%rdi), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x9, %eax
ja 0xfe45
movl $0x10c, %ecx            # imm = 0x10C
btl %eax, %ecx
jb 0xfdf2
movl $0x212, %ecx            # imm = 0x212
btl %eax, %ecx
jae 0xfe11
movq 0x38(%rbx), %rdi
jmp 0xfe3e
testb $0x2, (%rbx)
jne 0xfe34
movq 0x38(%rbx), %rax
movq 0x18(%rax), %rdi
callq 0x4514a
movl %eax, %ebp
movq 0x38(%rbx), %rdi
callq 0xda05
jmp 0xfe45
cmpl $0x6, %eax
jne 0xfe45
testb $0x2, (%rbx)
jne 0xfe29
movq 0x38(%rbx), %rdi
callq 0x39566
cmpl $0x2, %eax
je 0xfe8a
movq 0x38(%rbx), %rdi
callq 0x392da
jmp 0xfe43
cmpl $0x0, 0x4c(%rbx)
movq 0x38(%rbx), %rdi
je 0xfe83
callq 0x4514a
movl %eax, %ebp
callq 0x4070
movq %rax, %r14
movl (%rax), %r15d
movq 0x28(%rbx), %rdi
callq 0x4610
movq 0x30(%rbx), %rdi
callq 0x4610
movq 0x20(%rbx), %rdi
callq 0x4610
movq %rbx, %rdi
callq 0x4610
movl %r15d, (%r14)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x484b2
jmp 0xfe43
callq 0x4d98
jmp 0xfe29
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_set_threads
int hts_set_threads(htsFile *fp, int n)
{
    if (fp->format.compression == bgzf) {
        return bgzf_mt(hts_get_bgzfp(fp), n, 256);
    } else if (fp->format.format == cram) {
        return hts_set_opt(fp, CRAM_OPT_NTHREADS, n);
    }
    else return 0;
}

// Assembly:
movl %esi, %edx
cmpl $0x2, 0x4c(%rdi)
jne 0xfeec
leaq 0x38(%rdi), %rax
testb $0x1, (%rdi)
jne 0xfedd
movq (%rax), %rax
addq $0x18, %rax
movq (%rax), %rdi
movl %edx, %esi
movl $0x100, %edx            # imm = 0x100
jmp 0x44a3e
cmpl $0x6, 0x44(%rdi)
jne 0xfefe
movl $0xe, %esi
xorl %eax, %eax
jmp 0xfaf8
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_set_fai_filename
int hts_set_fai_filename(htsFile *fp, const char *fn_aux)
{
    free(fp->fn_aux);
    if (fn_aux) {
        fp->fn_aux = strdup(fn_aux);
        if (fp->fn_aux == NULL) return -1;
    }
    else fp->fn_aux = NULL;

    if (fp->format.format == cram)
        if (cram_set_option(fp->fp.cram, CRAM_OPT_REFERENCE, fp->fn_aux))
            return -1;

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x4610
testq %r14, %r14
je 0xff45
movq %r14, %rdi
callq 0x49c0
movq %rax, 0x30(%rbx)
testq %rax, %rax
jne 0xff4d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xff74
movq $0x0, 0x30(%rbx)
cmpl $0x6, 0x44(%rbx)
jne 0xff72
movq 0x30(%rbx), %rdx
movq 0x38(%rbx), %rdi
movl $0x9, %esi
xorl %eax, %eax
callq 0x3956d
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0xff74
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_useek
int hts_useek(htsFile *fp, long uoffset, int where)
{
    if ( fp->is_bin )
        return bgzf_useek(fp->fp.bgzf, uoffset, where);
    else
    {
        ks_rewind((kstream_t*)fp->fp.voidp);
        ((kstream_t*)fp->fp.voidp)->seek_pos = uoffset;
        return bgzf_useek(((kstream_t*)fp->fp.voidp)->f, uoffset, where);
    }
}

// Assembly:
movq 0x38(%rdi), %rax
testb $0x1, (%rdi)
jne 0xffa8
xorl %ecx, %ecx
movl %ecx, 0x4(%rax)
movq 0x38(%rdi), %rax
movl %ecx, (%rax)
movq 0x38(%rdi), %rax
andl $-0x4, 0x8(%rax)
movq 0x38(%rdi), %rax
movq %rsi, 0x10(%rax)
movq 0x38(%rdi), %rax
movq 0x18(%rax), %rax
movq %rax, %rdi
jmp 0x45d91
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_getline
int hts_getline(htsFile *fp, int delimiter, kstring_t *str)
{
    int ret, dret;
    ret = ks_getuntil((kstream_t*)fp->fp.voidp, delimiter, str, &dret);
    ++fp->lineno;
    return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
leaq 0xc(%rsp), %rcx
xorl %r8d, %r8d
callq 0xda21
incq 0x8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_file_type
int hts_file_type(const char *fname)
{
    int len = strlen(fname);
    if ( !strcasecmp(".vcf.gz",fname+len-7) ) return FT_VCF_GZ;
    if ( !strcasecmp(".vcf",fname+len-4) ) return FT_VCF;
    if ( !strcasecmp(".bcf",fname+len-4) ) return FT_BCF_GZ;
    if ( !strcmp("-",fname) ) return FT_STDIN;

    hFILE *f = hopen(fname, "r");
    if (f == NULL) return 0;

    htsFormat fmt;
    if (hts_detect_format(f, &fmt) < 0) { hclose_abruptly(f); return 0; }
    if (hclose(f) < 0) return 0;

    switch (fmt.format) {
    case vcf: return (fmt.compression == no_compression)? FT_VCF : FT_VCF_GZ;
    case bcf: return (fmt.compression == no_compression)? FT_BCF : FT_BCF_GZ;
    default:  return 0;
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
callq 0x4230
movslq %eax, %r14
leaq (%rbx,%r14), %rsi
addq $-0x7, %rsi
leaq 0x42a22(%rip), %rdi     # 0x52e6c
callq 0x4590
testl %eax, %eax
je 0x104e9
addq %rbx, %r14
addq $-0x4, %r14
leaq 0x42a0f(%rip), %rdi     # 0x52e74
movq %r14, %rsi
callq 0x4590
testl %eax, %eax
je 0x104f0
leaq 0x42a01(%rip), %rdi     # 0x52e79
movq %r14, %rsi
callq 0x4590
testl %eax, %eax
je 0x104f7
leaq 0x3fdea(%rip), %rdi     # 0x50275
movq %rbx, %rsi
callq 0x4750
testl %eax, %eax
je 0x104fe
leaq 0x4347b(%rip), %rsi     # 0x53919
movq %rbx, %rdi
callq 0x4883b
testq %rax, %rax
je 0x1050a
movq %rax, %rbx
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0xe35b
movq %rbx, %rdi
testl %eax, %eax
js 0x10505
callq 0x484b2
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
js 0x1051b
movl 0xc(%rsp), %ecx
cmpl $0x9, %ecx
je 0x1050e
cmpl $0x8, %ecx
jne 0x1051b
cmpl $0x1, 0x14(%rsp)
movl $0x3, %eax
jmp 0x10518
movl $0x3, %eax
jmp 0x1051b
movl $0x2, %eax
jmp 0x1051b
movl $0x5, %eax
jmp 0x1051b
movl $0x8, %eax
jmp 0x1051b
callq 0x4850c
xorl %eax, %eax
jmp 0x1051b
cmpl $0x1, 0x14(%rsp)
movl $0x5, %eax
sbbl $0x0, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_check_EOF
int hts_check_EOF(htsFile *fp)
{
    if (fp->format.compression == bgzf)
        return bgzf_check_EOF(hts_get_bgzfp(fp));
    else if (fp->format.format == cram)
        return cram_check_EOF(fp->fp.cram);
    else
        return 3;
}

// Assembly:
cmpl $0x2, 0x4c(%rdi)
jne 0x10541
leaq 0x38(%rdi), %rax
testb $0x1, (%rdi)
jne 0x10539
movq (%rax), %rax
addq $0x18, %rax
movq (%rax), %rdi
jmp 0x454a6
cmpl $0x6, 0x44(%rdi)
jne 0x10550
movq 0x38(%rdi), %rdi
jmp 0x39c73
movl $0x3, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_idx_init
hts_idx_t *hts_idx_init(int n, int fmt, uint64_t offset0, int min_shift, int n_lvls)
{
    hts_idx_t *idx;
    idx = (hts_idx_t*)calloc(1, sizeof(hts_idx_t));
    if (idx == NULL) return NULL;
    idx->fmt = fmt;
    idx->min_shift = min_shift;
    idx->n_lvls = n_lvls;
    idx->n_bins = ((1<<(3 * n_lvls + 3)) - 1) / 7;
    idx->z.save_bin = idx->z.save_tid = idx->z.last_tid = idx->z.last_bin = 0xffffffffu;
    idx->z.save_off = idx->z.last_off = idx->z.off_beg = idx->z.off_end = offset0;
    idx->z.last_coor = 0xffffffffu;
    if (n) {
        idx->n = idx->m = n;
        idx->bidx = (bidx_t**)calloc(n, sizeof(bidx_t*));
        if (idx->bidx == NULL) { free(idx); return NULL; }
        idx->lidx = (lidx_t*) calloc(n, sizeof(lidx_t));
        if (idx->lidx == NULL) { free(idx->bidx); free(idx); return NULL; }
    }
    return idx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r15d
movl %ecx, %r12d
movq %rdx, %r14
movl %esi, %r13d
movl %edi, %ebp
movl $0x1, %edi
movl $0x88, %esi
callq 0x4360
testq %rax, %rax
je 0x10ef5
movq %rax, %rbx
movl %r13d, (%rax)
movl %r12d, 0x4(%rax)
leal (%r15,%r15,2), %ecx
addb $0x3, %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
movl %r15d, 0x8(%rbx)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
notl %eax
movl $0x92492493, %edx       # imm = 0x92492493
imulq %rax, %rdx
shrq $0x22, %rdx
movl %edx, 0xc(%rbx)
movl %ecx, 0x40(%rbx)
movq $-0x1, %rax
movq %rax, 0x4c(%rbx)
movq %rax, 0x44(%rbx)
movq %r14, 0x70(%rbx)
movq %r14, 0x68(%rbx)
movq %r14, 0x58(%rbx)
movq %r14, 0x60(%rbx)
testl %ebp, %ebp
je 0x10ef7
movl %ebp, 0x18(%rbx)
movl %ebp, 0x14(%rbx)
movslq %ebp, %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x4360
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x10eed
movq %rax, %r14
movl $0x10, %esi
movq %r15, %rdi
callq 0x4360
movq %rax, 0x30(%rbx)
testq %rax, %rax
jne 0x10ef7
movq %r14, %rdi
callq 0x4610
movq %rbx, %rdi
callq 0x4610
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq