// File: eniac[P]Mantis/src/ast/ast_nodes_p4.cpp
// Function: TableNode::TableNode(AstNode*, AstNode*, AstNode*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
TableNode::TableNode(AstNode* name, AstNode* reads, AstNode* actions,
                     string options, string pragma) {
    nodeType_ = typeid(*this).name();
    name_ = dynamic_cast<NameNode*>(name);
    name_->parent_ = this;
    reads_ = dynamic_cast<TableReadStmtsNode*>(reads);
    if (reads_) reads_->parent_ = this;
    actions_ = dynamic_cast<TableActionStmtsNode*>(actions);
    actions_->parent_ = this;

    pragma_ = pragma;

    boost::algorithm::trim_right_if(options, boost::is_any_of("; \t\n"));
    if (options != "") {
        boost::split(options_, options, boost::is_any_of(";"));
    }
    for (int i = 0; i < options_.size(); i++){
        boost::algorithm::trim(options_[i]);
    }
    isMalleable_ = false;
    pragmaTransformed_ = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %r8, -0xa8(%rbp)
movq %r9, -0xa0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0xb2f00
movq -0x88(%rbp), %rdi
leaq 0xb5961(%rip), %rax     # 0x172ba0
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x58, %rdi
movq %rdi, -0x98(%rbp)
callq 0xc0210
movq -0x88(%rbp), %rdi
addq $0x70, %rdi
movq %rdi, -0x90(%rbp)
callq 0xaa7f0
movq -0x88(%rbp), %rax
cmpq $0x0, %rax
jne 0xbd281
callq 0xaa640
jmp 0xbd281
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rdi
callq 0xb2f90
movq -0x88(%rbp), %rdi
movq %rax, %rsi
addq $0x10, %rdi
callq 0xaa7c0
jmp 0xbd2a9
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
cmpq $0x0, %rax
je 0xbd2f2
movq -0xb0(%rbp), %rdi
leaq 0xb5318(%rip), %rsi     # 0x1725e0
leaq 0xb56c1(%rip), %rdx     # 0x172990
xorl %eax, %eax
movl %eax, %ecx
callq 0xaa660
movq %rax, -0xb8(%rbp)
jmp 0xbd2fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xbd583
xorl %eax, %eax
movq %rax, -0xb8(%rbp)
jmp 0xbd2fd
movq -0x88(%rbp), %rcx
movq -0xb8(%rbp), %rax
movq %rax, 0x40(%rcx)
movq 0x40(%rcx), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0xc0(%rbp)
cmpq $0x0, %rax
je 0xbd34f
movq -0xc0(%rbp), %rdi
leaq 0xb52aa(%rip), %rsi     # 0x1725e0
leaq 0xb587b(%rip), %rdx     # 0x172bb8
xorl %eax, %eax
movl %eax, %ecx
callq 0xaa660
movq %rax, -0xc8(%rbp)
jmp 0xbd35a
xorl %eax, %eax
movq %rax, -0xc8(%rbp)
jmp 0xbd35a
movq -0x88(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq %rcx, 0x48(%rax)
cmpq $0x0, 0x48(%rax)
je 0xbd382
movq -0x88(%rbp), %rcx
movq 0x48(%rcx), %rax
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0xd0(%rbp)
cmpq $0x0, %rax
je 0xbd3ba
movq -0xd0(%rbp), %rdi
leaq 0xb523f(%rip), %rsi     # 0x1725e0
leaq 0xb5828(%rip), %rdx     # 0x172bd0
xorl %eax, %eax
movl %eax, %ecx
callq 0xaa660
movq %rax, -0xd8(%rbp)
jmp 0xbd3c5
xorl %eax, %eax
movq %rax, -0xd8(%rbp)
jmp 0xbd3c5
movq -0xa0(%rbp), %rsi
movq -0x88(%rbp), %rdi
movq -0xd8(%rbp), %rax
movq %rax, 0x50(%rdi)
movq 0x50(%rdi), %rax
movq %rdi, 0x30(%rax)
addq $0x70, %rdi
callq 0xaa070
jmp 0xbd3f1
leaq 0x7c9d9(%rip), %rsi     # 0x139dd1
leaq -0x58(%rbp), %rdi
callq 0xc0330
jmp 0xbd403
movq -0xa8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xc0230
jmp 0xbd415
leaq -0x58(%rbp), %rdi
callq 0xc0380
movq -0xa8(%rbp), %rdi
leaq 0x7e777(%rip), %rsi     # 0x13bba3
callq 0xbfea0
movb %al, -0xd9(%rbp)
jmp 0xbd439
movb -0xd9(%rbp), %al
testb $0x1, %al
jne 0xbd448
jmp 0xbd4c9
movq -0x88(%rbp), %rax
addq $0x58, %rax
movq %rax, -0xe8(%rbp)
leaq 0x7d594(%rip), %rsi     # 0x13a9f5
leaq -0x70(%rbp), %rdi
callq 0xc04a0
jmp 0xbd46c
movq -0xa8(%rbp), %rsi
movq -0xe8(%rbp), %rdi
leaq -0x70(%rbp), %rdx
movl $0x1, %ecx
callq 0xc03d0
jmp 0xbd48a
leaq -0x70(%rbp), %rdi
callq 0xc0380
jmp 0xbd4c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xc0380
jmp 0xbd583
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xc0380
jmp 0xbd583
movl $0x0, -0x74(%rbp)
movq -0x88(%rbp), %rdi
movslq -0x74(%rbp), %rax
movq %rax, -0xf0(%rbp)
addq $0x58, %rdi
callq 0xc04f0
movq %rax, %rcx
movq -0xf0(%rbp), %rax
cmpq %rcx, %rax
jae 0xbd565
movq -0x88(%rbp), %rdi
addq $0x58, %rdi
movslq -0x74(%rbp), %rsi
callq 0xc0510
movq %rax, -0x100(%rbp)
leaq -0x80(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0xaabc0
movq -0x100(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0xbff20
jmp 0xbd53a
leaq -0x80(%rbp), %rdi
callq 0xaa810
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0xbd4d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xaa810
jmp 0xbd583
movq -0x88(%rbp), %rax
movb $0x0, 0x91(%rax)
movb $0x0, 0x90(%rax)
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0xaabe8
movq -0x98(%rbp), %rdi
callq 0xc0530
movq -0x88(%rbp), %rdi
callq 0xb2fd0
movq -0x38(%rbp), %rdi
callq 0xaaa60