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
  mov    -0x34(%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,%ecx
  mov    $0x0,%edx
  div    %rcx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L87:
  cmp    %rdx,%rsp
  je     L49
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L87
L49:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L76
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L76:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x20(%rbp)
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x38(%rbp),%rax
  mov    %rax,%rsi
  lea    D67(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    D61(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x34(%rbp),%rax
  mov    %rax,%rsi
  lea    D67(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rsi
  lea    D67(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0x30(%rbp)
  jmp    L20
L85:
  mov    -0x30(%rbp),%eax
  mov    %eax,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x2c(%rbp)
  jmp    L52
L57:
  mov    -0x20(%rbp),%rax
  mov    -0x2c(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  cmp    %eax,-0x30(%rbp)
  jne    L51
  mov    $0x2a,%edi
  call   <putchar@plt>
L51:
  addl   $0x1,-0x2c(%rbp)
L52:
  mov    -0x34(%rbp),%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L57
  addl   $0x1,-0x30(%rbp)
L20:
  mov    -0x38(%rbp),%eax
  cmp    %eax,-0x30(%rbp)
  jl     L85
  mov    $0x0,%eax
  mov    %rbx,%rsp
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L83
  call   <__stack_chk_fail@plt>
L83:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D42
data_type: string
name: retrieve_data
arguments: data_label: D67
data_type: string
name: retrieve_data
arguments: data_label: D61
data_type: string
name: retrieve_data
arguments: data_label: D29
data_type: string
name: retrieve_data
arguments: data_label: D7
data_type: string

tool: D42: Enter range: 

tool: D67: %d

tool: D61: Enter length: 

tool: D29: Enter array: 

tool: D7: 
%d: 

assistant: ```c
int main() {
  int range, length, array[length], i, q;
  printf("Enter range: \n");
  scanf("%d", &range);
  printf("Enter length: \n");
  scanf("%d", &length);
  printf("Enter array: \n");
  scanf("%d", array);
  for (i = 0; i < range; i++) {
    printf("\n%d: ", i);
    for (q = 0; q < length; q++) {
      if (array[q] == i)
        printf("*");
    }
  }
  return 0;
}
```