// File: /workspace/github_cpp_makefile_star2_O3/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, -0x38(%rbp)
movq %rsi, %r15
movq %rdi, -0x30(%rbp)
leaq -0x1d0(%rbp), %rbx
movq %rbx, %rdi
callq 0x2e550
leaq 0x1480c(%rip), %rsi     # 0x79b61
movl $0x8, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x14684(%rip), %rsi     # 0x799ed
leaq -0x1d0(%rbp), %rdi
movl $0xb, %edx
callq 0x2e440
leaq 0x1484e(%rip), %rsi     # 0x79bcf
leaq -0x1d0(%rbp), %rdi
movl $0x3, %edx
callq 0x2e440
movq 0x8(%r15), %rax
cmpq (%r15), %rax
je 0x65419
xorl %r12d, %r12d
leaq 0x10a7f(%rip), %r13     # 0x75e24
leaq 0x147cf(%rip), %r14     # 0x79b7b
movl $0x10, %edx
movq %rbx, %rdi
leaq 0x147af(%rip), %rsi     # 0x79b6a
callq 0x2e440
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2e700
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2e440
movl $0x13, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e440
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2e700
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2e440
incq %r12
movq 0x8(%r15), %rax
subq (%r15), %rax
sarq $0x5, %rax
cmpq %r12, %rax
ja 0x653ac
leaq 0x14c6d(%rip), %rsi     # 0x7a08d
leaq -0x1d0(%rbp), %rdi
movl $0x3, %edx
callq 0x2e440
movl $0x58, %edi
callq 0x2e3a0
movq %rax, %r12
movl $0x20, %edi
callq 0x2e3a0
movq -0x30(%rbp), %rbx
movq %rax, %r14
leaq -0x1c8(%rbp), %rsi
movq %rax, %rdi
callq 0x2e660
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r15
addq $0x10, %rax
movq %rax, (%r15)
leaq 0x14716(%rip), %rsi     # 0x79b8f
leaq 0x14716(%rip), %rdx     # 0x79b96
movq %r15, %rdi
callq 0x32e40
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r13
addq $0x10, %rax
movq %rax, (%r13)
leaq 0x14549(%rip), %rsi     # 0x799ed
leaq 0x1454d(%rip), %rdx     # 0x799f8
movq %r13, %rdi
callq 0x32e40
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x3e120
movq %r12, -0x58(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x654dc
movq %r12, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x654e8
leaq -0x58(%rbp), %rdx
movq %rbx, %rdi
callq 0x3311a
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x123e4(%rip), %rdx     # 0x778db
leaq -0x58(%rbp), %rdi
movq %rdx, %rsi
callq 0x32e40
leaq -0x58(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x2e610
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x65521
callq 0x2e360
leaq 0x14639(%rip), %rsi     # 0x79b61
leaq -0x1d0(%rbp), %rdi
movl $0x8, %edx
callq 0x2e440
leaq 0x1456a(%rip), %rsi     # 0x79aaa
leaq -0x1d0(%rbp), %rdi
movl $0xb, %edx
callq 0x2e440
leaq 0x14677(%rip), %rsi     # 0x79bcf
leaq -0x1d0(%rbp), %rdi
movl $0x3, %edx
callq 0x2e440
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rax
cmpq (%rcx), %rax
je 0x65606
xorl %r12d, %r12d
leaq 0x14613(%rip), %r13     # 0x79b97
leaq -0x1d0(%rbp), %rbx
leaq 0x10892(%rip), %r15     # 0x75e24
leaq 0x1460f(%rip), %r14     # 0x79ba8
movl $0x10, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2e440
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2e700
movl $0x3, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2e440
movl $0x13, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e440
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2e700
movl $0x3, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2e440
incq %r12
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x5, %rax
cmpq %r12, %rax
ja 0x65599
leaq 0x14a80(%rip), %rsi     # 0x7a08d
leaq -0x1d0(%rbp), %rdi
movl $0x3, %edx
callq 0x2e440
movl $0x58, %edi
callq 0x2e3a0
movq %rax, %r14
movl $0x20, %edi
callq 0x2e3a0
movq -0x30(%rbp), %rbx
movq %rax, %r15
movq %rax, %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x2e660
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
leaq 0x14528(%rip), %rsi     # 0x79b8f
leaq 0x14528(%rip), %rdx     # 0x79b96
movq %r12, %rdi
callq 0x32e40
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r13
addq $0x10, %rax
movq %rax, (%r13)
leaq 0x14418(%rip), %rsi     # 0x79aaa
leaq 0x1441c(%rip), %rdx     # 0x79ab5
movq %r13, %rdi
callq 0x32e40
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x3e120
movq %r14, -0x58(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x656ca
movq %r14, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x656d6
leaq -0x58(%rbp), %rdx
movq %rbx, %rdi
callq 0x3311a
movq 0x288cb(%rip), %rsi     # 0x8dfa8
leaq -0x1d0(%rbp), %rdi
callq 0x2e230
leaq -0x160(%rbp), %rdi
callq 0x2e150
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6577a
jmp 0x6577a
jmp 0x65761
movq %rax, %rbx
movq %r13, %rdi
jmp 0x65725
jmp 0x65761
movq %rax, %rbx
movq %r12, %rdi
jmp 0x65725
movq %rax, %rbx
movq %r15, %rdi
callq 0x2e360
jmp 0x65764
jmp 0x6577a
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
jne 0x6576f
jmp 0x6577d
jmp 0x6577a
jmp 0x65769
movq %rax, %rbx
movq %r13, %rdi
jmp 0x65758
jmp 0x65769
movq %rax, %rbx
movq %r15, %rdi
jmp 0x65758
movq %rax, %rbx
movq %r14, %rdi
callq 0x2e360
jmp 0x6576c
jmp 0x6577a
movq %rax, %rbx
movq %r14, %rdi
jmp 0x6576f
movq %rax, %rbx
movq %r12, %rdi
callq 0x2e360
jmp 0x6577d
jmp 0x6577a
jmp 0x6577a
movq %rax, %rbx
movq 0x28824(%rip), %rsi     # 0x8dfa8
leaq -0x1d0(%rbp), %rdi
callq 0x2e230
leaq -0x160(%rbp), %rdi
callq 0x2e150
movq %rbx, %rdi
callq 0x2e730