// File: /workspace/github_c_makefile_star2_O0/skeeto[P]goblin-com/src/main.c
// Function: ui_hire
static void
ui_hire(game_t *game, panel_t *terrain, int slot)
{
    int w = 46;
    int h = 14;
    panel_t listing;
    panel_center_init(&listing, w, h);
    display_push(&listing);
    panel_fill(&listing, FONT_DEFAULT, ' ');
    panel_border(&listing, FONT(Y, k));
    panel_printf(&listing, w / 2 - 7, 1, "yk{Hire New Hero}");
    panel_printf(&listing, 1, 2,
                 "wk{  Name               HP   AP  STR  DEX MIND}");
    hero_t candidates[HERO_CANDIDATES];
    for (unsigned i = 0; i < countof(candidates); i++) {
        hero_t h = candidates[i] = game_hero_generate();
        panel_printf(&listing, 1, i + 3,
                     "Rk{%c} Ck{%-16s} %4d %4d %4d %4d %4d",
                     'A' + i, h.name,
                     h.hp_max, h.ap_max, h.str, h.dex, h.mind);
    }
    int key = 0;
    while (!is_exit_key(key = game_getch(game, terrain))) {
        if (key >= 'a' && key < 'a' + (int)countof(candidates)) {
            game->heroes[slot] = candidates[key - 'a'];
            break;
        }
    }
    display_pop_free();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x3ef0, %rsp           # imm = 0x3EF0
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movl $0x2e, -0x28(%rbp)
movl $0xe, -0x2c(%rbp)
movl -0x28(%rbp), %esi
movl -0x2c(%rbp), %edx
leaq -0x3c48(%rbp), %rdi
callq 0x48e0
leaq -0x3c48(%rbp), %rdi
callq 0x47b0
movb $0x7, -0x3c4c(%rbp)
movb $0x0, -0x3c4b(%rbp)
movb $0x1, -0x3c4a(%rbp)
movb $0x0, -0x3c49(%rbp)
movl -0x3c4c(%rbp), %esi
leaq -0x3c48(%rbp), %rdi
movl $0x20, %edx
callq 0x4960
movb $0x3, -0x3c50(%rbp)
movb $0x0, -0x3c4f(%rbp)
movb $0x1, -0x3c4e(%rbp)
movb $0x0, -0x3c4d(%rbp)
movl -0x3c50(%rbp), %esi
leaq -0x3c48(%rbp), %rdi
callq 0x5150
movl -0x28(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
subl $0x7, %esi
leaq -0x3c48(%rbp), %rdi
movl $0x1, %edx
leaq 0x5568(%rip), %rcx      # 0x9631
movb $0x0, %al
callq 0x4c10
leaq -0x3c48(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
leaq 0x555b(%rip), %rcx      # 0x9643
movb $0x0, %al
callq 0x4c10
movl $0x0, -0x3e64(%rbp)
movl -0x3e64(%rbp), %eax
cmpq $0xa, %rax
jae 0x41e6
movl -0x3e64(%rbp), %eax
movl %eax, %ecx
leaq -0x3e60(%rbp), %rax
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x3ed8(%rbp)
leaq -0x3ecc(%rbp), %rdi
callq 0x6370
movq -0x3ed8(%rbp), %rdi
leaq -0x3ecc(%rbp), %rsi
movl $0x34, %edx
callq 0x1190
movq -0x3ed8(%rbp), %rsi
leaq -0x3e98(%rbp), %rdi
movl $0x34, %edx
callq 0x1190
movl -0x3e64(%rbp), %edx
addl $0x3, %edx
movl -0x3e64(%rbp), %r8d
addl $0x41, %r8d
leaq -0x3e98(%rbp), %r9
addq $0x1, %r9
movl -0x3e80(%rbp), %r14d
movl -0x3e78(%rbp), %ebx
movl -0x3e74(%rbp), %r11d
movl -0x3e70(%rbp), %r10d
movl -0x3e6c(%rbp), %eax
leaq -0x3c48(%rbp), %rdi
movl $0x1, %esi
leaq 0x54be(%rip), %rcx      # 0x9673
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x4c10
movl -0x3e64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3e64(%rbp)
jmp 0x40f9
movl $0x0, -0x3ed0(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2d90
movl %eax, %edi
movl %edi, -0x3ed0(%rbp)
callq 0x2d60
xorb $-0x1, %al
testb $0x1, %al
jne 0x4212
jmp 0x4261
cmpl $0x61, -0x3ed0(%rbp)
jl 0x425f
cmpl $0x6b, -0x3ed0(%rbp)
jge 0x425f
movq -0x18(%rbp), %rdi
addq $0x3cc, %rdi            # imm = 0x3CC
movslq -0x24(%rbp), %rax
imulq $0x34, %rax, %rax
addq %rax, %rdi
movl -0x3ed0(%rbp), %eax
subl $0x61, %eax
cltq
leaq -0x3e60(%rbp), %rsi
imulq $0x34, %rax, %rax
addq %rax, %rsi
movl $0x34, %edx
callq 0x1190
jmp 0x4261
jmp 0x41f0
callq 0x4820
addq $0x3ef0, %rsp           # imm = 0x3EF0
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)