// File: /workspace/github_cpp_makefile_star2_O2/daniel5151[P]mips241/src/debug.cc
// Function: MIPS::Debugger::printCPUState()
void Debugger::printCPUState() {
  for (int i = 1; i < 32; i++) {
    if (i % 4 - 1 == 0 && i != 0)
      cerr << endl;

    cerr
      << setfill(' ') << ( (i % 4 - 1 != 0) ? "   " : "" ) << "$"
      << setw(2) << left << dec << i
      << " = " << toHex(cpu.getRegister(i));
  }

  cerr <<  endl;
  cerr
    << " PC = " << toHex(cpu.getiRegister("PC"))
    << "   "
    << " IR = " << toHex(cpu.getiRegister("IR"))
    << endl
    << endl;

  cerr
    << " hi = " << toHex(cpu.getiRegister("hi")) << "   "
    << " lo = " << toHex(cpu.getiRegister("lo"))
    << endl
    << endl;

  cerr
    << " RA = " << toHex(cpu.getiRegister("RA")) << "   "
    << " RB = " << toHex(cpu.getiRegister("RB"))
    << endl;
  cerr
    << " RZ = " << toHex(cpu.getiRegister("RZ"))
    << endl;
  cerr
    << " RM = " << toHex(cpu.getiRegister("RM"))
    << endl;
  cerr
    << " RY = " << toHex(cpu.getiRegister("RY"))
    << endl;

  cerr << "Stage: " << cpu.getStage() << endl;

  cerr
    << "Cycle no. "
    << dec << cpu.getCycle()
    << endl;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, 0x10(%rsp)
pushq $0x1
popq %rbp
movq 0x79da(%rip), %r14      # 0xaff0
leaq 0x3b71(%rip), %r13      # 0x718e
leaq 0x20(%rsp), %rbx
leaq 0x48(%rsp), %r15
cmpl $0x20, %ebp
je 0x36fd
movl %ebp, %eax
andl $0x3, %eax
leaq 0x3afc(%rip), %r12      # 0x7138
cmpl $0x1, %eax
jne 0x3650
movq %r14, %rdi
callq 0x20f0
leaq 0x39b5(%rip), %r12      # 0x7005
movq %r14, %rdi
pushq $0x20
popq %rsi
callq 0x2300
movq %rax, %rdi
movq %r12, %rsi
callq 0x21e0
movq %rax, %rdi
leaq 0x3afd(%rip), %rsi      # 0x716d
callq 0x21e0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x2, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
movl $0xffffff4f, %edi       # imm = 0xFFFFFF4F
andl %edi, %esi
orl $0x20, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movl %ebp, %esi
callq 0x2370
movq %rax, %rdi
movq %r13, %rsi
callq 0x21e0
movq %rax, %r12
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movl %ebp, %esi
callq 0x2e30
movl %eax, 0x48(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x478e
movq %r12, %rdi
movq %rbx, %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x23e8
incl %ebp
jmp 0x3627
movq 0x78ec(%rip), %rbx      # 0xaff0
movq %rbx, %rdi
callq 0x20f0
leaq 0x3a5c(%rip), %rsi      # 0x716f
movq %rbx, %rdi
callq 0x21e0
movq %rax, %rbx
movq 0x10(%rsp), %rax
movq (%rax), %r14
leaq 0x39c5(%rip), %rsi      # 0x70f2
leaq 0x168(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2740
leaq 0x168(%rsp), %rsi
movq %r14, %rdi
callq 0x2e38
leaq 0x1c(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x478e
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
leaq 0x39c4(%rip), %rsi      # 0x7138
movq %rax, %rdi
callq 0x21e0
leaq 0x39f3(%rip), %rsi      # 0x7176
movq %rax, %rdi
callq 0x21e0
movq %rax, %rbx
movq 0x10(%rsp), %rax
movq (%rax), %r14
leaq 0x3952(%rip), %rsi      # 0x70ef
leaq 0x148(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x2740
leaq 0x148(%rsp), %rsi
movq %r14, %rdi
callq 0x2e38
leaq 0x44(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x48(%rsp), %rdi
callq 0x478e
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
movq %rax, %rdi
callq 0x20f0
leaq 0x48(%rsp), %rdi
callq 0x23e8
leaq 0x148(%rsp), %rdi
callq 0x23e8
leaq 0x20(%rsp), %rdi
callq 0x23e8
leaq 0x168(%rsp), %rdi
callq 0x23e8
movq 0x77ce(%rip), %rdi      # 0xaff0
leaq 0x3954(%rip), %rsi      # 0x717d
callq 0x21e0
movq %rax, %rbx
movq 0x10(%rsp), %rax
movq (%rax), %r14
leaq 0x38b5(%rip), %rsi      # 0x70f5
leaq 0x128(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2740
leaq 0x128(%rsp), %rsi
movq %r14, %rdi
callq 0x2e38
leaq 0x1c(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x478e
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
leaq 0x38b1(%rip), %rsi      # 0x7138
movq %rax, %rdi
callq 0x21e0
leaq 0x38ee(%rip), %rsi      # 0x7184
movq %rax, %rdi
callq 0x21e0
movq %rax, %rbx
movq 0x10(%rsp), %rax
movq (%rax), %r14
leaq 0x3848(%rip), %rsi      # 0x70f8
leaq 0x108(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x2740
leaq 0x108(%rsp), %rsi
movq %r14, %rdi
callq 0x2e38
leaq 0x44(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x48(%rsp), %rdi
callq 0x478e
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
movq %rax, %rdi
callq 0x20f0
leaq 0x48(%rsp), %rdi
callq 0x23e8
leaq 0x108(%rsp), %rdi
callq 0x23e8
leaq 0x20(%rsp), %rdi
callq 0x23e8
leaq 0x128(%rsp), %rdi
callq 0x23e8
movq 0x76bb(%rip), %rdi      # 0xaff0
leaq 0x384f(%rip), %rsi      # 0x718b
callq 0x21e0
movq %rax, %rbx
movq 0x10(%rsp), %rax
movq (%rax), %r14
leaq 0x378d(%rip), %rsi      # 0x70e0
leaq 0xe8(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2740
leaq 0xe8(%rsp), %rsi
movq %r14, %rdi
callq 0x2e38
leaq 0x1c(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x478e
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
leaq 0x379e(%rip), %rsi      # 0x7138
movq %rax, %rdi
callq 0x21e0
leaq 0x37e9(%rip), %rsi      # 0x7192
movq %rax, %rdi
callq 0x21e0
movq %rax, %rbx
movq 0x10(%rsp), %rax
movq (%rax), %r14
leaq 0x3720(%rip), %rsi      # 0x70e3
leaq 0xc8(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x2740
leaq 0xc8(%rsp), %rsi
movq %r14, %rdi
callq 0x2e38
leaq 0x44(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x48(%rsp), %rdi
callq 0x478e
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
leaq 0x48(%rsp), %rdi
callq 0x23e8
leaq 0xc8(%rsp), %rdi
callq 0x23e8
leaq 0x20(%rsp), %rdi
callq 0x23e8
leaq 0xe8(%rsp), %rdi
callq 0x23e8
movq 0x75b0(%rip), %rdi      # 0xaff0
leaq 0x3752(%rip), %rsi      # 0x7199
callq 0x21e0
movq %rax, %rbx
movq 0x10(%rsp), %rax
movq (%rax), %r14
leaq 0x3688(%rip), %rsi      # 0x70e6
leaq 0xa8(%rsp), %rdi
leaq 0x1c(%rsp), %rdx
callq 0x2740
leaq 0xa8(%rsp), %rsi
movq %r14, %rdi
callq 0x2e38
leaq 0x48(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x478e
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
leaq 0x20(%rsp), %rdi
callq 0x23e8
leaq 0xa8(%rsp), %rdi
callq 0x23e8
movq 0x752c(%rip), %rdi      # 0xaff0
leaq 0x36d5(%rip), %rsi      # 0x71a0
callq 0x21e0
movq %rax, %rbx
movq 0x10(%rsp), %rax
movq (%rax), %r14
leaq 0x3607(%rip), %rsi      # 0x70e9
leaq 0x88(%rsp), %rdi
leaq 0x1c(%rsp), %rdx
callq 0x2740
leaq 0x88(%rsp), %rsi
movq %r14, %rdi
callq 0x2e38
leaq 0x48(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x478e
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
leaq 0x20(%rsp), %rdi
callq 0x23e8
leaq 0x88(%rsp), %rdi
callq 0x23e8
movq 0x74a8(%rip), %rdi      # 0xaff0
leaq 0x3658(%rip), %rsi      # 0x71a7
callq 0x21e0
movq %rax, %rbx
movq 0x10(%rsp), %rax
movq (%rax), %r14
leaq 0x3586(%rip), %rsi      # 0x70ec
leaq 0x68(%rsp), %rdi
leaq 0x1c(%rsp), %rdx
callq 0x2740
leaq 0x68(%rsp), %rsi
movq %r14, %rdi
callq 0x2e38
leaq 0x48(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x478e
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
leaq 0x20(%rsp), %rdi
callq 0x23e8
leaq 0x68(%rsp), %rdi
callq 0x23e8
movq 0x742d(%rip), %rbx      # 0xaff0
leaq 0x35e4(%rip), %rsi      # 0x71ae
movq %rbx, %rdi
callq 0x21e0
movq %rax, %r14
movq 0x10(%rsp), %r15
movq (%r15), %rdi
callq 0x2e20
movq %r14, %rdi
movl %eax, %esi
callq 0x2370
movq %rax, %rdi
callq 0x20f0
leaq 0x35bb(%rip), %rsi      # 0x71b6
movq %rbx, %rdi
callq 0x21e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq (%r15), %rdi
callq 0x2e1c
movq %rbx, %rdi
movl %eax, %esi
callq 0x2370
movq %rax, %rdi
callq 0x20f0
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c60
jmp 0x3c60
jmp 0x3c60
jmp 0x3cfc
jmp 0x3c60
jmp 0x3d2f
jmp 0x3c60
jmp 0x3d62
movq %rax, %rbx
jmp 0x3d86
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x23e8
jmp 0x3c7a
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x3d81
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x23e8
jmp 0x3c96
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
jmp 0x3d81
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x23e8
jmp 0x3cb5
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
jmp 0x3d81
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x23e8
jmp 0x3cd4
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x23e8
jmp 0x3cff
movq %rax, %rbx
jmp 0x3d09
movq %rax, %rbx
jmp 0x3d20
movq %rax, %rbx
jmp 0x3d3c
movq %rax, %rbx
jmp 0x3d53
movq %rax, %rbx
jmp 0x3d6f
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x23e8
leaq 0xe8(%rsp), %rdi
jmp 0x3d81
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x23e8
leaq 0x108(%rsp), %rdi
callq 0x23e8
jmp 0x3d32
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x23e8
leaq 0x128(%rsp), %rdi
jmp 0x3d81
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x23e8
leaq 0x148(%rsp), %rdi
callq 0x23e8
jmp 0x3d65
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x23e8
leaq 0x168(%rsp), %rdi
jmp 0x3d81
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x23e8
movq %rbx, %rdi
callq 0x23a0