// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/tabix.c
// Function: main
int main(int argc, char *argv[])
{
    int c, detect = 1, min_shift = 0, is_force = 0, list_chroms = 0, do_csi = 0;
    tbx_conf_t conf = tbx_conf_gff;
    char *reheader = NULL;
    args_t args;
    memset(&args,0,sizeof(args_t));
    args.cache_megs = 10;
    args.download_index = 1;
    int32_t new_line_skip = -1;

    static const struct option loptions[] =
    {
        {"help", no_argument, NULL, 2},
        {"regions", required_argument, NULL, 'R'},
        {"targets", required_argument, NULL, 'T'},
        {"csi", no_argument, NULL, 'C'},
        {"zero-based", no_argument, NULL, '0'},
        {"print-header", no_argument, NULL, 'h'},
        {"only-header", no_argument, NULL, 'H'},
        {"begin", required_argument, NULL, 'b'},
        {"comment", required_argument, NULL, 'c'},
        {"end", required_argument, NULL, 'e'},
        {"force", no_argument, NULL, 'f'},
        {"min-shift", required_argument, NULL, 'm'},
        {"preset", required_argument, NULL, 'p'},
        {"sequence", required_argument, NULL, 's'},
        {"skip-lines", required_argument, NULL, 'S'},
        {"list-chroms", no_argument, NULL, 'l'},
        {"reheader", required_argument, NULL, 'r'},
        {"version", no_argument, NULL, 1},
        {"verbosity", required_argument, NULL, 3},
        {"cache", required_argument, NULL, 4},
        {"separate-regions", no_argument, NULL, 5},
        {"threads", required_argument, NULL, '@'},
        {NULL, 0, NULL, 0}
    };

    char *tmp;
    while ((c = getopt_long(argc, argv, "hH?0b:c:e:fm:p:s:S:lr:CR:T:D@:", loptions,NULL)) >= 0)
    {
        switch (c)
        {
            case 'R': args.regions_fname = optarg; break;
            case 'T': args.targets_fname = optarg; break;
            case 'C': do_csi = 1; break;
            case 'r': reheader = optarg; break;
            case 'h': args.print_header = 1; break;
            case 'H': args.print_header = 1; args.header_only = 1; break;
            case 'l': list_chroms = 1; break;
            case '0': conf.preset |= TBX_UCSC; detect = 0; break;
            case 'b':
                conf.bc = strtol(optarg,&tmp,10);
                if ( *tmp ) error("Could not parse argument: -b %s\n", optarg);
                detect = 0;
                break;
            case 'e':
                conf.ec = strtol(optarg,&tmp,10);
                if ( *tmp ) error("Could not parse argument: -e %s\n", optarg);
                detect = 0;
                break;
            case 'c': conf.meta_char = *optarg; detect = 0; break;
            case 'f': is_force = 1; break;
            case 'm':
                min_shift = strtol(optarg,&tmp,10);
                if ( *tmp ) error("Could not parse argument: -m %s\n", optarg);
                break;
            case 'p':
                detect = 0;
                if (strcmp(optarg, "gff") == 0) conf = tbx_conf_gff;
                else if (strcmp(optarg, "bed") == 0) conf = tbx_conf_bed;
                else if (strcmp(optarg, "sam") == 0) conf = tbx_conf_sam;
                else if (strcmp(optarg, "vcf") == 0) conf = tbx_conf_vcf;
                else if (strcmp(optarg, "gaf") == 0) conf = tbx_conf_gaf;
                else if (strcmp(optarg, "bcf") == 0) detect = 1; // bcf is autodetected, preset is not needed
                else if (strcmp(optarg, "bam") == 0) detect = 1; // same as bcf
                else error("The preset string not recognised: '%s'\n", optarg);
                break;
            case 's':
                conf.sc = strtol(optarg,&tmp,10);
                if ( *tmp ) error("Could not parse argument: -s %s\n", optarg);
                detect = 0;
                break;
            case 'S':
                new_line_skip = strtol(optarg,&tmp,10);
                if ( *tmp ) error("Could not parse argument: -S %s\n", optarg);
                detect = 0;
                break;
            case 'D':
                args.download_index = 0;
                break;
            case 1:
                printf(
"tabix (htslib) %s\n"
"Copyright (C) 2025 Genome Research Ltd.\n", hts_version());
                return EXIT_SUCCESS;
            case 2:
                return usage(stdout, EXIT_SUCCESS);
            case 3: {
                int v = atoi(optarg);
                if (v < 0) v = 0;
                hts_set_log_level(v);
                break;
            }
            case 4:
                args.cache_megs = atoi(optarg);
                if (args.cache_megs < 0) {
                    args.cache_megs = 0;
                } else if (args.cache_megs >= INT_MAX / 1048576) {
                    args.cache_megs = INT_MAX / 1048576;
                }
                break;
            case 5:
                args.separate_regs = 1;
                break;
            case '@':   //thread count
                args.threads = atoi(optarg);
                break;
            default: return usage(stderr, EXIT_FAILURE);
        }
    }

    if (new_line_skip >= 0)
        conf.line_skip = new_line_skip;

    if ( optind==argc ) return usage(stderr, EXIT_FAILURE);

    if ( list_chroms )
        return query_chroms(argv[optind], args.download_index);

    char *fname = argv[optind];
    int ftype = file_type(fname);
    if ( detect )  // no preset given
    {
        if ( ftype==IS_GFF ) conf = tbx_conf_gff;
        else if ( ftype==IS_BED ) conf = tbx_conf_bed;
        else if ( ftype==IS_GAF ) conf = tbx_conf_gaf;
        else if ( ftype==IS_SAM ) conf = tbx_conf_sam;
        else if ( ftype==IS_VCF )
        {
            conf = tbx_conf_vcf;
            if ( !min_shift && do_csi ) min_shift = 14;
        }
        else if ( ftype==IS_BCF )
        {
            if ( !min_shift ) min_shift = 14;
        }
        else if ( ftype==IS_BAM )
        {
            if ( !min_shift ) min_shift = 14;
        }
    }
    if ( argc > optind+1 || args.header_only || args.regions_fname || args.targets_fname )
    {
        int nregs = 0;
        char **regs = NULL;
        if ( !args.header_only )
            regs = parse_regions(args.regions_fname, argv+optind+1, argc-optind-1, &nregs);
        return query_regions(&args, &conf, fname, regs, nregs);
    }
    if ( do_csi )
    {
        if ( !min_shift ) min_shift = 14;
        min_shift *= do_csi;  // positive for CSIv2, negative for CSIv1
    }
    if ( min_shift!=0 && !do_csi ) do_csi = 1;

    if ( reheader )
        return reheader_file(fname, reheader, ftype, &conf, args.threads);

    char *suffix = ".tbi";
    if ( do_csi ) suffix = ".csi";
    else if ( ftype==IS_BAM ) suffix = ".bai";
    else if ( ftype==IS_CRAM ) suffix = ".crai";

    char *idx_fname = calloc(strlen(fname) + 6, 1);
    if (!idx_fname) error("%s\n", strerror(errno));
    strcat(strcpy(idx_fname, fname), suffix);

    struct stat stat_tbi, stat_file;
    if ( !is_force && stat(idx_fname, &stat_tbi)==0 )
    {
        // Before complaining about existing index, check if the VCF file isn't
        // newer. This is a common source of errors, people tend not to notice
        // that tabix failed
        stat(fname, &stat_file);
        if ( stat_file.st_mtime <= stat_tbi.st_mtime )
            error("[tabix] the index file exists. Please use '-f' to overwrite.\n");
    }
    free(idx_fname);

    int ret;
    if ( ftype==IS_CRAM )
    {
        if ( bam_index_build3(fname, min_shift, args.threads)!=0 ) error("bam_index_build failed: %s\n", fname);
        return 0;
    }
    else if ( do_csi )
    {
        if ( ftype==IS_BCF )
        {
            if ( bcf_index_build3(fname, NULL, min_shift, args.threads)!=0 ) error("bcf_index_build failed: %s\n", fname);
            return 0;
        }
        if ( ftype==IS_BAM )
        {
            if ( bam_index_build3(fname, min_shift, args.threads)!=0 ) error("bam_index_build failed: %s\n", fname);
            return 0;
        }

        switch (ret = tbx_index_build3(fname, NULL, min_shift, args.threads, &conf))
        {
            case 0:
                return 0;
            case -2:
                error("[tabix] the compression of '%s' is not BGZF\n", fname);
            default:
                error("tbx_index_build3 failed: %s\n", fname);
        }
    }
    else    // TBI index
    {
        switch (ret = tbx_index_build3(fname, NULL, min_shift, args.threads, &conf))
        {
            case 0:
                return 0;
            case -2:
                error("[tabix] the compression of '%s' is not BGZF\n", fname);
            default:
                error("tbx_index_build3 failed: %s\n", fname);
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rsi, 0x10(%rsp)
movl %edi, %ebp
leaq 0x840d8(%rip), %rax     # 0x8a410
movq 0x10(%rax), %rcx
movq %rcx, 0x90(%rsp)
movq %rcx, 0x40(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x30(%rsp)
pushq $-0x1
popq %rax
movq %rax, 0x20(%rsp)
pushq $0x1
popq %r14
pushq $0xa
popq %rax
leaq 0xac0e1(%rip), %r12     # 0xb2450
leaq 0x7ece6(%rip), %r13     # 0x8505c
movq $0x0, 0x18(%rsp)
movq $0x0, 0x78(%rsp)
movl $0x0, 0x58(%rsp)
movl $0x0, 0x28(%rsp)
movl %eax, 0x50(%rsp)
movl %r14d, 0x2c(%rsp)
movl $0x0, 0x74(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x68(%rsp)
xorl %ecx, %ecx
movq $0x0, 0x88(%rsp)
movl $0x0, 0x84(%rsp)
movq $0x0, 0x48(%rsp)
movl %ecx, %ebx
movl %ebp, %edi
movq 0x10(%rsp), %r15
movq %r15, %rsi
leaq 0x7ef3b(%rip), %rdx     # 0x85329
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x48a0
testl %eax, %eax
js 0x67ac
leal -0x62(%rax), %ecx
cmpl $0x11, %ecx
jbe 0x6458
leal -0x40(%rax), %ecx
cmpl $0x8, %ecx
jbe 0x6495
leal -0x1(%rax), %ecx
cmpl $0x4, %ecx
jbe 0x64c2
cmpl $0x30, %eax
je 0x66ed
cmpl $0x54, %eax
je 0x66d7
cmpl $0x53, %eax
je 0x672d
cmpl $0x52, %eax
jne 0x67c8
movq 0xacb74(%rip), %rax     # 0xb2fc0
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movl %ebx, %ecx
jmp 0x63db
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movq 0xacb57(%rip), %rax     # 0xb2fc0
movq (%rax), %rdi
leaq 0x60(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x4700
movl %eax, 0x38(%rsp)
movq 0x60(%rsp), %rax
xorl %r14d, %r14d
cmpb $0x0, (%rax)
movl %ebx, %ecx
je 0x63db
jmp 0x7530
leaq 0x7eb9c(%rip), %rdx     # 0x85038
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
pushq $0x1
popq %rcx
jmpq *%rax
movq 0xacb11(%rip), %rax     # 0xb2fc0
movq (%rax), %rdi
callq 0x4820
movl %eax, 0xc(%rsp)
movl %ebx, %ecx
jmp 0x63db
leaq 0x7eb5b(%rip), %rdx     # 0x85024
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq 0xacae7(%rip), %rax     # 0xb2fc0
movq (%rax), %rdi
callq 0x4820
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
movl %eax, %edi
callq 0x172b4
movl %ebx, %ecx
jmp 0x63db
movl $0x0, 0x2c(%rsp)
movl %ebx, %ecx
jmp 0x63db
pushq $0x1
popq %rax
movl %eax, 0x58(%rsp)
movl %eax, 0x28(%rsp)
movl %ebx, %ecx
jmp 0x63db
movq 0xaca9f(%rip), %rax     # 0xb2fc0
movq (%rax), %r15
movq %r15, %rdi
leaq 0x7ee7d(%rip), %rsi     # 0x853ab
callq 0x46f0
testl %eax, %eax
je 0x6758
movq %r15, %rdi
leaq 0x820f6(%rip), %rsi     # 0x8863b
callq 0x46f0
testl %eax, %eax
je 0x676f
movq %r15, %rdi
leaq 0x83801(%rip), %rsi     # 0x89d5d
callq 0x46f0
testl %eax, %eax
je 0x6778
movq %r15, %rdi
leaq 0x815ac(%rip), %rsi     # 0x87b1f
callq 0x46f0
testl %eax, %eax
je 0x6781
movq %r15, %rdi
leaq 0x7ee25(%rip), %rsi     # 0x853af
callq 0x46f0
testl %eax, %eax
je 0x678a
movq %r15, %rdi
leaq 0x7eb3c(%rip), %rsi     # 0x850dd
callq 0x46f0
movl %ebx, %ecx
pushq $0x1
popq %r14
testl %eax, %eax
je 0x63db
movq %r15, %rdi
leaq 0x7eb24(%rip), %rsi     # 0x850e2
callq 0x46f0
movl %ebx, %ecx
pushq $0x1
popq %r14
testl %eax, %eax
je 0x63db
jmp 0x75fd
movq 0xac9e3(%rip), %rax     # 0xb2fc0
movq (%rax), %rdi
leaq 0x60(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x4700
movl %eax, 0x34(%rsp)
movq 0x60(%rsp), %rax
xorl %r14d, %r14d
cmpb $0x0, (%rax)
movl %ebx, %ecx
je 0x63db
jmp 0x7543
movq 0xac9b0(%rip), %rax     # 0xb2fc0
movq (%rax), %rdi
leaq 0x60(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x4700
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rax
cmpb $0x0, (%rax)
movl %ebx, %ecx
je 0x63db
jmp 0x7556
movl %ebx, %ecx
pushq $0x1
popq %rax
movl %eax, 0x84(%rsp)
jmp 0x63db
pushq $0x1
popq %rax
movl %eax, 0x68(%rsp)
movl %ebx, %ecx
jmp 0x63db
movq 0xac960(%rip), %rax     # 0xb2fc0
movq (%rax), %rdi
leaq 0x60(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x4700
movl %eax, 0x3c(%rsp)
movq 0x60(%rsp), %rax
xorl %r14d, %r14d
cmpb $0x0, (%rax)
movl %ebx, %ecx
je 0x63db
jmp 0x7569
movq 0xac92d(%rip), %rax     # 0xb2fc0
movq (%rax), %rax
movsbl (%rax), %eax
movl %eax, 0x40(%rsp)
jmp 0x67a2
movq 0xac917(%rip), %rax     # 0xb2fc0
movq (%rax), %rax
movq %rax, 0x88(%rsp)
movl %ebx, %ecx
jmp 0x63db
pushq $0x1
popq %rax
movl %eax, 0x58(%rsp)
movl %ebx, %ecx
jmp 0x63db
pushq $0x1
popq %rax
movl %eax, 0x74(%rsp)
movl %ebx, %ecx
jmp 0x63db
movq 0xac8e2(%rip), %rax     # 0xb2fc0
movq (%rax), %rax
movq %rax, 0x78(%rsp)
movl %ebx, %ecx
jmp 0x63db
orb $0x1, 0x32(%rsp)
jmp 0x67a2
movq 0xac8c2(%rip), %rax     # 0xb2fc0
movq (%rax), %rdi
callq 0x4820
movl $0x0, 0x50(%rsp)
movl %ebx, %ecx
testl %eax, %eax
js 0x63db
movl $0x7ff, %ecx            # imm = 0x7FF
cmpl %ecx, %eax
cmovael %ecx, %eax
movl %eax, 0x50(%rsp)
movl %ebx, %ecx
jmp 0x63db
movq 0xac88c(%rip), %rax     # 0xb2fc0
movq (%rax), %rdi
leaq 0x60(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x4700
movq %rax, 0x20(%rsp)
movq 0x60(%rsp), %rax
cmpb $0x0, (%rax)
je 0x67a2
jmp 0x757c
movq 0x90(%rsp), %rax
movq %rax, 0x40(%rsp)
movaps 0xa0(%rsp), %xmm0
jmp 0x679d
leaq 0x83cb2(%rip), %rcx     # 0x8a428
jmp 0x6791
leaq 0x83cd9(%rip), %rcx     # 0x8a458
jmp 0x6791
leaq 0x83ce8(%rip), %rcx     # 0x8a470
jmp 0x6791
leaq 0x83cf7(%rip), %rcx     # 0x8a488
movq 0x10(%rcx), %rax
movq %rax, 0x40(%rsp)
movups (%rcx), %xmm0
movaps %xmm0, 0x30(%rsp)
xorl %r14d, %r14d
movl %ebx, %ecx
jmp 0x63db
movq 0x20(%rsp), %rax
testl %eax, %eax
js 0x67b9
movl %eax, 0x44(%rsp)
movq 0xac820(%rip), %r12     # 0xb2fe0
movslq (%r12), %rax
cmpl %ebp, %eax
jne 0x67df
movq 0xac809(%rip), %rax     # 0xb2fd8
movq (%rax), %rdi
callq 0x7748
pushq $0x1
popq %rbx
jmp 0x744f
movq (%r15,%rax,8), %r15
cmpl $0x0, 0x68(%rsp)
je 0x6826
movq %r15, %rdi
callq 0x5b1c
testb $0xf, %al
sete %cl
testl %eax, %eax
setne %dl
testb %cl, %dl
je 0x688a
cmpb $0x10, %al
je 0x6906
movzbl %al, %eax
cmpl $0x20, %eax
jne 0x744d
leaq 0x7f3e6(%rip), %rdi     # 0x85c05
xorl %eax, %eax
callq 0x5cb1
movq %r15, (%rsp)
movq %r15, %rdi
callq 0x5b1c
movl %eax, %r8d
pushq $0xe
popq %r15
testl %r14d, %r14d
je 0x69d2
movzbl %r8b, %eax
leal -0x1(%rax), %ecx
cmpl $0x7, %ecx
movl 0x28(%rsp), %esi
movq 0x78(%rsp), %r14
movq 0x18(%rsp), %rdi
ja 0x69e5
leaq 0x7e79d(%rip), %rax     # 0x85004
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x90(%rsp), %rax
movq %rax, 0x40(%rsp)
movaps 0xa0(%rsp), %xmm0
jmp 0x6a94
movq %r15, %rdi
xorl %esi, %esi
movl 0x2c(%rsp), %edx
callq 0x2b279
testq %rax, %rax
je 0x75ca
movq %rax, %rbx
leaq 0x140(%rsp), %rsi
movq %rax, %rdi
callq 0x2b3b8
testq %rax, %rax
je 0x75be
movq %rax, %r14
leaq 0x7ec62(%rip), %r15     # 0x85529
xorl %r12d, %r12d
movslq 0x140(%rsp), %rax
cmpq %rax, %r12
jge 0x68f1
movq (%r14,%r12,8), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x4060
incq %r12
testl %eax, %eax
jns 0x68ca
jmp 0x69a9
movq %r14, %rdi
callq 0x45d0
movq %rbx, %rdi
callq 0x2b13d
jmp 0x744d
leaq 0x83318(%rip), %rsi     # 0x89c25
movq %r15, %rdi
callq 0x1045b
testq %rax, %rax
je 0x7609
movq %rax, %r14
movq %rax, %rdi
callq 0x304ce
testq %rax, %rax
je 0x7612
movq %rax, %rbx
movq %r14, %rdi
callq 0x11631
movq %r15, %rdi
xorl %esi, %esi
movl 0x2c(%rsp), %edx
callq 0x375aa
testq %rax, %rax
je 0x761b
movq %rax, %r14
leaq 0x105a(%rip), %rdx      # 0x79b8
leaq 0x140(%rsp), %rsi
movq %rax, %rdi
movq %rbx, %rcx
callq 0x135ee
testq %rax, %rax
je 0x75be
movq %rax, %r15
leaq 0x7eba5(%rip), %r12     # 0x85529
xorl %r13d, %r13d
movslq 0x140(%rsp), %rax
cmpq %rax, %r13
jge 0x69b5
movq (%r15,%r13,8), %rsi
movq %r12, %rdi
xorl %eax, %eax
callq 0x4060
incq %r13
testl %eax, %eax
jns 0x6987
leaq 0x7f1e6(%rip), %rdi     # 0x85b96
jmp 0x7735
movq %r15, %rdi
callq 0x45d0
movq %rbx, %rdi
callq 0x3035c
movq %r14, %rdi
callq 0x11796
jmp 0x744d
movl 0x28(%rsp), %esi
movq 0x78(%rsp), %r14
movq 0x18(%rsp), %rdi
jmp 0x6a99
cmpl $0x10, %eax
je 0x6a37
cmpl $0x20, %eax
je 0x6a37
cmpl $0x80, %eax
jne 0x6a99
leaq 0x83a87(%rip), %rcx     # 0x8a488
jmp 0x6a88
callq 0xe92c
leaq 0x7ea0b(%rip), %rdi     # 0x8541d
xorl %ebx, %ebx
movq %rax, %rsi
xorl %eax, %eax
callq 0x4060
jmp 0x744f
movq 0xac586(%rip), %rax     # 0xb2fb0
movq (%rax), %rdi
callq 0x7748
jmp 0x744d
movq 0x48(%rsp), %rax
testl %eax, %eax
cmovel %r15d, %eax
jmp 0x6a7a
leaq 0x839dd(%rip), %rcx     # 0x8a428
jmp 0x6a88
leaq 0x83a1c(%rip), %rcx     # 0x8a470
movq 0x10(%rcx), %rax
movq %rax, 0x40(%rsp)
movups (%rcx), %xmm0
movaps %xmm0, 0x30(%rsp)
testl %ebx, %ebx
movq 0x48(%rsp), %r13
movl %r13d, %eax
cmovnel %r15d, %eax
testl %r13d, %r13d
cmovnel %r13d, %eax
movq %rax, 0x48(%rsp)
jmp 0x6a99
leaq 0x839d0(%rip), %rcx     # 0x8a458
movq 0x10(%rcx), %rax
movq %rax, 0x40(%rsp)
movups (%rcx), %xmm0
movaps %xmm0, 0x30(%rsp)
movslq (%r12), %r12
leal 0x1(%r12), %eax
cmpl %ebp, %eax
setl %al
testl %esi, %esi
setne %cl
testq %rdi, %rdi
setne %dl
orb %cl, %dl
testq %r14, %r14
setne %cl
orb %dl, %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x6ad2
testl %esi, %esi
je 0x6b12
xorl %r13d, %r13d
xorl %r15d, %r15d
jmp 0x6ea8
movq 0x48(%rsp), %r13
testl %r13d, %r13d
cmovnel %r13d, %r15d
testl %ebx, %ebx
cmovel %r13d, %r15d
movq 0x88(%rsp), %rsi
testq %rsi, %rsi
je 0x6c76
leaq 0x30(%rsp), %rcx
movq (%rsp), %rdi
movl %r8d, %edx
movl 0xc(%rsp), %r8d
callq 0x5e77
movl %eax, %ebx
jmp 0x744f
movl %r12d, %eax
notl %eax
addl %ebp, %eax
movq %rax, %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x140(%rsp)
andq $0x0, 0x150(%rsp)
testq %rdi, %rdi
je 0x6dc7
movq %r12, 0x88(%rsp)
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1b136
testq %rax, %rax
je 0x7663
movq %rax, %rbx
movq %rax, %rdi
callq 0x1ba08
testq %rax, %rax
je 0x766c
movq %rax, %r12
movq %rbx, %rdi
callq 0x1a6b0
addl %ebp, %eax
movq %rax, 0x18(%rsp)
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x46b0
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x7733
leaq 0xb0(%rsp), %rsi
movq %rbx, 0x68(%rsp)
movq %rbx, %rdi
callq 0x1a6d3
movq %rax, %rbx
leaq 0x140(%rsp), %r15
xorl %r13d, %r13d
xorl %r14d, %r14d
movq %rbp, 0x48(%rsp)
movslq 0xb0(%rsp), %rax
cmpq %rax, %r13
jge 0x6d5f
movq (%rbx,%r13,8), %rsi
movq 0x68(%rsp), %rdi
xorl %edx, %edx
movabsq $0x7fffffff7fffffff, %rcx # imm = 0x7FFFFFFF7FFFFFFF
movq %r12, %r8
callq 0x1b4c8
testl %eax, %eax
js 0x75b2
movslq %r14d, %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax,8), %rbp
movq %r12, %rdi
callq 0x1ba7e
testl %eax, %eax
je 0x6c69
andq $0x0, 0x140(%rsp)
movq (%rbx,%r13,8), %rdx
movq (%r12), %rcx
movq 0x8(%r12), %r8
incq %rcx
incq %r8
movq %r15, %rdi
leaq 0x862ad(%rip), %rsi     # 0x8cee4
xorl %eax, %eax
callq 0x7f0c
testl %eax, %eax
js 0x7733
movq 0x150(%rsp), %rdi
callq 0x4970
movq %rax, (%rbp)
testq %rax, %rax
je 0x7733
incl %r14d
addq $0x8, %rbp
jmp 0x6c05
incq %r13
movq 0x48(%rsp), %rbp
jmp 0x6bc3
movl %r8d, %ebp
movq (%rsp), %r13
movq %r13, %rdi
callq 0x41d0
leaq 0x6(%rax), %rdi
pushq $0x1
popq %rsi
callq 0x4300
testq %rax, %rax
je 0x7648
movq %rax, %r14
orl %r15d, %ebx
cmpl $0x40, %ebp
leaq 0x7e7bd(%rip), %rax     # 0x85467
leaq 0x7e7a7(%rip), %rcx     # 0x85458
cmoveq %rax, %rcx
cmpl $0x20, %ebp
leaq 0x7e7a3(%rip), %rax     # 0x85462
cmovneq %rcx, %rax
testl %ebx, %ebx
leaq 0x7e791(%rip), %r12     # 0x8545d
cmoveq %rax, %r12
movq %r14, %rdi
movq %r13, %rsi
callq 0x4470
movq %r14, %rdi
movq %r12, %rsi
callq 0x4930
cmpl $0x0, 0x84(%rsp)
jne 0x6d2a
leaq 0x140(%rsp), %rsi
movq %r14, %rdi
callq 0x4430
testl %eax, %eax
jne 0x6d2a
leaq 0xb0(%rsp), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x4430
movq 0x58(%r12), %rax
cmpq 0x198(%rsp), %rax
jle 0x773c
movq %r14, %rdi
callq 0x45d0
cmpl $0x40, %ebp
jne 0x6d92
movq %r13, %rdi
xorl %esi, %esi
movl %r15d, %edx
movl 0xc(%rsp), %ecx
callq 0x1e1c8
testl %eax, %eax
je 0x744d
leaq 0x7e754(%rip), %rdi     # 0x854ab
movq %r13, %rsi
jmp 0x758d
movq 0x68(%rsp), %rdi
callq 0x1b02c
movq %r12, %rdi
callq 0x1ba68
movq 0x150(%rsp), %rdi
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r13
movq 0x20(%rsp), %r15
movq 0x88(%rsp), %r12
jmp 0x6dd7
testl %ebx, %ebx
je 0x6e02
cmpb $0x20, %bpl
je 0x6d37
movzbl %bpl, %eax
cmpl $0x10, %eax
jne 0x6e02
movq %r13, %rdi
xorl %esi, %esi
movl %r15d, %edx
movl 0xc(%rsp), %ecx
callq 0x375b3
testl %eax, %eax
je 0x744d
leaq 0x7e702(%rip), %rdi     # 0x854c7
jmp 0x6d57
xorl %edi, %edi
movl %ebp, %r13d
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x10(%rsp), %rbx
callq 0x45d0
testl %r14d, %r14d
jne 0x6e65
testl %ebp, %ebp
je 0x6e35
movslq %ebp, %rdi
shlq $0x3, %rdi
callq 0x46b0
movq %rax, %r15
testq %rax, %rax
jne 0x6e65
jmp 0x7733
leaq 0x30(%rsp), %r8
movq %r13, %rdi
xorl %esi, %esi
movl %r15d, %edx
movl 0xc(%rsp), %ecx
callq 0x2b1ad
testl %eax, %eax
je 0x744d
cmpl $-0x2, %eax
jne 0x76f2
leaq 0x7e6b3(%rip), %rdi     # 0x854e3
jmp 0x76f9
pushq $0x8
popq %rdi
callq 0x46b0
testq %rax, %rax
je 0x7733
movq %rax, %r15
leaq 0x84a98(%rip), %rdi     # 0x8b8e8
callq 0x4970
movq %rax, (%r15)
testq %rax, %rax
je 0x7733
pushq $0x1
popq %r13
leaq (%rbx,%r12,8), %rbx
addq $0x8, %rbx
movslq %r14d, %rax
xorl %r14d, %r14d
testl %ebp, %ebp
cmovlel %r14d, %ebp
movq %r15, %r12
leaq (%r15,%rax,8), %r15
cmpq %r14, %rbp
je 0x6ea0
movq (%rbx,%r14,8), %rdi
callq 0x4970
movq %rax, (%r15,%r14,8)
testq %rax, %rax
je 0x7733
incq %r14
jmp 0x6e80
movq 0x78(%rsp), %r14
movq %r12, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
leaq 0x82d6b(%rip), %rsi     # 0x89c25
movq (%rsp), %rdi
callq 0x1045b
testq %rax, %rax
je 0x75d3
movq %rax, %r12
movq %rax, %rdi
callq 0x118c8
movl 0x4(%rax), %ebx
movl 0x50(%rsp), %esi
testl %esi, %esi
je 0x6eed
shll $0x14, %esi
movq %r12, %rdi
callq 0x11986
movq %r12, 0x10(%rsp)
movl 0xc(%rsp), %edi
testl %edi, %edi
jle 0x6f52
callq 0x2c7f7
movq %rax, 0xb0(%rsp)
testq %rax, %rax
jne 0x6f24
leaq 0x7ed76(%rip), %rsi     # 0x85c89
leaq 0x7e21f(%rip), %rdx     # 0x85139
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0x1035a
leaq 0xb0(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x1193e
testl %eax, %eax
jns 0x6f52
leaq 0x7ed48(%rip), %rsi     # 0x85c89
leaq 0x7e213(%rip), %rdx     # 0x8515b
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0x1035a
testq %r14, %r14
je 0x6f98
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1b136
movq %rax, %r12
testq %rax, %rax
movq 0x10(%rsp), %rdi
jne 0x6fa0
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x6f87
callq 0x2d1b7
leaq 0x7ec82(%rip), %rdi     # 0x85c10
movq 0x78(%rsp), %rsi
jmp 0x7529
xorl %r12d, %r12d
movq 0x10(%rsp), %rdi
cmpl $0xd, %ebx
ja 0x73f8
movl $0x210d, %eax           # imm = 0x210D
btl %ebx, %eax
movq %r13, 0x18(%rsp)
movq %r15, 0x20(%rsp)
jae 0x70af
movq (%rsp), %rdi
xorl %esi, %esi
movl 0x2c(%rsp), %edx
callq 0x2b279
testq %rax, %rax
je 0x762a
movq %rax, %r13
xorps %xmm0, %xmm0
movaps %xmm0, 0x140(%rsp)
andq $0x0, 0x150(%rsp)
cmpl $0x0, 0x58(%rsp)
je 0x7061
pushq $0x2
popq %rbx
leaq 0x140(%rsp), %r14
movq 0x10(%rsp), %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x11bcc
testl %eax, %eax
js 0x7058
cmpq $0x0, 0x140(%rsp)
je 0x7058
movq 0x150(%rsp), %rdi
movsbl (%rdi), %eax
cmpl %eax, 0x10(%r13)
jne 0x7061
callq 0x4800
testl %eax, %eax
jns 0x7002
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x704c
callq 0x2d1b7
leaq 0x7ed89(%rip), %rdi     # 0x85ddc
jmp 0x7735
cmpl $-0x2, %eax
jle 0x750c
cmpl $0x0, 0x28(%rsp)
jne 0x73d9
testq %r12, %r12
je 0x72b5
leaq 0x9c(%rsp), %rsi
movq %r13, %rdi
callq 0x2b3b8
movq %rax, %rbp
testq %rax, %rax
jne 0x72b7
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x70a3
callq 0x2d1b7
leaq 0x7ed4a(%rip), %rdi     # 0x85df4
jmp 0x7735
cmpl $0x9, %ebx
jne 0x7463
leaq 0x82476(%rip), %rdi     # 0x89535
leaq 0x81d7b(%rip), %rsi     # 0x88e41
callq 0x1045b
testq %rax, %rax
je 0x767d
movq %rax, %rbx
leaq 0xb0(%rsp), %rsi
movq %rax, %rdi
callq 0x1193e
testl %eax, %eax
jns 0x7103
leaq 0x7eb97(%rip), %rsi     # 0x85c89
leaq 0x7e0b9(%rip), %rdx     # 0x851b2
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0x1035a
movq %rbx, 0x50(%rsp)
movq (%rsp), %rdi
xorl %esi, %esi
movl 0x2c(%rsp), %edx
callq 0x375aa
movq %rax, 0x68(%rsp)
testq %rax, %rax
je 0x769b
movq 0x10(%rsp), %rdi
callq 0x304ce
testq %rax, %rax
je 0x76b9
movq %rax, %rbp
cmpl $0x0, 0x58(%rsp)
je 0x7157
movq 0x50(%rsp), %rdi
movq %rbp, %rsi
callq 0x30af1
testl %eax, %eax
jne 0x7594
cmpl $0x0, 0x28(%rsp)
jne 0x7498
testq %r15, %r15
je 0x7702
callq 0x30dc6
testq %rax, %rax
je 0x7721
movq %rax, %r13
movq 0x18(%rsp), %rax
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
movq %rcx, 0x58(%rsp)
xorl %r15d, %r15d
cmpq 0x58(%rsp), %r15
je 0x7486
movq 0x20(%rsp), %rax
movq (%rax,%r15,8), %rsi
movq 0x68(%rsp), %rdi
leaq 0x82b(%rip), %rdx       # 0x79de
movq %rbp, %rcx
leaq 0xc6bc(%rip), %r8       # 0x13879
leaq 0x2a9c9(%rip), %r9      # 0x31b8d
callq 0x15819
testq %rax, %rax
je 0x72ad
movq %rax, %rbx
xorl %r14d, %r14d
movq 0x10(%rsp), %rax
testb $0x10, (%rax)
je 0x74e9
movq 0x38(%rax), %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x15a3d
testl %eax, %eax
js 0x729c
testq %r12, %r12
je 0x7250
movslq 0x10(%r13), %rdx
testq %rdx, %rdx
js 0x74c1
cmpl %edx, 0x4(%rbp)
jle 0x74c1
movq 0x18(%rbp), %rax
movq %rdx, %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rsi
testq %rsi, %rsi
je 0x74c1
movq (%r13), %rdx
movq 0x8(%r13), %rax
leaq (%rdx,%rax), %rcx
decq %rcx
movq %r12, %rdi
xorl %r8d, %r8d
callq 0x1b4c8
testl %eax, %eax
je 0x71d8
cmpl $0x0, 0x74(%rsp)
sete %al
orb %al, %r14b
testb $0x1, %r14b
jne 0x727c
movl 0x40(%rsp), %esi
movq 0x20(%rsp), %rax
movq (%rax,%r15,8), %rdx
leaq 0x7eafa(%rip), %rdi     # 0x85d6f
xorl %eax, %eax
callq 0x4060
movq 0x50(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x321fd
movb $0x1, %r14b
testl %eax, %eax
je 0x71d8
jmp 0x7594
cmpl $-0x1, %eax
jne 0x750c
movq %rbx, %rdi
callq 0x14039
incq %r15
jmp 0x7193
xorl %ebp, %ebp
movq 0x18(%rsp), %rax
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
movq %rcx, 0x50(%rsp)
leaq 0x140(%rsp), %rbx
xorl %eax, %eax
cmpq 0x50(%rsp), %rax
je 0x73d1
movq 0x18(%r13), %rdi
movq %rax, 0x58(%rsp)
movq (%r15,%rax,8), %rsi
leaq 0x22f2c(%rip), %rdx     # 0x2a220
movq %r13, %rcx
leaq 0xc57b(%rip), %r8       # 0x13879
leaq 0x2389e(%rip), %r9      # 0x2aba3
callq 0x15819
testq %rax, %rax
je 0x73c4
movq %rax, %r14
xorl %r15d, %r15d
movq 0x10(%rsp), %rdi
callq 0x119e8
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x15a3d
testl %eax, %eax
js 0x73ae
testq %r12, %r12
je 0x7360
movslq 0x30(%r14), %rax
movq (%rbp,%rax,8), %rsi
movq 0x40(%r14), %rdx
movq 0x48(%r14), %rcx
decq %rcx
movq %r12, %rdi
xorl %r8d, %r8d
callq 0x1b4c8
testl %eax, %eax
je 0x7319
cmpl $0x0, 0x74(%rsp)
sete %al
orb %al, %r15b
testb $0x1, %r15b
jne 0x7391
movl 0x40(%rsp), %esi
movq 0x20(%rsp), %rax
movq 0x58(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x7e9e5(%rip), %rdi     # 0x85d6f
xorl %eax, %eax
callq 0x4060
movq 0x150(%rsp), %rdi
callq 0x4800
movb $0x1, %r15b
testl %eax, %eax
jns 0x7319
jmp 0x7594
cmpl $-0x1, %eax
jne 0x750c
movq %r14, %rdi
callq 0x14039
movq 0x20(%rsp), %r15
movq 0x58(%rsp), %rax
incq %rax
jmp 0x72d5
movq %rbp, %rdi
callq 0x45d0
movq 0x150(%rsp), %rdi
callq 0x45d0
movq %r13, %rdi
callq 0x2b13d
movq 0x18(%rsp), %r13
movq 0x10(%rsp), %rdi
testq %r12, %r12
je 0x740a
movq %r12, %rdi
callq 0x1b02c
movq 0x10(%rsp), %rdi
callq 0x11631
testl %eax, %eax
jne 0x75df
xorl %ebx, %ebx
testl %r13d, %r13d
cmovlel %ebx, %r13d
cmpq %rbx, %r13
je 0x7433
movq (%r15,%rbx,8), %rdi
callq 0x45d0
incq %rbx
jmp 0x7420
movq %r15, %rdi
callq 0x45d0
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x744d
callq 0x2d1b7
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x4, %ebx
jne 0x73f8
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x747a
callq 0x2d1b7
leaq 0x7e995(%rip), %rdi     # 0x85e16
jmp 0x681f
movq %r13, %rdi
callq 0x30f58
movq 0x18(%rsp), %r13
movq 0x20(%rsp), %r15
movq 0x50(%rsp), %rdi
callq 0x11631
testl %eax, %eax
jne 0x76d7
movq %rbp, %rdi
callq 0x3035c
movq 0x68(%rsp), %rdi
callq 0x11796
jmp 0x73f3
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x74d7
callq 0x2d1b7
movl 0x10(%r13), %edx
leaq 0x7e862(%rip), %rdi     # 0x85d40
movq (%rsp), %rsi
xorl %eax, %eax
callq 0x5cb1
leaq 0x7e981(%rip), %rsi     # 0x85e71
leaq 0x7e987(%rip), %rdx     # 0x85e7e
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x1035a
callq 0x4050
movl $0x16, (%rax)
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x751e
callq 0x2d1b7
leaq 0x7e850(%rip), %rdi     # 0x85d75
movq (%rsp), %rsi
xorl %eax, %eax
callq 0x5d63
movq 0xaba89(%rip), %rax     # 0xb2fc0
movq (%rax), %rsi
leaq 0x7de07(%rip), %rdi     # 0x85348
jmp 0x758d
movq 0xaba76(%rip), %rax     # 0xb2fc0
movq (%rax), %rsi
leaq 0x7de87(%rip), %rdi     # 0x853db
jmp 0x758d
movq 0xaba63(%rip), %rax     # 0xb2fc0
movq (%rax), %rsi
leaq 0x7de23(%rip), %rdi     # 0x8538a
jmp 0x758d
movq 0xaba50(%rip), %rax     # 0xb2fc0
movq (%rax), %rsi
leaq 0x7ddef(%rip), %rdi     # 0x85369
jmp 0x758d
movq 0xaba3d(%rip), %rax     # 0xb2fc0
movq (%rax), %rsi
leaq 0x7de6f(%rip), %rdi     # 0x853fc
xorl %eax, %eax
callq 0x5cb1
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x75a6
callq 0x2d1b7
leaq 0x7e724(%rip), %rdi     # 0x85cd1
jmp 0x7735
leaq 0x7e6a7(%rip), %rdi     # 0x85c60
jmp 0x7735
leaq 0x7e5ad(%rip), %rdi     # 0x85b72
jmp 0x7735
leaq 0x7e581(%rip), %rdi     # 0x85b52
jmp 0x7622
leaq 0x7e5d5(%rip), %rdi     # 0x85baf
jmp 0x7525
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x75f1
callq 0x2d1b7
leaq 0x7e852(%rip), %rdi     # 0x85e4a
jmp 0x7525
leaq 0x7ddaf(%rip), %rdi     # 0x853b3
movq %r15, %rsi
jmp 0x758d
leaq 0x7e59f(%rip), %rdi     # 0x85baf
jmp 0x7622
leaq 0x7e5aa(%rip), %rdi     # 0x85bc3
jmp 0x7622
leaq 0x7e5c1(%rip), %rdi     # 0x85be3
movq %r15, %rsi
jmp 0x7529
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x763c
callq 0x2d1b7
leaq 0x7e774(%rip), %rdi     # 0x85db7
jmp 0x7525
callq 0x4050
movl (%rax), %edi
callq 0x4150
leaq 0x7dece(%rip), %rdi     # 0x85529
movq %rax, %rsi
jmp 0x758d
leaq 0x7e5a6(%rip), %rdi     # 0x85c10
jmp 0x7673
leaq 0x7e5c2(%rip), %rdi     # 0x85c35
movq 0x18(%rsp), %rsi
jmp 0x7529
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x768f
callq 0x2d1b7
leaq 0x7e601(%rip), %rdi     # 0x85c97
jmp 0x7735
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x76ad
callq 0x2d1b7
leaq 0x7e52f(%rip), %rdi     # 0x85be3
jmp 0x7525
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x76cb
callq 0x2d1b7
leaq 0x7e5db(%rip), %rdi     # 0x85cad
jmp 0x7525
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x76e9
callq 0x2d1b7
leaq 0x7e699(%rip), %rdi     # 0x85d89
jmp 0x7735
leaq 0x7de17(%rip), %rdi     # 0x85510
movq (%rsp), %rsi
jmp 0x758d
leaq 0x7e5e2(%rip), %rdi     # 0x85ceb
leaq 0x7e5e8(%rip), %rsi     # 0x85cf8
leaq 0x7e5e9(%rip), %rcx     # 0x85d00
movl $0x10b, %edx            # imm = 0x10B
callq 0x42f0
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x7733
callq 0x2d1b7
xorl %edi, %edi
xorl %eax, %eax
callq 0x5d63
leaq 0x7dd2a(%rip), %rdi     # 0x8546d
jmp 0x681f