user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x38(%rbp),%rdx
  lea    -0x3c(%rbp),%rax
  mov    %rax,%rsi
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x3c(%rbp),%eax
  cltq
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L89
L23:
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,0x14(%rax)
  movl   $0x0,-0x2c(%rbp)
  jmp    L107
L95:
  lea    -0x34(%rbp),%rax
  mov    %rax,%rsi
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x14(%rax),%esi
  mov    -0x34(%rbp),%ecx
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  lea    (%rsi,%rcx,1),%edx
  mov    %edx,0x14(%rax)
  addl   $0x1,-0x2c(%rbp)
L107:
  mov    -0x38(%rbp),%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L95
  addl   $0x1,-0x30(%rbp)
L89:
  mov    -0x3c(%rbp),%eax
  cmp    %eax,-0x30(%rbp)
  jl     L23
  movl   $0x0,-0x30(%rbp)
  jmp    L86
L8:
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L68
L137:
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x14(%rax),%ecx
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x14(%rax),%eax
  cmp    %eax,%ecx
  jge    L131
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    (%rcx),%rax
  mov    0x8(%rcx),%rdx
  mov    %rax,-0x20(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    0x10(%rcx),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    (%rsi),%rax
  mov    0x8(%rsi),%rdx
  mov    %rax,(%rcx)
  mov    %rdx,0x8(%rcx)
  mov    0x10(%rsi),%rax
  mov    %rax,0x10(%rcx)
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x20(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rax,(%rcx)
  mov    %rdx,0x8(%rcx)
  mov    -0x10(%rbp),%rax
  mov    %rax,0x10(%rcx)
  jmp    L128
L131:
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x14(%rax),%ecx
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x14(%rax),%eax
  cmp    %eax,%ecx
  jne    L128
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rcx
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L128
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    (%rcx),%rax
  mov    0x8(%rcx),%rdx
  mov    %rax,-0x20(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    0x10(%rcx),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    (%rsi),%rax
  mov    0x8(%rsi),%rdx
  mov    %rax,(%rcx)
  mov    %rdx,0x8(%rcx)
  mov    0x10(%rsi),%rax
  mov    %rax,0x10(%rcx)
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x20(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rax,(%rcx)
  mov    %rdx,0x8(%rcx)
  mov    -0x10(%rbp),%rax
  mov    %rax,0x10(%rcx)
L128:
  addl   $0x1,-0x2c(%rbp)
L68:
  mov    -0x3c(%rbp),%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L137
  addl   $0x1,-0x30(%rbp)
L86:
  mov    -0x3c(%rbp),%eax
  cmp    %eax,-0x30(%rbp)
  jl     L8
  movl   $0x0,-0x30(%rbp)
  jmp    L99
L36:
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x14(%rax),%edx
  mov    -0x30(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  shl    $0x3,%rax
  mov    %rax,%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  addl   $0x1,-0x30(%rbp)
L99:
  mov    -0x3c(%rbp),%eax
  cmp    %eax,-0x30(%rbp)
  jl     L36
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L48
  call   <__stack_chk_fail@plt>
L48:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D30
datatype: string
name: extract_symbolic_data
arguments: data_label: D13
datatype: string
name: extract_symbolic_data
arguments: data_label: D32
datatype: string
name: extract_symbolic_data
arguments: data_label: D16
datatype: string

tool: D30: %d %d

tool: D13: %s

tool: D32: %d

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