user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%rbp
  lea    0x30(%rsp),%rbx
  lea    0x50(%rsp),%r14
  pxor   %xmm3,%xmm3
  movsd  %xmm3,0x8(%rsp)
  lea    D68(%rip),%r13
  lea    D52(%rip),%r12
  lea    D31(%rip),%r15
L23:
  mov    %r13,%rdi
  call   <puts@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    %r15,%rdi
  call   <puts@plt>
  mov    %rbx,%rsi
  lea    D51(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movsd  (%rbx),%xmm0
  maxsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  add    $0x4,%rbp
  add    $0x8,%rbx
  cmp    %r14,%rbx
  jne    L23
  lea    D71(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x0,%ebx
  lea    D66(%rip),%rbp
  jmp    L45
L60:
  mov    0x20(%rsp,%rbx,4),%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L81:
  add    $0x1,%rbx
  cmp    $0x4,%rbx
  je     L6
L45:
  movsd  0x8(%rsp),%xmm1
  ucomisd 0x30(%rsp,%rbx,8),%xmm1
  jp     L81
  lea    0x30(%rsp),%rax
  ucomisd (%rax,%rbx,8),%xmm1
  jne    L81
  jmp    L60
L6:
  pxor   %xmm0,%xmm0
  addsd  0x30(%rsp),%xmm0
  addsd  0x38(%rsp),%xmm0
  addsd  0x40(%rsp),%xmm0
  addsd  0x48(%rsp),%xmm0
  mulsd  D72(%rip),%xmm0
  lea    D106(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  lea    D75(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x1c(%rsp),%rsi
  lea    D52(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0x1c(%rsp),%esi
  mov    $0x0,%eax
  cmp    %esi,0x20(%rsp)
  je     L36
  mov    $0x1,%eax
  cmp    0x24(%rsp),%esi
  je     L36
  cmp    0x28(%rsp),%esi
  setne  %al
  movzbl %al,%eax
  add    $0x2,%eax
L36:
  cltq
  movsd  0x30(%rsp,%rax,8),%xmm0
  lea    D27(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L34
  mov    $0x0,%eax
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L34:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D68
data_type: string
name: read_data
arguments: data_label: D52
data_type: string
name: read_data
arguments: data_label: D31
data_type: string
name: read_data
arguments: data_label: D51
data_type: string
name: read_data
arguments: data_label: D71
data_type: string
name: read_data
arguments: data_label: D66
data_type: string
name: read_data
arguments: data_label: D72
data_type: f32[2]
name: read_data
arguments: data_label: D106
data_type: string
name: read_data
arguments: data_label: D75
data_type: string
name: read_data
arguments: data_label: D27
data_type: string

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

tool: D52: %d

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

tool: D51: %lf

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

tool: D66: 	 %d


tool: {"D72": [0.0,1.625]}

tool: D106: Average test score = %5.1lf


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

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