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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x10(%rbp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  add    %eax,%eax
  sub    %eax,%edx
  mov    %edx,-0xc(%rbp)
  mov    -0x10(%rbp),%eax
  test   %eax,%eax
  jns    L91
  mov    -0x10(%rbp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L113
L47:
  mov    -0x10(%rbp),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  add    %eax,%eax
  sub    %eax,%edx
  mov    %edx,-0xc(%rbp)
  mov    -0x10(%rbp),%eax
  cmp    %eax,-0xc(%rbp)
  jl     L169
  mov    -0xc(%rbp),%eax
  mov    %eax,%esi
  lea    D77(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L53
L169:
  mov    -0xc(%rbp),%eax
  mov    %eax,%esi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L53:
  mov    -0x10(%rbp),%eax
  sub    -0xc(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  test   %eax,%eax
  je     L154
  mov    -0x10(%rbp),%eax
  cmp    %eax,-0xc(%rbp)
  jne    L113
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D77(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L113:
  mov    -0x10(%rbp),%eax
  cmp    %eax,-0xc(%rbp)
  jne    L47
  jmp    L44
L91:
  mov    -0x10(%rbp),%eax
  test   %eax,%eax
  jne    L103
  lea    D63(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L44
L103:
  mov    -0x10(%rbp),%eax
  test   %eax,%eax
  js     L44
  jmp    L121
L76:
  mov    -0x10(%rbp),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  add    %eax,%eax
  sub    %eax,%edx
  mov    %edx,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,%esi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x10(%rbp),%eax
  sub    -0xc(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  test   %eax,%eax
  je     L112
  mov    -0x10(%rbp),%eax
  cmp    %eax,-0xc(%rbp)
  jne    L121
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L121:
  mov    -0x10(%rbp),%eax
  cmp    %eax,-0xc(%rbp)
  jne    L76
  jmp    L44
L154:
  nop
  jmp    L44
L112:
  nop
L44:
  lea    D81(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L72
  call   <__stack_chk_fail@plt>
L72:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D37
type_guessed: string
name: disassemble_data
arguments: data_label: D38
type_guessed: string
name: disassemble_data
arguments: data_label: D77
type_guessed: string
name: disassemble_data
arguments: data_label: D25
type_guessed: string
name: disassemble_data
arguments: data_label: D63
type_guessed: string
name: disassemble_data
arguments: data_label: D81
type_guessed: string

tool: D37: 
Enter an integer > 

tool: D38: %d

tool: D77: 
-%d

tool: D25: 
%d

tool: D63: 
0

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

assistant: ```c
int main(void) {
  int num, digit;
  printf("\nEnter an integer > ");
  scanf("%d", &num);
  digit = abs(num) % 10;
  if (num < 0) {
    num = abs(num);
    while (num != digit) {
      digit = num % 10;
      if (num <= digit)
        printf("\n-%d", digit);
      else
        printf("\n%d", digit);
      num = (num - digit) / 10;
      if (num == 0)
        break;
      if (num == digit)
        printf("\n-%d", num);
    }
  } else if (num == 0) {
    printf("\n0");
  } else if (num >= 0) {
    while (num != digit) {
      digit = num % 10;
      printf("\n%d", digit);
      num = (num - digit) / 10;
      if (num == 0)
        break;
      if (num == digit)
        printf("\n%d", num);
    }
  }
  printf("\nThat's all, have a nice day!\n");
  return (0);
}
```