// File: /workspace/github_c_makefile_star2_O1/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 0x7543(%rip), %r12      # 0xbfd8
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21d0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x2130
leaq 0x3a9b(%rip), %rdi      # 0x8554
xorl %eax, %eax
callq 0x21f0
movq (%r12), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %edx, %edx
callq 0x2130
leaq 0x3a89(%rip), %rbx      # 0x8560
leaq 0x3a81(%rip), %r14      # 0x855f
xorl %r15d, %r15d
movq (%r12), %rdi
leal 0x1(%r15), %ebp
movl %ebp, %esi
xorl %edx, %edx
callq 0x21d0
movl %r15d, %edi
callq 0x2e72
movq %rbx, %rdi
movl %r15d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x21f0
addl $0x10, %r15d
movl %r15d, %edi
callq 0x2e72
movq %r14, %rdi
movl %r15d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x21f0
movl %ebp, %r15d
cmpl $0x10, %ebp
jne 0x4ae1
movq (%r12), %rdi
movl $0x11, %esi
xorl %edx, %edx
callq 0x21d0
callq 0x2e5d
leaq 0x3a23(%rip), %rdi      # 0x856b
movl %eax, %esi
xorl %eax, %eax
callq 0x21f0
cmpb $0x0, 0xc0d0(%rip)      # 0x10c28
jne 0x4c05
movl 0xc0d0(%rip), %eax      # 0x10c34
cmpl $0x7, %eax
movl $0x6, %r14d
cmovgel %eax, %r14d
addl $-0x6, %r14d
movq (%r12), %rdi
movl $0x12, %esi
xorl %edx, %edx
callq 0x21d0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x2130
leaq 0x39e5(%rip), %rdi      # 0x8581
xorl %eax, %eax
callq 0x21f0
movq (%r12), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %edx, %edx
callq 0x2130
shlq $0x3, %r14
leaq 0xc082(%rip), %r15      # 0x10c40
leaq 0x3ac8(%rip), %r13      # 0x868d
leaq 0x39ba(%rip), %rbx      # 0x8586
xorl %ebp, %ebp
movq (%r12), %rdi
leal 0x13(%rbp), %esi
xorl %edx, %edx
callq 0x21d0
leaq (%r14,%rbp,8), %rax
movq (%r15,%rax), %rsi
testq %rsi, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21f0
incq %rbp
cmpq $0x6, %rbp
jne 0x4bce
movb $0x1, 0xc023(%rip)      # 0x10c28
cmpb $0x0, 0xc020(%rip)      # 0x10c2c
jne 0x4cd1
movq (%r12), %rdi
xorl %esi, %esi
movl $0x1c, %edx
callq 0x21d0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x2130
callq 0x2e6b
movl %eax, %ebx
callq 0x2e64
leaq 0x3947(%rip), %rdi      # 0x858c
movl %ebx, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x21f0
movq (%r12), %rdi
callq 0x21e0
movl 0xc011(%rip), %eax      # 0x10c70
cmpl $0x12, %eax
movl $0x11, %r15d
cmovgel %eax, %r15d
addl $-0x11, %r15d
movq (%r12), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %edx, %edx
callq 0x2130
shlq $0x3, %r15
leaq 0xbe85(%rip), %r13      # 0x10b10
leaq 0x391f(%rip), %rbx      # 0x85b1
xorl %r14d, %r14d
movq %r14, %rbp
movq (%r12), %rdi
incq %r14
movl %r14d, %esi
movl $0x1c, %edx
callq 0x21d0
leaq (%r15,%rbp,8), %rax
movq (%r13,%rax), %rsi
testq %rsi, %rsi
je 0x4cc4
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21f0
cmpq $0x11, %r14
jne 0x4c95
movb $0x1, 0xbf5b(%rip)      # 0x10c2c
cmpb $0x0, 0xbf58(%rip)      # 0x10c30
jne 0x4d6f
movq (%r12), %rdi
movl $0x19, %esi
xorl %edx, %edx
callq 0x21d0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x2130
leaq 0x38af(%rip), %rdi      # 0x85b4
xorl %eax, %eax
callq 0x21f0
movq (%r12), %rdi
callq 0x21e0
movq (%r12), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %edx, %edx
callq 0x2130
movl $0x1a, %ebx
leaq 0xbe6f(%rip), %r15      # 0x10ba0
leaq 0x3879(%rip), %r14      # 0x85b1
xorl %r13d, %r13d
movq (%r12), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x21d0
movq (%r13,%r15), %rsi
testq %rsi, %rsi
je 0x4d5c
movq %r14, %rdi
xorl %eax, %eax
callq 0x21f0
addq $0x8, %r13
incl %ebx
cmpq $0x30, %r13
jne 0x4d3b
movb $0x1, 0xbec1(%rip)      # 0x10c30
movq (%r12), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20e0