user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %edi,-0x74(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  cmpl   $0x3,-0x74(%rbp)
  je     L77
  mov    -0x80(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D117(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D163(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D59(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L113
L77:
  mov    -0x80(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  mov    %al,-0x6d(%rbp)
  cmpb   $0x73,-0x6d(%rbp)
  je     L218
  cmpb   $0x69,-0x6d(%rbp)
  je     L218
  cmpb   $0x6d,-0x6d(%rbp)
  je     L218
  cmpb   $0x71,-0x6d(%rbp)
  je     L218
  cmpb   $0x74,-0x6d(%rbp)
  je     L218
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L113
L218:
  mov    -0x80(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    -0x58(%rbp),%rdx
  lea    D94(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    -0x58(%rbp),%rdx
  cmpb   $0x73,-0x6d(%rbp)
  je     L36
  cmpb   $0x69,-0x6d(%rbp)
  je     L134
  cmpb   $0x6d,-0x6d(%rbp)
  je     L204
  cmpb   $0x71,-0x6d(%rbp)
  jne    L362
  lea    D184(%rip),%rax
  jmp    L158
L362:
  lea    D178(%rip),%rax
  jmp    L158
L204:
  lea    D86(%rip),%rax
  jmp    L158
L134:
  lea    D175(%rip),%rax
  jmp    L158
L36:
  lea    D57(%rip),%rax
L158:
  movq   %rdx,%xmm0
  mov    %rax,%rsi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  call   <tempo@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movl   $0x7d0,-0x6c(%rbp)
  jmp    L340
L377:
  mov    -0x6c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jne    L206
  mov    -0x6c(%rbp),%eax
  mov    %eax,%esi
  lea    D153(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L113
L206:
  mov    -0x6c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  jne    L10
  mov    -0x6c(%rbp),%eax
  mov    %eax,%esi
  lea    D141(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L113
L10:
  mov    -0x6c(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <vetor_rand@plt>
  mov    -0x6c(%rbp),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <vetor_copy@plt>
  cmpb   $0x73,-0x6d(%rbp)
  je     L193
  cmpb   $0x74,-0x6d(%rbp)
  jne    L297
L193:
  mov    $0x0,%eax
  call   <tempo@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x6c(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <Selecao@plt>
  mov    $0x0,%eax
  call   <tempo@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm4
  subsd  -0x18(%rbp),%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  call   <abst@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x48(%rbp),%rsi
  mov    -0x6c(%rbp),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  movq   %rsi,%xmm0
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <num_buscas@plt>
  mov    %eax,-0x68(%rbp)
  cmpb   $0x74,-0x6d(%rbp)
  je     L237
  mov    -0x68(%rbp),%edx
  mov    -0x48(%rbp),%rcx
  mov    -0x6c(%rbp),%eax
  movq   %rcx,%xmm0
  mov    %eax,%esi
  lea    D110(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L237:
  cmpb   $0x73,-0x6d(%rbp)
  je     L297
  mov    -0x6c(%rbp),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <vetor_copy@plt>
L297:
  cmpb   $0x69,-0x6d(%rbp)
  je     L56
  cmpb   $0x74,-0x6d(%rbp)
  jne    L120
L56:
  mov    $0x0,%eax
  call   <tempo@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x6c(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <Insercao@plt>
  mov    $0x0,%eax
  call   <tempo@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm5
  subsd  -0x18(%rbp),%xmm5
  movq   %xmm5,%rax
  movq   %rax,%xmm0
  call   <abst@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x40(%rbp),%rsi
  mov    -0x6c(%rbp),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  movq   %rsi,%xmm0
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <num_buscas@plt>
  mov    %eax,-0x64(%rbp)
  cmpb   $0x74,-0x6d(%rbp)
  je     L61
  mov    -0x64(%rbp),%edx
  mov    -0x40(%rbp),%rcx
  mov    -0x6c(%rbp),%eax
  movq   %rcx,%xmm0
  mov    %eax,%esi
  lea    D146(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L61:
  cmpb   $0x69,-0x6d(%rbp)
  je     L120
  mov    -0x6c(%rbp),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <vetor_copy@plt>
L120:
  cmpb   $0x6d,-0x6d(%rbp)
  je     L57
  cmpb   $0x74,-0x6d(%rbp)
  jne    L157
L57:
  mov    $0x0,%eax
  call   <tempo@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x6c(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdx
  mov    %ecx,%esi
  mov    $0x0,%edi
  call   <Mergesort@plt>
  mov    $0x0,%eax
  call   <tempo@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm6
  subsd  -0x18(%rbp),%xmm6
  movq   %xmm6,%rax
  movq   %rax,%xmm0
  call   <abst@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x38(%rbp),%rsi
  mov    -0x6c(%rbp),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  movq   %rsi,%xmm0
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <num_buscas@plt>
  mov    %eax,-0x60(%rbp)
  cmpb   $0x74,-0x6d(%rbp)
  je     L1
  mov    -0x60(%rbp),%edx
  mov    -0x38(%rbp),%rcx
  mov    -0x6c(%rbp),%eax
  movq   %rcx,%xmm0
  mov    %eax,%esi
  lea    D180(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L1:
  cmpb   $0x6d,-0x6d(%rbp)
  je     L157
  mov    -0x6c(%rbp),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <vetor_copy@plt>
L157:
  cmpb   $0x71,-0x6d(%rbp)
  je     L238
  cmpb   $0x74,-0x6d(%rbp)
  jne    L313
L238:
  mov    $0x0,%eax
  call   <tempo@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x6c(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdx
  mov    %ecx,%esi
  mov    $0x0,%edi
  call   <Quicksort@plt>
  mov    $0x0,%eax
  call   <tempo@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm7
  subsd  -0x18(%rbp),%xmm7
  movq   %xmm7,%rax
  movq   %rax,%xmm0
  call   <abst@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rsi
  mov    -0x6c(%rbp),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  movq   %rsi,%xmm0
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <num_buscas@plt>
  mov    %eax,-0x5c(%rbp)
  cmpb   $0x74,-0x6d(%rbp)
  je     L278
  mov    -0x5c(%rbp),%edx
  mov    -0x10(%rbp),%rcx
  mov    -0x6c(%rbp),%eax
  movq   %rcx,%xmm0
  mov    %eax,%esi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L278:
  cmpb   $0x74,-0x6d(%rbp)
  jne    L313
  movsd  -0x10(%rbp),%xmm2
  movsd  -0x38(%rbp),%xmm1
  movsd  -0x48(%rbp),%xmm0
  mov    -0x40(%rbp),%rdx
  mov    -0x6c(%rbp),%eax
  movapd %xmm2,%xmm3
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rdx,%xmm0
  mov    %eax,%esi
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  mov    $0x4,%eax
  call   <printf@plt>
  mov    -0x5c(%rbp),%esi
  mov    -0x60(%rbp),%ecx
  mov    -0x68(%rbp),%edx
  mov    -0x64(%rbp),%eax
  mov    %esi,%r8d
  mov    %eax,%esi
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L313:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  call   <tempo@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  addl   $0x7d0,-0x6c(%rbp)
L340:
  movsd  -0x58(%rbp),%xmm0
  comisd -0x50(%rbp),%xmm0
  ja     L377
  mov    $0x0,%eax
L113:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L224
  call   <__stack_chk_fail@plt>
L224:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D117
type_infered: string
name: read_data
arguments: label: D163
type_infered: string
name: read_data
arguments: label: D59
type_infered: string
name: read_data
arguments: label: D33
type_infered: string
name: read_data
arguments: label: D94
type_infered: string
name: read_data
arguments: label: D184
type_infered: string
name: read_data
arguments: label: D178
type_infered: string
name: read_data
arguments: label: D86
type_infered: string
name: read_data
arguments: label: D175
type_infered: string
name: read_data
arguments: label: D57
type_infered: string
name: read_data
arguments: label: D5
type_infered: string
name: read_data
arguments: label: D153
type_infered: string
name: read_data
arguments: label: D141
type_infered: string
name: read_data
arguments: label: D110
type_infered: string
name: read_data
arguments: label: D146
type_infered: string
name: read_data
arguments: label: D180
type_infered: string
name: read_data
arguments: label: D8
type_infered: string
name: read_data
arguments: label: D23
type_infered: string
name: read_data
arguments: label: D49
type_infered: string

tool: D117: Uso: %s tipo duracao


tool: D163:    tipo: s(elecao) ou i(nsercao) ou m(ergesort) ou q(uicksort) ou t(odos)

tool: D59:    duracao: duracao em segundos

tool: D33: opcao nao valida

tool: D94: %lf

tool: D184: quicksort

tool: D178: todos

tool: D86: mergesort

tool: D175: insercao

tool: D57: selecao

tool: D5: |-------------------------[EP1 - Vale a pena ordenar?]--------------------|
|  Algoritmo escolhido: %10s     Duracao dos testes: %9.2f                |
|            Tempos de Ordenacao                 Numero de Buscas         |
|            nome: Anderson Silva de Albuquerque                          |
|-------------------------------------------------------------------------|
|   n   | Insercao Selecao Merge. Quick. | Insercao Selecao Merge. Quick. |
|-------|-----------------------------------------------------------------|


tool: D153: Erro na alocacao de memoria para o vetor v com %d elementos.


tool: D141: Erro na alocacao de memoria para o vetor v_aux com %d elementos.


tool: D110: %d  	            %4.2f                              %d	


tool: D146: %d  	    %4.2f                              %d	


tool: D180: %d			   %4.2f				    %d	


tool: D8: %d 		                   %4.2f                	           %d	


tool: D23: %d	   %4.2f	   %4.2f	   %4.2f	   %4.2f

tool: D49: 	 %d	 %d	 %d	 %d


assistant: ```c
int main(int argc, char **argv) {
  double duracao, tempo_inicial, tempo_total, inicio_temp, tempo_ordenacao_sel, tempo_ordenacao_ins, tempo_ordenacao_merge, tempo_ordenacao_quick;
  int n, *v, *v_aux, buscas_sel, buscas_ins, buscas_merge, buscas_quick;
  char algoritmo;
  srand(time(NULL));
  if (argc != 3) {
    printf("Uso: %s tipo duracao\n", argv[0]);
    printf("   tipo: s(elecao) ou i(nsercao) ou m(ergesort) ou q(uicksort) ou t(odos)\n");
    printf("   duracao: duracao em segundos\n");
    return (0);
  }
  algoritmo = argv[1][0];
  if (algoritmo != 's' && algoritmo != 'i' && algoritmo != 'm' && algoritmo != 'q' && algoritmo != 't') {
    printf("opcao nao valida\n");
    return (-1);
  }
  sscanf(argv[2], "%lf", &duracao);
  printf("|-------------------------[EP1 - Vale a pena ordenar?]--------------------|\n"
         "|  Algoritmo escolhido: %10s     Duracao dos testes: %9.2f                |\n"
         "|            Tempos de Ordenacao                 Numero de Buscas         |\n"
         "|            nome: Anderson Silva de Albuquerque                          |\n"
         "|-------------------------------------------------------------------------|\n"
         "|   n   | Insercao Selecao Merge. Quick. | Insercao Selecao Merge. Quick. |\n"
         "|-------|-----------------------------------------------------------------|\n",
         algoritmo == 's'   ? "selecao"
         : algoritmo == 'i' ? "insercao"
         : algoritmo == 'm' ? "mergesort"
         : algoritmo == 'q' ? "quicksort"
                            : "todos",
         duracao);
  tempo_inicial = tempo();
  tempo_total = 0;
  for (n = 2000; tempo_total < duracao; n += 2000) {
    v = malloc(n * sizeof(int));
    if (v == NULL) {
      printf("Erro na alocacao de memoria para o vetor v com %d elementos.\n", n);
      return (-1);
    }
    v_aux = malloc(n * sizeof(int));
    if (v_aux == NULL) {
      printf("Erro na alocacao de memoria para o vetor v_aux com %d elementos.\n", n);
      return (-1);
    }
    vetor_rand(v, n);
    vetor_copy(v, v_aux, n);
    if (algoritmo == 's' || algoritmo == 't') {
      inicio_temp = tempo();
      Selecao(n, v_aux);
      tempo_ordenacao_sel = abst(tempo() - inicio_temp);
      buscas_sel = num_buscas(v, v_aux, n, tempo_ordenacao_sel);
      if (algoritmo != 't') {
        printf("%d  \t            %4.2f                              %d\t\n", n, tempo_ordenacao_sel, buscas_sel);
      }
      if (algoritmo != 's') {
        vetor_copy(v, v_aux, n);
      }
    }
    if (algoritmo == 'i' || algoritmo == 't') {
      inicio_temp = tempo();
      Insercao(n, v_aux);
      tempo_ordenacao_ins = abst(tempo() - inicio_temp);
      buscas_ins = num_buscas(v, v_aux, n, tempo_ordenacao_ins);
      if (algoritmo != 't') {
        printf("%d  \t    %4.2f                              %d\t\n", n, tempo_ordenacao_ins, buscas_ins);
      }
      if (algoritmo != 'i') {
        vetor_copy(v, v_aux, n);
      }
    }
    if (algoritmo == 'm' || algoritmo == 't') {
      inicio_temp = tempo();
      Mergesort(0, n - 1, v_aux);
      tempo_ordenacao_merge = abst(tempo() - inicio_temp);
      buscas_merge = num_buscas(v, v_aux, n, tempo_ordenacao_merge);
      if (algoritmo != 't') {
        printf("%d\t\t\t   %4.2f\t\t\t\t    %d\t\n", n, tempo_ordenacao_merge, buscas_merge);
      }
      if (algoritmo != 'm') {
        vetor_copy(v, v_aux, n);
      }
    }
    if (algoritmo == 'q' || algoritmo == 't') {
      inicio_temp = tempo();
      Quicksort(0, n - 1, v_aux);
      tempo_ordenacao_quick = abst(tempo() - inicio_temp);
      buscas_quick = num_buscas(v, v_aux, n, tempo_ordenacao_quick);
      if (algoritmo != 't') {
        printf("%d \t\t                   %4.2f                \t           %d\t\n", n, tempo_ordenacao_quick, buscas_quick);
      }
      if (algoritmo == 't') {
        printf("%d\t   %4.2f\t   %4.2f\t   %4.2f\t   %4.2f", n, tempo_ordenacao_ins, tempo_ordenacao_sel, tempo_ordenacao_merge, tempo_ordenacao_quick);
        printf("\t %d\t %d\t %d\t %d\n", buscas_ins, buscas_sel, buscas_merge, buscas_quick);
      }
    }
    free(v);
    free(v_aux);
    tempo_total = tempo() - tempo_inicial;
  }
  return (0);
}
```