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

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x3c(%rsp),%rbx
  mov    %rbx,%rsi
  lea    D6(%rip),%rdi
  call   <scanf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%ecx
  cmp    $0xb,%eax
  setg   %r8b
  movzbl %r8b,%r8d
  test   %eax,%eax
  jle    L289
  mov    %eax,%edi
  mov    $0x0,%eax
  mov    %rbx,%rsi
L343:
  movsbl (%rax,%rsi,1),%edx
  sub    $0x30,%edx
  mov    %edx,(%rsp,%rax,4)
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L343
L289:
  mov    (%rsp),%edx
  test   %edx,%edx
  jne    L153
  cmpl   $0x0,0x4(%rsp)
  jne    L61
  imul   $0xa,0x8(%rsp),%ecx
  add    0xc(%rsp),%ecx
  lea    -0x1(%rcx),%eax
  cmp    $0xb,%eax
  jbe    L61
  lea    -0x29(%rcx),%eax
  cmp    $0xb,%eax
  setbe  %al
  cmp    $0x1,%al
  adc    $0x0,%r8d
  jmp    L61
L52:
  imul   $0xa,0x8(%rsp),%ecx
  add    0xc(%rsp),%ecx
  mov    %ecx,%eax
  lea    -0x1(%rcx),%esi
  cmp    $0xb,%esi
  jbe    L61
  lea    -0x15(%rcx),%esi
  cmp    $0xb,%esi
  jbe    L61
  sub    $0x29,%eax
  cmp    $0xc,%eax
  sbb    $0xffffffff,%r8d
  imul   $0xa,0x10(%rsp),%r10d
  mov    0x14(%rsp),%esi
  lea    (%r10,%rsi,1),%eax
L16:
  cmp    $0x34,%ecx
  ja     L143
  movabs $0x15aa015aa015a0,%rdi
  shr    %cl,%rdi
  test   $0x1,%dil
  je     L143
  cmp    $0x1f,%eax
  jle    L143
  add    $0x1,%r8d
  mov    %ecx,%edi
  and    $0xfffffffd,%edi
  cmp    $0x4,%edi
  jne    L150
L124:
  add    $0x1,%r8d
  jmp    L88
L170:
  cmp    $0x1d,%eax
  jle    L313
  add    $0x1,%r8d
  jmp    L313
L73:
  cmp    $0x2a,%ecx
  ja     L313
  movabs $0x40000400004,%r11
  shr    %cl,%r11
  test   $0x1,%r11b
  je     L313
  cmp    $0x1c,%eax
  jle    L227
  add    $0x1,%r8d
  jmp    L227
L92:
  test   %r8d,%r8d
  jne    L0
  lea    D5(%rip),%rdi
  call   <printf@plt>
L57:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L31
  mov    $0x0,%eax
  add    $0x50,%rsp
  pop    %rbx
  ret
L153:
  cmpl   $0x0,0x4(%rsp)
  jne    L52
L61:
  mov    0x10(%rsp),%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  mov    %eax,%r10d
  mov    0x14(%rsp),%esi
  add    %esi,%eax
  mov    %ecx,%edi
  and    $0xfffffffd,%edi
  cmp    $0x1,%edi
  jne    L16
  cmp    $0x1f,%eax
  jg     L83
L143:
  mov    %ecx,%edi
  and    $0xfffffffd,%edi
  cmp    $0x4,%edi
  je     L13
L150:
  cmp    $0x33,%ecx
  ja     L88
  movabs $0xa5000a5000a00,%rdi
  shr    %cl,%rdi
  test   $0x1,%dil
  je     L88
L13:
  cmp    $0x1e,%eax
  jg     L124
L88:
  mov    0x4(%rsp),%edi
  lea    (%rdx,%rdx,4),%r9d
  lea    (%rdi,%r9,2),%r9d
  test   $0x3,%r9b
  jne    L73
  cmp    $0x2a,%ecx
  ja     L313
  movabs $0x40000400004,%r11
  shr    %cl,%r11
  test   $0x1,%r11b
  jne    L170
L313:
  cmp    $0x1c,%eax
  setg   %r11b
  test   %r9d,%r9d
  sete   %al
  test   %al,%r11b
  je     L227
  sub    $0x1,%ecx
  cmp    $0xb,%ecx
  setbe  %al
  cmp    $0x1,%al
  sbb    $0xffffffff,%r8d
L227:
  lea    (%rdx,%rdi,2),%eax
  mov    0x8(%rsp),%edx
  lea    (%rax,%rdx,4),%edx
  mov    0xc(%rsp),%eax
  lea    (%rax,%rax,4),%eax
  lea    (%rax,%rdx,2),%eax
  add    %r10d,%eax
  lea    (%rsi,%rsi,8),%edx
  add    %edx,%eax
  mov    0x18(%rsp),%edx
  lea    (%rax,%rdx,8),%eax
  sub    %edx,%eax
  mov    0x1c(%rsp),%edx
  lea    (%rdx,%rdx,2),%edx
  add    %edx,%eax
  mov    0x20(%rsp),%edx
  lea    (%rdx,%rdx,2),%edx
  lea    (%rax,%rdx,2),%edx
  movslq %edx,%rax
  imul   $0x2e8ba2e9,%rax,%rax
  sar    $0x21,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  lea    (%rax,%rax,4),%ecx
  lea    (%rax,%rcx,2),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  cmp    $0xa,%eax
  mov    $0x0,%edx
  cmove  %edx,%eax
  cmp    %eax,0x24(%rsp)
  je     L92
L0:
  lea    D25(%rip),%rdi
  call   <printf@plt>
  jmp    L57
L83:
  add    $0x1,%r8d
  jmp    L150
L31:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D6
type: string
name: extract_symbolic_data
arguments: tag: D5
type: string
name: extract_symbolic_data
arguments: tag: D25
type: string

tool: D6: %s

tool: D5: 1

tool: D25: 0

assistant: ```c
int main() {
  int arr[12];
  char string[12];
  int i = 0, x = 0, y = 0, z = 0, k = 0, sum = 0, del = 0, Error = 0;
  scanf("%s", string);
  x = strlen(string);
  if (x > 11) {
    Error++;
  }
  while (i < x) {
    arr[i] = string[i] - '0';
    i++;
  }
  i = 0;
  if (arr[0] == 0 && arr[1] == 0) {
    x = (arr[2] * 10) + arr[3];
    if ((x >= 1 && x <= 12) || (x >= 41 && x <= 52)) {
      i = 0;
    } else {
      Error++;
    }
  }
  if (arr[0] != 0 && arr[1] != 0) {
    x = (arr[2] * 10) + arr[3];
    if ((x >= 1 && x <= 12) || (x >= 21 && x <= 32) || (x >= 41 && x <= 52)) {
      i = 0;
    } else {
      Error++;
    }
  }
  y = (arr[4] * 10) + arr[5];
  if (x == 1 || x == 3 || x == 5 || x == 7 || x == 8 || x == 10 || x == 12 || x == 21 || x == 23 || x == 25 || x == 27 || x == 28 || x == 30 || x == 32 || x == 41 || x == 43 || x == 45 || x == 47 || x == 48 || x == 50 || x == 52) {
    if (y > 31) {
      Error++;
    }
  }
  if (x == 4 || x == 6 || x == 9 || x == 11 || x == 24 || x == 26 || x == 29 || x == 31 || x == 44 || x == 46 || x == 49 || x == 51) {
    if (y > 30) {
      Error++;
    }
  }
  z = (arr[0] * 10) + arr[1];
  k = z % 4;
  if (k == 0) {
    if (x == 2 || x == 22 || x == 42) {
      if (y > 29) {
        Error++;
      }
    }
  }
  if (k != 0) {
    if (x == 2 || x == 22 || x == 42) {
      if (y > 28) {
        Error++;
      }
    }
  }
  if (z == 0 && x >= 1 && x <= 12) {
    if (x == 2 || x == 22 || 42) {
      if (y > 28) {
        Error++;
      }
    }
  }
  sum = (arr[0] * 2) + (arr[1] * 4) + (arr[2] * 8) + (arr[3] * 5) + (arr[4] * 10) + (arr[5] * 9) + (arr[6] * 7) + (arr[7] * 3) + (arr[8] * 6);
  del = sum % 11;
  if (del == 10) {
    del = 0;
  }
  if (arr[9] != del) {
    Error++;
  }
  if (Error == 0) {
    printf("1");
  } else {
    printf("0");
  }
  return 0;
}
```