user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbx
  lea    D13(%rip),%rdi
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rbx
  mov    %rbx,%rsi
  call   <scanf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x26(%rsp),%rcx
  mov    %eax,%r8d
  mov    %rbx,%rax
  cmp    $0xa,%r8w
  jne    L24
  nopl   0x0(%rax,%rax,1)
L89:
  movzbl (%rax),%esi
  lea    -0x30(%rsi),%edx
  cmp    $0x9,%dl
  ja     L24
  add    $0x1,%rax
  cmp    %rax,%rcx
  jne    L89
  movzbl 0x1e(%rsp),%ecx
  cmp    $0x35,%cl
  jg     L24
  ja     L30
  mov    $0x15,%eax
  shl    $0x31,%rax
  shr    %cl,%rax
  test   $0x1,%al
  je     L30
  cmpb   $0x32,0x1f(%rsp)
  jg     L24
L30:
  movzbl 0x20(%rsp),%edx
  cmp    $0x33,%dl
  jg     L24
  cmp    $0x34,%cl
  ja     L302
  mov    $0x15,%eax
  shl    $0x30,%rax
  shr    %cl,%rax
  test   $0x1,%al
  je     L302
  cmpb   $0x32,0x1f(%rsp)
  je     L243
L302:
  cmpb   $0x33,0x20(%rsp)
  je     L205
L318:
  xor    %eax,%eax
  mov    %rsp,%rcx
  nopl   0x0(%rax)
L61:
  movsbw (%rbx,%rax,1),%dx
  sub    $0x30,%edx
  mov    %dx,(%rcx,%rax,2)
  add    $0x1,%rax
  cmp    $0xa,%rax
  jne    L61
  movzwl 0x2(%rsp),%edx
  movzwl (%rsp),%eax
  mov    $0xb,%esi
  movzwl 0x12(%rsp),%ecx
  lea    (%rax,%rdx,2),%eax
  movzwl 0x4(%rsp),%edx
  lea    (%rax,%rdx,4),%edx
  movzwl 0x6(%rsp),%eax
  lea    (%rax,%rax,4),%eax
  lea    (%rax,%rdx,2),%eax
  movzwl 0x8(%rsp),%edx
  imul   $0xa,%edx,%edx
  add    %edx,%eax
  movzwl 0xa(%rsp),%edx
  lea    (%rdx,%rdx,8),%edx
  add    %edx,%eax
  movzwl 0xc(%rsp),%edx
  imul   $0x7,%edx,%edx
  add    %edx,%eax
  movzwl 0xe(%rsp),%edx
  lea    (%rdx,%rdx,2),%edx
  add    %edx,%eax
  movzwl 0x10(%rsp),%edx
  imul   $0x6,%edx,%edx
  add    %edx,%eax
  cltd
  idiv   %esi
  mov    $0xa,%esi
  mov    %edx,%eax
  cltd
  idiv   %esi
  cmp    %edx,%ecx
  je     L163
  nopw   0x0(%rax,%rax,1)
L24:
  lea    D24(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
L212:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L152
  add    $0x30,%rsp
  pop    %rbx
  ret
L163:
  lea    D14(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L212
L205:
  movzbl 0x1f(%rsp),%eax
  mov    %eax,%edx
  and    $0xfffffffd,%edx
  cmp    $0x34,%dl
  je     L165
  cmp    $0x39,%al
  jne    L123
L165:
  cmpb   $0x30,0x21(%rsp)
  jle    L318
  jmp    L24
L243:
  cmp    $0x33,%dl
  je     L24
  cmp    $0x32,%dl
  jne    L318
  cmpb   $0x39,0x21(%rsp)
  jne    L318
  sub    $0x34,%ecx
  cmp    $0x1,%cl
  jbe    L318
  mov    %rbx,%rdi
  call   <dividable_4@plt>
  test   %rax,%rax
  je     L24
  cmpb   $0x30,0x1c(%rsp)
  jne    L302
  cmpb   $0x30,0x1d(%rsp)
  jne    L302
  jmp    L24
L123:
  cmp    $0x31,%al
  je     L272
L255:
  cmpb   $0x31,0x21(%rsp)
  jle    L318
  jmp    L24
L272:
  movsbl 0x1e(%rsp),%eax
  mov    $0x2,%ecx
  sub    $0x30,%eax
  cltd
  idiv   %ecx
  sub    $0x1,%edx
  jne    L255
  jmp    L165
L152:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D13
data_type: string
name: extract_symbolic_data
arguments: tag: D24
data_type: string
name: extract_symbolic_data
arguments: tag: D14
data_type: string

tool: D13: %s

tool: D24: 0

tool: D14: 1

assistant: ```c
int main() {
  char input[12];
  short unsigned int i, l, n[10];
  scanf("%s", input);
  l = strlen(input);
  if (l != 10) {
    printf("0");
    return 0;
  }
  for (i = 0; i < 10; i++)
    if (input[i] < '0' || input[i] > '9') {
      printf("0");
      return 0;
    }
  if (input[2] > '5') {
    printf("0");
    return 0;
  }
  if ((input[2] == '5' || input[2] == '3' || input[2] == '1') && input[3] > '2') {
    printf("0");
    return 0;
  }
  if (input[4] > '3') {
    printf("0");
    return 0;
  }
  if ((input[2] == '0' || input[2] == '2' || input[2] == '4') && input[3] == '2') {
    if (input[4] > '2') {
      printf("0");
      return 0;
    }
    if (input[4] == '2' && input[5] == '9' && !((input[2] == '4' || input[2] == '5') || (dividable_4(input) && !(input[0] == '0' && input[1] == '0')))) {
      printf("0");
      return 0;
    }
  }
  if (input[4] == '3') {
    if (input[3] == '4' || input[3] == '6' || input[3] == '9' || (input[3] == '1' && ((int)input[2] - 48) % 2 == 1)) {
      if (input[5] > '0') {
        printf("0");
        return 0;
      }
    } else if (input[5] > '1') {
      printf("0");
      return 0;
    }
  }
  for (i = 0; i < 10; i++)
    n[i] = (short unsigned int)input[i] - 48;
  if (n[9] != ((n[0] * 2 + n[1] * 4 + n[2] * 8 + n[3] * 5 + n[4] * 10 + n[5] * 9 + n[6] * 7 + n[7] * 3 + n[8] * 6) % 11) % 10) {
    printf("0");
    return 0;
  }
  printf("1");
  return 1;
}
```