// File: /workspace/github_cpp_makefile_star2_O1/Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::logicErrors() const
int Rubik::logicErrors() const{
   int valid = 0;
   int vector[7] = {0};

   // Center
   ++vector[equivalentNumber(center[0].center)];
   ++vector[equivalentNumber(center[1].center)];
   ++vector[equivalentNumber(center[2].center)];
   ++vector[equivalentNumber(center[3].center)];
   ++vector[equivalentNumber(center[4].center)];
   ++vector[equivalentNumber(center[5].center)];
   for (int i=1; i<7; ++i){
      if (vector[i] != 1)
	      valid = -1;
   }

   // Edge
   if (valid != -1){
      ++vector[equivalentNumber(edge[0].up)];
      ++vector[equivalentNumber(edge[0].down)];
      ++vector[equivalentNumber(edge[1].up)];
      ++vector[equivalentNumber(edge[1].down)];
      ++vector[equivalentNumber(edge[2].up)];
      ++vector[equivalentNumber(edge[2].down)];
      ++vector[equivalentNumber(edge[3].up)];
      ++vector[equivalentNumber(edge[3].down)];
      ++vector[equivalentNumber(edge[4].up)];
      ++vector[equivalentNumber(edge[4].down)];
      ++vector[equivalentNumber(edge[5].up)];
      ++vector[equivalentNumber(edge[5].down)];
      ++vector[equivalentNumber(edge[6].up)];
      ++vector[equivalentNumber(edge[6].down)];
      ++vector[equivalentNumber(edge[7].up)];
      ++vector[equivalentNumber(edge[7].down)];
      ++vector[equivalentNumber(edge[8].up)];
      ++vector[equivalentNumber(edge[8].down)];
      ++vector[equivalentNumber(edge[9].up)];
      ++vector[equivalentNumber(edge[9].down)];
      ++vector[equivalentNumber(edge[10].up)];
      ++vector[equivalentNumber(edge[10].down)];
      ++vector[equivalentNumber(edge[11].up)];
      ++vector[equivalentNumber(edge[11].down)];
   
      for (int i=1; i<7; ++i){
        if (vector[i] != 5)
          valid = -2;
      }
   }
   
   // Corners
   if ( (valid != -1) && (valid != -2) ){
      ++vector[equivalentNumber(corner[0].left)];
      ++vector[equivalentNumber(corner[0].right)];
      ++vector[equivalentNumber(corner[0].up)];
      ++vector[equivalentNumber(corner[1].left)];
      ++vector[equivalentNumber(corner[1].right)];
      ++vector[equivalentNumber(corner[1].up)];
      ++vector[equivalentNumber(corner[2].left)];
      ++vector[equivalentNumber(corner[2].right)];
      ++vector[equivalentNumber(corner[2].up)];
      ++vector[equivalentNumber(corner[3].left)];
      ++vector[equivalentNumber(corner[3].right)];
      ++vector[equivalentNumber(corner[3].up)];
      ++vector[equivalentNumber(corner[4].left)];
      ++vector[equivalentNumber(corner[4].right)];
      ++vector[equivalentNumber(corner[4].up)];
      ++vector[equivalentNumber(corner[5].left)];
      ++vector[equivalentNumber(corner[5].right)];
      ++vector[equivalentNumber(corner[5].up)];
      ++vector[equivalentNumber(corner[6].left)];
      ++vector[equivalentNumber(corner[6].right)];
      ++vector[equivalentNumber(corner[6].up)];
      ++vector[equivalentNumber(corner[7].left)];
      ++vector[equivalentNumber(corner[7].right)];
      ++vector[equivalentNumber(corner[7].up)];
   
      for (int i=1; i<7; ++i){
        if (vector[i] != 9)
          valid = -3;
      }
   }
   
   return valid;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rsp)
movaps %xmm0, (%rsp)
movq %rdi, %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x1(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x2(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x3(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x4(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x5(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
xorl %eax, %eax
movl $0x1, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpl $0x1, (%rsp,%rcx,4)
cmovnel %edx, %eax
incq %rcx
cmpq $0x7, %rcx
jne 0x98c8
cmpl $-0x1, %eax
je 0x9a4f
leaq 0x6(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x7(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x8(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x9(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0xa(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0xb(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0xc(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0xd(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0xe(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0xf(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x10(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x11(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x12(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x13(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x14(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x15(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x16(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x17(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x18(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x19(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x1a(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x1b(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x1c(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x1d(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
xorl %ebp, %ebp
movl $0x1, %eax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpl $0x5, (%rsp,%rax,4)
cmovnel %ecx, %ebp
incq %rax
cmpq $0x7, %rax
jne 0x9a3d
jmp 0x9a54
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x3, %ebp
ja 0x9be2
leaq 0x1e(%rbx), %r14
leaq 0x1f(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x20(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
movq %r14, %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x21(%rbx), %r14
leaq 0x22(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x23(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
movq %r14, %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x24(%rbx), %r14
leaq 0x25(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x26(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
movq %r14, %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x27(%rbx), %r14
leaq 0x28(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x29(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
movq %r14, %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x2a(%rbx), %r14
leaq 0x2b(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x2c(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
movq %r14, %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x2d(%rbx), %r14
leaq 0x2e(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x2f(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
movq %r14, %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x30(%rbx), %r14
leaq 0x31(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x32(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
movq %r14, %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
leaq 0x33(%rbx), %r14
leaq 0x34(%rbx), %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
addq $0x35, %rbx
movq %rbx, %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
movq %r14, %rsi
callq 0x35aa
movl %eax, %eax
incl (%rsp,%rax,4)
movl $0x1, %eax
movl $0xfffffffd, %ecx       # imm = 0xFFFFFFFD
cmpl $0x9, (%rsp,%rax,4)
cmovnel %ecx, %ebp
incq %rax
cmpq $0x7, %rax
jne 0x9bd2
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop