// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x0, 0xc(%rsp)
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0xaca3
movq %rax, 0x8(%r14)
leaq 0x12(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x95aa
leaq 0xb(%rsp), %rdx
movb $0x42, (%rdx)
movq %r15, %rdi
movq %r14, %rsi
callq 0xaff8
movq 0x72fb(%rip), %r15      # 0x11fc8
leaq 0x3154(%rip), %rsi      # 0xde28
movl $0xe, %edx
movq %r15, %rdi
callq 0x21d0
movq 0x8(%r14), %rsi
subq (%r14), %rsi
movq %r15, %rdi
callq 0x2100
leaq 0x3140(%rip), %rsi      # 0xde37
movl $0x17, %edx
movq %rax, %rdi
callq 0x21d0
leaq 0x3144(%rip), %rsi      # 0xde4f
movl $0x58, %edx
movq %r15, %rdi
callq 0x21d0
leaq 0x3189(%rip), %rsi      # 0xdea8
movl $0x46, %edx
movq %r15, %rdi
callq 0x21d0
leaq 0x31bc(%rip), %rsi      # 0xdeef
movl $0x33, %edx
movq %r15, %rdi
callq 0x21d0
leaq 0x31dc(%rip), %rsi      # 0xdf23
movl $0x45, %edx
movq %r15, %rdi
callq 0x21d0
leaq 0x320e(%rip), %r12      # 0xdf69
movl $0xf, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
movq 0x7266(%rip), %r13      # 0x11fd8
leaq 0xb(%rsp), %rsi
movq %r13, %rdi
callq 0x21f0
movl $0x400, %esi            # imm = 0x400
movq %r13, %rdi
movl $0xa, %edx
callq 0x20f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %rax, %rbp
leaq 0x31b7(%rip), %rsi      # 0xdf79
movl $0x16, %edx
movq %rax, %rdi
callq 0x21d0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %rbx, %rdi
callq 0xa4ac
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4554
leaq 0xc(%rsp), %rbp
movq %r14, %rsi
movq %rbp, %rdx
callq 0x33a8
movq %rbx, %rdi
callq 0xa4ac
leaq 0x3167(%rip), %rsi      # 0xdf90
movl $0x20, %edx
movq %r15, %rdi
callq 0x21d0
movl $0xf, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
movl $0x400, %esi            # imm = 0x400
movq %r13, %rdi
movl $0xa, %edx
callq 0x20f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5a8c
movq %r14, %rsi
movq %rbp, %rdx
callq 0x33a8
movq %rbx, %rdi
callq 0xa4ac
leaq 0x3134(%rip), %rsi      # 0xdfb1
movl $0x36, %edx
movq %r15, %rdi
callq 0x21d0
leaq 0x3157(%rip), %rsi      # 0xdfe8
movl $0x29, %edx
movq %r15, %rdi
callq 0x21d0
movl $0xf, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
movl $0x400, %esi            # imm = 0x400
movq %r13, %rdi
movl $0xa, %edx
callq 0x20f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6d28
movq %r14, %rsi
movq %rbp, %rdx
callq 0x33a8
movq %rbx, %rdi
callq 0xa4ac
leaq 0x312d(%rip), %rsi      # 0xe012
movl $0x2a, %edx
movq %r15, %rdi
callq 0x21d0
movl $0xf, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
movl $0x400, %esi            # imm = 0x400
movq %r13, %rdi
movl $0xa, %edx
callq 0x20f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8084
movq %r14, %rsi
movq %rbp, %rdx
callq 0x33a8
movq %rbx, %rdi
callq 0xa4ac
leaq 0x3104(%rip), %rsi      # 0xe03d
movl $0x20, %edx
movq %r15, %rdi
callq 0x21d0
movl $0xf, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
movl $0x400, %esi            # imm = 0x400
movq %r13, %rdi
movl $0xa, %edx
callq 0x20f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x874e
movq %r14, %rsi
movq %rbp, %rdx
callq 0x33a8
movq %rbx, %rdi
callq 0xa4ac
leaq 0x30d1(%rip), %rsi      # 0xe05e
movl $0x43, %edx
movq %r15, %rdi
callq 0x21d0
movl $0xf, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
movl $0x400, %esi            # imm = 0x400
movq %r13, %rdi
movl $0xa, %edx
callq 0x20f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8c02
movq %r14, %rsi
movq %rbp, %rdx
callq 0x33a8
movq %rbx, %rdi
callq 0xa4ac
leaq 0x30c1(%rip), %rdi      # 0xe0a2
xorl %eax, %eax
callq 0x2040
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop