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

```asm
<main>:
  endbr64
  push   %r15
  lea    D23(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    0x18(%rsp),%rdx
  lea    0x14(%rsp),%rsi
  call   <scanf@plt>
  mov    0x14(%rsp),%eax
  lea    (%rax,%rax,2),%edi
  shl    $0x3,%edi
  call   <malloc@plt>
  mov    0x14(%rsp),%edx
  mov    %rax,0x8(%rsp)
  test   %edx,%edx
  jle    L140
  mov    %rax,%r13
  mov    %rax,%r12
  lea    D3(%rip),%rbp
  xor    %r14d,%r14d
  nopl   0x0(%rax,%rax,1)
L108:
  mov    %r12,%rsi
  lea    D9(%rip),%rdi
  xor    %eax,%eax
  xor    %r15d,%r15d
  call   <scanf@plt>
  lea    0x1c(%rsp),%rbx
  movl   $0x0,0x14(%r12)
  mov    0x18(%rsp),%eax
  test   %eax,%eax
  jle    L38
  nopw   0x0(%rax,%rax,1)
L22:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%r15d
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  add    %eax,0x14(%r12)
  cmp    %r15d,0x18(%rsp)
  jg     L22
L38:
  mov    0x14(%rsp),%eax
  add    $0x1,%r14d
  add    $0x18,%r12
  cmp    %r14d,%eax
  jg     L108
  test   %eax,%eax
  jle    L140
  mov    0x8(%rsp),%r12
  xor    %r15d,%r15d
  nopw   0x0(%rax,%rax,1)
L18:
  add    $0x1,%r15d
  cmp    %r15d,%eax
  jle    L8
  mov    %r12,%rbp
  add    $0x18,%r12
  mov    %r15d,%r14d
  mov    %r12,%rbx
  jmp    L70
  nopl   0x0(%rax)
L81:
  movdqu (%rbx),%xmm1
  movdqu 0x0(%rbp),%xmm0
  mov    0x10(%rbp),%rdx
  movups %xmm1,0x0(%rbp)
  mov    0x10(%rbx),%rcx
  mov    %rdx,0x30(%rsp)
  mov    %rcx,0x10(%rbp)
  mov    %rdx,0x10(%rbx)
  movaps %xmm0,0x20(%rsp)
  movups %xmm0,(%rbx)
L13:
  add    $0x1,%r14d
  add    $0x18,%rbx
  cmp    %r14d,%eax
  jle    L125
L70:
  mov    0x14(%rbx),%ecx
  cmp    %ecx,0x14(%rbp)
  jl     L81
  jne    L13
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L35
  movdqu (%rbx),%xmm2
  movdqu 0x0(%rbp),%xmm0
  mov    0x10(%rbp),%rax
  movups %xmm2,0x0(%rbp)
  mov    0x10(%rbx),%rdx
  mov    %rax,0x30(%rsp)
  mov    %rdx,0x10(%rbp)
  mov    %rax,0x10(%rbx)
  movaps %xmm0,0x20(%rsp)
  movups %xmm0,(%rbx)
L35:
  mov    0x14(%rsp),%eax
  add    $0x1,%r14d
  add    $0x18,%rbx
  cmp    %r14d,%eax
  jg     L70
  nopl   0x0(%rax)
L125:
  cmp    %r15d,%eax
  jg     L18
  nopl   0x0(%rax)
L8:
  test   %eax,%eax
  jle    L140
  xor    %ebx,%ebx
  lea    D13(%rip),%rbp
  nopl   (%rax)
L75:
  mov    0x14(%r13),%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  add    $0x1,%ebx
  add    $0x18,%r13
  call   <printf@plt>
  cmp    %ebx,0x14(%rsp)
  jg     L75
L140:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L153
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L153:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D23
type_guessed: string
name: extract_symbolic_data
arguments: tag: D3
type_guessed: string
name: extract_symbolic_data
arguments: tag: D9
type_guessed: string
name: extract_symbolic_data
arguments: tag: D13
type_guessed: string

tool: D23: %d %d

tool: D3: %d

tool: D9: %s

tool: D13: %s %d


assistant: ```c
int main() {
  struct Aluno {
    char nome[20];
    int nota;
  };
  int n, p, i, j;
  scanf("%d %d", &n, &p);
  struct Aluno aluno;
  struct Aluno *alunos = malloc(sizeof(struct Aluno) * n);
  for (i = 0; i < n; i++) {
    scanf("%s", alunos[i].nome);
    alunos[i].nota = 0;
    for (j = 0; j < p; j++) {
      int nota;
      scanf("%d", &nota);
      alunos[i].nota += nota;
    }
  }
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      if (alunos[i].nota < alunos[j].nota) {
        aluno = alunos[i];
        alunos[i] = alunos[j];
        alunos[j] = aluno;
      } else if (alunos[i].nota == alunos[j].nota && strcmp(alunos[i].nome, alunos[j].nome) > 0) {
        aluno = alunos[i];
        alunos[i] = alunos[j];
        alunos[j] = aluno;
      }
    }
  }
  for (i = 0; i < n; i++) {
    printf("%s %d\n", alunos[i].nome, alunos[i].nota);
  }
  return 0;
}
```