// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq 0x65e7(%rip), %r15      # 0xcfd0
movq (%r15), %rdi
xorl %esi, %esi
callq 0x3190
cmpl $0x3, 0x14(%rbx)
jne 0x6a52
movb $0x0, -0x22(%rbp)
movw $0x0, -0x24(%rbp)
cmpb $0x1, 0x18(%rbx)
jne 0x6aa1
leaq 0x2aca(%rip), %rsi      # 0x94de
leaq 0x2ae2(%rip), %rdx      # 0x94fd
callq 0x7b34
movq (%r15), %rdi
callq 0x3110
movl %eax, %ecx
andb $-0x21, %cl
cmpb $0x4e, %cl
je 0x6b79
andl $0xdf, %eax
cmpl $0x59, %eax
jne 0x6a20
movb $0x0, -0x22(%rbp)
movw $0x5952, -0x24(%rbp)    # imm = 0x5952
movb $0x1, %r14b
jmp 0x6b86
leaq 0x2a85(%rip), %rsi      # 0x94de
leaq 0x2a9d(%rip), %rdx      # 0x94fd
callq 0x7b34
movabsq $0x80100000801, %rbx    # imm = 0x80100000801
movq (%r15), %rdi
callq 0x3110
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 0x6a6f
btq %rax, %rbx
jae 0x6a6f
jmp 0x6c64
leaq 0x2a36(%rip), %rsi      # 0x94de
leaq 0x2a73(%rip), %rdx      # 0x9522
callq 0x7b34
movq 0x48(%rbx), %rdi
leaq -0x48(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
leaq -0x24(%rbp), %rsi
callq *0x28(%rax)
testb %al, %al
je 0x6c81
cmpb $0x52, -0x24(%rbp)
jne 0x6d33
movzbl -0x23(%rbp), %eax
cmpl $0x4e, %eax
je 0x6c38
cmpl $0x59, %eax
jne 0x6de5
leaq -0x24(%rbp), %rsi
movb $0x0, 0x2(%rsi)
movw $0x4b4f, (%rsi)         # imm = 0x4B4F
movq 0x48(%rbx), %rdi
leaq -0x48(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
callq *0x20(%rax)
movb $0x1, %r14b
testb %al, %al
jne 0x6c64
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x289f(%rip), %rsi      # 0x93db
leaq 0x28b4(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376e
movb $0x1, %r12b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r12d, %r12d
leaq 0x6213(%rip), %rsi      # 0xcd78
leaq 0x189c(%rip), %rdx      # 0x8408
movq %rbx, %rdi
callq 0x33f0
jmp 0x6e8f
movb $0x0, -0x22(%rbp)
movw $0x4e52, -0x24(%rbp)    # imm = 0x4E52
xorl %r14d, %r14d
movq 0x48(%rbx), %rdi
leaq -0x48(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
leaq -0x24(%rbp), %rsi
callq *0x20(%rax)
testb %al, %al
je 0x6cda
leaq -0x24(%rbp), %rsi
movb $0x0, 0x2(%rsi)
movw $0x0, (%rsi)
movq 0x48(%rbx), %rdi
leaq -0x48(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
callq *0x28(%rax)
testb %al, %al
je 0x6d8c
cmpb $0x4f, -0x24(%rbp)
jne 0x6bdf
cmpb $0x4b, -0x23(%rbp)
je 0x6c64
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x27e0(%rip), %rsi      # 0x93db
leaq 0x27f5(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376e
movb $0x1, %r12b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r12d, %r12d
leaq 0x6154(%rip), %rsi      # 0xcd78
leaq 0x17dd(%rip), %rdx      # 0x8408
movq %rbx, %rdi
callq 0x33f0
jmp 0x6e8f
leaq -0x24(%rbp), %rsi
movb $0x0, 0x2(%rsi)
movw $0x4b4f, (%rsi)         # imm = 0x4B4F
movq 0x48(%rbx), %rdi
leaq -0x48(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
je 0x6e3b
xorl %r14d, %r14d
movq (%r15), %rdi
movl $0x1, %esi
callq 0x3190
movl %r14d, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x273e(%rip), %rsi      # 0x93db
leaq 0x2753(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376e
movb $0x1, %r12b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r12d, %r12d
leaq 0x60b2(%rip), %rsi      # 0xcd78
leaq 0x173b(%rip), %rdx      # 0x8408
movq %rbx, %rdi
callq 0x33f0
jmp 0x6e8f
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x26e5(%rip), %rsi      # 0x93db
leaq 0x26fa(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376e
movb $0x1, %r12b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r12d, %r12d
leaq 0x6059(%rip), %rsi      # 0xcd78
leaq 0x16e2(%rip), %rdx      # 0x8408
movq %rbx, %rdi
callq 0x33f0
jmp 0x6e8f
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x268c(%rip), %rsi      # 0x93db
leaq 0x26a1(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376e
movb $0x1, %r12b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r12d, %r12d
leaq 0x6000(%rip), %rsi      # 0xcd78
leaq 0x1689(%rip), %rdx      # 0x8408
movq %rbx, %rdi
callq 0x33f0
jmp 0x6e8f
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x2633(%rip), %rsi      # 0x93db
leaq 0x2648(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376e
movb $0x1, %r12b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r12d, %r12d
leaq 0x5fa7(%rip), %rsi      # 0xcd78
leaq 0x1630(%rip), %rdx      # 0x8408
movq %rbx, %rdi
callq 0x33f0
jmp 0x6e8f
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x25da(%rip), %rsi      # 0x93db
leaq 0x25ef(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376e
movb $0x1, %r12b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r12d, %r12d
leaq 0x5f4e(%rip), %rsi      # 0xcd78
leaq 0x15d7(%rip), %rdx      # 0x8408
movq %rbx, %rdi
callq 0x33f0
jmp 0x6e8f
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x2584(%rip), %rsi      # 0x93db
leaq 0x2599(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376e
movb $0x1, %r12b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r12d, %r12d
leaq 0x5ef8(%rip), %rsi      # 0xcd78
leaq 0x1581(%rip), %rdx      # 0x8408
movq %rbx, %rdi
callq 0x33f0
jmp 0x6eab
jmp 0x6eca
jmp 0x6eab
jmp 0x6eca
jmp 0x6eab
jmp 0x6eca
jmp 0x6eab
jmp 0x6eca
jmp 0x6eab
jmp 0x6eca
jmp 0x6eab
jmp 0x6eca
jmp 0x6eab
jmp 0x6eca
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x6ec3
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3280
testb %r12b, %r12b
jne 0x6ecd
jmp 0x6ed5
movq %rax, %r14
movq %rbx, %rdi
callq 0x31e0
movq %r14, %rdi
callq 0x3400
nop