// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/invaders/iface.c
// Function: iface_redraw_screen
void iface_redraw_screen(void)
{
  int i, j, x, y;
  int maxy, maxx;

  erase();

  /* Draw invaders. */
  for (i = 0; i < GAME_INVADERS; i++) {
    if (game_state.invader_alive[i]) {
      y = game_state.invaders_pos_y + ((i / 10) * 4);
      x = game_state.invaders_pos_x + ((i % 10) * 7);
      if (i / 10 == 0) {
        if (game_state.invaders_pos_x % 2 == 0) {
          mvaddstr(y,     x, INVADER_1_S1_R1);
          mvaddstr(y + 1, x, INVADER_1_S1_R2);
          mvaddstr(y + 2, x, INVADER_1_S1_R3);
        } else {
          mvaddstr(y,     x, INVADER_1_S2_R1);
          mvaddstr(y + 1, x, INVADER_1_S2_R2);
          mvaddstr(y + 2, x, INVADER_1_S2_R3);
        }
      } else if (i / 10 == 1) {
        if (game_state.invaders_pos_x % 2 == 0) {
          mvaddstr(y,     x, INVADER_2_S1_R1);
          mvaddstr(y + 1, x, INVADER_2_S1_R2);
          mvaddstr(y + 2, x, INVADER_2_S1_R3);
        } else {
          mvaddstr(y,     x, INVADER_2_S2_R1);
          mvaddstr(y + 1, x, INVADER_2_S2_R2);
          mvaddstr(y + 2, x, INVADER_2_S2_R3);
        }
      } else {
        if (game_state.invaders_pos_x % 2 == 0) {
          mvaddstr(y,     x, INVADER_3_S1_R1);
          mvaddstr(y + 1, x, INVADER_3_S1_R2);
          mvaddstr(y + 2, x, INVADER_3_S1_R3);
        } else {
          mvaddstr(y,     x, INVADER_3_S2_R1);
          mvaddstr(y + 1, x, INVADER_3_S2_R2);
          mvaddstr(y + 2, x, INVADER_3_S2_R3);
        }
      }
    }
  }

  /* Draw shields. */
  for (i = 0; i < GAME_SHIELDS; i++) {
    for (j = 0; j < GAME_SHIELD_PARTS; j++) {
      if (game_state.shield_intact[i][j]) {
        y = (i / 4 == 0) ? GAME_MAP_HEIGHT - 4 : GAME_MAP_HEIGHT - 5;
        x = 12 + ((i % 4) * 15) + j;
        mvaddch(y, x, '#');
      }
    }
  }

  /* Draw shots and bombs. */
  if (game_state.shot_pos_y >= 0)
    mvaddch(game_state.shot_pos_y, game_state.shot_pos_x, '|');
  if (game_state.bomb_pos_y >= 0)
    mvaddch(game_state.bomb_pos_y, game_state.bomb_pos_x, '*');

  /* Draw player. */
  mvaddstr(GAME_MAP_HEIGHT - 2, game_state.player_pos - 2, PLAYER_R1);
  mvaddstr(GAME_MAP_HEIGHT - 1, game_state.player_pos - 2, PLAYER_R2);

  /* Draw borders. (Only if terminal size is too large.) */
  getmaxyx(stdscr, maxy, maxx);
  if (maxy > GAME_MAP_HEIGHT)
    mvhline(GAME_MAP_HEIGHT, 0, 0, GAME_MAP_WIDTH + 1);
  if (maxx > GAME_MAP_WIDTH)
    mvvline(0, GAME_MAP_WIDTH, 0, GAME_MAP_HEIGHT);

  /* Position cursor on player. */
  move(GAME_MAP_HEIGHT - 2, game_state.player_pos);

  refresh();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x3861(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
callq 0x1030
movl $0x0, -0x4(%rbp)
cmpl $0x1e, -0x4(%rbp)
jge 0x1ca5
movslq -0x4(%rbp), %rcx
leaq 0x399d(%rip), %rax      # 0x5140
testb $0x1, 0x1a(%rax,%rcx)
je 0x1c95
leaq 0x398b(%rip), %rax      # 0x5140
movswl 0xc(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x4(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x20(%rbp), %eax
shll $0x2, %ecx
addl %ecx, %eax
movl %eax, -0x10(%rbp)
leaq 0x3965(%rip), %rax      # 0x5140
movswl 0xe(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x4(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl -0x1c(%rbp), %eax
imull $0x7, %edx, %ecx
addl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
cmpl $0x0, %eax
jne 0x1988
leaq 0x392d(%rip), %rax      # 0x5140
movswl 0xe(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x18d8
movq 0x37b1(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1844
jmp 0x185f
movq 0x3795(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x18b6(%rip), %rsi      # 0x310b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
movq 0x377a(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
addl $0x1, %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x187e
jmp 0x1899
movq 0x375b(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x1882(%rip), %rsi      # 0x3111
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
movq 0x3740(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
addl $0x2, %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x18b8
jmp 0x18d3
movq 0x3721(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x184e(%rip), %rsi      # 0x3117
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
jmp 0x1983
movq 0x3701(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x18f4
jmp 0x190f
movq 0x36e5(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x1806(%rip), %rsi      # 0x310b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
movq 0x36ca(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
addl $0x1, %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x192e
jmp 0x1949
movq 0x36ab(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x17d2(%rip), %rsi      # 0x3111
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
movq 0x3690(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
addl $0x2, %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1968
jmp 0x1983
movq 0x3671(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x17a4(%rip), %rsi      # 0x311d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
jmp 0x1c93
movl -0x4(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
cmpl $0x1, %eax
jne 0x1b18
leaq 0x379d(%rip), %rax      # 0x5140
movswl 0xe(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1a68
movq 0x3621(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x19d4
jmp 0x19ef
movq 0x3605(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x173e(%rip), %rsi      # 0x3123
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
movq 0x35ea(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
addl $0x1, %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1a0e
jmp 0x1a29
movq 0x35cb(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x170a(%rip), %rsi      # 0x3129
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
movq 0x35b0(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
addl $0x2, %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1a48
jmp 0x1a63
movq 0x3591(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x16d6(%rip), %rsi      # 0x312f
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
jmp 0x1b13
movq 0x3571(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1a84
jmp 0x1a9f
movq 0x3555(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x16a0(%rip), %rsi      # 0x3135
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
movq 0x353a(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
addl $0x1, %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1abe
jmp 0x1ad9
movq 0x351b(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x165a(%rip), %rsi      # 0x3129
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
movq 0x3500(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
addl $0x2, %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1af8
jmp 0x1b13
movq 0x34e1(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x1626(%rip), %rsi      # 0x312f
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
jmp 0x1c91
leaq 0x3621(%rip), %rax      # 0x5140
movswl 0xe(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1be4
movq 0x34a5(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1b50
jmp 0x1b6b
movq 0x3489(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x15da(%rip), %rsi      # 0x313b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
movq 0x346e(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
addl $0x1, %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1b8a
jmp 0x1ba5
movq 0x344f(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x15a6(%rip), %rsi      # 0x3141
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
movq 0x3434(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
addl $0x2, %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1bc4
jmp 0x1bdf
movq 0x3415(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x1572(%rip), %rsi      # 0x3147
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
jmp 0x1c8f
movq 0x33f5(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1c00
jmp 0x1c1b
movq 0x33d9(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x152a(%rip), %rsi      # 0x313b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
movq 0x33be(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
addl $0x1, %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1c3a
jmp 0x1c55
movq 0x339f(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x1502(%rip), %rsi      # 0x314d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
movq 0x3384(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
addl $0x2, %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1c74
jmp 0x1c8f
movq 0x3365(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x14c2(%rip), %rsi      # 0x3147
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
jmp 0x1c91
jmp 0x1c93
jmp 0x1c95
jmp 0x1c97
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x178e
movl $0x0, -0x4(%rbp)
cmpl $0x8, -0x4(%rbp)
jge 0x1d6e
movl $0x0, -0x8(%rbp)
cmpl $0xa, -0x8(%rbp)
jge 0x1d5e
movslq -0x4(%rbp), %rcx
leaq 0x346e(%rip), %rax      # 0x5140
addq $0x38, %rax
imulq $0xa, %rcx, %rcx
addq %rcx, %rax
movslq -0x8(%rbp), %rcx
testb $0x1, (%rax,%rcx)
je 0x1d4e
movl -0x4(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %edx
movl $0x13, %eax
movl $0x14, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x4(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
imull $0xf, %edx, %eax
addl $0xc, %eax
addl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
movq 0x32bb(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
movl -0xc(%rbp), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1d3a
jmp 0x1d4e
movq 0x329f(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl $0x23, %esi
callq 0x1120
jmp 0x1d50
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1cbd
jmp 0x1d60
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x1cac
leaq 0x33cb(%rip), %rax      # 0x5140
movswl 0x12(%rax), %eax
cmpl $0x0, %eax
jl 0x1dbe
movq 0x325b(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x33b1(%rip), %rax      # 0x5140
movswl 0x12(%rax), %esi
leaq 0x33a6(%rip), %rax      # 0x5140
movswl 0x14(%rax), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1daa
jmp 0x1dbe
movq 0x322f(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl $0x7c, %esi
callq 0x1120
leaq 0x337b(%rip), %rax      # 0x5140
movswl 0x16(%rax), %eax
cmpl $0x0, %eax
jl 0x1e0e
movq 0x320b(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x3361(%rip), %rax      # 0x5140
movswl 0x16(%rax), %esi
leaq 0x3356(%rip), %rax      # 0x5140
movswl 0x18(%rax), %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1dfa
jmp 0x1e0e
movq 0x31df(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl $0x2a, %esi
callq 0x1120
movq 0x31cb(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x3321(%rip), %rax      # 0x5140
movswl 0xa(%rax), %edx
subl $0x2, %edx
movl $0x16, %esi
callq 0x1100
cmpl $-0x1, %eax
jne 0x1e37
jmp 0x1e52
movq 0x31a2(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x130b(%rip), %rsi      # 0x3153
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
movq 0x3187(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x32dd(%rip), %rax      # 0x5140
movswl 0xa(%rax), %edx
subl $0x2, %edx
movl $0x17, %esi
callq 0x1100
cmpl $-0x1, %eax
jne 0x1e7b
jmp 0x1e96
movq 0x315e(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x12a9(%rip), %rsi      # 0x3135
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1150
xorl %eax, %eax
movq 0x3141(%rip), %rcx      # 0x4fe0
cmpq (%rcx), %rax
je 0x1eba
movq 0x3135(%rip), %rax      # 0x4fe0
movq (%rax), %rax
movswl 0x4(%rax), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1ec4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x24(%rbp)
jmp 0x1ec4
movl -0x24(%rbp), %eax
movl %eax, -0x14(%rbp)
xorl %eax, %eax
movq 0x310d(%rip), %rcx      # 0x4fe0
cmpq (%rcx), %rax
je 0x1eee
movq 0x3101(%rip), %rax      # 0x4fe0
movq (%rax), %rax
movswl 0x6(%rax), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x1ef8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x28(%rbp)
jmp 0x1ef8
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
cmpl $0x18, -0x14(%rbp)
jle 0x1f37
movq 0x30d5(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movl $0x18, %esi
xorl %edx, %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1f21
jmp 0x1f37
movq 0x30b8(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
xorl %esi, %esi
movl $0x51, %edx
callq 0x1160
cmpl $0x50, -0x18(%rbp)
jle 0x1f70
movq 0x309c(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x1100
cmpl $-0x1, %eax
jne 0x1f5a
jmp 0x1f70
movq 0x307f(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x10f0
movq 0x3069(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0x31bf(%rip), %rax      # 0x5140
movswl 0xa(%rax), %edx
movl $0x16, %esi
callq 0x1100
movq 0x304a(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
callq 0x1090
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)