// File: /workspace/github_cpp_makefile_star2_O1/EstherJin[P]TetrisRemake/i.cc
// Function: I::turn(int)
void I::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).row -= 1;
      coords.at(1).col -= 1;
      stat = {c, coords.at(1), true};
      setState(stat);
      notifyObservers();
      stat = {' ', coords.at(2), false};
      setState(stat);
      notifyObservers();
      coords.at(2).row -= 2;
      coords.at(2).col -= 2;
      stat = {c, coords.at(2), true};
      setState(stat);
      notifyObservers();
      stat = {' ', coords.at(3), false};
      setState(stat);
      notifyObservers();
      coords.at(3).row -= 3;
      coords.at(3).col -= 3;
      stat = {c, coords.at(3), true};
      setState(stat);
      notifyObservers();
      position = 1;
    } else {
      State stat = {' ', coords.at(1), false};
      setState(stat);
      notifyObservers();
      coords.at(1).row += 1;
      coords.at(1).col += 1;
      stat = {c, coords.at(1), true};
      setState(stat);
      notifyObservers();
      stat = {' ', coords.at(2), false};
      setState(stat);
      notifyObservers();
      coords.at(2).row += 2;
      coords.at(2).col += 2;
      stat = {c, coords.at(2), true};
      setState(stat);
      notifyObservers();
      stat = {' ', coords.at(3), false};
      setState(stat);
      notifyObservers();
      coords.at(3).row += 3;
      coords.at(3).col += 3;
      stat = {c, coords.at(3), true};
      setState(stat);
      notifyObservers();
      position = 0;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
jg 0xa874
leal (%rsi,%rsi,2), %esi
movl $0x3, %eax
subl %esi, %eax
negl %esi
testl %esi, %esi
cmovnsl %esi, %eax
andl $-0x4, %eax
subl %eax, %esi
testb $0x1, %sil
je 0xab68
movabsq $0x100000000, %r15      # imm = 0x100000000
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpl $0x0, 0x48(%rbx)
je 0xa9f0
cmpq $0x1, %rdx
jbe 0xab73
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
shlq $0x20, %rsi
leaq 0x8(%rbx), %r14
orq $0x20, %rsi
movq %r14, %rdi
callq 0x11102
movq %r14, %rdi
callq 0x110d4
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rdx
jbe 0xab73
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
incl %esi
movl %esi, 0x8(%rax)
incl %edx
movl %edx, 0xc(%rax)
movzbl 0x4c(%rbx), %eax
shlq $0x20, %rsi
orq %rax, %rsi
orq %r15, %rdx
movq %r14, %rdi
callq 0x11102
movq %r14, %rdi
callq 0x110d4
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x2, %rdx
jbe 0xab81
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
shlq $0x20, %rsi
orq $0x20, %rsi
movq %r14, %rdi
callq 0x11102
movq %r14, %rdi
callq 0x110d4
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x2, %rdx
jbe 0xab81
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
addl $0x2, %esi
movl %esi, 0x10(%rax)
addl $0x2, %edx
movl %edx, 0x14(%rax)
movzbl 0x4c(%rbx), %eax
shlq $0x20, %rsi
orq %rax, %rsi
orq %r15, %rdx
movq %r14, %rdi
callq 0x11102
movq %r14, %rdi
callq 0x110d4
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x3, %rdx
jbe 0xab8f
movl 0x18(%rax), %esi
movl 0x1c(%rax), %edx
shlq $0x20, %rsi
orq $0x20, %rsi
movq %r14, %rdi
callq 0x11102
movq %r14, %rdi
callq 0x110d4
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x3, %rdx
jbe 0xab8f
xorl %ebp, %ebp
movl $0x3, %edx
jmp 0xab39
cmpq $0x1, %rdx
jbe 0xab73
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
shlq $0x20, %rsi
leaq 0x8(%rbx), %r14
orq $0x20, %rsi
movq %r14, %rdi
callq 0x11102
movq %r14, %rdi
callq 0x110d4
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rdx
jbe 0xab73
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
decl %esi
movl %esi, 0x8(%rax)
decl %edx
movl %edx, 0xc(%rax)
movzbl 0x4c(%rbx), %eax
shlq $0x20, %rsi
orq %rax, %rsi
orq %r15, %rdx
movq %r14, %rdi
callq 0x11102
movq %r14, %rdi
callq 0x110d4
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x2, %rdx
jbe 0xab81
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
shlq $0x20, %rsi
orq $0x20, %rsi
movq %r14, %rdi
callq 0x11102
movq %r14, %rdi
callq 0x110d4
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x2, %rdx
jbe 0xab81
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
addl $-0x2, %esi
movl %esi, 0x10(%rax)
addl $-0x2, %edx
movl %edx, 0x14(%rax)
movzbl 0x4c(%rbx), %eax
shlq $0x20, %rsi
orq %rax, %rsi
orq %r15, %rdx
movq %r14, %rdi
callq 0x11102
movq %r14, %rdi
callq 0x110d4
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x3, %rdx
jbe 0xab8f
movl 0x18(%rax), %esi
movl 0x1c(%rax), %edx
shlq $0x20, %rsi
orq $0x20, %rsi
movq %r14, %rdi
callq 0x11102
movq %r14, %rdi
callq 0x110d4
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x3, %rdx
jbe 0xab8f
movl $0x1, %ebp
movl $0xfffffffd, %edx       # imm = 0xFFFFFFFD
movl 0x18(%rax), %esi
addl %edx, %esi
movl %esi, 0x18(%rax)
addl 0x1c(%rax), %edx
movl %edx, 0x1c(%rax)
movzbl 0x4c(%rbx), %eax
shlq $0x20, %rsi
orq %rax, %rsi
orq %r15, %rdx
movq %r14, %rdi
callq 0x11102
movq %r14, %rdi
callq 0x110d4
movl %ebp, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x85ea(%rip), %rdi      # 0x13164
movl $0x1, %esi
jmp 0xab9b
leaq 0x85dc(%rip), %rdi      # 0x13164
movl $0x2, %esi
jmp 0xab9b
leaq 0x85ce(%rip), %rdi      # 0x13164
movl $0x3, %esi
xorl %eax, %eax
callq 0x53d0