// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/playlist/ui.c
// Function: update_screen
static void update_screen(void)
{
  int n, i, maxy, maxx, playing;
  char *entry;

  getmaxyx(stdscr, maxy, maxx);
  maxy -= 2;
  erase();

  /* Draw entries. */
  for (n = 0; n < maxy; n++) {
    if ((n + scroll_offset) >= list_size_get())
      break;

    entry = list_get(n + scroll_offset, &playing);
    if (entry == NULL)
      break;

    if (n == (selected_entry - scroll_offset)) {
      attron(A_REVERSE);
      if (playing)
        attron(A_BOLD);
      mvaddnstr(n, 0, entry, maxx);
      for (i = strlen(entry); i < maxx; i++)
        mvaddch(n, i, ' ');
      if (playing)
        attroff(A_BOLD);
      attroff(A_REVERSE);
    } else {
      if (playing)
        attron(A_BOLD);
      mvaddnstr(n, 0, entry, maxx);
      if (playing)
        attroff(A_BOLD);
    }
  }

  /* Draw status bar and filter input, and let cursor rest there. */
  mvhline(maxy, 0, 0, maxx);
  mvprintw(maxy + 1, 0, "> %s", file_filter);

  if (help_hint_active) {
    attron(A_REVERSE);
    mvaddstr(maxy, 0, "Press F1 for help.");
    attroff(A_REVERSE);
  }

  if (help_window_active) {
    if (help_window == NULL) {
      help_window = subwin(stdscr, 13, maxx - 6, 3, 3);
    }
    werase(help_window);
    mvwaddstr(help_window, 1, 1, "F1 - Help");
    mvwaddstr(help_window, 2, 1, "F5 - Go to top (Same as Home key)");
    mvwaddstr(help_window, 3, 1, "F6 - Go to bottom (Same as End key)");
    mvwaddstr(help_window, 4, 1, "F7 - Move entry up");
    mvwaddstr(help_window, 5, 1, "F8 - Move entry down");
    mvwaddstr(help_window, 6, 1, "F9 - Shuffle list (Also if filtered)");
    mvwaddstr(help_window, 7, 1, "Escape - Quit");
    mvwaddstr(help_window, 9, 1,
      "Use Up/Down Arrow keys and Page Up/Down to scroll and move cursor.");
    mvwaddstr(help_window, 10, 1,
      "Use Left or Right Arrow keys to select entry under cursor.");
    mvwaddstr(help_window, 11, 1,
      "Use characters to enter a filter, and press Enter to apply it.");
    box(help_window, ACS_VLINE, ACS_HLINE);
  } else {
    if (help_window != NULL) {
      delwin(help_window);
      help_window = NULL;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
xorl %eax, %eax
movq 0x353f(%rip), %rcx      # 0x5fe0
cmpq (%rcx), %rax
je 0x2abc
movq 0x3533(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movswl 0x4(%rax), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2ac6
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x24(%rbp)
jmp 0x2ac6
movl -0x24(%rbp), %eax
movl %eax, -0xc(%rbp)
xorl %eax, %eax
movq 0x350b(%rip), %rcx      # 0x5fe0
cmpq (%rcx), %rax
je 0x2af0
movq 0x34ff(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movswl 0x6(%rax), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2afa
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x28(%rbp)
jmp 0x2afa
movl -0x28(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
subl $0x2, %eax
movl %eax, -0xc(%rbp)
movq 0x34d0(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
callq 0x2030
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x2cf0
movl -0x4(%rbp), %eax
addl 0x3684(%rip), %eax      # 0x61b8
movl %eax, -0x2c(%rbp)
callq 0x3450
movl %eax, %ecx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jl 0x2b4a
jmp 0x2cf0
movl -0x4(%rbp), %edi
addl 0x3665(%rip), %edi      # 0x61b8
leaq -0x14(%rbp), %rsi
callq 0x33b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2b6c
jmp 0x2cf0
movl -0x4(%rbp), %eax
movl 0x363f(%rip), %ecx      # 0x61b4
subl 0x363d(%rip), %ecx      # 0x61b8
cmpl %ecx, %eax
jne 0x2c71
movq 0x3456(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %eax, %eax
movl %eax, %edx
callq 0x2140
cmpl $0x0, -0x14(%rbp)
je 0x2bb9
movq 0x3438(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x2140
movq 0x3420(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl -0x4(%rbp), %esi
xorl %edx, %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2bd4
jmp 0x2bea
movq 0x3405(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
movl -0x10(%rbp), %edx
callq 0x22a0
movq -0x20(%rbp), %rdi
callq 0x20d0
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x2c39
movq 0x33db(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl -0x4(%rbp), %esi
movl -0x8(%rbp), %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2c1a
jmp 0x2c2e
movq 0x33bf(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl $0x20, %esi
callq 0x2260
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x2bf6
cmpl $0x0, -0x14(%rbp)
je 0x2c57
movq 0x339a(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x22e0
movq 0x3382(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %eax, %eax
movl %eax, %edx
callq 0x22e0
jmp 0x2ce0
cmpl $0x0, -0x14(%rbp)
je 0x2c8f
movq 0x3362(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x2140
movq 0x334a(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl -0x4(%rbp), %esi
xorl %edx, %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2caa
jmp 0x2cc0
movq 0x332f(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
movl -0x10(%rbp), %edx
callq 0x22a0
cmpl $0x0, -0x14(%rbp)
je 0x2cde
movq 0x3313(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x22e0
jmp 0x2ce0
jmp 0x2ce2
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x2b1f
movq 0x32e9(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl -0xc(%rbp), %esi
xorl %edx, %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2d0b
jmp 0x2d1f
movq 0x32ce(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl -0x10(%rbp), %edx
xorl %esi, %esi
callq 0x22b0
movl -0xc(%rbp), %edi
addl $0x1, %edi
xorl %esi, %esi
leaq 0x1321(%rip), %rdx      # 0x404f
leaq 0x348b(%rip), %rcx      # 0x61c0
movb $0x0, %al
callq 0x2170
cmpl $0x0, 0x344d(%rip)      # 0x6190
je 0x2dab
movq 0x3294(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %eax, %eax
movl %eax, %edx
callq 0x2140
movq 0x327c(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl -0xc(%rbp), %esi
xorl %edx, %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2d78
jmp 0x2d93
movq 0x3261(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
leaq 0x12cb(%rip), %rsi      # 0x4054
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
movq 0x3246(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %eax, %eax
movl %eax, %edx
callq 0x22e0
cmpl $0x0, 0x33fe(%rip)      # 0x61b0
je 0x3064
cmpq $0x0, 0x3438(%rip)      # 0x61f8
jne 0x2dec
movq 0x3217(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movl -0x10(%rbp), %edx
subl $0x6, %edx
movl $0xd, %esi
movl $0x3, %r8d
movl %r8d, %ecx
callq 0x21f0
movq %rax, 0x340c(%rip)      # 0x61f8
movq 0x3405(%rip), %rdi      # 0x61f8
callq 0x2030
movq 0x33f9(%rip), %rdi      # 0x61f8
movl $0x1, %edx
movl %edx, %esi
callq 0x2240
cmpl $-0x1, %eax
jne 0x2e12
jmp 0x2e2a
movq 0x33df(%rip), %rdi      # 0x61f8
leaq 0x1247(%rip), %rsi      # 0x4067
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
movq 0x33c7(%rip), %rdi      # 0x61f8
movl $0x2, %esi
movl $0x1, %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2e47
jmp 0x2e5f
movq 0x33aa(%rip), %rdi      # 0x61f8
leaq 0x121c(%rip), %rsi      # 0x4071
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
movq 0x3392(%rip), %rdi      # 0x61f8
movl $0x3, %esi
movl $0x1, %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2e7c
jmp 0x2e94
movq 0x3375(%rip), %rdi      # 0x61f8
leaq 0x1209(%rip), %rsi      # 0x4093
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
movq 0x335d(%rip), %rdi      # 0x61f8
movl $0x4, %esi
movl $0x1, %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2eb1
jmp 0x2ec9
movq 0x3340(%rip), %rdi      # 0x61f8
leaq 0x11f8(%rip), %rsi      # 0x40b7
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
movq 0x3328(%rip), %rdi      # 0x61f8
movl $0x5, %esi
movl $0x1, %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2ee6
jmp 0x2efe
movq 0x330b(%rip), %rdi      # 0x61f8
leaq 0x11d6(%rip), %rsi      # 0x40ca
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
movq 0x32f3(%rip), %rdi      # 0x61f8
movl $0x6, %esi
movl $0x1, %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2f1b
jmp 0x2f33
movq 0x32d6(%rip), %rdi      # 0x61f8
leaq 0x11b6(%rip), %rsi      # 0x40df
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
movq 0x32be(%rip), %rdi      # 0x61f8
movl $0x7, %esi
movl $0x1, %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2f50
jmp 0x2f68
movq 0x32a1(%rip), %rdi      # 0x61f8
leaq 0x11a6(%rip), %rsi      # 0x4104
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
movq 0x3289(%rip), %rdi      # 0x61f8
movl $0x9, %esi
movl $0x1, %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2f85
jmp 0x2f9d
movq 0x326c(%rip), %rdi      # 0x61f8
leaq 0x117f(%rip), %rsi      # 0x4112
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
movq 0x3254(%rip), %rdi      # 0x61f8
movl $0xa, %esi
movl $0x1, %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2fba
jmp 0x2fd2
movq 0x3237(%rip), %rdi      # 0x61f8
leaq 0x118d(%rip), %rsi      # 0x4155
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
movq 0x321f(%rip), %rdi      # 0x61f8
movl $0xb, %esi
movl $0x1, %edx
callq 0x2240
cmpl $-0x1, %eax
jne 0x2fef
jmp 0x3007
movq 0x3202(%rip), %rdi      # 0x61f8
leaq 0x1193(%rip), %rsi      # 0x4190
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
movq 0x31ea(%rip), %rdi      # 0x61f8
movq 0x2fc3(%rip), %rax      # 0x5fd8
movl 0x1e0(%rax), %esi
movq 0x2fb6(%rip), %rax      # 0x5fd8
movl 0x1e0(%rax), %edx
movq 0x2fa9(%rip), %rax      # 0x5fd8
movl 0x1c4(%rax), %ecx
movq 0x2f9c(%rip), %rax      # 0x5fd8
movl 0x1c4(%rax), %r8d
xorl %r9d, %r9d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0x20a0
jmp 0x3087
cmpq $0x0, 0x318c(%rip)      # 0x61f8
je 0x3085
movq 0x3183(%rip), %rdi      # 0x61f8
callq 0x21a0
movq $0x0, 0x3173(%rip) # 0x61f8
jmp 0x3087
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)