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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x80(%rbp)
  jmp    L139
L24:
  mov    -0x80(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%esi
  lea    D196(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x7c(%rbp)
  jmp    L38
L62:
  mov    -0x7c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%esi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x70(%rbp),%rcx
  mov    -0x7c(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x80(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  add    %rsi,%rax
  shl    $0x3,%rax
  add    %rcx,%rax
  mov    %rax,%rsi
  lea    D61(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x7c(%rbp)
L38:
  cmpl   $0x2,-0x7c(%rbp)
  jle    L62
  addl   $0x1,-0x80(%rbp)
L139:
  cmpl   $0x3,-0x80(%rbp)
  jle    L24
  lea    D50(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D174(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x80(%rbp)
  jmp    L129
L17:
  mov    -0x80(%rbp),%eax
  mov    %eax,%esi
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x7c(%rbp)
  jmp    L61
L163:
  mov    -0x7c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x80(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  add    %rcx,%rax
  mov    -0x70(%rbp,%rax,8),%rax
  movq   %rax,%xmm0
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0x7c(%rbp)
L61:
  cmpl   $0x2,-0x7c(%rbp)
  jle    L163
  addl   $0x1,-0x80(%rbp)
L129:
  cmpl   $0x3,-0x80(%rbp)
  jle    L17
  lea    D79(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D157(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D171(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x7c(%rbp)
  jmp    L152
L165:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movl   $0x0,-0x80(%rbp)
  jmp    L99
L36:
  mov    -0x7c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x80(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  add    %rcx,%rax
  movsd  -0x70(%rbp,%rax,8),%xmm0
  movsd  -0x78(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  addl   $0x1,-0x80(%rbp)
L99:
  cmpl   $0x3,-0x80(%rbp)
  jle    L36
  mov    -0x7c(%rbp),%eax
  mov    %eax,%esi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movsd  -0x78(%rbp),%xmm0
  movsd  D176(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D134(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0x7c(%rbp)
L152:
  cmpl   $0x2,-0x7c(%rbp)
  jle    L165
  lea    D131(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D97(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x80(%rbp)
  jmp    L98
L68:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movl   $0x0,-0x7c(%rbp)
  jmp    L31
L122:
  mov    -0x7c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x80(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  add    %rcx,%rax
  movsd  -0x70(%rbp,%rax,8),%xmm0
  movsd  -0x78(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  addl   $0x1,-0x7c(%rbp)
L31:
  cmpl   $0x2,-0x7c(%rbp)
  jle    L122
  mov    -0x80(%rbp),%eax
  mov    %eax,%esi
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movsd  -0x78(%rbp),%xmm0
  movsd  D119(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D134(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0x80(%rbp)
L98:
  cmpl   $0x3,-0x80(%rbp)
  jle    L68
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L10
  call   <__stack_chk_fail@plt>
L10:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D196
type_guessed: string
name: extract_symbolic_data
arguments: tag: D24
type_guessed: string
name: extract_symbolic_data
arguments: tag: D61
type_guessed: string
name: extract_symbolic_data
arguments: tag: D50
type_guessed: string
name: extract_symbolic_data
arguments: tag: D104
type_guessed: string
name: extract_symbolic_data
arguments: tag: D174
type_guessed: string
name: extract_symbolic_data
arguments: tag: D100
type_guessed: string
name: extract_symbolic_data
arguments: tag: D15
type_guessed: string
name: extract_symbolic_data
arguments: tag: D79
type_guessed: string
name: extract_symbolic_data
arguments: tag: D157
type_guessed: string
name: extract_symbolic_data
arguments: tag: D171
type_guessed: string
name: extract_symbolic_data
arguments: tag: D3
type_guessed: string
name: extract_symbolic_data
arguments: tag: D176
type_guessed: byte[8]
name: extract_symbolic_data
arguments: tag: D134
type_guessed: string
name: extract_symbolic_data
arguments: tag: D131
type_guessed: string
name: extract_symbolic_data
arguments: tag: D97
type_guessed: string
name: extract_symbolic_data
arguments: tag: D40
type_guessed: string
name: extract_symbolic_data
arguments: tag: D46
type_guessed: string
name: extract_symbolic_data
arguments: tag: D119
type_guessed: byte[8]

tool: D196: 
Processing student # %d


tool: D24:    - Enter score for exam # %d -- 

tool: D61: %lf

tool: D50: 
-----------------------------------

tool: D104: Scores for all students, all exams.

tool: D174: -----------------------------------

tool: D100: 
Student number # %d - 	

tool: D15: %5.2lf	

tool: D79: 

-----------------------

tool: D157: Averages for all exams.

tool: D171: -----------------------

tool: D3: Average for exam %d = 

tool: {"D176": [0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x40]}

tool: D134: %5.2lf


tool: D131: 
--------------------------

tool: D97: Averages for all students.

tool: D40: --------------------------

tool: D46: Average for student %d = 

tool: {"D119": [0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x40]}

assistant: ```c
int main() {
  double scores[4][3];
  double total;
  int student, exam;
  for (student = 0; student < 4; student++) {
    printf("\nProcessing student # %d\n", student + 1);
    ;
    for (exam = 0; exam < 3; exam++) {
      printf("   - Enter score for exam # %d -- ", exam + 1);
      scanf("%lf", &scores[student][exam]);
    }
  }
  printf("\n-----------------------------------\n");
  printf("Scores for all students, all exams.\n");
  printf("-----------------------------------");
  for (student = 0; student < 4; student++) {
    printf("\nStudent number # %d - \t", student);
    for (exam = 0; exam < 3; exam++)
      printf("%5.2lf\t", scores[student][exam]);
  }
  printf("\n\n-----------------------\n");
  printf("Averages for all exams.\n");
  printf("-----------------------\n");
  for (exam = 0; exam < 3; exam++) {
    total = 0;
    for (student = 0; student < 4; student++)
      total = total + scores[student][exam];
    printf("Average for exam %d = ", exam);
    printf("%5.2lf\n", total / (double)4);
  }
  printf("\n--------------------------\n");
  printf("Averages for all students.\n");
  printf("--------------------------\n");
  for (student = 0; student < 4; student++) {
    total = 0;
    for (exam = 0; exam < 3; exam++)
      total = total + scores[student][exam];
    printf("Average for student %d = ", student);
    printf("%5.2lf\n", total / (double)3);
  }
  return 0;
}
```