// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::correctMistakes()
void Rubik::correctMistakes(){
   char letter;
   int number;
   do{
      Rubik::printNumbers(cout);
      do{
         cout << "Choose the position with the wrong colour [1,54]\n";
         cin >> number;
      }while(number < 1 || number > 54);

      cout << "And the new colour is... [w, o, g, r, l, y]\n";
      if (number == 1)
         readSticker(corner[3].up);
      else if (number == 2)
         readSticker(edge[2].up);
      else if (number == 3)
         readSticker(corner[2].up);
      else if (number == 4)
         readSticker(edge[3].up);
      else if (number == 5)
         readSticker(center[0].center);
      else if (number == 6)
         readSticker(edge[1].up);
      else if (number == 7)
         readSticker(corner[0].up);
      else if (number == 8)
         readSticker(edge[0].up);
      else if (number == 9)
         readSticker(corner[1].up);

      else if (number == 10)
         readSticker(corner[3].right);
      else if (number == 11)
         readSticker(edge[3].down);
      else if (number == 12)
         readSticker(corner[0].left);
      else if (number == 13)
         readSticker(edge[10].down);
      else if (number == 14)
         readSticker(center[4].center);
      else if (number == 15)
         readSticker(edge[11].down);
      else if (number == 16)
         readSticker(corner[7].right);
      else if (number == 17)
         readSticker(edge[7].down);
      else if (number == 18)
         readSticker(corner[4].left);

      else if (number == 19)
         readSticker(corner[0].right);
      else if (number == 20)
         readSticker(edge[0].down);
      else if (number == 21)
         readSticker(corner[1].left);
      else if (number == 22)
         readSticker(edge[11].up);
      else if (number == 23)
         readSticker(center[1].center);
      else if (number == 24)
         readSticker(edge[8].up);
      else if (number == 25)
         readSticker(corner[4].right);
      else if (number == 26)
         readSticker(edge[4].down);
      else if (number == 27)
         readSticker(corner[5].left);

      else if (number == 28)
         readSticker(corner[1].right);
      else if (number == 29)
         readSticker(edge[1].down);
      else if (number == 30)
         readSticker(corner[2].left);
      else if (number == 31)
         readSticker(edge[8].down);
      else if (number == 32)
         readSticker(center[2].center);
      else if (number == 33)
         readSticker(edge[9].down);
      else if (number == 34)
         readSticker(corner[5].right);
      else if (number == 35)
         readSticker(edge[5].down);
      else if (number == 36)
         readSticker(corner[6].left);

      else if (number == 37)
         readSticker(corner[2].right);
      else if (number == 38)
         readSticker(edge[2].down);
      else if (number == 39)
         readSticker(corner[3].left);
      else if (number == 40)
         readSticker(edge[9].up);
      else if (number == 41)
         readSticker(center[3].center);
      else if (number == 42)
         readSticker(edge[10].up);
      else if (number == 43)
         readSticker(corner[6].right);
      else if (number == 44)
         readSticker(edge[6].down);
      else if (number == 45)
         readSticker(corner[7].left);

      else if (number == 46)
         readSticker(corner[4].up);
      else if (number == 47)
         readSticker(edge[4].up);
      else if (number == 48)
         readSticker(corner[5].up);
      else if (number == 49)
         readSticker(edge[7].up);
      else if (number == 50)
         readSticker(center[5].center);
      else if (number == 51)
         readSticker(edge[5].up);
      else if (number == 52)
         readSticker(corner[7].up);
      else if (number == 53)
         readSticker(edge[6].up);
      else if (number == 54)
         readSticker(corner[6].up);

      printAll();
      cout << "Do you want to change other colour? [y/n]\n";
      cin >> letter;
   }while (letter == 'y' || letter == 'Y');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0xa50d(%rip), %rdi      # 0x1cfc8
callq 0x13410
movq 0xa501(%rip), %rdi      # 0x1cfc8
leaq 0x500f(%rip), %rsi      # 0x17add
callq 0x2230
movq 0xa4fe(%rip), %rdi      # 0x1cfd8
leaq -0x10(%rbp), %rsi
callq 0x2130
movb $0x1, %al
cmpl $0x1, -0x10(%rbp)
movb %al, -0x19(%rbp)
jl 0x12af8
cmpl $0x36, -0x10(%rbp)
setg %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x12ac0
movq 0xa4c2(%rip), %rdi      # 0x1cfc8
leaq 0x5002(%rip), %rsi      # 0x17b0f
callq 0x2230
cmpl $0x1, -0x10(%rbp)
jne 0x12b38
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x9, %rsi
movq 0xa4aa(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x133b2
cmpl $0x2, -0x10(%rbp)
jne 0x12b5e
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x4, %rsi
movq 0xa484(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x133b0
cmpl $0x3, -0x10(%rbp)
jne 0x12b84
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x6, %rsi
movq 0xa45e(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x133ae
cmpl $0x4, -0x10(%rbp)
jne 0x12baa
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x6, %rsi
movq 0xa438(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x133ac
cmpl $0x5, -0x10(%rbp)
jne 0x12bc8
movq -0x18(%rbp), %rsi
movq 0xa41d(%rip), %rdx      # 0x1cfd8
movq %rsi, %rdi
callq 0x13570
jmp 0x133aa
cmpl $0x6, -0x10(%rbp)
jne 0x12bee
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x2, %rsi
movq 0xa3f4(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x133a8
cmpl $0x7, -0x10(%rbp)
jne 0x12c10
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
movq 0xa3d2(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x133a6
cmpl $0x8, -0x10(%rbp)
jne 0x12c32
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
movq 0xa3b0(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x133a4
cmpl $0x9, -0x10(%rbp)
jne 0x12c58
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x3, %rsi
movq 0xa38a(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x133a2
cmpl $0xa, -0x10(%rbp)
jne 0x12c82
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x9, %rsi
addq $0x2, %rsi
movq 0xa360(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x133a0
cmpl $0xb, -0x10(%rbp)
jne 0x12cac
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x6, %rsi
addq $0x1, %rsi
movq 0xa336(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1339e
cmpl $0xc, -0x10(%rbp)
jne 0x12cd2
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x1, %rsi
movq 0xa310(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1339c
cmpl $0xd, -0x10(%rbp)
jne 0x12cfc
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x14, %rsi
addq $0x1, %rsi
movq 0xa2e6(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1339a
cmpl $0xe, -0x10(%rbp)
jne 0x12d1e
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x4, %rsi
movq 0xa2c4(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13398
cmpl $0xf, -0x10(%rbp)
jne 0x12d48
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x16, %rsi
addq $0x1, %rsi
movq 0xa29a(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13396
cmpl $0x10, -0x10(%rbp)
jne 0x12d72
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x15, %rsi
addq $0x2, %rsi
movq 0xa270(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13394
cmpl $0x11, -0x10(%rbp)
jne 0x12d9c
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0xe, %rsi
addq $0x1, %rsi
movq 0xa246(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13392
cmpl $0x12, -0x10(%rbp)
jne 0x12dc6
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0xc, %rsi
addq $0x1, %rsi
movq 0xa21c(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13390
cmpl $0x13, -0x10(%rbp)
jne 0x12dec
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x2, %rsi
movq 0xa1f6(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1338e
cmpl $0x14, -0x10(%rbp)
jne 0x12e12
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x1, %rsi
movq 0xa1d0(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1338c
cmpl $0x15, -0x10(%rbp)
jne 0x12e3c
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x3, %rsi
addq $0x1, %rsi
movq 0xa1a6(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1338a
cmpl $0x16, -0x10(%rbp)
jne 0x12e62
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x16, %rsi
movq 0xa180(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13388
cmpl $0x17, -0x10(%rbp)
jne 0x12e84
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1, %rsi
movq 0xa15e(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13386
cmpl $0x18, -0x10(%rbp)
jne 0x12eaa
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x10, %rsi
movq 0xa138(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13384
cmpl $0x19, -0x10(%rbp)
jne 0x12ed4
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0xc, %rsi
addq $0x2, %rsi
movq 0xa10e(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13382
cmpl $0x1a, -0x10(%rbp)
jne 0x12efe
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x8, %rsi
addq $0x1, %rsi
movq 0xa0e4(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13380
cmpl $0x1b, -0x10(%rbp)
jne 0x12f28
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0xf, %rsi
addq $0x1, %rsi
movq 0xa0ba(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1337e
cmpl $0x1c, -0x10(%rbp)
jne 0x12f52
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x3, %rsi
addq $0x2, %rsi
movq 0xa090(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1337c
cmpl $0x1d, -0x10(%rbp)
jne 0x12f7c
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x2, %rsi
addq $0x1, %rsi
movq 0xa066(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1337a
cmpl $0x1e, -0x10(%rbp)
jne 0x12fa6
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x6, %rsi
addq $0x1, %rsi
movq 0xa03c(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13378
cmpl $0x1f, -0x10(%rbp)
jne 0x12fd0
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x10, %rsi
addq $0x1, %rsi
movq 0xa012(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13376
cmpl $0x20, -0x10(%rbp)
jne 0x12ff2
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x2, %rsi
movq 0x9ff0(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13374
cmpl $0x21, -0x10(%rbp)
jne 0x1301c
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x12, %rsi
addq $0x1, %rsi
movq 0x9fc6(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13372
cmpl $0x22, -0x10(%rbp)
jne 0x13046
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0xf, %rsi
addq $0x2, %rsi
movq 0x9f9c(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13370
cmpl $0x23, -0x10(%rbp)
jne 0x13070
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0xa, %rsi
addq $0x1, %rsi
movq 0x9f72(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1336e
cmpl $0x24, -0x10(%rbp)
jne 0x1309a
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x12, %rsi
addq $0x1, %rsi
movq 0x9f48(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1336c
cmpl $0x25, -0x10(%rbp)
jne 0x130c4
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x6, %rsi
addq $0x2, %rsi
movq 0x9f1e(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1336a
cmpl $0x26, -0x10(%rbp)
jne 0x130ee
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x4, %rsi
addq $0x1, %rsi
movq 0x9ef4(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13368
cmpl $0x27, -0x10(%rbp)
jne 0x13118
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x9, %rsi
addq $0x1, %rsi
movq 0x9eca(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13366
cmpl $0x28, -0x10(%rbp)
jne 0x1313e
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x12, %rsi
movq 0x9ea4(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13364
cmpl $0x29, -0x10(%rbp)
jne 0x13160
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x3, %rsi
movq 0x9e82(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13362
cmpl $0x2a, -0x10(%rbp)
jne 0x13186
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x14, %rsi
movq 0x9e5c(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13360
cmpl $0x2b, -0x10(%rbp)
jne 0x131b0
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x12, %rsi
addq $0x2, %rsi
movq 0x9e32(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1335e
cmpl $0x2c, -0x10(%rbp)
jne 0x131da
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0xc, %rsi
addq $0x1, %rsi
movq 0x9e08(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1335c
cmpl $0x2d, -0x10(%rbp)
jne 0x13204
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x15, %rsi
addq $0x1, %rsi
movq 0x9dde(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1335a
cmpl $0x2e, -0x10(%rbp)
jne 0x1322a
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0xc, %rsi
movq 0x9db8(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13358
cmpl $0x2f, -0x10(%rbp)
jne 0x13250
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x8, %rsi
movq 0x9d92(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13356
cmpl $0x30, -0x10(%rbp)
jne 0x13276
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0xf, %rsi
movq 0x9d6c(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13354
cmpl $0x31, -0x10(%rbp)
jne 0x1329c
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0xe, %rsi
movq 0x9d46(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13352
cmpl $0x32, -0x10(%rbp)
jne 0x132be
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x5, %rsi
movq 0x9d24(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x13350
cmpl $0x33, -0x10(%rbp)
jne 0x132e1
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0xa, %rsi
movq 0x9cfe(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1334e
cmpl $0x34, -0x10(%rbp)
jne 0x13304
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x15, %rsi
movq 0x9cdb(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1334c
cmpl $0x35, -0x10(%rbp)
jne 0x13327
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0xc, %rsi
movq 0x9cb8(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1334a
cmpl $0x36, -0x10(%rbp)
jne 0x13348
movq -0x18(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x12, %rsi
movq 0x9c95(%rip), %rdx      # 0x1cfd8
callq 0x13570
jmp 0x1334a
jmp 0x1334c
jmp 0x1334e
jmp 0x13350
jmp 0x13352
jmp 0x13354
jmp 0x13356
jmp 0x13358
jmp 0x1335a
jmp 0x1335c
jmp 0x1335e
jmp 0x13360
jmp 0x13362
jmp 0x13364
jmp 0x13366
jmp 0x13368
jmp 0x1336a
jmp 0x1336c
jmp 0x1336e
jmp 0x13370
jmp 0x13372
jmp 0x13374
jmp 0x13376
jmp 0x13378
jmp 0x1337a
jmp 0x1337c
jmp 0x1337e
jmp 0x13380
jmp 0x13382
jmp 0x13384
jmp 0x13386
jmp 0x13388
jmp 0x1338a
jmp 0x1338c
jmp 0x1338e
jmp 0x13390
jmp 0x13392
jmp 0x13394
jmp 0x13396
jmp 0x13398
jmp 0x1339a
jmp 0x1339c
jmp 0x1339e
jmp 0x133a0
jmp 0x133a2
jmp 0x133a4
jmp 0x133a6
jmp 0x133a8
jmp 0x133aa
jmp 0x133ac
jmp 0x133ae
jmp 0x133b0
jmp 0x133b2
movq -0x18(%rbp), %rdi
callq 0x136a0
movq 0x9c06(%rip), %rdi      # 0x1cfc8
leaq 0x4773(%rip), %rsi      # 0x17b3c
callq 0x2230
movq 0x9c03(%rip), %rdi      # 0x1cfd8
leaq -0x9(%rbp), %rsi
callq 0x2310
movsbl -0x9(%rbp), %ecx
movb $0x1, %al
cmpl $0x79, %ecx
movb %al, -0x1a(%rbp)
je 0x133f9
movsbl -0x9(%rbp), %eax
cmpl $0x59, %eax
sete %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
testb $0x1, %al
jne 0x12ab4
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)