// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/test-bcf-sr.c
// Function: main
int main(int argc, char *argv[])
{
    static struct option loptions[] =
    {
        {"help",no_argument,NULL,'h'},
        {"output-fmt",required_argument,NULL,'O'},
        {"pair",required_argument,NULL,'p'},
        {"regions",required_argument,NULL,'r'},
        {"targets",required_argument,NULL,'t'},
        {"no-index",no_argument,NULL,1000},
        {"args",no_argument,NULL,1001},
        {"usefptr",no_argument,NULL,'u'},
        {NULL,0,NULL,0}
    };

    int c, pair = 0, use_index = 1, use_fofn = 1, usefptr = 0;
    enum htsExactFormat out_fmt = text_format; // for original pos + alleles
    const char *out_fn = NULL, *regions = NULL, *targets = NULL;
    htsFile **htsfp = NULL;
    while ((c = getopt_long(argc, argv, "o:O:p:r:t:hu", loptions, NULL)) >= 0)
    {
        switch (c)
        {
            case 'o':
                out_fn = optarg;
                break;
            case 'O':
                if (!strcasecmp(optarg, "vcf"))          out_fmt = vcf;
                else if (!strcasecmp(optarg, "bcf"))     out_fmt = bcf;
                else if (!strcasecmp(optarg, "summary")) out_fmt = text_format;
                else error("Unknown output format \"%s\"\n", optarg);
                break;
            case 'p':
                if ( !strcmp(optarg,"snps") )            pair |= BCF_SR_PAIR_SNPS;
                else if ( !strcmp(optarg,"snp+ref") )    pair |= BCF_SR_PAIR_SNPS|BCF_SR_PAIR_SNP_REF;
                else if ( !strcmp(optarg,"snps+ref") )   pair |= BCF_SR_PAIR_SNPS|BCF_SR_PAIR_SNP_REF;
                else if ( !strcmp(optarg,"indels") )     pair |= BCF_SR_PAIR_INDELS;
                else if ( !strcmp(optarg,"indel+ref") )  pair |= BCF_SR_PAIR_INDELS|BCF_SR_PAIR_INDEL_REF;
                else if ( !strcmp(optarg,"indels+ref") ) pair |= BCF_SR_PAIR_INDELS|BCF_SR_PAIR_INDEL_REF;
                else if ( !strcmp(optarg,"both") )       pair |= BCF_SR_PAIR_BOTH;
                else if ( !strcmp(optarg,"both+ref") )   pair |= BCF_SR_PAIR_BOTH_REF;
                else if ( !strcmp(optarg,"any") )        pair |= BCF_SR_PAIR_ANY;
                else if ( !strcmp(optarg,"all") )        pair |= BCF_SR_PAIR_ANY;
                else if ( !strcmp(optarg,"some") )       pair |= BCF_SR_PAIR_SOME;
                else if ( !strcmp(optarg,"exact") )      pair  = BCF_SR_PAIR_EXACT;
                else error("The --pair logic \"%s\" not recognised.\n", optarg);
                break;
            case 'r':
                regions = optarg;
                break;
            case 't':
                targets = optarg;
                break;
            case 1000:
                use_index = 0;
                break;
            case 1001:
                use_fofn = 0;
                break;
            case 'u':
                usefptr = 1;    //use htsfile interface instead of fname i/f
                break;
            case 'h':
                usage(EXIT_SUCCESS);
            default: usage(EXIT_FAILURE);
        }
    }
    if ( !pair ) pair = BCF_SR_PAIR_EXACT;
    if ( optind == argc ) usage(EXIT_FAILURE);

    int i, nvcf;
    char **vcfs = NULL;
    if (use_fofn) {
        vcfs = hts_readlist(argv[optind], 1, &nvcf);
        if ( !vcfs ) error("Could not parse %s\n", argv[optind]);
    } else {
        vcfs = &argv[optind];
        nvcf = argc - optind;
    }

    bcf_srs_t *sr = bcf_sr_init();
    if (!sr) error("bcf_sr_init() failed\n");
    bcf_sr_set_opt(sr, BCF_SR_PAIR_LOGIC, pair);
    if (use_index) {
        bcf_sr_set_opt(sr, BCF_SR_REQUIRE_IDX);
    } else {
        bcf_sr_set_opt(sr, BCF_SR_ALLOW_NO_IDX);
    }

    if (regions)
    {
        if (bcf_sr_set_regions(sr, regions, 0) != 0)
            error("Failed to set regions\n");
    }

    if (targets)
    {
        if (bcf_sr_set_targets(sr, targets, 0, 0) != 0)
            error("Failed to set targets\n");
    }

    if (usefptr && !(htsfp = malloc(sizeof(htsFile*) * nvcf))) {
        error("Failed to allocate memory\n");
    }

    for (i=0; i<nvcf; i++) {
        if (!usefptr) {
            if ( !bcf_sr_add_reader(sr,vcfs[i]) ) {
                error("Failed to open %s: %s\n", vcfs[i],
                    bcf_sr_strerror(sr->errnum));
            }
        } else {    //use htsfile i/f
            if (!(htsfp[i] = hts_open(vcfs[i], "r"))) {
                error("Failed to open %s: %s\n", vcfs[i],
                    bcf_sr_strerror(sr->errnum));
            }
            /*with name, index can be anywhere, named as anything
              w/o name it has to be along with file with default naming*/

            const char *idxname = strstr(vcfs[i], HTS_IDX_DELIM);
            idxname += idxname ? sizeof(HTS_IDX_DELIM) - 1 : 0;
            if ( !bcf_sr_add_hreader(sr, htsfp[i], 1, idxname) ) {
                error("Failed to add reader %s: %s\n", vcfs[i],
                    bcf_sr_strerror(sr->errnum));
            }
        }
    }

    if (!sr->readers || sr->nreaders < 1)
        error("No readers set, even though one was added\n");

    if (out_fmt == text_format) {
        FILE *out = stdout;
        if (out_fn)
        {
            out = fopen(out_fn, "w");
            if (!out) error("Couldn't open \"%s\" for writing: %s\n",
                            out_fn, strerror(errno));
        }
        write_summary_format(sr, out);
        if (out_fn)
        {
            if (fclose(out) != 0)
                error("Error on closing %s : %s\n",
                      out_fn, strerror(errno));
        }
    } else {
        const char *fmt_type = out_fmt == vcf ? "VCF" : "BCF";

        bcf_hdr_t *hdr = bcf_sr_get_header(sr, 0);
        if (!hdr) error("%s output, but don't have a header\n", fmt_type);

        if (!out_fn) { out_fn = "-"; }
        vcfFile *vcf_out = vcf_open(out_fn, out_fmt == vcf ? "w" : "wb");
        if (!vcf_out) error("Couldn't open \"%s\" for writing: %s\n",
                            out_fn, strerror(errno));
        write_vcf_bcf_format(sr, hdr, vcf_out, fmt_type);
        if (vcf_close(vcf_out) != 0)
            error("Error on closing \"%s\"\n", out_fn);
    }

    if (sr->errnum) error("Synced reader error: %s\n",
                          bcf_sr_strerror(sr->errnum));

    bcf_sr_destroy(sr);
    if (use_fofn)
    {
        for (i=0; i<nvcf; i++)
            free(vcfs[i]);
        free(vcfs);
    }
    if (usefptr) {
        //files are closed along with sr destroy
        free(htsfp);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movl $0x1, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x2, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x1081e3(%rip), %rdx    # 0x10e31d
leaq 0x12c3cf(%rip), %rcx    # 0x132510
xorl %eax, %eax
movl %eax, %r8d
callq 0x4860
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jl 0x64f8
movl -0x14(%rbp), %eax
movl %eax, -0x8c(%rbp)
subl $0x4f, %eax
je 0x6209
jmp 0x616b
movl -0x8c(%rbp), %eax
subl $0x68, %eax
je 0x64e2
jmp 0x617c
movl -0x8c(%rbp), %eax
subl $0x6f, %eax
je 0x61f6
jmp 0x6189
movl -0x8c(%rbp), %eax
subl $0x70, %eax
je 0x6296
jmp 0x619a
movl -0x8c(%rbp), %eax
subl $0x72, %eax
je 0x64a7
jmp 0x61ab
movl -0x8c(%rbp), %eax
subl $0x74, %eax
je 0x64b7
jmp 0x61bc
movl -0x8c(%rbp), %eax
subl $0x75, %eax
je 0x64d9
jmp 0x61cd
movl -0x8c(%rbp), %eax
subl $0x3e8, %eax            # imm = 0x3E8
je 0x64c7
jmp 0x61e0
movl -0x8c(%rbp), %eax
subl $0x3e9, %eax            # imm = 0x3E9
je 0x64d0
jmp 0x64e9
movq 0x12bdbb(%rip), %rax    # 0x131fb8
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x64f3
movq 0x12bda8(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x10909f(%rip), %rsi    # 0x10f2b9
callq 0x4500
cmpl $0x0, %eax
jne 0x622d
movl $0x8, -0x28(%rbp)
jmp 0x6291
movq 0x12bd84(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x109080(%rip), %rsi    # 0x10f2be
callq 0x4500
cmpl $0x0, %eax
jne 0x6251
movl $0x9, -0x28(%rbp)
jmp 0x628f
movq 0x12bd60(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x1080c8(%rip), %rsi    # 0x10e32a
callq 0x4500
cmpl $0x0, %eax
jne 0x6275
movl $0x2, -0x28(%rbp)
jmp 0x628d
movq 0x12bd3c(%rip), %rax    # 0x131fb8
movq (%rax), %rsi
leaq 0x1080ac(%rip), %rdi    # 0x10e332
movb $0x0, %al
callq 0x5ae0
jmp 0x628f
jmp 0x6291
jmp 0x64f3
movq 0x12bd1b(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x1080a7(%rip), %rsi    # 0x10e34e
callq 0x46b0
cmpl $0x0, %eax
jne 0x62bf
movl -0x18(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x64a5
movq 0x12bcf2(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x108083(%rip), %rsi    # 0x10e353
callq 0x46b0
cmpl $0x0, %eax
jne 0x62e8
movl -0x18(%rbp), %eax
orl $0x11, %eax
movl %eax, -0x18(%rbp)
jmp 0x64a3
movq 0x12bcc9(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x108062(%rip), %rsi    # 0x10e35b
callq 0x46b0
cmpl $0x0, %eax
jne 0x6311
movl -0x18(%rbp), %eax
orl $0x11, %eax
movl %eax, -0x18(%rbp)
jmp 0x64a1
movq 0x12bca0(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x108042(%rip), %rsi    # 0x10e364
callq 0x46b0
cmpl $0x0, %eax
jne 0x633a
movl -0x18(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x18(%rbp)
jmp 0x649f
movq 0x12bc77(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x108020(%rip), %rsi    # 0x10e36b
callq 0x46b0
cmpl $0x0, %eax
jne 0x6363
movl -0x18(%rbp), %eax
orl $0x22, %eax
movl %eax, -0x18(%rbp)
jmp 0x649d
movq 0x12bc4e(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x108001(%rip), %rsi    # 0x10e375
callq 0x46b0
cmpl $0x0, %eax
jne 0x638c
movl -0x18(%rbp), %eax
orl $0x22, %eax
movl %eax, -0x18(%rbp)
jmp 0x649b
movq 0x12bc25(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x107fe3(%rip), %rsi    # 0x10e380
callq 0x46b0
cmpl $0x0, %eax
jne 0x63b5
movl -0x18(%rbp), %eax
orl $0x3, %eax
movl %eax, -0x18(%rbp)
jmp 0x6499
movq 0x12bbfc(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x107fbf(%rip), %rsi    # 0x10e385
callq 0x46b0
cmpl $0x0, %eax
jne 0x63de
movl -0x18(%rbp), %eax
orl $0x33, %eax
movl %eax, -0x18(%rbp)
jmp 0x6497
movq 0x12bbd3(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x107f9f(%rip), %rsi    # 0x10e38e
callq 0x46b0
cmpl $0x0, %eax
jne 0x6407
movl -0x18(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x18(%rbp)
jmp 0x6495
movq 0x12bbaa(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x108b07(%rip), %rsi    # 0x10ef1f
callq 0x46b0
cmpl $0x0, %eax
jne 0x642d
movl -0x18(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x18(%rbp)
jmp 0x6493
movq 0x12bb84(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x107f54(%rip), %rsi    # 0x10e392
callq 0x46b0
cmpl $0x0, %eax
jne 0x6453
movl -0x18(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x18(%rbp)
jmp 0x6491
movq 0x12bb5e(%rip), %rax    # 0x131fb8
movq (%rax), %rdi
leaq 0x107f33(%rip), %rsi    # 0x10e397
callq 0x46b0
cmpl $0x0, %eax
jne 0x6477
movl $0x40, -0x18(%rbp)
jmp 0x648f
movq 0x12bb3a(%rip), %rax    # 0x131fb8
movq (%rax), %rsi
leaq 0x107f15(%rip), %rdi    # 0x10e39d
movb $0x0, %al
callq 0x5ae0
jmp 0x6491
jmp 0x6493
jmp 0x6495
jmp 0x6497
jmp 0x6499
jmp 0x649b
jmp 0x649d
jmp 0x649f
jmp 0x64a1
jmp 0x64a3
jmp 0x64a5
jmp 0x64f3
movq 0x12bb0a(%rip), %rax    # 0x131fb8
movq (%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x64f3
movq 0x12bafa(%rip), %rax    # 0x131fb8
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x64f3
movl $0x0, -0x1c(%rbp)
jmp 0x64f3
movl $0x0, -0x20(%rbp)
jmp 0x64f3
movl $0x1, -0x24(%rbp)
jmp 0x64f3
xorl %edi, %edi
callq 0x5b90
movl $0x1, %edi
callq 0x5b90
jmp 0x612c
cmpl $0x0, -0x18(%rbp)
jne 0x6505
movl $0x40, -0x18(%rbp)
movq 0x12bacc(%rip), %rax    # 0x131fd8
movl (%rax), %eax
cmpl -0x8(%rbp), %eax
jne 0x651d
movl $0x1, %edi
callq 0x5b90
movq $0x0, -0x58(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x6578
movq -0x10(%rbp), %rax
movq 0x12baa2(%rip), %rcx    # 0x131fd8
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x1, %esi
leaq -0x50(%rbp), %rdx
callq 0xd8c0
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x6576
movq -0x10(%rbp), %rax
movq 0x12ba77(%rip), %rcx    # 0x131fd8
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x107e55(%rip), %rdi    # 0x10e3c4
movb $0x0, %al
callq 0x5ae0
jmp 0x65a0
movq -0x10(%rbp), %rax
movq 0x12ba55(%rip), %rcx    # 0x131fd8
movslq (%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movl -0x8(%rbp), %eax
movq 0x12ba3d(%rip), %rcx    # 0x131fd8
subl (%rcx), %eax
movl %eax, -0x50(%rbp)
callq 0x39600
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0x65be
leaq 0x107e21(%rip), %rdi    # 0x10e3d8
movb $0x0, %al
callq 0x5ae0
movq -0x60(%rbp), %rdi
movl -0x18(%rbp), %edx
movl $0x1, %esi
movb $0x0, %al
callq 0x37cb0
cmpl $0x0, -0x1c(%rbp)
je 0x65e6
movq -0x60(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x37cb0
jmp 0x65f6
movq -0x60(%rbp), %rdi
movl $0x2, %esi
movb $0x0, %al
callq 0x37cb0
cmpq $0x0, -0x38(%rbp)
je 0x6621
movq -0x60(%rbp), %rdi
movq -0x38(%rbp), %rsi
xorl %edx, %edx
callq 0x37fb0
cmpl $0x0, %eax
je 0x661f
leaq 0x107dd6(%rip), %rdi    # 0x10e3ee
movb $0x0, %al
callq 0x5ae0
jmp 0x6621
cmpq $0x0, -0x40(%rbp)
je 0x664e
movq -0x60(%rbp), %rdi
movq -0x40(%rbp), %rsi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x386b0
cmpl $0x0, %eax
je 0x664c
leaq 0x107dc0(%rip), %rdi    # 0x10e405
movb $0x0, %al
callq 0x5ae0
jmp 0x664e
cmpl $0x0, -0x24(%rbp)
je 0x6679
movslq -0x50(%rbp), %rdi
shlq $0x3, %rdi
callq 0x4670
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
jne 0x6679
leaq 0x107daa(%rip), %rdi    # 0x10e41c
movb $0x0, %al
callq 0x5ae0
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x67ec
cmpl $0x0, -0x24(%rbp)
jne 0x66e8
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x388a0
cmpl $0x0, %eax
jne 0x66e3
movq -0x58(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x98(%rbp)
movq -0x60(%rbp), %rax
movl 0x20(%rax), %edi
callq 0x37bd0
movq -0x98(%rbp), %rsi
movq %rax, %rdx
leaq 0x107d5b(%rip), %rdi    # 0x10e437
movb $0x0, %al
callq 0x5ae0
jmp 0x67dc
movq -0x58(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x10af25(%rip), %rsi    # 0x111620
callq 0xa8b0
movq -0x48(%rbp), %rcx
movslq -0x4c(%rbp), %rdx
movq %rax, (%rcx,%rdx,8)
cmpq $0x0, %rax
jne 0x6749
movq -0x58(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa0(%rbp)
movq -0x60(%rbp), %rax
movl 0x20(%rax), %edi
callq 0x37bd0
movq -0xa0(%rbp), %rsi
movq %rax, %rdx
leaq 0x107cf5(%rip), %rdi    # 0x10e437
movb $0x0, %al
callq 0x5ae0
movq -0x58(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x107cf2(%rip), %rsi    # 0x10e44e
callq 0x40b0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdx
xorl %eax, %eax
movl $0x7, %ecx
cmpq $0x0, %rdx
cmovneq %rcx, %rax
addq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
movq -0x48(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x68(%rbp), %rcx
movl $0x1, %edx
callq 0x38980
cmpl $0x0, %eax
jne 0x67da
movq -0x58(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa8(%rbp)
movq -0x60(%rbp), %rax
movl 0x20(%rax), %edi
callq 0x37bd0
movq -0xa8(%rbp), %rsi
movq %rax, %rdx
leaq 0x107c83(%rip), %rdi    # 0x10e456
movb $0x0, %al
callq 0x5ae0
jmp 0x67dc
jmp 0x67de
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x6680
movq -0x60(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x6801
movq -0x60(%rbp), %rax
cmpl $0x1, 0x30(%rax)
jge 0x680f
leaq 0x107c6b(%rip), %rdi    # 0x10e473
movb $0x0, %al
callq 0x5ae0
cmpl $0x2, -0x28(%rbp)
jne 0x68d2
movq 0x12b788(%rip), %rax    # 0x131fa8
movq (%rax), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x687a
movq -0x30(%rbp), %rdi
leaq 0x10a003(%rip), %rsi    # 0x11083c
callq 0x4590
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x6878
movq -0x30(%rbp), %rax
movq %rax, -0xb0(%rbp)
callq 0x4050
movl (%rax), %edi
callq 0x4120
movq -0xb0(%rbp), %rsi
movq %rax, %rdx
leaq 0x107c2d(%rip), %rdi    # 0x10e49e
movb $0x0, %al
callq 0x5ae0
jmp 0x687a
movq -0x60(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x5cd0
cmpq $0x0, -0x30(%rbp)
je 0x68cd
movq -0x70(%rbp), %rdi
callq 0x44a0
cmpl $0x0, %eax
je 0x68cb
movq -0x30(%rbp), %rax
movq %rax, -0xb8(%rbp)
callq 0x4050
movl (%rax), %edi
callq 0x4120
movq -0xb8(%rbp), %rsi
movq %rax, %rdx
leaq 0x107bfe(%rip), %rdi    # 0x10e4c2
movb $0x0, %al
callq 0x5ae0
jmp 0x68cd
jmp 0x69c7
movl -0x28(%rbp), %edx
leaq 0x1083c3(%rip), %rax    # 0x10ec9f
leaq 0x108329(%rip), %rcx    # 0x10ec0c
cmpl $0x8, %edx
cmoveq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
jne 0x6917
movq -0x78(%rbp), %rsi
leaq 0x107bcc(%rip), %rdi    # 0x10e4dc
movb $0x0, %al
callq 0x5ae0
cmpq $0x0, -0x30(%rbp)
jne 0x6929
leaq 0x10a603(%rip), %rax    # 0x110f28
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movl -0x28(%rbp), %ecx
leaq 0x107bc9(%rip), %rsi    # 0x10e500
leaq 0x109efe(%rip), %rax    # 0x11083c
cmpl $0x8, %ecx
cmoveq %rax, %rsi
callq 0xa8b0
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
jne 0x698a
movq -0x30(%rbp), %rax
movq %rax, -0xc0(%rbp)
callq 0x4050
movl (%rax), %edi
callq 0x4120
movq -0xc0(%rbp), %rsi
movq %rax, %rdx
leaq 0x107b1b(%rip), %rdi    # 0x10e49e
movb $0x0, %al
callq 0x5ae0
movq -0x60(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq -0x78(%rbp), %rcx
callq 0x5fb0
movq -0x88(%rbp), %rdi
callq 0xc9d0
cmpl $0x0, %eax
je 0x69c5
movq -0x30(%rbp), %rsi
leaq 0x107b45(%rip), %rdi    # 0x10e503
movb $0x0, %al
callq 0x5ae0
jmp 0x69c7
movq -0x60(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x69ee
movq -0x60(%rbp), %rax
movl 0x20(%rax), %edi
callq 0x37bd0
movq %rax, %rsi
leaq 0x107b33(%rip), %rdi    # 0x10e51a
movb $0x0, %al
callq 0x5ae0
movq -0x60(%rbp), %rdi
callq 0x39680
cmpl $0x0, -0x20(%rbp)
je 0x6a31
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x6a28
movq -0x58(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x45a0
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x6a04
movq -0x58(%rbp), %rdi
callq 0x45a0
cmpl $0x0, -0x24(%rbp)
je 0x6a40
movq -0x48(%rbp), %rdi
callq 0x45a0
xorl %eax, %eax
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax,%rax)