// File: /workspace/github_cpp_makefile_star2_O2/matallui[P]nibble-curses/src/CNibbles.cpp
// Function: CNibbles::PlayerDies(int const&) const
void CNibbles::PlayerDies ( int const & player ) const
{
  nodelay ( stdscr, false );
  
  char title[31];
  sprintf ( title, "*       PLAYER %d dies!!      *", player );
  
  if ( m_mode == 3 )
  {
    char buffer[3];
    bzero ( buffer, 3 );
    
    if ( (m_master && player == 1) || (!m_master && player == 2) )
    {
      PopUp ( (char*)title, (char*)"*   press space to continue  *" );
      while ( getch () != ' ' );
      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
    {
      PopUp ( (char*)title, (char*)"*   waiting to continue ...  *" );
      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
  {
    PopUp ( (char*)title, (char*)"*   press space to continue  *" );
    while ( getch () != ' ' );
  }
  nodelay ( stdscr, true );
  touchwin ( stdscr );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x4964(%rip), %r15      # 0xbfd0
movq (%r15), %rdi
xorl %esi, %esi
callq 0x31b0
movl (%r14), %edx
leaq 0xe00(%rip), %rsi       # 0x8480
leaq -0x60(%rbp), %rdi
xorl %eax, %eax
callq 0x3060
cmpl $0x3, 0x14(%rbx)
jne 0x777a
movb $0x0, -0x1a(%rbp)
andw $0x0, -0x1c(%rbp)
movzbl 0x18(%rbx), %eax
pushq $0x2
popq %rcx
subl %eax, %ecx
cmpl %ecx, (%r14)
jne 0x7799
leaq 0xde9(%rip), %rdx       # 0x84a0
leaq -0x60(%rbp), %rsi
callq 0x7548
movq (%r15), %rdi
callq 0x3100
cmpl $0x20, %eax
jne 0x76c0
leaq -0x1c(%rbp), %rsi
movb $0x0, 0x2(%rsi)
movw $0x4f47, (%rsi)         # imm = 0x4F47
movq 0x48(%rbx), %rdi
leaq -0x40(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
je 0x783e
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 0x78d6
cmpb $0x4f, -0x1c(%rbp)
jne 0x772e
cmpb $0x4b, -0x1b(%rbp)
je 0x780b
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0xc9b(%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 0x4612(%rip), %rsi      # 0xbd78
leaq 0x5e1(%rip), %rdx       # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x79b2
leaq 0xd1f(%rip), %rdx       # 0x84a0
leaq -0x60(%rbp), %rsi
callq 0x7548
movq (%r15), %rdi
callq 0x3100
cmpl $0x20, %eax
jne 0x778a
jmp 0x780b
leaq 0xd1f(%rip), %rdx       # 0x84bf
leaq -0x60(%rbp), %rsi
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 0x788a
cmpb $0x47, -0x1c(%rbp)
jne 0x7922
cmpb $0x4f, -0x1b(%rbp)
jne 0x7922
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 0x796b
callq 0x3130
movq (%r15), %rdi
pushq $0x1
popq %rsi
callq 0x31b0
movq (%r15), %rdi
testq %rdi, %rdi
je 0x7826
movswl 0x4(%rdi), %edx
incl %edx
jmp 0x7829
pushq $-0x1
popq %rdx
pushq $0x1
popq %rcx
xorl %esi, %esi
callq 0x33a0
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0xb8b(%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 0x4502(%rip), %rsi      # 0xbd78
leaq 0x4d1(%rip), %rdx       # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x79b2
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0xb3f(%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 0x44b6(%rip), %rsi      # 0xbd78
leaq 0x485(%rip), %rdx       # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x79b2
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0xaf3(%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 0x446a(%rip), %rsi      # 0xbd78
leaq 0x439(%rip), %rdx       # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x79b2
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0xaa7(%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 0x441e(%rip), %rsi      # 0xbd78
leaq 0x3ed(%rip), %rdx       # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x79b2
pushq $0x20
popq %rdi
callq 0x3180
movq %rax, %rbx
leaq 0xa5e(%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 0x43d5(%rip), %rsi      # 0xbd78
leaq 0x3a4(%rip), %rdx       # 0x7d4e
movq %rbx, %rdi
callq 0x3410
jmp 0x79c4
jmp 0x79d9
jmp 0x79c4
jmp 0x79d9
jmp 0x79c4
jmp 0x79d9
jmp 0x79c4
jmp 0x79d9
jmp 0x79c4
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x3150
testb %r15b, %r15b
jne 0x79dc
jmp 0x79e4
jmp 0x79d9
movq %rax, %r14
movq %rbx, %rdi
callq 0x31f0
movq %r14, %rdi
callq 0x3420