// File: matallui[P]nibble-curses/src/CNibbles.cpp
// Function: CNibbles::GameOver_Restart() const
bool CNibbles::GameOver_Restart ( void ) const
{
  bool restart;
  nodelay ( stdscr, false );
  
  if ( m_mode == 3 )
  {
    char buffer[3];
    bzero ( buffer, 3 );
    
    if ( m_master )
    {
      PopUp( (char*)"*          GAME OVER!        *", (char*)"*      Try again? [Y/N]      *" );
      while (1)
      {
	char key = getch ();
	if ( key == 'Y' || key == 'y' )
	{
	  sprintf ( buffer, "RY" );
	  restart = true;
	  break;
	}
	else if ( key == 'N' || key == 'n' )
	{
	  sprintf ( buffer, "RN" );
	  restart = false;
	  break;
	}
      }
      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
    {
      PopUp( (char*)"*          GAME OVER!        *", (char*)"*   waiting for answer...    *" );
      if ( ! m_socket->Recv ( buffer, 3 ) )	throw CException( "Problems with communication." );
      if ( buffer[0] != 'R' )			throw CException( "Problems with communication." );
      switch ( buffer[1] )
      {
	case 'Y':
	  restart = true;
	  sprintf ( buffer, "OK" );
	  if ( ! m_socket->Send ( buffer, 3 ) )	throw CException( "Problems with communication." );
	  break;
	case 'N':
	  restart = false;
	  sprintf ( buffer, "OK" );
	  if ( ! m_socket->Send ( buffer, 3 ) )	throw CException( "Problems with communication." );
	  break;
	default:
	  throw CException( "Problems with communication." );
      }
    }
  }
  else
  {
    PopUp( (char*)"*          GAME OVER!        *", (char*)"*      Try again? [Y/N]      *" );
    while (1)
    {
      int key = getch ();
      if ( key == 'Y' || key == 'y' )
      {
	restart = true;
	break;
      }
      else if ( key == 'N' || key == 'n' )
      {
	restart = false;
	break;
      }
    }
  }
  nodelay ( stdscr, true );
  return restart;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x178(%rbp)
movq 0x713f(%rip), %rax      # 0xffd0
movq (%rax), %rdi
xorl %esi, %esi
callq 0x31c0
movq -0x178(%rbp), %rax
cmpl $0x3, 0x14(%rax)
jne 0x973c
leaq -0xc(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x31b0
movq -0x178(%rbp), %rax
testb $0x1, 0x18(%rax)
je 0x9212
movq -0x178(%rbp), %rdi
leaq 0x3743(%rip), %rsi      # 0xc61e
leaq 0x375b(%rip), %rdx      # 0xc63d
callq 0xad10
movq 0x70e2(%rip), %rax      # 0xffd0
movq (%rax), %rdi
callq 0x3130
movb %al, -0xd(%rbp)
movsbl -0xd(%rbp), %eax
cmpl $0x59, %eax
je 0x8f0b
movsbl -0xd(%rbp), %eax
cmpl $0x79, %eax
jne 0x8f23
leaq -0xc(%rbp), %rdi
leaq 0x3746(%rip), %rsi      # 0xc65c
movb $0x0, %al
callq 0x3090
movb $0x1, -0x9(%rbp)
jmp 0x8f51
movsbl -0xd(%rbp), %eax
cmpl $0x4e, %eax
je 0x8f35
movsbl -0xd(%rbp), %eax
cmpl $0x6e, %eax
jne 0x8f4d
leaq -0xc(%rbp), %rdi
leaq 0x371f(%rip), %rsi      # 0xc65f
movb $0x0, %al
callq 0x3090
movb $0x0, -0x9(%rbp)
jmp 0x8f51
jmp 0x8f4f
jmp 0x8ee7
movq -0x178(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0xc(%rbp), %rsi
movl $0x3, -0x14(%rbp)
movq (%rdi), %rax
leaq -0x14(%rbp), %rdx
callq *0x20(%rax)
xorb $-0x1, %al
testb $0x1, %al
jne 0x8f7c
jmp 0x9034
movb $0x1, -0x4d(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x188(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x34f0
movq -0x180(%rbp), %rdx
leaq 0x356c(%rip), %rsi      # 0xc51b
leaq -0x38(%rbp), %rdi
callq 0x3880
jmp 0x8fba
movq -0x188(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3770
jmp 0x8fcc
movq -0x188(%rbp), %rdi
movb $0x0, -0x4d(%rbp)
leaq 0x6d92(%rip), %rsi      # 0xfd70
leaq 0x2c4b(%rip), %rdx      # 0xbc30
callq 0x34d0
jmp 0x97cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x9012
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 0x9023
jmp 0x902f
movq -0x188(%rbp), %rdi
callq 0x3220
jmp 0x97c3
leaq -0xc(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x31b0
movq -0x178(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0xc(%rbp), %rsi
movl $0x3, -0x54(%rbp)
movq (%rdi), %rax
leaq -0x54(%rbp), %rdx
callq *0x28(%rax)
xorb $-0x1, %al
testb $0x1, %al
jne 0x906f
jmp 0x9127
movb $0x1, -0x7a(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x198(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x34f0
movq -0x190(%rbp), %rdx
leaq 0x3479(%rip), %rsi      # 0xc51b
leaq -0x78(%rbp), %rdi
callq 0x3880
jmp 0x90ad
movq -0x198(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x3770
jmp 0x90bf
movq -0x198(%rbp), %rdi
movb $0x0, -0x7a(%rbp)
leaq 0x6c9f(%rip), %rsi      # 0xfd70
leaq 0x2b58(%rip), %rdx      # 0xbc30
callq 0x34d0
jmp 0x97cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x9105
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 0x9116
jmp 0x9122
movq -0x198(%rbp), %rdi
callq 0x3220
jmp 0x97c3
movsbl -0xc(%rbp), %eax
cmpl $0x4f, %eax
jne 0x913d
movsbl -0xb(%rbp), %eax
cmpl $0x4b, %eax
je 0x920d
movb $0x1, -0xa2(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x1a8(%rbp)
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x34f0
movq -0x1a0(%rbp), %rdx
leaq 0x33a5(%rip), %rsi      # 0xc51b
leaq -0xa0(%rbp), %rdi
callq 0x3880
jmp 0x9184
movq -0x1a8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x3770
jmp 0x9199
movq -0x1a8(%rbp), %rdi
movb $0x0, -0xa2(%rbp)
leaq 0x6bc2(%rip), %rsi      # 0xfd70
leaq 0x2a7b(%rip), %rdx      # 0xbc30
callq 0x34d0
jmp 0x97cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x91e5
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 0x91fc
jmp 0x9208
movq -0x1a8(%rbp), %rdi
callq 0x3220
jmp 0x97c3
jmp 0x973a
movq -0x178(%rbp), %rdi
leaq 0x33fe(%rip), %rsi      # 0xc61e
leaq 0x343b(%rip), %rdx      # 0xc662
callq 0xad10
movq -0x178(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0xc(%rbp), %rsi
movl $0x3, -0xa8(%rbp)
movq (%rdi), %rax
leaq -0xa8(%rbp), %rdx
callq *0x28(%rax)
xorb $-0x1, %al
testb $0x1, %al
jne 0x925d
jmp 0x932d
movb $0x1, -0xca(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x1b8(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x34f0
movq -0x1b0(%rbp), %rdx
leaq 0x3285(%rip), %rsi      # 0xc51b
leaq -0xc8(%rbp), %rdi
callq 0x3880
jmp 0x92a4
movq -0x1b8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x3770
jmp 0x92b9
movq -0x1b8(%rbp), %rdi
movb $0x0, -0xca(%rbp)
leaq 0x6aa2(%rip), %rsi      # 0xfd70
leaq 0x295b(%rip), %rdx      # 0xbc30
callq 0x34d0
jmp 0x97cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x9305
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 0x931c
jmp 0x9328
movq -0x1b8(%rbp), %rdi
callq 0x3220
jmp 0x97c3
movsbl -0xc(%rbp), %eax
cmpl $0x52, %eax
je 0x940a
movb $0x1, -0xf2(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x1c8(%rbp)
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x34f0
movq -0x1c0(%rbp), %rdx
leaq 0x31a8(%rip), %rsi      # 0xc51b
leaq -0xf0(%rbp), %rdi
callq 0x3880
jmp 0x9381
movq -0x1c8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x3770
jmp 0x9396
movq -0x1c8(%rbp), %rdi
movb $0x0, -0xf2(%rbp)
leaq 0x69c5(%rip), %rsi      # 0xfd70
leaq 0x287e(%rip), %rdx      # 0xbc30
callq 0x34d0
jmp 0x97cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x93e2
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 0x93f9
jmp 0x9405
movq -0x1c8(%rbp), %rdi
callq 0x3220
jmp 0x97c3
movsbl -0xb(%rbp), %eax
movl %eax, -0x1cc(%rbp)
subl $0x4e, %eax
je 0x954c
jmp 0x941f
movl -0x1cc(%rbp), %eax
subl $0x59, %eax
jne 0x9668
jmp 0x9430
movb $0x1, -0x9(%rbp)
leaq -0xc(%rbp), %rdi
leaq 0x2def(%rip), %rsi      # 0xc22e
movb $0x0, %al
callq 0x3090
movq -0x178(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0xc(%rbp), %rsi
movl $0x3, -0xf8(%rbp)
movq (%rdi), %rax
leaq -0xf8(%rbp), %rdx
callq *0x20(%rax)
xorb $-0x1, %al
testb $0x1, %al
jne 0x9477
jmp 0x9547
movb $0x1, -0x11a(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x1e0(%rbp)
leaq -0x119(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x34f0
movq -0x1d8(%rbp), %rdx
leaq 0x306b(%rip), %rsi      # 0xc51b
leaq -0x118(%rbp), %rdi
callq 0x3880
jmp 0x94be
movq -0x1e0(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x3770
jmp 0x94d3
movq -0x1e0(%rbp), %rdi
movb $0x0, -0x11a(%rbp)
leaq 0x6888(%rip), %rsi      # 0xfd70
leaq 0x2741(%rip), %rdx      # 0xbc30
callq 0x34d0
jmp 0x97cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x951f
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 0x9536
jmp 0x9542
movq -0x1e0(%rbp), %rdi
callq 0x3220
jmp 0x97c3
jmp 0x9738
movb $0x0, -0x9(%rbp)
leaq -0xc(%rbp), %rdi
leaq 0x2cd3(%rip), %rsi      # 0xc22e
movb $0x0, %al
callq 0x3090
movq -0x178(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0xc(%rbp), %rsi
movl $0x3, -0x120(%rbp)
movq (%rdi), %rax
leaq -0x120(%rbp), %rdx
callq *0x20(%rax)
xorb $-0x1, %al
testb $0x1, %al
jne 0x9593
jmp 0x9663
movb $0x1, -0x142(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x1f0(%rbp)
leaq -0x141(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x34f0
movq -0x1e8(%rbp), %rdx
leaq 0x2f4f(%rip), %rsi      # 0xc51b
leaq -0x140(%rbp), %rdi
callq 0x3880
jmp 0x95da
movq -0x1f0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x3770
jmp 0x95ef
movq -0x1f0(%rbp), %rdi
movb $0x0, -0x142(%rbp)
leaq 0x676c(%rip), %rsi      # 0xfd70
leaq 0x2625(%rip), %rdx      # 0xbc30
callq 0x34d0
jmp 0x97cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x963b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x31d0
leaq -0x141(%rbp), %rdi
callq 0x3340
testb $0x1, -0x142(%rbp)
jne 0x9652
jmp 0x965e
movq -0x1f0(%rbp), %rdi
callq 0x3220
jmp 0x97c3
jmp 0x9738
movb $0x1, -0x16a(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x200(%rbp)
leaq -0x169(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x34f0
movq -0x1f8(%rbp), %rdx
leaq 0x2e7a(%rip), %rsi      # 0xc51b
leaq -0x168(%rbp), %rdi
callq 0x3880
jmp 0x96af
movq -0x200(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x3770
jmp 0x96c4
movq -0x200(%rbp), %rdi
movb $0x0, -0x16a(%rbp)
leaq 0x6697(%rip), %rsi      # 0xfd70
leaq 0x2550(%rip), %rdx      # 0xbc30
callq 0x34d0
jmp 0x97cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x9710
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x31d0
leaq -0x169(%rbp), %rdi
callq 0x3340
testb $0x1, -0x16a(%rbp)
jne 0x9727
jmp 0x9733
movq -0x200(%rbp), %rdi
callq 0x3220
jmp 0x97c3
jmp 0x973a
jmp 0x97a1
movq -0x178(%rbp), %rdi
leaq 0x2ed4(%rip), %rsi      # 0xc61e
leaq 0x2eec(%rip), %rdx      # 0xc63d
callq 0xad10
movq 0x6873(%rip), %rax      # 0xffd0
movq (%rax), %rdi
callq 0x3130
movl %eax, -0x170(%rbp)
cmpl $0x59, -0x170(%rbp)
je 0x977d
cmpl $0x79, -0x170(%rbp)
jne 0x9783
movb $0x1, -0x9(%rbp)
jmp 0x979f
cmpl $0x4e, -0x170(%rbp)
je 0x9795
cmpl $0x6e, -0x170(%rbp)
jne 0x979b
movb $0x0, -0x9(%rbp)
jmp 0x979f
jmp 0x979d
jmp 0x9756
jmp 0x97a1
movq 0x6828(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x31c0
movb -0x9(%rbp), %al
andb $0x1, %al
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x34e0
nopl (%rax)