#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_rook_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 == 'R') {
        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;
        }
      }
    }
  }
  return currentNode;
}


x86 assembly (clang, -O0):
<get_rook_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     16f7 <get_rook_moves_white+0x5c7>
movb   $0x31,-0x1a(%rbp)
movsbl -0x1a(%rbp),%eax
cmp    $0x38,%eax
jg     16e5 <get_rook_moves_white+0x5b5>
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    $0x52,%eax
jne    16d3 <get_rook_moves_white+0x5a3>
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_rook_moves_white+0x8b>
movl   $0x0,-0x28(%rbp)
jmp    11c0 <get_rook_moves_white+0x90>
xor    %eax,%eax
cmpl   $0x1,-0x28(%rbp)
mov    %al,-0x29(%rbp)
jne    11eb <get_rook_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_rook_moves_white+0xcb>
jmp    12e3 <get_rook_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_rook_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_rook_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_rook_moves_white+0x1ae>
movl   $0x0,-0x28(%rbp)
jmp    11c0 <get_rook_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_rook_moves_white+0x1de>
movl   $0x0,-0x28(%rbp)
jmp    1313 <get_rook_moves_white+0x1e3>
xor    %eax,%eax
cmpl   $0x1,-0x28(%rbp)
mov    %al,-0x2a(%rbp)
jne    133e <get_rook_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_rook_moves_white+0x21e>
jmp    1436 <get_rook_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_rook_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_rook_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_rook_moves_white+0x301>
movl   $0x0,-0x28(%rbp)
jmp    1313 <get_rook_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_rook_moves_white+0x331>
movl   $0x0,-0x28(%rbp)
jmp    1466 <get_rook_moves_white+0x336>
xor    %eax,%eax
cmpl   $0x1,-0x28(%rbp)
mov    %al,-0x2b(%rbp)
jne    1491 <get_rook_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_rook_moves_white+0x371>
jmp    1582 <get_rook_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_rook_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_rook_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_rook_moves_white+0x44d>
movl   $0x0,-0x28(%rbp)
jmp    1466 <get_rook_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_rook_moves_white+0x47d>
movl   $0x0,-0x28(%rbp)
jmp    15b2 <get_rook_moves_white+0x482>
xor    %eax,%eax
cmpl   $0x1,-0x28(%rbp)
mov    %al,-0x2c(%rbp)
jne    15dd <get_rook_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_rook_moves_white+0x4bd>
jmp    16ce <get_rook_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_rook_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_rook_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_rook_moves_white+0x599>
movl   $0x0,-0x28(%rbp)
jmp    15b2 <get_rook_moves_white+0x482>
jmp    16d3 <get_rook_moves_white+0x5a3>
jmp    16d8 <get_rook_moves_white+0x5a8>
mov    -0x1a(%rbp),%al
add    $0x1,%al
mov    %al,-0x1a(%rbp)
jmp    1160 <get_rook_moves_white+0x30>
jmp    16ea <get_rook_moves_white+0x5ba>
mov    -0x19(%rbp),%al
add    $0x1,%al
mov    %al,-0x19(%rbp)
jmp    114f <get_rook_moves_white+0x1f>
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rook_moves_white>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,(%rsp)
mov    %rsi,%r12
mov    %rdi,%r15
mov    $0x61,%al
mov    %rax,0x18(%rsp)
jmp    1174 <get_rook_moves_white+0x44>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x20(%rsp),%ecx
mov    %ecx,%eax
mov    %rax,0x18(%rsp)
cmp    $0x69,%cl
je     1481 <get_rook_moves_white+0x351>
mov    0x18(%rsp),%rax
lea    -0x1(%rax),%ecx
mov    %ecx,0x24(%rsp)
add    $0x1,%eax
mov    %eax,0x20(%rsp)
mov    $0x31,%bl
jmp    119e <get_rook_moves_white+0x6e>
nopl   0x0(%rax,%rax,1)
mov    0x8(%rsp),%rbx
cmp    $0x39,%bl
je     1481 <get_rook_moves_white+0x351>
movsbl 0x18(%rsp),%r13d
movsbl %bl,%edx
mov    %r12,%rdi
mov    %r13d,%esi
mov    %rdx,0x10(%rsp)
call   1040 <get_piece@plt>
cmp    $0x52,%al
jne    11d0 <get_rook_moves_white+0xa0>
cmp    $0x31,%bl
jne    11e0 <get_rook_moves_white+0xb0>
mov    $0x32,%al
jmp    12a7 <get_rook_moves_white+0x177>
nopw   0x0(%rax,%rax,1)
add    $0x1,%bl
cmp    $0x39,%bl
jne    119e <get_rook_moves_white+0x6e>
jmp    1160 <get_rook_moves_white+0x30>
nopw   0x0(%rax,%rax,1)
mov    %rbx,0x8(%rsp)
lea    -0x1(%rbx),%r14d
mov    0x10(%rsp),%rbx
jmp    1201 <get_rook_moves_white+0xd1>
mov    %ebx,%r14d
cmp    $0x30,%bl
mov    0x10(%rsp),%rbx
jbe    1290 <get_rook_moves_white+0x160>
movsbl %r14b,%ebp
mov    %r12,%rdi
mov    %r13d,%esi
mov    %ebp,%edx
call   1030 <is_occupied@plt>
test   %eax,%eax
jne    1290 <get_rook_moves_white+0x160>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x1,%edx
mov    (%rsp),%rcx
mov    %r13d,%r8d
mov    %ebx,%r9d
push   %rbp
push   %r13
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,%r15
lea    -0x1(%rbp),%ebx
cmp    $0x32,%bpl
jb     11f0 <get_rook_moves_white+0xc0>
movsbl %bl,%edx
mov    %r12,%rdi
mov    %r13d,%esi
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    11f0 <get_rook_moves_white+0xc0>
add    $0xff,%r14b
movsbl %r14b,%eax
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x1,%edx
mov    (%rsp),%rcx
mov    %r13d,%r8d
mov    0x10(%rsp),%r9
push   %rax
push   %r13
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rsp),%rax
cmp    $0x38,%al
jne    12a5 <get_rook_moves_white+0x175>
mov    $0x39,%al
mov    %rax,0x8(%rsp)
jmp    132e <get_rook_moves_white+0x1fe>
add    $0x1,%al
mov    %rax,0x8(%rsp)
mov    %eax,%ebx
xchg   %ax,%ax
movsbl %bl,%ebp
mov    %r12,%rdi
mov    %r13d,%esi
mov    %ebp,%edx
call   1030 <is_occupied@plt>
test   %eax,%eax
jne    132e <get_rook_moves_white+0x1fe>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x1,%edx
mov    (%rsp),%rcx
mov    %r13d,%r8d
mov    0x10(%rsp),%r9
push   %rbp
push   %r13
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,%r15
cmp    $0x37,%bpl
ja     132e <get_rook_moves_white+0x1fe>
add    $0x1,%bl
movsbl %bl,%ebp
mov    %r12,%rdi
mov    %r13d,%esi
mov    %ebp,%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    12b0 <get_rook_moves_white+0x180>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x1,%edx
mov    (%rsp),%rcx
mov    %r13d,%r8d
mov    0x10(%rsp),%r9
push   %rbp
push   %r13
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,%r15
cmpb   $0x61,0x18(%rsp)
jne    13e0 <get_rook_moves_white+0x2b0>
cmpb   $0x68,0x18(%rsp)
je     1190 <get_rook_moves_white+0x60>
mov    0x20(%rsp),%eax
mov    %eax,%ebx
mov    0x10(%rsp),%r14
nop
movsbl %bl,%ebp
mov    %r12,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <is_occupied@plt>
test   %eax,%eax
jne    13ca <get_rook_moves_white+0x29a>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x1,%edx
mov    (%rsp),%rcx
mov    %r13d,%r8d
mov    %r14d,%r9d
push   %r14
push   %rbp
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,%r15
cmp    $0x67,%bpl
ja     13ca <get_rook_moves_white+0x29a>
add    $0x1,%bl
movsbl %bl,%ebp
mov    %r12,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    1350 <get_rook_moves_white+0x220>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x1,%edx
mov    (%rsp),%rcx
mov    %r13d,%r8d
mov    %r14d,%r9d
push   %r14
push   %rbp
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,%r15
mov    0x8(%rsp),%rbx
cmp    $0x39,%bl
jne    119e <get_rook_moves_white+0x6e>
jmp    1160 <get_rook_moves_white+0x30>
nopl   (%rax)
mov    0x24(%rsp),%ebx
jmp    13f9 <get_rook_moves_white+0x2c9>
cs nopw 0x0(%rax,%rax,1)
cmp    $0x60,%bl
jbe    1339 <get_rook_moves_white+0x209>
movsbl %bl,%ebp
mov    %r12,%rdi
mov    %ebp,%esi
mov    0x10(%rsp),%r14
mov    %r14d,%edx
call   1030 <is_occupied@plt>
test   %eax,%eax
jne    1339 <get_rook_moves_white+0x209>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x1,%edx
mov    (%rsp),%rcx
mov    %r13d,%r8d
mov    %r14d,%r9d
push   %r14
push   %rbp
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,%r15
lea    -0x1(%rbp),%ebx
cmp    $0x62,%bpl
jb     13f0 <get_rook_moves_white+0x2c0>
movsbl %bl,%ebp
mov    %r12,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <is_occupied@plt>
cmp    $0xffffffff,%eax
jne    13f0 <get_rook_moves_white+0x2c0>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x1,%edx
mov    (%rsp),%rcx
mov    %r13d,%r8d
mov    %r14d,%r9d
push   %r14
push   %rbp
call   1050 <store_move@plt>
add    $0x10,%rsp
mov    %rax,%r15
jmp    1339 <get_rook_moves_white+0x209>
mov    %r15,%rax
add    $0x28,%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_rook_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 = %305, %3
%15 = load i8, i8* %7
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 104
br i1 %17, label %18, label %308
18: ; preds = %14
store i8 49, i8* %8
br label %19
19: ; preds = %301, %18
%20 = load i8, i8* %8
%21 = sext i8 %20 to i32
%22 = icmp sle i32 %21, 56
br i1 %22, label %23, label %304
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, 82
br i1 %30, label %31, label %300
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
br label %300
300: ; preds = %299, %23
br label %301
301: ; preds = %300
%302 = load i8, i8* %8
%303 = add i8 %302, 1
store i8 %303, i8* %8
br label %19
304: ; preds = %19
br label %305
305: ; preds = %304
%306 = load i8, i8* %7
%307 = add i8 %306, 1
store i8 %307, i8* %7
br label %14
308: ; preds = %14
%309 = load %struct.node*, %struct.node** %4
ret %struct.node* %309
}

LLVM IR (-O2):
%struct.node = type { i32 }
define %struct.node* @get_rook_moves_white(%struct.node* %0, i8* %1, %struct.node* %2) {
br label %4
4: ; preds = %3, %103
%5 = phi %struct.node* [ %0, %3 ], [ %96, %103 ]
%6 = phi i8 [ 97, %3 ], [ %9, %103 ]
%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 = %98, %4
%12 = phi %struct.node* [ %5, %4 ], [ %99, %98 ]
%13 = phi i8 [ 49, %4 ], [ %100, %98 ]
%14 = tail call signext i8 @get_piece(i8* %1, i8 signext %6, i8 signext %13)
%15 = icmp eq i8 %14, 82
br i1 %15, label %18, label %16
16: ; preds = %11
%17 = add nuw nsw i8 %13, 1
br label %94
18: ; preds = %11
%19 = icmp eq i8 %13, 49
br i1 %19, label %42, label %20
20: ; preds = %18
%21 = add nsw i8 %13, -1
br label %22
22: ; preds = %20, %36
%23 = phi i8 [ %30, %36 ], [ %21, %20 ]
%24 = phi %struct.node* [ %28, %36 ], [ %12, %20 ]
%25 = tail call i32 @is_occupied(i8* %1, i8 signext %6, i8 signext %23)
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %38
27: ; preds = %22
%28 = tail call %struct.node* @store_move(%struct.node* %24, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %6, i8 signext %23)
%29 = icmp ugt i8 %23, 49
%30 = add nsw i8 %23, -1
br i1 %29, label %31, label %36
31: ; preds = %27
%32 = tail call i32 @is_occupied(i8* %1, i8 signext %6, i8 signext %30)
%33 = icmp eq i32 %32, -1
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = tail call %struct.node* @store_move(%struct.node* %28, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %6, i8 signext %30)
br label %38
36: ; preds = %27, %31
%37 = icmp ugt i8 %30, 48
br i1 %37, label %22, label %38
38: ; preds = %22, %36, %34
%39 = phi %struct.node* [ %35, %34 ], [ %28, %36 ], [ %24, %22 ]
%40 = add nuw nsw i8 %13, 1
%41 = icmp eq i8 %13, 56
br i1 %41, label %59, label %42
42: ; preds = %18, %38
%43 = phi i8 [ %40, %38 ], [ 50, %18 ]
%44 = phi %struct.node* [ %39, %38 ], [ %12, %18 ]
br label %45
45: ; preds = %53, %42
%46 = phi i8 [ %43, %42 ], [ %54, %53 ]
%47 = phi %struct.node* [ %44, %42 ], [ %51, %53 ]
%48 = tail call i32 @is_occupied(i8* %1, i8 signext %6, i8 signext %46)
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %59
50: ; preds = %45
%51 = tail call %struct.node* @store_move(%struct.node* %47, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %6, i8 signext %46)
%52 = icmp ult i8 %46, 56
br i1 %52, label %53, label %59
53: ; preds = %50
%54 = add nuw nsw i8 %46, 1
%55 = tail call i32 @is_occupied(i8* %1, i8 signext %6, i8 signext %54)
%56 = icmp eq i32 %55, -1
br i1 %56, label %57, label %45
57: ; preds = %53
%58 = tail call %struct.node* @store_move(%struct.node* %51, i8* %1, i32 1, %struct.node* %2, i8 signext %6, i8 signext %13, i8 signext %6, i8 signext %54)
br label %59
59: ; preds = %50, %45, %57, %38
%60 = phi i8 [ 57, %38 ], [ %43, %57 ], [ %43, %45 ], [ %43, %50 ]
%61 = phi %struct.node* [ %39, %38 ], [ %58, %57 ], [ %51, %50 ], [ %47, %45 ]
br i1 %8, label %78, label %62
62: ; preds = %59, %76
%63 = phi i8 [ %70, %76 ], [ %7, %59 ]
%64 = phi %struct.node* [ %68, %76 ], [ %61, %59 ]
%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, %59
%79 = phi %struct.node* [ %61, %59 ], [ %75, %74 ], [ %68, %76 ], [ %64, %62 ]
br i1 %10, label %101, 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, %16
%95 = phi i8 [ %17, %16 ], [ %60, %92 ], [ %60, %80 ], [ %60, %85 ]
%96 = phi %struct.node* [ %12, %16 ], [ %93, %92 ], [ %86, %85 ], [ %82, %80 ]
%97 = icmp eq i8 %95, 57
br i1 %97, label %103, label %98
98: ; preds = %94, %101
%99 = phi %struct.node* [ %96, %94 ], [ %79, %101 ]
%100 = phi i8 [ %95, %94 ], [ %60, %101 ]
br label %11
101: ; preds = %78
%102 = icmp eq i8 %60, 57
br i1 %102, label %105, label %98
103: ; preds = %94
%104 = icmp eq i8 %9, 105
br i1 %104, label %105, label %4
105: ; preds = %103, %101
%106 = phi %struct.node* [ %79, %101 ], [ %96, %103 ]
ret %struct.node* %106
}