LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x108a5
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x69536(%rip), %rax     # 0x79dd0
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
jmp 0x10977
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movzbl 0x6958b(%rip), %ecx     # 0x79e3e
cmpl %ecx, %eax
je 0x108f3
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x18(%rbp), %rcx
movl 0x1bc(%rcx), %ecx
movq -0x18(%rbp), %rdx
addl 0x1b8(%rdx), %ecx
cmpl %ecx, %eax
jge 0x108f1
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x694ea(%rip), %rax     # 0x79dd0
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
jmp 0x10977
jmp 0x108f3
movb 0x69545(%rip), %al      # 0x79e3e
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
movzbl 0x69537(%rip), %ecx     # 0x79e3e
cmpl %ecx, %eax
jne 0x10964
movb $0x0, -0x19(%rbp)
movl $0x0, -0x20(%rbp)
cmpl $0x4, -0x20(%rbp)
jge 0x10962
callq 0x4130
movq -0x10(%rbp), %rcx
cltd
idivl 0x14(%rcx)
movl %edx, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x20(%rbp), %rdx
cmpl 0x4(%rcx,%rdx,4), %eax
jge 0x10955
movslq -0x20(%rbp), %rcx
leaq 0x695ae(%rip), %rax     # 0x79ef6
movzbl (%rax,%rcx), %ecx
movzbl -0x19(%rbp), %eax
orl %ecx, %eax
movb %al, -0x19(%rbp)
jmp 0x10957
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x10916
jmp 0x108fc
movzbl -0x19(%rbp), %eax
movl %eax, %ecx
leaq 0x6945f(%rip), %rax     # 0x79dd0
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x109b5
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x69426(%rip), %rax     # 0x79dd0
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
jmp 0x10aa9
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movzbl 0x6947b(%rip), %ecx     # 0x79e3e
cmpl %ecx, %eax
je 0x10a03
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x18(%rbp), %rcx
movl 0x1bc(%rcx), %ecx
movq -0x18(%rbp), %rdx
addl 0x1b8(%rdx), %ecx
cmpl %ecx, %eax
jge 0x10a01
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x693da(%rip), %rax     # 0x79dd0
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
jmp 0x10aa9
jmp 0x10a03
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x693bd(%rip), %rax     # 0x79dd0
movb (%rax,%rcx), %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movsd 0x1c0(%rax), %xmm0
movq -0x10(%rbp), %rax
cvtsi2sdl 0x14(%rax), %xmm1
mulsd %xmm1, %xmm0
callq 0x40e0
cvttsd2si %xmm0, %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
cmpl $0x4, -0x28(%rbp)
jge 0x10aa3
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl 0x4(%rax,%rcx,4), %eax
cmpl -0x20(%rbp), %eax
jl 0x10a96
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl 0x4(%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
jle 0x10a94
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl 0x4(%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movslq -0x28(%rbp), %rcx
leaq 0x69462(%rip), %rax     # 0x79ef0
movb (%rax,%rcx), %al
movb %al, -0x19(%rbp)
jmp 0x10a96
jmp 0x10a98
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x10a4c
movb -0x19(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x10af5
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x692e6(%rip), %rax     # 0x79dd0
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
jmp 0x10c1e
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movzbl 0x6933b(%rip), %ecx     # 0x79e3e
cmpl %ecx, %eax
je 0x10b43
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x18(%rbp), %rcx
movl 0x1bc(%rcx), %ecx
movq -0x18(%rbp), %rdx
addl 0x1b8(%rdx), %ecx
cmpl %ecx, %eax
jge 0x10b41
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x6929a(%rip), %rax     # 0x79dd0
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
jmp 0x10c1e
jmp 0x10b43
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movsd 0x1c0(%rax), %xmm0
movq -0x10(%rbp), %rax
cvtsi2sdl 0x14(%rax), %xmm1
mulsd %xmm1, %xmm0
callq 0x4210
cvttsd2si %xmm0, %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
cmpl $0x4, -0x28(%rbp)
jge 0x10c0a
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl 0x4(%rax,%rcx,4), %eax
cmpl -0x20(%rbp), %eax
jl 0x10bfa
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl 0x4(%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
jle 0x10bcd
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl 0x4(%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movslq -0x28(%rbp), %rcx
leaq 0x69331(%rip), %rax     # 0x79ef6
movb (%rax,%rcx), %al
movb %al, -0x19(%rbp)
jmp 0x10bf8
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl 0x4(%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
jl 0x10bf6
movslq -0x28(%rbp), %rcx
leaq 0x6930d(%rip), %rax     # 0x79ef6
movzbl (%rax,%rcx), %ecx
movsbl -0x19(%rbp), %eax
orl %ecx, %eax
movb %al, -0x19(%rbp)
jmp 0x10bf8
jmp 0x10bfa
jmp 0x10bfc
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x10b7f
movsbl -0x19(%rbp), %eax
movslq %eax, %rcx
leaq 0x691b8(%rip), %rax     # 0x79dd0
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hts.c
// Function: decompress_peek
static size_t decompress_peek(hFILE *fp, unsigned char *dest, size_t destsize)
{
    // Typically at most a couple of hundred bytes of input are required
    // to get a few bytes of output from inflate(), so hopefully this buffer
    // size suffices in general.
    unsigned char buffer[512];
    z_stream zs;
    ssize_t npeek = hpeek(fp, buffer, sizeof buffer);

    if (npeek < 0) return 0;

    zs.zalloc = NULL;
    zs.zfree = NULL;
    zs.next_in = buffer;
    zs.avail_in = npeek;
    zs.next_out = dest;
    zs.avail_out = destsize;
    if (inflateInit2(&zs, 31) != Z_OK) return 0;

    while (zs.total_out < destsize)
        if (inflate(&zs, Z_SYNC_FLUSH) != Z_OK) break;

    destsize = zs.total_out;
    inflateEnd(&zs);

    return destsize;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2a0, %rsp            # imm = 0x2A0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x220(%rbp), %rsi
movl $0x200, %edx            # imm = 0x200
callq 0x6a630
movq %rax, -0x298(%rbp)
cmpq $0x0, -0x298(%rbp)
jge 0x122ca
movq $0x0, -0x8(%rbp)
jmp 0x12384
movq $0x0, -0x250(%rbp)
movq $0x0, -0x248(%rbp)
leaq -0x220(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x298(%rbp), %rax
movl %eax, -0x288(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x20(%rbp), %rax
movl %eax, -0x270(%rbp)
leaq -0x290(%rbp), %rdi
movl $0x1f, %esi
leaq 0x68e87(%rip), %rdx     # 0x7b1aa
movl $0x70, %ecx
callq 0x44b0
cmpl $0x0, %eax
je 0x1233c
movq $0x0, -0x8(%rbp)
jmp 0x12384
jmp 0x1233e
movq -0x268(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x12365
leaq -0x290(%rbp), %rdi
movl $0x2, %esi
callq 0x4450
cmpl $0x0, %eax
je 0x12363
jmp 0x12365
jmp 0x1233e
movq -0x268(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x290(%rbp), %rdi
callq 0x45d0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movw $0xffff, 0xa(%rax)      # imm = 0xFFFF
movq -0x8(%rbp), %rax
movw $0xffff, 0x8(%rax)      # imm = 0xFFFF
movw $0x0, -0x2a(%rbp)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x2b(%rbp)
jae 0x12402
movq -0x20(%rbp), %rax
movsbl (%rax), %edi
callq 0x18ac0
cmpl $0x0, %eax
setne %al
movb %al, -0x2b(%rbp)
movb -0x2b(%rbp), %al
testb $0x1, %al
jne 0x1240b
jmp 0x12430
movswl -0x2a(%rbp), %eax
imull $0xa, %eax, %eax
movq -0x20(%rbp), %rcx
movsbl (%rcx), %ecx
addl %ecx, %eax
subl $0x30, %eax
movw %ax, -0x2a(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x123de
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x124de
movw -0x2a(%rbp), %cx
movq -0x8(%rbp), %rax
movw %cx, 0x8(%rax)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x124d2
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movw $0x0, -0x2a(%rbp)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x2c(%rbp)
jae 0x1248c
movq -0x20(%rbp), %rax
movsbl (%rax), %edi
callq 0x18ac0
cmpl $0x0, %eax
setne %al
movb %al, -0x2c(%rbp)
movb -0x2c(%rbp), %al
testb $0x1, %al
jne 0x12495
jmp 0x124ba
movswl -0x2a(%rbp), %eax
imull $0xa, %eax, %eax
movq -0x20(%rbp), %rcx
movsbl (%rcx), %ecx
addl %ecx, %eax
subl $0x30, %eax
movw %ax, -0x2a(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x12468
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x124d0
movw -0x2a(%rbp), %cx
movq -0x8(%rbp), %rax
movw %cx, 0xa(%rax)
jmp 0x124dc
movq -0x8(%rbp), %rax
movw $0x0, 0xa(%rax)
jmp 0x124de
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x1285a
xorl %eax, %eax
subl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x1285c
movl -0x2c(%rbp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
addl $0x30, %edx
movb %dl, %cl
movl -0x28(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
cltq
movb %cl, -0x20(%rbp,%rax)
movl -0x2c(%rbp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
ja 0x1285c
cmpl $0x0, -0x8(%rbp)
jge 0x128ab
movl -0x28(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x28(%rbp)
cltq
movb $0x2d, -0x20(%rbp,%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movslq -0x28(%rbp), %rax
addq %rax, %rsi
addq $0x2, %rsi
callq 0x19930
cmpl $0x0, %eax
jge 0x128d4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1292c
movl -0x28(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x12912
movslq -0x24(%rbp), %rax
movb -0x20(%rbp,%rax), %dl
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x128dd
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movb $0x0, (%rax,%rcx)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/./htslib/kstring.h
// Function: kputc
static inline int kputc(int c, kstring_t *s)
{
	if (ks_resize(s, s->l + 2) < 0)
		return EOF;
	s->s[s->l++] = c;
	s->s[s->l] = 0;
	return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
addq $0x2, %rsi
callq 0x19930
cmpl $0x0, %eax
jge 0x12971
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x129ab
movl -0x8(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movb $0x0, (%rax,%rcx)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/./htslib/kstring.h
// Function: ks_release
static inline char *ks_release(kstring_t *s)
{
	char *ss = s->s;
	s->l = s->m = 0;
	s->s = NULL;
	return ss;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1324b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movb $0x0, %al
callq 0x13970
cmpl $0x0, %eax
je 0x13237
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x13252
jmp 0x13239
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x13208
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
testb %al, %al
je 0x139ab
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x65, -0x14(%rbp)
jne 0x13a75
leaq -0x30(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xf4(%rbp)
cmpl $0x28, %eax
ja 0x13a37
movq -0x100(%rbp), %rcx
movl -0xf4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x108(%rbp)
jmp 0x13a54
movq -0x100(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
leaq -0x30(%rbp), %rax
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x143a0
movl %eax, -0x4(%rbp)
jmp 0x13acd
movq -0x10(%rbp), %rax
cmpl $0x6, 0x44(%rax)
je 0x13a88
movl $0x0, -0x4(%rbp)
jmp 0x13acd
leaq -0x30(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movl -0x14(%rbp), %esi
leaq -0x30(%rbp), %rdx
callq 0x52ac0
movl %eax, -0x18(%rbp)
leaq -0x30(%rbp), %rax
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x13b22
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x46a0
movq -0x10(%rbp), %rdi
callq 0x46a0
jmp 0x13af4
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x1f90, %rsp           # imm = 0x1F90
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x1f71(%rbp)
je 0x13b65
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x1f71(%rbp)
movb -0x1f71(%rbp), %al
testb $0x1, %al
jne 0x13b74
jmp 0x13cd3
jmp 0x13b76
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x1f72(%rbp)
je 0x13b9d
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
sete %al
movb %al, -0x1f72(%rbp)
movb -0x1f72(%rbp), %al
testb $0x1, %al
jne 0x13ba9
jmp 0x13bb7
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x13b76
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x1f73(%rbp)
je 0x13be6
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
setne %al
movb %al, -0x1f73(%rbp)
movb -0x1f73(%rbp), %al
testb $0x1, %al
jne 0x13bf2
jmp 0x13c02
jmp 0x13bf4
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x13bbf
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x24(%rbp)
leaq -0x1f70(%rbp), %rax
movq %rax, -0x1f88(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x1f80(%rbp)
cmpl $0x1f40, -0x24(%rbp)    # imm = 0x1F40
jge 0x13c3d
movl -0x24(%rbp), %eax
movl %eax, -0x1f8c(%rbp)
jmp 0x13c4a
movl $0x1f40, %eax           # imm = 0x1F40
movl %eax, -0x1f8c(%rbp)
jmp 0x13c4a
movq -0x1f80(%rbp), %rsi
movq -0x1f88(%rbp), %rdi
movl -0x1f8c(%rbp), %eax
movslq %eax, %rdx
callq 0x42c0
cmpl $0x1f40, -0x24(%rbp)    # imm = 0x1F40
jge 0x13c7a
movl -0x24(%rbp), %eax
movl %eax, -0x1f90(%rbp)
jmp 0x13c87
movl $0x1f40, %eax           # imm = 0x1F40
movl %eax, -0x1f90(%rbp)
jmp 0x13c87
movl -0x1f90(%rbp), %eax
cltq
movb $0x0, -0x1f70(%rbp,%rax)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
leaq -0x1f70(%rbp), %rsi
callq 0x13290
cmpl $0x0, %eax
je 0x13cb9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x13cda
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x13cce
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x13b43
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1f90, %rsp           # imm = 0x1F90
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hts.c
// Function: scan_keyword
static const char *
scan_keyword(const char *str, char delim, char *buf, size_t buflen)
{
    size_t i = 0;
    while (*str && *str != delim) {
        if (i < buflen-1) buf[i++] = tolower_c(*str);
        str++;
    }

    buf[i] = '\0';
    return *str? str+1 : str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x29(%rbp)
je 0x13ef6
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x13eff
jmp 0x13f42
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x13f34
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x19a20
movb %al, %dl
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x28(%rbp)
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x13ed2
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x13f68
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x13f70
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hts.c
// Function: format_category
static enum htsFormatCategory format_category(enum htsExactFormat fmt)
{
    switch (fmt) {
    case bam:
    case sam:
    case cram:
        return sequence_data;

    case vcf:
    case bcf:
        return variant_data;

    case bai:
    case crai:
    case csi:
    case gzi:
    case tbi:
        return index_file;

    case bed:
        return region_list;

    case unknown_format:
    case binary_format:
    case text_format:
    case format_maximum:
        break;
    }

    return unknown_category;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
subl $0x3, %eax
jb 0x14037
jmp 0x13fb8
movl -0xc(%rbp), %eax
addl $-0x3, %eax
subl $0x2, %eax
jb 0x14013
jmp 0x13fc5
movl -0xc(%rbp), %eax
subl $0x5, %eax
je 0x14025
jmp 0x13fcf
movl -0xc(%rbp), %eax
subl $0x6, %eax
je 0x14013
jmp 0x13fd9
movl -0xc(%rbp), %eax
subl $0x7, %eax
je 0x14025
jmp 0x13fe3
movl -0xc(%rbp), %eax
addl $-0x8, %eax
subl $0x2, %eax
jb 0x1401c
jmp 0x13ff0
movl -0xc(%rbp), %eax
addl $-0xa, %eax
subl $0x3, %eax
jb 0x14025
jmp 0x13ffd
movl -0xc(%rbp), %eax
subl $0xd, %eax
je 0x1402e
jmp 0x14007
movl -0xc(%rbp), %eax
subl $0x7fff, %eax           # imm = 0x7FFF
je 0x14037
jmp 0x14039
movl $0x1, -0x4(%rbp)
jmp 0x14040
movl $0x2, -0x4(%rbp)
jmp 0x14040
movl $0x3, -0x4(%rbp)
jmp 0x14040
movl $0x4, -0x4(%rbp)
jmp 0x14040
jmp 0x14039
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_process_opts
static int hts_process_opts(htsFile *fp, const char *opts) {
    htsFormat fmt;

    fmt.specific = NULL;
    if (hts_parse_opt_list(&fmt, opts) != 0)
        return -1;

    if (hts_opt_apply(fp, fmt.specific) != 0) {
        hts_opt_free(fmt.specific);
        return -1;
    }

    hts_opt_free(fmt.specific);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x13b30
cmpl $0x0, %eax
je 0x14083
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x140b7
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x131f0
cmpl $0x0, %eax
je 0x140a7
movq -0x20(%rbp), %rdi
callq 0x13ae0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x140b7
movq -0x20(%rbp), %rdi
callq 0x13ae0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_format_file_extension
const char *hts_format_file_extension(const htsFormat *format) {
    if (!format)
        return "?";

    switch (format->format) {
    case sam:  return "sam";
    case bam:  return "bam";
    case bai:  return "bai";
    case cram: return "cram";
    case crai: return "crai";
    case vcf:  return "vcf";
    case bcf:  return "bcf";
    case csi:  return "csi";
    case gzi:  return "gzi";
    case tbi:  return "tbi";
    case bed:  return "bed";
    default:   return "?";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x142bf
leaq 0x66d69(%rip), %rax     # 0x7b01f
movq %rax, -0x8(%rbp)
jmp 0x1438c
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
addl $-0x3, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xa, %eax
ja 0x14381
movq -0x18(%rbp), %rax
leaq 0x66855(%rip), %rcx     # 0x7ab38
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x66ccb(%rip), %rax     # 0x7afbe
movq %rax, -0x8(%rbp)
jmp 0x1438c
leaq 0x66cbf(%rip), %rax     # 0x7afc2
movq %rax, -0x8(%rbp)
jmp 0x1438c
leaq 0x66dd9(%rip), %rax     # 0x7b0ec
movq %rax, -0x8(%rbp)
jmp 0x1438c
leaq 0x66ca6(%rip), %rax     # 0x7afc6
movq %rax, -0x8(%rbp)
jmp 0x1438c
leaq 0x6851d(%rip), %rax     # 0x7c84a
movq %rax, -0x8(%rbp)
jmp 0x1438c
leaq 0x66cf4(%rip), %rax     # 0x7b02e
movq %rax, -0x8(%rbp)
jmp 0x1438c
leaq 0x66cec(%rip), %rax     # 0x7b033
movq %rax, -0x8(%rbp)
jmp 0x1438c
leaq 0x66d9d(%rip), %rax     # 0x7b0f1
movq %rax, -0x8(%rbp)
jmp 0x1438c
leaq 0x68e6f(%rip), %rax     # 0x7d1d0
movq %rax, -0x8(%rbp)
jmp 0x1438c
leaq 0x66d88(%rip), %rax     # 0x7b0f6
movq %rax, -0x8(%rbp)
jmp 0x1438c
leaq 0x66ca6(%rip), %rax     # 0x7b021
movq %rax, -0x8(%rbp)
jmp 0x1438c
leaq 0x66c97(%rip), %rax     # 0x7b01f
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x4c(%rax)
jne 0x143d7
movq -0x10(%rbp), %rdi
callq 0x14410
movq %rax, %rdi
movl -0x14(%rbp), %esi
movl $0x100, %edx            # imm = 0x100
callq 0x64df0
movl %eax, -0x4(%rbp)
jmp 0x14400
movq -0x10(%rbp), %rax
cmpl $0x6, 0x44(%rax)
jne 0x143f9
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
movl $0xe, %esi
movb $0x0, %al
callq 0x13970
movl %eax, -0x4(%rbp)
jmp 0x14400
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x46a0
cmpq $0x0, -0x18(%rbp)
je 0x1449e
movq -0x18(%rbp), %rdi
callq 0x4aa0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x1449c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x144e7
jmp 0x144aa
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
cmpl $0x6, 0x44(%rax)
jne 0x144e0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
movl $0x9, %esi
movb $0x0, %al
callq 0x52a20
cmpl $0x0, %eax
je 0x144de
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x144e7
jmp 0x144e0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1452a
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x66c20
movl %eax, -0x4(%rbp)
jmp 0x14586
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x8(%rax), %ecx
andl $-0x4, %ecx
orl $0x0, %ecx
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x66c20
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4230
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
addq $-0x7, %rsi
leaq 0x66467(%rip), %rdi     # 0x7b025
callq 0x4620
cmpl $0x0, %eax
jne 0x14bd4
movl $0x3, -0x4(%rbp)
jmp 0x14cfd
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
addq $-0x4, %rsi
leaq 0x66443(%rip), %rdi     # 0x7b02d
callq 0x4620
cmpl $0x0, %eax
jne 0x14c00
movl $0x2, -0x4(%rbp)
jmp 0x14cfd
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
addq $-0x4, %rsi
leaq 0x6641c(%rip), %rdi     # 0x7b032
callq 0x4620
cmpl $0x0, %eax
jne 0x14c2c
movl $0x5, -0x4(%rbp)
jmp 0x14cfd
movq -0x10(%rbp), %rsi
leaq 0x63646(%rip), %rdi     # 0x7827d
callq 0x4810
cmpl $0x0, %eax
jne 0x14c4d
movl $0x8, -0x4(%rbp)
jmp 0x14cfd
movq -0x10(%rbp), %rdi
leaq 0x66d97(%rip), %rsi     # 0x7b9ef
callq 0x6b3f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x14c74
movl $0x0, -0x4(%rbp)
jmp 0x14cfd
movq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x11cf0
cmpl $0x0, %eax
jge 0x14c98
movq -0x20(%rbp), %rdi
callq 0x6ae00
movl $0x0, -0x4(%rbp)
jmp 0x14cfd
movq -0x20(%rbp), %rdi
callq 0x6ad60
cmpl $0x0, %eax
jge 0x14caf
movl $0x0, -0x4(%rbp)
jmp 0x14cfd
movl -0x3c(%rbp), %eax
movl %eax, -0x44(%rbp)
subl $0x8, %eax
je 0x14cc6
jmp 0x14cbc
movl -0x44(%rbp), %eax
subl $0x9, %eax
je 0x14cde
jmp 0x14cf6
movl -0x34(%rbp), %edx
movl $0x3, %eax
movl $0x2, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x14cfd
movl -0x34(%rbp), %edx
movl $0x5, %eax
movl $0x4, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x14cfd
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x4c(%rax)
jne 0x14d3c
movq -0x10(%rbp), %rdi
callq 0x14410
movq %rax, %rdi
callq 0x65d60
movl %eax, -0x4(%rbp)
jmp 0x14d5f
movq -0x10(%rbp), %rax
cmpl $0x6, 0x44(%rax)
jne 0x14d58
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x536e0
movl %eax, -0x4(%rbp)
jmp 0x14d5f
movl $0x3, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_idx_init
hts_idx_t *hts_idx_init(int n, int fmt, uint64_t offset0, int min_shift, int n_lvls)
{
    hts_idx_t *idx;
    idx = (hts_idx_t*)calloc(1, sizeof(hts_idx_t));
    if (idx == NULL) return NULL;
    idx->fmt = fmt;
    idx->min_shift = min_shift;
    idx->n_lvls = n_lvls;
    idx->n_bins = ((1<<(3 * n_lvls + 3)) - 1) / 7;
    idx->z.save_bin = idx->z.save_tid = idx->z.last_tid = idx->z.last_bin = 0xffffffffu;
    idx->z.save_off = idx->z.last_off = idx->z.off_beg = idx->z.off_end = offset0;
    idx->z.last_coor = 0xffffffffu;
    if (n) {
        idx->n = idx->m = n;
        idx->bidx = (bidx_t**)calloc(n, sizeof(bidx_t*));
        if (idx->bidx == NULL) { free(idx); return NULL; }
        idx->lidx = (lidx_t*) calloc(n, sizeof(lidx_t));
        if (idx->lidx == NULL) { free(idx->bidx); free(idx); return NULL; }
    }
    return idx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl $0x1, %edi
movl $0x88, %esi
callq 0x4370
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x15fe0
movq $0x0, -0x8(%rbp)
jmp 0x1611a
movl -0x10(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
imull $0x3, -0x20(%rbp), %ecx
addl $0x3, %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl $0x7, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x40(%rax) # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x4c(%rax) # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x50(%rax) # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x44(%rax) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x28(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x28(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x28(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x48(%rax) # imm = 0xFFFFFFFF
cmpl $0x0, -0xc(%rbp)
je 0x16112
movl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x28(%rbp), %rax
movl %ecx, 0x14(%rax)
movslq -0xc(%rbp), %rdi
movl $0x8, %esi
callq 0x4370
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x160cc
movq -0x28(%rbp), %rdi
callq 0x46a0
movq $0x0, -0x8(%rbp)
jmp 0x1611a
movslq -0xc(%rbp), %rdi
movl $0x10, %esi
callq 0x4370
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x16110
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x46a0
movq -0x28(%rbp), %rdi
callq 0x46a0
movq $0x0, -0x8(%rbp)
jmp 0x1611a
jmp 0x16112
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_idx_finish
void hts_idx_finish(hts_idx_t *idx, uint64_t final_offset)
{
    int i;
    if (idx == NULL || idx->z.finished) return; // do not run this function on an empty index or multiple times
    if (idx->z.save_tid >= 0) {
        insert_to_b(idx->bidx[idx->z.save_tid], idx->z.save_bin, idx->z.save_off, final_offset);
        insert_to_b(idx->bidx[idx->z.save_tid], META_BIN(idx), idx->z.off_beg, final_offset);
        insert_to_b(idx->bidx[idx->z.save_tid], META_BIN(idx), idx->z.n_mapped, idx->z.n_unmapped);
    }
    for (i = 0; i < idx->n; ++i) {
        update_loff(idx, i, (idx->fmt == HTS_FMT_CSI));
        compress_binning(idx, i);
    }
    idx->z.finished = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x16151
movq -0x8(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x16156
jmp 0x16245
movq -0x8(%rbp), %rax
cmpl $0x0, 0x50(%rax)
jl 0x161f5
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x50(%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x8(%rbp), %rax
movl 0x44(%rax), %esi
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdx
movq -0x10(%rbp), %rcx
callq 0x16250
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x50(%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %esi
addl $0x1, %esi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdx
movq -0x10(%rbp), %rcx
callq 0x16250
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x50(%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %esi
addl $0x1, %esi
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rcx
callq 0x16250
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x1623a
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
sete %al
andb $0x1, %al
movzbl %al, %edx
callq 0x16350
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x165c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x161fc
movq -0x8(%rbp), %rax
movl $0x1, 0x54(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hts.c
// Function: insert_to_b
static inline void insert_to_b(bidx_t *b, int bin, uint64_t beg, uint64_t end)
{
    khint_t k;
    bins_t *l;
    int absent;
    k = kh_put(bin, b, bin, &absent);
    l = &kh_value(b, k);
    if (absent) {
        l->m = 1; l->n = 0;
        l->list = (hts_pair64_t*)calloc(l->m, sizeof(hts_pair64_t));
    }
    if (l->n == l->m) {
        l->m <<= 1;
        l->list = (hts_pair64_t*)realloc(l->list, l->m * sizeof(hts_pair64_t));
    }
    l->list[l->n].u = beg;
    l->list[l->n++].v = end;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x34(%rbp), %rdx
callq 0x19a40
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x162c7
movq -0x30(%rbp), %rax
movl $0x1, (%rax)
movq -0x30(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x30(%rbp), %rax
movslq (%rax), %rdi
movl $0x10, %esi
callq 0x4370
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x16303
movq -0x30(%rbp), %rax
movl (%rax), %ecx
shll %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movslq (%rax), %rsi
shlq $0x4, %rsi
callq 0x4990
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rdx
movslq 0x4(%rdx), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rsi
movl 0x4(%rsi), %edx
movl %edx, %edi
addl $0x1, %edi
movl %edi, 0x4(%rsi)
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
addq $0x40, %rsp
popq %rbp
retq
// File: karel-brinda[P]ococo/ext/htslib/./htslib/hts.h
// Function: hts_reg2bin
static inline int hts_reg2bin(int64_t beg, int64_t end, int min_shift, int n_lvls)
{
    int l, s = min_shift, t = ((1<<((n_lvls<<1) + n_lvls)) - 1) / 7;
    for (--end, l = n_lvls; l > 0; --l, s += 3, t -= 1<<((l<<1)+l))
        if (beg>>s == end>>s) return t + (beg>>s);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x20(%rbp), %ecx
shll %ecx
addl -0x20(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl $0x7, %ecx
cltd
idivl %ecx
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x171c1
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
sarq %cl, %rax
movq -0x18(%rbp), %rdx
movl -0x28(%rbp), %ecx
sarq %cl, %rdx
movq %rdx, %rcx
cmpq %rcx, %rax
jne 0x17192
movslq -0x2c(%rbp), %rax
movq -0x10(%rbp), %rdx
movl -0x28(%rbp), %ecx
sarq %cl, %rdx
movq %rdx, %rcx
addq %rcx, %rax
movl %eax, -0x4(%rbp)
jmp 0x171c8
jmp 0x17194
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %ecx
shll %ecx
addl -0x24(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
jmp 0x17157
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_idx_destroy
void hts_idx_destroy(hts_idx_t *idx)
{
    khint_t k;
    int i;
    if (idx == 0) return;

    // For HTS_FMT_CRAI, idx actually points to a different type -- see sam.c
    if (idx->fmt == HTS_FMT_CRAI) {
        hts_cram_idx_t *cidx = (hts_cram_idx_t *) idx;
        cram_index_free(cidx->cram);
        free(cidx);
        return;
    }

    for (i = 0; i < idx->m; ++i) {
        bidx_t *bidx = idx->bidx[i];
        free(idx->lidx[i].offset);
        if (bidx == 0) continue;
        for (k = kh_begin(bidx); k != kh_end(bidx); ++k)
            if (kh_exist(bidx, k))
                free(kh_value(bidx, k).list);
        kh_destroy(bin, bidx);
    }
    free(idx->bidx); free(idx->lidx); free(idx->meta);
    free(idx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x171e8
jmp 0x1730a
movq -0x8(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x17214
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x423f0
movq -0x18(%rbp), %rdi
callq 0x46a0
jmp 0x1730a
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jge 0x172da
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x46a0
cmpq $0x0, -0x20(%rbp)
jne 0x17264
jmp 0x172cc
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
je 0x172c3
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0xc(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x172b6
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x46a0
jmp 0x172b8
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1726b
movq -0x20(%rbp), %rdi
callq 0x17310
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x1721b
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x46a0
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x46a0
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x46a0
movq -0x8(%rbp), %rdi
callq 0x46a0
addq $0x20, %rsp
popq %rbp
retq
// File: karel-brinda[P]ococo/ext/htslib/hts.c
// Function: hts_idx_save
int hts_idx_save(const hts_idx_t *idx, const char *fn, int fmt)
{
    int ret, save;
    char *fnidx = (char*)calloc(1, strlen(fn) + 5);
    if (fnidx == NULL) return -1;

    strcpy(fnidx, fn);
    switch (fmt) {
    case HTS_FMT_BAI: strcat(fnidx, ".bai"); break;
    case HTS_FMT_CSI: strcat(fnidx, ".csi"); break;
    case HTS_FMT_TBI: strcat(fnidx, ".tbi"); break;
    default: abort();
    }

    ret = hts_idx_save_as(idx, fn, fnidx, fmt);
    save = errno;
    free(fnidx);
    errno = save;
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4230
movq %rax, %rsi
addq $0x5, %rsi
movl $0x1, %edi
callq 0x4370
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x173a4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1744c
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4530
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
testl %eax, %eax
je 0x173e3
jmp 0x173bd
movl -0x34(%rbp), %eax
subl $0x1, %eax
je 0x173d1
jmp 0x173c7
movl -0x34(%rbp), %eax
subl $0x2, %eax
je 0x173f5
jmp 0x17407
movq -0x30(%rbp), %rdi
leaq 0x63d0f(%rip), %rsi     # 0x7b0eb
callq 0x4a60
jmp 0x1740c
movq -0x30(%rbp), %rdi
leaq 0x63d02(%rip), %rsi     # 0x7b0f0
callq 0x4a60
jmp 0x1740c
movq -0x30(%rbp), %rdi
leaq 0x63cf5(%rip), %rsi     # 0x7b0f5
callq 0x4a60
jmp 0x1740c
callq 0x42e0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x17460
movl %eax, -0x20(%rbp)
callq 0x4070
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rdi
callq 0x46a0
movl -0x24(%rbp), %eax
movl %eax, -0x38(%rbp)
callq 0x4070
movl -0x38(%rbp), %ecx
movl %ecx, (%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)