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

```asm
<main>:
  endbr64
  push   %r14
  lea    D15(%rip),%rdi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D25(%rip),%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%ebx
  test   %ebx,%ebx
  jle    L33
  mov    %ebx,%edx
  xor    %ebp,%ebp
  mov    $0xcccccccd,%ecx
  nopw   0x0(%rax,%rax,1)
L76:
  mov    %edx,%edx
  add    $0x1,%ebp
  mov    %rdx,%rax
  imul   %rcx,%rdx
  shr    $0x23,%rdx
  cmp    $0x9,%eax
  jg     L76
  movslq %ebx,%r12
  mov    %ebx,%eax
  lea    D2(%rip),%r13
  movl   $0x0,0x4(%rsp)
  imul   $0x66666667,%r12,%r12
  sar    $0x1f,%eax
  mov    %r13,%rdi
  sar    $0x22,%r12
  sub    %eax,%r12d
  lea    (%r12,%r12,4),%eax
  mov    %ebx,%r12d
  add    %eax,%eax
  sub    %eax,%r12d
  xor    %eax,%eax
  mov    %r12d,%esi
  call   <printf@plt>
  cmp    $0x1,%ebp
  jne    L36
L14:
  lea    D27(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L97
  add    $0x10,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L36:
  sub    %r12d,%ebx
  mov    $0xa,%r12d
  mov    %r13,%rdi
  mov    %ebx,%eax
  cltd
  idiv   %r12d
  cltd
  mov    %eax,%ebx
  idiv   %r12d
  xor    %eax,%eax
  mov    %edx,%esi
  mov    %edx,%r14d
  call   <printf@plt>
  cmp    $0x2,%ebp
  je     L14
  sub    %r14d,%ebx
  mov    %r13,%rdi
  mov    %ebx,%eax
  cltd
  idiv   %r12d
  cltd
  mov    %eax,%ebx
  idiv   %r12d
  xor    %eax,%eax
  mov    %edx,%esi
  mov    %edx,%r14d
  call   <printf@plt>
  cmp    $0x3,%ebp
  je     L14
  sub    %r14d,%ebx
  mov    %r13,%rdi
  mov    %ebx,%eax
  cltd
  idiv   %r12d
  cltd
  mov    %eax,%ebx
  idiv   %r12d
  xor    %eax,%eax
  mov    %edx,%esi
  mov    %edx,%r14d
  call   <printf@plt>
  cmp    $0x4,%ebp
  je     L14
  sub    %r14d,%ebx
  mov    %r13,%rdi
  mov    %ebx,%eax
  cltd
  idiv   %r12d
  cltd
  mov    %eax,%ebx
  idiv   %r12d
  xor    %eax,%eax
  mov    %edx,%esi
  mov    %edx,%r14d
  call   <printf@plt>
  cmp    $0x5,%ebp
  je     L14
  sub    %r14d,%ebx
  mov    %r13,%rdi
  mov    %ebx,%eax
  cltd
  idiv   %r12d
  cltd
  mov    %eax,%ebx
  idiv   %r12d
  xor    %eax,%eax
  mov    %edx,%esi
  mov    %edx,%r14d
  call   <printf@plt>
  cmp    $0x6,%ebp
  je     L14
  sub    %r14d,%ebx
  mov    %r13,%rdi
  mov    %ebx,%eax
  cltd
  idiv   %r12d
  cltd
  mov    %eax,%ebx
  idiv   %r12d
  xor    %eax,%eax
  mov    %edx,%esi
  mov    %edx,%r14d
  call   <printf@plt>
  cmp    $0x7,%ebp
  je     L14
  sub    %r14d,%ebx
  mov    %r13,%rdi
  mov    %ebx,%eax
  cltd
  idiv   %r12d
  cltd
  mov    %eax,%ebx
  idiv   %r12d
  xor    %eax,%eax
  mov    %edx,%esi
  mov    %edx,%r14d
  call   <printf@plt>
  cmp    $0x8,%ebp
  je     L14
  sub    %r14d,%ebx
  mov    %r13,%rdi
  mov    %ebx,%eax
  cltd
  idiv   %r12d
  cltd
  mov    %eax,%ebx
  idiv   %r12d
  xor    %eax,%eax
  mov    %edx,%esi
  mov    %edx,%r14d
  call   <printf@plt>
  cmp    $0x9,%ebp
  je     L14
  mov    %ebx,%eax
  mov    $0xa,%ecx
  mov    %r13,%rdi
  sub    %r14d,%eax
  cltd
  idiv   %ecx
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L14
L33:
  mov    %ebx,%eax
  mov    $0xa,%ecx
  lea    D2(%rip),%rdi
  movl   $0x0,0x4(%rsp)
  cltd
  idiv   %ecx
  xor    %eax,%eax
  mov    %edx,%esi
  call   <printf@plt>
  jmp    L14
L97:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D15
type_infered: string
name: parse_data
arguments: tag: D25
type_infered: string
name: parse_data
arguments: tag: D2
type_infered: string
name: parse_data
arguments: tag: D27
type_infered: string

tool: D15: 
Enter an integer > 

tool: D25: %d

tool: D2: %d


tool: D27: That's all, have a nice day!

assistant: ```c
int main(void) {
  int num, numl, n, d0, d1, d2, d3, d4, d5, d6, d7, d8, d9;
  printf("\nEnter an integer > ");
  scanf("%d", &num);
  numl = num;
  n = 0;
  while (numl > 0) {
    n += 1;
    numl = numl / 10;
  }
  d0 = num % 10;
  num = (num - d0) / 10;
  d1 = num % 10;
  num = (num - d1) / 10;
  d2 = num % 10;
  num = (num - d2) / 10;
  d3 = num % 10;
  num = (num - d3) / 10;
  d4 = num % 10;
  num = (num - d4) / 10;
  d5 = num % 10;
  num = (num - d5) / 10;
  d6 = num % 10;
  num = (num - d6) / 10;
  d7 = num % 10;
  num = (num - d7) / 10;
  d8 = num % 10;
  num = (num - d8) / 10;
  d9 = num % 10;
  num = (num - d9) / 10;
  printf("%d\n", d0);
  if (n > 1)
    printf("%d\n", d1);
  if (n > 2)
    printf("%d\n", d2);
  if (n > 3)
    printf("%d\n", d3);
  if (n > 4)
    printf("%d\n", d4);
  if (n > 5)
    printf("%d\n", d5);
  if (n > 6)
    printf("%d\n", d6);
  if (n > 7)
    printf("%d\n", d7);
  if (n > 8)
    printf("%d\n", d8);
  if (n > 9)
    printf("%d\n", d9);
  printf("That's all, have a nice day!\n");
  return 0;
}
```