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

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x800000,%edi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  call   <malloc@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L87
L78:
  xor    %eax,%eax
  call   <skiplist_new@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L94
L21:
  lea    D11(%rip),%rdi
  lea    0x18(%rsp),%r15
  mov    %rbx,%rbp
  mov    %rbx,%r14
  call   <puts@plt>
  mov    $0x200000,%esi
  xor    %eax,%eax
  lea    D83(%rip),%rdi
  call   <printf@plt>
  xor    %edi,%edi
  lea    0x800000(%rbx),%r13
  call   <time@plt>
  mov    %eax,%edi
  call   <srandom@plt>
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <gettimeofday@plt>
  nopl   0x0(%rax)
L18:
  xor    %eax,%eax
  add    $0x4,%r14
  call   <random@plt>
  mov    %r12,%rdi
  mov    %eax,-0x4(%r14)
  mov    %eax,%esi
  mov    %eax,%edx
  call   <skiplist_insert@plt>
  cmp    %r13,%r14
  jne    L18
  lea    0x20(%rsp),%rax
  xor    %esi,%esi
  mov    %rbx,%r14
  mov    %rax,%rdi
  mov    %rax,0x8(%rsp)
  lea    D31(%rip),%rbx
  call   <gettimeofday@plt>
  mov    0x24(%rsp),%edx
  sub    0x1c(%rsp),%edx
  lea    D47(%rip),%rdi
  movslq %edx,%rax
  mov    0x20(%rsp),%esi
  sub    0x18(%rsp),%esi
  sar    $0x1f,%edx
  imul   $0x10624dd3,%rax,%rax
  imul   $0x3e8,%esi,%esi
  sar    $0x26,%rax
  sub    %edx,%eax
  add    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D60(%rip),%rdi
  call   <puts@plt>
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <gettimeofday@plt>
  jmp    L59
  nopw   0x0(%rax,%rax,1)
L73:
  add    $0x4,%r14
  cmp    %r13,%r14
  je     L22
L59:
  mov    (%r14),%esi
  mov    %r12,%rdi
  call   <skiplist_search@plt>
  test   %rax,%rax
  jne    L73
  mov    (%r14),%esi
  mov    %rbx,%rdi
  add    $0x4,%r14
  call   <printf@plt>
  cmp    %r13,%r14
  jne    L59
L22:
  mov    0x8(%rsp),%rdi
  xor    %esi,%esi
  call   <gettimeofday@plt>
  mov    0x24(%rsp),%edx
  sub    0x1c(%rsp),%edx
  lea    D61(%rip),%rdi
  movslq %edx,%rax
  mov    0x20(%rsp),%esi
  sub    0x18(%rsp),%esi
  sar    $0x1f,%edx
  imul   $0x10624dd3,%rax,%rax
  imul   $0x3e8,%esi,%esi
  sar    $0x26,%rax
  sub    %edx,%eax
  add    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D36(%rip),%rdi
  call   <puts@plt>
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <gettimeofday@plt>
  nopl   0x0(%rax,%rax,1)
L100:
  mov    0x0(%rbp),%esi
  mov    %r12,%rdi
  add    $0x4,%rbp
  call   <skiplist_remove@plt>
  cmp    %r13,%rbp
  jne    L100
  mov    0x8(%rsp),%rdi
  xor    %esi,%esi
  call   <gettimeofday@plt>
  mov    0x24(%rsp),%edx
  sub    0x1c(%rsp),%edx
  lea    D47(%rip),%rdi
  movslq %edx,%rax
  mov    0x20(%rsp),%esi
  sub    0x18(%rsp),%esi
  sar    $0x1f,%edx
  imul   $0x10624dd3,%rax,%rax
  imul   $0x3e8,%esi,%esi
  sar    $0x26,%rax
  sub    %edx,%eax
  add    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D66(%rip),%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  call   <skiplist_delete@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L20
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L87:
  or     $0xffffffff,%edi
  call   <exit@plt>
  jmp    L78
L94:
  or     $0xffffffff,%edi
  call   <exit@plt>
  jmp    L21
L20:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D11
data_type: string
name: read_data
arguments: data_label: D83
data_type: string
name: read_data
arguments: data_label: D31
data_type: string
name: read_data
arguments: data_label: D47
data_type: string
name: read_data
arguments: data_label: D60
data_type: string
name: read_data
arguments: data_label: D61
data_type: string
name: read_data
arguments: data_label: D36
data_type: string
name: read_data
arguments: data_label: D66
data_type: string

tool: D11: Test start!

tool: D83: Add %d nodes...


tool: D31: Not found:0x%08x


tool: D47: time span: %ldms


tool: D60: Now search each node...

tool: D61: time span:% ldms


tool: D36: Now remove all nodes...

tool: D66: End of Test.

assistant: ```c
int main(void) {
  int i;
  struct timeval start, end;
  int *key = malloc(2 * 1024 * 1024 * sizeof(int));
  if (key == NULL) {
    exit(-1);
  }
  struct skiplist *list = skiplist_new();
  if (list == NULL) {
    exit(-1);
  }
  printf("Test start!\n");
  printf("Add %d nodes...\n", 2 * 1024 * 1024);
  srandom(time(NULL));
  gettimeofday(&start, NULL);
  for (i = 0; i < 2 * 1024 * 1024; i++) {
    int value = key[i] = (int)random();
    skiplist_insert(list, key[i], value);
  }
  gettimeofday(&end, NULL);
  printf("time span: %ldms\n", (end.tv_sec - start.tv_sec) * 1000 + (end.tv_usec - start.tv_usec) / 1000);
  printf("Now search each node...\n");
  gettimeofday(&start, NULL);
  for (i = 0; i < 2 * 1024 * 1024; i++) {
    struct skipnode *node = skiplist_search(list, key[i]);
    if (node != NULL) {
    } else {
      printf("Not found:0x%08x\n", key[i]);
    }
  }
  gettimeofday(&end, NULL);
  printf("time span:% ldms\n", (end.tv_sec - start.tv_sec) * 1000 + (end.tv_usec - start.tv_usec) / 1000);
  printf("Now remove all nodes...\n");
  gettimeofday(&start, NULL);
  for (i = 0; i < 2 * 1024 * 1024; i++) {
    skiplist_remove(list, key[i]);
  }
  gettimeofday(&end, NULL);
  printf("time span: %ldms\n", (end.tv_sec - start.tv_sec) * 1000 + (end.tv_usec - start.tv_usec) / 1000);
  printf("End of Test.\n");
  skiplist_delete(list);
  return 0;
}
```