// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::readRubik(std::istream&)
void Rubik::readRubik(std::istream& is){
   bool success = true;
   if (is.fail())
      success = false;

   if (success){
      readSticker(corner[3].up, is);
      readSticker(edge[2].up, is);
      readSticker(corner[2].up, is);
      readSticker(edge[3].up, is);
      readSticker(center[0].center, is);
      readSticker(edge[1].up, is);
      readSticker(corner[0].up, is);
      readSticker(edge[0].up, is);
      readSticker(corner[1].up, is);

      readSticker(corner[3].right, is);
      readSticker(edge[3].down, is);
      readSticker(corner[0].left, is);
      readSticker(edge[10].down, is);
      readSticker(center[4].center, is);
      readSticker(edge[11].down, is);
      readSticker(corner[7].right, is);
      readSticker(edge[7].down, is);
      readSticker(corner[4].left, is);

      readSticker(corner[0].right, is);
      readSticker(edge[0].down, is);
      readSticker(corner[1].left, is);
      readSticker(edge[11].up, is);
      readSticker(center[1].center, is);
      readSticker(edge[8].up, is);
      readSticker(corner[4].right, is);
      readSticker(edge[4].down, is);
      readSticker(corner[5].left, is);

      readSticker(corner[1].right, is);
      readSticker(edge[1].down, is);
      readSticker(corner[2].left, is);
      readSticker(edge[8].down, is);
      readSticker(center[2].center, is);
      readSticker(edge[9].down, is);
      readSticker(corner[5].right, is);
      readSticker(edge[5].down, is);
      readSticker(corner[6].left, is);

      readSticker(corner[2].right, is);
      readSticker(edge[2].down, is);
      readSticker(corner[3].left, is);
      readSticker(edge[9].up, is);
      readSticker(center[3].center, is);
      readSticker(edge[10].up, is);
      readSticker(corner[6].right, is);
      readSticker(edge[6].down, is);
      readSticker(corner[7].left, is);

      readSticker(corner[4].up, is);
      readSticker(edge[4].up, is);
      readSticker(corner[5].up, is);
      readSticker(edge[7].up, is);
      readSticker(center[5].center, is);
      readSticker(edge[5].up, is);
      readSticker(corner[7].up, is);
      readSticker(edge[6].up, is);
      readSticker(corner[6].up, is);
   }
   else
      cout << "I can't read it.\n";

   int error = logicErrors();
   if (error == -1){
      success = false;
      cout << "There are mistakes with centers.\n";
   }
   else if (error == -2){
      success = false;
      cout << "There are mistakes with edges.\n";
   }
   else if (error == -3){
      success = false;
      cout << "There are mistakes with corners.\n";
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movb $0x1, -0x11(%rbp)
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x2030
testb $0x1, %al
jne 0x152f2
jmp 0x152f6
movb $0x0, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
je 0x15852
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x9, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x4, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x6, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x6, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq %rsi, %rdi
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x3, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x9, %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x6, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x14, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x4, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x16, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x15, %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0xe, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0xc, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x3, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x16, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x10, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0xc, %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x8, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0xf, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x3, %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x2, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x6, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x10, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x12, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0xf, %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0xa, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x12, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x6, %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x4, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x9, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x12, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x3, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x14, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x12, %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0xc, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x15, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0xc, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0x8, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0xf, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0xe, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x5, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0xa, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x15, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x6, %rsi
addq $0xc, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x1e, %rsi
addq $0x12, %rsi
movq -0x10(%rbp), %rdx
callq 0x13570
jmp 0x15865
movq 0x776f(%rip), %rdi      # 0x1cfc8
leaq 0x2c88(%rip), %rsi      # 0x184e8
callq 0x2230
movq -0x20(%rbp), %rdi
callq 0x12290
movl %eax, -0x18(%rbp)
cmpl $-0x1, -0x18(%rbp)
jne 0x15890
movb $0x0, -0x11(%rbp)
movq 0x7746(%rip), %rdi      # 0x1cfc8
leaq 0x2c71(%rip), %rsi      # 0x184fa
callq 0x2230
jmp 0x158d0
cmpl $-0x2, -0x18(%rbp)
jne 0x158af
movb $0x0, -0x11(%rbp)
movq 0x7727(%rip), %rdi      # 0x1cfc8
leaq 0x2c74(%rip), %rsi      # 0x1851c
callq 0x2230
jmp 0x158ce
cmpl $-0x3, -0x18(%rbp)
jne 0x158cc
movb $0x0, -0x11(%rbp)
movq 0x7708(%rip), %rdi      # 0x1cfc8
leaq 0x2c75(%rip), %rsi      # 0x1853c
callq 0x2230
jmp 0x158ce
jmp 0x158d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)