// File: /workspace/github_c_makefile_star2_O2/skeeto[P]goblin-com/src/main.c
// Function: sidemenu_draw
static void
sidemenu_draw(panel_t *p, game_t *game, yield_t diff)
{
    font_t font_title = FONT(w, k);
    panel_fill(p, font_title, ' ');
    panel_border(p, font_title);
    panel_puts(p, 5, 1, font_title, "Goblin-COM");

    font_t font_totals = FONT(W, k);
    int ty = 3;
    panel_printf(p, 2, ty++, "Gold: Yk{%ld}wk{%+d}",
                 (long)game->gold, (int)diff.gold);
    panel_printf(p, 2, ty++, "Food: Yk{%ld}wk{%+d}",
                 (long)game->food, (int)diff.food);
    panel_printf(p, 2, ty++, "Wood: Yk{%ld}wk{%+d}",
                 (long)game->wood, (int)diff.wood);
    panel_printf(p, 2, ty++, "Pop.: %ld", (long)game->population);

    int x = 2;
    int y = 8;
    panel_printf(p, x, y++, "Kk{♦}    wk{Rk{B}uild}     Kk{♦}");
    panel_printf(p, x, y++, "Kk{♦}    wk{Rk{H}eroes}    Kk{♦}");
    panel_printf(p, x, y++, "Kk{♦}    wk{Rk{S}quads}    Kk{♦}");

    y = 17;
    panel_printf(p, x, y++, "Kk{♦}    wk{SRk{t}ory}     Kk{♦}");
    panel_printf(p, x, y++, "Kk{♦}     wk{HelRk{p}}     Kk{♦}");

    char date[128];
    game_date(game, date);
    panel_puts(p, 2, 20, font_totals, date);

    font_t base = FONT(w, k);
    panel_puts(p, 2, 21, base, "Speed: ");
    for (int x = 0, i = 1; i <= game->speed; i *= SPEED_FACTOR, x++)
        panel_puts(p, 9 + x, 21, font_totals, ">");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %ecx, 0xc(%rsp)
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %r15
shrq $0x20, %r15
pushq $0x7
popq %r12
pushq $0x20
popq %rdx
movl %r12d, %esi
callq 0x3122
movq %r14, %rdi
movl %r12d, %esi
callq 0x3629
leaq 0x39df(%rip), %r8       # 0x60da
pushq $0x5
popq %rsi
pushq $0x1
popq %rbp
movq %r14, %rdi
movl %ebp, %edx
movl %r12d, %ecx
callq 0x3168
cvttsd2si 0x18(%rbx), %r8
leaq 0x39dd(%rip), %rcx      # 0x60f8
pushq $0x2
popq %r12
pushq $0x3
popq %rdx
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %r9d
xorl %eax, %eax
callq 0x32c4
cvttsd2si 0x28(%rbx), %r8
leaq 0x39ce(%rip), %rcx      # 0x610d
pushq $0x4
popq %rdx
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %r9d
xorl %eax, %eax
callq 0x32c4
cvttsd2si 0x20(%rbx), %r8
leaq 0x39c3(%rip), %rcx      # 0x6122
movq %r14, %rdi
movl %r12d, %esi
pushq $0x5
popq %rdx
movl 0xc(%rsp), %r9d
xorl %eax, %eax
callq 0x32c4
cvttsd2si 0x30(%rbx), %r8
leaq 0x39b6(%rip), %rcx      # 0x6137
pushq $0x6
popq %rdx
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x32c4
leaq 0x39a9(%rip), %rcx      # 0x6141
pushq $0x8
popq %rdx
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x32c4
leaq 0x39b7(%rip), %rcx      # 0x6166
pushq $0x9
popq %r13
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
xorl %eax, %eax
callq 0x32c4
leaq 0x39c1(%rip), %rcx      # 0x618b
pushq $0xa
popq %rdx
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x32c4
leaq 0x39cf(%rip), %rcx      # 0x61b0
pushq $0x11
popq %rdx
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x32c4
leaq 0x39dd(%rip), %rcx      # 0x61d5
pushq $0x12
popq %rdx
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x32c4
leaq 0x10(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4505
pushq $0x14
popq %rdx
movq %r14, %rdi
movl %r12d, %esi
movl $0x10007, %ecx          # imm = 0x10007
movq %r15, %r8
callq 0x3168
leaq 0x39c5(%rip), %r8       # 0x61fa
pushq $0x15
popq %r15
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %edx
pushq $0x7
popq %rcx
callq 0x3168
leaq 0x39b1(%rip), %r12      # 0x6202
cmpl 0x10(%rbx), %ebp
jg 0x2874
movq %r14, %rdi
movl %r13d, %esi
movl %r15d, %edx
movl $0x10007, %ecx          # imm = 0x10007
movq %r12, %r8
callq 0x3168
imull $0x6, %ebp, %ebp
incl %r13d
jmp 0x2851
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq