// File: /workspace/github_cpp_makefile_star2_O1/eniac[P]Mantis/src/compile/compile_c.cpp
// Function: generateDialogueEnd(std::vector<AstNode*, std::allocator<AstNode*>>, std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int)
void generateDialogueEnd(std::vector<AstNode*> nodeArray, ostringstream& oss_reaction_update, int ing_iso_opt, int egr_iso_opt) {

    // __vv points to shallow copy under isolation, now update version bit commit together with other mbls)
    oss_reaction_update << "\n  __mantis__mod_vars_ing;\n";
    oss_reaction_update << "\n  __mantis__mod_vars_egr;\n";

    // Flip __vv to point to shallow copy
    if(((unsigned int)ing_iso_opt) & 0b10) {
        oss_reaction_update << "\n  __mantis__flip_vv_ing;\n\n";
    }
    if(((unsigned int)egr_iso_opt) & 0b10) {
        oss_reaction_update << "\n  __mantis__flip_vv_egr;\n\n";
    }

    // Under isolation, call mirror macros to mirror shallow copies for mbl table operations
    // Get the reaction string and find all user macros
    P4RReactionNode * react_node = findReaction(nodeArray);
    string p4r_reaction_user_str = "";
    if (react_node != 0) {
        p4r_reaction_user_str = react_node->body_->toString();
    }

    // No need to check isolation opt and ing/egr, just mirror user-specified operations in prepare
    for (auto node : nodeArray) {
        // For each mbl table
        if(typeContains(node, "P4RMalleableTableNode")) {
            TableNode* table = dynamic_cast<P4RMalleableTableNode*>(node)->table_;
            string table_name = *(table->name_->word_);

            TableActionStmtsNode* actions = table->actions_;

            // Mbl tables are always with With matches (at least match on __vv)
            // For each action
            for (TableActionStmtNode* tas : *actions->list_) {
                string action_name = *tas->name_->word_;

                string str_prepare_macro_func;
                string str_mirror_macro_func;

                std::smatch result;

                // Construct match regrex for add
                str_prepare_macro_func = table_name + "_add_" + action_name;
                std::regex e_add (str_prepare_macro_func+"\\s*\\("+"([^\\)]*)"+"\\)");   // matches words beginning by "sub"

                // Stop after first match
                while (std::regex_search (p4r_reaction_user_str, result, e_add)) {
                    
                    str_prepare_macro_func = result[0];
                    str_mirror_macro_func = "__mantis__mirror_" + str_prepare_macro_func;
                    // Call corresponding mirror macros
                    oss_reaction_update << "\n  "
                                        << str_mirror_macro_func
                                        << ";\n\n";

                    // Search remaining string of p4r_reaction_user_str
                    p4r_reaction_user_str = result.suffix().str();
                }
                // Mod
                str_prepare_macro_func = table_name + "_mod_" + action_name;
                std::regex e_mod (str_prepare_macro_func+"\\s*\\("+"([^\\)]*)"+"\\)");   // matches words beginning by "sub"
                while (std::regex_search (p4r_reaction_user_str, result, e_mod)) {
                    str_prepare_macro_func = result[0];
                    str_mirror_macro_func = "__mantis__mirror_" + str_prepare_macro_func;
                    oss_reaction_update << "\n  "
                                        << str_mirror_macro_func
                                        << ";\n\n";
                    p4r_reaction_user_str = result.suffix().str();
                }
                // Del
                str_prepare_macro_func = table_name + "_del_" + action_name;
                std::regex e_del (str_prepare_macro_func+"\\s*\\("+"([^\\)]*)"+"\\)");   // matches words beginning by "sub"
                while (std::regex_search (p4r_reaction_user_str, result, e_del)) {
                    str_prepare_macro_func = result[0];
                    str_mirror_macro_func = "__mantis__mirror_" + str_prepare_macro_func;
                    oss_reaction_update << "\n  "
                                        << str_mirror_macro_func
                                        << ";\n\n";
                    p4r_reaction_user_str = result.suffix().str();
                }
            }   
        }
    }

    // Point __vv back to working copy for next dialogue
    if(((unsigned int)ing_iso_opt) & 0b10) {
        oss_reaction_update << "\n  __mantis__flip_vv_ing;\n\n";
    }
    if(((unsigned int)egr_iso_opt) & 0b10) {
        oss_reaction_update << "\n  __mantis__flip_vv_egr;\n\n";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movl %ecx, %r12d
movl %edx, %r13d
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x27e6b(%rip), %rsi     # 0x77815
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x27ecf(%rip), %rsi     # 0x7788d
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2e440
testb $0x2, %r13b
je 0x4f9e5
leaq 0x27ba0(%rip), %rsi     # 0x77578
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2e440
testb $0x2, %r12b
je 0x4f9ff
leaq 0x27ba2(%rip), %rsi     # 0x77594
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2e440
leaq -0x1f0(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x32d96
movq %r15, %rdi
callq 0x6fe8f
movq %rax, %r15
movq -0x1f0(%rbp), %rdi
testq %rdi, %rdi
je 0x4fa2d
callq 0x2e360
movl %r13d, -0x138(%rbp)
movl %r12d, -0x134(%rbp)
leaq -0x120(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x27e8e(%rip), %rdx     # 0x778db
leaq -0x130(%rbp), %rdi
movq %rdx, %rsi
callq 0x33112
testq %r15, %r15
je 0x4fa9b
movq 0x50(%r15), %rsi
movq (%rsi), %rax
leaq -0x110(%rbp), %rdi
callq *(%rax)
leaq -0x130(%rbp), %rdi
leaq -0x110(%rbp), %r15
movq %r15, %rsi
callq 0x2e4c0
movq (%r15), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x4fa9b
callq 0x2e360
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq %rcx, -0x1c0(%rbp)
cmpq %rcx, %rax
je 0x50788
leaq -0x148(%rbp), %r15
leaq -0x88(%rbp), %r14
movq %rax, -0x1c8(%rbp)
movq (%rax), %r12
movq %r12, %rdi
leaq 0x28111(%rip), %rsi     # 0x77be5
callq 0x6f390
testb %al, %al
je 0x50770
movq %r12, %rdi
leaq 0x3cb45(%rip), %rsi     # 0x8c630
leaq 0x3d8de(%rip), %rdx     # 0x8d3d0
xorl %ecx, %ecx
callq 0x2e430
movq 0x40(%rax), %r12
movq 0x40(%r12), %rax
movq 0x40(%rax), %rax
leaq -0x100(%rbp), %rcx
movq %rcx, -0x110(%rbp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x110(%rbp), %rdi
callq 0x32f92
movq 0x50(%r12), %rax
movq 0x40(%rax), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rax, -0x1d0(%rbp)
cmpq %rax, %rcx
je 0x50758
movq %rcx, -0x1d8(%rbp)
movq (%rcx), %rax
movq 0x40(%rax), %rax
movq 0x40(%rax), %rax
leaq -0x168(%rbp), %rcx
movq %rcx, -0x178(%rbp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x178(%rbp), %rdi
callq 0x32f92
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
xorl %ecx, %ecx
movq %rcx, -0xa0(%rbp)
movb %cl, -0x98(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq %rcx, -0xe8(%rbp)
movb %cl, -0xe0(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xc0(%rbp)
movaps %xmm0, -0xd0(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x32f92
movq %r14, %rdi
leaq 0x27e67(%rip), %rsi     # 0x77a5e
callq 0x2e7e0
movq -0x178(%rbp), %rsi
movq -0x170(%rbp), %rdx
movq %r14, %rdi
callq 0x2e130
leaq -0x188(%rbp), %r12
movq %r12, -0x198(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4fc42
movq %rdx, -0x198(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x188(%rbp)
jmp 0x4fc4a
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x190(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xa8(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x2e4c0
movq -0x198(%rbp), %rdi
cmpq %r12, %rdi
je 0x4fc88
callq 0x2e360
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x4fc9d
callq 0x2e360
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %r12
movq %r12, %rdi
callq 0x32f92
movq %r12, %rdi
leaq 0x28391(%rip), %rsi     # 0x7805d
callq 0x2e7e0
movq %r12, %rdi
leaq 0x28388(%rip), %rsi     # 0x78063
callq 0x2e7e0
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4fd04
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x4fd0a
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x48(%rbp), %rdi
leaq 0x28340(%rip), %rsi     # 0x7806c
callq 0x2e7e0
leaq -0x78(%rbp), %rsi
movq %rsi, -0x88(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4fd5b
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x4fd61
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x80(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x198(%rbp), %rdi
movq %r14, %rsi
movl $0x10, %edx
callq 0x50c64
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x4fda1
callq 0x2e360
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4fdb3
callq 0x2e360
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
jne 0x4ff78
movq -0x130(%rbp), %rdi
movq -0x128(%rbp), %rsi
addq %rdi, %rsi
leaq -0xd0(%rbp), %rdx
leaq -0x198(%rbp), %rcx
xorl %r8d, %r8d
callq 0x61303
testb %al, %al
je 0x4ff82
movq -0xd0(%rbp), %rcx
movq -0xc8(%rbp), %rdx
movq %rdx, %rax
subq %rcx, %rax
leaq -0x48(%rdx), %rsi
cmpq $0x48, %rax
movq %rcx, %rax
cmoveq %rsi, %rax
cmpq %rcx, %rdx
cmoveq %rsi, %rax
cmpb $0x1, 0x10(%rax)
jne 0x4fe3f
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x78(%rbp), %r12
movq %r12, -0x88(%rbp)
movq %r14, %rdi
callq 0x636da
jmp 0x4fe56
leaq -0x78(%rbp), %r12
movq %r12, -0x88(%rbp)
movq $0x0, -0x80(%rbp)
movb $0x0, -0x78(%rbp)
leaq -0xa8(%rbp), %rdi
movq %r14, %rsi
callq 0x2e4c0
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x4fe76
callq 0x2e360
movq %r14, %rdi
leaq 0x27e07(%rip), %rsi     # 0x77c87
leaq -0xa8(%rbp), %rdx
callq 0x50cf7
leaq -0xf0(%rbp), %rdi
movq %r14, %rsi
callq 0x2e4c0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x4feb0
callq 0x2e360
movl $0x3, %edx
movq %rbx, %rdi
leaq 0x281b0(%rip), %rsi     # 0x7806f
callq 0x2e440
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
movq %rbx, %rdi
callq 0x2e440
movl $0x3, %edx
movq %rax, %rdi
leaq 0x272eb(%rip), %rsi     # 0x771d4
callq 0x2e440
movq -0xc8(%rbp), %rax
movq %rax, %rdx
subq -0xd0(%rbp), %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
movq $-0x48, %rcx
cmpq $0x4, %rdx
jb 0x4ff25
movq $-0x18, %rcx
cmpb $0x1, 0x10(%rax,%rcx)
jne 0x4ff46
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq %r12, -0x88(%rbp)
movq %r14, %rdi
callq 0x636da
jmp 0x4ff59
movq %r12, -0x88(%rbp)
movq $0x0, -0x80(%rbp)
movb $0x0, -0x78(%rbp)
leaq -0x130(%rbp), %rdi
movq %r14, %rsi
callq 0x2e4c0
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x4fdc4
callq 0x2e360
jmp 0x4fdc4
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0x32f92
movq %r12, %rdi
leaq 0x27b95(%rip), %rsi     # 0x77b46
callq 0x2e7e0
movq -0x178(%rbp), %rsi
movq -0x170(%rbp), %rdx
movq %r12, %rdi
callq 0x2e130
leaq -0x78(%rbp), %r12
movq %r12, -0x88(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4fff6
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x4fffe
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x80(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xa8(%rbp), %rdi
movq %r14, %rsi
callq 0x2e4c0
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x50035
callq 0x2e360
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x50047
callq 0x2e360
movq %r15, -0x158(%rbp)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x158(%rbp), %r12
movq %r12, %rdi
callq 0x32f92
movq %r12, %rdi
leaq 0x27fe5(%rip), %rsi     # 0x7805d
callq 0x2e7e0
movq %r12, %rdi
leaq 0x27fdc(%rip), %rsi     # 0x78063
callq 0x2e7e0
leaq -0x58(%rbp), %rsi
movq %rsi, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x500b0
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x500b6
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x68(%rbp), %rdi
leaq 0x27f94(%rip), %rsi     # 0x7806c
callq 0x2e7e0
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x50101
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x50107
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
leaq -0x48(%rbp), %rsi
movl $0x10, %edx
callq 0x50c64
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x50141
callq 0x2e360
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x50153
callq 0x2e360
movq -0x158(%rbp), %rdi
cmpq %r15, %rdi
jne 0x50312
movq -0x130(%rbp), %rdi
movq -0x128(%rbp), %rsi
addq %rdi, %rsi
leaq -0xd0(%rbp), %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x61303
testb %al, %al
je 0x5031c
movq -0xd0(%rbp), %rcx
movq -0xc8(%rbp), %rdx
movq %rdx, %rax
subq %rcx, %rax
leaq -0x48(%rdx), %rsi
cmpq $0x48, %rax
movq %rcx, %rax
cmoveq %rsi, %rax
cmpq %rcx, %rdx
cmoveq %rsi, %rax
cmpb $0x1, 0x10(%rax)
jne 0x501db
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x38(%rbp), %r12
movq %r12, -0x48(%rbp)
leaq -0x48(%rbp), %r13
movq %r13, %rdi
callq 0x636da
jmp 0x501f3
leaq -0x38(%rbp), %r12
movq %r12, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
leaq -0x48(%rbp), %r13
leaq -0xa8(%rbp), %rdi
movq %r13, %rsi
callq 0x2e4c0
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x50210
callq 0x2e360
leaq -0x48(%rbp), %r12
movq %r12, %rdi
leaq 0x27a69(%rip), %rsi     # 0x77c87
leaq -0xa8(%rbp), %rdx
callq 0x50cf7
leaq -0xf0(%rbp), %rdi
movq %r12, %rsi
callq 0x2e4c0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x5024b
callq 0x2e360
movl $0x3, %edx
movq %rbx, %rdi
leaq 0x27e15(%rip), %rsi     # 0x7806f
callq 0x2e440
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
movq %rbx, %rdi
callq 0x2e440
movl $0x3, %edx
movq %rax, %rdi
leaq 0x26f50(%rip), %rsi     # 0x771d4
callq 0x2e440
movq -0xc8(%rbp), %rax
movq %rax, %rdx
subq -0xd0(%rbp), %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
movq $-0x48, %rcx
cmpq $0x4, %rdx
jb 0x502c0
movq $-0x18, %rcx
cmpb $0x1, 0x10(%rax,%rcx)
jne 0x502e2
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
leaq -0x38(%rbp), %r12
movq %r12, -0x48(%rbp)
movq %r13, %rdi
callq 0x636da
jmp 0x502f6
leaq -0x38(%rbp), %r12
movq %r12, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
leaq -0x130(%rbp), %rdi
movq %r13, %rsi
callq 0x2e4c0
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x50163
callq 0x2e360
jmp 0x50163
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %r12
movq %r12, %rdi
callq 0x32f92
movq %r12, %rdi
leaq 0x27782(%rip), %rsi     # 0x77acd
callq 0x2e7e0
movq -0x178(%rbp), %rsi
movq -0x170(%rbp), %rdx
movq %r12, %rdi
callq 0x2e130
leaq -0x38(%rbp), %r12
movq %r12, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5038a
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x50392
movups (%rcx), %xmm0
movups %xmm0, (%r12)
leaq -0x48(%rbp), %rsi
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xa8(%rbp), %rdi
callq 0x2e4c0
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x503c7
callq 0x2e360
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x503d9
callq 0x2e360
leaq -0x1a8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1b8(%rbp), %r12
movq %r12, %rdi
callq 0x32f92
movq %r12, %rdi
leaq 0x27c4c(%rip), %rsi     # 0x7805d
callq 0x2e7e0
movq %r12, %rdi
leaq 0x27c43(%rip), %rsi     # 0x78063
callq 0x2e7e0
movq %r15, -0x158(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5044e
movq %rdx, -0x158(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x148(%rbp)
jmp 0x50455
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x150(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x158(%rbp), %rdi
leaq 0x27bef(%rip), %rsi     # 0x7806c
callq 0x2e7e0
leaq -0x58(%rbp), %rsi
movq %rsi, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x504a6
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x504ac
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movl $0x10, %edx
callq 0x50c64
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x504e7
callq 0x2e360
movq -0x158(%rbp), %rdi
cmpq %r15, %rdi
je 0x504f8
callq 0x2e360
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
cmpq %rax, %rdi
je 0x5069e
callq 0x2e360
jmp 0x5069e
movq %r14, %r13
movq %r15, %r12
movq -0xd0(%rbp), %rcx
movq -0xc8(%rbp), %rdx
movq %rdx, %rax
subq %rcx, %rax
leaq -0x48(%rdx), %rsi
cmpq $0x48, %rax
movq %rcx, %rax
cmoveq %rsi, %rax
cmpq %rcx, %rdx
cmoveq %rsi, %rax
cmpb $0x1, 0x10(%rax)
jne 0x5056c
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x58(%rbp), %r15
movq %r15, -0x68(%rbp)
leaq -0x68(%rbp), %r14
movq %r14, %rdi
callq 0x636da
jmp 0x50584
leaq -0x58(%rbp), %r15
movq %r15, -0x68(%rbp)
movq $0x0, -0x60(%rbp)
movb $0x0, -0x58(%rbp)
leaq -0x68(%rbp), %r14
leaq -0xa8(%rbp), %rdi
movq %r14, %rsi
callq 0x2e4c0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x505a1
callq 0x2e360
movq %r14, %rdi
leaq 0x276dc(%rip), %rsi     # 0x77c87
leaq -0xa8(%rbp), %rdx
callq 0x50cf7
leaq -0xf0(%rbp), %rdi
movq %r14, %rsi
callq 0x2e4c0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x505d8
callq 0x2e360
movl $0x3, %edx
movq %rbx, %rdi
leaq 0x27a88(%rip), %rsi     # 0x7806f
callq 0x2e440
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
movq %rbx, %rdi
callq 0x2e440
movl $0x3, %edx
movq %rax, %rdi
leaq 0x26bc3(%rip), %rsi     # 0x771d4
callq 0x2e440
movq -0xc8(%rbp), %rax
movq %rax, %rdx
subq -0xd0(%rbp), %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
movq $-0x48, %rcx
cmpq $0x4, %rdx
jb 0x5064d
movq $-0x18, %rcx
cmpb $0x1, 0x10(%rax,%rcx)
jne 0x5066b
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq %r15, -0x68(%rbp)
movq %r14, %rdi
callq 0x636da
jmp 0x5067b
movq %r15, -0x68(%rbp)
movq $0x0, -0x60(%rbp)
movb $0x0, -0x58(%rbp)
leaq -0x130(%rbp), %rdi
movq %r14, %rsi
callq 0x2e4c0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x50698
callq 0x2e360
movq %r12, %r15
movq %r13, %r14
movq -0x130(%rbp), %rdi
movq -0x128(%rbp), %rsi
addq %rdi, %rsi
leaq -0xd0(%rbp), %rdx
leaq -0x48(%rbp), %rcx
xorl %r8d, %r8d
callq 0x61303
testb %al, %al
jne 0x50519
leaq -0x48(%rbp), %rdi
callq 0x50cce
movq %r14, %rdi
callq 0x50cce
leaq -0x198(%rbp), %rdi
callq 0x50cce
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x506f8
callq 0x2e360
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x50710
callq 0x2e360
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x50728
callq 0x2e360
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x50740
callq 0x2e360
movq -0x1d8(%rbp), %rcx
addq $0x8, %rcx
cmpq -0x1d0(%rbp), %rcx
jne 0x4fb4a
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x50770
callq 0x2e360
movq -0x1c8(%rbp), %rax
addq $0x8, %rax
cmpq -0x1c0(%rbp), %rax
jne 0x4fac0
testb $0x2, -0x138(%rbp)
je 0x507a5
leaq 0x26de0(%rip), %rsi     # 0x77578
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2e440
testb $0x2, -0x134(%rbp)
je 0x507c2
leaq 0x26ddf(%rip), %rsi     # 0x77594
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2e440
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x507da
callq 0x2e360
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x50812
jmp 0x50812
movq %rax, %rbx
jmp 0x50a2b
movq %rax, %rbx
movq -0x1f0(%rbp), %rdi
testq %rdi, %rdi
jne 0x50a26
jmp 0x50a2b
jmp 0x50812
movq %rax, %rbx
jmp 0x50a13
jmp 0x50982
jmp 0x50838
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x50840
callq 0x2e360
jmp 0x50840
movq %rax, %rbx
jmp 0x50851
movq %rax, %rbx
movq -0x158(%rbp), %rdi
cmpq %r15, %rdi
je 0x50851
callq 0x2e360
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
jmp 0x50873
jmp 0x50868
jmp 0x50982
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x50985
callq 0x2e360
jmp 0x50985
jmp 0x50993
jmp 0x5088d
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
jne 0x508ea
jmp 0x50996
jmp 0x50993
movq %rax, %rbx
jmp 0x508c8
jmp 0x508ae
movq %rax, %rbx
jmp 0x508da
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x508c8
callq 0x2e360
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x508da
callq 0x2e360
movq -0x158(%rbp), %rdi
cmpq %r15, %rdi
je 0x50996
callq 0x2e360
jmp 0x50996
movq %rax, %rbx
jmp 0x509fb
jmp 0x50912
jmp 0x50900
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
jmp 0x50956
jmp 0x5091a
movq %rax, %rbx
jmp 0x509a2
movq %rax, %rbx
jmp 0x5094e
movq %rax, %rbx
jmp 0x5093c
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x5093c
callq 0x2e360
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x5094e
callq 0x2e360
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x509a2
callq 0x2e360
jmp 0x509a2
jmp 0x50982
jmp 0x50982
jmp 0x50974
jmp 0x50974
jmp 0x50993
jmp 0x50993
jmp 0x50974
jmp 0x50982
jmp 0x50993
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x50cce
jmp 0x50985
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x50cce
jmp 0x50996
movq %rax, %rbx
leaq -0x198(%rbp), %rdi
callq 0x50cce
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x509b3
callq 0x2e360
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x509cb
callq 0x2e360
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x509e3
callq 0x2e360
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x509fb
callq 0x2e360
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x50a13
callq 0x2e360
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x50a2b
callq 0x2e360
movq %rbx, %rdi
callq 0x2e730
nop