// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x651f(%rip), %r15      # 0xcfd0
movq (%r15), %rdi
xorl %r12d, %r12d
xorl %esi, %esi
callq 0x3190
cmpl $0x3, 0x14(%rbx)
jne 0x6be4
movb $0x0, -0x2a(%rbp)
movw $0x0, -0x2c(%rbp)
cmpb $0x1, 0x18(%rbx)
jne 0x6c56
leaq 0x29fb(%rip), %rsi      # 0x94de
leaq 0x2a13(%rip), %rdx      # 0x94fd
callq 0x7c46
movq (%r15), %rdi
callq 0x3110
movl %eax, %ecx
andb $-0x21, %cl
cmpb $0x4e, %cl
je 0x6b1e
andl $0xdf, %eax
movb $0x1, %cl
cmpl $0x59, %eax
jne 0x6b2d
movb $0x0, -0x2a(%rbp)
movw $0x5952, -0x2c(%rbp)    # imm = 0x5952
movb $0x1, %r14b
xorl %ecx, %ecx
jmp 0x6b2d
movb $0x0, -0x2a(%rbp)
movw $0x4e52, -0x2c(%rbp)    # imm = 0x4E52
xorl %ecx, %ecx
xorl %r14d, %r14d
testb %cl, %cl
jne 0x6aef
movq 0x48(%rbx), %rdi
leaq -0x50(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
leaq -0x2c(%rbp), %rsi
callq *0x20(%rax)
testb %al, %al
je 0x6d60
leaq -0x2c(%rbp), %rsi
movb $0x0, 0x2(%rsi)
movw $0x0, (%rsi)
movq 0x48(%rbx), %rdi
leaq -0x50(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
callq *0x28(%rax)
testb %al, %al
je 0x6e14
cmpb $0x4f, -0x2c(%rbp)
jne 0x6b8a
cmpb $0x4b, -0x2b(%rbp)
je 0x6c33
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x2834(%rip), %rsi      # 0x93db
leaq 0x2849(%rip), %rdx      # 0x93f7
leaq -0x50(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x61a8(%rip), %rsi      # 0xcd78
leaq 0x1965(%rip), %rdx      # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x6f74
leaq 0x28f3(%rip), %rsi      # 0x94de
leaq 0x290b(%rip), %rdx      # 0x94fd
callq 0x7c46
movl $0x1, %ebx
movabsq $0x80100000801, %r13    # imm = 0x80100000801
movq (%r15), %rdi
callq 0x3110
movl %eax, %ecx
andl $-0x21, %ecx
cmpl $0x4e, %ecx
movzbl %r14b, %r14d
cmovel %r12d, %r14d
cmpl $0x59, %ecx
cmovel %ebx, %r14d
addl $-0x4e, %eax
cmpl $0x2b, %eax
ja 0x6c06
btq %rax, %r13
jae 0x6c06
movq (%r15), %rdi
movl $0x1, %esi
callq 0x3190
andb $0x1, %r14b
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2881(%rip), %rsi      # 0x94de
leaq 0x28be(%rip), %rdx      # 0x9522
callq 0x7c46
movq 0x48(%rbx), %rdi
leaq -0x50(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
leaq -0x2c(%rbp), %rsi
callq *0x28(%rax)
testb %al, %al
je 0x6dba
cmpb $0x52, -0x2c(%rbp)
jne 0x6e6e
movzbl -0x2b(%rbp), %eax
cmpl $0x4e, %eax
je 0x6d2f
cmpl $0x59, %eax
jne 0x6ec8
leaq -0x2c(%rbp), %rsi
movb $0x0, 0x2(%rsi)
movw $0x4b4f, (%rsi)         # imm = 0x4B4F
movq 0x48(%rbx), %rdi
leaq -0x50(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
callq *0x20(%rax)
movb $0x1, %r14b
testb %al, %al
jne 0x6c33
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x26e9(%rip), %rsi      # 0x93db
leaq 0x26fe(%rip), %rdx      # 0x93f7
leaq -0x50(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x605d(%rip), %rsi      # 0xcd78
leaq 0x181a(%rip), %rdx      # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x6f74
leaq -0x2c(%rbp), %rsi
movb $0x0, 0x2(%rsi)
movw $0x4b4f, (%rsi)         # imm = 0x4B4F
movq 0x48(%rbx), %rdi
leaq -0x50(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
je 0x6f1f
xorl %r14d, %r14d
jmp 0x6c33
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x265e(%rip), %rsi      # 0x93db
leaq 0x2673(%rip), %rdx      # 0x93f7
leaq -0x50(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x5fd2(%rip), %rsi      # 0xcd78
leaq 0x178f(%rip), %rdx      # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x6f74
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x2604(%rip), %rsi      # 0x93db
leaq 0x2619(%rip), %rdx      # 0x93f7
leaq -0x50(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x5f78(%rip), %rsi      # 0xcd78
leaq 0x1735(%rip), %rdx      # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x6f74
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x25aa(%rip), %rsi      # 0x93db
leaq 0x25bf(%rip), %rdx      # 0x93f7
leaq -0x50(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x5f1e(%rip), %rsi      # 0xcd78
leaq 0x16db(%rip), %rdx      # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x6f74
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x2550(%rip), %rsi      # 0x93db
leaq 0x2565(%rip), %rdx      # 0x93f7
leaq -0x50(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x5ec4(%rip), %rsi      # 0xcd78
leaq 0x1681(%rip), %rdx      # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x6f74
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x24f6(%rip), %rsi      # 0x93db
leaq 0x250b(%rip), %rdx      # 0x93f7
leaq -0x50(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x5e6a(%rip), %rsi      # 0xcd78
leaq 0x1627(%rip), %rdx      # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x6f74
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x249f(%rip), %rsi      # 0x93db
leaq 0x24b4(%rip), %rdx      # 0x93f7
leaq -0x50(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x5e13(%rip), %rsi      # 0xcd78
leaq 0x15d0(%rip), %rdx      # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x6f8e
jmp 0x6f8e
jmp 0x6faa
jmp 0x6faa
jmp 0x6f8e
jmp 0x6faa
jmp 0x6f8e
jmp 0x6faa
jmp 0x6f8e
jmp 0x6f8e
jmp 0x6faa
jmp 0x6faa
jmp 0x6f8e
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x6fb0
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3280
jmp 0x6fb0
jmp 0x6faa
movq %rax, %r14
movb $0x1, %r15b
testb %r15b, %r15b
je 0x6fbd
movq %rbx, %rdi
callq 0x31e0
movq %r14, %rdi
callq 0x3400
nop