// File: /workspace/github_cpp_makefile_star2_O1/eniac[P]Mantis/src/ast/ast_nodes_p4.cpp
// Function: P4ExprNode::toString[abi:cxx11]()
string P4ExprNode::toString() {
    ostringstream oss;
    oss << keyword_->toString() << " "
        << name1_->toString() << " ";

    // Append name2 if its present
    if (name2_) {
        if (keyword_->toString().compare("calculated_field")==0) {
            oss << ". "
                << name2_->toString();
        } else {
            oss << name2_->toString();
        }
    }

    // Append opts if they're present
    if (opts_) {
        oss << "(" << opts_->toString() << ") ";
    }

    // Append body if its present.
    if (body_) {
        string res = body_->toString();
        oss << "{\n" << res << "}\n";
    } else {
        // If there's no body, its a statement that 
        // ends with a semicolon
        oss << ";";
    }
    return oss.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1e0(%rbp), %rdi
callq 0x2e550
movq 0x40(%r14), %rsi
movq (%rsi), %rax
leaq -0x48(%rbp), %rdi
callq *(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x1e0(%rbp), %rdi
callq 0x2e440
movq %rax, %r15
leaq 0x419da(%rip), %rsi     # 0x78071
movl $0x1, %edx
movq %rax, %rdi
callq 0x2e440
movq 0x48(%r14), %rsi
movq (%rsi), %rax
leaq -0x68(%rbp), %rdi
callq *(%rax)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r15, %rdi
callq 0x2e440
leaq 0x419a9(%rip), %rsi     # 0x78071
movl $0x1, %edx
movq %rax, %rdi
callq 0x2e440
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x366e7
callq 0x2e360
leaq -0x38(%rbp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x366f9
callq 0x2e360
cmpq $0x0, 0x50(%r14)
je 0x367a4
movq 0x40(%r14), %rsi
movq (%rsi), %rax
leaq -0x48(%rbp), %rdi
callq *(%rax)
leaq 0x3f682(%rip), %rsi     # 0x75d9a
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0x2e0f0
movl %eax, %r15d
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x36735
callq 0x2e360
testl %r15d, %r15d
je 0x3675d
movq 0x50(%r14), %rsi
movq (%rsi), %rax
leaq -0x48(%rbp), %rdi
callq *(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x1e0(%rbp), %rdi
callq 0x2e440
jmp 0x36796
leaq 0x3f6b8(%rip), %rsi     # 0x75e1c
leaq -0x1e0(%rbp), %rdi
movl $0x2, %edx
callq 0x2e440
movq 0x50(%r14), %rsi
movq (%rsi), %rax
leaq -0x48(%rbp), %rdi
callq *(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x1e0(%rbp), %rdi
callq 0x2e440
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x367a4
callq 0x2e360
cmpq $0x0, 0x58(%r14)
je 0x36806
leaq 0x4340f(%rip), %rsi     # 0x79bc1
leaq -0x1e0(%rbp), %rdi
movl $0x1, %edx
callq 0x2e440
movq 0x58(%r14), %rsi
movq (%rsi), %rax
leaq -0x48(%rbp), %rdi
callq *(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x1e0(%rbp), %rdi
callq 0x2e440
leaq 0x3f5c0(%rip), %rsi     # 0x75dab
movl $0x2, %edx
movq %rax, %rdi
callq 0x2e440
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x36806
callq 0x2e360
movq 0x60(%r14), %rsi
testq %rsi, %rsi
je 0x36868
movq (%rsi), %rax
leaq -0x48(%rbp), %rdi
callq *(%rax)
leaq 0x433b1(%rip), %rsi     # 0x79bd0
leaq -0x1e0(%rbp), %rdi
movl $0x2, %edx
callq 0x2e440
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x1e0(%rbp), %rdi
callq 0x2e440
leaq 0x3fe96(%rip), %rsi     # 0x766e1
movl $0x2, %edx
movq %rax, %rdi
callq 0x2e440
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x36880
callq 0x2e360
jmp 0x36880
leaq 0x3febe(%rip), %rsi     # 0x7672d
leaq -0x1e0(%rbp), %rdi
movl $0x1, %edx
callq 0x2e440
leaq -0x1d8(%rbp), %rsi
movq %rbx, %rdi
callq 0x2e660
movq 0x57712(%rip), %rsi     # 0x8dfa8
leaq -0x1e0(%rbp), %rdi
callq 0x2e230
leaq -0x170(%rbp), %rdi
callq 0x2e150
movq %rbx, %rax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x368d7
jmp 0x36913
jmp 0x368d7
jmp 0x36913
jmp 0x36913
jmp 0x36913
jmp 0x36913
jmp 0x368fc
jmp 0x36913
jmp 0x368d7
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
jne 0x3690c
jmp 0x36916
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x368ff
callq 0x2e360
jmp 0x368ff
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36916
callq 0x2e360
jmp 0x36916
movq %rax, %rbx
movq 0x5768b(%rip), %rsi     # 0x8dfa8
leaq -0x1e0(%rbp), %rdi
callq 0x2e230
leaq -0x170(%rbp), %rdi
callq 0x2e150
movq %rbx, %rdi
callq 0x2e730
nop