// File: /workspace/github_c_makefile_star2_O2/termbox[P]termbox/demo/output.c
// Function: draw_all
static void draw_all() {
    tb_clear();

    tb_select_output_mode(TB_OUTPUT_NORMAL);
    static const uint16_t col1[] = {0, TB_BOLD};
    static const uint16_t col2[] = {TB_REVERSE};
    print_combinations_table(1, 1, col1, 2);
    print_combinations_table(2 + strlen(chars), 1, col2, 1);
    tb_present();

    tb_select_output_mode(TB_OUTPUT_GRAYSCALE);
    int c, x, y;
    for (x = 0, y = 23; x < 24; ++x) {
        tb_change_cell(x, y, '@', x, 0);
        tb_change_cell(x+25, y, ' ', 0, x);
    }
    tb_present();

    tb_select_output_mode(TB_OUTPUT_216);
    y++;
    for (c = 0, x = 0; c < 216; ++c, ++x) {
        if (!(x%24)) {
            x = 0;
            ++y;
        }
        tb_change_cell(x, y, '@', c, 0);
        tb_change_cell(x+25, y, ' ', 0, c);
    }
    tb_present();

    tb_select_output_mode(TB_OUTPUT_256);
    y++;
    for (c = 0, x = 0; c < 256; ++c, ++x) {
        if (!(x%24)) {
            x = 0;
            ++y;
        }
        tb_change_cell(x, y, '+', c | ((y & 1) ? TB_UNDERLINE : 0), 0);
        tb_change_cell(x+25, y, ' ', 0, c);
    }
    tb_present();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x47fa
pushq $0x1
popq %rbx
movl %ebx, %edi
callq 0x4877
leaq 0x2c3d(%rip), %rsi      # 0x602a
pushq $0x2
popq %rdx
movl %ebx, %edi
callq 0x3551
leaq 0x2c30(%rip), %rsi      # 0x602e
pushq $0x26
popq %rdi
movl %ebx, %edx
callq 0x3551
callq 0x3eb3
pushq $0x4
popq %rdi
callq 0x4877
xorl %ebx, %ebx
pushq $0x18
popq %r13
pushq $0x17
popq %rbp
pushq $0x40
popq %r14
pushq $0x20
popq %r15
subl $0x1, %r13d
jb 0x3458
movzwl %bx, %r12d
movl %ebx, %edi
movl %ebp, %esi
movl %r14d, %edx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x44b0
leal 0x19(%rbx), %edi
movl %ebp, %esi
movl %r15d, %edx
xorl %ecx, %ecx
movl %r12d, %r8d
callq 0x44b0
incl %ebx
jmp 0x3426
callq 0x3eb3
pushq $0x3
popq %rdi
callq 0x4877
pushq $0x18
popq %r13
xorl %ebp, %ebp
pushq $0x20
popq %r14
xorl %r15d, %r15d
movl %r13d, %ebx
cmpl $0xd8, %ebp
je 0x34c2
movl %r15d, %eax
cltd
idivl %r13d
xorl %eax, %eax
testl %edx, %edx
sete %al
cmovel %edx, %r15d
addl %eax, %ebx
movzwl %bp, %r12d
movl %r15d, %edi
movl %ebx, %esi
pushq $0x40
popq %rdx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x44b0
leal 0x19(%r15), %edi
movl %ebx, %esi
movl %r14d, %edx
xorl %ecx, %ecx
movl %r12d, %r8d
callq 0x44b0
incl %ebp
incl %r15d
jmp 0x3475
callq 0x3eb3
pushq $0x2
popq %rdi
callq 0x4877
incl %ebx
xorl %r12d, %r12d
movl $0xffff, %r13d          # imm = 0xFFFF
pushq $0x2b
popq %rbp
pushq $0x20
popq %r14
xorl %r15d, %r15d
cmpl $0x100, %r12d           # imm = 0x100
je 0x353e
movl %r15d, %eax
cltd
pushq $0x18
popq %rcx
idivl %ecx
xorl %eax, %eax
testl %edx, %edx
sete %al
cmovel %edx, %r15d
addl %eax, %ebx
movl %ebx, %ecx
andl $0x1, %ecx
shll $0x9, %ecx
addl %r12d, %ecx
andl %r13d, %ecx
movl %r15d, %edi
movl %ebx, %esi
movl %ebp, %edx
xorl %r8d, %r8d
callq 0x44b0
leal 0x19(%r15), %edi
movl %r12d, %r8d
andl %r13d, %r8d
movl %ebx, %esi
movl %r14d, %edx
xorl %ecx, %ecx
callq 0x44b0
incl %r12d
incl %r15d
jmp 0x34e4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3eb3