// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x5a49(%rip), %r15      # 0xbfd0
movq (%r15), %rdi
xorl %esi, %esi
callq 0x31b0
cmpl $0x3, 0x14(%rbx)
jne 0x65ef
andw $0x0, -0x1c(%rbp)
movb $0x0, -0x1a(%rbp)
cmpb $0x1, 0x18(%rbx)
jne 0x663e
leaq 0x1f2d(%rip), %rsi      # 0x84de
leaq 0x1f45(%rip), %rdx      # 0x84fd
callq 0x7548
movq (%r15), %rdi
callq 0x3100
movl %eax, %ecx
andb $-0x21, %cl
cmpb $0x4e, %cl
je 0x6709
andl $0xdf, %eax
cmpl $0x59, %eax
jne 0x65bd
movb $0x0, -0x1a(%rbp)
movw $0x5952, -0x1c(%rbp)    # imm = 0x5952
movb $0x1, %r14b
jmp 0x6716
leaq 0x1ee8(%rip), %rsi      # 0x84de
leaq 0x1f00(%rip), %rdx      # 0x84fd
callq 0x7548
movabsq $0x80100000801, %rbx    # imm = 0x80100000801
movq (%r15), %rdi
callq 0x3100
movl %eax, %ecx
andl $-0x21, %ecx
cmpl $0x59, %ecx
sete %dl
cmpl $0x4e, %ecx
setne %cl
andb %cl, %r14b
orb %dl, %r14b
addl $-0x4e, %eax
cmpl $0x2b, %eax
ja 0x660c
btq %rax, %rbx
jae 0x660c
jmp 0x67e2
leaq 0x1e99(%rip), %rsi      # 0x84de
leaq 0x1ed6(%rip), %rdx      # 0x8522
callq 0x7548
movq 0x48(%rbx), %rdi
leaq -0x40(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
leaq -0x1c(%rbp), %rsi
callq *0x28(%rax)
testb %al, %al
je 0x67fb
cmpb $0x52, -0x1c(%rbp)
jne 0x6893
movzbl -0x1b(%rbp), %eax
cmpl $0x4e, %eax
je 0x67b6
cmpl $0x59, %eax
jne 0x692b
leaq -0x1c(%rbp), %rsi
movb $0x0, 0x2(%rsi)
movw $0x4b4f, (%rsi)         # imm = 0x4B4F
movq 0x48(%rbx), %rdi
leaq -0x40(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
callq *0x20(%rax)
movb $0x1, %r14b
testb %al, %al
jne 0x67e2
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0x1d0c(%rip), %rsi      # 0x83db
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x369c
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x361a
xorl %r15d, %r15d
leaq 0x5683(%rip), %rsi      # 0xbd78
leaq 0x1652(%rip), %rdx      # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x69bb
movb $0x0, -0x1a(%rbp)
movw $0x4e52, -0x1c(%rbp)    # imm = 0x4E52
xorl %r14d, %r14d
movq 0x48(%rbx), %rdi
leaq -0x40(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
leaq -0x1c(%rbp), %rsi
callq *0x20(%rax)
testb %al, %al
je 0x6847
leaq -0x1c(%rbp), %rsi
movb $0x0, 0x2(%rsi)
andw $0x0, (%rsi)
movq 0x48(%rbx), %rdi
leaq -0x40(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
callq *0x28(%rax)
testb %al, %al
je 0x68df
cmpb $0x4f, -0x1c(%rbp)
jne 0x676a
cmpb $0x4b, -0x1b(%rbp)
je 0x67e2
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0x1c5f(%rip), %rsi      # 0x83db
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x369c
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x361a
xorl %r15d, %r15d
leaq 0x55d6(%rip), %rsi      # 0xbd78
leaq 0x15a5(%rip), %rdx      # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x69bb
leaq -0x1c(%rbp), %rsi
movb $0x0, 0x2(%rsi)
movw $0x4b4f, (%rsi)         # imm = 0x4B4F
movq 0x48(%rbx), %rdi
leaq -0x40(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
je 0x6974
xorl %r14d, %r14d
movq (%r15), %rdi
pushq $0x1
popq %rsi
callq 0x31b0
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0x1bce(%rip), %rsi      # 0x83db
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x369c
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x361a
xorl %r15d, %r15d
leaq 0x5545(%rip), %rsi      # 0xbd78
leaq 0x1514(%rip), %rdx      # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x69bb
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0x1b82(%rip), %rsi      # 0x83db
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x369c
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x361a
xorl %r15d, %r15d
leaq 0x54f9(%rip), %rsi      # 0xbd78
leaq 0x14c8(%rip), %rdx      # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x69bb
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0x1b36(%rip), %rsi      # 0x83db
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x369c
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x361a
xorl %r15d, %r15d
leaq 0x54ad(%rip), %rsi      # 0xbd78
leaq 0x147c(%rip), %rdx      # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x69bb
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0x1aea(%rip), %rsi      # 0x83db
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x369c
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x361a
xorl %r15d, %r15d
leaq 0x5461(%rip), %rsi      # 0xbd78
leaq 0x1430(%rip), %rdx      # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x69bb
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0x1a9e(%rip), %rsi      # 0x83db
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x369c
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x361a
xorl %r15d, %r15d
leaq 0x5415(%rip), %rsi      # 0xbd78
leaq 0x13e4(%rip), %rdx      # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x69bb
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0x1a55(%rip), %rsi      # 0x83db
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x369c
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x361a
xorl %r15d, %r15d
leaq 0x53cc(%rip), %rsi      # 0xbd78
leaq 0x139b(%rip), %rdx      # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x69d7
jmp 0x69ea
jmp 0x69d7
jmp 0x69ea
jmp 0x69d7
jmp 0x69ea
jmp 0x69d7
jmp 0x69ea
jmp 0x69d7
jmp 0x69ea
jmp 0x69d7
jmp 0x69ea
jmp 0x69d7
jmp 0x69ea
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x3150
testb %r15b, %r15b
jne 0x69ed
jmp 0x69f5
movq %rax, %r14
movq %rbx, %rdi
callq 0x31f0
movq %r14, %rdi
callq 0x3420
nop