// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdx, -0x1c(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x1c(%rbp), %rax
movq %rax, -0xc(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movl 0x7c81(%rip), %eax      # 0x973f
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rdi
movl -0x34(%rbp), %esi
movl $0x20, %edx
callq 0x4960
movq -0x28(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x5150
movq -0x28(%rbp), %rdi
movl -0x34(%rbp), %ecx
movl $0x5, %esi
movl $0x1, %edx
leaq 0x76fc(%rip), %r8       # 0x91f2
callq 0x49e0
movl 0x7c42(%rip), %eax      # 0x9743
movl %eax, -0x38(%rbp)
movl $0x3, -0x3c(%rbp)
movq -0x28(%rbp), %rdi
movl -0x3c(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
cvttsd2si 0x18(%rax), %r8
movl -0xc(%rbp), %r9d
movl $0x2, %esi
leaq 0x76dc(%rip), %rcx      # 0x9210
movb $0x0, %al
callq 0x4c10
movq -0x28(%rbp), %rdi
movl -0x3c(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
cvttsd2si 0x28(%rax), %r8
movl -0x8(%rbp), %r9d
movl $0x2, %esi
leaq 0x76c1(%rip), %rcx      # 0x9225
movb $0x0, %al
callq 0x4c10
movq -0x28(%rbp), %rdi
movl -0x3c(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
cvttsd2si 0x20(%rax), %r8
movl -0x4(%rbp), %r9d
movl $0x2, %esi
leaq 0x76a6(%rip), %rcx      # 0x923a
movb $0x0, %al
callq 0x4c10
movq -0x28(%rbp), %rdi
movl -0x3c(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
cvttsd2si 0x30(%rax), %r8
movl $0x2, %esi
leaq 0x768f(%rip), %rcx      # 0x924f
movb $0x0, %al
callq 0x4c10
movl $0x2, -0x40(%rbp)
movl $0x8, -0x44(%rbp)
movq -0x28(%rbp), %rdi
movl -0x40(%rbp), %esi
movl -0x44(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
leaq 0x766b(%rip), %rcx      # 0x9259
movb $0x0, %al
callq 0x4c10
movq -0x28(%rbp), %rdi
movl -0x40(%rbp), %esi
movl -0x44(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
leaq 0x7670(%rip), %rcx      # 0x927e
movb $0x0, %al
callq 0x4c10
movq -0x28(%rbp), %rdi
movl -0x40(%rbp), %esi
movl -0x44(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
leaq 0x7675(%rip), %rcx      # 0x92a3
movb $0x0, %al
callq 0x4c10
movl $0x11, -0x44(%rbp)
movq -0x28(%rbp), %rdi
movl -0x40(%rbp), %esi
movl -0x44(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
leaq 0x7673(%rip), %rcx      # 0x92c8
movb $0x0, %al
callq 0x4c10
movq -0x28(%rbp), %rdi
movl -0x40(%rbp), %esi
movl -0x44(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
leaq 0x7678(%rip), %rcx      # 0x92ed
movb $0x0, %al
callq 0x4c10
movq -0x30(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x6e00
movq -0x28(%rbp), %rdi
leaq -0xd0(%rbp), %r8
movl -0x38(%rbp), %ecx
movl $0x2, %esi
movl $0x14, %edx
callq 0x49e0
movl 0x7a90(%rip), %eax      # 0x973f
movl %eax, -0xd4(%rbp)
movq -0x28(%rbp), %rdi
movl -0xd4(%rbp), %ecx
movl $0x2, %esi
movl $0x15, %edx
leaq 0x7642(%rip), %r8       # 0x9312
callq 0x49e0
movl $0x0, -0xd8(%rbp)
movl $0x1, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jg 0x1d37
movq -0x28(%rbp), %rdi
movl -0xd8(%rbp), %esi
addl $0x9, %esi
movl -0x38(%rbp), %ecx
movl $0x15, %edx
leaq 0x7606(%rip), %r8       # 0x931a
callq 0x49e0
imull $0x6, -0xdc(%rbp), %eax
movl %eax, -0xdc(%rbp)
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0x1ce9
addq $0xe0, %rsp
popq %rbp
retq