// File: /workspace/github_cpp_makefile_star2_O3/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 0x118be(%rip), %al      # 0x28780
testb %al, %al
je 0x17238
movb 0x118d8(%rip), %al      # 0x287a8
testb %al, %al
je 0x1729b
leaq -0x380(%rbp), %rdi
callq 0x31f0
cmpl $0x0, 0x118c5(%rip)     # 0x287b0
jle 0x16f21
xorl %r12d, %r12d
leaq 0xf4a9(%rip), %r14      # 0x263a0
leaq -0x1f8(%rbp), %r15
movb $0x20, -0x1f8(%rbp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3340
incl %r12d
cmpl 0x11891(%rip), %r12d    # 0x287b0
jl 0x16efe
leaq -0x1f8(%rbp), %rdi
callq 0x3390
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq 0xe8(%rbx,%rax), %rsi
leaq -0x1f8(%rbp), %rdi
callq 0x30a0
leaq -0x1f0(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x3420
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq 0xf439(%rip), %rdi      # 0x263a0
callq 0x3340
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31d0
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x2, %ecx
xorl %edx, %edx
callq 0x3300
leaq 0x5de6(%rip), %rbx      # 0x1cd97
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x30c0
movl %eax, %r14d
movq (%r15), %rdi
leaq -0x30(%rbp), %r12
cmpq %r12, %rdi
je 0x16fd4
callq 0x32a0
testl %r14d, %r14d
je 0x17038
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x2, %ecx
xorl %edx, %edx
callq 0x3300
leaq 0x5da6(%rip), %rbx      # 0x1cd9a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x30c0
movl %eax, %r14d
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x1700f
callq 0x32a0
testl %r14d, %r14d
je 0x1708a
movq 0x1174d(%rip), %rdx     # 0x28768
leaq 0x1173e(%rip), %rdi     # 0x28760
leaq 0x5db1(%rip), %rcx      # 0x1cdda
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x33f0
jmp 0x17163
leaq 0x11721(%rip), %rdi     # 0x28760
leaq 0x5d54(%rip), %rsi      # 0x1cd9a
callq 0x30c0
testl %eax, %eax
jne 0x17135
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x2, %edx
movq $-0x1, %rcx
callq 0x3300
leaq 0x11715(%rip), %rsi     # 0x28788
leaq -0x80(%rbp), %rdi
movl $0x2, %edx
movq $-0x1, %rcx
callq 0x3300
jmp 0x170da
leaq 0x116cf(%rip), %rdi     # 0x28760
leaq 0x5cff(%rip), %rsi      # 0x1cd97
callq 0x30c0
testl %eax, %eax
jne 0x17135
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x2, %edx
movq $-0x1, %rcx
callq 0x3300
leaq 0x116c3(%rip), %rsi     # 0x28788
leaq -0x80(%rbp), %rdi
movl $0x2, %edx
movq $-0x1, %rcx
callq 0x3300
movq -0x38(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0x17101
movq -0x80(%rbp), %r14
testq %rdx, %rdx
je 0x1710a
movq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x32f0
testl %eax, %eax
sete %r15b
jmp 0x1710d
movq -0x80(%rbp), %r14
xorl %r15d, %r15d
jmp 0x1710d
movb $0x1, %r15b
leaq -0x70(%rbp), %rax
cmpq %rax, %r14
je 0x1711e
movq %r14, %rdi
callq 0x32a0
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x1712c
callq 0x32a0
testb %r15b, %r15b
jne 0x171d8
movq 0x1162c(%rip), %rdx     # 0x28768
leaq 0x1161d(%rip), %rdi     # 0x28760
movl $0x2, %r8d
xorl %esi, %esi
movq %rbx, %rcx
callq 0x33f0
leaq 0x1162e(%rip), %rdi     # 0x28788
leaq -0x60(%rbp), %rsi
callq 0x3160
cmpl $0x0, 0x11646(%rip)     # 0x287b0
jle 0x1719a
xorl %r15d, %r15d
leaq 0xf44a(%rip), %rbx      # 0x265c0
leaq -0x40(%rbp), %r14
movb $0x20, -0x40(%rbp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3340
incl %r15d
cmpl 0x11618(%rip), %r15d    # 0x287b0
jl 0x1717a
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq 0xf417(%rip), %rdi      # 0x265c0
callq 0x3340
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31d0
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x171ea
callq 0x32a0
movq 0xbdd7(%rip), %rsi      # 0x22fc8
leaq -0x1f8(%rbp), %rdi
callq 0x3150
leaq -0x188(%rbp), %rdi
callq 0x30e0
movq 0xbd90(%rip), %rsi      # 0x22fa0
leaq -0x380(%rbp), %rdi
callq 0x3210
leaq -0x300(%rbp), %rdi
callq 0x30e0
addq $0x360, %rsp            # imm = 0x360
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11541(%rip), %rdi     # 0x28780
callq 0x34a0
testl %eax, %eax
je 0x16eca
leaq 0x1151d(%rip), %rax     # 0x28770
movq %rax, 0x11506(%rip)     # 0x28760
leaq 0x114ff(%rip), %rdi     # 0x28760
leaq 0x5b72(%rip), %rdx      # 0x1cdda
movq %rdx, %rsi
callq 0x14396
movq 0xbd39(%rip), %rdi      # 0x22fb0
leaq 0x114e2(%rip), %rsi     # 0x28760
leaq 0xbfeb(%rip), %rdx      # 0x23270
callq 0x3270
leaq 0x114ef(%rip), %rdi     # 0x28780
callq 0x31a0
jmp 0x16eca
leaq 0x11506(%rip), %rdi     # 0x287a8
callq 0x34a0
testl %eax, %eax
je 0x16ed8
leaq 0x114e2(%rip), %rax     # 0x28798
movq %rax, 0x114cb(%rip)     # 0x28788
leaq 0x114c4(%rip), %rdi     # 0x28788
leaq 0x5b0f(%rip), %rdx      # 0x1cdda
movq %rdx, %rsi
callq 0x14396
movq 0xbcd6(%rip), %rdi      # 0x22fb0
leaq 0x114a7(%rip), %rsi     # 0x28788
leaq 0xbf88(%rip), %rdx      # 0x23270
callq 0x3270
leaq 0x114b4(%rip), %rdi     # 0x287a8
callq 0x31a0
jmp 0x16ed8
movq %rax, %rbx
leaq 0x114a0(%rip), %rdi     # 0x287a8
jmp 0x17314
movq %rax, %rbx
leaq 0x1146c(%rip), %rdi     # 0x28780
callq 0x3190
jmp 0x173a0
jmp 0x17322
jmp 0x17348
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x1734b
callq 0x32a0
jmp 0x1734b
jmp 0x17348
jmp 0x17348
jmp 0x17348
jmp 0x1733d
movq %rax, %rbx
jmp 0x1735d
jmp 0x1737e
jmp 0x17348
jmp 0x17348
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1735d
callq 0x32a0
movq 0xbc64(%rip), %rsi      # 0x22fc8
leaq -0x1f8(%rbp), %rdi
callq 0x3150
leaq -0x188(%rbp), %rdi
callq 0x30e0
jmp 0x17381
movq %rax, %rbx
movq 0xbc18(%rip), %rsi      # 0x22fa0
leaq -0x380(%rbp), %rdi
callq 0x3210
leaq -0x300(%rbp), %rdi
callq 0x30e0
movq %rbx, %rdi
callq 0x3480