LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/ast/ast_nodes_p4r.cpp
// Function: P4RReactionNode::P4RReactionNode(AstNode*, AstNode*, AstNode*)
P4RReactionNode::P4RReactionNode(AstNode* name, AstNode* args, AstNode* body) {
    nodeType_ = typeid(*this).name();
    name_ = dynamic_cast<NameNode*>(name);
    name_->parent_ = this;
    args_ = dynamic_cast<ReactionArgsNode*>(args);
    args_->parent_ = this;
    if(body->nodeType_.find("EmptyNode")!=string::npos) {
        // if body is empty node
        body_ = new BodyNode(NULL, NULL, new BodyWordNode(BodyWordNode::STRING, new StrNode(new string(""))));
    } else {
        body_ = dynamic_cast<BodyNode*>(body);
    }
    body_->parent_ = this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movb $0x1, 0x8(%rdi)
addq $0x10, %rdi
leaq 0x20(%rbx), %rax
movq %rax, -0x38(%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 0x4fbd1(%rip), %rax     # 0x8d388
movq %rax, (%rbx)
leaq 0x38ba8(%rip), %rcx     # 0x76369
movl $0x4, %edx
movl $0x11, %r8d
xorl %esi, %esi
callq 0x2e640
leaq 0x4eed6(%rip), %r13     # 0x8c6b0
leaq 0x4f27f(%rip), %rdx     # 0x8ca60
movq %r12, %rdi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x2e430
movq %rax, 0x40(%rbx)
movq %rbx, 0x30(%rax)
leaq 0x4fccb(%rip), %rdx     # 0x8d4c8
movq %r15, %rdi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x2e430
movq %rax, 0x48(%rbx)
movq %rbx, 0x30(%rax)
leaq 0x10(%r14), %rdi
leaq 0x3855a(%rip), %rsi     # 0x75d77
movl $0x9, %ecx
xorl %edx, %edx
callq 0x2e710
cmpq $-0x1, %rax
je 0x3d8a9
movl $0x60, %edi
callq 0x2e3a0
movq %rax, %r14
movl $0x50, %edi
callq 0x2e3a0
movq %rax, %r15
movl $0x48, %edi
callq 0x2e3a0
movq %rax, %r13
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
leaq 0x3a069(%rip), %rdx     # 0x778db
movq %r12, %rdi
movq %rdx, %rsi
callq 0x32e40
movq %r13, %rdi
movq %r12, %rsi
callq 0x32870
movq %r15, %rdi
movl $0x3, %esi
movq %r13, %rdx
callq 0x34f1c
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %rcx
callq 0x35432
jmp 0x3d8c4
leaq 0x4ee00(%rip), %rsi     # 0x8c6b0
leaq 0x4f2e1(%rip), %rdx     # 0x8cb98
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x2e430
movq %rax, %r14
movq %r14, 0x50(%rbx)
movq %rbx, 0x30(%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3d90b
jmp 0x3d8fd
jmp 0x3d8ef
movq %rax, -0x30(%rbp)
movq %r12, %rdi
callq 0x2e360
jmp 0x3d8f3
movq %rax, -0x30(%rbp)
movq %r13, %rdi
callq 0x2e360
jmp 0x3d901
movq %rax, -0x30(%rbp)
movq %r15, %rdi
callq 0x2e360
jmp 0x3d90f
movq %rax, -0x30(%rbp)
movq %r14, %rdi
callq 0x2e360
jmp 0x3d91d
movq %rax, -0x30(%rbp)
leaq 0x4f0ec(%rip), %rax     # 0x8ca10
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
cmpq -0x38(%rbp), %rdi
je 0x3d936
callq 0x2e360
movq -0x30(%rbp), %rdi
callq 0x2e730
nop
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/ast/ast_nodes_p4r.cpp
// Function: P4RReactionNode::toString[abi:cxx11]()
string P4RReactionNode::toString() {
    if (removed_) {
        return "";
    }

    ostringstream oss;
    oss << "reaction " 
        << name_->toString()
        << " (" 
        << args_->toString()
        << " ) {\n"
        << body_->toString()
        << "}";
    return oss.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, %rbx
cmpb $0x1, 0x38(%rsi)
jne 0x3d977
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x39f74(%rip), %rdx     # 0x778db
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x32e40
jmp 0x3da9e
movq %rsi, %r14
leaq -0x1f0(%rbp), %r15
movq %r15, %rdi
callq 0x2e550
leaq 0x38921(%rip), %rsi     # 0x762b1
movl $0x9, %edx
movq %r15, %rdi
callq 0x2e440
movq 0x40(%r14), %rsi
movq (%rsi), %rax
leaq -0x78(%rbp), %rdi
callq *(%rax)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
leaq -0x1f0(%rbp), %rdi
callq 0x2e440
movq %rax, %r15
leaq 0x3c1f8(%rip), %rsi     # 0x79bc0
movl $0x2, %edx
movq %rax, %rdi
callq 0x2e440
movq 0x48(%r14), %rsi
movq (%rsi), %rax
leaq -0x58(%rbp), %rdi
callq *(%rax)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %r15, %rdi
callq 0x2e440
movq %rax, %r15
leaq 0x3c1d1(%rip), %rsi     # 0x79bcd
movl $0x5, %edx
movq %rax, %rdi
callq 0x2e440
movq 0x50(%r14), %rsi
movq (%rsi), %rax
leaq -0x38(%rbp), %rdi
callq *(%rax)
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq %r15, %rdi
callq 0x2e440
leaq 0x3a2a3(%rip), %rsi     # 0x77cd0
movl $0x1, %edx
movq %rax, %rdi
callq 0x2e440
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3da4c
callq 0x2e360
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3da5e
callq 0x2e360
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3da70
callq 0x2e360
leaq -0x1e8(%rbp), %rsi
movq %rbx, %rdi
callq 0x2e660
movq 0x50522(%rip), %rsi     # 0x8dfa8
leaq -0x1f0(%rbp), %rdi
callq 0x2e230
leaq -0x180(%rbp), %rdi
callq 0x2e150
movq %rbx, %rax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3dacc
jmp 0x3dae8
jmp 0x3dae3
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3dacf
callq 0x2e360
jmp 0x3dacf
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3daeb
callq 0x2e360
jmp 0x3daeb
movq %rax, %rbx
jmp 0x3dafd
movq %rax, %rbx
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3dafd
callq 0x2e360
movq 0x504a4(%rip), %rsi     # 0x8dfa8
leaq -0x1f0(%rbp), %rdi
callq 0x2e230
leaq -0x180(%rbp), %rdi
callq 0x2e150
movq %rbx, %rdi
callq 0x2e730
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/ast/ast_nodes_p4r.cpp
// Function: ReactionArgsNode::toString[abi:cxx11]()
string ReactionArgsNode::toString() {
    bool first = true;
    ostringstream oss;
    for (auto ra : *list_) {
        if (first) {
            first = false;
        } else {
            oss << ", ";
        }
        oss << ra->toString();
    }
    return oss.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %r14
movq %rdi, -0x30(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x2e550
movq 0x40(%r14), %rax
movq (%rax), %rbx
movq 0x8(%rax), %r12
cmpq %r12, %rbx
je 0x3dc1e
movb $0x1, %al
leaq -0x50(%rbp), %r14
leaq -0x1c8(%rbp), %r15
movq (%rbx), %r13
testb $0x1, %al
jne 0x3dbe5
movl $0x2, %edx
movq %r15, %rdi
leaq 0x3a39f(%rip), %rsi     # 0x77f7f
callq 0x2e440
movq (%r13), %rax
movq %r14, %rdi
movq %r13, %rsi
callq *(%rax)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %r15, %rdi
callq 0x2e440
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3dc13
callq 0x2e360
addq $0x8, %rbx
xorl %eax, %eax
cmpq %r12, %rbx
jne 0x3dbca
leaq -0x1c0(%rbp), %rsi
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x2e660
movq 0x50370(%rip), %rsi     # 0x8dfa8
leaq -0x1c8(%rbp), %rdi
callq 0x2e230
leaq -0x158(%rbp), %rdi
callq 0x2e150
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3dc69
jmp 0x3dc69
movq %rax, %rbx
jmp 0x3dc83
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3dc83
callq 0x2e360
movq 0x5031e(%rip), %rsi     # 0x8dfa8
leaq -0x1c8(%rbp), %rdi
callq 0x2e230
leaq -0x158(%rbp), %rdi
callq 0x2e150
movq %rbx, %rdi
callq 0x2e730
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/ast/ast_nodes_p4r.cpp
// Function: ReactionArgNode::ReactionArgNode(ReactionArgNode::ArgType const&, AstNode*, AstNode*, AstNode*)
ReactionArgNode::ReactionArgNode(const ArgType& argType, AstNode* arg, AstNode* index1, AstNode* index2)
                                 : argType_(argType) {
    nodeType_ = typeid(*this).name();
    arg_ = arg;
    arg_->parent_ = this;

    index1_ = dynamic_cast<IntegerNode*>(index1);
    index2_ = dynamic_cast<IntegerNode*>(index2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %rbx
movb $0x1, 0x8(%rdi)
addq $0x10, %rdi
leaq 0x20(%rbx), %r13
movq %r13, 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 0x4f6be(%rip), %rax     # 0x8d3b8
movq %rax, (%rbx)
movl (%rsi), %eax
movl %eax, 0x3c(%rbx)
leaq 0x38685(%rip), %rcx     # 0x7638e
movl $0x4, %edx
movl $0x11, %r8d
xorl %esi, %esi
callq 0x2e640
movq %r12, 0x40(%rbx)
movq %rbx, 0x30(%r12)
testq %r15, %r15
je 0x3dd43
leaq 0x4e980(%rip), %rsi     # 0x8c6b0
leaq 0x4ede9(%rip), %rdx     # 0x8cb20
movq %r15, %rdi
xorl %ecx, %ecx
callq 0x2e430
jmp 0x3dd45
xorl %eax, %eax
movq %rax, 0x48(%rbx)
testq %r14, %r14
je 0x3dd68
leaq 0x4e95b(%rip), %rsi     # 0x8c6b0
leaq 0x4edc4(%rip), %rdx     # 0x8cb20
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x2e430
jmp 0x3dd6a
xorl %eax, %eax
movq %rax, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x4ec89(%rip), %rax     # 0x8ca10
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
cmpq %r13, %rdi
je 0x3dd98
callq 0x2e360
movq %r14, %rdi
callq 0x2e730
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/ast/ast_nodes_p4r.cpp
// Function: MblRefNode::deepCopy()
MblRefNode* MblRefNode::deepCopy() {
    auto newNode = new MblRefNode(name_->deepCopy());
    newNode->transformed_ = transformed_;
    newNode->transformedHeader_ = transformedHeader_;
    newNode->transformedField_ = transformedField_;

    return newNode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x88, %edi
callq 0x2e3a0
movq %rax, %rbx
movq 0x80(%r14), %rdi
callq 0x3e354
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3ddbc
movb 0x39(%r14), %al
movb %al, 0x39(%rbx)
leaq 0x40(%r14), %rsi
leaq 0x40(%rbx), %rdi
callq 0x2e240
addq $0x60, %r14
movq %rbx, %rdi
addq $0x60, %rdi
movq %r14, %rsi
callq 0x2e240
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2e360
movq %r14, %rdi
callq 0x2e730
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/ast/ast_nodes_p4r.cpp
// Function: MblRefNode::toString[abi:cxx11]()
string MblRefNode::toString() {
    if (transformed_) {
        if (!inReaction_) {
            return transformedHeader_ + "." + transformedField_;
        }
    } else {
        ostringstream oss;
        oss << "${" << name_->toString() << "}";
        return oss.str();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x39(%rsi)
jne 0x3dfe6
leaq -0x1a8(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
addq %rsi, %rdx
leaq -0x1b8(%rbp), %r15
movq %r15, %rdi
callq 0x32cbc
leaq 0x39988(%rip), %rsi     # 0x77929
movq %r15, %rdi
callq 0x2e7e0
movq 0x60(%r14), %rsi
movq 0x68(%r14), %rdx
leaq -0x1b8(%rbp), %rdi
callq 0x2e130
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x3e083
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x3e089
leaq -0x1b8(%rbp), %r15
movq %r15, %rdi
callq 0x2e550
leaq 0x382bf(%rip), %rsi     # 0x762bb
movl $0x2, %edx
movq %r15, %rdi
callq 0x2e440
movq 0x80(%r14), %rsi
movq (%rsi), %rax
leaq -0x40(%rbp), %rdi
callq *(%rax)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0x1b8(%rbp), %rdi
callq 0x2e440
leaq 0x39c9c(%rip), %rsi     # 0x77cd0
movl $0x1, %edx
movq %rax, %rdi
callq 0x2e440
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e053
callq 0x2e360
leaq -0x1b0(%rbp), %rsi
movq %rbx, %rdi
callq 0x2e660
movq 0x4ff3f(%rip), %rsi     # 0x8dfa8
leaq -0x1b8(%rbp), %rdi
callq 0x2e230
leaq -0x148(%rbp), %rdi
callq 0x2e150
jmp 0x3e0b1
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x1b8(%rbp), %rdi
cmpq %r12, %rdi
je 0x3e0b1
callq 0x2e360
movq %rbx, %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3e0f5
jmp 0x3e0c8
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
cmpq %r12, %rdi
je 0x3e117
callq 0x2e360
jmp 0x3e117
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e0f8
callq 0x2e360
jmp 0x3e0f8
movq %rax, %rbx
movq 0x4fea9(%rip), %rsi     # 0x8dfa8
leaq -0x1b8(%rbp), %rdi
callq 0x2e230
leaq -0x148(%rbp), %rdi
callq 0x2e150
movq %rbx, %rdi
callq 0x2e730
nop
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/ast/ast_nodes_p4r.cpp
// Function: UnanchoredNode::UnanchoredNode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
UnanchoredNode::UnanchoredNode(string* newCode, string* objType,
                               string* objName) {
    nodeType_ = typeid(*this).name();
    codeBlob_ = newCode;
    objType_ = objType;
    objName_ = objName;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movb $0x1, 0x8(%rdi)
addq $0x10, %rdi
leaq 0x20(%rbx), %r13
movq %r13, 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 0x4f278(%rip), %rax     # 0x8d3e8
movq %rax, (%rbx)
leaq 0x38233(%rip), %rcx     # 0x763ad
movl $0x4, %edx
movl $0x10, %r8d
xorl %esi, %esi
callq 0x2e640
movq %r12, 0x40(%rbx)
movq %r15, 0x48(%rbx)
movq %r14, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x4e85f(%rip), %rax     # 0x8ca10
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
cmpq %r13, %rdi
je 0x3e1c2
callq 0x2e360
movq %r14, %rdi
callq 0x2e730
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/compile_c.cpp
// Function: generateDialogueArgStart(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int)
void generateDialogueArgStart(ostringstream& oss_reaction_mirror, int ing_iso_opt, int egr_iso_opt) {

    // Shared tmp variables
    oss_reaction_mirror << "  int __mantis__reg_flags=1;\n"
                       << "  int __mantis__value_count;\n"
                       << "  int __mantis__num_actually_read;\n"
                       << "  int __mantis__i;\n";
    // Take snapshots of ing/egr metrics
    if(((unsigned int)ing_iso_opt) & 0b1) {
        oss_reaction_mirror << "  __mantis__mbl_updated_ing=1;\n"
                           // Update data plane working copy
                           << "\n  __mantis__flip_mv_ing;\n"
                           << "\n  __mantis__mod_vars_ing;\n"
                           << "\n  __mantis__flip_mv_ing;\n"
                           << "\n  __mantis__mbl_updated_ing=0;\n";  
    }
    if(((unsigned int)egr_iso_opt) & 0b1) {
        oss_reaction_mirror << "  __mantis__mbl_updated_egr=1;\n"
                           // Update data plane working copy
                           << "\n  __mantis__flip_mv_egr;\n"
                           << "\n  __mantis__mod_vars_egr;\n"
                           << "\n  __mantis__flip_mv_egr;\n"
                           << "\n  __mantis__mbl_updated_egr=0;\n";  
    }    

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x32d58(%rip), %rsi     # 0x77766
movl $0x1d, %edx
callq 0x2e440
leaq 0x32d65(%rip), %rsi     # 0x77784
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x32d6f(%rip), %rsi     # 0x777a2
movl $0x23, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x32d7f(%rip), %rsi     # 0x777c6
movl $0x13, %edx
movq %rbx, %rdi
callq 0x2e440
testb $0x1, %r15b
je 0x44abd
leaq 0x32d79(%rip), %rsi     # 0x777da
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x32d85(%rip), %r15     # 0x777fa
movl $0x1a, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2e440
leaq 0x32d89(%rip), %rsi     # 0x77815
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2e440
movl $0x1a, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2e440
leaq 0x32d81(%rip), %rsi     # 0x77831
movl $0x20, %edx
movq %rbx, %rdi
callq 0x2e440
testb $0x1, %r14b
jne 0x44ace
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32d7d(%rip), %rsi     # 0x77852
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x32d89(%rip), %r14     # 0x77872
movl $0x1a, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e440
leaq 0x32d8d(%rip), %rsi     # 0x7788d
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2e440
movl $0x1a, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e440
leaq 0x32d85(%rip), %rsi     # 0x778a9
movl $0x20, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2e440
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/compile_p4.cpp
// Function: transformPragma(std::vector<AstNode*, std::allocator<AstNode*>>*)
void transformPragma(vector<AstNode*>* astNodes) {
    // For now, a simple increment of stage index
	for (auto node : *astNodes) {
        if(typeContains(node, "TableNode")) {
            if (typeContains(node, "P4R")) {
                P4RMalleableTableNode* tablenode = dynamic_cast<P4RMalleableTableNode*>(node);
                tablenode->transformPragma();
            } else {
                TableNode* tablenode = dynamic_cast<TableNode*>(node);
                tablenode->transformPragma();
            }
        }
    }    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r13
movq 0x8(%rdi), %r14
cmpq %r14, %r13
je 0x63253
leaq 0x14a08(%rip), %rbx     # 0x77bf1
leaq 0x294c0(%rip), %r15     # 0x8c6b0
movq (%r13), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x6e968
testb %al, %al
je 0x6324a
movq %r12, %rdi
leaq 0x146bd(%rip), %rsi     # 0x778ca
callq 0x6e968
movq %r12, %rdi
movq %r15, %rsi
testb %al, %al
je 0x63234
leaq 0x2a22d(%rip), %rdx     # 0x8d450
xorl %ecx, %ecx
callq 0x2e430
movq %rax, %rdi
callq 0x3cde4
jmp 0x6324a
leaq 0x29c8d(%rip), %rdx     # 0x8cec8
xorl %ecx, %ecx
callq 0x2e430
movq %rax, %rdi
callq 0x3751e
addq $0x8, %r13
cmpq %r14, %r13
jne 0x631f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: typeContains(AstNode*, char const*)
bool typeContains(AstNode* n, const char* type) {
    if (n->nodeType_.find(string(type)) != string::npos) {
        return true;    
    } else {
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq -0x38(%rbp), %r14
leaq -0x11(%rbp), %rdx
movq %r14, %rdi
callq 0x2e190
addq $0x10, %rbx
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2e710
movq %rax, %rbx
movq (%r14), %rdi
leaq -0x28(%rbp), %rax
cmpq %rax, %rdi
je 0x6e9af
callq 0x2e360
cmpq $-0x1, %rbx
setne %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: p4KeywordMatches(P4ExprNode*, char const*)
bool p4KeywordMatches(P4ExprNode* n, const char* type) {
    if (n->keyword_->word_->compare(string(type)) == 0) {
        return true;    
    } else {
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq 0x40(%rdi), %rax
movq 0x40(%rax), %rbx
leaq -0x38(%rbp), %r14
leaq -0x11(%rbp), %rdx
movq %r14, %rdi
callq 0x2e190
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e050
movl %eax, %ebx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ea01
callq 0x2e360
testl %ebx, %ebx
sete %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ea24
callq 0x2e360
movq %rbx, %rdi
callq 0x2e730
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findIngress(std::vector<AstNode*, std::allocator<AstNode*>> const&)
P4ExprNode* findIngress(const std::vector<AstNode*>& astNodes) {
    for (auto node : astNodes) {
        if (typeContains(node, "P4ExprNode")) {
            P4ExprNode* exprNode = dynamic_cast<P4ExprNode*>(node);
            // Might be called after ing transformation
            if (exprNode->name1_->toString().find("ingress") != string::npos || exprNode->name1_->toString().find(string(kOrigIngControlName)) != string::npos) {
                return exprNode;
            }
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq (%rdi), %r15
movq 0x8(%rdi), %rbx
cmpq %rbx, %r15
je 0x6eb5a
leaq -0x40(%rbp), %r12
leaq 0xb841(%rip), %r13      # 0x7a299
movq %rbx, -0x30(%rbp)
movq (%r15), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x6e968
testb %al, %al
je 0x6eb4d
movq %r12, %r13
movq %r14, %rdi
leaq 0x1dc31(%rip), %rsi     # 0x8c6b0
leaq 0x1e3b2(%rip), %rdx     # 0x8ce38
xorl %ecx, %ecx
callq 0x2e430
movq %rax, %r14
movq 0x48(%rax), %rsi
movq (%rsi), %rax
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
callq *(%rax)
movl $0x7, %ecx
movq %rbx, %rdi
leaq 0xb7f2(%rip), %rsi      # 0x7a2a4
xorl %edx, %edx
callq 0x2e710
movb $0x1, %bl
cmpq $-0x1, %rax
jne 0x6eb26
movq 0x48(%r14), %rsi
movq (%rsi), %rax
leaq -0x70(%rbp), %rdi
callq *(%rax)
movq %r13, %r12
movq %r13, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
leaq 0xaed9(%rip), %rsi      # 0x799b9
leaq 0xaee1(%rip), %rdx      # 0x799c8
callq 0x32e40
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rcx
leaq -0x70(%rbp), %rdi
xorl %edx, %edx
callq 0x2e710
cmpq $-0x1, %rax
setne %bl
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x6eb14
callq 0x2e360
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x6eb26
callq 0x2e360
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x6eb3b
callq 0x2e360
testb %bl, %bl
movq %r13, %r12
movq -0x30(%rbp), %rbx
leaq 0xb74e(%rip), %r13      # 0x7a299
jne 0x6eb5d
addq $0x8, %r15
cmpq %rbx, %r15
jne 0x6ea5c
xorl %r14d, %r14d
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x6eb89
callq 0x2e360
jmp 0x6eb89
movq %rax, %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x6eb9e
callq 0x2e360
movq %rbx, %rdi
callq 0x2e730
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findEgress(std::vector<AstNode*, std::allocator<AstNode*>> const&)
P4ExprNode* findEgress(const std::vector<AstNode*>& astNodes) {
    for (auto node : astNodes) {
        if (typeContains(node, "P4ExprNode")) {
            P4ExprNode* exprNode = dynamic_cast<P4ExprNode*>(node);
            if (exprNode->name1_->toString().find("egress") != string::npos || exprNode->name1_->toString().find(string(kOrigEgrControlName)) != string::npos) {
                return exprNode;
            }
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq (%rdi), %r15
movq 0x8(%rdi), %rbx
cmpq %rbx, %r15
je 0x6ecd4
leaq -0x40(%rbp), %r12
leaq 0xb6c7(%rip), %r13      # 0x7a299
movq %rbx, -0x30(%rbp)
movq (%r15), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x6e968
testb %al, %al
je 0x6ecc7
movq %r12, %r13
movq %r14, %rdi
leaq 0x1dab7(%rip), %rsi     # 0x8c6b0
leaq 0x1e238(%rip), %rdx     # 0x8ce38
xorl %ecx, %ecx
callq 0x2e430
movq %rax, %r14
movq 0x48(%rax), %rsi
movq (%rsi), %rax
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
callq *(%rax)
movl $0x6, %ecx
movq %rbx, %rdi
leaq 0xb680(%rip), %rsi      # 0x7a2ac
xorl %edx, %edx
callq 0x2e710
movb $0x1, %bl
cmpq $-0x1, %rax
jne 0x6eca0
movq 0x48(%r14), %rsi
movq (%rsi), %rax
leaq -0x70(%rbp), %rdi
callq *(%rax)
movq %r13, %r12
movq %r13, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
leaq 0xae23(%rip), %rsi      # 0x79a7d
leaq 0xae2a(%rip), %rdx      # 0x79a8b
callq 0x32e40
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rcx
leaq -0x70(%rbp), %rdi
xorl %edx, %edx
callq 0x2e710
cmpq $-0x1, %rax
setne %bl
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x6ec8e
callq 0x2e360
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x6eca0
callq 0x2e360
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x6ecb5
callq 0x2e360
testb %bl, %bl
movq %r13, %r12
movq -0x30(%rbp), %rbx
leaq 0xb5d4(%rip), %r13      # 0x7a299
jne 0x6ecd7
addq $0x8, %r15
cmpq %rbx, %r15
jne 0x6ebd6
xorl %r14d, %r14d
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x6ed03
callq 0x2e360
jmp 0x6ed03
movq %rax, %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x6ed18
callq 0x2e360
movq %rbx, %rdi
callq 0x2e730
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findBlackbox(std::vector<AstNode*, std::allocator<AstNode*>> const&)
vector<P4ExprNode*> findBlackbox(const std::vector<AstNode*>& astNodes) {
    vector<P4ExprNode*> ret;
    for (auto node : astNodes) {
        if (typeContains(node, "P4ExprNode")) {
            P4ExprNode* exprNode = dynamic_cast<P4ExprNode*>(node);
            if (exprNode->keyword_->toString().find("blackbox") != string::npos) {
                ret.push_back(exprNode);
            }
        }
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %r15
movq 0x8(%rsi), %r14
cmpq %r14, %r15
je 0x6edf6
leaq -0x50(%rbp), %r13
movq (%r15), %r12
movq %r12, %rdi
leaq 0xb536(%rip), %rsi      # 0x7a299
callq 0x6e968
testb %al, %al
je 0x6ede9
movq %r12, %rdi
leaq 0x1d93a(%rip), %rsi     # 0x8c6b0
leaq 0x1e0bb(%rip), %rdx     # 0x8ce38
xorl %ecx, %ecx
callq 0x2e430
movq %rax, -0x30(%rbp)
movq 0x40(%rax), %rsi
movq (%rsi), %rax
movq %r13, %rdi
callq *(%rax)
movl $0x8, %ecx
movq %r13, %rdi
leaq 0xaf17(%rip), %rsi      # 0x79cba
xorl %edx, %edx
callq 0x2e710
movq %rax, %r12
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x6edbf
callq 0x2e360
cmpq $-0x1, %r12
je 0x6ede9
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6eddd
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x6ede9
movq %rbx, %rdi
leaq -0x30(%rbp), %rdx
callq 0x709b0
addq $0x8, %r15
cmpq %r14, %r15
jne 0x6ed56
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6ee0c
jmp 0x6ee0c
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6ee1c
callq 0x2e360
movq %r14, %rdi
callq 0x2e730
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findMalleableRefs(std::vector<MblRefNode*, std::allocator<MblRefNode*>>*, std::vector<AstNode*, std::allocator<AstNode*>> const&)
void findMalleableRefs(vector<MblRefNode*>* varRefs,
                      const vector<AstNode*>& astNodes) {
    for (AstNode* node : astNodes) {
        if (typeContains(node, "MblRefNode")) {
            MblRefNode* varRef = dynamic_cast<MblRefNode*>(node);
            varRefs->push_back(varRef);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r12
movq 0x8(%rsi), %r13
cmpq %r13, %r12
je 0x6eff2
movq %rdi, %rbx
leaq 0x6e7f(%rip), %r14      # 0x75e10
movq (%r12), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6e968
testb %al, %al
je 0x6efe9
testq %r15, %r15
je 0x6efc3
movq %r15, %rdi
leaq 0x1d6fd(%rip), %rsi     # 0x8c6b0
leaq 0x1e53e(%rip), %rdx     # 0x8d4f8
xorl %ecx, %ecx
callq 0x2e430
jmp 0x6efc5
xorl %eax, %eax
movq %rax, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6efdd
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x6efe9
movq %rbx, %rdi
leaq -0x30(%rbp), %rdx
callq 0x715b4
addq $0x8, %r12
cmpq %r13, %r12
jne 0x6ef91
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findTableActionStmts(std::vector<AstNode*, std::allocator<AstNode*>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
unordered_map<TableActionStmtNode*, TableNode*> findTableActionStmts(
            const vector<AstNode*>& astNodes, const string& actionName) {
    auto ret = unordered_map<TableActionStmtNode*, TableNode*>();

    for (auto node : astNodes) {
        if (typeContains(node, "TableNode") && !typeContains(node, "P4R")) {
            TableNode* table = dynamic_cast<TableNode*>(node);
            TableActionStmtsNode* actions = table->actions_;
            for (TableActionStmtNode* tas : *actions->list_) {
                if (*tas->name_->word_ == actionName) {
                    ret.emplace(tas, table);
                    break;
                }
            }
        }
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, -0x38(%rbp)
movq $0x0, 0x20(%rdi)
leaq 0x30(%rdi), %rax
movq %rax, (%rdi)
movq $0x1, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movl $0x3f800000, 0x20(%rdi) # imm = 0x3F800000
movq %rdi, -0x30(%rbp)
movups %xmm0, 0x28(%rdi)
movq (%rsi), %r14
movq 0x8(%rsi), %rbx
cmpq %rbx, %r14
je 0x6f130
leaq 0x8b97(%rip), %r15      # 0x77bf1
leaq 0x8869(%rip), %r13      # 0x778ca
movq %rbx, -0x40(%rbp)
movq (%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x6e968
testb %al, %al
je 0x6f123
movq %r12, %rdi
movq %r13, %rsi
callq 0x6e968
testb %al, %al
jne 0x6f123
movq %r12, %rdi
leaq 0x1d618(%rip), %rsi     # 0x8c6b0
leaq 0x1de29(%rip), %rdx     # 0x8cec8
xorl %ecx, %ecx
callq 0x2e430
movq %rax, -0x50(%rbp)
movq 0x50(%rax), %rax
movq 0x40(%rax), %rax
movq (%rax), %r15
movq 0x8(%rax), %rbx
cmpq %rbx, %r15
je 0x6f111
movq -0x38(%rbp), %rax
movq (%rax), %r13
movq 0x8(%rax), %r12
movq (%r15), %rax
movq %rax, -0x48(%rbp)
movq 0x40(%rax), %rax
movq 0x40(%rax), %rax
cmpq %r12, 0x8(%rax)
jne 0x6f0f5
testq %r12, %r12
je 0x6f100
movq (%rax), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2e3c0
testl %eax, %eax
je 0x6f100
addq $0x8, %r15
cmpq %rbx, %r15
jne 0x6f0c9
jmp 0x6f111
movq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x7168a
movq -0x40(%rbp), %rbx
leaq 0x8ad5(%rip), %r15      # 0x77bf1
leaq 0x87a7(%rip), %r13      # 0x778ca
addq $0x8, %r14
cmpq %rbx, %r14
jne 0x6f065
movq -0x30(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6f145
movq %rax, %r14
movq -0x30(%rbp), %rdi
callq 0x6dec8
movq %r14, %rdi
callq 0x2e730
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findTableReadStmt(TableNode const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool findTableReadStmt(const TableNode& table, const string& fieldName) {
    TableReadStmtsNode* reads = table.reads_;
    for (TableReadStmtNode* trs : *reads->list_) {
        if (typeContains(trs->field_, "StrNode")) {
            StrNode* sn = dynamic_cast<StrNode*>(trs->field_);
            if (*sn->word_ == fieldName) {
                return true;
            }
        }
    }

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x48(%rdi), %rax
movq 0x40(%rax), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
cmpq %r12, %r15
je 0x6f1df
movq %rsi, %rbx
leaq 0xb13f(%rip), %r14      # 0x7a2c4
movq (%r15), %r13
movq 0x40(%r13), %rdi
movq %r14, %rsi
callq 0x6e968
testb %al, %al
je 0x6f1d6
movq 0x40(%r13), %rdi
leaq 0x1d50d(%rip), %rsi     # 0x8c6b0
leaq 0x1d916(%rip), %rdx     # 0x8cac0
xorl %ecx, %ecx
callq 0x2e430
movq 0x40(%rax), %rax
movq 0x8(%rax), %rdx
cmpq 0x8(%rbx), %rdx
jne 0x6f1d6
movb $0x1, %r13b
testq %rdx, %rdx
je 0x6f1e2
movq (%rbx), %rsi
movq (%rax), %rdi
callq 0x2e3c0
testl %eax, %eax
je 0x6f1e2
addq $0x8, %r15
cmpq %r12, %r15
jne 0x6f185
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findAndTransformMblRefsInAction(ActionNode*, std::vector<MblRefNode*, std::allocator<MblRefNode*>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void findAndTransformMblRefsInAction(ActionNode* action,
                                     vector<MblRefNode*>* varRefs,
                                     const string& varName,
                                     const string& altHeader,
                                     const string& altField) {

    for (ActionStmtNode* as : *action->stmts_->list_) {
        for (BodyWordNode* bw : *as->args_->list_) {
            if (bw->wordType_ != BodyWordNode::VARREF) {
                continue;
            }

            auto varRef = dynamic_cast<MblRefNode*>(bw->contents_);
            if (*varRef->name_->word_ == varName) {
                varRef->transform(altHeader, altField);
            } else if (varRefs && !varRef->transformed_) {
                varRefs->push_back(dynamic_cast<MblRefNode*>(bw->contents_));
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
movq %rdx, -0x30(%rbp)
movq 0x50(%rdi), %rax
movq 0x40(%rax), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq %rax, %rcx
je 0x6f33b
movq %rsi, %r12
movq %rcx, -0x40(%rbp)
movq (%rcx), %rax
movq 0x58(%rax), %rax
movq 0x40(%rax), %rax
movq (%rax), %rbx
movq 0x8(%rax), %r15
cmpq %r15, %rbx
je 0x6f329
movq (%rbx), %rax
cmpl $0x0, 0x3c(%rax)
je 0x6f25e
addq $0x8, %rbx
jmp 0x6f246
movq 0x40(%rax), %r14
testq %r14, %r14
je 0x6f284
movq %r14, %rdi
leaq 0x1d43f(%rip), %rsi     # 0x8c6b0
leaq 0x1e280(%rip), %rdx     # 0x8d4f8
xorl %ecx, %ecx
callq 0x2e430
movq %rax, %r13
jmp 0x6f287
xorl %r13d, %r13d
movq 0x80(%r13), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rdx
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rdx
jne 0x6f2b8
testq %rdx, %rdx
je 0x6f2e3
movq -0x30(%rbp), %rcx
movq (%rcx), %rsi
movq (%rax), %rdi
callq 0x2e3c0
testl %eax, %eax
je 0x6f2e3
testq %r12, %r12
je 0x6f258
cmpb $0x0, 0x39(%r13)
jne 0x6f258
testq %r14, %r14
je 0x6f2f8
movq %r14, %rdi
leaq 0x1d3dd(%rip), %rsi     # 0x8c6b0
leaq 0x1e21e(%rip), %rdx     # 0x8d4f8
xorl %ecx, %ecx
callq 0x2e430
jmp 0x6f2fa
movq %r13, %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x3deb8
jmp 0x6f258
xorl %eax, %eax
movq %rax, -0x58(%rbp)
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x6f318
movq %rax, (%rsi)
addq $0x8, 0x8(%r12)
jmp 0x6f258
movq %r12, %rdi
leaq -0x58(%rbp), %rdx
callq 0x6e260
jmp 0x6f258
movq -0x40(%rbp), %rcx
addq $0x8, %rcx
cmpq -0x38(%rbp), %rcx
jne 0x6f230
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findInitBlock(std::vector<AstNode*, std::allocator<AstNode*>>)
P4RInitBlockNode* findInitBlock(std::vector<AstNode*> astNodes){
    // Currently get a single node, easily generalize to multiple distributed init/reaction block
	for (auto node : astNodes) {
		if (node->nodeType_.find(string("InitBlockNode")) != string::npos) {
			P4RInitBlockNode * iNode = dynamic_cast<P4RInitBlockNode *>(node);
			return iNode;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %r14
movq 0x8(%rdi), %r15
cmpq %r15, %r14
je 0x6f401
leaq -0x38(%rbp), %r12
movq (%r14), %r13
movq %r12, -0x48(%rbp)
leaq -0x48(%rbp), %rdi
leaq 0xaf15(%rip), %rsi      # 0x7a2b6
leaq 0xaf1b(%rip), %rdx      # 0x7a2c3
callq 0x32e40
leaq 0x10(%r13), %rdi
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rcx
xorl %edx, %edx
callq 0x2e710
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x6f3d1
callq 0x2e360
cmpq $-0x1, %rbx
jne 0x6f3e2
addq $0x8, %r14
cmpq %r15, %r14
jne 0x6f38f
jmp 0x6f401
testq %r13, %r13
je 0x6f401
leaq 0x1d2c2(%rip), %rsi     # 0x8c6b0
leaq 0x1e0a3(%rip), %rdx     # 0x8d498
movq %r13, %rdi
xorl %ecx, %ecx
callq 0x2e430
jmp 0x6f403
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findReaction(std::vector<AstNode*, std::allocator<AstNode*>>)
P4RReactionNode* findReaction(std::vector<AstNode*> astNodes){
	for (auto node : astNodes) {
		if (node->nodeType_.find(string("ReactionNode")) != string::npos) {
			P4RReactionNode * reactionNode = dynamic_cast<P4RReactionNode *>(node);
			return reactionNode;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %r14
movq 0x8(%rdi), %r15
cmpq %r15, %r14
je 0x6f4a5
leaq -0x38(%rbp), %r12
movq (%r14), %r13
movq %r12, -0x48(%rbp)
leaq -0x48(%rbp), %rdi
leaq 0xa6d0(%rip), %rsi      # 0x79b15
leaq 0xa6d5(%rip), %rdx      # 0x79b21
callq 0x32e40
leaq 0x10(%r13), %rdi
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rcx
xorl %edx, %edx
callq 0x2e710
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x6f475
callq 0x2e360
cmpq $-0x1, %rbx
jne 0x6f486
addq $0x8, %r14
cmpq %r15, %r14
jne 0x6f433
jmp 0x6f4a5
testq %r13, %r13
je 0x6f4a5
leaq 0x1d21e(%rip), %rsi     # 0x8c6b0
leaq 0x1e017(%rip), %rdx     # 0x8d4b0
movq %r13, %rdi
xorl %ecx, %ecx
callq 0x2e430
jmp 0x6f4a7
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findP4RegisterNode(std::vector<AstNode*, std::allocator<AstNode*>> const&)
vector<P4RegisterNode*> findP4RegisterNode(const vector<AstNode*>& astNodes) {
    vector<P4RegisterNode*> ret;
    for (auto node : astNodes) {
        if (typeContains(node, "P4RegisterNode")) {
            ret.push_back(dynamic_cast<P4RegisterNode*>(node));
        }
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %r12
movq 0x8(%rsi), %r13
cmpq %r13, %r12
je 0x6f549
leaq 0x75ec(%rip), %r14      # 0x76ad4
movq (%r12), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6e968
testb %al, %al
je 0x6f540
testq %r15, %r15
je 0x6f51a
movq %r15, %rdi
leaq 0x1d1a6(%rip), %rsi     # 0x8c6b0
leaq 0x1d90f(%rip), %rdx     # 0x8ce20
xorl %ecx, %ecx
callq 0x2e430
jmp 0x6f51c
xorl %eax, %eax
movq %rax, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6f534
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x6f540
movq %rbx, %rdi
leaq -0x30(%rbp), %rdx
callq 0x7192a
addq $0x8, %r12
cmpq %r13, %r12
jne 0x6f4e8
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6f55d
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6f56d
callq 0x2e360
movq %r14, %rdi
callq 0x2e730
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findReactionArgs(std::vector<AstNode*, std::allocator<AstNode*>> const&)
vector<ReactionArgNode*> findReactionArgs(const vector<AstNode*>& astNodes) {
    vector<ReactionArgNode*> ret;
    // Find all the argument nodes
    for (auto node : astNodes) {
        if (typeContains(node, "ReactionArgNode")) {
            ret.push_back(dynamic_cast<ReactionArgNode*>(node));
        }
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %r12
movq 0x8(%rsi), %r13
cmpq %r13, %r12
je 0x6f608
leaq 0xad25(%rip), %r14      # 0x7a2cc
movq (%r12), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6e968
testb %al, %al
je 0x6f5ff
testq %r15, %r15
je 0x6f5d9
movq %r15, %rdi
leaq 0x1d0e7(%rip), %rsi     # 0x8c6b0
leaq 0x1df10(%rip), %rdx     # 0x8d4e0
xorl %ecx, %ecx
callq 0x2e430
jmp 0x6f5db
xorl %eax, %eax
movq %rax, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6f5f3
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x6f5ff
movq %rbx, %rdi
leaq -0x30(%rbp), %rdx
callq 0x71a64
addq $0x8, %r12
cmpq %r13, %r12
jne 0x6f5a7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6f61c
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6f62c
callq 0x2e360
movq %r14, %rdi
callq 0x2e730
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findAndRemoveReactions(std::vector<P4RReactionNode*, std::allocator<P4RReactionNode*>>*, std::vector<AstNode*, std::allocator<AstNode*>> const&)
void findAndRemoveReactions(vector<P4RReactionNode*>* reactions,
                            const vector<AstNode*>& astNodes) {
    // Find all the malleables
    for (auto n : astNodes) {
        if (typeContains(n, "P4RReactionNode")) {
            auto r = dynamic_cast<P4RReactionNode*>(n);
            reactions->push_back(r);
            n->removed_ = true;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r12
movq 0x8(%rsi), %r13
cmpq %r13, %r12
je 0x6fce2
movq %rdi, %rbx
leaq 0x9e96(%rip), %r14      # 0x79b12
movq (%r12), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6e968
testb %al, %al
je 0x6fcd9
testq %r15, %r15
je 0x6fcae
movq %r15, %rdi
leaq 0x1ca12(%rip), %rsi     # 0x8c6b0
leaq 0x1d80b(%rip), %rdx     # 0x8d4b0
xorl %ecx, %ecx
callq 0x2e430
jmp 0x6fcb0
xorl %eax, %eax
movq %rax, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6fcc8
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x6fcd4
movq %rbx, %rdi
leaq -0x30(%rbp), %rdx
callq 0x721f6
movb $0x1, 0x38(%r15)
addq $0x8, %r12
cmpq %r13, %r12
jne 0x6fc7c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findTblInIng(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<AstNode*, std::allocator<AstNode*>> const&)
bool findTblInIng(string tableName, const vector<AstNode*>& nodeArray) {
    P4ExprNode* ing_node = findIngress(nodeArray);
    P4ExprNode* egr_node = findEgress(nodeArray);
    // Currently assume that control ing/egr doesn't wrap other control blocks (otherwise requires recursive search)
    if(ing_node==NULL || egr_node==NULL) {
        PANIC("Missing ing/egr node for %s\n", tableName.c_str());
    }
    if(ing_node->body_->toString().find(tableName) != string::npos) {
        return true;
    } else if (egr_node->body_->toString().find(tableName) != string::npos) {
        return false;
    } else {
        PANIC("Failed to locate %s in ing/egr control block\n", tableName.c_str());
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x6ea2c
movq %rax, %r14
movq %r15, %rdi
callq 0x6eba6
testq %r14, %r14
je 0x6fdb6
movq %rax, %r15
testq %rax, %rax
je 0x6fdb6
movq 0x60(%r14), %rsi
movq (%rsi), %rax
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq *(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
movq %r12, %rdi
xorl %edx, %edx
callq 0x2e710
movq %rax, %r14
movq (%r12), %rdi
leaq -0x38(%rbp), %r13
cmpq %r13, %rdi
je 0x6fd66
callq 0x2e360
cmpq $-0x1, %r14
jne 0x6fda0
movq 0x60(%r15), %rsi
movq (%rsi), %rax
movq %r12, %rdi
callq *(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
movq %r12, %rdi
xorl %edx, %edx
callq 0x2e710
movq %rax, %r15
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x6fd9a
callq 0x2e360
cmpq $-0x1, %r15
je 0x6fdbe
cmpq $-0x1, %r14
setne %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2f140
movq %rbx, %rdi
callq 0x2f103
// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/find_nodes.cpp
// Function: findRegargWidth(ReactionArgNode*, std::vector<AstNode*, std::allocator<AstNode*>>)
int findRegargWidth(ReactionArgNode* regarg, std::vector<AstNode*> nodeArray) {
    vector<P4RegisterNode*> regNodes = findP4RegisterNode(nodeArray);
    for(auto reg : regNodes) {
        if(reg->name_->toString().compare(regarg->toString())==0) {
            return reg->width_;
        }
    }
    PANIC("Non existing reg arg %s\n", regarg->toString().c_str());
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, -0x30(%rbp)
leaq -0x90(%rbp), %r14
movq %r14, %rdi
callq 0x6f4b6
movq (%r14), %r13
movq 0x8(%r14), %rax
movq %rax, -0x58(%rbp)
cmpq %rax, %r13
je 0x70881
movq (%r13), %r15
movq 0x40(%r15), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *(%rax)
movq -0x30(%rbp), %rsi
movq (%rsi), %rax
leaq -0x78(%rbp), %rdi
callq *(%rax)
movq -0x48(%rbp), %r14
movq -0x78(%rbp), %r12
movq -0x70(%rbp), %rbx
cmpq %r14, %rbx
movq %r14, %rdx
cmovbq %rbx, %rdx
testq %rdx, %rdx
je 0x70844
movq -0x50(%rbp), %rdi
movq %r12, %rsi
callq 0x2e3c0
testl %eax, %eax
je 0x70844
xorl %r14d, %r14d
jmp 0x7084b
cmpq %rbx, %r14
sete %r14b
leaq -0x68(%rbp), %rax
cmpq %rax, %r12
je 0x7085c
movq %r12, %rdi
callq 0x2e360
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x7086e
callq 0x2e360
testb %r14b, %r14b
jne 0x708a4
addq $0x8, %r13
cmpq -0x58(%rbp), %r13
jne 0x707f6
movq 0x1d738(%rip), %rax     # 0x8dfc0
movq (%rax), %r14
movq -0x30(%rbp), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *(%rax)
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x2f290
movl 0x50(%r15), %ebx
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x708b9
callq 0x2e360
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x708cc
movq %rax, %rbx
jmp 0x708e6
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x708e6
callq 0x2e360
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x708f7
callq 0x2e360
movq %rbx, %rdi
callq 0x2e730
nop