// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x5240(%rip), %r15      # 0xcfd0
movq (%r15), %rdi
xorl %esi, %esi
callq 0x3190
movl (%r14), %edx
leaq 0x16dc(%rip), %rsi      # 0x9480
leaq -0x70(%rbp), %rdi
xorl %eax, %eax
callq 0x3070
cmpl $0x3, 0x14(%rbx)
jne 0x7eb0
movb $0x0, -0x22(%rbp)
movw $0x0, -0x24(%rbp)
movzbl 0x18(%rbx), %eax
movl $0x2, %ecx
subl %eax, %ecx
cmpl %ecx, (%r14)
jne 0x7ecf
leaq 0x16c2(%rip), %rdx      # 0x94a0
leaq -0x70(%rbp), %rsi
callq 0x7c46
movq (%r15), %rdi
callq 0x3110
cmpl $0x20, %eax
jne 0x7de7
leaq -0x24(%rbp), %rsi
movb $0x0, 0x2(%rsi)
movw $0x4f47, (%rsi)         # imm = 0x4F47
movq 0x48(%rbx), %rdi
leaq -0x48(%rbp), %rdx
movl $0x3, (%rdx)
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
je 0x7f7c
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 0x8030
cmpb $0x4f, -0x24(%rbp)
jne 0x7e56
cmpb $0x4b, -0x23(%rbp)
je 0x7f41
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1568(%rip), %rsi      # 0x93db
leaq 0x157d(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x4edc(%rip), %rsi      # 0xcd78
leaq 0x699(%rip), %rdx       # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x8136
leaq 0x15e9(%rip), %rdx      # 0x94a0
leaq -0x70(%rbp), %rsi
callq 0x7c46
movq (%r15), %rdi
callq 0x3110
cmpl $0x20, %eax
jne 0x7ec0
jmp 0x7f41
leaq 0x15e9(%rip), %rdx      # 0x94bf
leaq -0x70(%rbp), %rsi
callq 0x7c46
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 0x7fd6
cmpb $0x47, -0x24(%rbp)
jne 0x808a
cmpb $0x4f, -0x23(%rbp)
jne 0x808a
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 0x80e1
callq 0x3140
movq (%r15), %rdi
movl $0x1, %esi
callq 0x3190
movq (%r15), %rdi
testq %rdi, %rdi
je 0x7f5e
movswl 0x4(%rdi), %edx
incl %edx
jmp 0x7f63
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %esi, %esi
movl $0x1, %ecx
callq 0x3380
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1442(%rip), %rsi      # 0x93db
leaq 0x1457(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x4db6(%rip), %rsi      # 0xcd78
leaq 0x573(%rip), %rdx       # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x8136
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x13e8(%rip), %rsi      # 0x93db
leaq 0x13fd(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x4d5c(%rip), %rsi      # 0xcd78
leaq 0x519(%rip), %rdx       # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x8136
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x138e(%rip), %rsi      # 0x93db
leaq 0x13a3(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x4d02(%rip), %rsi      # 0xcd78
leaq 0x4bf(%rip), %rdx       # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x8136
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1334(%rip), %rsi      # 0x93db
leaq 0x1349(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x4ca8(%rip), %rsi      # 0xcd78
leaq 0x465(%rip), %rdx       # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x8136
movl $0x20, %edi
callq 0x3160
movq %rax, %rbx
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x12dd(%rip), %rsi      # 0x93db
leaq 0x12f2(%rip), %rdx      # 0x93f7
leaq -0x48(%rbp), %rdi
callq 0x376a
movb $0x1, %r15b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x35f8
xorl %r15d, %r15d
leaq 0x4c51(%rip), %rsi      # 0xcd78
leaq 0x40e(%rip), %rdx       # 0x853c
movq %rbx, %rdi
callq 0x33f0
jmp 0x8148
jmp 0x8164
jmp 0x8148
jmp 0x8164
jmp 0x8148
jmp 0x8164
jmp 0x8148
jmp 0x8164
jmp 0x8148
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x816a
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3280
jmp 0x816a
jmp 0x8164
movq %rax, %r14
movb $0x1, %r15b
testb %r15b, %r15b
je 0x8177
movq %rbx, %rdi
callq 0x31e0
movq %r14, %rdi
callq 0x3400
nop