// File: /workspace/github_cpp_makefile_star2_O1/daniel5151[P]mips241/src/debug.cc
// Function: MIPS::Debugger::debugPrint()
void Debugger::debugPrint() {
  // "clear" screen
  cerr << string(100, '\n');

  print_stackRAM();
  print_progRAM();
  print_CPU();

  if (!watch.empty()) {
    cerr
      << endl
      << "     ADDR    |   HEXVAL   " << endl
      << "  -----------|------------" << endl;
    for (auto addr : watch) {
      cerr
        << "  "
        << toHex(addr)
        << " | "
        << toHex(ram.load(addr))
        << endl
        << endl;

    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x10(%rsp), %rdi
movl $0x64, %esi
movl $0xa, %edx
callq 0x3270
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x77d5(%rip), %rdi      # 0xcff0
callq 0x3250
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x583c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x557e
movq %rbx, %rdi
callq 0x5698
movq 0x779d(%rip), %r14      # 0xcff0
leaq 0x39c1(%rip), %rsi      # 0x921b
movl $0x49, %edx
movq %r14, %rdi
callq 0x3250
movq %rbx, %rdi
callq 0x489a
cmpq $0x0, 0xa8(%rbx)
je 0x5a67
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
movq %rax, %r14
leaq 0x39b7(%rip), %rsi      # 0x9265
movl $0x1a, %edx
movq %rax, %rdi
callq 0x3250
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
movq %rax, %r14
leaq 0x3994(%rip), %rsi      # 0x9280
movl $0x1a, %edx
movq %rax, %rdi
callq 0x3250
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
movq 0x98(%rbx), %r14
leaq 0x88(%rbx), %r13
cmpq %r13, %r14
je 0x5a67
movq 0x76b2(%rip), %r15      # 0xcff0
leaq 0x34(%rsp), %rbp
movl 0x20(%r14), %eax
movl %eax, 0xc(%rsp)
movl $0x2, %edx
movq %r15, %rdi
leaq 0x37df(%rip), %rsi      # 0x9139
callq 0x3250
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x646a
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r15, %rdi
callq 0x3250
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0x37d7(%rip), %rsi      # 0x9169
callq 0x3250
movq 0x8(%rbx), %rdi
movl 0xc(%rsp), %esi
callq 0x83c6
movl %eax, 0x34(%rsp)
leaq 0x38(%rsp), %rdi
movq %rbp, %rsi
callq 0x646a
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq %r12, %rdi
callq 0x3250
movq %rax, %r12
movq (%rax), %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
movq (%rax), %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 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x5a37
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5a53
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3200
movq %r14, %rdi
callq 0x3260
movq %rax, %r14
cmpq %r13, %rax
jne 0x5943
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5a7f
movq %rax, %rbx
jmp 0x5abf
jmp 0x5a7f
movq %rax, %rbx
jmp 0x5aa3
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x5aa3
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5abf
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x33a0
nop