user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x3c(%rbp)
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x38(%rbp),%rax
  mov    %rax,%rsi
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x38(%rbp),%rax
  test   %rax,%rax
  jle    L122
  movq   $0xa,-0x30(%rbp)
  jmp    L62
L29:
  mov    -0x38(%rbp),%rax
  cqto
  idivq  -0x30(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    -0x20(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jne    L105
  movq   $0x0,-0x28(%rbp)
  jmp    L8
L105:
  mov    -0x30(%rbp),%rcx
  movabs $0x6666666666666667,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x2,%rax
  sar    $0x3f,%rcx
  sub    %rcx,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <check@plt>
  mov    %rax,-0x28(%rbp)
L8:
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x38(%rbp),%rax
  cqto
  idivq  -0x30(%rbp)
  mov    %rdx,-0x10(%rbp)
  mov    -0x30(%rbp),%rcx
  movabs $0x6666666666666667,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x2,%rax
  sar    $0x3f,%rcx
  sub    %rcx,%rax
  mov    %rax,%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <check@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  cmp    %rax,-0x10(%rbp)
  jne    L92
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L147
L92:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x3c(%rbp)
L62:
  cmpl   $0xc,-0x3c(%rbp)
  jle    L29
  jmp    L147
L122:
  mov    -0x38(%rbp),%rax
  test   %rax,%rax
  jne    L48
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L147
L48:
  movq   $0xfffffffffffffff6,-0x30(%rbp)
  jmp    L57
L106:
  mov    -0x38(%rbp),%rax
  cqto
  idivq  -0x30(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    -0x20(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jne    L139
  movq   $0x0,-0x28(%rbp)
  jmp    L26
L139:
  mov    -0x30(%rbp),%rcx
  movabs $0x6666666666666667,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rsi
  sar    $0x2,%rsi
  mov    %rcx,%rax
  sar    $0x3f,%rax
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  neg    %rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <check@plt>
  mov    %rax,-0x28(%rbp)
L26:
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x38(%rbp),%rax
  cqto
  idivq  -0x30(%rbp)
  mov    %rdx,-0x10(%rbp)
  mov    -0x30(%rbp),%rcx
  movabs $0x6666666666666667,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rsi
  sar    $0x2,%rsi
  mov    %rcx,%rax
  sar    $0x3f,%rax
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    -0x10(%rbp),%rax
  neg    %rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <check@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  neg    %rax
  cmp    %rax,-0x10(%rbp)
  jne    L30
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  lea    D68(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L147
L30:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x3c(%rbp)
L57:
  cmpl   $0xc,-0x3c(%rbp)
  jle    L106
L147:
  lea    D75(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L153
  call   <__stack_chk_fail@plt>
L153:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D54
type: string
name: unpack_data
arguments: data_label: D49
type: string
name: unpack_data
arguments: data_label: D55
type: string
name: unpack_data
arguments: data_label: D5
type: string
name: unpack_data
arguments: data_label: D68
type: string
name: unpack_data
arguments: data_label: D75
type: string

tool: D54: 
Enter an ingteger > 

tool: D49: %lld

tool: D55: %lld


tool: D5: 0

tool: D68: -%lld


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

assistant: ```c
int main() {
  long long int in, num, digit, temp, lost, value;
  int a = 0;
  printf("\nEnter an ingteger > ");
  scanf("%lld", &in);
  printf("\n");
  if (in > 0) {
    num = 10;
    while (a <= 12) {
      value = in % num;
      if (lost == value) {
        digit = 0;
      } else {
        digit = check(value, (num / 10));
      }
      lost = value;
      num = num * 10;
      temp = in % num;
      temp = check(temp, (num / 10));
      if (temp == in) {
        printf("%lld\n", digit);
        break;
      } else {
        printf("%lld\n", digit);
      }
      a++;
    }
  } else if (in == 0) {
    printf("0\n");
  } else {
    num = (-10);
    while (a <= 12) {
      value = in % (num);
      if (lost == value) {
        digit = 0;
      } else {
        digit = check((-value), (-(num / 10)));
      }
      lost = value;
      num = num * 10;
      temp = in % num;
      temp = check((-temp), (-(num / 10)));
      if (temp == (-in)) {
        printf("-%lld\n", digit);
        break;
      } else {
        printf("%lld\n", digit);
      }
      a++;
    }
  }
  printf("That's all, have a nice day!\n");
  return 0;
}
```