int main(void) {
  const unsigned char C = 0x03;
  const unsigned char D = 0x08;
  unsigned char calculated_X = 0x00;
  unsigned char calculated_Y = 0x00;
  unsigned char Q = 0x00;
  unsigned char R = 0x00;
  unsigned char Z = 0x00;
  unsigned char Zprime = 0x00;
  for (unsigned char X = 0x00; X < 0x10; ++X) {
    for (unsigned char Y = 0x00; Y < 0x10; ++Y) {
      Q = calcQ(&X, &Y, &C);
      R = calcR(&X, &Y, &D);
      Z = calcZ(&R, &C);
      Zprime = calcZprime(&Q, &D);
      calculated_X = calcX(&Z, &C);
      calculated_Y = calcY(&Zprime, &Q);
      if (X == calculated_X && Y == calculated_Y) {
        printf("Q:\t\t"
               "%d%d%d%d%d%d%d%d"
               ", %d\n",
               ((0xF0 ^ Q) & 0x80 ? 1 : 0), ((0xF0 ^ Q) & 0x40 ? 1 : 0),
               ((0xF0 ^ Q) & 0x20 ? 1 : 0), ((0xF0 ^ Q) & 0x10 ? 1 : 0),
               ((0xF0 ^ Q) & 0x08 ? 1 : 0), ((0xF0 ^ Q) & 0x04 ? 1 : 0),
               ((0xF0 ^ Q) & 0x02 ? 1 : 0), ((0xF0 ^ Q) & 0x01 ? 1 : 0),
               0xF0 ^ Q);
        printf("R:\t\t"
               "%d%d%d%d%d%d%d%d"
               ", %d\n",
               ((0xF0 ^ R) & 0x80 ? 1 : 0), ((0xF0 ^ R) & 0x40 ? 1 : 0),
               ((0xF0 ^ R) & 0x20 ? 1 : 0), ((0xF0 ^ R) & 0x10 ? 1 : 0),
               ((0xF0 ^ R) & 0x08 ? 1 : 0), ((0xF0 ^ R) & 0x04 ? 1 : 0),
               ((0xF0 ^ R) & 0x02 ? 1 : 0), ((0xF0 ^ R) & 0x01 ? 1 : 0),
               0xF0 ^ R);
        printf("Z:\t\t"
               "%d%d%d%d%d%d%d%d"
               ", %d\n",
               ((0xF0 ^ Z) & 0x80 ? 1 : 0), ((0xF0 ^ Z) & 0x40 ? 1 : 0),
               ((0xF0 ^ Z) & 0x20 ? 1 : 0), ((0xF0 ^ Z) & 0x10 ? 1 : 0),
               ((0xF0 ^ Z) & 0x08 ? 1 : 0), ((0xF0 ^ Z) & 0x04 ? 1 : 0),
               ((0xF0 ^ Z) & 0x02 ? 1 : 0), ((0xF0 ^ Z) & 0x01 ? 1 : 0),
               0xF0 ^ Z);
        printf("Z':\t\t"
               "%d%d%d%d%d%d%d%d"
               ", %d\n",
               (Zprime & 0x80 ? 1 : 0), (Zprime & 0x40 ? 1 : 0),
               (Zprime & 0x20 ? 1 : 0), (Zprime & 0x10 ? 1 : 0),
               (Zprime & 0x08 ? 1 : 0), (Zprime & 0x04 ? 1 : 0),
               (Zprime & 0x02 ? 1 : 0), (Zprime & 0x01 ? 1 : 0), Zprime);
        printf("INITIAL X, Y:\t"
               "%d%d%d%d%d%d%d%d"
               ", "
               "%d%d%d%d%d%d%d%d"
               "\t: %d, %d\n",
               (X & 0x80 ? 1 : 0), (X & 0x40 ? 1 : 0), (X & 0x20 ? 1 : 0),
               (X & 0x10 ? 1 : 0), (X & 0x08 ? 1 : 0), (X & 0x04 ? 1 : 0),
               (X & 0x02 ? 1 : 0), (X & 0x01 ? 1 : 0), (Y & 0x80 ? 1 : 0),
               (Y & 0x40 ? 1 : 0), (Y & 0x20 ? 1 : 0), (Y & 0x10 ? 1 : 0),
               (Y & 0x08 ? 1 : 0), (Y & 0x04 ? 1 : 0), (Y & 0x02 ? 1 : 0),
               (Y & 0x01 ? 1 : 0), X, Y);
        printf("SOLVED X, Y:\t"
               "%d%d%d%d%d%d%d%d"
               ", "
               "%d%d%d%d%d%d%d%d"
               "\t: %d, %d\n\n",
               (calculated_X & 0x80 ? 1 : 0), (calculated_X & 0x40 ? 1 : 0),
               (calculated_X & 0x20 ? 1 : 0), (calculated_X & 0x10 ? 1 : 0),
               (calculated_X & 0x08 ? 1 : 0), (calculated_X & 0x04 ? 1 : 0),
               (calculated_X & 0x02 ? 1 : 0), (calculated_X & 0x01 ? 1 : 0),
               (calculated_Y & 0x80 ? 1 : 0), (calculated_Y & 0x40 ? 1 : 0),
               (calculated_Y & 0x20 ? 1 : 0), (calculated_Y & 0x10 ? 1 : 0),
               (calculated_Y & 0x08 ? 1 : 0), (calculated_Y & 0x04 ? 1 : 0),
               (calculated_Y & 0x02 ? 1 : 0), (calculated_Y & 0x01 ? 1 : 0),
               calculated_X, calculated_Y);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
movl   $0x0,-0x2c(%rbp)
movb   $0x3,-0x2d(%rbp)
movb   $0x8,-0x2e(%rbp)
movb   $0x0,-0x2f(%rbp)
movb   $0x0,-0x30(%rbp)
movb   $0x0,-0x31(%rbp)
movb   $0x0,-0x32(%rbp)
movb   $0x0,-0x33(%rbp)
movb   $0x0,-0x34(%rbp)
movb   $0x0,-0x35(%rbp)
movzbl -0x35(%rbp),%eax
cmp    $0x10,%eax
jge    1a32 <main+0x8c2>
movb   $0x0,-0x36(%rbp)
movzbl -0x36(%rbp),%eax
cmp    $0x10,%eax
jge    1a20 <main+0x8b0>
lea    -0x35(%rbp),%rdi
lea    -0x36(%rbp),%rsi
lea    -0x2d(%rbp),%rdx
mov    $0x0,%al
call   1060 <calcQ@plt>
mov    %al,-0x31(%rbp)
lea    -0x35(%rbp),%rdi
lea    -0x36(%rbp),%rsi
lea    -0x2e(%rbp),%rdx
mov    $0x0,%al
call   1090 <calcR@plt>
mov    %al,-0x32(%rbp)
lea    -0x32(%rbp),%rdi
lea    -0x2d(%rbp),%rsi
mov    $0x0,%al
call   1070 <calcZ@plt>
mov    %al,-0x33(%rbp)
lea    -0x31(%rbp),%rdi
lea    -0x2e(%rbp),%rsi
mov    $0x0,%al
call   1030 <calcZprime@plt>
mov    %al,-0x34(%rbp)
lea    -0x33(%rbp),%rdi
lea    -0x2d(%rbp),%rsi
mov    $0x0,%al
call   1080 <calcX@plt>
mov    %al,-0x2f(%rbp)
lea    -0x34(%rbp),%rdi
lea    -0x31(%rbp),%rsi
mov    $0x0,%al
call   1050 <calcY@plt>
mov    %al,-0x30(%rbp)
movzbl -0x35(%rbp),%eax
movzbl -0x2f(%rbp),%ecx
cmp    %ecx,%eax
jne    1a0e <main+0x89e>
movzbl -0x36(%rbp),%eax
movzbl -0x30(%rbp),%ecx
cmp    %ecx,%eax
jne    1a0e <main+0x89e>
movzbl -0x31(%rbp),%ecx
xor    $0xf0,%ecx
and    $0x80,%ecx
xor    %esi,%esi
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
movzbl -0x31(%rbp),%ecx
xor    $0xf0,%ecx
and    $0x40,%ecx
xor    %edx,%edx
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
movzbl -0x31(%rbp),%edi
xor    $0xf0,%edi
and    $0x20,%edi
xor    %ecx,%ecx
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%ecx
movzbl -0x31(%rbp),%edi
xor    $0xf0,%edi
and    $0x10,%edi
xor    %r8d,%r8d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r8d
movzbl -0x31(%rbp),%edi
xor    $0xf0,%edi
and    $0x8,%edi
xor    %r9d,%r9d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r9d
movzbl -0x31(%rbp),%edi
xor    $0xf0,%edi
and    $0x4,%edi
xor    %ebx,%ebx
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%ebx
movzbl -0x31(%rbp),%edi
xor    $0xf0,%edi
and    $0x2,%edi
xor    %r11d,%r11d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r11d
movzbl -0x31(%rbp),%edi
xor    $0xf0,%edi
and    $0x1,%edi
xor    %r10d,%r10d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r10d
movzbl -0x31(%rbp),%eax
xor    $0xf0,%eax
lea    0xcb4(%rip),%rdi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
movzbl -0x32(%rbp),%ecx
xor    $0xf0,%ecx
and    $0x80,%ecx
xor    %esi,%esi
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
movzbl -0x32(%rbp),%ecx
xor    $0xf0,%ecx
and    $0x40,%ecx
xor    %edx,%edx
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
movzbl -0x32(%rbp),%edi
xor    $0xf0,%edi
and    $0x20,%edi
xor    %ecx,%ecx
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%ecx
movzbl -0x32(%rbp),%edi
xor    $0xf0,%edi
and    $0x10,%edi
xor    %r8d,%r8d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r8d
movzbl -0x32(%rbp),%edi
xor    $0xf0,%edi
and    $0x8,%edi
xor    %r9d,%r9d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r9d
movzbl -0x32(%rbp),%edi
xor    $0xf0,%edi
and    $0x4,%edi
xor    %ebx,%ebx
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%ebx
movzbl -0x32(%rbp),%edi
xor    $0xf0,%edi
and    $0x2,%edi
xor    %r11d,%r11d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r11d
movzbl -0x32(%rbp),%edi
xor    $0xf0,%edi
and    $0x1,%edi
xor    %r10d,%r10d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r10d
movzbl -0x32(%rbp),%eax
xor    $0xf0,%eax
lea    0xbcb(%rip),%rdi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
movzbl -0x33(%rbp),%ecx
xor    $0xf0,%ecx
and    $0x80,%ecx
xor    %esi,%esi
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
movzbl -0x33(%rbp),%ecx
xor    $0xf0,%ecx
and    $0x40,%ecx
xor    %edx,%edx
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
movzbl -0x33(%rbp),%edi
xor    $0xf0,%edi
and    $0x20,%edi
xor    %ecx,%ecx
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%ecx
movzbl -0x33(%rbp),%edi
xor    $0xf0,%edi
and    $0x10,%edi
xor    %r8d,%r8d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r8d
movzbl -0x33(%rbp),%edi
xor    $0xf0,%edi
and    $0x8,%edi
xor    %r9d,%r9d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r9d
movzbl -0x33(%rbp),%edi
xor    $0xf0,%edi
and    $0x4,%edi
xor    %ebx,%ebx
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%ebx
movzbl -0x33(%rbp),%edi
xor    $0xf0,%edi
and    $0x2,%edi
xor    %r11d,%r11d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r11d
movzbl -0x33(%rbp),%edi
xor    $0xf0,%edi
and    $0x1,%edi
xor    %r10d,%r10d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r10d
movzbl -0x33(%rbp),%eax
xor    $0xf0,%eax
lea    0xae2(%rip),%rdi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
movzbl -0x34(%rbp),%ecx
and    $0x80,%ecx
xor    %esi,%esi
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
movzbl -0x34(%rbp),%ecx
and    $0x40,%ecx
xor    %edx,%edx
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
movzbl -0x34(%rbp),%edi
and    $0x20,%edi
xor    %ecx,%ecx
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%ecx
movzbl -0x34(%rbp),%edi
and    $0x10,%edi
xor    %r8d,%r8d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r8d
movzbl -0x34(%rbp),%edi
and    $0x8,%edi
xor    %r9d,%r9d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r9d
movzbl -0x34(%rbp),%edi
and    $0x4,%edi
xor    %ebx,%ebx
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%ebx
movzbl -0x34(%rbp),%edi
and    $0x2,%edi
xor    %r11d,%r11d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r11d
movzbl -0x34(%rbp),%edi
and    $0x1,%edi
xor    %r10d,%r10d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r10d
movzbl -0x34(%rbp),%eax
lea    0xa2e(%rip),%rdi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
movzbl -0x35(%rbp),%ecx
and    $0x80,%ecx
xor    %esi,%esi
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
movzbl -0x35(%rbp),%ecx
and    $0x40,%ecx
xor    %edx,%edx
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
movzbl -0x35(%rbp),%edi
and    $0x20,%edi
xor    %ecx,%ecx
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%ecx
movzbl -0x35(%rbp),%edi
and    $0x10,%edi
xor    %r8d,%r8d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r8d
movzbl -0x35(%rbp),%edi
and    $0x8,%edi
xor    %r9d,%r9d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r9d
movzbl -0x35(%rbp),%r10d
and    $0x4,%r10d
xor    %eax,%eax
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%eax
movzbl -0x35(%rbp),%r11d
and    $0x2,%r11d
xor    %edi,%edi
mov    $0x1,%r10d
cmp    $0x0,%r11d
cmovne %r10d,%edi
mov    %edi,-0x60(%rbp)
movzbl -0x35(%rbp),%r11d
and    $0x1,%r11d
xor    %edi,%edi
mov    $0x1,%r10d
cmp    $0x0,%r11d
cmovne %r10d,%edi
mov    %edi,-0x5c(%rbp)
movzbl -0x36(%rbp),%r11d
and    $0x80,%r11d
xor    %edi,%edi
mov    $0x1,%r10d
cmp    $0x0,%r11d
cmovne %r10d,%edi
mov    %edi,-0x58(%rbp)
movzbl -0x36(%rbp),%r11d
and    $0x40,%r11d
xor    %edi,%edi
mov    $0x1,%r10d
cmp    $0x0,%r11d
cmovne %r10d,%edi
mov    %edi,-0x54(%rbp)
movzbl -0x36(%rbp),%r10d
and    $0x20,%r10d
xor    %r13d,%r13d
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%r13d
movzbl -0x36(%rbp),%r10d
and    $0x10,%r10d
xor    %r12d,%r12d
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%r12d
movzbl -0x36(%rbp),%r10d
and    $0x8,%r10d
xor    %r15d,%r15d
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%r15d
movzbl -0x36(%rbp),%r10d
and    $0x4,%r10d
xor    %r14d,%r14d
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%r14d
movzbl -0x36(%rbp),%r10d
and    $0x2,%r10d
xor    %ebx,%ebx
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%ebx
movzbl -0x36(%rbp),%r10d
and    $0x1,%r10d
xor    %r11d,%r11d
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%r11d
movzbl -0x35(%rbp),%r10d
movzbl -0x36(%rbp),%edi
mov    %edi,-0x50(%rbp)
lea    0x895(%rip),%rdi
mov    %eax,(%rsp)
mov    -0x60(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0x5c(%rbp),%eax
mov    %eax,0x10(%rsp)
mov    -0x58(%rbp),%eax
mov    %eax,0x18(%rsp)
mov    -0x54(%rbp),%eax
mov    %eax,0x20(%rsp)
mov    -0x50(%rbp),%eax
mov    %r13d,0x28(%rsp)
mov    %r12d,0x30(%rsp)
mov    %r15d,0x38(%rsp)
mov    %r14d,0x40(%rsp)
mov    %ebx,0x48(%rsp)
mov    %r11d,0x50(%rsp)
mov    %r10d,0x58(%rsp)
mov    %eax,0x60(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
movzbl -0x2f(%rbp),%ecx
and    $0x80,%ecx
xor    %esi,%esi
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
movzbl -0x2f(%rbp),%ecx
and    $0x40,%ecx
xor    %edx,%edx
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
movzbl -0x2f(%rbp),%edi
and    $0x20,%edi
xor    %ecx,%ecx
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%ecx
movzbl -0x2f(%rbp),%edi
and    $0x10,%edi
xor    %r8d,%r8d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r8d
movzbl -0x2f(%rbp),%edi
and    $0x8,%edi
xor    %r9d,%r9d
mov    $0x1,%eax
cmp    $0x0,%edi
cmovne %eax,%r9d
movzbl -0x2f(%rbp),%r10d
and    $0x4,%r10d
xor    %eax,%eax
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%eax
movzbl -0x2f(%rbp),%r11d
and    $0x2,%r11d
xor    %edi,%edi
mov    $0x1,%r10d
cmp    $0x0,%r11d
cmovne %r10d,%edi
mov    %edi,-0x4c(%rbp)
movzbl -0x2f(%rbp),%r11d
and    $0x1,%r11d
xor    %edi,%edi
mov    $0x1,%r10d
cmp    $0x0,%r11d
cmovne %r10d,%edi
mov    %edi,-0x48(%rbp)
movzbl -0x30(%rbp),%r11d
and    $0x80,%r11d
xor    %edi,%edi
mov    $0x1,%r10d
cmp    $0x0,%r11d
cmovne %r10d,%edi
mov    %edi,-0x44(%rbp)
movzbl -0x30(%rbp),%r11d
and    $0x40,%r11d
xor    %edi,%edi
mov    $0x1,%r10d
cmp    $0x0,%r11d
cmovne %r10d,%edi
mov    %edi,-0x40(%rbp)
movzbl -0x30(%rbp),%r10d
and    $0x20,%r10d
xor    %r13d,%r13d
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%r13d
movzbl -0x30(%rbp),%r10d
and    $0x10,%r10d
xor    %r12d,%r12d
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%r12d
movzbl -0x30(%rbp),%r10d
and    $0x8,%r10d
xor    %r15d,%r15d
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%r15d
movzbl -0x30(%rbp),%r10d
and    $0x4,%r10d
xor    %r14d,%r14d
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%r14d
movzbl -0x30(%rbp),%r10d
and    $0x2,%r10d
xor    %ebx,%ebx
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%ebx
movzbl -0x30(%rbp),%r10d
and    $0x1,%r10d
xor    %r11d,%r11d
mov    $0x1,%edi
cmp    $0x0,%r10d
cmovne %edi,%r11d
movzbl -0x2f(%rbp),%r10d
movzbl -0x30(%rbp),%edi
mov    %edi,-0x3c(%rbp)
lea    0x6e5(%rip),%rdi
mov    %eax,(%rsp)
mov    -0x4c(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0x48(%rbp),%eax
mov    %eax,0x10(%rsp)
mov    -0x44(%rbp),%eax
mov    %eax,0x18(%rsp)
mov    -0x40(%rbp),%eax
mov    %eax,0x20(%rsp)
mov    -0x3c(%rbp),%eax
mov    %r13d,0x28(%rsp)
mov    %r12d,0x30(%rsp)
mov    %r15d,0x38(%rsp)
mov    %r14d,0x40(%rsp)
mov    %ebx,0x48(%rsp)
mov    %r11d,0x50(%rsp)
mov    %r10d,0x58(%rsp)
mov    %eax,0x60(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a13 <main+0x8a3>
mov    -0x36(%rbp),%al
add    $0x1,%al
mov    %al,-0x36(%rbp)
jmp    11c0 <main+0x50>
jmp    1a25 <main+0x8b5>
mov    -0x35(%rbp),%al
add    $0x1,%al
mov    %al,-0x35(%rbp)
jmp    11af <main+0x3f>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
movb   $0x3,0xf(%rsp)
movb   $0x8,0xe(%rsp)
movb   $0x0,0xa(%rsp)
movb   $0x0,0xd(%rsp)
movb   $0x0,0xc(%rsp)
movb   $0x0,0xb(%rsp)
movb   $0x0,0x9(%rsp)
lea    0x9(%rsp),%rbx
lea    0x8(%rsp),%rbp
lea    0xf(%rsp),%r14
lea    0xe(%rsp),%r15
lea    0xa(%rsp),%r13
jmp    11d2 <main+0x62>
nopl   0x0(%rax)
mov    0x9(%rsp),%al
add    $0x1,%al
mov    %al,0x9(%rsp)
cmp    $0x10,%al
jae    1612 <main+0x4a2>
movb   $0x0,0x8(%rsp)
jmp    11ec <main+0x7c>
nopl   0x0(%rax)
add    $0x1,%dl
mov    %dl,0x8(%rsp)
cmp    $0x10,%dl
jae    11c0 <main+0x50>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1060 <calcQ@plt>
mov    %al,0xa(%rsp)
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1090 <calcR@plt>
mov    %al,0xd(%rsp)
lea    0xd(%rsp),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <calcZ@plt>
mov    %al,0xc(%rsp)
mov    %r13,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <calcZprime@plt>
mov    %al,0xb(%rsp)
lea    0xc(%rsp),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1080 <calcX@plt>
mov    %eax,%r12d
lea    0xb(%rsp),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <calcY@plt>
movzbl 0x8(%rsp),%edx
cmp    %r12b,0x9(%rsp)
jne    11e0 <main+0x70>
cmp    %al,%dl
jne    11e0 <main+0x70>
mov    %r12,%rcx
mov    %r12,0x18(%rsp)
movzbl %cl,%ecx
mov    %rcx,0x50(%rsp)
movzbl %al,%ecx
mov    %rcx,0x48(%rsp)
movzbl 0xa(%rsp),%ebp
xor    $0xf0,%ebp
mov    %ebp,%esi
shr    $0x7,%esi
mov    %ebp,%edx
shr    $0x6,%edx
and    $0x1,%edx
mov    %ebp,%ecx
shr    $0x5,%ecx
and    $0x1,%ecx
mov    %ebp,%r8d
shr    $0x4,%r8d
and    $0x1,%r8d
mov    %ebp,%r9d
shr    $0x3,%r9d
and    $0x1,%r9d
mov    %rax,0x20(%rsp)
mov    %ebp,%r10d
shr    $0x2,%r10d
and    $0x1,%r10d
mov    %ebp,%ebx
shr    %ebx
and    $0x1,%ebx
mov    %ebp,%r11d
and    $0x1,%r11d
lea    0xd1c(%rip),%rdi
xor    %eax,%eax
push   %rbp
push   %r11
push   %rbx
push   %r10
call   1040 <printf@plt>
add    $0x20,%rsp
movzbl 0xd(%rsp),%ebp
xor    $0xf0,%ebp
mov    %ebp,%esi
shr    $0x7,%esi
mov    %ebp,%edx
shr    $0x6,%edx
and    $0x1,%edx
mov    %ebp,%ecx
shr    $0x5,%ecx
and    $0x1,%ecx
mov    %ebp,%r8d
shr    $0x4,%r8d
and    $0x1,%r8d
mov    %ebp,%r9d
shr    $0x3,%r9d
and    $0x1,%r9d
mov    %ebp,%r10d
shr    $0x2,%r10d
and    $0x1,%r10d
mov    %ebp,%ebx
shr    %ebx
and    $0x1,%ebx
mov    %ebp,%r11d
and    $0x1,%r11d
lea    0xccf(%rip),%rdi
xor    %eax,%eax
push   %rbp
push   %r11
push   %rbx
push   %r10
call   1040 <printf@plt>
add    $0x20,%rsp
movzbl 0xc(%rsp),%ebp
xor    $0xf0,%ebp
mov    %ebp,%esi
shr    $0x7,%esi
mov    %ebp,%edx
shr    $0x6,%edx
and    $0x1,%edx
mov    %ebp,%ecx
shr    $0x5,%ecx
and    $0x1,%ecx
mov    %ebp,%r8d
shr    $0x4,%r8d
and    $0x1,%r8d
mov    %ebp,%r9d
shr    $0x3,%r9d
and    $0x1,%r9d
mov    %ebp,%r10d
shr    $0x2,%r10d
and    $0x1,%r10d
mov    %ebp,%ebx
shr    %ebx
and    $0x1,%ebx
mov    %ebp,%r11d
and    $0x1,%r11d
lea    0xc82(%rip),%rdi
xor    %eax,%eax
push   %rbp
push   %r11
push   %rbx
push   %r10
call   1040 <printf@plt>
add    $0x20,%rsp
movzbl 0xb(%rsp),%ebp
mov    %ebp,%esi
shr    $0x7,%esi
mov    %ebp,%edx
shr    $0x6,%edx
and    $0x1,%edx
mov    %ebp,%ecx
shr    $0x5,%ecx
and    $0x1,%ecx
mov    %ebp,%r8d
shr    $0x4,%r8d
and    $0x1,%r8d
mov    %ebp,%r9d
shr    $0x3,%r9d
and    $0x1,%r9d
mov    %ebp,%r10d
shr    $0x2,%r10d
and    $0x1,%r10d
mov    %ebp,%ebx
shr    %ebx
and    $0x1,%ebx
mov    %ebp,%r11d
and    $0x1,%r11d
lea    0xc3b(%rip),%rdi
xor    %eax,%eax
push   %rbp
push   %r11
push   %rbx
push   %r10
call   1040 <printf@plt>
add    $0x20,%rsp
movzbl 0x9(%rsp),%ebx
mov    %ebx,%esi
shr    $0x7,%esi
mov    %ebx,%edx
shr    $0x6,%edx
and    $0x1,%edx
mov    %ebx,%ecx
shr    $0x5,%ecx
and    $0x1,%ecx
mov    %ebx,%r8d
shr    $0x4,%r8d
and    $0x1,%r8d
mov    %ebx,%r9d
shr    $0x3,%r9d
and    $0x1,%r9d
mov    %ebx,%eax
shr    $0x2,%eax
and    $0x1,%eax
mov    %rax,0x10(%rsp)
mov    %ebx,%eax
shr    %eax
and    $0x1,%eax
mov    %rax,0x40(%rsp)
mov    %ebx,%eax
and    $0x1,%eax
mov    %rax,0x38(%rsp)
movzbl 0x8(%rsp),%r14d
mov    %r14d,%eax
shr    $0x7,%eax
mov    %rax,0x30(%rsp)
mov    %r14d,%eax
shr    $0x6,%eax
and    $0x1,%eax
mov    %rax,0x28(%rsp)
mov    %r14d,%r13d
shr    $0x5,%r13d
and    $0x1,%r13d
mov    %r14d,%r11d
shr    $0x4,%r11d
and    $0x1,%r11d
mov    %r14d,%r12d
shr    $0x3,%r12d
and    $0x1,%r12d
mov    %r14d,%r10d
shr    $0x2,%r10d
and    $0x1,%r10d
mov    %r14d,%ebp
shr    %ebp
and    $0x1,%ebp
sub    $0x8,%rsp
mov    %r14d,%r15d
and    $0x1,%r15d
lea    0xb8d(%rip),%rdi
xor    %eax,%eax
push   %r14
push   %rbx
push   %r15
push   %rbp
push   %r10
push   %r12
push   %r11
push   %r13
push   0x70(%rsp)
push   0x80(%rsp)
push   0x90(%rsp)
push   0xa0(%rsp)
push   0x78(%rsp)
call   1040 <printf@plt>
add    $0x70,%rsp
mov    0x18(%rsp),%rax
mov    %eax,%esi
shr    $0x7,%esi
and    $0x1,%esi
mov    %eax,%edx
shr    $0x6,%edx
and    $0x1,%edx
mov    %eax,%ecx
shr    $0x5,%ecx
and    $0x1,%ecx
mov    %eax,%r8d
shr    $0x4,%r8d
and    $0x1,%r8d
mov    %eax,%r9d
shr    $0x3,%r9d
and    $0x1,%r9d
mov    %eax,%edi
shr    $0x2,%edi
and    $0x1,%edi
mov    %rdi,0x10(%rsp)
mov    %eax,%r11d
shr    %r11d
and    $0x1,%r11d
and    $0x1,%eax
mov    %rax,0x18(%rsp)
mov    0x20(%rsp),%rax
mov    %eax,%r15d
shr    $0x7,%r15d
and    $0x1,%r15d
mov    %eax,%r14d
shr    $0x6,%r14d
and    $0x1,%r14d
mov    %eax,%r12d
shr    $0x5,%r12d
and    $0x1,%r12d
mov    %eax,%r13d
shr    $0x4,%r13d
and    $0x1,%r13d
mov    %eax,%ebp
shr    $0x3,%ebp
and    $0x1,%ebp
mov    %eax,%ebx
shr    $0x2,%ebx
and    $0x1,%ebx
mov    %eax,%r10d
shr    %r10d
and    $0x1,%r10d
and    $0x1,%eax
mov    %rax,0x20(%rsp)
sub    $0x8,%rsp
lea    0xae2(%rip),%rdi
xor    %eax,%eax
push   0x50(%rsp)
push   0x60(%rsp)
push   0x38(%rsp)
push   %r10
push   %rbx
lea    0x39(%rsp),%rbx
push   %rbp
push   %r13
lea    0x4a(%rsp),%r13
push   %r12
push   %r14
lea    0x5f(%rsp),%r14
lea    0x58(%rsp),%rbp
push   %r15
lea    0x66(%rsp),%r15
push   0x70(%rsp)
push   %r11
push   0x78(%rsp)
call   1040 <printf@plt>
add    $0x70,%rsp
movzbl 0x8(%rsp),%edx
jmp    11e0 <main+0x70>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Q:\09\09%d%d%d%d%d%d%d%d, %d\0A\00"
@.str.1 = [26 x i8] c"R:\09\09%d%d%d%d%d%d%d%d, %d\0A\00"
@.str.2 = [26 x i8] c"Z:\09\09%d%d%d%d%d%d%d%d, %d\0A\00"
@.str.3 = [27 x i8] c"Z':\09\09%d%d%d%d%d%d%d%d, %d\0A\00"
@.str.4 = [59 x i8] c"INITIAL X, Y:\09%d%d%d%d%d%d%d%d, %d%d%d%d%d%d%d%d\09: %d, %d\0A\00"
@.str.5 = [59 x i8] c"SOLVED X, Y:\09%d%d%d%d%d%d%d%d, %d%d%d%d%d%d%d%d\09: %d, %d\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
%11 = alloca i8
store i32 0, i32* %1
store i8 3, i8* %2
store i8 8, i8* %3
store i8 0, i8* %4
store i8 0, i8* %5
store i8 0, i8* %6
store i8 0, i8* %7
store i8 0, i8* %8
store i8 0, i8* %9
store i8 0, i8* %10
br label %12
12: ; preds = %484, %0
%13 = load i8, i8* %10
%14 = zext i8 %13 to i32
%15 = icmp slt i32 %14, 16
br i1 %15, label %16, label %487
16: ; preds = %12
store i8 0, i8* %11
br label %17
17: ; preds = %480, %16
%18 = load i8, i8* %11
%19 = zext i8 %18 to i32
%20 = icmp slt i32 %19, 16
br i1 %20, label %21, label %483
21: ; preds = %17
%22 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @calcQ to i32 (i8*, i8*, i8*, ...)*)(i8* %10, i8* %11, i8* %2)
%23 = trunc i32 %22 to i8
store i8 %23, i8* %6
%24 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @calcR to i32 (i8*, i8*, i8*, ...)*)(i8* %10, i8* %11, i8* %3)
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @calcZ to i32 (i8*, i8*, ...)*)(i8* %7, i8* %2)
%27 = trunc i32 %26 to i8
store i8 %27, i8* %8
%28 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @calcZprime to i32 (i8*, i8*, ...)*)(i8* %6, i8* %3)
%29 = trunc i32 %28 to i8
store i8 %29, i8* %9
%30 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @calcX to i32 (i8*, i8*, ...)*)(i8* %8, i8* %2)
%31 = trunc i32 %30 to i8
store i8 %31, i8* %4
%32 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @calcY to i32 (i8*, i8*, ...)*)(i8* %9, i8* %6)
%33 = trunc i32 %32 to i8
store i8 %33, i8* %5
%34 = load i8, i8* %10
%35 = zext i8 %34 to i32
%36 = load i8, i8* %4
%37 = zext i8 %36 to i32
%38 = icmp eq i32 %35, %37
br i1 %38, label %39, label %479
39: ; preds = %21
%40 = load i8, i8* %11
%41 = zext i8 %40 to i32
%42 = load i8, i8* %5
%43 = zext i8 %42 to i32
%44 = icmp eq i32 %41, %43
br i1 %44, label %45, label %479
45: ; preds = %39
%46 = load i8, i8* %6
%47 = zext i8 %46 to i32
%48 = xor i32 240, %47
%49 = and i32 %48, 128
%50 = icmp ne i32 %49, 0
%51 = zext i1 %50 to i64
%52 = select i1 %50, i32 1, i32 0
%53 = load i8, i8* %6
%54 = zext i8 %53 to i32
%55 = xor i32 240, %54
%56 = and i32 %55, 64
%57 = icmp ne i32 %56, 0
%58 = zext i1 %57 to i64
%59 = select i1 %57, i32 1, i32 0
%60 = load i8, i8* %6
%61 = zext i8 %60 to i32
%62 = xor i32 240, %61
%63 = and i32 %62, 32
%64 = icmp ne i32 %63, 0
%65 = zext i1 %64 to i64
%66 = select i1 %64, i32 1, i32 0
%67 = load i8, i8* %6
%68 = zext i8 %67 to i32
%69 = xor i32 240, %68
%70 = and i32 %69, 16
%71 = icmp ne i32 %70, 0
%72 = zext i1 %71 to i64
%73 = select i1 %71, i32 1, i32 0
%74 = load i8, i8* %6
%75 = zext i8 %74 to i32
%76 = xor i32 240, %75
%77 = and i32 %76, 8
%78 = icmp ne i32 %77, 0
%79 = zext i1 %78 to i64
%80 = select i1 %78, i32 1, i32 0
%81 = load i8, i8* %6
%82 = zext i8 %81 to i32
%83 = xor i32 240, %82
%84 = and i32 %83, 4
%85 = icmp ne i32 %84, 0
%86 = zext i1 %85 to i64
%87 = select i1 %85, i32 1, i32 0
%88 = load i8, i8* %6
%89 = zext i8 %88 to i32
%90 = xor i32 240, %89
%91 = and i32 %90, 2
%92 = icmp ne i32 %91, 0
%93 = zext i1 %92 to i64
%94 = select i1 %92, i32 1, i32 0
%95 = load i8, i8* %6
%96 = zext i8 %95 to i32
%97 = xor i32 240, %96
%98 = and i32 %97, 1
%99 = icmp ne i32 %98, 0
%100 = zext i1 %99 to i64
%101 = select i1 %99, i32 1, i32 0
%102 = load i8, i8* %6
%103 = zext i8 %102 to i32
%104 = xor i32 240, %103
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %52, i32 %59, i32 %66, i32 %73, i32 %80, i32 %87, i32 %94, i32 %101, i32 %104)
%106 = load i8, i8* %7
%107 = zext i8 %106 to i32
%108 = xor i32 240, %107
%109 = and i32 %108, 128
%110 = icmp ne i32 %109, 0
%111 = zext i1 %110 to i64
%112 = select i1 %110, i32 1, i32 0
%113 = load i8, i8* %7
%114 = zext i8 %113 to i32
%115 = xor i32 240, %114
%116 = and i32 %115, 64
%117 = icmp ne i32 %116, 0
%118 = zext i1 %117 to i64
%119 = select i1 %117, i32 1, i32 0
%120 = load i8, i8* %7
%121 = zext i8 %120 to i32
%122 = xor i32 240, %121
%123 = and i32 %122, 32
%124 = icmp ne i32 %123, 0
%125 = zext i1 %124 to i64
%126 = select i1 %124, i32 1, i32 0
%127 = load i8, i8* %7
%128 = zext i8 %127 to i32
%129 = xor i32 240, %128
%130 = and i32 %129, 16
%131 = icmp ne i32 %130, 0
%132 = zext i1 %131 to i64
%133 = select i1 %131, i32 1, i32 0
%134 = load i8, i8* %7
%135 = zext i8 %134 to i32
%136 = xor i32 240, %135
%137 = and i32 %136, 8
%138 = icmp ne i32 %137, 0
%139 = zext i1 %138 to i64
%140 = select i1 %138, i32 1, i32 0
%141 = load i8, i8* %7
%142 = zext i8 %141 to i32
%143 = xor i32 240, %142
%144 = and i32 %143, 4
%145 = icmp ne i32 %144, 0
%146 = zext i1 %145 to i64
%147 = select i1 %145, i32 1, i32 0
%148 = load i8, i8* %7
%149 = zext i8 %148 to i32
%150 = xor i32 240, %149
%151 = and i32 %150, 2
%152 = icmp ne i32 %151, 0
%153 = zext i1 %152 to i64
%154 = select i1 %152, i32 1, i32 0
%155 = load i8, i8* %7
%156 = zext i8 %155 to i32
%157 = xor i32 240, %156
%158 = and i32 %157, 1
%159 = icmp ne i32 %158, 0
%160 = zext i1 %159 to i64
%161 = select i1 %159, i32 1, i32 0
%162 = load i8, i8* %7
%163 = zext i8 %162 to i32
%164 = xor i32 240, %163
%165 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %112, i32 %119, i32 %126, i32 %133, i32 %140, i32 %147, i32 %154, i32 %161, i32 %164)
%166 = load i8, i8* %8
%167 = zext i8 %166 to i32
%168 = xor i32 240, %167
%169 = and i32 %168, 128
%170 = icmp ne i32 %169, 0
%171 = zext i1 %170 to i64
%172 = select i1 %170, i32 1, i32 0
%173 = load i8, i8* %8
%174 = zext i8 %173 to i32
%175 = xor i32 240, %174
%176 = and i32 %175, 64
%177 = icmp ne i32 %176, 0
%178 = zext i1 %177 to i64
%179 = select i1 %177, i32 1, i32 0
%180 = load i8, i8* %8
%181 = zext i8 %180 to i32
%182 = xor i32 240, %181
%183 = and i32 %182, 32
%184 = icmp ne i32 %183, 0
%185 = zext i1 %184 to i64
%186 = select i1 %184, i32 1, i32 0
%187 = load i8, i8* %8
%188 = zext i8 %187 to i32
%189 = xor i32 240, %188
%190 = and i32 %189, 16
%191 = icmp ne i32 %190, 0
%192 = zext i1 %191 to i64
%193 = select i1 %191, i32 1, i32 0
%194 = load i8, i8* %8
%195 = zext i8 %194 to i32
%196 = xor i32 240, %195
%197 = and i32 %196, 8
%198 = icmp ne i32 %197, 0
%199 = zext i1 %198 to i64
%200 = select i1 %198, i32 1, i32 0
%201 = load i8, i8* %8
%202 = zext i8 %201 to i32
%203 = xor i32 240, %202
%204 = and i32 %203, 4
%205 = icmp ne i32 %204, 0
%206 = zext i1 %205 to i64
%207 = select i1 %205, i32 1, i32 0
%208 = load i8, i8* %8
%209 = zext i8 %208 to i32
%210 = xor i32 240, %209
%211 = and i32 %210, 2
%212 = icmp ne i32 %211, 0
%213 = zext i1 %212 to i64
%214 = select i1 %212, i32 1, i32 0
%215 = load i8, i8* %8
%216 = zext i8 %215 to i32
%217 = xor i32 240, %216
%218 = and i32 %217, 1
%219 = icmp ne i32 %218, 0
%220 = zext i1 %219 to i64
%221 = select i1 %219, i32 1, i32 0
%222 = load i8, i8* %8
%223 = zext i8 %222 to i32
%224 = xor i32 240, %223
%225 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %172, i32 %179, i32 %186, i32 %193, i32 %200, i32 %207, i32 %214, i32 %221, i32 %224)
%226 = load i8, i8* %9
%227 = zext i8 %226 to i32
%228 = and i32 %227, 128
%229 = icmp ne i32 %228, 0
%230 = zext i1 %229 to i64
%231 = select i1 %229, i32 1, i32 0
%232 = load i8, i8* %9
%233 = zext i8 %232 to i32
%234 = and i32 %233, 64
%235 = icmp ne i32 %234, 0
%236 = zext i1 %235 to i64
%237 = select i1 %235, i32 1, i32 0
%238 = load i8, i8* %9
%239 = zext i8 %238 to i32
%240 = and i32 %239, 32
%241 = icmp ne i32 %240, 0
%242 = zext i1 %241 to i64
%243 = select i1 %241, i32 1, i32 0
%244 = load i8, i8* %9
%245 = zext i8 %244 to i32
%246 = and i32 %245, 16
%247 = icmp ne i32 %246, 0
%248 = zext i1 %247 to i64
%249 = select i1 %247, i32 1, i32 0
%250 = load i8, i8* %9
%251 = zext i8 %250 to i32
%252 = and i32 %251, 8
%253 = icmp ne i32 %252, 0
%254 = zext i1 %253 to i64
%255 = select i1 %253, i32 1, i32 0
%256 = load i8, i8* %9
%257 = zext i8 %256 to i32
%258 = and i32 %257, 4
%259 = icmp ne i32 %258, 0
%260 = zext i1 %259 to i64
%261 = select i1 %259, i32 1, i32 0
%262 = load i8, i8* %9
%263 = zext i8 %262 to i32
%264 = and i32 %263, 2
%265 = icmp ne i32 %264, 0
%266 = zext i1 %265 to i64
%267 = select i1 %265, i32 1, i32 0
%268 = load i8, i8* %9
%269 = zext i8 %268 to i32
%270 = and i32 %269, 1
%271 = icmp ne i32 %270, 0
%272 = zext i1 %271 to i64
%273 = select i1 %271, i32 1, i32 0
%274 = load i8, i8* %9
%275 = zext i8 %274 to i32
%276 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %231, i32 %237, i32 %243, i32 %249, i32 %255, i32 %261, i32 %267, i32 %273, i32 %275)
%277 = load i8, i8* %10
%278 = zext i8 %277 to i32
%279 = and i32 %278, 128
%280 = icmp ne i32 %279, 0
%281 = zext i1 %280 to i64
%282 = select i1 %280, i32 1, i32 0
%283 = load i8, i8* %10
%284 = zext i8 %283 to i32
%285 = and i32 %284, 64
%286 = icmp ne i32 %285, 0
%287 = zext i1 %286 to i64
%288 = select i1 %286, i32 1, i32 0
%289 = load i8, i8* %10
%290 = zext i8 %289 to i32
%291 = and i32 %290, 32
%292 = icmp ne i32 %291, 0
%293 = zext i1 %292 to i64
%294 = select i1 %292, i32 1, i32 0
%295 = load i8, i8* %10
%296 = zext i8 %295 to i32
%297 = and i32 %296, 16
%298 = icmp ne i32 %297, 0
%299 = zext i1 %298 to i64
%300 = select i1 %298, i32 1, i32 0
%301 = load i8, i8* %10
%302 = zext i8 %301 to i32
%303 = and i32 %302, 8
%304 = icmp ne i32 %303, 0
%305 = zext i1 %304 to i64
%306 = select i1 %304, i32 1, i32 0
%307 = load i8, i8* %10
%308 = zext i8 %307 to i32
%309 = and i32 %308, 4
%310 = icmp ne i32 %309, 0
%311 = zext i1 %310 to i64
%312 = select i1 %310, i32 1, i32 0
%313 = load i8, i8* %10
%314 = zext i8 %313 to i32
%315 = and i32 %314, 2
%316 = icmp ne i32 %315, 0
%317 = zext i1 %316 to i64
%318 = select i1 %316, i32 1, i32 0
%319 = load i8, i8* %10
%320 = zext i8 %319 to i32
%321 = and i32 %320, 1
%322 = icmp ne i32 %321, 0
%323 = zext i1 %322 to i64
%324 = select i1 %322, i32 1, i32 0
%325 = load i8, i8* %11
%326 = zext i8 %325 to i32
%327 = and i32 %326, 128
%328 = icmp ne i32 %327, 0
%329 = zext i1 %328 to i64
%330 = select i1 %328, i32 1, i32 0
%331 = load i8, i8* %11
%332 = zext i8 %331 to i32
%333 = and i32 %332, 64
%334 = icmp ne i32 %333, 0
%335 = zext i1 %334 to i64
%336 = select i1 %334, i32 1, i32 0
%337 = load i8, i8* %11
%338 = zext i8 %337 to i32
%339 = and i32 %338, 32
%340 = icmp ne i32 %339, 0
%341 = zext i1 %340 to i64
%342 = select i1 %340, i32 1, i32 0
%343 = load i8, i8* %11
%344 = zext i8 %343 to i32
%345 = and i32 %344, 16
%346 = icmp ne i32 %345, 0
%347 = zext i1 %346 to i64
%348 = select i1 %346, i32 1, i32 0
%349 = load i8, i8* %11
%350 = zext i8 %349 to i32
%351 = and i32 %350, 8
%352 = icmp ne i32 %351, 0
%353 = zext i1 %352 to i64
%354 = select i1 %352, i32 1, i32 0
%355 = load i8, i8* %11
%356 = zext i8 %355 to i32
%357 = and i32 %356, 4
%358 = icmp ne i32 %357, 0
%359 = zext i1 %358 to i64
%360 = select i1 %358, i32 1, i32 0
%361 = load i8, i8* %11
%362 = zext i8 %361 to i32
%363 = and i32 %362, 2
%364 = icmp ne i32 %363, 0
%365 = zext i1 %364 to i64
%366 = select i1 %364, i32 1, i32 0
%367 = load i8, i8* %11
%368 = zext i8 %367 to i32
%369 = and i32 %368, 1
%370 = icmp ne i32 %369, 0
%371 = zext i1 %370 to i64
%372 = select i1 %370, i32 1, i32 0
%373 = load i8, i8* %10
%374 = zext i8 %373 to i32
%375 = load i8, i8* %11
%376 = zext i8 %375 to i32
%377 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.4, i64 0, i64 0), i32 %282, i32 %288, i32 %294, i32 %300, i32 %306, i32 %312, i32 %318, i32 %324, i32 %330, i32 %336, i32 %342, i32 %348, i32 %354, i32 %360, i32 %366, i32 %372, i32 %374, i32 %376)
%378 = load i8, i8* %4
%379 = zext i8 %378 to i32
%380 = and i32 %379, 128
%381 = icmp ne i32 %380, 0
%382 = zext i1 %381 to i64
%383 = select i1 %381, i32 1, i32 0
%384 = load i8, i8* %4
%385 = zext i8 %384 to i32
%386 = and i32 %385, 64
%387 = icmp ne i32 %386, 0
%388 = zext i1 %387 to i64
%389 = select i1 %387, i32 1, i32 0
%390 = load i8, i8* %4
%391 = zext i8 %390 to i32
%392 = and i32 %391, 32
%393 = icmp ne i32 %392, 0
%394 = zext i1 %393 to i64
%395 = select i1 %393, i32 1, i32 0
%396 = load i8, i8* %4
%397 = zext i8 %396 to i32
%398 = and i32 %397, 16
%399 = icmp ne i32 %398, 0
%400 = zext i1 %399 to i64
%401 = select i1 %399, i32 1, i32 0
%402 = load i8, i8* %4
%403 = zext i8 %402 to i32
%404 = and i32 %403, 8
%405 = icmp ne i32 %404, 0
%406 = zext i1 %405 to i64
%407 = select i1 %405, i32 1, i32 0
%408 = load i8, i8* %4
%409 = zext i8 %408 to i32
%410 = and i32 %409, 4
%411 = icmp ne i32 %410, 0
%412 = zext i1 %411 to i64
%413 = select i1 %411, i32 1, i32 0
%414 = load i8, i8* %4
%415 = zext i8 %414 to i32
%416 = and i32 %415, 2
%417 = icmp ne i32 %416, 0
%418 = zext i1 %417 to i64
%419 = select i1 %417, i32 1, i32 0
%420 = load i8, i8* %4
%421 = zext i8 %420 to i32
%422 = and i32 %421, 1
%423 = icmp ne i32 %422, 0
%424 = zext i1 %423 to i64
%425 = select i1 %423, i32 1, i32 0
%426 = load i8, i8* %5
%427 = zext i8 %426 to i32
%428 = and i32 %427, 128
%429 = icmp ne i32 %428, 0
%430 = zext i1 %429 to i64
%431 = select i1 %429, i32 1, i32 0
%432 = load i8, i8* %5
%433 = zext i8 %432 to i32
%434 = and i32 %433, 64
%435 = icmp ne i32 %434, 0
%436 = zext i1 %435 to i64
%437 = select i1 %435, i32 1, i32 0
%438 = load i8, i8* %5
%439 = zext i8 %438 to i32
%440 = and i32 %439, 32
%441 = icmp ne i32 %440, 0
%442 = zext i1 %441 to i64
%443 = select i1 %441, i32 1, i32 0
%444 = load i8, i8* %5
%445 = zext i8 %444 to i32
%446 = and i32 %445, 16
%447 = icmp ne i32 %446, 0
%448 = zext i1 %447 to i64
%449 = select i1 %447, i32 1, i32 0
%450 = load i8, i8* %5
%451 = zext i8 %450 to i32
%452 = and i32 %451, 8
%453 = icmp ne i32 %452, 0
%454 = zext i1 %453 to i64
%455 = select i1 %453, i32 1, i32 0
%456 = load i8, i8* %5
%457 = zext i8 %456 to i32
%458 = and i32 %457, 4
%459 = icmp ne i32 %458, 0
%460 = zext i1 %459 to i64
%461 = select i1 %459, i32 1, i32 0
%462 = load i8, i8* %5
%463 = zext i8 %462 to i32
%464 = and i32 %463, 2
%465 = icmp ne i32 %464, 0
%466 = zext i1 %465 to i64
%467 = select i1 %465, i32 1, i32 0
%468 = load i8, i8* %5
%469 = zext i8 %468 to i32
%470 = and i32 %469, 1
%471 = icmp ne i32 %470, 0
%472 = zext i1 %471 to i64
%473 = select i1 %471, i32 1, i32 0
%474 = load i8, i8* %4
%475 = zext i8 %474 to i32
%476 = load i8, i8* %5
%477 = zext i8 %476 to i32
%478 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0), i32 %383, i32 %389, i32 %395, i32 %401, i32 %407, i32 %413, i32 %419, i32 %425, i32 %431, i32 %437, i32 %443, i32 %449, i32 %455, i32 %461, i32 %467, i32 %473, i32 %475, i32 %477)
br label %479
479: ; preds = %45, %39, %21
br label %480
480: ; preds = %479
%481 = load i8, i8* %11
%482 = add i8 %481, 1
store i8 %482, i8* %11
br label %17
483: ; preds = %17
br label %484
484: ; preds = %483
%485 = load i8, i8* %10
%486 = add i8 %485, 1
store i8 %486, i8* %10
br label %12
487: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Q:\09\09%d%d%d%d%d%d%d%d, %d\0A\00"
@.str.1 = [26 x i8] c"R:\09\09%d%d%d%d%d%d%d%d, %d\0A\00"
@.str.2 = [26 x i8] c"Z:\09\09%d%d%d%d%d%d%d%d, %d\0A\00"
@.str.3 = [27 x i8] c"Z':\09\09%d%d%d%d%d%d%d%d, %d\0A\00"
@.str.4 = [59 x i8] c"INITIAL X, Y:\09%d%d%d%d%d%d%d%d, %d%d%d%d%d%d%d%d\09: %d, %d\0A\00"
@.str.5 = [59 x i8] c"SOLVED X, Y:\09%d%d%d%d%d%d%d%d, %d%d%d%d%d%d%d%d\09: %d, %d\0A\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8 3, i8* %1
store i8 8, i8* %2
store i8 0, i8* %3
store i8 0, i8* %4
store i8 0, i8* %5
store i8 0, i8* %6
store i8 0, i8* %7
br label %10
9: ; preds = %11
ret i32 0
10: ; preds = %0, %11
store i8 0, i8* %8
br label %15
11: ; preds = %172
%12 = load i8, i8* %7
%13 = add i8 %12, 1
store i8 %13, i8* %7
%14 = icmp ult i8 %13, 16
br i1 %14, label %10, label %9
15: ; preds = %10, %172
%16 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @calcQ to i32 (i8*, i8*, i8*, ...)*)(i8* %7, i8* %8, i8* %1)
%17 = trunc i32 %16 to i8
store i8 %17, i8* %3
%18 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @calcR to i32 (i8*, i8*, i8*, ...)*)(i8* %7, i8* %8, i8* %2)
%19 = trunc i32 %18 to i8
store i8 %19, i8* %4
%20 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @calcZ to i32 (i8*, i8*, ...)*)(i8* %4, i8* %1)
%21 = trunc i32 %20 to i8
store i8 %21, i8* %5
%22 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @calcZprime to i32 (i8*, i8*, ...)*)(i8* %3, i8* %2)
%23 = trunc i32 %22 to i8
store i8 %23, i8* %6
%24 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @calcX to i32 (i8*, i8*, ...)*)(i8* %5, i8* %1)
%25 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @calcY to i32 (i8*, i8*, ...)*)(i8* %6, i8* %3)
%26 = load i8, i8* %7
%27 = trunc i32 %24 to i8
%28 = icmp eq i8 %26, %27
%29 = load i8, i8* %8
%30 = trunc i32 %25 to i8
%31 = icmp eq i8 %29, %30
%32 = select i1 %28, i1 %31, i1 false
br i1 %32, label %33, label %172
33: ; preds = %15
%34 = and i32 %24, 255
%35 = and i32 %25, 255
%36 = load i8, i8* %3
%37 = xor i8 %36, -16
%38 = zext i8 %37 to i32
%39 = lshr i32 %38, 7
%40 = lshr i32 %38, 6
%41 = and i32 %40, 1
%42 = lshr i32 %38, 5
%43 = and i32 %42, 1
%44 = lshr i32 %38, 4
%45 = and i32 %44, 1
%46 = lshr i32 %38, 3
%47 = and i32 %46, 1
%48 = lshr i32 %38, 2
%49 = and i32 %48, 1
%50 = lshr i32 %38, 1
%51 = and i32 %50, 1
%52 = and i32 %38, 1
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %39, i32 %41, i32 %43, i32 %45, i32 %47, i32 %49, i32 %51, i32 %52, i32 %38)
%54 = load i8, i8* %4
%55 = xor i8 %54, -16
%56 = zext i8 %55 to i32
%57 = lshr i32 %56, 7
%58 = lshr i32 %56, 6
%59 = and i32 %58, 1
%60 = lshr i32 %56, 5
%61 = and i32 %60, 1
%62 = lshr i32 %56, 4
%63 = and i32 %62, 1
%64 = lshr i32 %56, 3
%65 = and i32 %64, 1
%66 = lshr i32 %56, 2
%67 = and i32 %66, 1
%68 = lshr i32 %56, 1
%69 = and i32 %68, 1
%70 = and i32 %56, 1
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %57, i32 %59, i32 %61, i32 %63, i32 %65, i32 %67, i32 %69, i32 %70, i32 %56)
%72 = load i8, i8* %5
%73 = xor i8 %72, -16
%74 = zext i8 %73 to i32
%75 = lshr i32 %74, 7
%76 = lshr i32 %74, 6
%77 = and i32 %76, 1
%78 = lshr i32 %74, 5
%79 = and i32 %78, 1
%80 = lshr i32 %74, 4
%81 = and i32 %80, 1
%82 = lshr i32 %74, 3
%83 = and i32 %82, 1
%84 = lshr i32 %74, 2
%85 = and i32 %84, 1
%86 = lshr i32 %74, 1
%87 = and i32 %86, 1
%88 = and i32 %74, 1
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %75, i32 %77, i32 %79, i32 %81, i32 %83, i32 %85, i32 %87, i32 %88, i32 %74)
%90 = load i8, i8* %6
%91 = zext i8 %90 to i32
%92 = lshr i32 %91, 7
%93 = lshr i32 %91, 6
%94 = and i32 %93, 1
%95 = lshr i32 %91, 5
%96 = and i32 %95, 1
%97 = lshr i32 %91, 4
%98 = and i32 %97, 1
%99 = lshr i32 %91, 3
%100 = and i32 %99, 1
%101 = lshr i32 %91, 2
%102 = and i32 %101, 1
%103 = lshr i32 %91, 1
%104 = and i32 %103, 1
%105 = and i32 %91, 1
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %92, i32 %94, i32 %96, i32 %98, i32 %100, i32 %102, i32 %104, i32 %105, i32 %91)
%107 = load i8, i8* %7
%108 = zext i8 %107 to i32
%109 = lshr i32 %108, 7
%110 = lshr i32 %108, 6
%111 = and i32 %110, 1
%112 = lshr i32 %108, 5
%113 = and i32 %112, 1
%114 = lshr i32 %108, 4
%115 = and i32 %114, 1
%116 = lshr i32 %108, 3
%117 = and i32 %116, 1
%118 = lshr i32 %108, 2
%119 = and i32 %118, 1
%120 = lshr i32 %108, 1
%121 = and i32 %120, 1
%122 = and i32 %108, 1
%123 = load i8, i8* %8
%124 = zext i8 %123 to i32
%125 = lshr i32 %124, 7
%126 = lshr i32 %124, 6
%127 = and i32 %126, 1
%128 = lshr i32 %124, 5
%129 = and i32 %128, 1
%130 = lshr i32 %124, 4
%131 = and i32 %130, 1
%132 = lshr i32 %124, 3
%133 = and i32 %132, 1
%134 = lshr i32 %124, 2
%135 = and i32 %134, 1
%136 = lshr i32 %124, 1
%137 = and i32 %136, 1
%138 = and i32 %124, 1
%139 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.4, i64 0, i64 0), i32 %109, i32 %111, i32 %113, i32 %115, i32 %117, i32 %119, i32 %121, i32 %122, i32 %125, i32 %127, i32 %129, i32 %131, i32 %133, i32 %135, i32 %137, i32 %138, i32 %108, i32 %124)
%140 = lshr i32 %24, 7
%141 = and i32 %140, 1
%142 = lshr i32 %24, 6
%143 = and i32 %142, 1
%144 = lshr i32 %24, 5
%145 = and i32 %144, 1
%146 = lshr i32 %24, 4
%147 = and i32 %146, 1
%148 = lshr i32 %24, 3
%149 = and i32 %148, 1
%150 = lshr i32 %24, 2
%151 = and i32 %150, 1
%152 = lshr i32 %24, 1
%153 = and i32 %152, 1
%154 = and i32 %24, 1
%155 = lshr i32 %25, 7
%156 = and i32 %155, 1
%157 = lshr i32 %25, 6
%158 = and i32 %157, 1
%159 = lshr i32 %25, 5
%160 = and i32 %159, 1
%161 = lshr i32 %25, 4
%162 = and i32 %161, 1
%163 = lshr i32 %25, 3
%164 = and i32 %163, 1
%165 = lshr i32 %25, 2
%166 = and i32 %165, 1
%167 = lshr i32 %25, 1
%168 = and i32 %167, 1
%169 = and i32 %25, 1
%170 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0), i32 %141, i32 %143, i32 %145, i32 %147, i32 %149, i32 %151, i32 %153, i32 %154, i32 %156, i32 %158, i32 %160, i32 %162, i32 %164, i32 %166, i32 %168, i32 %169, i32 %34, i32 %35)
%171 = load i8, i8* %8
br label %172
172: ; preds = %15, %33
%173 = phi i8 [ %29, %15 ], [ %171, %33 ]
%174 = add i8 %173, 1
store i8 %174, i8* %8
%175 = icmp ult i8 %174, 16
br i1 %175, label %15, label %11
}