LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/cmds.cpp
// Function: (anonymous namespace)::pl_level_cmp(std::_List_const_iterator<Player>, std::_List_const_iterator<Player>)
bool pl_level_cmp(const list<Player>::const_iterator i, const list<Player>::const_iterator j)
{
	// Ordering is based on a consideration of kills/deaths & playing time:
	unsigned long resi = 0, resj = 0;
	for(char ch = 0; ch < NO_CLASS; ++ch)
	{
		resi += i->stats_i->time_played[ch];
		resj += j->stats_i->time_played[ch];
	}
	resi /= NO_CLASS; // averages of times played as each class
	resj /= NO_CLASS;
	// only take kill/death ratio into account if have enough deaths:
	if(i->stats_i->deaths >= KILLS_DEATHS_REQ_FOR_COMP)
		resi *= float(total_kills(i->stats_i))/i->stats_i->deaths;
	if(j->stats_i->deaths >= KILLS_DEATHS_REQ_FOR_COMP)
		resj *= float(total_kills(j->stats_i))/j->stats_i->deaths;
	// It might be that resi == resj, although this is very unlikely.
	// In that case, less healing received wins (or arbitrarily j if equal):
	if(resi != resj)
		return (resi > resj);
	return (i->stats_i->healing_recvd > j->stats_i->healing_recvd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x90(%rdi), %rdi
movq 0x90(%rsi), %r8
xorl %ecx, %ecx
xorl %eax, %eax
xorl %esi, %esi
addq 0xc0(%rdi,%rcx,8), %rax
addq 0xc0(%r8,%rcx,8), %rsi
incq %rcx
cmpq $0xb, %rcx
jne 0x2a8aa
movabsq $0x2e8ba2e8ba2e8ba3, %r9 # imm = 0x2E8BA2E8BA2E8BA3
mulq %r9
movq %rdx, %rcx
movq %rsi, %rax
mulq %r9
shrq %rcx
movq 0x40(%rdi), %rax
cmpq $0x13, %rax
jbe 0x2a97c
xorl %r9d, %r9d
xorl %esi, %esi
addq 0x48(%rdi,%r9,8), %rsi
incq %r9
cmpq $0xb, %r9
jne 0x2a8ef
movq 0xa0(%rdi), %r9
xorl %r10d, %r10d
cmpq %r9, %rsi
cmovaq %r9, %r10
subq %r10, %rsi
js 0x2a91a
cvtsi2ss %rsi, %xmm0
jmp 0x2a92f
movq %rsi, %r9
shrq %r9
andl $0x1, %esi
orq %r9, %rsi
cvtsi2ss %rsi, %xmm0
addss %xmm0, %xmm0
testq %rax, %rax
js 0x2a93b
cvtsi2ss %rax, %xmm1
jmp 0x2a950
movq %rax, %rsi
shrq %rsi
andl $0x1, %eax
orq %rsi, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
cvtsi2ss %rcx, %xmm2
divss %xmm1, %xmm0
mulss %xmm0, %xmm2
cvttss2si %xmm2, %rax
movq %rax, %rsi
sarq $0x3f, %rsi
subss 0xae3f(%rip), %xmm2     # 0x357b0
cvttss2si %xmm2, %rcx
andq %rsi, %rcx
orq %rax, %rcx
shrq %rdx
movq 0x40(%r8), %rax
cmpq $0x14, %rax
jb 0x2aa2e
xorl %r9d, %r9d
xorl %esi, %esi
addq 0x48(%r8,%r9,8), %rsi
incq %r9
cmpq $0xb, %r9
jne 0x2a992
movq 0xa0(%r8), %r9
xorl %r10d, %r10d
cmpq %r9, %rsi
cmovaq %r9, %r10
subq %r10, %rsi
js 0x2a9c0
xorps %xmm0, %xmm0
cvtsi2ss %rsi, %xmm0
jmp 0x2a9d8
movq %rsi, %r9
shrq %r9
andl $0x1, %esi
orq %r9, %rsi
xorps %xmm0, %xmm0
cvtsi2ss %rsi, %xmm0
addss %xmm0, %xmm0
testq %rax, %rax
js 0x2a9e7
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
jmp 0x2a9ff
movq %rax, %rsi
shrq %rsi
andl $0x1, %eax
orq %rsi, %rax
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
xorps %xmm2, %xmm2
cvtsi2ss %rdx, %xmm2
divss %xmm1, %xmm0
mulss %xmm0, %xmm2
cvttss2si %xmm2, %rax
movq %rax, %rsi
sarq $0x3f, %rsi
subss 0xad8d(%rip), %xmm2     # 0x357b0
cvttss2si %xmm2, %rdx
andq %rsi, %rdx
orq %rax, %rdx
cmpq %rdx, %rcx
jne 0x2aa41
movq 0xa8(%rdi), %rax
cmpq 0xa8(%r8), %rax
seta %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4ae3
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 0x5d4be(%rip), %r15     # 0x61fc8
movq (%r15), %rcx
leaq 0x4b10f(%rip), %rdi     # 0x4fc23
pushq $0x15
popq %rsi
pushq $0x1
popq %rdx
callq 0x4a30
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4710
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4b9d
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 0x5d404(%rip), %r15     # 0x61fc8
movq (%r15), %rcx
leaq 0x4b06b(%rip), %rdi     # 0x4fc39
pushq $0xf
popq %rsi
pushq $0x1
popq %rdx
callq 0x4a30
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4710
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4c57
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 0x5d34a(%rip), %r15     # 0x61fc8
movq (%r15), %rcx
leaq 0x4afc1(%rip), %rdi     # 0x4fc49
pushq $0x11
popq %rsi
pushq $0x1
popq %rdx
callq 0x4a30
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4710
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4d11
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 0x5d290(%rip), %r15     # 0x61fc8
movq (%r15), %rcx
leaq 0x4af19(%rip), %rdi     # 0x4fc5b
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x4a30
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4710
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/karel-brinda[P]ococo/ext/htslib/cram/cram_stats.c
// Function: cram_stats_dump
void cram_stats_dump(cram_stats *st) {
    int i;
    fprintf(stderr, "cram_stats:\n");
    for (i = 0; i < MAX_STAT_VAL; i++) {
	if (!st->freqs[i])
	    continue;
	fprintf(stderr, "\t%d\t%d\n", i, st->freqs[i]);
    }
    if (st->h) {
	khint_t k;
	for (k = kh_begin(st->h); k != kh_end(st->h); k++) {
	    if (!kh_exist(st->h, k))
		continue;

	    fprintf(stderr, "\t%d\t%d\n", kh_key(st->h, k), kh_val(st->h, k));
	}
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x5c778(%rip), %r12     # 0x61fc8
movq (%r12), %rcx
leaq 0x4dc9f(%rip), %rdi     # 0x534fa
pushq $0xc
popq %rsi
pushq $0x1
popq %rdx
callq 0x4a30
leaq 0x4ceba(%rip), %r14     # 0x52727
xorl %r15d, %r15d
movl (%rbx,%r15,4), %ecx
testl %ecx, %ecx
jne 0x5886
incq %r15
cmpq $0x400, %r15            # imm = 0x400
jne 0x5870
jmp 0x5899
movq (%r12), %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x4770
jmp 0x5878
movq 0x1000(%rbx), %rax
testq %rax, %rax
je 0x5908
movl (%rax), %edx
testl %edx, %edx
je 0x5908
leaq 0x4ce75(%rip), %r14     # 0x52727
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x10(%rax), %rcx
movl %r15d, %esi
shrl $0x4, %esi
movl (%rcx,%rsi,4), %esi
movl %ebp, %ecx
andb $0x1e, %cl
shrl %cl, %esi
testb $0x3, %sil
je 0x58de
incl %r15d
addl $0x2, %ebp
cmpl %edx, %r15d
jne 0x58b7
jmp 0x5908
movq (%r12), %rdi
movl %r15d, %ecx
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rax
movl (%rdx,%rcx,4), %edx
movl (%rax,%rcx,4), %ecx
movq %r14, %rsi
xorl %eax, %eax
callq 0x4770
movq 0x1000(%rbx), %rax
movl (%rax), %edx
jmp 0x58d1
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xc9ca
movl $0x1, %ebx
cmpb $0x1, (%r14)
jne 0x65fa
movl 0x68(%rsp), %eax
cmpl $0x2, %eax
je 0x65c7
cmpl $0x1, %eax
je 0x6592
testl %eax, %eax
jne 0x65fa
leaq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x6cb0
movl $0x1, %ebx
cmpb $0x0, 0x8(%rsp)
je 0x6586
leaq 0x8(%rsp), %rdi
callq 0x7312
movl 0xc(%rsp), %ebx
leaq 0x8(%rsp), %rdi
callq 0x76d6
jmp 0x65fa
leaq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x777c
movl $0x1, %ebx
cmpb $0x0, 0x8(%rsp)
je 0x65bb
leaq 0x8(%rsp), %rdi
callq 0x7dde
movl 0xc(%rsp), %ebx
leaq 0x8(%rsp), %rdi
callq 0x81a0
jmp 0x65fa
leaq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x8246
movl $0x1, %ebx
cmpb $0x0, 0x8(%rsp)
je 0x65f0
leaq 0x8(%rsp), %rdi
callq 0x88a8
movl 0xc(%rsp), %ebx
leaq 0x8(%rsp), %rdi
callq 0x8c6c
leaq 0x40(%rsp), %rdi
callq 0xd3b8
movl %ebx, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x76d6
jmp 0x6645
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8c6c
jmp 0x6645
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x81a0
jmp 0x6645
jmp 0x6642
jmp 0x6642
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xd3b8
movq %rbx, %rdi
callq 0x4970
// File: /workspace/github_cpp_makefile_star2_O3/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 0x12d8d
movq 0x10(%rbx), %rdi
callq 0x14769
movq 0x18(%rbx), %rdi
callq 0x14093
movq 0x20(%rbx), %r14
testq %r14, %r14
je 0x7719
movq %r14, %rdi
callq 0x96da
movl $0x38, %esi
movq %r14, %rdi
callq 0x4540
cmpl $0x0, 0x4(%rbx)
jne 0x776b
cmpb $0x1, (%rbx)
jne 0x776b
leaq 0x472cc(%rip), %rdi     # 0x4e9f7
xorl %eax, %eax
callq 0x4cae
callq 0xc520
movsd %xmm0, 0x10(%rsp)
movsd 0x30(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0xc54f
movapd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
subsd 0x8(%rsp), %xmm0
leaq 0x472b6(%rip), %rdi     # 0x4ea1a
movb $0x2, %al
callq 0x4cae
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x95a2
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8f91
cmpq $0x0, 0x10(%rdi)
je 0x8f91
movq 0x28(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x8f91
cmpq $0x0, 0x18(%rdi)
je 0x8f91
cmpq $0x0, 0x20(%rdi)
je 0x8f91
movslq (%rdi), %rax
testq %rax, %rax
jle 0x8f92
xorl %edx, %edx
cmpq $0x0, (%rcx,%rdx,8)
je 0x8f95
incq %rdx
cmpq %rdx, %rax
jne 0x8f7f
setbe %al
retq
movb $0x1, %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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)
setne %cl
movl (%rdi), %eax
testl %eax, %eax
setg %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x971e
xorl %r14d, %r14d
movq 0x28(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x9713
callq 0x46c0
movl (%rbx), %eax
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0x96ff
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x972c
callq 0x46c0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x973a
callq 0x46c0
movq 0x18(%rbx), %r12
testq %r12, %r12
je 0x978f
leaq -0x8(%r12), %r14
movq -0x8(%r12), %r15
testq %r15, %r15
je 0x977c
addq $-0x10, %r12
movq %r15, %r13
shlq $0x5, %r13
leaq (%r12,%r13), %rax
movq -0x10(%r12,%r13), %rdi
cmpq %rdi, %rax
je 0x9776
movq (%rax), %rsi
incq %rsi
callq 0x4540
addq $-0x20, %r13
jne 0x975d
shlq $0x5, %r15
orq $0x8, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4a40
movq 0x20(%rbx), %r12
testq %r12, %r12
je 0x97e4
leaq -0x8(%r12), %r14
movq -0x8(%r12), %r15
testq %r15, %r15
je 0x97d1
addq $-0x10, %r12
movq %r15, %r13
shlq $0x5, %r13
leaq (%r12,%r13), %rax
movq -0x10(%r12,%r13), %rdi
cmpq %rdi, %rax
je 0x97cb
movq (%rax), %rsi
incq %rsi
callq 0x4540
addq $-0x20, %r13
jne 0x97b2
shlq $0x5, %r15
orq $0x8, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4a40
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x97fb
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_O3/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 0x988c
movzwl %di, %eax
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 0x9823
movzbl %sil, %eax
movl 0x4(%rsp,%rax,4), %ecx
cmpl $0x7, %ecx
jne 0x985d
movdqu 0x4(%rsp), %xmm0
psrad $0x1, %xmm0
movdqu %xmm0, 0x4(%rsp)
movl 0x4(%rsp,%rax,4), %ecx
incl %ecx
movl %ecx, 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 0x986a
shll $0x4, %eax
andl $0xf, %edi
orl %eax, %edi
movl %edi, %eax
addq $0x18, %rsp
retq
leaq 0x45227(%rip), %rdi     # 0x4eaba
leaq 0x44af0(%rip), %rsi     # 0x4e38a
leaq 0x4522d(%rip), %rcx     # 0x4eace
movl $0x273, %edx            # imm = 0x273
callq 0x4350
nop
// File: /workspace/github_cpp_makefile_star2_O3/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, 0x10(%rsp)
movq %rdi, %r15
movq 0x28(%rdi), %rax
movl %ecx, 0xc(%rsp)
movslq %ecx, %rbp
movq (%rax,%rbp,8), %rax
movzwl (%rax,%r8,2), %eax
movl %eax, %ecx
andb $0xf, %cl
movb %cl, 0x20(%rsp)
movl %eax, %ecx
shrl $0x4, %ecx
movl $0x0, 0x34(%rsp)
movl $0x10, %edx
movl %ecx, %esi
andl $0x7, %esi
movl %esi, 0x20(%rsp,%rdx)
addl %esi, 0x34(%rsp)
movzwl %cx, %ecx
shrl $0x3, %ecx
addq $-0x4, %rdx
jne 0x98f9
andl $0xf, %eax
leaq 0x46254(%rip), %rcx     # 0x4fb70
movzbl (%rax,%rcx), %eax
movl $0x4e, %r12d
cmovnel %eax, %r12d
movq 0x30(%r15), %rsi
movl 0x1ac(%rsi), %eax
leaq 0x20(%rsp), %r13
movq %r13, %rdi
callq *0x210(%rsi,%rax,8)
cmpb %al, %r12b
jne 0x9985
movq 0x10(%rsp), %rsi
jne 0x99df
testq %rsi, %rsi
je 0x99df
movq 0x30(%r15), %rax
cmpb $0x0, 0xd8(%rax)
je 0x99df
movq %r13, (%rsp)
movsbl %r12b, %r8d
movq %r15, %rdi
movl 0xc(%rsp), %edx
movq %rbx, %rcx
movl %r8d, %r9d
callq 0x9d8c
jmp 0x99df
movl %eax, %r14d
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x99ad
movq %r13, (%rsp)
movsbl %r12b, %r8d
movsbl %r14b, %r9d
movq %r15, %rdi
movl 0xc(%rsp), %edx
movq %rbx, %rcx
callq 0x9d8c
movq 0x30(%r15), %rax
incq 0x208(%rax)
movsbq %r14b, %rax
leaq 0x45f8d(%rip), %rcx     # 0x4f950
movzbl (%rax,%rcx), %eax
movq 0x28(%r15), %rcx
movq (%rcx,%rbp,8), %rcx
movzwl (%rcx,%rbx,2), %edx
andl $-0x10, %edx
andl $0xf, %eax
orl %edx, %eax
movw %ax, (%rcx,%rbx,2)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x99fd
leaq 0x20(%rsp), %r8
movq %r15, %rdi
movl 0xc(%rsp), %edx
movq %rbx, %rcx
callq 0x9ebe
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8f4c
testb %al, %al
je 0x9a7c
movl (%r15), %ecx
testl %ecx, %ecx
jle 0x9a70
movq 0x10(%r15), %rax
xorl %r12d, %r12d
cmpq $0x0, (%rax,%r12,8)
jle 0x9a65
xorl %r13d, %r13d
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
movq %r13, %r8
callq 0x98ac
incq %r13
movq 0x10(%r15), %rax
cmpq (%rax,%r12,8), %r13
jl 0x9a41
movl (%r15), %ecx
incq %r12
movslq %ecx, %rdx
cmpq %rdx, %r12
jl 0x9a37
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x448f4(%rip), %rdi     # 0x4e377
leaq 0x44900(%rip), %rsi     # 0x4e38a
leaq 0x452aa(%rip), %rcx     # 0x4ed3b
movl $0x17d, %edx            # imm = 0x17D
callq 0x4350
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8f4c
testb %al, %al
je 0x9bcb
movq (%r14), %rdi
leaq 0x447b0(%rip), %rsi     # 0x4e277
callq 0x4600
movq %rax, %r14
cmpl $0x0, (%rbx)
jle 0x9bb2
leaq 0x46091(%rip), %rbp     # 0x4fb70
movl $0x4e, %r15d
xorl %r13d, %r13d
movq 0x18(%rbx), %rdx
movq 0x20(%rbx), %rax
movq %r13, %rcx
shlq $0x5, %rcx
cmpq $0x0, 0x8(%rax,%rcx)
movq (%rdx,%rcx), %rdx
je 0x9b1c
addq %rcx, %rax
movq (%rax), %rcx
movq %r14, %rdi
leaq 0x45333(%rip), %rsi     # 0x4ee46
xorl %eax, %eax
callq 0x4770
jmp 0x9b2d
movq %r14, %rdi
leaq 0x45328(%rip), %rsi     # 0x4ee4e
xorl %eax, %eax
callq 0x4770
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %rcx
testq %rcx, %rcx
jle 0x9ba3
xorl %edx, %edx
xorl %r12d, %r12d
movq 0x28(%rbx), %rsi
movq (%rsi,%r13,8), %rsi
movzwl (%rsi,%r12,2), %esi
andl $0xf, %esi
movzbl (%rsi,%rbp), %esi
cmovel %r15d, %esi
movb %sil, (%rsp,%rdx)
cmpq $0x31, %rdx
je 0x9b69
decq %rcx
cmpq %rcx, %r12
jne 0x9b94
incq %rdx
movl $0x1, %esi
movq %rsp, %rdi
movq %r14, %rcx
callq 0x4a30
movl $0xa, %edi
movq %r14, %rsi
callq 0x4690
movq 0x10(%rbx), %rax
movq $-0x1, %rdx
incq %r12
incq %rdx
movq (%rax,%r13,8), %rcx
cmpq %rcx, %r12
jl 0x9b3f
incq %r13
movslq (%rbx), %rax
cmpq %rax, %r13
jl 0x9ae8
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 0x447a5(%rip), %rdi     # 0x4e377
leaq 0x447b1(%rip), %rsi     # 0x4e38a
leaq 0x451dd(%rip), %rcx     # 0x4edbd
movl $0xc7, %edx
callq 0x4350
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8f4c
testb %al, %al
je 0x9e80
movq %r14, 0x10(%rsp)
testq %r14, %r14
je 0x9e9f
movq 0x50(%rsp), %r14
movsbq %r13b, %rax
leaq 0x45c79(%rip), %rcx     # 0x4fa50
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 0x44266(%rip), %xmm0    # 0x4e080
callq 0x4220
divsd 0x44259(%rip), %xmm0    # 0x4e080
movl 0x4(%r14), %eax
movq %rax, 0x8(%rsp)
movl 0x8(%r14), %r11d
movl 0xc(%r14), %r10d
movl 0x10(%r14), %r14d
subq $0x8, %rsp
leaq 0x44dc6(%rip), %rsi     # 0x4ec0d
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 0x444f0(%rip), %rdi     # 0x4e377
leaq 0x444fc(%rip), %rsi     # 0x4e38a
leaq 0x44cb5(%rip), %rcx     # 0x4eb4a
movl $0x1fd, %edx            # imm = 0x1FD
callq 0x4350
leaq 0x44916(%rip), %rdi     # 0x4e7bc
leaq 0x444dd(%rip), %rsi     # 0x4e38a
leaq 0x44c96(%rip), %rcx     # 0x4eb4a
movl $0x1fe, %edx            # imm = 0x1FE
callq 0x4350
// File: /workspace/github_cpp_makefile_star2_O3/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 0x43797(%rip), %rcx     # 0x4fd48
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 0x4376c(%rip), %rcx     # 0x4fd50
movl $0x5, %r8d
xorl %esi, %esi
callq 0x4820
movl $0x3, 0x1ac(%rbx)
leaq 0x1c8(%rbx), %rdi
movq 0x1d0(%rbx), %rdx
leaq 0x43746(%rip), %rcx     # 0x4fd56
movl $0x8, %r8d
xorl %esi, %esi
callq 0x4820
movaps 0x4364c(%rip), %xmm0    # 0x4fc70
movups %xmm0, 0x1b0(%rbx)
movabsq $0x3fe051eb80000000, %rax # imm = 0x3FE051EB80000000
movq %rax, 0x1c0(%rbx)
leaq 0x10ae(%rip), %rax      # 0xd6f1
movq %rax, 0x210(%rbx)
leaq 0x10ae(%rip), %rax      # 0xd6ff
movq %rax, 0x218(%rbx)
leaq 0x113e(%rip), %rax      # 0xd79d
movq %rax, 0x220(%rbx)
leaq 0x11b0(%rip), %rax      # 0xd81d
movq %rax, 0x228(%rbx)
leaq 0x1230(%rip), %rax      # 0xd8ab
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_O3/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 0xd726
movq %rdi, %rbx
cmpl $0xf, %ecx
je 0xd732
movl 0x1b8(%rsi), %edx
addl 0x1bc(%rsi), %edx
cmpl %edx, %eax
jge 0xd732
leaq 0x42443(%rip), %rax     # 0x4fb70
movb (%rcx,%rax), %al
jmp 0xd778
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 0xd77e
callq 0x4140
cltd
idivl 0x14(%rbx)
xorl %eax, %eax
cmpl (%rsp,%rax,4), %edx
jl 0xd76e
incq %rax
cmpq $0x4, %rax
jne 0xd75c
movb $0x6e, %al
jmp 0xd778
leaq 0x415ac(%rip), %rcx     # 0x4ed21
movb (%rax,%rcx), %al
addq $0x10, %rsp
popq %rbx
retq
leaq 0x430fa(%rip), %rdi     # 0x5087f
leaq 0x43109(%rip), %rsi     # 0x50895
leaq 0x43112(%rip), %rcx     # 0x508a5
movl $0x21, %edx
callq 0x4350
// File: /workspace/github_cpp_makefile_star2_O3/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 0xd80f
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0xf, %al
je 0xd7c5
movl 0x1b8(%rsi), %edx
addl 0x1bc(%rsi), %edx
cmpl %edx, %ecx
jl 0xd804
xorl %r14d, %r14d
leaq 0x42565(%rip), %r15     # 0x4fd34
xorl %r12d, %r12d
callq 0x4140
cltd
idivl 0x14(%rbx)
cmpl 0x4(%rbx,%r14,4), %edx
jge 0xd7eb
orb (%r14,%r15), %r12b
movl %r12d, %eax
jmp 0xd7ee
movl %r12d, %eax
incq %r14
cmpq $0x4, %r14
jne 0xd7d2
xorl %r14d, %r14d
movl $0x0, %r12d
cmpb $0xf, %al
je 0xd7d2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
movzbl %al, %eax
leaq 0x42357(%rip), %rcx     # 0x4fb70
movb (%rax,%rcx), %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xd842
movq %rdi, %rbx
cmpl $0xf, %ecx
je 0xd84f
movl 0x1b8(%rsi), %edx
addl 0x1bc(%rsi), %edx
cmpl %edx, %eax
jge 0xd84f
leaq 0x42327(%rip), %rax     # 0x4fb70
movb (%rcx,%rax), %bpl
jmp 0xd8a2
leaq 0x4231a(%rip), %rdx     # 0x4fb70
movb (%rcx,%rdx), %bpl
cvtsi2sd %eax, %xmm0
mulsd 0x1c0(%rsi), %xmm0
callq 0x40f0
cvttsd2si %xmm0, %eax
xorl %ecx, %ecx
leaq 0x414a9(%rip), %rdx     # 0x4ed21
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 0xd899
movb (%rcx,%rdx), %bpl
movl %edi, %esi
incq %rcx
cmpq $0x4, %rcx
jne 0xd87a
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xd922
movq %rdi, %rbx
cmpb $0xf, %bpl
je 0xd8d5
movl 0x1b8(%rsi), %edx
addl 0x1bc(%rsi), %edx
cmpl %edx, %ecx
jl 0xd922
cvtsi2sd %ecx, %xmm0
mulsd 0x1c0(%rsi), %xmm0
callq 0x4220
cvttsd2si %xmm0, %eax
xorl %ecx, %ecx
leaq 0x42441(%rip), %rdx     # 0x4fd34
xorl %esi, %esi
movl 0x4(%rbx,%rcx,4), %edi
cmpl %eax, %edi
jge 0xd901
movl %esi, %edi
jmp 0xd909
cmpl %esi, %edi
jle 0xd916
movb (%rcx,%rdx), %bpl
incq %rcx
movl %edi, %esi
cmpq $0x4, %rcx
jne 0xd8f5
jmp 0xd91e
jl 0xd8fd
orb (%rcx,%rdx), %bpl
jmp 0xd8fd
movsbq %bpl, %rax
leaq 0x42247(%rip), %rcx     # 0x4fb70
movb (%rax,%rcx), %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xe6d1
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 0xe68d
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 0xe668
jmp 0xe6cc
movw %cx, 0x8(%rbx)
cmpb $0x2e, (%r15)
jne 0xe6c6
incq %r15
cmpq %r14, %r15
jae 0xe6cc
xorl %ecx, %ecx
movzbl (%r15), %edx
testb $0x8, 0x1(%rax,%rdx,2)
je 0xe6c8
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 0xe6a1
jmp 0xe6cc
xorl %ecx, %ecx
movw %cx, 0xa(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xf136
movb $0x0, (%rax)
xorl %ecx, %ecx
movq %r15, %rax
movb (%r15), %dl
movzbl %dl, %esi
leal -0x62(%rsi), %edi
cmpl $0x2, %edi
jae 0xf14d
movl %edx, %ecx
jmp 0xf156
testl %esi, %esi
je 0xf15b
movb %dl, (%rax)
incq %rax
incq %r15
jmp 0xf13b
movb %cl, (%rax)
movw $0x0, 0x1(%rax)
testq %r14, %r14
je 0xf17d
movl 0x4(%r14), %ecx
testq %rcx, %rcx
je 0xf17d
leaq 0x419e8(%rip), %rdx     # 0x50b60
movb (%rcx,%rdx), %cl
movb %cl, (%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x477e9
movq %rax, %r15
testq %rax, %rax
je 0xf1ca
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xf216
testq %rax, %rax
je 0xf1ca
movq %rax, %r12
testq %r14, %r14
je 0xf1e3
movq 0x18(%r14), %r14
testq %r14, %r14
je 0xf1e3
movl 0x8(%r14), %esi
movq 0x10(%r14), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0xfa59
testl %eax, %eax
je 0xf1ab
cmpl $0x2, 0x5337f(%rip)     # 0x62550
jge 0xf1f2
testq %r15, %r15
je 0xf1e0
movq %r15, %rdi
callq 0x474b5
xorl %r12d, %r12d
movq %r12, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x52dcf(%rip), %rax     # 0x61fc8
movq (%rax), %rdi
leaq 0x41a6b(%rip), %rsi     # 0x50c6e
leaq 0x41a84(%rip), %rdx     # 0x50c8e
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4770
jmp 0xf1d3
// File: /workspace/github_cpp_makefile_star2_O3/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 0xfaaf
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 0xfaf6
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 0xfb2e
movl $0x10, %eax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0xfb3c
xorl %eax, %eax
cmpl $0x6, 0x44(%rdi)
jne 0xfb43
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 0x38980
jmp 0xfb43
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl (%rax), %esi
callq 0xfe2d
addq $0xd8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xfb7a
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 0xfb57
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
xorl %eax, %eax
testq %rsi, %rsi
je 0xfc2a
cmpb $0x0, (%rsi)
je 0xfc2a
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1f50, %rsp           # imm = 0x1F50
movq %rdi, %rbx
addq $0x18, %rbx
movl $0x1f40, %ebp           # imm = 0x1F40
movq %rsp, %r14
decq %rsi
movb 0x1(%rsi), %cl
incq %rsi
cmpb $0x2c, %cl
je 0xfbb0
xorl %eax, %eax
movq %rsi, %r12
testb %cl, %cl
je 0xfbd8
movzbl %cl, %ecx
cmpl $0x2c, %ecx
je 0xfbd8
movb 0x1(%r12), %cl
incq %r12
incl %eax
jmp 0xfbc0
cmpl %ebp, %eax
cmovgel %ebp, %eax
movslq %eax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x42b0
movb $0x0, (%rsp,%r15)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf5e2
testl %eax, %eax
jne 0xfc16
cmpb $0x1, (%r12)
sbbq $-0x1, %r12
cmpb $0x0, (%r12)
movq %r12, %rsi
jne 0xfbad
xorl %eax, %eax
jmp 0xfc1b
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_O3/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 0xfc69
cmpl $0x2c, %r12d
je 0xfc69
cmpq $0x6, %r15
ja 0xfc64
callq 0x4100
movq (%rax), %rax
movb (%rax,%r12,4), %al
movb %al, (%rsp,%r15)
incq %r15
incq %rbx
jmp 0xfc3c
cmpq $0x1, %r12
sbbq $-0x1, %rbx
movb $0x0, (%rsp,%r15)
movl $0x0, 0x8(%r14)
cmpl $0x6d6173, (%rsp)       # imm = 0x6D6173
je 0xfccd
movw $0xffff, %cx            # imm = 0xFFFF
movl $0x2, %eax
cmpl $0x6d6162, (%rsp)       # imm = 0x6D6162
je 0xfcdb
movl $0x6d617263, %edx       # imm = 0x6D617263
xorl (%rsp), %edx
movzbl 0x4(%rsp), %esi
orl %edx, %esi
je 0xfce5
cmpl $0x666376, (%rsp)       # imm = 0x666376
je 0xfcf4
cmpl $0x666362, (%rsp)       # imm = 0x666362
je 0xfcfe
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movsd 0x40c5b(%rip), %xmm0    # 0x50930
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0xfd06
movsd 0x40c5d(%rip), %xmm0    # 0x50940
jmp 0xfd06
movsd 0x40c63(%rip), %xmm0    # 0x50950
movl $0x3, %eax
jmp 0xfd06
movsd 0x40c64(%rip), %xmm0    # 0x50960
jmp 0xfcd5
movsd 0x40c6a(%rip), %xmm0    # 0x50970
movlps %xmm0, (%r14)
movl %eax, 0xc(%r14)
movw %cx, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xfb7b