// File: /workspace/github_c_makefile_star2_O0/skeeto[P]flappy/flappy.cc
// Function: Game::run()
int run() {
    display->erase();
    const char *title = "Flappy Curses", *version = "v" STR(VERSION),
               *intro = "[Press SPACE to hop upwards]",
                 *url = "https://github.com/skeeto/flappy";
    display->center(-3, title);
    display->center(-2, version);
    display->center(2, intro);
    init_pair(6, COLOR_CYAN, COLOR_BLACK);
    attron(COLOR_PAIR(6) | A_UNDERLINE);
    display->center(10, url);
    attroff(COLOR_PAIR(6) | A_UNDERLINE);
    bird.draw();
    if (is_exit(display->block_getch())) return -1;
    while (bird.is_alive(world)) {
      int c = getch();
      if (is_exit(c)) {
        return -1;
      } else if (c != ERR) {
        while (getch() != ERR)
          ;  // clear repeat buffer
        bird.poke();
      }
      display->erase();
      world.step();
      world.draw();
      bird.gravity();
      bird.draw();
      display->refresh();
      std::this_thread::sleep_for(std::chrono::milliseconds{67});
    }
    init_pair(5, COLOR_RED, COLOR_BLACK);
    attron(COLOR_PAIR(5) | A_BOLD);
    bird.draw('X');
    attroff(COLOR_PAIR(5) | A_BOLD);
    display->refresh();
    return world.score();
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq (%rax), %rdi
callq 0x8300
movq -0x50(%rbp), %rax
leaq 0x8c33d(%rip), %rcx     # 0x940e4
movq %rcx, -0x18(%rbp)
leaq 0x8c340(%rip), %rcx     # 0x940f2
movq %rcx, -0x20(%rbp)
leaq 0x8c33e(%rip), %rcx     # 0x940fb
movq %rcx, -0x28(%rbp)
leaq 0x8c350(%rip), %rcx     # 0x94118
movq %rcx, -0x30(%rbp)
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x9a00
movq -0x50(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x9a00
movq -0x50(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rdx
movl $0x2, %esi
callq 0x9a00
movl $0x6, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x7050
movq 0xaa1c4(%rip), %rax     # 0xb1fe0
movq (%rax), %rdi
movl $0x20600, %esi          # imm = 0x20600
xorl %eax, %eax
movl %eax, %edx
callq 0x7180
movq -0x50(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rdx
movl $0xa, %esi
callq 0x9a00
movq 0xaa197(%rip), %rax     # 0xb1fe0
movq (%rax), %rdi
movl $0x20600, %esi          # imm = 0x20600
xorl %eax, %eax
movl %eax, %edx
callq 0x73c0
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
callq 0x9a80
movq -0x50(%rbp), %rax
movq (%rax), %rdi
callq 0x8240
movl %eax, %edi
callq 0x7620
testb $0x1, %al
jne 0x7e80
jmp 0x7e8c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7fe1
jmp 0x7e8e
movq -0x50(%rbp), %rsi
movq %rsi, %rdi
addq $0x8, %rdi
addq $0x20, %rsi
callq 0x9af0
testb $0x1, %al
jne 0x7eab
jmp 0x7f72
movq 0xaa12e(%rip), %rax     # 0xb1fe0
movq (%rax), %rdi
callq 0x70f0
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %edi
callq 0x7620
testb $0x1, %al
jne 0x7ecb
jmp 0x7ed7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7fe1
cmpl $-0x1, -0x34(%rbp)
je 0x7f02
jmp 0x7edf
movq 0xaa0fa(%rip), %rax     # 0xb1fe0
movq (%rax), %rdi
callq 0x70f0
cmpl $-0x1, %eax
je 0x7ef5
jmp 0x7edf
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
callq 0x9bb0
jmp 0x7f04
movq -0x50(%rbp), %rax
movq (%rax), %rdi
callq 0x8300
movq -0x50(%rbp), %rdi
addq $0x20, %rdi
callq 0x9bd0
movq -0x50(%rbp), %rdi
addq $0x20, %rdi
callq 0x9ca0
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
callq 0x9ef0
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
callq 0x9a80
movq -0x50(%rbp), %rax
movq (%rax), %rdi
callq 0x9f20
movl $0x43, -0x44(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x44(%rbp), %rsi
callq 0x9ff0
leaq -0x40(%rbp), %rdi
callq 0x9f40
jmp 0x7e8e
movl $0x5, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7050
movq 0xaa056(%rip), %rax     # 0xb1fe0
movq (%rax), %rdi
movl $0x200500, %esi         # imm = 0x200500
xorl %eax, %eax
movl %eax, %edx
callq 0x7180
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
movl $0x58, %esi
callq 0xa010
movq 0xaa02c(%rip), %rax     # 0xb1fe0
movq (%rax), %rdi
movl $0x200500, %esi         # imm = 0x200500
xorl %eax, %eax
movl %eax, %edx
callq 0x73c0
movq -0x50(%rbp), %rax
movq (%rax), %rdi
callq 0x9f20
movq -0x50(%rbp), %rdi
addq $0x20, %rdi
callq 0xa0c0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)