#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ jx_term_erase_to_line_end();
int /*<<< orphan*/ jx_term_flush();
int /*<<< orphan*/ jx_term_get_size(int *, int *);
int jx_term_getchar();
int /*<<< orphan*/ jx_term_init(int);
int /*<<< orphan*/ jx_term_move_to(int, int);
int /*<<< orphan*/ jx_term_putstr(char *);
int /*<<< orphan*/ jx_term_set_attr(int, int);
int /*<<< orphan*/ jx_term_show_cursor(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ usleep(int);
void jx_term_debug(void) {
  jx_term_init(1);
  jx_term_move_to(1, 1);
  jx_term_putstr("JXTermLib Debug Screen");
  jx_term_move_to(4, 2);
  jx_term_set_attr(1, 1);
  jx_term_putstr("Inverse Video");
  jx_term_move_to(4, 3);
  jx_term_set_attr(1, 0);
  jx_term_set_attr(2, 1);
  jx_term_putstr("Bold  ");
  jx_term_set_attr(2, 0);
  jx_term_set_attr(4, 1);
  jx_term_putstr("Underline");
  jx_term_set_attr(4, 0);
  jx_term_show_cursor(0);
  jx_term_move_to(4, 5);
  jx_term_set_attr(10, 0);
  jx_term_putstr("Black  ");
  jx_term_set_attr(10, 1);
  jx_term_putstr("Red  ");
  jx_term_set_attr(10, 2);
  jx_term_putstr("Green  ");
  jx_term_set_attr(10, 3);
  jx_term_putstr("Yellow  ");
  jx_term_set_attr(10, 4);
  jx_term_putstr("Blue  ");
  jx_term_set_attr(10, 5);
  jx_term_putstr("Magenta  ");
  jx_term_set_attr(10, 6);
  jx_term_putstr("Cyan  ");
  jx_term_set_attr(10, 7);
  jx_term_putstr("Lt Grey");
  jx_term_move_to(4, 6);
  jx_term_set_attr(10, 8);
  jx_term_putstr("Dk Grey");
  jx_term_set_attr(10, 9);
  jx_term_putstr("Red  ");
  jx_term_set_attr(10, 10);
  jx_term_putstr("Green  ");
  jx_term_set_attr(10, 11);
  jx_term_putstr("Yellow  ");
  jx_term_set_attr(10, 12);
  jx_term_putstr("Blue  ");
  jx_term_set_attr(10, 13);
  jx_term_putstr("Magenta  ");
  jx_term_set_attr(10, 14);
  jx_term_putstr("Cyan  ");
  jx_term_set_attr(10, 15);
  jx_term_putstr("White  ");
  jx_term_set_attr(10, -1);
  jx_term_move_to(4, 7);
  jx_term_set_attr(11, 0);
  jx_term_putstr("Black  ");
  jx_term_set_attr(11, 1);
  jx_term_putstr("Red  ");
  jx_term_set_attr(11, 2);
  jx_term_putstr("Green  ");
  jx_term_set_attr(11, 3);
  jx_term_putstr("Yellow  ");
  jx_term_set_attr(11, 4);
  jx_term_putstr("Blue  ");
  jx_term_set_attr(11, 5);
  jx_term_putstr("Magenta  ");
  jx_term_set_attr(11, 6);
  jx_term_putstr("Cyan  ");
  jx_term_set_attr(11, 7);
  jx_term_putstr("Lt Gray");
  jx_term_move_to(4, 8);
  jx_term_set_attr(11, 8);
  jx_term_putstr("Dk Grey");
  jx_term_set_attr(11, 9);
  jx_term_putstr("Red  ");
  jx_term_set_attr(11, 10);
  jx_term_putstr("Green  ");
  jx_term_set_attr(11, 11);
  jx_term_putstr("Yellow  ");
  jx_term_set_attr(11, 12);
  jx_term_putstr("Blue  ");
  jx_term_set_attr(11, 13);
  jx_term_putstr("Magenta  ");
  jx_term_set_attr(11, 14);
  jx_term_putstr("Cyan  ");
  jx_term_set_attr(11, 15);
  jx_term_putstr("White  ");
  jx_term_set_attr(11, -1);
  jx_term_move_to(4, 10);
  int timer = 0;
  int count = 0;
  jx_term_flush();
  for (;;) {
    int ch = jx_term_getchar();
    if (ch >= 0 || ch < -1) {
      jx_term_move_to(4, 10);
      if (ch == -2) {
        int cols, rows;
        jx_term_get_size(&cols, &rows);
        printf("New Size: %d x %d", cols, rows);
      } else {
        jx_term_erase_to_line_end();
        printf("%d\n", ch);
      }
      jx_term_flush();
    }
    if (ch == 'q' || ch == 'Q')
      break;
    timer += 1;
    if (timer == 1000) {
      jx_term_move_to(4 + count, 12);
      printf(".");
      jx_term_move_to(10, 10);
      jx_term_flush();
      timer = 0;
      count++;
      if (count > 20) {
        jx_term_move_to(4, 12);
        jx_term_erase_to_line_end();
        count = 0;
        jx_term_flush();
      }
    }
    usleep(200);
  }
}


x86 assembly (clang, -O0):
<jx_term_debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x1,%edi
call   10a0 <jx_term_init@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1050 <jx_term_move_to@plt>
lea    0xe2b(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0x4,%edi
mov    $0x2,%esi
call   1050 <jx_term_move_to@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <jx_term_set_attr@plt>
lea    0xe1b(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0x4,%edi
mov    $0x3,%esi
call   1050 <jx_term_move_to@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <jx_term_set_attr@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xdf3(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <jx_term_set_attr@plt>
mov    $0x4,%edi
mov    $0x1,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xdd3(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0x4,%edi
xor    %esi,%esi
call   1040 <jx_term_set_attr@plt>
xor    %edi,%edi
call   10c0 <jx_term_show_cursor@plt>
mov    $0x4,%edi
mov    $0x5,%esi
call   1050 <jx_term_move_to@plt>
mov    $0xa,%edi
xor    %esi,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xda3(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x1,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd90(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x2,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd7b(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x3,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd68(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x4,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd56(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x5,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd42(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x6,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd31(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x7,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd1d(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0x4,%edi
mov    $0x6,%esi
call   1050 <jx_term_move_to@plt>
mov    $0xa,%edi
mov    $0x8,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xcfb(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x9,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xca9(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%esi
mov    %esi,%edi
call   1040 <jx_term_set_attr@plt>
lea    0xc97(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0xb,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xc84(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0xc,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xc72(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0xd,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xc5e(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0xe,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xc4d(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0xf,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xc49(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0xffffffff,%esi
call   1040 <jx_term_set_attr@plt>
mov    $0x4,%edi
mov    $0x7,%esi
call   1050 <jx_term_move_to@plt>
mov    $0xb,%edi
xor    %esi,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xbcc(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x1,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xbb9(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x2,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xba4(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x3,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xb91(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x4,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xb7f(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x5,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xb6b(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x6,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xb5a(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x7,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xb5e(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0x4,%edi
mov    $0x8,%esi
call   1050 <jx_term_move_to@plt>
mov    $0xb,%edi
mov    $0x8,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xb24(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x9,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xad2(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0xa,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xabd(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%esi
mov    %esi,%edi
call   1040 <jx_term_set_attr@plt>
lea    0xaad(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0xc,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xa9b(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0xd,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xa87(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0xe,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xa76(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0xf,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xa72(%rip),%rdi
call   1070 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0xffffffff,%esi
call   1040 <jx_term_set_attr@plt>
mov    $0x4,%edi
mov    $0xa,%esi
call   1050 <jx_term_move_to@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1090 <jx_term_flush@plt>
mov    $0x0,%al
call   1030 <jx_term_getchar@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1661 <jx_term_debug+0x4b1>
cmpl   $0xffffffff,-0xc(%rbp)
jge    16bf <jx_term_debug+0x50f>
mov    $0x4,%edi
mov    $0xa,%esi
call   1050 <jx_term_move_to@plt>
cmpl   $0xfffffffe,-0xc(%rbp)
jne    16a0 <jx_term_debug+0x4f0>
lea    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1080 <jx_term_get_size@plt>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0x9f9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    16b8 <jx_term_debug+0x508>
mov    $0x0,%al
call   10b0 <jx_term_erase_to_line_end@plt>
mov    -0xc(%rbp),%esi
lea    0x9ee(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <jx_term_flush@plt>
cmpl   $0x71,-0xc(%rbp)
je     16d3 <jx_term_debug+0x523>
cmpl   $0x51,-0xc(%rbp)
jne    16d8 <jx_term_debug+0x528>
jmp    1771 <jx_term_debug+0x5c1>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x3e8,-0x4(%rbp)
jne    1762 <jx_term_debug+0x5b2>
mov    -0x8(%rbp),%edi
add    $0x4,%edi
mov    $0xc,%esi
call   1050 <jx_term_move_to@plt>
lea    0x99e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0xa,%esi
mov    %esi,%edi
call   1050 <jx_term_move_to@plt>
mov    $0x0,%al
call   1090 <jx_term_flush@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jle    175d <jx_term_debug+0x5ad>
mov    $0x4,%edi
mov    $0xc,%esi
call   1050 <jx_term_move_to@plt>
mov    $0x0,%al
call   10b0 <jx_term_erase_to_line_end@plt>
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1090 <jx_term_flush@plt>
jmp    1762 <jx_term_debug+0x5b2>
mov    $0xc8,%edi
call   10d0 <usleep@plt>
jmp    1643 <jx_term_debug+0x493>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jx_term_debug>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x1,%edi
call   10b0 <jx_term_init@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1060 <jx_term_move_to@plt>
lea    0xe15(%rip),%rdi
call   1080 <jx_term_putstr@plt>
mov    $0x4,%edi
mov    $0x2,%esi
call   1060 <jx_term_move_to@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xe02(%rip),%rdi
call   1080 <jx_term_putstr@plt>
mov    $0x4,%edi
mov    $0x3,%esi
call   1060 <jx_term_move_to@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <jx_term_set_attr@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xdda(%rip),%rdi
call   1080 <jx_term_putstr@plt>
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <jx_term_set_attr@plt>
mov    $0x4,%edi
mov    $0x1,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xdba(%rip),%rdi
call   1080 <jx_term_putstr@plt>
mov    $0x4,%edi
xor    %esi,%esi
call   1040 <jx_term_set_attr@plt>
xor    %edi,%edi
call   10d0 <jx_term_show_cursor@plt>
mov    $0x4,%edi
mov    $0x5,%esi
call   1060 <jx_term_move_to@plt>
mov    $0xa,%edi
xor    %esi,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd8a(%rip),%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x1,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd77(%rip),%r14
mov    %r14,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x2,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd5f(%rip),%r15
mov    %r15,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x3,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd49(%rip),%r12
mov    %r12,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x4,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd34(%rip),%r13
mov    %r13,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x5,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd1d(%rip),%rbx
mov    %rbx,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x6,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xd09(%rip),%rbp
mov    %rbp,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x7,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xcf2(%rip),%rdi
call   1080 <jx_term_putstr@plt>
mov    $0x4,%edi
mov    $0x6,%esi
call   1060 <jx_term_move_to@plt>
mov    $0xa,%edi
mov    $0x8,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xcd0(%rip),%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0x9,%esi
call   1040 <jx_term_set_attr@plt>
mov    %r14,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0xa,%esi
call   1040 <jx_term_set_attr@plt>
mov    %r15,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0xb,%esi
call   1040 <jx_term_set_attr@plt>
mov    %r12,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0xc,%esi
call   1040 <jx_term_set_attr@plt>
mov    %r13,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0xd,%esi
call   1040 <jx_term_set_attr@plt>
mov    %rbx,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0xe,%esi
call   1040 <jx_term_set_attr@plt>
mov    %rbp,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0xf,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xc33(%rip),%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xa,%edi
mov    $0xffffffff,%esi
call   1040 <jx_term_set_attr@plt>
mov    $0x4,%edi
mov    $0x7,%esi
call   1060 <jx_term_move_to@plt>
mov    $0xb,%edi
xor    %esi,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xbb6(%rip),%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x1,%esi
call   1040 <jx_term_set_attr@plt>
mov    %r14,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x2,%esi
call   1040 <jx_term_set_attr@plt>
mov    %r15,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x3,%esi
call   1040 <jx_term_set_attr@plt>
mov    %r12,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x4,%esi
call   1040 <jx_term_set_attr@plt>
mov    %r13,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x5,%esi
call   1040 <jx_term_set_attr@plt>
mov    %rbx,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x6,%esi
call   1040 <jx_term_set_attr@plt>
mov    %rbp,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x7,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xb60(%rip),%rdi
call   1080 <jx_term_putstr@plt>
mov    $0x4,%edi
mov    $0x8,%esi
call   1060 <jx_term_move_to@plt>
mov    $0xb,%edi
mov    $0x8,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xb26(%rip),%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0x9,%esi
call   1040 <jx_term_set_attr@plt>
mov    %r14,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0xa,%esi
call   1040 <jx_term_set_attr@plt>
mov    %r15,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0xb,%esi
call   1040 <jx_term_set_attr@plt>
mov    %r12,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0xc,%esi
call   1040 <jx_term_set_attr@plt>
mov    %r13,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0xd,%esi
call   1040 <jx_term_set_attr@plt>
mov    %rbx,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0xe,%esi
call   1040 <jx_term_set_attr@plt>
mov    %rbp,%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0xf,%esi
call   1040 <jx_term_set_attr@plt>
lea    0xa89(%rip),%rdi
call   1080 <jx_term_putstr@plt>
mov    $0xb,%edi
mov    $0xffffffff,%esi
call   1040 <jx_term_set_attr@plt>
mov    $0x4,%edi
mov    $0xa,%esi
call   1060 <jx_term_move_to@plt>
xor    %eax,%eax
call   10a0 <jx_term_flush@plt>
mov    %rsp,%r15
lea    0xa65(%rip),%r12
lea    0xa70(%rip),%r13
xor    %ebp,%ebp
xor    %r14d,%r14d
jmp    167c <jx_term_debug+0x4bc>
cs nopw 0x0(%rax,%rax,1)
lea    0x4(%rsp),%rdi
mov    %r15,%rsi
call   1090 <jx_term_get_size@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   10a0 <jx_term_flush@plt>
add    $0x1,%r14d
cmp    $0x3e8,%r14d
je     16d0 <jx_term_debug+0x510>
mov    $0xc8,%edi
call   10e0 <usleep@plt>
xor    %eax,%eax
call   1030 <jx_term_getchar@plt>
cmp    $0xffffffff,%eax
je     1665 <jx_term_debug+0x4a5>
mov    %eax,%ebx
mov    $0x4,%edi
mov    $0xa,%esi
call   1060 <jx_term_move_to@plt>
cmp    $0xfffffffe,%ebx
je     1640 <jx_term_debug+0x480>
xor    %eax,%eax
call   10c0 <jx_term_erase_to_line_end@plt>
mov    %r13,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   10a0 <jx_term_flush@plt>
and    $0xffffffdf,%ebx
cmp    $0x51,%ebx
jne    1665 <jx_term_debug+0x4a5>
jmp    1734 <jx_term_debug+0x574>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x4(%rbp),%edi
mov    $0xc,%esi
call   1060 <jx_term_move_to@plt>
mov    $0x2e,%edi
call   1050 <putchar@plt>
mov    $0xa,%edi
mov    $0xa,%esi
call   1060 <jx_term_move_to@plt>
xor    %r14d,%r14d
xor    %eax,%eax
call   10a0 <jx_term_flush@plt>
cmp    $0x14,%ebp
jge    170d <jx_term_debug+0x54d>
add    $0x1,%ebp
jmp    1672 <jx_term_debug+0x4b2>
mov    $0x4,%edi
mov    $0xc,%esi
call   1060 <jx_term_move_to@plt>
xor    %ebp,%ebp
xor    %eax,%eax
call   10c0 <jx_term_erase_to_line_end@plt>
xor    %eax,%eax
call   10a0 <jx_term_flush@plt>
xor    %r14d,%r14d
jmp    1672 <jx_term_debug+0x4b2>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"JXTermLib Debug Screen\00"
@.str.1 = [14 x i8] c"Inverse Video\00"
@.str.2 = [7 x i8] c"Bold \00"
@.str.3 = [10 x i8] c"Underline\00"
@.str.4 = [8 x i8] c"Black \00"
@.str.5 = [6 x i8] c"Red \00"
@.str.6 = [8 x i8] c"Green \00"
@.str.7 = [9 x i8] c"Yellow \00"
@.str.8 = [7 x i8] c"Blue \00"
@.str.9 = [10 x i8] c"Magenta \00"
@.str.10 = [7 x i8] c"Cyan \00"
@.str.11 = [8 x i8] c"Lt Grey\00"
@.str.12 = [8 x i8] c"Dk Grey\00"
@.str.13 = [8 x i8] c"White \00"
@.str.14 = [8 x i8] c"Lt Gray\00"
@.str.15 = [18 x i8] c"New Size: %d x %d\00"
@.str.16 = [4 x i8] c"%d\0A\00"
@.str.17 = [2 x i8] c".\00"
define void @jx_term_debug() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = call i32 @jx_term_init(i32 1)
%7 = call i32 @jx_term_move_to(i32 1, i32 1)
%8 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @jx_term_move_to(i32 4, i32 2)
%10 = call i32 @jx_term_set_attr(i32 1, i32 1)
%11 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @jx_term_move_to(i32 4, i32 3)
%13 = call i32 @jx_term_set_attr(i32 1, i32 0)
%14 = call i32 @jx_term_set_attr(i32 2, i32 1)
%15 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 @jx_term_set_attr(i32 2, i32 0)
%17 = call i32 @jx_term_set_attr(i32 4, i32 1)
%18 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @jx_term_set_attr(i32 4, i32 0)
%20 = call i32 @jx_term_show_cursor(i32 0)
%21 = call i32 @jx_term_move_to(i32 4, i32 5)
%22 = call i32 @jx_term_set_attr(i32 10, i32 0)
%23 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%24 = call i32 @jx_term_set_attr(i32 10, i32 1)
%25 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%26 = call i32 @jx_term_set_attr(i32 10, i32 2)
%27 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%28 = call i32 @jx_term_set_attr(i32 10, i32 3)
%29 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%30 = call i32 @jx_term_set_attr(i32 10, i32 4)
%31 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%32 = call i32 @jx_term_set_attr(i32 10, i32 5)
%33 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%34 = call i32 @jx_term_set_attr(i32 10, i32 6)
%35 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%36 = call i32 @jx_term_set_attr(i32 10, i32 7)
%37 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%38 = call i32 @jx_term_move_to(i32 4, i32 6)
%39 = call i32 @jx_term_set_attr(i32 10, i32 8)
%40 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%41 = call i32 @jx_term_set_attr(i32 10, i32 9)
%42 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%43 = call i32 @jx_term_set_attr(i32 10, i32 10)
%44 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%45 = call i32 @jx_term_set_attr(i32 10, i32 11)
%46 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%47 = call i32 @jx_term_set_attr(i32 10, i32 12)
%48 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%49 = call i32 @jx_term_set_attr(i32 10, i32 13)
%50 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%51 = call i32 @jx_term_set_attr(i32 10, i32 14)
%52 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%53 = call i32 @jx_term_set_attr(i32 10, i32 15)
%54 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%55 = call i32 @jx_term_set_attr(i32 10, i32 -1)
%56 = call i32 @jx_term_move_to(i32 4, i32 7)
%57 = call i32 @jx_term_set_attr(i32 11, i32 0)
%58 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%59 = call i32 @jx_term_set_attr(i32 11, i32 1)
%60 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%61 = call i32 @jx_term_set_attr(i32 11, i32 2)
%62 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%63 = call i32 @jx_term_set_attr(i32 11, i32 3)
%64 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%65 = call i32 @jx_term_set_attr(i32 11, i32 4)
%66 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%67 = call i32 @jx_term_set_attr(i32 11, i32 5)
%68 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%69 = call i32 @jx_term_set_attr(i32 11, i32 6)
%70 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%71 = call i32 @jx_term_set_attr(i32 11, i32 7)
%72 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%73 = call i32 @jx_term_move_to(i32 4, i32 8)
%74 = call i32 @jx_term_set_attr(i32 11, i32 8)
%75 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%76 = call i32 @jx_term_set_attr(i32 11, i32 9)
%77 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%78 = call i32 @jx_term_set_attr(i32 11, i32 10)
%79 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%80 = call i32 @jx_term_set_attr(i32 11, i32 11)
%81 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%82 = call i32 @jx_term_set_attr(i32 11, i32 12)
%83 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%84 = call i32 @jx_term_set_attr(i32 11, i32 13)
%85 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%86 = call i32 @jx_term_set_attr(i32 11, i32 14)
%87 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%88 = call i32 @jx_term_set_attr(i32 11, i32 15)
%89 = call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%90 = call i32 @jx_term_set_attr(i32 11, i32 -1)
%91 = call i32 @jx_term_move_to(i32 4, i32 10)
store i32 0, i32* %1
store i32 0, i32* %2
%92 = call i32 (...) @jx_term_flush()
br label %93
93: ; preds = %143, %0
%94 = call i32 (...) @jx_term_getchar()
store i32 %94, i32* %3
%95 = load i32, i32* %3
%96 = icmp sge i32 %95, 0
br i1 %96, label %100, label %97
97: ; preds = %93
%98 = load i32, i32* %3
%99 = icmp slt i32 %98, -1
br i1 %99, label %100, label %115
100: ; preds = %97, %93
%101 = call i32 @jx_term_move_to(i32 4, i32 10)
%102 = load i32, i32* %3
%103 = icmp eq i32 %102, -2
br i1 %103, label %104, label %109
104: ; preds = %100
%105 = call i32 @jx_term_get_size(i32* %4, i32* %5)
%106 = load i32, i32* %4
%107 = load i32, i32* %5
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0), i32 %106, i32 %107)
br label %113
109: ; preds = %100
%110 = call i32 (...) @jx_term_erase_to_line_end()
%111 = load i32, i32* %3
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %111)
br label %113
113: ; preds = %109, %104
%114 = call i32 (...) @jx_term_flush()
br label %115
115: ; preds = %113, %97
%116 = load i32, i32* %3
%117 = icmp eq i32 %116, 113
br i1 %117, label %121, label %118
118: ; preds = %115
%119 = load i32, i32* %3
%120 = icmp eq i32 %119, 81
br i1 %120, label %121, label %122
121: ; preds = %118, %115
br label %145
122: ; preds = %118
%123 = load i32, i32* %1
%124 = add nsw i32 %123, 1
store i32 %124, i32* %1
%125 = load i32, i32* %1
%126 = icmp eq i32 %125, 1000
br i1 %126, label %127, label %143
127: ; preds = %122
%128 = load i32, i32* %2
%129 = add nsw i32 4, %128
%130 = call i32 @jx_term_move_to(i32 %129, i32 12)
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
%132 = call i32 @jx_term_move_to(i32 10, i32 10)
%133 = call i32 (...) @jx_term_flush()
store i32 0, i32* %1
%134 = load i32, i32* %2
%135 = add nsw i32 %134, 1
store i32 %135, i32* %2
%136 = load i32, i32* %2
%137 = icmp sgt i32 %136, 20
br i1 %137, label %138, label %142
138: ; preds = %127
%139 = call i32 @jx_term_move_to(i32 4, i32 12)
%140 = call i32 (...) @jx_term_erase_to_line_end()
store i32 0, i32* %2
%141 = call i32 (...) @jx_term_flush()
br label %142
142: ; preds = %138, %127
br label %143
143: ; preds = %142, %122
%144 = call i32 @usleep(i32 200)
br label %93
145: ; preds = %121
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"JXTermLib Debug Screen\00"
@.str.1 = [14 x i8] c"Inverse Video\00"
@.str.2 = [7 x i8] c"Bold \00"
@.str.3 = [10 x i8] c"Underline\00"
@.str.4 = [8 x i8] c"Black \00"
@.str.5 = [6 x i8] c"Red \00"
@.str.6 = [8 x i8] c"Green \00"
@.str.7 = [9 x i8] c"Yellow \00"
@.str.8 = [7 x i8] c"Blue \00"
@.str.9 = [10 x i8] c"Magenta \00"
@.str.10 = [7 x i8] c"Cyan \00"
@.str.11 = [8 x i8] c"Lt Grey\00"
@.str.12 = [8 x i8] c"Dk Grey\00"
@.str.13 = [8 x i8] c"White \00"
@.str.14 = [8 x i8] c"Lt Gray\00"
@.str.15 = [18 x i8] c"New Size: %d x %d\00"
@.str.16 = [4 x i8] c"%d\0A\00"
define void @jx_term_debug() {
%1 = alloca i32
%2 = alloca i32
%3 = tail call i32 @jx_term_init(i32 1)
%4 = tail call i32 @jx_term_move_to(i32 1, i32 1)
%5 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @jx_term_move_to(i32 4, i32 2)
%7 = tail call i32 @jx_term_set_attr(i32 1, i32 1)
%8 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @jx_term_move_to(i32 4, i32 3)
%10 = tail call i32 @jx_term_set_attr(i32 1, i32 0)
%11 = tail call i32 @jx_term_set_attr(i32 2, i32 1)
%12 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%13 = tail call i32 @jx_term_set_attr(i32 2, i32 0)
%14 = tail call i32 @jx_term_set_attr(i32 4, i32 1)
%15 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%16 = tail call i32 @jx_term_set_attr(i32 4, i32 0)
%17 = tail call i32 @jx_term_show_cursor(i32 0)
%18 = tail call i32 @jx_term_move_to(i32 4, i32 5)
%19 = tail call i32 @jx_term_set_attr(i32 10, i32 0)
%20 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%21 = tail call i32 @jx_term_set_attr(i32 10, i32 1)
%22 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%23 = tail call i32 @jx_term_set_attr(i32 10, i32 2)
%24 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%25 = tail call i32 @jx_term_set_attr(i32 10, i32 3)
%26 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%27 = tail call i32 @jx_term_set_attr(i32 10, i32 4)
%28 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%29 = tail call i32 @jx_term_set_attr(i32 10, i32 5)
%30 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%31 = tail call i32 @jx_term_set_attr(i32 10, i32 6)
%32 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%33 = tail call i32 @jx_term_set_attr(i32 10, i32 7)
%34 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%35 = tail call i32 @jx_term_move_to(i32 4, i32 6)
%36 = tail call i32 @jx_term_set_attr(i32 10, i32 8)
%37 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%38 = tail call i32 @jx_term_set_attr(i32 10, i32 9)
%39 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%40 = tail call i32 @jx_term_set_attr(i32 10, i32 10)
%41 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%42 = tail call i32 @jx_term_set_attr(i32 10, i32 11)
%43 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%44 = tail call i32 @jx_term_set_attr(i32 10, i32 12)
%45 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%46 = tail call i32 @jx_term_set_attr(i32 10, i32 13)
%47 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%48 = tail call i32 @jx_term_set_attr(i32 10, i32 14)
%49 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%50 = tail call i32 @jx_term_set_attr(i32 10, i32 15)
%51 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%52 = tail call i32 @jx_term_set_attr(i32 10, i32 -1)
%53 = tail call i32 @jx_term_move_to(i32 4, i32 7)
%54 = tail call i32 @jx_term_set_attr(i32 11, i32 0)
%55 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%56 = tail call i32 @jx_term_set_attr(i32 11, i32 1)
%57 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%58 = tail call i32 @jx_term_set_attr(i32 11, i32 2)
%59 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%60 = tail call i32 @jx_term_set_attr(i32 11, i32 3)
%61 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%62 = tail call i32 @jx_term_set_attr(i32 11, i32 4)
%63 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%64 = tail call i32 @jx_term_set_attr(i32 11, i32 5)
%65 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%66 = tail call i32 @jx_term_set_attr(i32 11, i32 6)
%67 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%68 = tail call i32 @jx_term_set_attr(i32 11, i32 7)
%69 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%70 = tail call i32 @jx_term_move_to(i32 4, i32 8)
%71 = tail call i32 @jx_term_set_attr(i32 11, i32 8)
%72 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%73 = tail call i32 @jx_term_set_attr(i32 11, i32 9)
%74 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%75 = tail call i32 @jx_term_set_attr(i32 11, i32 10)
%76 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%77 = tail call i32 @jx_term_set_attr(i32 11, i32 11)
%78 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%79 = tail call i32 @jx_term_set_attr(i32 11, i32 12)
%80 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%81 = tail call i32 @jx_term_set_attr(i32 11, i32 13)
%82 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%83 = tail call i32 @jx_term_set_attr(i32 11, i32 14)
%84 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%85 = tail call i32 @jx_term_set_attr(i32 11, i32 15)
%86 = tail call i32 @jx_term_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%87 = tail call i32 @jx_term_set_attr(i32 11, i32 -1)
%88 = tail call i32 @jx_term_move_to(i32 4, i32 10)
%89 = tail call i32 (...) @jx_term_flush()
%90 = bitcast i32* %1 to i8*
%91 = bitcast i32* %2 to i8*
br label %92
92: ; preds = %127, %0
%93 = phi i32 [ 0, %0 ], [ %128, %127 ]
%94 = phi i32 [ 0, %0 ], [ %129, %127 ]
%95 = call i32 (...) @jx_term_getchar()
%96 = icmp eq i32 %95, -1
br i1 %96, label %112, label %97
97: ; preds = %92
%98 = call i32 @jx_term_move_to(i32 4, i32 10)
%99 = icmp eq i32 %95, -2
br i1 %99, label %100, label %106
100: ; preds = %97
%101 = call i32 @jx_term_get_size(i32* %1, i32* %2)
%102 = load i32, i32* %1
%103 = load i32, i32* %2
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0), i32 %102, i32 %103)
%105 = call i32 (...) @jx_term_flush()
br label %112
106: ; preds = %97
%107 = call i32 (...) @jx_term_erase_to_line_end()
%108 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %95)
%109 = call i32 (...) @jx_term_flush()
%110 = and i32 %95, -33
%111 = icmp eq i32 %110, 81
br i1 %111, label %131, label %112
112: ; preds = %92, %100, %106
%113 = add nsw i32 %94, 1
%114 = icmp eq i32 %113, 1000
br i1 %114, label %115, label %127
115: ; preds = %112
%116 = add nsw i32 %93, 4
%117 = call i32 @jx_term_move_to(i32 %116, i32 12)
%118 = call i32 @putchar(i32 46)
%119 = call i32 @jx_term_move_to(i32 10, i32 10)
%120 = call i32 (...) @jx_term_flush()
%121 = add nsw i32 %93, 1
%122 = icmp sgt i32 %93, 19
br i1 %122, label %123, label %127
123: ; preds = %115
%124 = call i32 @jx_term_move_to(i32 4, i32 12)
%125 = call i32 (...) @jx_term_erase_to_line_end()
%126 = call i32 (...) @jx_term_flush()
br label %127
127: ; preds = %112, %123, %115
%128 = phi i32 [ 0, %123 ], [ %121, %115 ], [ %93, %112 ]
%129 = phi i32 [ 0, %123 ], [ 0, %115 ], [ %113, %112 ]
%130 = call i32 @usleep(i32 200)
br label %92
131: ; preds = %106
ret void
}