// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0xc0, %rsp
movq %rdi, %rbx
leaq 0xd0(%rdi), %r14
leaq -0x60(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x8e08
movq (%r15), %rax
movq (%rax), %rax
movzwl 0x50(%rax), %ecx
leaq -0x40(%rbp), %r15
movw %cx, -0x8(%r15)
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x9da8
movq (%r14), %rax
movq (%rax), %rdi
movzwl -0x48(%rbp), %eax
movw %ax, (%rdi)
addq $0x8, %rdi
movq %r15, %rsi
callq 0x3140
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x17912
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movzwl 0x50(%rax), %ecx
movw %cx, (%r15)
leaq -0x40(%rbp), %r15
movq %r12, (%r15)
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x9da8
movq (%r14), %rax
movq (%rax), %rdi
movzwl -0x48(%rbp), %eax
movw %ax, 0x28(%rdi)
addq $0x30, %rdi
movq %r15, %rsi
callq 0x3140
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x17912
movq -0x60(%rbp), %rax
movq 0x30(%rax), %rax
movzwl 0x50(%rax), %ecx
movw %cx, (%r15)
leaq -0x40(%rbp), %r15
movq %r12, (%r15)
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x9da8
movq (%r14), %rax
movq (%rax), %rdi
movzwl -0x48(%rbp), %eax
movw %ax, 0x50(%rdi)
addq $0x58, %rdi
movq %r15, %rsi
callq 0x3140
leaq -0x48(%rbp), %rdi
callq 0x17912
movq (%r14), %rax
movq (%rax), %rax
leaq -0xd0(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x30(%rax), %rsi
movq 0x38(%rax), %rdx
addq %rsi, %rdx
leaq -0xe0(%rbp), %rdi
callq 0x9da8
leaq 0x10(%rbx), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x1771e
movq -0xe0(%rbp), %rdi
cmpq %r15, %rdi
je 0x16c4b
callq 0x3200
movq -0x60(%rbp), %rax
movq (%rax), %rax
movzwl 0x28(%rax), %ecx
leaq -0x40(%rbp), %r15
movw %cx, -0x8(%r15)
movq %r12, (%r15)
movq 0x30(%rax), %rsi
movq 0x38(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x9da8
movq (%r14), %rax
movq 0x18(%rax), %rdi
movzwl -0x48(%rbp), %eax
movw %ax, (%rdi)
addq $0x8, %rdi
movq %r15, %rsi
callq 0x3140
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x17912
movq -0x60(%rbp), %rax
movq 0x30(%rax), %rax
movzwl 0x28(%rax), %ecx
movw %cx, (%r15)
leaq -0x40(%rbp), %r15
movq %r12, (%r15)
movq 0x30(%rax), %rsi
movq 0x38(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x9da8
movq (%r14), %rax
movq 0x18(%rax), %rdi
movzwl -0x48(%rbp), %eax
movw %ax, 0x50(%rdi)
addq $0x58, %rdi
movq %r15, %rsi
callq 0x3140
leaq -0x48(%rbp), %rdi
callq 0x17912
movq (%r14), %rax
movq 0x18(%rax), %rax
leaq -0xb0(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
leaq -0xc0(%rbp), %rdi
callq 0x9da8
leaq 0x60(%rbx), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x1771e
movq -0xc0(%rbp), %rdi
cmpq %r15, %rdi
je 0x16d33
callq 0x3200
movq (%r14), %rax
movq 0x18(%rax), %rax
leaq -0x90(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
addq %rsi, %rdx
leaq -0xa0(%rbp), %rdi
callq 0x9da8
leaq 0x88(%rbx), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x1771e
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x16d80
callq 0x3200
movq -0x60(%rbp), %rax
movq (%rax), %rax
movzwl (%rax), %ecx
leaq -0x40(%rbp), %r15
movw %cx, -0x8(%r15)
movq %r12, (%r15)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x9da8
movq (%r14), %rax
movq 0x30(%rax), %rdi
movzwl -0x48(%rbp), %eax
movw %ax, (%rdi)
addq $0x8, %rdi
movq %r15, %rsi
callq 0x3140
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x17912
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movzwl (%rax), %ecx
movw %cx, (%r15)
leaq -0x40(%rbp), %r15
movq %r12, (%r15)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x9da8
movq (%r14), %rax
movq 0x30(%rax), %rdi
movzwl -0x48(%rbp), %eax
movw %ax, 0x28(%rdi)
addq $0x30, %rdi
movq %r15, %rsi
callq 0x3140
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x17912
movq -0x60(%rbp), %rax
movq 0x30(%rax), %rax
movzwl (%rax), %ecx
movw %cx, (%r15)
leaq -0x40(%rbp), %r15
movq %r12, (%r15)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x9da8
movq (%r14), %rax
movq 0x30(%rax), %rdi
movzwl -0x48(%rbp), %eax
movw %ax, 0x50(%rdi)
addq $0x58, %rdi
movq %r15, %rsi
callq 0x3140
leaq -0x48(%rbp), %rdi
callq 0x17912
movq (%r14), %rax
movq 0x30(%rax), %rax
leaq -0x70(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x30(%rax), %rsi
movq 0x38(%rax), %rdx
addq %rsi, %rdx
leaq -0x80(%rbp), %rdi
callq 0x9da8
leaq 0x38(%rbx), %rdi
leaq -0x80(%rbp), %rsi
callq 0x1771e
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x16eaa
callq 0x3200
movl (%rbx), %eax
leal 0x1(%rax), %ecx
xorl %edx, %edx
cmpl $0x3, %eax
cmovll %ecx, %edx
movl %edx, (%rbx)
leaq -0x60(%rbp), %rdi
callq 0x14176
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
jne 0x16f1b
jmp 0x16f3d
jmp 0x16f2a
jmp 0x16f3a
jmp 0x16f2a
jmp 0x16f3a
jmp 0x16f2a
jmp 0x16f3a
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
jmp 0x16f16
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
jmp 0x16f16
jmp 0x16f2a
jmp 0x16f3a
jmp 0x16f2a
jmp 0x16f3a
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
cmpq %r15, %rdi
je 0x16f3d
callq 0x3200
jmp 0x16f3d
jmp 0x16f2a
jmp 0x16f3a
jmp 0x16f2a
jmp 0x16f3a
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x17912
jmp 0x16f3d
jmp 0x16f3a
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x14176
movq %rbx, %rdi
callq 0x33f0