// File: loadzero[P]geoloc/geoloc/geoloc.cpp
// Function: main
int main(int argc, char** argv)
{
    if (argc < 2)
    {
        usage(0);
    }

    Args args(argc, argv);

    std::set<std::string> flags;

    flags.insert("-f");
    flags.insert("--import");
    flags.insert("--headers");
    flags.insert("-q");
    flags.insert("-o");

    std::vector<std::string> input_list;
    std::string import;
    std::string output;

    std::string data_file_name = default_file();
    bool show_headers = false;

    while (!args.empty())
    {
        if (strcmp(args.peek(), "-f") == 0)
        {
            args.pop();

            while (true)
            {
                const char* fn = args.pop();

                if (!fn)
                {
                    usage("empty file arg");
                }

                input_list.push_back(std::string("file:") + fn);

                if (args.empty() || flags.count(args.peek()))
                    break;
            }
        }
        else if (strcmp(args.peek(), "--headers") == 0)
        {
            show_headers = true;
            args.pop();
        }
        else if (strcmp(args.peek(), "-o") == 0)
        {
            args.pop();

            const char* arg = args.pop();

            if (!arg)
            {
                usage("empty output arg");
            }

            output = arg;
        }
        else if (strcmp(args.peek(), "--import") == 0)
        {
            args.pop();

            if (!import.empty())
            {
                usage("too many import options");
            }

            const char* arg = args.pop();

            if (!arg)
            {
                usage("empty import arg");
            }

            import = arg;
        }
        else if (strcmp(args.peek(), "-q") == 0)
        {
            args.pop();

            std::string query = "query:";

            while (true)
            {
                const char* arg = args.pop();

                if (!arg)
                {
                    usage("empty query arg");
                }

                query += arg + std::string(",");

                if (args.empty() || flags.count(args.peek()))
                    break;
            }

            input_list.push_back(query);
        }
        else
        {
            fprintf(stderr, "unrecognized option %s\n", args.peek());
            usage(0);
        }
    }

    if (!import.empty())
    {
        if (!input_list.empty())
        {
            usage("import and query are mutually exclusive");
        }

        if (output.empty())
        {
            usage("no output specified with import");
        }

        std::string city_blocks = import + "/blocks.csv";
        std::string city_locs = import + "/location.csv";
        std::string geo_asns = import + "/asnum.csv";

        etl(city_blocks.c_str(), city_locs.c_str(), geo_asns.c_str(), 
            output.c_str());
    }
    else
    {
        if (input_list.empty())
        {
            usage("query has no input");
        }

        if (!import.empty())
        {
            usage("import and query are mutually exclusive");
        }

        query(data_file_name.c_str(), input_list, show_headers);
    }

    return 0;
}

// Assembly:
subq $0x508, %rsp            # imm = 0x508
movl $0x0, 0x504(%rsp)
movl %edi, 0x500(%rsp)
movq %rsi, 0x4f8(%rsp)
cmpl $0x2, 0x500(%rsp)
jge 0x46c4
xorl %eax, %eax
movl %eax, %edi
callq 0x5880
movl 0x500(%rsp), %esi
movq 0x4f8(%rsp), %rdx
leaq 0x4e0(%rsp), %rdi
callq 0x5a80
leaq 0x4b0(%rsp), %rdi
callq 0x5ab0
leaq 0x48f(%rsp), %rdi
movq %rdi, 0x178(%rsp)
callq 0x44e0
movq 0x178(%rsp), %rdx
leaq 0x17907(%rip), %rsi     # 0x1c018
leaq 0x490(%rsp), %rdi
callq 0x43f0
jmp 0x4720
leaq 0x4b0(%rsp), %rdi
leaq 0x490(%rsp), %rsi
callq 0x5ac0
movb %dl, 0x16f(%rsp)
movq %rax, 0x170(%rsp)
jmp 0x4746
movb 0x16f(%rsp), %al
movq 0x170(%rsp), %rcx
movq %rcx, 0x468(%rsp)
movb %al, 0x470(%rsp)
leaq 0x490(%rsp), %rdi
callq 0x41a0
jmp 0x4773
leaq 0x48f(%rsp), %rdi
callq 0x42d0
leaq 0x447(%rsp), %rdi
movq %rdi, 0x160(%rsp)
callq 0x44e0
movq 0x160(%rsp), %rdx
leaq 0x17877(%rip), %rsi     # 0x1c01b
leaq 0x448(%rsp), %rdi
callq 0x43f0
jmp 0x47b3
leaq 0x4b0(%rsp), %rdi
leaq 0x448(%rsp), %rsi
callq 0x5ac0
movb %dl, 0x157(%rsp)
movq %rax, 0x158(%rsp)
jmp 0x47d9
movb 0x157(%rsp), %al
movq 0x158(%rsp), %rcx
movq %rcx, 0x430(%rsp)
movb %al, 0x438(%rsp)
leaq 0x448(%rsp), %rdi
callq 0x41a0
jmp 0x4806
leaq 0x447(%rsp), %rdi
callq 0x42d0
leaq 0x40f(%rsp), %rdi
movq %rdi, 0x148(%rsp)
callq 0x44e0
movq 0x148(%rsp), %rdx
leaq 0x177ed(%rip), %rsi     # 0x1c024
leaq 0x410(%rsp), %rdi
callq 0x43f0
jmp 0x4846
leaq 0x4b0(%rsp), %rdi
leaq 0x410(%rsp), %rsi
callq 0x5ac0
movb %dl, 0x13f(%rsp)
movq %rax, 0x140(%rsp)
jmp 0x486c
movb 0x13f(%rsp), %al
movq 0x140(%rsp), %rcx
movq %rcx, 0x3f8(%rsp)
movb %al, 0x400(%rsp)
leaq 0x410(%rsp), %rdi
callq 0x41a0
jmp 0x4899
leaq 0x40f(%rsp), %rdi
callq 0x42d0
leaq 0x3d7(%rsp), %rdi
movq %rdi, 0x130(%rsp)
callq 0x44e0
movq 0x130(%rsp), %rdx
leaq 0x17764(%rip), %rsi     # 0x1c02e
leaq 0x3d8(%rsp), %rdi
callq 0x43f0
jmp 0x48d9
leaq 0x4b0(%rsp), %rdi
leaq 0x3d8(%rsp), %rsi
callq 0x5ac0
movb %dl, 0x127(%rsp)
movq %rax, 0x128(%rsp)
jmp 0x48ff
movb 0x127(%rsp), %al
movq 0x128(%rsp), %rcx
movq %rcx, 0x3c0(%rsp)
movb %al, 0x3c8(%rsp)
leaq 0x3d8(%rsp), %rdi
callq 0x41a0
jmp 0x492c
leaq 0x3d7(%rsp), %rdi
callq 0x42d0
leaq 0x39f(%rsp), %rdi
movq %rdi, 0x118(%rsp)
callq 0x44e0
movq 0x118(%rsp), %rdx
leaq 0x176d4(%rip), %rsi     # 0x1c031
leaq 0x3a0(%rsp), %rdi
callq 0x43f0
jmp 0x496c
leaq 0x4b0(%rsp), %rdi
leaq 0x3a0(%rsp), %rsi
callq 0x5ac0
movb %dl, 0x10f(%rsp)
movq %rax, 0x110(%rsp)
jmp 0x4992
movb 0x10f(%rsp), %al
movq 0x110(%rsp), %rcx
movq %rcx, 0x388(%rsp)
movb %al, 0x390(%rsp)
leaq 0x3a0(%rsp), %rdi
callq 0x41a0
jmp 0x49bf
leaq 0x39f(%rsp), %rdi
callq 0x42d0
leaq 0x370(%rsp), %rdi
callq 0x5b50
jmp 0x49db
leaq 0x350(%rsp), %rdi
callq 0x4410
jmp 0x49ea
leaq 0x330(%rsp), %rdi
callq 0x4410
jmp 0x49f9
leaq 0x310(%rsp), %rdi
callq 0x5950
jmp 0x4a08
movb $0x0, 0x30f(%rsp)
leaq 0x4e0(%rsp), %rdi
callq 0x5b60
movb %al, 0x10e(%rsp)
jmp 0x4a26
movb 0x10e(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x4a38
jmp 0x5537
leaq 0x4e0(%rsp), %rdi
callq 0x5b80
movq %rax, 0x100(%rsp)
jmp 0x4a4f
movq 0x100(%rsp), %rdi
leaq 0x175ba(%rip), %rsi     # 0x1c018
callq 0x4420
cmpl $0x0, %eax
jne 0x4f69
leaq 0x4e0(%rsp), %rdi
callq 0x5bd0
jmp 0x4a7b
jmp 0x4a7d
jmp 0x4a7f
leaq 0x4e0(%rsp), %rdi
callq 0x5bd0
movq %rax, 0xf8(%rsp)
jmp 0x4a96
movq 0xf8(%rsp), %rax
movq %rax, 0x300(%rsp)
cmpq $0x0, 0x300(%rsp)
jne 0x4cc6
leaq 0x17578(%rip), %rdi     # 0x1c034
callq 0x5880
jmp 0x4ac3
jmp 0x4cc6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x4b03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
leaq 0x490(%rsp), %rdi
callq 0x41a0
jmp 0x4b01
jmp 0x4b03
leaq 0x48f(%rsp), %rdi
callq 0x42d0
jmp 0x5853
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x4b50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
leaq 0x448(%rsp), %rdi
callq 0x41a0
jmp 0x4b4e
jmp 0x4b50
leaq 0x447(%rsp), %rdi
callq 0x42d0
jmp 0x5853
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x4b9d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
leaq 0x410(%rsp), %rdi
callq 0x41a0
jmp 0x4b9b
jmp 0x4b9d
leaq 0x40f(%rsp), %rdi
callq 0x42d0
jmp 0x5853
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x4bea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
leaq 0x3d8(%rsp), %rdi
callq 0x41a0
jmp 0x4be8
jmp 0x4bea
leaq 0x3d7(%rsp), %rdi
callq 0x42d0
jmp 0x5853
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x4c37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
leaq 0x3a0(%rsp), %rdi
callq 0x41a0
jmp 0x4c35
jmp 0x4c37
leaq 0x39f(%rsp), %rdi
callq 0x42d0
jmp 0x5853
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x5853
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x5842
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x5815
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x57f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x57d5
leaq 0x2bf(%rsp), %rdi
movq %rdi, 0xf0(%rsp)
callq 0x44e0
movq 0xf0(%rsp), %rdx
leaq 0x17359(%rip), %rsi     # 0x1c043
leaq 0x2c0(%rsp), %rdi
callq 0x43f0
jmp 0x4cf9
movq 0x300(%rsp), %rdx
leaq 0x2e0(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
callq 0x5ca0
jmp 0x4d18
leaq 0x370(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x5c30
jmp 0x4d2f
leaq 0x2e0(%rsp), %rdi
callq 0x41a0
jmp 0x4d3e
leaq 0x2c0(%rsp), %rdi
callq 0x41a0
jmp 0x4d4d
leaq 0x2bf(%rsp), %rdi
callq 0x42d0
movb $0x0, 0x296(%rsp)
movb $0x0, 0x295(%rsp)
leaq 0x4e0(%rsp), %rdi
callq 0x5b60
movb %al, 0xef(%rsp)
jmp 0x4d80
movb 0xef(%rsp), %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xee(%rsp)
jne 0x4e2b
jmp 0x4d9b
leaq 0x4e0(%rsp), %rdi
callq 0x5b80
movq %rax, 0xe0(%rsp)
jmp 0x4db2
leaq 0x297(%rsp), %rdi
movq %rdi, 0xd8(%rsp)
callq 0x44e0
movq 0xe0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movb $0x1, 0x296(%rsp)
leaq 0x298(%rsp), %rdi
callq 0x43f0
jmp 0x4dee
movb $0x1, 0x295(%rsp)
leaq 0x4b0(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x5d30
movq %rax, 0xd0(%rsp)
jmp 0x4e15
movq 0xd0(%rsp), %rax
cmpq $0x0, %rax
setne %al
movb %al, 0xee(%rsp)
movb 0xee(%rsp), %al
movb %al, 0xcf(%rsp)
testb $0x1, 0x295(%rsp)
jne 0x4e45
jmp 0x4e56
leaq 0x298(%rsp), %rdi
callq 0x41a0
jmp 0x4e54
jmp 0x4e56
testb $0x1, 0x296(%rsp)
jne 0x4e62
jmp 0x4e6f
leaq 0x297(%rsp), %rdi
callq 0x42d0
movb 0xcf(%rsp), %al
testb $0x1, %al
jne 0x4e7f
jmp 0x4f5f
jmp 0x4f64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x4ee6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x4ed5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
leaq 0x2e0(%rsp), %rdi
callq 0x41a0
jmp 0x4ed3
jmp 0x4ed5
leaq 0x2c0(%rsp), %rdi
callq 0x41a0
jmp 0x4ee4
jmp 0x4ee6
leaq 0x2bf(%rsp), %rdi
callq 0x42d0
jmp 0x57d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x4f41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
testb $0x1, 0x295(%rsp)
jne 0x4f2e
jmp 0x4f3f
leaq 0x298(%rsp), %rdi
callq 0x41a0
jmp 0x4f3d
jmp 0x4f3f
jmp 0x4f41
testb $0x1, 0x296(%rsp)
jne 0x4f4d
jmp 0x4f5a
leaq 0x297(%rsp), %rdi
callq 0x42d0
jmp 0x57d5
jmp 0x4a7d
jmp 0x5532
leaq 0x4e0(%rsp), %rdi
callq 0x5b80
movq %rax, 0xc0(%rsp)
jmp 0x4f80
movq 0xc0(%rsp), %rdi
leaq 0x17095(%rip), %rsi     # 0x1c024
callq 0x4420
cmpl $0x0, %eax
jne 0x4fb5
movb $0x1, 0x30f(%rsp)
leaq 0x4e0(%rsp), %rdi
callq 0x5bd0
jmp 0x4fb0
jmp 0x5530
leaq 0x4e0(%rsp), %rdi
callq 0x5b80
movq %rax, 0xb8(%rsp)
jmp 0x4fcc
movq 0xb8(%rsp), %rdi
leaq 0x17056(%rip), %rsi     # 0x1c031
callq 0x4420
cmpl $0x0, %eax
jne 0x5052
leaq 0x4e0(%rsp), %rdi
callq 0x5bd0
jmp 0x4ff4
leaq 0x4e0(%rsp), %rdi
callq 0x5bd0
movq %rax, 0xb0(%rsp)
jmp 0x500b
movq 0xb0(%rsp), %rax
movq %rax, 0x288(%rsp)
cmpq $0x0, 0x288(%rsp)
jne 0x5036
leaq 0x1701c(%rip), %rdi     # 0x1c049
callq 0x5880
jmp 0x5034
jmp 0x5036
movq 0x288(%rsp), %rsi
leaq 0x330(%rsp), %rdi
callq 0x43e0
jmp 0x504d
jmp 0x552e
leaq 0x4e0(%rsp), %rdi
callq 0x5b80
movq %rax, 0xa8(%rsp)
jmp 0x5069
movq 0xa8(%rsp), %rdi
leaq 0x16fa3(%rip), %rsi     # 0x1c01b
callq 0x4420
cmpl $0x0, %eax
jne 0x5126
leaq 0x4e0(%rsp), %rdi
callq 0x5bd0
jmp 0x5095
leaq 0x350(%rsp), %rdi
callq 0x44b0
movb %al, 0xa7(%rsp)
jmp 0x50ab
movb 0xa7(%rsp), %al
testb $0x1, %al
jne 0x50c8
jmp 0x50b8
leaq 0x16f9b(%rip), %rdi     # 0x1c05a
callq 0x5880
jmp 0x50c6
jmp 0x50c8
leaq 0x4e0(%rsp), %rdi
callq 0x5bd0
movq %rax, 0x98(%rsp)
jmp 0x50df
movq 0x98(%rsp), %rax
movq %rax, 0x280(%rsp)
cmpq $0x0, 0x280(%rsp)
jne 0x510a
leaq 0x16f71(%rip), %rdi     # 0x1c072
callq 0x5880
jmp 0x5108
jmp 0x510a
movq 0x280(%rsp), %rsi
leaq 0x350(%rsp), %rdi
callq 0x43e0
jmp 0x5121
jmp 0x552c
leaq 0x4e0(%rsp), %rdi
callq 0x5b80
movq %rax, 0x90(%rsp)
jmp 0x513d
movq 0x90(%rsp), %rdi
leaq 0x16ee2(%rip), %rsi     # 0x1c02e
callq 0x4420
cmpl $0x0, %eax
jne 0x54dc
leaq 0x4e0(%rsp), %rdi
callq 0x5bd0
jmp 0x5169
leaq 0x25f(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x44e0
movq 0x88(%rsp), %rdx
leaq 0x16ef6(%rip), %rsi     # 0x1c083
leaq 0x260(%rsp), %rdi
callq 0x43f0
jmp 0x519c
leaq 0x25f(%rsp), %rdi
callq 0x42d0
jmp 0x51ab
leaq 0x4e0(%rsp), %rdi
callq 0x5bd0
movq %rax, 0x80(%rsp)
jmp 0x51c2
movq 0x80(%rsp), %rax
movq %rax, 0x250(%rsp)
cmpq $0x0, 0x250(%rsp)
jne 0x522c
leaq 0x16ea6(%rip), %rdi     # 0x1c08a
callq 0x5880
jmp 0x51eb
jmp 0x522c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
leaq 0x25f(%rsp), %rdi
callq 0x42d0
jmp 0x57d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x54c8
movq 0x250(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x20f(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x44e0
movq 0x78(%rsp), %rdx
leaq 0x16e43(%rip), %rsi     # 0x1c09a
leaq 0x210(%rsp), %rdi
callq 0x43f0
jmp 0x5266
movq 0x70(%rsp), %rsi
leaq 0x230(%rsp), %rdi
leaq 0x210(%rsp), %rdx
callq 0x5d90
jmp 0x5282
leaq 0x260(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x4380
jmp 0x5299
leaq 0x230(%rsp), %rdi
callq 0x41a0
jmp 0x52a8
leaq 0x210(%rsp), %rdi
callq 0x41a0
jmp 0x52b7
leaq 0x20f(%rsp), %rdi
callq 0x42d0
movb $0x0, 0x1e6(%rsp)
movb $0x0, 0x1e5(%rsp)
leaq 0x4e0(%rsp), %rdi
callq 0x5b60
movb %al, 0x6f(%rsp)
jmp 0x52e7
movb 0x6f(%rsp), %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0x6e(%rsp)
jne 0x5373
jmp 0x52f8
leaq 0x4e0(%rsp), %rdi
callq 0x5b80
movq %rax, 0x60(%rsp)
jmp 0x530c
leaq 0x1e7(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x44e0
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %rdx
movb $0x1, 0x1e6(%rsp)
leaq 0x1e8(%rsp), %rdi
callq 0x43f0
jmp 0x533f
movb $0x1, 0x1e5(%rsp)
leaq 0x4b0(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x5d30
movq %rax, 0x50(%rsp)
jmp 0x5363
movq 0x50(%rsp), %rax
cmpq $0x0, %rax
setne %al
movb %al, 0x6e(%rsp)
movb 0x6e(%rsp), %al
movb %al, 0x4f(%rsp)
testb $0x1, 0x1e5(%rsp)
jne 0x5387
jmp 0x5398
leaq 0x1e8(%rsp), %rdi
callq 0x41a0
jmp 0x5396
jmp 0x5398
testb $0x1, 0x1e6(%rsp)
jne 0x53a4
jmp 0x53b1
leaq 0x1e7(%rsp), %rdi
callq 0x42d0
movb 0x4f(%rsp), %al
testb $0x1, %al
jne 0x53be
jmp 0x549b
jmp 0x54a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x5425
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x5414
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
leaq 0x230(%rsp), %rdi
callq 0x41a0
jmp 0x5412
jmp 0x5414
leaq 0x210(%rsp), %rdi
callq 0x41a0
jmp 0x5423
jmp 0x5425
leaq 0x20f(%rsp), %rdi
callq 0x42d0
jmp 0x54c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x5480
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
testb $0x1, 0x1e5(%rsp)
jne 0x546d
jmp 0x547e
leaq 0x1e8(%rsp), %rdi
callq 0x41a0
jmp 0x547c
jmp 0x547e
jmp 0x5480
testb $0x1, 0x1e6(%rsp)
jne 0x548c
jmp 0x5499
leaq 0x1e7(%rsp), %rdi
callq 0x42d0
jmp 0x54c8
jmp 0x51a9
leaq 0x370(%rsp), %rdi
leaq 0x260(%rsp), %rsi
callq 0x5c30
jmp 0x54b7
leaq 0x260(%rsp), %rdi
callq 0x41a0
jmp 0x54c6
jmp 0x552a
leaq 0x260(%rsp), %rdi
callq 0x41a0
jmp 0x54d7
jmp 0x57d5
movq 0x21af5(%rip), %rax     # 0x26fd8
movq (%rax), %rax
movq %rax, 0x38(%rsp)
leaq 0x4e0(%rsp), %rdi
callq 0x5b80
movq %rax, 0x40(%rsp)
jmp 0x54ff
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rdi
leaq 0x16b8c(%rip), %rsi     # 0x1c09c
xorl %eax, %eax
movl %eax, 0x34(%rsp)
callq 0x4430
movl 0x34(%rsp), %eax
movl %eax, %edi
callq 0x5880
jmp 0x5528
jmp 0x552a
jmp 0x552c
jmp 0x552e
jmp 0x5530
jmp 0x5532
jmp 0x4a10
leaq 0x350(%rsp), %rdi
callq 0x44b0
movb %al, 0x33(%rsp)
jmp 0x554a
movb 0x33(%rsp), %al
testb $0x1, %al
jne 0x571f
jmp 0x5558
leaq 0x370(%rsp), %rdi
callq 0x5ed0
movb %al, 0x32(%rsp)
jmp 0x556b
movb 0x32(%rsp), %al
testb $0x1, %al
jne 0x5585
jmp 0x5575
leaq 0x16b38(%rip), %rdi     # 0x1c0b4
callq 0x5880
jmp 0x5583
jmp 0x5585
leaq 0x330(%rsp), %rdi
callq 0x44b0
movb %al, 0x31(%rsp)
jmp 0x5598
movb 0x31(%rsp), %al
testb $0x1, %al
jne 0x55a2
jmp 0x55b2
leaq 0x16b33(%rip), %rdi     # 0x1c0dc
callq 0x5880
jmp 0x55b0
jmp 0x55b2
leaq 0x16b43(%rip), %rdx     # 0x1c0fc
leaq 0x1c0(%rsp), %rdi
leaq 0x350(%rsp), %rsi
callq 0x5ca0
jmp 0x55d0
leaq 0x16b31(%rip), %rdx     # 0x1c108
leaq 0x1a0(%rsp), %rdi
leaq 0x350(%rsp), %rsi
callq 0x5ca0
jmp 0x55ee
leaq 0x16b21(%rip), %rdx     # 0x1c116
leaq 0x180(%rsp), %rdi
leaq 0x350(%rsp), %rsi
callq 0x5ca0
jmp 0x560c
leaq 0x1c0(%rsp), %rdi
callq 0x4100
movq %rax, 0x28(%rsp)
jmp 0x5620
leaq 0x1a0(%rsp), %rdi
callq 0x4100
movq %rax, 0x20(%rsp)
jmp 0x5634
leaq 0x180(%rsp), %rdi
callq 0x4100
movq %rax, 0x18(%rsp)
jmp 0x5648
leaq 0x330(%rsp), %rdi
callq 0x4100
movq %rax, 0x10(%rsp)
jmp 0x565c
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x5f20
jmp 0x5677
leaq 0x180(%rsp), %rdi
callq 0x41a0
jmp 0x5686
leaq 0x1a0(%rsp), %rdi
callq 0x41a0
jmp 0x5695
leaq 0x1c0(%rsp), %rdi
callq 0x41a0
jmp 0x56a4
jmp 0x57ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x570b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
jmp 0x56fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x480(%rsp)
movl %eax, 0x47c(%rsp)
leaq 0x180(%rsp), %rdi
callq 0x41a0
jmp 0x56f8
jmp 0x56fa
leaq 0x1a0(%rsp), %rdi
callq 0x41a0
jmp 0x5709
jmp 0x570b
leaq 0x1c0(%rsp), %rdi
callq 0x41a0
jmp 0x571a
jmp 0x57d5
leaq 0x370(%rsp), %rdi
callq 0x5ed0
movb %al, 0xf(%rsp)
jmp 0x5732
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x573c
jmp 0x574c
leaq 0x169de(%rip), %rdi     # 0x1c121
callq 0x5880
jmp 0x574a
jmp 0x574c
leaq 0x350(%rsp), %rdi
callq 0x44b0
movb %al, 0xe(%rsp)
jmp 0x575f
movb 0xe(%rsp), %al
testb $0x1, %al
jne 0x5779
jmp 0x5769
leaq 0x16944(%rip), %rdi     # 0x1c0b4
callq 0x5880
jmp 0x5777
jmp 0x5779
leaq 0x310(%rsp), %rdi
callq 0x4100
movq %rax, (%rsp)
jmp 0x578c
movq (%rsp), %rdi
movzbl 0x30f(%rsp), %edx
andl $0x1, %edx
leaq 0x370(%rsp), %rsi
callq 0x6070
jmp 0x57aa
jmp 0x57ac
movl $0x0, 0x504(%rsp)
leaq 0x310(%rsp), %rdi
callq 0x41a0
jmp 0x57c6
leaq 0x330(%rsp), %rdi
callq 0x41a0
jmp 0x57e6
leaq 0x310(%rsp), %rdi
callq 0x41a0
jmp 0x57e4
jmp 0x57f5
leaq 0x350(%rsp), %rdi
callq 0x41a0
jmp 0x5806
leaq 0x330(%rsp), %rdi
callq 0x41a0
jmp 0x5804
jmp 0x5815
leaq 0x370(%rsp), %rdi
callq 0x61c0
jmp 0x5826
leaq 0x350(%rsp), %rdi
callq 0x41a0
jmp 0x5824
jmp 0x5842
leaq 0x4b0(%rsp), %rdi
callq 0x6240
movl 0x504(%rsp), %eax
addq $0x508, %rsp            # imm = 0x508
retq
leaq 0x370(%rsp), %rdi
callq 0x61c0
jmp 0x5851
jmp 0x5853
leaq 0x4b0(%rsp), %rdi
callq 0x6240
jmp 0x5862
jmp 0x5864
movq 0x480(%rsp), %rdi
callq 0x44d0
movq %rax, %rdi
callq 0x5b40
nopl (%rax)