// File: /workspace/github_cpp_makefile_star2_O3/JameyWoo[P]re2graph/algorithms.cpp
// Function: parse_re(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int&)
Graph parse_re(string rexp, int &state) {
    // cout << "exp = " << rexp << endl;
    if (rexp.size() == 1) {  // ! 当只有一个字符时, 构造基本的转移函数, 然后返回. 这是这个函数的递归基例
        Graph base;
        base.start = state++;
        base.end   = state++;
        Edge edge(base.start, rexp[0], base.end);
        base.edges.push_back(edge);
        return base;
    }
    vector<Graph> graphes;  // 这个rexp可以解析出来的所有graph, 用vector存储, 方便合并

    // 一种特殊情况 (ac)*|b, 要和 (ac | b*)) 这种区分开来.
    // ! 也就是说如果存在不在括号中的 | , 但括号再rexp中存在的情况, 要先处理 |
    bool has_bra = count(rexp.begin(), rexp.end(), '(');  // 是否有括号
    bool or_out  = false;                                 // | 是否在括号外面
    int or_loc   = 0;
    if (has_bra) {
        stack<char> in_or_out;
        int i = 0;
        for (auto s : rexp) {
            i++;
            if (s == '(') {
                in_or_out.push('*');
            } else if (s == ')') {
                in_or_out.pop();
            }
            if (s == '|' && in_or_out.size() == 0) {
                or_out = true;
                or_loc = i - 1;
            }
        }
    }

    if (has_bra && or_out == false) {  // 存在括号, 且如果出现 | , 都在括号之中
        // 检测到有括号, 解析括号
        stack<char> bra;  // 括号, 用来处理括号嵌套的情况
        string sub_rexp;
        for (int i = 0; i < rexp.size(); ++i) {
            char c = rexp[i];
            if (c == '(') {
                if (sub_rexp.size() && bra.size() == 0) {
                    graphes.push_back(parse_re(sub_rexp, state));
                    sub_rexp.clear();
                }
                bra.push('*');
                if (bra.size() != 1) sub_rexp.push_back('(');
            } else if (c == ')') {
                // cout << "2 - " << sub_rexp << endl;
                bra.pop();
                if (bra.size() != 0) sub_rexp.push_back(')');
                if (bra.size() == 0) {  // 最外层括号被弹出, 将括号包裹的部分进行解析
                    // cout << "bar = 0: " << sub_rexp << endl;
                    // 增加对括号闭包的操作
                    if (i + 1 < rexp.size() && (rexp[i + 1] == '*' || rexp[i + 1] == '+')) {  // * 对 * 和 + 的解析
                        if (rexp[i + 1] == '+')
                            graphes.push_back(parse_re(sub_rexp, state));
                        int start = state++;
                        graphes.push_back(parse_re(sub_rexp, state));
                        int end = state++;
                        graphes.back().edges.push_back(Edge(start, '~', graphes.back().start));
                        graphes.back().edges.push_back(Edge(graphes.back().end, '~', graphes.back().start));
                        graphes.back().edges.push_back(Edge(graphes.back().end, '~', end));
                        graphes.back().edges.push_back(Edge(start, '~', end));
                        graphes.back().start = start;
                        graphes.back().end   = end;
                        i++;
                    } else {
                        graphes.push_back(parse_re(sub_rexp, state));
                    }
                    sub_rexp.clear();
                }

                // cout << "1 - " << sub_rexp << endl;
            } else {
                sub_rexp += c;
            }
        }
        // cout << "sub_rexp = " << sub_rexp << endl;
        if (sub_rexp.size()) {
            graphes.push_back(parse_re(sub_rexp, state));
            sub_rexp.clear();
        }
    } else if (count(rexp.begin(), rexp.end(), '|')) {  // ! 解析或, 没有括号的存在
        string sub_rexp;
        Graph merge;
        merge.start = state++;  // 先编号开始, 顺序好看些
        int i       = 0;
        for (auto s : rexp) {
            i++;
            if (s == '|') {
                if (or_out && or_loc != (i - 1)) {
                    sub_rexp += s;
                    continue;
                }
                if (sub_rexp.size()) {
                    graphes.push_back(parse_re(sub_rexp, state));
                    sub_rexp.clear();
                }
            } else {
                sub_rexp += s;
            }
        }
        if (sub_rexp.size()) {
            graphes.push_back(parse_re(sub_rexp, state));
            sub_rexp.clear();
        }
        merge.end = state++;
        for (auto graph : graphes) {
            merge.edges.push_back(Edge(merge.start, '~', graph.start));
            merge.edges.insert(merge.edges.end(), graph.edges.begin(), graph.edges.end());
            merge.edges.push_back(Edge(graph.end, '~', merge.end));
        }
        return merge;  // ! 处理或的直接返回, 因为和处理简单的并或者括号不一样
    } else {           // 处理普通的没有 | , 也没有括号的情况
        // cout << "rexp = " << rexp << endl;
        for (int i = 0; i < rexp.size(); ++i) {
            string next_rexp;
            next_rexp += rexp[i];
            if (i + 1 < rexp.size() && (rexp[i + 1] == '*' || rexp[i + 1] == '+')) {  // * 对 * 和 + 的解析
                if (rexp[i + 1] == '+')
                    graphes.push_back(parse_re(next_rexp, state));
                int start = state++;
                graphes.push_back(parse_re(next_rexp, state));
                int end = state++;
                graphes.back().edges.push_back(Edge(start, '~', graphes.back().start));
                graphes.back().edges.push_back(Edge(graphes.back().end, '~', graphes.back().start));
                graphes.back().edges.push_back(Edge(graphes.back().end, '~', end));
                graphes.back().edges.push_back(Edge(start, '~', end));
                graphes.back().start = start;
                graphes.back().end   = end;
                i++;
            } else {
                graphes.push_back(parse_re(next_rexp, state));
            }
            next_rexp.clear();
        }
    }

    // 解析多原子单位的合并
    Graph merge;
    merge.start = graphes[0].start;
    merge.end   = graphes.back().end;
    merge.edges = graphes[0].edges;
    for (int i = 1; i < graphes.size(); ++i) {
        merge.edges.push_back(Edge(graphes[i - 1].end, '~', graphes[i].start));
        merge.edges.insert(merge.edges.end(), graphes[i].edges.begin(), graphes[i].edges.end());
    }
    // for (auto edge: merge.edges) {
    //     cout << edge.from << ' ' << edge.cond << ' ' << edge.to << endl;
    // }
    return merge;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdx, %rbp
movq 0x8(%rsi), %r12
cmpq $0x1, %r12
movq %rdi, 0x78(%rsp)
jne 0x4ceb
movq %rdi, %rbx
leaq 0x8(%rdi), %r12
pxor %xmm0, %xmm0
movdqu %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movl (%rbp), %eax
leal 0x1(%rax), %ecx
movl %eax, (%rdi)
leal 0x2(%rax), %edx
movl %edx, (%rbp)
movl %ecx, 0x4(%rdi)
movq (%rsi), %rdx
movb (%rdx), %sil
leaq 0x80(%rsp), %rdx
movl %eax, (%rdx)
movl %ecx, 0x4(%rdx)
movb %sil, 0x8(%rdx)
movq %r12, %rdi
xorl %esi, %esi
callq 0x119b4
jmp 0x59e8
pxor %xmm0, %xmm0
movdqa %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
testq %r12, %r12
je 0x56fd
movq %rsi, 0x48(%rsp)
movq (%rsi), %r13
xorl %eax, %eax
xorl %r14d, %r14d
xorl %ecx, %ecx
cmpb $0x28, (%r13,%rax)
sete %cl
addq %rcx, %r14
incq %rax
cmpq %rax, %r12
jne 0x4d14
testq %r14, %r14
movq %rbp, 0x40(%rsp)
je 0x4eae
pxor %xmm0, %xmm0
leaq 0x80(%rsp), %rdi
movdqa %xmm0, 0x40(%rdi)
movdqa %xmm0, 0x30(%rdi)
movdqa %xmm0, 0x20(%rdi)
movdqa %xmm0, 0x10(%rdi)
movdqa %xmm0, (%rdi)
xorl %esi, %esi
callq 0x11b1e
movq 0x48(%rsp), %rax
movq 0x8(%rax), %r12
testq %r12, %r12
je 0x5016
movq (%rax), %r13
xorl %r15d, %r15d
movq %rsp, %rbx
xorl %ebp, %ebp
movl $0x0, 0x70(%rsp)
movzbl (%r13,%r15), %eax
cmpl $0x7c, %eax
je 0x4dd7
cmpl $0x29, %eax
je 0x4dba
cmpl $0x28, %eax
jne 0x4e78
movb $0x2a, (%rsp)
leaq 0x80(%rsp), %rdi
movq %rbx, %rsi
callq 0x11c96
jmp 0x4e78
movq 0xb0(%rsp), %rax
movq 0xb8(%rsp), %rdi
cmpq %rdi, %rax
je 0x4e31
decq %rax
jmp 0x4e70
movq 0xb0(%rsp), %rax
movq 0xc8(%rsp), %rcx
movq %rcx, %rdx
subq 0xa8(%rsp), %rdx
shrq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
subq 0xb8(%rsp), %rax
addq 0xa0(%rsp), %rax
shlq $0x9, %rdx
addq %rdx, %rax
cmpq 0x90(%rsp), %rax
sete %al
movl 0x70(%rsp), %ecx
cmovel %r15d, %ecx
movl %ecx, 0x70(%rsp)
orb %al, %bpl
jmp 0x4e78
movl $0x200, %esi            # imm = 0x200
callq 0x2200
movq 0xc8(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0xc8(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0xb8(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0xc0(%rsp)
addq $0x1ff, %rax            # imm = 0x1FF
movq %rax, 0xb0(%rsp)
incq %r15
cmpq %r15, %r12
jne 0x4d88
leaq 0x80(%rsp), %rdi
callq 0xeaa0
testb $0x1, %bpl
movq 0x40(%rsp), %rbp
je 0x5023
movq 0x48(%rsp), %rax
movq (%rax), %r13
movq 0x8(%rax), %r12
jmp 0x4eb6
movl $0x0, 0x70(%rsp)
testq %r12, %r12
je 0x56fd
xorl %eax, %eax
xorl %ecx, %ecx
xorl %edx, %edx
cmpb $0x7c, (%r13,%rax)
sete %dl
addq %rdx, %rcx
incq %rax
cmpq %rax, %r12
jne 0x4ec3
testq %rcx, %rcx
je 0x59fd
leaq 0x90(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
movq 0x78(%rsp), %rbx
leaq 0x8(%rbx), %rcx
movq %rcx, 0x48(%rsp)
movq %rax, 0x18(%rbx)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x8(%rbx)
movl (%rbp), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%rbp)
movl %eax, (%rbx)
testq %r12, %r12
je 0x58a0
movl 0x70(%rsp), %eax
movq %rax, 0x70(%rsp)
xorl %ebp, %ebp
movq %rsp, %rbx
movb (%r13,%rbp), %al
cmpb $0x7c, %al
jne 0x4f4a
testq %r14, %r14
je 0x4f67
movb $0x7c, %al
cmpl %ebp, 0x70(%rsp)
je 0x4f67
movsbl %al, %esi
leaq 0x80(%rsp), %rdi
callq 0x21c0
incq %rbp
cmpq %rbp, %r12
jne 0x4f34
jmp 0x57f8
movq 0x88(%rsp), %rdx
testq %rdx, %rdx
je 0x4f5a
leaq 0xe8(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x80(%rsp), %rsi
addq %rsi, %rdx
leaq 0xd8(%rsp), %rdi
callq 0x44cc
movq %rbx, %rdi
leaq 0xd8(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x4c79
leaq 0x50(%rsp), %rdi
movq %rbx, %rsi
callq 0x11ee8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x4fd5
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x4ffa
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x2200
movq $0x0, 0x88(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax)
jmp 0x4f5a
leaq 0x80(%rsp), %rdi
callq 0xeaa0
pxor %xmm0, %xmm0
leaq 0x80(%rsp), %rdi
movdqa %xmm0, 0x40(%rdi)
movdqa %xmm0, 0x30(%rdi)
movdqa %xmm0, 0x20(%rdi)
movdqa %xmm0, 0x10(%rdi)
movdqa %xmm0, (%rdi)
xorl %esi, %esi
callq 0x11b1e
movq 0x48(%rsp), %r12
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
cmpq $0x0, 0x8(%r12)
je 0x56f0
xorl %eax, %eax
leaq 0x20(%rsp), %r14
xorl %ebp, %ebp
movq 0x40(%rsp), %r15
movq (%r12), %rcx
movzbl (%rcx,%rax), %eax
cmpl $0x29, %eax
je 0x51fc
cmpl $0x28, %eax
jne 0x51ec
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
je 0x5185
movq 0xb0(%rsp), %rax
movq 0xc8(%rsp), %rcx
movq %rcx, %rsi
subq 0xa8(%rsp), %rsi
shrq $0x3, %rsi
cmpq $0x1, %rcx
adcq $-0x1, %rsi
subq 0xb8(%rsp), %rax
addq 0xa0(%rsp), %rax
shlq $0x9, %rsi
addq %rsi, %rax
cmpq 0x90(%rsp), %rax
jne 0x5185
leaq 0x1c8(%rsp), %rax
movq %rax, 0x1b8(%rsp)
movq (%rsp), %rsi
addq %rsi, %rdx
leaq 0x1b8(%rsp), %r13
movq %r13, %rdi
callq 0x44cc
movq %r14, %rdi
movq %r13, %rsi
movq 0x40(%rsp), %rdx
callq 0x4c79
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x11ee8
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x5150
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x1b8(%rsp), %rdi
leaq 0x1c8(%rsp), %rax
cmpq %rax, %rdi
je 0x5175
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0x2200
movq $0x0, 0x8(%rsp)
movq (%rsp), %rax
movb $0x0, (%rax)
movb $0x2a, 0x20(%rsp)
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
callq 0x11c96
movq 0xb0(%rsp), %rcx
movq 0xc8(%rsp), %rax
movq %rax, %rdx
subq 0xa8(%rsp), %rdx
shrq $0x3, %rdx
cmpq $0x1, %rax
adcq $-0x1, %rdx
subq 0xb8(%rsp), %rcx
shlq $0x9, %rdx
addq 0xa0(%rsp), %rcx
addq %rdx, %rcx
subq 0x90(%rsp), %rcx
movb $0x28, %al
cmpq $0x1, %rcx
je 0x5624
movsbl %al, %esi
movq %rsp, %rdi
callq 0x21c0
jmp 0x5624
movq 0xb0(%rsp), %rax
movq 0xb8(%rsp), %rdi
cmpq %rdi, %rax
je 0x521e
decq %rax
movq 0xc8(%rsp), %rcx
jmp 0x525e
movl $0x200, %esi            # imm = 0x200
callq 0x2200
movq 0xc8(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0xc8(%rsp)
movq -0x8(%rax), %rdi
movq %rdi, 0xb8(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0xc0(%rsp)
leaq 0x1ff(%rdi), %rax
movq %rax, 0xb0(%rsp)
movq %rcx, %rdx
subq 0xa8(%rsp), %rdx
sarq $0x3, %rdx
cmpq $0x1, %rcx
movq %rdx, %r8
adcq $-0x1, %r8
shlq $0x9, %r8
movq 0x90(%rsp), %rsi
subq %rdi, %rax
addq 0xa0(%rsp), %rax
addq %rax, %r8
cmpq %rsi, %r8
je 0x52e3
movq %rsp, %rdi
movl $0x29, %esi
callq 0x21c0
movq 0xc8(%rsp), %rcx
movq 0x90(%rsp), %rsi
movq 0xb0(%rsp), %rax
movq %rcx, %rdx
subq 0xa8(%rsp), %rdx
sarq $0x3, %rdx
subq 0xb8(%rsp), %rax
addq 0xa0(%rsp), %rax
cmpq $0x1, %rcx
adcq $-0x1, %rdx
shlq $0x9, %rdx
addq %rax, %rdx
cmpq %rsi, %rdx
jne 0x5624
movslq %ebp, %r14
incq %r14
cmpq %r14, 0x8(%r12)
jbe 0x548d
movq (%r12), %rax
movzbl (%rax,%r14), %eax
cmpl $0x2a, %eax
je 0x53b1
cmpl $0x2b, %eax
jne 0x548d
leaq 0x1a8(%rsp), %rax
movq %rax, 0x198(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x198(%rsp), %r12
movq %r12, %rdi
callq 0x44cc
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
movq 0x40(%rsp), %rdx
callq 0x4c79
leaq 0x50(%rsp), %rdi
movq %rbp, %rsi
callq 0x11ee8
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x538c
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x198(%rsp), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x53b1
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x2200
movl (%r15), %ebp
leal 0x1(%rbp), %eax
movl %eax, (%r15)
leaq 0x188(%rsp), %rax
movq %rax, 0x178(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x178(%rsp), %r12
movq %r12, %rdi
callq 0x44cc
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x4c79
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x11ee8
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x541d
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x178(%rsp), %rdi
leaq 0x188(%rsp), %rax
cmpq %rax, %rdi
je 0x5442
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x40(%rsp), %rcx
movl (%rcx), %r12d
leal 0x1(%r12), %eax
movl %eax, (%rcx)
movq 0x58(%rsp), %rdi
movl -0x20(%rdi), %eax
movl %ebp, 0x20(%rsp)
movl %eax, 0x24(%rsp)
movb $0x7e, 0x28(%rsp)
movq -0x10(%rdi), %rsi
cmpq -0x8(%rdi), %rsi
je 0x5520
movl 0x28(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x20(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, -0x10(%rdi)
jmp 0x552e
leaq 0x168(%rsp), %rax
movq %rax, 0x158(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x158(%rsp), %r13
movq %r13, %rdi
callq 0x44cc
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq 0x40(%rsp), %rdx
callq 0x4c79
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x11ee8
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x54f2
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0x5614
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x5614
addq $-0x18, %rdi
leaq 0x20(%rsp), %rdx
callq 0x120de
movq 0x58(%rsp), %rdi
movq -0x20(%rdi), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x20(%rsp)
movb $0x7e, 0x28(%rsp)
movq -0x10(%rdi), %rsi
cmpq -0x8(%rdi), %rsi
je 0x5568
movl 0x28(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x20(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, -0x10(%rdi)
jmp 0x5576
addq $-0x18, %rdi
leaq 0x20(%rsp), %rdx
callq 0x120de
movq 0x58(%rsp), %rdi
movl -0x1c(%rdi), %eax
movl %eax, 0x20(%rsp)
movl %r12d, 0x24(%rsp)
movb $0x7e, 0x28(%rsp)
movq -0x10(%rdi), %rsi
cmpq -0x8(%rdi), %rsi
je 0x55ac
movl 0x28(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x20(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, -0x10(%rdi)
jmp 0x55ba
addq $-0x18, %rdi
leaq 0x20(%rsp), %rdx
callq 0x120de
movq 0x58(%rsp), %rdi
movl %ebp, 0x20(%rsp)
movl %r12d, 0x24(%rsp)
movb $0x7e, 0x28(%rsp)
movq -0x10(%rdi), %rsi
cmpq -0x8(%rdi), %rsi
je 0x55ed
movl 0x28(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x20(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, -0x10(%rdi)
jmp 0x55fb
addq $-0x18, %rdi
leaq 0x20(%rsp), %rdx
callq 0x120de
movq 0x58(%rsp), %rax
movl %ebp, -0x20(%rax)
movl %r12d, -0x1c(%rax)
movl %r14d, %ebp
movq 0x48(%rsp), %r12
leaq 0x20(%rsp), %r14
movq $0x0, 0x8(%rsp)
movq (%rsp), %rax
movb $0x0, (%rax)
incl %ebp
movslq %ebp, %rax
cmpq %rax, 0x8(%r12)
ja 0x5081
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
je 0x56d3
movq 0x40(%rsp), %r14
leaq 0x208(%rsp), %r15
movq %r15, -0x10(%r15)
addq %rsi, %rdx
leaq 0x1f8(%rsp), %rdi
callq 0x44cc
leaq 0x20(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
movq %r14, %rdx
callq 0x4c79
leaq 0x50(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x11ee8
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x56a2
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x1f8(%rsp), %rdi
cmpq %r15, %rdi
je 0x56bf
movq 0x208(%rsp), %rsi
incq %rsi
callq 0x2200
movq $0x0, 0x8(%rsp)
movq (%rsp), %rax
movb $0x0, (%rax)
movq (%rsp), %rsi
leaq 0x10(%rsp), %rax
cmpq %rax, %rsi
je 0x56f0
movq 0x10(%rsp), %rax
incq %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2200
leaq 0x80(%rsp), %rdi
callq 0xeaa0
movq 0x78(%rsp), %rbx
leaq 0x8(%rbx), %r15
pxor %xmm0, %xmm0
movdqu %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
movq 0x50(%rsp), %rsi
movl (%rsi), %eax
movl %eax, (%rbx)
movq 0x58(%rsp), %rax
movl -0x1c(%rax), %eax
movl %eax, 0x4(%rbx)
addq $0x8, %rsi
movq %r15, %rdi
callq 0xdf5e
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
cmpq $0x21, %rcx
jb 0x59de
movl $0x1, %r12d
xorl %r13d, %r13d
leaq 0x80(%rsp), %r14
movl 0x4(%rax,%r13), %ecx
movl 0x20(%rax,%r13), %eax
movl %ecx, 0x80(%rsp)
movl %eax, 0x84(%rsp)
movb $0x7e, 0x88(%rsp)
movq 0x10(%rbx), %rsi
cmpq 0x18(%rbx), %rsi
je 0x57ac
movl 0x88(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x80(%rsp), %rax
movq %rax, (%rsi)
movq 0x10(%rbx), %rsi
addq $0xc, %rsi
movq %rsi, 0x10(%rbx)
jmp 0x57bb
movq %r15, %rdi
movq %r14, %rdx
callq 0x120de
movq 0x10(%rbx), %rsi
movq 0x50(%rsp), %rax
movq 0x28(%rax,%r13), %rdx
movq 0x30(%rax,%r13), %rcx
movq %r15, %rdi
callq 0x121f6
incq %r12
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r13
cmpq %r12, %rcx
ja 0x575f
jmp 0x59de
movq 0x88(%rsp), %rdx
testq %rdx, %rdx
movq 0x78(%rsp), %rbx
je 0x58a0
leaq 0x1e8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x80(%rsp), %rsi
addq %rsi, %rdx
leaq 0x1d8(%rsp), %rdi
callq 0x44cc
movq %rsp, %rdi
leaq 0x1d8(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x4c79
leaq 0x50(%rsp), %rdi
movq %rsp, %rsi
callq 0x11ee8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x586c
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x1d8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5889
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x2200
movq $0x0, 0x88(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax)
movq 0x40(%rsp), %rdx
movl (%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%rdx)
movl %eax, 0x4(%rbx)
movq 0x50(%rsp), %r14
movq 0x58(%rsp), %rbp
cmpq %rbp, %r14
je 0x59b4
leaq 0x8(%rsp), %r12
leaq 0x20(%rsp), %r13
movq (%r14), %rax
movq %rax, (%rsp)
addq $0x8, %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0xeaf8
movq 0x78(%rsp), %rdx
movl (%rdx), %eax
movl (%rsp), %ecx
movl %eax, 0x20(%rsp)
movl %ecx, 0x24(%rsp)
movb $0x7e, 0x28(%rsp)
movq 0x10(%rdx), %rsi
cmpq 0x18(%rdx), %rsi
je 0x5920
movl 0x28(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x20(%rsp), %rax
movq %rax, (%rsi)
movq 0x10(%rdx), %rsi
addq $0xc, %rsi
movq %rsi, 0x10(%rdx)
jmp 0x5936
movq 0x48(%rsp), %rdi
movq %r13, %rdx
callq 0x120de
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq 0x48(%rsp), %rdi
callq 0x121f6
movl 0x4(%rsp), %eax
movq 0x78(%rsp), %rdx
movl 0x4(%rdx), %ecx
movl %eax, 0x20(%rsp)
movl %ecx, 0x24(%rsp)
movb $0x7e, 0x28(%rsp)
movq 0x10(%rdx), %rsi
cmpq 0x18(%rdx), %rsi
je 0x5983
movl 0x28(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x20(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x10(%rdx)
jmp 0x5990
movq 0x48(%rsp), %rdi
movq %r13, %rdx
callq 0x120de
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x59a7
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
addq $0x18, %r14
cmpq %rbp, %r14
jne 0x58cc
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x59d9
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x78(%rsp), %rbx
leaq 0x50(%rsp), %rdi
callq 0xe068
movq %rbx, %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r12, %r12
movq 0x48(%rsp), %r12
je 0x56fd
xorl %eax, %eax
movq %rsp, %r15
xorl %r13d, %r13d
movq %r15, %rbp
leaq 0x90(%rsp), %rcx
movq %rcx, 0x80(%rsp)
movq $0x0, 0x88(%rsp)
movb $0x0, 0x90(%rsp)
movq (%r12), %rcx
movsbl (%rcx,%rax), %esi
leaq 0x80(%rsp), %rdi
callq 0x21c0
movslq %r13d, %r14
incq %r14
cmpq %r14, 0x8(%r12)
jbe 0x5bf9
movq (%r12), %rax
movzbl (%rax,%r14), %eax
cmpl $0x2a, %eax
je 0x5b0a
cmpl $0x2b, %eax
jne 0x5bf9
leaq 0x148(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
addq %rsi, %rdx
leaq 0x138(%rsp), %r12
movq %r12, %rdi
callq 0x44cc
movq %rbp, %r13
movq %rbp, %rdi
movq %r12, %rsi
movq 0x40(%rsp), %rdx
callq 0x4c79
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x11ee8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5ae5
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x5b0a
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x40(%rsp), %r13
movl (%r13), %eax
movq %rax, 0x70(%rsp)
incl %eax
movl %eax, (%r13)
leaq 0x128(%rsp), %rax
movq %rax, 0x118(%rsp)
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
addq %rsi, %rdx
leaq 0x118(%rsp), %r12
movq %r12, %rdi
callq 0x44cc
movq %rbp, %r15
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x4c79
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x11ee8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5b86
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x5bab
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x40(%rsp), %rcx
movl (%rcx), %r12d
leal 0x1(%r12), %eax
movl %eax, (%rcx)
movq 0x58(%rsp), %rdi
movl -0x20(%rdi), %eax
movq 0x70(%rsp), %rcx
movl %ecx, (%rsp)
movl %eax, 0x4(%rsp)
movb $0x7e, 0x8(%rsp)
movq -0x10(%rdi), %rsi
cmpq -0x8(%rdi), %rsi
je 0x5c91
movl 0x8(%rsp), %eax
movl %eax, 0x8(%rsi)
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0xc, -0x10(%rdi)
jmp 0x5c9d
leaq 0x108(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
addq %rsi, %rdx
leaq 0xf8(%rsp), %r14
movq %r14, %rdi
callq 0x44cc
movq %rbp, %r15
movq %rbp, %rdi
movq %r14, %rsi
movq 0x40(%rsp), %rdx
callq 0x4c79
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x11ee8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5c63
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x5d7f
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x5d7f
addq $-0x18, %rdi
movq %rbp, %rdx
callq 0x120de
movq 0x58(%rsp), %rdi
movq -0x20(%rdi), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, (%rsp)
movb $0x7e, 0x8(%rsp)
movq -0x10(%rdi), %rsi
cmpq -0x8(%rdi), %rsi
je 0x5cd5
movl 0x8(%rsp), %eax
movl %eax, 0x8(%rsi)
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0xc, -0x10(%rdi)
jmp 0x5ce1
addq $-0x18, %rdi
movq %rbp, %rdx
callq 0x120de
movq 0x58(%rsp), %rdi
movl -0x1c(%rdi), %eax
movl %eax, (%rsp)
movl %r12d, 0x4(%rsp)
movb $0x7e, 0x8(%rsp)
movq -0x10(%rdi), %rsi
cmpq -0x8(%rdi), %rsi
je 0x5d15
movl 0x8(%rsp), %eax
movl %eax, 0x8(%rsi)
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0xc, -0x10(%rdi)
jmp 0x5d21
addq $-0x18, %rdi
movq %rbp, %rdx
callq 0x120de
movq 0x58(%rsp), %rdi
movq 0x70(%rsp), %rax
movl %eax, (%rsp)
movl %r12d, 0x4(%rsp)
movb $0x7e, 0x8(%rsp)
movq -0x10(%rdi), %rsi
cmpq -0x8(%rdi), %rsi
je 0x5d57
movl 0x8(%rsp), %eax
movl %eax, 0x8(%rsi)
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0xc, -0x10(%rdi)
jmp 0x5d63
addq $-0x18, %rdi
movq %rbp, %rdx
callq 0x120de
movq 0x58(%rsp), %rax
movq 0x70(%rsp), %rcx
movl %ecx, -0x20(%rax)
movl %r12d, -0x1c(%rax)
movl %r14d, %r13d
movq 0x48(%rsp), %r12
movq %rbp, %r15
movq $0x0, 0x88(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax)
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x5dbb
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2200
incl %r13d
movslq %r13d, %rax
cmpq %rax, 0x8(%r12)
ja 0x5a13
jmp 0x56fd
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5df0
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
jmp 0x5df0
movq %rax, %r14
movq 0x1d8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6137
movq 0x1e8(%rsp), %rsi
jmp 0x5fa8
jmp 0x6134
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x5e32
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
jmp 0x5e32
movq %rax, %r14
movq 0x1f8(%rsp), %rdi
cmpq %r15, %rdi
je 0x617a
movq 0x208(%rsp), %rsi
jmp 0x6086
jmp 0x6177
jmp 0x6177
jmp 0x6177
jmp 0x6177
jmp 0x6177
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x5e88
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
jmp 0x5e88
movq %rax, %r14
movq 0x198(%rsp), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x617a
movq 0x1a8(%rsp), %rsi
jmp 0x6086
jmp 0x6177
jmp 0x610a
jmp 0x610a
jmp 0x610a
jmp 0x610a
jmp 0x5f60
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5eeb
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
jmp 0x5eeb
movq %rax, %r14
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x6155
movq 0x148(%rsp), %rsi
jmp 0x6105
jmp 0x610a
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x5f35
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
jmp 0x5f35
movq %rax, %r14
movq 0x178(%rsp), %rdi
leaq 0x188(%rsp), %rax
cmpq %rax, %rdi
je 0x617a
movq 0x188(%rsp), %rsi
jmp 0x6086
jmp 0x6177
movq %rax, %r14
jmp 0x61c2
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5f87
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
jmp 0x5f87
movq %rax, %r14
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x6137
movq 0xe8(%rsp), %rsi
incq %rsi
jmp 0x612d
jmp 0x6134
movq %rax, %r14
jmp 0x5fd9
jmp 0x610a
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5fd9
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x6155
movq 0x128(%rsp), %rsi
jmp 0x6105
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x601e
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
jmp 0x601e
movq %rax, %r14
movq 0x1b8(%rsp), %rdi
leaq 0x1c8(%rsp), %rax
cmpq %rax, %rdi
je 0x617a
movq 0x1c8(%rsp), %rsi
jmp 0x6086
jmp 0x6177
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x6065
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
jmp 0x6065
movq %rax, %r14
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0x617a
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x617a
jmp 0x6177
jmp 0x61a6
movq %rax, %r14
movq (%r12), %rdi
testq %rdi, %rdi
je 0x61cc
movq 0x78(%rsp), %rax
movq 0x18(%rax), %rsi
subq %rdi, %rsi
callq 0x2200
jmp 0x61cc
jmp 0x6118
jmp 0x6118
jmp 0x610a
movq %rax, %r14
jmp 0x60e8
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x60e8
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x6155
movq 0x108(%rsp), %rsi
incq %rsi
jmp 0x6150
movq %rax, %r14
jmp 0x6155
jmp 0x6177
movq %rax, %r14
jmp 0x6195
jmp 0x6134
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6137
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
jmp 0x6137
movq %rax, %r14
movq 0x48(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x6155
movq 0x78(%rsp), %rax
movq 0x18(%rax), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x61c2
movq 0x90(%rsp), %rsi
incq %rsi
jmp 0x61bd
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6195
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
leaq 0x80(%rsp), %rdi
callq 0xeaa0
jmp 0x61c2
jmp 0x61a6
movq %rax, %r14
movq (%r15), %rdi
testq %rdi, %rdi
je 0x61c2
movq 0x78(%rsp), %rax
movq 0x18(%rax), %rsi
subq %rdi, %rsi
callq 0x2200
leaq 0x50(%rsp), %rdi
callq 0xe068
movq %r14, %rdi
callq 0x2350