// File: /workspace/github_cpp_makefile_star2_O3/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 0x41dc0(%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 0x41d8f(%rip), %rsi     # 0x78071
movl $0x1, %edx
movq %rax, %rdi
callq 0x2e440
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36301
callq 0x2e360
leaq -0x38(%rbp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x36313
callq 0x2e360
cmpq $0x0, 0x50(%r14)
je 0x363be
movq 0x40(%r14), %rsi
movq (%rsi), %rax
leaq -0x48(%rbp), %rdi
callq *(%rax)
leaq 0x3fa68(%rip), %rsi     # 0x75d9a
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0x2e0f0
movl %eax, %r15d
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x3634f
callq 0x2e360
testl %r15d, %r15d
je 0x36377
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 0x363b0
leaq 0x3fa9e(%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 0x363be
callq 0x2e360
cmpq $0x0, 0x58(%r14)
je 0x36420
leaq 0x437f5(%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 0x3f9a6(%rip), %rsi     # 0x75dab
movl $0x2, %edx
movq %rax, %rdi
callq 0x2e440
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x36420
callq 0x2e360
movq 0x60(%r14), %rsi
testq %rsi, %rsi
je 0x36482
movq (%rsi), %rax
leaq -0x48(%rbp), %rdi
callq *(%rax)
leaq 0x43797(%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 0x4027c(%rip), %rsi     # 0x766e1
movl $0x2, %edx
movq %rax, %rdi
callq 0x2e440
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3649a
callq 0x2e360
jmp 0x3649a
leaq 0x402a4(%rip), %rsi     # 0x7672d
leaq -0x1e0(%rbp), %rdi
movl $0x1, %edx
callq 0x2e440
leaq -0x1d8(%rbp), %rsi
movq %rbx, %rdi
callq 0x2e660
movq 0x57af8(%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 0x364f1
jmp 0x3652d
jmp 0x364f1
jmp 0x3652d
jmp 0x3652d
jmp 0x3652d
jmp 0x3652d
jmp 0x36516
jmp 0x3652d
jmp 0x364f1
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
jne 0x36526
jmp 0x36530
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36519
callq 0x2e360
jmp 0x36519
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36530
callq 0x2e360
jmp 0x36530
movq %rax, %rbx
movq 0x57a71(%rip), %rsi     # 0x8dfa8
leaq -0x1e0(%rbp), %rdi
callq 0x2e230
leaq -0x170(%rbp), %rdi
callq 0x2e150
movq %rbx, %rdi
callq 0x2e730
nop