// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %esi
leaq 0x1(%rsp), %rdi
callq 0x84e9
cltq
movb $0x0, 0x1(%rsp,%rax)
leaq 0x3138(%rip), %r8       # 0x9266
movl $0x3, %edi
movl $0x13, %esi
movl $0x8, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53ff
movzwl 0x2(%rbx), %r9d
leaq 0x311a(%rip), %r8       # 0x926c
movl $0x8, %edi
movl $0x13, %esi
movl $0x4, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53ff
movzwl 0x2(%rbx), %r9d
leaq 0x3102(%rip), %r8       # 0x9278
movl $0x8, %edi
movl $0x14, %esi
movl $0x3, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53ff
movzwl 0x2(%rbx), %r9d
leaq 0x30ec(%rip), %r8       # 0x9286
movl $0x8, %edi
movl $0x15, %esi
movl $0x7, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53ff
movzwl 0x2(%rbx), %eax
cmpl $0x7f, %eax
jne 0x61c4
leaq 0x3088(%rip), %r9       # 0x924a
jmp 0x61fc
leal -0xffea(%rax), %ecx
cmpl $0x15, %ecx
ja 0x61dd
xorl $0xffff, %eax           # imm = 0xFFFF
leaq 0x5aa5(%rip), %rcx      # 0xbc80
jmp 0x61ec
cmpw $0x20, %ax
ja 0x61f5
movl %eax, %eax
leaq 0x5984(%rip), %rcx      # 0xbb70
leaq (%rcx,%rax,8), %rax
movq (%rax), %r9
jmp 0x61fc
leaq 0x3062(%rip), %r9       # 0x925e
leaq 0x3090(%rip), %r14      # 0x9293
movl $0x8, %edi
movl $0x16, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x53ff
leaq 0x307a(%rip), %r8       # 0x929f
movl $0x36, %edi
movl $0x13, %esi
movl $0x8, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53ff
movl 0x4(%rbx), %r9d
leaq 0x3024(%rip), %r8       # 0x926c
movl $0x3c, %edi
movl $0x13, %esi
movl $0x4, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53ff
movl 0x4(%rbx), %r9d
leaq 0x300d(%rip), %r8       # 0x9278
movl $0x3c, %edi
movl $0x14, %esi
movl $0x3, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53ff
movl 0x4(%rbx), %r9d
leaq 0x2ff8(%rip), %r8       # 0x9286
movl $0x3c, %edi
movl $0x15, %esi
movl $0x7, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53ff
leaq 0x1(%rsp), %r9
movl $0x3c, %edi
movl $0x16, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x53ff
cmpb $0x0, 0x1(%rbx)
leaq 0x2fed(%rip), %rax      # 0x92be
leaq 0x2fdb(%rip), %r9       # 0x92b3
cmoveq %rax, %r9
leaq 0x2fc3(%rip), %r8       # 0x92a6
movl $0x36, %edi
movl $0x12, %esi
movl $0x8, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x53ff
addq $0x8, %rsp
popq %rbx
popq %r14
retq