// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/compile_p4.cpp
// Function: augmentRegisterArgProgForIng(std::vector<AstNode*, std::allocator<AstNode*>>*, std::vector<AstNode*, std::allocator<AstNode*>>*, std::vector<ReactionArgNode*, std::allocator<ReactionArgNode*>> const&, int, bool)
void augmentRegisterArgProgForIng(vector<AstNode*>* newNodes,
                         vector<AstNode*>* nodeArray,
                         const vector<ReactionArgNode*>& reaction_args,
                         int iso_opt, bool forIng) {
    string p4rRegMetadataType;
    string p4rRegMetadataName;
    if(forIng) {
        p4rRegMetadataType = string(kP4rIngRegMetadataType);
        p4rRegMetadataName = string(kP4rIngRegMetadataName);
    } else {
        p4rRegMetadataType = string(kP4rEgrRegMetadataType);
        p4rRegMetadataName = string(kP4rEgrRegMetadataName);
    }

    // Generate meta data for storing latest value of register index, value
    if (((unsigned int)iso_opt) & 0b1) {
        ostringstream oss;
        oss << "header_type "<< p4rRegMetadataType << " {\n"
            << " fields {\n";        
        vector<P4RegisterNode*> regNodes = findP4RegisterNode(*nodeArray);

        for (auto ra : reaction_args) {    
            if (ra->argType_==ReactionArgNode::REGISTER) {
                if(forIng) {
                    if(!findRegargInIng(ra, *nodeArray)) {
                        continue;
                    }
                } else {
                    if(findRegargInIng(ra, *nodeArray)) {
                        continue;
                    }
                }
                for(auto reg : regNodes) {
                    if(reg->name_->toString().compare(ra->toString())==0) {
                        oss << "  " << ra->toString() << kP4rRegMetadataOutputSuffix << "  : "<< reg->width_ << ";\n";
                        int index_width = int(ceil(log2(reg->instanceCount_)));
                        if (index_width==0) {
                            index_width = 1;
                        }
                        oss << "  " << ra->toString() << kP4rRegMetadataIndexSuffix << "  : "<< index_width << ";\n";
                        break;
                    }
                }
            }
        }        

        oss << " }" << endl;
        oss << "}" << endl;
        oss << "metadata " << p4rRegMetadataType << " "
                           << p4rRegMetadataName << ";\n\n";

        newNodes->push_back(new UnanchoredNode(new string(oss.str()),
                                               new string("metadata"),
                                               new string(p4rRegMetadataName)));

        // Transform original blackbox program 
        // Currently assume the reg to isolation has no HI member and no output instruction
        // If original blackbox has output instruction already, just mirror that the output meta data

        vector<P4ExprNode*> blackboxes = findBlackbox(*nodeArray);
        for (auto blackbox : blackboxes) {
            std::string prog_name = blackbox->name2_->toString();
            std::stringstream ss(blackbox->body_->toString());
            std::string reg_name;
            std::string item;
            while (std::getline(ss, item, ';'))
            {
                std::stringstream ss_(item);
                std::string item_;
                while (std::getline(ss_, item_, ':')) {
                    boost::algorithm::trim(item_);
                    if(item_.compare("reg")==0) {
                        std::getline(ss_, item_, ':');
                        boost::algorithm::trim(item_);
                        reg_name = item_;
                    }
                }
            }
            ostringstream oss_dst_field, oss_index_field;
            oss_dst_field << p4rRegMetadataName
                             << "."
                             << reg_name
                             << kP4rRegMetadataOutputSuffix;       
            oss_index_field << p4rRegMetadataName
                            << "."
                            << reg_name
                            << kP4rRegMetadataIndexSuffix;                                      
            ostringstream oss_cmd;
            oss_cmd << "  " << "output_value : alu_lo;\n"
                    << "  " << "output_dst : "
                    << oss_dst_field.str()
                    << ";\n";
            string newbodystr = blackbox->body_->toString()+oss_cmd.str();
            blackbox->body_ = new BodyNode(NULL, NULL, new BodyWordNode(BodyWordNode::STRING, new StrNode(new string(newbodystr))));

            // Singleton action that executes the prog
            // Locate the action that executes the stateful prog and mirror the index to meta
            bool transformed = false;
            for (auto tmp_node : *nodeArray) {
                if(typeContains(tmp_node, "ActionNode") && !typeContains(tmp_node, "P4R")) {
                    ActionNode* tmp_action_node = dynamic_cast<ActionNode*>(tmp_node);
                    string tmp_action_name = tmp_action_node->name_->toString();
                    ActionStmtsNode* actionstmts = tmp_action_node->stmts_;
                    for (ActionStmtNode* as : *actionstmts->list_) {
                        if(as->toString().find("execute_stateful_alu")!=string::npos &&
                            as->toString().find(prog_name)!=string::npos) {
                            // Extract the index or index metadata/field
                            unsigned first = as->toString().find("(");
                            unsigned last = as->toString().find(")");
                            string index = as->toString().substr (first+1,last-first-1);
                            
                            // Mirror the index to p4r reg metadata
                            auto tmp_args = new ArgsNode();
                            tmp_args->push_back(new BodyWordNode(
                                BodyWordNode::STRING,
                                new StrNode(new string(oss_index_field.str()))));
                            tmp_args->push_back(new BodyWordNode(
                                BodyWordNode::STRING,
                                new StrNode(new string(index))));                            
                            actionstmts->push_back(new ActionStmtNode(
                                                        new NameNode(new string("modify_field")),
                                                        tmp_args,
                                                        ActionStmtNode::NAME_ARGLIST,
                                                        NULL,
                                                        NULL
                                                    ));     
                            transformed = true;
                            break;
                        }
                    }
                    if (transformed) {
                        break;
                    }
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x958, %rsp            # imm = 0x958
movl %ecx, %r15d
movq %rdx, %rbx
movq %rsi, -0x98(%rbp)
movq %rdi, -0x40(%rbp)
leaq -0x120(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xd8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x378(%rbp), %r13
movl %r8d, -0xa8(%rbp)
leaq -0x388(%rbp), %rdi
testl %r8d, %r8d
je 0x68059
movq %r13, (%rdi)
leaq 0x11cfd(%rip), %rsi     # 0x79d07
leaq 0x11d07(%rip), %rdx     # 0x79d18
callq 0x32e40
leaq -0x130(%rbp), %rdi
leaq -0x388(%rbp), %r12
movq %r12, %rsi
callq 0x2e4c0
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x6803a
callq 0x2e360
leaq -0x388(%rbp), %rdi
movq %r13, (%rdi)
leaq 0x11c56(%rip), %rsi     # 0x79ca1
leaq 0x11c5e(%rip), %rdx     # 0x79cb0
callq 0x32e40
jmp 0x680b0
movq %r13, (%rdi)
leaq 0x11cb6(%rip), %rsi     # 0x79d19
leaq 0x11cc0(%rip), %rdx     # 0x79d2a
callq 0x32e40
leaq -0x130(%rbp), %rdi
leaq -0x388(%rbp), %r12
movq %r12, %rsi
callq 0x2e4c0
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x68093
callq 0x2e360
leaq -0x388(%rbp), %rdi
movq %r13, (%rdi)
leaq 0x11c87(%rip), %rsi     # 0x79d2b
leaq 0x11c8f(%rip), %rdx     # 0x79d3a
callq 0x32e40
leaq -0xe8(%rbp), %rdi
movq %r12, %rsi
callq 0x2e4c0
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x680cd
callq 0x2e360
testb $0x1, %r15b
je 0x6908c
leaq -0x688(%rbp), %rdi
callq 0x2e550
leaq 0xdcfb(%rip), %rsi      # 0x75de5
leaq -0x688(%rbp), %rdi
movl $0xc, %edx
callq 0x2e440
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
leaq -0x688(%rbp), %rdi
callq 0x2e440
movq %rax, %r15
leaq 0x11ab0(%rip), %rsi     # 0x79bcf
movl $0x3, %edx
movq %rax, %rdi
callq 0x2e440
leaq 0xdcc0(%rip), %rsi      # 0x75df3
movl $0xa, %edx
movq %r15, %rdi
callq 0x2e440
leaq -0x1d0(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x6f4b6
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rcx, -0x50(%rbp)
cmpq %rcx, %rax
je 0x6842d
movq %rax, -0xa0(%rbp)
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpl $0x4, 0x3c(%rax)
jne 0x68418
cmpb $0x0, -0xa8(%rbp)
je 0x681c7
leaq -0x200(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x32ac0
movq -0x38(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x6fdc6
movl %eax, %ebx
movq -0x200(%rbp), %rdi
testq %rdi, %rdi
je 0x681be
callq 0x2e360
testb %bl, %bl
jne 0x68205
jmp 0x68418
leaq -0x1e8(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x32ac0
movq -0x38(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x6fdc6
movl %eax, %ebx
movq -0x1e8(%rbp), %rdi
testq %rdi, %rdi
je 0x681fd
callq 0x2e360
testb %bl, %bl
jne 0x68418
movq -0x1d0(%rbp), %r12
movq -0x1c8(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq %rax, %r12
je 0x68418
movq (%r12), %rax
movq %rax, -0x48(%rbp)
movq 0x40(%rax), %rsi
movq (%rsi), %rax
leaq -0x388(%rbp), %rdi
callq *(%rax)
movq -0x38(%rbp), %rsi
movq (%rsi), %rax
leaq -0x510(%rbp), %rdi
callq *(%rax)
movq -0x380(%rbp), %r15
movq -0x510(%rbp), %rbx
movq -0x508(%rbp), %r14
cmpq %r15, %r14
movq %r15, %rdx
cmovbq %r14, %rdx
testq %rdx, %rdx
je 0x68284
movq -0x388(%rbp), %rdi
movq %rbx, %rsi
callq 0x2e3c0
testl %eax, %eax
je 0x68284
xorl %r15d, %r15d
jmp 0x6828b
cmpq %r14, %r15
sete %r15b
leaq -0x500(%rbp), %rax
cmpq %rax, %rbx
je 0x6829f
movq %rbx, %rdi
callq 0x2e360
movq -0x388(%rbp), %rdi
cmpq %r13, %rdi
je 0x682b0
callq 0x2e360
testb %r15b, %r15b
jne 0x682c8
addq $0x8, %r12
cmpq -0x30(%rbp), %r12
jne 0x68220
jmp 0x68418
movl $0x2, %edx
leaq -0x688(%rbp), %r12
movq %r12, %rdi
leaq 0xfd92(%rip), %r15      # 0x78070
movq %r15, %rsi
callq 0x2e440
movq -0x38(%rbp), %rsi
movq (%rsi), %rax
leaq -0x388(%rbp), %rdi
callq *(%rax)
movq -0x388(%rbp), %rsi
movq -0x380(%rbp), %rdx
movq %r12, %rdi
callq 0x2e440
movq %rax, %rbx
movl $0x8, %edx
movq %rax, %rdi
leaq 0x11993(%rip), %rsi     # 0x79cb1
callq 0x2e440
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x11a09(%rip), %rsi     # 0x79d3b
callq 0x2e440
movq -0x48(%rbp), %rax
movl 0x50(%rax), %esi
movq %rbx, %rdi
callq 0x2e700
movl $0x2, %edx
movq %rax, %rdi
leaq 0xdad0(%rip), %rsi      # 0x75e25
callq 0x2e440
movq -0x388(%rbp), %rdi
cmpq %r13, %rdi
je 0x6836b
callq 0x2e360
movq -0x48(%rbp), %rax
cvtsi2sdl 0x54(%rax), %xmm0
callq 0x2e740
callq 0x2e0a0
cvttsd2si %xmm0, %ebx
cmpl $0x1, %ebx
adcl $0x0, %ebx
movl $0x2, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2e440
movq -0x38(%rbp), %rsi
movq (%rsi), %rax
leaq -0x388(%rbp), %rdi
callq *(%rax)
movq -0x388(%rbp), %rsi
movq -0x380(%rbp), %rdx
movq %r12, %rdi
callq 0x2e440
movq %rax, %r15
movl $0x7, %edx
movq %rax, %rdi
leaq 0x11916(%rip), %rsi     # 0x79ce6
callq 0x2e440
movl $0x4, %edx
movq %r15, %rdi
leaq 0x11957(%rip), %rsi     # 0x79d3b
callq 0x2e440
movq %r15, %rdi
movl %ebx, %esi
callq 0x2e700
movl $0x2, %edx
movq %rax, %rdi
leaq 0xda23(%rip), %rsi      # 0x75e25
callq 0x2e440
movq -0x388(%rbp), %rdi
cmpq %r13, %rdi
je 0x68418
callq 0x2e360
movq -0xa0(%rbp), %rax
addq $0x8, %rax
cmpq -0x50(%rbp), %rax
jne 0x68167
leaq 0x11996(%rip), %rsi     # 0x79dca
leaq -0x688(%rbp), %rbx
movl $0x2, %edx
movq %rbx, %rdi
callq 0x2e440
movq -0x688(%rbp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2e370
movsbl %al, %esi
leaq -0x688(%rbp), %rdi
callq 0x2e040
movq %rax, %rdi
callq 0x2e2b0
leaq 0xf852(%rip), %rsi      # 0x77cd0
leaq -0x688(%rbp), %rbx
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2e440
movq -0x688(%rbp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2e370
movsbl %al, %esi
leaq -0x688(%rbp), %rdi
callq 0x2e040
movq %rax, %rdi
callq 0x2e2b0
leaq 0xd93e(%rip), %rsi      # 0x75e06
leaq -0x688(%rbp), %rdi
movl $0x9, %edx
callq 0x2e440
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
leaq -0x688(%rbp), %rdi
callq 0x2e440
movq %rax, %rbx
leaq 0xfb74(%rip), %rsi      # 0x78071
movl $0x1, %edx
movq %rax, %rdi
callq 0x2e440
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
movq %rbx, %rdi
callq 0x2e440
leaq 0xecad(%rip), %rsi      # 0x771d4
movl $0x3, %edx
movq %rax, %rdi
callq 0x2e440
movl $0x58, %edi
callq 0x2e3a0
movq %rax, %r14
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r15
leaq -0x680(%rbp), %rsi
movq %rax, %rdi
callq 0x2e660
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
leaq 0x117c7(%rip), %rsi     # 0x79d40
leaq 0x117c8(%rip), %rdx     # 0x79d48
movq %r12, %rdi
callq 0x32e40
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r13
addq $0x10, %rax
movq %rax, (%r13)
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x32cbc
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x3e120
movq %r14, -0x388(%rbp)
movq -0x40(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x685e6
movq %r14, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x685f2
leaq -0x388(%rbp), %rdx
callq 0x3311a
leaq -0x1b8(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x6ed20
movq -0x1b8(%rbp), %rdi
movq -0x1b0(%rbp), %rax
movq %rax, -0x158(%rbp)
cmpq %rax, %rdi
je 0x69052
leaq -0x7f8(%rbp), %rbx
movl $0x80, %eax
leaq -0x510(%rbp), %rcx
addq %rax, %rcx
movq %rcx, -0xa0(%rbp)
leaq -0x60(%rbp), %r13
leaq -0x388(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x110(%rbp)
leaq -0x978(%rbp), %r15
leaq -0x70(%rbp), %r12
movq %rdi, -0x160(%rbp)
movq (%rdi), %r14
movq 0x50(%r14), %rsi
movq (%rsi), %rax
leaq -0x1a0(%rbp), %rdi
callq *(%rax)
movq %r14, -0x38(%rbp)
movq 0x60(%r14), %rsi
movq (%rsi), %rax
leaq -0x510(%rbp), %r14
movq %r14, %rdi
callq *(%rax)
leaq -0x388(%rbp), %rdi
movq %r14, %rsi
movl $0x18, %edx
callq 0x2e670
movq -0x510(%rbp), %rdi
leaq -0x500(%rbp), %rax
cmpq %rax, %rdi
je 0x686bd
callq 0x2e360
leaq -0xf8(%rbp), %rax
movq %rax, -0x108(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x100(%rbp)
movb %cl, -0xf8(%rbp)
leaq -0x140(%rbp), %rax
movq %rax, -0x150(%rbp)
movq %rcx, -0x148(%rbp)
movb %cl, -0x140(%rbp)
leaq -0x388(%rbp), %rdi
leaq -0x150(%rbp), %rsi
movl $0x3b, %edx
callq 0x2e790
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x68871
leaq -0x510(%rbp), %rdi
leaq -0x150(%rbp), %rsi
movl $0x18, %edx
callq 0x2e670
leaq -0x968(%rbp), %rax
movq %rax, -0x978(%rbp)
movq $0x0, -0x970(%rbp)
movb $0x0, -0x968(%rbp)
leaq -0x510(%rbp), %rdi
movq %r15, %rsi
movl $0x3a, %edx
callq 0x2e790
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x68835
movq %r12, %rdi
callq 0x2e800
movw $0x2000, -0x800(%rbp)   # imm = 0x2000
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2e270
movq %r15, %rdi
leaq -0x800(%rbp), %rsi
callq 0x398b9
movq %rbx, %rdi
callq 0x2e580
movq %r12, %rdi
callq 0x2e580
movq %r15, %rdi
leaq 0x1182e(%rip), %rsi     # 0x79ff0
callq 0x2e0f0
testl %eax, %eax
jne 0x68757
leaq -0x510(%rbp), %rdi
movq %r15, %rsi
movl $0x3a, %edx
callq 0x2e790
movq %r12, %rdi
callq 0x2e800
movw $0x2000, -0x800(%rbp)   # imm = 0x2000
leaq -0x7f8(%rbp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x2e270
movq %r15, %rdi
leaq -0x800(%rbp), %rsi
callq 0x398b9
movq %r14, %rdi
callq 0x2e580
movq %r12, %rdi
callq 0x2e580
leaq -0x108(%rbp), %rdi
movq %r15, %rsi
callq 0x2e240
jmp 0x68757
movq -0x978(%rbp), %rdi
leaq -0x968(%rbp), %rax
cmpq %rax, %rdi
je 0x6884d
callq 0x2e360
leaq -0x510(%rbp), %rdi
movq 0x256fd(%rip), %rsi     # 0x8df58
callq 0x2e2f0
movq -0xa0(%rbp), %rdi
callq 0x2e150
jmp 0x686f5
leaq -0x510(%rbp), %rdi
callq 0x2e550
movq %r15, %rdi
callq 0x2e550
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
leaq -0x510(%rbp), %rdi
callq 0x2e440
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0xf078(%rip), %rsi      # 0x77929
callq 0x2e440
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
movq %r14, %rdi
callq 0x2e440
movl $0x8, %edx
movq %rax, %rdi
leaq 0x113d6(%rip), %rsi     # 0x79cb1
callq 0x2e440
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
movq %r15, %rdi
callq 0x2e440
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0xf021(%rip), %rsi      # 0x77929
callq 0x2e440
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
movq %r14, %rdi
callq 0x2e440
movl $0x7, %edx
movq %rax, %rdi
leaq 0x113b4(%rip), %rsi     # 0x79ce6
callq 0x2e440
leaq -0x800(%rbp), %r14
movq %r14, %rdi
callq 0x2e550
movl $0x2, %edx
movq %r14, %rdi
leaq 0xf71b(%rip), %rsi      # 0x78070
callq 0x2e440
movl $0x17, %edx
movq %r14, %rdi
leaq 0x113e0(%rip), %rsi     # 0x79d49
callq 0x2e440
movl $0x2, %edx
movq %r14, %rdi
leaq 0xf6f3(%rip), %rsi      # 0x78070
callq 0x2e440
movl $0xd, %edx
movq %r14, %rdi
leaq 0x113d0(%rip), %rsi     # 0x79d61
callq 0x2e440
movq %r12, %rdi
leaq -0x508(%rbp), %rsi
callq 0x2e660
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq -0x800(%rbp), %rdi
callq 0x2e440
movl $0x2, %edx
movq %rax, %rdi
leaq 0xd45d(%rip), %rsi      # 0x75e25
callq 0x2e440
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x689db
callq 0x2e360
movq -0x38(%rbp), %rax
movq 0x60(%rax), %rsi
movq (%rsi), %rax
leaq -0xc8(%rbp), %rdi
callq *(%rax)
leaq -0x90(%rbp), %rdi
leaq -0x7f8(%rbp), %rsi
callq 0x2e660
movq -0xc8(%rbp), %rcx
movl $0xf, %edi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rcx
je 0x68a21
movq -0xb8(%rbp), %rdi
movq -0xc0(%rbp), %r8
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0x68a56
movl $0xf, %edi
leaq -0x80(%rbp), %r9
cmpq %r9, %rsi
je 0x68a51
movq -0x80(%rbp), %rdi
cmpq %rdi, %rax
jbe 0x68a64
leaq -0xc8(%rbp), %rdi
callq 0x2e130
jmp 0x68a74
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2e420
movq %r13, -0x70(%rbp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x68a91
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x68a9b
movupd (%rcx), %xmm0
movupd %xmm0, (%r13)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0x68(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x68acc
callq 0x2e360
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x68ae4
callq 0x2e360
movl $0x60, %edi
callq 0x2e3a0
movq %rax, -0x30(%rbp)
movl $0x50, %edi
callq 0x2e3a0
movq %rax, -0x48(%rbp)
movl $0x48, %edi
callq 0x2e3a0
movq %rax, -0x50(%rbp)
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r14
addq $0x10, %rax
movq %rax, (%r14)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x32cbc
movq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x32870
movq -0x48(%rbp), %rdi
movl $0x3, %esi
movq -0x50(%rbp), %rdx
callq 0x34f1c
movq -0x30(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
movq -0x48(%rbp), %rcx
callq 0x35432
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, 0x60(%rax)
movq -0x98(%rbp), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq %rax, %rcx
je 0x68f6a
movq %rcx, -0x48(%rbp)
movq (%rcx), %r14
movq %r14, %rdi
leaq 0xedd3(%rip), %rsi      # 0x7796f
callq 0x6e968
testb %al, %al
je 0x68bb8
movq %r14, %rdi
leaq 0xed1b(%rip), %rsi      # 0x778ca
callq 0x6e968
testb %al, %al
je 0x68bcb
movq -0x48(%rbp), %rcx
addq $0x8, %rcx
cmpq -0x50(%rbp), %rcx
jne 0x68b8b
jmp 0x68f6a
testq %r14, %r14
je 0x68bed
movq %r14, %rdi
leaq 0x23ad6(%rip), %rsi     # 0x8c6b0
leaq 0x2438f(%rip), %rdx     # 0x8cf70
xorl %ecx, %ecx
callq 0x2e430
movq %rax, %r14
jmp 0x68bf0
xorl %r14d, %r14d
movq 0x40(%r14), %rsi
movq (%rsi), %rax
leaq -0xc8(%rbp), %rdi
callq *(%rax)
movq 0x50(%r14), %rax
movq %rax, -0xa8(%rbp)
movq 0x40(%rax), %rax
movq (%rax), %rbx
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq %rax, %rbx
je 0x68ce0
movq %r15, %r14
movq %r12, %r15
movq (%rbx), %rsi
movq (%rsi), %rax
leaq -0x90(%rbp), %r12
movq %r12, %rdi
movq %rsi, -0x38(%rbp)
callq *(%rax)
xorl %r13d, %r13d
movl $0x14, %ecx
movq %r12, %rdi
leaq 0x1111e(%rip), %rsi     # 0x79d6f
xorl %edx, %edx
callq 0x2e710
cmpq $-0x1, %rax
je 0x68cae
movq -0x38(%rbp), %rsi
movq (%rsi), %rax
leaq -0x180(%rbp), %r13
movq %r13, %rdi
callq *(%rax)
movq %r15, %r12
movq -0x1a0(%rbp), %rsi
movq -0x198(%rbp), %rcx
movq %r13, %rdi
xorl %edx, %edx
callq 0x2e710
cmpq $-0x1, %rax
setne %r13b
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x68cb1
callq 0x2e360
jmp 0x68cb1
movq %r15, %r12
movq %r14, %r15
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x68cc9
callq 0x2e360
testb %r13b, %r13b
jne 0x68ce7
addq $0x8, %rbx
cmpq -0x30(%rbp), %rbx
leaq -0x60(%rbp), %r13
jne 0x68c23
xorl %ebx, %ebx
jmp 0x68f34
movq -0x38(%rbp), %rsi
movq (%rsi), %rax
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
leaq -0x60(%rbp), %r13
callq *(%rax)
movl $0x1, %ecx
movq %rbx, %rdi
leaq 0x10eb4(%rip), %rsi     # 0x79bc1
xorl %edx, %edx
callq 0x2e710
movq %rax, %r14
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x68d2c
callq 0x2e360
movq -0x38(%rbp), %rsi
movq (%rsi), %rax
movq %rbx, %rdi
callq *(%rax)
movq %r14, -0x30(%rbp)
movl $0x1, %ecx
movq %rbx, %rdi
leaq 0x116be(%rip), %rsi     # 0x7a409
xorl %edx, %edx
callq 0x2e710
movq %rax, -0x40(%rbp)
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x68d6b
callq 0x2e360
movq -0x38(%rbp), %rsi
movq (%rsi), %rax
leaq -0x180(%rbp), %r14
movq %r14, %rdi
callq *(%rax)
movq -0x30(%rbp), %rax
leal 0x1(%rax), %edx
notl %eax
movq -0x40(%rbp), %rcx
addl %eax, %ecx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e3d0
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
cmpq %rax, %rdi
je 0x68db0
callq 0x2e360
movl $0x48, %edi
callq 0x2e3a0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x382be
movl $0x50, %edi
callq 0x2e3a0
movq %rax, -0x30(%rbp)
movl $0x48, %edi
callq 0x2e3a0
movq %rax, -0x40(%rbp)
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r14
movq %rax, %rdi
leaq -0x970(%rbp), %rsi
callq 0x2e660
movq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x32870
movq -0x30(%rbp), %rdi
movl $0x3, %esi
movq -0x40(%rbp), %rdx
callq 0x34f1c
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x326a4
movl $0x50, %edi
callq 0x2e3a0
movq %rax, -0x30(%rbp)
movl $0x48, %edi
callq 0x2e3a0
movq %rax, -0x40(%rbp)
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r14
addq $0x10, %rax
movq %rax, (%r14)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x32cbc
movq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x32870
movq -0x30(%rbp), %rdi
movl $0x3, %esi
movq -0x40(%rbp), %rdx
callq 0x34f1c
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x326a4
movl $0x60, %edi
callq 0x2e3a0
movq %rax, -0x30(%rbp)
movl $0x48, %edi
callq 0x2e3a0
movq %rax, -0x40(%rbp)
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r14
addq $0x10, %rax
movq %rax, (%r14)
movq %r14, %rdi
leaq 0x10eac(%rip), %rsi     # 0x79d84
leaq 0x10eb1(%rip), %rdx     # 0x79d90
callq 0x32e40
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x326ee
movq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq -0x38(%rbp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x387d8
movq -0xa8(%rbp), %rdi
movq %r14, %rsi
callq 0x3265a
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x68f32
callq 0x2e360
movb $0x1, %bl
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x68f4c
callq 0x2e360
movq -0x48(%rbp), %rcx
addq $0x8, %rcx
cmpq -0x50(%rbp), %rcx
sete %al
orb %al, %bl
leaq -0x7f8(%rbp), %rbx
je 0x68b8b
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x68f78
callq 0x2e360
leaq -0x800(%rbp), %rdi
movq 0x25022(%rip), %r14     # 0x8dfa8
movq %r14, %rsi
callq 0x2e230
leaq -0x790(%rbp), %rdi
callq 0x2e150
movq %r15, %rdi
movq %r14, %rsi
callq 0x2e230
leaq -0x908(%rbp), %rdi
callq 0x2e150
leaq -0x510(%rbp), %rdi
movq %r14, %rsi
callq 0x2e230
leaq -0x4a0(%rbp), %rdi
callq 0x2e150
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
je 0x68fe4
callq 0x2e360
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x68ffc
callq 0x2e360
leaq -0x388(%rbp), %rdi
movq 0x24f4e(%rip), %rsi     # 0x8df58
callq 0x2e2f0
movq -0x110(%rbp), %rdi
callq 0x2e150
movq -0x1a0(%rbp), %rdi
leaq -0x190(%rbp), %rax
cmpq %rax, %rdi
je 0x69033
callq 0x2e360
movq -0x160(%rbp), %rdi
addq $0x8, %rdi
cmpq -0x158(%rbp), %rdi
jne 0x68660
movq -0x1b8(%rbp), %rdi
testq %rdi, %rdi
je 0x6905c
callq 0x2e360
movq -0x1d0(%rbp), %rdi
testq %rdi, %rdi
je 0x6906d
callq 0x2e360
movq 0x24f34(%rip), %rsi     # 0x8dfa8
leaq -0x688(%rbp), %rdi
callq 0x2e230
leaq -0x618(%rbp), %rdi
callq 0x2e150
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x690a4
callq 0x2e360
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x690bc
callq 0x2e360
addq $0x958, %rsp            # imm = 0x958
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6929e
jmp 0x6929e
movq %rax, %rbx
movq %r13, %rdi
jmp 0x690ee
movq %rax, %rbx
movq %r12, %rdi
jmp 0x690ee
movq %rax, %rbx
movq %r15, %rdi
callq 0x2e360
jmp 0x69125
jmp 0x6929e
jmp 0x6912d
jmp 0x69104
jmp 0x69104
jmp 0x69104
jmp 0x69104
movq %rax, %rbx
jmp 0x694bb
jmp 0x6929e
jmp 0x6929e
jmp 0x6929e
jmp 0x6929e
jmp 0x69122
movq %rax, %rbx
movq %r14, %rdi
jmp 0x69486
movq %rax, %rbx
jmp 0x6949c
movq %rax, %rbx
movq -0x200(%rbp), %rdi
jmp 0x69481
movq %rax, %rbx
movq -0x1e8(%rbp), %rdi
jmp 0x69481
jmp 0x692a6
jmp 0x692a6
jmp 0x6929e
jmp 0x6929e
jmp 0x692e2
jmp 0x692e2
jmp 0x6930b
movq %rax, %rbx
jmp 0x6939f
jmp 0x692e9
movq %rax, %rbx
jmp 0x691b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x2e360
jmp 0x69278
movq %rax, %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x691b0
callq 0x2e360
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
jne 0x6935c
jmp 0x69361
jmp 0x69330
movq %rax, %rbx
jmp 0x69462
movq %rax, %rbx
movq -0x510(%rbp), %rdi
leaq -0x500(%rbp), %rax
cmpq %rax, %rdi
je 0x69462
callq 0x2e360
jmp 0x69462
movq %rax, %rbx
jmp 0x6947a
jmp 0x692f1
jmp 0x692d0
jmp 0x692c2
jmp 0x69222
jmp 0x692c2
jmp 0x692d0
jmp 0x69222
movq %rax, %rbx
movq %r14, %rdi
callq 0x2e360
jmp 0x692c5
movq %rax, %rbx
movq -0x38(%rbp), %rdi
callq 0x2e360
jmp 0x692f4
movq %rax, %rbx
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rax
jmp 0x69320
movq %rax, %rbx
jmp 0x6932a
jmp 0x69338
jmp 0x69338
movq %rax, %rbx
jmp 0x69281
movq %rax, %rbx
jmp 0x6928a
movq %rax, %rbx
movq -0x50(%rbp), %rdi
callq 0x2e360
movq -0x48(%rbp), %rdi
callq 0x2e360
movq -0x30(%rbp), %rdi
callq 0x2e360
leaq -0x60(%rbp), %r13
jmp 0x69353
jmp 0x6930b
movq %rax, %rbx
jmp 0x6948b
movq %rax, %rbx
movq -0x388(%rbp), %rdi
cmpq %r13, %rdi
jne 0x69486
jmp 0x6948b
jmp 0x692c2
jmp 0x692d0
movq %rax, %rbx
movq -0x40(%rbp), %rdi
callq 0x2e360
jmp 0x692d3
movq %rax, %rbx
movq -0x30(%rbp), %rdi
callq 0x2e360
leaq -0x60(%rbp), %r13
jmp 0x692f4
movq %rax, %rbx
jmp 0x69361
jmp 0x6930b
movq %rax, %rbx
jmp 0x69380
movq %rax, %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x6933b
callq 0x2e360
jmp 0x6933b
movq %rax, %rbx
jmp 0x69353
jmp 0x69330
movq %rax, %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x6932a
callq 0x2e360
leaq -0x60(%rbp), %r13
jmp 0x6933b
movq %rax, %rbx
jmp 0x69413
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x69353
callq 0x2e360
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x69361
callq 0x2e360
movq 0x24c40(%rip), %rsi     # 0x8dfa8
leaq -0x800(%rbp), %rdi
callq 0x2e230
leaq -0x790(%rbp), %rdi
callq 0x2e150
movq 0x24c21(%rip), %rsi     # 0x8dfa8
leaq -0x978(%rbp), %rdi
callq 0x2e230
leaq -0x908(%rbp), %rdi
callq 0x2e150
movq 0x24c02(%rip), %rsi     # 0x8dfa8
leaq -0x510(%rbp), %rdi
callq 0x2e230
leaq -0x4a0(%rbp), %rdi
jmp 0x6940e
movq %rax, %rbx
movq %r14, %rdi
jmp 0x693c9
movq %rbx, %rdi
movq %rax, %rbx
callq 0x2e580
leaq -0x70(%rbp), %rdi
callq 0x2e580
jmp 0x693dc
movq %rax, %rbx
movq -0x978(%rbp), %rdi
leaq -0x968(%rbp), %rax
cmpq %rax, %rdi
je 0x693f4
callq 0x2e360
movq 0x24b5d(%rip), %rsi     # 0x8df58
leaq -0x510(%rbp), %rdi
callq 0x2e2f0
movq -0xa0(%rbp), %rdi
callq 0x2e150
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
je 0x6942b
callq 0x2e360
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x69443
callq 0x2e360
movq 0x24b0e(%rip), %rsi     # 0x8df58
leaq -0x388(%rbp), %rdi
callq 0x2e2f0
movq -0x110(%rbp), %rdi
callq 0x2e150
movq -0x1a0(%rbp), %rdi
leaq -0x190(%rbp), %rax
cmpq %rax, %rdi
je 0x6947a
callq 0x2e360
movq -0x1b8(%rbp), %rdi
testq %rdi, %rdi
je 0x6948b
callq 0x2e360
movq -0x1d0(%rbp), %rdi
testq %rdi, %rdi
je 0x6949c
callq 0x2e360
movq 0x24b05(%rip), %rsi     # 0x8dfa8
leaq -0x688(%rbp), %rdi
callq 0x2e230
leaq -0x618(%rbp), %rdi
callq 0x2e150
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x694d3
callq 0x2e360
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x694eb
callq 0x2e360
movq %rbx, %rdi
callq 0x2e730