user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
L17:
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  movl   $0x0,-0x3c(%rbp)
  movl   $0x0,-0x4c(%rbp)
  movq   $0x0,-0x38(%rbp)
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x38(%rbp),%rax
  mov    %rax,%rsi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x38(%rbp),%rax
  test   %rax,%rax
  jne    L117
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L62
  jmp    L118
L38:
  mov    -0x38(%rbp),%rcx
  movabs $0x6666666666666667,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x2,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  mov    %edx,-0x3c(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  lea    0x1(%rax),%edx
  mov    -0x3c(%rbp),%eax
  cltq
  mov    %edx,-0x30(%rbp,%rax,4)
  mov    -0x38(%rbp),%rcx
  movabs $0x6666666666666667,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x2,%rax
  sar    $0x3f,%rcx
  mov    %rcx,%rdx
  sub    %rdx,%rax
  mov    %rax,-0x38(%rbp)
L117:
  mov    -0x38(%rbp),%rax
  test   %rax,%rax
  jg     L38
  movl   $0x0,-0x48(%rbp)
  jmp    L70
L83:
  mov    -0x48(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  add    %eax,-0x4c(%rbp)
  addl   $0x1,-0x48(%rbp)
L70:
  cmpl   $0x9,-0x48(%rbp)
  jle    L83
  cmpl   $0x0,-0x4c(%rbp)
  jne    L64
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L17
L64:
  lea    D63(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x44(%rbp)
  jmp    L26
L54:
  mov    -0x44(%rbp),%eax
  mov    %eax,%esi
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x44(%rbp)
L26:
  cmpl   $0x9,-0x44(%rbp)
  jle    L54
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x40(%rbp)
  jmp    L97
L8:
  mov    -0x40(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x40(%rbp)
L97:
  cmpl   $0x9,-0x40(%rbp)
  jle    L8
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L17
L118:
  call   <__stack_chk_fail@plt>
L62:
  leave
  ret
```

tool_calls: name: read_data
arguments: tag: D66
type_guessed: string
name: read_data
arguments: tag: D2
type_guessed: string
name: read_data
arguments: tag: D38
type_guessed: string
name: read_data
arguments: tag: D63
type_guessed: string
name: read_data
arguments: tag: D54
type_guessed: string
name: read_data
arguments: tag: D45
type_guessed: string

tool: D66: Enter a number: 

tool: D2: %ld

tool: D38: No repeated digits

tool: D63: Digit:		

tool: D54: %d 

tool: D45: 
Occurances:	

assistant: ```c
int main(void) {
  while (1) {
    int duplicates[10] = {0};
    int digit = 0;
    int empty = 0;
    long n = 0;
    printf("Enter a number: ");
    scanf("%ld", &n);
    if (n == 0) {
      break;
    }
    while (n > 0) {
      digit = n % 10;
      duplicates[digit] += 1;
      n /= 10;
    }
    for (int i = 0; i < 10; i += 1) {
      empty += duplicates[i];
    }
    if (empty == 0) {
      printf("No repeated digits\n");
    } else {
      printf("Digit:\t\t");
      for (int i = 0; i < 10; i += 1) {
        printf("%d ", i);
      }
      printf("\nOccurances:\t");
      for (int i = 0; i < 10; i += 1) {
        printf("%d ", duplicates[i]);
      }
      printf("\n");
    }
  }
  return 0;
}
```