// File: /workspace/github_cpp_makefile_star2_O2/eniac[P]Mantis/src/compile/compile_p4.cpp
// Function: generateExportControl(std::vector<AstNode*, std::allocator<AstNode*>>*, std::vector<std::pair<std::vector<std::pair<ReactionArgNode*, int>, std::allocator<std::pair<ReactionArgNode*, int>>>, int>, std::allocator<std::pair<std::vector<std::pair<ReactionArgNode*, int>, std::allocator<std::pair<ReactionArgNode*, int>>>, int>>> const&, std::vector<std::pair<std::vector<std::pair<ReactionArgNode*, int>, std::allocator<std::pair<ReactionArgNode*, int>>>, int>, std::allocator<std::pair<std::vector<std::pair<ReactionArgNode*, int>, std::allocator<std::pair<ReactionArgNode*, int>>>, int>>> const&)
void generateExportControl(vector<AstNode*>* newNodes,
                           const vector<ReactionArgBin>& argBinsIng, const vector<ReactionArgBin>& argBinsEgr){
    ostringstream oss;
    oss << "control " << kSetargsIngControlName << " {\n";
    for (int i = 0; i < argBinsIng.size(); ++i) {
        oss << "  apply(__tiPack" << i << ");\n";
        oss << "  apply(__tiSetArgs" << i << ");\n";
    }
    oss << "}\n\n";

    newNodes->push_back(new UnanchoredNode(new string(oss.str()),
                                           new string("control"),
                                           new string(kSetargsIngControlName)));

    oss.str("");
    oss << "control " << kSetargsEgrControlName << " {\n";
    for (int i = 0; i < argBinsEgr.size(); ++i) {
        oss << "  apply(__tePack" << i << ");\n";
        oss << "  apply(__teSetArgs" << i << ");\n";
    }
    oss << "}\n\n";

    newNodes->push_back(new UnanchoredNode(new string(oss.str()),
                                           new string("control"),
                                           new string(kSetargsEgrControlName)));

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, -0x38(%rbp)
leaq -0x1d0(%rbp), %rbx
movq %rbx, %rdi
callq 0x415a0
leaq 0x11d92(%rip), %rsi     # 0x7cbf1
movq %rbx, %rdi
callq 0x413d0
leaq 0x11c0f(%rip), %rsi     # 0x7ca7d
movq %rax, %rdi
callq 0x413d0
leaq 0x11de2(%rip), %rsi     # 0x7cc5f
movq %rax, %rdi
callq 0x413d0
xorl %r12d, %r12d
leaq 0xdf75(%rip), %r13      # 0x78e04
movq 0x8(%r15), %rax
subq (%r15), %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x6aeee
movq %rbx, %rdi
leaq 0x11d51(%rip), %rsi     # 0x7cbfa
callq 0x413d0
movq %rax, %rdi
movl %r12d, %esi
callq 0x41760
movq %rax, %rdi
movq %r13, %rsi
callq 0x413d0
movq %rbx, %rdi
leaq 0x11d3d(%rip), %rsi     # 0x7cc0b
callq 0x413d0
movq %rax, %rdi
movl %r12d, %esi
callq 0x41760
movq %rax, %rdi
movq %r13, %rsi
callq 0x413d0
incq %r12
jmp 0x6ae8f
leaq 0x12228(%rip), %rsi     # 0x7d11d
leaq -0x1d0(%rbp), %rdi
callq 0x413d0
pushq $0x58
popq %rdi
callq 0x413f0
movq %rax, %r12
pushq $0x20
popq %rdi
callq 0x413f0
movq %rax, %r15
leaq -0x1c8(%rbp), %rsi
movq %rax, %rdi
callq 0x416b0
pushq $0x20
popq %rdi
callq 0x413f0
movq %rax, %r13
leaq 0x11ce7(%rip), %rsi     # 0x7cc1f
leaq -0x29(%rbp), %rdx
movq %rax, %rdi
callq 0x411c0
pushq $0x20
popq %rdi
callq 0x413f0
movq %rax, %rbx
leaq 0x11b27(%rip), %rsi     # 0x7ca7d
leaq -0x2a(%rbp), %rdx
movq %rax, %rdi
callq 0x411c0
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x4dd8e
leaq -0x58(%rbp), %rsi
movq %r12, (%rsi)
movq -0x38(%rbp), %rdi
callq 0x44d46
leaq 0xf931(%rip), %rsi      # 0x7a8bb
leaq -0x58(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x411c0
leaq -0x58(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x41670
leaq -0x58(%rbp), %rdi
callq 0x418c8
leaq 0x11c3a(%rip), %rsi     # 0x7cbf1
leaq -0x1d0(%rbp), %rdi
callq 0x413d0
leaq 0x11b70(%rip), %rsi     # 0x7cb3a
movq %rax, %rdi
callq 0x413d0
leaq 0x11c86(%rip), %rsi     # 0x7cc5f
movq %rax, %rdi
callq 0x413d0
xorl %r12d, %r12d
leaq -0x1d0(%rbp), %rbx
leaq 0xde12(%rip), %r15      # 0x78e04
leaq 0x11c3f(%rip), %r13     # 0x7cc38
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x6b054
movq %rbx, %rdi
leaq 0x11c14(%rip), %rsi     # 0x7cc27
callq 0x413d0
movq %rax, %rdi
movl %r12d, %esi
callq 0x41760
movq %rax, %rdi
movq %r15, %rsi
callq 0x413d0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x413d0
movq %rax, %rdi
movl %r12d, %esi
callq 0x41760
movq %rax, %rdi
movq %r15, %rsi
callq 0x413d0
incq %r12
jmp 0x6aff9
leaq 0x120c2(%rip), %rsi     # 0x7d11d
leaq -0x1d0(%rbp), %rdi
callq 0x413d0
pushq $0x58
popq %rdi
callq 0x413f0
movq %rax, %r14
pushq $0x20
popq %rdi
callq 0x413f0
movq %rax, %r15
movq %rax, %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x416b0
pushq $0x20
popq %rdi
callq 0x413f0
movq %rax, %r12
leaq 0x11b81(%rip), %rsi     # 0x7cc1f
leaq -0x29(%rbp), %rdx
movq %rax, %rdi
callq 0x411c0
pushq $0x20
popq %rdi
callq 0x413f0
movq %rax, %rbx
leaq 0x11a7e(%rip), %rsi     # 0x7cb3a
leaq -0x2a(%rbp), %rdx
movq %rax, %rdi
callq 0x411c0
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x4dd8e
leaq -0x58(%rbp), %rsi
movq %r14, (%rsi)
movq -0x38(%rbp), %rdi
callq 0x44d46
leaq -0x1d0(%rbp), %rdi
callq 0x410e0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6b182
jmp 0x6b161
movq %rax, %r13
movq %rbx, %rdi
jmp 0x6b123
jmp 0x6b161
movq %rax, %r13
movq %r12, %rdi
jmp 0x6b123
movq %rax, %r13
movq %r15, %rdi
callq 0x413a0
jmp 0x6b164
jmp 0x6b182
movq %rax, %r13
leaq -0x58(%rbp), %rdi
callq 0x418c8
jmp 0x6b185
jmp 0x6b182
jmp 0x6b182
jmp 0x6b16e
movq %rax, %r14
movq %rbx, %rdi
jmp 0x6b158
jmp 0x6b16e
movq %rax, %r14
movq %r13, %rdi
jmp 0x6b158
movq %rax, %r14
movq %r15, %rdi
callq 0x413a0
jmp 0x6b171
jmp 0x6b182
movq %rax, %r13
movq %r14, %rdi
callq 0x413a0
jmp 0x6b185
movq %rax, %r14
movq %r12, %rdi
callq 0x413a0
movq %r14, %r13
jmp 0x6b185
jmp 0x6b182
jmp 0x6b182
movq %rax, %r13
leaq -0x1d0(%rbp), %rdi
callq 0x410e0
movq %r13, %rdi
callq 0x41790