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

```asm
<main>:
  endbr64
  push   %r15
  lea    D15(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x14(%rsp),%rsi
  lea    D24(%rip),%rdi
  call   <scanf@plt>
  mov    0x14(%rsp),%r13d
  mov    $0xcccccccd,%edx
  mov    %r13d,%ebx
  neg    %ebx
  cmovs  %r13d,%ebx
  xor    %ebp,%ebp
  mov    %ebx,0x14(%rsp)
  mov    %ebx,%eax
  test   %r13d,%r13d
  je     L136
  nopl   0x0(%rax,%rax,1)
L8:
  mov    %eax,%eax
  mov    %ebp,%r12d
  add    $0x1,%ebp
  imul   %rdx,%rax
  shr    $0x23,%rax
  test   %eax,%eax
  jne    L8
  shr    $0x1f,%r13d
  mov    $0x1,%r15d
  lea    D29(%rip),%r14
  mov    %r13d,0xc(%rsp)
  jmp    L1
  nopl   0x0(%rax)
L87:
  cmp    $0x1,%r15d
  jne    L105
  mov    %edx,%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <printf@plt>
L44:
  mov    0x14(%rsp),%ebx
  lea    0x1(%r15),%eax
  sub    %r13d,%ebx
  mov    %ebx,0x14(%rsp)
  cmp    %r15d,%r12d
  jl     L136
  mov    %eax,%r15d
L1:
  mov    %r15d,%esi
  mov    $0xa,%edi
  call   <pow@plt>
  mov    %eax,%r8d
  mov    %ebx,%eax
  cltd
  idiv   %r8d
  mov    %edx,%ebx
  mov    %edx,%r13d
  cmp    $0x9,%edx
  jle    L87
L88:
  lea    -0x1(%r15),%esi
  mov    $0xa,%edi
  call   <pow@plt>
  mov    %eax,%r8d
  mov    %ebx,%eax
  cltd
  idiv   %r8d
  mov    %eax,%r13d
  cmp    %r15d,%ebp
  jne    L73
  cmpb   $0x0,0xc(%rsp)
  je     L73
  neg    %r13d
  lea    D10(%rip),%rdi
  xor    %eax,%eax
  mov    %r13d,%esi
  call   <printf@plt>
  jmp    L44
  nopl   0x0(%rax)
L105:
  cmp    $0x9,%edx
  jg     L88
  test   %edx,%edx
  jne    L44
  jmp    L88
  nopw   0x0(%rax,%rax,1)
L136:
  lea    D4(%rip),%rdi
  call   <puts@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L109
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L73:
  mov    %eax,%esi
  lea    D10(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L44
L109:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D15
type: string
name: unpack_data
arguments: label: D24
type: string
name: unpack_data
arguments: label: D29
type: string
name: unpack_data
arguments: label: D10
type: string
name: unpack_data
arguments: label: D4
type: string

tool: D15: 
Enter an integer > 

tool: D24: %d

tool: D29: 
%d


tool: D10: %d


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

assistant: ```c
int main(void) {
  int n, a, nn, nnn, count, digit;
  printf("\nEnter an integer > ");
  scanf("%d", &n);
  nnn = n;
  n = abs(n);
  nn = n;
  a = 1;
  count = 0;
  while (nn != 0) {
    nn = nn / 10;
    count = count + 1;
  }
  while (a <= count) {
    digit = n % (int)pow(10, a);
    if ((digit < 10) && (a == 1))
      printf("\n%d\n", digit);
    else if ((digit >= 10) || (digit == 0)) {
      digit = digit / pow(10, a - 1);
      if ((((a) == count)) && (nnn < 0)) {
        digit = digit * -1;
        printf("%d\n", digit);
      } else
        printf("%d\n", digit);
    }
    n = n - digit;
    a = a + 1;
  }
  printf("That's all, have a nice day!\n");
  return (0);
}
```