// File: /workspace/github_cpp_makefile_star2_O2/fondoger[P]C0-Compiler/src/mips.cpp
// Function: MIPS(std::ostream&)
static void MIPS(std::ostream &ss)
{
    static std::string prev_op = "";
    static std::string prev_code = "";
    std::stringstream indent_blanks;
    for (int i = 0; i < indent_num; i++) {
        mipscode_stream << ' ';
    }
    std::ostringstream oss;
    oss << ss.rdbuf();
    std::string mips_code = oss.str();
    mipscode_stream << mips_code << std::endl;
    bool should_omit = false;
    if (mips_code.substr(0, 2) == "lw") {
        if (prev_op == "sw" && mips_code.substr(2) == prev_code.substr(2)) {
            should_omit = true;
        } else {
            prev_op = "lw";
            prev_code = mips_code;
        }
    } else if (mips_code.substr(0, 2) == "sw") {
        if (prev_op == "lw" && mips_code.substr(2) == prev_code.substr(2)) {
            should_omit = true;
        } else {
            prev_op = "sw";
            prev_code = mips_code;
        }
    } else {
        prev_op = "";
    }
    if (!should_omit) {
        for (int i = 0; i < indent_num; i++) {
            opt_mipscode_stream << ' ';
        }
        opt_mipscode_stream << mips_code << std::endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x360, %rsp            # imm = 0x360
movq %rdi, %rbx
movb 0x122e8(%rip), %al      # 0x23760
testb %al, %al
je 0x116d1
movb 0x12302(%rip), %al      # 0x23788
testb %al, %al
je 0x1172a
leaq -0x380(%rbp), %rdi
callq 0x31f0
xorl %r12d, %r12d
leaq 0xfedc(%rip), %r14      # 0x21380
pushq $0x20
popq %r15
cmpl 0x122e1(%rip), %r12d    # 0x23790
jge 0x114c1
movq %r14, %rdi
movl %r15d, %esi
callq 0x32f0
incl %r12d
jmp 0x114a8
leaq -0x1f8(%rbp), %rdi
callq 0x3340
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq 0xe8(%rbx,%rax), %rsi
leaq -0x1f8(%rbp), %rdi
callq 0x3090
leaq -0x1f0(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x33d0
leaq 0xfe81(%rip), %rdi      # 0x21380
leaq -0x60(%rbp), %rsi
callq 0x3250
movq %rax, %rdi
callq 0x3130
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
pushq $0x2
popq %rcx
xorl %edx, %edx
callq 0x32b0
leaq 0x5839(%rip), %rbx      # 0x16d62
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1353e
movl %eax, %r15d
movq %r14, %rdi
callq 0x3498
testb %r15b, %r15b
je 0x1158e
leaq 0x121f1(%rip), %rdi     # 0x23740
leaq 0x580f(%rip), %rsi      # 0x16d65
callq 0x1353e
testb %al, %al
je 0x1162d
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
pushq $0x2
popq %rdx
pushq $-0x1
popq %rcx
callq 0x32b0
leaq 0x121eb(%rip), %rsi     # 0x23768
leaq -0x80(%rbp), %rdi
pushq $0x2
popq %rdx
pushq $-0x1
popq %rcx
callq 0x32b0
jmp 0x11606
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
pushq $0x2
popq %rcx
xorl %edx, %edx
callq 0x32b0
leaq 0x57be(%rip), %rbx      # 0x16d65
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1353e
movl %eax, %r15d
movq %r14, %rdi
callq 0x3498
testb %r15b, %r15b
je 0x1164e
leaq 0x12173(%rip), %rdi     # 0x23740
leaq 0x578e(%rip), %rsi      # 0x16d62
callq 0x1353e
testb %al, %al
je 0x1162d
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
pushq $0x2
popq %rdx
pushq $-0x1
popq %rcx
callq 0x32b0
leaq 0x12171(%rip), %rsi     # 0x23768
leaq -0x80(%rbp), %rdi
pushq $0x2
popq %rdx
pushq $-0x1
popq %rcx
callq 0x32b0
leaq -0x80(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xfe0a
movl %eax, %r12d
movq %r15, %rdi
callq 0x3498
movq %r14, %rdi
callq 0x3498
testb %r12b, %r12b
jne 0x116a0
leaq 0x1210c(%rip), %rdi     # 0x23740
movq %rbx, %rsi
callq 0x3470
leaq 0x12125(%rip), %rdi     # 0x23768
leaq -0x60(%rbp), %rsi
callq 0x3160
jmp 0x11661
leaq 0x120eb(%rip), %rdi     # 0x23740
leaq 0x5749(%rip), %rsi      # 0x16da5
callq 0x3470
xorl %r15d, %r15d
leaq 0xff35(%rip), %rbx      # 0x215a0
pushq $0x20
popq %r14
cmpl 0x1211a(%rip), %r15d    # 0x23790
jge 0x11688
movq %rbx, %rdi
movl %r14d, %esi
callq 0x32f0
incl %r15d
jmp 0x1166f
leaq 0xff11(%rip), %rdi      # 0x215a0
leaq -0x60(%rbp), %rsi
callq 0x3250
movq %rax, %rdi
callq 0x3130
leaq -0x60(%rbp), %rdi
callq 0x3498
leaq -0x1f8(%rbp), %rdi
callq 0x30a0
leaq -0x380(%rbp), %rdi
callq 0x34a0
addq $0x360, %rsp            # imm = 0x360
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12088(%rip), %rdi     # 0x23760
callq 0x3440
testl %eax, %eax
je 0x11480
leaq 0x12054(%rip), %rdi     # 0x23740
leaq 0x56b2(%rip), %rsi      # 0x16da5
leaq -0x380(%rbp), %rdx
callq 0x30f0
movq 0xc8aa(%rip), %rdi      # 0x1dfb0
leaq 0x12033(%rip), %rsi     # 0x23740
leaq 0xcb3c(%rip), %rdx      # 0x1e250
callq 0x3240
leaq 0x12040(%rip), %rdi     # 0x23760
callq 0x31b0
jmp 0x11480
leaq 0x12057(%rip), %rdi     # 0x23788
callq 0x3440
testl %eax, %eax
je 0x1148e
leaq 0x12023(%rip), %rdi     # 0x23768
leaq 0x5659(%rip), %rsi      # 0x16da5
leaq -0x380(%rbp), %rdx
callq 0x30f0
movq 0xc851(%rip), %rdi      # 0x1dfb0
leaq 0x12002(%rip), %rsi     # 0x23768
leaq 0xcae3(%rip), %rdx      # 0x1e250
callq 0x3240
leaq 0x1200f(%rip), %rdi     # 0x23788
callq 0x31b0
jmp 0x1148e
movq %rax, %rbx
leaq 0x11ffb(%rip), %rdi     # 0x23788
jmp 0x11799
movq %rax, %rbx
leaq 0x11fc7(%rip), %rdi     # 0x23760
callq 0x31a0
jmp 0x117ee
jmp 0x117a4
jmp 0x117c5
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x3498
jmp 0x117c8
jmp 0x117c5
jmp 0x117c5
jmp 0x117c5
jmp 0x117ba
movq %rax, %rbx
jmp 0x117d1
jmp 0x117df
jmp 0x117c5
jmp 0x117c5
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x3498
leaq -0x1f8(%rbp), %rdi
callq 0x30a0
jmp 0x117e2
movq %rax, %rbx
leaq -0x380(%rbp), %rdi
callq 0x34a0
movq %rbx, %rdi
callq 0x3430