LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: serialize_float_array
static inline int serialize_float_array(kstring_t *s, size_t n, const float *a) {
    uint8_t *p;
    size_t i;
    size_t bytes = n * sizeof(float);

    if (bytes / sizeof(float) != n) return -1;
    if (ks_resize(s, s->l + bytes) < 0) return -1;

    p = (uint8_t *) s->s + s->l;
    for (i = 0; i < n; i++) {
        float_to_le(a[i], p);
        p += sizeof(float);
    }
    s->l += bytes;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
shlq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
shrq $0x2, %rax
cmpq -0x18(%rbp), %rax
je 0x44d1a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x44da6
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
addq -0x38(%rbp), %rsi
callq 0x44ba0
cmpl $0x0, %eax
jge 0x44d3c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x44da6
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
addq (%rcx), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x44d91
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x28(%rbp), %rdi
callq 0x438c0
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x44d57
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/./htslib/vcf.h
// Function: bcf_dec_size
static inline int32_t bcf_dec_size(const uint8_t *p, uint8_t **q, int *type)
{
    *type = *p & 0xf;
    if (*p>>4 != 15) {
        *q = (uint8_t*)p + 1;
        return *p>>4;
    } else return bcf_dec_typed_int1(p + 1, q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %ecx
andl $0xf, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
sarl $0x4, %eax
cmpl $0xf, %eax
je 0x45521
movq -0x10(%rbp), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
sarl $0x4, %eax
movl %eax, -0x4(%rbp)
jmp 0x45535
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
movq -0x18(%rbp), %rsi
callq 0x49e70
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: fix_chromosome
static khint_t fix_chromosome(const bcf_hdr_t *h, vdict_t *d, const char *p) {
    // Simple error recovery for chromosomes not defined in the header. It will not help when VCF header has
    // been already printed, but will enable tools like vcfcheck to proceed.

    kstring_t tmp = {0,0,0};
    khint_t k;
    int l;
    if (ksprintf(&tmp, "##contig=<ID=%s>", p) < 0)
        return kh_end(d);
    bcf_hrec_t *hrec = bcf_hdr_parse_line(h,tmp.s,&l);
    free(tmp.s);
    int res = hrec ? bcf_hdr_add_hrec((bcf_hdr_t*)h, hrec) : -1;
    if (res < 0) bcf_hrec_destroy(hrec);
    if (res > 0) res = bcf_hdr_sync((bcf_hdr_t*)h);
    k = kh_get(vdict, d, p);

    return k;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x4240
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rdi
leaq 0xc2d2e(%rip), %rsi     # 0x108a01
movb $0x0, %al
callq 0xd62e0
cmpl $0x0, %eax
jge 0x45cea
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x45d68
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x3bbb0
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rdi
callq 0x45a0
cmpq $0x0, -0x48(%rbp)
je 0x45d21
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x3ce30
movl %eax, -0x50(%rbp)
jmp 0x45d2b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x50(%rbp)
jmp 0x45d2b
movl -0x50(%rbp), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jge 0x45d40
movq -0x48(%rbp), %rdi
callq 0x3b040
cmpl $0x0, -0x4c(%rbp)
jle 0x45d52
movq -0x10(%rbp), %rdi
callq 0x3ae50
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3e520
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: vcf_open_mode
int vcf_open_mode(char *mode, const char *fn, const char *format)
{
    if (format == NULL) {
        // Try to pick a format based on the filename extension
        char extension[HTS_MAX_EXT_LEN];
        if (find_file_extension(fn, extension) < 0) return -1;
        return vcf_open_mode(mode, fn, extension);
    }
    else if (strcasecmp(format, "bcf") == 0) strcpy(mode, "b");
    else if (strcasecmp(format, "vcf") == 0) strcpy(mode, "");
    else if (strcasecmp(format, "vcf.gz") == 0 || strcasecmp(format, "vcf.bgz") == 0) strcpy(mode, "z");
    else return -1;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x47e42
movq -0x18(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x47ef0
cmpl $0x0, %eax
jge 0x47e29
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47ee2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x29(%rbp), %rdx
callq 0x47df0
movl %eax, -0x4(%rbp)
jmp 0x47ee2
movq -0x20(%rbp), %rdi
leaq 0xbc2bd(%rip), %rsi     # 0x10410a
callq 0x4500
cmpl $0x0, %eax
jne 0x47e69
movq -0x10(%rbp), %rdi
leaq 0xc3484(%rip), %rsi     # 0x10b2e6
callq 0x4450
jmp 0x47ed9
movq -0x20(%rbp), %rdi
leaq 0xbc291(%rip), %rsi     # 0x104105
callq 0x4500
cmpl $0x0, %eax
jne 0x47e90
movq -0x10(%rbp), %rdi
leaq 0xbbba1(%rip), %rsi     # 0x103a2a
callq 0x4450
jmp 0x47ed7
movq -0x20(%rbp), %rdi
leaq 0xbc262(%rip), %rsi     # 0x1040fd
callq 0x4500
cmpl $0x0, %eax
je 0x47eba
movq -0x20(%rbp), %rdi
leaq 0xbff63(%rip), %rsi     # 0x107e13
callq 0x4500
cmpl $0x0, %eax
jne 0x47ecc
movq -0x10(%rbp), %rdi
leaq 0xbde2d(%rip), %rsi     # 0x105cf2
callq 0x4450
jmp 0x47ed5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47ee2
jmp 0x47ed7
jmp 0x47ed9
jmp 0x47edb
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/./htslib/vcf.h
// Function: bcf_dec_int1
static inline int64_t bcf_dec_int1(const uint8_t *p, int type, uint8_t **q)
{
    if (type == BCF_BT_INT8) {
        *q = (uint8_t*)p + 1;
        return le_to_i8(p);
    } else if (type == BCF_BT_INT16) {
        *q = (uint8_t*)p + 2;
        return le_to_i16(p);
    } else if (type == BCF_BT_INT32) {
        *q = (uint8_t*)p + 4;
        return le_to_i32(p);
    } else if (type == BCF_BT_INT64) {
        *q = (uint8_t*)p + 8;
        return le_to_i64(p);
    } else { // Invalid type.
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpl $0x1, -0x14(%rbp)
jne 0x4887b
movq -0x10(%rbp), %rcx
addq $0x1, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x45340
movsbq %al, %rax
movq %rax, -0x8(%rbp)
jmp 0x488f5
cmpl $0x2, -0x14(%rbp)
jne 0x488a3
movq -0x10(%rbp), %rcx
addq $0x2, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x45390
movswq %ax, %rax
movq %rax, -0x8(%rbp)
jmp 0x488f5
cmpl $0x3, -0x14(%rbp)
jne 0x488c9
movq -0x10(%rbp), %rcx
addq $0x4, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x453e0
cltq
movq %rax, -0x8(%rbp)
jmp 0x488f5
cmpl $0x4, -0x14(%rbp)
jne 0x488ed
movq -0x10(%rbp), %rcx
addq $0x8, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x54e90
movq %rax, -0x8(%rbp)
jmp 0x488f5
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: vcf_write_line
int vcf_write_line(htsFile *fp, kstring_t *line)
{
    int ret;
    if ( line->s[line->l-1]!='\n' ) kputc('\n',line);
    if ( fp->format.compression!=no_compression )
        ret = bgzf_write(fp->fp.bgzf, line->s, line->l);
    else
        ret = hwrite(fp->fp.hfile, line->s, line->l);
    return ret==line->l ? 0 : -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x4a6fa
movq -0x10(%rbp), %rsi
movl $0xa, %edi
callq 0x40b10
movq -0x8(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x4a725
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
callq 0xdb250
movl %eax, -0x14(%rbp)
jmp 0x4a744
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
callq 0x441b0
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpq %rsi, %rdx
cmovel %ecx, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_index
hts_idx_t *bcf_index(htsFile *fp, int min_shift)
{
    int n_lvls;
    bcf1_t *b = NULL;
    hts_idx_t *idx = NULL;
    bcf_hdr_t *h;
    int r;
    h = bcf_hdr_read(fp);
    if ( !h ) return NULL;
    int nids = 0;
    n_lvls = idx_calc_n_lvls_ids(h, min_shift, 0, &nids);
    idx = hts_idx_init(nids, HTS_FMT_CSI, bgzf_tell(fp->fp.bgzf), min_shift, n_lvls);
    if (!idx) goto fail;
    b = bcf_init1();
    if (!b) goto fail;
    while ((r = bcf_read1(fp,h, b)) >= 0) {
        int ret;
        ret = hts_idx_push(idx, b->rid, b->pos, b->pos + b->rlen, bgzf_tell(fp->fp.bgzf), 1);
        if (ret < 0) goto fail;
    }
    if (r < -1) goto fail;
    hts_idx_finish(idx, bgzf_tell(fp->fp.bgzf));
    bcf_destroy1(b);
    bcf_hdr_destroy(h);
    return idx;

 fail:
    hts_idx_destroy(idx);
    bcf_destroy1(b);
    bcf_hdr_destroy(h);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3ffb0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x4a7b0
movq $0x0, -0x8(%rbp)
jmp 0x4a915
movl $0x0, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movl -0x14(%rbp), %esi
xorl %edx, %edx
leaq -0x38(%rbp), %rcx
callq 0x4a920
movl %eax, -0x18(%rbp)
movl -0x38(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %rdx
shlq $0x10, %rdx
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x10(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
cltq
orq %rax, %rdx
movl -0x14(%rbp), %ecx
movl -0x18(%rbp), %r8d
xorl %esi, %esi
callq 0xda10
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x4a812
jmp 0x4a8f2
callq 0x40bb0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x4a827
jmp 0x4a8f2
jmp 0x4a829
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x415a0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jl 0x4a8a0
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
addq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %r8
shlq $0x10, %r8
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x10(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
cltq
orq %rax, %r8
movl $0x1, %r9d
callq 0xe6f0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jge 0x4a89e
jmp 0x4a8f2
jmp 0x4a829
cmpl $-0x1, -0x34(%rbp)
jge 0x4a8a8
jmp 0x4a8f2
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %rsi
shlq $0x10, %rsi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x10(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
cltq
orq %rax, %rsi
callq 0xdbc0
movq -0x20(%rbp), %rdi
callq 0x40fa0
movq -0x30(%rbp), %rdi
callq 0x3fd50
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4a915
movq -0x28(%rbp), %rdi
callq 0xc2c0
movq -0x20(%rbp), %rdi
callq 0x40fa0
movq -0x30(%rbp), %rdi
callq 0x3fd50
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: idx_calc_n_lvls_ids
static int idx_calc_n_lvls_ids(const bcf_hdr_t *h, int min_shift,
                               int starting_n_lvls, int *nids_out)
{
    int n_lvls, i, nids = 0;
    int64_t max_len = 0, s;

    for (i = 0; i < h->n[BCF_DT_CTG]; ++i)
    {
        if ( !h->id[BCF_DT_CTG][i].val ) continue;
        if ( max_len < h->id[BCF_DT_CTG][i].val->info[0] )
            max_len = h->id[BCF_DT_CTG][i].val->info[0];
        nids++;
    }
    if ( !max_len ) max_len = (1LL<<31) - 1;  // In case contig line is broken.
    max_len += 256;
    s = hts_bin_maxpos(min_shift, starting_n_lvls);
    for (n_lvls = starting_n_lvls; max_len > s; ++n_lvls, s <<= 3);

    if (nids_out) *nids_out = nids;
    return n_lvls;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x4a9c6
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0x4a974
jmp 0x4a9bb
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq -0x20(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
cmpq (%rcx), %rax
jae 0x4a9b2
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4a94c
cmpq $0x0, -0x30(%rbp)
jne 0x4a9d5
movq $0x7fffffff, -0x30(%rbp) # imm = 0x7FFFFFFF
movq -0x30(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
callq 0x54f60
movq %rax, -0x38(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jle 0x4aa1b
jmp 0x4aa04
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x38(%rbp), %rax
shlq $0x3, %rax
movq %rax, -0x38(%rbp)
jmp 0x4a9f8
cmpq $0x0, -0x18(%rbp)
je 0x4aa2b
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_idx_init
int bcf_idx_init(htsFile *fp, bcf_hdr_t *h, int min_shift, const char *fnidx) {
    int n_lvls, nids = 0;

    if (fp->format.compression != bgzf) {
        hts_log_error("Indexing is only supported on BGZF-compressed files");
        return -3; // Matches no-compression return for bcf_index_build3()
    }

    if (fp->format.format == vcf)
        return vcf_idx_init(fp, h, min_shift, fnidx);

    if (!min_shift)
        min_shift = 14;

    n_lvls = idx_calc_n_lvls_ids(h, min_shift, 0, &nids);

    fp->idx = hts_idx_init(nids, HTS_FMT_CSI, bgzf_tell(fp->fp.bgzf), min_shift, n_lvls);
    if (!fp->idx) return -1;
    fp->fnidx = fnidx;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x54(%rax)
je 0x4ad0e
movl $0x1, %edi
leaq 0xbd2c2(%rip), %rsi     # 0x107fb6
leaq 0xbd2c8(%rip), %rdx     # 0x107fc3
movb $0x0, %al
callq 0x9d90
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x4adbe
movq -0x10(%rbp), %rax
cmpl $0x8, 0x4c(%rax)
jne 0x4ad34
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x4add0
movl %eax, -0x4(%rbp)
jmp 0x4adbe
cmpl $0x0, -0x1c(%rbp)
jne 0x4ad41
movl $0xe, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
xorl %edx, %edx
leaq -0x30(%rbp), %rcx
callq 0x4a920
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %rdx
shlq $0x10, %rdx
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x10(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
cltq
orq %rax, %rdx
movl -0x1c(%rbp), %ecx
movl -0x2c(%rbp), %r8d
xorl %esi, %esi
callq 0xda10
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x4adab
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4adbe
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x70(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_hdr_dup
bcf_hdr_t *bcf_hdr_dup(const bcf_hdr_t *hdr)
{
    bcf_hdr_t *hout = bcf_hdr_init("r");
    if (!hout) {
        hts_log_error("Failed to allocate bcf header");
        return NULL;
    }
    kstring_t htxt = {0,0,0};
    if (bcf_hdr_format(hdr, 1, &htxt) < 0) {
        free(htxt.s);
        return NULL;
    }
    if ( bcf_hdr_parse(hout, htxt.s) < 0 ) {
        bcf_hdr_destroy(hout);
        hout = NULL;
    }
    free(htxt.s);
    return hout;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
leaq 0xb9fdd(%rip), %rdi     # 0x106470
callq 0x3f560
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4c4c7
movl $0x1, %edi
leaq 0xbbc87(%rip), %rsi     # 0x108136
leaq 0xbb5c9(%rip), %rdx     # 0x107a7f
movb $0x0, %al
callq 0x9d90
movq $0x0, -0x8(%rbp)
jmp 0x4c535
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x4240
movq -0x10(%rbp), %rdi
movl $0x1, %esi
leaq -0x30(%rbp), %rdx
callq 0x409c0
cmpl $0x0, %eax
jge 0x4c501
movq -0x20(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0x4c535
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3e890
cmpl $0x0, %eax
jge 0x4c524
movq -0x18(%rbp), %rdi
callq 0x3fd50
movq $0x0, -0x18(%rbp)
movq -0x20(%rbp), %rdi
callq 0x45a0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_is_snp
int bcf_is_snp(bcf1_t *v)
{
    int i;
    bcf_unpack(v, BCF_UN_STR);
    for (i = 0; i < v->n_allele; ++i)
    {
        if ( v->d.allele[i][1]==0 && v->d.allele[i][0]!='*' ) continue;

        // mpileup's <X> allele, see also below. This is not completely satisfactory,
        // a general library is here narrowly tailored to fit samtools.
        if ( v->d.allele[i][0]=='<' && v->d.allele[i][1]=='X' && v->d.allele[i][2]=='>' ) continue;
        if ( v->d.allele[i][0]=='<' && v->d.allele[i][1]=='*' && v->d.allele[i][2]=='>' ) continue;

        break;
    }
    return i == v->n_allele;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x48110
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x10, %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
jge 0x4d9f5
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x4d93b
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
je 0x4d93b
jmp 0x4d9e7
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
jne 0x4d990
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x58, %eax
jne 0x4d990
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x3e, %eax
jne 0x4d990
jmp 0x4d9e7
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
jne 0x4d9e5
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2a, %eax
jne 0x4d9e5
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x3e, %eax
jne 0x4d9e5
jmp 0x4d9e7
jmp 0x4d9f5
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4d8e1
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x10, %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_get_variant_types
int bcf_get_variant_types(bcf1_t *rec)
{
    if ( rec->d.var_type==-1 ) {
        if (bcf_set_variant_types(rec) != 0) {
            hts_log_error("Couldn't get variant types: %s", strerror(errno));
            exit(1); // Due to legacy API having no way to report failures
        }
    }
    return rec->d.var_type & ORIG_VAR_TYPES;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $-0x1, 0xac(%rax)
jne 0x4da7c
movq -0x8(%rbp), %rdi
callq 0x4da90
cmpl $0x0, %eax
je 0x4da7a
callq 0x4050
movl (%rax), %edi
callq 0x4120
movq %rax, %rcx
movl $0x1, %edi
leaq 0xba7a4(%rip), %rsi     # 0x108206
leaq 0xba7b3(%rip), %rdx     # 0x10821c
movb $0x0, %al
callq 0x9d90
movl $0x1, %edi
callq 0x45d0
jmp 0x4da7c
movq -0x8(%rbp), %rax
movl 0xac(%rax), %eax
andl $0x3f, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_set_variant_types
static int bcf_set_variant_types(bcf1_t *b)
{
    if ( !(b->unpacked & BCF_UN_STR) ) bcf_unpack(b, BCF_UN_STR);
    bcf_dec_t *d = &b->d;
    if ( d->n_var < b->n_allele )
    {
        bcf_variant_t *new_var = realloc(d->var, sizeof(bcf_variant_t)*b->n_allele);
        if (!new_var)
            return -1;
        d->var = new_var;
        d->n_var = b->n_allele;
    }
    int i;
    b->d.var_type = 0;
    d->var[0].type = VCF_REF;
    d->var[0].n    = 0;
    for (i=1; i<b->n_allele; i++)
    {
        bcf_set_variant_type(d->allele[0],d->allele[i], &d->var[i]);
        b->d.var_type |= d->var[i].type;
        //fprintf(stderr,"[set_variant_type] %d   %s %s -> %d %d .. %d\n", b->pos+1,d->allele[0],d->allele[i],d->var[i].type,d->var[i].n, b->d.var_type);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0xbc(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x4dabc
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x48110
movq -0x10(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x58(%rax), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x10, %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
jge 0x4db4b
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x10, %rax
andq $0xffff, %rax           # imm = 0xFFFF
movl %eax, %eax
movl %eax, %esi
shlq $0x3, %rsi
callq 0x4840
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x4db24
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4dbfb
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x10, %rax
andq $0xffff, %rax           # imm = 0xFFFF
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x58(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xac(%rax)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movl $0x0, 0x4(%rax)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x10, %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
jge 0x4dbf4
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdx
movslq -0x24(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
callq 0x559e0
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,8), %ecx
movq -0x10(%rbp), %rax
orl 0xac(%rax), %ecx
movl %ecx, 0xac(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4db7d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_get_variant_type
int bcf_get_variant_type(bcf1_t *rec, int ith_allele)
{
    if ( rec->d.var_type==-1 ) {
        if (bcf_set_variant_types(rec) != 0) {
            hts_log_error("Couldn't get variant types: %s", strerror(errno));
            exit(1); // Due to legacy API having no way to report failures
        }
    }
    if (ith_allele < 0 || ith_allele >= rec->n_allele) {
        hts_log_error("Requested allele outside valid range");
        exit(1);
    }
    return rec->d.var[ith_allele].type & ORIG_VAR_TYPES;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $-0x1, 0xac(%rax)
jne 0x4dc6f
movq -0x8(%rbp), %rdi
callq 0x4da90
cmpl $0x0, %eax
je 0x4dc6d
callq 0x4050
movl (%rax), %edi
callq 0x4120
movq %rax, %rcx
movl $0x1, %edi
leaq 0xba5e6(%rip), %rsi     # 0x10823b
leaq 0xba5c0(%rip), %rdx     # 0x10821c
movb $0x0, %al
callq 0x9d90
movl $0x1, %edi
callq 0x45d0
jmp 0x4dc6f
cmpl $0x0, -0xc(%rbp)
jl 0x4dc8f
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x10, %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
jl 0x4dcb3
movl $0x1, %edi
leaq 0xba5a0(%rip), %rsi     # 0x10823b
leaq 0xba5ae(%rip), %rdx     # 0x108250
movb $0x0, %al
callq 0x9d90
movl $0x1, %edi
callq 0x45d0
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,8), %eax
andl $0x3f, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_has_variant_type
int bcf_has_variant_type(bcf1_t *rec, int ith_allele, uint32_t bitmask)
{
    if ( rec->d.var_type==-1 ) {
        if (bcf_set_variant_types(rec) != 0) return -1;
    }
    if (ith_allele < 0 || ith_allele >= rec->n_allele) return -1;
    if (bitmask == VCF_REF) {  // VCF_REF is 0, so handled as a special case
        return rec->d.var[ith_allele].type == VCF_REF;
    }
    return bitmask & rec->d.var[ith_allele].type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0xac(%rax)
jne 0x4dd08
movq -0x10(%rbp), %rdi
callq 0x4da90
cmpl $0x0, %eax
je 0x4dd06
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4dd6f
jmp 0x4dd08
cmpl $0x0, -0x14(%rbp)
jl 0x4dd28
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x10, %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
jl 0x4dd31
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4dd6f
cmpl $0x0, -0x18(%rbp)
jne 0x4dd57
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,8)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x4dd6f
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0xa0(%rcx), %rcx
movslq -0x14(%rbp), %rdx
andl (%rcx,%rdx,8), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_variant_length
int bcf_variant_length(bcf1_t *rec, int ith_allele)
{
    if ( rec->d.var_type==-1 ) {
        if (bcf_set_variant_types(rec) != 0) return bcf_int32_missing;
    }
    if (ith_allele < 0 || ith_allele >= rec->n_allele) return bcf_int32_missing;
    return rec->d.var[ith_allele].n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0xac(%rax)
jne 0x4ddb5
movq -0x10(%rbp), %rdi
callq 0x4da90
cmpl $0x0, %eax
je 0x4ddb3
movl $0x80000000, -0x4(%rbp) # imm = 0x80000000
jmp 0x4ddf4
jmp 0x4ddb5
cmpl $0x0, -0x14(%rbp)
jl 0x4ddd5
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x10, %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
jl 0x4ddde
movl $0x80000000, -0x4(%rbp) # imm = 0x80000000
jmp 0x4ddf4
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movslq -0x14(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_has_variant_types
int bcf_has_variant_types(bcf1_t *rec, uint32_t bitmask,
                          enum bcf_variant_match mode)
{
    if ( rec->d.var_type==-1 ) {
        if (bcf_set_variant_types(rec) != 0) return -1;
    }
    uint32_t type = rec->d.var_type;
    if ( mode==bcf_match_overlap ) return bitmask & type;

    // VCF_INDEL is always set with VCF_INS and VCF_DEL by bcf_set_variant_type[s], but the bitmask may
    // ask for say `VCF_INS` or `VCF_INDEL` only
    if ( bitmask&(VCF_INS|VCF_DEL) && !(bitmask&VCF_INDEL) ) type &= ~VCF_INDEL;
    else if ( bitmask&VCF_INDEL && !(bitmask&(VCF_INS|VCF_DEL)) ) type &= ~(VCF_INS|VCF_DEL);

    if ( mode==bcf_match_subset )
    {
        if ( ~bitmask & type ) return 0;
        else return bitmask & type;
    }
    // mode == bcf_match_exact
    if ( bitmask==VCF_REF ) return type==bitmask ? 1 : 0;
    return type==bitmask ? type : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0xac(%rax)
jne 0x4de3b
movq -0x10(%rbp), %rdi
callq 0x4da90
cmpl $0x0, %eax
je 0x4de39
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4df06
jmp 0x4de3b
movq -0x10(%rbp), %rax
movl 0xac(%rax), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x1, -0x18(%rbp)
jne 0x4de5c
movl -0x14(%rbp), %eax
andl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4df06
movl -0x14(%rbp), %eax
andl $0xc0, %eax
cmpl $0x0, %eax
je 0x4de7f
movl -0x14(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x4de7f
movl -0x1c(%rbp), %eax
andl $-0x5, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4dea4
movl -0x14(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4dea2
movl -0x14(%rbp), %eax
andl $0xc0, %eax
cmpl $0x0, %eax
jne 0x4dea2
movl -0x1c(%rbp), %eax
andl $0xffffff3f, %eax       # imm = 0xFFFFFF3F
movl %eax, -0x1c(%rbp)
jmp 0x4dea4
cmpl $0x2, -0x18(%rbp)
jne 0x4decc
movl -0x14(%rbp), %eax
xorl $-0x1, %eax
andl -0x1c(%rbp), %eax
cmpl $0x0, %eax
je 0x4dec1
movl $0x0, -0x4(%rbp)
jmp 0x4df06
movl -0x14(%rbp), %eax
andl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4df06
cmpl $0x0, -0x14(%rbp)
jne 0x4dee9
movl -0x1c(%rbp), %edx
movl -0x14(%rbp), %esi
xorl %eax, %eax
movl $0x1, %ecx
cmpl %esi, %edx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x4df06
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x4def9
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x4df00
xorl %eax, %eax
movl %eax, -0x20(%rbp)
jmp 0x4df00
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_update_format_string
int bcf_update_format_string(const bcf_hdr_t *hdr, bcf1_t *line, const char *key, const char **values, int n)
{
    if ( !n )
        return bcf_update_format(hdr,line,key,NULL,0,BCF_HT_STR);

    int i, max_len = 0;
    for (i=0; i<n; i++)
    {
        int len = strlen(values[i]);
        if ( len > max_len ) max_len = len;
    }
    char *out = (char*) malloc(max_len*n);
    if ( !out ) return -2;
    for (i=0; i<n; i++)
    {
        char *dst = out+i*max_len;
        const char *src = values[i];
        int j = 0;
        while ( src[j] ) { dst[j] = src[j]; j++; }
        for (; j<max_len; j++) dst[j] = 0;
    }
    int ret = bcf_update_format(hdr,line,key,out,max_len*n,BCF_HT_STR);
    free(out);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x4e718
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
xorl %r8d, %r8d
movl $0x3, %r9d
callq 0x4e870
movl %eax, -0x4(%rbp)
jmp 0x4e858
movl $0x0, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x4e75d
movq -0x28(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x41a0
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x34(%rbp), %eax
jle 0x4e750
movl -0x38(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x4e752
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x4e726
movl -0x34(%rbp), %eax
imull -0x2c(%rbp), %eax
movslq %eax, %rdi
callq 0x4670
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x4e783
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x4e858
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x4e822
movq -0x40(%rbp), %rax
movl -0x30(%rbp), %ecx
imull -0x34(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
movq -0x50(%rbp), %rax
movslq -0x54(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x4e7f1
movq -0x50(%rbp), %rax
movslq -0x54(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x48(%rbp), %rax
movslq -0x54(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x4e7c2
jmp 0x4e7f3
movl -0x54(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x4e812
movq -0x48(%rbp), %rax
movslq -0x54(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x4e7f3
jmp 0x4e814
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x4e78a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x40(%rbp), %rcx
movl -0x34(%rbp), %r8d
imull -0x2c(%rbp), %r8d
movl $0x3, %r9d
callq 0x4e870
movl %eax, -0x58(%rbp)
movq -0x40(%rbp), %rdi
callq 0x45a0
movl -0x58(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_update_filter
int bcf_update_filter(const bcf_hdr_t *hdr, bcf1_t *line, int *flt_ids, int n)
{
    if ( !(line->unpacked & BCF_UN_FLT) ) bcf_unpack(line, BCF_UN_FLT);
    line->d.shared_dirty |= BCF1_DIRTY_FLT;
    line->d.n_flt = n;
    if ( !n ) return 0;
    hts_expand(int, line->d.n_flt, line->d.m_flt, line->d.flt);
    int i;
    for (i=0; i<n; i++)
        line->d.flt[i] = flt_ids[i];
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl 0xbc(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x4f047
movq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0x48110
movq -0x18(%rbp), %rax
movl 0xb0(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0xb0(%rax)
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x68(%rax)
cmpl $0x0, -0x24(%rbp)
jne 0x4f076
movl $0x0, -0x4(%rbp)
jmp 0x4f123
jmp 0x4f078
movq -0x18(%rbp), %rax
movl 0x68(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x64(%rcx), %eax
jle 0x4f0e6
movq -0x18(%rbp), %rax
cmpl $0x1, 0x68(%rax)
jl 0x4f09e
movq -0x18(%rbp), %rax
movl 0x68(%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0x4f0a8
movl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4f0a8
movl -0x2c(%rbp), %eax
movslq %eax, %rdi
movq -0x18(%rbp), %rax
movslq 0x64(%rax), %rsi
movq -0x18(%rbp), %r9
addq $0x50, %r9
addq $0x20, %r9
movl $0x4, %ecx
xorl %r8d, %r8d
leaq 0xb9307(%rip), %rax     # 0x1083d8
movq %rcx, %rdx
movq %rax, (%rsp)
callq 0x15780
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x64(%rax)
jmp 0x4f0e8
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x4f11c
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movslq -0x28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4f0ef
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_add_filter
int bcf_add_filter(const bcf_hdr_t *hdr, bcf1_t *line, int flt_id)
{
    if ( !(line->unpacked & BCF_UN_FLT) ) bcf_unpack(line, BCF_UN_FLT);
    int i;
    for (i=0; i<line->d.n_flt; i++)
        if ( flt_id==line->d.flt[i] ) break;
    if ( i<line->d.n_flt ) return 0;    // this filter is already set
    line->d.shared_dirty |= BCF1_DIRTY_FLT;
    if ( flt_id==0 )    // set to PASS
        line->d.n_flt = 1;
    else if ( line->d.n_flt==1 && line->d.flt[0]==0 )
        line->d.n_flt = 1;
    else
        line->d.n_flt++;
    hts_expand(int, line->d.n_flt, line->d.m_flt, line->d.flt);
    line->d.flt[line->d.n_flt-1] = flt_id;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl 0xbc(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x4f163
movq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0x48110
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x68(%rcx), %eax
jge 0x4f199
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x70(%rcx), %rcx
movslq -0x20(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x4f18c
jmp 0x4f199
jmp 0x4f18e
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4f16a
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x68(%rcx), %eax
jge 0x4f1b1
movl $0x0, -0x4(%rbp)
jmp 0x4f29e
movq -0x18(%rbp), %rax
movl 0xb0(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0xb0(%rax)
cmpl $0x0, -0x1c(%rbp)
jne 0x4f1d7
movq -0x18(%rbp), %rax
movl $0x1, 0x68(%rax)
jmp 0x4f20a
movq -0x18(%rbp), %rax
cmpl $0x1, 0x68(%rax)
jne 0x4f1fb
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
cmpl $0x0, (%rax)
jne 0x4f1fb
movq -0x18(%rbp), %rax
movl $0x1, 0x68(%rax)
jmp 0x4f208
movq -0x18(%rbp), %rax
movl 0x68(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x68(%rax)
jmp 0x4f20a
jmp 0x4f20c
movq -0x18(%rbp), %rax
movl 0x68(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x64(%rcx), %eax
jle 0x4f27a
movq -0x18(%rbp), %rax
cmpl $0x1, 0x68(%rax)
jl 0x4f232
movq -0x18(%rbp), %rax
movl 0x68(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x4f23c
movl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4f23c
movl -0x24(%rbp), %eax
movslq %eax, %rdi
movq -0x18(%rbp), %rax
movslq 0x64(%rax), %rsi
movq -0x18(%rbp), %r9
addq $0x50, %r9
addq $0x20, %r9
movl $0x4, %ecx
xorl %r8d, %r8d
leaq 0xb9185(%rip), %rax     # 0x1083ea
movq %rcx, %rdx
movq %rax, (%rsp)
callq 0x15780
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x64(%rax)
jmp 0x4f27c
movl -0x1c(%rbp), %edx
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x68(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_remove_filter
int bcf_remove_filter(const bcf_hdr_t *hdr, bcf1_t *line, int flt_id, int pass)
{
    if ( !(line->unpacked & BCF_UN_FLT) ) bcf_unpack(line, BCF_UN_FLT);
    int i;
    for (i=0; i<line->d.n_flt; i++)
        if ( flt_id==line->d.flt[i] ) break;
    if ( i==line->d.n_flt ) return 0;   // the filter is not present
    line->d.shared_dirty |= BCF1_DIRTY_FLT;
    if ( i!=line->d.n_flt-1 ) memmove(line->d.flt+i,line->d.flt+i+1,(line->d.n_flt-i-1)*sizeof(*line->d.flt));
    line->d.n_flt--;
    if ( !line->d.n_flt && pass ) bcf_add_filter(hdr,line,0);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl 0xbc(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x4f2e6
movq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0x48110
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x68(%rcx), %eax
jge 0x4f31c
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x70(%rcx), %rcx
movslq -0x24(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x4f30f
jmp 0x4f31c
jmp 0x4f311
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4f2ed
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x68(%rcx), %eax
jne 0x4f334
movl $0x0, -0x4(%rbp)
jmp 0x4f3ce
movq -0x18(%rbp), %rax
movl 0xb0(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0xb0(%rax)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
movl 0x68(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x4f39b
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rdi
movslq -0x24(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rsi
movslq -0x24(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
addq $0x4, %rsi
movq -0x18(%rbp), %rax
movl 0x68(%rax), %eax
subl -0x24(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
callq 0x4830
movq -0x18(%rbp), %rax
movl 0x68(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x68(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x68(%rax)
jne 0x4f3c7
cmpl $0x0, -0x20(%rbp)
je 0x4f3c7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x4f130
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_has_filter
int bcf_has_filter(const bcf_hdr_t *hdr, bcf1_t *line, char *filter)
{
    if ( filter[0]=='.' && !filter[1] ) filter = "PASS";
    int id = bcf_hdr_id2int(hdr, BCF_DT_ID, filter);
    if ( !bcf_hdr_idinfo_exists(hdr,BCF_HL_FLT,id) ) return -1;  // not defined in the header

    if ( !(line->unpacked & BCF_UN_FLT) ) bcf_unpack(line, BCF_UN_FLT);
    if ( id==0 && !line->d.n_flt) return 1; // PASS

    int i;
    for (i=0; i<line->d.n_flt; i++)
        if ( line->d.flt[i]==id ) return 1;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x4f415
movq -0x20(%rbp), %rax
cmpb $0x0, 0x1(%rax)
jne 0x4f415
leaq 0xb8fe8(%rip), %rax     # 0x1083f9
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
xorl %esi, %esi
callq 0x3e820
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x4f475
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x4f475
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x24(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x4f475
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x24(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
andq $0xf, %rax
cmpl $0xf, %eax
jne 0x4f47e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4f4fb
movq -0x18(%rbp), %rax
movl 0xbc(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x4f49e
movq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0x48110
cmpl $0x0, -0x24(%rbp)
jne 0x4f4b7
movq -0x18(%rbp), %rax
cmpl $0x0, 0x68(%rax)
jne 0x4f4b7
movl $0x1, -0x4(%rbp)
jmp 0x4f4fb
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x68(%rcx), %eax
jge 0x4f4f4
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
jne 0x4f4e7
movl $0x1, -0x4(%rbp)
jmp 0x4f4fb
jmp 0x4f4e9
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4f4be
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf1_sync_alleles
static inline int _bcf1_sync_alleles(const bcf_hdr_t *hdr, bcf1_t *line, int nals)
{
    line->d.shared_dirty |= BCF1_DIRTY_ALS;
    line->d.var_type = -1;

    line->n_allele = nals;
    hts_expand(char*, line->n_allele, line->d.m_allele, line->d.allele);

    char *als = line->d.als;
    int n = 0;
    while (n<nals)
    {
        line->d.allele[n] = als;
        while ( *als ) als++;
        als++;
        n++;
    }
    // Update REF length. Note that END is 1-based while line->pos 0-based
    line->rlen = get_rlen(hdr, line);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0xb0(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0xb0(%rax)
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xac(%rax) # imm = 0xFFFFFFFF
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
movl %ecx, %edx
movq 0x18(%rax), %rcx
andq $0xffff, %rdx           # imm = 0xFFFF
shlq $0x10, %rdx
movabsq $-0xffff0001, %rsi      # imm = 0xFFFFFFFF0000FFFF
andq %rsi, %rcx
orq %rdx, %rcx
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x10, %rax
andq $0xffff, %rax           # imm = 0xFFFF
movq -0x10(%rbp), %rcx
cmpl 0x60(%rcx), %eax
jle 0x4f965
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x10, %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpl $0x1, %eax
jl 0x4f91b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x10, %rax
andq $0xffff, %rax           # imm = 0xFFFF
movl %eax, -0x28(%rbp)
jmp 0x4f925
movl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4f925
movl -0x28(%rbp), %eax
movslq %eax, %rdi
movq -0x10(%rbp), %rax
movslq 0x60(%rax), %rsi
movq -0x10(%rbp), %r9
addq $0x50, %r9
addq $0x38, %r9
movl $0x4, %edx
movl $0x8, %ecx
xorl %r8d, %r8d
leaq 0xb977b(%rip), %rax     # 0x1090ce
movq %rax, (%rsp)
callq 0x15780
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
jmp 0x4f967
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x4f9ca
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x24(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x4f9b3
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4f99c
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4f97d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x46e40
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_update_alleles_str
int bcf_update_alleles_str(const bcf_hdr_t *hdr, bcf1_t *line, const char *alleles_string)
{
    if ( !(line->unpacked & BCF_UN_STR) ) bcf_unpack(line, BCF_UN_STR);
    kstring_t tmp;
    tmp.l = 0; tmp.s = line->d.als; tmp.m = line->d.m_als;
    kputs(alleles_string, &tmp);
    line->d.als = tmp.s; line->d.m_als = tmp.m;

    int nals = 1;
    char *t = line->d.als;
    while (*t)
    {
        if ( *t==',' ) { *t = 0; nals++; }
        t++;
    }
    return _bcf1_sync_alleles(hdr, line, nals);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0xbc(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x4fa24
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x48110
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq 0x5c(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x43910
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x28(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x5c(%rax)
movl $0x1, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpb $0x0, (%rax)
je 0x4fab9
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x4faab
movq -0x40(%rbp), %rax
movb $0x0, (%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x4fa86
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x34(%rbp), %edx
callq 0x4f870
addq $0x40, %rsp
popq %rbp
retq
nop