// File: matallui[P]nibble-curses/src/CMultPC.cpp
// Function: CMultPC::Initialize(int const&)
void CMultPC::Initialize ( int const & nlevel )
{
  if ( !m_lives ) return;
  if ( m_playerid == 1 ) 
  {
    CSingle::Initialize ( nlevel );
    return;
  }
  
  m_size = 3;
  m_head = 2;
  m_tail = 0;
  m_delay = 0;
  
  switch ( nlevel )
  {
    case 1:
      m_body[2].Update ( 19, 20 );
      m_body[1].Update ( 19, 19 );
      m_body[0].Update ( 19, 18 );
      m_direction = 'R';
      break;
    case 2:
      m_body[2].Update ( 26, 20 );
      m_body[1].Update ( 26, 19 );
      m_body[0].Update ( 26, 18 );
      m_direction = 'R';
      break;
    case 3:
    case 4:
    case 6:
    case 7:
      m_body[2].Update ( 31, 20 );
      m_body[1].Update ( 31, 19 );
      m_body[0].Update ( 31, 18 );
      m_direction = 'R';
      break;
    case 5:
      m_body[2].Update ( 19, 20 );
      m_body[1].Update ( 19, 19 );
      m_body[0].Update ( 19, 18 );
      m_direction = 'R';
      break;
    case 8:
    case 10:
      m_body[2].Update ( 30, 5 );
      m_body[1].Update ( 31, 5 );
      m_body[0].Update ( 32, 5 );
      m_direction = 'U';
      break;
    case 9:
      m_body[2].Update ( 34, 20 );
      m_body[1].Update ( 34, 19 );
      m_body[0].Update ( 34, 18 );
      m_direction = 'R';
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa8(%rbp)
cmpl $0x0, 0x24(%rax)
jne 0x4f29
jmp 0x5306
movq -0xa8(%rbp), %rax
cmpl $0x1, 0x38(%rax)
jne 0x4f4b
movq -0xa8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4670
jmp 0x5306
movq -0xa8(%rbp), %rax
movl $0x3, 0x14(%rax)
movl $0x2, 0x18(%rax)
movl $0x0, 0x1c(%rax)
movl $0x0, 0x2c(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0xb0(%rbp)
subl $0x9, %eax
ja 0x5306
movq -0xb0(%rbp), %rax
leaq 0x71c6(%rip), %rcx      # 0xc15c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x10, %rdi
movl $0x13, -0x14(%rbp)
movl $0x14, -0x18(%rbp)
leaq -0x14(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movl $0x13, -0x1c(%rbp)
movl $0x13, -0x20(%rbp)
leaq -0x1c(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x13, -0x24(%rbp)
movl $0x12, -0x28(%rbp)
leaq -0x24(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movb $0x52, 0x28(%rax)
jmp 0x5306
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x10, %rdi
movl $0x1a, -0x2c(%rbp)
movl $0x14, -0x30(%rbp)
leaq -0x2c(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movl $0x1a, -0x34(%rbp)
movl $0x13, -0x38(%rbp)
leaq -0x34(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1a, -0x3c(%rbp)
movl $0x12, -0x40(%rbp)
leaq -0x3c(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movb $0x52, 0x28(%rax)
jmp 0x5306
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x10, %rdi
movl $0x1f, -0x44(%rbp)
movl $0x14, -0x48(%rbp)
leaq -0x44(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movl $0x1f, -0x4c(%rbp)
movl $0x13, -0x50(%rbp)
leaq -0x4c(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1f, -0x54(%rbp)
movl $0x12, -0x58(%rbp)
leaq -0x54(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movb $0x52, 0x28(%rax)
jmp 0x5306
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x10, %rdi
movl $0x13, -0x5c(%rbp)
movl $0x14, -0x60(%rbp)
leaq -0x5c(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movl $0x13, -0x64(%rbp)
movl $0x13, -0x68(%rbp)
leaq -0x64(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x13, -0x6c(%rbp)
movl $0x12, -0x70(%rbp)
leaq -0x6c(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movb $0x52, 0x28(%rax)
jmp 0x5306
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x10, %rdi
movl $0x1e, -0x74(%rbp)
movl $0x5, -0x78(%rbp)
leaq -0x74(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movl $0x1f, -0x7c(%rbp)
movl $0x5, -0x80(%rbp)
leaq -0x7c(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x20, -0x84(%rbp)
movl $0x5, -0x88(%rbp)
leaq -0x84(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movb $0x55, 0x28(%rax)
jmp 0x5306
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x10, %rdi
movl $0x22, -0x8c(%rbp)
movl $0x14, -0x90(%rbp)
leaq -0x8c(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movl $0x22, -0x94(%rbp)
movl $0x13, -0x98(%rbp)
leaq -0x94(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x22, -0x9c(%rbp)
movl $0x12, -0xa0(%rbp)
leaq -0x9c(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movb $0x52, 0x28(%rax)
addq $0xb0, %rsp
popq %rbp
retq
nop