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

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x127000(%rsp),%r11
L29:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L29
  sub    $0x6b0,%rsp
  mov    $0x9c40,%edx
  mov    $0xff,%esi
  lea    D37(%rip),%r12
  lea    D40(%rip),%rbp
  lea    D161(%rip),%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x1276a8(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r13
  movb   $0x30,0xb(%rsp)
  mov    %r13,%rdi
  call   <memset@plt>
  mov    $0x30,%edx
  nopl   (%rax)
L16:
  lea    D90(%rip),%r14
L83:
  cmp    $0x39,%dl
  je     L84
  mov    %r12,%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  mov    %r14,%rdi
  call   <puts@plt>
  lea    D29(%rip),%rdi
  call   <puts@plt>
  lea    0xb(%rsp),%rsi
  lea    D106(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  movzbl 0xb(%rsp),%edx
  lea    -0x31(%rdx),%eax
  cmp    $0x4,%al
  ja     L83
  lea    D113(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopw   0x0(%rax,%rax,1)
  lea    0x2bf30(%rsp),%rdx
  lea    0xa8760(%rsp),%rcx
  sub    $0x8,%rsp
  mov    %r13,%rsi
  lea    0x124f98(%rsp),%rax
  mov    $0x2710,%edi
  push   %rax
  lea    0x138a0(%rsp),%r9
  lea    0x9c60(%rsp),%r8
  call   <listar@plt>
  pop    %rax
  pop    %rdx
L89:
  movzbl 0xb(%rsp),%edx
  jmp    L16
  cs nopw 0x0(%rax,%rax,1)
  lea    D164(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  lea    D65(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0xc(%rsp),%edi
  mov    $0x2710,%edx
  mov    %r13,%rsi
  call   <existe_legajo@plt>
  cmp    $0x1,%eax
  je     L65
L108:
  mov    0xc(%rsp),%esi
  lea    D121(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L89
  nop
  lea    D146(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  lea    D65(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0xc(%rsp),%edi
  mov    $0x2710,%edx
  mov    %r13,%rsi
  call   <existe_legajo@plt>
  cmp    $0x1,%eax
  jne    L108
  lea    D136(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xa8760(%rsp),%rcx
  lea    0x2bf30(%rsp),%rdx
  sub    $0x8,%rsp
  lea    0x124f98(%rsp),%rax
  mov    %r13,%rsi
  push   %rax
  mov    0x1c(%rsp),%edi
  lea    0x138a0(%rsp),%r9
  lea    0x9c60(%rsp),%r8
  call   <alta_modifica@plt>
  pop    %rcx
  pop    %rsi
  jmp    L89
  nopl   (%rax)
  lea    D105(%rip),%rdi
  call   <puts@plt>
  jmp    L89
  nopl   0x0(%rax)
  lea    0xa8760(%rsp),%rcx
  lea    0x2bf30(%rsp),%rdx
  sub    $0x8,%rsp
  mov    $0x1,%edi
  lea    0x124f98(%rsp),%rax
  mov    %r13,%rsi
  push   %rax
  lea    0x138a0(%rsp),%r9
  lea    0x9c60(%rsp),%r8
  call   <alta_modifica@plt>
  pop    %rdi
  pop    %r8
  jmp    L89
  nopw   0x0(%rax,%rax,1)
L65:
  lea    D136(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movslq 0xc(%rsp),%rax
  movl   $0xffffffff,0x10(%rsp,%rax,4)
  jmp    L89
L84:
  xor    %eax,%eax
  mov    $0x63,%edx
  lea    D54(%rip),%rsi
  lea    D99(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  mov    0x1276a8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L69
  add    $0x1276b0,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L69:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D37
data_type: string
name: read_data
arguments: data_label: D40
data_type: string
name: read_data
arguments: data_label: D161
data_type: string
name: read_data
arguments: data_label: D90
data_type: string
name: read_data
arguments: data_label: D29
data_type: string
name: read_data
arguments: data_label: D106
data_type: string
name: read_data
arguments: data_label: D164
data_type: string
name: read_data
arguments: data_label: D65
data_type: string
name: read_data
arguments: data_label: D121
data_type: string
name: read_data
arguments: data_label: D146
data_type: string
name: read_data
arguments: data_label: D136
data_type: string
name: read_data
arguments: data_label: D105
data_type: string
name: read_data
arguments: data_label: D54
data_type: string
name: read_data
arguments: data_label: D99
data_type: string

tool: D37: 
1-ALTA

tool: D40: 2-EDITAR

tool: D161: 3-BAJA

tool: D90: 4-LISTAR

tool: D29: 9-SALIR

tool: D106: %c

tool: D164: 
Legajo a eliminar:

tool: D65: %d

tool: D121: 
El legajo %d no existe

tool: D146: 
Legajo a editar:

tool: D136: 
Existe

tool: D105: 
GUARDADO

tool: D54: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/josemax15/laboratorio_1_utnfra/refs/heads/master/practica_primer_examen/main.c

tool: D99: 

--PAUSE- file: %s line:%d


assistant: ```c
int main(void) {
  char pregunta = '0';
  int proximo_legajo = 1;
  int legajo[10000];
  char nombre[10000][51];
  char apellido[10000][51];
  float salario[10000];
  char fecha[10000][10];
  char sector[10000];
  int pregunta_legajo;
  int i;
  for (i = 0; i < 10000; i++) {
    legajo[i] = -1;
  }
  while (pregunta != '9') {
    printf("\n1-ALTA\n");
    printf("2-EDITAR\n");
    printf("3-BAJA\n");
    printf("4-LISTAR\n");
    printf("9-SALIR\n");
    scanf("%c", &pregunta);
    switch (pregunta) {
    case '1':
      alta_modifica(proximo_legajo, legajo, nombre, apellido, salario, fecha, sector);
      break;
    case '2':
      printf("\nLegajo a editar:");
      scanf("%d", &pregunta_legajo);
      if (existe_legajo(pregunta_legajo, legajo, 10000) == 1) {
        printf("\nExiste");
        alta_modifica(pregunta_legajo, legajo, nombre, apellido, salario, fecha, sector);
      } else {
        printf("\nEl legajo %d no existe", pregunta_legajo);
      }
      break;
    case '3':
      printf("\nLegajo a eliminar:");
      scanf("%d", &pregunta_legajo);
      if (existe_legajo(pregunta_legajo, legajo, 10000) == 1) {
        printf("\nExiste");
        legajo[pregunta_legajo] = -1;
      } else {
        printf("\nEl legajo %d no existe", pregunta_legajo);
      }
      break;
      break;
    case '4':
      listar(10000, legajo, nombre, apellido, salario, fecha, sector);
      break;
    case '5':
      printf("\nGUARDADO\n");
      break;
    }
  }
  do {
    printf("\n\n--PAUSE- file: %s line:%d\n", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/josemax15/laboratorio_1_utnfra/refs/heads/master/practica_primer_examen/main.c", 99);
    getchar();
  } while (0);
  return 0;
}
```