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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x38(%rbp)
  mov    $0xa,%esi
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x3c(%rbp)
  jmp    L22
L42:
  lea    -0x30(%rbp),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x3c(%rbp)
L22:
  cmpl   $0x9,-0x3c(%rbp)
  jle    L42
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x3c(%rbp)
  jmp    L25
L60:
  mov    -0x3c(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x3c(%rbp)
L25:
  cmpl   $0x9,-0x3c(%rbp)
  jle    L60
  mov    $0xa,%edi
  call   <putchar@plt>
  movl   $0x0,-0x3c(%rbp)
  jmp    L8
L19:
  mov    -0x3c(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  add    %eax,-0x38(%rbp)
  addl   $0x1,-0x3c(%rbp)
L8:
  cmpl   $0x9,-0x3c(%rbp)
  jle    L19
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x38(%rbp),%xmm0
  movss  D40(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x34(%rbp)
  pxor   %xmm2,%xmm2
  cvtss2sd -0x34(%rbp),%xmm2
  movq   %xmm2,%rdx
  mov    -0x38(%rbp),%eax
  movq   %rdx,%xmm0
  mov    %eax,%esi
  lea    D50(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movss  -0x34(%rbp),%xmm0
  movss  D13(%rip),%xmm1
  subss  %xmm1,%xmm0
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm0,%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L65
  call   <__stack_chk_fail@plt>
L65:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D20
type: string
name: unpack_data
arguments: tag: D34
type: string
name: unpack_data
arguments: tag: D43
type: string
name: unpack_data
arguments: tag: D26
type: string
name: unpack_data
arguments: tag: D40
type: byte[4]
name: unpack_data
arguments: tag: D50
type: string
name: unpack_data
arguments: tag: D13
type: byte[4]
name: unpack_data
arguments: tag: D31
type: string

tool: D20: Enter %d golf socres:


tool: D34: %d

tool: D43: The scores read in are as follows:

tool: D26: %5d

tool: {"D40": [0x00,0x00,0x20,0x41]}

tool: D50: Sum of scores = %d, average = %.2f


tool: {"D13": [0x00,0x00,0x90,0x42]}

tool: D31: That's a handicap of %.0f.


assistant: ```c
int main(void) {
  int index, score[10];
  int sum = 0;
  float average;
  printf("Enter %d golf socres:\n", 10);
  for (index = 0; index < 10; index++)
    scanf("%d", &score[index]);
  printf("The scores read in are as follows:\n");
  for (index = 0; index < 10; index++)
    printf("%5d", score[index]);
  printf("\n");
  for (index = 0; index < 10; index++)
    sum += score[index];
  average = (float)sum / 10;
  printf("Sum of scores = %d, average = %.2f\n", sum, average);
  printf("That's a handicap of %.0f.\n", average - 72);
  return 0;
}
```