LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: regions_sort_and_merge
void _regions_sort_and_merge(bcf_sr_regions_t *reg)
{
    if ( !reg ) return;

    int i;
    for (i=0; i<reg->nseqs; i++)
    {
        qsort(reg->regs[i].regs, reg->regs[i].nregs, sizeof(*reg->regs[i].regs), regions_cmp);
        regions_merge(&reg->regs[i]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x39528
jmp 0x395a8
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x98(%rcx), %eax
jge 0x395a8
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x8(%rax), %rsi
movl $0x10, %edx
leaq 0x3f83(%rip), %rcx      # 0x3d500
callq 0x49a0
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
movslq -0xc(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x3d590
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3952f
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: bcf_sr_init
bcf_srs_t *bcf_sr_init(void)
{
    bcf_srs_t *files = (bcf_srs_t*) calloc(1,sizeof(bcf_srs_t));
    files->aux = (aux_t*) calloc(1,sizeof(aux_t));
    bcf_sr_sort_init(&BCF_SR_AUX(files)->sort);
    bcf_sr_set_opt(files,BCF_SR_REGIONS_OVERLAP,1);
    bcf_sr_set_opt(files,BCF_SR_TARGETS_OVERLAP,0);
    return files;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
movl $0x90, %esi
callq 0x42e0
movq %rax, -0x8(%rbp)
movl $0x1, %edi
movl $0x1e8, %esi            # imm = 0x1E8
callq 0x42e0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0xe1180
movq -0x8(%rbp), %rdi
movl $0x3, %esi
movl $0x1, %edx
movb $0x0, %al
callq 0x37cb0
movq -0x8(%rbp), %rdi
movl $0x4, %esi
xorl %edx, %edx
movb $0x0, %al
callq 0x37cb0
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: bcf_sr_destroy
void bcf_sr_destroy(bcf_srs_t *files)
{
    int i;
    int *autoclose = BCF_SR_AUX(files)->closefile;

    for (i=0; i<files->nreaders; i++)
        bcf_sr_destroy1(&files->readers[i], autoclose[i]);
    free(files->has_line);
    free(files->readers);
    for (i=0; i<files->n_smpl; i++) free(files->samples[i]);
    free(files->samples);
    if (files->targets) bcf_sr_regions_destroy(files->targets);
    if (files->regions) bcf_sr_regions_destroy(files->regions);
    if (files->tmps.m) free(files->tmps.s);
    if (files->n_threads) bcf_sr_destroy_threads(files);
    bcf_sr_sort_destroy(&BCF_SR_AUX(files)->sort);
    free(autoclose);
    free(files->aux);
    free(files);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x1e0(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x396e3
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movslq -0xc(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x397d0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x396a9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x45a0
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x78(%rcx), %eax
jge 0x39730
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x45a0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x39704
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x39755
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x380b0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x3976d
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x380b0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x39785
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x7c(%rax)
je 0x39798
movq -0x8(%rbp), %rdi
callq 0x38840
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0xe11f0
movq -0x18(%rbp), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: bcf_sr_destroy1
static void bcf_sr_destroy1(bcf_sr_t *reader, int closefile)
{
    free(reader->fname);
    if ( reader->tbx_idx ) tbx_destroy(reader->tbx_idx);
    if ( reader->bcf_idx ) hts_idx_destroy(reader->bcf_idx);
    bcf_hdr_destroy(reader->header);
    if (closefile) {
        hts_close(reader->file);
    }
    if ( reader->itr ) tbx_itr_destroy(reader->itr);
    int j;
    for (j=0; j<reader->mbuffer; j++)
        bcf_destroy1(reader->buffer[j]);
    free(reader->buffer);
    free(reader->samples);
    free(reader->filter_ids);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x39804
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3ef90
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x3981c
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xccc0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x48240
cmpl $0x0, -0xc(%rbp)
je 0x3983b
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0xc9d0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x39853
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x11230
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x3c(%rcx), %eax
jge 0x39886
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x49490
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3985a
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: bcf_sr_remove_reader
void bcf_sr_remove_reader(bcf_srs_t *files, int i)
{
    assert( !files->samples );  // not ready for this yet
    int *autoclose = BCF_SR_AUX(files)->closefile;

    bcf_sr_sort_remove_reader(files, &BCF_SR_AUX(files)->sort, i);
    bcf_sr_destroy1(&files->readers[i], autoclose[i]);
    if ( i+1 < files->nreaders )
    {
        memmove(&files->readers[i], &files->readers[i+1], (files->nreaders-i-1)*sizeof(bcf_sr_t));
        memmove(&files->has_line[i], &files->has_line[i+1], (files->nreaders-i-1)*sizeof(int));
        memmove(&autoclose[i], &autoclose[i+1], (files->nreaders-i-1)*sizeof(int));
    }
    files->nreaders--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x398dc
jmp 0x398fb
leaq 0xd8830(%rip), %rdi     # 0x112113
leaq 0xd8839(%rip), %rsi     # 0x112123
movl $0x1f6, %edx            # imm = 0x1F6
leaq 0xd8841(%rip), %rcx     # 0x112137
callq 0x42d0
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x1e0(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rsi
movl -0xc(%rbp), %edx
callq 0xe10a0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movslq -0xc(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x397d0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movq -0x8(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x39a1e
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movslq -0xc(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
movl -0xc(%rbp), %eax
addl $0x1, %eax
cltq
imulq $0x60, %rax, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
subl -0xc(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x60, %rax, %rdx
callq 0x4830
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movslq -0xc(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movl -0xc(%rbp), %eax
addl $0x1, %eax
cltq
shlq $0x2, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
subl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
callq 0x4830
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movl -0xc(%rbp), %eax
addl $0x1, %eax
cltq
shlq $0x2, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
subl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
callq 0x4830
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x30(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: bcf_sr_next_line
int bcf_sr_next_line(bcf_srs_t *files)
{
    if ( !files->targets_als )
        return next_line(files);

    while (1)
    {
        int i, ret = next_line(files);
        if ( !ret ) return ret;

        for (i=0; i<files->nreaders; i++)
            if ( files->has_line[i] ) break;

        if ( _regions_match_alleles(files->targets, files->targets_als-1, files->readers[i].buffer[0]) ) return ret;

        // Check if there are more duplicate lines in the buffers. If not, return this line as if it
        // matched the targets, even if there is a type mismatch
        for (i=0; i<files->nreaders; i++)
        {
            if ( !files->has_line[i] ) continue;
            if ( files->readers[i].nbuffer==0 || files->readers[i].buffer[1]->pos!=files->readers[i].buffer[0]->pos ) continue;
            break;
        }
        if ( i==files->nreaders ) return ret;   // no more lines left, output even if target alleles are not of the same type
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x58(%rax)
jne 0x39a67
movq -0x10(%rbp), %rdi
callq 0x39bb0
movl %eax, -0x4(%rbp)
jmp 0x39ba3
jmp 0x39a69
movq -0x10(%rbp), %rdi
callq 0x39bb0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x39a86
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x39ba3
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x39aba
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x39aad
jmp 0x39aba
jmp 0x39aaf
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x39a8d
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x58(%rax), %esi
subl $0x1, %esi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movq (%rax), %rdx
callq 0x3a070
cmpl $0x0, %eax
je 0x39afb
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x39ba3
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x39b8a
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x39b22
jmp 0x39b7c
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x38(%rax)
je 0x39b78
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movslq -0x14(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rcx
movq 0x30(%rcx), %rcx
movq (%rcx), %rcx
cmpq (%rcx), %rax
je 0x39b7a
jmp 0x39b7c
jmp 0x39b8a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x39b02
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jne 0x39b9e
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x39ba3
jmp 0x39a69
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: bcf_sr_seek
int bcf_sr_seek(bcf_srs_t *readers, const char *seq, hts_pos_t pos)
{
    if ( !readers->regions ) return 0;
    bcf_sr_sort_reset(&BCF_SR_AUX(readers)->sort);
    if ( !seq && !pos )
    {
        // seek to start
        bcf_sr_seek_start(readers);
        return 0;
    }

    int i, nret = 0;

    // Need to position both the readers and the regions. The latter is a bit of a mess
    // because we can have in memory or external regions. The safe way is:
    //  - reset all regions as if they were not read from at all (bcf_sr_seek_start)
    //  - find the requested iseq (stored in the seq_hash)
    //  - position regions to the requested position (bcf_sr_regions_overlap)
    bcf_sr_seek_start(readers);
    if ( khash_str2int_get(readers->regions->seq_hash, seq, &i)>=0 ) readers->regions->iseq = i;
    _bcf_sr_regions_overlap(readers->regions, seq, pos, pos, 0);

    for (i=0; i<readers->nreaders; i++)
    {
        nret += _reader_seek(&readers->readers[i],seq,pos,MAX_CSI_COOR-1);
    }
    return nret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x3a48b
movl $0x0, -0x4(%rbp)
jmp 0x3a570
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0xe11d0
cmpq $0x0, -0x18(%rbp)
jne 0x3a4be
cmpq $0x0, -0x20(%rbp)
jne 0x3a4be
movq -0x10(%rbp), %rdi
callq 0x38600
movl $0x0, -0x4(%rbp)
jmp 0x3a570
movl $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x38600
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x88(%rax), %rdi
movq -0x18(%rbp), %rsi
leaq -0x24(%rbp), %rdx
callq 0x3a580
cmpl $0x0, %eax
jl 0x3a500
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movl %ecx, 0x9c(%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rcx
xorl %r8d, %r8d
callq 0x3a610
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x3a56a
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movslq -0x24(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movabsq $0xffffffffffe, %rcx    # imm = 0xFFFFFFFFFFE
callq 0x3a800
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3a523
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: reader_seek
static int _reader_seek(bcf_sr_t *reader, const char *seq, hts_pos_t start, hts_pos_t end)
{
    if ( end>=MAX_CSI_COOR )
    {
        hts_log_error("The coordinate is out of csi index limit: %"PRIhts_pos, end+1);
        exit(1);
    }
    if ( reader->itr )
    {
        hts_itr_destroy(reader->itr);
        reader->itr = NULL;
    }
    reader->nbuffer = 0;
    if ( reader->tbx_idx )
    {
        int tid = tbx_name2id(reader->tbx_idx, seq);
        if ( tid==-1 ) return -1;    // the sequence not present in this file
        reader->itr = tbx_itr_queryi(reader->tbx_idx,tid,start,end+1);
    }
    else
    {
        int tid = bcf_hdr_name2id(reader->header, seq);
        if ( tid==-1 ) return -1;    // the sequence not present in this file
        reader->itr = bcf_itr_queryi(reader->bcf_idx,tid,start,end+1);
    }
    if (!reader->itr) {
        hts_log_error("Could not seek: %s:%"PRIhts_pos"-%"PRIhts_pos, seq, start + 1, end + 1);
        abort();
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movabsq $0xfffffffffff, %rax    # imm = 0xFFFFFFFFFFF
cmpq %rax, -0x28(%rbp)
jl 0x3a854
movq -0x28(%rbp), %rcx
addq $0x1, %rcx
movl $0x1, %edi
leaq 0xd7bc2(%rip), %rsi     # 0x1123fe
leaq 0xd7bc8(%rip), %rdx     # 0x11240b
movb $0x0, %al
callq 0xa790
movl $0x1, %edi
callq 0x45d0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x3a878
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x11230
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x38(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3a8e8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x3d6b0
movl %eax, -0x2c(%rbp)
cmpl $-0x1, -0x2c(%rbp)
jne 0x3a8b4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3a97e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
movl -0x2c(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
addq $0x1, %rcx
leaq 0x3cea(%rip), %r8       # 0x3e5c0
callq 0x10560
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x3a939
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x3cc00
movl %eax, -0x30(%rbp)
cmpl $-0x1, -0x30(%rbp)
jne 0x3a90b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3a97e
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x30(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
addq $0x1, %rcx
leaq 0x10007(%rip), %r8      # 0x4a930
callq 0x10560
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x3a977
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
addq $0x1, %r8
movq -0x28(%rbp), %r9
addq $0x1, %r9
movl $0x1, %edi
leaq 0xd7a9a(%rip), %rsi     # 0x1123fe
leaq 0xd7ace(%rip), %rdx     # 0x112439
movb $0x0, %al
callq 0xa790
callq 0x4250
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/synced_bcf_reader.c
// Function: bcf_sr_regions_seek
int bcf_sr_regions_seek(bcf_sr_regions_t *reg, const char *seq)
{
    reg->iseq = reg->start = reg->end = -1;
    if ( khash_str2int_get(reg->seq_hash, seq, &reg->iseq) < 0 ) return -1;  // sequence seq not in regions

    // using in-memory regions
    if ( reg->regs )
    {
        reg->regs[reg->iseq].creg = -1;
        return 0;
    }

    // reading regions from tabix
    if ( reg->itr ) tbx_itr_destroy(reg->itr);
    reg->itr = tbx_itr_querys(reg->tbx, seq);
    if ( reg->itr ) return 0;

    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq $-0x1, 0xa8(%rax)
movq -0x10(%rbp), %rax
movq $-0x1, 0xa0(%rax)
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x9c(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x9c, %rdx
callq 0x3a580
cmpl $0x0, %eax
jge 0x3b6cc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3b775
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x3b707
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x9c(%rcx), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
movl $0x0, -0x4(%rbp)
jmp 0x3b775
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3b71f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x11230
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rcx
leaq 0x1f74(%rip), %rdx      # 0x3d6b0
leaq -0x2b1e3(%rip), %r8     # 0x10560
leaq 0x2e76(%rip), %r9       # 0x3e5c0
callq 0x13680
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3b76e
movl $0x0, -0x4(%rbp)
jmp 0x3b775
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: advance_creg
static int advance_creg(region_t *reg)
{
    int i = reg->creg + 1;
    while ( i<reg->nregs && reg->regs[i].start > reg->regs[i].end ) i++;    // regions with start>end are marked to skip by merge_regions()
    reg->creg = i;
    if ( i>=reg->nregs ) return -1;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpl 0x8(%rdx), %ecx
movb %al, -0x15(%rbp)
jge 0x3bc57
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movslq -0x14(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
setg %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x3bc60
jmp 0x3bc6b
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3bc15
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jl 0x3bc8a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3bc91
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: readers_next_region
static int _readers_next_region(bcf_srs_t *files)
{
    // Need to open new chromosome? Check number of lines in all readers' buffers
    int i, eos = 0;
    for (i=0; i<files->nreaders; i++)
        if ( !files->readers[i].itr && !files->readers[i].nbuffer ) eos++;

    if ( eos!=files->nreaders )
    {
        // Some of the readers still has buffered lines
        return 0;
    }

    // No lines in the buffer, need to open new region or quit.
    int prev_iseq = files->regions->iseq;
    hts_pos_t prev_end = files->regions->end;
    if ( bcf_sr_regions_next(files->regions)<0 ) return -1;
    files->regions->prev_end = prev_iseq==files->regions->iseq ? prev_end : -1;

    for (i=0; i<files->nreaders; i++)
        _reader_seek(&files->readers[i],files->regions->seq_names[files->regions->iseq],files->regions->start,files->regions->end);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x3bf0f
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x20(%rax)
jne 0x3bf02
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x38(%rax)
jne 0x3bf02
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3bf04
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3beba
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x30(%rcx), %eax
je 0x3bf27
movl $0x0, -0x4(%rbp)
jmp 0x3c023
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movl 0x9c(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0xa8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x3b780
cmpl $0x0, %eax
jge 0x3bf69
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3c023
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rcx
cmpl 0x9c(%rcx), %eax
jne 0x3bf86
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x3bf93
movq $-0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x3bf93
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rcx, 0xc0(%rax)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x3c01c
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movslq -0x14(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x90(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rcx
movslq 0x9c(%rcx), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0xa0(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0xa8(%rax), %rcx
callq 0x3a800
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3bfad
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: set_variant_boundaries
static void _set_variant_boundaries(bcf1_t *rec, hts_pos_t *beg, hts_pos_t *end)
{
    hts_pos_t off;
    if ( rec->n_allele )
    {
        off = rec->rlen;
        bcf_unpack(rec, BCF_UN_STR);
        int i;
        for (i=1; i<rec->n_allele; i++)
        {
            // Make symbolic alleles start at POS, although this is not strictly true for
            // <DEL>,<INS> where POS should be the position BEFORE the deletion/insertion.
            // However, since arbitrary symbolic alleles can be defined by the user, we
            // will simplify the interpretation of --targets-overlap and --region-overlap.
            int j = 0;
            char *ref = rec->d.allele[0];
            char *alt = rec->d.allele[i];
            while ( ref[j] && alt[j] && ref[j]==alt[j] ) j++;
            if ( off > j ) off = j;
            if ( !off ) break;
        }
    }
    else
        off = 0;

    *beg = rec->pos + off;
    *end = rec->pos + rec->rlen - 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x10, %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpl $0x0, %eax
je 0x3c81e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x50600
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x10, %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
jge 0x3c81c
movl $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0x3c7da
movq -0x38(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0x3c7da
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x3c7e3
jmp 0x3c7ee
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3c78e
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
cmpq %rcx, %rax
jle 0x3c803
movslq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x3c80c
jmp 0x3c81c
jmp 0x3c80e
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3c740
jmp 0x3c826
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
addq 0x8(%rax), %rcx
subq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: reader_shift_buffer
static void _reader_shift_buffer(bcf_sr_t *reader)
{
    if ( !reader->nbuffer ) return;
    int i;
    bcf1_t *tmp = reader->buffer[1];
    for (i=2; i<=reader->nbuffer; i++)
        reader->buffer[i-1] = reader->buffer[i];
    if ( reader->nbuffer > 1 )
        reader->buffer[reader->nbuffer] = tmp;
    reader->nbuffer--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x38(%rax)
jne 0x3c877
jmp 0x3c8f9
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x2, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jg 0x3c8ca
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3c88e
movq -0x8(%rbp), %rax
cmpl $0x1, 0x38(%rax)
jle 0x3c8ec
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x38(%rcx), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x38(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/./htslib/vcf.h
// Function: bcf_itr_next
static inline int bcf_itr_next(htsFile *htsfp, hts_itr_t *itr, void *r) {
        if (htsfp->is_bgzf)
            return hts_itr_next(htsfp->fp.bgzf, itr, r, 0);

        hts_log_error("Only bgzf compressed files can be used with iterators");
        errno = EINVAL;
        return -2;
    }

// 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
movl (%rax), %eax
shrl $0x4, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3c943
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x13ab0
movl %eax, -0x4(%rbp)
jmp 0x3c96f
movl $0x1, %edi
leaq 0xd5a6c(%rip), %rsi     # 0x1123bb
leaq 0xd5a72(%rip), %rdx     # 0x1123c8
movb $0x0, %al
callq 0xa790
callq 0x4050
movl $0x16, (%rax)
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: has_filter
static inline int has_filter(bcf_sr_t *reader, bcf1_t *line)
{
    int i, j;
    if ( !line->d.n_flt )
    {
        for (j=0; j<reader->nfilter_ids; j++)
            if ( reader->filter_ids[j]<0 ) return 1;
        return 0;
    }
    for (i=0; i<line->d.n_flt; i++)
    {
        for (j=0; j<reader->nfilter_ids; j++)
            if ( line->d.flt[i]==reader->filter_ids[j] ) return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x68(%rax)
jne 0x3c9dd
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x40(%rcx), %eax
jge 0x3c9d4
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x20(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jge 0x3c9c7
movl $0x1, -0x4(%rbp)
jmp 0x3ca4d
jmp 0x3c9c9
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x3c99d
movl $0x0, -0x4(%rbp)
jmp 0x3ca4d
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x68(%rcx), %eax
jge 0x3ca46
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x40(%rcx), %eax
jge 0x3ca39
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rcx
movslq -0x20(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x3ca2c
movl $0x1, -0x4(%rbp)
jmp 0x3ca4d
jmp 0x3ca2e
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x3c9f7
jmp 0x3ca3b
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3c9e4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: regions_cmp
static int regions_cmp(const void *aptr, const void *bptr)
{
    region1_t *a = (region1_t*)aptr;
    region1_t *b = (region1_t*)bptr;
    if ( a->start < b->start ) return -1;
    if ( a->start > b->start ) return 1;
    if ( a->end < b->end ) return -1;
    if ( a->end > b->end ) return 1;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jge 0x3d535
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3d58b
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jle 0x3d54e
movl $0x1, -0x4(%rbp)
jmp 0x3d58b
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x3d569
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3d58b
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jle 0x3d584
movl $0x1, -0x4(%rbp)
jmp 0x3d58b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: regions_merge
static void regions_merge(region_t *reg)
{
    int i = 0, j;
    while ( i<reg->nregs )
    {
        j = i + 1;
        while ( j<reg->nregs && reg->regs[i].end >= reg->regs[j].start )
        {
            if ( reg->regs[i].end < reg->regs[j].end ) reg->regs[i].end = reg->regs[j].end;
            reg->regs[j].start = 1;  reg->regs[j].end = 0;  // if beg>end, this region marked for skipping
            j++;
        }
        i = j;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x3d6ac
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpl 0x8(%rdx), %ecx
movb %al, -0x11(%rbp)
jge 0x3d5fa
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
setge %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x3d606
jmp 0x3d6a1
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jge 0x3d660
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x1, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3d5b8
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3d59f
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/bcf_sr_sort.c
// Function: bcf_sr_sort_set_active
int bcf_sr_sort_set_active(sr_sort_t *srt, int idx)
{
    hts_expand(int,idx+1,srt->mactive,srt->active);
    srt->nactive = 1;
    srt->active[srt->nactive - 1] = idx;
    return 0; // FIXME: check for errs in this function
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c8(%rcx), %eax
jle 0xdf6d4
movl -0xc(%rbp), %eax
addl $0x1, %eax
cmpl $0x1, %eax
jl 0xdf687
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xdf691
movl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xdf691
movl -0x10(%rbp), %eax
movslq %eax, %rdi
movq -0x8(%rbp), %rax
movslq 0x1c8(%rax), %rsi
movq -0x8(%rbp), %r9
addq $0x1d0, %r9             # imm = 0x1D0
movl $0x4, %ecx
xorl %r8d, %r8d
leaq 0x395cd(%rip), %rax     # 0x118c89
movq %rcx, %rdx
movq %rax, (%rsp)
callq 0x16180
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c8(%rax)
jmp 0xdf6d6
movq -0x8(%rbp), %rax
movl $0x1, 0x1c4(%rax)
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x1d0(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x1c4(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/bcf_sr_sort.c
// Function: bcf_sr_sort_add_active
int bcf_sr_sort_add_active(sr_sort_t *srt, int idx)
{
    hts_expand(int,idx+1,srt->mactive,srt->active);
    srt->nactive++;
    srt->active[srt->nactive - 1] = idx;
    return 0; // FIXME: check for errs in this function
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c8(%rcx), %eax
jle 0xdf794
movl -0xc(%rbp), %eax
addl $0x1, %eax
cmpl $0x1, %eax
jl 0xdf747
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xdf751
movl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xdf751
movl -0x10(%rbp), %eax
movslq %eax, %rdi
movq -0x8(%rbp), %rax
movslq 0x1c8(%rax), %rsi
movq -0x8(%rbp), %r9
addq $0x1d0, %r9             # imm = 0x1D0
movl $0x4, %ecx
xorl %r8d, %r8d
leaq 0x39524(%rip), %rax     # 0x118ca0
movq %rcx, %rdx
movq %rax, (%rsp)
callq 0x16180
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c8(%rax)
jmp 0xdf796
movq -0x8(%rbp), %rax
movl 0x1c4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1c4(%rax)
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x1d0(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x1c4(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/bcf_sr_sort.c
// Function: bcf_sr_sort_remove_reader
void bcf_sr_sort_remove_reader(bcf_srs_t *readers, sr_sort_t *srt, int i)
{
    //vcf_buf is allocated only in bcf_sr_sort_next
    //So, a call to bcf_sr_add_reader() followed immediately by bcf_sr_remove_reader()
    //would cause the program to crash in this segment
    if (srt->vcf_buf)
    {
        free(srt->vcf_buf[i].rec);
        if ( i+1 < srt->nsr )
            memmove(&srt->vcf_buf[i], &srt->vcf_buf[i+1], (srt->nsr - i - 1)*sizeof(vcf_buf_t));
        memset(srt->vcf_buf + srt->nsr - 1, 0, sizeof(vcf_buf_t));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x150(%rax)
je 0xe116f
movq -0x10(%rbp), %rax
movq 0x150(%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x45a0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movq -0x10(%rbp), %rcx
cmpl 0x1b8(%rcx), %eax
jge 0xe1142
movq -0x10(%rbp), %rax
movq 0x150(%rax), %rdi
movslq -0x14(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x150(%rax), %rsi
movl -0x14(%rbp), %eax
addl $0x1, %eax
cltq
shlq $0x4, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movl 0x1b8(%rax), %eax
subl -0x14(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
shlq $0x4, %rdx
callq 0x4830
movq -0x10(%rbp), %rax
movq 0x150(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0x1b8(%rax), %rax
shlq $0x4, %rax
addq %rax, %rdi
addq $-0x10, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x4240
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/./htslib/kbitset.h
// Function: kbs_resize2
static inline int kbs_resize2(kbitset_t **bsp, size_t ni_new, int fill)
{
	kbitset_t *bs = *bsp;
	size_t n = bs? bs->n : 0;
	size_t n_new = (ni_new + KBS_ELTBITS-1) / KBS_ELTBITS;
	if (bs == NULL || n_new > bs->n_max) {
		bs = (kbitset_t *)
			realloc(*bsp, sizeof(kbitset_t) + n_new * sizeof(unsigned long));
		if (bs == NULL) return -1;

		bs->n_max = n_new;
		*bsp = bs;
	}

	bs->n = n_new;
	if (n_new >= n)
		memset(&bs->b[n], fill? ~0 : 0, (n_new - n) * sizeof (unsigned long));
	bs->b[n_new] = kbs_last_mask(ni_new);
	// Need to clear excess bits when fill!=0 or n_new<n; always is simpler.
	bs->b[n_new-1] &= bs->b[n_new];
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xe31f2
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0xe31fa
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0xe31fa
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x40, %rax
subq $0x1, %rax
shrq $0x6, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xe322b
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0xe3271
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rsi
shlq $0x3, %rsi
addq $0x18, %rsi
callq 0x4840
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xe325a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe3300
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jb 0xe32bd
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
movq -0x30(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movl -0x1c(%rbp), %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovnel %ecx, %eax
movq -0x38(%rbp), %rdx
subq -0x30(%rbp), %rdx
shlq $0x3, %rdx
movzbl %al, %esi
callq 0x4240
movq -0x18(%rbp), %rdi
callq 0xe3310
movq %rax, %rdx
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rdx, 0x10(%rax,%rcx,8)
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rdx
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
andq 0x10(%rax,%rcx,8), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
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/bcf_sr_sort.c
// Function: multi_is_subset
static int multi_is_subset(var_t *avar, var_t *bvar)
{
    char *abeg = avar->str;
    while ( *abeg )
    {
        char *aend = abeg;
        while ( *aend && *aend!=',' ) aend++;

        char *bbeg = bvar->str;
        while ( *bbeg )
        {
            char *bend = bbeg;
            while ( *bend && *bend!=',' ) bend++;
            if ( bend - bbeg == aend - abeg && !strncasecmp(abeg,bbeg,bend-bbeg) ) return 1;
            bbeg = *bend ? bend+1 : bend;
        }
        abeg = *aend ? aend+1 : aend;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0xe368f
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0xe3581
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0xe358a
jmp 0xe3598
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xe3560
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpb $0x0, (%rax)
je 0xe3660
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x3a(%rbp)
je 0xe35d9
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
setne %al
movb %al, -0x3a(%rbp)
movb -0x3a(%rbp), %al
testb $0x1, %al
jne 0xe35e2
jmp 0xe35f0
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xe35b8
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jne 0xe3631
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rax
subq %rax, %rdx
callq 0x4640
cmpl $0x0, %eax
jne 0xe3631
movl $0x1, -0x4(%rbp)
jmp 0xe3696
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xe364b
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0xe3653
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xe35a3
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xe367a
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0xe3682
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xe354b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/bcf_sr_sort.c
// Function: remove_vset
static void remove_vset(sr_sort_t *srt, int jvset)
{
    if ( jvset+1 < srt->nvset )
    {
        varset_t tmp = srt->vset[jvset];
        memmove(&srt->vset[jvset], &srt->vset[jvset+1], sizeof(varset_t)*(srt->nvset - jvset - 1));
        srt->vset[srt->nvset-1] = tmp;

        int *jmat = srt->pmat + jvset*srt->ngrp;
        memmove(jmat, &jmat[srt->ngrp],sizeof(int)*(srt->nvset - jvset - 1)*srt->ngrp);

        memmove(&srt->cnt[jvset], &srt->cnt[jvset+1], sizeof(int)*(srt->nvset - jvset - 1));
    }
    srt->nvset--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movq -0x8(%rbp), %rcx
cmpl 0x110(%rcx), %eax
jge 0xe383f
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rdi
movslq -0xc(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rsi
movl -0xc(%rbp), %eax
addl $0x1, %eax
cltq
shlq $0x5, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x110(%rax), %eax
subl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
shlq $0x5, %rdx
callq 0x4830
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x110(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x120(%rax), %rax
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rdx
imull 0x128(%rdx), %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x8(%rbp), %rax
movslq 0x128(%rax), %rax
shlq $0x2, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x110(%rax), %eax
subl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
movq -0x8(%rbp), %rax
movslq 0x128(%rax), %rax
imulq %rax, %rdx
callq 0x4830
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rdi
movslq -0xc(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rsi
movl -0xc(%rbp), %eax
addl $0x1, %eax
cltq
shlq $0x2, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x110(%rax), %eax
subl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
callq 0x4830
movq -0x8(%rbp), %rax
movl 0x110(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x110(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ryuichiueda[P]glueutils/src/juz.c
// Function: usage
void usage(void){
	fputs("juz: repeatedly chain the same command in a pipeline\n", stderr);
	fputs("usage: juz <num> <command> [args]\n", stderr);
	fputs("\nCopyright (C) 2021 Ryuichi Ueda\n", stderr);
	fputs("Released under the MIT License.\n", stderr);
	fputs("https://github.com/ryuichiueda/glueutils\n", stderr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x2dfd(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xdff(%rip), %rdi       # 0x2004
callq 0x1060
movq 0x2de7(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xe1f(%rip), %rdi       # 0x203a
callq 0x1060
movq 0x2dd1(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xe2c(%rip), %rdi       # 0x205d
callq 0x1060
movq 0x2dbb(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xe38(%rip), %rdi       # 0x207f
callq 0x1060
movq 0x2da5(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xe43(%rip), %rdi       # 0x20a0
callq 0x1060
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ryuichiueda[P]glueutils/src/juz.c
// Function: dup_and_close
void dup_and_close(int old, int new)
{
	try_close(new);
	if(dup2(old, new) == -1){
		printf("Error: %s\n", strerror(errno));
		exit(1);
	}
	try_close(old);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x8(%rbp), %edi
callq 0x1270
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x1040
cmpl $-0x1, %eax
jne 0x130d
callq 0x1030
movl (%rax), %edi
callq 0x10d0
movq %rax, %rsi
leaq 0xdce(%rip), %rdi       # 0x20ca
movb $0x0, %al
callq 0x1050
movl $0x1, %edi
callq 0x10c0
movl -0x4(%rbp), %edi
callq 0x1270
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)