user: What would the C source look like for the assembly code provided here?

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x64(%rbp)
  movl   $0x0,-0x60(%rbp)
  lea    -0x68(%rbp),%rax
  mov    %rax,%rsi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  jmp    L111
L118:
  lea    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <gets@plt>
  lea    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x54(%rbp)
  movl   $0x0,-0x5c(%rbp)
  movl   $0x0,-0x58(%rbp)
  jmp    L28
L20:
  mov    -0x5c(%rbp),%eax
  cltq
  movzbl -0x40(%rbp,%rax,1),%eax
  cmp    $0x2f,%al
  jle    L86
  mov    -0x5c(%rbp),%eax
  cltq
  movzbl -0x40(%rbp,%rax,1),%eax
  cmp    $0x39,%al
  jg     L86
  mov    -0x5c(%rbp),%eax
  cltq
  movzbl -0x40(%rbp,%rax,1),%edx
  mov    -0x58(%rbp),%eax
  cltq
  mov    %dl,-0x20(%rbp,%rax,1)
  addl   $0x1,-0x58(%rbp)
L86:
  addl   $0x1,-0x5c(%rbp)
L28:
  mov    -0x5c(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L20
  mov    -0x5c(%rbp),%eax
  cltq
  movb   $0x0,-0x40(%rbp,%rax,1)
  mov    -0x58(%rbp),%eax
  cltq
  movb   $0x0,-0x20(%rbp,%rax,1)
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x50(%rbp)
  movl   $0x0,-0x5c(%rbp)
  jmp    L104
L87:
  mov    -0x5c(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L79
  movl   $0x0,-0x48(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %eax,%eax
  mov    %eax,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  sub    $0x1,%eax
  movslq %eax,%rdx
  imul   $0x38e38e39,%rdx,%rdx
  shr    $0x20,%rdx
  mov    %edx,%ecx
  sar    %ecx
  sar    $0x1f,%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  add    %edx,%eax
  add    %eax,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  add    %eax,-0x64(%rbp)
  jmp    L123
L79:
  mov    -0x5c(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %eax,-0x60(%rbp)
L123:
  addl   $0x1,-0x5c(%rbp)
L104:
  mov    -0x5c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L87
  mov    -0x64(%rbp),%edx
  mov    -0x60(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x4c(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  test   %edx,%edx
  jne    L5
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L13
L5:
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L13:
  movl   $0x0,-0x64(%rbp)
  movl   $0x0,-0x60(%rbp)
  movl   $0x0,-0x48(%rbp)
L111:
  mov    -0x68(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x68(%rbp)
  test   %eax,%eax
  jne    L118
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L50
  call   <__stack_chk_fail@plt>
L50:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D18
type: string
name: retrieve_data
arguments: label: D6
type: string
name: retrieve_data
arguments: label: D27
type: string

tool: D18: %d

tool: D6: Valid


tool: D27: Invalid


assistant: ```c
int main() {
  char m[22], a[22];
  int b, c = 0, d = 0, ch;
  int n, i, j, l, len, len2, total;
  scanf("%d", &n);
  getchar();
  while (n--) {
    gets(m);
    len = strlen(m);
    j = 0, l = 0;
    while (j < len) {
      if (m[j] >= '0' && m[j] <= '9') {
        a[l] = m[j];
        l++;
      }
      j++;
    }
    m[j] = '\0';
    a[l] = '\0';
    len2 = strlen(a);
    for (j = 0; j < len2; j++) {
      if (j % 2 == 0) {
        ch = 0;
        b = (a[j] - '0') * 2;
        b = b - 9 * ((b - 1) / 9);
        c = c + b;
      } else {
        d += (a[j] - '0');
      }
    }
    total = c + d;
    if (total % 10 == 0) {
      printf("Valid\n");
    } else {
      printf("Invalid\n");
    }
    c = 0, d = 0, ch = 0;
  }
  return 0;
}
```