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

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x728,%rsp
  lea    D38(%rip),%r12
  lea    D35(%rip),%r13
  mov    %fs:0x28,%rax
  mov    %rax,0x2718(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  nopl   (%rax)
L95:
  xor    %eax,%eax
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  cmp    $0xffffffff,%eax
  je     L210
  mov    %rbx,%rdi
  call   <strlen@plt>
  movdqa D30(%rip),%xmm4
  cmp    $0x1,%rax
  mov    %rax,%rdx
  je     L68
  nopl   0x0(%rax,%rax,1)
L111:
  test   %edx,%edx
  je     L65
  lea    -0x1(%rdx),%eax
  cmp    $0xe,%eax
  jbe    L61
  mov    %edx,%ecx
  pxor   %xmm1,%xmm1
  pxor   %xmm6,%xmm6
  mov    %rbx,%rax
  shr    $0x4,%ecx
  pxor   %xmm5,%xmm5
  sub    $0x1,%ecx
  shl    $0x4,%rcx
  lea    0x10(%rsp,%rcx,1),%rcx
  nopl   0x0(%rax)
L159:
  movdqa (%rax),%xmm0
  movdqa %xmm6,%xmm3
  add    $0x10,%rax
  pcmpgtb %xmm0,%xmm3
  movdqa %xmm0,%xmm2
  punpcklbw %xmm3,%xmm2
  punpckhbw %xmm3,%xmm0
  movdqa %xmm5,%xmm3
  paddw  %xmm4,%xmm2
  paddw  %xmm4,%xmm0
  pcmpgtw %xmm2,%xmm3
  movdqa %xmm2,%xmm7
  punpcklwd %xmm3,%xmm7
  punpckhwd %xmm3,%xmm2
  movdqa %xmm0,%xmm3
  paddd  %xmm7,%xmm1
  paddd  %xmm2,%xmm1
  movdqa %xmm5,%xmm2
  pcmpgtw %xmm0,%xmm2
  punpcklwd %xmm2,%xmm3
  punpckhwd %xmm2,%xmm0
  paddd  %xmm3,%xmm1
  paddd  %xmm0,%xmm1
  cmp    %rcx,%rax
  jne    L159
  movdqa %xmm1,%xmm0
  mov    %edx,%eax
  psrldq $0x8,%xmm0
  and    $0xfffffff0,%eax
  paddd  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm1
  movd   %xmm1,%ebp
  test   $0xf,%dl
  je     L120
L42:
  movslq %eax,%rcx
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  lea    0x1(%rax),%ecx
  cmp    %ecx,%edx
  jle    L120
  movslq %ecx,%rcx
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  lea    0x2(%rax),%ecx
  cmp    %ecx,%edx
  jle    L120
  movslq %ecx,%rcx
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  lea    0x3(%rax),%ecx
  cmp    %ecx,%edx
  jle    L120
  movslq %ecx,%rcx
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  lea    0x4(%rax),%ecx
  cmp    %ecx,%edx
  jle    L120
  movslq %ecx,%rcx
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  lea    0x5(%rax),%ecx
  cmp    %ecx,%edx
  jle    L120
  movslq %ecx,%rcx
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  lea    0x6(%rax),%ecx
  cmp    %ecx,%edx
  jle    L120
  movslq %ecx,%rcx
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  lea    0x7(%rax),%ecx
  cmp    %ecx,%edx
  jle    L120
  movslq %ecx,%rcx
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  lea    0x8(%rax),%ecx
  cmp    %ecx,%edx
  jle    L120
  movslq %ecx,%rcx
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  lea    0x9(%rax),%ecx
  cmp    %ecx,%edx
  jle    L120
  movslq %ecx,%rcx
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  lea    0xa(%rax),%ecx
  cmp    %ecx,%edx
  jle    L120
  movslq %ecx,%rcx
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  lea    0xb(%rax),%ecx
  cmp    %ecx,%edx
  jle    L120
  movslq %ecx,%rcx
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  lea    0xc(%rax),%ecx
  cmp    %ecx,%edx
  jle    L120
  movslq %ecx,%rcx
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  lea    0xd(%rax),%ecx
  cmp    %ecx,%edx
  jle    L120
  movslq %ecx,%rcx
  add    $0xe,%eax
  movsbl (%rsp,%rcx,1),%ecx
  lea    -0x30(%rbp,%rcx,1),%ebp
  cmp    %eax,%edx
  jle    L120
  cltq
  movsbl (%rsp,%rax,1),%eax
  lea    -0x30(%rbp,%rax,1),%ebp
  nop
L120:
  mov    $0xa,%edx
  mov    %rbx,%rsi
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <itoa@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  movdqa D30(%rip),%xmm4
  cmp    $0x1,%rax
  mov    %eax,%edx
  ja     L111
  mov    %ebp,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L95
  xchg   %ax,%ax
L65:
  xor    %ebp,%ebp
  jmp    L120
L61:
  xor    %ebp,%ebp
  xor    %eax,%eax
  jmp    L42
L68:
  cmpb   $0x30,(%rsp)
  jne    L111
L210:
  mov    0x2718(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L119
  add    $0x2728,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L119:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D38
type_infered: string
name: disassemble_data
arguments: tag: D35
type_infered: string
name: disassemble_data
arguments: tag: D30
type_infered: byte[16]

tool: D38: %s

tool: D35: %d


tool: {"D30": [0xd0,0xff,0xd0,0xff,0xd0,0xff,0xd0,0xff,0xd0,0xff,0xd0,0xff,0xd0,0xff,0xd0,0xff]}

assistant: ```c
int main(int argc, char *argv[]) {
  char num[10000];
  int n;
  int i;
  int root;
  while (~scanf("%s", num)) {
    n = strlen(num);
    if (1 == n && num[0] == '0')
      break;
    do {
      root = 0;
      for (i = 0; i < n; i++) {
        root += (num[i] - '0');
      }
      itoa(root, num, 10);
      n = strlen(num);
    } while (n > 1);
    printf("%d\n", root);
  }
  return 0;
}
```