// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, -0x30(%rbp)
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
movb $0x1, 0x8(%rdi)
addq $0x10, %rdi
leaq 0x20(%rbx), %rax
movq %rax, -0x50(%rbp)
movq %rax, 0x10(%rbx)
movl $0x65736162, 0x20(%rbx) # imm = 0x65736162
movq $0x4, 0x18(%rbx)
xorl %eax, %eax
movb %al, 0x24(%rbx)
movq $0x0, 0x30(%rbx)
movb %al, 0x38(%rbx)
leaq 0x56710(%rip), %rax     # 0x8cb40
movq %rax, (%rbx)
leaq 0x3fab6(%rip), %rcx     # 0x75ef0
movl $0x4, %edx
movl $0xc, %r8d
xorl %esi, %esi
callq 0x2e640
testq %r14, %r14
je 0x3646b
leaq 0x561d8(%rip), %rsi     # 0x8c630
leaq 0x56971(%rip), %rdx     # 0x8cdd0
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x2e430
jmp 0x3646d
xorl %eax, %eax
movq -0x30(%rbp), %r14
movq %rax, 0x40(%rbx)
testq %r13, %r13
je 0x36494
leaq 0x561af(%rip), %rsi     # 0x8c630
leaq 0x56558(%rip), %rdx     # 0x8c9e0
movq %r13, %rdi
xorl %ecx, %ecx
callq 0x2e430
jmp 0x36496
xorl %eax, %eax
movq %rax, 0x48(%rbx)
testq %rax, %rax
je 0x364a3
movq %rbx, 0x30(%rax)
movq %r12, 0x50(%rbx)
testq %r12, %r12
je 0x364b1
movq %rbx, 0x30(%r12)
movq %r15, 0x58(%rbx)
testq %r15, %r15
je 0x364be
movq %rbx, 0x30(%r15)
leaq 0x10(%r14), %rdi
leaq 0x3f8ae(%rip), %rsi     # 0x75d77
movl $0x9, %ecx
xorl %edx, %edx
callq 0x2e710
cmpq $-0x1, %rax
je 0x36585
movl $0x60, %edi
callq 0x2e3a0
movq %rax, %r14
movl $0x50, %edi
callq 0x2e3a0
movq %rax, -0x48(%rbp)
movl $0x48, %edi
callq 0x2e3a0
movq %rax, -0x30(%rbp)
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r13
addq $0x10, %rax
movq %rax, (%r13)
movb $0x1, %al
movq %rax, -0x40(%rbp)
leaq 0x413b1(%rip), %rdx     # 0x778db
movb $0x1, %r15b
movb $0x1, %r12b
movq %r13, %rdi
movq %rdx, %rsi
callq 0x33112
xorl %r15d, %r15d
movb $0x1, %r12b
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x32b5a
xorl %r15d, %r15d
xorl %r12d, %r12d
movq -0x48(%rbp), %rdi
movl $0x3, %esi
movq -0x30(%rbp), %rdx
callq 0x3526c
xorl %r15d, %r15d
xorl %r12d, %r12d
movq $0x0, -0x40(%rbp)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq -0x48(%rbp), %rcx
callq 0x3578c
jmp 0x365aa
testq %r14, %r14
je 0x365a7
leaq 0x5609f(%rip), %rsi     # 0x8c630
leaq 0x56580(%rip), %rdx     # 0x8cb18
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x2e430
movq %rax, %r14
jmp 0x365aa
xorl %r14d, %r14d
movq %r14, 0x60(%rbx)
testq %r14, %r14
je 0x365b7
movq %rbx, 0x30(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, -0x38(%rbp)
movb $0x1, %r12b
movb $0x1, %al
movq %rax, -0x40(%rbp)
jmp 0x365fe
movq %rax, -0x38(%rbp)
movb $0x1, %al
movq %rax, -0x40(%rbp)
jmp 0x3660c
movq %rax, -0x38(%rbp)
jmp 0x3661b
movq %rax, -0x38(%rbp)
jmp 0x36623
movq %rax, -0x38(%rbp)
testb %r15b, %r15b
je 0x365fe
movq %r13, %rdi
callq 0x2e360
testb %r12b, %r12b
je 0x3660c
movq -0x30(%rbp), %rdi
callq 0x2e360
cmpb $0x0, -0x40(%rbp)
je 0x3661b
movq -0x48(%rbp), %rdi
callq 0x2e360
movq %r14, %rdi
callq 0x2e360
leaq 0x56366(%rip), %rax     # 0x8c990
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
cmpq -0x50(%rbp), %rdi
je 0x3663c
callq 0x2e360
movq -0x38(%rbp), %rdi
callq 0x2e730
nop