// File: /workspace/github_cpp_makefile_star2_O1/eniac[P]Mantis/src/compile/compile_c.cpp
// Function: mirrorFieldArg(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>>&, 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>>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
void mirrorFieldArg(std::vector<AstNode*> nodeArray, ostringstream& oss_reaction_mirror, 
                    ostringstream& oss_preprocessor, vector<ReactionArgBin> bins,
                    string prefix_str, bool forIng) {
    for (int i = 0; i < bins.size(); ++i) {
        // Applies to both cases with/without isolation by indexing __mv
        if(forIng) {
            oss_reaction_mirror << str(boost::format(kIngFieldArgPollT) % std::to_string(bins[i].second) % std::to_string(i) % prefix_str);
        } else {
            oss_reaction_mirror << str(boost::format(kEgrFieldArgPollT) % std::to_string(bins[i].second) % std::to_string(i) % prefix_str);
        }

        // Reverse order
        for (int j = bins[i].first.size()-1; j >= 0; --j) {      
            AstNode* arg_node = bins[i].first[j].first->arg_;
            int width = bins[i].first[j].second;
            std::regex e_dot2underscore ("\\.");
            string field_arg_c = std::regex_replace(arg_node->toString(), e_dot2underscore, "_");

            ostringstream oss_mask_tmp;
            oss_mask_tmp << "0b";
            for (int k = 0; k < width; ++k) {
                oss_mask_tmp << "1";
            }
            if(forIng) {
                oss_reaction_mirror << "\n  uint"
                                    << width
                                    << "_t "
                                    << field_arg_c
                                    << "="
                                    << "__mantis__values_riSetArgs_"
                                    << i
                                    << "[1]&"
                                    << oss_mask_tmp.str()
                                    << ";";    
                oss_reaction_mirror << "\n  __mantis__values_riSetArgs_"
                                    << i
                                    << "[1]>>"
                                    << width
                                    << ";";                   
            } else {
                oss_reaction_mirror << "\n  uint"
                                    << width
                                    << "_t "
                                    << field_arg_c
                                    << "="
                                    << "__mantis__values_reSetArgs_"
                                    << i
                                    << "[1]&"
                                    << oss_mask_tmp.str()
                                    << ";";    
                oss_reaction_mirror << "\n  __mantis__values_reSetArgs_"
                                    << i
                                    << "[1]>>"
                                    << width
                                    << ";";   
            }                                       
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movl %r9d, -0x84(%rbp)
movq %r8, -0xd0(%rbp)
movq %rsi, -0x38(%rbp)
movq 0x8(%rcx), %rax
movq %rcx, -0x80(%rbp)
cmpq (%rcx), %rax
je 0x4224e
leaq -0x250(%rbp), %r13
leaq 0xd8(%r13), %rax
movq %rax, -0xc8(%rbp)
leaq -0x78(%rbp), %r12
movq $0x0, -0x30(%rbp)
cmpb $0x0, -0x84(%rbp)
je 0x41a27
movq %r12, %rbx
movq %r13, %rdi
leaq 0x34e9e(%rip), %rsi     # 0x76845
callq 0x50a34
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
shlq $0x5, %rcx
movl 0x18(%rax,%rcx), %r14d
movl %r14d, %r12d
negl %r12d
cmovsl %r14d, %r12d
movl $0x1, %r15d
cmpl $0xa, %r12d
jb 0x41abc
movl $0x4, %r15d
movl %r12d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x41aaa
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x41ab9
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x41abc
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x419e8
addl $-0x3, %r15d
jmp 0x41abc
movq %r13, %rdi
leaq 0x34f30(%rip), %rsi     # 0x76961
callq 0x50a34
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
shlq $0x5, %rcx
movl 0x18(%rax,%rcx), %r14d
movl %r14d, %ebx
negl %ebx
cmovsl %r14d, %ebx
movl $0x1, %r15d
cmpl $0xa, %ebx
jb 0x41b7b
movl $0x4, %r15d
movl %ebx, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x41ab0
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x41b78
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x41b7b
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x41a6f
addl $-0x3, %r15d
jmp 0x41b7b
addl $-0x2, %r15d
jmp 0x41abc
addl $-0x2, %r15d
jmp 0x41b7b
decl %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq %rbx, %rdi
movl $0x2d, %edx
callq 0x2e460
addq -0x78(%rbp), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x39c27
movq %rbx, -0x58(%rbp)
leaq 0x133e2(%rip), %r12     # 0x54ed8
movq %r12, -0x50(%rbp)
leaq 0x133dd(%rip), %rax     # 0x54ede
movq %rax, -0x48(%rbp)
movq %r13, %rdi
leaq -0x58(%rbp), %rsi
callq 0x53d75
movq %rax, %r14
movl $0x1, %r15d
cmpq $0xa, -0x30(%rbp)
movl $0xd1b71759, %edx       # imm = 0xD1B71759
jb 0x41c39
movl $0x4, %r15d
movq -0x30(%rbp), %rax
cmpl $0x63, %eax
jbe 0x41b6f
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x41c36
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x41c39
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x41b34
addl $-0x3, %r15d
jmp 0x41c39
addl $-0x2, %r15d
jmp 0x41c39
decl %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq %r12, %rdi
movl $0x2d, %edx
callq 0x2e460
addq -0x78(%rbp), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0x39c27
movq %r12, -0x58(%rbp)
leaq 0x13324(%rip), %r12     # 0x54ed8
movq %r12, -0x50(%rbp)
leaq 0x1331f(%rip), %rax     # 0x54ede
movq %rax, -0x48(%rbp)
movq %r13, %rdi
leaq -0x58(%rbp), %rsi
callq 0x53d75
movq %rax, %r14
movl $0x1, %r15d
cmpq $0xa, -0x30(%rbp)
movl $0xd1b71759, %edx       # imm = 0xD1B71759
jb 0x41cfc
movl $0x4, %r15d
movq -0x30(%rbp), %rax
cmpl $0x63, %eax
jbe 0x41c2d
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x41cf9
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x41cfc
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x41bf2
addl $-0x3, %r15d
jmp 0x41cfc
addl $-0x2, %r15d
jmp 0x41cfc
decl %r15d
movq %r12, %rbx
movl %r15d, %esi
leaq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x2e460
movq -0x58(%rbp), %rdi
movl %r15d, %esi
movq -0x30(%rbp), %rdx
callq 0x39c27
movq %r12, -0xa0(%rbp)
movq %rbx, -0x98(%rbp)
leaq 0x13261(%rip), %rax     # 0x54ede
movq %rax, -0x90(%rbp)
movq %r14, %rdi
leaq -0xa0(%rbp), %r14
movq %r14, %rsi
callq 0x53d75
leaq -0xc0(%rbp), %rbx
movq -0xd0(%rbp), %rcx
movq %rcx, -0xa0(%rbp)
leaq 0x218b5(%rip), %rcx     # 0x63567
movq %rcx, -0x98(%rbp)
leaq 0x218ad(%rip), %rcx     # 0x6356d
movq %rcx, -0x90(%rbp)
movq %rax, %rdi
movq %r14, %rsi
callq 0x53d75
movq %rbx, %rdi
movq %rax, %rsi
callq 0x54ef2
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq -0x38(%rbp), %rdi
callq 0x2e440
jmp 0x41db7
decl %r15d
movq %r12, %rbx
movl %r15d, %esi
leaq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x2e460
movq -0x58(%rbp), %rdi
movl %r15d, %esi
movq -0x30(%rbp), %rdx
callq 0x39c27
movq %r12, -0xa0(%rbp)
movq %rbx, -0x98(%rbp)
leaq 0x1319e(%rip), %rax     # 0x54ede
movq %rax, -0x90(%rbp)
movq %r14, %rdi
leaq -0xa0(%rbp), %r14
movq %r14, %rsi
callq 0x53d75
leaq -0xc0(%rbp), %rbx
movq -0xd0(%rbp), %rcx
movq %rcx, -0xa0(%rbp)
leaq 0x217f2(%rip), %rcx     # 0x63567
movq %rcx, -0x98(%rbp)
leaq 0x217ea(%rip), %rcx     # 0x6356d
movq %rcx, -0x90(%rbp)
movq %rax, %rdi
movq %r14, %rsi
callq 0x53d75
movq %rbx, %rdi
movq %rax, %rsi
callq 0x54ef2
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq -0x38(%rbp), %rdi
callq 0x2e440
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x41dcf
callq 0x2e360
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x41de1
callq 0x2e360
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x41df3
callq 0x2e360
cmpb $0x1, -0x180(%rbp)
jne 0x41e0f
movq -0xc8(%rbp), %rdi
callq 0x2e580
movb $0x0, -0x180(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x50d82
movq -0x200(%rbp), %rdi
leaq -0x1f0(%rbp), %rax
cmpq %rax, %rdi
je 0x41e33
callq 0x2e360
movq -0x238(%rbp), %rdi
testq %rdi, %rdi
je 0x41e67
callq 0x2e360
xorl %eax, %eax
movq %rax, -0x238(%rbp)
movl %eax, -0x230(%rbp)
movq %rax, -0x228(%rbp)
movl %eax, -0x220(%rbp)
movq %rax, -0x218(%rbp)
movq %r13, %rdi
callq 0x50de0
movq -0x80(%rbp), %rax
movq (%rax), %rcx
movq -0x30(%rbp), %rdx
shlq $0x5, %rdx
movq 0x8(%rcx,%rdx), %rax
movq %rdx, -0xd8(%rbp)
subq (%rcx,%rdx), %rax
shrq $0x4, %rax
decl %eax
js 0x42227
movl %eax, %r12d
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq -0xd8(%rbp), %rcx
movq (%rax,%rcx), %rax
movq %r12, %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rdx
movq 0x40(%rdx), %r15
movl 0x8(%rax,%rcx), %r14d
movq %rbx, %rdi
leaq 0x34bb0(%rip), %rsi     # 0x76a7d
movl $0x10, %edx
callq 0x50bf8
movq (%r15), %rax
movq %r13, %rdi
movq %r15, %rsi
callq *(%rax)
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq $0x0, -0x70(%rbp)
movb $0x0, -0x68(%rbp)
movq -0x250(%rbp), %rsi
movq -0x248(%rbp), %rdx
addq %rsi, %rdx
movl $0x0, (%rsp)
movl $0x1, %r9d
leaq -0x78(%rbp), %rdi
movq %rbx, %rcx
leaq 0x359e8(%rip), %r8      # 0x7790a
callq 0x6095a
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rax
cmpq %rax, %rdi
je 0x41f3f
callq 0x2e360
movq %r13, %rdi
callq 0x2e550
leaq 0x36e57(%rip), %rbx     # 0x78da5
movl $0x2, %edx
movq %r13, %rdi
leaq 0x34b23(%rip), %rsi     # 0x76a80
callq 0x2e440
movl %r14d, %r15d
testl %r14d, %r14d
jle 0x41f7f
movl $0x1, %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2e440
decl %r15d
jne 0x41f6a
cmpb $0x0, -0x84(%rbp)
je 0x420a6
movl $0x7, %edx
movq -0x38(%rbp), %rdi
leaq 0x34ae7(%rip), %rsi     # 0x76a83
callq 0x2e440
movq -0x38(%rbp), %rdi
movl %r14d, %esi
callq 0x2e700
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
leaq 0x35928(%rip), %rsi     # 0x778e7
callq 0x2e440
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq %r15, %rdi
callq 0x2e440
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x327f5(%rip), %rsi     # 0x747db
callq 0x2e440
movl $0x1b, %edx
movq %r15, %rdi
leaq 0x34a99(%rip), %rsi     # 0x76a93
callq 0x2e440
movq %r15, %rdi
movq -0x30(%rbp), %rsi
callq 0x2e700
movq %rax, %r15
movl $0x4, %edx
movq %rax, %rdi
leaq 0x34a6e(%rip), %rsi     # 0x76a8b
callq 0x2e440
leaq -0x58(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x2e660
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %r15, %rdi
callq 0x2e440
movl $0x1, %edx
movq %rax, %rdi
leaq 0x346dc(%rip), %rsi     # 0x7672d
callq 0x2e440
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x42068
callq 0x2e360
movl $0x1e, %edx
movq -0x38(%rbp), %rdi
leaq 0x34a18(%rip), %rsi     # 0x76a90
callq 0x2e440
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2e700
movq %rax, %r15
movl $0x5, %edx
movq %rax, %rdi
leaq 0x34a13(%rip), %rsi     # 0x76aaf
callq 0x2e440
jmp 0x421bb
movl $0x7, %edx
movq -0x38(%rbp), %rdi
leaq 0x349cd(%rip), %rsi     # 0x76a83
callq 0x2e440
movq -0x38(%rbp), %rdi
movl %r14d, %esi
callq 0x2e700
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
leaq 0x3580e(%rip), %rsi     # 0x778e7
callq 0x2e440
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq %r15, %rdi
callq 0x2e440
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x326db(%rip), %rsi     # 0x747db
callq 0x2e440
movl $0x1b, %edx
movq %r15, %rdi
leaq 0x349a4(%rip), %rsi     # 0x76ab8
callq 0x2e440
movq %r15, %rdi
movq -0x30(%rbp), %rsi
callq 0x2e700
movq %rax, %r15
movl $0x4, %edx
movq %rax, %rdi
leaq 0x34954(%rip), %rsi     # 0x76a8b
callq 0x2e440
leaq -0x58(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x2e660
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %r15, %rdi
callq 0x2e440
movl $0x1, %edx
movq %rax, %rdi
leaq 0x345c2(%rip), %rsi     # 0x7672d
callq 0x2e440
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x42182
callq 0x2e360
movl $0x1e, %edx
movq -0x38(%rbp), %rdi
leaq 0x34923(%rip), %rsi     # 0x76ab5
callq 0x2e440
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2e700
movq %rax, %r15
movl $0x5, %edx
movq %rax, %rdi
leaq 0x348f9(%rip), %rsi     # 0x76aaf
callq 0x2e440
movq %r15, %rdi
movl %r14d, %esi
callq 0x2e700
movl $0x1, %edx
movq %rax, %rdi
leaq 0x34558(%rip), %rsi     # 0x7672d
callq 0x2e440
movq %r13, %rdi
movq 0x4bdc4(%rip), %rsi     # 0x8dfa8
callq 0x2e230
leaq -0x1e0(%rbp), %rdi
callq 0x2e150
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x42207
callq 0x2e360
leaq -0xc0(%rbp), %rbx
movq %rbx, %rdi
callq 0x50cce
leaq -0x1(%r12), %rax
testq %r12, %r12
movq %rax, %r12
jg 0x41e9d
movq -0x30(%rbp), %rdx
incq %rdx
movq -0x80(%rbp), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x5, %rax
movq %rdx, -0x30(%rbp)
cmpq %rdx, %rax
leaq -0x78(%rbp), %r12
ja 0x4198d
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4226a
jmp 0x4226f
jmp 0x42274
jmp 0x4226f
jmp 0x4226f
movq %rax, %rbx
jmp 0x422ba
movq %rax, %rbx
jmp 0x422a8
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x42296
callq 0x2e360
jmp 0x42296
jmp 0x42293
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x422a8
callq 0x2e360
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x422ba
callq 0x2e360
leaq -0x250(%rbp), %rdi
callq 0x50b98
jmp 0x42359
jmp 0x42319
jmp 0x42319
jmp 0x422d1
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x4231c
callq 0x2e360
jmp 0x4231c
movq %rax, %rbx
jmp 0x4233b
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x42302
callq 0x2e360
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rax
jmp 0x42343
movq %rax, %rbx
jmp 0x4234d
jmp 0x42319
movq %rax, %rbx
movq 0x4bc85(%rip), %rsi     # 0x8dfa8
leaq -0x250(%rbp), %rdi
callq 0x2e230
leaq -0x1e0(%rbp), %rdi
callq 0x2e150
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x4234d
callq 0x2e360
leaq -0xc0(%rbp), %rdi
callq 0x50cce
movq %rbx, %rdi
callq 0x2e730