// File: JameyWoo[P]re2graph/main.cpp
// Function: main
int main(int argc, char *argv[]) {
    string rexp, strm, pngfile;  // * regular expression, string_to_match
    string pattern;              // * 状态图的布局模式
    string graphes;              // * 要画的图形

    // * 参数的解析
    if (argc == 1) {
        help();
        return 0;
    }

    int o;
    string optstring = "hir:s:o:p:g:";  // 可以有的选项, : 代表后面需要跟参数
    while ((o = getopt(argc, argv, optstring.c_str())) != -1) {
        switch (o) {
            case 'h':
                help();
                return 0;
            case '?':
                cout << "error optopt: " << char(optopt) << endl;
                help();
                return 0;
            case 'i':
                cout << "please input the re_expression:\n->$ ";
                cin >> rexp;
                cout << "please input the string to match:\n->$ ";
                cin >> strm;
                break;
            // r 和 s|o配合使用
            case 'r':
                rexp = optarg;
                cout << "re_expresion: " << rexp << endl;
                break;
            case 's':
                strm = optarg;
                cout << "string_to_match: " << strm << endl;
                break;
            case 'o':
                pngfile = optarg;
                cout << "png file: " << pngfile << endl;
                break;
            // 有o才有p
            case 'p':
                pattern = optarg;
                cout << "pattern: " << pattern << endl;
                break;
            case 'g':
                graphes = optarg;
                cout << "graphes: " << graphes << endl;
                break;
        }
    }

    // * 实现步骤, 保存了中间的nfa, dfa, mindfa 等文件在tmp文件夹中, 作为临时文件
    NFA mynfa = re2nfa(rexp);
    writeNfaData(mynfa, "./tmp/tmp.nfa");
    DFA mydfa;
    nfa2dfa(mynfa, mydfa);
    writeDfaData(mydfa, "./tmp/tmp.dfa");
    DFA my_min_dfa = dfa2min(mydfa);
    writeDfaData(my_min_dfa, "./tmp/tmp.mindfa");

    // * 根据输入的信息来执行程序
    if (strm.size()) {
        bool match = dfaPattern(my_min_dfa, strm);
        if (match) {
            cout << "\n*\nmatch succeeded!\n*\n"
                 << endl;
        } else {
            cout << "\n*\nmatch failed!\n*\n"
                 << endl;
        }
    }
    // 根据 pngfile 和 graphes 的选项画图. 如果不指定 graphes, 默认都画出来
    if (pngfile.size()) {
        string raw = pngfile;
        if ((count(graphes.begin(), graphes.end(), 'n') != 0) || graphes.size() == 0) {
            nfa2png(mynfa, pngfile.replace(pngfile.find(".png"), 4, "_nfa.png"), pattern);
            pngfile = raw;
        }
        if ((count(graphes.begin(), graphes.end(), 'm') != 0) || graphes.size() == 0) {
            dfa2png(my_min_dfa, pngfile.replace(pngfile.find(".png"), 4, "_mindfa.png"), pattern);
            pngfile = raw;
        }
        if ((count(graphes.begin(), graphes.end(), 'd') != 0) || graphes.size() == 0) {
            dfa2png(mydfa, pngfile.replace(pngfile.find(".png"), 4, "_dfa.png"), pattern);
            pngfile = raw;
        }
    }

    cout << "program over ... \n";
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x940, %rsp            # imm = 0x940
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3410
leaq -0x50(%rbp), %rdi
callq 0x3410
leaq -0x70(%rbp), %rdi
callq 0x3410
leaq -0x90(%rbp), %rdi
callq 0x3410
leaq -0xb0(%rbp), %rdi
callq 0x3410
cmpl $0x1, -0x8(%rbp)
jne 0x3776
callq 0x11a00
jmp 0x3749
movl $0x0, -0x4(%rbp)
movl $0x1, -0xc0(%rbp)
jmp 0x466e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x46ad
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x818(%rbp)
callq 0x34f0
movq -0x818(%rbp), %rdx
leaq 0x29941(%rip), %rsi     # 0x2d0d8
leaq -0xe8(%rbp), %rdi
callq 0x46f0
jmp 0x37a5
leaq -0xe9(%rbp), %rdi
callq 0x3330
movl -0x8(%rbp), %eax
movl %eax, -0x824(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x820(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x3110
movl -0x824(%rbp), %edi
movq -0x820(%rbp), %rsi
movq %rax, %rdx
callq 0x3080
movl %eax, -0xc4(%rbp)
cmpl $-0x1, %eax
je 0x3b3d
movl -0xc4(%rbp), %eax
addl $-0x3f, %eax
movl %eax, %ecx
movq %rcx, -0x830(%rbp)
subl $0x34, %eax
ja 0x3b38
movq -0x830(%rbp), %rax
leaq 0x297e6(%rip), %rcx     # 0x2d004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0xe9(%rbp), %rdi
callq 0x3330
jmp 0x46ad
callq 0x11a00
jmp 0x3851
movl $0x0, -0x4(%rbp)
movl $0x1, -0xc0(%rbp)
jmp 0x4652
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x4660
movq 0x3f74b(%rip), %rdi     # 0x42fd0
leaq 0x29859(%rip), %rsi     # 0x2d0e5
callq 0x32c0
movq %rax, -0x838(%rbp)
jmp 0x389a
movq -0x838(%rbp), %rdi
movq 0x3f720(%rip), %rax     # 0x42fc8
movsbl (%rax), %esi
callq 0x3390
movq %rax, -0x840(%rbp)
jmp 0x38b9
movq -0x840(%rbp), %rdi
movq 0x3f6e9(%rip), %rsi     # 0x42fb0
callq 0x3300
jmp 0x38ce
callq 0x11a00
jmp 0x38d5
movl $0x0, -0x4(%rbp)
movl $0x1, -0xc0(%rbp)
jmp 0x4652
movq 0x3f6de(%rip), %rdi     # 0x42fd0
leaq 0x297fb(%rip), %rsi     # 0x2d0f4
callq 0x32c0
jmp 0x3900
movq 0x3f6d9(%rip), %rdi     # 0x42fe0
leaq -0x30(%rbp), %rsi
callq 0x33e0
jmp 0x3912
movq 0x3f6b7(%rip), %rdi     # 0x42fd0
leaq 0x297f9(%rip), %rsi     # 0x2d119
callq 0x32c0
jmp 0x3927
movq 0x3f6b2(%rip), %rdi     # 0x42fe0
leaq -0x50(%rbp), %rsi
callq 0x33e0
jmp 0x3939
jmp 0x3b38
movq 0x3f673(%rip), %rax     # 0x42fb8
movq (%rax), %rsi
leaq -0x30(%rbp), %rdi
callq 0x3400
jmp 0x3953
movq 0x3f676(%rip), %rdi     # 0x42fd0
leaq 0x297df(%rip), %rsi     # 0x2d140
callq 0x32c0
movq %rax, -0x848(%rbp)
jmp 0x396f
movq -0x848(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x32b0
movq %rax, -0x850(%rbp)
jmp 0x3988
movq -0x850(%rbp), %rdi
movq 0x3f61a(%rip), %rsi     # 0x42fb0
callq 0x3300
jmp 0x399d
jmp 0x3b38
movq 0x3f60f(%rip), %rax     # 0x42fb8
movq (%rax), %rsi
leaq -0x50(%rbp), %rdi
callq 0x3400
jmp 0x39b7
movq 0x3f612(%rip), %rdi     # 0x42fd0
leaq 0x2978a(%rip), %rsi     # 0x2d14f
callq 0x32c0
movq %rax, -0x858(%rbp)
jmp 0x39d3
movq -0x858(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x32b0
movq %rax, -0x860(%rbp)
jmp 0x39ec
movq -0x860(%rbp), %rdi
movq 0x3f5b6(%rip), %rsi     # 0x42fb0
callq 0x3300
jmp 0x3a01
jmp 0x3b38
movq 0x3f5ab(%rip), %rax     # 0x42fb8
movq (%rax), %rsi
leaq -0x70(%rbp), %rdi
callq 0x3400
jmp 0x3a1b
movq 0x3f5ae(%rip), %rdi     # 0x42fd0
leaq 0x29738(%rip), %rsi     # 0x2d161
callq 0x32c0
movq %rax, -0x868(%rbp)
jmp 0x3a37
movq -0x868(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x32b0
movq %rax, -0x870(%rbp)
jmp 0x3a50
movq -0x870(%rbp), %rdi
movq 0x3f552(%rip), %rsi     # 0x42fb0
callq 0x3300
jmp 0x3a65
jmp 0x3b38
movq 0x3f547(%rip), %rax     # 0x42fb8
movq (%rax), %rsi
leaq -0x90(%rbp), %rdi
callq 0x3400
jmp 0x3a82
movq 0x3f547(%rip), %rdi     # 0x42fd0
leaq 0x296dc(%rip), %rsi     # 0x2d16c
callq 0x32c0
movq %rax, -0x878(%rbp)
jmp 0x3a9e
movq -0x878(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x32b0
movq %rax, -0x880(%rbp)
jmp 0x3aba
movq -0x880(%rbp), %rdi
movq 0x3f4e8(%rip), %rsi     # 0x42fb0
callq 0x3300
jmp 0x3acf
jmp 0x3b38
movq 0x3f4e0(%rip), %rax     # 0x42fb8
movq (%rax), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x3400
jmp 0x3ae9
movq 0x3f4e0(%rip), %rdi     # 0x42fd0
leaq 0x2967f(%rip), %rsi     # 0x2d176
callq 0x32c0
movq %rax, -0x888(%rbp)
jmp 0x3b05
movq -0x888(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x32b0
movq %rax, -0x890(%rbp)
jmp 0x3b21
movq -0x890(%rbp), %rdi
movq 0x3f481(%rip), %rsi     # 0x42fb0
callq 0x3300
jmp 0x3b36
jmp 0x3b38
jmp 0x37b1
leaq -0x180(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3120
jmp 0x3b4f
leaq -0x160(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x8bf0
jmp 0x3b64
leaq -0x180(%rbp), %rdi
callq 0x31c0
leaq -0x1f0(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x47a0
jmp 0x3b85
leaq -0x211(%rbp), %rdi
movq %rdi, -0x898(%rbp)
callq 0x34f0
movq -0x898(%rbp), %rdx
leaq 0x295da(%rip), %rsi     # 0x2d180
leaq -0x210(%rbp), %rdi
callq 0x46f0
jmp 0x3bb4
leaq -0x1f0(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x10220
jmp 0x3bc9
leaq -0x210(%rbp), %rdi
callq 0x31c0
leaq -0x211(%rbp), %rdi
callq 0x3330
leaq -0x1f0(%rbp), %rdi
callq 0x4880
leaq -0x288(%rbp), %rdi
callq 0x48d0
leaq -0x2f8(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x47a0
jmp 0x3c0e
leaq -0x2f8(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0xacb0
jmp 0x3c23
leaq -0x2f8(%rbp), %rdi
callq 0x4880
leaq -0x368(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x4920
jmp 0x3c44
leaq -0x389(%rbp), %rdi
movq %rdi, -0x8a0(%rbp)
callq 0x34f0
movq -0x8a0(%rbp), %rdx
leaq 0x29529(%rip), %rsi     # 0x2d18e
leaq -0x388(%rbp), %rdi
callq 0x46f0
jmp 0x3c73
leaq -0x368(%rbp), %rdi
leaq -0x388(%rbp), %rsi
callq 0x11210
jmp 0x3c88
leaq -0x388(%rbp), %rdi
callq 0x31c0
leaq -0x389(%rbp), %rdi
callq 0x3330
leaq -0x368(%rbp), %rdi
callq 0x4a00
leaq -0x470(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x4920
jmp 0x3cc1
leaq -0x400(%rbp), %rdi
leaq -0x470(%rbp), %rsi
callq 0xc4c0
jmp 0x3cd6
leaq -0x470(%rbp), %rdi
callq 0x4a00
leaq -0x4e0(%rbp), %rdi
leaq -0x400(%rbp), %rsi
callq 0x4920
jmp 0x3cf7
leaq -0x501(%rbp), %rdi
movq %rdi, -0x8a8(%rbp)
callq 0x34f0
movq -0x8a8(%rbp), %rdx
leaq 0x29484(%rip), %rsi     # 0x2d19c
leaq -0x500(%rbp), %rdi
callq 0x46f0
jmp 0x3d26
leaq -0x4e0(%rbp), %rdi
leaq -0x500(%rbp), %rsi
callq 0x11210
jmp 0x3d3b
leaq -0x500(%rbp), %rdi
callq 0x31c0
leaq -0x501(%rbp), %rdi
callq 0x3330
leaq -0x4e0(%rbp), %rdi
callq 0x4a00
leaq -0x50(%rbp), %rdi
callq 0x3210
cmpq $0x0, %rax
je 0x4030
leaq -0x578(%rbp), %rdi
leaq -0x400(%rbp), %rsi
callq 0x4920
jmp 0x3d87
leaq -0x598(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3120
jmp 0x3d99
leaq -0x578(%rbp), %rdi
leaq -0x598(%rbp), %rsi
callq 0xd720
movb %al, -0x8a9(%rbp)
jmp 0x3db4
leaq -0x598(%rbp), %rdi
callq 0x31c0
leaq -0x578(%rbp), %rdi
callq 0x4a00
movb -0x8a9(%rbp), %al
andb $0x1, %al
movb %al, -0x502(%rbp)
testb $0x1, -0x502(%rbp)
je 0x3ffb
movq 0x3f1e2(%rip), %rdi     # 0x42fd0
leaq 0x293b8(%rip), %rsi     # 0x2d1ad
callq 0x32c0
movq %rax, -0x8b8(%rbp)
jmp 0x3e03
movq -0x8b8(%rbp), %rdi
movq 0x3f19f(%rip), %rsi     # 0x42fb0
callq 0x3300
jmp 0x3e18
jmp 0x402e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x31c0
jmp 0x4660
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x4644
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x3e89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x31c0
leaq -0x211(%rbp), %rdi
callq 0x3330
leaq -0x1f0(%rbp), %rdi
callq 0x4880
jmp 0x4644
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x4638
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x4880
jmp 0x4638
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x3f12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x388(%rbp), %rdi
callq 0x31c0
leaq -0x389(%rbp), %rdi
callq 0x3330
leaq -0x368(%rbp), %rdi
callq 0x4a00
jmp 0x4638
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x470(%rbp), %rdi
callq 0x4a00
jmp 0x4638
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x462c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x3f9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x500(%rbp), %rdi
callq 0x31c0
leaq -0x501(%rbp), %rdi
callq 0x3330
leaq -0x4e0(%rbp), %rdi
callq 0x4a00
jmp 0x462c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x3fea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x598(%rbp), %rdi
callq 0x31c0
leaq -0x578(%rbp), %rdi
callq 0x4a00
jmp 0x462c
movq 0x3efce(%rip), %rdi     # 0x42fd0
leaq 0x291bb(%rip), %rsi     # 0x2d1c4
callq 0x32c0
movq %rax, -0x8c0(%rbp)
jmp 0x4017
movq -0x8c0(%rbp), %rdi
movq 0x3ef8b(%rip), %rsi     # 0x42fb0
callq 0x3300
jmp 0x402c
jmp 0x402e
jmp 0x4030
leaq -0x70(%rbp), %rdi
callq 0x3210
cmpq $0x0, %rax
je 0x45e0
leaq -0x5b8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3120
jmp 0x4055
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x8d0(%rbp)
callq 0x3290
movq -0x8d0(%rbp), %rdi
movq %rax, -0x5c0(%rbp)
callq 0x3180
movq %rax, -0x5c8(%rbp)
movb $0x6e, -0x5c9(%rbp)
movq -0x5c0(%rbp), %rdi
movq -0x5c8(%rbp), %rsi
leaq -0x5c9(%rbp), %rdx
callq 0x4a50
movq %rax, -0x8c8(%rbp)
jmp 0x40ac
movq -0x8c8(%rbp), %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0x8d1(%rbp)
jne 0x40da
leaq -0xb0(%rbp), %rdi
callq 0x3210
cmpq $0x0, %rax
sete %al
movb %al, -0x8d1(%rbp)
movb -0x8d1(%rbp), %al
testb $0x1, %al
jne 0x40e9
jmp 0x4235
leaq -0x640(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x47a0
jmp 0x40fe
leaq 0x290ec(%rip), %rsi     # 0x2d1f1
xorl %eax, %eax
movl %eax, %edx
leaq -0x70(%rbp), %rdi
movq %rdi, -0x8e8(%rbp)
callq 0x3540
movq -0x8e8(%rbp), %rdi
movq %rax, %rsi
leaq 0x290ae(%rip), %rcx     # 0x2d1d8
movl $0x4, %edx
callq 0x31a0
movq %rax, -0x8e0(%rbp)
jmp 0x413d
movq -0x8e0(%rbp), %rsi
leaq -0x660(%rbp), %rdi
callq 0x3120
jmp 0x4152
leaq -0x680(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3120
jmp 0x4167
leaq -0x640(%rbp), %rdi
leaq -0x660(%rbp), %rsi
leaq -0x680(%rbp), %rdx
callq 0xd910
jmp 0x4183
leaq -0x680(%rbp), %rdi
callq 0x31c0
leaq -0x660(%rbp), %rdi
callq 0x31c0
leaq -0x640(%rbp), %rdi
callq 0x4880
leaq -0x70(%rbp), %rdi
leaq -0x5b8(%rbp), %rsi
callq 0x3040
jmp 0x41b9
jmp 0x4235
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x45d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x4224
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x4218
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x680(%rbp), %rdi
callq 0x31c0
leaq -0x660(%rbp), %rdi
callq 0x31c0
leaq -0x640(%rbp), %rdi
callq 0x4880
jmp 0x45d2
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x8f8(%rbp)
callq 0x3290
movq -0x8f8(%rbp), %rdi
movq %rax, -0x688(%rbp)
callq 0x3180
movq %rax, -0x690(%rbp)
movb $0x6d, -0x691(%rbp)
movq -0x688(%rbp), %rdi
movq -0x690(%rbp), %rsi
leaq -0x691(%rbp), %rdx
callq 0x4a50
movq %rax, -0x8f0(%rbp)
jmp 0x428c
movq -0x8f0(%rbp), %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0x8f9(%rbp)
jne 0x42ba
leaq -0xb0(%rbp), %rdi
callq 0x3210
cmpq $0x0, %rax
sete %al
movb %al, -0x8f9(%rbp)
movb -0x8f9(%rbp), %al
testb $0x1, %al
jne 0x42c9
jmp 0x43fe
leaq -0x708(%rbp), %rdi
leaq -0x400(%rbp), %rsi
callq 0x4920
jmp 0x42de
leaq 0x28f0c(%rip), %rsi     # 0x2d1f1
xorl %eax, %eax
movl %eax, %edx
leaq -0x70(%rbp), %rdi
movq %rdi, -0x910(%rbp)
callq 0x3540
movq -0x910(%rbp), %rdi
movq %rax, %rsi
leaq 0x28ed7(%rip), %rcx     # 0x2d1e1
movl $0x4, %edx
callq 0x31a0
movq %rax, -0x908(%rbp)
jmp 0x431d
movq -0x908(%rbp), %rsi
leaq -0x728(%rbp), %rdi
callq 0x3120
jmp 0x4332
leaq -0x748(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3120
jmp 0x4347
leaq -0x708(%rbp), %rdi
leaq -0x728(%rbp), %rsi
leaq -0x748(%rbp), %rdx
callq 0xe9c0
jmp 0x4363
leaq -0x748(%rbp), %rdi
callq 0x31c0
leaq -0x728(%rbp), %rdi
callq 0x31c0
leaq -0x708(%rbp), %rdi
callq 0x4a00
leaq -0x70(%rbp), %rdi
leaq -0x5b8(%rbp), %rsi
callq 0x3040
jmp 0x4399
jmp 0x43fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x43ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x43e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x748(%rbp), %rdi
callq 0x31c0
leaq -0x728(%rbp), %rdi
callq 0x31c0
leaq -0x708(%rbp), %rdi
callq 0x4a00
jmp 0x45d2
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x920(%rbp)
callq 0x3290
movq -0x920(%rbp), %rdi
movq %rax, -0x750(%rbp)
callq 0x3180
movq %rax, -0x758(%rbp)
movb $0x64, -0x759(%rbp)
movq -0x750(%rbp), %rdi
movq -0x758(%rbp), %rsi
leaq -0x759(%rbp), %rdx
callq 0x4a50
movq %rax, -0x918(%rbp)
jmp 0x4455
movq -0x918(%rbp), %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0x921(%rbp)
jne 0x4483
leaq -0xb0(%rbp), %rdi
callq 0x3210
cmpq $0x0, %rax
sete %al
movb %al, -0x921(%rbp)
movb -0x921(%rbp), %al
testb $0x1, %al
jne 0x4492
jmp 0x45c4
leaq -0x7d0(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x4920
jmp 0x44a7
leaq 0x28d43(%rip), %rsi     # 0x2d1f1
xorl %eax, %eax
movl %eax, %edx
leaq -0x70(%rbp), %rdi
movq %rdi, -0x938(%rbp)
callq 0x3540
movq -0x938(%rbp), %rdi
movq %rax, %rsi
leaq 0x28d1a(%rip), %rcx     # 0x2d1ed
movl $0x4, %edx
callq 0x31a0
movq %rax, -0x930(%rbp)
jmp 0x44e6
movq -0x930(%rbp), %rsi
leaq -0x7f0(%rbp), %rdi
callq 0x3120
jmp 0x44fb
leaq -0x810(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3120
jmp 0x4510
leaq -0x7d0(%rbp), %rdi
leaq -0x7f0(%rbp), %rsi
leaq -0x810(%rbp), %rdx
callq 0xe9c0
jmp 0x452c
leaq -0x810(%rbp), %rdi
callq 0x31c0
leaq -0x7f0(%rbp), %rdi
callq 0x31c0
leaq -0x7d0(%rbp), %rdi
callq 0x4a00
leaq -0x70(%rbp), %rdi
leaq -0x5b8(%rbp), %rsi
callq 0x3040
jmp 0x4562
jmp 0x45c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x45b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x45aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x810(%rbp), %rdi
callq 0x31c0
leaq -0x7f0(%rbp), %rdi
callq 0x31c0
leaq -0x7d0(%rbp), %rdi
callq 0x4a00
jmp 0x45d2
leaq -0x5b8(%rbp), %rdi
callq 0x31c0
jmp 0x45e0
leaq -0x5b8(%rbp), %rdi
callq 0x31c0
jmp 0x462c
movq 0x3e9e9(%rip), %rdi     # 0x42fd0
leaq 0x28c08(%rip), %rsi     # 0x2d1f6
callq 0x32c0
jmp 0x45f5
movl $0x0, -0x4(%rbp)
movl $0x1, -0xc0(%rbp)
leaq -0x400(%rbp), %rdi
callq 0x4a00
leaq -0x288(%rbp), %rdi
callq 0x4a00
leaq -0x160(%rbp), %rdi
callq 0x4880
jmp 0x4652
leaq -0x400(%rbp), %rdi
callq 0x4a00
leaq -0x288(%rbp), %rdi
callq 0x4a00
leaq -0x160(%rbp), %rdi
callq 0x4880
jmp 0x4660
leaq -0xe8(%rbp), %rdi
callq 0x31c0
jmp 0x466e
leaq -0xe8(%rbp), %rdi
callq 0x31c0
jmp 0x46ad
leaq -0xb0(%rbp), %rdi
callq 0x31c0
leaq -0x90(%rbp), %rdi
callq 0x31c0
leaq -0x70(%rbp), %rdi
callq 0x31c0
leaq -0x50(%rbp), %rdi
callq 0x31c0
leaq -0x30(%rbp), %rdi
callq 0x31c0
movl -0x4(%rbp), %eax
addq $0x940, %rsp            # imm = 0x940
popq %rbp
retq
leaq -0xb0(%rbp), %rdi
callq 0x31c0
leaq -0x90(%rbp), %rdi
callq 0x31c0
leaq -0x70(%rbp), %rdi
callq 0x31c0
leaq -0x50(%rbp), %rdi
callq 0x31c0
leaq -0x30(%rbp), %rdi
callq 0x31c0
movq -0xb8(%rbp), %rdi
callq 0x34e0
nopl (%rax)