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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x14(%rsp)
  lea    D13(%rip),%rdi
  call   <printf@plt>
  lea    0x14(%rsp),%rsi
  lea    D42(%rip),%rdi
  call   <scanf@plt>
  mov    0x14(%rsp),%edx
  test   %edx,%edx
  je     L146
  movl   $0x0,0x4(%rsp)
  movl   $0x0,0xc(%rsp)
  movl   $0x0,0x8(%rsp)
  mov    $0x0,%ebx
  mov    $0x0,%ebp
  mov    $0x0,%r12d
  mov    $0x0,%r13d
  mov    $0x0,%r14d
  mov    $0x0,%r15d
  mov    $0x0,%edi
  jmp    L17
L99:
  cmp    $0x1,%eax
  jne    L28
  add    $0x1,%r15d
L30:
  cmp    $0x4,%eax
  jne    L29
  add    $0x1,%r12d
L60:
  cmp    $0x7,%eax
  jne    L94
  addl   $0x1,0x8(%rsp)
L10:
  test   %esi,%esi
  je     L80
L17:
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%esi
  lea    (%rax,%rax,4),%ecx
  add    %ecx,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %esi,%edx
  jne    L99
  add    $0x1,%edi
L158:
  cmp    $0x3,%eax
  jne    L30
  add    $0x1,%r13d
L20:
  cmp    $0x6,%eax
  jne    L60
  add    $0x1,%ebx
L64:
  cmp    $0x9,%eax
  jne    L10
  addl   $0x1,0x4(%rsp)
  jmp    L10
L28:
  cmp    $0x2,%eax
  jne    L158
  add    $0x1,%r14d
L29:
  cmp    $0x5,%eax
  jne    L20
  add    $0x1,%ebp
L94:
  cmp    $0x8,%eax
  jne    L64
  addl   $0x1,0xc(%rsp)
  jmp    L10
L80:
  movl   $0x0,0x14(%rsp)
L141:
  mov    %edi,%esi
  lea    D71(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r15d,%esi
  lea    D29(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r14d,%esi
  lea    D17(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r13d,%esi
  lea    D116(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r12d,%esi
  lea    D8(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %ebp,%esi
  lea    D112(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %ebx,%esi
  lea    D88(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%esi
  lea    D7(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0xc(%rsp),%esi
  lea    D77(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x4(%rsp),%esi
  lea    D33(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L32
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L146:
  mov    %edx,0x4(%rsp)
  mov    %edx,0xc(%rsp)
  mov    %edx,0x8(%rsp)
  mov    %edx,%ebx
  mov    %edx,%ebp
  mov    %edx,%r12d
  mov    %edx,%r13d
  mov    %edx,%r14d
  mov    %edx,%r15d
  mov    %edx,%edi
  jmp    L141
L32:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D13
type: string
name: retrieve_data
arguments: data_tag: D42
type: string
name: retrieve_data
arguments: data_tag: D71
type: string
name: retrieve_data
arguments: data_tag: D29
type: string
name: retrieve_data
arguments: data_tag: D17
type: string
name: retrieve_data
arguments: data_tag: D116
type: string
name: retrieve_data
arguments: data_tag: D8
type: string
name: retrieve_data
arguments: data_tag: D112
type: string
name: retrieve_data
arguments: data_tag: D88
type: string
name: retrieve_data
arguments: data_tag: D7
type: string
name: retrieve_data
arguments: data_tag: D77
type: string
name: retrieve_data
arguments: data_tag: D33
type: string

tool: D13: Input number:

tool: D42: %d

tool: D71: 
 Number of digit zero: %d

tool: D29: 
 Number of digit one: %d

tool: D17: 
 Number of digit two: %d

tool: D116: 
 Number of digit three: %d

tool: D8: 
 Number of digit four: %d

tool: D112: 
 Number of digit five: %d

tool: D88: 
 Number of digit six: %d

tool: D7: 
 Number of digit seven: %d

tool: D77: 
 Number of digit eight: %d

tool: D33: 
 Number of digit nine: %d

assistant: ```c
void main(void) {
  int x = 0, y = 0, zero = 0, one = 0, two = 0, three = 0, four = 0, five = 0, six = 0, seven = 0, eight = 0, nine = 0;
  printf("Input number:");
  scanf("%d", &x);
  while (x != 0) {
    y = x % 10;
    x = x / 10;
    if (y == 0)
      zero++;
    if (y == 1)
      one++;
    if (y == 2)
      two++;
    if (y == 3)
      three++;
    if (y == 4)
      four++;
    if (y == 5)
      five++;
    if (y == 6)
      six++;
    if (y == 7)
      seven++;
    if (y == 8)
      eight++;
    if (y == 9)
      nine++;
  }
  printf("\n Number of digit zero: %d", zero);
  printf("\n Number of digit one: %d", one);
  printf("\n Number of digit two: %d", two);
  printf("\n Number of digit three: %d", three);
  printf("\n Number of digit four: %d", four);
  printf("\n Number of digit five: %d", five);
  printf("\n Number of digit six: %d", six);
  printf("\n Number of digit seven: %d", seven);
  printf("\n Number of digit eight: %d", eight);
  printf("\n Number of digit nine: %d", nine);
}
```