// File: /workspace/github_cpp_makefile_star2_O1/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 $0x1b8, %rsp            # imm = 0x1B8
movq %rdx, -0x40(%rbp)
movq %rsi, %r15
movq %rdi, -0x30(%rbp)
leaq -0x1d8(%rbp), %rbx
movq %rbx, %rdi
callq 0x2e550
leaq 0x1419c(%rip), %rsi     # 0x79b61
movl $0x8, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x14014(%rip), %rsi     # 0x799ed
leaq -0x1d8(%rbp), %rdi
movl $0xb, %edx
callq 0x2e440
leaq 0x141de(%rip), %rsi     # 0x79bcf
leaq -0x1d8(%rbp), %rdi
movl $0x3, %edx
callq 0x2e440
movq 0x8(%r15), %rax
cmpq (%r15), %rax
je 0x65a89
xorl %r12d, %r12d
leaq 0x1040f(%rip), %r14     # 0x75e24
leaq 0x1415f(%rip), %r13     # 0x79b7b
movl $0x10, %edx
movq %rbx, %rdi
leaq 0x1413f(%rip), %rsi     # 0x79b6a
callq 0x2e440
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2e700
movl $0x3, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2e440
movl $0x13, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2e440
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2e700
movl $0x3, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2e440
incq %r12
movq 0x8(%r15), %rax
subq (%r15), %rax
sarq $0x5, %rax
cmpq %r12, %rax
ja 0x65a1c
leaq 0x145fd(%rip), %rsi     # 0x7a08d
leaq -0x1d8(%rbp), %rdi
movl $0x3, %edx
callq 0x2e440
movl $0x58, %edi
callq 0x2e3a0
movq %rax, %r12
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r14
leaq -0x1d0(%rbp), %rsi
movq %rax, %rdi
callq 0x2e660
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r13
addq $0x10, %rax
movq %rax, (%r13)
movb $0x1, %al
movl %eax, -0x34(%rbp)
leaq 0x140a4(%rip), %rsi     # 0x79b8f
leaq 0x140a4(%rip), %rdx     # 0x79b96
movb $0x1, %bl
movq %r13, %rdi
callq 0x33112
xorl %ebx, %ebx
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r15
addq $0x10, %rax
movq %rax, (%r15)
movb $0x1, %al
movl %eax, -0x34(%rbp)
leaq 0x13ecf(%rip), %rsi     # 0x799ed
leaq 0x13ed3(%rip), %rdx     # 0x799f8
movb $0x1, %bl
movq %r15, %rdi
callq 0x33112
xorl %ebx, %ebx
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x3e566
movq %r12, -0x60(%rbp)
movq -0x30(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x65b5e
movq %r12, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x65b70
xorl %ebx, %ebx
leaq -0x60(%rbp), %rdx
movl $0x0, -0x34(%rbp)
callq 0x333de
leaq -0x50(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x11d5c(%rip), %rdx     # 0x778db
leaq -0x60(%rbp), %rdi
movq %rdx, %rsi
callq 0x33112
leaq -0x60(%rbp), %rsi
leaq -0x1d0(%rbp), %rdi
callq 0x2e610
movq -0x60(%rbp), %rdi
cmpq %rbx, %rdi
je 0x65ba9
callq 0x2e360
leaq 0x13fb1(%rip), %rsi     # 0x79b61
leaq -0x1d8(%rbp), %rdi
movl $0x8, %edx
callq 0x2e440
leaq 0x13ee2(%rip), %rsi     # 0x79aaa
leaq -0x1d8(%rbp), %rdi
movl $0xb, %edx
callq 0x2e440
leaq 0x13fef(%rip), %rsi     # 0x79bcf
leaq -0x1d8(%rbp), %rdi
movl $0x3, %edx
callq 0x2e440
movq -0x40(%rbp), %rcx
movq 0x8(%rcx), %rax
cmpq (%rcx), %rax
je 0x65c8e
xorl %r12d, %r12d
leaq 0x13f8b(%rip), %r13     # 0x79b97
leaq -0x1d8(%rbp), %rbx
leaq 0x1020a(%rip), %r14     # 0x75e24
leaq 0x13f87(%rip), %r15     # 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 %r14, %rsi
callq 0x2e440
movl $0x13, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2e440
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2e700
movl $0x3, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2e440
incq %r12
movq -0x40(%rbp), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x5, %rax
cmpq %r12, %rax
ja 0x65c21
leaq 0x143f8(%rip), %rsi     # 0x7a08d
leaq -0x1d8(%rbp), %rdi
movl $0x3, %edx
callq 0x2e440
movl $0x58, %edi
callq 0x2e3a0
movq %rax, %r14
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r12
movq %rax, %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x2e660
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r15
addq $0x10, %rax
movq %rax, (%r15)
movb $0x1, %al
movl %eax, -0x40(%rbp)
leaq 0x13ea0(%rip), %rsi     # 0x79b8f
leaq 0x13ea0(%rip), %rdx     # 0x79b96
movb $0x1, %bl
movq %r15, %rdi
callq 0x33112
xorl %ebx, %ebx
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r13
addq $0x10, %rax
movq %rax, (%r13)
movb $0x1, %al
movl %eax, -0x40(%rbp)
leaq 0x13d87(%rip), %rsi     # 0x79aaa
leaq 0x13d8b(%rip), %rdx     # 0x79ab5
movb $0x1, %bl
movq %r13, %rdi
callq 0x33112
xorl %ebx, %ebx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x3e566
movq %r14, -0x60(%rbp)
movq -0x30(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x65d63
movq %r14, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x65d75
xorl %ebx, %ebx
leaq -0x60(%rbp), %rdx
movl $0x0, -0x40(%rbp)
callq 0x333de
movq 0x2822c(%rip), %rsi     # 0x8dfa8
leaq -0x1d8(%rbp), %rdi
callq 0x2e230
leaq -0x168(%rbp), %rdi
callq 0x2e150
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, -0x30(%rbp)
movq %r12, %rdi
callq 0x2e360
jmp 0x65df3
jmp 0x65de3
movq %rax, %r14
movq -0x60(%rbp), %rdi
cmpq %rbx, %rdi
je 0x65e6d
callq 0x2e360
jmp 0x65e6d
jmp 0x65e6a
movq %rax, -0x30(%rbp)
movq %r14, %rdi
callq 0x2e360
jmp 0x65e04
movq %rax, -0x30(%rbp)
jmp 0x65e60
movq %rax, -0x30(%rbp)
jmp 0x65e1d
movq %rax, -0x30(%rbp)
movb $0x1, %al
movl %eax, -0x40(%rbp)
jmp 0x65e29
movq %rax, -0x30(%rbp)
jmp 0x65e46
movq %rax, -0x30(%rbp)
movb $0x1, %al
movl %eax, -0x34(%rbp)
jmp 0x65e52
movq %rax, -0x30(%rbp)
testb %bl, %bl
je 0x65e1b
movq %r13, %rdi
callq 0x2e360
xorl %ebx, %ebx
testb %bl, %bl
je 0x65e29
movq %r15, %rdi
callq 0x2e360
cmpb $0x0, -0x40(%rbp)
je 0x65e60
movq %r14, %rdi
jmp 0x65e5b
movq %rax, -0x30(%rbp)
testb %bl, %bl
je 0x65e44
movq %r15, %rdi
callq 0x2e360
xorl %ebx, %ebx
testb %bl, %bl
je 0x65e52
movq %r13, %rdi
callq 0x2e360
cmpb $0x0, -0x34(%rbp)
je 0x65e60
movq %r12, %rdi
callq 0x2e360
movq -0x30(%rbp), %r14
jmp 0x65e6d
jmp 0x65e6a
jmp 0x65e6a
movq %rax, %r14
movq 0x28134(%rip), %rsi     # 0x8dfa8
leaq -0x1d8(%rbp), %rdi
callq 0x2e230
leaq -0x168(%rbp), %rdi
callq 0x2e150
movq %r14, %rdi
callq 0x2e730