user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  lea    D183(%rip),%r14
  push   %r13
  lea    D45(%rip),%r13
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rax
  movq   $0x0,(%rsp)
  mov    %rax,0x8(%rsp)
L50:
  add    $0x1,%r12d
  lea    D156(%rip),%rdi
  xor    %eax,%eax
  xor    %r15d,%r15d
  mov    %r12d,%esi
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  mov    (%rsp),%rdx
  mov    %rax,%rbp
  lea    (%rax,%rdx,8),%rbx
L22:
  add    $0x1,%r15d
  mov    %r14,%rdi
  xor    %eax,%eax
  mov    %r15d,%esi
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r13,%rdi
  add    $0x8,%rbx
  call   <scanf@plt>
  cmp    $0x3,%r15d
  jne    L22
  addq   $0x3,(%rsp)
  cmp    $0x4,%r12d
  jne    L50
  lea    D149(%rip),%rdi
  xor    %r12d,%r12d
  lea    D46(%rip),%r14
  call   <puts@plt>
  lea    D116(%rip),%rdi
  lea    D159(%rip),%r13
  call   <puts@plt>
  lea    D51(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%rbx
L26:
  mov    %r12d,%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x1,%r12d
  call   <printf@plt>
  movsd  (%rbx),%xmm0
  mov    %r13,%rdi
  add    $0x18,%rbx
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  -0x10(%rbx),%xmm0
  mov    %r13,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  -0x8(%rbx),%xmm0
  mov    %r13,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  cmp    $0x4,%r12d
  jne    L26
  lea    D148(%rip),%rdi
  xor    %r14d,%r14d
  lea    D20(%rip),%r13
  call   <puts@plt>
  lea    D184(%rip),%rdi
  lea    D162(%rip),%rbx
  call   <puts@plt>
  lea    D79(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%r12
L1:
  pxor   %xmm0,%xmm0
  addsd  (%r12),%xmm0
  mov    %r14d,%esi
  mov    %r13,%rdi
  addsd  0x18(%r12),%xmm0
  xor    %eax,%eax
  add    $0x1,%r14d
  add    $0x8,%r12
  addsd  0x28(%r12),%xmm0
  addsd  0x40(%r12),%xmm0
  movsd  %xmm0,(%rsp)
  call   <printf@plt>
  movsd  (%rsp),%xmm0
  mov    %rbx,%rdi
  mov    $0x1,%eax
  mulsd  D74(%rip),%xmm0
  call   <printf@plt>
  cmp    $0x3,%r14d
  jne    L1
  lea    D59(%rip),%rdi
  xor    %r13d,%r13d
  lea    D69(%rip),%r12
  call   <puts@plt>
  lea    D3(%rip),%rdi
  call   <puts@plt>
  lea    D95(%rip),%rdi
  call   <puts@plt>
L9:
  pxor   %xmm0,%xmm0
  addsd  0x0(%rbp),%xmm0
  addsd  0x8(%rbp),%xmm0
  xor    %eax,%eax
  addsd  0x10(%rbp),%xmm0
  mov    %r13d,%esi
  mov    %r12,%rdi
  add    $0x1,%r13d
  add    $0x18,%rbp
  movsd  %xmm0,(%rsp)
  call   <printf@plt>
  mov    %rbx,%rdi
  mov    $0x1,%eax
  movsd  (%rsp),%xmm0
  divsd  D98(%rip),%xmm0
  call   <printf@plt>
  cmp    $0x4,%r13d
  jne    L9
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L29
  add    $0x88,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L29:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D183
data_type: string
name: extract_symbolic_data
arguments: label: D45
data_type: string
name: extract_symbolic_data
arguments: label: D156
data_type: string
name: extract_symbolic_data
arguments: label: D149
data_type: string
name: extract_symbolic_data
arguments: label: D46
data_type: string
name: extract_symbolic_data
arguments: label: D116
data_type: string
name: extract_symbolic_data
arguments: label: D159
data_type: string
name: extract_symbolic_data
arguments: label: D51
data_type: string
name: extract_symbolic_data
arguments: label: D148
data_type: string
name: extract_symbolic_data
arguments: label: D20
data_type: string
name: extract_symbolic_data
arguments: label: D184
data_type: string
name: extract_symbolic_data
arguments: label: D162
data_type: string
name: extract_symbolic_data
arguments: label: D79
data_type: string
name: extract_symbolic_data
arguments: label: D74
data_type: byte[8]
name: extract_symbolic_data
arguments: label: D59
data_type: string
name: extract_symbolic_data
arguments: label: D69
data_type: string
name: extract_symbolic_data
arguments: label: D3
data_type: string
name: extract_symbolic_data
arguments: label: D95
data_type: string
name: extract_symbolic_data
arguments: label: D98
data_type: byte[8]

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

tool: D45: %lf

tool: D156: 
Processing student # %d


tool: D149: 
-----------------------------------

tool: D46: 
Student number # %d - 	

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

tool: D159: %5.2lf	

tool: D51: -----------------------------------

tool: D148: 

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

tool: D20: Average for exam %d = 

tool: D184: Averages for all exams.

tool: D162: %5.2lf


tool: D79: -----------------------

tool: {"D74": [0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x3f]}

tool: D59: 
--------------------------

tool: D69: Average for student %d = 

tool: D3: Averages for all students.

tool: D95: --------------------------

tool: {"D98": [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;
}
```