// File: /workspace/github_cpp_makefile_star2_O1/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 $0x78, %rsp
movl %ecx, -0x50(%rbp)
movl %edx, -0x4c(%rbp)
movq 0x10(%rdi), %r12
testq %r12, %r12
je 0x658d7
movq %rsi, %r14
leaq -0x90(%rbp), %r15
movq %rsi, -0x58(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
addq %rsi, %rdx
leaq -0x80(%rbp), %rdi
callq 0x32f92
movq 0x28(%r12), %rax
movq %rax, -0x60(%rbp)
movq 0x40(%rax), %rax
movq 0x40(%rax), %rsi
movq (%rsi), %rax
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
callq *(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x707cb
movl %eax, %ebx
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x65667
callq 0x2e360
testb %bl, %bl
je 0x65793
testb $0x2, -0x4c(%rbp)
je 0x658b8
movl $0x50, %edi
callq 0x2e3a0
movq %rax, -0x30(%rbp)
movl $0x48, %edi
callq 0x2e3a0
movq %rax, %r14
movl $0x20, %edi
movq %rax, -0x38(%rbp)
callq 0x2e3a0
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movb $0x1, %r15b
movb $0x1, %bl
movq %rax, -0x40(%rbp)
movq %rax, %rdi
leaq 0x1253c(%rip), %rsi     # 0x77bfb
leaq 0x12541(%rip), %rdx     # 0x77c07
callq 0x33112
xorl %ebx, %ebx
movq %r14, %rdi
movq -0x40(%rbp), %rsi
callq 0x329d8
xorl %ebx, %ebx
movl $0x48, %edi
xorl %r15d, %r15d
callq 0x2e3a0
movq %rax, %r13
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r15
addq $0x10, %rax
movq %rax, (%r15)
movb $0x1, %bl
movb $0x1, %r14b
movq %r15, %rdi
leaq 0x146de(%rip), %rsi     # 0x79dec
leaq 0x146db(%rip), %rdx     # 0x79df0
callq 0x33112
xorl %r14d, %r14d
movq %r13, %rdi
movq %r15, %rsi
callq 0x329d8
xorl %r14d, %r14d
xorl %ebx, %ebx
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
callq 0x3c766
movl $0x48, %edi
callq 0x2e3a0
movq -0x58(%rbp), %r14
leaq -0x90(%rbp), %r15
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq -0x30(%rbp), %rdx
callq 0x36cbe
movq %rbx, -0x48(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x48(%rax), %rax
movq 0x40(%rax), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
jne 0x658a5
leaq -0x48(%rbp), %rdx
callq 0x334b4
jmp 0x658b8
testb $0x2, -0x50(%rbp)
je 0x658b8
movl $0x50, %edi
callq 0x2e3a0
movq %rax, -0x30(%rbp)
movl $0x48, %edi
callq 0x2e3a0
movq %rax, %r14
movl $0x20, %edi
movq %rax, -0x38(%rbp)
callq 0x2e3a0
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movb $0x1, %r15b
movb $0x1, %bl
movq %rax, -0x40(%rbp)
movq %rax, %rdi
leaq 0x12436(%rip), %rsi     # 0x77c19
leaq 0x1243b(%rip), %rdx     # 0x77c25
callq 0x33112
xorl %ebx, %ebx
movq %r14, %rdi
movq -0x40(%rbp), %rsi
callq 0x329d8
xorl %ebx, %ebx
movl $0x48, %edi
xorl %r15d, %r15d
callq 0x2e3a0
movq %rax, %r13
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r15
addq $0x10, %rax
movq %rax, (%r15)
movb $0x1, %bl
movb $0x1, %r14b
movq %r15, %rdi
leaq 0x145ba(%rip), %rsi     # 0x79dec
leaq 0x145b7(%rip), %rdx     # 0x79df0
callq 0x33112
xorl %r14d, %r14d
movq %r13, %rdi
movq %r15, %rsi
callq 0x329d8
xorl %r14d, %r14d
xorl %ebx, %ebx
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
callq 0x3c766
movl $0x48, %edi
callq 0x2e3a0
movq -0x58(%rbp), %r14
leaq -0x90(%rbp), %r15
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq -0x30(%rbp), %rdx
callq 0x36cbe
movq %rbx, -0x48(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x48(%rax), %rax
movq 0x40(%rax), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x658af
movq %rbx, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x658b8
leaq -0x48(%rbp), %rdx
callq 0x334b4
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x658ca
callq 0x2e360
movq (%r12), %r12
testq %r12, %r12
jne 0x6560b
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x65900
jmp 0x658f0
jmp 0x658f8
jmp 0x65907
jmp 0x65962
movq %rax, %r12
movb $0x1, %r15b
jmp 0x65949
movq %rax, %r12
movq %rbx, %rdi
jmp 0x6595b
movq %rax, %r12
movb $0x1, %bl
jmp 0x6592b
movq %rax, %r12
jmp 0x65957
jmp 0x65962
jmp 0x65962
jmp 0x65962
jmp 0x6591b
jmp 0x65916
movq %rax, %r12
jmp 0x6593c
movq %rax, %r12
testb %r14b, %r14b
je 0x6592b
movq %r15, %rdi
callq 0x2e360
testb %bl, %bl
je 0x65937
movq %r13, %rdi
callq 0x2e360
xorl %ebx, %ebx
xorl %r15d, %r15d
testb %bl, %bl
je 0x65949
movq -0x40(%rbp), %rdi
callq 0x2e360
testb %r15b, %r15b
je 0x65957
movq -0x38(%rbp), %rdi
callq 0x2e360
movq -0x30(%rbp), %rdi
callq 0x2e360
jmp 0x65965
movq %rax, %r12
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x65977
callq 0x2e360
movq %r12, %rdi
callq 0x2e730
movq %rax, %r12
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
jne 0x6595b
jmp 0x65965