// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/sudoku/sudoku.c
// Function: display_update
static void display_update(char *status_msg)
{
  int x, y, offset = 0;

  erase();

  for (y = 0; y < 13; y += 4)
    mvaddstr(y, 0, "|---+---+---|");

  for (y = 0; y < 9; y++) {
    if (y % 3 == 0)
      offset++;
    mvaddch(y + offset, 0, '|');

    for (x = 0; x < 9; x++) {
      if (sudoku[y][x] == 0) 
        addch(' ');
      else
        printw("%d", sudoku[y][x]);

      if (x % 3 == 2)
        addch('|');
    }
  }

  mvaddstr(1, 16, " *** SUDOKU SOLVER ***");
  mvaddstr(3, 16, "Move cursor with arrow keys.");
  mvaddstr(4, 16, "Use numbers 1 to 9 to input numbers.");
  mvaddstr(5, 16, "Clear a number with 0 or space.");
  mvaddstr(6, 16, "Attempt automatic solving by pressing enter.");

  if (status_msg != NULL)
    mvprintw(8, 16, "Status: %s", status_msg);

  /* Place cursor. */
  move(current_y + (current_y / 3) + 1,
       current_x + (current_x / 3) + 1);

  refresh();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x14(%rbp)
movq 0x37f6(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
callq 0x1030
movl $0x0, -0x10(%rbp)
cmpl $0xd, -0x10(%rbp)
jge 0x1840
movq 0x37da(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
xorl %edx, %edx
callq 0x10f0
cmpl $-0x1, %eax
jne 0x181a
jmp 0x1835
movq 0x37bf(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x1845(%rip), %rsi      # 0x3070
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1130
movl -0x10(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x10(%rbp)
jmp 0x17f9
movl $0x0, -0x10(%rbp)
cmpl $0x9, -0x10(%rbp)
jge 0x194a
movl -0x10(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x186a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq 0x376f(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
addl -0x14(%rbp), %esi
xorl %edx, %edx
callq 0x10f0
cmpl $-0x1, %eax
jne 0x1888
jmp 0x189c
movq 0x3751(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl $0x7c, %esi
callq 0x1100
movl $0x0, -0xc(%rbp)
cmpl $0x9, -0xc(%rbp)
jge 0x193a
movslq -0x10(%rbp), %rcx
leaq 0x3828(%rip), %rax      # 0x50e0
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x18df
movq 0x3710(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl $0x20, %esi
callq 0x1100
jmp 0x1906
movslq -0x10(%rbp), %rcx
leaq 0x37f6(%rip), %rax      # 0x50e0
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0x177f(%rip), %rdi      # 0x307e
movb $0x0, %al
callq 0x1110
movl -0xc(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
cmpl $0x2, %edx
jne 0x192a
movq 0x36c3(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl $0x7c, %esi
callq 0x1100
jmp 0x192c
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x18a3
jmp 0x193c
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x1847
movq 0x368f(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq 0x10f0
cmpl $-0x1, %eax
jne 0x196a
jmp 0x1985
movq 0x366f(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x1706(%rip), %rsi      # 0x3081
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1130
movq 0x3654(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl $0x3, %esi
movl $0x10, %edx
callq 0x10f0
cmpl $-0x1, %eax
jne 0x19a5
jmp 0x19c0
movq 0x3634(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x16e2(%rip), %rsi      # 0x3098
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1130
movq 0x3619(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl $0x4, %esi
movl $0x10, %edx
callq 0x10f0
cmpl $-0x1, %eax
jne 0x19e0
jmp 0x19fb
movq 0x35f9(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x16c4(%rip), %rsi      # 0x30b5
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1130
movq 0x35de(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl $0x5, %esi
movl $0x10, %edx
callq 0x10f0
cmpl $-0x1, %eax
jne 0x1a1b
jmp 0x1a36
movq 0x35be(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x16ae(%rip), %rsi      # 0x30da
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1130
movq 0x35a3(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl $0x6, %esi
movl $0x10, %edx
callq 0x10f0
cmpl $-0x1, %eax
jne 0x1a56
jmp 0x1a71
movq 0x3583(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x1693(%rip), %rsi      # 0x30fa
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1130
cmpq $0x0, -0x8(%rbp)
je 0x1a94
movq -0x8(%rbp), %rcx
movl $0x8, %edi
movl $0x10, %esi
leaq 0x169a(%rip), %rdx      # 0x3127
movb $0x0, %al
callq 0x10c0
movq 0x3545(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl 0x3630(%rip), %esi      # 0x50d4
movl 0x362a(%rip), %eax      # 0x50d4
movl $0x3, %ecx
cltd
idivl %ecx
addl %eax, %esi
addl $0x1, %esi
movl 0x3613(%rip), %eax      # 0x50d0
movl %eax, -0x18(%rbp)
movl 0x360a(%rip), %eax      # 0x50d0
movl $0x3, %ecx
cltd
idivl %ecx
movl -0x18(%rbp), %edx
addl %eax, %edx
addl $0x1, %edx
callq 0x10f0
movq 0x34fe(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
callq 0x1080
addq $0x20, %rsp
popq %rbp
retq