// File: EstherJin[P]TetrisRemake/s.cc
// Function: S::turn(int)
void S::turn(int shift){
  if (shift > 0){
    shift = shift % 4;
  } else{
    shift = ((-4 * shift) - (shift * -1)) % 4;
  }
  if ((shift % 2) != 0){
    if (position == 0){
      State stat = {' ', coords.at(1), false};
      setState(stat);
      notifyObservers();
      coords.at(1).col -= 2;
      stat = {c, coords.at(1), true};
      setState(stat);
      notifyObservers();
      stat = {' ', coords.at(2), false};
      setState(stat);
      notifyObservers();
      coords.at(2).row -= 2;
      stat = {c, coords.at(2), true};
      setState(stat);
      notifyObservers();
      position = 1;
    } else {
      State stat = {' ', coords.at(1), false};
      setState(stat);
      notifyObservers();
      coords.at(1).col += 2;
      stat = {c, coords.at(1), true};
      setState(stat);
      notifyObservers();
      stat = {' ', coords.at(2), false};
      setState(stat);
      notifyObservers();
      coords.at(2).row += 2;
      stat = {c, coords.at(2), true};
      setState(stat);
      notifyObservers();
      position = 0;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x118(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x24fa3
movl -0xc(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %edx, -0xc(%rbp)
jmp 0x24fbb
imull $0xfffffffc, -0xc(%rbp), %eax # imm = 0xFFFFFFFC
imull $-0x1, -0xc(%rbp), %ecx
subl %ecx, %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %edx, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x2545b
movq -0x118(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jne 0x251dd
movq -0x118(%rbp), %rdi
movb $0x20, -0x1c(%rbp)
addq $0x30, %rdi
movl $0x1, %esi
callq 0xa800
movq -0x118(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movb $0x0, -0x10(%rbp)
addq $0x8, %rdi
movq -0x1c(%rbp), %rax
movq %rax, -0x2c(%rbp)
movq -0x14(%rbp), %rax
movq %rax, -0x24(%rbp)
movq -0x2c(%rbp), %rsi
movq -0x24(%rbp), %rdx
callq 0x29140
movq -0x118(%rbp), %rdi
addq $0x8, %rdi
callq 0x290c0
movq -0x118(%rbp), %rdi
addq $0x30, %rdi
movl $0x1, %esi
callq 0xa800
movq -0x118(%rbp), %rdi
movl 0x4(%rax), %ecx
subl $0x2, %ecx
movl %ecx, 0x4(%rax)
movb 0x4c(%rdi), %al
movb %al, -0x3c(%rbp)
addq $0x30, %rdi
movl $0x1, %esi
callq 0xa800
movq -0x118(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movb $0x1, -0x30(%rbp)
movq -0x3c(%rbp), %rax
movq %rax, -0x1c(%rbp)
movq -0x34(%rbp), %rax
movq %rax, -0x14(%rbp)
addq $0x8, %rdi
movq -0x1c(%rbp), %rax
movq %rax, -0x4c(%rbp)
movq -0x14(%rbp), %rax
movq %rax, -0x44(%rbp)
movq -0x4c(%rbp), %rsi
movq -0x44(%rbp), %rdx
callq 0x29140
movq -0x118(%rbp), %rdi
addq $0x8, %rdi
callq 0x290c0
movq -0x118(%rbp), %rdi
movb $0x20, -0x5c(%rbp)
addq $0x30, %rdi
movl $0x2, %esi
callq 0xa800
movq -0x118(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movb $0x0, -0x50(%rbp)
movq -0x5c(%rbp), %rax
movq %rax, -0x1c(%rbp)
movq -0x54(%rbp), %rax
movq %rax, -0x14(%rbp)
addq $0x8, %rdi
movq -0x1c(%rbp), %rax
movq %rax, -0x6c(%rbp)
movq -0x14(%rbp), %rax
movq %rax, -0x64(%rbp)
movq -0x6c(%rbp), %rsi
movq -0x64(%rbp), %rdx
callq 0x29140
movq -0x118(%rbp), %rdi
addq $0x8, %rdi
callq 0x290c0
movq -0x118(%rbp), %rdi
addq $0x30, %rdi
movl $0x2, %esi
callq 0xa800
movq -0x118(%rbp), %rdi
movl (%rax), %ecx
subl $0x2, %ecx
movl %ecx, (%rax)
movb 0x4c(%rdi), %al
movb %al, -0x7c(%rbp)
addq $0x30, %rdi
movl $0x2, %esi
callq 0xa800
movq -0x118(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x78(%rbp)
movb $0x1, -0x70(%rbp)
movq -0x7c(%rbp), %rax
movq %rax, -0x1c(%rbp)
movq -0x74(%rbp), %rax
movq %rax, -0x14(%rbp)
addq $0x8, %rdi
movq -0x1c(%rbp), %rax
movq %rax, -0x8c(%rbp)
movq -0x14(%rbp), %rax
movq %rax, -0x84(%rbp)
movq -0x8c(%rbp), %rsi
movq -0x84(%rbp), %rdx
callq 0x29140
movq -0x118(%rbp), %rdi
addq $0x8, %rdi
callq 0x290c0
movq -0x118(%rbp), %rax
movl $0x1, 0x48(%rax)
jmp 0x25459
movq -0x118(%rbp), %rdi
movb $0x20, -0x9c(%rbp)
addq $0x30, %rdi
movl $0x1, %esi
callq 0xa800
movq -0x118(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x98(%rbp)
movb $0x0, -0x90(%rbp)
addq $0x8, %rdi
movq -0x9c(%rbp), %rax
movq %rax, -0xac(%rbp)
movq -0x94(%rbp), %rax
movq %rax, -0xa4(%rbp)
movq -0xac(%rbp), %rsi
movq -0xa4(%rbp), %rdx
callq 0x29140
movq -0x118(%rbp), %rdi
addq $0x8, %rdi
callq 0x290c0
movq -0x118(%rbp), %rdi
addq $0x30, %rdi
movl $0x1, %esi
callq 0xa800
movq -0x118(%rbp), %rdi
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
movb 0x4c(%rdi), %al
movb %al, -0xbc(%rbp)
addq $0x30, %rdi
movl $0x1, %esi
callq 0xa800
movq -0x118(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
movb $0x1, -0xb0(%rbp)
movq -0xbc(%rbp), %rax
movq %rax, -0x9c(%rbp)
movq -0xb4(%rbp), %rax
movq %rax, -0x94(%rbp)
addq $0x8, %rdi
movq -0x9c(%rbp), %rax
movq %rax, -0xcc(%rbp)
movq -0x94(%rbp), %rax
movq %rax, -0xc4(%rbp)
movq -0xcc(%rbp), %rsi
movq -0xc4(%rbp), %rdx
callq 0x29140
movq -0x118(%rbp), %rdi
addq $0x8, %rdi
callq 0x290c0
movq -0x118(%rbp), %rdi
movb $0x20, -0xdc(%rbp)
addq $0x30, %rdi
movl $0x2, %esi
callq 0xa800
movq -0x118(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0xd8(%rbp)
movb $0x0, -0xd0(%rbp)
movq -0xdc(%rbp), %rax
movq %rax, -0x9c(%rbp)
movq -0xd4(%rbp), %rax
movq %rax, -0x94(%rbp)
addq $0x8, %rdi
movq -0x9c(%rbp), %rax
movq %rax, -0xec(%rbp)
movq -0x94(%rbp), %rax
movq %rax, -0xe4(%rbp)
movq -0xec(%rbp), %rsi
movq -0xe4(%rbp), %rdx
callq 0x29140
movq -0x118(%rbp), %rdi
addq $0x8, %rdi
callq 0x290c0
movq -0x118(%rbp), %rdi
addq $0x30, %rdi
movl $0x2, %esi
callq 0xa800
movq -0x118(%rbp), %rdi
movl (%rax), %ecx
addl $0x2, %ecx
movl %ecx, (%rax)
movb 0x4c(%rdi), %al
movb %al, -0xfc(%rbp)
addq $0x30, %rdi
movl $0x2, %esi
callq 0xa800
movq -0x118(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0xf8(%rbp)
movb $0x1, -0xf0(%rbp)
movq -0xfc(%rbp), %rax
movq %rax, -0x9c(%rbp)
movq -0xf4(%rbp), %rax
movq %rax, -0x94(%rbp)
addq $0x8, %rdi
movq -0x9c(%rbp), %rax
movq %rax, -0x10c(%rbp)
movq -0x94(%rbp), %rax
movq %rax, -0x104(%rbp)
movq -0x10c(%rbp), %rsi
movq -0x104(%rbp), %rdx
callq 0x29140
movq -0x118(%rbp), %rdi
addq $0x8, %rdi
callq 0x290c0
movq -0x118(%rbp), %rax
movl $0x0, 0x48(%rax)
jmp 0x2545b
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw %cs:(%rax,%rax)