// File: /workspace/github_cpp_makefile_star2_O3/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 0xd8bb(%rip), %r15      # 0x1bfd8
leaq 0x7c3c(%rip), %rsi      # 0x16360
movl $0x12, %edx
movq %r15, %rdi
callq 0x3240
movl $0x4, %ebp
leaq 0x7c36(%rip), %r12      # 0x16373
movl $0x1f, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3240
decl %ebp
jne 0xe73d
leaq 0x7c53(%rip), %rsi      # 0x163ab
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 0x7c15(%rip), %rsi      # 0x16393
callq 0x3240
movq (%r15), %rax
movq -0x18(%rax), %rcx
leaq (%r15,%rcx), %rbp
movb 0xe1(%r15,%rcx), %cl
cmpl $-0x1, %r12d
je 0xe84b
testb %cl, %cl
jne 0xe7bb
movq %rbp, %rdi
movl $0x20, %esi
callq 0x31e0
movb $0x1, 0xe1(%rbp)
movq (%r15), %rax
movb $0x20, 0xe0(%rbp)
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 0x7c70(%rip), %rsi      # 0x1645d
callq 0x3240
movq (%rbp), %rax
movq -0x18(%rax), %rcx
leaq (%rcx,%rbp), %r12
cmpb $0x0, 0xe1(%rbp,%rcx)
jne 0xe822
movq %r12, %rdi
movl $0x20, %esi
callq 0x31e0
movb $0x1, 0xe1(%r12)
movq (%rbp), %rax
movb $0x20, 0xe0(%r12)
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 0xe8e8
testb %cl, %cl
jne 0xe866
movq %rbp, %rdi
movl $0x20, %esi
callq 0x31e0
movb $0x1, 0xe1(%rbp)
movq (%r15), %rax
movb $0x20, 0xe0(%rbp)
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 0x7bc5(%rip), %rsi      # 0x1645d
callq 0x3240
movq (%rbp), %rax
movq -0x18(%rax), %rcx
leaq (%rcx,%rbp), %r12
cmpb $0x0, 0xe1(%rbp,%rcx)
jne 0xe8cd
movq %r12, %rdi
movl $0x20, %esi
callq 0x31e0
movb $0x1, 0xe1(%r12)
movq (%rbp), %rax
movb $0x20, 0xe0(%r12)
movq -0x18(%rax), %rax
movq $0xa, 0x10(%rbp,%rax)
movq %rbp, %rdi
xorl %esi, %esi
callq 0x3330
addq $0x8, %r14
cmpq $0x20, %r14
jne 0xe76b
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 0xe768
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq