// File: /workspace/github_c_makefile_star2_O2/hamsternz[P]emulate-risc-v/display.c
// Function: display_update
static void update_reg(void) {
  int i;
  move(0, 0);
  attron(COLOR_PAIR(BORDER_PAIR));
  printw("Registers:");
  attron(COLOR_PAIR(ACTIVE_PAIR));
  for(i = 0; i < 16; i++) {
    move(1+i, 0);
    printw("r%02i %08X", i,    riscv_reg(i));
    printw(" r%02i %08X", i+16, riscv_reg(i+16));
  }
  move(1+i, 0);
  printw("       pc %08X       ",riscv_pc());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x7744(%rip), %r12      # 0xbfd8
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21c0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x2120
leaq 0x3c9c(%rip), %rdi      # 0x8554
xorl %eax, %eax
callq 0x21e0
movq (%r12), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %edx, %edx
callq 0x2120
pushq $0x10
popq %r13
leaq 0x3c86(%rip), %rbx      # 0x8560
leaq 0x3c7e(%rip), %r14      # 0x855f
xorl %r15d, %r15d
movq (%r12), %rdi
subl $0x1, %r13d
jb 0x4932
leal 0x1(%r15), %ebp
movl %ebp, %esi
xorl %edx, %edx
callq 0x21c0
movl %r15d, %edi
callq 0x2cc0
movq %rbx, %rdi
movl %r15d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x21e0
orl $0x10, %r15d
movl %r15d, %edi
callq 0x2cc0
movq %r14, %rdi
movl %r15d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x21e0
movl %ebp, %r15d
jmp 0x48e4
pushq $0x11
popq %rbx
movl %ebx, %esi
xorl %edx, %edx
callq 0x21c0
callq 0x2cab
leaq 0x3c21(%rip), %rdi      # 0x856b
movl %eax, %esi
xorl %eax, %eax
callq 0x21e0
cmpb $0x0, 0xc2be(%rip)      # 0x10c18
jne 0x4a09
movl 0xc2be(%rip), %eax      # 0x10c24
cmpl $0x7, %eax
pushq $0x6
popq %r15
cmovgel %eax, %r15d
addl $-0x6, %r15d
movq (%r12), %rdi
pushq $0x12
popq %rsi
xorl %edx, %edx
callq 0x21c0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x2120
leaq 0x3be7(%rip), %rdi      # 0x8581
xorl %eax, %eax
callq 0x21e0
movq (%r12), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %edx, %edx
callq 0x2120
shlq $0x3, %r15
leaq 0xc274(%rip), %r13      # 0x10c30
leaq 0x3cca(%rip), %rbp      # 0x868d
leaq 0x3bbc(%rip), %r14      # 0x8586
xorl %ebx, %ebx
cmpq $0x6, %rbx
je 0x49ff
movq (%r12), %rdi
leal 0x13(%rbx), %esi
xorl %edx, %edx
callq 0x21c0
leaq (%r15,%rbx,8), %rax
movq (%r13,%rax), %rsi
testq %rsi, %rsi
cmoveq %rbp, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x21e0
incq %rbx
jmp 0x49cc
movb $0x1, 0xc212(%rip)      # 0x10c18
pushq $0x11
popq %rbx
cmpb $0x0, 0xc20c(%rip)      # 0x10c1c
jne 0x4acb
movq (%r12), %rdi
pushq $0x1c
popq %rbp
xorl %esi, %esi
movl %ebp, %edx
callq 0x21c0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x2120
callq 0x2cb9
movl %eax, %r14d
callq 0x2cb2
leaq 0x3b42(%rip), %rdi      # 0x858c
movl %r14d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x21e0
movq (%r12), %rdi
callq 0x21d0
movl 0xc1fb(%rip), %eax      # 0x10c60
cmpl $0x12, %eax
cmovgel %eax, %ebx
addl $-0x11, %ebx
movq (%r12), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %edx, %edx
callq 0x2120
shlq $0x3, %rbx
leaq 0xc077(%rip), %r15      # 0x10b00
leaq 0x3b21(%rip), %r14      # 0x85b1
xorl %r13d, %r13d
cmpq $0x11, %r13
je 0x4ac4
movq (%r12), %rdi
leal 0x1(%r13), %esi
movl %ebp, %edx
callq 0x21c0
leaq (%rbx,%r13,8), %rax
movq (%r15,%rax), %rsi
testq %rsi, %rsi
je 0x4abf
movq %r14, %rdi
xorl %eax, %eax
callq 0x21e0
incq %r13
jmp 0x4a93
movb $0x1, 0xc151(%rip)      # 0x10c1c
cmpb $0x0, 0xc14e(%rip)      # 0x10c20
jne 0x4b67
movq (%r12), %rdi
pushq $0x19
popq %rsi
xorl %edx, %edx
callq 0x21c0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x2120
leaq 0x3ab7(%rip), %rdi      # 0x85b4
xorl %eax, %eax
callq 0x21e0
movq (%r12), %rdi
callq 0x21d0
movq (%r12), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %edx, %edx
callq 0x2120
pushq $0x1a
popq %rbx
leaq 0xc069(%rip), %r15      # 0x10b90
leaq 0x3a83(%rip), %r14      # 0x85b1
xorl %r13d, %r13d
cmpq $0x30, %r13
je 0x4b60
movq (%r12), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x21c0
movq (%r13,%r15), %rsi
testq %rsi, %rsi
je 0x4b58
movq %r14, %rdi
xorl %eax, %eax
callq 0x21e0
addq $0x8, %r13
incl %ebx
jmp 0x4b31
movb $0x1, 0xc0b9(%rip)      # 0x10c20
movq (%r12), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20e0