// File: /workspace/github_cpp_makefile_star2_O2/JameyWoo[P]re2graph/algorithms.cpp
// Function: nfa2dfa(NFA, DFA&)
void nfa2dfa(NFA nfa, DFA &dfa) {
    /**
     * 思路: 
     * 先统一求出所有状态的闭包closure, 因为如果在线求解会导致总是重复计算. 
     * 可以以O(n)的代价求出所有状态的闭包.
     * 然后再进行复杂的子集构造算法
     */
    // ! 所有状态的闭包, 一次性算出, 避免重复计算
    vector<set<int>> closures = vector<set<int>>(nfa.state_cnt, set<int>());
    vector<bool> ext_start(nfa.state_cnt);
    for (int i = 0; i < nfa.state_cnt; ++i) {
        if (closures[i].size() == 0) {
            ext_start[i] = true;
            vector<bool> visted(nfa.state_cnt);
            visted[i] = true;
            get_closure(nfa, closures, i, visted);
            visted[i] = false;
        }
    }
    // * 如果闭包成环, 会出现一种闭包没有求完整的情况. 已用反向边遍历方法解决
    // 但有的状态的闭包一定是完整的. 就是环的开始部分, 所以还需要进行调整. 进行闭包的扩展, 进行边的反向扩展
    map<int, vector<int>> ext_closure_map;
    for (int i = 0; i < nfa.state_cnt; ++i) {
        for (auto m : nfa.jump[i]) {
            if (m.first == '~') {
                for (auto v : m.second) {
                    ext_closure_map[v].push_back(i);
                }
            }
        }
    }
    // cout << "ext_closure_map:" << endl;
    // for (auto m: ext_closure_map) {
    //     for (auto v: m.second) {
    //         cout << m.first << ' ' << v << endl;
    //     }
    // }
    for (int i = 0; i < nfa.state_cnt; ++i) {
        // if (ext_start[i]) { // 不需要判断, 如果环的入口不是起点这种情况会出错
            queue<int> inq;
            vector<int> visted(nfa.state_cnt);
            inq.push(i);
            visted[i] = true;
            while (not inq.empty()) {
                int now = inq.front();
                inq.pop();
                for (auto v : ext_closure_map[now]) {
                    if (visted[v] == false) {
                        closures[v].insert(closures[i].begin(), closures[i].end());
                        inq.push(v);
                        visted[v] = true;
                    }
                }
            // }
        }
    }

    // 查看闭包
    // cout << "closures: " << endl;
    // for (int i = 0; i < nfa.state_cnt; ++i) {
    //     cout << i << ": ";
    //     for (auto clo : closures[i]) {
    //         cout << clo << ' ';
    //     }
    //     cout << endl;
    // }

    // 进行接受状态的扩展, 因为后面可能会漏掉
    set<int> ext_end_states;
    for (auto x : nfa.end_states) {
        ext_end_states.insert(x);  // 先插入最基本的接受状态
    }
    int ic = 0;
    for (auto closure : closures) {
        ic++;
        for (auto x : closure) {
            if (ext_end_states.count(x)) {
                ext_end_states.insert(ic - 1);
                break;
            }
        }
    }
    // cout << "ext_end_states: ";
    // for (auto s : ext_end_states) {
    //     cout << s << ' ';
    // }
    // cout << endl;

    // ! 进行子集构造算法
    set<int> end_states;                                // dfa的终止状态
    if (ext_end_states.count(0)) end_states.insert(0);  // 因为先单独将起始状态0加入了工作列表, 所以对他的接收状态需要提前处理
    map<set<int>, int> set_hash;                        // 集合对整数的hash, 也就是对子集编码
    vector<map<char, int>> jump_dfa;                    // dfa的jump
    set<int> set_visted;                                // 保存一个set是否被访问过的信息
    int set_state                       = 0;            // 集合的整数状态
    set_hash[closures[nfa.start_state]] = set_state++;  // 初始状态编码为0
    // cout << "0: ";
    // for (auto s: closures[nfa.start_state]) {
    //     cout << s << ' ';
    // }
    // cout << endl;
    jump_dfa.push_back(map<char, int>());                     // 压入初始状态的map
    set_visted.insert(set_hash[closures[nfa.start_state]]);   // 标记访问过
                                                              // 初始化变量之后开始工作
    queue<set<int>> work_queue;                               // 队列
    work_queue.push(closures[nfa.start_state]);               // 将初始状态闭包集插入工作队列
    while (not work_queue.empty()) {                          // 当工作队列不为空
        set<int> now = work_queue.front();                    // 取出当前工作集合
        work_queue.pop();                                     // 弹出
        for (auto c : nfa.chars) {                            // 遍历每个字符
            if (c == '~') continue;                           // c 不能是~ 也就是ε, 它不可以接下一状态
            set<int> next_state_set;                          // 下一状态
            for (auto state : now) {                          // 遍历每个状态. 要获取当前集合所有状态对某字符的下一状态的闭包
                if (nfa.jump[state].count(c) != 0) {          // 当可以跳转的时候
                    for (auto v : nfa.jump[state][c]) {       // 一个状态对同一个字符可能有好几个下一状态
                        set<int> next_closure = closures[v];  // 求闭包
                        // 要获取所有可以走下去的状态的闭包, 都插入到集合中
                        next_state_set.insert(next_closure.begin(), next_closure.end());
                    }
                }
            }
            if (next_state_set.size() != 0) {                // 如果不是空, 说明是一个dfa状态
                if (set_hash.count(next_state_set) == 0) {   // 遇到新状态, 计次, 转化为dfa中的状态
                    set_hash[next_state_set] = set_state++;  // 新状态分配int型状态号
                    // cout << set_state - 1 << ": ";
                    // for (auto s: next_state_set) {
                    //     cout << s << ' ';
                    // }
                    // cout << endl;
                    for (auto s : next_state_set) {  // 查找当前集合是否存在nfa的接受状态, 如果存在, 那它也是dfa的终止状态
                        if (ext_end_states.count(s) != 0) {
                            end_states.insert(set_state - 1);  // 是终止状态
                            break;
                        }
                    }
                    jump_dfa.push_back(map<char, int>());  // 新状态的map, 用来存储dfa的转移函数
                }
                int set_hash_next_state    = set_hash[next_state_set];  // 一次得到hash值保存, 方便后面操作, 省的每次都查找set
                jump_dfa[set_hash[now]][c] = set_hash_next_state;       // 经过hash之后的dfa状态表示
                if (set_visted.count(set_hash_next_state) == 0) {       // 如果之前没访问过
                    set_visted.insert(set_hash_next_state);             // 插入set_visted中标记访问
                    work_queue.push(next_state_set);                    // 插入work_queu中, 由于set_visted的存在, 只会进一次work_queue
                }
            }
        }
    }

    // for (auto s: set_hash) {
    //     cout << s.second << ": ";
    //     for (auto v: s.first) {
    //         cout << ' ';
    //     }
    //     cout << endl;
    // }

    // 构造dfa, 按照DFA数据定义的顺序
    dfa.char_cnt      = nfa.char_cnt;
    dfa.state_cnt     = set_state;
    dfa.start_state   = 0;
    dfa.end_state_cnt = end_states.size();
    dfa.chars         = nfa.chars;
    for (int i = 0; i < dfa.state_cnt; ++i) {
        dfa.states.push_back(i);
    }
    for (auto s : end_states) {
        dfa.end_states.push_back(s);
    }
    dfa.jump_map = jump_dfa;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp            # imm = 0x2E8
movq %rsi, 0x18(%rsp)
movq %rdi, %rbx
movslq 0x4(%rdi), %rsi
leaq 0x58(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rdx
leaq 0x220(%rsp), %rcx
callq 0x8d36
leaq 0x50(%rsp), %rdi
callq 0x995e
movq %rbx, 0x8(%rsp)
movslq 0x4(%rbx), %rsi
leaq 0x250(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x8d8c
pushq $0x28
popq %r14
xorl %ebx, %ebx
leaq 0x50(%rsp), %r12
leaq 0x220(%rsp), %r13
leaq 0x278(%rsp), %rbp
leaq 0x30(%rsp), %r15
movq 0x8(%rsp), %rax
movslq 0x4(%rax), %rax
cmpq %rax, %rbx
jge 0x4e17
movq 0x30(%rsp), %rax
cmpq $0x0, (%rax,%r14)
jne 0x4e0b
leaq 0x250(%rsp), %rdi
movq %rbx, %rsi
callq 0x8da0
orq %rdx, (%rax)
movq 0x8(%rsp), %rax
movslq 0x4(%rax), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x8d8c
movq %r12, %rdi
movq %rbx, %rsi
callq 0x8da0
orq %rdx, (%rax)
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x2fac
movq %rbp, %rdi
movq %r15, %rsi
movl %ebx, %edx
movq %r12, %rcx
callq 0x5874
movq %rbp, %rdi
callq 0x303e
movq %r12, %rdi
movq %rbx, %rsi
callq 0x8da0
notq %rdx
andq %rdx, (%rax)
movq %r12, %rdi
callq 0x8dbe
incq %rbx
addq $0x30, %r14
jmp 0x4d7a
leaq 0x228(%rsp), %rcx
andl $0x0, (%rcx)
andq $0x0, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
andq $0x0, 0x20(%rcx)
xorl %ecx, %ecx
leaq 0x220(%rsp), %r12
leaq 0xa0(%rsp), %r13
leaq 0xf0(%rsp), %rbp
movq 0x8(%rsp), %r14
movl %ecx, 0xf0(%rsp)
cmpl %eax, %ecx
jge 0x4efb
movslq %ecx, %rax
movq 0x58(%r14), %rcx
imulq $0x30, %rax, %rax
addq %rcx, %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rax), %r15
cmpq 0x10(%rsp), %r15
je 0x4ee9
leaq 0x20(%r15), %rsi
leaq 0x50(%rsp), %rdi
callq 0x3698
cmpb $0x7e, 0x50(%rsp)
jne 0x4ecd
movq 0x58(%rsp), %rbx
movq 0x60(%rsp), %r14
cmpq %r14, %rbx
je 0x4ecd
movl (%rbx), %eax
movl %eax, 0xa0(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x8dce
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8b9a
addq $0x4, %rbx
jmp 0x4ea3
leaq 0x58(%rsp), %rdi
callq 0x329e
movq %r15, %rdi
callq 0x2170
movq %rax, %r15
movq 0x8(%rsp), %r14
jmp 0x4e7d
movl 0xf0(%rsp), %ecx
incl %ecx
movl 0x4(%r14), %eax
jmp 0x4e53
xorl %ecx, %ecx
leaq 0x50(%rsp), %rbx
leaq 0x120(%rsp), %r13
leaq 0x220(%rsp), %rbp
leaq 0x1f0(%rsp), %r12
movl %ecx, 0xa0(%rsp)
cmpl %eax, %ecx
jge 0x5041
movq %rbx, %rdi
callq 0x8e1c
movslq 0x4(%r14), %rsi
leaq 0xf0(%rsp), %rdi
movq %r13, %rdx
callq 0x8e38
movq %rbx, %rdi
leaq 0xa0(%rsp), %rsi
callq 0xb5a8
movslq 0xa0(%rsp), %rax
movq 0xf0(%rsp), %rcx
movl $0x1, (%rcx,%rax,4)
movq 0x60(%rsp), %rax
cmpq %rax, 0x80(%rsp)
je 0x501a
movl (%rax), %eax
movl %eax, 0x120(%rsp)
movq %rbx, %rdi
callq 0xb7dc
movq %rbp, %rdi
movq %r13, %rsi
callq 0x8dce
movq (%rax), %r14
movq 0x8(%rax), %r15
cmpq %r15, %r14
je 0x5010
movslq (%r14), %rax
movl %eax, 0x1f0(%rsp)
movq 0xf0(%rsp), %rcx
cmpl $0x0, (%rcx,%rax,4)
jne 0x500a
movq 0x30(%rsp), %rcx
imulq $0x30, %rax, %rdi
addq %rcx, %rdi
movslq 0xa0(%rsp), %rax
imulq $0x30, %rax, %rax
leaq (%rcx,%rax), %rdx
addq $0x8, %rdx
movq 0x10(%rdx), %rsi
callq 0xb832
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb5a8
movslq 0x1f0(%rsp), %rax
movq 0xf0(%rsp), %rcx
movl $0x1, (%rcx,%rax,4)
addq $0x4, %r14
jmp 0x4fa2
movq 0x8(%rsp), %r14
jmp 0x4f6c
leaq 0xf0(%rsp), %rdi
callq 0x329e
movq %rbx, %rdi
callq 0x99b6
movl 0xa0(%rsp), %ecx
incl %ecx
movl 0x4(%r14), %eax
jmp 0x4f1a
leaq 0xf8(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq %r14, %rax
movq 0x40(%r14), %r14
movq 0x48(%rax), %r12
leaq 0xf0(%rsp), %rbx
leaq 0x50(%rsp), %r15
cmpq %r12, %r14
je 0x5093
movl (%r14), %eax
movl %eax, 0x50(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xba30
addq $0x4, %r14
jmp 0x5076
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
xorl %r12d, %r12d
leaq 0x50(%rsp), %r15
leaq 0xf0(%rsp), %r13
leaq 0xa0(%rsp), %rbp
cmpq 0x28(%rsp), %rbx
movq 0x8(%rsp), %r14
je 0x514b
movq %r15, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x9a0e
leal 0x1(%r12), %eax
movl %eax, 0x10(%rsp)
movq 0x68(%rsp), %r15
leaq 0x58(%rsp), %rax
cmpq %rax, %r15
je 0x5130
movl 0x20(%r15), %eax
movl %eax, 0xa0(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x8e8a
testq %rax, %rax
jne 0x5118
movq %r15, %rdi
callq 0x2250
movq %rax, %r15
jmp 0x50e6
movl %r12d, 0x120(%rsp)
movq %r13, %rdi
leaq 0x120(%rsp), %rsi
callq 0xbab8
movq %r14, %r15
movq %r14, %rdi
callq 0x995e
addq $0x30, %rbx
movl 0x10(%rsp), %eax
movl %eax, %r12d
jmp 0x50ba
leaq 0xa8(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x50(%rsp), %rsi
andl $0x0, (%rsi)
leaq 0xf0(%rsp), %rdi
callq 0x8e8a
testq %rax, %rax
je 0x5197
leaq 0x50(%rsp), %rsi
andl $0x0, (%rsi)
leaq 0xa0(%rsp), %rdi
callq 0xbab8
leaq 0x128(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0xd0(%rsp)
andq $0x0, 0xe0(%rsp)
leaq 0x1f8(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movslq 0x8(%r14), %rax
imulq $0x30, %rax, %rsi
addq 0x30(%rsp), %rsi
leaq 0x120(%rsp), %rdi
callq 0x8ea4
andl $0x0, (%rax)
leaq 0x50(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
leaq 0x58(%rsp), %rax
movq %rax, 0x18(%rsi)
movq %rax, 0x20(%rsi)
andq $0x0, 0x28(%rsi)
leaq 0xd0(%rsp), %rdi
callq 0xbf88
leaq 0x50(%rsp), %rdi
callq 0x3af6
movslq 0x8(%r14), %rax
imulq $0x30, %rax, %rsi
addq 0x30(%rsp), %rsi
leaq 0x120(%rsp), %rdi
callq 0x8ea4
leaq 0x1f0(%rsp), %rdi
movq %rax, %rsi
callq 0xba30
leaq 0x50(%rsp), %rdi
callq 0x8f0a
movslq 0x8(%r14), %rax
imulq $0x30, %rax, %rsi
addq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0xc346
leaq 0x10(%r14), %rax
movq %rax, 0x188(%rsp)
leaq 0x158(%rsp), %r12
pushq $0x1
popq %rax
movq %rax, 0x20(%rsp)
leaq 0x190(%rsp), %r15
leaq 0x150(%rsp), %rbp
movq 0x60(%rsp), %rsi
cmpq %rsi, 0x80(%rsp)
je 0x558b
leaq 0x1c0(%rsp), %rdi
callq 0x9a0e
leaq 0x50(%rsp), %rdi
callq 0xc5c4
movq 0x10(%r14), %r13
movq 0x18(%r14), %rax
movq %rax, 0x28(%rsp)
cmpq 0x28(%rsp), %r13
je 0x5579
movb (%r13), %al
movb %al, 0x7(%rsp)
cmpb $0x7e, %al
je 0x5571
movq %r13, 0x10(%rsp)
andl $0x0, 0x198(%rsp)
andq $0x0, 0x1a0(%rsp)
leaq 0x198(%rsp), %rax
movq %rax, 0x1a8(%rsp)
movq %rax, 0x1b0(%rsp)
andq $0x0, 0x1b8(%rsp)
movq 0x1d8(%rsp), %r13
leaq 0x1c8(%rsp), %rax
cmpq %rax, %r13
je 0x53de
movslq 0x20(%r13), %rax
imulq $0x30, %rax, %r14
movq 0x8(%rsp), %rax
movq 0x58(%rax), %rdi
addq %r14, %rdi
leaq 0x7(%rsp), %rsi
callq 0x8f26
testq %rax, %rax
je 0x53ce
movq 0x8(%rsp), %rax
addq 0x58(%rax), %r14
movq %r14, %rdi
leaq 0x7(%rsp), %rsi
callq 0x8c0a
movq (%rax), %r14
movq 0x8(%rax), %rbx
cmpq %rbx, %r14
je 0x53ce
movslq (%r14), %rax
imulq $0x30, %rax, %rsi
addq 0x30(%rsp), %rsi
movq %rbp, %rdi
callq 0x9a0e
movq 0x168(%rsp), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0xb832
movq %rbp, %rdi
callq 0x995e
addq $0x4, %r14
jmp 0x5394
movq %r13, %rdi
callq 0x2250
movq %rax, %r13
jmp 0x5343
cmpq $0x0, 0x1b8(%rsp)
je 0x5410
leaq 0x120(%rsp), %rdi
movq %r15, %rsi
callq 0x8f40
movq 0x10(%rsp), %r13
testq %rax, %rax
je 0x541f
movq 0x20(%rsp), %rax
movl %eax, %r14d
jmp 0x54e1
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %r13
jmp 0x5569
leaq 0x120(%rsp), %rdi
movq %r15, %rsi
callq 0x8ea4
movq 0x20(%rsp), %rcx
leal 0x1(%rcx), %r14d
movl %ecx, (%rax)
movq 0x1a8(%rsp), %r13
leaq 0x198(%rsp), %rax
cmpq %rax, %r13
je 0x5497
movl 0x20(%r13), %eax
movl %eax, 0x150(%rsp)
leaq 0xf0(%rsp), %rdi
movq %rbp, %rsi
callq 0x8e8a
testq %rax, %rax
jne 0x547c
movq %r13, %rdi
callq 0x2250
movq %rax, %r13
jmp 0x5442
movq 0x20(%rsp), %rax
movl %eax, 0x4c(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x4c(%rsp), %rsi
callq 0xbab8
xorps %xmm0, %xmm0
movaps %xmm0, 0x150(%rsp)
andq $0x0, 0x160(%rsp)
movq %r12, 0x168(%rsp)
movq %r12, 0x170(%rsp)
andq $0x0, 0x178(%rsp)
leaq 0xd0(%rsp), %rdi
movq %rbp, %rsi
callq 0xbf88
movq %rbp, %rdi
callq 0x3af6
movq 0x10(%rsp), %r13
leaq 0x120(%rsp), %rdi
movq %r15, %rsi
callq 0x8ea4
movl (%rax), %ebx
movl %ebx, 0x150(%rsp)
leaq 0x120(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x8ea4
movslq (%rax), %rax
imulq $0x30, %rax, %rdi
addq 0xd0(%rsp), %rdi
leaq 0x7(%rsp), %rsi
callq 0x8f5a
movl %ebx, (%rax)
leaq 0x1f0(%rsp), %rdi
movq %rbp, %rsi
callq 0x8e8a
testq %rax, %rax
jne 0x555c
leaq 0x1f0(%rsp), %rdi
movq %rbp, %rsi
callq 0xba30
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xc346
movl %r14d, %eax
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %r14
movq %r15, %rdi
callq 0x995e
incq %r13
jmp 0x52e9
leaq 0x1c0(%rsp), %rdi
callq 0x995e
jmp 0x52b2
movl (%r14), %eax
movq 0x18(%rsp), %rcx
movl %eax, (%rcx)
movq 0x20(%rsp), %rax
movl %eax, 0x4(%rcx)
andl $0x0, 0x8(%rcx)
movl 0xc8(%rsp), %eax
movl %eax, 0xc(%rcx)
leaq 0x10(%rcx), %rdi
movq 0x188(%rsp), %rsi
callq 0x8fa8
movq 0x18(%rsp), %rax
leaq 0x28(%rax), %rbx
xorl %eax, %eax
leaq 0x1c0(%rsp), %r14
movl %eax, 0x1c0(%rsp)
movq 0x18(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x55f6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8b9a
movl 0x1c0(%rsp), %eax
incl %eax
jmp 0x55cf
movq 0xb8(%rsp), %r15
movq 0x18(%rsp), %rax
leaq 0x40(%rax), %rbx
leaq 0x1c0(%rsp), %r14
leaq 0xa8(%rsp), %rax
cmpq %rax, %r15
je 0x563f
movl 0x20(%r15), %eax
movl %eax, 0x1c0(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8b9a
movq %r15, %rdi
callq 0x2250
movq %rax, %r15
jmp 0x560f
movq 0x18(%rsp), %rdi
addq $0x58, %rdi
leaq 0xd0(%rsp), %rsi
callq 0x906a
leaq 0x50(%rsp), %rdi
callq 0x9be6
leaq 0x1f0(%rsp), %rdi
callq 0x995e
leaq 0xd0(%rsp), %rdi
callq 0x3b20
leaq 0x120(%rsp), %rdi
callq 0x9d38
leaq 0xa0(%rsp), %rdi
callq 0x995e
leaq 0xf0(%rsp), %rdi
callq 0x995e
leaq 0x220(%rsp), %rdi
callq 0x9d9c
leaq 0x250(%rsp), %rdi
callq 0x8dbe
leaq 0x30(%rsp), %rdi
callq 0x9148
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x56ec
jmp 0x5710
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x3af6
jmp 0x5807
movq %rax, %rbx
jmp 0x582e
movq %rax, %rbx
jmp 0x5862
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x995e
jmp 0x586c
jmp 0x5750
movq %rax, %rbx
jmp 0x5807
jmp 0x572e
movq %rax, %rbx
leaq 0x278(%rsp), %rdi
callq 0x303e
jmp 0x5731
jmp 0x572e
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x8dbe
jmp 0x5855
jmp 0x5742
movq %rax, %rbx
jmp 0x5855
jmp 0x5781
jmp 0x5750
jmp 0x5750
movq %rax, %rbx
jmp 0x57fd
jmp 0x575a
movq %rax, %rbx
jmp 0x583b
jmp 0x57a0
jmp 0x5792
movq %rax, %rbx
jmp 0x57b0
jmp 0x57ce
movq %rax, %rbx
leaq 0x150(%rsp), %rdi
callq 0x3af6
jmp 0x57e3
jmp 0x57ce
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x5836
jmp 0x57ce
jmp 0x57a0
movq %rax, %rbx
jmp 0x5848
jmp 0x57ce
jmp 0x57ce
jmp 0x57ce
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x329e
leaq 0x50(%rsp), %rdi
callq 0x99b6
jmp 0x5848
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x329e
jmp 0x5848
movq %rax, %rbx
jmp 0x57e3
movq %rax, %rbx
leaq 0x150(%rsp), %rdi
callq 0x995e
leaq 0x190(%rsp), %rdi
callq 0x995e
leaq 0x1c0(%rsp), %rdi
callq 0x995e
leaq 0x50(%rsp), %rdi
callq 0x9be6
leaq 0x1f0(%rsp), %rdi
callq 0x995e
leaq 0xd0(%rsp), %rdi
callq 0x3b20
leaq 0x120(%rsp), %rdi
callq 0x9d38
leaq 0xa0(%rsp), %rdi
callq 0x995e
leaq 0xf0(%rsp), %rdi
callq 0x995e
leaq 0x220(%rsp), %rdi
callq 0x9d9c
leaq 0x250(%rsp), %rdi
callq 0x8dbe
leaq 0x30(%rsp), %rdi
callq 0x9148
movq %rbx, %rdi
callq 0x2370