// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::permutationFinalCorners(std::vector<char, std::allocator<char>>&)
void Rubik::permutationFinalCorners(vector<char>& solution){
	bool repeat = true;
   while (repeat){
      if (searchCorner('y', 'o', 'g') == 4){
      	if (searchCorner('y', 'r', 'l') == 5) // rDLdRDld
            sequence("rDLdRDld", solution);
      	else if(searchCorner('y', 'r', 'l') == 7) // BdfDbdFD
            sequence("BdfDbdFD", solution);

      	repeat = false;
      }
      else if (searchCorner('y', 'g', 'r') == 5){
      	if (searchCorner('y', 'r', 'l') == 4) // bDFdBDfd
            sequence("bDFdBDfd", solution);
      	else if (searchCorner('y', 'r', 'l') == 7) // LdrDldRD
            sequence("LdrDldRD", solution);

      	repeat = false;
      }
      else if (searchCorner('y', 'l', 'o') == 7){
      	if (searchCorner('y', 'r', 'l') == 4) // RdlDrdLD
            sequence("RdlDrdLD", solution);
      	else if (searchCorner('y', 'r', 'l') == 5) // fDBdFDbd
            sequence("fDBdFDbd", solution);

      	repeat = false;
      }
      else if (searchCorner('y', 'r', 'l') == 6){
      	if (searchCorner('y', 'o', 'g') == 5) // FdbDfdBD
            sequence("FdbDfdBD", solution);
      	else if (searchCorner('y', 'o', 'g') == 7) // lDRdLDrd
            sequence("lDRdLDrd", solution);

      	repeat = false;
      }
      else // LdrDldRD
         sequence("LdrDldRD", solution);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x198(%rbp)
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
je 0x102fd
movq -0x198(%rbp), %rdi
movb $0x79, -0x12(%rbp)
movb $0x6f, -0x13(%rbp)
movb $0x67, -0x14(%rbp)
leaq -0x12(%rbp), %rsi
leaq -0x13(%rbp), %rdx
leaq -0x14(%rbp), %rcx
callq 0x4710
cmpl $0x4, %eax
jne 0xfc89
movq -0x198(%rbp), %rdi
movb $0x79, -0x15(%rbp)
movb $0x72, -0x16(%rbp)
movb $0x6c, -0x17(%rbp)
leaq -0x15(%rbp), %rsi
leaq -0x16(%rbp), %rdx
leaq -0x17(%rbp), %rcx
callq 0x4710
cmpl $0x5, %eax
jne 0xfbcd
leaq -0x39(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x23d0
movq -0x1a0(%rbp), %rdx
leaq 0x7ccb(%rip), %rsi      # 0x1782f
leaq -0x38(%rbp), %rdi
callq 0x3920
jmp 0xfb6f
movq -0x198(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x5320
jmp 0xfb85
leaq -0x38(%rbp), %rdi
callq 0x2140
leaq -0x39(%rbp), %rdi
callq 0x2280
jmp 0xfc80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xfbbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x2140
leaq -0x39(%rbp), %rdi
callq 0x2280
jmp 0x10306
movq -0x198(%rbp), %rdi
movb $0x79, -0x4d(%rbp)
movb $0x72, -0x4e(%rbp)
movb $0x6c, -0x4f(%rbp)
leaq -0x4d(%rbp), %rsi
leaq -0x4e(%rbp), %rdx
leaq -0x4f(%rbp), %rcx
callq 0x4710
cmpl $0x7, %eax
jne 0xfc7e
leaq -0x71(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x23d0
movq -0x1a8(%rbp), %rdx
leaq 0x7c20(%rip), %rsi      # 0x17838
leaq -0x70(%rbp), %rdi
callq 0x3920
jmp 0xfc23
movq -0x198(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x70(%rbp), %rsi
callq 0x5320
jmp 0xfc39
leaq -0x70(%rbp), %rdi
callq 0x2140
leaq -0x71(%rbp), %rdi
callq 0x2280
jmp 0xfc7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xfc70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x2140
leaq -0x71(%rbp), %rdi
callq 0x2280
jmp 0x10306
jmp 0xfc80
movb $0x0, -0x11(%rbp)
jmp 0x102f8
movq -0x198(%rbp), %rdi
movb $0x79, -0x72(%rbp)
movb $0x67, -0x73(%rbp)
movb $0x72, -0x74(%rbp)
leaq -0x72(%rbp), %rsi
leaq -0x73(%rbp), %rdx
leaq -0x74(%rbp), %rcx
callq 0x4710
cmpl $0x5, %eax
jne 0xfe62
movq -0x198(%rbp), %rdi
movb $0x79, -0x75(%rbp)
movb $0x72, -0x76(%rbp)
movb $0x6c, -0x77(%rbp)
leaq -0x75(%rbp), %rsi
leaq -0x76(%rbp), %rdx
leaq -0x77(%rbp), %rcx
callq 0x4710
cmpl $0x4, %eax
jne 0xfd7f
leaq -0x99(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x23d0
movq -0x1b0(%rbp), %rdx
leaq 0x7b3d(%rip), %rsi      # 0x17841
leaq -0x98(%rbp), %rdi
callq 0x3920
jmp 0xfd12
movq -0x198(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x98(%rbp), %rsi
callq 0x5320
jmp 0xfd2b
leaq -0x98(%rbp), %rdi
callq 0x2140
leaq -0x99(%rbp), %rdi
callq 0x2280
jmp 0xfe59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xfd6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x2140
leaq -0x99(%rbp), %rdi
callq 0x2280
jmp 0x10306
movq -0x198(%rbp), %rdi
movb $0x79, -0x9a(%rbp)
movb $0x72, -0x9b(%rbp)
movb $0x6c, -0x9c(%rbp)
leaq -0x9a(%rbp), %rsi
leaq -0x9b(%rbp), %rdx
leaq -0x9c(%rbp), %rcx
callq 0x4710
cmpl $0x7, %eax
jne 0xfe57
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x23d0
movq -0x1b8(%rbp), %rdx
leaq 0x7a6b(%rip), %rsi      # 0x1784a
leaq -0xc0(%rbp), %rdi
callq 0x3920
jmp 0xfded
movq -0x198(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0xc0(%rbp), %rsi
callq 0x5320
jmp 0xfe06
leaq -0xc0(%rbp), %rdi
callq 0x2140
leaq -0xc1(%rbp), %rdi
callq 0x2280
jmp 0xfe57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xfe46
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x2140
leaq -0xc1(%rbp), %rdi
callq 0x2280
jmp 0x10306
jmp 0xfe59
movb $0x0, -0x11(%rbp)
jmp 0x102f6
movq -0x198(%rbp), %rdi
movb $0x79, -0xc2(%rbp)
movb $0x6c, -0xc3(%rbp)
movb $0x6f, -0xc4(%rbp)
leaq -0xc2(%rbp), %rsi
leaq -0xc3(%rbp), %rdx
leaq -0xc4(%rbp), %rcx
callq 0x4710
cmpl $0x7, %eax
jne 0x1005f
movq -0x198(%rbp), %rdi
movb $0x79, -0xc5(%rbp)
movb $0x72, -0xc6(%rbp)
movb $0x6c, -0xc7(%rbp)
leaq -0xc5(%rbp), %rsi
leaq -0xc6(%rbp), %rdx
leaq -0xc7(%rbp), %rcx
callq 0x4710
cmpl $0x4, %eax
jne 0xff7c
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x23d0
movq -0x1c0(%rbp), %rdx
leaq 0x7952(%rip), %rsi      # 0x17853
leaq -0xe8(%rbp), %rdi
callq 0x3920
jmp 0xff0f
movq -0x198(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0xe8(%rbp), %rsi
callq 0x5320
jmp 0xff28
leaq -0xe8(%rbp), %rdi
callq 0x2140
leaq -0xe9(%rbp), %rdi
callq 0x2280
jmp 0x10056
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xff6b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x2140
leaq -0xe9(%rbp), %rdi
callq 0x2280
jmp 0x10306
movq -0x198(%rbp), %rdi
movb $0x79, -0xea(%rbp)
movb $0x72, -0xeb(%rbp)
movb $0x6c, -0xec(%rbp)
leaq -0xea(%rbp), %rsi
leaq -0xeb(%rbp), %rdx
leaq -0xec(%rbp), %rcx
callq 0x4710
cmpl $0x5, %eax
jne 0x10054
leaq -0x111(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x23d0
movq -0x1c8(%rbp), %rdx
leaq 0x7880(%rip), %rsi      # 0x1785c
leaq -0x110(%rbp), %rdi
callq 0x3920
jmp 0xffea
movq -0x198(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x110(%rbp), %rsi
callq 0x5320
jmp 0x10003
leaq -0x110(%rbp), %rdi
callq 0x2140
leaq -0x111(%rbp), %rdi
callq 0x2280
jmp 0x10054
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x10043
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x2140
leaq -0x111(%rbp), %rdi
callq 0x2280
jmp 0x10306
jmp 0x10056
movb $0x0, -0x11(%rbp)
jmp 0x102f4
movq -0x198(%rbp), %rdi
movb $0x79, -0x112(%rbp)
movb $0x72, -0x113(%rbp)
movb $0x6c, -0x114(%rbp)
leaq -0x112(%rbp), %rsi
leaq -0x113(%rbp), %rdx
leaq -0x114(%rbp), %rcx
callq 0x4710
cmpl $0x6, %eax
jne 0x1025c
movq -0x198(%rbp), %rdi
movb $0x79, -0x115(%rbp)
movb $0x6f, -0x116(%rbp)
movb $0x67, -0x117(%rbp)
leaq -0x115(%rbp), %rsi
leaq -0x116(%rbp), %rdx
leaq -0x117(%rbp), %rcx
callq 0x4710
cmpl $0x5, %eax
jne 0x10179
leaq -0x139(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x23d0
movq -0x1d0(%rbp), %rdx
leaq 0x7767(%rip), %rsi      # 0x17865
leaq -0x138(%rbp), %rdi
callq 0x3920
jmp 0x1010c
movq -0x198(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x138(%rbp), %rsi
callq 0x5320
jmp 0x10125
leaq -0x138(%rbp), %rdi
callq 0x2140
leaq -0x139(%rbp), %rdi
callq 0x2280
jmp 0x10253
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x10168
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x2140
leaq -0x139(%rbp), %rdi
callq 0x2280
jmp 0x10306
movq -0x198(%rbp), %rdi
movb $0x79, -0x13a(%rbp)
movb $0x6f, -0x13b(%rbp)
movb $0x67, -0x13c(%rbp)
leaq -0x13a(%rbp), %rsi
leaq -0x13b(%rbp), %rdx
leaq -0x13c(%rbp), %rcx
callq 0x4710
cmpl $0x7, %eax
jne 0x10251
leaq -0x161(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x23d0
movq -0x1d8(%rbp), %rdx
leaq 0x7695(%rip), %rsi      # 0x1786e
leaq -0x160(%rbp), %rdi
callq 0x3920
jmp 0x101e7
movq -0x198(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x160(%rbp), %rsi
callq 0x5320
jmp 0x10200
leaq -0x160(%rbp), %rdi
callq 0x2140
leaq -0x161(%rbp), %rdi
callq 0x2280
jmp 0x10251
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x10240
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x2140
leaq -0x161(%rbp), %rdi
callq 0x2280
jmp 0x10306
jmp 0x10253
movb $0x0, -0x11(%rbp)
jmp 0x102f2
leaq -0x189(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x23d0
movq -0x1e0(%rbp), %rdx
leaq 0x75cd(%rip), %rsi      # 0x1784a
leaq -0x188(%rbp), %rdi
callq 0x3920
jmp 0x1028b
movq -0x198(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x188(%rbp), %rsi
callq 0x5320
jmp 0x102a4
leaq -0x188(%rbp), %rdi
callq 0x2140
leaq -0x189(%rbp), %rdi
callq 0x2280
jmp 0x102f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x102e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x2140
leaq -0x189(%rbp), %rdi
callq 0x2280
jmp 0x10306
jmp 0x102f4
jmp 0x102f6
jmp 0x102f8
jmp 0xfae2
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x23c0
nop