// File: matallui[P]nibble-curses/src/CSingle.cpp
// Function: CSingle::Initialize(int const&)
void CSingle::Initialize ( int const & nlevel )
{
  if ( !m_lives ) return;
  
  m_size = 3;
  m_head = 2;
  m_tail = 0;
  m_delay = 0;
  
  switch ( nlevel )
  {
    case 1:
      m_body[2].Update ( 17, 80 );
      m_body[1].Update ( 17, 81 );
      m_body[0].Update ( 17, 82 );
      m_direction = 'L';
      break;
    case 2:
      m_body[2].Update ( 10, 80 );
      m_body[1].Update ( 10, 81 );
      m_body[0].Update ( 10, 82 );
      m_direction = 'L';
      break;
    case 3:
    case 4:
    case 6:
    case 7:
      m_body[2].Update ( 4, 88 );
      m_body[1].Update ( 4, 89 );
      m_body[0].Update ( 4, 90 );
      m_direction = 'L';
      break;
    case 5:
      m_body[2].Update ( 18, 88 );
      m_body[1].Update ( 18, 89 );
      m_body[0].Update ( 18, 90 );
      m_direction = 'L';
      break;
    case 8:
    case 10:
      m_body[2].Update ( 5, 94 );
      m_body[1].Update ( 4, 94 );
      m_body[0].Update ( 3, 94 );
      m_direction = 'D';
      break;
    case 9:
      m_body[2].Update ( 1, 88 );
      m_body[1].Update ( 1, 89 );
      m_body[0].Update ( 1, 90 );
      m_direction = 'L';
  }
}

// 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 0x4699
jmp 0x4a54
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 0x4a54
movq -0xb0(%rbp), %rax
leaq 0x79ec(%rip), %rcx      # 0xc0d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x10, %rdi
movl $0x11, -0x14(%rbp)
movl $0x50, -0x18(%rbp)
leaq -0x14(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movl $0x11, -0x1c(%rbp)
movl $0x51, -0x20(%rbp)
leaq -0x1c(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x11, -0x24(%rbp)
movl $0x52, -0x28(%rbp)
leaq -0x24(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movb $0x4c, 0x28(%rax)
jmp 0x4a54
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x10, %rdi
movl $0xa, -0x2c(%rbp)
movl $0x50, -0x30(%rbp)
leaq -0x2c(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movl $0xa, -0x34(%rbp)
movl $0x51, -0x38(%rbp)
leaq -0x34(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0xa, -0x3c(%rbp)
movl $0x52, -0x40(%rbp)
leaq -0x3c(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movb $0x4c, 0x28(%rax)
jmp 0x4a54
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x10, %rdi
movl $0x4, -0x44(%rbp)
movl $0x58, -0x48(%rbp)
leaq -0x44(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movl $0x4, -0x4c(%rbp)
movl $0x59, -0x50(%rbp)
leaq -0x4c(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x4, -0x54(%rbp)
movl $0x5a, -0x58(%rbp)
leaq -0x54(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movb $0x4c, 0x28(%rax)
jmp 0x4a54
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x10, %rdi
movl $0x12, -0x5c(%rbp)
movl $0x58, -0x60(%rbp)
leaq -0x5c(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movl $0x12, -0x64(%rbp)
movl $0x59, -0x68(%rbp)
leaq -0x64(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x12, -0x6c(%rbp)
movl $0x5a, -0x70(%rbp)
leaq -0x6c(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movb $0x4c, 0x28(%rax)
jmp 0x4a54
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x10, %rdi
movl $0x5, -0x74(%rbp)
movl $0x5e, -0x78(%rbp)
leaq -0x74(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movl $0x4, -0x7c(%rbp)
movl $0x5e, -0x80(%rbp)
leaq -0x7c(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x3, -0x84(%rbp)
movl $0x5e, -0x88(%rbp)
leaq -0x84(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movb $0x44, 0x28(%rax)
jmp 0x4a54
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x10, %rdi
movl $0x1, -0x8c(%rbp)
movl $0x58, -0x90(%rbp)
leaq -0x8c(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movl $0x1, -0x94(%rbp)
movl $0x59, -0x98(%rbp)
leaq -0x94(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1, -0x9c(%rbp)
movl $0x5a, -0xa0(%rbp)
leaq -0x9c(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0x3da0
movq -0xa8(%rbp), %rax
movb $0x4c, 0x28(%rax)
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)