// File: /workspace/github_cpp_makefile_star2_O3/RegulusImpact[P]sadboy/src/MMU.cpp
// Function: MMU::CheckMemory()
void MMU::CheckMemory() {
    if (Read(0xFF05) != 0x00) { std::cout << "failed on FF0F" << std::endl; exit(1); } // TIMA
    if (Read(0xFF06) != 0x00) { std::cout << "failed on FF0F" << std::endl; exit(1); } // TMA
    if (Read(0xFF07) != 0x00) { std::cout << "failed on FF07" << std::endl; exit(1); } // TAC
    // if (Read(0xFF10) != 0x80) { std::cout << "failed on FF10" << std::endl; exit(1); } // NR10
    // if (Read(0xFF11) != 0xBF) { std::cout << "failed on FF11" << std::endl; exit(1); } // NR11
    // if (Read(0xFF12) != 0xF3) { std::cout << "failed on FF12" << std::endl; exit(1); } // NR12
    // if (Read(0xFF14) != 0xBF) { std::cout << "failed on FF14" << std::endl; exit(1); } // NR14
    // if (Read(0xFF16) != 0x3F) { std::cout << "failed on FF16" << std::endl; exit(1); } // NR21
    // if (Read(0xFF17) != 0x00) { std::cout << "failed on FF17" << std::endl; exit(1); } // NR22
    // if (Read(0xFF19) != 0xBF) { std::cout << "failed on FF19" << std::endl; exit(1); } // NR24
    // if (Read(0xFF1A) != 0x7F) { std::cout << "failed on FF1A" << std::endl; exit(1); } // NR30
    // if (Read(0xFF1B) != 0xFF) { std::cout << "failed on FF1B" << std::endl; exit(1); } // NR31
    // if (Read(0xFF1C) != 0x9F) { std::cout << "failed on FF1C" << std::endl; exit(1); } // NR32
    // if (Read(0xFF1E) != 0xBF) { std::cout << "failed on FF1E" << std::endl; exit(1); } // NR33
    // if (Read(0xFF20) != 0xFF) { std::cout << "failed on FF20" << std::endl; exit(1); } // NR41
    // if (Read(0xFF21) != 0x00) { std::cout << "failed on FF21" << std::endl; exit(1); } // NR42
    // if (Read(0xFF22) != 0x00) { std::cout << "failed on FF22" << std::endl; exit(1); } // NR43
    // if (Read(0xFF23) != 0xBF) { std::cout << "failed on FF23" << std::endl; exit(1); } // NR30
    // if (Read(0xFF24) != 0x77) { std::cout << "failed on FF24" << std::endl; exit(1); } // NR50
    // if (Read(0xFF25) != 0xF3) { std::cout << "failed on FF25" << std::endl; exit(1); } // NR51
    // if (Read(0xFF26) != 0xF1) { std::cout << "failed on FF26" << std::endl; exit(1); } // NR52
    if (Read(0xFF40) != 0x91) { std::cout << "failed on FF40" << std::endl; exit(1); } // LCDC
    if (Read(0xFF42) != 0x00) { std::cout << "failed on FF42" << std::endl; exit(1); } // SCY
    if (Read(0xFF43) != 0x00) { std::cout << "failed on FF43" << std::endl; exit(1); } // SCX
    if (Read(0xFF45) != 0x00) { std::cout << "failed on FF45" << std::endl; exit(1); } // LYC
    if (Read(0xFF47) != 0xFC) { std::cout << "failed on FF47" << std::endl; exit(1); } // BGP
    if (Read(0xFF4A) != 0x00) { std::cout << "failed on FF4A" << std::endl; printf("%.2X", Read(0xFF4A)); exit(1); } // WY
    if (Read(0xFF4B) != 0x00) { std::cout << "failed on FF4B" << std::endl; printf("%.2X", Read(0xFF4B)); exit(1); } // WX
    // if (Read(0xFFFF) != 0x00) { std::cout << "failed on FFFF" << std::endl; printf("%.2X", Read(0xFFFF)); exit(1); } // IE
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpb $0x0, 0xa005(%rdi)
jne 0x1a692
movq %rdi, %rbx
cmpb $0x0, 0xa006(%rdi)
jne 0x1a692
cmpb $0x0, 0xa007(%rbx)
jne 0x1a6a2
cmpb $-0x6f, 0xa040(%rbx)
jne 0x1a6b2
cmpb $0x0, 0xa042(%rbx)
jne 0x1a6c2
cmpb $0x0, 0xa043(%rbx)
jne 0x1a6d2
cmpb $0x0, 0xa045(%rbx)
jne 0x1a6e2
cmpb $-0x4, 0xa047(%rbx)
jne 0x1a6f2
cmpb $0x0, 0xa04a(%rbx)
jne 0x1a717
cmpb $0x0, 0xa04b(%rbx)
jne 0x1a73b
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0xd92f(%rip), %rdi      # 0x27fc8
leaq 0x3e37(%rip), %rsi      # 0x1e4d7
jmp 0x1a700
movq 0xd91f(%rip), %rdi      # 0x27fc8
leaq 0x3e36(%rip), %rsi      # 0x1e4e6
jmp 0x1a700
movq 0xd90f(%rip), %rdi      # 0x27fc8
leaq 0x3e35(%rip), %rsi      # 0x1e4f5
jmp 0x1a700
movq 0xd8ff(%rip), %rdi      # 0x27fc8
leaq 0x3e34(%rip), %rsi      # 0x1e504
jmp 0x1a700
movq 0xd8ef(%rip), %rdi      # 0x27fc8
leaq 0x3e33(%rip), %rsi      # 0x1e513
jmp 0x1a700
movq 0xd8df(%rip), %rdi      # 0x27fc8
leaq 0x3e32(%rip), %rsi      # 0x1e522
jmp 0x1a700
movq 0xd8cf(%rip), %rdi      # 0x27fc8
leaq 0x3e31(%rip), %rsi      # 0x1e531
callq 0x4360
movq %rax, %rdi
callq 0x4190
movl $0x1, %edi
callq 0x4450
movq 0xd8aa(%rip), %rdi      # 0x27fc8
leaq 0x3e1b(%rip), %rsi      # 0x1e540
callq 0x4360
movq %rax, %rdi
callq 0x4190
movzbl 0xa04a(%rbx), %esi
jmp 0x1a75d
movq 0xd886(%rip), %rdi      # 0x27fc8
leaq 0x3e0b(%rip), %rsi      # 0x1e554
callq 0x4360
movq %rax, %rdi
callq 0x4190
movzbl 0xa04b(%rbx), %esi
leaq 0x3deb(%rip), %rdi      # 0x1e54f
xorl %eax, %eax
callq 0x4070
jmp 0x1a70d
nop