// File: /workspace/github_c_makefile_star2_O0/skeeto[P]goblin-com/src/main.c
// Function: ui_squads
static void
ui_squads(game_t *game, panel_t *terrain, panel_t *units)
{
    panel_t p;
    panel_center_init(&p, 29, countof(game->squads) + 3);
    panel_border(&p, FONT(w, k));
    panel_printf(&p, 1, 1, "wk{Squad Size Status}");
    display_push(&p);
    int key = 0;
    do {
        if (key >= 'a' && key < 'a' + (int)countof(game->squads)) {
            display_pop();
            int target = select_target(game, terrain, units);;
            game->squads[key - 'a'].target = target;
            display_push(&p);
            break;
        }
        for (unsigned i = 0; i < countof(game->squads); i++) {
            squad_t *s = game->squads + i;
            char status[32];
            if (s->member_count == 0)
                sprintf(status, "Kk{Empty}");
            else if (s->target < 0)
                sprintf(status, "Ck{Idle/Waiting}");
            else
                sprintf(status, "Rk{Intercepting %c}", s->target + 'A');
            panel_printf(&p, 1, i + 2, "Yk{%-5c} %-4u %-16s",
                         i + 'A', s->member_count, status);
        }
    } while (!is_exit_key(key = game_getch(game, terrain)));
    display_pop_free();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3c80, %rsp           # imm = 0x3C80
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x3c30(%rbp), %rdi
movl $0x1d, %esi
movl $0x13, %edx
callq 0x48e0
movb $0x7, -0x3c34(%rbp)
movb $0x0, -0x3c33(%rbp)
movb $0x0, -0x3c32(%rbp)
movb $0x0, -0x3c31(%rbp)
movl -0x3c34(%rbp), %esi
leaq -0x3c30(%rbp), %rdi
callq 0x5150
leaq -0x3c30(%rbp), %rdi
movl $0x1, %edx
leaq 0x75b8(%rip), %rcx      # 0x9566
movl %edx, %esi
movb $0x0, %al
callq 0x4c10
leaq -0x3c30(%rbp), %rdi
callq 0x47b0
movl $0x0, -0x3c38(%rbp)
cmpl $0x61, -0x3c38(%rbp)
jl 0x2032
cmpl $0x71, -0x3c38(%rbp)
jge 0x2032
callq 0x47e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3f50
movl %eax, -0x3c3c(%rbp)
movl -0x3c3c(%rbp), %ecx
movq -0x8(%rbp), %rax
addq $0x2c8, %rax            # imm = 0x2C8
movl -0x3c38(%rbp), %edx
subl $0x61, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
leaq -0x3c30(%rbp), %rdi
callq 0x47b0
jmp 0x2154
movl $0x0, -0x3c40(%rbp)
movl -0x3c40(%rbp), %eax
cmpq $0x10, %rax
jae 0x212e
movq -0x8(%rbp), %rax
addq $0x2c8, %rax            # imm = 0x2C8
movl -0x3c40(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x3c48(%rbp)
movq -0x3c48(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x208e
leaq -0x3c70(%rbp), %rdi
leaq 0x74f7(%rip), %rsi      # 0x957c
movb $0x0, %al
callq 0x1240
jmp 0x20d6
movq -0x3c48(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jge 0x20b2
leaq -0x3c70(%rbp), %rdi
leaq 0x74dd(%rip), %rsi      # 0x9586
movb $0x0, %al
callq 0x1240
jmp 0x20d4
leaq -0x3c70(%rbp), %rdi
movq -0x3c48(%rbp), %rax
movl 0x8(%rax), %edx
addl $0x41, %edx
leaq 0x74ca(%rip), %rsi      # 0x9597
movb $0x0, %al
callq 0x1240
jmp 0x20d6
movl -0x3c40(%rbp), %edx
addl $0x2, %edx
movl -0x3c40(%rbp), %r8d
addl $0x41, %r8d
movq -0x3c48(%rbp), %rax
movl 0xc(%rax), %r9d
leaq -0x3c70(%rbp), %rax
leaq -0x3c30(%rbp), %rdi
movl $0x1, %esi
leaq 0x749c(%rip), %rcx      # 0x95ab
movq %rax, (%rsp)
movb $0x0, %al
callq 0x4c10
movl -0x3c40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c40(%rbp)
jmp 0x203c
jmp 0x2130
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2d90
movl %eax, %edi
movl %edi, -0x3c38(%rbp)
callq 0x2d60
xorb $-0x1, %al
testb $0x1, %al
jne 0x1fcd
callq 0x4820
addq $0x3c80, %rsp           # imm = 0x3C80
popq %rbp
retq
nopw %cs:(%rax,%rax)