user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0x7000(%rsp),%r11
L56:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L56
  sub    $0xd20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  movl   $0xfa0,-0x7d14(%rbp)
  movl   $0x0,-0x7d18(%rbp)
  jmp    L31
L71:
  mov    $0x0,%eax
  call   <rand@plt>
  mov    -0x7d14(%rbp),%edx
  lea    (%rdx,%rdx,1),%ecx
  cltd
  idiv   %ecx
  mov    %edx,%eax
  lea    0x1(%rax),%edx
  mov    -0x7d18(%rbp),%eax
  cltq
  mov    %edx,-0x7d10(%rbp,%rax,4)
  mov    -0x7d18(%rbp),%eax
  cltq
  mov    -0x7d10(%rbp,%rax,4),%edx
  mov    -0x7d18(%rbp),%eax
  cltq
  mov    %edx,-0x3e90(%rbp,%rax,4)
  addl   $0x1,-0x7d18(%rbp)
L31:
  mov    -0x7d18(%rbp),%eax
  cmp    -0x7d14(%rbp),%eax
  jl     L71
  mov    -0x7d14(%rbp),%eax
  mov    %eax,%esi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x7d18(%rbp)
  jmp    L21
L77:
  mov    -0x7d18(%rbp),%eax
  cltq
  mov    -0x7d10(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x7d18(%rbp)
L21:
  mov    -0x7d18(%rbp),%eax
  cmp    -0x7d14(%rbp),%eax
  jl     L77
  mov    -0x7d14(%rbp),%edx
  lea    -0x7d10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <bubbleSort@plt>
  mov    -0x7d14(%rbp),%edx
  lea    -0x3e90(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <impBsort@plt>
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x7d18(%rbp)
  jmp    L73
L26:
  mov    -0x7d18(%rbp),%eax
  cltq
  mov    -0x7d10(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x7d18(%rbp)
L73:
  mov    -0x7d18(%rbp),%eax
  cmp    -0x7d14(%rbp),%eax
  jl     L26
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L69
  call   <__stack_chk_fail@plt>
L69:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D24
type_infered: string
name: extract_symbolic_data
arguments: label: D15
type_infered: string
name: extract_symbolic_data
arguments: label: D7
type_infered: string
name: extract_symbolic_data
arguments: label: D30
type_infered: string

tool: D24: N = %d
Array is:


tool: D15: %d 

tool: D7: 

Sorted Array is: 

tool: D30: 

[Press Enter to close]

assistant: ```c
int main() {
  srand(time(NULL));
  int i, myarray[4000], myarray2[4000];
  int n = 4000;
  for (i = 0; i < n; i++) {
    myarray[i] = (rand() % (n * 2)) + 1;
    myarray2[i] = myarray[i];
  }
  printf("N = %d\nArray is:\n", n);
  for (i = 0; i < n; i++) {
    printf("%d ", myarray[i]);
  }
  bubbleSort(myarray, n);
  impBsort(myarray2, n);
  printf("\n\nSorted Array is: \n");
  for (i = 0; i < n; i++) {
    printf("%d ", myarray[i]);
  }
  printf("\n\n[Press Enter to close]");
  getchar();
  return 0;
}
```