// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/macro11.c
// Function: main
int main(
    int argc,
    char *argv[])
{
    char           *fnames[32];
    int             nr_files = 0;
    FILE           *obj = NULL;
    TEXT_RLD        tr;
    char           *objname = NULL;
    char           *lstname = NULL;
    int             arg;
    int             i;
    STACK           stack;
    int             errcount;

    if (argc <= 1) {
        print_help();
        exit(EXIT_FAILURE);
    }

    for (arg = 1; arg < argc; arg++)
        if (*argv[arg] == '-') {
            char           *cp;

            cp = argv[arg] + 1;
            if (!stricmp(cp, "h")) {
                print_help();
            } else if (!stricmp(cp, "v")) {
                print_version(stderr);
            } else if (!stricmp(cp, "e")) {
                /* Followed by options to enable */
                /* Since /SHOW and /ENABL option names don't overlap,
                   I consolidate. */
                if(arg >= argc-1 || !isalpha((unsigned char)*argv[arg+1])) {
                    usage("-e must be followed by an option to enable\n");
                }
                upcase(argv[++arg]);
                enable_tf(argv[arg], 1);
            } else if (!stricmp(cp, "d")) {
                /* Followed by an option to disable */
                if(arg >= argc-1 || !isalpha((unsigned char)*argv[arg+1])) {
                    usage("-d must be followed by an option to disable\n");
                }
                upcase(argv[++arg]);
                enable_tf(argv[arg], 0);
            } else if (!stricmp(cp, "m")) {
                /* Macro library */
                /* This option gives the name of an RT-11 compatible
                   macro library from which .MCALLed macros can be
                   found. */
                if(arg >= argc-1 || *argv[arg+1] == '-') {
                    usage("-m must be followed by a macro library file name\n");
                }
                arg++;
                int allow_olb = strcmp(argv[argc-1], "-x") == 0;
                mlbs[nr_mlbs] = mlb_open(argv[arg], allow_olb);
                if (mlbs[nr_mlbs] == NULL) {
                    fprintf(stderr, "Unable to register macro library %s\n", argv[arg]);
                    exit(EXIT_FAILURE);
                }
                nr_mlbs++;
            } else if (!stricmp(cp, "p")) {
                /* P for search path */
                /* The -p option gives the name of a directory in
                   which .MCALLed macros may be found.  */  {

                    if(arg >= argc-1 || *argv[arg+1] == '-') {
                        usage("-p must be followed by a macro search directory\n");
                    }

                    append_env("MCALL", argv[arg+1]);
                    arg++;
                }
            } else if (!stricmp(cp, "I")) {
                /* I for include path */
                /* The -I option gives the name of a directory in
                   which .included files may be found.  */  {

                    if(arg >= argc-1 || *argv[arg+1] == '-') {
                        usage("-I must be followed by a include file search directory\n");
                    }
                    append_env("INCLUDE", argv[arg+1]);

                    arg++;
                }
            } else if (!stricmp(cp, "o")) {
                /* The -o option gives the object file name (.OBJ) */
                if(arg >= argc-1 || *argv[arg+1] == '-') {
                    usage("-o must be followed by the object file name\n");
                }
                ++arg;
                objname = argv[arg];
            } else if (!stricmp(cp, "l")) {
                /* The option -l gives the listing file name (.LST) */
                /* -l - enables listing to stdout. */
                if(arg >= argc-1 ||
                        (argv[arg+1][0] == '-' && argv[arg+1][1] != '\0')) {
                    usage("-l must be followed by the listing file name (- for standard output)\n");
                }
                lstname = argv[++arg];
                if (strcmp(lstname, "-") == 0)
                    lstfile = stdout;
                else
                    lstfile = fopen(lstname, "w");
            } else if (!stricmp(cp, "x")) {
                /* The -x option invokes macro11 to expand the
                   contents of the registered macro libraries (see -m)
                   into individual .MAC files in the current
                   directory.  No assembly of input is done.  This
                   must be the last command line option.  */
                int             m;

                if(arg != argc-1) {
                    usage("-x must be the last option\n");
                }
                for (m = 0; m < nr_mlbs; m++)
                    mlb_extract(mlbs[m]);
                return EXIT_SUCCESS;
            } else if (!stricmp(cp, "ysl")) {
                /* set symbol_len */
                if (arg >= argc-1) {
                    usage("-s must be followed by a number\n");
                } else {
                    char           *s = argv[++arg];
                    char           *endp;
                    int             sl = strtol(s, &endp, 10);

                    if (*endp || sl < SYMMAX_DEFAULT || sl > SYMMAX_MAX) {
                        usage("-s must be followed by a number\n");
                    }
                    symbol_len = sl;
                }
            } else if (!stricmp(cp, "yus")) {
                /* allow underscores */
                symbol_allow_underscores = 1;
            } else if (!stricmp(cp, "yl1")) {
                /* list the first pass, in addition to the second */
                list_pass_0++;
            } else if (!stricmp(cp, "yd")) {
                enabl_debug++;
            } else {
                fprintf(stderr, "Unknown option %s\n", argv[arg]);
                print_help();
                exit(EXIT_FAILURE);
            }
        } else {
            fnames[nr_files++] = argv[arg];
        }

    if (objname) {
        obj = fopen(objname, "wb");
        if (obj == NULL)
            return EXIT_FAILURE;
    }

    add_symbols(&blank_section);

    text_init(&tr, NULL, 0);

    module_name = memcheck(strdup(".MAIN."));

    xfer_address = new_ex_lit(1);      /* The undefined transfer address */

    stack_init(&stack);
    /* Push the files onto the input stream in reverse order */
    for (i = nr_files - 1; i >= 0; --i) {
        STREAM         *str = new_file_stream(fnames[i]);

        if (str == NULL) {
            report(NULL, "Unable to open file %s\n", fnames[i]);
            exit(EXIT_FAILURE);
        }
        stack_push(&stack, str);
    }

    DOT = 0;
    current_pc->section = &blank_section;
    last_dot_section = NULL;
    pass = 0;
    stmtno = 0;
    lsb = 0;
    next_lsb = 1;
    lsb_used = 0;
    last_macro_lsb = -1;
    last_locsym = 32767;
    last_cond = -1;
    sect_sp = -1;
    suppressed = 0;

    assemble_stack(&stack, &tr);

    if (list_pass_0 && lstfile) {
        list_symbol_table();
    }
#if 0
    if (enabl_debug > 1)
        dump_all_macros();
#endif

    assert(stack.top == NULL);

    migrate_implicit();                /* Migrate the implicit globals */
    write_globals(obj);                /* Write the global symbol dictionary */

#if 0
    sym_hist(&symbol_st, "symbol_st"); /* Draw a symbol table histogram */
#endif


    text_init(&tr, obj, 0);

    stack_init(&stack);                /* Superfluous... */
    /* Re-push the files onto the input stream in reverse order */
    for (i = nr_files - 1; i >= 0; --i) {
        STREAM         *str = new_file_stream(fnames[i]);

        if (str == NULL) {
            report(NULL, "Unable to open file %s\n", fnames[i]);
            exit(EXIT_FAILURE);
        }
        stack_push(&stack, str);
    }

    DOT = 0;

    current_pc->section = &blank_section;
    last_dot_section = NULL;

    pass = 1;
    stmtno = 0;
    lsb = 0;
    next_lsb = 1;
    lsb_used = 0;
    last_macro_lsb = -1;
    last_locsym = 32767;
    pop_cond(-1);
    sect_sp = -1;
    suppressed = 0;

    errcount = assemble_stack(&stack, &tr);

    text_flush(&tr);

    while (last_cond >= 0) {
        report(NULL, "%s:%d: Unterminated conditional\n", conds[last_cond].file, conds[last_cond].line);
        pop_cond(last_cond - 1);
        errcount++;
    }

    for (i = 0; i < nr_mlbs; i++)
        mlb_close(mlbs[i]);

    write_endmod(obj);

    if (obj != NULL)
        fclose(obj);

    if (errcount > 0)
        fprintf(stderr, "%d Errors\n", errcount);

    if (lstfile) {
        list_symbol_table();
    }

    if (lstfile && strcmp(lstname, "-") != 0)
        fclose(lstfile);

    return errcount > 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2a0, %rsp            # imm = 0x2A0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x114(%rbp)
movq $0x0, -0x120(%rbp)
movq $0x0, -0x240(%rbp)
movq $0x0, -0x248(%rbp)
cmpl $0x1, -0x8(%rbp)
jg 0x2479
callq 0x3180
movl $0x1, %edi
callq 0x22b0
movl $0x1, -0x24c(%rbp)
movl -0x24c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x2c40
movq -0x10(%rbp), %rax
movslq -0x24c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x2c00
movq -0x10(%rbp), %rax
movslq -0x24c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x1, %rax
movq %rax, -0x268(%rbp)
movq -0x268(%rbp), %rdi
leaq 0x11b2f(%rip), %rsi     # 0x14004
callq 0x2050
cmpl $0x0, %eax
jne 0x24e9
callq 0x3180
jmp 0x2bfe
movq -0x268(%rbp), %rdi
leaq 0x11b0f(%rip), %rsi     # 0x14006
callq 0x2050
cmpl $0x0, %eax
jne 0x2515
movq 0x16af0(%rip), %rax     # 0x18ff8
movq (%rax), %rdi
callq 0x3440
jmp 0x2bfc
movq -0x268(%rbp), %rdi
leaq 0x11ae5(%rip), %rsi     # 0x14008
callq 0x2050
cmpl $0x0, %eax
jne 0x25ba
movl -0x24c(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x2571
callq 0x22e0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl -0x24c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
jne 0x257d
leaq 0x11a92(%rip), %rdi     # 0x1400a
callq 0x23f0
movq -0x10(%rbp), %rax
movl -0x24c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x24c(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x13720
movq -0x10(%rbp), %rax
movslq -0x24c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x1, %esi
callq 0x34c0
jmp 0x2bfa
movq -0x268(%rbp), %rdi
leaq 0x13141(%rip), %rsi     # 0x15709
callq 0x2050
cmpl $0x0, %eax
jne 0x265c
movl -0x24c(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x2616
callq 0x22e0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl -0x24c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
jne 0x2622
leaq 0x11a19(%rip), %rdi     # 0x14036
callq 0x23f0
movq -0x10(%rbp), %rax
movl -0x24c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x24c(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x13720
movq -0x10(%rbp), %rax
movslq -0x24c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
xorl %esi, %esi
callq 0x34c0
jmp 0x2bf8
movq -0x268(%rbp), %rdi
leaq 0x119f9(%rip), %rsi     # 0x14063
callq 0x2050
cmpl $0x0, %eax
jne 0x2782
movl -0x24c(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x26a4
movq -0x10(%rbp), %rax
movl -0x24c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x26b0
leaq 0x119ba(%rip), %rdi     # 0x14065
callq 0x23f0
movl -0x24c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24c(%rbp)
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x119c0(%rip), %rsi     # 0x14097
callq 0x21b0
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x26c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x24c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x26c(%rbp), %esi
callq 0x107a0
movq %rax, %rdx
leaq 0x17497(%rip), %rax     # 0x19ba8
movslq (%rax), %rcx
leaq 0x174b5(%rip), %rax     # 0x19bd0
movq %rdx, (%rax,%rcx,8)
leaq 0x17482(%rip), %rax     # 0x19ba8
movslq (%rax), %rcx
leaq 0x174a0(%rip), %rax     # 0x19bd0
cmpq $0x0, (%rax,%rcx,8)
jne 0x2768
movq 0x168ba(%rip), %rax     # 0x18ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x24c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x11943(%rip), %rsi     # 0x1409a
movb $0x0, %al
callq 0x21c0
movl $0x1, %edi
callq 0x22b0
leaq 0x17439(%rip), %rax     # 0x19ba8
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1742d(%rip), %rax     # 0x19ba8
movl %ecx, (%rax)
jmp 0x2bf6
movq -0x268(%rbp), %rdi
leaq 0x1192f(%rip), %rsi     # 0x140bf
callq 0x2050
cmpl $0x0, %eax
jne 0x2806
movl -0x24c(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x27c6
movq -0x10(%rbp), %rax
movl -0x24c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x27d2
leaq 0x118f4(%rip), %rdi     # 0x140c1
callq 0x23f0
movq -0x10(%rbp), %rax
movl -0x24c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1307d(%rip), %rdi     # 0x1586a
callq 0x3590
movl -0x24c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24c(%rbp)
jmp 0x2bf4
movq -0x268(%rbp), %rdi
leaq 0x1333f(%rip), %rsi     # 0x15b53
callq 0x2050
cmpl $0x0, %eax
jne 0x288a
movl -0x24c(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x284a
movq -0x10(%rbp), %rax
movl -0x24c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x2856
leaq 0x118a1(%rip), %rdi     # 0x140f2
callq 0x23f0
movq -0x10(%rbp), %rax
movl -0x24c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x12fda(%rip), %rdi     # 0x1584b
callq 0x3590
movl -0x24c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24c(%rbp)
jmp 0x2bf2
movq -0x268(%rbp), %rdi
leaq 0x12c1c(%rip), %rsi     # 0x154b4
callq 0x2050
cmpl $0x0, %eax
jne 0x2904
movl -0x24c(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x28ce
movq -0x10(%rbp), %rax
movl -0x24c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x28da
leaq 0x11855(%rip), %rdi     # 0x1412a
callq 0x23f0
movl -0x24c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x24c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x240(%rbp)
jmp 0x2bf0
movq -0x268(%rbp), %rdi
leaq 0x118ad(%rip), %rsi     # 0x141bf
callq 0x2050
cmpl $0x0, %eax
jne 0x29e9
movl -0x24c(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x2969
movq -0x10(%rbp), %rax
movl -0x24c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x2975
movq -0x10(%rbp), %rax
movl -0x24c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x2975
leaq 0x117e7(%rip), %rdi     # 0x14157
callq 0x23f0
movq -0x10(%rbp), %rax
movl -0x24c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x24c(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x248(%rbp)
movq -0x248(%rbp), %rdi
leaq 0x117f9(%rip), %rsi     # 0x1419d
callq 0x21b0
cmpl $0x0, %eax
jne 0x29c4
movq 0x16623(%rip), %rax     # 0x18fd8
movq (%rax), %rcx
leaq 0x18cc1(%rip), %rax     # 0x1b680
movq %rcx, (%rax)
jmp 0x29e4
movq -0x248(%rbp), %rdi
leaq 0x117cd(%rip), %rsi     # 0x1419f
callq 0x2260
movq %rax, %rcx
leaq 0x18c9f(%rip), %rax     # 0x1b680
movq %rcx, (%rax)
jmp 0x2bee
movq -0x268(%rbp), %rdi
leaq 0x116a1(%rip), %rsi     # 0x14098
callq 0x2050
cmpl $0x0, %eax
jne 0x2a6c
movl -0x24c(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x2a1d
leaq 0x11789(%rip), %rdi     # 0x141a1
callq 0x23f0
movl $0x0, -0x270(%rbp)
movl -0x270(%rbp), %eax
leaq 0x17174(%rip), %rcx     # 0x19ba8
cmpl (%rcx), %eax
jge 0x2a60
movslq -0x270(%rbp), %rcx
leaq 0x1718a(%rip), %rax     # 0x19bd0
movq (%rax,%rcx,8), %rdi
callq 0x111b0
movl -0x270(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x270(%rbp)
jmp 0x2a27
movl $0x0, -0x4(%rbp)
jmp 0x3171
movq -0x268(%rbp), %rdi
leaq 0x11743(%rip), %rsi     # 0x141bd
callq 0x2050
cmpl $0x0, %eax
jne 0x2b26
movl -0x24c(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x2aa6
leaq 0x11722(%rip), %rdi     # 0x141c1
callq 0x23f0
jmp 0x2b21
movq -0x10(%rbp), %rax
movl -0x24c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x24c(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x278(%rbp)
movq -0x278(%rbp), %rdi
leaq -0x280(%rbp), %rsi
movl $0xa, %edx
callq 0x21f0
movl %eax, -0x284(%rbp)
movq -0x280(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x2b06
cmpl $0x6, -0x284(%rbp)
jl 0x2b06
cmpl $0x40, -0x284(%rbp)
jle 0x2b12
leaq 0x116b4(%rip), %rdi     # 0x141c1
callq 0x23f0
movl -0x284(%rbp), %ecx
leaq 0x16fb9(%rip), %rax     # 0x19ad8
movl %ecx, (%rax)
jmp 0x2bea
movq -0x268(%rbp), %rdi
leaq 0x116ae(%rip), %rsi     # 0x141e2
callq 0x2050
cmpl $0x0, %eax
jne 0x2b50
leaq 0x18b5b(%rip), %rax     # 0x1b6a0
movl $0x1, (%rax)
jmp 0x2be8
movq -0x268(%rbp), %rdi
leaq 0x11688(%rip), %rsi     # 0x141e6
callq 0x2050
cmpl $0x0, %eax
jne 0x2b7f
leaq 0x18b19(%rip), %rax     # 0x1b688
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x18b0d(%rip), %rax     # 0x1b688
movl %ecx, (%rax)
jmp 0x2be6
movq -0x268(%rbp), %rdi
leaq 0x1165d(%rip), %rsi     # 0x141ea
callq 0x2050
cmpl $0x0, %eax
jne 0x2bae
leaq 0x16ffa(%rip), %rax     # 0x19b98
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x16fee(%rip), %rax     # 0x19b98
movl %ecx, (%rax)
jmp 0x2be4
movq 0x16443(%rip), %rax     # 0x18ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x24c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x1161f(%rip), %rsi     # 0x141ed
movb $0x0, %al
callq 0x21c0
callq 0x3180
movl $0x1, %edi
callq 0x22b0
jmp 0x2be6
jmp 0x2be8
jmp 0x2bea
jmp 0x2bec
jmp 0x2bee
jmp 0x2bf0
jmp 0x2bf2
jmp 0x2bf4
jmp 0x2bf6
jmp 0x2bf8
jmp 0x2bfa
jmp 0x2bfc
jmp 0x2bfe
jmp 0x2c2a
movq -0x10(%rbp), %rax
movslq -0x24c(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movl -0x114(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x114(%rbp)
cltq
movq %rcx, -0x110(%rbp,%rax,8)
jmp 0x2c2c
movl -0x24c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24c(%rbp)
jmp 0x2483
cmpq $0x0, -0x240(%rbp)
je 0x2c7c
movq -0x240(%rbp), %rdi
leaq 0x115a8(%rip), %rsi     # 0x14200
callq 0x2260
movq %rax, -0x120(%rbp)
cmpq $0x0, -0x120(%rbp)
jne 0x2c7a
movl $0x1, -0x4(%rbp)
jmp 0x3171
jmp 0x2c7c
leaq 0x165bd(%rip), %rdi     # 0x19240
callq 0xe3f0
leaq -0x238(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x11810
leaq 0x11562(%rip), %rdi     # 0x14203
callq 0x22d0
movq %rax, %rdi
callq 0x136a0
movq %rax, %rcx
leaq 0x16ef8(%rip), %rax     # 0x19bb0
movq %rcx, (%rax)
movl $0x1, %edi
callq 0xa3c0
movq %rax, %rcx
leaq 0x16ef1(%rip), %rax     # 0x19bc0
movq %rcx, (%rax)
leaq -0x258(%rbp), %rdi
callq 0x131e0
movl -0x114(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x250(%rbp)
cmpl $0x0, -0x250(%rbp)
jl 0x2d6a
movslq -0x250(%rbp), %rax
movq -0x110(%rbp,%rax,8), %rdi
callq 0x13120
movq %rax, -0x290(%rbp)
cmpq $0x0, -0x290(%rbp)
jne 0x2d46
movslq -0x250(%rbp), %rax
movq -0x110(%rbp,%rax,8), %rdx
xorl %eax, %eax
movl %eax, %edi
leaq 0x114d5(%rip), %rsi     # 0x1420a
movb $0x0, %al
callq 0xa890
movl $0x1, %edi
callq 0x22b0
movq -0x290(%rbp), %rsi
leaq -0x258(%rbp), %rdi
callq 0x13250
movl -0x250(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x250(%rbp)
jmp 0x2ced
leaq 0x188f7(%rip), %rax     # 0x1b668
movq (%rax), %rax
movl $0x0, 0x8(%rax)
leaq 0x188e6(%rip), %rax     # 0x1b668
movq (%rax), %rax
leaq 0x164b4(%rip), %rcx     # 0x19240
movq %rcx, 0x18(%rax)
leaq 0x188e1(%rip), %rax     # 0x1b678
movq $0x0, (%rax)
leaq 0x16ddb(%rip), %rax     # 0x19b80
movl $0x0, (%rax)
leaq 0x16dd2(%rip), %rax     # 0x19b84
movl $0x0, (%rax)
leaq 0x16dc9(%rip), %rax     # 0x19b88
movl $0x0, (%rax)
leaq 0x16dc4(%rip), %rax     # 0x19b90
movl $0x1, (%rax)
leaq 0x16db3(%rip), %rax     # 0x19b8c
movl $0x0, (%rax)
leaq 0x16dae(%rip), %rax     # 0x19b94
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leaq 0x163a1(%rip), %rax     # 0x19194
movl $0x7fff, (%rax)         # imm = 0x7FFF
leaq 0x186d0(%rip), %rax     # 0x1b4d0
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leaq 0x18853(%rip), %rax     # 0x1b660
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leaq 0x16d8a(%rip), %rax     # 0x19ba4
movl $0x0, (%rax)
leaq -0x258(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x3740
leaq 0x1884e(%rip), %rax     # 0x1b688
cmpl $0x0, (%rax)
je 0x2e51
leaq 0x1883a(%rip), %rax     # 0x1b680
cmpq $0x0, (%rax)
je 0x2e51
callq 0x10210
cmpq $0x0, -0x258(%rbp)
jne 0x2e5d
jmp 0x2e7c
leaq 0x113be(%rip), %rdi     # 0x14222
leaq 0x113c9(%rip), %rsi     # 0x14234
movl $0x174, %edx            # imm = 0x174
leaq 0x113c7(%rip), %rcx     # 0x1423e
callq 0x2100
callq 0x7a70
movq -0x120(%rbp), %rdi
callq 0x8c70
movq -0x120(%rbp), %rsi
leaq -0x238(%rbp), %rdi
xorl %edx, %edx
callq 0x11810
leaq -0x258(%rbp), %rdi
callq 0x131e0
movl -0x114(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x250(%rbp)
cmpl $0x0, -0x250(%rbp)
jl 0x2f3a
movslq -0x250(%rbp), %rax
movq -0x110(%rbp,%rax,8), %rdi
callq 0x13120
movq %rax, -0x298(%rbp)
cmpq $0x0, -0x298(%rbp)
jne 0x2f16
movslq -0x250(%rbp), %rax
movq -0x110(%rbp,%rax,8), %rdx
xorl %eax, %eax
movl %eax, %edi
leaq 0x11305(%rip), %rsi     # 0x1420a
movb $0x0, %al
callq 0xa890
movl $0x1, %edi
callq 0x22b0
movq -0x298(%rbp), %rsi
leaq -0x258(%rbp), %rdi
callq 0x13250
movl -0x250(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x250(%rbp)
jmp 0x2ebd
leaq 0x18727(%rip), %rax     # 0x1b668
movq (%rax), %rax
movl $0x0, 0x8(%rax)
leaq 0x18716(%rip), %rax     # 0x1b668
movq (%rax), %rax
leaq 0x162e4(%rip), %rcx     # 0x19240
movq %rcx, 0x18(%rax)
leaq 0x18711(%rip), %rax     # 0x1b678
movq $0x0, (%rax)
leaq 0x16c0b(%rip), %rax     # 0x19b80
movl $0x1, (%rax)
leaq 0x16c02(%rip), %rax     # 0x19b84
movl $0x0, (%rax)
leaq 0x16bf9(%rip), %rax     # 0x19b88
movl $0x0, (%rax)
leaq 0x16bf4(%rip), %rax     # 0x19b90
movl $0x1, (%rax)
leaq 0x16be3(%rip), %rax     # 0x19b8c
movl $0x0, (%rax)
leaq 0x16bde(%rip), %rax     # 0x19b94
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leaq 0x161d1(%rip), %rax     # 0x19194
movl $0x7fff, (%rax)         # imm = 0x7FFF
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x8880
leaq 0x18686(%rip), %rax     # 0x1b660
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leaq 0x16bbd(%rip), %rax     # 0x19ba4
movl $0x0, (%rax)
leaq -0x258(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x3740
movl %eax, -0x25c(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x118a0
leaq 0x184b7(%rip), %rax     # 0x1b4d0
cmpl $0x0, (%rax)
jl 0x3089
leaq 0x184ab(%rip), %rax     # 0x1b4d0
movslq (%rax), %rcx
leaq 0x16ca1(%rip), %rax     # 0x19cd0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdx
leaq 0x1848f(%rip), %rax     # 0x1b4d0
movslq (%rax), %rcx
leaq 0x16c85(%rip), %rax     # 0x19cd0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
xorl %eax, %eax
movl %eax, %edi
leaq 0x111f5(%rip), %rsi     # 0x14255
movb $0x0, %al
callq 0xa890
leaq 0x18462(%rip), %rax     # 0x1b4d0
movl (%rax), %edi
subl $0x1, %edi
callq 0x8880
movl -0x25c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x25c(%rbp)
jmp 0x3012
movl $0x0, -0x250(%rbp)
movl -0x250(%rbp), %eax
leaq 0x16b08(%rip), %rcx     # 0x19ba8
cmpl (%rcx), %eax
jge 0x30cc
movslq -0x250(%rbp), %rcx
leaq 0x16b1e(%rip), %rax     # 0x19bd0
movq (%rax,%rcx,8), %rdi
callq 0x10d30
movl -0x250(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x250(%rbp)
jmp 0x3093
movq -0x120(%rbp), %rdi
callq 0x12ac0
cmpq $0x0, -0x120(%rbp)
je 0x30ee
movq -0x120(%rbp), %rdi
callq 0x20b0
cmpl $0x0, -0x25c(%rbp)
jle 0x3115
movq 0x15efa(%rip), %rax     # 0x18ff8
movq (%rax), %rdi
movl -0x25c(%rbp), %edx
leaq 0x11168(%rip), %rsi     # 0x14276
movb $0x0, %al
callq 0x21c0
leaq 0x18564(%rip), %rax     # 0x1b680
cmpq $0x0, (%rax)
je 0x3127
callq 0x10210
leaq 0x18552(%rip), %rax     # 0x1b680
cmpq $0x0, (%rax)
je 0x315b
movq -0x248(%rbp), %rdi
leaq 0x1105b(%rip), %rsi     # 0x1419d
callq 0x21b0
cmpl $0x0, %eax
je 0x315b
leaq 0x1852d(%rip), %rax     # 0x1b680
movq (%rax), %rdi
callq 0x20b0
movl -0x25c(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovgl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbp
retq
nopl (%rax)