// File: /workspace/github_cpp_makefile_star2_O1/daniel5151[P]mips241/src/debug.cc
// Function: MIPS::Debugger::printRAMFrom(unsigned int, int)
void Debugger::printRAMFrom(uint32_t addr, int n) {
  cerr
    << "     ADDR    |   HEXVAL   :     MIPS ASM    " << endl
    << "  -----------|------------------------------" << endl;

  while (n > 0) {
    cerr
      << ( (higlight.count(addr) != 0) ? higlight[addr] : ' ') << " "
      << toHex(addr)
      << " | "
      << toHex(ram.load(addr))
      << " : "
      << disasm(ram.load(addr))
      << endl;

    addr += 4;
    n--;
  }

  cerr << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, %r14d
movq %rdi, %r15
movl %esi, 0x8(%rsp)
movq 0x8a5d(%rip), %rbx      # 0xcff0
leaq 0x4b75(%rip), %rsi      # 0x910f
movl $0x2c, %edx
movq %rbx, %rdi
callq 0x3250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
movq %rax, %rbx
leaq 0x4b64(%rip), %rsi      # 0x913c
movl $0x2c, %edx
movq %rax, %rdi
callq 0x3250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
testl %r14d, %r14d
jle 0x47ef
leaq 0x18(%r15), %rax
movq %rax, 0x70(%rsp)
leaq 0x20(%r15), %r12
leaq 0x10(%rsp), %rbp
leaq 0x8(%rsp), %r13
movq 0x28(%r15), %rcx
movq %r12, %rax
testq %rcx, %rcx
je 0x4656
movl 0x8(%rsp), %edx
movq %r12, %rax
xorl %esi, %esi
cmpl %edx, 0x20(%rcx)
setb %sil
cmovaeq %rcx, %rax
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x463f
movq %r12, %rcx
cmpq %r12, %rax
je 0x466c
movl 0x8(%rsp), %ecx
cmpl 0x20(%rax), %ecx
cmovbq %r12, %rax
movq %rax, %rcx
cmpq %r12, %rcx
je 0x4682
movq 0x70(%rsp), %rdi
movq %r13, %rsi
callq 0x6406
movb (%rax), %al
jmp 0x4684
movb $0x20, %al
movb %al, 0x10(%rsp)
movl $0x1, %edx
movq 0x895c(%rip), %rdi      # 0xcff0
movq %rbp, %rsi
callq 0x3250
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4a8c(%rip), %rsi      # 0x913a
callq 0x3250
movq %rbp, %rdi
movq %r13, %rsi
callq 0x646a
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x3250
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x4a87(%rip), %rsi      # 0x9169
callq 0x3250
movq 0x8(%r15), %rdi
movl 0x8(%rsp), %esi
callq 0x83c6
movl %eax, 0xc(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x646a
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq %rbx, %rdi
callq 0x3250
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x51c8(%rip), %rsi      # 0x98f3
callq 0x3250
movq 0x8(%r15), %rdi
movl 0x8(%rsp), %esi
callq 0x83c6
leaq 0x30(%rsp), %rdi
movl %eax, %esi
callq 0x6dc4
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x3250
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x47a1
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x47bd
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x47d9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3200
addl $0x4, 0x8(%rsp)
leal -0x1(%r14), %eax
cmpl $0x1, %r14d
movl %eax, %r14d
jg 0x462c
movq 0x87fa(%rip), %rbx      # 0xcff0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x482e
movq %rax, %rbx
jmp 0x4875
jmp 0x4835
movq %rax, %rbx
jmp 0x4859
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x4859
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x4875
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4891
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x33a0
nop