// File: /workspace/github_cpp_makefile_star2_O3/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, -0x7c(%rbp)
movq %r8, -0xd0(%rbp)
movq %rsi, -0x38(%rbp)
movq 0x8(%rcx), %rax
cmpq (%rcx), %rax
je 0x41dae
movq %rcx, %r14
leaq -0x250(%rbp), %r15
leaq 0xd8(%r15), %rax
movq %rax, -0xc8(%rbp)
movq $0x0, -0x30(%rbp)
movq %rcx, -0xa0(%rbp)
cmpb $0x0, -0x7c(%rbp)
je 0x41572
movq %r15, %rdi
leaq 0x35352(%rip), %rsi     # 0x76845
callq 0x50494
movq (%r14), %rax
movq -0x30(%rbp), %rcx
shlq $0x5, %rcx
movl 0x18(%rax,%rcx), %ebx
movl %ebx, %r14d
negl %r14d
cmovsl %ebx, %r14d
movl $0x1, %r12d
cmpl $0xa, %r14d
leaq -0x78(%rbp), %r13
jb 0x41609
movl $0x4, %r12d
movl %r14d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x415f7
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x41606
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x41609
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x41533
addl $-0x3, %r12d
jmp 0x41609
movq %r15, %rdi
leaq 0x353e5(%rip), %rsi     # 0x76961
callq 0x50494
movq (%r14), %rax
movq -0x30(%rbp), %rcx
shlq $0x5, %rcx
movl 0x18(%rax,%rcx), %ebx
movl %ebx, %r14d
negl %r14d
cmovsl %ebx, %r14d
movl $0x1, %r12d
cmpl $0xa, %r14d
leaq -0x78(%rbp), %r13
jb 0x416d1
movl $0x4, %r12d
movl %r14d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x415fd
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x416ce
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x416d1
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x415bc
addl $-0x3, %r12d
jmp 0x416d1
addl $-0x2, %r12d
jmp 0x41609
addl $-0x2, %r12d
jmp 0x416d1
decl %r12d
shrl $0x1f, %ebx
leal (%r12,%rbx), %esi
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq %r13, %rdi
movl $0x2d, %edx
callq 0x2e460
addq -0x78(%rbp), %rbx
movq %rbx, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0x39847
movq %r13, -0x58(%rbp)
leaq 0x132c8(%rip), %rax     # 0x5490a
movq %rax, -0x50(%rbp)
leaq 0x132c3(%rip), %rax     # 0x54910
movq %rax, -0x48(%rbp)
movq %r15, %rdi
leaq -0x58(%rbp), %r13
movq %r13, %rsi
callq 0x537b3
movq %rax, %rbx
movl $0x1, %r12d
cmpq $0xa, -0x30(%rbp)
movq -0xa0(%rbp), %r14
jb 0x41799
movl $0x4, %r12d
movq -0x30(%rbp), %rax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x416c5
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x41796
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x41799
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x4168a
addl $-0x3, %r12d
jmp 0x41799
addl $-0x2, %r12d
jmp 0x41799
decl %r12d
shrl $0x1f, %ebx
leal (%r12,%rbx), %esi
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq %r13, %rdi
movl $0x2d, %edx
callq 0x2e460
addq -0x78(%rbp), %rbx
movq %rbx, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0x39847
movq %r13, -0x58(%rbp)
leaq 0x13200(%rip), %rax     # 0x5490a
movq %rax, -0x50(%rbp)
leaq 0x131fb(%rip), %rax     # 0x54910
movq %rax, -0x48(%rbp)
movq %r15, %rdi
leaq -0x58(%rbp), %r13
movq %r13, %rsi
callq 0x537b3
movq %rax, %rbx
movl $0x1, %r12d
cmpq $0xa, -0x30(%rbp)
movq -0xa0(%rbp), %r14
jb 0x4185d
movl $0x4, %r12d
movq -0x30(%rbp), %rax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x4178d
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x4185a
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x4185d
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x41752
addl $-0x3, %r12d
jmp 0x4185d
addl $-0x2, %r12d
jmp 0x4185d
decl %r12d
movl %r12d, %esi
leaq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
movq %r13, %rdi
movl $0x2d, %edx
callq 0x2e460
movq -0x58(%rbp), %rdi
movl %r12d, %esi
movq -0x30(%rbp), %rdx
callq 0x39847
movq %r13, -0x98(%rbp)
leaq 0x1313b(%rip), %rax     # 0x5490a
movq %rax, -0x90(%rbp)
leaq 0x13133(%rip), %rax     # 0x54910
movq %rax, -0x88(%rbp)
movq %rbx, %rdi
leaq -0x98(%rbp), %rsi
callq 0x537b3
leaq -0xc0(%rbp), %rbx
movq -0xd0(%rbp), %rcx
movq %rcx, -0x98(%rbp)
leaq 0x217c1(%rip), %rcx     # 0x62fd0
movq %rcx, -0x90(%rbp)
leaq 0x217b9(%rip), %rcx     # 0x62fd6
movq %rcx, -0x88(%rbp)
movq %rax, %rdi
leaq -0x98(%rbp), %rsi
callq 0x537b3
movq %rbx, %rdi
movq %rax, %rsi
callq 0x54924
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq -0x38(%rbp), %rdi
callq 0x2e440
jmp 0x41919
decl %r12d
movl %r12d, %esi
leaq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
movq %r13, %rdi
movl $0x2d, %edx
callq 0x2e460
movq -0x58(%rbp), %rdi
movl %r12d, %esi
movq -0x30(%rbp), %rdx
callq 0x39847
movq %r13, -0x98(%rbp)
leaq 0x13077(%rip), %rax     # 0x5490a
movq %rax, -0x90(%rbp)
leaq 0x1306f(%rip), %rax     # 0x54910
movq %rax, -0x88(%rbp)
movq %rbx, %rdi
leaq -0x98(%rbp), %rsi
callq 0x537b3
leaq -0xc0(%rbp), %rbx
movq -0xd0(%rbp), %rcx
movq %rcx, -0x98(%rbp)
leaq 0x216fd(%rip), %rcx     # 0x62fd0
movq %rcx, -0x90(%rbp)
leaq 0x216f5(%rip), %rcx     # 0x62fd6
movq %rcx, -0x88(%rbp)
movq %rax, %rdi
leaq -0x98(%rbp), %rsi
callq 0x537b3
movq %rbx, %rdi
movq %rax, %rsi
callq 0x54924
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 0x41931
callq 0x2e360
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x41943
callq 0x2e360
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x41955
callq 0x2e360
cmpb $0x1, -0x180(%rbp)
jne 0x41971
movq -0xc8(%rbp), %rdi
callq 0x2e580
movb $0x0, -0x180(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x507e2
movq -0x200(%rbp), %rdi
leaq -0x1f0(%rbp), %rax
cmpq %rax, %rdi
je 0x41995
callq 0x2e360
movq -0x238(%rbp), %rdi
testq %rdi, %rdi
je 0x419c9
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 %r15, %rdi
callq 0x50840
movq (%r14), %rax
movq -0x30(%rbp), %rdx
shlq $0x5, %rdx
movq 0x8(%rax,%rdx), %rcx
movq %rdx, -0xd8(%rbp)
subq (%rax,%rdx), %rcx
shrq $0x4, %rcx
decl %ecx
js 0x41d8f
movl %ecx, %r13d
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movq -0xd8(%rbp), %rcx
movq (%rax,%rcx), %rax
movq %r13, %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rdx
movq 0x40(%rdx), %r12
movl 0x8(%rax,%rcx), %r14d
movq %rbx, %rdi
leaq 0x3504f(%rip), %rsi     # 0x76a7d
movl $0x10, %edx
callq 0x50658
movq (%r12), %rax
movq %r15, %rdi
movq %r12, %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 0x35e86(%rip), %r8      # 0x7790a
callq 0x6040a
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rax
cmpq %rax, %rdi
je 0x41aa1
callq 0x2e360
movq %r15, %rdi
callq 0x2e550
leaq 0x372f5(%rip), %rbx     # 0x78da5
movl $0x2, %edx
movq %r15, %rdi
leaq 0x34fc1(%rip), %rsi     # 0x76a80
callq 0x2e440
movl %r14d, %r12d
testl %r14d, %r14d
jle 0x41ae1
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2e440
decl %r12d
jne 0x41acc
cmpb $0x0, -0x7c(%rbp)
je 0x41c05
movl $0x7, %edx
movq -0x38(%rbp), %rdi
leaq 0x34f88(%rip), %rsi     # 0x76a83
callq 0x2e440
movq -0x38(%rbp), %rdi
movl %r14d, %esi
callq 0x2e700
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0x35dc9(%rip), %rsi     # 0x778e7
callq 0x2e440
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq %r12, %rdi
callq 0x2e440
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x32c96(%rip), %rsi     # 0x747db
callq 0x2e440
movl $0x1b, %edx
movq %r12, %rdi
leaq 0x34f3a(%rip), %rsi     # 0x76a93
callq 0x2e440
movq %r12, %rdi
movq -0x30(%rbp), %rsi
callq 0x2e700
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0x34f0f(%rip), %rsi     # 0x76a8b
callq 0x2e440
leaq -0x58(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x2e660
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %r12, %rdi
callq 0x2e440
movl $0x1, %edx
movq %rax, %rdi
leaq 0x34b7d(%rip), %rsi     # 0x7672d
callq 0x2e440
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x41bc7
callq 0x2e360
movl $0x1e, %edx
movq -0x38(%rbp), %rdi
leaq 0x34eb9(%rip), %rsi     # 0x76a90
callq 0x2e440
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2e700
movq %rax, %r12
movl $0x5, %edx
movq %rax, %rdi
leaq 0x34eb4(%rip), %rsi     # 0x76aaf
callq 0x2e440
jmp 0x41d1a
movl $0x7, %edx
movq -0x38(%rbp), %rdi
leaq 0x34e6e(%rip), %rsi     # 0x76a83
callq 0x2e440
movq -0x38(%rbp), %rdi
movl %r14d, %esi
callq 0x2e700
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0x35caf(%rip), %rsi     # 0x778e7
callq 0x2e440
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq %r12, %rdi
callq 0x2e440
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x32b7c(%rip), %rsi     # 0x747db
callq 0x2e440
movl $0x1b, %edx
movq %r12, %rdi
leaq 0x34e45(%rip), %rsi     # 0x76ab8
callq 0x2e440
movq %r12, %rdi
movq -0x30(%rbp), %rsi
callq 0x2e700
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0x34df5(%rip), %rsi     # 0x76a8b
callq 0x2e440
leaq -0x58(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x2e660
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %r12, %rdi
callq 0x2e440
movl $0x1, %edx
movq %rax, %rdi
leaq 0x34a63(%rip), %rsi     # 0x7672d
callq 0x2e440
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x41ce1
callq 0x2e360
movl $0x1e, %edx
movq -0x38(%rbp), %rdi
leaq 0x34dc4(%rip), %rsi     # 0x76ab5
callq 0x2e440
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2e700
movq %rax, %r12
movl $0x5, %edx
movq %rax, %rdi
leaq 0x34d9a(%rip), %rsi     # 0x76aaf
callq 0x2e440
movq %r12, %rdi
movl %r14d, %esi
callq 0x2e700
movl $0x1, %edx
movq %rax, %rdi
leaq 0x349f9(%rip), %rsi     # 0x7672d
callq 0x2e440
movq %r15, %rdi
movq 0x4c265(%rip), %rsi     # 0x8dfa8
callq 0x2e230
leaq -0x1e0(%rbp), %rdi
callq 0x2e150
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x41d66
callq 0x2e360
leaq -0xc0(%rbp), %rbx
movq %rbx, %rdi
callq 0x5072e
leaq -0x1(%r13), %rax
testq %r13, %r13
movq %rax, %r13
jg 0x419fb
movq -0xa0(%rbp), %r14
movq (%r14), %rax
movq -0x30(%rbp), %rdx
incq %rdx
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
movq %rdx, -0x30(%rbp)
cmpq %rdx, %rcx
ja 0x414df
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x41dca
jmp 0x41dcf
jmp 0x41dd4
jmp 0x41dcf
jmp 0x41dcf
movq %rax, %rbx
jmp 0x41e1a
movq %rax, %rbx
jmp 0x41e08
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x41df6
callq 0x2e360
jmp 0x41df6
jmp 0x41df3
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x41e08
callq 0x2e360
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x41e1a
callq 0x2e360
leaq -0x250(%rbp), %rdi
callq 0x505f8
jmp 0x41eb9
jmp 0x41e79
jmp 0x41e79
jmp 0x41e31
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x41e7c
callq 0x2e360
jmp 0x41e7c
movq %rax, %rbx
jmp 0x41e9b
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x41e62
callq 0x2e360
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rax
jmp 0x41ea3
movq %rax, %rbx
jmp 0x41ead
jmp 0x41e79
movq %rax, %rbx
movq 0x4c125(%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 0x41ead
callq 0x2e360
leaq -0xc0(%rbp), %rdi
callq 0x5072e
movq %rbx, %rdi
callq 0x2e730