user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  lea    D30(%rip),%rdi
  call   <puts@plt>
  lea    0x30(%rsp),%rdi
  call   <gets@plt>
  movzbl 0x30(%rsp),%eax
  test   %al,%al
  je     L71
  lea    0x30(%rsp),%rcx
  mov    %rcx,%rdi
  mov    %rsp,%rsi
  mov    $0x0,%ebx
  mov    $0x0,%edx
  mov    $0x1,%r9d
  mov    $0x1,%r10d
  sub    %rcx,%r10
  jmp    L169
L5:
  test   %edx,%edx
  jg     L124
L221:
  lea    (%r10,%rdi,1),%r8
  add    $0x1,%rdi
  movzbl (%rdi),%eax
  test   %al,%al
  je     L55
L169:
  sub    $0x30,%eax
  cmp    $0x9,%al
  ja     L5
  add    $0x1,%edx
  jmp    L221
L124:
  mov    %rdi,%r11
  movsbl -0x1(%rdi),%r8d
  sub    $0x30,%r8d
  cmp    $0x1,%edx
  jle    L130
  lea    0x1(%rdx),%ebp
  mov    $0x2,%ecx
  jmp    L230
L173:
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  add    $0x1,%edx
  cmp    %ecx,%edx
  jne    L173
L145:
  mov    %rcx,%rdx
  neg    %rdx
  movsbl (%r11,%rdx,1),%edx
  sub    $0x30,%edx
  imul   %edx,%eax
  add    %eax,%r8d
  add    $0x1,%rcx
  cmp    %rbp,%rcx
  je     L130
L230:
  lea    -0x1(%rcx),%r12d
  mov    %r9d,%eax
  mov    $0x1,%edx
  test   %r12d,%r12d
  jg     L173
  jmp    L145
L130:
  mov    %r8d,(%rsi)
  add    $0x4,%rsi
  add    $0x1,%ebx
  mov    $0x0,%edx
  jmp    L221
L55:
  test   %edx,%edx
  jle    L66
  movsbl 0x2f(%rsp,%r8,1),%edi
  sub    $0x30,%edi
  cmp    $0x1,%edx
  jle    L100
  lea    0x1(%rdx),%r10d
  mov    $0x2,%ecx
  mov    $0x1,%r9d
  lea    0x30(%rsp,%r8,1),%r11
  jmp    L236
L213:
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  add    $0x1,%edx
  cmp    %ecx,%edx
  jne    L213
L39:
  mov    %rcx,%rdx
  neg    %rdx
  movsbl (%r11,%rdx,1),%edx
  sub    $0x30,%edx
  imul   %edx,%eax
  add    %eax,%edi
  add    $0x1,%rcx
  cmp    %r10,%rcx
  je     L100
L236:
  lea    -0x1(%rcx),%r8d
  mov    %r9d,%eax
  mov    $0x1,%edx
  test   %r8d,%r8d
  jg     L213
  jmp    L39
L100:
  mov    %edi,(%rsi)
  add    $0x1,%ebx
L66:
  mov    %ebx,%esi
  lea    D14(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %ebx,%ebx
  jle    L78
  mov    %rsp,%rbp
  lea    -0x1(%rbx),%eax
  lea    0x4(%rsp,%rax,4),%r12
  lea    D18(%rip),%rbx
L54:
  mov    0x0(%rbp),%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x4,%rbp
  cmp    %rbp,%r12
  jne    L54
L78:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L224
  mov    $0x0,%eax
  add    $0x70,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L71:
  mov    $0x0,%esi
  lea    D14(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L78
L224:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D30
type: string
name: disassemble_data
arguments: tag: D14
type: string
name: disassemble_data
arguments: tag: D18
type: string

tool: D30: input a string:

tool: D14: There are %d numbers in this line.They are :


tool: D18: %d 

assistant: ```c
int main() {
  char str[50], *pstr;
  int i, j, k, m, e10, digit, ndigit, a[10], *pa;
  printf("input a string:\n");
  gets(str);
  pstr = &str[0];
  pa = &a[0];
  ndigit = 0;
  i = 0;
  j = 0;
  while (*(pstr + i) != '\0') {
    if (*(pstr + i) >= '0' && *(pstr + i) <= '9')
      j++;
    else {
      if (j > 0) {
        digit = *(pstr + i - 1) - 48;
        k = 1;
        while (k < j) {
          e10 = 1;
          for (m = 1; m <= k; m++)
            e10 = e10 * 10;
          digit = digit + (*(pstr + i - 1 - k) - 48) * e10;
          k++;
        }
        *pa = digit;
        pa++;
        ndigit++;
        j = 0;
      }
    }
    i++;
  }
  if (j > 0) {
    digit = *(pstr + i - 1) - 48;
    k = 1;
    while (k < j) {
      e10 = 1;
      for (m = 1; m <= k; m++)
        e10 = e10 * 10;
      digit = digit + (*(pstr + i - 1 - k) - 48) * e10;
      k++;
    }
    *pa = digit;
    ndigit++;
    j = 0;
  }
  printf("There are %d numbers in this line.They are :\n", ndigit);
  j = 0;
  pa = &a[0];
  for (j = 0; j < ndigit; j++)
    printf("%d ", *(pa + j));
  printf("\n");
  return 0;
}
```