// File: /workspace/github_cpp_makefile_star2_O3/eniac[P]Mantis/src/compile/compile_c.cpp
// Function: generateMacroXorVersionBits(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int)
void generateMacroXorVersionBits(ostringstream& oss_reaction_mirror, ostringstream& oss_preprocessor, int ing_iso_opt, int egr_iso_opt) {
    // Remember the current version bit values for reaction and measurement
    // We always pack field args and use mantis_mv_bit to index the replicas
    oss_reaction_mirror << "  static unsigned int __mantis__mv_ing = 0;\n";
    oss_reaction_mirror << "  static unsigned int __mantis__mv_egr = 0;\n";
    if(((unsigned int)ing_iso_opt) & 0b1) {
        // Create macros for flip version bit
        oss_preprocessor << "\n#define "
                        << "__mantis__flip_mv_ing "
                        << "__mantis__mv_ing=__mantis__mv_ing^0x1"
                        << "\n";        
    } 
    if (((unsigned int)ing_iso_opt) & 0b10) {
        oss_reaction_mirror << "  static unsigned int __mantis__vv_ing = 0x0;\n";
        oss_preprocessor << "\n#define "
                        << "__mantis__flip_vv_ing "
                        << "__mantis__vv_ing=__mantis__vv_ing^0x1"
                        << "\n";         
    }
    if(((unsigned int)egr_iso_opt) & 0b1) {
        oss_preprocessor << "\n#define "
                        << "__mantis__flip_mv_egr "
                        << "__mantis__mv_egr=__mantis__mv_egr^0x1"
                        << "\n";        
    } 
    if (((unsigned int)egr_iso_opt) & 0b10) {
        oss_reaction_mirror << "  static unsigned int __mantis__vv_egr = 0x0;\n";
        oss_preprocessor << "\n#define "
                        << "__mantis__flip_vv_egr "
                        << "__mantis__vv_egr=__mantis__vv_egr^0x1"
                        << "\n";         
    }    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x32d6b(%rip), %rsi     # 0x775b0
movl $0x2c, %edx
callq 0x2e440
leaq 0x32d87(%rip), %rsi     # 0x775dd
movl $0x2c, %edx
movq %r14, %rdi
callq 0x2e440
testb $0x1, %r12b
je 0x448b9
leaq 0x32d9a(%rip), %rsi     # 0x7760a
movl $0x9, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x32d90(%rip), %rsi     # 0x77614
movl $0x16, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x32d93(%rip), %rsi     # 0x7762b
movl $0x25, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x31518(%rip), %rsi     # 0x75dc4
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2e440
testb $0x2, %r12b
je 0x44923
leaq 0x32d8b(%rip), %rsi     # 0x77651
movl $0x2e, %edx
movq %r14, %rdi
callq 0x2e440
leaq 0x32d30(%rip), %rsi     # 0x7760a
movl $0x9, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x32d92(%rip), %rsi     # 0x77680
movl $0x16, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x32d95(%rip), %rsi     # 0x77697
movl $0x25, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x314ae(%rip), %rsi     # 0x75dc4
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2e440
testb $0x1, %r15b
je 0x44979
leaq 0x32cda(%rip), %rsi     # 0x7760a
movl $0x9, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x32d79(%rip), %rsi     # 0x776bd
movl $0x16, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x32d7c(%rip), %rsi     # 0x776d4
movl $0x25, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x31458(%rip), %rsi     # 0x75dc4
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2e440
testb $0x2, %r15b
jne 0x44988
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32d6b(%rip), %rsi     # 0x776fa
movl $0x2e, %edx
movq %r14, %rdi
callq 0x2e440
leaq 0x32c67(%rip), %rsi     # 0x7760a
movl $0x9, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x32d72(%rip), %rsi     # 0x77729
movl $0x16, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x32d75(%rip), %rsi     # 0x77740
movl $0x25, %edx
movq %rbx, %rdi
callq 0x2e440
leaq 0x313e5(%rip), %rsi     # 0x75dc4
movl $0x1, %edx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2e440