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

```asm
<input_is_digit>:
  endbr64
  sub    $0x18,%rsp
  movzbl (%rdi),%edx
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    D8(%rip),%rax
  mov    %rax,(%rsp)
  cmp    $0x30,%dl
  je     L135
  cmp    $0x31,%dl
  je     L734
  cmp    $0x32,%dl
  jne    L478
  movl   $0x2,(%rsp)
  mov    $0x1,%eax
L403:
  cmp    $0x37,%dl
  jne    L607
  movslq %eax,%rdx
  add    $0x1,%eax
  movl   $0x7,(%rsp,%rdx,4)
  cmp    $0x3,%eax
  je     L475
  nopl   0x0(%rax,%rax,1)
L723:
  movzbl 0x1(%rdi),%edx
  cmp    $0x30,%dl
  je     L38
L576:
  cmp    $0x31,%dl
  jne    L315
  movslq %eax,%rcx
  add    $0x1,%eax
  movl   $0x1,(%rsp,%rcx,4)
  cmp    $0x3,%eax
  je     L475
L125:
  cmp    $0x37,%dl
  jne    L78
  movslq %eax,%rdx
  add    $0x1,%eax
  movl   $0x7,(%rsp,%rdx,4)
  cmp    $0x3,%eax
  jne    L168
  nopw   0x0(%rax,%rax,1)
L475:
  lea    D5(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
L482:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L7
  add    $0x18,%rsp
  ret
  nopw   0x0(%rax,%rax,1)
L734:
  movl   $0x1,(%rsp)
  mov    $0x1,%eax
  jmp    L403
  nopl   0x0(%rax)
L135:
  movl   $0x0,(%rsp)
  mov    $0x1,%eax
  jmp    L403
L478:
  cmp    $0x33,%dl
  jne    L243
  movl   $0x3,(%rsp)
  mov    $0x1,%eax
L773:
  cmp    $0x39,%dl
  jne    L723
  movslq %eax,%rdx
  add    $0x1,%eax
  movl   $0x9,(%rsp,%rdx,4)
  cmp    $0x3,%eax
  je     L475
  movzbl 0x1(%rdi),%edx
  cmp    $0x30,%dl
  jne    L576
L38:
  movslq %eax,%rcx
  add    $0x1,%eax
  movl   $0x0,(%rsp,%rcx,4)
  cmp    $0x3,%eax
  jne    L125
  jmp    L475
L607:
  cmp    $0x38,%dl
  jne    L773
  movslq %eax,%rdx
  add    $0x1,%eax
  movl   $0x8,(%rsp,%rdx,4)
  cmp    $0x3,%eax
  jne    L723
  jmp    L475
  nopl   (%rax)
L315:
  cmp    $0x32,%dl
  jne    L346
  movslq %eax,%rcx
  add    $0x1,%eax
  movl   $0x2,(%rsp,%rcx,4)
  cmp    $0x3,%eax
  je     L475
L78:
  cmp    $0x38,%dl
  jne    L438
  movslq %eax,%rdx
  add    $0x1,%eax
  movl   $0x8,(%rsp,%rdx,4)
  cmp    $0x3,%eax
  je     L475
  cs nopw 0x0(%rax,%rax,1)
L168:
  movzbl 0x2(%rdi),%edx
  cmp    $0x30,%dl
  je     L112
L600:
  cmp    $0x31,%dl
  jne    L304
  movslq %eax,%rdx
  movl   $0x1,(%rsp,%rdx,4)
  cmp    $0x2,%eax
  je     L475
  nopl   0x0(%rax)
L591:
  mov    $0x2d,%esi
  call   <strchr@plt>
  mov    %rax,%r8
  mov    $0xffffffff,%eax
  test   %r8,%r8
  jne    L482
  mov    (%rsp),%eax
  cmp    $0xffffffff,%eax
  je     L482
  mov    0x4(%rsp),%edx
  cmp    $0xffffffff,%edx
  je     L327
  lea    (%rax,%rax,4),%eax
  lea    (%rdx,%rax,2),%eax
L327:
  cmp    $0xd,%eax
  mov    $0xffffffff,%edx
  cmovge %edx,%eax
  jmp    L482
L346:
  cmp    $0x33,%dl
  jne    L465
  movslq %eax,%rdx
  add    $0x1,%eax
  movl   $0x3,(%rsp,%rdx,4)
  cmp    $0x3,%eax
  je     L475
  movzbl 0x2(%rdi),%edx
  cmp    $0x30,%dl
  jne    L600
L112:
  movslq %eax,%rdx
  movl   $0x0,(%rsp,%rdx,4)
  cmp    $0x2,%eax
  jne    L591
  jmp    L475
L465:
  cmp    $0x34,%dl
  jne    L466
  movslq %eax,%rdx
  add    $0x1,%eax
  movl   $0x4,(%rsp,%rdx,4)
  cmp    $0x3,%eax
  jne    L168
  jmp    L475
L466:
  cmp    $0x35,%dl
  jne    L455
  movslq %eax,%rdx
  add    $0x1,%eax
  movl   $0x5,(%rsp,%rdx,4)
  cmp    $0x3,%eax
  jne    L168
  jmp    L475
L455:
  cmp    $0x36,%dl
  jne    L125
  movslq %eax,%rdx
  add    $0x1,%eax
  movl   $0x6,(%rsp,%rdx,4)
  cmp    $0x3,%eax
  jne    L168
  jmp    L475
  cs nopw 0x0(%rax,%rax,1)
L304:
  cmp    $0x32,%dl
  jne    L137
  movslq %eax,%rdx
  movl   $0x2,(%rsp,%rdx,4)
  cmp    $0x2,%eax
  jne    L591
  jmp    L475
L438:
  cmp    $0x39,%dl
  jne    L168
  movslq %eax,%rdx
  add    $0x1,%eax
  movl   $0x9,(%rsp,%rdx,4)
  cmp    $0x3,%eax
  jne    L168
  jmp    L475
L137:
  cmp    $0x33,%dl
  jne    L716
  movslq %eax,%rdx
  movl   $0x3,(%rsp,%rdx,4)
  cmp    $0x2,%eax
  jne    L591
  jmp    L475
L716:
  cmp    $0x34,%dl
  jne    L238
  movslq %eax,%rdx
  movl   $0x4,(%rsp,%rdx,4)
  cmp    $0x2,%eax
  jne    L591
  jmp    L475
L238:
  cmp    $0x35,%dl
  jne    L662
  movslq %eax,%rdx
  movl   $0x5,(%rsp,%rdx,4)
  cmp    $0x2,%eax
  jne    L591
  jmp    L475
L662:
  cmp    $0x36,%dl
  jne    L214
  movslq %eax,%rdx
  movl   $0x6,(%rsp,%rdx,4)
  cmp    $0x2,%eax
  jne    L591
  jmp    L475
L214:
  cmp    $0x37,%dl
  jne    L335
  movslq %eax,%rdx
  movl   $0x7,(%rsp,%rdx,4)
  cmp    $0x2,%eax
  jne    L591
  jmp    L475
L335:
  cmp    $0x38,%dl
  jne    L787
  movslq %eax,%rdx
  movl   $0x8,(%rsp,%rdx,4)
  cmp    $0x2,%eax
  jne    L591
  jmp    L475
L787:
  cmp    $0x39,%dl
  jne    L591
  movslq %eax,%rdx
  movl   $0x9,(%rsp,%rdx,4)
  cmp    $0x2,%eax
  jne    L591
  jmp    L475
L243:
  xor    %eax,%eax
  cmp    $0x34,%dl
  je     L743
  cmp    $0x35,%dl
  jne    L745
  movl   $0x5,(%rsp)
  mov    $0x1,%eax
  jmp    L723
L745:
  cmp    $0x36,%dl
  jne    L403
  movl   $0x6,(%rsp)
  mov    $0x1,%eax
  jmp    L723
L743:
  movl   $0x4,(%rsp)
  mov    $0x1,%eax
  jmp    L723
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D8
type: byte[8]
name: extract_symbolic_data
arguments: label: D5
type: string

tool: {"D8": [0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff]}

tool: D5: [Warning] too much numbers in this move


assistant: ```c
int input_is_digit(char position[3]) {
  int i, j;
  char *ptr = NULL;
  int numbersInString[2] = {-1, -1};
  int aux = 0;
  char arrayNumbers[10] = "0123456789";
  for (j = 0; j < 3; j++) {
    for (i = 0; i < 10; i++) {
      if (position[j] == arrayNumbers[i]) {
        numbersInString[aux] = i;
        aux++;
      }
      if (aux > 2) {
        printf("[Warning] too much numbers in this move\n");
        return -1;
      }
    }
  }
  ptr = strchr(position, '-');
  if (ptr != NULL) {
    numbersInString[0] = -1;
  }
  if (numbersInString[0] != -1 && numbersInString[1] != -1) {
    numbersInString[0] = numbersInString[0] * 10 + numbersInString[1];
  } else {
    if (numbersInString[0] != -1) {
    }
  }
  if (numbersInString[0] < 13) {
    return numbersInString[0];
  } else {
    return -1;
  }
}
```