LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x18(%rsp)
movq %rsi, %r13
movq %rdi, %r15
movq 0x28(%rdi), %rax
movl %ecx, 0xc(%rsp)
movslq %ecx, %rbp
movq (%rax,%rbp,8), %rax
movzwl (%rax,%r8,2), %edi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x7e4c
movq 0x28(%r15), %rax
movq 0x30(%r15), %rsi
movq (%rax,%rbp,8), %rax
movzwl (%rax,%rbx,2), %eax
andl $0xf, %eax
leaq 0x3b169(%rip), %rcx     # 0x42b80
movzbl (%rax,%rcx), %eax
pushq $0x4e
popq %r12
cmovnel %eax, %r12d
movl 0x1ac(%rsi), %eax
movq %r14, %rdi
callq *0x210(%rsi,%rax,8)
movl %eax, %r14d
movsbl %r12b, %r8d
cmpb %al, %r12b
jne 0x7a45
movq 0x30(%r15), %rax
jmp 0x7aab
testq %r13, %r13
je 0x7a79
leaq 0x20(%rsp), %rax
movq %rax, (%rsp)
movsbl %r14b, %r9d
movq %r15, %rdi
movq %r13, %rsi
movl 0xc(%rsp), %edx
movq %rbx, %rcx
movq %r13, 0x10(%rsp)
movl %r8d, %r13d
callq 0x7e7a
movl %r13d, %r8d
movq 0x10(%rsp), %r13
movq 0x30(%r15), %rax
incq 0x208(%rax)
movsbq %r14b, %rcx
leaq 0x3aee1(%rip), %rdx     # 0x42970
movzbl (%rcx,%rdx), %ecx
movq 0x28(%r15), %rdx
movq (%rdx,%rbp,8), %rdx
movzwl (%rdx,%rbx,2), %edi
andl $-0x10, %edi
andl $0xf, %ecx
orl %edi, %ecx
movw %cx, (%rdx,%rbx,2)
cmpb %r14b, %r12b
jne 0x7adc
testq %r13, %r13
je 0x7adc
cmpb $0x0, 0xd8(%rax)
je 0x7adc
leaq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movq %r13, %rsi
movl 0xc(%rsp), %edx
movq %rbx, %rcx
movl %r8d, %r9d
callq 0x7e7a
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x7afa
leaq 0x20(%rsp), %r8
movq %r15, %rdi
movl 0xc(%rsp), %edx
movq %rbx, %rcx
callq 0x7fac
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_O2/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 0x7144
testb %al, %al
je 0x7b69
xorl %r12d, %r12d
movslq (%r15), %rax
cmpq %rax, %r12
jge 0x7b5d
xorl %r13d, %r13d
movq 0x10(%r15), %rax
cmpq (%rax,%r12,8), %r13
jge 0x7b58
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
movq %r13, %r8
callq 0x79c0
incq %r13
jmp 0x7b35
incq %r12
jmp 0x7b2a
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x39827(%rip), %rdi     # 0x41397
leaq 0x39833(%rip), %rsi     # 0x413aa
leaq 0x3a1dd(%rip), %rcx     # 0x41d5b
movl $0x17d, %edx            # imm = 0x17D
callq 0x4360
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7144
testb %al, %al
je 0x7c9d
movq (%r14), %rdi
leaq 0x396e4(%rip), %rsi     # 0x41297
callq 0x45f0
movq %rax, %r14
leaq 0x3afbe(%rip), %r15     # 0x42b80
pushq $0x4e
popq %r12
xorl %ebp, %ebp
movslq (%rbx), %rax
cmpq %rax, %rbp
jge 0x7c84
movq 0x18(%rbx), %rdx
movq 0x20(%rbx), %rax
movq %rbp, %rcx
shlq $0x5, %rcx
cmpq $0x0, 0x8(%rax,%rcx)
movq (%rdx,%rcx), %rdx
je 0x7c08
addq %rcx, %rax
movq (%rax), %rcx
movq %r14, %rdi
leaq 0x3a267(%rip), %rsi     # 0x41e66
xorl %eax, %eax
callq 0x4770
jmp 0x7c19
movq %r14, %rdi
leaq 0x3a25c(%rip), %rsi     # 0x41e6e
xorl %eax, %eax
callq 0x4770
xorl %r13d, %r13d
xorl %edx, %edx
movq 0x10(%rbx), %rax
movq (%rax,%rbp,8), %rax
cmpq %rax, %r13
jge 0x7c7c
movq 0x28(%rbx), %rcx
movq (%rcx,%rbp,8), %rcx
movzwl (%rcx,%r13,2), %ecx
andl $0xf, %ecx
movzbl (%rcx,%r15), %ecx
cmovel %r12d, %ecx
movb %cl, (%rsp,%rdx)
cmpq $0x31, %rdx
je 0x7c55
decq %rax
cmpq %rax, %r13
jne 0x7c74
incq %rdx
movq %rsp, %rdi
pushq $0x1
popq %rsi
movq %r14, %rcx
callq 0x4a20
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0x4680
pushq $-0x1
popq %rdx
incq %r13
incq %rdx
jmp 0x7c1e
incq %rbp
jmp 0x7bc8
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 0x396f3(%rip), %rdi     # 0x41397
leaq 0x396ff(%rip), %rsi     # 0x413aa
leaq 0x3a12b(%rip), %rcx     # 0x41ddd
movl $0xc7, %edx
callq 0x4360
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::decompress_position_stats(unsigned short, ococo::pos_stats_uncompr_t&)
void stats_t<T, counter_size, refbase_size>::decompress_position_stats(
    T psc, pos_stats_uncompr_t &psu) {
    psu.nt16 = psc & right_full_mask<T, refbase_size>();
    psc >>= refbase_size;

    psu.sum = 0;
    for (int32_t i = 3; i >= 0; i--) {
        psu.counters[i] = psc & right_full_mask<T, counter_size>();
        psu.sum += psu.counters[i];
        psc >>= counter_size;
    }
}

// Assembly:
movl %edi, %eax
andb $0xf, %al
movb %al, (%rsi)
shrl $0x4, %edi
andl $0x0, 0x14(%rsi)
pushq $0x3
popq %rax
testl %eax, %eax
js 0x7e78
movl %edi, %ecx
andl $0x7, %ecx
movl %eax, %edx
movl %ecx, 0x4(%rsi,%rdx,4)
addl %ecx, 0x14(%rsi)
movzwl %di, %edi
shrl $0x3, %edi
decl %eax
jmp 0x7e5c
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7144
testb %al, %al
je 0x7f6e
movq %r14, 0x10(%rsp)
testq %r14, %r14
je 0x7f8d
movq 0x50(%rsp), %r14
movsbq %r13b, %rax
leaq 0x3abab(%rip), %rcx     # 0x42a70
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 0x39198(%rip), %xmm0    # 0x410a0
callq 0x4200
divsd 0x3918b(%rip), %xmm0    # 0x410a0
movl 0x4(%r14), %eax
movq %rax, 0x8(%rsp)
movl 0x8(%r14), %r11d
movl 0xc(%r14), %r10d
movl 0x10(%r14), %r14d
subq $0x8, %rsp
leaq 0x39cf8(%rip), %rsi     # 0x41c2d
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 0x39422(%rip), %rdi     # 0x41397
leaq 0x3942e(%rip), %rsi     # 0x413aa
leaq 0x39be7(%rip), %rcx     # 0x41b6a
movl $0x1fd, %edx            # imm = 0x1FD
callq 0x4360
leaq 0x39848(%rip), %rdi     # 0x417dc
leaq 0x3940f(%rip), %rsi     # 0x413aa
leaq 0x39bc8(%rip), %rcx     # 0x41b6a
movl $0x1fe, %edx            # imm = 0x1FE
callq 0x4360
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/src/misc.cpp
// Function: ococo::print_version()
void ococo::print_version() {
    // clang-format off
    std::cerr <<
           "\n"
           "Program: ococo (Online consensus caller, call cons. from an unsorted SAM/BAM stream)\n"
           "Version: " << OCOCO_VERSION  << "\n"
           "Contact: Karel Brinda <kbrinda@hsph.harvard.edu>\n";
    // clang-format on
    std::cerr << std::endl;
}

// Assembly:
pushq %rbx
movq 0x4ccb8(%rip), %rbx     # 0x56ff0
leaq 0x38861(%rip), %rsi     # 0x42ba0
movq %rbx, %rdi
callq 0x4520
leaq 0x38927(%rip), %rsi     # 0x42c75
movq %rax, %rdi
callq 0x4520
leaq 0x388a3(%rip), %rsi     # 0x42c00
movq %rax, %rdi
callq 0x4520
movq %rbx, %rdi
popq %rbx
jmp 0x4290
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/src/misc.cpp
// Function: ococo::fatal_error(char const*, ...)
void ococo::fatal_error(const char *format, ...) {
    va_list args;
    va_start(args, format);
    fprintf(stderr, "[ococo:fatal-error]: ");
    vfprintf(stderr, format, args);
    va_end(args);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0xa3d1
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)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x4cbd8(%rip), %r15     # 0x56fd0
movq (%r15), %rcx
leaq 0x38831(%rip), %rdi     # 0x42c33
pushq $0x15
popq %rsi
pushq $0x1
popq %rdx
callq 0x4a20
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4700
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/src/misc.cpp
// Function: ococo::error(char const*, ...)
void ococo::error(const char *format, ...) {
    va_list args;
    va_start(args, format);
    fprintf(stderr, "[ococo:error]: ");
    vfprintf(stderr, format, args);
    va_end(args);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0xa48b
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)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x4cb1e(%rip), %r15     # 0x56fd0
movq (%r15), %rcx
leaq 0x3878d(%rip), %rdi     # 0x42c49
pushq $0xf
popq %rsi
pushq $0x1
popq %rdx
callq 0x4a20
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4700
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/src/misc.cpp
// Function: ococo::warning(char const*, ...)
void ococo::warning(const char *format, ...) {
    va_list args;
    va_start(args, format);
    fprintf(stderr, "[ococo:warning]: ");
    vfprintf(stderr, format, args);
    va_end(args);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0xa545
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)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x4ca64(%rip), %r15     # 0x56fd0
movq (%r15), %rcx
leaq 0x386e3(%rip), %rdi     # 0x42c59
pushq $0x11
popq %rsi
pushq $0x1
popq %rdx
callq 0x4a20
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4700
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/src/misc.cpp
// Function: ococo::info(char const*, ...)
void ococo::info(const char *format, ...) {
    va_list args;
    va_start(args, format);
    fprintf(stderr, "[ococo]: ");
    vfprintf(stderr, format, args);
    va_end(args);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0xa5ff
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)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x4c9aa(%rip), %r15     # 0x56fd0
movq (%r15), %rcx
leaq 0x3863b(%rip), %rdi     # 0x42c6b
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x4a20
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4700
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
movb $0x0, 0xd8(%rdi)
addq $0x30, %rdi
leaq 0x38652(%rip), %rsi     # 0x42d58
callq 0x4a00
movl $0x1, 0x28(%rbx)
andl $0x0, 0x1a8(%rbx)
leaq 0x1e8(%rbx), %rdi
leaq 0x38639(%rip), %rsi     # 0x42d60
callq 0x4a00
movl $0x3, 0x1ac(%rbx)
leaq 0x1c8(%rbx), %rdi
leaq 0x38622(%rip), %rsi     # 0x42d66
callq 0x4a00
movaps 0x38530(%rip), %xmm0    # 0x42c80
movups %xmm0, 0x1b0(%rbx)
movabsq $0x3fe051eb80000000, %rax # imm = 0x3FE051EB80000000
movq %rax, 0x1c0(%rbx)
leaq 0xc89(%rip), %rax       # 0xb3f8
movq %rax, 0x210(%rbx)
leaq 0xc89(%rip), %rax       # 0xb406
movq %rax, 0x218(%rbx)
leaq 0xd1c(%rip), %rax       # 0xb4a7
movq %rax, 0x220(%rbx)
leaq 0xd88(%rip), %rax       # 0xb521
movq %rax, 0x228(%rbx)
leaq 0xe08(%rip), %rax       # 0xb5af
movq %rax, 0x230(%rbx)
andq $0x0, 0x208(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x180(%rbx)
movups %xmm0, 0x190(%rbx)
andq $0x0, 0x1a0(%rbx)
movb $0x1, (%rbx)
andl $0x0, 0x4(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/src/params.cpp
// Function: ococo::params_t::~params_t()
ococo::params_t::~params_t() {
    /*
     * Close files.
     */

    if (sam_file != nullptr) {
        int error_code = sam_close(sam_file);
        if (error_code != 0) {
            ococo::error("SAM file could not be closed.\n");
            return_code = -1;
        }
    }

    if (vcf_file != nullptr) {
        int error_code = fclose(vcf_file);
        if (error_code != 0) {
            ococo::error("VCF file could not be closed.\n");
            return_code = -1;
        }
    }

    if (pileup_file != nullptr) {
        int error_code = fclose(pileup_file);
        if (error_code != 0) {
            return_code = error_code;
            ococo::error("Pileup file could not be closed.\n");
            return_code = -1;
        }
    }

    if (fasta_out_file != nullptr) {
        int error_code = fclose(fasta_out_file);
        if (error_code != 0) {
            ococo::error("FASTA consensus file could not be closed.\n");
            return_code = -1;
        }
    }

    if (log_file != nullptr) {
        int error_code = fclose(log_file);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x198(%rdi), %rdi
testq %rdi, %rdi
je 0xb22b
callq 0xd170
testl %eax, %eax
je 0xb22b
leaq 0x37b4f(%rip), %rdi     # 0x42d6f
xorl %eax, %eax
callq 0xa428
orl $-0x1, 0x4(%rbx)
movq 0x180(%rbx), %rdi
testq %rdi, %rdi
je 0xb252
callq 0x4530
testl %eax, %eax
je 0xb252
leaq 0x37b47(%rip), %rdi     # 0x42d8e
xorl %eax, %eax
callq 0xa428
orl $-0x1, 0x4(%rbx)
movq 0x188(%rbx), %rdi
testq %rdi, %rdi
je 0xb27c
callq 0x4530
testl %eax, %eax
je 0xb27c
movl %eax, 0x4(%rbx)
leaq 0x37b3c(%rip), %rdi     # 0x42dad
xorl %eax, %eax
callq 0xa428
orl $-0x1, 0x4(%rbx)
movq 0x190(%rbx), %rdi
testq %rdi, %rdi
je 0xb2a3
callq 0x4530
testl %eax, %eax
je 0xb2a3
leaq 0x37b37(%rip), %rdi     # 0x42dcf
xorl %eax, %eax
callq 0xa428
orl $-0x1, 0x4(%rbx)
movq 0x1a0(%rbx), %rdi
testq %rdi, %rdi
je 0xb2b4
callq 0x4530
leaq 0x1e8(%rbx), %rdi
callq 0x4230
leaq 0x1c8(%rbx), %rdi
callq 0x4230
leaq 0x160(%rbx), %rdi
callq 0x4230
leaq 0x140(%rbx), %rdi
callq 0x4230
leaq 0x120(%rbx), %rdi
callq 0x4230
leaq 0x100(%rbx), %rdi
callq 0x4230
leaq 0xe0(%rbx), %rdi
callq 0x4230
leaq 0xb8(%rbx), %rdi
callq 0x4230
leaq 0x98(%rbx), %rdi
callq 0x4230
leaq 0x78(%rbx), %rdi
callq 0x4230
leaq 0x50(%rbx), %rdi
callq 0x4230
leaq 0x30(%rbx), %rdi
callq 0x4230
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x4230
movq %rax, %rdi
callq 0x775a
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb42d
movq %rdi, %rbx
cmpl $0xf, %ecx
je 0xb439
movl 0x1b8(%rsi), %edx
addl 0x1bc(%rsi), %edx
cmpl %edx, %eax
jge 0xb439
leaq 0x3774c(%rip), %rax     # 0x42b80
movb (%rcx,%rax), %al
jmp 0xb484
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 0xb48a
callq 0x4130
cltd
idivl 0x14(%rbx)
xorl %eax, %eax
cmpq $0x4, %rax
je 0xb482
leaq 0x1(%rax), %rcx
cmpl (%rsp,%rax,4), %edx
movq %rcx, %rax
jge 0xb463
leaq 0x368c5(%rip), %rax     # 0x41d41
movb -0x1(%rcx,%rax), %al
jmp 0xb484
movb $0x6e, %al
addq $0x10, %rsp
popq %rbx
retq
leaq 0x383fe(%rip), %rdi     # 0x4388f
leaq 0x3840d(%rip), %rsi     # 0x438a5
leaq 0x38416(%rip), %rcx     # 0x438b5
pushq $0x21
popq %rdx
callq 0x4360
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x14(%rdi), %eax
movb (%rdi), %r14b
testl %eax, %eax
je 0xb4d2
movq %rdi, %rbx
cmpb $0xf, %r14b
je 0xb4ec
movl 0x1b8(%rsi), %ecx
addl 0x1bc(%rsi), %ecx
cmpl %ecx, %eax
jge 0xb4ec
movzbl %r14b, %eax
leaq 0x376a3(%rip), %rcx     # 0x42b80
movb (%rax,%rcx), %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movb $0xf, %r14b
leaq 0x3784e(%rip), %r15     # 0x42d44
cmpb $0xf, %r14b
jne 0xb4d2
xorl %r12d, %r12d
xorl %r14d, %r14d
cmpq $0x4, %r12
je 0xb4f6
callq 0x4130
cltd
idivl 0x14(%rbx)
cmpl 0x4(%rbx,%r12,4), %edx
jge 0xb51c
orb (%r12,%r15), %r14b
incq %r12
jmp 0xb502
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb546
movq %rdi, %rbx
cmpl $0xf, %ecx
je 0xb55a
movl 0x1b8(%rsi), %edx
addl 0x1bc(%rsi), %edx
cmpl %edx, %eax
jge 0xb55a
leaq 0x37633(%rip), %rax     # 0x42b80
movb (%rcx,%rax), %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x3761f(%rip), %rdx     # 0x42b80
movb (%rcx,%rdx), %bpl
cvtsi2sd %eax, %xmm0
mulsd 0x1c0(%rsi), %xmm0
callq 0x40e0
cvttsd2si %xmm0, %eax
xorl %ecx, %ecx
leaq 0x367be(%rip), %rdx     # 0x41d41
xorl %esi, %esi
cmpq $0x4, %rcx
je 0xb551
movl 0x4(%rbx,%rcx,4), %edi
cmpl %eax, %edi
setge %r8b
cmpl %esi, %edi
setg %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0xb5aa
movb (%rcx,%rdx), %bpl
movl %edi, %esi
incq %rcx
jmp 0xb585
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb626
movq %rdi, %rbx
cmpb $0xf, %bpl
je 0xb5d9
movl 0x1b8(%rsi), %edx
addl 0x1bc(%rsi), %edx
cmpl %edx, %ecx
jl 0xb626
cvtsi2sd %ecx, %xmm0
mulsd 0x1c0(%rsi), %xmm0
callq 0x4200
cvttsd2si %xmm0, %eax
xorl %ecx, %ecx
leaq 0x3774d(%rip), %rdx     # 0x42d44
xorl %esi, %esi
cmpq $0x4, %rcx
je 0xb622
movl 0x4(%rbx,%rcx,4), %edi
cmpl %eax, %edi
jge 0xb60b
movl %esi, %edi
jmp 0xb613
cmpl %esi, %edi
jle 0xb61a
movb (%rcx,%rdx), %bpl
incq %rcx
movl %edi, %esi
jmp 0xb5f9
jl 0xb607
orb (%rcx,%rdx), %bpl
jmp 0xb607
movsbq %bpl, %rax
leaq 0x37553(%rip), %rcx     # 0x42b80
movb (%rax,%rcx), %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
orl $-0x1, 0x8(%rdi)
xorl %r12d, %r12d
cmpq %r14, %r15
jae 0xc30e
movsbl (%r15), %ebp
movl %ebp, %edi
callq 0xfaca
testl %eax, %eax
je 0xc2cd
imull $0xa, %r12d, %eax
movswl %bp, %ecx
leal (%rax,%rcx), %r12d
addl $-0x30, %r12d
incq %r15
jmp 0xc2a5
movw %r12w, 0x8(%rbx)
cmpb $0x2e, (%r15)
jne 0xc306
incq %r15
xorl %r12d, %r12d
cmpq %r14, %r15
jae 0xc30e
movsbl (%r15), %ebp
movl %ebp, %edi
callq 0xfaca
testl %eax, %eax
je 0xc309
imull $0xa, %r12d, %eax
movswl %bp, %ecx
leal (%rax,%rcx), %r12d
addl $-0x30, %r12d
incq %r15
jmp 0xc2de
xorl %r12d, %r12d
movw %r12w, 0xa(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/./htslib/kstring.h
// Function: kputw
static inline int kputw(int c, kstring_t *s)
{
	char buf[16];
	int i, l = 0;
	unsigned int x = c;
	if (c < 0) x = -x;
	do { buf[l++] = x%10 + '0'; x /= 10; } while (x > 0);
	if (c < 0) buf[l++] = '-';
	if (ks_resize(s, s->l + l + 2) < 0)
		return EOF;
	for (i = l - 1; i >= 0; --i) s->s[s->l++] = buf[i];
	s->s[s->l] = 0;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %ecx
negl %ecx
cmovsl %edi, %ecx
xorl %r14d, %r14d
pushq $0xa
popq %rsi
movl %ecx, %eax
xorl %edx, %edx
divl %esi
orb $0x30, %dl
movb %dl, (%rsp,%r14)
incq %r14
cmpl $0x9, %ecx
movl %eax, %ecx
ja 0xc531
testl %edi, %edi
jns 0xc556
movl %r14d, %eax
incl %r14d
movb $0x2d, (%rsp,%rax)
movq (%rbx), %rax
movslq %r14d, %rcx
leaq (%rcx,%rax), %rsi
addq $0x2, %rsi
movq %rbx, %rdi
callq 0x1042a
testl %eax, %eax
js 0xc59c
movl %r14d, %eax
testl %eax, %eax
jle 0xc591
movb -0x1(%rsp,%rax), %cl
decq %rax
movq (%rbx), %rdx
movq 0x10(%rbx), %rsi
leaq 0x1(%rdx), %rdi
movq %rdi, (%rbx)
movb %cl, (%rsi,%rdx)
jmp 0xc573
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x64
popq %rdx
movq %r15, %rdi
callq 0x42c0
movb $0x0, 0x64(%r15)
pushq $0x2c
popq %rsi
movq %r15, %rdi
callq 0x41e0
testq %rax, %rax
je 0xc5db
movb $0x0, (%rax)
xorl %ecx, %ecx
movq %r15, %rax
movb (%r15), %dl
movzbl %dl, %esi
leal -0x62(%rsi), %edi
cmpl $0x2, %edi
jae 0xc5f2
movl %edx, %ecx
jmp 0xc5fb
testl %esi, %esi
je 0xc600
movb %dl, (%rax)
incq %rax
incq %r15
jmp 0xc5e0
movb %cl, (%rax)
andw $0x0, 0x1(%rax)
testq %r14, %r14
je 0xc621
movl 0x4(%r14), %ecx
testq %rcx, %rcx
je 0xc621
leaq 0x37544(%rip), %rdx     # 0x43b60
movb (%rcx,%rdx), %cl
movb %cl, (%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3a708
movq %rax, %r15
testq %rax, %rax
je 0xc664
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xc6b0
testq %rax, %rax
je 0xc664
movq %rax, %r12
testq %r14, %r14
je 0xc67d
movq 0x18(%r14), %rsi
testq %rsi, %rsi
je 0xc67d
movq %r12, %rdi
callq 0xc9d5
testl %eax, %eax
je 0xc67d
cmpl $0x2, 0x4aedd(%rip)     # 0x57548
jge 0xc68c
testq %r15, %r15
je 0xc67a
movq %r15, %rdi
callq 0x3a3fa
xorl %r12d, %r12d
movq %r12, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x4a93d(%rip), %rax     # 0x56fd0
movq (%rax), %rdi
leaq 0x3760f(%rip), %rsi     # 0x43cac
leaq 0x37628(%rip), %rdx     # 0x43ccc
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4770
jmp 0xc66d
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_opt_apply
int hts_opt_apply(htsFile *fp, hts_opt *opts) {
    hts_opt *last = NULL;

    for (; opts;  opts = (last=opts)->next)
        if (hts_set_opt(fp,  opts->opt,  opts->val) != 0)
            return -1;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
pushq $-0x1
popq %rbp
testq %r14, %r14
je 0xca0a
movl 0x8(%r14), %esi
movq 0x10(%r14), %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0xcea0
testl %eax, %eax
jne 0xca08
movq 0x18(%r14), %r14
jmp 0xc9e7
movl %ebp, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xcef6
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 0xcf39
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
pushq $0x10
popq %rcx
cmpq $0x28, %rcx
ja 0xcf71
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0xcf7f
xorl %eax, %eax
cmpl $0x6, 0x44(%rdi)
jne 0xcf86
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 0x2dd56
jmp 0xcf86
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl (%rax), %esi
callq 0xd28f
addq $0xd8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rbx, %rbx
je 0xcfb3
movq (%rbx), %rdi
movq 0x18(%rbx), %r14
callq 0x4600
movq %rbx, %rdi
callq 0x4600
movq %r14, %rbx
jmp 0xcf95
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x1f48, %rsp           # imm = 0x1F48
movq %rsi, %r15
movq %rdi, %r14
addq $0x18, %r14
movl $0x1f40, %ebp           # imm = 0x1F40
movq %rsp, %r12
testq %r15, %r15
je 0xd04d
cmpb $0x0, (%r15)
je 0xd04d
decq %r15
movb 0x1(%r15), %al
incq %r15
cmpb $0x2c, %al
je 0xcfec
xorl %ebx, %ebx
testb %al, %al
je 0xd00f
movzbl %al, %eax
cmpl $0x2c, %eax
je 0xd00f
movb 0x1(%r15,%rbx), %al
incq %rbx
jmp 0xcff9
cmpl %ebp, %ebx
movl $0x1f40, %eax           # imm = 0x1F40
cmovll %ebx, %eax
movslq %eax, %r13
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x42c0
movb $0x0, (%rsp,%r13)
movq %r14, %rdi
movq %r12, %rsi
callq 0xca1e
testl %eax, %eax
jne 0xd051
cmpb $0x1, (%r15,%rbx)
leaq (%r15,%rbx), %r15
sbbq $-0x1, %r15
jmp 0xcfde
xorl %eax, %eax
jmp 0xd054
pushq $-0x1
popq %rax
addq $0x1f48, %rsp           # imm = 0x1F48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movzbl (%rbx), %r12d
testl %r12d, %r12d
je 0xd0a9
cmpl $0x2c, %r12d
je 0xd0a9
cmpq $0x6, %r15
ja 0xd0a4
callq 0x40f0
movq (%rax), %rax
movb (%rax,%r12,4), %al
movb %al, 0x8(%rsp,%r15)
incq %r15
incq %rbx
jmp 0xd07b
cmpq $0x1, %r12
sbbq $-0x1, %rbx
movb $0x0, 0x8(%rsp,%r15)
andl $0x0, 0x8(%r14)
cmpl $0x6d6173, 0x8(%rsp)    # imm = 0x6D6173
je 0xd114
movw $0xffff, %r15w          # imm = 0xFFFF
pushq $0x2
popq %rbp
cmpl $0x6d6162, 0x8(%rsp)    # imm = 0x6D6162
je 0xd123
leaq 0x36da0(%rip), %rsi     # 0x43e7f
leaq 0x8(%rsp), %rdi
pushq $0x5
popq %rdx
callq 0x4550
testl %eax, %eax
je 0xd12d
cmpl $0x666376, 0x8(%rsp)    # imm = 0x666376
je 0xd13a
cmpl $0x666362, 0x8(%rsp)    # imm = 0x666362
je 0xd144
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movsd 0x36824(%rip), %xmm0    # 0x43940
xorl %ebp, %ebp
xorl %r15d, %r15d
jmp 0xd14c
movsd 0x36825(%rip), %xmm0    # 0x43950
jmp 0xd14c
movsd 0x3682b(%rip), %xmm0    # 0x43960
pushq $0x3
popq %rbp
jmp 0xd14c
movsd 0x3682e(%rip), %xmm0    # 0x43970
jmp 0xd11c
movsd 0x36834(%rip), %xmm0    # 0x43980
movlps %xmm0, (%r14)
movl %ebp, 0xc(%r14)
movw %r15w, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcfbb
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $-0x1
popq %rbp
cmpl $0x9, %eax
ja 0xd1f2
movl $0x10c, %ecx            # imm = 0x10C
btl %eax, %ecx
jb 0xd19f
movl $0x212, %ecx            # imm = 0x212
btl %eax, %ecx
jae 0xd1be
movq 0x38(%rbx), %rdi
jmp 0xd1eb
testb $0x2, (%rbx)
jne 0xd1e1
movq 0x38(%rbx), %rax
movq 0x18(%rax), %rdi
callq 0x377bc
movl %eax, %ebp
movq 0x38(%rbx), %rdi
callq 0xb671
jmp 0xd1f2
cmpl $0x6, %eax
jne 0xd1f2
testb $0x2, (%rbx)
jne 0xd1d6
movq 0x38(%rbx), %rdi
callq 0x2dccb
cmpl $0x2, %eax
je 0xd237
movq 0x38(%rbx), %rdi
callq 0x2dac0
jmp 0xd1f0
cmpl $0x0, 0x4c(%rbx)
movq 0x38(%rbx), %rdi
je 0xd230
callq 0x377bc
movl %eax, %ebp
callq 0x4060
movq %rax, %r14
movl (%rax), %r15d
movq 0x28(%rbx), %rdi
callq 0x4600
movq 0x30(%rbx), %rdi
callq 0x4600
movq 0x20(%rbx), %rdi
callq 0x4600
movq %rbx, %rdi
callq 0x4600
movl %r15d, (%r14)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x3a3a2
jmp 0xd1f0
movq 0x49d92(%rip), %rax     # 0x56fd0
movq (%rax), %rdi
leaq 0x36c46(%rip), %rsi     # 0x43e8e
leaq 0x36c7f(%rip), %rdx     # 0x43ece
xorl %eax, %eax
callq 0x4770
jmp 0xd1d6
// File: /workspace/github_cpp_makefile_star2_O2/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 0xd2b6
leaq 0x38(%rdi), %rax
testb $0x1, (%rdi)
jne 0xd2a7
movq (%rax), %rax
addq $0x18, %rax
movq (%rax), %rdi
movl %edx, %esi
movl $0x100, %edx            # imm = 0x100
jmp 0x37174
cmpl $0x6, 0x44(%rdi)
jne 0xd2c6
pushq $0xe
popq %rsi
xorl %eax, %eax
jmp 0xcea0
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x30(%rdi), %rdi
callq 0x4600
pushq $-0x1
popq %rbx
testq %r15, %r15
je 0xd30c
movq %r15, %rdi
callq 0x49a0
movq %rax, 0x30(%r14)
testq %rax, %rax
jne 0xd313
jmp 0xd331
andq $0x0, 0x30(%r14)
xorl %eax, %eax
cmpl $0x6, 0x44(%r14)
jne 0xd32f
movq 0x38(%r14), %rdi
pushq $0x9
popq %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2dcd2
testl %eax, %eax
jne 0xd331
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xd365
andl $0x0, 0x4(%rax)
movq 0x38(%rdi), %rax
andl $0x0, (%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 0x38372
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4210
movslq %eax, %r14
leaq (%rbx,%r14), %rsi
addq $-0x7, %rsi
leaq 0x366fc(%rip), %rdi     # 0x43ede
callq 0x4590
testl %eax, %eax
je 0xd87d
addq %rbx, %r14
addq $-0x4, %r14
leaq 0x366e9(%rip), %rdi     # 0x43ee6
movq %r14, %rsi
callq 0x4590
testl %eax, %eax
je 0xd881
leaq 0x366db(%rip), %rdi     # 0x43eeb
movq %r14, %rsi
callq 0x4590
testl %eax, %eax
je 0xd885
movzbl (%rbx), %eax
subl $0x2d, %eax
jne 0xd828
movzbl 0x1(%rbx), %eax
negl %eax
testl %eax, %eax
je 0xd889
leaq 0x37080(%rip), %rsi     # 0x448b5
movq %rbx, %rdi
callq 0x3a708
testq %rax, %rax
je 0xd899
movq %rax, %rbx
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0xbf38
movq %rbx, %rdi
testl %eax, %eax
js 0xd894
callq 0x3a3a2
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
js 0xd88c
movl 0xc(%rsp), %ecx
cmpl $0x9, %ecx
je 0xd89d
cmpl $0x8, %ecx
jne 0xd88c
cmpl $0x1, 0x14(%rsp)
pushq $0x3
jmp 0xd8a4
pushq $0x3
jmp 0xd88b
pushq $0x2
jmp 0xd88b
pushq $0x5
jmp 0xd88b
pushq $0x8
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
callq 0x3a3fa
xorl %eax, %eax
jmp 0xd88c
cmpl $0x1, 0x14(%rsp)
pushq $0x5
popq %rax
sbbl $0x0, %eax
jmp 0xd88c
// File: /workspace/github_cpp_makefile_star2_O2/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 0xd8c8
leaq 0x38(%rdi), %rax
testb $0x1, (%rdi)
jne 0xd8c0
movq (%rax), %rax
addq $0x18, %rax
movq (%rax), %rdi
jmp 0x37aed
cmpl $0x6, 0x44(%rdi)
jne 0xd8d7
movq 0x38(%rdi), %rdi
jmp 0x2e3fe
pushq $0x3
popq %rax
retq