// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::solveStepByStep(std::vector<char, std::allocator<char>>&)
void Rubik::solveStepByStep(vector<char>& solution){
   unsigned int mov = 0;
   char xar;
   solution.clear();

   Rubik aux(*this);
   aux.solve(solution);
   cout << "You will need " << solution.size() << " movements to solve it.";
   cout << "Rubik's cube has 12 different movements (and double movements: F2, B2, R2, L2, U2, D2). ";
   cout << "\"FBRLUD\" movements indicates clockwise, \"fbrlud\" the opposite movement";
   cout << "\n\t F(ront), B(ack), R(igth), L(eft), U(p), D(own) \n";
   cout << "You will have 3 seconds per movement, there will be pauses to check.\n";
   cout << "Press any key: ";
   cin >> xar; cin.ignore(1024,'\n');

   cout << endl << "Initial rubik's cube: " << endl;
   printAll();

   //sleep(2);
   whiteCross(solution);
   explainMovements(solution, mov); //
   printAll();
   cout << "\n### The white cross it's made.\n";
   cout << "Press any key: ";
   cin.ignore(1024, '\n');

   cornersFirstStep(solution);
   explainMovements(solution, mov);
   printAll();
   cout << "## You will need just a corner to complete first side.";
   cout << "We will do it later, it will be faster. \n";
   cout << "Press any key: ";
   cin.ignore(1024, '\n');

   secondStep(solution);
   explainMovements(solution, mov);
   printAll();
   cout << "## First side and central ring completed.\n";
   cout << "Press any key: ";
   cin.ignore(1024, '\n');

   yellowCross(solution);
   explainMovements(solution, mov);
   printAll();
   cout << "### The yellow cross it's made. ";
   cout << "Press any key: ";
   cin.ignore(1024, '\n');


   permutationFinalCorners(solution);
   explainMovements(solution, mov);
   printAll();
   cout << "### The final corners are good located, but probably not oriented. ";
   cout << "Press any key: ";
   cin.ignore(1024, '\n');

   positionFinalCorners(solution);
   explainMovements(solution, mov);
   printAll();
   printf (BT_ON "\n\n\t---> ¡¡ Good job :D !! <---\n" RESET);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x16030
movq -0x58(%rbp), %rsi
leaq -0x4b(%rbp), %rdi
callq 0x11b70
movq -0x10(%rbp), %rsi
movb $0x42, -0x4c(%rbp)
leaq -0x4b(%rbp), %rdi
leaq -0x4c(%rbp), %rdx
callq 0x144c0
movq 0x8e47(%rip), %rdi      # 0x1cfc8
leaq 0x39df(%rip), %rsi      # 0x17b67
callq 0x2230
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
callq 0x39d0
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x2080
movq %rax, %rdi
leaq 0x39c6(%rip), %rsi      # 0x17b76
callq 0x2230
movq 0x8e0c(%rip), %rdi      # 0x1cfc8
leaq 0x39cb(%rip), %rsi      # 0x17b8e
callq 0x2230
movq 0x8df9(%rip), %rdi      # 0x1cfc8
leaq 0x3a11(%rip), %rsi      # 0x17be7
callq 0x2230
movq 0x8de6(%rip), %rdi      # 0x1cfc8
leaq 0x3a45(%rip), %rsi      # 0x17c2e
callq 0x2230
movq 0x8dd3(%rip), %rdi      # 0x1cfc8
leaq 0x3a66(%rip), %rsi      # 0x17c62
callq 0x2230
movq 0x8dc0(%rip), %rdi      # 0x1cfc8
leaq 0x3a99(%rip), %rsi      # 0x17ca8
callq 0x2230
movq 0x8dbd(%rip), %rdi      # 0x1cfd8
leaq -0x15(%rbp), %rsi
callq 0x2310
movq 0x8dad(%rip), %rdi      # 0x1cfd8
movl $0x400, %esi            # imm = 0x400
movl $0xa, %edx
callq 0x2160
movq 0x8d87(%rip), %rdi      # 0x1cfc8
movq 0x8d70(%rip), %rsi      # 0x1cfb8
callq 0x2260
movq %rax, %rdi
leaq 0x3a61(%rip), %rsi      # 0x17cb8
callq 0x2230
movq %rax, %rdi
movq 0x8d52(%rip), %rsi      # 0x1cfb8
callq 0x2260
movq -0x58(%rbp), %rdi
callq 0x136a0
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5e30
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x14(%rbp), %rdx
callq 0x3f10
movq -0x58(%rbp), %rdi
callq 0x136a0
movq 0x8d26(%rip), %rdi      # 0x1cfc8
leaq 0x3a26(%rip), %rsi      # 0x17ccf
callq 0x2230
movq 0x8d13(%rip), %rdi      # 0x1cfc8
leaq 0x39ec(%rip), %rsi      # 0x17ca8
callq 0x2230
movq 0x8d10(%rip), %rdi      # 0x1cfd8
movl $0x400, %esi            # imm = 0x400
movl $0xa, %edx
callq 0x2160
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x90c0
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x14(%rbp), %rdx
callq 0x3f10
movq -0x58(%rbp), %rdi
callq 0x136a0
movq 0x8cc3(%rip), %rdi      # 0x1cfc8
leaq 0x39e4(%rip), %rsi      # 0x17cf0
callq 0x2230
movq 0x8cb0(%rip), %rdi      # 0x1cfc8
leaq 0x3a08(%rip), %rsi      # 0x17d27
callq 0x2230
movq 0x8c9d(%rip), %rdi      # 0x1cfc8
leaq 0x3976(%rip), %rsi      # 0x17ca8
callq 0x2230
movq 0x8c9a(%rip), %rdi      # 0x1cfd8
movl $0x400, %esi            # imm = 0x400
movl $0xa, %edx
callq 0x2160
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xbd00
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x14(%rbp), %rdx
callq 0x3f10
movq -0x58(%rbp), %rdi
callq 0x136a0
movq 0x8c4d(%rip), %rdi      # 0x1cfc8
leaq 0x39cf(%rip), %rsi      # 0x17d51
callq 0x2230
movq 0x8c3a(%rip), %rdi      # 0x1cfc8
leaq 0x3913(%rip), %rsi      # 0x17ca8
callq 0x2230
movq 0x8c37(%rip), %rdi      # 0x1cfd8
movl $0x400, %esi            # imm = 0x400
movl $0xa, %edx
callq 0x2160
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xead0
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x14(%rbp), %rdx
callq 0x3f10
movq -0x58(%rbp), %rdi
callq 0x136a0
movq 0x8bea(%rip), %rdi      # 0x1cfc8
leaq 0x3997(%rip), %rsi      # 0x17d7c
callq 0x2230
movq 0x8bd7(%rip), %rdi      # 0x1cfc8
leaq 0x38b0(%rip), %rsi      # 0x17ca8
callq 0x2230
movq 0x8bd4(%rip), %rdi      # 0x1cfd8
movl $0x400, %esi            # imm = 0x400
movl $0xa, %edx
callq 0x2160
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xfac0
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x14(%rbp), %rdx
callq 0x3f10
movq -0x58(%rbp), %rdi
callq 0x136a0
movq 0x8b87(%rip), %rdi      # 0x1cfc8
leaq 0x3955(%rip), %rsi      # 0x17d9d
callq 0x2230
movq 0x8b74(%rip), %rdi      # 0x1cfc8
leaq 0x384d(%rip), %rsi      # 0x17ca8
callq 0x2230
movq 0x8b71(%rip), %rdi      # 0x1cfd8
movl $0x400, %esi            # imm = 0x400
movl $0xa, %edx
callq 0x2160
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x10310
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x14(%rbp), %rdx
callq 0x3f10
movq -0x58(%rbp), %rdi
callq 0x136a0
leaq 0x393d(%rip), %rdi      # 0x17de1
movb $0x0, %al
callq 0x2040
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)