// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/Tile_Structure/Tile.cpp
// Function: Tile::rotate()
void Tile::rotate()
{
	std::vector<std::vector<Block> > unrotated = innerBlocks;

  // Top row
  innerBlocks[0][0] = Block(unrotated[0][2]);
  innerBlocks[0][1] = Block(unrotated[1][2]);
  innerBlocks[0][2] = Block(unrotated[2][2]);

  this->upFace.setType(innerBlocks[0][1].getType());

  // Middle row except center block (doesn't rotate)
  innerBlocks[1][0] = Block(unrotated[0][1]);
  innerBlocks[1][2] = Block(unrotated[2][1]);

  this->leftFace.setType(innerBlocks[1][0].getType());
  this->rightFace.setType(innerBlocks[1][2].getType());

  // Bottom row
  innerBlocks[2][0] = Block(unrotated[0][0]);
  innerBlocks[2][1] = Block(unrotated[1][0]);
  innerBlocks[2][2] = Block(unrotated[2][0]);

  this->downFace.setType(innerBlocks[2][1].getType());

  if (rotation < 3)
    rotation++;
  else
    rotation = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq 0xd0(%rdi), %r14
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x65ba
movq (%r15), %rax
movq (%rax), %rsi
addq $0x50, %rsi
leaq -0x40(%rbp), %rdi
callq 0x6880
movq (%r14), %rax
movq (%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x6d06
leaq -0x40(%rbp), %rdi
callq 0x118de
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rsi
addq $0x50, %rsi
leaq -0x40(%rbp), %rdi
callq 0x6880
movq (%r14), %rax
movq (%rax), %rdi
addq $0x28, %rdi
leaq -0x40(%rbp), %rsi
callq 0x6d06
leaq -0x40(%rbp), %rdi
callq 0x118de
movq -0x58(%rbp), %rax
movq 0x30(%rax), %rsi
addq $0x50, %rsi
leaq -0x40(%rbp), %rdi
callq 0x6880
movq (%r14), %rax
movq (%rax), %rdi
addq $0x50, %rdi
leaq -0x40(%rbp), %rsi
callq 0x6d06
leaq -0x40(%rbp), %rdi
callq 0x118de
movq (%r14), %rax
movq (%rax), %rsi
addq $0x30, %rsi
leaq -0xd8(%rbp), %rdi
callq 0x32c0
leaq 0x10(%rbx), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x1177c
leaq -0xd8(%rbp), %rdi
callq 0x3120
movq -0x58(%rbp), %rax
movq (%rax), %rsi
addq $0x28, %rsi
leaq -0x40(%rbp), %rdi
callq 0x6880
movq (%r14), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x6d06
leaq -0x40(%rbp), %rdi
callq 0x118de
movq -0x58(%rbp), %rax
movq 0x30(%rax), %rsi
addq $0x28, %rsi
leaq -0x40(%rbp), %rdi
callq 0x6880
movq (%r14), %rax
movq 0x18(%rax), %rdi
addq $0x50, %rdi
leaq -0x40(%rbp), %rsi
callq 0x6d06
leaq -0x40(%rbp), %rdi
callq 0x118de
movq (%r14), %rax
movq 0x18(%rax), %rsi
addq $0x8, %rsi
leaq -0xb8(%rbp), %rdi
callq 0x32c0
leaq 0x60(%rbx), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x1177c
leaq -0xb8(%rbp), %rdi
callq 0x3120
movq (%r14), %rax
movq 0x18(%rax), %rsi
addq $0x58, %rsi
leaq -0x98(%rbp), %rdi
callq 0x32c0
leaq 0x88(%rbx), %rdi
leaq -0x98(%rbp), %rsi
callq 0x1177c
leaq -0x98(%rbp), %rdi
callq 0x3120
movq -0x58(%rbp), %rax
movq (%rax), %rsi
leaq -0x40(%rbp), %rdi
callq 0x6880
movq (%r14), %rax
movq 0x30(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x6d06
leaq -0x40(%rbp), %rdi
callq 0x118de
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rsi
leaq -0x40(%rbp), %rdi
callq 0x6880
movq (%r14), %rax
movq 0x30(%rax), %rdi
addq $0x28, %rdi
leaq -0x40(%rbp), %rsi
callq 0x6d06
leaq -0x40(%rbp), %rdi
callq 0x118de
movq -0x58(%rbp), %rax
movq 0x30(%rax), %rsi
leaq -0x40(%rbp), %rdi
callq 0x6880
movq (%r14), %rax
movq 0x30(%rax), %rdi
addq $0x50, %rdi
leaq -0x40(%rbp), %rsi
callq 0x6d06
leaq -0x40(%rbp), %rdi
callq 0x118de
movq (%r14), %rax
movq 0x30(%rax), %rsi
addq $0x30, %rsi
leaq -0x78(%rbp), %rdi
callq 0x32c0
leaq 0x38(%rbx), %rdi
leaq -0x78(%rbp), %rsi
callq 0x1177c
leaq -0x78(%rbp), %rdi
callq 0x3120
movl (%rbx), %eax
leal 0x1(%rax), %ecx
xorl %edx, %edx
cmpl $0x3, %eax
cmovll %ecx, %edx
movl %edx, (%rbx)
leaq -0x58(%rbp), %rdi
callq 0xecb2
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
jmp 0x11146
jmp 0x11155
jmp 0x11165
jmp 0x11155
jmp 0x11165
jmp 0x11155
jmp 0x11165
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
jmp 0x11146
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
jmp 0x11146
jmp 0x11155
jmp 0x11165
jmp 0x11155
jmp 0x11165
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x3120
jmp 0x11168
jmp 0x11155
jmp 0x11165
jmp 0x11155
jmp 0x11165
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x118de
jmp 0x11168
jmp 0x11165
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0xecb2
movq %rbx, %rdi
callq 0x33c0
nop