// File: /workspace/github_cpp_makefile_star2_O1/eniac[P]Mantis/src/compile/compile_c.cpp
// Function: generatePrologueNode(std::vector<AstNode*, std::allocator<AstNode*>>, std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&)
UnanchoredNode* generatePrologueNode(std::vector<AstNode*> nodeArray, ostringstream& oss_mbl_init, ostringstream& oss_init_end) {

    P4RInitBlockNode * init_node = findInitBlock(nodeArray);

    string * prologue_str = NULL;
    if (init_node != 0) {
        prologue_str = new string(
            str(boost::format(kPrologueT) % oss_mbl_init.str() % init_node -> body_ -> toString() % oss_init_end.str()));
    } else {
        // if no init_block
        prologue_str = new string(
            str(boost::format(kPrologueT) % oss_mbl_init.str() % "" % oss_init_end.str()));
    }

    UnanchoredNode* prologue_cnode = new UnanchoredNode(prologue_str, new string ("prologue"), new string("pd_prologue"));
    return prologue_cnode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rsi
leaq -0x188(%rbp), %rbx
movq %rbx, %rdi
callq 0x32d96
movq %rbx, %rdi
callq 0x6fdcd
movq %rax, %r12
movq -0x188(%rbp), %rdi
testq %rdi, %rdi
je 0x40958
callq 0x2e360
movl $0x20, %edi
callq 0x2e3a0
movq %rax, -0x30(%rbp)
testq %r12, %r12
je 0x40a46
leaq 0x35cd5(%rip), %rsi     # 0x7664b
leaq -0x170(%rbp), %rdi
callq 0x50a34
addq $0x8, %r15
leaq -0x70(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x2e660
leaq -0x50(%rbp), %rsi
movq %r13, (%rsi)
leaq 0x14535(%rip), %r13     # 0x54ed8
movq %r13, 0x8(%rsi)
leaq 0x14530(%rip), %rbx     # 0x54ede
movq %rbx, 0x10(%rsi)
leaq -0x170(%rbp), %rdi
callq 0x53d75
movq %rax, %r15
movq 0x48(%r12), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %r12
movq %r12, %rdi
callq *(%rax)
leaq -0x90(%rbp), %rsi
movq %r12, (%rsi)
movq %r13, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %r15, %rdi
callq 0x53d75
movq %rax, %r15
addq $0x8, %r14
leaq -0x90(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2e660
leaq -0x1a0(%rbp), %rsi
movq %r12, (%rsi)
movq %r13, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %r15, %rdi
callq 0x53d75
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x54ef2
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40afd
callq 0x2e360
jmp 0x40afd
leaq 0x35bfe(%rip), %rsi     # 0x7664b
leaq -0x170(%rbp), %rdi
callq 0x50a34
addq $0x8, %r15
leaq -0x70(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2e660
leaq -0x50(%rbp), %rsi
movq %r12, (%rsi)
leaq 0x1445e(%rip), %rbx     # 0x54ed8
movq %rbx, 0x8(%rsi)
leaq 0x14459(%rip), %r13     # 0x54ede
movq %r13, 0x10(%rsi)
leaq -0x170(%rbp), %rdi
callq 0x53d75
leaq 0x36e3f(%rip), %rcx     # 0x778db
leaq -0x50(%rbp), %rsi
movq %rcx, (%rsi)
leaq 0x149fd(%rip), %rcx     # 0x554a7
movq %rcx, 0x8(%rsi)
leaq 0x149f8(%rip), %rcx     # 0x554ad
movq %rcx, 0x10(%rsi)
movq %rax, %rdi
callq 0x53d75
movq %rax, %r15
addq $0x8, %r14
leaq -0x50(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2e660
leaq -0x90(%rbp), %rsi
movq %r12, (%rsi)
movq %rbx, 0x8(%rsi)
movq %r13, 0x10(%rsi)
movq %r15, %rdi
callq 0x53d75
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x54ef2
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40b0f
callq 0x2e360
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40b21
callq 0x2e360
cmpb $0x1, -0xa0(%rbp)
jne 0x40b3e
leaq -0x98(%rbp), %r14
movq %r14, %rdi
callq 0x2e580
movb $0x0, -0x8(%r14)
leaq -0xf8(%rbp), %r14
movq %r14, %rdi
callq 0x50d82
movq -0x28(%r14), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x40b62
callq 0x2e360
movq -0x158(%rbp), %rdi
testq %rdi, %rdi
je 0x40b96
callq 0x2e360
xorl %eax, %eax
movq %rax, -0x158(%rbp)
movl %eax, -0x150(%rbp)
movq %rax, -0x148(%rbp)
movl %eax, -0x140(%rbp)
movq %rax, -0x138(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x50de0
movl $0x58, %edi
callq 0x2e3a0
movq %rax, %r15
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
movb $0x1, %bl
leaq 0x35b1a(%rip), %rsi     # 0x766e7
leaq 0x35b1b(%rip), %rdx     # 0x766ef
movq %r12, %rdi
callq 0x33112
xorl %ebx, %ebx
movl $0x20, %edi
callq 0x2e3a0
movq %rax, %r13
addq $0x10, %rax
movq %rax, (%r13)
movb $0x1, %bl
leaq 0x35ae8(%rip), %rsi     # 0x766e4
leaq 0x35aec(%rip), %rdx     # 0x766ef
movq %r13, %rdi
callq 0x33112
xorl %ebx, %ebx
movq %r15, %rdi
movq -0x30(%rbp), %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x3e566
movq %r15, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x40c51
jmp 0x40c42
jmp 0x40c47
jmp 0x40c4c
jmp 0x40c4c
jmp 0x40c51
jmp 0x40c51
movq %rax, %r14
jmp 0x40ca5
movq %rax, %r14
jmp 0x40cb1
movq %rax, %r14
jmp 0x40c81
movq %rax, %r14
jmp 0x40c93
movq %rax, %r14
jmp 0x40cd9
movq %rax, %r14
movq -0x188(%rbp), %rdi
testq %rdi, %rdi
jne 0x40cdc
jmp 0x40ce1
movq %rax, %r14
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40c81
callq 0x2e360
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40c93
callq 0x2e360
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40ca5
callq 0x2e360
leaq -0x170(%rbp), %rdi
callq 0x50b98
movq -0x30(%rbp), %rdi
jmp 0x40cdc
movq %rax, %r14
testb %bl, %bl
je 0x40cc6
movq %r13, %rdi
callq 0x2e360
xorl %ebx, %ebx
jmp 0x40ccd
movq %rax, %r14
testb %bl, %bl
je 0x40cd9
movq %r12, %rdi
callq 0x2e360
movq %r15, %rdi
callq 0x2e360
movq %r14, %rdi
callq 0x2e730