// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/main.cpp
// Function: print_regs(IntegerRegisterFile&, int*)
void print_regs(IntegerRegisterFile &rf, int *rmap){
	std::cout << "Integer Registers\n";
	for(int j=0; j<4; ++j){
		std::cout << "\033[0;36m  Register     Value\033[0m";
	}
	std::cout << "\n";
	for(int i=0; i < NUM_LOG_REGS/4; ++i){
		for(int j=0; j < 4; ++j){
			if(*(rmap + j*NUM_LOG_REGS/4 + i) != -1)
				std::cout << "\033[1;36m" <<
				std::setfill(' ') << std::setw(10) << j*NUM_LOG_REGS/4 + i << "\033[0m" <<
				std::setfill(' ') << std::setw(10) << rf.read(*(rmap + j*NUM_LOG_REGS/4 + i));
			else
				std::cout << "\033[1;36m" <<
				std::setfill(' ') << std::setw(10) << j*NUM_LOG_REGS/4 + i << "\033[0m" <<
				std::setfill(' ') << std::setw(10) << 0;
		}
		std::cout << std::endl;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, (%rsp)
movq 0xe387(%rip), %r15      # 0x1cfd8
leaq 0x86cd(%rip), %rsi      # 0x17325
movl $0x12, %edx
movq %r15, %rdi
callq 0x3240
movl $0x4, %ebp
leaq 0x86c7(%rip), %r12      # 0x17338
movl $0x1f, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3240
decl %ebp
jne 0xec71
leaq 0x86e4(%rip), %rsi      # 0x17370
movl $0x1, %edx
movq %r15, %rdi
callq 0x3240
xorl %r13d, %r13d
xorl %r14d, %r14d
movl (%rbx,%r14,4), %r12d
movl $0x7, %edx
movq %r15, %rdi
leaq 0x86a6(%rip), %rsi      # 0x17358
callq 0x3240
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rbp
movb 0xe1(%r15,%rax), %al
cmpl $-0x1, %r12d
je 0xed8d
testb %al, %al
jne 0xecf2
movq %rbp, %rdi
movl $0x20, %esi
callq 0x31e0
movb %al, 0xe0(%rbp)
movb $0x1, 0xe1(%rbp)
movb $0x20, 0xe0(%rbp)
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0xa, 0x10(%r15,%rax)
leal (%r14,%r13), %esi
movq %r15, %rdi
callq 0x3330
movq %rax, %rbp
movl $0x4, %edx
movq %rax, %rdi
leaq 0x86fb(%rip), %rsi      # 0x17422
callq 0x3240
movq (%rbp), %rax
movq -0x18(%rax), %rax
leaq (%rax,%rbp), %r12
cmpb $0x0, 0xe1(%rbp,%rax)
jne 0xed60
movq %r12, %rdi
movl $0x20, %esi
callq 0x31e0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq (%rbp), %rax
movq -0x18(%rax), %rax
movq $0xa, 0x10(%rbp,%rax)
movslq (%rbx,%r14,4), %rax
movq (%rsp), %rcx
movl (%rcx,%rax,4), %esi
movq %rbp, %rdi
jmp 0xee38
testb %al, %al
jne 0xedab
movq %rbp, %rdi
movl $0x20, %esi
callq 0x31e0
movb %al, 0xe0(%rbp)
movb $0x1, 0xe1(%rbp)
movb $0x20, 0xe0(%rbp)
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0xa, 0x10(%r15,%rax)
leal (%r14,%r13), %esi
movq %r15, %rdi
callq 0x3330
movq %rax, %rbp
movl $0x4, %edx
movq %rax, %rdi
leaq 0x8642(%rip), %rsi      # 0x17422
callq 0x3240
movq (%rbp), %rax
movq -0x18(%rax), %rax
leaq (%rax,%rbp), %r12
cmpb $0x0, 0xe1(%rbp,%rax)
jne 0xee19
movq %r12, %rdi
movl $0x20, %esi
callq 0x31e0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq (%rbp), %rax
movq -0x18(%rax), %rax
movq $0xa, 0x10(%rbp,%rax)
movq %rbp, %rdi
xorl %esi, %esi
callq 0x3330
addq $0x8, %r14
cmpq $0x20, %r14
jne 0xec9f
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
incq %r13
addq $0x4, %rbx
cmpq $0x8, %r13
jne 0xec9c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq