// File: /workspace/github_c_makefile_star2_O3/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 $0x88, %rsp
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %r15
shrq $0x20, %r15
movl $0x7, %esi
movl $0x20, %edx
callq 0x345c
movq %r14, %rdi
movl $0x7, %esi
callq 0x418c
leaq 0x4731(%rip), %r8       # 0x70da
movl $0x1, %r13d
movq %r14, %rdi
movl $0x5, %esi
movl $0x1, %edx
movl $0x7, %ecx
callq 0x34e1
cvttsd2si 0x18(%rbx), %r8
leaq 0x4725(%rip), %rcx      # 0x70f8
movq %r14, %rdi
movl $0x2, %esi
movl $0x3, %edx
movl %r12d, %r9d
xorl %eax, %eax
callq 0x36ec
cvttsd2si 0x28(%rbx), %r8
leaq 0x4716(%rip), %rcx      # 0x710d
movq %r14, %rdi
movl $0x2, %esi
movl $0x4, %edx
movl %r15d, %r9d
xorl %eax, %eax
callq 0x36ec
cvttsd2si 0x20(%rbx), %r8
leaq 0x4707(%rip), %rcx      # 0x7122
movq %r14, %rdi
movl $0x2, %esi
movl $0x5, %edx
movl %ebp, %r9d
xorl %eax, %eax
callq 0x36ec
cvttsd2si 0x30(%rbx), %r8
leaq 0x46f8(%rip), %rcx      # 0x7137
movq %r14, %rdi
movl $0x2, %esi
movl $0x6, %edx
xorl %eax, %eax
callq 0x36ec
leaq 0x46e7(%rip), %rcx      # 0x7141
movq %r14, %rdi
movl $0x2, %esi
movl $0x8, %edx
xorl %eax, %eax
callq 0x36ec
leaq 0x46f1(%rip), %rcx      # 0x7166
movl $0x9, %ebp
movq %r14, %rdi
movl $0x2, %esi
movl $0x9, %edx
xorl %eax, %eax
callq 0x36ec
leaq 0x46f6(%rip), %rcx      # 0x718b
movq %r14, %rdi
movl $0x2, %esi
movl $0xa, %edx
xorl %eax, %eax
callq 0x36ec
leaq 0x4700(%rip), %rcx      # 0x71b0
movq %r14, %rdi
movl $0x2, %esi
movl $0x11, %edx
xorl %eax, %eax
callq 0x36ec
leaq 0x470a(%rip), %rcx      # 0x71d5
movq %r14, %rdi
movl $0x2, %esi
movl $0x12, %edx
xorl %eax, %eax
callq 0x36ec
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x52f8
movq %r14, %rdi
movl $0x2, %esi
movl $0x14, %edx
movl $0x10007, %ecx          # imm = 0x10007
movq %r15, %r8
callq 0x34e1
leaq 0x46ec(%rip), %r8       # 0x71fa
movq %r14, %rdi
movl $0x2, %esi
movl $0x15, %edx
movl $0x7, %ecx
callq 0x34e1
cmpl $0x0, 0x10(%rbx)
jle 0x2b59
leaq 0x46d0(%rip), %r15      # 0x7202
movq %r14, %rdi
movl %ebp, %esi
movl $0x15, %edx
movl $0x10007, %ecx          # imm = 0x10007
movq %r15, %r8
callq 0x34e1
addl %r13d, %r13d
leal (%r13,%r13,2), %r13d
incl %ebp
cmpl 0x10(%rbx), %r13d
jle 0x2b32
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq