user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %r15
  lea    D54(%rip),%rdi
  xor    %r15d,%r15d
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x14(%rsp),%rsi
  movl   $0x0,0x14(%rsp)
  call   <scanf@plt>
  mov    0x14(%rsp),%edx
  xor    %r8d,%r8d
  xor    %r9d,%r9d
  xor    %r10d,%r10d
  xor    %esi,%esi
  test   %edx,%edx
  jne    L18
  jmp    L16
L132:
  add    $0x1,%esi
  nopl   0x0(%rax,%rax,1)
L88:
  test   %eax,%eax
  je     L183
L18:
  movslq %edx,%rax
  mov    %edx,%ecx
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%ecx
  sar    $0x22,%rax
  sub    %ecx,%eax
  lea    (%rax,%rax,4),%edi
  add    %edi,%edi
  sub    %edi,%edx
  mov    %edx,%ecx
  mov    %eax,%edx
  je     L132
  cmp    $0x1,%ecx
  jne    L218
  add    $0x1,%r10d
  test   %eax,%eax
  jne    L18
L183:
  movl   $0x0,0x14(%rsp)
L16:
  lea    D15(%rip),%rdi
  mov    %r8d,0xc(%rsp)
  mov    %r10d,0x8(%rsp)
  mov    %r9d,0x4(%rsp)
  call   <printf@plt>
  mov    0x8(%rsp),%esi
  lea    D1(%rip),%rdi
  call   <printf@plt>
  mov    0x4(%rsp),%esi
  lea    D64(%rip),%rdi
  call   <printf@plt>
  mov    0xc(%rsp),%esi
  lea    D92(%rip),%rdi
  call   <printf@plt>
  mov    %ebx,%esi
  lea    D71(%rip),%rdi
  call   <printf@plt>
  mov    %r15d,%esi
  lea    D65(%rip),%rdi
  call   <printf@plt>
  mov    %r14d,%esi
  lea    D52(%rip),%rdi
  call   <printf@plt>
  mov    %r13d,%esi
  lea    D95(%rip),%rdi
  call   <printf@plt>
  mov    %r12d,%esi
  lea    D108(%rip),%rdi
  call   <printf@plt>
  mov    %ebp,%esi
  lea    D40(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L86
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L218:
  cmp    $0x2,%ecx
  jne    L2
  add    $0x1,%r9d
  jmp    L88
L2:
  cmp    $0x3,%ecx
  jne    L93
  add    $0x1,%r8d
  jmp    L88
L93:
  cmp    $0x4,%ecx
  jne    L41
  add    $0x1,%ebx
  jmp    L88
L41:
  cmp    $0x5,%ecx
  jne    L197
  add    $0x1,%r15d
  jmp    L88
L197:
  cmp    $0x6,%ecx
  jne    L76
  add    $0x1,%r14d
  jmp    L88
L76:
  cmp    $0x7,%ecx
  jne    L17
  add    $0x1,%r13d
  jmp    L88
L17:
  cmp    $0x8,%ecx
  jne    L126
  add    $0x1,%r12d
  jmp    L88
L126:
  cmp    $0x9,%ecx
  jne    L88
  add    $0x1,%ebp
  jmp    L88
L86:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D54
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D15
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D1
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D64
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D92
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D71
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D65
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D52
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D95
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D108
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D40
type_guessed: string

tool: D54: %d

tool: D15: cifrata 0 se sreshta %d puti


tool: D1: cifrata 1 se sreshta %d puti


tool: D64: cifrata 2 se sreshta %d puti


tool: D92: cifrata 3 se sreshta %d puti


tool: D71: cifrata 4 se sreshta %d puti


tool: D65: cifrata 5 se sreshta %d puti


tool: D52: cifrata 6 se sreshta %d puti


tool: D95: cifrata 7 se sreshta %d puti


tool: D108: cifrata 8 se sreshta %d puti


tool: D40: cifrata 9 se sreshta %d puti


assistant: ```c
int main() {
  int n = 0, i = 0;
  int number0 = 0, number1 = 0, number2 = 0, number3 = 0, number4 = 0, number5 = 0, number6 = 0, number7 = 0, number8 = 0, number9 = 0;
  scanf("%d", &n);
  while (n != 0) {
    i = n % 10;
    n = n / 10;
    if (i == 0) {
      number0++;
    }
    if (i == 1) {
      number1++;
    }
    if (i == 2) {
      number2++;
    }
    if (i == 3) {
      number3++;
    }
    if (i == 4) {
      number4++;
    }
    if (i == 5) {
      number5++;
    }
    if (i == 6) {
      number6++;
    }
    if (i == 7) {
      number7++;
    }
    if (i == 8) {
      number8++;
    }
    if (i == 9) {
      number9++;
    }
  }
  printf("cifrata 0 se sreshta %d puti\n", number0);
  printf("cifrata 1 se sreshta %d puti\n", number1);
  printf("cifrata 2 se sreshta %d puti\n", number2);
  printf("cifrata 3 se sreshta %d puti\n", number3);
  printf("cifrata 4 se sreshta %d puti\n", number4);
  printf("cifrata 5 se sreshta %d puti\n", number5);
  printf("cifrata 6 se sreshta %d puti\n", number6);
  printf("cifrata 7 se sreshta %d puti\n", number7);
  printf("cifrata 8 se sreshta %d puti\n", number8);
  printf("cifrata 9 se sreshta %d puti\n", number9);
  return 0;
}
```