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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  movl   $0x5,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x28(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  movslq %eax,%rdx
  mov    %rdx,%rsi
  mov    $0x0,%edi
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L1:
  cmp    %rdx,%rsp
  je     L30
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1
L30:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L95
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L95:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x20(%rbp)
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x38(%rbp),%rax
  mov    %rax,%rsi
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  jmp    L112
L29:
  mov    -0x38(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  mov    -0x20(%rbp),%rax
  mov    -0x34(%rbp),%ecx
  movslq %ecx,%rcx
  mov    %edx,(%rax,%rcx,4)
  addl   $0x1,-0x34(%rbp)
  mov    -0x38(%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,-0x38(%rbp)
L112:
  mov    -0x38(%rbp),%eax
  test   %eax,%eax
  jg     L29
  movl   $0x0,-0x34(%rbp)
  jmp    L109
L60:
  mov    -0x30(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x34(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x20(%rbp),%rax
  mov    -0x34(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%ecx
  mov    -0x20(%rbp),%rax
  mov    -0x2c(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  cmp    %eax,%ecx
  jne    L32
  addl   $0x1,-0x34(%rbp)
L109:
  mov    -0x34(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L60
  jmp    L37
L32:
  nop
L37:
  mov    -0x34(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jne    L92
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L117
L92:
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L117:
  mov    $0x0,%eax
  mov    %rbx,%rsp
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L18
  call   <__stack_chk_fail@plt>
L18:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D7
datatype: string
name: read_data
arguments: label: D33
datatype: string
name: read_data
arguments: label: D4
datatype: string
name: read_data
arguments: label: D11
datatype: string

tool: D7: Please enter a number (maximum 5 digits):


tool: D33: %d

tool: D4: The reverse of the digits is the same


tool: D11: The reverse of the digits is NOT the same


assistant: ```c
int main() {
  int LEN = 5;
  int input_num, digits_array[LEN];
  int i;
  int reverse_index;
  printf("Please enter a number (maximum 5 digits):\n");
  scanf("%d", &input_num);
  while (input_num > 0) {
    digits_array[i] = input_num % 10;
    i++;
    input_num = input_num / 10;
  }
  for (i = 0; i < LEN; i++) {
    reverse_index = (LEN - 1) - i;
    if (digits_array[i] != digits_array[reverse_index])
      break;
  }
  if (i == LEN)
    printf("The reverse of the digits is the same\n");
  else
    printf("The reverse of the digits is NOT the same\n");
  return 0;
}
```