user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %r15
  lea    D17(%rip),%rdi
  xor    %r15d,%r15d
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x14(%rsp),%rsi
  call   <scanf@plt>
  mov    0x14(%rsp),%edx
  xor    %r11d,%r11d
  xor    %r8d,%r8d
  xor    %r9d,%r9d
  xor    %r10d,%r10d
  xor    %esi,%esi
  test   %edx,%edx
  jne    L15
  jmp    L66
  nopl   0x0(%rax)
L152:
  add    $0x1,%esi
  nopl   0x0(%rax,%rax,1)
L16:
  imul   $0x66666667,%rcx,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sar    $0x22,%rax
  sub    %ecx,%eax
  mov    %eax,%edx
  je     L95
L15:
  movslq %edx,%rcx
  mov    %edx,%edi
  imul   $0x66666667,%rcx,%rax
  sar    $0x1f,%edi
  sar    $0x22,%rax
  sub    %edi,%eax
  lea    (%rax,%rax,4),%edi
  mov    %edx,%eax
  add    %edi,%edi
  sub    %edi,%eax
  je     L152
  cmp    $0x1,%eax
  jne    L164
  add    $0x1,%r10d
  jmp    L16
  nopl   (%rax)
L164:
  cmp    $0x2,%eax
  jne    L41
  add    $0x1,%r9d
  jmp    L16
L41:
  cmp    $0x3,%eax
  jne    L20
  add    $0x1,%r8d
  jmp    L16
L20:
  cmp    $0x4,%eax
  jne    L130
  add    $0x1,%ebx
  jmp    L16
L130:
  cmp    $0x5,%eax
  jne    L86
  add    $0x1,%r15d
  jmp    L16
L86:
  cmp    $0x6,%eax
  jne    L197
  add    $0x1,%r14d
  jmp    L16
L197:
  cmp    $0x7,%eax
  jne    L54
  add    $0x1,%r13d
  jmp    L16
L54:
  cmp    $0x8,%eax
  jne    L101
  add    $0x1,%r12d
  jmp    L16
L101:
  cmp    $0x9,%eax
  jne    L16
  add    $0x1,%r11d
  jmp    L16
  nopl   0x0(%rax)
L95:
  movl   $0x0,0x14(%rsp)
L66:
  lea    D12(%rip),%rbp
  mov    %r8d,0xc(%rsp)
  mov    %rbp,%rdi
  mov    %r11d,0x8(%rsp)
  mov    %r10d,0x4(%rsp)
  mov    %r9d,(%rsp)
  call   <printf@plt>
  mov    0x4(%rsp),%esi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    (%rsp),%esi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    0xc(%rsp),%esi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %r14d,%esi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    0x8(%rsp),%esi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L28
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L28:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D17
datatype: string
name: retrieve_data
arguments: label: D12
datatype: string

tool: D17: %d

tool: D12: 
%d

assistant: ```c
int main() {
  int x, n, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0;
  scanf("%d", &n);
  while (n != 0) {
    x = n % 10;
    if (x == 0)
      a++;
    if (x == 1)
      b++;
    if (x == 2)
      c++;
    if (x == 3)
      d++;
    if (x == 4)
      e++;
    if (x == 5)
      f++;
    if (x == 6)
      g++;
    if (x == 7)
      h++;
    if (x == 8)
      i++;
    if (x == 9)
      j++;
    n = n / 10;
  }
  printf("\n%d", a);
  printf("\n%d", b);
  printf("\n%d", c);
  printf("\n%d", d);
  printf("\n%d", e);
  printf("\n%d", f);
  printf("\n%d", g);
  printf("\n%d", h);
  printf("\n%d", i);
  printf("\n%d", j);
  return 0;
}
```