// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpl $0x0, 0x24(%rdi)
je 0x3f16
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movabsq $0x200000003, %rax      # imm = 0x200000003
movq %rax, 0x14(%rdi)
andl $0x0, 0x1c(%rdi)
andl $0x0, 0x2c(%rdi)
movl (%rsi), %eax
decl %eax
cmpl $0x9, %eax
ja 0x3f0a
leaq 0x4292(%rip), %rcx      # 0x8048
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rbx), %rdi
addq $0x10, %rdi
pushq $0x4
jmp 0x3eae
movq 0x8(%rbx), %rdi
addq $0x10, %rdi
leaq -0x28(%rbp), %r14
movl $0x5, (%r14)
pushq $0x5e
popq %r12
leaq -0x24(%rbp), %r15
movl %r12d, (%r15)
movq %r14, %rsi
movq %r15, %rdx
callq 0x3804
movq 0x8(%rbx), %rdi
addq $0x8, %rdi
movl $0x4, (%r14)
movl %r12d, (%r15)
movq %r14, %rsi
movq %r15, %rdx
callq 0x3804
movq 0x8(%rbx), %rdi
movl $0x3, (%r14)
movl %r12d, (%r15)
leaq -0x28(%rbp), %rsi
leaq -0x24(%rbp), %rdx
callq 0x3804
movb $0x44, %al
jmp 0x3f07
movq 0x8(%rbx), %rdi
addq $0x10, %rdi
pushq $0x1
jmp 0x3eae
movq 0x8(%rbx), %rdi
addq $0x10, %rdi
pushq $0x11
jmp 0x3e58
movq 0x8(%rbx), %rdi
addq $0x10, %rdi
pushq $0xa
popq %r12
leaq -0x28(%rbp), %r14
movl %r12d, (%r14)
leaq -0x24(%rbp), %r15
movl $0x50, (%r15)
movq %r14, %rsi
movq %r15, %rdx
callq 0x3804
movq 0x8(%rbx), %rdi
addq $0x8, %rdi
movl %r12d, (%r14)
movl $0x51, (%r15)
movq %r14, %rsi
movq %r15, %rdx
callq 0x3804
movq 0x8(%rbx), %rdi
movl %r12d, (%r14)
movl $0x52, (%r15)
jmp 0x3ef8
movq 0x8(%rbx), %rdi
addq $0x10, %rdi
pushq $0x12
popq %r12
leaq -0x28(%rbp), %r14
movl %r12d, (%r14)
leaq -0x24(%rbp), %r15
movl $0x58, (%r15)
movq %r14, %rsi
movq %r15, %rdx
callq 0x3804
movq 0x8(%rbx), %rdi
addq $0x8, %rdi
movl %r12d, (%r14)
movl $0x59, (%r15)
movq %r14, %rsi
movq %r15, %rdx
callq 0x3804
movq 0x8(%rbx), %rdi
movl %r12d, (%r14)
movl $0x5a, (%r15)
leaq -0x28(%rbp), %rsi
leaq -0x24(%rbp), %rdx
callq 0x3804
movb $0x4c, %al
movb %al, 0x28(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop