// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/tabix.c
// Function: query_regions
static int query_regions(args_t *args, tbx_conf_t *conf, char *fname, char **regs, int nregs)
{
    int i;
    htsThreadPool tpool = {NULL, 0};
    htsFile *fp = hts_open(fname,"r");
    if ( !fp ) error_errno("Could not open \"%s\"", fname);
    enum htsExactFormat format = hts_get_format(fp)->format;
    if (args->cache_megs)
        hts_set_cache_size(fp, args->cache_megs * 1048576);

    //set threads if needed, errors are logged and ignored
    if (args->threads >= 1) {
        if (!(tpool.pool = hts_tpool_init(args->threads))) {
            hts_log_info("Could not initialize thread pool!");
        }
        if (hts_set_thread_pool(fp, &tpool) < 0) {
            hts_log_info("Could not set thread pool!");
        }
    }

    regidx_t *reg_idx = NULL;
    if ( args->targets_fname )
    {
        reg_idx = regidx_init(args->targets_fname, NULL, NULL, 0, NULL);
        if (!reg_idx) {
            RELEASE_TPOOL(tpool.pool);
            error_errno("Could not build region list for \"%s\"",
                        args->targets_fname);
        }
    }

    if ( format == bcf )
    {
        htsFile *out = hts_open("-","w");
        if ( !out ) {
            RELEASE_TPOOL(tpool.pool);
            error_errno("Could not open stdout");
        }
        if (hts_set_thread_pool(out, &tpool) < 0) {
            hts_log_info("Could not set thread pool to output file!");
        }
        hts_idx_t *idx = bcf_index_load3(fname, NULL, args->download_index ? HTS_IDX_SAVE_REMOTE : 0);
        if ( !idx ) {
            RELEASE_TPOOL(tpool.pool);
            error_errno("Could not load .csi index of \"%s\"", fname);
        }

        bcf_hdr_t *hdr = bcf_hdr_read(fp);
        if ( !hdr ) {
            RELEASE_TPOOL(tpool.pool);
            error_errno("Could not read the header from \"%s\"", fname);
        }

        if ( args->print_header ) {
            if ( bcf_hdr_write(out,hdr)!=0 ) {
                RELEASE_TPOOL(tpool.pool);
                error_errno("Failed to write to stdout");
            }
        }
        if ( !args->header_only )
        {
            assert(regs != NULL);
            bcf1_t *rec = bcf_init();
            if (!rec) {
                RELEASE_TPOOL(tpool.pool);
                error_errno(NULL);
            }
            for (i=0; i<nregs; i++)
            {
                int ret, found = 0;
                hts_itr_t *itr = bcf_itr_querys(idx,hdr,regs[i]);
                if (!itr) continue;
                while ((ret = bcf_itr_next(fp, itr, rec)) >=0 )
                {
                    if ( reg_idx )
                    {
                        const char *chr = bcf_seqname(hdr,rec);
                        if (!chr) {
                            RELEASE_TPOOL(tpool.pool);
                            error("Bad BCF record in \"%s\" : "
                                  "Invalid CONTIG id %d\n",
                                  fname, rec->rid);
                        }
                        if ( !regidx_overlap(reg_idx,chr,rec->pos,rec->pos+rec->rlen-1, NULL) ) continue;
                    }
                    if (!found) {
                        if (args->separate_regs) printf("%c%s\n", conf->meta_char, regs[i]);
                        found = 1;
                    }
                    if ( bcf_write(out,hdr,rec)!=0 ) {
                        RELEASE_TPOOL(tpool.pool);
                        error_errno("Failed to write to stdout");
                    }
                }

                if (ret < -1) {
                    RELEASE_TPOOL(tpool.pool);
                    error_errno("Reading \"%s\" failed", fname);
                }
                bcf_itr_destroy(itr);
            }
            bcf_destroy(rec);
        }
        if ( hts_close(out) ) {
            RELEASE_TPOOL(tpool.pool);
            error_errno("hts_close returned non-zero status for stdout");
        }

        bcf_hdr_destroy(hdr);
        hts_idx_destroy(idx);
    }
    else if ( format==vcf || format==sam || format==bed || format==text_format || format==unknown_format )
    {
        tbx_t *tbx = tbx_index_load3(fname, NULL, args->download_index ? HTS_IDX_SAVE_REMOTE : 0);
        if ( !tbx ) {
            RELEASE_TPOOL(tpool.pool);
            error_errno("Could not load .tbi/.csi index of %s", fname);
        }
        kstring_t str = {0,0,0};
        if ( args->print_header )
        {
            int ret;
            while ((ret = hts_getline(fp, KS_SEP_LINE, &str)) >= 0)
            {
                if ( !str.l || str.s[0]!=tbx->conf.meta_char ) break;
                if (puts(str.s) < 0) {
                    RELEASE_TPOOL(tpool.pool);
                    error_errno("Error writing to stdout");
                }
            }
            if (ret < -1) {
                RELEASE_TPOOL(tpool.pool);
                error_errno("Reading \"%s\" failed", fname);
            }
        }
        if ( !args->header_only )
        {
            int nseq;
            const char **seq = NULL;
            if ( reg_idx ) {
                seq = tbx_seqnames(tbx, &nseq);
                if (!seq) {
                    RELEASE_TPOOL(tpool.pool);
                    error_errno("Failed to get sequence names list");
                }
            }
            for (i=0; i<nregs; i++)
            {
                int ret, found = 0;
                hts_itr_t *itr = tbx_itr_querys(tbx, regs[i]);
                if ( !itr ) continue;
                while ((ret = tbx_itr_next(fp, tbx, itr, &str)) >= 0)
                {
                    if ( reg_idx && !regidx_overlap(reg_idx,seq[itr->curr_tid],itr->curr_beg,itr->curr_end-1, NULL) ) continue;
                    if (!found) {
                        if (args->separate_regs) printf("%c%s\n", conf->meta_char, regs[i]);
                        found = 1;
                    }
                    if (puts(str.s) < 0) {
                        RELEASE_TPOOL(tpool.pool);
                        error_errno("Failed to write to stdout");
                    }
                }
                if (ret < -1) {
                    RELEASE_TPOOL(tpool.pool);
                    error_errno("Reading \"%s\" failed", fname);
                }
                tbx_itr_destroy(itr);
            }
            free(seq);
        }
        free(str.s);
        tbx_destroy(tbx);
    }
    else if ( format==bam ) {
        RELEASE_TPOOL(tpool.pool);
        error("Please use \"samtools view\" for querying BAM files.\n");
    }

    if ( reg_idx ) regidx_destroy(reg_idx);
    if ( hts_close(fp) ) {
        RELEASE_TPOOL(tpool.pool);
        error_errno("hts_close returned non-zero status: %s", fname);
    }

    for (i=0; i<nregs; i++) free(regs[i]);
    free(regs);
    RELEASE_TPOOL(tpool.pool);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x4250
movq -0x18(%rbp), %rdi
leaq 0x106696(%rip), %rsi    # 0x10e0d0
callq 0x190c0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x7a5c
movq -0x18(%rbp), %rsi
leaq 0x10226e(%rip), %rdi    # 0x109cc3
movb $0x0, %al
callq 0x5e40
movq -0x40(%rbp), %rdi
callq 0x1b6f0
movl 0x4(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x7a88
movq -0x40(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %esi
shll $0x14, %esi
callq 0x1ba70
movq -0x8(%rbp), %rax
cmpl $0x1, 0x24(%rax)
jl 0x7af0
movq -0x8(%rbp), %rax
movl 0x24(%rax), %edi
callq 0x4da30
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x7ac2
movl $0x4, %edi
leaq 0x1022e9(%rip), %rsi    # 0x109d9d
leaq 0x101792(%rip), %rdx    # 0x10924d
movb $0x0, %al
callq 0x18fa0
movq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1b9d0
cmpl $0x0, %eax
jge 0x7aee
movl $0x4, %edi
leaq 0x1022bd(%rip), %rsi    # 0x109d9d
leaq 0x101788(%rip), %rdx    # 0x10926f
movb $0x0, %al
callq 0x18fa0
jmp 0x7af0
movq $0x0, -0x50(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x7b59
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
callq 0x2c8f0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x7b57
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x7b41
movq -0x58(%rbp), %rdi
callq 0x4e900
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x1021d4(%rip), %rdi    # 0x109d24
movb $0x0, %al
callq 0x5e40
jmp 0x7b59
cmpl $0x9, -0x44(%rbp)
jne 0x7fac
leaq 0x105e6e(%rip), %rdi    # 0x10d9d8
leaq 0x10577b(%rip), %rsi    # 0x10d2ec
callq 0x190c0
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0x7ba7
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x7b99
movq -0x68(%rbp), %rdi
callq 0x4e900
leaq 0x10220b(%rip), %rdi    # 0x109dab
movb $0x0, %al
callq 0x5e40
movq -0x60(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1b9d0
cmpl $0x0, %eax
jge 0x7bd3
movl $0x4, %edi
leaq 0x1021d8(%rip), %rsi    # 0x109d9d
leaq 0x1016fa(%rip), %rdx    # 0x1092c6
movb $0x0, %al
callq 0x18fa0
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
xorl %edx, %edx
movl $0x1, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edx
xorl %eax, %eax
movl %eax, %esi
callq 0x5ed60
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x7c29
movq -0x38(%rbp), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
je 0x7c17
movq -0x78(%rbp), %rdi
callq 0x4e900
movq -0x18(%rbp), %rsi
leaq 0x1020d5(%rip), %rdi    # 0x109cf7
movb $0x0, %al
callq 0x5e40
movq -0x40(%rbp), %rdi
callq 0x54280
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
jne 0x7c70
movq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
je 0x7c5e
movq -0x88(%rbp), %rdi
callq 0x4e900
movq -0x18(%rbp), %rsi
leaq 0x102158(%rip), %rdi    # 0x109dc1
movb $0x0, %al
callq 0x5e40
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x7cbd
movq -0x60(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x549e0
cmpl $0x0, %eax
je 0x7cbb
movq -0x38(%rbp), %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x90(%rbp)
je 0x7cad
movq -0x90(%rbp), %rdi
callq 0x4e900
leaq 0x102131(%rip), %rdi    # 0x109de5
movb $0x0, %al
callq 0x5e40
jmp 0x7cbd
movq -0x8(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x7f58
cmpq $0x0, -0x20(%rbp)
je 0x7cd4
jmp 0x7cf3
leaq 0x102124(%rip), %rdi    # 0x109dff
leaq 0x10212a(%rip), %rsi    # 0x109e0c
movl $0x10b, %edx            # imm = 0x10B
leaq 0x102126(%rip), %rcx    # 0x109e14
callq 0x42e0
callq 0x54e80
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
jne 0x7d35
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
je 0x7d2a
movq -0xa0(%rbp), %rdi
callq 0x4e900
xorl %eax, %eax
movl %eax, %edi
movb $0x0, %al
callq 0x5e40
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7f4c
movl $0x0, -0xa8(%rbp)
movq -0x70(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x80(%rbp), %rcx
leaq 0x753(%rip), %rdx       # 0x84c0
leaq 0x16ffc(%rip), %r8      # 0x1ed70
leaq 0x4e995(%rip), %r9      # 0x56710
callq 0x21e90
movq %rax, -0xb0(%rbp)
cmpq $0x0, -0xb0(%rbp)
jne 0x7d96
jmp 0x7f3e
jmp 0x7d98
movq -0x40(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movq -0x98(%rbp), %rdx
callq 0x84f0
movl %eax, -0xa4(%rbp)
cmpl $0x0, %eax
jl 0x7ef6
cmpq $0x0, -0x50(%rbp)
je 0x7e6b
movq -0x80(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x8570
movq %rax, -0xb8(%rbp)
cmpq $0x0, -0xb8(%rbp)
jne 0x7e27
movq -0x38(%rbp), %rax
movq %rax, -0xc0(%rbp)
cmpq $0x0, -0xc0(%rbp)
je 0x7e0b
movq -0xc0(%rbp), %rdi
callq 0x4e900
movq -0x18(%rbp), %rsi
movq -0x98(%rbp), %rax
movl 0x10(%rax), %edx
leaq 0x102034(%rip), %rdi    # 0x109e54
movb $0x0, %al
callq 0x5d70
movq -0x50(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movq -0x98(%rbp), %rax
movq (%rax), %rdx
movq -0x98(%rbp), %rax
movq (%rax), %rcx
movq -0x98(%rbp), %rax
addq 0x8(%rax), %rcx
subq $0x1, %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x2cf00
cmpl $0x0, %eax
jne 0x7e69
jmp 0x7d98
jmp 0x7e6b
cmpl $0x0, -0xa8(%rbp)
jne 0x7ea9
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x7e9f
movq -0x10(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x101feb(%rip), %rdi    # 0x109e83
movb $0x0, %al
callq 0x4060
movl $0x1, -0xa8(%rbp)
movq -0x60(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x98(%rbp), %rdx
callq 0x573d0
cmpl $0x0, %eax
je 0x7ef1
movq -0x38(%rbp), %rax
movq %rax, -0xc8(%rbp)
cmpq $0x0, -0xc8(%rbp)
je 0x7ee3
movq -0xc8(%rbp), %rdi
callq 0x4e900
leaq 0x101efb(%rip), %rdi    # 0x109de5
movb $0x0, %al
callq 0x5e40
jmp 0x7d98
cmpl $-0x1, -0xa4(%rbp)
jge 0x7f32
movq -0x38(%rbp), %rax
movq %rax, -0xd0(%rbp)
cmpq $0x0, -0xd0(%rbp)
je 0x7f20
movq -0xd0(%rbp), %rdi
callq 0x4e900
movq -0x18(%rbp), %rsi
leaq 0x101f5e(%rip), %rdi    # 0x109e89
movb $0x0, %al
callq 0x5e40
movq -0xb0(%rbp), %rdi
callq 0x1fa40
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x7d3c
movq -0x98(%rbp), %rdi
callq 0x55270
movq -0x60(%rbp), %rdi
callq 0x1b1e0
cmpl $0x0, %eax
je 0x7f95
movq -0x38(%rbp), %rax
movq %rax, -0xd8(%rbp)
cmpq $0x0, -0xd8(%rbp)
je 0x7f87
movq -0xd8(%rbp), %rdi
callq 0x4e900
leaq 0x101f0f(%rip), %rdi    # 0x109e9d
movb $0x0, %al
callq 0x5e40
movq -0x80(%rbp), %rdi
callq 0x54020
movq -0x70(%rbp), %rdi
callq 0x1b4d0
jmp 0x83b9
cmpl $0x8, -0x44(%rbp)
je 0x7fce
cmpl $0x3, -0x44(%rbp)
je 0x7fce
cmpl $0xd, -0x44(%rbp)
je 0x7fce
cmpl $0x2, -0x44(%rbp)
je 0x7fce
cmpl $0x0, -0x44(%rbp)
jne 0x8380
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
xorl %edx, %edx
movl $0x1, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edx
xorl %eax, %eax
movl %eax, %esi
callq 0x4af70
movq %rax, -0xe0(%rbp)
cmpq $0x0, -0xe0(%rbp)
jne 0x8033
movq -0x38(%rbp), %rax
movq %rax, -0xe8(%rbp)
cmpq $0x0, -0xe8(%rbp)
je 0x8021
movq -0xe8(%rbp), %rdi
callq 0x4e900
movq -0x18(%rbp), %rsi
leaq 0x101e9f(%rip), %rdi    # 0x109ecb
movb $0x0, %al
callq 0x5e40
leaq -0x100(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x4250
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x811b
jmp 0x8056
movq -0x40(%rbp), %rdi
movl $0x2, %esi
leaq -0x100(%rbp), %rdx
callq 0x1bf40
movl %eax, -0x104(%rbp)
cmpl $0x0, %eax
jl 0x80dd
cmpq $0x0, -0x100(%rbp)
je 0x8096
movq -0xf0(%rbp), %rax
movsbl (%rax), %eax
movq -0xe0(%rbp), %rcx
cmpl 0x10(%rcx), %eax
je 0x8098
jmp 0x80dd
movq -0xf0(%rbp), %rdi
callq 0x47e0
cmpl $0x0, %eax
jge 0x80d8
movq -0x38(%rbp), %rax
movq %rax, -0x110(%rbp)
cmpq $0x0, -0x110(%rbp)
je 0x80ca
movq -0x110(%rbp), %rdi
callq 0x4e900
leaq 0x101e1f(%rip), %rdi    # 0x109ef0
movb $0x0, %al
callq 0x5e40
jmp 0x8056
cmpl $-0x1, -0x104(%rbp)
jge 0x8119
movq -0x38(%rbp), %rax
movq %rax, -0x118(%rbp)
cmpq $0x0, -0x118(%rbp)
je 0x8107
movq -0x118(%rbp), %rdi
callq 0x4e900
movq -0x18(%rbp), %rsi
leaq 0x101d77(%rip), %rdi    # 0x109e89
movb $0x0, %al
callq 0x5e40
jmp 0x811b
movq -0x8(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x8366
movq $0x0, -0x128(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x8190
movq -0xe0(%rbp), %rdi
leaq -0x11c(%rbp), %rsi
callq 0x4b220
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x128(%rbp)
jne 0x818e
movq -0x38(%rbp), %rax
movq %rax, -0x130(%rbp)
cmpq $0x0, -0x130(%rbp)
je 0x8180
movq -0x130(%rbp), %rdi
callq 0x4e900
leaq 0x101d81(%rip), %rdi    # 0x109f08
movb $0x0, %al
callq 0x5e40
jmp 0x8190
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x835a
movl $0x0, -0x138(%rbp)
movq -0xe0(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0xe0(%rbp), %rcx
leaq 0x412be(%rip), %rdx     # 0x49490
leaq 0x16b97(%rip), %r8      # 0x1ed70
leaq 0x421c0(%rip), %r9      # 0x4a3a0
callq 0x21e90
movq %rax, -0x140(%rbp)
cmpq $0x0, -0x140(%rbp)
jne 0x81fb
jmp 0x834c
jmp 0x81fd
movq -0x40(%rbp), %rdi
callq 0x1bb20
movq %rax, %rdi
movq -0x140(%rbp), %rsi
movq -0xe0(%rbp), %rcx
leaq -0x100(%rbp), %rdx
callq 0x222c0
movl %eax, -0x134(%rbp)
cmpl $0x0, %eax
jl 0x8304
cmpq $0x0, -0x50(%rbp)
je 0x8281
movq -0x50(%rbp), %rdi
movq -0x128(%rbp), %rax
movq -0x140(%rbp), %rcx
movslq 0x30(%rcx), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x140(%rbp), %rax
movq 0x40(%rax), %rdx
movq -0x140(%rbp), %rax
movq 0x48(%rax), %rcx
subq $0x1, %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x2cf00
cmpl $0x0, %eax
jne 0x8281
jmp 0x81fd
cmpl $0x0, -0x138(%rbp)
jne 0x82bf
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x82b5
movq -0x10(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x101bd5(%rip), %rdi    # 0x109e83
movb $0x0, %al
callq 0x4060
movl $0x1, -0x138(%rbp)
movq -0xf0(%rbp), %rdi
callq 0x47e0
cmpl $0x0, %eax
jge 0x82ff
movq -0x38(%rbp), %rax
movq %rax, -0x148(%rbp)
cmpq $0x0, -0x148(%rbp)
je 0x82f1
movq -0x148(%rbp), %rdi
callq 0x4e900
leaq 0x101aed(%rip), %rdi    # 0x109de5
movb $0x0, %al
callq 0x5e40
jmp 0x81fd
cmpl $-0x1, -0x134(%rbp)
jge 0x8340
movq -0x38(%rbp), %rax
movq %rax, -0x150(%rbp)
cmpq $0x0, -0x150(%rbp)
je 0x832e
movq -0x150(%rbp), %rdi
callq 0x4e900
movq -0x18(%rbp), %rsi
leaq 0x101b50(%rip), %rdi    # 0x109e89
movb $0x0, %al
callq 0x5e40
movq -0x140(%rbp), %rdi
callq 0x1fa40
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x8197
movq -0x128(%rbp), %rdi
callq 0x45b0
movq -0xf0(%rbp), %rdi
callq 0x45b0
movq -0xe0(%rbp), %rdi
callq 0x4ad70
jmp 0x83b7
cmpl $0x4, -0x44(%rbp)
jne 0x83b5
movq -0x38(%rbp), %rax
movq %rax, -0x158(%rbp)
cmpq $0x0, -0x158(%rbp)
je 0x83a7
movq -0x158(%rbp), %rdi
callq 0x4e900
leaq 0x101b7c(%rip), %rdi    # 0x109f2a
movb $0x0, %al
callq 0x5d70
jmp 0x83b7
jmp 0x83b9
cmpq $0x0, -0x50(%rbp)
je 0x83c9
movq -0x50(%rbp), %rdi
callq 0x2c7d0
movq -0x40(%rbp), %rdi
callq 0x1b1e0
cmpl $0x0, %eax
je 0x840a
movq -0x38(%rbp), %rax
movq %rax, -0x160(%rbp)
cmpq $0x0, -0x160(%rbp)
je 0x83f8
movq -0x160(%rbp), %rdi
callq 0x4e900
movq -0x18(%rbp), %rsi
leaq 0x101b5b(%rip), %rdi    # 0x109f5e
movb $0x0, %al
callq 0x5e40
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x8435
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x45b0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x8411
movq -0x20(%rbp), %rdi
callq 0x45b0
movq -0x38(%rbp), %rax
movq %rax, -0x168(%rbp)
cmpq $0x0, -0x168(%rbp)
je 0x845f
movq -0x168(%rbp), %rdi
callq 0x4e900
xorl %eax, %eax
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
nopw (%rax,%rax)