user: Converte this assembly snippet into its equivalent C code:

```asm
<get_knight_moves_white>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,0x20(%rsp)
  mov    %rdx,0x28(%rsp)
  movl   $0x61,0xc(%rsp)
  mov    %rsi,0x38(%rsp)
  jmp    L309
L3:
  lea    0x2(%r15),%esi
  lea    0x1(%rax),%r12d
  mov    %esi,0x18(%rsp)
  mov    %esi,%edx
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <is_occupied@plt>
  cmp    $0x1,%eax
  je     L38
  mov    0x18(%rsp),%esi
  push   %rsi
  push   %r12
  mov    0x24(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    0x38(%rsp),%rcx
  mov    $0x1,%edx
  mov    %r14,%rsi
  mov    0x30(%rsp),%rdi
  call   <store_move@plt>
  mov    %rax,0x30(%rsp)
  add    $0x10,%rsp
  jmp    L38
L14:
  mov    0xc(%rsp),%eax
  add    $0x2,%eax
  mov    %r13d,%edx
  mov    %eax,0x1c(%rsp)
  mov    %eax,%esi
  mov    %r14,%rdi
  call   <is_occupied@plt>
  cmp    $0x1,%eax
  je     L242
  push   %r13
  mov    0x24(%rsp),%eax
  push   %rax
  mov    0x24(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    0x38(%rsp),%rcx
  mov    $0x1,%edx
  mov    %r14,%rsi
  mov    0x30(%rsp),%rdi
  call   <store_move@plt>
  mov    %rax,0x30(%rsp)
  add    $0x10,%rsp
  jmp    L242
L351:
  cmp    $0x32,%bl
  setg   %bl
  test   %bpl,%bpl
  je     L88
  test   %bl,%bl
  jne    L296
L88:
  cmpb   $0x61,0x33(%rsp)
  setg   %bpl
  test   %bl,%bl
  je     L236
  test   %bpl,%bpl
  jne    L328
L236:
  cmpb   $0x62,0x33(%rsp)
  setg   %bl
  cmpb   $0x0,0x1c(%rsp)
  je     L102
  test   %bl,%bl
  jne    L338
L102:
  cmpb   $0x0,0x18(%rsp)
  je     L75
  test   %bl,%bl
  jne    L180
L75:
  cmpb   $0x0,0x32(%rsp)
  je     L306
  test   %bpl,%bpl
  jne    L19
L306:
  cmp    $0x38,%r13b
  jg     L294
L223:
  add    $0x1,%r15d
  add    $0x1,%r13d
L163:
  mov    %r15d,0x14(%rsp)
  mov    %r15d,%edx
  mov    0x10(%rsp),%esi
  mov    %r14,%rdi
  call   <get_piece@plt>
  cmp    $0x4e,%al
  jne    L306
  mov    0xc(%rsp),%eax
  mov    %al,0x33(%rsp)
  cmp    $0x67,%al
  setle  %bpl
  mov    %r15d,%ebx
  cmp    $0x36,%r15b
  setle  0x32(%rsp)
  movzbl 0x32(%rsp),%ecx
  test   %bpl,%bpl
  je     L38
  test   %cl,%cl
  jne    L3
L38:
  cmpb   $0x66,0x33(%rsp)
  setle  %r12b
  cmp    $0x37,%bl
  setle  0x18(%rsp)
  movzbl 0x18(%rsp),%eax
  test   %r12b,%r12b
  je     L242
  test   %al,%al
  jne    L14
L242:
  cmp    $0x31,%bl
  setg   0x1c(%rsp)
  movzbl 0x1c(%rsp),%eax
  test   %r12b,%r12b
  je     L351
  test   %al,%al
  je     L351
  lea    -0x1(%r15),%eax
  mov    0xc(%rsp),%edi
  lea    0x2(%rdi),%r12d
  mov    %eax,0x34(%rsp)
  mov    %eax,%edx
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <is_occupied@plt>
  cmp    $0x1,%eax
  je     L351
  mov    0x34(%rsp),%eax
  push   %rax
  push   %r12
  mov    0x24(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    0x38(%rsp),%rcx
  mov    $0x1,%edx
  mov    %r14,%rsi
  mov    0x30(%rsp),%rdi
  call   <store_move@plt>
  mov    %rax,0x30(%rsp)
  add    $0x10,%rsp
  jmp    L351
L296:
  lea    -0x2(%r15),%r12d
  mov    0xc(%rsp),%eax
  lea    0x1(%rax),%ebp
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %r14,%rdi
  call   <is_occupied@plt>
  cmp    $0x1,%eax
  je     L88
  push   %r12
  push   %rbp
  mov    0x24(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    0x38(%rsp),%rcx
  mov    $0x1,%edx
  mov    %r14,%rsi
  mov    0x30(%rsp),%rdi
  call   <store_move@plt>
  mov    %rax,0x30(%rsp)
  add    $0x10,%rsp
  jmp    L88
L328:
  lea    -0x2(%r15),%r12d
  mov    0xc(%rsp),%eax
  lea    -0x1(%rax),%ebx
  mov    %r12d,%edx
  mov    %ebx,%esi
  mov    %r14,%rdi
  call   <is_occupied@plt>
  cmp    $0x1,%eax
  je     L236
  push   %r12
  push   %rbx
  mov    0x24(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    0x38(%rsp),%rcx
  mov    $0x1,%edx
  mov    %r14,%rsi
  mov    0x30(%rsp),%rdi
  call   <store_move@plt>
  mov    %rax,0x30(%rsp)
  add    $0x10,%rsp
  jmp    L236
L338:
  lea    -0x1(%r15),%eax
  mov    0xc(%rsp),%ecx
  lea    -0x2(%rcx),%r12d
  mov    %eax,0x1c(%rsp)
  mov    %eax,%edx
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <is_occupied@plt>
  cmp    $0x1,%eax
  je     L102
  mov    0x1c(%rsp),%eax
  push   %rax
  push   %r12
  mov    0x24(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    0x38(%rsp),%rcx
  mov    $0x1,%edx
  mov    %r14,%rsi
  mov    0x30(%rsp),%rdi
  call   <store_move@plt>
  mov    %rax,0x30(%rsp)
  add    $0x10,%rsp
  jmp    L102
L180:
  mov    0xc(%rsp),%eax
  lea    -0x2(%rax),%ebx
  mov    %r13d,%edx
  mov    %ebx,%esi
  mov    %r14,%rdi
  call   <is_occupied@plt>
  cmp    $0x1,%eax
  je     L75
  push   %r13
  push   %rbx
  mov    0x24(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    0x38(%rsp),%rcx
  mov    $0x1,%edx
  mov    %r14,%rsi
  mov    0x30(%rsp),%rdi
  call   <store_move@plt>
  mov    %rax,0x30(%rsp)
  add    $0x10,%rsp
  jmp    L75
L19:
  lea    0x2(%r15),%ebp
  mov    0xc(%rsp),%eax
  lea    -0x1(%rax),%ebx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r14,%rdi
  call   <is_occupied@plt>
  cmp    $0x1,%eax
  je     L223
  push   %rbp
  push   %rbx
  mov    0x24(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    0x38(%rsp),%rcx
  mov    $0x1,%edx
  mov    %r14,%rsi
  mov    0x30(%rsp),%rdi
  call   <store_move@plt>
  mov    %rax,0x30(%rsp)
  add    $0x10,%rsp
  jmp    L223
L294:
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  cmp    $0x69,%eax
  je     L364
L309:
  mov    $0x32,%r13d
  mov    $0x31,%r15d
  mov    0xc(%rsp),%eax
  mov    %eax,0x10(%rsp)
  mov    0x38(%rsp),%r14
  jmp    L163
L364:
  mov    0x20(%rsp),%rax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
struct node *get_knight_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 == 'N') {
        if ((x < 'h') && (y < '7') && (is_occupied(board, x + 1, y + 2) != 1)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y, x + 1, y + 2);
          numMoves++;
        }
        if ((x < 'g') && (y < '8') && (is_occupied(board, x + 2, y + 1) != 1)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y, x + 2, y + 1);
          numMoves++;
        }
        if ((x < 'g') && (y > '1') && (is_occupied(board, x + 2, y - 1) != 1)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y, x + 2, y - 1);
          numMoves++;
        }
        if ((x < 'h') && (y > '2') && (is_occupied(board, x + 1, y - 2) != 1)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y, x + 1, y - 2);
          numMoves++;
        }
        if ((x > 'a') && (y > '2') && (is_occupied(board, x - 1, y - 2) != 1)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y, x - 1, y - 2);
          numMoves++;
        }
        if ((x > 'b') && (y > '1') && (is_occupied(board, x - 2, y - 1) != 1)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y, x - 2, y - 1);
          numMoves++;
        }
        if ((x > 'b') && (y < '8') && (is_occupied(board, x - 2, y + 1) != 1)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y, x - 2, y + 1);
          numMoves++;
        }
        if ((x > 'a') && (y < '7') && (is_occupied(board, x - 1, y + 2) != 1)) {
          currentNode = store_move(currentNode, board, 1, parentNode, x, y, x - 1, y + 2);
          numMoves++;
        }
      }
    }
  }
  return currentNode;
}
```