// File: 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
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x148(%rbp)
movq 0x510b(%rip), %rax      # 0xffd0
movq (%rax), %rdi
xorl %esi, %esi
callq 0x31c0
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %edx
leaq 0x16e0(%rip), %rsi      # 0xc5c0
movb $0x0, %al
callq 0x3090
movq -0x148(%rbp), %rax
cmpl $0x3, 0x14(%rax)
jne 0xb56c
leaq -0x33(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x31b0
movq -0x148(%rbp), %rax
testb $0x1, 0x18(%rax)
je 0xaf1e
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
je 0xaf3c
movq -0x148(%rbp), %rax
testb $0x1, 0x18(%rax)
jne 0xb254
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0xb254
movq -0x148(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq 0x1692(%rip), %rdx      # 0xc5e0
callq 0xad10
movq 0x5076(%rip), %rax      # 0xffd0
movq (%rax), %rdi
callq 0x3130
cmpl $0x20, %eax
je 0xaf69
jmp 0xaf53
leaq -0x33(%rbp), %rdi
leaq 0x15f1(%rip), %rsi      # 0xc565
movb $0x0, %al
callq 0x3090
movq -0x148(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0x33(%rbp), %rsi
movl $0x3, -0x38(%rbp)
movq (%rdi), %rax
leaq -0x38(%rbp), %rdx
callq *0x20(%rax)
xorb $-0x1, %al
testb $0x1, %al
jne 0xafa6
jmp 0xb05e
movb $0x1, -0x6d(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x158(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x34f0
movq -0x150(%rbp), %rdx
leaq 0x1542(%rip), %rsi      # 0xc51b
leaq -0x58(%rbp), %rdi
callq 0x3880
jmp 0xafe4
movq -0x158(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3770
jmp 0xaff6
movq -0x158(%rbp), %rdi
movb $0x0, -0x6d(%rbp)
leaq 0x4d68(%rip), %rsi      # 0xfd70
leaq 0xc21(%rip), %rdx       # 0xbc30
callq 0x34d0
jmp 0xb61f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xb03c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x31d0
leaq -0x59(%rbp), %rdi
callq 0x3340
testb $0x1, -0x6d(%rbp)
jne 0xb04d
jmp 0xb059
movq -0x158(%rbp), %rdi
callq 0x3220
jmp 0xb616
leaq -0x33(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x31b0
movq -0x148(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0x33(%rbp), %rsi
movl $0x3, -0x74(%rbp)
movq (%rdi), %rax
leaq -0x74(%rbp), %rdx
callq *0x28(%rax)
xorb $-0x1, %al
testb $0x1, %al
jne 0xb099
jmp 0xb169
movb $0x1, -0x9a(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x168(%rbp)
leaq -0x99(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x34f0
movq -0x160(%rbp), %rdx
leaq 0x1449(%rip), %rsi      # 0xc51b
leaq -0x98(%rbp), %rdi
callq 0x3880
jmp 0xb0e0
movq -0x168(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x3770
jmp 0xb0f5
movq -0x168(%rbp), %rdi
movb $0x0, -0x9a(%rbp)
leaq 0x4c66(%rip), %rsi      # 0xfd70
leaq 0xb1f(%rip), %rdx       # 0xbc30
callq 0x34d0
jmp 0xb61f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xb141
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x31d0
leaq -0x99(%rbp), %rdi
callq 0x3340
testb $0x1, -0x9a(%rbp)
jne 0xb158
jmp 0xb164
movq -0x168(%rbp), %rdi
callq 0x3220
jmp 0xb616
movsbl -0x33(%rbp), %eax
cmpl $0x4f, %eax
jne 0xb17f
movsbl -0x32(%rbp), %eax
cmpl $0x4b, %eax
je 0xb24f
movb $0x1, -0xc2(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x178(%rbp)
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x34f0
movq -0x170(%rbp), %rdx
leaq 0x1363(%rip), %rsi      # 0xc51b
leaq -0xc0(%rbp), %rdi
callq 0x3880
jmp 0xb1c6
movq -0x178(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x3770
jmp 0xb1db
movq -0x178(%rbp), %rdi
movb $0x0, -0xc2(%rbp)
leaq 0x4b80(%rip), %rsi      # 0xfd70
leaq 0xa39(%rip), %rdx       # 0xbc30
callq 0x34d0
jmp 0xb61f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xb227
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x31d0
leaq -0xc1(%rbp), %rdi
callq 0x3340
testb $0x1, -0xc2(%rbp)
jne 0xb23e
jmp 0xb24a
movq -0x178(%rbp), %rdi
callq 0x3220
jmp 0xb616
jmp 0xb56a
movq -0x148(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq 0x1399(%rip), %rdx      # 0xc5ff
callq 0xad10
movq -0x148(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0x33(%rbp), %rsi
movl $0x3, -0xc8(%rbp)
movq (%rdi), %rax
leaq -0xc8(%rbp), %rdx
callq *0x28(%rax)
xorb $-0x1, %al
testb $0x1, %al
jne 0xb29c
jmp 0xb36c
movb $0x1, -0xea(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x188(%rbp)
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x34f0
movq -0x180(%rbp), %rdx
leaq 0x1246(%rip), %rsi      # 0xc51b
leaq -0xe8(%rbp), %rdi
callq 0x3880
jmp 0xb2e3
movq -0x188(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x3770
jmp 0xb2f8
movq -0x188(%rbp), %rdi
movb $0x0, -0xea(%rbp)
leaq 0x4a63(%rip), %rsi      # 0xfd70
leaq 0x91c(%rip), %rdx       # 0xbc30
callq 0x34d0
jmp 0xb61f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xb344
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x31d0
leaq -0xe9(%rbp), %rdi
callq 0x3340
testb $0x1, -0xea(%rbp)
jne 0xb35b
jmp 0xb367
movq -0x188(%rbp), %rdi
callq 0x3220
jmp 0xb616
movsbl -0x33(%rbp), %eax
cmpl $0x47, %eax
jne 0xb382
movsbl -0x32(%rbp), %eax
cmpl $0x4f, %eax
je 0xb452
movb $0x1, -0x112(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x198(%rbp)
leaq -0x111(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x34f0
movq -0x190(%rbp), %rdx
leaq 0x1160(%rip), %rsi      # 0xc51b
leaq -0x110(%rbp), %rdi
callq 0x3880
jmp 0xb3c9
movq -0x198(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x3770
jmp 0xb3de
movq -0x198(%rbp), %rdi
movb $0x0, -0x112(%rbp)
leaq 0x497d(%rip), %rsi      # 0xfd70
leaq 0x836(%rip), %rdx       # 0xbc30
callq 0x34d0
jmp 0xb61f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xb42a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x31d0
leaq -0x111(%rbp), %rdi
callq 0x3340
testb $0x1, -0x112(%rbp)
jne 0xb441
jmp 0xb44d
movq -0x198(%rbp), %rdi
callq 0x3220
jmp 0xb616
leaq -0x33(%rbp), %rdi
leaq 0xdd1(%rip), %rsi       # 0xc22e
movb $0x0, %al
callq 0x3090
movq -0x148(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0x33(%rbp), %rsi
movl $0x3, -0x118(%rbp)
movq (%rdi), %rax
leaq -0x118(%rbp), %rdx
callq *0x20(%rax)
xorb $-0x1, %al
testb $0x1, %al
jne 0xb495
jmp 0xb565
movb $0x1, -0x13a(%rbp)
movl $0x20, %edi
callq 0x31a0
movq %rax, -0x1a8(%rbp)
leaq -0x139(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x34f0
movq -0x1a0(%rbp), %rdx
leaq 0x104d(%rip), %rsi      # 0xc51b
leaq -0x138(%rbp), %rdi
callq 0x3880
jmp 0xb4dc
movq -0x1a8(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x3770
jmp 0xb4f1
movq -0x1a8(%rbp), %rdi
movb $0x0, -0x13a(%rbp)
leaq 0x486a(%rip), %rsi      # 0xfd70
leaq 0x723(%rip), %rdx       # 0xbc30
callq 0x34d0
jmp 0xb61f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xb53d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x31d0
leaq -0x139(%rbp), %rdi
callq 0x3340
testb $0x1, -0x13a(%rbp)
jne 0xb554
jmp 0xb560
movq -0x1a8(%rbp), %rdi
callq 0x3220
jmp 0xb616
callq 0x3160
jmp 0xb59b
movq -0x148(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq 0x1062(%rip), %rdx      # 0xc5e0
callq 0xad10
movq 0x4a46(%rip), %rax      # 0xffd0
movq (%rax), %rdi
callq 0x3130
cmpl $0x20, %eax
je 0xb599
jmp 0xb583
jmp 0xb59b
movq 0x4a2e(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x31c0
movq 0x4a1a(%rip), %rax      # 0xffd0
movq (%rax), %rax
movq %rax, -0x1b0(%rbp)
xorl %eax, %eax
movq 0x4a07(%rip), %rcx      # 0xffd0
cmpq (%rcx), %rax
je 0xb5e7
movq 0x49fb(%rip), %rax      # 0xffd0
movq (%rax), %rax
movswl 0x4(%rax), %eax
addl $0x1, %eax
movl %eax, -0x1b4(%rbp)
jmp 0xb5f4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x1b4(%rbp)
jmp 0xb5f4
movq -0x1b0(%rbp), %rdi
movl -0x1b4(%rbp), %edx
xorl %esi, %esi
movl $0x1, %ecx
callq 0x3460
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x34e0
nop