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

```asm
<main>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  lea    D89(%rip),%r15
  push   %r14
  lea    D74(%rip),%r14
  push   %r13
  lea    D37(%rip),%r13
  push   %r12
  push   %rbp
  lea    D56(%rip),%rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%rax
  mov    %rax,0x18(%rsp)
  mov    %rax,%rbx
  lea    0x40(%rsp),%rax
  mov    %rax,0x10(%rsp)
  mov    %rax,%r12
  lea    0x60(%rsp),%rax
  mov    %rax,0x8(%rsp)
L31:
  mov    %r15,%rdi
  movsd  %xmm0,(%rsp)
  call   <puts@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    %r14,%rdi
  add    $0x4,%rbx
  call   <puts@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  movsd  (%r12),%xmm1
  movsd  (%rsp),%xmm0
  add    $0x8,%r12
  maxsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  cmp    0x8(%rsp),%r12
  jne    L31
  lea    D73(%rip),%rdi
  mov    $0x1,%eax
  movsd  %xmm1,(%rsp)
  xor    %ebx,%ebx
  call   <printf@plt>
  movsd  (%rsp),%xmm0
  lea    D62(%rip),%r13
L22:
  mov    0x10(%rsp),%rax
  ucomisd (%rax,%rbx,8),%xmm0
  jp     L16
  je     L14
L16:
  add    $0x1,%rbx
  cmp    $0x4,%rbx
  jne    L22
  pxor   %xmm0,%xmm0
  addsd  0x40(%rsp),%xmm0
  addsd  0x48(%rsp),%xmm0
  mov    $0x1,%eax
  addsd  0x50(%rsp),%xmm0
  addsd  0x58(%rsp),%xmm0
  mulsd  D27(%rip),%xmm0
  lea    D17(%rip),%rdi
  call   <printf@plt>
  lea    D7(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x2c(%rsp),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x2c(%rsp),%esi
  xor    %eax,%eax
  cmp    %esi,0x30(%rsp)
  je     L5
  mov    $0x1,%eax
  cmp    0x34(%rsp),%esi
  je     L5
  xor    %eax,%eax
  cmp    0x38(%rsp),%esi
  setne  %al
  add    $0x2,%eax
L5:
  cltq
  lea    D71(%rip),%rdi
  movsd  0x40(%rsp,%rax,8),%xmm0
  mov    $0x1,%eax
  call   <printf@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L13
  add    $0x78,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L14:
  mov    0x18(%rsp),%rax
  mov    %r13,%rdi
  movsd  %xmm0,(%rsp)
  mov    (%rax,%rbx,4),%esi
  xor    %eax,%eax
  call   <printf@plt>
  movsd  (%rsp),%xmm0
  jmp    L16
L13:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D89
data_type: string
name: disassemble_data
arguments: label: D74
data_type: string
name: disassemble_data
arguments: label: D37
data_type: string
name: disassemble_data
arguments: label: D56
data_type: string
name: disassemble_data
arguments: label: D73
data_type: string
name: disassemble_data
arguments: label: D62
data_type: string
name: disassemble_data
arguments: label: D27
data_type: f32[2]
name: disassemble_data
arguments: label: D17
data_type: string
name: disassemble_data
arguments: label: D7
data_type: string
name: disassemble_data
arguments: label: D71
data_type: string

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

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

tool: D37: %lf

tool: D56: %d

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

tool: D62: 	 %d


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

tool: D17: Average test score = %5.1lf


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

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