// File: EstherJin[P]TetrisRemake/l.cc
// Function: L::turnPos(int)
vector<Coordinates> L::turnPos(int shift){
  vector<Coordinates> cds = coords;
  if (shift > 0){
    shift = shift % 4;
  } else{
    shift = ((-4 * shift) - (shift * -1)) % 4;
  }
  int pos = position;
  while (shift > 0){
    if (pos == 0){
      cds.at(0).col -= 2;
      cds.at(3).row -= 2;
      cds.at(3).col -= 2;
    } else if (pos == 1) {
      cds.at(2).row -= 1;
      cds.at(2).col += 1;
      cds.at(3).row += 1;
      cds.at(3).col += 1;
    } else if (pos == 2) {
      cds.at(0).row -= 1;
      cds.at(1).col += 1;
      cds.at(2).row -= 1;
      cds.at(2).col -= 1;
    } else {
      cds.at(0).row += 1;
      cds.at(0).col += 2;
      cds.at(1).col -= 1;
      cds.at(2).row += 2;
      cds.at(3).row += 1;
      cds.at(3).col += 1;
    }
    --shift;
    pos = (pos + 1) % 4;
  }
  return cds;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x38(%rbp)
movb $0x0, -0x15(%rbp)
addq $0x30, %rsi
callq 0x13660
cmpl $0x0, -0x14(%rbp)
jle 0x2325c
movl -0x14(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %edx, -0x14(%rbp)
jmp 0x23274
imull $0xfffffffc, -0x14(%rbp), %eax # imm = 0xFFFFFFFC
imull $-0x1, -0x14(%rbp), %ecx
subl %ecx, %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %edx, -0x14(%rbp)
movq -0x38(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0x2353e
cmpl $0x0, -0x1c(%rbp)
jne 0x2330d
movq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa800
movq %rax, -0x50(%rbp)
jmp 0x232a1
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rax
movl 0x4(%rax), %ecx
addl $-0x2, %ecx
movl %ecx, 0x4(%rax)
movl $0x3, %esi
callq 0xa800
movq %rax, -0x58(%rbp)
jmp 0x232c2
movq -0x48(%rbp), %rdi
movq -0x58(%rbp), %rax
movl (%rax), %ecx
addl $-0x2, %ecx
movl %ecx, (%rax)
movl $0x3, %esi
callq 0xa800
movq %rax, -0x60(%rbp)
jmp 0x232e1
movq -0x60(%rbp), %rax
movl 0x4(%rax), %ecx
subl $0x2, %ecx
movl %ecx, 0x4(%rax)
jmp 0x2351f
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0xa880
jmp 0x2355e
cmpl $0x1, -0x1c(%rbp)
jne 0x23399
movq -0x48(%rbp), %rdi
movl $0x2, %esi
callq 0xa800
movq %rax, -0x68(%rbp)
jmp 0x2332b
movq -0x48(%rbp), %rdi
movq -0x68(%rbp), %rax
movl (%rax), %ecx
decl %ecx
movl %ecx, (%rax)
movl $0x2, %esi
callq 0xa800
movq %rax, -0x70(%rbp)
jmp 0x23349
movq -0x48(%rbp), %rdi
movq -0x70(%rbp), %rax
movl 0x4(%rax), %ecx
incl %ecx
movl %ecx, 0x4(%rax)
movl $0x3, %esi
callq 0xa800
movq %rax, -0x78(%rbp)
jmp 0x23369
movq -0x48(%rbp), %rdi
movq -0x78(%rbp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movl $0x3, %esi
callq 0xa800
movq %rax, -0x80(%rbp)
jmp 0x23387
movq -0x80(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0x2351d
cmpl $0x2, -0x1c(%rbp)
jne 0x2343c
movq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa800
movq %rax, -0x88(%rbp)
jmp 0x233b9
movq -0x48(%rbp), %rdi
movq -0x88(%rbp), %rax
movl (%rax), %ecx
decl %ecx
movl %ecx, (%rax)
movl $0x1, %esi
callq 0xa800
movq %rax, -0x90(%rbp)
jmp 0x233dd
movq -0x48(%rbp), %rdi
movq -0x90(%rbp), %rax
movl 0x4(%rax), %ecx
incl %ecx
movl %ecx, 0x4(%rax)
movl $0x2, %esi
callq 0xa800
movq %rax, -0x98(%rbp)
jmp 0x23403
movq -0x48(%rbp), %rdi
movq -0x98(%rbp), %rax
movl (%rax), %ecx
decl %ecx
movl %ecx, (%rax)
movl $0x2, %esi
callq 0xa800
movq %rax, -0xa0(%rbp)
jmp 0x23427
movq -0xa0(%rbp), %rax
movl 0x4(%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0x2351b
movq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa800
movq %rax, -0xa8(%rbp)
jmp 0x23452
movq -0x48(%rbp), %rdi
movq -0xa8(%rbp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
xorl %eax, %eax
movl %eax, %esi
callq 0xa800
movq %rax, -0xb0(%rbp)
jmp 0x23475
movq -0x48(%rbp), %rdi
movq -0xb0(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
movl $0x1, %esi
callq 0xa800
movq %rax, -0xb8(%rbp)
jmp 0x2349c
movq -0x48(%rbp), %rdi
movq -0xb8(%rbp), %rax
movl 0x4(%rax), %ecx
decl %ecx
movl %ecx, 0x4(%rax)
movl $0x2, %esi
callq 0xa800
movq %rax, -0xc0(%rbp)
jmp 0x234c2
movq -0x48(%rbp), %rdi
movq -0xc0(%rbp), %rax
movl (%rax), %ecx
addl $0x2, %ecx
movl %ecx, (%rax)
movl $0x3, %esi
callq 0xa800
movq %rax, -0xc8(%rbp)
jmp 0x234e7
movq -0x48(%rbp), %rdi
movq -0xc8(%rbp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movl $0x3, %esi
callq 0xa800
movq %rax, -0xd0(%rbp)
jmp 0x2350b
movq -0xd0(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0x2351d
jmp 0x2351f
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %edx, -0x1c(%rbp)
jmp 0x2327e
movb $0x1, -0x15(%rbp)
testb $0x1, -0x15(%rbp)
jne 0x23551
movq -0x48(%rbp), %rdi
callq 0xa880
movq -0x40(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x65c0
nopw (%rax,%rax)