// File: /workspace/github_cpp_makefile_star2_O3/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, %r15d
movl %esi, %ebx
movq %rdi, %r14
movl %esi, 0x8(%rsp)
movq 0x8a4b(%rip), %r12      # 0xcff0
leaq 0x4b63(%rip), %rsi      # 0x910f
movl $0x2c, %edx
movq %r12, %rdi
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
movq %rax, %r12
leaq 0x4b51(%rip), %rsi      # 0x913c
movl $0x2c, %edx
movq %rax, %rdi
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
testl %r15d, %r15d
jle 0x47ef
leaq 0x18(%r14), %rax
movq %rax, 0x70(%rsp)
leaq 0x20(%r14), %r13
leaq 0x10(%rsp), %rbp
leaq 0x8(%rsp), %r12
movq 0x28(%r14), %rcx
movb $0x20, %al
testq %rcx, %rcx
je 0x467e
movq %r13, %rdx
xorl %esi, %esi
cmpl %ebx, 0x20(%rcx)
setb %sil
cmovaeq %rcx, %rdx
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x464e
cmpq %r13, %rdx
je 0x467e
cmpl 0x20(%rdx), %ebx
jb 0x467e
movq 0x70(%rsp), %rdi
movq %r12, %rsi
callq 0x63e0
movb (%rax), %al
movb %al, 0x10(%rsp)
movl $0x1, %edx
movq 0x8962(%rip), %rdi      # 0xcff0
movq %rbp, %rsi
callq 0x3250
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4a92(%rip), %rsi      # 0x913a
callq 0x3250
movq %rbp, %rdi
movq %r12, %rsi
callq 0x6445
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x3250
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x4a8d(%rip), %rsi      # 0x9169
callq 0x3250
movq 0x8(%r14), %rdi
movl 0x8(%rsp), %esi
callq 0x837e
movl %eax, 0xc(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x6445
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq %rbx, %rdi
callq 0x3250
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x51e3(%rip), %rsi      # 0x9908
callq 0x3250
movq 0x8(%r14), %rdi
movl 0x8(%rsp), %esi
callq 0x837e
leaq 0x30(%rsp), %rdi
movl %eax, %esi
callq 0x6da4
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 0x479b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x47b7
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x47d3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3200
movl 0x8(%rsp), %ebx
addl $0x4, %ebx
movl %ebx, 0x8(%rsp)
leal -0x1(%r15), %eax
cmpl $0x1, %r15d
movl %eax, %r15d
jg 0x4640
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