#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*/ COLOR_PAIR(int);
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ move(int, int const);
int /*<<< orphan*/ printw(char *, ...);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ usleep(int);
void imprime_movimento(int torre1, int torre2, int altura1, int altura2,
                       int disco) {
  const int col1 = 10 + (torre1 - 1) * 16;
  const int col2 = 10 + (torre2 - 1) * 16;
  const int lin1 = 8 - altura1;
  const int lin2 = 9 - altura2;
  int i = 0, j = lin1, k = 0, dir = 0;
  while (j >= 3) {
    for (i = 1; i <= disco; ++i) {
      move(j, col1 - i);
      printw(" ");
      move(j, col1 + i);
      printw(" ");
    }
    move(j, col1 - i);
    printw(" ");
    move(j, col1 + i);
    printw(" ");
    move(j, col1);
    printw("|");
    --j;
    attron(COLOR_PAIR(2));
    for (i = 1; i <= disco; ++i) {
      move(j, col1 - i);
      printw("-");
      move(j, col1 + i);
      printw("-");
    }
    move(j, col1 - i);
    printw("<");
    move(j, col1 + i);
    printw(">");
    move(j, col1);
    printw("%d", disco);
    move(j, col1);
    attroff(COLOR_PAIR(2));
    refresh();
    usleep(100000);
  }
  if (torre2 > torre1)
    dir = 1;
  else
    dir = -1;
  i = 0;
  while (i * dir < (col2 - col1) * dir) {
    for (k = 1; k <= disco; ++k) {
      move(j, col1 + i - k);
      printw(" ");
      move(j, col1 + i + k);
      printw(" ");
    }
    move(j, col1 + i - k);
    printw(" ");
    move(j, col1 + i + k);
    printw(" ");
    move(j, col1 + i);
    printw(" ");
    i += dir;
    attron(COLOR_PAIR(2));
    for (k = 1; k <= disco; ++k) {
      move(j, col1 + i - k);
      printw("-");
      move(j, col1 + i + k);
      printw("-");
    }
    move(j, col1 + i - k);
    printw("<");
    move(j, col1 + i + k);
    printw(">");
    move(j, col1 + i);
    printw("%d", disco);
    move(j, col1 + i);
    attroff(COLOR_PAIR(2));
    refresh();
    usleep(100000);
  }
  while (j < lin2) {
    for (i = 1; i <= disco; ++i) {
      move(j, col2 - i);
      printw(" ");
      move(j, col2 + i);
      printw(" ");
    }
    move(j, col2 - i);
    printw(" ");
    move(j, col2 + i);
    printw(" ");
    move(j, col2);
    if (j == 2)
      printw(" ");
    else
      printw("|");
    ++j;
    if (j < lin2)
      attron(COLOR_PAIR(2));
    for (i = 1; i <= disco; ++i) {
      move(j, col2 - i);
      printw("-");
      move(j, col2 + i);
      printw("-");
    }
    move(j, col2 - i);
    printw("<");
    move(j, col2 + i);
    printw(">");
    move(j, col2);
    printw("%d", disco);
    move(j, col2);
    if (j < lin2)
      attroff(COLOR_PAIR(2));
    refresh();
    usleep(100000);
  }
  return;
}


x86 assembly (clang, -O0):
<imprime_movimento>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
shl    $0x4,%eax
add    $0xa,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
shl    $0x4,%eax
add    $0xa,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x8,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    $0x9,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x2c(%rbp)
jl     1384 <imprime_movimento+0x214>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     123a <imprime_movimento+0xca>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
sub    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0xddb(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11e8 <imprime_movimento+0x78>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
sub    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0xd95(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1090 <move@plt>
lea    0xd7e(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2c(%rbp)
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     12fe <imprime_movimento+0x18e>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
sub    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0xd37(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0xd1b(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12ac <imprime_movimento+0x13c>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
sub    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0xcf3(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0xcd9(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1090 <move@plt>
mov    -0x14(%rbp),%esi
lea    0xcbf(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1090 <move@plt>
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x0,%al
call   1070 <refresh@plt>
mov    $0x186a0,%edi
call   1080 <usleep@plt>
jmp    11d7 <imprime_movimento+0x67>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    139c <imprime_movimento+0x22c>
movl   $0x1,-0x34(%rbp)
jmp    13a3 <imprime_movimento+0x233>
movl   $0xffffffff,-0x34(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
imul   -0x34(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    -0x18(%rbp),%ecx
imul   -0x34(%rbp),%ecx
cmp    %ecx,%eax
jge    1587 <imprime_movimento+0x417>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1422 <imprime_movimento+0x2b2>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
sub    -0x30(%rbp),%esi
call   1090 <move@plt>
lea    0xc12(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
add    -0x30(%rbp),%esi
call   1090 <move@plt>
lea    0xbf3(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    13ca <imprime_movimento+0x25a>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
sub    -0x30(%rbp),%esi
call   1090 <move@plt>
lea    0xbc6(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
add    -0x30(%rbp),%esi
call   1090 <move@plt>
lea    0xba7(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0xb8b(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x34(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     14f5 <imprime_movimento+0x385>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
sub    -0x30(%rbp),%esi
call   1090 <move@plt>
lea    0xb43(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
add    -0x30(%rbp),%esi
call   1090 <move@plt>
lea    0xb24(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    149d <imprime_movimento+0x32d>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
sub    -0x30(%rbp),%esi
call   1090 <move@plt>
lea    0xaf9(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
add    -0x30(%rbp),%esi
call   1090 <move@plt>
lea    0xadc(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
call   1090 <move@plt>
mov    -0x14(%rbp),%esi
lea    0xabf(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x28(%rbp),%esi
call   1090 <move@plt>
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x0,%al
call   1070 <refresh@plt>
mov    $0x186a0,%edi
call   1080 <usleep@plt>
jmp    13aa <imprime_movimento+0x23a>
jmp    158c <imprime_movimento+0x41c>
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1770 <imprime_movimento+0x600>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     15f1 <imprime_movimento+0x481>
mov    -0x2c(%rbp),%edi
mov    -0x1c(%rbp),%esi
sub    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0xa40(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x1c(%rbp),%esi
add    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0xa24(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    159f <imprime_movimento+0x42f>
mov    -0x2c(%rbp),%edi
mov    -0x1c(%rbp),%esi
sub    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0x9fa(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x1c(%rbp),%esi
add    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0x9de(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1090 <move@plt>
cmpl   $0x2,-0x2c(%rbp)
jne    1651 <imprime_movimento+0x4e1>
lea    0x9bb(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
jmp    165f <imprime_movimento+0x4ef>
lea    0x9aa(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1685 <imprime_movimento+0x515>
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     16de <imprime_movimento+0x56e>
mov    -0x2c(%rbp),%edi
mov    -0x1c(%rbp),%esi
sub    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0x957(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x1c(%rbp),%esi
add    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0x93b(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    168c <imprime_movimento+0x51c>
mov    -0x2c(%rbp),%edi
mov    -0x1c(%rbp),%esi
sub    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0x913(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x1c(%rbp),%esi
add    -0x28(%rbp),%esi
call   1090 <move@plt>
lea    0x8f9(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1090 <move@plt>
mov    -0x14(%rbp),%esi
lea    0x8df(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x2c(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1090 <move@plt>
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    175a <imprime_movimento+0x5ea>
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x0,%al
call   1070 <refresh@plt>
mov    $0x186a0,%edi
call   1080 <usleep@plt>
jmp    158c <imprime_movimento+0x41c>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprime_movimento>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %ecx,0x4(%rsp)
mov    %edi,0x10(%rsp)
mov    %edi,%ecx
shl    $0x4,%ecx
lea    -0x6(%rcx),%eax
mov    %rax,0x18(%rsp)
mov    %esi,0x24(%rsp)
mov    %esi,%eax
shl    $0x4,%eax
mov    %rax,0x40(%rsp)
add    $0xfffffffa,%eax
mov    %eax,0x20(%rsp)
mov    $0x8,%r12d
sub    %edx,%r12d
movl   $0x9,(%rsp)
cmp    $0x5,%edx
mov    %r8,0x30(%rsp)
mov    %rcx,0x48(%rsp)
jg     13a9 <imprime_movimento+0x239>
lea    0x1(%r8),%eax
mov    %eax,0x8(%rsp)
lea    -0x5(%rcx),%eax
mov    %eax,0x28(%rsp)
lea    -0x7(%rcx),%eax
mov    %eax,0x14(%rsp)
lea    0xe18(%rip),%r15
jmp    1280 <imprime_movimento+0x110>
nopl   (%rax)
mov    0x18(%rsp),%rbx
mov    %ebx,%esi
sub    %ebp,%esi
mov    %r13d,%edi
call   1090 <move@plt>
lea    0xdfe(%rip),%rdi
xor    %eax,%eax
call   1050 <printw@plt>
add    %ebx,%ebp
mov    %r13d,%edi
mov    %ebp,%esi
call   1090 <move@plt>
lea    0xde6(%rip),%rdi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r13d,%edi
mov    %ebx,%esi
call   1090 <move@plt>
lea    0xdd0(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r13d,%edi
mov    %ebx,%esi
call   1090 <move@plt>
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
xor    %eax,%eax
call   1070 <refresh@plt>
mov    $0x186a0,%edi
call   1080 <usleep@plt>
cmp    $0x3,%r12d
mov    %r13d,%r12d
mov    %r14,%r8
jle    13ac <imprime_movimento+0x23c>
mov    $0x1,%ebx
test   %r8d,%r8d
jle    12dd <imprime_movimento+0x16d>
mov    %r8,%rax
mov    0x14(%rsp),%ebp
mov    0x28(%rsp),%ebx
mov    %eax,%r13d
nopl   0x0(%rax,%rax,1)
mov    %r12d,%edi
mov    %ebp,%esi
call   1090 <move@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r12d,%edi
mov    %ebx,%esi
call   1090 <move@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
add    $0x1,%ebx
add    $0xffffffff,%ebp
add    $0xffffffff,%r13d
jne    12a0 <imprime_movimento+0x130>
mov    0x8(%rsp),%ebx
mov    0x30(%rsp),%r8
mov    %r8,%r14
mov    0x18(%rsp),%rbp
mov    %ebp,%esi
sub    %ebx,%esi
mov    %r12d,%edi
call   1090 <move@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
add    %ebp,%ebx
mov    %r12d,%edi
mov    %ebx,%esi
call   1090 <move@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r12d,%edi
mov    %ebp,%esi
mov    $0x1,%ebp
call   1090 <move@plt>
lea    0xcdb(%rip),%rdi
xor    %eax,%eax
call   1050 <printw@plt>
lea    -0x1(%r12),%r13d
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
test   %r14d,%r14d
jle    11f0 <imprime_movimento+0x80>
mov    0x14(%rsp),%ebx
mov    %r14,%rax
mov    0x28(%rsp),%ebp
lea    0xca5(%rip),%r15
nop
mov    %r13d,%edi
mov    %ebx,%esi
call   1090 <move@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r13d,%edi
mov    %ebp,%esi
call   1090 <move@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
add    $0xffffffff,%r14d
jne    1360 <imprime_movimento+0x1f0>
mov    0x8(%rsp),%ebp
mov    0x30(%rsp),%r14
lea    0xc5c(%rip),%r15
jmp    11f0 <imprime_movimento+0x80>
mov    %r12d,%r13d
mov    0x4(%rsp),%eax
sub    %eax,(%rsp)
xor    %eax,%eax
mov    0x10(%rsp),%ecx
cmp    %ecx,0x24(%rsp)
setg   %al
add    %eax,%eax
add    $0xffffffff,%eax
mov    0x20(%rsp),%ecx
sub    0x18(%rsp),%ecx
mov    %rax,0x28(%rsp)
imul   %eax,%ecx
mov    %ecx,0x54(%rsp)
test   %ecx,%ecx
jle    161b <imprime_movimento+0x4ab>
lea    0x1(%r8),%eax
mov    %eax,0x3c(%rsp)
mov    0x48(%rsp),%rax
lea    -0x5(%rax),%r14d
mov    %eax,%r12d
add    $0xfffffff9,%r12d
mov    0x28(%rsp),%rcx
lea    (%rcx,%rax,1),%edx
add    $0xfffffffb,%edx
mov    %edx,0x10(%rsp)
add    %ecx,%eax
add    $0xfffffff9,%eax
mov    %eax,0x48(%rsp)
lea    0xbe8(%rip),%r15
xor    %edx,%edx
jmp    14ce <imprime_movimento+0x35e>
nop
mov    %ebx,%esi
sub    %ebp,%esi
mov    %r13d,%edi
call   1090 <move@plt>
lea    0xbd3(%rip),%rdi
xor    %eax,%eax
call   1050 <printw@plt>
add    %ebx,%ebp
mov    %r13d,%edi
mov    %ebp,%esi
call   1090 <move@plt>
lea    0xbbb(%rip),%rdi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r13d,%edi
mov    %ebx,%esi
call   1090 <move@plt>
lea    0xba5(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r13d,%edi
mov    %ebx,%esi
call   1090 <move@plt>
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
xor    %eax,%eax
call   1070 <refresh@plt>
mov    $0x186a0,%edi
call   1080 <usleep@plt>
mov    %r14,%rdx
mov    %r14d,%eax
mov    0x28(%rsp),%rcx
imul   %ecx,%eax
mov    0x14(%rsp),%r14d
add    %ecx,%r14d
mov    %r12,%r8
mov    0x24(%rsp),%r12d
add    %ecx,%r12d
add    %ecx,0x10(%rsp)
add    %ecx,0x48(%rsp)
cmp    0x54(%rsp),%eax
jge    161b <imprime_movimento+0x4ab>
mov    0x18(%rsp),%rax
mov    %rdx,0x8(%rsp)
add    %edx,%eax
mov    %eax,0x4(%rsp)
mov    %r12d,0x24(%rsp)
mov    %r14d,0x14(%rsp)
mov    %r8d,%ebx
mov    %r8,%rax
mov    $0x1,%ebp
test   %eax,%eax
jle    153b <imprime_movimento+0x3cb>
nopw   0x0(%rax,%rax,1)
mov    %r13d,%edi
mov    %r12d,%esi
call   1090 <move@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r13d,%edi
mov    %r14d,%esi
call   1090 <move@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
add    $0x1,%r14d
add    $0xffffffff,%r12d
add    $0xffffffff,%ebx
jne    1500 <imprime_movimento+0x390>
mov    0x3c(%rsp),%ebp
mov    0x4(%rsp),%ebx
mov    %ebx,%esi
sub    %ebp,%esi
mov    %r13d,%edi
call   1090 <move@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
add    %ebx,%ebp
mov    %r13d,%edi
mov    %ebp,%esi
call   1090 <move@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r13d,%edi
mov    %ebx,%esi
call   1090 <move@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
mov    0x8(%rsp),%r14
add    0x28(%rsp),%r14d
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
mov    0x18(%rsp),%rax
lea    (%r14,%rax,1),%ebx
mov    0x30(%rsp),%r12
test   %r12d,%r12d
mov    $0x1,%ebp
jle    1420 <imprime_movimento+0x2b0>
mov    %ebx,0x4(%rsp)
mov    %r14,0x8(%rsp)
mov    0x48(%rsp),%ebx
mov    0x10(%rsp),%ebp
lea    0xa36(%rip),%r14
xchg   %ax,%ax
mov    %r13d,%edi
mov    %ebx,%esi
call   1090 <move@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r13d,%edi
mov    %ebp,%esi
call   1090 <move@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
add    $0xffffffff,%r12d
jne    15d0 <imprime_movimento+0x460>
mov    0x3c(%rsp),%ebp
mov    0x30(%rsp),%r12
mov    0x8(%rsp),%r14
mov    0x4(%rsp),%ebx
jmp    1420 <imprime_movimento+0x2b0>
mov    (%rsp),%r15d
cmp    %r15d,%r13d
jge    1838 <imprime_movimento+0x6c8>
lea    0x1(%r8),%eax
mov    %eax,0x18(%rsp)
mov    0x40(%rsp),%rax
lea    -0x5(%rax),%ecx
mov    %ecx,0x8(%rsp)
add    $0xfffffff9,%eax
mov    %rax,0x40(%rsp)
lea    0x9b5(%rip),%r14
lea    0x9b2(%rip),%r12
mov    %r15d,(%rsp)
jmp    167d <imprime_movimento+0x50d>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1070 <refresh@plt>
mov    $0x186a0,%edi
call   1080 <usleep@plt>
cmp    %r15d,%r13d
mov    %rbx,%r8
je     1838 <imprime_movimento+0x6c8>
test   %r8d,%r8d
jle    16e0 <imprime_movimento+0x570>
mov    0x40(%rsp),%rax
mov    %eax,%ebx
mov    %r8,%rax
mov    0x8(%rsp),%ebp
mov    %eax,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r13d,%edi
mov    %ebx,%esi
call   1090 <move@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r13d,%edi
mov    %ebp,%esi
call   1090 <move@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
add    $0xffffffff,%r15d
jne    16a0 <imprime_movimento+0x530>
mov    0x18(%rsp),%ebx
mov    (%rsp),%r15d
jmp    16e5 <imprime_movimento+0x575>
xchg   %ax,%ax
mov    $0x1,%ebx
mov    0x20(%rsp),%ebp
mov    %ebp,%esi
sub    %ebx,%esi
mov    %r13d,%edi
call   1090 <move@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
add    %ebp,%ebx
mov    %r13d,%edi
mov    %ebx,%esi
call   1090 <move@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r13d,%edi
mov    %ebp,%esi
call   1090 <move@plt>
cmp    $0x2,%r13d
lea    0x8d8(%rip),%rdi
cmove  %r14,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
add    $0x1,%r13d
cmp    %r15d,%r13d
jge    174f <imprime_movimento+0x5df>
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
mov    0x30(%rsp),%r15
test   %r15d,%r15d
jle    17b0 <imprime_movimento+0x640>
mov    0x40(%rsp),%rax
mov    %eax,%ebx
mov    0x8(%rsp),%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13d,%edi
mov    %ebx,%esi
call   1090 <move@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r13d,%edi
mov    %ebp,%esi
call   1090 <move@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printw@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
add    $0xffffffff,%r15d
jne    1770 <imprime_movimento+0x600>
mov    0x18(%rsp),%ebx
mov    0x30(%rsp),%r15
jmp    17b5 <imprime_movimento+0x645>
nop
mov    $0x1,%ebx
mov    0x20(%rsp),%ebp
mov    %ebp,%esi
sub    %ebx,%esi
mov    %r13d,%edi
call   1090 <move@plt>
lea    0x83a(%rip),%rdi
xor    %eax,%eax
call   1050 <printw@plt>
add    %ebp,%ebx
mov    %r13d,%edi
mov    %ebx,%esi
call   1090 <move@plt>
lea    0x822(%rip),%rdi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r13d,%edi
mov    %ebp,%esi
call   1090 <move@plt>
lea    0x80c(%rip),%rdi
mov    %r15,%rbx
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <printw@plt>
mov    %r13d,%edi
mov    %ebp,%esi
call   1090 <move@plt>
mov    (%rsp),%r15d
cmp    %r15d,%r13d
jge    1660 <imprime_movimento+0x4f0>
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
jmp    1660 <imprime_movimento+0x4f0>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [2 x i8] c"|\00"
@.str.2 = [2 x i8] c"-\00"
@.str.3 = [2 x i8] c"<\00"
@.str.4 = [2 x i8] c">\00"
@.str.5 = [3 x i8] c"%d\00"
define void @imprime_movimento(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%19 = load i32, i32* %6
%20 = sub nsw i32 %19, 1
%21 = mul nsw i32 %20, 16
%22 = add nsw i32 10, %21
store i32 %22, i32* %11
%23 = load i32, i32* %7
%24 = sub nsw i32 %23, 1
%25 = mul nsw i32 %24, 16
%26 = add nsw i32 10, %25
store i32 %26, i32* %12
%27 = load i32, i32* %8
%28 = sub nsw i32 8, %27
store i32 %28, i32* %13
%29 = load i32, i32* %9
%30 = sub nsw i32 9, %29
store i32 %30, i32* %14
store i32 0, i32* %15
%31 = load i32, i32* %13
store i32 %31, i32* %16
store i32 0, i32* %17
store i32 0, i32* %18
br label %32
32: ; preds = %97, %5
%33 = load i32, i32* %16
%34 = icmp sge i32 %33, 3
br i1 %34, label %35, label %122
35: ; preds = %32
store i32 1, i32* %15
br label %36
36: ; preds = %53, %35
%37 = load i32, i32* %15
%38 = load i32, i32* %10
%39 = icmp sle i32 %37, %38
br i1 %39, label %40, label %56
40: ; preds = %36
%41 = load i32, i32* %16
%42 = load i32, i32* %11
%43 = load i32, i32* %15
%44 = sub nsw i32 %42, %43
%45 = call i32 @move(i32 %41, i32 %44)
%46 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%47 = load i32, i32* %16
%48 = load i32, i32* %11
%49 = load i32, i32* %15
%50 = add nsw i32 %48, %49
%51 = call i32 @move(i32 %47, i32 %50)
%52 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %53
53: ; preds = %40
%54 = load i32, i32* %15
%55 = add nsw i32 %54, 1
store i32 %55, i32* %15
br label %36
56: ; preds = %36
%57 = load i32, i32* %16
%58 = load i32, i32* %11
%59 = load i32, i32* %15
%60 = sub nsw i32 %58, %59
%61 = call i32 @move(i32 %57, i32 %60)
%62 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%63 = load i32, i32* %16
%64 = load i32, i32* %11
%65 = load i32, i32* %15
%66 = add nsw i32 %64, %65
%67 = call i32 @move(i32 %63, i32 %66)
%68 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%69 = load i32, i32* %16
%70 = load i32, i32* %11
%71 = call i32 @move(i32 %69, i32 %70)
%72 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%73 = load i32, i32* %16
%74 = add nsw i32 %73, -1
store i32 %74, i32* %16
%75 = call i32 @COLOR_PAIR(i32 2)
%76 = call i32 @attron(i32 %75)
store i32 1, i32* %15
br label %77
77: ; preds = %94, %56
%78 = load i32, i32* %15
%79 = load i32, i32* %10
%80 = icmp sle i32 %78, %79
br i1 %80, label %81, label %97
81: ; preds = %77
%82 = load i32, i32* %16
%83 = load i32, i32* %11
%84 = load i32, i32* %15
%85 = sub nsw i32 %83, %84
%86 = call i32 @move(i32 %82, i32 %85)
%87 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%88 = load i32, i32* %16
%89 = load i32, i32* %11
%90 = load i32, i32* %15
%91 = add nsw i32 %89, %90
%92 = call i32 @move(i32 %88, i32 %91)
%93 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %94
94: ; preds = %81
%95 = load i32, i32* %15
%96 = add nsw i32 %95, 1
store i32 %96, i32* %15
br label %77
97: ; preds = %77
%98 = load i32, i32* %16
%99 = load i32, i32* %11
%100 = load i32, i32* %15
%101 = sub nsw i32 %99, %100
%102 = call i32 @move(i32 %98, i32 %101)
%103 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%104 = load i32, i32* %16
%105 = load i32, i32* %11
%106 = load i32, i32* %15
%107 = add nsw i32 %105, %106
%108 = call i32 @move(i32 %104, i32 %107)
%109 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%110 = load i32, i32* %16
%111 = load i32, i32* %11
%112 = call i32 @move(i32 %110, i32 %111)
%113 = load i32, i32* %10
%114 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %113)
%115 = load i32, i32* %16
%116 = load i32, i32* %11
%117 = call i32 @move(i32 %115, i32 %116)
%118 = call i32 @COLOR_PAIR(i32 2)
%119 = call i32 @attroff(i32 %118)
%120 = call i32 (...) @refresh()
%121 = call i32 @usleep(i32 100000)
br label %32
122: ; preds = %32
%123 = load i32, i32* %7
%124 = load i32, i32* %6
%125 = icmp sgt i32 %123, %124
br i1 %125, label %126, label %127
126: ; preds = %122
store i32 1, i32* %18
br label %128
127: ; preds = %122
store i32 -1, i32* %18
br label %128
128: ; preds = %127, %126
store i32 0, i32* %15
br label %129
129: ; preds = %216, %128
%130 = load i32, i32* %15
%131 = load i32, i32* %18
%132 = mul nsw i32 %130, %131
%133 = load i32, i32* %12
%134 = load i32, i32* %11
%135 = sub nsw i32 %133, %134
%136 = load i32, i32* %18
%137 = mul nsw i32 %135, %136
%138 = icmp slt i32 %132, %137
br i1 %138, label %139, label %249
139: ; preds = %129
store i32 1, i32* %17
br label %140
140: ; preds = %161, %139
%141 = load i32, i32* %17
%142 = load i32, i32* %10
%143 = icmp sle i32 %141, %142
br i1 %143, label %144, label %164
144: ; preds = %140
%145 = load i32, i32* %16
%146 = load i32, i32* %11
%147 = load i32, i32* %15
%148 = add nsw i32 %146, %147
%149 = load i32, i32* %17
%150 = sub nsw i32 %148, %149
%151 = call i32 @move(i32 %145, i32 %150)
%152 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%153 = load i32, i32* %16
%154 = load i32, i32* %11
%155 = load i32, i32* %15
%156 = add nsw i32 %154, %155
%157 = load i32, i32* %17
%158 = add nsw i32 %156, %157
%159 = call i32 @move(i32 %153, i32 %158)
%160 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %161
161: ; preds = %144
%162 = load i32, i32* %17
%163 = add nsw i32 %162, 1
store i32 %163, i32* %17
br label %140
164: ; preds = %140
%165 = load i32, i32* %16
%166 = load i32, i32* %11
%167 = load i32, i32* %15
%168 = add nsw i32 %166, %167
%169 = load i32, i32* %17
%170 = sub nsw i32 %168, %169
%171 = call i32 @move(i32 %165, i32 %170)
%172 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%173 = load i32, i32* %16
%174 = load i32, i32* %11
%175 = load i32, i32* %15
%176 = add nsw i32 %174, %175
%177 = load i32, i32* %17
%178 = add nsw i32 %176, %177
%179 = call i32 @move(i32 %173, i32 %178)
%180 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%181 = load i32, i32* %16
%182 = load i32, i32* %11
%183 = load i32, i32* %15
%184 = add nsw i32 %182, %183
%185 = call i32 @move(i32 %181, i32 %184)
%186 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%187 = load i32, i32* %18
%188 = load i32, i32* %15
%189 = add nsw i32 %188, %187
store i32 %189, i32* %15
%190 = call i32 @COLOR_PAIR(i32 2)
%191 = call i32 @attron(i32 %190)
store i32 1, i32* %17
br label %192
192: ; preds = %213, %164
%193 = load i32, i32* %17
%194 = load i32, i32* %10
%195 = icmp sle i32 %193, %194
br i1 %195, label %196, label %216
196: ; preds = %192
%197 = load i32, i32* %16
%198 = load i32, i32* %11
%199 = load i32, i32* %15
%200 = add nsw i32 %198, %199
%201 = load i32, i32* %17
%202 = sub nsw i32 %200, %201
%203 = call i32 @move(i32 %197, i32 %202)
%204 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%205 = load i32, i32* %16
%206 = load i32, i32* %11
%207 = load i32, i32* %15
%208 = add nsw i32 %206, %207
%209 = load i32, i32* %17
%210 = add nsw i32 %208, %209
%211 = call i32 @move(i32 %205, i32 %210)
%212 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %213
213: ; preds = %196
%214 = load i32, i32* %17
%215 = add nsw i32 %214, 1
store i32 %215, i32* %17
br label %192
216: ; preds = %192
%217 = load i32, i32* %16
%218 = load i32, i32* %11
%219 = load i32, i32* %15
%220 = add nsw i32 %218, %219
%221 = load i32, i32* %17
%222 = sub nsw i32 %220, %221
%223 = call i32 @move(i32 %217, i32 %222)
%224 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%225 = load i32, i32* %16
%226 = load i32, i32* %11
%227 = load i32, i32* %15
%228 = add nsw i32 %226, %227
%229 = load i32, i32* %17
%230 = add nsw i32 %228, %229
%231 = call i32 @move(i32 %225, i32 %230)
%232 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%233 = load i32, i32* %16
%234 = load i32, i32* %11
%235 = load i32, i32* %15
%236 = add nsw i32 %234, %235
%237 = call i32 @move(i32 %233, i32 %236)
%238 = load i32, i32* %10
%239 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %238)
%240 = load i32, i32* %16
%241 = load i32, i32* %11
%242 = load i32, i32* %15
%243 = add nsw i32 %241, %242
%244 = call i32 @move(i32 %240, i32 %243)
%245 = call i32 @COLOR_PAIR(i32 2)
%246 = call i32 @attroff(i32 %245)
%247 = call i32 (...) @refresh()
%248 = call i32 @usleep(i32 100000)
br label %129
249: ; preds = %129
br label %250
250: ; preds = %354, %249
%251 = load i32, i32* %16
%252 = load i32, i32* %14
%253 = icmp slt i32 %251, %252
br i1 %253, label %254, label %357
254: ; preds = %250
store i32 1, i32* %15
br label %255
255: ; preds = %272, %254
%256 = load i32, i32* %15
%257 = load i32, i32* %10
%258 = icmp sle i32 %256, %257
br i1 %258, label %259, label %275
259: ; preds = %255
%260 = load i32, i32* %16
%261 = load i32, i32* %12
%262 = load i32, i32* %15
%263 = sub nsw i32 %261, %262
%264 = call i32 @move(i32 %260, i32 %263)
%265 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%266 = load i32, i32* %16
%267 = load i32, i32* %12
%268 = load i32, i32* %15
%269 = add nsw i32 %267, %268
%270 = call i32 @move(i32 %266, i32 %269)
%271 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %272
272: ; preds = %259
%273 = load i32, i32* %15
%274 = add nsw i32 %273, 1
store i32 %274, i32* %15
br label %255
275: ; preds = %255
%276 = load i32, i32* %16
%277 = load i32, i32* %12
%278 = load i32, i32* %15
%279 = sub nsw i32 %277, %278
%280 = call i32 @move(i32 %276, i32 %279)
%281 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%282 = load i32, i32* %16
%283 = load i32, i32* %12
%284 = load i32, i32* %15
%285 = add nsw i32 %283, %284
%286 = call i32 @move(i32 %282, i32 %285)
%287 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%288 = load i32, i32* %16
%289 = load i32, i32* %12
%290 = call i32 @move(i32 %288, i32 %289)
%291 = load i32, i32* %16
%292 = icmp eq i32 %291, 2
br i1 %292, label %293, label %295
293: ; preds = %275
%294 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %297
295: ; preds = %275
%296 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %297
297: ; preds = %295, %293
%298 = load i32, i32* %16
%299 = add nsw i32 %298, 1
store i32 %299, i32* %16
%300 = load i32, i32* %16
%301 = load i32, i32* %14
%302 = icmp slt i32 %300, %301
br i1 %302, label %303, label %306
303: ; preds = %297
%304 = call i32 @COLOR_PAIR(i32 2)
%305 = call i32 @attron(i32 %304)
br label %306
306: ; preds = %303, %297
store i32 1, i32* %15
br label %307
307: ; preds = %324, %306
%308 = load i32, i32* %15
%309 = load i32, i32* %10
%310 = icmp sle i32 %308, %309
br i1 %310, label %311, label %327
311: ; preds = %307
%312 = load i32, i32* %16
%313 = load i32, i32* %12
%314 = load i32, i32* %15
%315 = sub nsw i32 %313, %314
%316 = call i32 @move(i32 %312, i32 %315)
%317 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%318 = load i32, i32* %16
%319 = load i32, i32* %12
%320 = load i32, i32* %15
%321 = add nsw i32 %319, %320
%322 = call i32 @move(i32 %318, i32 %321)
%323 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %324
324: ; preds = %311
%325 = load i32, i32* %15
%326 = add nsw i32 %325, 1
store i32 %326, i32* %15
br label %307
327: ; preds = %307
%328 = load i32, i32* %16
%329 = load i32, i32* %12
%330 = load i32, i32* %15
%331 = sub nsw i32 %329, %330
%332 = call i32 @move(i32 %328, i32 %331)
%333 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%334 = load i32, i32* %16
%335 = load i32, i32* %12
%336 = load i32, i32* %15
%337 = add nsw i32 %335, %336
%338 = call i32 @move(i32 %334, i32 %337)
%339 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%340 = load i32, i32* %16
%341 = load i32, i32* %12
%342 = call i32 @move(i32 %340, i32 %341)
%343 = load i32, i32* %10
%344 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %343)
%345 = load i32, i32* %16
%346 = load i32, i32* %12
%347 = call i32 @move(i32 %345, i32 %346)
%348 = load i32, i32* %16
%349 = load i32, i32* %14
%350 = icmp slt i32 %348, %349
br i1 %350, label %351, label %354
351: ; preds = %327
%352 = call i32 @COLOR_PAIR(i32 2)
%353 = call i32 @attroff(i32 %352)
br label %354
354: ; preds = %351, %327
%355 = call i32 (...) @refresh()
%356 = call i32 @usleep(i32 100000)
br label %250
357: ; preds = %250
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [2 x i8] c"|\00"
@.str.2 = [2 x i8] c"-\00"
@.str.3 = [2 x i8] c"<\00"
@.str.4 = [2 x i8] c">\00"
@.str.5 = [3 x i8] c"%d\00"
define void @imprime_movimento(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = shl i32 %0, 4
%7 = add i32 %6, -6
%8 = shl i32 %1, 4
%9 = add i32 %8, -6
%10 = sub nsw i32 8, %2
%11 = sub i32 9, %3
%12 = icmp slt i32 %2, 6
br i1 %12, label %13, label %67
13: ; preds = %5
%14 = icmp slt i32 %4, 1
%15 = add i32 %4, 1
br label %16
16: ; preds = %13, %51
%17 = phi i32 [ %10, %13 ], [ %38, %51 ]
br i1 %14, label %28, label %18
18: ; preds = %16, %18
%19 = phi i32 [ %26, %18 ], [ 1, %16 ]
%20 = sub nsw i32 %7, %19
%21 = tail call i32 @move(i32 %17, i32 %20)
%22 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%23 = add nsw i32 %19, %7
%24 = tail call i32 @move(i32 %17, i32 %23)
%25 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%26 = add nuw i32 %19, 1
%27 = icmp eq i32 %19, %4
br i1 %27, label %28, label %18
28: ; preds = %18, %16
%29 = phi i32 [ 1, %16 ], [ %15, %18 ]
%30 = sub nsw i32 %7, %29
%31 = tail call i32 @move(i32 %17, i32 %30)
%32 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%33 = add nsw i32 %29, %7
%34 = tail call i32 @move(i32 %17, i32 %33)
%35 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%36 = tail call i32 @move(i32 %17, i32 %7)
%37 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%38 = add nsw i32 %17, -1
%39 = tail call i32 @COLOR_PAIR(i32 2)
%40 = tail call i32 @attron(i32 %39)
br i1 %14, label %51, label %41
41: ; preds = %28, %41
%42 = phi i32 [ %49, %41 ], [ 1, %28 ]
%43 = sub nsw i32 %7, %42
%44 = tail call i32 @move(i32 %38, i32 %43)
%45 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%46 = add nsw i32 %42, %7
%47 = tail call i32 @move(i32 %38, i32 %46)
%48 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%49 = add nuw i32 %42, 1
%50 = icmp eq i32 %42, %4
br i1 %50, label %51, label %41
51: ; preds = %41, %28
%52 = phi i32 [ 1, %28 ], [ %15, %41 ]
%53 = sub nsw i32 %7, %52
%54 = tail call i32 @move(i32 %38, i32 %53)
%55 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%56 = add nsw i32 %52, %7
%57 = tail call i32 @move(i32 %38, i32 %56)
%58 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%59 = tail call i32 @move(i32 %38, i32 %7)
%60 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %4)
%61 = tail call i32 @move(i32 %38, i32 %7)
%62 = tail call i32 @COLOR_PAIR(i32 2)
%63 = tail call i32 @attroff(i32 %62)
%64 = tail call i32 (...) @refresh()
%65 = tail call i32 @usleep(i32 100000)
%66 = icmp sgt i32 %17, 3
br i1 %66, label %16, label %67
67: ; preds = %51, %5
%68 = phi i32 [ %10, %5 ], [ %38, %51 ]
%69 = icmp sgt i32 %1, %0
%70 = select i1 %69, i32 1, i32 -1
%71 = sub nsw i32 %9, %7
%72 = mul nsw i32 %71, %70
%73 = icmp sgt i32 %72, 0
br i1 %73, label %74, label %80
74: ; preds = %67
%75 = icmp slt i32 %4, 1
%76 = add i32 %4, 1
br label %77
77: ; preds = %74, %119
%78 = phi i32 [ 0, %74 ], [ %105, %119 ]
%79 = add nsw i32 %78, %7
br i1 %75, label %95, label %85
80: ; preds = %119, %67
%81 = icmp slt i32 %68, %11
br i1 %81, label %82, label %194
82: ; preds = %80
%83 = icmp slt i32 %4, 1
%84 = add i32 %4, 1
br label %136
85: ; preds = %77, %85
%86 = phi i32 [ %93, %85 ], [ 1, %77 ]
%87 = sub nsw i32 %79, %86
%88 = tail call i32 @move(i32 %68, i32 %87)
%89 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%90 = add nsw i32 %86, %79
%91 = tail call i32 @move(i32 %68, i32 %90)
%92 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%93 = add nuw i32 %86, 1
%94 = icmp eq i32 %86, %4
br i1 %94, label %95, label %85
95: ; preds = %85, %77
%96 = phi i32 [ 1, %77 ], [ %76, %85 ]
%97 = sub nsw i32 %79, %96
%98 = tail call i32 @move(i32 %68, i32 %97)
%99 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%100 = add nsw i32 %96, %79
%101 = tail call i32 @move(i32 %68, i32 %100)
%102 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%103 = tail call i32 @move(i32 %68, i32 %79)
%104 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%105 = add nsw i32 %78, %70
%106 = tail call i32 @COLOR_PAIR(i32 2)
%107 = tail call i32 @attron(i32 %106)
%108 = add nsw i32 %105, %7
br i1 %75, label %119, label %109
109: ; preds = %95, %109
%110 = phi i32 [ %117, %109 ], [ 1, %95 ]
%111 = sub nsw i32 %108, %110
%112 = tail call i32 @move(i32 %68, i32 %111)
%113 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%114 = add nsw i32 %110, %108
%115 = tail call i32 @move(i32 %68, i32 %114)
%116 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%117 = add nuw i32 %110, 1
%118 = icmp eq i32 %110, %4
br i1 %118, label %119, label %109
119: ; preds = %109, %95
%120 = phi i32 [ 1, %95 ], [ %76, %109 ]
%121 = sub nsw i32 %108, %120
%122 = tail call i32 @move(i32 %68, i32 %121)
%123 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%124 = add nsw i32 %120, %108
%125 = tail call i32 @move(i32 %68, i32 %124)
%126 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%127 = tail call i32 @move(i32 %68, i32 %108)
%128 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %4)
%129 = tail call i32 @move(i32 %68, i32 %108)
%130 = tail call i32 @COLOR_PAIR(i32 2)
%131 = tail call i32 @attroff(i32 %130)
%132 = tail call i32 (...) @refresh()
%133 = tail call i32 @usleep(i32 100000)
%134 = mul nsw i32 %105, %70
%135 = icmp slt i32 %134, %72
br i1 %135, label %77, label %80
136: ; preds = %82, %190
%137 = phi i32 [ %68, %82 ], [ %160, %190 ]
br i1 %83, label %148, label %138
138: ; preds = %136, %138
%139 = phi i32 [ %146, %138 ], [ 1, %136 ]
%140 = sub nsw i32 %9, %139
%141 = tail call i32 @move(i32 %137, i32 %140)
%142 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%143 = add nsw i32 %139, %9
%144 = tail call i32 @move(i32 %137, i32 %143)
%145 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%146 = add nuw i32 %139, 1
%147 = icmp eq i32 %139, %4
br i1 %147, label %148, label %138
148: ; preds = %138, %136
%149 = phi i32 [ 1, %136 ], [ %84, %138 ]
%150 = sub nsw i32 %9, %149
%151 = tail call i32 @move(i32 %137, i32 %150)
%152 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%153 = add nsw i32 %149, %9
%154 = tail call i32 @move(i32 %137, i32 %153)
%155 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%156 = tail call i32 @move(i32 %137, i32 %9)
%157 = icmp eq i32 %137, 2
%158 = select i1 %157, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%159 = tail call i32 (i8*, ...) @printw(i8* %158)
%160 = add i32 %137, 1
%161 = icmp slt i32 %160, %11
br i1 %161, label %162, label %165
162: ; preds = %148
%163 = tail call i32 @COLOR_PAIR(i32 2)
%164 = tail call i32 @attron(i32 %163)
br label %165
165: ; preds = %162, %148
br i1 %83, label %176, label %166
166: ; preds = %165, %166
%167 = phi i32 [ %174, %166 ], [ 1, %165 ]
%168 = sub nsw i32 %9, %167
%169 = tail call i32 @move(i32 %160, i32 %168)
%170 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%171 = add nsw i32 %167, %9
%172 = tail call i32 @move(i32 %160, i32 %171)
%173 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%174 = add nuw i32 %167, 1
%175 = icmp eq i32 %167, %4
br i1 %175, label %176, label %166
176: ; preds = %166, %165
%177 = phi i32 [ 1, %165 ], [ %84, %166 ]
%178 = sub nsw i32 %9, %177
%179 = tail call i32 @move(i32 %160, i32 %178)
%180 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%181 = add nsw i32 %177, %9
%182 = tail call i32 @move(i32 %160, i32 %181)
%183 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%184 = tail call i32 @move(i32 %160, i32 %9)
%185 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %4)
%186 = tail call i32 @move(i32 %160, i32 %9)
br i1 %161, label %187, label %190
187: ; preds = %176
%188 = tail call i32 @COLOR_PAIR(i32 2)
%189 = tail call i32 @attroff(i32 %188)
br label %190
190: ; preds = %187, %176
%191 = tail call i32 (...) @refresh()
%192 = tail call i32 @usleep(i32 100000)
%193 = icmp eq i32 %160, %11
br i1 %193, label %194, label %136
194: ; preds = %190, %80
ret void
}