user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movl   $0x0,-0x58(%rbp)
  jmp    L133
L70:
  lea    D106(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x40(%rbp),%rdx
  mov    -0x58(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D72(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x30(%rbp),%rdx
  mov    -0x58(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D87(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x58(%rbp),%eax
  cltq
  movsd  -0x30(%rbp,%rax,8),%xmm0
  comisd -0x50(%rbp),%xmm0
  jbe    L131
  mov    -0x58(%rbp),%eax
  cltq
  movsd  -0x30(%rbp,%rax,8),%xmm0
  movsd  %xmm0,-0x50(%rbp)
L131:
  addl   $0x1,-0x58(%rbp)
L133:
  cmpl   $0x3,-0x58(%rbp)
  jle    L70
  mov    -0x50(%rbp),%rax
  movq   %rax,%xmm0
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movl   $0x0,-0x58(%rbp)
  jmp    L62
L109:
  mov    -0x58(%rbp),%eax
  cltq
  movsd  -0x30(%rbp,%rax,8),%xmm0
  ucomisd -0x50(%rbp),%xmm0
  jp     L61
  ucomisd -0x50(%rbp),%xmm0
  jne    L61
  mov    -0x58(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L61:
  addl   $0x1,-0x58(%rbp)
L62:
  cmpl   $0x3,-0x58(%rbp)
  jle    L109
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movl   $0x0,-0x58(%rbp)
  jmp    L14
L78:
  mov    -0x58(%rbp),%eax
  cltq
  movsd  -0x30(%rbp,%rax,8),%xmm0
  movsd  -0x48(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  addl   $0x1,-0x58(%rbp)
L14:
  cmpl   $0x3,-0x58(%rbp)
  jle    L78
  movsd  -0x48(%rbp),%xmm0
  movsd  D21(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D90(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x5c(%rbp),%rax
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movl   $0x0,-0x58(%rbp)
  movl   $0x0,-0x54(%rbp)
  jmp    L26
L103:
  mov    -0x58(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%edx
  mov    -0x5c(%rbp),%eax
  cmp    %eax,%edx
  jne    L64
  movl   $0x1,-0x54(%rbp)
  jmp    L26
L64:
  addl   $0x1,-0x58(%rbp)
L26:
  cmpl   $0x0,-0x54(%rbp)
  je     L103
  mov    -0x58(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,8),%rdx
  mov    -0x5c(%rbp),%eax
  movq   %rdx,%xmm0
  mov    %eax,%esi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L51
  call   <__stack_chk_fail@plt>
L51:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D106
type: string
name: disassemble_data
arguments: label: D16
type: string
name: disassemble_data
arguments: label: D72
type: string
name: disassemble_data
arguments: label: D87
type: string
name: disassemble_data
arguments: label: D12
type: string
name: disassemble_data
arguments: label: D4
type: string
name: disassemble_data
arguments: label: D21
type: f32[2]
name: disassemble_data
arguments: label: D90
type: string
name: disassemble_data
arguments: label: D60
type: string
name: disassemble_data
arguments: label: D24
type: string

tool: D106: Enter student's id --> 

tool: D16: %d

tool: D72: Enter student's score --> 

tool: D87: %lf

tool: D12: High score was %5.1lf by ID : 

tool: D4: 	 %d


tool: {"D21": [0.0,2.25]}

tool: D90: Average test score = %5.1lf


tool: D60: Enter id of desired student --> 

tool: D24: Score for student # %d is %5.1lf


assistant: ```c
int main() {
  int ids[4], i, id;
  double scores[4], high = 0.0;
  for (i = 0; i < 4; i++) {
    printf("Enter student's id --> \n");
    scanf("%d", &ids[i]);
    printf("Enter student's score --> \n");
    scanf("%lf", &scores[i]);
    if (scores[i] > high)
      high = scores[i];
  }
  printf("High score was %5.1lf by ID : ", high);
  for (i = 0; i < 4; i++) {
    if (scores[i] == high)
      printf("\t %d\n", ids[i]);
  }
  double total = 0.0;
  for (i = 0; i < 4; i++) {
    total += scores[i];
  }
  printf("Average test score = %5.1lf\n", total / 4);
  printf("Enter id of desired student --> ");
  scanf("%d", &id);
  i = 0;
  int found = 0;
  while (!found) {
    if (ids[i] == id)
      found = 1;
    else
      i++;
  }
  printf("Score for student # %d is %5.1lf\n", id, scores[i]);
  return 0;
}
```