// File: matallui[P]nibble-curses/src/CNibbles.cpp
// Function: CNibbles::PresentLevel()
void CNibbles::PresentLevel ( void )
{
  bkgd ( COLOR_PAIR (1) );
  attrset ( COLOR_PAIR(2) );
  for ( int j = 0; j < m_maxCols; j++ )
  {
    mvaddch ( 0, j, '*' );
    mvaddch ( m_maxLines-1, j, '*' );
  }
  for ( int i = 0; i < m_maxLines; i++ )
  {
    mvaddch ( i, 0, '*' );
    mvaddch ( i, m_maxCols-1, '*' );
  }
  
  attrset ( COLOR_PAIR(3) );
  move ( 15, 39 );
  attron ( A_BOLD );
  printw ( "LEVEL %d / 10", m_level );
  attroff ( A_BOLD );
  if ( m_mode == 3 )
  {
    char buffer[3];
    bzero ( buffer, 3 );
    if (  (m_master && m_snakes[0]->getLives() ) || ( !m_master && !m_snakes[0]->getLives() ) )
    {
      move ( 19, 32 );
      printw ( "* Press SPACE to continue... *" );
      refresh();
      nodelay( stdscr, false );
      while ( getch() != ' ' );
      nodelay( stdscr, true );
      sprintf ( buffer, "GO" );
      if ( ! m_socket->Send ( buffer, 3 ) )		throw CException( "Problems with communication." );
      bzero ( buffer, 3 );
      if ( ! m_socket->Recv ( buffer, 3 ) )		throw CException( "Problems with communication." );
      if ( buffer[0] != 'O' || buffer[1] != 'K' )	throw CException( "Problems with communication." );
    }
    else
    {
      move ( 21, 32 );
      printw ( "* Waiting for answer... *" );
      refresh();
      if ( ! m_socket->Recv ( buffer, 3 ) )		throw CException( "Problems with communication." );
      if ( buffer[0] !='G' || buffer[1] != 'O' )	throw CException( "Problems with communication." );
      sprintf ( buffer, "OK" );
      if ( ! m_socket->Send ( buffer, 3 ) )		throw CException( "Problems with communication." );
    }
    flushinp();
  }
  else
  {
    move ( 19, 32 );
    printw ( "* Press SPACE to continue... *" );
    refresh();
    nodelay( stdscr, false );
    while ( getch() != ' ' );
    nodelay( stdscr, true );
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x128(%rbp)
movq 0x5b9f(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x34b0
movq 0x5b8b(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x3330
movl $0x0, -0xc(%rbp)
movq -0x128(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0xa4de
movq 0x5b61(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
xorl %esi, %esi
callq 0x3300
cmpl $-0x1, %eax
jne 0xa483
jmp 0xa497
movq 0x5b46(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x2a, %esi
callq 0x30e0
movq -0x128(%rbp), %rax
movq 0x5b2b(%rip), %rcx      # 0xffd0
movq (%rcx), %rdi
movl (%rax), %esi
subl $0x1, %esi
movl -0xc(%rbp), %edx
callq 0x3300
cmpl $-0x1, %eax
jne 0xa4bc
jmp 0xa4d0
movq 0x5b0d(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x2a, %esi
callq 0x30e0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa459
movl $0x0, -0x10(%rbp)
movq -0x128(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl (%rcx), %eax
jge 0xa56a
movq 0x5ad6(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl -0x10(%rbp), %esi
xorl %edx, %edx
callq 0x3300
cmpl $-0x1, %eax
jne 0xa50e
jmp 0xa522
movq 0x5abb(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x2a, %esi
callq 0x30e0
movq -0x128(%rbp), %rax
movq 0x5aa0(%rip), %rcx      # 0xffd0
movq (%rcx), %rdi
movl -0x10(%rbp), %esi
movl 0x4(%rax), %edx
subl $0x1, %edx
callq 0x3300
cmpl $-0x1, %eax
jne 0xa548
jmp 0xa55c
movq 0x5a81(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x2a, %esi
callq 0x30e0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xa4e5
movq 0x5a5f(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x300, %esi            # imm = 0x300
callq 0x3330
movl $0xf, %edi
movl $0x27, %esi
callq 0x3200
movq 0x5a3c(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x3190
movq -0x128(%rbp), %rax
movl 0x8(%rax), %esi
leaq 0x1f82(%rip), %rdi      # 0xc538
movb $0x0, %al
callq 0x32e0
movq 0x5a0c(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x33f0
movq -0x128(%rbp), %rax
cmpl $0x3, 0x14(%rax)
jne 0xac9a
leaq -0x13(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x31b0
movq -0x128(%rbp), %rax
testb $0x1, 0x18(%rax)
je 0xa61b
movq -0x128(%rbp), %rax
movq 0x30(%rax), %rax
movq (%rax), %rdi
callq 0x45a0
cmpl $0x0, %eax
jne 0xa648
movq -0x128(%rbp), %rax
testb $0x1, 0x18(%rax)
jne 0xa978
movq -0x128(%rbp), %rax
movq 0x30(%rax), %rax
movq (%rax), %rdi
callq 0x45a0
cmpl $0x0, %eax
jne 0xa978
movl $0x13, %edi
movl $0x20, %esi
callq 0x3200
leaq 0x1ee8(%rip), %rdi      # 0xc546
movb $0x0, %al
callq 0x32e0
callq 0x34c0
movq 0x595f(%rip), %rax      # 0xffd0
movq (%rax), %rdi
xorl %esi, %esi
callq 0x31c0
movq 0x594e(%rip), %rax      # 0xffd0
movq (%rax), %rdi
callq 0x3130
cmpl $0x20, %eax
je 0xa691
jmp 0xa67b
movq 0x5938(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x31c0
leaq -0x13(%rbp), %rdi
leaq 0x1eb5(%rip), %rsi      # 0xc565
movb $0x0, %al
callq 0x3090
movq -0x128(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0x13(%rbp), %rsi
movl $0x3, -0x18(%rbp)
movq (%rdi), %rax
leaq -0x18(%rbp), %rdx
callq *0x20(%rax)
xorb $-0x1, %al
testb $0x1, %al
jne 0xa6e2
jmp 0xa79a
movb $0x1, -0x4d(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x138(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x34f0
movq -0x130(%rbp), %rdx
leaq 0x1e06(%rip), %rsi      # 0xc51b
leaq -0x38(%rbp), %rdi
callq 0x3880
jmp 0xa720
movq -0x138(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3770
jmp 0xa732
movq -0x138(%rbp), %rdi
movb $0x0, -0x4d(%rbp)
leaq 0x562c(%rip), %rsi      # 0xfd70
leaq 0x14e5(%rip), %rdx      # 0xbc30
callq 0x34d0
jmp 0xad09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xa778
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x31d0
leaq -0x39(%rbp), %rdi
callq 0x3340
testb $0x1, -0x4d(%rbp)
jne 0xa789
jmp 0xa795
movq -0x138(%rbp), %rdi
callq 0x3220
jmp 0xad00
leaq -0x13(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x31b0
movq -0x128(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0x13(%rbp), %rsi
movl $0x3, -0x54(%rbp)
movq (%rdi), %rax
leaq -0x54(%rbp), %rdx
callq *0x28(%rax)
xorb $-0x1, %al
testb $0x1, %al
jne 0xa7d5
jmp 0xa88d
movb $0x1, -0x7a(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x148(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x34f0
movq -0x140(%rbp), %rdx
leaq 0x1d13(%rip), %rsi      # 0xc51b
leaq -0x78(%rbp), %rdi
callq 0x3880
jmp 0xa813
movq -0x148(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x3770
jmp 0xa825
movq -0x148(%rbp), %rdi
movb $0x0, -0x7a(%rbp)
leaq 0x5539(%rip), %rsi      # 0xfd70
leaq 0x13f2(%rip), %rdx      # 0xbc30
callq 0x34d0
jmp 0xad09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xa86b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x31d0
leaq -0x79(%rbp), %rdi
callq 0x3340
testb $0x1, -0x7a(%rbp)
jne 0xa87c
jmp 0xa888
movq -0x148(%rbp), %rdi
callq 0x3220
jmp 0xad00
movsbl -0x13(%rbp), %eax
cmpl $0x4f, %eax
jne 0xa8a3
movsbl -0x12(%rbp), %eax
cmpl $0x4b, %eax
je 0xa973
movb $0x1, -0xa2(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x158(%rbp)
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x34f0
movq -0x150(%rbp), %rdx
leaq 0x1c3f(%rip), %rsi      # 0xc51b
leaq -0xa0(%rbp), %rdi
callq 0x3880
jmp 0xa8ea
movq -0x158(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x3770
jmp 0xa8ff
movq -0x158(%rbp), %rdi
movb $0x0, -0xa2(%rbp)
leaq 0x545c(%rip), %rsi      # 0xfd70
leaq 0x1315(%rip), %rdx      # 0xbc30
callq 0x34d0
jmp 0xad09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xa94b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x31d0
leaq -0xa1(%rbp), %rdi
callq 0x3340
testb $0x1, -0xa2(%rbp)
jne 0xa962
jmp 0xa96e
movq -0x158(%rbp), %rdi
callq 0x3220
jmp 0xad00
jmp 0xac93
movl $0x15, %edi
movl $0x20, %esi
callq 0x3200
leaq 0x1bda(%rip), %rdi      # 0xc568
movb $0x0, %al
callq 0x32e0
callq 0x34c0
movq -0x128(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0x13(%rbp), %rsi
movl $0x3, -0xa8(%rbp)
movq (%rdi), %rax
leaq -0xa8(%rbp), %rdx
callq *0x28(%rax)
xorb $-0x1, %al
testb $0x1, %al
jne 0xa9cb
jmp 0xaa9b
movb $0x1, -0xca(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x168(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x34f0
movq -0x160(%rbp), %rdx
leaq 0x1b17(%rip), %rsi      # 0xc51b
leaq -0xc8(%rbp), %rdi
callq 0x3880
jmp 0xaa12
movq -0x168(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x3770
jmp 0xaa27
movq -0x168(%rbp), %rdi
movb $0x0, -0xca(%rbp)
leaq 0x5334(%rip), %rsi      # 0xfd70
leaq 0x11ed(%rip), %rdx      # 0xbc30
callq 0x34d0
jmp 0xad09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xaa73
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x31d0
leaq -0xc9(%rbp), %rdi
callq 0x3340
testb $0x1, -0xca(%rbp)
jne 0xaa8a
jmp 0xaa96
movq -0x168(%rbp), %rdi
callq 0x3220
jmp 0xad00
movsbl -0x13(%rbp), %eax
cmpl $0x47, %eax
jne 0xaab1
movsbl -0x12(%rbp), %eax
cmpl $0x4f, %eax
je 0xab81
movb $0x1, -0xf2(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x178(%rbp)
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x34f0
movq -0x170(%rbp), %rdx
leaq 0x1a31(%rip), %rsi      # 0xc51b
leaq -0xf0(%rbp), %rdi
callq 0x3880
jmp 0xaaf8
movq -0x178(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x3770
jmp 0xab0d
movq -0x178(%rbp), %rdi
movb $0x0, -0xf2(%rbp)
leaq 0x524e(%rip), %rsi      # 0xfd70
leaq 0x1107(%rip), %rdx      # 0xbc30
callq 0x34d0
jmp 0xad09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xab59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x31d0
leaq -0xf1(%rbp), %rdi
callq 0x3340
testb $0x1, -0xf2(%rbp)
jne 0xab70
jmp 0xab7c
movq -0x178(%rbp), %rdi
callq 0x3220
jmp 0xad00
leaq -0x13(%rbp), %rdi
leaq 0x16a2(%rip), %rsi      # 0xc22e
movb $0x0, %al
callq 0x3090
movq -0x128(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0x13(%rbp), %rsi
movl $0x3, -0xf8(%rbp)
movq (%rdi), %rax
leaq -0xf8(%rbp), %rdx
callq *0x20(%rax)
xorb $-0x1, %al
testb $0x1, %al
jne 0xabc4
jmp 0xac91
movb $0x1, -0x11a(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x188(%rbp)
leaq -0x119(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x34f0
movq -0x180(%rbp), %rdx
leaq 0x191e(%rip), %rsi      # 0xc51b
leaq -0x118(%rbp), %rdi
callq 0x3880
jmp 0xac0b
movq -0x188(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x3770
jmp 0xac20
movq -0x188(%rbp), %rdi
movb $0x0, -0x11a(%rbp)
leaq 0x513b(%rip), %rsi      # 0xfd70
leaq 0xff4(%rip), %rdx       # 0xbc30
callq 0x34d0
jmp 0xad09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xac6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x31d0
leaq -0x119(%rbp), %rdi
callq 0x3340
testb $0x1, -0x11a(%rbp)
jne 0xac83
jmp 0xac8f
movq -0x188(%rbp), %rdi
callq 0x3220
jmp 0xad00
jmp 0xac93
callq 0x3160
jmp 0xacf7
movl $0x13, %edi
movl $0x20, %esi
callq 0x3200
leaq 0x1896(%rip), %rdi      # 0xc546
movb $0x0, %al
callq 0x32e0
callq 0x34c0
movq 0x530d(%rip), %rax      # 0xffd0
movq (%rax), %rdi
xorl %esi, %esi
callq 0x31c0
movq 0x52fc(%rip), %rax      # 0xffd0
movq (%rax), %rdi
callq 0x3130
cmpl $0x20, %eax
je 0xace3
jmp 0xaccd
movq 0x52e6(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x31c0
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x34e0
nopl (%rax)