// File: FreeSlave[P]def2fgd/src/main.cpp
// Function: main
int main(int argc, char** argv)
{
    const char* format = "";
    const char* inputFileName = 0;
    const char* outputFileName = 0;
    FGDWriteOptions options;

    const char* package = "def2fgd";
    const char* localeDir = LOCALEDIR;

    generateLocale(package, localeDir);

    std::vector<const char*> positionalArgs;
    const char* programName = argv[0];
    for(int i=1; i<argc; ++i) {
        const char* arg = argv[i];
        if (strcmp(arg, "-format") == 0) {
            if (format[0]) {
                fputs(translate("-format option repetition\n").c_str(), stderr);
                return EXIT_FAILURE;
            }

            i++;
            if (i < argc) {
                format = argv[i];
            } else {
                fputs(translate("-format requires argument\n").c_str(), stderr);
                return EXIT_FAILURE;
            }
        } else if (strcmp(arg, "-bob") == 0) {
            if (options.bob) {
                printBobparms(options);
                return EXIT_FAILURE;
            }

            options.bobparms[0] = 180;
            options.bobparms[1] = 8;
            options.bobparms[2] = 0;
            options.bob = true;
        } else if (strcmp(arg, "-bobparms") == 0) {
            if (options.bob) {
                printBobparms(options);
                return EXIT_FAILURE;
            }

            i++;
            if (i < argc) {
                char* current = argv[i];
                options.bobparms[0] = static_cast<int>(strtol(current, &current, 10));
                options.bobparms[1] = static_cast<int>(strtol(current, &current, 10));
                options.bobparms[2] = static_cast<int>(strtol(current, NULL, 10));
                options.bob = true;
            } else {
                fputs(translate("-bobparms requires argument\n").c_str(), stderr);
                return EXIT_FAILURE;
            }
        } else if (strcmp(arg, "-offset-glob") == 0) {
            i++;
            if (i < argc) {
                options.offsetPatterns.push_back(argv[i]);
            } else {
                fputs(translate("-offset-glob requires argument\n").c_str(), stderr);
                return EXIT_FAILURE;
            }
        } else if (strcmp(arg, "-bob-glob") == 0) {
            i++;
            if (i < argc) {
                options.bobPatterns.push_back(argv[i]);
            } else {
                fputs(translate("-bob-glob requires argument\n").c_str(), stderr);
                return EXIT_FAILURE;
            }

        } else if (strcmp(arg, "-noauto-bob-glob") == 0) {
            options.useDefaultBobPatterns = false;
        } else if (strcmp(arg, "-noauto-offset-glob") == 0) {
            options.useDefaultOffsetPatterns = false;
        } else if (strcmp(arg, "-help") == 0 || strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) {
            printHelp(programName);
            return EXIT_SUCCESS;
        } else if (strcmp(arg, "-version") == 0 || strcmp(arg, "--version") == 0) {
            printVersion();
            return EXIT_SUCCESS;
        } else if (strcmp(arg, "--") == 0) {
            for (; ++i<argc;) {
                positionalArgs.push_back(argv[i]);
            }
        } else if (arg[0] == '-' && arg[1] != '\0') {
            fprintf(stderr, translate("Unknown parameter: %s\n").c_str(), arg);
            printHint(argv[0]);
            return EXIT_FAILURE;
        } else {
            positionalArgs.push_back(arg);
        }
    }

    if (positionalArgs.size() > 0) {
        inputFileName = positionalArgs[0];
        if (positionalArgs.size() > 1) {
            outputFileName = positionalArgs[1];
        }
    }

    if (inputFileName && strcmp(inputFileName, "-") == 0) {
        inputFileName = 0;
    }

    if (outputFileName && strcmp(outputFileName, "-") == 0) {
        outputFileName = 0;
    }

    if (format[0] == '\0') {
        if (inputFileName) {
            const char* extension = strrchr(inputFileName, '.');
            if (extension && strcmp(extension, ".ent") == 0){
                format = "ent";
            } else if (extension && strcmp(extension, ".def") == 0) {
                format = "def";
            } else {
                fputs(translate("Could not detect input format. Use -format option to explicitly set it.\n").c_str(), stderr);
                return EXIT_FAILURE;
            }
        } else {
            fputs(translate("No input file name nor format given.\n").c_str(), stderr);
            printHint(argv[0]);
            return EXIT_FAILURE;
        }
    }

    std::istream* inStream = &std::cin;
    std::ostream* outStream = &std::cout;

    std::ifstream inFile;
    std::ofstream outFile;

    if (inputFileName != 0) {
        inFile.open(inputFileName);
        if (!inFile) {
            fprintf(stderr, translate("Could not open file %s for reading: %s\n").c_str(), inputFileName, strerror(errno));
            return EXIT_FAILURE;
        }
        inStream = &inFile;
    }

    try
    {
        std::vector<Entity> entities;
        if (strcmp(format, "def") == 0) {
            entities = readDefFile(*inStream);
        } else if (strcmp(format, "ent") == 0) {
            entities = readEntFile(*inStream);
        } else {
            fprintf(stderr, translate("Unknown format '%s'\n").c_str(), format);
            return EXIT_FAILURE;
        }

        if (outputFileName) {
            outFile.open(outputFileName);
            if (!outFile) {
                fprintf(stderr, translate("Could not open file %s for writing: %s\n").c_str(), outputFileName, strerror(errno));
                return EXIT_FAILURE;
            }
            outStream = &outFile;
        }

        writefgd(*outStream, entities, options);
        outStream->flush();
    }
    catch(DefReadError& e)
    {
        if (inputFileName) {
            fprintf(stderr, translate("%s:%d:%d: error: %s\n").c_str(), inputFileName, e.line(), e.column(), e.what());
        } else {
            fprintf(stderr, translate("%d:%d: error: %s\n").c_str(), e.line(), e.column(), e.what());
        }

        return EXIT_FAILURE;
    }
    catch(std::exception& e)
    {
        fprintf(stderr, translate("Error: %s\n").c_str(), e.what());
        return EXIT_FAILURE;
    }
    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7d0, %rsp            # imm = 0x7D0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xf1e2(%rip), %rax      # 0x151d2
movq %rax, -0x708(%rbp)
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x47b0
movq -0x708(%rbp), %rdx
leaq 0xf5ba(%rip), %rax      # 0x155dc
movq %rax, -0x70(%rbp)
leaq 0xf5b7(%rip), %rax      # 0x155e4
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x140c0
jmp 0x6040
leaq -0xa0(%rbp), %rdi
callq 0x7120
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
movl $0x1, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x676e
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
leaq 0xf554(%rip), %rsi      # 0x155eb
callq 0x44d0
cmpl $0x0, %eax
jne 0x61fc
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x6151
leaq 0xf53a(%rip), %rsi      # 0x155f3
leaq -0xd8(%rbp), %rdi
callq 0x140e0
jmp 0x60c7
leaq -0xd8(%rbp), %rdi
callq 0x4120
movq %rax, %rdi
movq 0x16eeb(%rip), %rax     # 0x1cfc8
movq (%rax), %rsi
callq 0x43f0
jmp 0x60e7
leaq -0xd8(%rbp), %rdi
callq 0x41f0
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x707b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x70a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x709c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x41f0
jmp 0x709c
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x6180
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
jmp 0x61f7
leaq 0xf487(%rip), %rsi      # 0x1560e
leaq -0x100(%rbp), %rdi
callq 0x140e0
jmp 0x6195
leaq -0x100(%rbp), %rdi
callq 0x4120
movq %rax, %rdi
movq 0x16e1d(%rip), %rax     # 0x1cfc8
movq (%rax), %rsi
callq 0x43f0
jmp 0x61b5
leaq -0x100(%rbp), %rdi
callq 0x41f0
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x707b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x41f0
jmp 0x709c
jmp 0x6758
movq -0xb8(%rbp), %rdi
leaq 0xf41f(%rip), %rsi      # 0x15629
callq 0x44d0
cmpl $0x0, %eax
jne 0x6259
testb $0x1, -0x5c(%rbp)
je 0x623b
leaq -0x68(%rbp), %rdi
callq 0x5f60
jmp 0x6225
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x707b
movl $0xb4, -0x68(%rbp)
movl $0x8, -0x64(%rbp)
movl $0x0, -0x60(%rbp)
movb $0x1, -0x5c(%rbp)
jmp 0x6756
movq -0xb8(%rbp), %rdi
leaq 0xf3c7(%rip), %rsi      # 0x1562e
callq 0x44d0
cmpl $0x0, %eax
jne 0x639c
testb $0x1, -0x5c(%rbp)
je 0x629c
leaq -0x68(%rbp), %rdi
callq 0x5f60
jmp 0x6286
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x707b
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x6320
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rdi
leaq -0x108(%rbp), %rsi
movl $0xa, %edx
callq 0x44e0
movl %eax, -0x68(%rbp)
movq -0x108(%rbp), %rdi
leaq -0x108(%rbp), %rsi
movl $0xa, %edx
callq 0x44e0
movl %eax, -0x64(%rbp)
movq -0x108(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x44e0
movl %eax, -0x60(%rbp)
movb $0x1, -0x5c(%rbp)
jmp 0x6397
leaq 0xf311(%rip), %rsi      # 0x15638
leaq -0x128(%rbp), %rdi
callq 0x140e0
jmp 0x6335
leaq -0x128(%rbp), %rdi
callq 0x4120
movq %rax, %rdi
movq 0x16c7d(%rip), %rax     # 0x1cfc8
movq (%rax), %rsi
callq 0x43f0
jmp 0x6355
leaq -0x128(%rbp), %rdi
callq 0x41f0
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x707b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x41f0
jmp 0x709c
jmp 0x6754
movq -0xb8(%rbp), %rdi
leaq 0xf300(%rip), %rsi      # 0x156aa
callq 0x44d0
cmpl $0x0, %eax
jne 0x646a
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x63ee
leaq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
leaq (%rax,%rcx,8), %rsi
callq 0x7840
jmp 0x63ec
jmp 0x6465
leaq 0xf260(%rip), %rsi      # 0x15655
leaq -0x148(%rbp), %rdi
callq 0x140e0
jmp 0x6403
leaq -0x148(%rbp), %rdi
callq 0x4120
movq %rax, %rdi
movq 0x16baf(%rip), %rax     # 0x1cfc8
movq (%rax), %rsi
callq 0x43f0
jmp 0x6423
leaq -0x148(%rbp), %rdi
callq 0x41f0
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x707b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x41f0
jmp 0x709c
jmp 0x6752
movq -0xb8(%rbp), %rdi
leaq 0xf221(%rip), %rsi      # 0x15699
callq 0x44d0
cmpl $0x0, %eax
jne 0x6538
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x64bc
leaq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
leaq (%rax,%rcx,8), %rsi
callq 0x7840
jmp 0x64ba
jmp 0x6533
leaq 0xf1b2(%rip), %rsi      # 0x15675
leaq -0x168(%rbp), %rdi
callq 0x140e0
jmp 0x64d1
leaq -0x168(%rbp), %rdi
callq 0x4120
movq %rax, %rdi
movq 0x16ae1(%rip), %rax     # 0x1cfc8
movq (%rax), %rsi
callq 0x43f0
jmp 0x64f1
leaq -0x168(%rbp), %rdi
callq 0x41f0
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x707b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x41f0
jmp 0x709c
jmp 0x6750
movq -0xb8(%rbp), %rdi
leaq 0xf14c(%rip), %rsi      # 0x15692
callq 0x44d0
cmpl $0x0, %eax
jne 0x6559
movb $0x0, -0x5b(%rbp)
jmp 0x674e
movq -0xb8(%rbp), %rdi
leaq 0xf13c(%rip), %rsi      # 0x156a3
callq 0x44d0
cmpl $0x0, %eax
jne 0x657a
movb $0x0, -0x5a(%rbp)
jmp 0x674c
movq -0xb8(%rbp), %rdi
leaq 0xf130(%rip), %rsi      # 0x156b8
callq 0x44d0
cmpl $0x0, %eax
je 0x65c2
movq -0xb8(%rbp), %rdi
leaq 0xf117(%rip), %rsi      # 0x156b7
callq 0x44d0
cmpl $0x0, %eax
je 0x65c2
movq -0xb8(%rbp), %rdi
leaq 0xf106(%rip), %rsi      # 0x156be
callq 0x44d0
cmpl $0x0, %eax
jne 0x65e6
movq -0xa8(%rbp), %rdi
callq 0x5e70
jmp 0x65d0
movl $0x0, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x707b
movq -0xb8(%rbp), %rdi
leaq 0xf0ce(%rip), %rsi      # 0x156c2
callq 0x44d0
cmpl $0x0, %eax
je 0x6616
movq -0xb8(%rbp), %rdi
leaq 0xf0b5(%rip), %rsi      # 0x156c1
callq 0x44d0
cmpl $0x0, %eax
jne 0x6633
callq 0x5ee0
jmp 0x661d
movl $0x0, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x707b
movq -0xb8(%rbp), %rdi
leaq 0xf08a(%rip), %rsi      # 0x156cb
callq 0x44d0
cmpl $0x0, %eax
jne 0x6685
jmp 0x664d
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
cmpl -0x8(%rbp), %eax
jge 0x6680
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
leaq (%rax,%rcx,8), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x7840
jmp 0x667e
jmp 0x664d
jmp 0x6746
movq -0xb8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x672d
movq -0xb8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x672d
movq 0x16915(%rip), %rax     # 0x1cfc8
movq (%rax), %rax
movq %rax, -0x710(%rbp)
leaq 0xf00a(%rip), %rsi      # 0x156ce
leaq -0x188(%rbp), %rdi
callq 0x140e0
jmp 0x66d2
leaq -0x188(%rbp), %rdi
movq %rdi, -0x718(%rbp)
callq 0x4120
movq -0x710(%rbp), %rdi
movq %rax, %rsi
movq -0xb8(%rbp), %rdx
xorl %eax, %eax
callq 0x4500
movq -0x718(%rbp), %rdi
callq 0x41f0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x5f00
jmp 0x6717
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x707b
leaq -0xa0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x7840
jmp 0x6742
jmp 0x6744
jmp 0x6746
jmp 0x6748
jmp 0x674a
jmp 0x674c
jmp 0x674e
jmp 0x6750
jmp 0x6752
jmp 0x6754
jmp 0x6756
jmp 0x6758
jmp 0x675a
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x6064
leaq -0xa0(%rbp), %rdi
callq 0x7480
cmpq $0x0, %rax
jbe 0x67c3
leaq -0xa0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x78b0
movq (%rax), %rax
movq %rax, -0x20(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x7480
cmpq $0x1, %rax
jbe 0x67c1
leaq -0xa0(%rbp), %rdi
movl $0x1, %esi
callq 0x78b0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x67c3
cmpq $0x0, -0x20(%rbp)
je 0x67e7
movq -0x20(%rbp), %rdi
leaq 0xeef7(%rip), %rsi      # 0x156cc
callq 0x44d0
cmpl $0x0, %eax
jne 0x67e7
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x680b
movq -0x28(%rbp), %rdi
leaq 0xeed3(%rip), %rsi      # 0x156cc
callq 0x44d0
cmpl $0x0, %eax
jne 0x680b
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x69a1
cmpq $0x0, -0x20(%rbp)
je 0x691a
movq -0x20(%rbp), %rdi
movl $0x2e, %esi
callq 0x43c0
movq %rax, -0x190(%rbp)
cmpq $0x0, -0x190(%rbp)
je 0x686d
movq -0x190(%rbp), %rdi
leaq 0xee92(%rip), %rsi      # 0x156e5
callq 0x44d0
cmpl $0x0, %eax
jne 0x686d
leaq 0xee82(%rip), %rax      # 0x156e6
movq %rax, -0x18(%rbp)
jmp 0x6915
cmpq $0x0, -0x190(%rbp)
je 0x689c
movq -0x190(%rbp), %rdi
leaq 0xee65(%rip), %rsi      # 0x156ea
callq 0x44d0
cmpl $0x0, %eax
jne 0x689c
leaq 0xee55(%rip), %rax      # 0x156eb
movq %rax, -0x18(%rbp)
jmp 0x6913
leaq 0xee4c(%rip), %rsi      # 0x156ef
leaq -0x1b0(%rbp), %rdi
callq 0x140e0
jmp 0x68b1
leaq -0x1b0(%rbp), %rdi
callq 0x4120
movq %rax, %rdi
movq 0x16701(%rip), %rax     # 0x1cfc8
movq (%rax), %rsi
callq 0x43f0
jmp 0x68d1
leaq -0x1b0(%rbp), %rdi
callq 0x41f0
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x707b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x41f0
jmp 0x709c
jmp 0x6915
jmp 0x699f
leaq 0xee17(%rip), %rsi      # 0x15738
leaq -0x1d0(%rbp), %rdi
callq 0x140e0
jmp 0x692f
leaq -0x1d0(%rbp), %rdi
callq 0x4120
movq %rax, %rdi
movq 0x16683(%rip), %rax     # 0x1cfc8
movq (%rax), %rsi
callq 0x43f0
jmp 0x694f
leaq -0x1d0(%rbp), %rdi
callq 0x41f0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x5f00
jmp 0x6969
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x707b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x41f0
jmp 0x709c
jmp 0x69a1
movq 0x16630(%rip), %rax     # 0x1cfd8
movq %rax, -0x1d8(%rbp)
movq 0x1660a(%rip), %rax     # 0x1cfc0
movq %rax, -0x1e0(%rbp)
leaq -0x3e8(%rbp), %rdi
callq 0x4400
jmp 0x69cb
leaq -0x5e8(%rbp), %rdi
callq 0x45c0
jmp 0x69d9
cmpq $0x0, -0x20(%rbp)
je 0x6af1
movq -0x20(%rbp), %rsi
leaq -0x3e8(%rbp), %rdi
movl $0x8, %edx
callq 0x4200
jmp 0x69fb
movq -0x3e8(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x3e8(%rbp,%rax), %rdi
callq 0x4170
movb %al, -0x719(%rbp)
jmp 0x6a1b
movb -0x719(%rbp), %al
testb $0x1, %al
jne 0x6a2a
jmp 0x6ae3
movq 0x16597(%rip), %rax     # 0x1cfc8
movq (%rax), %rax
movq %rax, -0x728(%rbp)
leaq 0xed1c(%rip), %rsi      # 0x1575e
leaq -0x608(%rbp), %rdi
callq 0x140e0
jmp 0x6a50
leaq -0x608(%rbp), %rdi
callq 0x4120
movq %rax, -0x738(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x730(%rbp)
callq 0x4050
movl (%rax), %edi
callq 0x40f0
movq -0x728(%rbp), %rdi
movq -0x738(%rbp), %rsi
movq -0x730(%rbp), %rdx
movq %rax, %rcx
movb $0x0, %al
callq 0x4500
leaq -0x608(%rbp), %rdi
callq 0x41f0
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x7047
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x706d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x7061
leaq -0x3e8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
leaq -0x620(%rbp), %rdi
callq 0x78d0
movq -0x18(%rbp), %rdi
leaq 0xebe3(%rip), %rsi      # 0x156eb
callq 0x44d0
cmpl $0x0, %eax
jne 0x6d09
movq -0x1d8(%rbp), %rsi
leaq -0x638(%rbp), %rdi
callq 0x9c70
jmp 0x6b2b
leaq -0x620(%rbp), %rdi
leaq -0x638(%rbp), %rsi
callq 0x78f0
leaq -0x638(%rbp), %rdi
callq 0x7920
jmp 0x6dbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x620(%rbp), %rdi
callq 0x7920
movl -0x84(%rbp), %eax
movl %eax, -0x73c(%rbp)
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x6c57
movq -0x80(%rbp), %rdi
callq 0x4110
movq %rax, -0x6c0(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x6f52
movq 0x16423(%rip), %rax     # 0x1cfc8
movq (%rax), %rax
movq %rax, -0x748(%rbp)
leaq 0xec18(%rip), %rsi      # 0x157ce
leaq -0x6e0(%rbp), %rdi
callq 0x140e0
jmp 0x6bc4
leaq -0x6e0(%rbp), %rdi
callq 0x4120
movq %rax, -0x760(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x758(%rbp)
movq -0x6c0(%rbp), %rdi
callq 0x9c30
movq %rax, -0x750(%rbp)
jmp 0x6bf7
movq -0x6c0(%rbp), %rdi
callq 0x9c50
movq %rax, -0x768(%rbp)
jmp 0x6c0c
movq -0x6c0(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq -0x748(%rbp), %rdi
movq -0x760(%rbp), %rsi
movq -0x758(%rbp), %rdx
movq -0x750(%rbp), %rcx
movq -0x768(%rbp), %r8
movq %rax, %r9
movb $0x0, %al
callq 0x4500
leaq -0x6e0(%rbp), %rdi
callq 0x41f0
jmp 0x7013
movl -0x73c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x7061
movq -0x80(%rbp), %rdi
callq 0x4110
movq %rax, -0x698(%rbp)
movq 0x16347(%rip), %rax     # 0x1cfc8
movq (%rax), %rax
movq %rax, -0x770(%rbp)
leaq 0xeb31(%rip), %rsi      # 0x157c3
leaq -0x6b8(%rbp), %rdi
callq 0x140e0
jmp 0x6ca0
leaq -0x6b8(%rbp), %rdi
movq %rdi, -0x778(%rbp)
callq 0x4120
movq %rax, -0x780(%rbp)
movq -0x698(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq -0x770(%rbp), %rdi
movq -0x780(%rbp), %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4500
movq -0x778(%rbp), %rdi
callq 0x41f0
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
callq 0x4590
jmp 0x6f14
movq -0x18(%rbp), %rdi
leaq 0xe9d2(%rip), %rsi      # 0x156e6
callq 0x44d0
cmpl $0x0, %eax
jne 0x6d54
movq -0x1d8(%rbp), %rsi
leaq -0x650(%rbp), %rdi
callq 0xeb30
jmp 0x6d33
leaq -0x620(%rbp), %rdi
leaq -0x650(%rbp), %rsi
callq 0x78f0
leaq -0x650(%rbp), %rdi
callq 0x7920
jmp 0x6dbd
movq 0x1626d(%rip), %rax     # 0x1cfc8
movq (%rax), %rax
movq %rax, -0x788(%rbp)
leaq 0xea1a(%rip), %rsi      # 0x15786
leaq -0x670(%rbp), %rdi
callq 0x140e0
jmp 0x6d7a
leaq -0x670(%rbp), %rdi
callq 0x4120
movq -0x788(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rdx
movb $0x0, %al
callq 0x4500
leaq -0x670(%rbp), %rdi
callq 0x41f0
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x6edd
jmp 0x6dbf
cmpq $0x0, -0x28(%rbp)
je 0x6eac
movq -0x28(%rbp), %rsi
leaq -0x5e8(%rbp), %rdi
movl $0x10, %edx
callq 0x4070
jmp 0x6de1
movq -0x5e8(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x5e8(%rbp,%rax), %rdi
callq 0x4170
movb %al, -0x789(%rbp)
jmp 0x6e01
movb -0x789(%rbp), %al
testb $0x1, %al
jne 0x6e10
jmp 0x6e9e
movq 0x161b1(%rip), %rax     # 0x1cfc8
movq (%rax), %rax
movq %rax, -0x798(%rbp)
leaq 0xe973(%rip), %rsi      # 0x1579b
leaq -0x690(%rbp), %rdi
callq 0x140e0
jmp 0x6e36
leaq -0x690(%rbp), %rdi
callq 0x4120
movq %rax, -0x7a8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x7a0(%rbp)
callq 0x4050
movl (%rax), %edi
callq 0x40f0
movq -0x798(%rbp), %rdi
movq -0x7a8(%rbp), %rsi
movq -0x7a0(%rbp), %rdx
movq %rax, %rcx
movb $0x0, %al
callq 0x4500
leaq -0x690(%rbp), %rdi
callq 0x41f0
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
jmp 0x6edd
leaq -0x5e8(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movq -0x1e0(%rbp), %rdi
leaq -0x620(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x4810
jmp 0x6ec5
movq -0x1e0(%rbp), %rdi
callq 0x4220
jmp 0x6ed3
movl $0x0, -0xdc(%rbp)
leaq -0x620(%rbp), %rdi
callq 0x7920
movl -0xdc(%rbp), %eax
testl %eax, %eax
jne 0x7047
jmp 0x6ef9
jmp 0x7036
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
callq 0x4590
jmp 0x6f19
jmp 0x7047
jmp 0x7061
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x702d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x6e0(%rbp), %rdi
callq 0x41f0
jmp 0x702d
movq 0x1606f(%rip), %rax     # 0x1cfc8
movq (%rax), %rax
movq %rax, -0x7b0(%rbp)
leaq 0xe867(%rip), %rsi      # 0x157d1
leaq -0x700(%rbp), %rdi
callq 0x140e0
jmp 0x6f78
leaq -0x700(%rbp), %rdi
callq 0x4120
movq %rax, -0x7c0(%rbp)
movq -0x6c0(%rbp), %rdi
callq 0x9c30
movq %rax, -0x7b8(%rbp)
jmp 0x6fa0
movq -0x6c0(%rbp), %rdi
callq 0x9c50
movq %rax, -0x7c8(%rbp)
jmp 0x6fb5
movq -0x6c0(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq -0x7b0(%rbp), %rdi
movq -0x7c0(%rbp), %rsi
movq -0x7b8(%rbp), %rdx
movq -0x7c8(%rbp), %rcx
movq %rax, %r8
movb $0x0, %al
callq 0x4500
leaq -0x700(%rbp), %rdi
callq 0x41f0
jmp 0x7013
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x700(%rbp), %rdi
callq 0x41f0
jmp 0x702d
movl $0x1, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
callq 0x4590
jmp 0x702b
jmp 0x7047
callq 0x4590
jmp 0x7034
jmp 0x7061
movl $0x0, -0x4(%rbp)
movl $0x1, -0xdc(%rbp)
leaq -0x5e8(%rbp), %rdi
callq 0x4530
leaq -0x3e8(%rbp), %rdi
callq 0x40c0
jmp 0x707b
leaq -0x5e8(%rbp), %rdi
callq 0x4530
leaq -0x3e8(%rbp), %rdi
callq 0x40c0
jmp 0x709c
leaq -0xa0(%rbp), %rdi
callq 0x7990
leaq -0x68(%rbp), %rdi
callq 0x79f0
movl -0x4(%rbp), %eax
addq $0x7d0, %rsp            # imm = 0x7D0
popq %rbp
retq
leaq -0xa0(%rbp), %rdi
callq 0x7990
leaq -0x68(%rbp), %rdi
callq 0x79f0
movq -0x80(%rbp), %rdi
callq 0x45f0
movq %rax, %rdi
callq 0x7980
nopw %cs:(%rax,%rax)