#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 */
char A_BOLD;
char A_NORMAL;
int /*<<< orphan*/ COLOR_BLACK;
int /*<<< orphan*/ COLOR_BLUE;
int /*<<< orphan*/ COLOR_CYAN;
int /*<<< orphan*/ COLOR_GREEN;
int /*<<< orphan*/ COLOR_MAGENTA;
char COLOR_PAIR(int);
int /*<<< orphan*/ COLOR_RED;
int /*<<< orphan*/ COLOR_WHITE;
int /*<<< orphan*/ COLOR_YELLOW;
int /*<<< orphan*/ attron(char);
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ endwin();
int getch();
int /*<<< orphan*/ init_pair(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ move(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mvaddch(int, int, char);
int /*<<< orphan*/ mvprintw(int, int, char *);
int /*<<< orphan*/ napms(int);
int /*<<< orphan*/ printw(char *);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ start_color();
int /*<<< orphan*/ timeout(int /*<<< orphan*/);
int /*<<< orphan*/ xmas();
int main(void) {
  initscr();
  start_color();
  curs_set(0);
  timeout(0);
  init_pair(1, COLOR_GREEN, COLOR_BLACK);
  init_pair(2, COLOR_RED, COLOR_BLACK);
  init_pair(3, COLOR_YELLOW, COLOR_BLACK);
  init_pair(4, COLOR_BLUE, COLOR_BLACK);
  init_pair(5, COLOR_CYAN, COLOR_BLACK);
  init_pair(6, COLOR_MAGENTA, COLOR_BLACK);
  init_pair(7, COLOR_WHITE, COLOR_BLACK);
  attron(COLOR_PAIR(7) | A_NORMAL);
  mvprintw(23, 0, "Press ESC to exit");
  mvprintw(23, 50, "by David ;-)");
  refresh();
  attron(COLOR_PAIR(1) | A_BOLD);
  int balls_color[] = {1, 2, 3, 4, 5, 6, 7};
  int balls[] = {0, 4, 6, 5, 2, 1, 3, 0, 6};
  while (1) {
    move(0, 0);
    attron(COLOR_PAIR(1) | A_BOLD);
    printw("           .\n");
    printw("         _.+,_\n");
    printw("          '+`\n");
    printw("          / \\\n");
    printw("         /`,o\\\n");
    printw("        /_* ~_\\\n");
    printw("        / o .'\\\n");
    printw("       /_,~' *_\\\n");
    printw("       /`. *  *\\\n");
    printw("      /   `~. o \\\n");
    printw("     /_ *    `~,_\\\n");
    printw("     /   o  *  ~'\\\n");
    printw("    / *    .~~'  o\\\n");
    printw("   /_,.~~'`    *  _\\\n");
    printw("   /`~..  o        \\\n");
    printw("  / *   `'~..   *   \\\n");
    printw(" /_     o    ``~~.,,_\\\n");
    printw(" /  *      *     ..~'\\\n");
    printw("/*    o   _..~~`'*   o\\\n");
    printw("`+.__.~'`'   *   ___.+'\n");
    printw("      \":+-----+:\"\n");
    printw("   hjw  \\_____/\n");
    mvaddch(4, 12, 'o' | COLOR_PAIR(balls_color[balls[0]]) | A_BOLD);
    balls[0] = (balls[0] + 1) % 7;
    mvaddch(6, 10, 'o' | COLOR_PAIR(balls_color[balls[1]]) | A_BOLD);
    balls[1] = (balls[1] + 1) % 7;
    mvaddch(9, 14, 'o' | COLOR_PAIR(balls_color[balls[2]]) | A_BOLD);
    balls[2] = (balls[2] + 1) % 7;
    mvaddch(11, 9, 'o' | COLOR_PAIR(balls_color[balls[3]]) | A_BOLD);
    balls[3] = (balls[3] + 1) % 7;
    mvaddch(12, 17, 'o' | COLOR_PAIR(balls_color[balls[4]]) | A_BOLD);
    balls[4] = (balls[4] + 1) % 7;
    mvaddch(14, 10, 'o' | COLOR_PAIR(balls_color[balls[5]]) | A_BOLD);
    balls[5] = (balls[5] + 1) % 7;
    mvaddch(16, 8, 'o' | COLOR_PAIR(balls_color[balls[6]]) | A_BOLD);
    balls[6] = (balls[6] + 1) % 7;
    mvaddch(18, 6, 'o' | COLOR_PAIR(balls_color[balls[7]]) | A_BOLD);
    balls[7] = (balls[7] + 1) % 7;
    mvaddch(18, 21, 'o' | COLOR_PAIR(balls_color[balls[8]]) | A_BOLD);
    balls[8] = (balls[8] + 1) % 7;
    xmas();
    attron(COLOR_PAIR(7) | A_NORMAL);
    mvprintw(23, 0, "Press ESC to exit");
    mvprintw(23, 50, "by David ;-)");
    refresh();
    napms(1000);
    if (getch() == 27)
      break;
  }
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1060 <start_color@plt>
xor    %edi,%edi
call   1110 <curs_set@plt>
xor    %edi,%edi
call   1070 <timeout@plt>
mov    0x2d8e(%rip),%rax
mov    (%rax),%esi
mov    0x2d95(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1040 <init_pair@plt>
mov    0x2d3a(%rip),%rax
mov    (%rax),%esi
mov    0x2d79(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%edi
call   1040 <init_pair@plt>
mov    0x2d36(%rip),%rax
mov    (%rax),%esi
mov    0x2d5d(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
call   1040 <init_pair@plt>
mov    0x2d12(%rip),%rax
mov    (%rax),%esi
mov    0x2d41(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%edi
call   1040 <init_pair@plt>
mov    0x2d26(%rip),%rax
mov    (%rax),%esi
mov    0x2d25(%rip),%rax
mov    (%rax),%edx
mov    $0x5,%edi
call   1040 <init_pair@plt>
mov    0x2cf2(%rip),%rax
mov    (%rax),%esi
mov    0x2d09(%rip),%rax
mov    (%rax),%edx
mov    $0x6,%edi
call   1040 <init_pair@plt>
mov    0x2cce(%rip),%rax
mov    (%rax),%esi
mov    0x2ced(%rip),%rax
mov    (%rax),%edx
mov    $0x7,%edi
call   1040 <init_pair@plt>
mov    $0x7,%edi
call   10b0 <COLOR_PAIR@plt>
movsbl %al,%eax
mov    0x2cd5(%rip),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
movsbl %al,%edi
call   1080 <attron@plt>
mov    $0x17,%edi
xor    %esi,%esi
lea    0xcd2(%rip),%rdx
call   1120 <mvprintw@plt>
mov    $0x17,%edi
mov    $0x32,%esi
lea    0xcce(%rip),%rdx
call   1120 <mvprintw@plt>
mov    $0x0,%al
call   10c0 <refresh@plt>
mov    $0x1,%edi
call   10b0 <COLOR_PAIR@plt>
movsbl %al,%eax
mov    0x2c3c(%rip),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
movsbl %al,%edi
call   1080 <attron@plt>
mov    0xe58(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe55(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe52(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe50(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xe4a(%rip),%rsi
mov    $0x24,%edx
call   1090 <memcpy@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1130 <move@plt>
mov    $0x1,%edi
call   10b0 <COLOR_PAIR@plt>
movsbl %al,%eax
mov    0x2bd3(%rip),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
movsbl %al,%edi
call   1080 <attron@plt>
lea    0xc3e(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc40(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc44(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc47(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc4a(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc4e(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc53(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc58(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc5e(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc64(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc6b(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc73(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc7b(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc84(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc8e(%rip),%rdi
call   10a0 <printw@plt>
lea    0xc98(%rip),%rdi
call   10a0 <printw@plt>
lea    0xca3(%rip),%rdi
call   10a0 <printw@plt>
lea    0xcaf(%rip),%rdi
call   10a0 <printw@plt>
lea    0xcbb(%rip),%rdi
call   10a0 <printw@plt>
lea    0xcc8(%rip),%rdi
call   10a0 <printw@plt>
lea    0xcd5(%rip),%rdi
call   10a0 <printw@plt>
lea    0xcdc(%rip),%rdi
call   10a0 <printw@plt>
movslq -0x50(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edi
call   10b0 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x6f,%eax
mov    0x2aa4(%rip),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
mov    $0x4,%edi
mov    $0xc,%esi
movsbl %al,%edx
call   10f0 <mvaddch@plt>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x50(%rbp)
movslq -0x4c(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edi
call   10b0 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x6f,%eax
mov    0x2a62(%rip),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
mov    $0x6,%edi
mov    $0xa,%esi
movsbl %al,%edx
call   10f0 <mvaddch@plt>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4c(%rbp)
movslq -0x48(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edi
call   10b0 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x6f,%eax
mov    0x2a20(%rip),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
mov    $0x9,%edi
mov    $0xe,%esi
movsbl %al,%edx
call   10f0 <mvaddch@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x48(%rbp)
movslq -0x44(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edi
call   10b0 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x6f,%eax
mov    0x29de(%rip),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
mov    $0xb,%edi
mov    $0x9,%esi
movsbl %al,%edx
call   10f0 <mvaddch@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x44(%rbp)
movslq -0x40(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edi
call   10b0 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x6f,%eax
mov    0x299c(%rip),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
mov    $0xc,%edi
mov    $0x11,%esi
movsbl %al,%edx
call   10f0 <mvaddch@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x40(%rbp)
movslq -0x3c(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edi
call   10b0 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x6f,%eax
mov    0x295a(%rip),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
mov    $0xe,%edi
mov    $0xa,%esi
movsbl %al,%edx
call   10f0 <mvaddch@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x3c(%rbp)
movslq -0x38(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edi
call   10b0 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x6f,%eax
mov    0x2918(%rip),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
mov    $0x10,%edi
mov    $0x8,%esi
movsbl %al,%edx
call   10f0 <mvaddch@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x38(%rbp)
movslq -0x34(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edi
call   10b0 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x6f,%eax
mov    0x28d6(%rip),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
mov    $0x12,%edi
mov    $0x6,%esi
movsbl %al,%edx
call   10f0 <mvaddch@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x34(%rbp)
movslq -0x30(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edi
call   10b0 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x6f,%eax
mov    0x2894(%rip),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
mov    $0x12,%edi
mov    $0x15,%esi
movsbl %al,%edx
call   10f0 <mvaddch@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x30(%rbp)
mov    $0x0,%al
call   1030 <xmas@plt>
mov    $0x7,%edi
call   10b0 <COLOR_PAIR@plt>
movsbl %al,%eax
mov    0x2899(%rip),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
movsbl %al,%edi
call   1080 <attron@plt>
mov    $0x17,%edi
xor    %esi,%esi
lea    0x896(%rip),%rdx
call   1120 <mvprintw@plt>
mov    $0x17,%edi
mov    $0x32,%esi
lea    0x892(%rip),%rdx
call   1120 <mvprintw@plt>
mov    $0x0,%al
call   10c0 <refresh@plt>
mov    $0x3e8,%edi
call   1100 <napms@plt>
mov    $0x0,%al
call   10d0 <getch@plt>
cmp    $0x1b,%eax
jne    17ab <main+0x59b>
jmp    17b0 <main+0x5a0>
jmp    13b0 <main+0x1a0>
mov    $0x0,%al
call   10e0 <endwin@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1060 <start_color@plt>
xor    %edi,%edi
call   1100 <curs_set@plt>
xor    %edi,%edi
call   1070 <timeout@plt>
mov    0x2d9f(%rip),%rax
mov    (%rax),%esi
mov    0x2da6(%rip),%rbx
mov    (%rbx),%edx
movl   $0x1,0x10(%rsp)
mov    $0x1,%edi
call   1040 <init_pair@plt>
mov    0x2d43(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
movl   $0x2,0xc(%rsp)
mov    $0x2,%edi
call   1040 <init_pair@plt>
mov    0x2d3e(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
movl   $0x3,0x8(%rsp)
mov    $0x3,%edi
call   1040 <init_pair@plt>
mov    0x2d19(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
movl   $0x4,0x4(%rsp)
mov    $0x4,%edi
call   1040 <init_pair@plt>
mov    0x2d2c(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
mov    $0x5,%r14d
mov    $0x5,%edi
call   1040 <init_pair@plt>
mov    0x2cf9(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
mov    $0x6,%r12d
mov    $0x6,%edi
call   1040 <init_pair@plt>
mov    0x2cd6(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
mov    $0x7,%edi
call   1040 <init_pair@plt>
mov    $0x7,%edi
call   10a0 <COLOR_PAIR@plt>
mov    0x2ce7(%rip),%rcx
or     (%rcx),%al
movsbl %al,%edi
call   1080 <attron@plt>
lea    0xcee(%rip),%rdx
mov    $0x17,%edi
xor    %esi,%esi
call   1110 <mvprintw@plt>
lea    0xced(%rip),%rdx
mov    $0x17,%edi
mov    $0x32,%esi
call   1110 <mvprintw@plt>
xor    %eax,%eax
call   10b0 <refresh@plt>
mov    $0x1,%edi
call   10a0 <COLOR_PAIR@plt>
mov    0x2c54(%rip),%r15
or     (%r15),%al
movsbl %al,%edi
call   1080 <attron@plt>
lea    0xe72(%rip),%r13
xor    %ebp,%ebp
mov    $0x6,%ebx
movl   $0x0,(%rsp)
nopl   0x0(%rax)
mov    %ebp,0x14(%rsp)
xor    %edi,%edi
xor    %esi,%esi
call   1120 <move@plt>
mov    $0x1,%edi
call   10a0 <COLOR_PAIR@plt>
or     (%r15),%al
movsbl %al,%edi
call   1080 <attron@plt>
lea    0xc86(%rip),%rdi
call   1090 <printw@plt>
lea    0xc88(%rip),%rdi
call   1090 <printw@plt>
lea    0xc8c(%rip),%rdi
call   1090 <printw@plt>
lea    0xc8f(%rip),%rdi
call   1090 <printw@plt>
lea    0xc92(%rip),%rdi
call   1090 <printw@plt>
lea    0xc96(%rip),%rdi
call   1090 <printw@plt>
lea    0xc9b(%rip),%rdi
call   1090 <printw@plt>
lea    0xca0(%rip),%rdi
call   1090 <printw@plt>
lea    0xca6(%rip),%rdi
call   1090 <printw@plt>
lea    0xcac(%rip),%rdi
call   1090 <printw@plt>
lea    0xcb3(%rip),%rdi
call   1090 <printw@plt>
lea    0xcbb(%rip),%rdi
call   1090 <printw@plt>
lea    0xcc3(%rip),%rdi
call   1090 <printw@plt>
lea    0xccc(%rip),%rdi
call   1090 <printw@plt>
lea    0xcd6(%rip),%rdi
call   1090 <printw@plt>
lea    0xce0(%rip),%rdi
call   1090 <printw@plt>
lea    0xceb(%rip),%rdi
call   1090 <printw@plt>
lea    0xcf7(%rip),%rdi
call   1090 <printw@plt>
lea    0xd03(%rip),%rdi
call   1090 <printw@plt>
lea    0xd10(%rip),%rdi
call   1090 <printw@plt>
lea    0xd1d(%rip),%rdi
call   1090 <printw@plt>
lea    0xd24(%rip),%rdi
call   1090 <printw@plt>
movslq (%rsp),%rbp
mov    0x0(%r13,%rbp,4),%edi
call   10a0 <COLOR_PAIR@plt>
or     (%r15),%al
or     $0x6f,%al
movsbl %al,%edx
mov    $0x4,%edi
mov    $0xc,%esi
call   10e0 <mvaddch@plt>
mov    %ebp,%eax
add    $0x1,%eax
cltq
imul   $0xffffffff92492493,%rax,%rax
shr    $0x20,%rax
add    %ebp,%eax
add    $0x1,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x2,%eax
add    %ecx,%eax
lea    0x0(,%rax,8),%ecx
sub    %ecx,%eax
add    %ebp,%eax
add    $0x1,%eax
mov    %eax,(%rsp)
movslq 0x4(%rsp),%rbp
mov    0x0(%r13,%rbp,4),%edi
call   10a0 <COLOR_PAIR@plt>
or     (%r15),%al
or     $0x6f,%al
movsbl %al,%edx
mov    $0x6,%edi
mov    $0xa,%esi
call   10e0 <mvaddch@plt>
mov    %ebp,%eax
add    $0x1,%eax
cltq
imul   $0xffffffff92492493,%rax,%rax
shr    $0x20,%rax
add    %ebp,%eax
add    $0x1,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x2,%eax
add    %ecx,%eax
lea    0x0(,%rax,8),%ecx
sub    %ecx,%eax
add    %ebp,%eax
add    $0x1,%eax
mov    %eax,0x4(%rsp)
mov    %ebx,%eax
mov    0x0(%r13,%rax,4),%edi
call   10a0 <COLOR_PAIR@plt>
or     (%r15),%al
or     $0x6f,%al
movsbl %al,%edx
mov    $0x9,%edi
mov    $0xe,%esi
call   10e0 <mvaddch@plt>
mov    %ebx,%eax
add    $0x1,%eax
cltq
imul   $0xffffffff92492493,%rax,%rax
shr    $0x20,%rax
add    %ebx,%eax
add    $0x1,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x2,%eax
add    %ecx,%eax
lea    0x0(,%rax,8),%ecx
sub    %ecx,%eax
add    %eax,%ebx
add    $0x1,%ebx
mov    %r14d,%eax
mov    0x0(%r13,%rax,4),%edi
call   10a0 <COLOR_PAIR@plt>
or     (%r15),%al
or     $0x6f,%al
movsbl %al,%edx
mov    $0xb,%edi
mov    $0x9,%esi
call   10e0 <mvaddch@plt>
mov    %r14d,%eax
add    $0x1,%eax
cltq
imul   $0xffffffff92492493,%rax,%rax
shr    $0x20,%rax
add    %r14d,%eax
add    $0x1,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x2,%eax
add    %ecx,%eax
lea    0x0(,%rax,8),%ecx
sub    %ecx,%eax
add    %eax,%r14d
add    $0x1,%r14d
movslq 0xc(%rsp),%rbp
mov    0x0(%r13,%rbp,4),%edi
call   10a0 <COLOR_PAIR@plt>
or     (%r15),%al
or     $0x6f,%al
movsbl %al,%edx
mov    $0xc,%edi
mov    $0x11,%esi
call   10e0 <mvaddch@plt>
mov    %ebp,%eax
add    $0x1,%eax
cltq
imul   $0xffffffff92492493,%rax,%rax
shr    $0x20,%rax
add    %ebp,%eax
add    $0x1,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x2,%eax
add    %ecx,%eax
lea    0x0(,%rax,8),%ecx
sub    %ecx,%eax
add    %ebp,%eax
add    $0x1,%eax
mov    %eax,0xc(%rsp)
movslq 0x10(%rsp),%rbp
mov    0x0(%r13,%rbp,4),%edi
call   10a0 <COLOR_PAIR@plt>
or     (%r15),%al
or     $0x6f,%al
movsbl %al,%edx
mov    $0xe,%edi
mov    $0xa,%esi
call   10e0 <mvaddch@plt>
mov    %ebp,%eax
add    $0x1,%eax
cltq
imul   $0xffffffff92492493,%rax,%rax
shr    $0x20,%rax
add    %ebp,%eax
add    $0x1,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x2,%eax
add    %ecx,%eax
lea    0x0(,%rax,8),%ecx
sub    %ecx,%eax
add    %ebp,%eax
add    $0x1,%eax
mov    %eax,0x10(%rsp)
movslq 0x8(%rsp),%rbp
mov    0x0(%r13,%rbp,4),%edi
call   10a0 <COLOR_PAIR@plt>
or     (%r15),%al
or     $0x6f,%al
movsbl %al,%edx
mov    $0x10,%edi
mov    $0x8,%esi
call   10e0 <mvaddch@plt>
mov    %ebp,%eax
add    $0x1,%eax
cltq
imul   $0xffffffff92492493,%rax,%rax
shr    $0x20,%rax
add    %ebp,%eax
add    $0x1,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x2,%eax
add    %ecx,%eax
lea    0x0(,%rax,8),%ecx
sub    %ecx,%eax
add    %ebp,%eax
add    $0x1,%eax
mov    %eax,0x8(%rsp)
movslq 0x14(%rsp),%rbp
mov    0x0(%r13,%rbp,4),%edi
call   10a0 <COLOR_PAIR@plt>
or     (%r15),%al
or     $0x6f,%al
movsbl %al,%edx
mov    $0x12,%edi
mov    $0x6,%esi
call   10e0 <mvaddch@plt>
mov    %ebp,%eax
add    $0x1,%eax
cltq
imul   $0xffffffff92492493,%rax,%rax
shr    $0x20,%rax
add    %ebp,%eax
add    $0x1,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x2,%eax
add    %ecx,%eax
lea    0x0(,%rax,8),%ecx
sub    %ecx,%eax
add    %eax,%ebp
add    $0x1,%ebp
mov    %r12d,%eax
mov    0x0(%r13,%rax,4),%edi
call   10a0 <COLOR_PAIR@plt>
or     (%r15),%al
or     $0x6f,%al
movsbl %al,%edx
mov    $0x12,%edi
mov    $0x15,%esi
call   10e0 <mvaddch@plt>
mov    %r12d,%eax
add    $0x1,%eax
cltq
imul   $0xffffffff92492493,%rax,%rax
shr    $0x20,%rax
add    %r12d,%eax
add    $0x1,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x2,%eax
add    %ecx,%eax
lea    0x0(,%rax,8),%ecx
sub    %ecx,%eax
add    %eax,%r12d
add    $0x1,%r12d
xor    %eax,%eax
call   1030 <xmas@plt>
mov    $0x7,%edi
call   10a0 <COLOR_PAIR@plt>
mov    0x2826(%rip),%rcx
or     (%rcx),%al
movsbl %al,%edi
call   1080 <attron@plt>
mov    $0x17,%edi
xor    %esi,%esi
lea    0x826(%rip),%rdx
call   1110 <mvprintw@plt>
mov    $0x17,%edi
mov    $0x32,%esi
lea    0x822(%rip),%rdx
call   1110 <mvprintw@plt>
xor    %eax,%eax
call   10b0 <refresh@plt>
mov    $0x3e8,%edi
call   10f0 <napms@plt>
xor    %eax,%eax
call   10c0 <getch@plt>
cmp    $0x1b,%eax
jne    1370 <main+0x170>
xor    %eax,%eax
call   10d0 <endwin@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@COLOR_GREEN = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_RED = global i32 0
@COLOR_YELLOW = global i32 0
@COLOR_BLUE = global i32 0
@COLOR_CYAN = global i32 0
@COLOR_MAGENTA = global i32 0
@COLOR_WHITE = global i32 0
@A_NORMAL = global i8 0
@.str = [18 x i8] c"Press ESC to exit\00"
@.str.1 = [13 x i8] c"by David ;-)\00"
@A_BOLD = global i8 0
@__const.main.balls_color = [7 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7]
@__const.main.balls = [9 x i32] [i32 0, i32 4, i32 6, i32 5, i32 2, i32 1, i32 3, i32 0, i32 6]
@.str.2 = [14 x i8] c" .\0A\00"
@.str.3 = [16 x i8] c" _.+,_\0A\00"
@.str.4 = [15 x i8] c" '+`\0A\00"
@.str.5 = [15 x i8] c" / \\\0A\00"
@.str.6 = [16 x i8] c" /`,o\\\0A\00"
@.str.7 = [17 x i8] c" /_* ~_\\\0A\00"
@.str.8 = [17 x i8] c" / o .'\\\0A\00"
@.str.9 = [18 x i8] c" /_,~' *_\\\0A\00"
@.str.10 = [18 x i8] c" /`. * *\\\0A\00"
@.str.11 = [19 x i8] c" / `~. o \\\0A\00"
@.str.12 = [20 x i8] c" /_ * `~,_\\\0A\00"
@.str.13 = [20 x i8] c" / o * ~'\\\0A\00"
@.str.14 = [21 x i8] c" / * .~~' o\\\0A\00"
@.str.15 = [22 x i8] c" /_,.~~'` * _\\\0A\00"
@.str.16 = [22 x i8] c" /`~.. o \\\0A\00"
@.str.17 = [23 x i8] c" / * `'~.. * \\\0A\00"
@.str.18 = [24 x i8] c" /_ o ``~~.,,_\\\0A\00"
@.str.19 = [24 x i8] c" / * * ..~'\\\0A\00"
@.str.20 = [25 x i8] c"/* o _..~~`'* o\\\0A\00"
@.str.21 = [25 x i8] c"`+.__.~'`' * ___.+'\0A\00"
@.str.22 = [19 x i8] c" \22:+-----+:\22\0A\00"
@.str.23 = [17 x i8] c" hjw \\_____/\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i32]
%3 = alloca [9 x i32]
store i32 0, i32* %1
%4 = call i32 (...) @initscr()
%5 = call i32 (...) @start_color()
%6 = call i32 @curs_set(i32 0)
%7 = call i32 @timeout(i32 0)
%8 = load i32, i32* @COLOR_GREEN
%9 = load i32, i32* @COLOR_BLACK
%10 = call i32 @init_pair(i32 1, i32 %8, i32 %9)
%11 = load i32, i32* @COLOR_RED
%12 = load i32, i32* @COLOR_BLACK
%13 = call i32 @init_pair(i32 2, i32 %11, i32 %12)
%14 = load i32, i32* @COLOR_YELLOW
%15 = load i32, i32* @COLOR_BLACK
%16 = call i32 @init_pair(i32 3, i32 %14, i32 %15)
%17 = load i32, i32* @COLOR_BLUE
%18 = load i32, i32* @COLOR_BLACK
%19 = call i32 @init_pair(i32 4, i32 %17, i32 %18)
%20 = load i32, i32* @COLOR_CYAN
%21 = load i32, i32* @COLOR_BLACK
%22 = call i32 @init_pair(i32 5, i32 %20, i32 %21)
%23 = load i32, i32* @COLOR_MAGENTA
%24 = load i32, i32* @COLOR_BLACK
%25 = call i32 @init_pair(i32 6, i32 %23, i32 %24)
%26 = load i32, i32* @COLOR_WHITE
%27 = load i32, i32* @COLOR_BLACK
%28 = call i32 @init_pair(i32 7, i32 %26, i32 %27)
%29 = call signext i8 @COLOR_PAIR(i32 7)
%30 = sext i8 %29 to i32
%31 = load i8, i8* @A_NORMAL
%32 = sext i8 %31 to i32
%33 = or i32 %30, %32
%34 = trunc i32 %33 to i8
%35 = call i32 @attron(i8 signext %34)
%36 = call i32 @mvprintw(i32 23, i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%37 = call i32 @mvprintw(i32 23, i32 50, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%38 = call i32 (...) @refresh()
%39 = call signext i8 @COLOR_PAIR(i32 1)
%40 = sext i8 %39 to i32
%41 = load i8, i8* @A_BOLD
%42 = sext i8 %41 to i32
%43 = or i32 %40, %42
%44 = trunc i32 %43 to i8
%45 = call i32 @attron(i8 signext %44)
%46 = bitcast [7 x i32]* %2 to i8*
%47 = bitcast [9 x i32]* %3 to i8*
br label %48
48: ; preds = %0, %256
%49 = call i32 @move(i32 0, i32 0)
%50 = call signext i8 @COLOR_PAIR(i32 1)
%51 = sext i8 %50 to i32
%52 = load i8, i8* @A_BOLD
%53 = sext i8 %52 to i32
%54 = or i32 %51, %53
%55 = trunc i32 %54 to i8
%56 = call i32 @attron(i8 signext %55)
%57 = call i32 @printw(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%58 = call i32 @printw(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%59 = call i32 @printw(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%60 = call i32 @printw(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
%61 = call i32 @printw(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%62 = call i32 @printw(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%63 = call i32 @printw(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%64 = call i32 @printw(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
%65 = call i32 @printw(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
%66 = call i32 @printw(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0))
%67 = call i32 @printw(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%68 = call i32 @printw(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%69 = call i32 @printw(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0))
%70 = call i32 @printw(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.15, i64 0, i64 0))
%71 = call i32 @printw(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.16, i64 0, i64 0))
%72 = call i32 @printw(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0))
%73 = call i32 @printw(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.18, i64 0, i64 0))
%74 = call i32 @printw(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.19, i64 0, i64 0))
%75 = call i32 @printw(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.20, i64 0, i64 0))
%76 = call i32 @printw(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.21, i64 0, i64 0))
%77 = call i32 @printw(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.22, i64 0, i64 0))
%78 = call i32 @printw(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0))
%79 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 0
%80 = load i32, i32* %79
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %81
%83 = load i32, i32* %82
%84 = call signext i8 @COLOR_PAIR(i32 %83)
%85 = sext i8 %84 to i32
%86 = or i32 111, %85
%87 = load i8, i8* @A_BOLD
%88 = sext i8 %87 to i32
%89 = or i32 %86, %88
%90 = trunc i32 %89 to i8
%91 = call i32 @mvaddch(i32 4, i32 12, i8 signext %90)
%92 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 0
%93 = load i32, i32* %92
%94 = add nsw i32 %93, 1
%95 = srem i32 %94, 7
%96 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 0
store i32 %95, i32* %96
%97 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 1
%98 = load i32, i32* %97
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %99
%101 = load i32, i32* %100
%102 = call signext i8 @COLOR_PAIR(i32 %101)
%103 = sext i8 %102 to i32
%104 = or i32 111, %103
%105 = load i8, i8* @A_BOLD
%106 = sext i8 %105 to i32
%107 = or i32 %104, %106
%108 = trunc i32 %107 to i8
%109 = call i32 @mvaddch(i32 6, i32 10, i8 signext %108)
%110 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 1
%111 = load i32, i32* %110
%112 = add nsw i32 %111, 1
%113 = srem i32 %112, 7
%114 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 1
store i32 %113, i32* %114
%115 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 2
%116 = load i32, i32* %115
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %117
%119 = load i32, i32* %118
%120 = call signext i8 @COLOR_PAIR(i32 %119)
%121 = sext i8 %120 to i32
%122 = or i32 111, %121
%123 = load i8, i8* @A_BOLD
%124 = sext i8 %123 to i32
%125 = or i32 %122, %124
%126 = trunc i32 %125 to i8
%127 = call i32 @mvaddch(i32 9, i32 14, i8 signext %126)
%128 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 2
%129 = load i32, i32* %128
%130 = add nsw i32 %129, 1
%131 = srem i32 %130, 7
%132 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 2
store i32 %131, i32* %132
%133 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 3
%134 = load i32, i32* %133
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %135
%137 = load i32, i32* %136
%138 = call signext i8 @COLOR_PAIR(i32 %137)
%139 = sext i8 %138 to i32
%140 = or i32 111, %139
%141 = load i8, i8* @A_BOLD
%142 = sext i8 %141 to i32
%143 = or i32 %140, %142
%144 = trunc i32 %143 to i8
%145 = call i32 @mvaddch(i32 11, i32 9, i8 signext %144)
%146 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 3
%147 = load i32, i32* %146
%148 = add nsw i32 %147, 1
%149 = srem i32 %148, 7
%150 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 3
store i32 %149, i32* %150
%151 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 4
%152 = load i32, i32* %151
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %153
%155 = load i32, i32* %154
%156 = call signext i8 @COLOR_PAIR(i32 %155)
%157 = sext i8 %156 to i32
%158 = or i32 111, %157
%159 = load i8, i8* @A_BOLD
%160 = sext i8 %159 to i32
%161 = or i32 %158, %160
%162 = trunc i32 %161 to i8
%163 = call i32 @mvaddch(i32 12, i32 17, i8 signext %162)
%164 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 4
%165 = load i32, i32* %164
%166 = add nsw i32 %165, 1
%167 = srem i32 %166, 7
%168 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 4
store i32 %167, i32* %168
%169 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 5
%170 = load i32, i32* %169
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %171
%173 = load i32, i32* %172
%174 = call signext i8 @COLOR_PAIR(i32 %173)
%175 = sext i8 %174 to i32
%176 = or i32 111, %175
%177 = load i8, i8* @A_BOLD
%178 = sext i8 %177 to i32
%179 = or i32 %176, %178
%180 = trunc i32 %179 to i8
%181 = call i32 @mvaddch(i32 14, i32 10, i8 signext %180)
%182 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 5
%183 = load i32, i32* %182
%184 = add nsw i32 %183, 1
%185 = srem i32 %184, 7
%186 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 5
store i32 %185, i32* %186
%187 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 6
%188 = load i32, i32* %187
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %189
%191 = load i32, i32* %190
%192 = call signext i8 @COLOR_PAIR(i32 %191)
%193 = sext i8 %192 to i32
%194 = or i32 111, %193
%195 = load i8, i8* @A_BOLD
%196 = sext i8 %195 to i32
%197 = or i32 %194, %196
%198 = trunc i32 %197 to i8
%199 = call i32 @mvaddch(i32 16, i32 8, i8 signext %198)
%200 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 6
%201 = load i32, i32* %200
%202 = add nsw i32 %201, 1
%203 = srem i32 %202, 7
%204 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 6
store i32 %203, i32* %204
%205 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 7
%206 = load i32, i32* %205
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %207
%209 = load i32, i32* %208
%210 = call signext i8 @COLOR_PAIR(i32 %209)
%211 = sext i8 %210 to i32
%212 = or i32 111, %211
%213 = load i8, i8* @A_BOLD
%214 = sext i8 %213 to i32
%215 = or i32 %212, %214
%216 = trunc i32 %215 to i8
%217 = call i32 @mvaddch(i32 18, i32 6, i8 signext %216)
%218 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 7
%219 = load i32, i32* %218
%220 = add nsw i32 %219, 1
%221 = srem i32 %220, 7
%222 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 7
store i32 %221, i32* %222
%223 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 8
%224 = load i32, i32* %223
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %225
%227 = load i32, i32* %226
%228 = call signext i8 @COLOR_PAIR(i32 %227)
%229 = sext i8 %228 to i32
%230 = or i32 111, %229
%231 = load i8, i8* @A_BOLD
%232 = sext i8 %231 to i32
%233 = or i32 %230, %232
%234 = trunc i32 %233 to i8
%235 = call i32 @mvaddch(i32 18, i32 21, i8 signext %234)
%236 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 8
%237 = load i32, i32* %236
%238 = add nsw i32 %237, 1
%239 = srem i32 %238, 7
%240 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 8
store i32 %239, i32* %240
%241 = call i32 (...) @xmas()
%242 = call signext i8 @COLOR_PAIR(i32 7)
%243 = sext i8 %242 to i32
%244 = load i8, i8* @A_NORMAL
%245 = sext i8 %244 to i32
%246 = or i32 %243, %245
%247 = trunc i32 %246 to i8
%248 = call i32 @attron(i8 signext %247)
%249 = call i32 @mvprintw(i32 23, i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%250 = call i32 @mvprintw(i32 23, i32 50, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%251 = call i32 (...) @refresh()
%252 = call i32 @napms(i32 1000)
%253 = call i32 (...) @getch()
%254 = icmp eq i32 %253, 27
br i1 %254, label %255, label %256
255: ; preds = %48
br label %257
256: ; preds = %48
br label %48
257: ; preds = %255
%258 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
@COLOR_GREEN = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_RED = global i32 0
@COLOR_YELLOW = global i32 0
@COLOR_BLUE = global i32 0
@COLOR_CYAN = global i32 0
@COLOR_MAGENTA = global i32 0
@COLOR_WHITE = global i32 0
@A_NORMAL = global i8 0
@.str = [18 x i8] c"Press ESC to exit\00"
@.str.1 = [13 x i8] c"by David ;-)\00"
@A_BOLD = global i8 0
@__const.main.balls_color = [7 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7]
@.str.2 = [14 x i8] c" .\0A\00"
@.str.3 = [16 x i8] c" _.+,_\0A\00"
@.str.4 = [15 x i8] c" '+`\0A\00"
@.str.5 = [15 x i8] c" / \\\0A\00"
@.str.6 = [16 x i8] c" /`,o\\\0A\00"
@.str.7 = [17 x i8] c" /_* ~_\\\0A\00"
@.str.8 = [17 x i8] c" / o .'\\\0A\00"
@.str.9 = [18 x i8] c" /_,~' *_\\\0A\00"
@.str.10 = [18 x i8] c" /`. * *\\\0A\00"
@.str.11 = [19 x i8] c" / `~. o \\\0A\00"
@.str.12 = [20 x i8] c" /_ * `~,_\\\0A\00"
@.str.13 = [20 x i8] c" / o * ~'\\\0A\00"
@.str.14 = [21 x i8] c" / * .~~' o\\\0A\00"
@.str.15 = [22 x i8] c" /_,.~~'` * _\\\0A\00"
@.str.16 = [22 x i8] c" /`~.. o \\\0A\00"
@.str.17 = [23 x i8] c" / * `'~.. * \\\0A\00"
@.str.18 = [24 x i8] c" /_ o ``~~.,,_\\\0A\00"
@.str.19 = [24 x i8] c" / * * ..~'\\\0A\00"
@.str.20 = [25 x i8] c"/* o _..~~`'* o\\\0A\00"
@.str.21 = [25 x i8] c"`+.__.~'`' * ___.+'\0A\00"
@.str.22 = [19 x i8] c" \22:+-----+:\22\0A\00"
@.str.23 = [17 x i8] c" hjw \\_____/\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @start_color()
%3 = tail call i32 @curs_set(i32 0)
%4 = tail call i32 @timeout(i32 0)
%5 = load i32, i32* @COLOR_GREEN
%6 = load i32, i32* @COLOR_BLACK
%7 = tail call i32 @init_pair(i32 1, i32 %5, i32 %6)
%8 = load i32, i32* @COLOR_RED
%9 = load i32, i32* @COLOR_BLACK
%10 = tail call i32 @init_pair(i32 2, i32 %8, i32 %9)
%11 = load i32, i32* @COLOR_YELLOW
%12 = load i32, i32* @COLOR_BLACK
%13 = tail call i32 @init_pair(i32 3, i32 %11, i32 %12)
%14 = load i32, i32* @COLOR_BLUE
%15 = load i32, i32* @COLOR_BLACK
%16 = tail call i32 @init_pair(i32 4, i32 %14, i32 %15)
%17 = load i32, i32* @COLOR_CYAN
%18 = load i32, i32* @COLOR_BLACK
%19 = tail call i32 @init_pair(i32 5, i32 %17, i32 %18)
%20 = load i32, i32* @COLOR_MAGENTA
%21 = load i32, i32* @COLOR_BLACK
%22 = tail call i32 @init_pair(i32 6, i32 %20, i32 %21)
%23 = load i32, i32* @COLOR_WHITE
%24 = load i32, i32* @COLOR_BLACK
%25 = tail call i32 @init_pair(i32 7, i32 %23, i32 %24)
%26 = tail call signext i8 @COLOR_PAIR(i32 7)
%27 = load i8, i8* @A_NORMAL
%28 = or i8 %27, %26
%29 = tail call i32 @attron(i8 signext %28)
%30 = tail call i32 @mvprintw(i32 23, i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%31 = tail call i32 @mvprintw(i32 23, i32 50, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%32 = tail call i32 (...) @refresh()
%33 = tail call signext i8 @COLOR_PAIR(i32 1)
%34 = load i8, i8* @A_BOLD
%35 = or i8 %34, %33
%36 = tail call i32 @attron(i8 signext %35)
br label %37
37: ; preds = %37, %0
%38 = phi i32 [ 6, %0 ], [ %163, %37 ]
%39 = phi i32 [ 0, %0 ], [ %153, %37 ]
%40 = phi i32 [ 3, %0 ], [ %143, %37 ]
%41 = phi i32 [ 1, %0 ], [ %133, %37 ]
%42 = phi i32 [ 2, %0 ], [ %123, %37 ]
%43 = phi i32 [ 5, %0 ], [ %113, %37 ]
%44 = phi i32 [ 6, %0 ], [ %103, %37 ]
%45 = phi i32 [ 4, %0 ], [ %93, %37 ]
%46 = phi i32 [ 0, %0 ], [ %83, %37 ]
%47 = tail call i32 @move(i32 0, i32 0)
%48 = tail call signext i8 @COLOR_PAIR(i32 1)
%49 = load i8, i8* @A_BOLD
%50 = or i8 %49, %48
%51 = tail call i32 @attron(i8 signext %50)
%52 = tail call i32 @printw(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%53 = tail call i32 @printw(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%54 = tail call i32 @printw(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%55 = tail call i32 @printw(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
%56 = tail call i32 @printw(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%57 = tail call i32 @printw(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%58 = tail call i32 @printw(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%59 = tail call i32 @printw(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
%60 = tail call i32 @printw(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
%61 = tail call i32 @printw(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0))
%62 = tail call i32 @printw(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%63 = tail call i32 @printw(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%64 = tail call i32 @printw(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0))
%65 = tail call i32 @printw(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.15, i64 0, i64 0))
%66 = tail call i32 @printw(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.16, i64 0, i64 0))
%67 = tail call i32 @printw(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0))
%68 = tail call i32 @printw(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.18, i64 0, i64 0))
%69 = tail call i32 @printw(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.19, i64 0, i64 0))
%70 = tail call i32 @printw(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.20, i64 0, i64 0))
%71 = tail call i32 @printw(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.21, i64 0, i64 0))
%72 = tail call i32 @printw(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.22, i64 0, i64 0))
%73 = tail call i32 @printw(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0))
%74 = sext i32 %46 to i64
%75 = getelementptr inbounds [7 x i32], [7 x i32]* @__const.main.balls_color, i64 0, i64 %74
%76 = load i32, i32* %75
%77 = tail call signext i8 @COLOR_PAIR(i32 %76)
%78 = load i8, i8* @A_BOLD
%79 = or i8 %77, %78
%80 = or i8 %79, 111
%81 = tail call i32 @mvaddch(i32 4, i32 12, i8 signext %80)
%82 = add nsw i32 %46, 1
%83 = srem i32 %82, 7
%84 = sext i32 %45 to i64
%85 = getelementptr inbounds [7 x i32], [7 x i32]* @__const.main.balls_color, i64 0, i64 %84
%86 = load i32, i32* %85
%87 = tail call signext i8 @COLOR_PAIR(i32 %86)
%88 = load i8, i8* @A_BOLD
%89 = or i8 %87, %88
%90 = or i8 %89, 111
%91 = tail call i32 @mvaddch(i32 6, i32 10, i8 signext %90)
%92 = add nsw i32 %45, 1
%93 = srem i32 %92, 7
%94 = zext i32 %44 to i64
%95 = getelementptr inbounds [7 x i32], [7 x i32]* @__const.main.balls_color, i64 0, i64 %94
%96 = load i32, i32* %95
%97 = tail call signext i8 @COLOR_PAIR(i32 %96)
%98 = load i8, i8* @A_BOLD
%99 = or i8 %97, %98
%100 = or i8 %99, 111
%101 = tail call i32 @mvaddch(i32 9, i32 14, i8 signext %100)
%102 = add nsw i32 %44, 1
%103 = srem i32 %102, 7
%104 = zext i32 %43 to i64
%105 = getelementptr inbounds [7 x i32], [7 x i32]* @__const.main.balls_color, i64 0, i64 %104
%106 = load i32, i32* %105
%107 = tail call signext i8 @COLOR_PAIR(i32 %106)
%108 = load i8, i8* @A_BOLD
%109 = or i8 %107, %108
%110 = or i8 %109, 111
%111 = tail call i32 @mvaddch(i32 11, i32 9, i8 signext %110)
%112 = add nsw i32 %43, 1
%113 = srem i32 %112, 7
%114 = sext i32 %42 to i64
%115 = getelementptr inbounds [7 x i32], [7 x i32]* @__const.main.balls_color, i64 0, i64 %114
%116 = load i32, i32* %115
%117 = tail call signext i8 @COLOR_PAIR(i32 %116)
%118 = load i8, i8* @A_BOLD
%119 = or i8 %117, %118
%120 = or i8 %119, 111
%121 = tail call i32 @mvaddch(i32 12, i32 17, i8 signext %120)
%122 = add nsw i32 %42, 1
%123 = srem i32 %122, 7
%124 = sext i32 %41 to i64
%125 = getelementptr inbounds [7 x i32], [7 x i32]* @__const.main.balls_color, i64 0, i64 %124
%126 = load i32, i32* %125
%127 = tail call signext i8 @COLOR_PAIR(i32 %126)
%128 = load i8, i8* @A_BOLD
%129 = or i8 %127, %128
%130 = or i8 %129, 111
%131 = tail call i32 @mvaddch(i32 14, i32 10, i8 signext %130)
%132 = add nsw i32 %41, 1
%133 = srem i32 %132, 7
%134 = sext i32 %40 to i64
%135 = getelementptr inbounds [7 x i32], [7 x i32]* @__const.main.balls_color, i64 0, i64 %134
%136 = load i32, i32* %135
%137 = tail call signext i8 @COLOR_PAIR(i32 %136)
%138 = load i8, i8* @A_BOLD
%139 = or i8 %137, %138
%140 = or i8 %139, 111
%141 = tail call i32 @mvaddch(i32 16, i32 8, i8 signext %140)
%142 = add nsw i32 %40, 1
%143 = srem i32 %142, 7
%144 = sext i32 %39 to i64
%145 = getelementptr inbounds [7 x i32], [7 x i32]* @__const.main.balls_color, i64 0, i64 %144
%146 = load i32, i32* %145
%147 = tail call signext i8 @COLOR_PAIR(i32 %146)
%148 = load i8, i8* @A_BOLD
%149 = or i8 %147, %148
%150 = or i8 %149, 111
%151 = tail call i32 @mvaddch(i32 18, i32 6, i8 signext %150)
%152 = add nsw i32 %39, 1
%153 = srem i32 %152, 7
%154 = zext i32 %38 to i64
%155 = getelementptr inbounds [7 x i32], [7 x i32]* @__const.main.balls_color, i64 0, i64 %154
%156 = load i32, i32* %155
%157 = tail call signext i8 @COLOR_PAIR(i32 %156)
%158 = load i8, i8* @A_BOLD
%159 = or i8 %157, %158
%160 = or i8 %159, 111
%161 = tail call i32 @mvaddch(i32 18, i32 21, i8 signext %160)
%162 = add nsw i32 %38, 1
%163 = srem i32 %162, 7
%164 = tail call i32 (...) @xmas()
%165 = tail call signext i8 @COLOR_PAIR(i32 7)
%166 = load i8, i8* @A_NORMAL
%167 = or i8 %166, %165
%168 = tail call i32 @attron(i8 signext %167)
%169 = tail call i32 @mvprintw(i32 23, i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%170 = tail call i32 @mvprintw(i32 23, i32 50, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%171 = tail call i32 (...) @refresh()
%172 = tail call i32 @napms(i32 1000)
%173 = tail call i32 (...) @getch()
%174 = icmp eq i32 %173, 27
br i1 %174, label %175, label %37
175: ; preds = %37
%176 = tail call i32 (...) @endwin()
ret i32 0
}