#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
char get_piece(char *, char, char);
int is_occupied(char *, char, char);
struct node *store_move(struct node *, char *, int, struct node *, char, char,
                        char, char);
struct node *get_queen_moves_white(struct node *currentNode, char *board,
                                   struct node *parentNode) {
  char x, y;
  int numMoves = 0;
  for (x = 'a'; x <= 'h'; x++) {
    for (y = '1'; y <= '8'; y++) {
      char p = get_piece(board, x, y);
      if (p == 'Q') {
        char dest_x = x;
        char dest_y = y - 1;
        int keepGoing = 1;
        if (y == '1')
          keepGoing = 0;
        while ((keepGoing == 1) && (is_occupied(board, dest_x, dest_y) == 0)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                   dest_x, dest_y);
          numMoves++;
          if ((dest_y > '1') &&
              (is_occupied(board, dest_x, dest_y - 1) == -1)) {
            currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                     dest_x, dest_y - 1);
            numMoves++;
            keepGoing = 0;
          }
          dest_y--;
          if (dest_y < '1')
            keepGoing = 0;
        }
        dest_x = x;
        dest_y = y + 1;
        keepGoing = 1;
        if (y == '8')
          keepGoing = 0;
        while ((keepGoing == 1) && (is_occupied(board, dest_x, dest_y) == 0)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                   dest_x, dest_y);
          numMoves++;
          if ((dest_y < '8') &&
              (is_occupied(board, dest_x, dest_y + 1) == -1)) {
            currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                     dest_x, dest_y + 1);
            numMoves++;
            keepGoing = 0;
          }
          dest_y++;
          if (dest_y > '8')
            keepGoing = 0;
        }
        dest_x = x - 1;
        dest_y = y;
        keepGoing = 1;
        if (x == 'a')
          keepGoing = 0;
        while ((keepGoing == 1) && (is_occupied(board, dest_x, dest_y) == 0)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                   dest_x, dest_y);
          numMoves++;
          if ((dest_x > 'a') &&
              (is_occupied(board, dest_x - 1, dest_y) == -1)) {
            currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                     dest_x - 1, dest_y);
            numMoves++;
            keepGoing = 0;
          }
          dest_x--;
          if (dest_x < 'a')
            keepGoing = 0;
        }
        dest_x = x + 1;
        dest_y = y;
        keepGoing = 1;
        if (x == 'h')
          keepGoing = 0;
        while ((keepGoing == 1) && (is_occupied(board, dest_x, dest_y) == 0)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                   dest_x, dest_y);
          numMoves++;
          if ((dest_x < 'h') &&
              (is_occupied(board, dest_x + 1, dest_y) == -1)) {
            currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                     dest_x + 1, dest_y);
            numMoves++;
            keepGoing = 0;
          }
          dest_x++;
          if (dest_x > 'h')
            keepGoing = 0;
        }
        dest_x = x - 1;
        dest_y = y - 1;
        keepGoing = 1;
        if ((x == 'a') || (y == '1'))
          keepGoing = 0;
        while ((keepGoing == 1) && (is_occupied(board, dest_x, dest_y) == 0)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                   dest_x, dest_y);
          numMoves++;
          if ((dest_x > 'a') && (dest_y > '1') &&
              (is_occupied(board, dest_x - 1, dest_y - 1) == -1)) {
            currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                     dest_x - 1, dest_y - 1);
            numMoves++;
            keepGoing = 0;
          }
          dest_x--;
          dest_y--;
          if ((dest_x < 'a') || (dest_y < '1'))
            keepGoing = 0;
        }
        dest_x = x + 1;
        dest_y = y - 1;
        keepGoing = 1;
        if ((x == 'h') || (y == '1'))
          keepGoing = 0;
        while ((keepGoing == 1) && (is_occupied(board, dest_x, dest_y) == 0)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                   dest_x, dest_y);
          numMoves++;
          if ((dest_x < 'h') && (dest_y > '1') &&
              (is_occupied(board, dest_x + 1, dest_y - 1) == -1)) {
            currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                     dest_x + 1, dest_y - 1);
            numMoves++;
            keepGoing = 0;
          }
          dest_x++;
          dest_y--;
          if ((dest_x > 'h') || (dest_y < '1'))
            keepGoing = 0;
        }
        dest_x = x - 1;
        dest_y = y + 1;
        keepGoing = 1;
        if ((x == 'a') || (y == '8'))
          keepGoing = 0;
        while ((keepGoing == 1) && (is_occupied(board, dest_x, dest_y) == 0)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                   dest_x, dest_y);
          numMoves++;
          if ((dest_x > 'a') && (dest_y < '8') &&
              (is_occupied(board, dest_x - 1, dest_y + 1) == -1)) {
            currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                     dest_x - 1, dest_y + 1);
            numMoves++;
            keepGoing = 0;
          }
          dest_x--;
          dest_y++;
          if ((dest_x < 'a') || (dest_y > '8')) {
            keepGoing = 0;
          }
        }
        dest_x = x + 1;
        dest_y = y + 1;
        keepGoing = 1;
        if ((x == 'h') || (y == '8'))
          keepGoing = 0;
        while ((keepGoing == 1) && (is_occupied(board, dest_x, dest_y) == 0)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                   dest_x, dest_y);
          numMoves++;
          if ((dest_x < 'h') && (dest_y < '8') &&
              (is_occupied(board, dest_x + 1, dest_y + 1) == -1)) {
            currentNode = store_move(currentNode, board, 1, parentNode, x, y,
                                     dest_x + 1, dest_y + 1);
            numMoves++;
            keepGoing = 0;
          }
          dest_x++;
          dest_y++;
          if ((dest_x > 'h') || (dest_y > '8'))
            keepGoing = 0;
        }
      }
    }
  }
  return currentNode;
}


x86 assembly (clang, -O0):
<get_queen_moves_white>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
movb   $0x61,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x68,%eax
jg     1d3f <get_queen_moves_white+0xc0f>
movb   $0x31,-0x1a(%rbp)
movsbl -0x1a(%rbp),%eax
cmp    $0x38,%eax
jg     1d2d <get_queen_moves_white+0xbfd>
mov    -0x10(%rbp),%rdi
mov    -0x19(%rbp),%al
movsbl %al,%esi
movsbl -0x1a(%rbp),%edx
call   1040 <get_piece@plt>
mov    %al,-0x21(%rbp)
movsbl -0x21(%rbp),%eax
cmp    $0x51,%eax
jne    1d1b <get_queen_moves_white+0xbeb>
mov    -0x19(%rbp),%al
mov    %al,-0x22(%rbp)
movsbl -0x1a(%rbp),%eax
sub    $0x1,%eax
mov    %al,-0x23(%rbp)
movl   $0x1,-0x28(%rbp)
movsbl -0x1a(%rbp),%eax
cmp    $0x31,%eax
jne    11bb <get_queen_moves_white+0x8b>
movl   $0x0,-0x28(%rbp)
jmp    11c0 <get_queen_moves_white+0x90>
xor    %eax,%eax
cmpl   $0x1,-0x28(%rbp)
mov    %al,-0x29(%rbp)
jne    11eb <get_queen_moves_white+0xbb>
mov    -0x10(%rbp),%rdi
mov    -0x22(%rbp),%al
movsbl %al,%esi
movsbl -0x23(%rbp),%edx
call   1030 <is_occupied@plt>
cmp    $0x0,%eax
sete   %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
test   $0x1,%al
jne    11fb <get_queen_moves_white+0xcb>
jmp    12e3 <get_queen_moves_white+0x1b3>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
mov    -0x22(%rbp),%al
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %al,%eax
mov    %eax,(%rsp)
movsbl -0x23(%rbp),%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movsbl -0x23(%rbp),%eax
cmp    $0x31,%eax
jle    12c2 <get_queen_moves_white+0x192>
mov    -0x10(%rbp),%rdi
mov    -0x22(%rbp),%cl
movsbl -0x23(%rbp),%eax
sub    $0x1,%eax
movsbl %cl,%esi
movsbl %al,%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    12c2 <get_queen_moves_white+0x192>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
mov    -0x22(%rbp),%r10b
movsbl -0x23(%rbp),%eax
sub    $0x1,%eax
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %r10b,%r10d
mov    %r10d,(%rsp)
movsbl %al,%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x23(%rbp),%al
add    $0xff,%al
mov    %al,-0x23(%rbp)
movsbl -0x23(%rbp),%eax
cmp    $0x31,%eax
jge    12de <get_queen_moves_white+0x1ae>
movl   $0x0,-0x28(%rbp)
jmp    11c0 <get_queen_moves_white+0x90>
mov    -0x19(%rbp),%al
mov    %al,-0x22(%rbp)
movsbl -0x1a(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x23(%rbp)
movl   $0x1,-0x28(%rbp)
movsbl -0x1a(%rbp),%eax
cmp    $0x38,%eax
jne    130e <get_queen_moves_white+0x1de>
movl   $0x0,-0x28(%rbp)
jmp    1313 <get_queen_moves_white+0x1e3>
xor    %eax,%eax
cmpl   $0x1,-0x28(%rbp)
mov    %al,-0x2a(%rbp)
jne    133e <get_queen_moves_white+0x20e>
mov    -0x10(%rbp),%rdi
mov    -0x22(%rbp),%al
movsbl %al,%esi
movsbl -0x23(%rbp),%edx
call   1030 <is_occupied@plt>
cmp    $0x0,%eax
sete   %al
mov    %al,-0x2a(%rbp)
mov    -0x2a(%rbp),%al
test   $0x1,%al
jne    134e <get_queen_moves_white+0x21e>
jmp    1436 <get_queen_moves_white+0x306>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
mov    -0x22(%rbp),%al
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %al,%eax
mov    %eax,(%rsp)
movsbl -0x23(%rbp),%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movsbl -0x23(%rbp),%eax
cmp    $0x38,%eax
jge    1415 <get_queen_moves_white+0x2e5>
mov    -0x10(%rbp),%rdi
mov    -0x22(%rbp),%cl
movsbl -0x23(%rbp),%eax
add    $0x1,%eax
movsbl %cl,%esi
movsbl %al,%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    1415 <get_queen_moves_white+0x2e5>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
mov    -0x22(%rbp),%r10b
movsbl -0x23(%rbp),%eax
add    $0x1,%eax
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %r10b,%r10d
mov    %r10d,(%rsp)
movsbl %al,%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x23(%rbp),%al
add    $0x1,%al
mov    %al,-0x23(%rbp)
movsbl -0x23(%rbp),%eax
cmp    $0x38,%eax
jle    1431 <get_queen_moves_white+0x301>
movl   $0x0,-0x28(%rbp)
jmp    1313 <get_queen_moves_white+0x1e3>
movsbl -0x19(%rbp),%eax
sub    $0x1,%eax
mov    %al,-0x22(%rbp)
mov    -0x1a(%rbp),%al
mov    %al,-0x23(%rbp)
movl   $0x1,-0x28(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x61,%eax
jne    1461 <get_queen_moves_white+0x331>
movl   $0x0,-0x28(%rbp)
jmp    1466 <get_queen_moves_white+0x336>
xor    %eax,%eax
cmpl   $0x1,-0x28(%rbp)
mov    %al,-0x2b(%rbp)
jne    1491 <get_queen_moves_white+0x361>
mov    -0x10(%rbp),%rdi
mov    -0x22(%rbp),%al
movsbl %al,%esi
movsbl -0x23(%rbp),%edx
call   1030 <is_occupied@plt>
cmp    $0x0,%eax
sete   %al
mov    %al,-0x2b(%rbp)
mov    -0x2b(%rbp),%al
test   $0x1,%al
jne    14a1 <get_queen_moves_white+0x371>
jmp    1582 <get_queen_moves_white+0x452>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
mov    -0x22(%rbp),%al
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %al,%eax
mov    %eax,(%rsp)
movsbl -0x23(%rbp),%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movsbl -0x22(%rbp),%eax
cmp    $0x61,%eax
jle    1561 <get_queen_moves_white+0x431>
mov    -0x10(%rbp),%rdi
movsbl -0x22(%rbp),%eax
sub    $0x1,%eax
movsbl %al,%esi
movsbl -0x23(%rbp),%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    1561 <get_queen_moves_white+0x431>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
movsbl -0x22(%rbp),%eax
sub    $0x1,%eax
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %al,%eax
mov    %eax,(%rsp)
movsbl -0x23(%rbp),%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x22(%rbp),%al
add    $0xff,%al
mov    %al,-0x22(%rbp)
movsbl -0x22(%rbp),%eax
cmp    $0x61,%eax
jge    157d <get_queen_moves_white+0x44d>
movl   $0x0,-0x28(%rbp)
jmp    1466 <get_queen_moves_white+0x336>
movsbl -0x19(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x22(%rbp)
mov    -0x1a(%rbp),%al
mov    %al,-0x23(%rbp)
movl   $0x1,-0x28(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x68,%eax
jne    15ad <get_queen_moves_white+0x47d>
movl   $0x0,-0x28(%rbp)
jmp    15b2 <get_queen_moves_white+0x482>
xor    %eax,%eax
cmpl   $0x1,-0x28(%rbp)
mov    %al,-0x2c(%rbp)
jne    15dd <get_queen_moves_white+0x4ad>
mov    -0x10(%rbp),%rdi
mov    -0x22(%rbp),%al
movsbl %al,%esi
movsbl -0x23(%rbp),%edx
call   1030 <is_occupied@plt>
cmp    $0x0,%eax
sete   %al
mov    %al,-0x2c(%rbp)
mov    -0x2c(%rbp),%al
test   $0x1,%al
jne    15ed <get_queen_moves_white+0x4bd>
jmp    16ce <get_queen_moves_white+0x59e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
mov    -0x22(%rbp),%al
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %al,%eax
mov    %eax,(%rsp)
movsbl -0x23(%rbp),%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movsbl -0x22(%rbp),%eax
cmp    $0x68,%eax
jge    16ad <get_queen_moves_white+0x57d>
mov    -0x10(%rbp),%rdi
movsbl -0x22(%rbp),%eax
add    $0x1,%eax
movsbl %al,%esi
movsbl -0x23(%rbp),%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    16ad <get_queen_moves_white+0x57d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
movsbl -0x22(%rbp),%eax
add    $0x1,%eax
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %al,%eax
mov    %eax,(%rsp)
movsbl -0x23(%rbp),%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x22(%rbp),%al
add    $0x1,%al
mov    %al,-0x22(%rbp)
movsbl -0x22(%rbp),%eax
cmp    $0x68,%eax
jle    16c9 <get_queen_moves_white+0x599>
movl   $0x0,-0x28(%rbp)
jmp    15b2 <get_queen_moves_white+0x482>
movsbl -0x19(%rbp),%eax
sub    $0x1,%eax
mov    %al,-0x22(%rbp)
movsbl -0x1a(%rbp),%eax
sub    $0x1,%eax
mov    %al,-0x23(%rbp)
movl   $0x1,-0x28(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x61,%eax
je     1703 <get_queen_moves_white+0x5d3>
movsbl -0x1a(%rbp),%eax
cmp    $0x31,%eax
jne    170a <get_queen_moves_white+0x5da>
movl   $0x0,-0x28(%rbp)
jmp    170f <get_queen_moves_white+0x5df>
xor    %eax,%eax
cmpl   $0x1,-0x28(%rbp)
mov    %al,-0x2d(%rbp)
jne    173a <get_queen_moves_white+0x60a>
mov    -0x10(%rbp),%rdi
mov    -0x22(%rbp),%al
movsbl %al,%esi
movsbl -0x23(%rbp),%edx
call   1030 <is_occupied@plt>
cmp    $0x0,%eax
sete   %al
mov    %al,-0x2d(%rbp)
mov    -0x2d(%rbp),%al
test   $0x1,%al
jne    174a <get_queen_moves_white+0x61a>
jmp    1860 <get_queen_moves_white+0x730>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
mov    -0x22(%rbp),%al
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %al,%eax
mov    %eax,(%rsp)
movsbl -0x23(%rbp),%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movsbl -0x22(%rbp),%eax
cmp    $0x61,%eax
jle    182a <get_queen_moves_white+0x6fa>
movsbl -0x23(%rbp),%eax
cmp    $0x31,%eax
jle    182a <get_queen_moves_white+0x6fa>
mov    -0x10(%rbp),%rdi
movsbl -0x22(%rbp),%eax
sub    $0x1,%eax
mov    %al,%cl
movsbl -0x23(%rbp),%eax
sub    $0x1,%eax
movsbl %cl,%esi
movsbl %al,%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    182a <get_queen_moves_white+0x6fa>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
movsbl -0x22(%rbp),%eax
sub    $0x1,%eax
mov    %al,%r10b
movsbl -0x23(%rbp),%eax
sub    $0x1,%eax
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %r10b,%r10d
mov    %r10d,(%rsp)
movsbl %al,%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x22(%rbp),%al
add    $0xff,%al
mov    %al,-0x22(%rbp)
mov    -0x23(%rbp),%al
add    $0xff,%al
mov    %al,-0x23(%rbp)
movsbl -0x22(%rbp),%eax
cmp    $0x61,%eax
jl     1854 <get_queen_moves_white+0x724>
movsbl -0x23(%rbp),%eax
cmp    $0x31,%eax
jge    185b <get_queen_moves_white+0x72b>
movl   $0x0,-0x28(%rbp)
jmp    170f <get_queen_moves_white+0x5df>
movsbl -0x19(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x22(%rbp)
movsbl -0x1a(%rbp),%eax
sub    $0x1,%eax
mov    %al,-0x23(%rbp)
movl   $0x1,-0x28(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x68,%eax
je     1895 <get_queen_moves_white+0x765>
movsbl -0x1a(%rbp),%eax
cmp    $0x31,%eax
jne    189c <get_queen_moves_white+0x76c>
movl   $0x0,-0x28(%rbp)
jmp    18a1 <get_queen_moves_white+0x771>
xor    %eax,%eax
cmpl   $0x1,-0x28(%rbp)
mov    %al,-0x2e(%rbp)
jne    18cc <get_queen_moves_white+0x79c>
mov    -0x10(%rbp),%rdi
mov    -0x22(%rbp),%al
movsbl %al,%esi
movsbl -0x23(%rbp),%edx
call   1030 <is_occupied@plt>
cmp    $0x0,%eax
sete   %al
mov    %al,-0x2e(%rbp)
mov    -0x2e(%rbp),%al
test   $0x1,%al
jne    18dc <get_queen_moves_white+0x7ac>
jmp    19f2 <get_queen_moves_white+0x8c2>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
mov    -0x22(%rbp),%al
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %al,%eax
mov    %eax,(%rsp)
movsbl -0x23(%rbp),%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movsbl -0x22(%rbp),%eax
cmp    $0x68,%eax
jge    19bc <get_queen_moves_white+0x88c>
movsbl -0x23(%rbp),%eax
cmp    $0x31,%eax
jle    19bc <get_queen_moves_white+0x88c>
mov    -0x10(%rbp),%rdi
movsbl -0x22(%rbp),%eax
add    $0x1,%eax
mov    %al,%cl
movsbl -0x23(%rbp),%eax
sub    $0x1,%eax
movsbl %cl,%esi
movsbl %al,%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    19bc <get_queen_moves_white+0x88c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
movsbl -0x22(%rbp),%eax
add    $0x1,%eax
mov    %al,%r10b
movsbl -0x23(%rbp),%eax
sub    $0x1,%eax
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %r10b,%r10d
mov    %r10d,(%rsp)
movsbl %al,%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x22(%rbp),%al
add    $0x1,%al
mov    %al,-0x22(%rbp)
mov    -0x23(%rbp),%al
add    $0xff,%al
mov    %al,-0x23(%rbp)
movsbl -0x22(%rbp),%eax
cmp    $0x68,%eax
jg     19e6 <get_queen_moves_white+0x8b6>
movsbl -0x23(%rbp),%eax
cmp    $0x31,%eax
jge    19ed <get_queen_moves_white+0x8bd>
movl   $0x0,-0x28(%rbp)
jmp    18a1 <get_queen_moves_white+0x771>
movsbl -0x19(%rbp),%eax
sub    $0x1,%eax
mov    %al,-0x22(%rbp)
movsbl -0x1a(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x23(%rbp)
movl   $0x1,-0x28(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x61,%eax
je     1a27 <get_queen_moves_white+0x8f7>
movsbl -0x1a(%rbp),%eax
cmp    $0x38,%eax
jne    1a2e <get_queen_moves_white+0x8fe>
movl   $0x0,-0x28(%rbp)
jmp    1a33 <get_queen_moves_white+0x903>
xor    %eax,%eax
cmpl   $0x1,-0x28(%rbp)
mov    %al,-0x2f(%rbp)
jne    1a5e <get_queen_moves_white+0x92e>
mov    -0x10(%rbp),%rdi
mov    -0x22(%rbp),%al
movsbl %al,%esi
movsbl -0x23(%rbp),%edx
call   1030 <is_occupied@plt>
cmp    $0x0,%eax
sete   %al
mov    %al,-0x2f(%rbp)
mov    -0x2f(%rbp),%al
test   $0x1,%al
jne    1a6e <get_queen_moves_white+0x93e>
jmp    1b84 <get_queen_moves_white+0xa54>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
mov    -0x22(%rbp),%al
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %al,%eax
mov    %eax,(%rsp)
movsbl -0x23(%rbp),%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movsbl -0x22(%rbp),%eax
cmp    $0x61,%eax
jle    1b4e <get_queen_moves_white+0xa1e>
movsbl -0x23(%rbp),%eax
cmp    $0x38,%eax
jge    1b4e <get_queen_moves_white+0xa1e>
mov    -0x10(%rbp),%rdi
movsbl -0x22(%rbp),%eax
sub    $0x1,%eax
mov    %al,%cl
movsbl -0x23(%rbp),%eax
add    $0x1,%eax
movsbl %cl,%esi
movsbl %al,%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    1b4e <get_queen_moves_white+0xa1e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
movsbl -0x22(%rbp),%eax
sub    $0x1,%eax
mov    %al,%r10b
movsbl -0x23(%rbp),%eax
add    $0x1,%eax
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %r10b,%r10d
mov    %r10d,(%rsp)
movsbl %al,%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x22(%rbp),%al
add    $0xff,%al
mov    %al,-0x22(%rbp)
mov    -0x23(%rbp),%al
add    $0x1,%al
mov    %al,-0x23(%rbp)
movsbl -0x22(%rbp),%eax
cmp    $0x61,%eax
jl     1b78 <get_queen_moves_white+0xa48>
movsbl -0x23(%rbp),%eax
cmp    $0x38,%eax
jle    1b7f <get_queen_moves_white+0xa4f>
movl   $0x0,-0x28(%rbp)
jmp    1a33 <get_queen_moves_white+0x903>
movsbl -0x19(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x22(%rbp)
movsbl -0x1a(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x23(%rbp)
movl   $0x1,-0x28(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x68,%eax
je     1bb9 <get_queen_moves_white+0xa89>
movsbl -0x1a(%rbp),%eax
cmp    $0x38,%eax
jne    1bc0 <get_queen_moves_white+0xa90>
movl   $0x0,-0x28(%rbp)
jmp    1bc5 <get_queen_moves_white+0xa95>
xor    %eax,%eax
cmpl   $0x1,-0x28(%rbp)
mov    %al,-0x30(%rbp)
jne    1bf0 <get_queen_moves_white+0xac0>
mov    -0x10(%rbp),%rdi
mov    -0x22(%rbp),%al
movsbl %al,%esi
movsbl -0x23(%rbp),%edx
call   1030 <is_occupied@plt>
cmp    $0x0,%eax
sete   %al
mov    %al,-0x30(%rbp)
mov    -0x30(%rbp),%al
test   $0x1,%al
jne    1c00 <get_queen_moves_white+0xad0>
jmp    1d16 <get_queen_moves_white+0xbe6>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
mov    -0x22(%rbp),%al
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %al,%eax
mov    %eax,(%rsp)
movsbl -0x23(%rbp),%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movsbl -0x22(%rbp),%eax
cmp    $0x68,%eax
jge    1ce0 <get_queen_moves_white+0xbb0>
movsbl -0x23(%rbp),%eax
cmp    $0x38,%eax
jge    1ce0 <get_queen_moves_white+0xbb0>
mov    -0x10(%rbp),%rdi
movsbl -0x22(%rbp),%eax
add    $0x1,%eax
mov    %al,%cl
movsbl -0x23(%rbp),%eax
add    $0x1,%eax
movsbl %cl,%esi
movsbl %al,%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    1ce0 <get_queen_moves_white+0xbb0>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%r8b
mov    -0x1a(%rbp),%r9b
movsbl -0x22(%rbp),%eax
add    $0x1,%eax
mov    %al,%r10b
movsbl -0x23(%rbp),%eax
add    $0x1,%eax
mov    $0x1,%edx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %r10b,%r10d
mov    %r10d,(%rsp)
movsbl %al,%eax
mov    %eax,0x8(%rsp)
call   1050 <store_move@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x22(%rbp),%al
add    $0x1,%al
mov    %al,-0x22(%rbp)
mov    -0x23(%rbp),%al
add    $0x1,%al
mov    %al,-0x23(%rbp)
movsbl -0x22(%rbp),%eax
cmp    $0x68,%eax
jg     1d0a <get_queen_moves_white+0xbda>
movsbl -0x23(%rbp),%eax
cmp    $0x38,%eax
jle    1d11 <get_queen_moves_white+0xbe1>
movl   $0x0,-0x28(%rbp)
jmp    1bc5 <get_queen_moves_white+0xa95>
jmp    1d1b <get_queen_moves_white+0xbeb>
jmp    1d20 <get_queen_moves_white+0xbf0>
mov    -0x1a(%rbp),%al
add    $0x1,%al
mov    %al,-0x1a(%rbp)
jmp    1160 <get_queen_moves_white+0x30>
jmp    1d32 <get_queen_moves_white+0xc02>
mov    -0x19(%rbp),%al
add    $0x1,%al
mov    %al,-0x19(%rbp)
jmp    114f <get_queen_moves_white+0x1f>
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_queen_moves_white>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdx,0x18(%rsp)
mov    %rsi,%r15
mov    %rdi,(%rsp)
mov    $0x61,%bl
mov    %rsi,0x10(%rsp)
jmp    116e <get_queen_moves_white+0x3e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x34(%rsp),%eax
mov    %eax,%ebx
cmp    $0x69,%al
je     18d8 <get_queen_moves_white+0x7a8>
lea    -0x1(%rbx),%eax
mov    %eax,0x40(%rsp)
lea    0x1(%rbx),%eax
mov    %eax,0x34(%rsp)
mov    $0x31,%r12b
mov    %rbx,0x20(%rsp)
jmp    119e <get_queen_moves_white+0x6e>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%r12b
mov    %r12d,%eax
mov    %eax,%r12d
cmp    $0x39,%al
je     1160 <get_queen_moves_white+0x30>
movsbl %bl,%r13d
movsbl %r12b,%r14d
mov    %r15,%rdi
mov    %r13d,%esi
mov    %r14d,%edx
call   1040 <get_piece@plt>
cmp    $0x51,%al
jne    1190 <get_queen_moves_white+0x60>
lea    -0x1(%r12),%eax
mov    $0x32,%cl
cmp    $0x31,%r12b
mov    %eax,0x44(%rsp)
je     12b9 <get_queen_moves_white+0x189>
mov    %r12,0x28(%rsp)
mov    %r14,%r12
mov    %eax,%r14d
jmp    11ed <get_queen_moves_white+0xbd>
nopw   0x0(%rax,%rax,1)
mov    %ebp,%r14d
cmp    $0x30,%bpl
jbe    1280 <get_queen_moves_white+0x150>
movsbl %r14b,%ebx
mov    %r15,%rdi
mov    %r13d,%esi
mov    %ebx,%edx
call   1030 <is_occupied@plt>
test   %eax,%eax
jne    1280 <get_queen_moves_white+0x150>
mov    (%rsp),%rdi
mov    %r15,%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    %r13d,%r8d
mov    %r12d,%r9d
push   %rbx
push   %r13
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
lea    -0x1(%rbx),%ebp
cmp    $0x32,%bl
jb     11e0 <get_queen_moves_white+0xb0>
movsbl %bpl,%edx
mov    %r15,%rdi
mov    %r13d,%esi
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    11e0 <get_queen_moves_white+0xb0>
add    $0xff,%r14b
movsbl %r14b,%eax
mov    (%rsp),%rdi
mov    %r15,%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    %r13d,%r8d
mov    %r12d,%r9d
push   %rax
push   %r13
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x28(%rsp),%rcx
cmp    $0x38,%cl
jne    12ae <get_queen_moves_white+0x17e>
mov    $0x1,%al
mov    %eax,0x30(%rsp)
mov    %r12,%r14
mov    $0x39,%al
mov    %eax,0xc(%rsp)
mov    0x20(%rsp),%rax
mov    %rcx,%r12
cmp    $0x61,%al
jne    1357 <get_queen_moves_white+0x227>
jmp    13f0 <get_queen_moves_white+0x2c0>
lea    0x1(%rcx),%eax
mov    %r12,%r14
mov    %rcx,%r12
mov    %eax,%ecx
mov    %ecx,0xc(%rsp)
mov    %ecx,%ebp
nop
movsbl %bpl,%ebx
mov    %r15,%rdi
mov    %r13d,%esi
mov    %ebx,%edx
call   1030 <is_occupied@plt>
test   %eax,%eax
jne    1342 <get_queen_moves_white+0x212>
mov    (%rsp),%rdi
mov    %r15,%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    %r13d,%r8d
mov    %r14d,%r9d
push   %rbx
push   %r13
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
cmp    $0x37,%bl
ja     1342 <get_queen_moves_white+0x212>
add    $0x1,%bpl
movsbl %bpl,%ebx
mov    %r15,%rdi
mov    %r13d,%esi
mov    %ebx,%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    12c0 <get_queen_moves_white+0x190>
mov    (%rsp),%rdi
mov    %r15,%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    %r13d,%r8d
mov    %r14d,%r9d
push   %rbx
push   %r13
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
movl   $0x0,0x30(%rsp)
mov    0x20(%rsp),%rax
cmp    $0x61,%al
je     13f0 <get_queen_moves_white+0x2c0>
mov    0x40(%rsp),%ebp
jmp    136a <get_queen_moves_white+0x23a>
nopl   (%rax)
cmp    $0x60,%bpl
jbe    13f0 <get_queen_moves_white+0x2c0>
movsbl %bpl,%ebx
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r14d,%edx
call   1030 <is_occupied@plt>
test   %eax,%eax
jne    13f0 <get_queen_moves_white+0x2c0>
mov    (%rsp),%rdi
mov    %r15,%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    %r13d,%r8d
mov    %r14d,%r9d
push   %r14
push   %rbx
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
lea    -0x1(%rbx),%ebp
cmp    $0x62,%bl
jb     1360 <get_queen_moves_white+0x230>
movsbl %bpl,%ebx
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r14d,%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    1360 <get_queen_moves_white+0x230>
mov    (%rsp),%rdi
mov    %r15,%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    %r13d,%r8d
mov    %r14d,%r9d
push   %r14
push   %rbx
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
nopl   0x0(%rax,%rax,1)
mov    0x20(%rsp),%rax
cmp    $0x68,%al
je     1497 <get_queen_moves_white+0x367>
mov    0x34(%rsp),%eax
mov    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %bpl,%ebx
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r14d,%edx
call   1030 <is_occupied@plt>
test   %eax,%eax
jne    1492 <get_queen_moves_white+0x362>
mov    (%rsp),%rdi
mov    %r15,%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    %r13d,%r8d
mov    %r14d,%r9d
push   %r14
push   %rbx
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
cmp    $0x67,%bl
ja     1492 <get_queen_moves_white+0x362>
add    $0x1,%bpl
movsbl %bpl,%ebx
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r14d,%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    1410 <get_queen_moves_white+0x2e0>
mov    (%rsp),%rdi
mov    %r15,%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    %r13d,%r8d
mov    %r14d,%r9d
push   %r14
push   %rbx
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
mov    0x20(%rsp),%rax
cmp    $0x61,%al
mov    %r13,0x28(%rsp)
mov    %r14,0x38(%rsp)
je     1550 <get_queen_moves_white+0x420>
cmp    $0x31,%r12b
je     1550 <get_queen_moves_white+0x420>
mov    0x44(%rsp),%eax
mov    %eax,%ebx
mov    0x40(%rsp),%eax
mov    %eax,%r15d
movsbl %r15b,%r14d
movsbl %bl,%ebp
mov    0x10(%rsp),%r13
mov    %r13,%rdi
mov    %r14d,%esi
mov    %ebp,%edx
call   1030 <is_occupied@plt>
test   %eax,%eax
jne    1550 <get_queen_moves_white+0x420>
mov    (%rsp),%rdi
mov    %r13,%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    0x28(%rsp),%r8
mov    0x38(%rsp),%r9
push   %rbp
push   %r14
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
add    $0xff,%bpl
lea    -0x1(%r14),%r13d
cmp    $0x62,%r14b
jb     1536 <get_queen_moves_white+0x406>
cmp    $0x32,%bl
jb     1536 <get_queen_moves_white+0x406>
movsbl %r13b,%esi
movsbl %bpl,%edx
mov    0x10(%rsp),%rdi
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
je     1610 <get_queen_moves_white+0x4e0>
cmp    $0x61,%r13b
jb     1550 <get_queen_moves_white+0x420>
mov    %ebp,%ebx
mov    %r13d,%r15d
cmp    $0x30,%bpl
ja     14c0 <get_queen_moves_white+0x390>
nopl   0x0(%rax,%rax,1)
cmpb   $0x68,0x20(%rsp)
je     1660 <get_queen_moves_white+0x530>
cmp    $0x31,%r12b
je     1660 <get_queen_moves_white+0x530>
mov    0x34(%rsp),%eax
mov    %eax,%r14d
mov    0x10(%rsp),%r15
mov    0x28(%rsp),%r13
mov    0x44(%rsp),%eax
nopw   0x0(%rax,%rax,1)
movsbl %r14b,%ebx
mov    %eax,%r12d
movsbl %al,%ebp
mov    %r15,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <is_occupied@plt>
test   %eax,%eax
jne    1665 <get_queen_moves_white+0x535>
mov    (%rsp),%rdi
mov    %r15,%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    %r13d,%r8d
mov    0x38(%rsp),%r9
push   %rbp
push   %rbx
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
add    $0xff,%bpl
lea    0x1(%rbx),%r15d
cmp    $0x67,%bl
ja     15f4 <get_queen_moves_white+0x4c4>
cmp    $0x32,%r12b
jb     15f4 <get_queen_moves_white+0x4c4>
movsbl %r15b,%esi
movsbl %bpl,%edx
mov    0x10(%rsp),%rdi
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
je     17fc <get_queen_moves_white+0x6cc>
cmp    $0x67,%r14b
ja     1665 <get_queen_moves_white+0x535>
mov    %ebp,%eax
mov    %r15d,%r14d
cmp    $0x30,%bpl
mov    0x10(%rsp),%r15
ja     1580 <get_queen_moves_white+0x450>
jmp    1665 <get_queen_moves_white+0x535>
add    $0xff,%bl
add    $0xff,%r15b
movsbl %bl,%eax
movsbl %r15b,%ebp
mov    (%rsp),%rdi
mov    0x10(%rsp),%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    0x28(%rsp),%r8
mov    0x38(%rsp),%r9
push   %rax
push   %rbp
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
cmpb   $0x68,0x20(%rsp)
jne    155b <get_queen_moves_white+0x42b>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x28(%rsp),%r13
cmpb   $0x61,0x20(%rsp)
sete   %al
or     0x30(%rsp),%al
je     16a0 <get_queen_moves_white+0x570>
mov    0x20(%rsp),%rbx
cmp    $0x68,%bl
sete   %al
or     0x30(%rsp),%al
je     1750 <get_queen_moves_white+0x620>
mov    0x10(%rsp),%r15
jmp    18c5 <get_queen_moves_white+0x795>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0xc(%rsp),%eax
mov    %eax,%r14d
mov    0x40(%rsp),%eax
mov    %eax,%r15d
xchg   %ax,%ax
movsbl %r15b,%ebx
movsbl %r14b,%r12d
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %ebx,%esi
mov    %r12d,%edx
call   1030 <is_occupied@plt>
test   %eax,%eax
jne    1673 <get_queen_moves_white+0x543>
mov    (%rsp),%rdi
mov    %rbp,%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    %r13d,%r8d
mov    0x38(%rsp),%r9
push   %r12
push   %rbx
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
add    $0x1,%r12b
lea    -0x1(%rbx),%r13d
cmp    $0x62,%bl
jb     1725 <get_queen_moves_white+0x5f5>
cmp    $0x37,%r14b
ja     1725 <get_queen_moves_white+0x5f5>
movsbl %r13b,%esi
movsbl %r12b,%edx
mov    0x10(%rsp),%rdi
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
je     183b <get_queen_moves_white+0x70b>
cmp    $0x61,%r13b
jb     18ce <get_queen_moves_white+0x79e>
mov    %r13d,%r15d
cmp    $0x38,%r14b
mov    %r12d,%r14d
mov    0x28(%rsp),%r13
jb     16b0 <get_queen_moves_white+0x580>
jmp    1673 <get_queen_moves_white+0x543>
nopl   0x0(%rax)
mov    0xc(%rsp),%eax
mov    %eax,%r14d
mov    0x34(%rsp),%eax
mov    %eax,%r12d
xchg   %ax,%ax
movsbl %r12b,%ebx
movsbl %r14b,%ebp
mov    0x10(%rsp),%r15
mov    %r15,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <is_occupied@plt>
test   %eax,%eax
jne    18c0 <get_queen_moves_white+0x790>
mov    (%rsp),%rdi
mov    %r15,%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    %r13d,%r8d
mov    0x38(%rsp),%r9
push   %rbp
push   %rbx
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
add    $0x1,%bpl
lea    0x1(%rbx),%r13d
cmp    $0x67,%bl
ja     17d7 <get_queen_moves_white+0x6a7>
cmp    $0x37,%r14b
ja     17d7 <get_queen_moves_white+0x6a7>
movsbl %r13b,%esi
movsbl %bpl,%edx
mov    0x10(%rsp),%rdi
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
je     187f <get_queen_moves_white+0x74f>
cmp    $0x67,%r12b
ja     17f2 <get_queen_moves_white+0x6c2>
mov    %r13d,%r12d
cmp    $0x38,%r14b
mov    %ebp,%r14d
mov    0x28(%rsp),%r13
jb     1760 <get_queen_moves_white+0x630>
mov    0x10(%rsp),%r15
jmp    18c0 <get_queen_moves_white+0x790>
add    $0xff,%r12b
add    $0x1,%r14b
movsbl %r12b,%eax
movsbl %r14b,%ebp
mov    (%rsp),%rdi
mov    0x10(%rsp),%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    %r13d,%r8d
mov    0x38(%rsp),%r9
push   %rax
push   %rbp
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
jmp    1665 <get_queen_moves_white+0x535>
add    $0x1,%r14b
add    $0xff,%r15b
movsbl %r14b,%eax
movsbl %r15b,%ebp
mov    (%rsp),%rdi
mov    0x10(%rsp),%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    0x28(%rsp),%r13
mov    %r13d,%r8d
mov    0x38(%rsp),%r9
push   %rax
push   %rbp
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
jmp    1673 <get_queen_moves_white+0x543>
add    $0x1,%r14b
add    $0x1,%r12b
movsbl %r14b,%eax
movsbl %r12b,%ebp
mov    (%rsp),%rdi
mov    0x10(%rsp),%r15
mov    %r15,%rsi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
mov    0x28(%rsp),%r8
mov    0x38(%rsp),%r9
push   %rax
push   %rbp
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,(%rsp)
xchg   %ax,%ax
mov    0x20(%rsp),%rbx
mov    0xc(%rsp),%eax
jmp    1197 <get_queen_moves_white+0x67>
mov    0x28(%rsp),%r13
jmp    1673 <get_queen_moves_white+0x543>
mov    (%rsp),%rax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.node = type { i32 }
define %struct.node* @get_queen_moves_white(%struct.node* %0, i8* %1, %struct.node* %2) {
%4 = alloca %struct.node*
%5 = alloca i8*
%6 = alloca %struct.node*
%7 = alloca i8
%8 = alloca i8
%9 = alloca i32
%10 = alloca i8
%11 = alloca i8
%12 = alloca i8
%13 = alloca i32
store %struct.node* %0, %struct.node** %4
store i8* %1, i8** %5
store %struct.node* %2, %struct.node** %6
store i32 0, i32* %9
store i8 97, i8* %7
br label %14
14: ; preds = %665, %3
%15 = load i8, i8* %7
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 104
br i1 %17, label %18, label %668
18: ; preds = %14
store i8 49, i8* %8
br label %19
19: ; preds = %661, %18
%20 = load i8, i8* %8
%21 = sext i8 %20 to i32
%22 = icmp sle i32 %21, 56
br i1 %22, label %23, label %664
23: ; preds = %19
%24 = load i8*, i8** %5
%25 = load i8, i8* %7
%26 = load i8, i8* %8
%27 = call signext i8 @get_piece(i8* %24, i8 signext %25, i8 signext %26)
store i8 %27, i8* %10
%28 = load i8, i8* %10
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 81
br i1 %30, label %31, label %660
31: ; preds = %23
%32 = load i8, i8* %7
store i8 %32, i8* %11
%33 = load i8, i8* %8
%34 = sext i8 %33 to i32
%35 = sub nsw i32 %34, 1
%36 = trunc i32 %35 to i8
store i8 %36, i8* %12
store i32 1, i32* %13
%37 = load i8, i8* %8
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 49
br i1 %39, label %40, label %41
40: ; preds = %31
store i32 0, i32* %13
br label %41
41: ; preds = %40, %31
br label %42
42: ; preds = %97, %41
%43 = load i32, i32* %13
%44 = icmp eq i32 %43, 1
br i1 %44, label %45, label %51
45: ; preds = %42
%46 = load i8*, i8** %5
%47 = load i8, i8* %11
%48 = load i8, i8* %12
%49 = call i32 @is_occupied(i8* %46, i8 signext %47, i8 signext %48)
%50 = icmp eq i32 %49, 0
br label %51
51: ; preds = %45, %42
%52 = phi i1 [ false, %42 ], [ %50, %45 ]
br i1 %52, label %53, label %98
53: ; preds = %51
%54 = load %struct.node*, %struct.node** %4
%55 = load i8*, i8** %5
%56 = load %struct.node*, %struct.node** %6
%57 = load i8, i8* %7
%58 = load i8, i8* %8
%59 = load i8, i8* %11
%60 = load i8, i8* %12
%61 = call %struct.node* @store_move(%struct.node* %54, i8* %55, i32 1, %struct.node* %56, i8 signext %57, i8 signext %58, i8 signext %59, i8 signext %60)
store %struct.node* %61, %struct.node** %4
%62 = load i32, i32* %9
%63 = add nsw i32 %62, 1
store i32 %63, i32* %9
%64 = load i8, i8* %12
%65 = sext i8 %64 to i32
%66 = icmp sgt i32 %65, 49
br i1 %66, label %67, label %90
67: ; preds = %53
%68 = load i8*, i8** %5
%69 = load i8, i8* %11
%70 = load i8, i8* %12
%71 = sext i8 %70 to i32
%72 = sub nsw i32 %71, 1
%73 = trunc i32 %72 to i8
%74 = call i32 @is_occupied(i8* %68, i8 signext %69, i8 signext %73)
%75 = icmp eq i32 %74, -1
br i1 %75, label %76, label %90
76: ; preds = %67
%77 = load %struct.node*, %struct.node** %4
%78 = load i8*, i8** %5
%79 = load %struct.node*, %struct.node** %6
%80 = load i8, i8* %7
%81 = load i8, i8* %8
%82 = load i8, i8* %11
%83 = load i8, i8* %12
%84 = sext i8 %83 to i32
%85 = sub nsw i32 %84, 1
%86 = trunc i32 %85 to i8
%87 = call %struct.node* @store_move(%struct.node* %77, i8* %78, i32 1, %struct.node* %79, i8 signext %80, i8 signext %81, i8 signext %82, i8 signext %86)
store %struct.node* %87, %struct.node** %4
%88 = load i32, i32* %9
%89 = add nsw i32 %88, 1
store i32 %89, i32* %9
store i32 0, i32* %13
br label %90
90: ; preds = %76, %67, %53
%91 = load i8, i8* %12
%92 = add i8 %91, -1
store i8 %92, i8* %12
%93 = load i8, i8* %12
%94 = sext i8 %93 to i32
%95 = icmp slt i32 %94, 49
br i1 %95, label %96, label %97
96: ; preds = %90
store i32 0, i32* %13
br label %97
97: ; preds = %96, %90
br label %42
98: ; preds = %51
%99 = load i8, i8* %7
store i8 %99, i8* %11
%100 = load i8, i8* %8
%101 = sext i8 %100 to i32
%102 = add nsw i32 %101, 1
%103 = trunc i32 %102 to i8
store i8 %103, i8* %12
store i32 1, i32* %13
%104 = load i8, i8* %8
%105 = sext i8 %104 to i32
%106 = icmp eq i32 %105, 56
br i1 %106, label %107, label %108
107: ; preds = %98
store i32 0, i32* %13
br label %108
108: ; preds = %107, %98
br label %109
109: ; preds = %164, %108
%110 = load i32, i32* %13
%111 = icmp eq i32 %110, 1
br i1 %111, label %112, label %118
112: ; preds = %109
%113 = load i8*, i8** %5
%114 = load i8, i8* %11
%115 = load i8, i8* %12
%116 = call i32 @is_occupied(i8* %113, i8 signext %114, i8 signext %115)
%117 = icmp eq i32 %116, 0
br label %118
118: ; preds = %112, %109
%119 = phi i1 [ false, %109 ], [ %117, %112 ]
br i1 %119, label %120, label %165
120: ; preds = %118
%121 = load %struct.node*, %struct.node** %4
%122 = load i8*, i8** %5
%123 = load %struct.node*, %struct.node** %6
%124 = load i8, i8* %7
%125 = load i8, i8* %8
%126 = load i8, i8* %11
%127 = load i8, i8* %12
%128 = call %struct.node* @store_move(%struct.node* %121, i8* %122, i32 1, %struct.node* %123, i8 signext %124, i8 signext %125, i8 signext %126, i8 signext %127)
store %struct.node* %128, %struct.node** %4
%129 = load i32, i32* %9
%130 = add nsw i32 %129, 1
store i32 %130, i32* %9
%131 = load i8, i8* %12
%132 = sext i8 %131 to i32
%133 = icmp slt i32 %132, 56
br i1 %133, label %134, label %157
134: ; preds = %120
%135 = load i8*, i8** %5
%136 = load i8, i8* %11
%137 = load i8, i8* %12
%138 = sext i8 %137 to i32
%139 = add nsw i32 %138, 1
%140 = trunc i32 %139 to i8
%141 = call i32 @is_occupied(i8* %135, i8 signext %136, i8 signext %140)
%142 = icmp eq i32 %141, -1
br i1 %142, label %143, label %157
143: ; preds = %134
%144 = load %struct.node*, %struct.node** %4
%145 = load i8*, i8** %5
%146 = load %struct.node*, %struct.node** %6
%147 = load i8, i8* %7
%148 = load i8, i8* %8
%149 = load i8, i8* %11
%150 = load i8, i8* %12
%151 = sext i8 %150 to i32
%152 = add nsw i32 %151, 1
%153 = trunc i32 %152 to i8
%154 = call %struct.node* @store_move(%struct.node* %144, i8* %145, i32 1, %struct.node* %146, i8 signext %147, i8 signext %148, i8 signext %149, i8 signext %153)
store %struct.node* %154, %struct.node** %4
%155 = load i32, i32* %9
%156 = add nsw i32 %155, 1
store i32 %156, i32* %9
store i32 0, i32* %13
br label %157
157: ; preds = %143, %134, %120
%158 = load i8, i8* %12
%159 = add i8 %158, 1
store i8 %159, i8* %12
%160 = load i8, i8* %12
%161 = sext i8 %160 to i32
%162 = icmp sgt i32 %161, 56
br i1 %162, label %163, label %164
163: ; preds = %157
store i32 0, i32* %13
br label %164
164: ; preds = %163, %157
br label %109
165: ; preds = %118
%166 = load i8, i8* %7
%167 = sext i8 %166 to i32
%168 = sub nsw i32 %167, 1
%169 = trunc i32 %168 to i8
store i8 %169, i8* %11
%170 = load i8, i8* %8
store i8 %170, i8* %12
store i32 1, i32* %13
%171 = load i8, i8* %7
%172 = sext i8 %171 to i32
%173 = icmp eq i32 %172, 97
br i1 %173, label %174, label %175
174: ; preds = %165
store i32 0, i32* %13
br label %175
175: ; preds = %174, %165
br label %176
176: ; preds = %231, %175
%177 = load i32, i32* %13
%178 = icmp eq i32 %177, 1
br i1 %178, label %179, label %185
179: ; preds = %176
%180 = load i8*, i8** %5
%181 = load i8, i8* %11
%182 = load i8, i8* %12
%183 = call i32 @is_occupied(i8* %180, i8 signext %181, i8 signext %182)
%184 = icmp eq i32 %183, 0
br label %185
185: ; preds = %179, %176
%186 = phi i1 [ false, %176 ], [ %184, %179 ]
br i1 %186, label %187, label %232
187: ; preds = %185
%188 = load %struct.node*, %struct.node** %4
%189 = load i8*, i8** %5
%190 = load %struct.node*, %struct.node** %6
%191 = load i8, i8* %7
%192 = load i8, i8* %8
%193 = load i8, i8* %11
%194 = load i8, i8* %12
%195 = call %struct.node* @store_move(%struct.node* %188, i8* %189, i32 1, %struct.node* %190, i8 signext %191, i8 signext %192, i8 signext %193, i8 signext %194)
store %struct.node* %195, %struct.node** %4
%196 = load i32, i32* %9
%197 = add nsw i32 %196, 1
store i32 %197, i32* %9
%198 = load i8, i8* %11
%199 = sext i8 %198 to i32
%200 = icmp sgt i32 %199, 97
br i1 %200, label %201, label %224
201: ; preds = %187
%202 = load i8*, i8** %5
%203 = load i8, i8* %11
%204 = sext i8 %203 to i32
%205 = sub nsw i32 %204, 1
%206 = trunc i32 %205 to i8
%207 = load i8, i8* %12
%208 = call i32 @is_occupied(i8* %202, i8 signext %206, i8 signext %207)
%209 = icmp eq i32 %208, -1
br i1 %209, label %210, label %224
210: ; preds = %201
%211 = load %struct.node*, %struct.node** %4
%212 = load i8*, i8** %5
%213 = load %struct.node*, %struct.node** %6
%214 = load i8, i8* %7
%215 = load i8, i8* %8
%216 = load i8, i8* %11
%217 = sext i8 %216 to i32
%218 = sub nsw i32 %217, 1
%219 = trunc i32 %218 to i8
%220 = load i8, i8* %12
%221 = call %struct.node* @store_move(%struct.node* %211, i8* %212, i32 1, %struct.node* %213, i8 signext %214, i8 signext %215, i8 signext %219, i8 signext %220)
store %struct.node* %221, %struct.node** %4
%222 = load i32, i32* %9
%223 = add nsw i32 %222, 1
store i32 %223, i32* %9
store i32 0, i32* %13
br label %224
224: ; preds = %210, %201, %187
%225 = load i8, i8* %11
%226 = add i8 %225, -1
store i8 %226, i8* %11
%227 = load i8, i8* %11
%228 = sext i8 %227 to i32
%229 = icmp slt i32 %228, 97
br i1 %229, label %230, label %231
230: ; preds = %224
store i32 0, i32* %13
br label %231
231: ; preds = %230, %224
br label %176
232: ; preds = %185
%233 = load i8, i8* %7
%234 = sext i8 %233 to i32
%235 = add nsw i32 %234, 1
%236 = trunc i32 %235 to i8
store i8 %236, i8* %11
%237 = load i8, i8* %8
store i8 %237, i8* %12
store i32 1, i32* %13
%238 = load i8, i8* %7
%239 = sext i8 %238 to i32
%240 = icmp eq i32 %239, 104
br i1 %240, label %241, label %242
241: ; preds = %232
store i32 0, i32* %13
br label %242
242: ; preds = %241, %232
br label %243
243: ; preds = %298, %242
%244 = load i32, i32* %13
%245 = icmp eq i32 %244, 1
br i1 %245, label %246, label %252
246: ; preds = %243
%247 = load i8*, i8** %5
%248 = load i8, i8* %11
%249 = load i8, i8* %12
%250 = call i32 @is_occupied(i8* %247, i8 signext %248, i8 signext %249)
%251 = icmp eq i32 %250, 0
br label %252
252: ; preds = %246, %243
%253 = phi i1 [ false, %243 ], [ %251, %246 ]
br i1 %253, label %254, label %299
254: ; preds = %252
%255 = load %struct.node*, %struct.node** %4
%256 = load i8*, i8** %5
%257 = load %struct.node*, %struct.node** %6
%258 = load i8, i8* %7
%259 = load i8, i8* %8
%260 = load i8, i8* %11
%261 = load i8, i8* %12
%262 = call %struct.node* @store_move(%struct.node* %255, i8* %256, i32 1, %struct.node* %257, i8 signext %258, i8 signext %259, i8 signext %260, i8 signext %261)
store %struct.node* %262, %struct.node** %4
%263 = load i32, i32* %9
%264 = add nsw i32 %263, 1
store i32 %264, i32* %9
%265 = load i8, i8* %11
%266 = sext i8 %265 to i32
%267 = icmp slt i32 %266, 104
br i1 %267, label %268, label %291
268: ; preds = %254
%269 = load i8*, i8** %5
%270 = load i8, i8* %11
%271 = sext i8 %270 to i32
%272 = add nsw i32 %271, 1
%273 = trunc i32 %272 to i8
%274 = load i8, i8* %12
%275 = call i32 @is_occupied(i8* %269, i8 signext %273, i8 signext %274)
%276 = icmp eq i32 %275, -1
br i1 %276, label %277, label %291
277: ; preds = %268
%278 = load %struct.node*, %struct.node** %4
%279 = load i8*, i8** %5
%280 = load %struct.node*, %struct.node** %6
%281 = load i8, i8* %7
%282 = load i8, i8* %8
%283 = load i8, i8* %11
%284 = sext i8 %283 to i32
%285 = add nsw i32 %284, 1
%286 = trunc i32 %285 to i8
%287 = load i8, i8* %12
%288 = call %struct.node* @store_move(%struct.node* %278, i8* %279, i32 1, %struct.node* %280, i8 signext %281, i8 signext %282, i8 signext %286, i8 signext %287)
store %struct.node* %288, %struct.node** %4
%289 = load i32, i32* %9
%290 = add nsw i32 %289, 1
store i32 %290, i32* %9
store i32 0, i32* %13
br label %291
291: ; preds = %277, %268, %254
%292 = load i8, i8* %11
%293 = add i8 %292, 1
store i8 %293, i8* %11
%294 = load i8, i8* %11
%295 = sext i8 %294 to i32
%296 = icmp sgt i32 %295, 104
br i1 %296, label %297, label %298
297: ; preds = %291
store i32 0, i32* %13
br label %298
298: ; preds = %297, %291
br label %243
299: ; preds = %252
%300 = load i8, i8* %7
%301 = sext i8 %300 to i32
%302 = sub nsw i32 %301, 1
%303 = trunc i32 %302 to i8
store i8 %303, i8* %11
%304 = load i8, i8* %8
%305 = sext i8 %304 to i32
%306 = sub nsw i32 %305, 1
%307 = trunc i32 %306 to i8
store i8 %307, i8* %12
store i32 1, i32* %13
%308 = load i8, i8* %7
%309 = sext i8 %308 to i32
%310 = icmp eq i32 %309, 97
br i1 %310, label %315, label %311
311: ; preds = %299
%312 = load i8, i8* %8
%313 = sext i8 %312 to i32
%314 = icmp eq i32 %313, 49
br i1 %314, label %315, label %316
315: ; preds = %311, %299
store i32 0, i32* %13
br label %316
316: ; preds = %315, %311
br label %317
317: ; preds = %388, %316
%318 = load i32, i32* %13
%319 = icmp eq i32 %318, 1
br i1 %319, label %320, label %326
320: ; preds = %317
%321 = load i8*, i8** %5
%322 = load i8, i8* %11
%323 = load i8, i8* %12
%324 = call i32 @is_occupied(i8* %321, i8 signext %322, i8 signext %323)
%325 = icmp eq i32 %324, 0
br label %326
326: ; preds = %320, %317
%327 = phi i1 [ false, %317 ], [ %325, %320 ]
br i1 %327, label %328, label %389
328: ; preds = %326
%329 = load %struct.node*, %struct.node** %4
%330 = load i8*, i8** %5
%331 = load %struct.node*, %struct.node** %6
%332 = load i8, i8* %7
%333 = load i8, i8* %8
%334 = load i8, i8* %11
%335 = load i8, i8* %12
%336 = call %struct.node* @store_move(%struct.node* %329, i8* %330, i32 1, %struct.node* %331, i8 signext %332, i8 signext %333, i8 signext %334, i8 signext %335)
store %struct.node* %336, %struct.node** %4
%337 = load i32, i32* %9
%338 = add nsw i32 %337, 1
store i32 %338, i32* %9
%339 = load i8, i8* %11
%340 = sext i8 %339 to i32
%341 = icmp sgt i32 %340, 97
br i1 %341, label %342, label %375
342: ; preds = %328
%343 = load i8, i8* %12
%344 = sext i8 %343 to i32
%345 = icmp sgt i32 %344, 49
br i1 %345, label %346, label %375
346: ; preds = %342
%347 = load i8*, i8** %5
%348 = load i8, i8* %11
%349 = sext i8 %348 to i32
%350 = sub nsw i32 %349, 1
%351 = trunc i32 %350 to i8
%352 = load i8, i8* %12
%353 = sext i8 %352 to i32
%354 = sub nsw i32 %353, 1
%355 = trunc i32 %354 to i8
%356 = call i32 @is_occupied(i8* %347, i8 signext %351, i8 signext %355)
%357 = icmp eq i32 %356, -1
br i1 %357, label %358, label %375
358: ; preds = %346
%359 = load %struct.node*, %struct.node** %4
%360 = load i8*, i8** %5
%361 = load %struct.node*, %struct.node** %6
%362 = load i8, i8* %7
%363 = load i8, i8* %8
%364 = load i8, i8* %11
%365 = sext i8 %364 to i32
%366 = sub nsw i32 %365, 1
%367 = trunc i32 %366 to i8
%368 = load i8, i8* %12
%369 = sext i8 %368 to i32
%370 = sub nsw i32 %369, 1
%371 = trunc i32 %370 to i8
%372 = call %struct.node* @store_move(%struct.node* %359, i8* %360, i32 1, %struct.node* %361, i8 signext %362, i8 signext %363, i8 signext %367, i8 signext %371)
store %struct.node* %372, %struct.node** %4
%373 = load i32, i32* %9
%374 = add nsw i32 %373, 1
store i32 %374, i32* %9
store i32 0, i32* %13
br label %375
375: ; preds = %358, %346, %342, %328
%376 = load i8, i8* %11
%377 = add i8 %376, -1
store i8 %377, i8* %11
%378 = load i8, i8* %12
%379 = add i8 %378, -1
store i8 %379, i8* %12
%380 = load i8, i8* %11
%381 = sext i8 %380 to i32
%382 = icmp slt i32 %381, 97
br i1 %382, label %387, label %383
383: ; preds = %375
%384 = load i8, i8* %12
%385 = sext i8 %384 to i32
%386 = icmp slt i32 %385, 49
br i1 %386, label %387, label %388
387: ; preds = %383, %375
store i32 0, i32* %13
br label %388
388: ; preds = %387, %383
br label %317
389: ; preds = %326
%390 = load i8, i8* %7
%391 = sext i8 %390 to i32
%392 = add nsw i32 %391, 1
%393 = trunc i32 %392 to i8
store i8 %393, i8* %11
%394 = load i8, i8* %8
%395 = sext i8 %394 to i32
%396 = sub nsw i32 %395, 1
%397 = trunc i32 %396 to i8
store i8 %397, i8* %12
store i32 1, i32* %13
%398 = load i8, i8* %7
%399 = sext i8 %398 to i32
%400 = icmp eq i32 %399, 104
br i1 %400, label %405, label %401
401: ; preds = %389
%402 = load i8, i8* %8
%403 = sext i8 %402 to i32
%404 = icmp eq i32 %403, 49
br i1 %404, label %405, label %406
405: ; preds = %401, %389
store i32 0, i32* %13
br label %406
406: ; preds = %405, %401
br label %407
407: ; preds = %478, %406
%408 = load i32, i32* %13
%409 = icmp eq i32 %408, 1
br i1 %409, label %410, label %416
410: ; preds = %407
%411 = load i8*, i8** %5
%412 = load i8, i8* %11
%413 = load i8, i8* %12
%414 = call i32 @is_occupied(i8* %411, i8 signext %412, i8 signext %413)
%415 = icmp eq i32 %414, 0
br label %416
416: ; preds = %410, %407
%417 = phi i1 [ false, %407 ], [ %415, %410 ]
br i1 %417, label %418, label %479
418: ; preds = %416
%419 = load %struct.node*, %struct.node** %4
%420 = load i8*, i8** %5
%421 = load %struct.node*, %struct.node** %6
%422 = load i8, i8* %7
%423 = load i8, i8* %8
%424 = load i8, i8* %11
%425 = load i8, i8* %12
%426 = call %struct.node* @store_move(%struct.node* %419, i8* %420, i32 1, %struct.node* %421, i8 signext %422, i8 signext %423, i8 signext %424, i8 signext %425)
store %struct.node* %426, %struct.node** %4
%427 = load i32, i32* %9
%428 = add nsw i32 %427, 1
store i32 %428, i32* %9
%429 = load i8, i8* %11
%430 = sext i8 %429 to i32
%431 = icmp slt i32 %430, 104
br i1 %431, label %432, label %465
432: ; preds = %418
%433 = load i8, i8* %12
%434 = sext i8 %433 to i32
%435 = icmp sgt i32 %434, 49
br i1 %435, label %436, label %465
436: ; preds = %432
%437 = load i8*, i8** %5
%438 = load i8, i8* %11
%439 = sext i8 %438 to i32
%440 = add nsw i32 %439, 1
%441 = trunc i32 %440 to i8
%442 = load i8, i8* %12
%443 = sext i8 %442 to i32
%444 = sub nsw i32 %443, 1
%445 = trunc i32 %444 to i8
%446 = call i32 @is_occupied(i8* %437, i8 signext %441, i8 signext %445)
%447 = icmp eq i32 %446, -1
br i1 %447, label %448, label %465
448: ; preds = %436
%449 = load %struct.node*, %struct.node** %4
%450 = load i8*, i8** %5
%451 = load %struct.node*, %struct.node** %6
%452 = load i8, i8* %7
%453 = load i8, i8* %8
%454 = load i8, i8* %11
%455 = sext i8 %454 to i32
%456 = add nsw i32 %455, 1
%457 = trunc i32 %456 to i8
%458 = load i8, i8* %12
%459 = sext i8 %458 to i32
%460 = sub nsw i32 %459, 1
%461 = trunc i32 %460 to i8
%462 = call %struct.node* @store_move(%struct.node* %449, i8* %450, i32 1, %struct.node* %451, i8 signext %452, i8 signext %453, i8 signext %457, i8 signext %461)
store %struct.node* %462, %struct.node** %4
%463 = load i32, i32* %9
%464 = add nsw i32 %463, 1
store i32 %464, i32* %9
store i32 0, i32* %13
br label %465
465: ; preds = %448, %436, %432, %418
%466 = load i8, i8* %11
%467 = add i8 %466, 1
store i8 %467, i8* %11
%468 = load i8, i8* %12
%469 = add i8 %468, -1
store i8 %469, i8* %12
%470 = load i8, i8* %11
%471 = sext i8 %470 to i32
%472 = icmp sgt i32 %471, 104
br i1 %472, label %477, label %473
473: ; preds = %465
%474 = load i8, i8* %12
%475 = sext i8 %474 to i32
%476 = icmp slt i32 %475, 49
br i1 %476, label %477, label %478
477: ; preds = %473, %465
store i32 0, i32* %13
br label %478
478: ; preds = %477, %473
br label %407
479: ; preds = %416
%480 = load i8, i8* %7
%481 = sext i8 %480 to i32
%482 = sub nsw i32 %481, 1
%483 = trunc i32 %482 to i8
store i8 %483, i8* %11
%484 = load i8, i8* %8
%485 = sext i8 %484 to i32
%486 = add nsw i32 %485, 1
%487 = trunc i32 %486 to i8
store i8 %487, i8* %12
store i32 1, i32* %13
%488 = load i8, i8* %7
%489 = sext i8 %488 to i32
%490 = icmp eq i32 %489, 97
br i1 %490, label %495, label %491
491: ; preds = %479
%492 = load i8, i8* %8
%493 = sext i8 %492 to i32
%494 = icmp eq i32 %493, 56
br i1 %494, label %495, label %496
495: ; preds = %491, %479
store i32 0, i32* %13
br label %496
496: ; preds = %495, %491
br label %497
497: ; preds = %568, %496
%498 = load i32, i32* %13
%499 = icmp eq i32 %498, 1
br i1 %499, label %500, label %506
500: ; preds = %497
%501 = load i8*, i8** %5
%502 = load i8, i8* %11
%503 = load i8, i8* %12
%504 = call i32 @is_occupied(i8* %501, i8 signext %502, i8 signext %503)
%505 = icmp eq i32 %504, 0
br label %506
506: ; preds = %500, %497
%507 = phi i1 [ false, %497 ], [ %505, %500 ]
br i1 %507, label %508, label %569
508: ; preds = %506
%509 = load %struct.node*, %struct.node** %4
%510 = load i8*, i8** %5
%511 = load %struct.node*, %struct.node** %6
%512 = load i8, i8* %7
%513 = load i8, i8* %8
%514 = load i8, i8* %11
%515 = load i8, i8* %12
%516 = call %struct.node* @store_move(%struct.node* %509, i8* %510, i32 1, %struct.node* %511, i8 signext %512, i8 signext %513, i8 signext %514, i8 signext %515)
store %struct.node* %516, %struct.node** %4
%517 = load i32, i32* %9
%518 = add nsw i32 %517, 1
store i32 %518, i32* %9
%519 = load i8, i8* %11
%520 = sext i8 %519 to i32
%521 = icmp sgt i32 %520, 97
br i1 %521, label %522, label %555
522: ; preds = %508
%523 = load i8, i8* %12
%524 = sext i8 %523 to i32
%525 = icmp slt i32 %524, 56
br i1 %525, label %526, label %555
526: ; preds = %522
%527 = load i8*, i8** %5
%528 = load i8, i8* %11
%529 = sext i8 %528 to i32
%530 = sub nsw i32 %529, 1
%531 = trunc i32 %530 to i8
%532 = load i8, i8* %12
%533 = sext i8 %532 to i32
%534 = add nsw i32 %533, 1
%535 = trunc i32 %534 to i8
%536 = call i32 @is_occupied(i8* %527, i8 signext %531, i8 signext %535)
%537 = icmp eq i32 %536, -1
br i1 %537, label %538, label %555
538: ; preds = %526
%539 = load %struct.node*, %struct.node** %4
%540 = load i8*, i8** %5
%541 = load %struct.node*, %struct.node** %6
%542 = load i8, i8* %7
%543 = load i8, i8* %8
%544 = load i8, i8* %11
%545 = sext i8 %544 to i32
%546 = sub nsw i32 %545, 1
%547 = trunc i32 %546 to i8
%548 = load i8, i8* %12
%549 = sext i8 %548 to i32
%550 = add nsw i32 %549, 1
%551 = trunc i32 %550 to i8
%552 = call %struct.node* @store_move(%struct.node* %539, i8* %540, i32 1, %struct.node* %541, i8 signext %542, i8 signext %543, i8 signext %547, i8 signext %551)
store %struct.node* %552, %struct.node** %4
%553 = load i32, i32* %9
%554 = add nsw i32 %553, 1
store i32 %554, i32* %9
store i32 0, i32* %13
br label %555
555: ; preds = %538, %526, %522, %508
%556 = load i8, i8* %11
%557 = add i8 %556, -1
store i8 %557, i8* %11
%558 = load i8, i8* %12
%559 = add i8 %558, 1
store i8 %559, i8* %12
%560 = load i8, i8* %11
%561 = sext i8 %560 to i32
%562 = icmp slt i32 %561, 97
br i1 %562, label %567, label %563
563: ; preds = %555
%564 = load i8, i8* %12
%565 = sext i8 %564 to i32
%566 = icmp sgt i32 %565, 56
br i1 %566, label %567, label %568
567: ; preds = %563, %555
store i32 0, i32* %13
br label %568
568: ; preds = %567, %563
br label %497
569: ; preds = %506
%570 = load i8, i8* %7
%571 = sext i8 %570 to i32
%572 = add nsw i32 %571, 1
%573 = trunc i32 %572 to i8
store i8 %573, i8* %11
%574 = load i8, i8* %8
%575 = sext i8 %574 to i32
%576 = add nsw i32 %575, 1
%577 = trunc i32 %576 to i8
store i8 %577, i8* %12
store i32 1, i32* %13
%578 = load i8, i8* %7
%579 = sext i8 %578 to i32
%580 = icmp eq i32 %579, 104
br i1 %580, label %585, label %581
581: ; preds = %569
%582 = load i8, i8* %8
%583 = sext i8 %582 to i32
%584 = icmp eq i32 %583, 56
br i1 %584, label %585, label %586
585: ; preds = %581, %569
store i32 0, i32* %13
br label %586
586: ; preds = %585, %581
br label %587
587: ; preds = %658, %586
%588 = load i32, i32* %13
%589 = icmp eq i32 %588, 1
br i1 %589, label %590, label %596
590: ; preds = %587
%591 = load i8*, i8** %5
%592 = load i8, i8* %11
%593 = load i8, i8* %12
%594 = call i32 @is_occupied(i8* %591, i8 signext %592, i8 signext %593)
%595 = icmp eq i32 %594, 0
br label %596
596: ; preds = %590, %587
%597 = phi i1 [ false, %587 ], [ %595, %590 ]
br i1 %597, label %598, label %659
598: ; preds = %596
%599 = load %struct.node*, %struct.node** %4
%600 = load i8*, i8** %5
%601 = load %struct.node*, %struct.node** %6
%602 = load i8, i8* %7
%603 = load i8, i8* %8
%604 = load i8, i8* %11
%605 = load i8, i8* %12
%606 = call %struct.node* @store_move(%struct.node* %599, i8* %600, i32 1, %struct.node* %601, i8 signext %602, i8 signext %603, i8 signext %604, i8 signext %605)
store %struct.node* %606, %struct.node** %4
%607 = load i32, i32* %9
%608 = add nsw i32 %607, 1
store i32 %608, i32* %9
%609 = load i8, i8* %11
%610 = sext i8 %609 to i32
%611 = icmp slt i32 %610, 104
br i1 %611, label %612, label %645
612: ; preds = %598
%613 = load i8, i8* %12
%614 = sext i8 %613 to i32
%615 = icmp slt i32 %614, 56
br i1 %615, label %616, label %645
616: ; preds = %612
%617 = load i8*, i8** %5
%618 = load i8, i8* %11
%619 = sext i8 %618 to i32
%620 = add nsw i32 %619, 1
%621 = trunc i32 %620 to i8
%622 = load i8, i8* %12
%623 = sext i8 %622 to i32
%624 = add nsw i32 %623, 1
%625 = trunc i32 %624 to i8
%626 = call i32 @is_occupied(i8* %617, i8 signext %621, i8 signext %625)
%627 = icmp eq i32 %626, -1
br i1 %627, label %628, label %645
628: ; preds = %616
%629 = load %struct.node*, %struct.node** %4
%630 = load i8*, i8** %5
%631 = load %struct.node*, %struct.node** %6
%632 = load i8, i8* %7
%633 = load i8, i8* %8
%634 = load i8, i8* %11
%635 = sext i8 %634 to i32
%636 = add nsw i32 %635, 1
%637 = trunc i32 %636 to i8
%638 = load i8, i8* %12
%639 = sext i8 %638 to i32
%640 = add nsw i32 %639, 1
%641 = trunc i32 %640 to i8
%642 = call %struct.node* @store_move(%struct.node* %629, i8* %630, i32 1, %struct.node* %631, i8 signext %632, i8 signext %633, i8 signext %637, i8 signext %641)
store %struct.node* %642, %struct.node** %4
%643 = load i32, i32* %9
%644 = add nsw i32 %643, 1
store i32 %644, i32* %9
store i32 0, i32* %13
br label %645
645: ; preds = %628, %616, %612, %598
%646 = load i8, i8* %11
%647 = add i8 %646, 1
store i8 %647, i8* %11
%648 = load i8, i8* %12
%649 = add i8 %648, 1
store i8 %649, i8* %12
%650 = load i8, i8* %11
%651 = sext i8 %650 to i32
%652 = icmp sgt i32 %651, 104
br i1 %652, label %657, label %653
653: ; preds = %645
%654 = load i8, i8* %12
%655 = sext i8 %654 to i32
%656 = icmp sgt i32 %655, 56
br i1 %656, label %657, label %658
657: ; preds = %653, %645
store i32 0, i32* %13
br label %658
658: ; preds = %657, %653
br label %587
659: ; preds = %596
br label %660
660: ; preds = %659, %23
br label %661
661: ; preds = %660
%662 = load i8, i8* %8
%663 = add i8 %662, 1
store i8 %663, i8* %8
br label %19
664: ; preds = %19
br label %665
665: ; preds = %664
%666 = load i8, i8* %7
%667 = add i8 %666, 1
store i8 %667, i8* %7
br label %14
668: ; preds = %14
%669 = load %struct.node*, %struct.node** %4
ret %struct.node* %669
}

LLVM IR (-O2):
%struct.node = type { i32 }
define %struct.node* @get_queen_moves_white(%struct.node* %0, i8* %1, %struct.node* %2) {
br label %4
4: ; preds = %3, %198
%5 = phi %struct.node* [ %0, %3 ], [ %196, %198 ]
%6 = phi i8 [ 97, %3 ], [ %9, %198 ]
%7 = add nsw i8 %6, -1
%8 = icmp eq i8 %6, 97
%9 = add nuw nsw i8 %6, 1
%10 = icmp eq i8 %6, 104
br label %11
11: ; preds = %4, %194
%12 = phi %struct.node* [ %5, %4 ], [ %196, %194 ]
%13 = phi i8 [ 49, %4 ], [ %195, %194 ]
%14 = tail call signext i8 @get_piece(i8* %1, i8 signext %6, i8 signext %13)
%15 = icmp eq i8 %14, 81
br i1 %15, label %18, label %16
16: ; preds = %11
%17 = add nuw nsw i8 %13, 1
br label %194
18: ; preds = %11
%19 = add nsw i8 %13, -1
%20 = icmp eq i8 %13, 49
br i1 %20, label %41, label %21
21: ; preds = %18, %35
%22 = phi i8 [ %29, %35 ], [ %19, %18 ]
%23 = phi %struct.node* [ %27, %35 ], [ %12, %18 ]
%24 = tail call i32 @is_occupied(i8* %1, i8 signext %6, i8 signext %22)
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %37
26: ; preds = %21
%27 = tail call %struct.node* @store_move(%struct.node* %23, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %6, i8 signext %22)
%28 = icmp ugt i8 %22, 49
%29 = add nsw i8 %22, -1
br i1 %28, label %30, label %35
30: ; preds = %26
%31 = tail call i32 @is_occupied(i8* %1, i8 signext %6, i8 signext %29)
%32 = icmp eq i32 %31, -1
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = tail call %struct.node* @store_move(%struct.node* %27, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %6, i8 signext %29)
br label %37
35: ; preds = %26, %30
%36 = icmp ugt i8 %29, 48
br i1 %36, label %21, label %37
37: ; preds = %21, %35, %33
%38 = phi %struct.node* [ %34, %33 ], [ %27, %35 ], [ %23, %21 ]
%39 = add nuw nsw i8 %13, 1
%40 = icmp eq i8 %13, 56
br i1 %40, label %58, label %41
41: ; preds = %18, %37
%42 = phi i8 [ %39, %37 ], [ 50, %18 ]
%43 = phi %struct.node* [ %38, %37 ], [ %12, %18 ]
br label %44
44: ; preds = %52, %41
%45 = phi i8 [ %42, %41 ], [ %53, %52 ]
%46 = phi %struct.node* [ %43, %41 ], [ %50, %52 ]
%47 = tail call i32 @is_occupied(i8* %1, i8 signext %6, i8 signext %45)
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %58
49: ; preds = %44
%50 = tail call %struct.node* @store_move(%struct.node* %46, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %6, i8 signext %45)
%51 = icmp ult i8 %45, 56
br i1 %51, label %52, label %58
52: ; preds = %49
%53 = add nuw nsw i8 %45, 1
%54 = tail call i32 @is_occupied(i8* %1, i8 signext %6, i8 signext %53)
%55 = icmp eq i32 %54, -1
br i1 %55, label %56, label %44
56: ; preds = %52
%57 = tail call %struct.node* @store_move(%struct.node* %50, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %6, i8 signext %53)
br label %58
58: ; preds = %49, %44, %56, %37
%59 = phi i1 [ true, %37 ], [ false, %56 ], [ false, %44 ], [ false, %49 ]
%60 = phi i8 [ 57, %37 ], [ %42, %56 ], [ %42, %44 ], [ %42, %49 ]
%61 = phi %struct.node* [ %38, %37 ], [ %57, %56 ], [ %50, %49 ], [ %46, %44 ]
br i1 %8, label %78, label %62
62: ; preds = %58, %76
%63 = phi i8 [ %70, %76 ], [ %7, %58 ]
%64 = phi %struct.node* [ %68, %76 ], [ %61, %58 ]
%65 = tail call i32 @is_occupied(i8* %1, i8 signext %63, i8 signext %13)
%66 = icmp eq i32 %65, 0
br i1 %66, label %67, label %78
67: ; preds = %62
%68 = tail call %struct.node* @store_move(%struct.node* %64, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %63, i8 signext %13)
%69 = icmp ugt i8 %63, 97
%70 = add nsw i8 %63, -1
br i1 %69, label %71, label %76
71: ; preds = %67
%72 = tail call i32 @is_occupied(i8* %1, i8 signext %70, i8 signext %13)
%73 = icmp eq i32 %72, -1
br i1 %73, label %74, label %76
74: ; preds = %71
%75 = tail call %struct.node* @store_move(%struct.node* %68, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %70, i8 signext %13)
br label %78
76: ; preds = %67, %71
%77 = icmp ugt i8 %70, 96
br i1 %77, label %62, label %78
78: ; preds = %62, %76, %74, %58
%79 = phi %struct.node* [ %61, %58 ], [ %75, %74 ], [ %68, %76 ], [ %64, %62 ]
br i1 %10, label %94, label %80
80: ; preds = %78, %88
%81 = phi i8 [ %89, %88 ], [ %9, %78 ]
%82 = phi %struct.node* [ %86, %88 ], [ %79, %78 ]
%83 = tail call i32 @is_occupied(i8* %1, i8 signext %81, i8 signext %13)
%84 = icmp eq i32 %83, 0
br i1 %84, label %85, label %94
85: ; preds = %80
%86 = tail call %struct.node* @store_move(%struct.node* %82, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %81, i8 signext %13)
%87 = icmp ult i8 %81, 104
br i1 %87, label %88, label %94
88: ; preds = %85
%89 = add nuw nsw i8 %81, 1
%90 = tail call i32 @is_occupied(i8* %1, i8 signext %89, i8 signext %13)
%91 = icmp eq i32 %90, -1
br i1 %91, label %92, label %80
92: ; preds = %88
%93 = tail call %struct.node* @store_move(%struct.node* %86, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %89, i8 signext %13)
br label %94
94: ; preds = %85, %80, %92, %78
%95 = phi %struct.node* [ %79, %78 ], [ %93, %92 ], [ %86, %85 ], [ %82, %80 ]
%96 = or i1 %8, %20
br i1 %96, label %119, label %97
97: ; preds = %94, %115
%98 = phi i8 [ %109, %115 ], [ %19, %94 ]
%99 = phi i8 [ %108, %115 ], [ %7, %94 ]
%100 = phi %struct.node* [ %104, %115 ], [ %95, %94 ]
%101 = tail call i32 @is_occupied(i8* %1, i8 signext %99, i8 signext %98)
%102 = icmp eq i32 %101, 0
br i1 %102, label %103, label %119
103: ; preds = %97
%104 = tail call %struct.node* @store_move(%struct.node* %100, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %99, i8 signext %98)
%105 = icmp ugt i8 %99, 97
%106 = icmp ugt i8 %98, 49
%107 = and i1 %105, %106
%108 = add nsw i8 %99, -1
%109 = add nsw i8 %98, -1
br i1 %107, label %110, label %115
110: ; preds = %103
%111 = tail call i32 @is_occupied(i8* %1, i8 signext %108, i8 signext %109)
%112 = icmp eq i32 %111, -1
br i1 %112, label %113, label %115
113: ; preds = %110
%114 = tail call %struct.node* @store_move(%struct.node* %104, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %108, i8 signext %109)
br label %119
115: ; preds = %103, %110
%116 = icmp ugt i8 %108, 96
%117 = icmp ugt i8 %109, 48
%118 = and i1 %116, %117
br i1 %118, label %97, label %119
119: ; preds = %97, %115, %113, %94
%120 = phi %struct.node* [ %95, %94 ], [ %114, %113 ], [ %104, %115 ], [ %100, %97 ]
%121 = or i1 %10, %20
br i1 %121, label %144, label %122
122: ; preds = %119, %140
%123 = phi i8 [ %134, %140 ], [ %19, %119 ]
%124 = phi i8 [ %133, %140 ], [ %9, %119 ]
%125 = phi %struct.node* [ %129, %140 ], [ %120, %119 ]
%126 = tail call i32 @is_occupied(i8* %1, i8 signext %124, i8 signext %123)
%127 = icmp eq i32 %126, 0
br i1 %127, label %128, label %144
128: ; preds = %122
%129 = tail call %struct.node* @store_move(%struct.node* %125, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %124, i8 signext %123)
%130 = icmp ult i8 %124, 104
%131 = icmp ugt i8 %123, 49
%132 = and i1 %130, %131
%133 = add nuw nsw i8 %124, 1
%134 = add nsw i8 %123, -1
br i1 %132, label %135, label %140
135: ; preds = %128
%136 = tail call i32 @is_occupied(i8* %1, i8 signext %133, i8 signext %134)
%137 = icmp eq i32 %136, -1
br i1 %137, label %138, label %140
138: ; preds = %135
%139 = tail call %struct.node* @store_move(%struct.node* %129, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %133, i8 signext %134)
br label %144
140: ; preds = %128, %135
%141 = icmp ult i8 %124, 104
%142 = icmp ugt i8 %134, 48
%143 = and i1 %141, %142
br i1 %143, label %122, label %144
144: ; preds = %122, %140, %138, %119
%145 = phi %struct.node* [ %120, %119 ], [ %139, %138 ], [ %129, %140 ], [ %125, %122 ]
%146 = or i1 %8, %59
br i1 %146, label %169, label %147
147: ; preds = %144, %165
%148 = phi i8 [ %159, %165 ], [ %60, %144 ]
%149 = phi i8 [ %158, %165 ], [ %7, %144 ]
%150 = phi %struct.node* [ %154, %165 ], [ %145, %144 ]
%151 = tail call i32 @is_occupied(i8* %1, i8 signext %149, i8 signext %148)
%152 = icmp eq i32 %151, 0
br i1 %152, label %153, label %169
153: ; preds = %147
%154 = tail call %struct.node* @store_move(%struct.node* %150, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %149, i8 signext %148)
%155 = icmp ugt i8 %149, 97
%156 = icmp ult i8 %148, 56
%157 = and i1 %155, %156
%158 = add nsw i8 %149, -1
%159 = add nuw nsw i8 %148, 1
br i1 %157, label %160, label %165
160: ; preds = %153
%161 = tail call i32 @is_occupied(i8* %1, i8 signext %158, i8 signext %159)
%162 = icmp eq i32 %161, -1
br i1 %162, label %163, label %165
163: ; preds = %160
%164 = tail call %struct.node* @store_move(%struct.node* %154, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %158, i8 signext %159)
br label %169
165: ; preds = %153, %160
%166 = icmp ugt i8 %158, 96
%167 = icmp ult i8 %148, 56
%168 = and i1 %166, %167
br i1 %168, label %147, label %169
169: ; preds = %147, %165, %163, %144
%170 = phi %struct.node* [ %145, %144 ], [ %164, %163 ], [ %154, %165 ], [ %150, %147 ]
%171 = or i1 %10, %59
br i1 %171, label %194, label %172
172: ; preds = %169, %190
%173 = phi i8 [ %184, %190 ], [ %60, %169 ]
%174 = phi i8 [ %183, %190 ], [ %9, %169 ]
%175 = phi %struct.node* [ %179, %190 ], [ %170, %169 ]
%176 = tail call i32 @is_occupied(i8* %1, i8 signext %174, i8 signext %173)
%177 = icmp eq i32 %176, 0
br i1 %177, label %178, label %194
178: ; preds = %172
%179 = tail call %struct.node* @store_move(%struct.node* %175, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %174, i8 signext %173)
%180 = icmp ult i8 %174, 104
%181 = icmp ult i8 %173, 56
%182 = and i1 %180, %181
%183 = add nuw nsw i8 %174, 1
%184 = add nuw nsw i8 %173, 1
br i1 %182, label %185, label %190
185: ; preds = %178
%186 = tail call i32 @is_occupied(i8* %1, i8 signext %183, i8 signext %184)
%187 = icmp eq i32 %186, -1
br i1 %187, label %188, label %190
188: ; preds = %185
%189 = tail call %struct.node* @store_move(%struct.node* %179, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %183, i8 signext %184)
br label %194
190: ; preds = %178, %185
%191 = icmp ult i8 %174, 104
%192 = icmp ult i8 %173, 56
%193 = and i1 %191, %192
br i1 %193, label %172, label %194
194: ; preds = %190, %172, %188, %16, %169
%195 = phi i8 [ %17, %16 ], [ %60, %169 ], [ %60, %188 ], [ %60, %172 ], [ %60, %190 ]
%196 = phi %struct.node* [ %12, %16 ], [ %170, %169 ], [ %189, %188 ], [ %179, %190 ], [ %175, %172 ]
%197 = icmp eq i8 %195, 57
br i1 %197, label %198, label %11
198: ; preds = %194
%199 = icmp eq i8 %9, 105
br i1 %199, label %200, label %4
200: ; preds = %198
ret %struct.node* %196
}