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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  movl   $0x0,0xc(%rsp)
  lea    D17(%rip),%rdi
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  lea    D28(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  cmpl   $0x0,0xc(%rsp)
  je     L66
L54:
  cmpl   $0x14,0xc(%rsp)
  jg     L97
L102:
  cmpl   $0x0,0xc(%rsp)
  jle    L61
  lea    0x10(%rsp),%rbp
  mov    %rbp,%r12
  mov    $0x0,%ebx
  lea    D7(%rip),%r15
  lea    D62(%rip),%r14
L18:
  mov    %ebx,%r13d
  add    $0x1,%ebx
  mov    %ebx,%esi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  add    $0x4,%r12
  cmp    0xc(%rsp),%ebx
  jl     L18
  test   %r13d,%r13d
  jle    L61
  movslq %r13d,%rax
  lea    0x10(%rsp,%rax,4),%rdx
  mov    %r13d,%eax
L52:
  cvttss2si 0x0(%rbp),%ecx
  movss  (%rdx),%xmm0
  movss  %xmm0,0x0(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2ss %ecx,%xmm0
  movss  %xmm0,(%rdx)
  sub    $0x1,%eax
  add    $0x4,%rbp
  sub    $0x4,%rdx
  mov    %r13d,%ecx
  sub    %eax,%ecx
  cmp    %ecx,%eax
  jg     L52
L61:
  lea    D21(%rip),%rdi
  call   <puts@plt>
  cmpl   $0x0,0xc(%rsp)
  jle    L26
  lea    0x10(%rsp),%rbp
  mov    $0x0,%ebx
  lea    D57(%rip),%r12
L95:
  add    $0x1,%ebx
  pxor   %xmm0,%xmm0
  cvtss2sd 0x0(%rbp),%xmm0
  mov    %ebx,%esi
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  add    $0x4,%rbp
  cmp    0xc(%rsp),%ebx
  jl     L95
L26:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  mov    $0x0,%eax
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L66:
  lea    D53(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L54
L97:
  lea    D71(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L102
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D17
type: string
name: parse_data
arguments: tag: D28
type: string
name: parse_data
arguments: tag: D7
type: string
name: parse_data
arguments: tag: D62
type: string
name: parse_data
arguments: tag: D21
type: string
name: parse_data
arguments: tag: D57
type: string
name: parse_data
arguments: tag: D53
type: string
name: parse_data
arguments: tag: D71
type: string

tool: D17: Enter no of array elements: 

tool: D28: %d

tool: D7: Array element %d : 

tool: D62: %f

tool: D21: 
Result after reversal : 

tool: D57: Array element %d: %f


tool: D53: Error. Enter a valid length.

tool: D71: Maximum array length exceeded. Exiting.

assistant: ```c
int main(int argc, const char *argv[]) {
  float arr[20];
  int i, j, num, temp;
  num = 0;
  printf("Enter no of array elements: ");
  scanf("%d", &num);
  if (num == 0) {
    printf("Error. Enter a valid length.");
    exit(1);
  }
  if (num > 20) {
    printf("Maximum array length exceeded. Exiting.\n");
    exit(1);
  }
  for (i = 0; i < num; i++) {
    printf("Array element %d : ", i + 1);
    scanf("%f", &arr[i]);
  }
  j = i - 1;
  i = 0;
  temp = 0;
  while (i < j) {
    temp = arr[i];
    arr[i] = arr[j];
    arr[j] = temp;
    i++;
    j--;
  }
  printf("\nResult after reversal : \n");
  for (i = 0; i < num; i++) {
    printf("Array element %d: %f\n", i + 1, arr[i]);
  }
  return (0);
}
```