// File: eniac[P]Mantis/src/ast/ast_nodes_p4.cpp
// Function: P4ExprNode::P4ExprNode(AstNode*, AstNode*, AstNode*, AstNode*, AstNode*)
P4ExprNode::P4ExprNode(AstNode* keyword, AstNode* name1, AstNode* name2,
           AstNode* opts, AstNode* body) {
    nodeType_ = typeid(*this).name();
    keyword_ = dynamic_cast<KeywordNode*>(keyword);
    name1_ = dynamic_cast<NameNode*>(name1);
    if (name1_) name1_->parent_ = this;
    name2_ = name2;
    if (name2_) name2_->parent_ = this;
    opts_ = opts;
    if (opts_) opts_->parent_ = this;
    if(body->nodeType_.find("EmptyNode")!=string::npos) {
        body_ = new BodyNode(NULL, NULL, new BodyWordNode(BodyWordNode::STRING, new StrNode(new string(""))));
    } else {
        body_ = dynamic_cast<BodyNode*>(body);
    }    
    if (body_) body_->parent_ = this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
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, -0x50(%rbp)
callq 0xb2f00
movq -0x50(%rbp), %rax
leaq 0xb6ce5(%rip), %rcx     # 0x172ae0
addq $0x10, %rcx
movq %rcx, (%rax)
cmpq $0x0, %rax
jne 0xbbe0f
callq 0xaa640
jmp 0xbbe0f
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rdi
callq 0xb2f90
movq -0x50(%rbp), %rdi
movq %rax, %rsi
addq $0x10, %rdi
callq 0xaa7c0
jmp 0xbbe31
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0xbbe71
movq -0x58(%rbp), %rdi
leaq 0xb6796(%rip), %rsi     # 0x1725e0
leaq 0xb6f2f(%rip), %rdx     # 0x172d80
xorl %eax, %eax
movl %eax, %ecx
callq 0xaa660
movq %rax, -0x60(%rbp)
jmp 0xbbe79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xbc12c
xorl %eax, %eax
movq %rax, -0x60(%rbp)
jmp 0xbbe79
movq -0x50(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
je 0xbbeb4
movq -0x68(%rbp), %rdi
leaq 0xb6742(%rip), %rsi     # 0x1725e0
leaq 0xb6aeb(%rip), %rdx     # 0x172990
xorl %eax, %eax
movl %eax, %ecx
callq 0xaa660
movq %rax, -0x70(%rbp)
jmp 0xbbebc
xorl %eax, %eax
movq %rax, -0x70(%rbp)
jmp 0xbbebc
movq -0x50(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, 0x48(%rax)
cmpq $0x0, 0x48(%rax)
je 0xbbedb
movq -0x50(%rbp), %rcx
movq 0x48(%rcx), %rax
movq %rcx, 0x30(%rax)
movq -0x50(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x50(%rax)
cmpq $0x0, 0x50(%rax)
je 0xbbefa
movq -0x50(%rbp), %rcx
movq 0x50(%rcx), %rax
movq %rcx, 0x30(%rax)
movq -0x50(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x58(%rax)
cmpq $0x0, 0x58(%rax)
je 0xbbf19
movq -0x50(%rbp), %rcx
movq 0x58(%rcx), %rax
movq %rcx, 0x30(%rax)
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
leaq 0x7de5f(%rip), %rsi     # 0x139d87
xorl %eax, %eax
movl %eax, %edx
callq 0xaab90
cmpq $-0x1, %rax
je 0xbc0ba
movl $0x60, %edi
callq 0xaa560
movq %rax, -0x78(%rbp)
jmp 0xbbf4b
movb $0x1, -0x41(%rbp)
movl $0x50, %edi
callq 0xaa560
movq %rax, -0x80(%rbp)
jmp 0xbbf5f
movb $0x1, -0x40(%rbp)
movl $0x48, %edi
callq 0xaa560
movq %rax, -0x88(%rbp)
jmp 0xbbf76
movb $0x1, -0x3f(%rbp)
movl $0x20, %edi
callq 0xaa560
movq %rax, -0x90(%rbp)
jmp 0xbbf8d
movb $0x1, -0x3e(%rbp)
leaq -0x3d(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0xaaa70
movq -0x90(%rbp), %rdi
movq -0x98(%rbp), %rdx
leaq 0x7fbed(%rip), %rsi     # 0x13bba3
callq 0xaa7d0
jmp 0xbbfbd
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
movb $0x0, -0x3e(%rbp)
callq 0xb2890
jmp 0xbbfd6
movq -0x88(%rbp), %rdx
movq -0x80(%rbp), %rdi
movb $0x0, -0x3f(%rbp)
movl $0x3, %esi
callq 0xba4d0
jmp 0xbbff1
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %rdi
movb $0x0, -0x40(%rbp)
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0xbaed0
jmp 0xbc00b
movq -0x50(%rbp), %rax
movq -0x78(%rbp), %rcx
movb $0x0, -0x41(%rbp)
movq %rcx, 0x60(%rax)
leaq -0x3d(%rbp), %rdi
callq 0xaa5f0
jmp 0xbc10c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xbc0a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xbc094
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xbc07e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x3d(%rbp), %rdi
callq 0xaa5f0
testb $0x1, -0x3e(%rbp)
jne 0xbc070
jmp 0xbc07c
movq -0x90(%rbp), %rdi
callq 0xaa4e0
jmp 0xbc07e
testb $0x1, -0x3f(%rbp)
jne 0xbc086
jmp 0xbc092
movq -0x88(%rbp), %rdi
callq 0xaa4e0
jmp 0xbc094
testb $0x1, -0x40(%rbp)
jne 0xbc09c
jmp 0xbc0a5
movq -0x80(%rbp), %rdi
callq 0xaa4e0
jmp 0xbc0a7
testb $0x1, -0x41(%rbp)
jne 0xbc0af
jmp 0xbc0b8
movq -0x78(%rbp), %rdi
callq 0xaa4e0
jmp 0xbc12c
movq -0x30(%rbp), %rax
movq %rax, -0xa0(%rbp)
cmpq $0x0, %rax
je 0xbc0f2
movq -0xa0(%rbp), %rdi
leaq 0xb6507(%rip), %rsi     # 0x1725e0
leaq 0xb69e8(%rip), %rdx     # 0x172ac8
xorl %eax, %eax
movl %eax, %ecx
callq 0xaa660
movq %rax, -0xa8(%rbp)
jmp 0xbc0fd
xorl %eax, %eax
movq %rax, -0xa8(%rbp)
jmp 0xbc0fd
movq -0x50(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, 0x60(%rax)
movq -0x50(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xbc123
movq -0x50(%rbp), %rcx
movq 0x60(%rcx), %rax
movq %rcx, 0x30(%rax)
addq $0xb0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0xb2fd0
movq -0x38(%rbp), %rdi
callq 0xaaa60
nop