user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x370,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x368(%rbp)
  movl   $0x0,-0x358(%rbp)
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x350(%rbp),%rax
  mov    %rax,%rsi
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x350(%rbp),%rax
  mov    %rax,-0x348(%rbp)
  movl   $0x0,-0x364(%rbp)
  jmp    L20
L99:
  mov    -0x348(%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    -0x364(%rbp),%eax
  cltq
  mov    %edx,-0x340(%rbp,%rax,4)
  mov    -0x348(%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,-0x348(%rbp)
  addl   $0x1,-0x364(%rbp)
L20:
  cmpq   $0x0,-0x348(%rbp)
  jg     L99
  movl   $0x0,-0x360(%rbp)
  jmp    L165
L13:
  movl   $0x0,-0x35c(%rbp)
  jmp    L11
L63:
  mov    -0x360(%rbp),%eax
  cltq
  mov    -0x340(%rbp,%rax,4),%edx
  mov    -0x35c(%rbp),%eax
  cltq
  mov    -0x340(%rbp,%rax,4),%eax
  cmp    %eax,%edx
  jne    L58
  addl   $0x1,-0x368(%rbp)
L58:
  addl   $0x1,-0x35c(%rbp)
L11:
  mov    -0x35c(%rbp),%eax
  cmp    -0x364(%rbp),%eax
  jle    L63
  mov    -0x360(%rbp),%eax
  cltq
  mov    -0x368(%rbp),%edx
  mov    %edx,-0x270(%rbp,%rax,4)
  movl   $0x0,-0x368(%rbp)
  mov    -0x360(%rbp),%eax
  cltq
  mov    -0x270(%rbp,%rax,4),%eax
  cmp    $0x1,%eax
  jle    L8
  mov    -0x360(%rbp),%eax
  mov    %eax,-0x354(%rbp)
  jmp    L53
L118:
  mov    -0x360(%rbp),%eax
  cltq
  mov    -0x340(%rbp,%rax,4),%edx
  mov    -0x358(%rbp),%eax
  cltq
  mov    -0x1a0(%rbp,%rax,4),%eax
  cmp    %eax,%edx
  je     L62
  addl   $0x1,-0x358(%rbp)
  mov    -0x360(%rbp),%eax
  cltq
  mov    -0x340(%rbp,%rax,4),%edx
  mov    -0x358(%rbp),%eax
  cltq
  mov    %edx,-0x1a0(%rbp,%rax,4)
  mov    -0x360(%rbp),%eax
  cltq
  mov    -0x270(%rbp,%rax,4),%edx
  mov    -0x358(%rbp),%eax
  cltq
  mov    %edx,-0xd0(%rbp,%rax,4)
  subl   $0x1,-0x354(%rbp)
L53:
  cmpl   $0x0,-0x354(%rbp)
  jns    L118
  jmp    L8
L62:
  nop
L8:
  addl   $0x1,-0x360(%rbp)
L165:
  mov    -0x360(%rbp),%eax
  cmp    -0x364(%rbp),%eax
  jl     L13
  cmpl   $0x0,-0x358(%rbp)
  jle    L2
  jmp    L52
L141:
  mov    -0x350(%rbp),%rcx
  mov    -0x358(%rbp),%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%edx
  mov    -0x358(%rbp),%eax
  cltq
  mov    -0x1a0(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  subl   $0x1,-0x358(%rbp)
L52:
  cmpl   $0x0,-0x358(%rbp)
  jg     L141
  jmp    L145
L2:
  mov    -0x350(%rbp),%rax
  mov    %rax,%rsi
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L145:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L106
  call   <__stack_chk_fail@plt>
L106:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D28
type_infered: string
name: disassemble_data
arguments: tag: D23
type_infered: string
name: disassemble_data
arguments: tag: D27
type_infered: string
name: disassemble_data
arguments: tag: D36
type_infered: string

tool: D28:   Enter Number: 

tool: D23: %lli

tool: D27:   %d is Met %d Times in the Number %lli 


tool: D36:   Everything in the Number %lli is Met Only Once 


assistant: ```c
int main() {
  int a[50], b[50], c[50], d[50], m = 0, i, t, u, v = 0, o;
  long long int n, p;
  printf("\n");
  printf("  Enter Number: ");
  scanf("%lli", &n);
  p = n;
  for (i = 0; p > 0; i++) {
    a[i] = p % 10;
    p = p / 10;
  }
  for (t = 0; t < i; t++) {
    for (u = 0; u <= i; u++) {
      if (a[t] == a[u])
        m++;
    }
    b[t] = m;
    m = 0;
    if (b[t] > 1) {
      o = t;
      while (o >= 0) {
        if (a[t] == c[v])
          break;
        else {
          v++;
          c[v] = a[t];
          d[v] = b[t];
        }
        o--;
      }
    }
  }
  if (v > 0) {
    for (; v > 0; v--) {
      printf("  %d is Met %d Times in the Number %lli \n", c[v], d[v], n);
    }
  } else
    printf("  Everything in the Number %lli is Met Only Once \n", n);
  printf("\n");
  return 0;
}
```