// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/compile_p4.cpp
// Function: transformMalleableTables(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, P4RMalleableTableNode*, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, P4RMalleableTableNode*>>>*, std::vector<AstNode*, std::allocator<AstNode*>>, int, int)
void transformMalleableTables(unordered_map<string, P4RMalleableTableNode*>* varTables, vector<AstNode*> nodeArray, int ing_iso_opt, int egr_iso_opt) {
    for (auto t : *varTables) {
        // Check if mbl table in ing/egr
        if(findTblInIng(t.second->table_->name_->toString(), nodeArray)) {
            if (((unsigned int)ing_iso_opt) & 0b10) {
                auto field = new FieldNode(new NameNode(new string(kP4rIngMetadataName)),
                                        new NameNode(new string("__vv")));
                auto readstmt = new TableReadStmtNode(TableReadStmtNode::EXACT, field);
                t.second->table_->reads_->list_->push_back(readstmt);
            }
        } else {
            if (((unsigned int)egr_iso_opt) & 0b10) {
                auto field = new FieldNode(new NameNode(new string(kP4rEgrMetadataName)),
                                        new NameNode(new string("__vv")));
                auto readstmt = new TableReadStmtNode(TableReadStmtNode::EXACT, field);
                t.second->table_->reads_->list_->push_back(readstmt);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, -0x38(%rbp)
movl %edx, -0x34(%rbp)
movq %rsi, -0x40(%rbp)
movq 0x10(%rdi), %r15
testq %r15, %r15
je 0x65277
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x32cbc
movq 0x28(%r15), %rax
movq %rax, -0x48(%rbp)
movq 0x40(%rax), %rax
movq 0x40(%rax), %rsi
movq (%rsi), %rax
leaq -0x88(%rbp), %rbx
movq %rbx, %rdi
callq *(%rax)
movq %rbx, %rdi
movq -0x40(%rbp), %rsi
callq 0x6fcf1
movl %eax, %ebx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x6506c
callq 0x2e360
testb %bl, %bl
je 0x65168
testb $0x2, -0x34(%rbp)
je 0x6525d
movl $0x50, %edi
callq 0x2e3a0
movq %rax, %r12
movl $0x48, %edi
callq 0x2e3a0
movq %rax, %rbx
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r14
addq $0x10, %rax
movq %rax, (%r14)
movq %r14, %rdi
leaq 0x12b45(%rip), %rsi     # 0x77bfb
leaq 0x12b4a(%rip), %rdx     # 0x77c07
callq 0x32e40
movq %rbx, %rdi
movq %r14, %rsi
callq 0x326ee
movl $0x48, %edi
callq 0x2e3a0
movq %rax, %r14
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r13
addq $0x10, %rax
movq %rax, (%r13)
movq %r13, %rdi
leaq 0x14cf3(%rip), %rsi     # 0x79dec
leaq 0x14cf0(%rip), %rdx     # 0x79df0
callq 0x32e40
movq %r14, %rdi
movq %r13, %rsi
callq 0x326ee
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3c376
movl $0x48, %edi
callq 0x2e3a0
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x368d8
movq %rbx, -0x30(%rbp)
movq -0x48(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x48(%rax), %rax
movq 0x40(%rax), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
jne 0x6524a
leaq -0x30(%rbp), %rdx
callq 0x331f0
jmp 0x6525d
testb $0x2, -0x38(%rbp)
je 0x6525d
movl $0x50, %edi
callq 0x2e3a0
movq %rax, %r12
movl $0x48, %edi
callq 0x2e3a0
movq %rax, %rbx
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r14
addq $0x10, %rax
movq %rax, (%r14)
movq %r14, %rdi
leaq 0x12a6f(%rip), %rsi     # 0x77c19
leaq 0x12a74(%rip), %rdx     # 0x77c25
callq 0x32e40
movq %rbx, %rdi
movq %r14, %rsi
callq 0x326ee
movl $0x48, %edi
callq 0x2e3a0
movq %rax, %r14
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r13
addq $0x10, %rax
movq %rax, (%r13)
movq %r13, %rdi
leaq 0x14bff(%rip), %rsi     # 0x79dec
leaq 0x14bfc(%rip), %rdx     # 0x79df0
callq 0x32e40
movq %r14, %rdi
movq %r13, %rsi
callq 0x326ee
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3c376
movl $0x48, %edi
callq 0x2e3a0
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x368d8
movq %rbx, -0x30(%rbp)
movq -0x48(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x48(%rax), %rax
movq 0x40(%rax), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x65254
movq %rbx, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x6525d
leaq -0x30(%rbp), %rdx
callq 0x331f0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x6526f
callq 0x2e360
movq (%r15), %r15
jmp 0x65005
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x652ab
jmp 0x6529e
jmp 0x652ab
jmp 0x652dd
jmp 0x652c4
jmp 0x652b7
jmp 0x652c4
jmp 0x652d5
jmp 0x652dd
jmp 0x652dd
jmp 0x652ee
jmp 0x652ab
movq %rax, %r15
movq %r13, %rdi
callq 0x2e360
jmp 0x652ae
movq %rax, %r15
movq %r14, %rdi
jmp 0x652ca
jmp 0x652dd
jmp 0x652c4
movq %rax, %r15
movq %r14, %rdi
callq 0x2e360
jmp 0x652c7
movq %rax, %r15
movq %rbx, %rdi
callq 0x2e360
jmp 0x652e0
jmp 0x652dd
jmp 0x652ee
movq %rax, %r15
movq %rbx, %rdi
jmp 0x652e3
movq %rax, %r15
movq %r12, %rdi
callq 0x2e360
jmp 0x652f1
jmp 0x652ee
jmp 0x652ee
movq %rax, %r15
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x65303
callq 0x2e360
movq %r15, %rdi
callq 0x2e730
movq %rax, %r15
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
jne 0x652e3
jmp 0x652f1