// File: /workspace/github_c_makefile_star2_O3/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 0x7593(%rip), %r12      # 0xbfd8
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21e0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x2130
leaq 0x3aeb(%rip), %rdi      # 0x8554
xorl %eax, %eax
callq 0x2200
movq (%r12), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %edx, %edx
callq 0x2130
leaq 0x3ad9(%rip), %rbx      # 0x8560
leaq 0x3ad1(%rip), %r14      # 0x855f
xorl %r15d, %r15d
movq (%r12), %rdi
leal 0x1(%r15), %ebp
movl %ebp, %esi
xorl %edx, %edx
callq 0x21e0
movl %r15d, %edi
callq 0x2e72
movq %rbx, %rdi
movl %r15d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2200
addl $0x10, %r15d
movl %r15d, %edi
callq 0x2e72
movq %r14, %rdi
movl %r15d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2200
movl %ebp, %r15d
cmpl $0x10, %ebp
jne 0x4a91
movq (%r12), %rdi
movl $0x11, %esi
xorl %edx, %edx
callq 0x21e0
callq 0x2e5d
leaq 0x3a73(%rip), %rdi      # 0x856b
movl %eax, %esi
xorl %eax, %eax
callq 0x2200
cmpb $0x0, 0xc120(%rip)      # 0x10c28
jne 0x4bb5
movl 0xc120(%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 0x21e0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x2130
leaq 0x3a35(%rip), %rdi      # 0x8581
xorl %eax, %eax
callq 0x2200
movq (%r12), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %edx, %edx
callq 0x2130
shlq $0x3, %r14
leaq 0xc0d2(%rip), %r15      # 0x10c40
leaq 0x3b18(%rip), %r13      # 0x868d
leaq 0x3a0a(%rip), %rbx      # 0x8586
xorl %ebp, %ebp
movq (%r12), %rdi
leal 0x13(%rbp), %esi
xorl %edx, %edx
callq 0x21e0
leaq (%r14,%rbp,8), %rax
movq (%r15,%rax), %rsi
testq %rsi, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2200
incq %rbp
cmpq $0x6, %rbp
jne 0x4b7e
movb $0x1, 0xc073(%rip)      # 0x10c28
cmpb $0x0, 0xc070(%rip)      # 0x10c2c
jne 0x4c81
movq (%r12), %rdi
xorl %esi, %esi
movl $0x1c, %edx
callq 0x21e0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x2130
callq 0x2e6b
movl %eax, %ebx
callq 0x2e64
leaq 0x3997(%rip), %rdi      # 0x858c
movl %ebx, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2200
movq (%r12), %rdi
callq 0x21f0
movl 0xc061(%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 0xbed5(%rip), %r13      # 0x10b10
leaq 0x396f(%rip), %rbx      # 0x85b1
xorl %r14d, %r14d
movq %r14, %rbp
movq (%r12), %rdi
incq %r14
movl %r14d, %esi
movl $0x1c, %edx
callq 0x21e0
leaq (%r15,%rbp,8), %rax
movq (%r13,%rax), %rsi
testq %rsi, %rsi
je 0x4c74
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2200
cmpq $0x11, %r14
jne 0x4c45
movb $0x1, 0xbfab(%rip)      # 0x10c2c
cmpb $0x0, 0xbfa8(%rip)      # 0x10c30
jne 0x4d1f
movq (%r12), %rdi
movl $0x19, %esi
xorl %edx, %edx
callq 0x21e0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x2130
leaq 0x38ff(%rip), %rdi      # 0x85b4
xorl %eax, %eax
callq 0x2200
movq (%r12), %rdi
callq 0x21f0
movq (%r12), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %edx, %edx
callq 0x2130
movl $0x1a, %ebx
leaq 0xbebf(%rip), %r15      # 0x10ba0
leaq 0x38c9(%rip), %r14      # 0x85b1
xorl %r13d, %r13d
movq (%r12), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x21e0
movq (%r13,%r15), %rsi
testq %rsi, %rsi
je 0x4d0c
movq %r14, %rdi
xorl %eax, %eax
callq 0x2200
addq $0x8, %r13
incl %ebx
cmpq $0x30, %r13
jne 0x4ceb
movb $0x1, 0xbf11(%rip)      # 0x10c30
movq (%r12), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20e0