// File: /workspace/github_cpp_makefile_star2_O1/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 0x3fea
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)
xorl %eax, %eax
movl %eax, 0x1c(%rdi)
movl %eax, 0x2c(%rdi)
movl (%rsi), %eax
decl %eax
cmpl $0x9, %eax
ja 0x3fde
leaq 0x51d0(%rip), %rcx      # 0x9048
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rbx), %rdi
addq $0x10, %rdi
movl $0x4, %r12d
jmp 0x3f84
movq 0x8(%rbx), %rdi
addq $0x10, %rdi
leaq -0x28(%rbp), %r14
movl $0x5, (%r14)
movl $0x5e, %r12d
leaq -0x24(%rbp), %r15
movl %r12d, (%r15)
movq %r14, %rsi
movq %r15, %rdx
callq 0x3890
movq 0x8(%rbx), %rdi
addq $0x8, %rdi
movl $0x4, (%r14)
movl %r12d, (%r15)
movq %r14, %rsi
movq %r15, %rdx
callq 0x3890
movq 0x8(%rbx), %rdi
movl $0x3, (%r14)
movl %r12d, (%r15)
leaq -0x28(%rbp), %rsi
leaq -0x24(%rbp), %rdx
callq 0x3890
movb $0x44, %al
jmp 0x3fdb
movq 0x8(%rbx), %rdi
addq $0x10, %rdi
movl $0x1, %r12d
jmp 0x3f84
movq 0x8(%rbx), %rdi
addq $0x10, %rdi
movl $0x11, %r12d
jmp 0x3f2c
movq 0x8(%rbx), %rdi
addq $0x10, %rdi
movl $0xa, %r12d
leaq -0x28(%rbp), %r14
movl %r12d, (%r14)
leaq -0x24(%rbp), %r15
movl $0x50, (%r15)
movq %r14, %rsi
movq %r15, %rdx
callq 0x3890
movq 0x8(%rbx), %rdi
addq $0x8, %rdi
movl %r12d, (%r14)
movl $0x51, (%r15)
movq %r14, %rsi
movq %r15, %rdx
callq 0x3890
movq 0x8(%rbx), %rdi
movl %r12d, (%r14)
movl $0x52, (%r15)
jmp 0x3fcc
movq 0x8(%rbx), %rdi
addq $0x10, %rdi
movl $0x12, %r12d
leaq -0x28(%rbp), %r14
movl %r12d, (%r14)
leaq -0x24(%rbp), %r15
movl $0x58, (%r15)
movq %r14, %rsi
movq %r15, %rdx
callq 0x3890
movq 0x8(%rbx), %rdi
addq $0x8, %rdi
movl %r12d, (%r14)
movl $0x59, (%r15)
movq %r14, %rsi
movq %r15, %rdx
callq 0x3890
movq 0x8(%rbx), %rdi
movl %r12d, (%r14)
movl $0x5a, (%r15)
leaq -0x28(%rbp), %rsi
leaq -0x24(%rbp), %rdx
callq 0x3890
movb $0x4c, %al
movb %al, 0x28(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop