// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
leaq 0x1080fd(%rip), %rax    # 0x10e860
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x48(%rbp)
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x4250
movl $0xa, -0x58(%rbp)
movl $0x1, -0x54(%rbp)
movl $0xffffffff, -0x74(%rbp) # imm = 0xFFFFFFFF
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x102c88(%rip), %rdx    # 0x10943d
leaq 0x126064(%rip), %rcx    # 0x12c820
xorl %eax, %eax
movl %eax, %r8d
callq 0x4880
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jl 0x6caa
movl -0x14(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x1e0(%rbp)
subl $0x72, %eax
ja 0x6c89
movq -0x1e0(%rbp), %rax
leaq 0x10280d(%rip), %rcx    # 0x109004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x1267b1(%rip), %rax    # 0x12cfb8
movq (%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x6ca5
movq 0x12679e(%rip), %rax    # 0x12cfb8
movq (%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x6ca5
movl $0x1, -0x28(%rbp)
jmp 0x6ca5
movq 0x12677f(%rip), %rax    # 0x12cfb8
movq (%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x6ca5
movl $0x1, -0x60(%rbp)
jmp 0x6ca5
movl $0x1, -0x60(%rbp)
movl $0x1, -0x5c(%rbp)
jmp 0x6ca5
movl $0x1, -0x24(%rbp)
jmp 0x6ca5
movl -0x40(%rbp), %eax
orl $0x10000, %eax          # imm = 0x10000
movl %eax, -0x40(%rbp)
movl $0x0, -0x18(%rbp)
jmp 0x6ca5
movq 0x12672a(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
leaq -0x80(%rbp), %rsi
movl $0xa, %edx
callq 0x46d0
movl %eax, -0x38(%rbp)
movq -0x80(%rbp), %rax
cmpb $0x0, (%rax)
je 0x68c3
movq 0x126706(%rip), %rax    # 0x12cfb8
movq (%rax), %rsi
leaq 0x102ba0(%rip), %rdi    # 0x10945c
movb $0x0, %al
callq 0x5d70
movl $0x0, -0x18(%rbp)
jmp 0x6ca5
movq 0x1266e2(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
leaq -0x80(%rbp), %rsi
movl $0xa, %edx
callq 0x46d0
movl %eax, -0x34(%rbp)
movq -0x80(%rbp), %rax
cmpb $0x0, (%rax)
je 0x690b
movq 0x1266be(%rip), %rax    # 0x12cfb8
movq (%rax), %rsi
leaq 0x102b79(%rip), %rdi    # 0x10947d
movb $0x0, %al
callq 0x5d70
movl $0x0, -0x18(%rbp)
jmp 0x6ca5
movq 0x12669a(%rip), %rax    # 0x12cfb8
movq (%rax), %rax
movsbl (%rax), %eax
movl %eax, -0x30(%rbp)
movl $0x0, -0x18(%rbp)
jmp 0x6ca5
movl $0x1, -0x20(%rbp)
jmp 0x6ca5
movq 0x126672(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
leaq -0x80(%rbp), %rsi
movl $0xa, %edx
callq 0x46d0
movl %eax, -0x1c(%rbp)
movq -0x80(%rbp), %rax
cmpb $0x0, (%rax)
je 0x697b
movq 0x12664e(%rip), %rax    # 0x12cfb8
movq (%rax), %rsi
leaq 0x102b2a(%rip), %rdi    # 0x10949e
movb $0x0, %al
callq 0x5d70
jmp 0x6ca5
movl $0x0, -0x18(%rbp)
movq 0x12662a(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
leaq 0x102b27(%rip), %rsi    # 0x1094bf
callq 0x46c0
cmpl $0x0, %eax
jne 0x69c5
leaq 0x107eb7(%rip), %rax    # 0x10e860
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x6b26
movq 0x1265ec(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
leaq 0x105d15(%rip), %rsi    # 0x10c6eb
callq 0x46c0
cmpl $0x0, %eax
jne 0x6a03
leaq 0x107e91(%rip), %rax    # 0x10e878
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x6b24
movq 0x1265ae(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
leaq 0x1077f4(%rip), %rsi    # 0x10e208
callq 0x46c0
cmpl $0x0, %eax
jne 0x6a41
leaq 0x107e83(%rip), %rax    # 0x10e8a8
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x6b22
movq 0x126570(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
leaq 0x105204(%rip), %rsi    # 0x10bc56
callq 0x46c0
cmpl $0x0, %eax
jne 0x6a7f
leaq 0x107e5d(%rip), %rax    # 0x10e8c0
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x6b20
movq 0x126532(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
leaq 0x102a33(%rip), %rsi    # 0x1094c3
callq 0x46c0
cmpl $0x0, %eax
jne 0x6aba
leaq 0x107e37(%rip), %rax    # 0x10e8d8
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x6b1e
movq 0x1264f7(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
leaq 0x102726(%rip), %rsi    # 0x1091f1
callq 0x46c0
cmpl $0x0, %eax
jne 0x6ade
movl $0x1, -0x18(%rbp)
jmp 0x6b1c
movq 0x1264d3(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
leaq 0x102707(%rip), %rsi    # 0x1091f6
callq 0x46c0
cmpl $0x0, %eax
jne 0x6b02
movl $0x1, -0x18(%rbp)
jmp 0x6b1a
movq 0x1264af(%rip), %rax    # 0x12cfb8
movq (%rax), %rsi
leaq 0x1029b4(%rip), %rdi    # 0x1094c7
movb $0x0, %al
callq 0x5d70
jmp 0x6b1c
jmp 0x6b1e
jmp 0x6b20
jmp 0x6b22
jmp 0x6b24
jmp 0x6b26
jmp 0x6ca5
movq 0x126486(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
leaq -0x80(%rbp), %rsi
movl $0xa, %edx
callq 0x46d0
movl %eax, -0x3c(%rbp)
movq -0x80(%rbp), %rax
cmpb $0x0, (%rax)
je 0x6b67
movq 0x126462(%rip), %rax    # 0x12cfb8
movq (%rax), %rsi
leaq 0x10298f(%rip), %rdi    # 0x1094ef
movb $0x0, %al
callq 0x5d70
movl $0x0, -0x18(%rbp)
jmp 0x6ca5
movq 0x12643e(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
leaq -0x80(%rbp), %rsi
movl $0xa, %edx
callq 0x46d0
movl %eax, -0x74(%rbp)
movq -0x80(%rbp), %rax
cmpb $0x0, (%rax)
je 0x6baf
movq 0x12641a(%rip), %rax    # 0x12cfb8
movq (%rax), %rsi
leaq 0x102968(%rip), %rdi    # 0x109510
movb $0x0, %al
callq 0x5d70
movl $0x0, -0x18(%rbp)
jmp 0x6ca5
movl $0x0, -0x54(%rbp)
jmp 0x6ca5
callq 0x16090
movq %rax, %rsi
leaq 0x10295b(%rip), %rdi    # 0x109531
movb $0x0, %al
callq 0x4060
movl $0x0, -0x4(%rbp)
jmp 0x724d
movq 0x1263b8(%rip), %rax    # 0x12cfa8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x7260
movl %eax, -0x4(%rbp)
jmp 0x724d
movq 0x1263af(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
callq 0x4800
movl %eax, -0x84(%rbp)
cmpl $0x0, -0x84(%rbp)
jge 0x6c2a
movl $0x0, -0x84(%rbp)
movl -0x84(%rbp), %edi
callq 0x24bd0
jmp 0x6ca5
movq 0x12637a(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
callq 0x4800
movl %eax, -0x58(%rbp)
cmpl $0x0, -0x58(%rbp)
jge 0x6c58
movl $0x0, -0x58(%rbp)
jmp 0x6c6a
cmpl $0x7ff, -0x58(%rbp)     # imm = 0x7FF
jl 0x6c68
movl $0x7ff, -0x58(%rbp)     # imm = 0x7FF
jmp 0x6c6a
jmp 0x6ca5
movl $0x1, -0x50(%rbp)
jmp 0x6ca5
movq 0x12633c(%rip), %rax    # 0x12cfb8
movq (%rax), %rdi
callq 0x4800
movl %eax, -0x4c(%rbp)
jmp 0x6ca5
movq 0x126340(%rip), %rax    # 0x12cfd0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x7260
movl %eax, -0x4(%rbp)
jmp 0x724d
jmp 0x67a7
cmpl $0x0, -0x74(%rbp)
jl 0x6cb6
movl -0x74(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq 0x12631b(%rip), %rax    # 0x12cfd8
movl (%rax), %eax
cmpl -0x8(%rbp), %eax
jne 0x6ce0
movq 0x126305(%rip), %rax    # 0x12cfd0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x7260
movl %eax, -0x4(%rbp)
jmp 0x724d
cmpl $0x0, -0x24(%rbp)
je 0x6d08
movq -0x10(%rbp), %rax
movq 0x1262e7(%rip), %rcx    # 0x12cfd8
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x54(%rbp), %esi
callq 0x74a0
movl %eax, -0x4(%rbp)
jmp 0x724d
movq -0x10(%rbp), %rax
movq 0x1262c5(%rip), %rcx    # 0x12cfd8
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
callq 0x5b00
movl %eax, -0x94(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x6e67
cmpl $0x1, -0x94(%rbp)
jne 0x6d69
leaq 0x107b13(%rip), %rax    # 0x10e860
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x6e65
cmpl $0x2, -0x94(%rbp)
jne 0x6d95
leaq 0x107aff(%rip), %rax    # 0x10e878
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x6e63
cmpl $0x80, -0x94(%rbp)
jne 0x6dc4
leaq 0x107b30(%rip), %rax    # 0x10e8d8
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x6e61
cmpl $0x4, -0x94(%rbp)
jne 0x6ded
leaq 0x107ad4(%rip), %rax    # 0x10e8a8
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x6e5f
cmpl $0x8, -0x94(%rbp)
jne 0x6e29
leaq 0x107ac3(%rip), %rax    # 0x10e8c0
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x6e27
cmpl $0x0, -0x28(%rbp)
je 0x6e27
movl $0xe, -0x1c(%rbp)
jmp 0x6e5d
cmpl $0x10, -0x94(%rbp)
jne 0x6e41
cmpl $0x0, -0x1c(%rbp)
jne 0x6e3f
movl $0xe, -0x1c(%rbp)
jmp 0x6e5b
cmpl $0x20, -0x94(%rbp)
jne 0x6e59
cmpl $0x0, -0x1c(%rbp)
jne 0x6e57
movl $0xe, -0x1c(%rbp)
jmp 0x6e59
jmp 0x6e5b
jmp 0x6e5d
jmp 0x6e5f
jmp 0x6e61
jmp 0x6e63
jmp 0x6e65
jmp 0x6e67
movl -0x8(%rbp), %eax
movq 0x126167(%rip), %rcx    # 0x12cfd8
movl (%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jg 0x6e92
cmpl $0x0, -0x5c(%rbp)
jne 0x6e92
cmpq $0x0, -0x70(%rbp)
jne 0x6e92
cmpq $0x0, -0x68(%rbp)
je 0x6f16
movl $0x0, -0x98(%rbp)
movq $0x0, -0xa0(%rbp)
cmpl $0x0, -0x5c(%rbp)
jne 0x6eec
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq 0x12611c(%rip), %rax    # 0x12cfd8
movslq (%rax), %rax
shlq $0x3, %rax
addq %rax, %rsi
addq $0x8, %rsi
movl -0x8(%rbp), %edx
movq 0x126104(%rip), %rax    # 0x12cfd8
subl (%rax), %edx
subl $0x1, %edx
leaq -0x98(%rbp), %rcx
callq 0x76f0
movq %rax, -0xa0(%rbp)
movq -0x90(%rbp), %rdx
movq -0xa0(%rbp), %rcx
movl -0x98(%rbp), %r8d
leaq -0x70(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x7a00
movl %eax, -0x4(%rbp)
jmp 0x724d
cmpl $0x0, -0x28(%rbp)
je 0x6f33
cmpl $0x0, -0x1c(%rbp)
jne 0x6f29
movl $0xe, -0x1c(%rbp)
movl -0x28(%rbp), %eax
imull -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x6f46
cmpl $0x0, -0x28(%rbp)
jne 0x6f46
movl $0x1, -0x28(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x6f73
movq -0x90(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl -0x94(%rbp), %edx
movl -0x4c(%rbp), %r8d
leaq -0x40(%rbp), %rcx
callq 0x5f90
movl %eax, -0x4(%rbp)
jmp 0x724d
leaq 0x1025f2(%rip), %rax    # 0x10956c
movq %rax, -0xa8(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x6f97
leaq 0x1025e3(%rip), %rax    # 0x109571
movq %rax, -0xa8(%rbp)
jmp 0x6fcb
cmpl $0x20, -0x94(%rbp)
jne 0x6fb0
leaq 0x1025cf(%rip), %rax    # 0x109576
movq %rax, -0xa8(%rbp)
jmp 0x6fc9
cmpl $0x40, -0x94(%rbp)
jne 0x6fc7
leaq 0x1025bb(%rip), %rax    # 0x10957b
movq %rax, -0xa8(%rbp)
jmp 0x6fc9
jmp 0x6fcb
movq -0x90(%rbp), %rdi
callq 0x41b0
movq %rax, %rdi
addq $0x6, %rdi
movl $0x1, %esi
callq 0x42f0
movq %rax, -0xb0(%rbp)
cmpq $0x0, -0xb0(%rbp)
jne 0x7016
callq 0x4050
movl (%rax), %edi
callq 0x4130
movq %rax, %rsi
leaq 0x10262e(%rip), %rdi    # 0x10963d
movb $0x0, %al
callq 0x5d70
movq -0xb0(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x4460
movq %rax, %rdi
movq -0xa8(%rbp), %rsi
callq 0x4910
cmpl $0x0, -0x20(%rbp)
jne 0x7089
movq -0xb0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x4420
cmpl $0x0, %eax
jne 0x7089
movq -0x90(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x4420
movq -0x178(%rbp), %rax
cmpq -0xe8(%rbp), %rax
jg 0x7087
leaq 0x102501(%rip), %rdi    # 0x109581
movb $0x0, %al
callq 0x5d70
jmp 0x7089
movq -0xb0(%rbp), %rdi
callq 0x45b0
cmpl $0x40, -0x94(%rbp)
jne 0x70da
movq -0x90(%rbp), %rdi
movl -0x1c(%rbp), %edx
movl -0x4c(%rbp), %ecx
xorl %eax, %eax
movl %eax, %esi
callq 0x32d00
cmpl $0x0, %eax
je 0x70ce
movq -0x90(%rbp), %rsi
leaq 0x1024f8(%rip), %rdi    # 0x1095bf
movb $0x0, %al
callq 0x5d70
movl $0x0, -0x4(%rbp)
jmp 0x724d
cmpl $0x0, -0x28(%rbp)
je 0x71df
cmpl $0x10, -0x94(%rbp)
jne 0x7129
movq -0x90(%rbp), %rdi
movl -0x1c(%rbp), %edx
movl -0x4c(%rbp), %ecx
xorl %eax, %eax
movl %eax, %esi
callq 0x5ed90
cmpl $0x0, %eax
je 0x711d
movq -0x90(%rbp), %rsi
leaq 0x1024c5(%rip), %rdi    # 0x1095db
movb $0x0, %al
callq 0x5d70
movl $0x0, -0x4(%rbp)
jmp 0x724d
cmpl $0x20, -0x94(%rbp)
jne 0x716e
movq -0x90(%rbp), %rdi
movl -0x1c(%rbp), %edx
movl -0x4c(%rbp), %ecx
xorl %eax, %eax
movl %eax, %esi
callq 0x32d00
cmpl $0x0, %eax
je 0x7162
movq -0x90(%rbp), %rsi
leaq 0x102464(%rip), %rdi    # 0x1095bf
movb $0x0, %al
callq 0x5d70
movl $0x0, -0x4(%rbp)
jmp 0x724d
movq -0x90(%rbp), %rdi
movl -0x1c(%rbp), %edx
movl -0x4c(%rbp), %ecx
xorl %eax, %eax
movl %eax, %esi
leaq -0x40(%rbp), %r8
callq 0x4ae10
movl %eax, -0x1d4(%rbp)
movl %eax, %ecx
movl %ecx, -0x1e4(%rbp)
subl $-0x2, %eax
je 0x71b5
jmp 0x719d
movl -0x1e4(%rbp), %eax
testl %eax, %eax
jne 0x71ca
jmp 0x71a9
movl $0x0, -0x4(%rbp)
jmp 0x724d
movq -0x90(%rbp), %rsi
leaq 0x102434(%rip), %rdi    # 0x1095f7
movb $0x0, %al
callq 0x5d70
movq -0x90(%rbp), %rsi
leaq 0x10244c(%rip), %rdi    # 0x109624
movb $0x0, %al
callq 0x5d70
movq -0x90(%rbp), %rdi
movl -0x1c(%rbp), %edx
movl -0x4c(%rbp), %ecx
xorl %eax, %eax
movl %eax, %esi
leaq -0x40(%rbp), %r8
callq 0x4ae10
movl %eax, -0x1d4(%rbp)
movl %eax, %ecx
movl %ecx, -0x1e8(%rbp)
subl $-0x2, %eax
je 0x7223
jmp 0x720e
movl -0x1e8(%rbp), %eax
testl %eax, %eax
jne 0x7238
jmp 0x721a
movl $0x0, -0x4(%rbp)
jmp 0x724d
movq -0x90(%rbp), %rsi
leaq 0x1023c6(%rip), %rdi    # 0x1095f7
movb $0x0, %al
callq 0x5d70
movq -0x90(%rbp), %rsi
leaq 0x1023de(%rip), %rdi    # 0x109624
movb $0x0, %al
callq 0x5d70
movl -0x4(%rbp), %eax
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
nopl (%rax)