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

```asm
<main>:
  endbr64
  push   %rbp
  lea    D18(%rip),%rdi
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  lea    D10(%rip),%r13
  push   %r12
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    -0x40(%rbp),%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  lea    D8(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    -0x3c(%rbp),%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  movslq -0x3c(%rbp),%rax
  mov    %rsp,%rcx
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L53
L61:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L61
L53:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L20
L31:
  mov    %rsp,%rbx
  lea    D26(%rip),%rdi
  xor    %eax,%eax
  mov    %rbx,-0x48(%rbp)
  lea    0x30(%rbx),%r12
  call   <printf@plt>
  nopl   0x0(%rax)
L84:
  mov    %rbx,%rsi
  mov    %r13,%rdi
  add    $0x4,%rbx
  call   <scanf@plt>
  cmp    %r12,%rbx
  jne    L84
  lea    D41(%rip),%rdi
  call   <puts@plt>
  mov    -0x40(%rbp),%eax
  test   %eax,%eax
  js     L40
  xor    %ebx,%ebx
  lea    D39(%rip),%r13
  nopl   0x0(%rax,%rax,1)
L8:
  mov    -0x48(%rbp),%rax
  xor    %r15d,%r15d
  nopw   0x0(%rax,%rax,1)
L49:
  xor    %edx,%edx
  cmp    %ebx,(%rax)
  sete   %dl
  add    $0x4,%rax
  add    %edx,%r15d
  cmp    %r12,%rax
  jne    L49
  xor    %eax,%eax
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <printf@plt>
  test   %r15d,%r15d
  je     L44
  xor    %r14d,%r14d
  nopw   0x0(%rax,%rax,1)
L97:
  mov    $0x2a,%edi
  add    $0x1,%r14d
  call   <putchar@plt>
  cmp    %r14d,%r15d
  jne    L97
L44:
  mov    $0xa,%edi
  add    $0x1,%ebx
  call   <putchar@plt>
  cmp    %ebx,-0x40(%rbp)
  jge    L8
L40:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L20:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L31
L12:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D18
data_type: string
name: retrieve_data
arguments: tag: D10
data_type: string
name: retrieve_data
arguments: tag: D8
data_type: string
name: retrieve_data
arguments: tag: D26
data_type: string
name: retrieve_data
arguments: tag: D41
data_type: string
name: retrieve_data
arguments: tag: D39
data_type: string

tool: D18: Enter range: 

tool: D10: %d

tool: D8: Enter length: 

tool: D26: Enter array: 

tool: D41: Histogram: 

tool: D39: %d: 

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