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

```asm
<main>:
  endbr64
  push   %rbp
  lea    D57(%rip),%rdi
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  lea    D13(%rip),%r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    -0x40(%rbp),%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  lea    D55(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    -0x3c(%rbp),%rsi
  mov    %r12,%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     L10
L98:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L98
L10:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L140
L93:
  mov    %rsp,%r14
  lea    D30(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r14,%rbx
  lea    0x30(%r14),%r13
L46:
  mov    %rbx,%rsi
  mov    %r12,%rdi
  add    $0x4,%rbx
  call   <scanf@plt>
  cmp    %rbx,%r13
  jne    L46
  lea    D16(%rip),%rdi
  xor    %r13d,%r13d
  lea    D33(%rip),%r15
  call   <puts@plt>
  mov    -0x40(%rbp),%eax
  test   %eax,%eax
  js     L25
  nopl   (%rax)
L109:
  xor    %ebx,%ebx
  cmp    %r13d,(%r14)
  sete   %bl
  xor    %eax,%eax
  cmp    %r13d,0x4(%r14)
  sete   %al
  add    %eax,%ebx
  xor    %eax,%eax
  cmp    %r13d,0x8(%r14)
  sete   %al
  add    %eax,%ebx
  xor    %eax,%eax
  cmp    %r13d,0xc(%r14)
  sete   %al
  add    %eax,%ebx
  xor    %eax,%eax
  cmp    %r13d,0x10(%r14)
  sete   %al
  add    %eax,%ebx
  xor    %eax,%eax
  cmp    0x14(%r14),%r13d
  sete   %al
  add    %eax,%ebx
  xor    %eax,%eax
  cmp    0x18(%r14),%r13d
  sete   %al
  add    %eax,%ebx
  xor    %eax,%eax
  cmp    0x1c(%r14),%r13d
  sete   %al
  add    %eax,%ebx
  xor    %eax,%eax
  cmp    0x20(%r14),%r13d
  sete   %al
  add    %eax,%ebx
  xor    %eax,%eax
  cmp    0x24(%r14),%r13d
  sete   %al
  add    %eax,%ebx
  mov    0x2c(%r14),%eax
  cmp    0x28(%r14),%r13d
  je     L105
  cmp    %r13d,%eax
  je     L102
  xor    %eax,%eax
  mov    %r13d,%esi
  mov    %r15,%rdi
  call   <printf@plt>
  test   %ebx,%ebx
  je     L127
L83:
  xor    %r12d,%r12d
  nopw   0x0(%rax,%rax,1)
L126:
  mov    $0x2a,%edi
  add    $0x1,%r12d
  call   <putchar@plt>
  cmp    %ebx,%r12d
  jl     L126
L127:
  mov    $0xa,%edi
  add    $0x1,%r13d
  call   <putchar@plt>
  cmp    %r13d,-0x40(%rbp)
  jge    L109
L25:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L65
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L105:
  add    $0x1,%ebx
  cmp    %r13d,%eax
  je     L102
  mov    %r13d,%esi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L83
  nopw   0x0(%rax,%rax,1)
L102:
  mov    %r13d,%esi
  mov    %r15,%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <printf@plt>
  jmp    L83
L140:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L93
L65:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D57
datatype: string
name: extract_symbolic_data
arguments: tag: D13
datatype: string
name: extract_symbolic_data
arguments: tag: D55
datatype: string
name: extract_symbolic_data
arguments: tag: D30
datatype: string
name: extract_symbolic_data
arguments: tag: D16
datatype: string
name: extract_symbolic_data
arguments: tag: D33
datatype: string

tool: D57: Enter range: 

tool: D13: %d

tool: D55: Enter length: 

tool: D30: Enter array: 

tool: D16: Histogram: 

tool: D33: %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;
}
```