// File: /workspace/github_c_makefile_star2_O2/termbox[P]termbox/demo/keyboard.c
// Function: pretty_print_press
void pretty_print_press(struct tb_event *ev)
{
    char buf[7];
    buf[tb_utf8_unicode_to_char(buf, ev->ch)] = '\0';
    printf_tb(3, 19, TB_WHITE , TB_DEFAULT, "Key: ");
    printf_tb(8, 19, TB_YELLOW, TB_DEFAULT, "decimal: %d", ev->key);
    printf_tb(8, 20, TB_GREEN , TB_DEFAULT, "hex:     0x%X", ev->key);
    printf_tb(8, 21, TB_CYAN  , TB_DEFAULT, "octal:   0%o", ev->key);
    printf_tb(8, 22, TB_RED   , TB_DEFAULT, "string:  %s", funckeymap(ev->key));

    printf_tb(54, 19, TB_WHITE , TB_DEFAULT, "Char: ");
    printf_tb(60, 19, TB_YELLOW, TB_DEFAULT, "decimal: %d", ev->ch);
    printf_tb(60, 20, TB_GREEN , TB_DEFAULT, "hex:     0x%X", ev->ch);
    printf_tb(60, 21, TB_CYAN  , TB_DEFAULT, "octal:   0%o", ev->ch);
    printf_tb(60, 22, TB_RED   , TB_DEFAULT, "string:  %s", buf);

    printf_tb(54, 18, TB_WHITE, TB_DEFAULT, "Modifier: %s",
            (ev->mod) ? "TB_MOD_ALT" : "none");

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %esi
leaq 0x1(%rsp), %rdi
callq 0x7cb6
cltq
movb $0x0, 0x1(%rsp,%rax)
leaq 0x240e(%rip), %r8       # 0x8266
pushq $0x3
popq %r14
pushq $0x13
popq %r12
pushq $0x8
popq %rbp
movl %r14d, %edi
movl %r12d, %esi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53d7
movzwl 0x2(%rbx), %r9d
leaq 0x23ec(%rip), %r8       # 0x826c
pushq $0x4
popq %rdx
movl %ebp, %edi
movl %r12d, %esi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53d7
movzwl 0x2(%rbx), %r9d
leaq 0x23db(%rip), %r8       # 0x8278
pushq $0x14
popq %rsi
movl %ebp, %edi
movl %r14d, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53d7
movzwl 0x2(%rbx), %r9d
leaq 0x23cc(%rip), %r8       # 0x8286
pushq $0x15
popq %rsi
pushq $0x7
popq %rdx
movl %ebp, %edi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53d7
movzwl 0x2(%rbx), %edi
callq 0x5de8
leaq 0x23b8(%rip), %r8       # 0x8293
pushq $0x16
popq %r15
pushq $0x2
popq %r14
movl %ebp, %edi
movl %r15d, %esi
movl %r14d, %edx
xorl %ecx, %ecx
movq %rax, %r9
xorl %eax, %eax
callq 0x53d7
leaq 0x23a1(%rip), %r8       # 0x829f
pushq $0x36
popq %rdi
movl %r12d, %esi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53d7
movl 0x4(%rbx), %r9d
pushq $0x3c
popq %r13
movl %r13d, %edi
movl %r12d, %esi
pushq $0x4
popq %rdx
xorl %ecx, %ecx
leaq 0x2343(%rip), %r8       # 0x826c
xorl %eax, %eax
callq 0x53d7
movl 0x4(%rbx), %r9d
movl %r13d, %edi
pushq $0x14
popq %rsi
pushq $0x3
popq %rdx
xorl %ecx, %ecx
leaq 0x2332(%rip), %r8       # 0x8278
xorl %eax, %eax
callq 0x53d7
movl 0x4(%rbx), %r9d
movl %r13d, %edi
pushq $0x15
popq %rsi
pushq $0x7
popq %rdx
xorl %ecx, %ecx
leaq 0x2323(%rip), %r8       # 0x8286
xorl %eax, %eax
callq 0x53d7
movl %r13d, %edi
movl %r15d, %esi
movl %r14d, %edx
xorl %ecx, %ecx
leaq 0x2317(%rip), %r8       # 0x8293
leaq 0x1(%rsp), %r9
xorl %eax, %eax
callq 0x53d7
cmpb $0x0, 0x1(%rbx)
leaq 0x232b(%rip), %rax      # 0x82be
leaq 0x2319(%rip), %r9       # 0x82b3
cmoveq %rax, %r9
leaq 0x2301(%rip), %r8       # 0x82a6
pushq $0x12
popq %rsi
pushq $0x36
popq %rdi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53d7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq