user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  jg     L4
  lea    0x28(%rsp),%rdi
  xor    %esi,%esi
  mov    $0x32,%ebp
  mov    $0x64,%ebx
  call   <gettimeofday@plt>
  mov    $0x32,%esi
  mov    $0x1,%eax
  movss  D24(%rip),%xmm0
  lea    D5(%rip),%rdi
  call   <printf@plt>
  mov    $0x190,%edi
  call   <malloc@plt>
  mov    %rax,%r12
L141:
  xor    %r13d,%r13d
  nop
L82:
  mov    %r13d,%edi
  imul   %r13d,%edi
  call   <srand@plt>
  xor    %eax,%eax
  call   <rand@plt>
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x10624dd3,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x26,%rdx
  sub    %ecx,%edx
  imul   $0x3e8,%edx,%edx
  sub    %edx,%eax
  mov    %eax,(%r12,%r13,4)
  add    $0x1,%r13
  cmp    %r13d,%ebx
  ja     L82
  lea    0x0(,%rbp,4),%edi
  call   <malloc@plt>
  mov    %rax,%r14
  test   %ebp,%ebp
  je     L39
  lea    0x4(%r12),%r13
  lea    -0x1(%rbp),%r15d
  sub    %r13,%rax
  cmp    $0x8,%rax
  jbe    L72
  cmp    $0x2,%r15d
  jbe    L72
  mov    %ebp,%edx
  mov    %r12,%rcx
  mov    %r14,%rax
  shr    $0x2,%edx
  sub    %r14,%rcx
  shl    $0x4,%rdx
  add    %r14,%rdx
  nopl   0x0(%rax)
L223:
  movdqu (%rax,%rcx,1),%xmm3
  add    $0x10,%rax
  movups %xmm3,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L223
  mov    %ebp,%eax
  and    $0xfffffffc,%eax
  test   $0x80000003,%ebp
  je     L5
  mov    %eax,%ecx
  mov    (%r12,%rcx,4),%esi
  lea    0x0(,%rcx,4),%rdx
  mov    %esi,(%r14,%rcx,4)
  lea    0x1(%rax),%ecx
  cmp    %ebp,%ecx
  jae    L5
  mov    0x4(%r12,%rdx,1),%ecx
  add    $0x2,%eax
  mov    %ecx,0x4(%r14,%rdx,1)
  cmp    %ebp,%eax
  jae    L5
  mov    0x8(%r12,%rdx,1),%eax
  mov    %eax,0x8(%r14,%rdx,1)
L5:
  mov    %ebp,%esi
  mov    %r14,%rdi
  call   <sort_desc@plt>
  mov    %r15d,%eax
  lea    (%r14,%rax,4),%rcx
  cmp    %ebp,%ebx
  jbe    L73
L195:
  sub    $0x1,%ebx
  mov    %ebp,%edx
  mov    (%rcx),%eax
  sub    %ebp,%ebx
  lea    (%r12,%rdx,4),%r12
  add    %rbx,%rdx
  movslq %r15d,%rbx
  mov    %rbx,0x10(%rsp)
  shl    $0x2,%rbx
  lea    0x0(%r13,%rdx,4),%r13
  mov    %rbx,0x18(%rsp)
  jmp    L215
  nopl   0x0(%rax)
L184:
  add    $0x4,%r12
  cmp    %r13,%r12
  je     L234
L215:
  mov    (%r12),%edx
  cmp    %eax,%edx
  jle    L184
  cmp    $0xffffffff,%r15d
  je     L29
  mov    0x10(%rsp),%rax
  jmp    L98
  xchg   %ax,%ax
L253:
  sub    $0x1,%rax
  cmp    $0xffffffff,%eax
  je     L65
L98:
  mov    %eax,%esi
  cmp    (%r14,%rax,4),%edx
  jge    L253
  add    $0x1,%esi
  movslq %esi,%rax
  lea    (%r14,%rax,4),%rbx
L0:
  cmp    %r15d,%esi
  jge    L236
  lea    -0x2(%rbp),%eax
  xor    %r10d,%r10d
  mov    %rcx,0x8(%rsp)
  mov    %eax,%edx
  sub    %esi,%edx
  mov    %rdx,%rdi
  lea    0x4(,%rdx,4),%rdx
  neg    %rdi
  shl    $0x2,%rdi
  cmp    %eax,%esi
  cmovg  %r10,%rdi
  add    0x18(%rsp),%rdi
  cmp    %eax,%esi
  mov    $0x4,%eax
  cmovg  %rax,%rdx
  lea    -0x4(%r14,%rdi,1),%rsi
  add    %r14,%rdi
  call   <memmove@plt>
  mov    (%r12),%edx
  mov    0x8(%rsp),%rcx
L236:
  add    $0x4,%r12
  mov    %edx,(%rbx)
  mov    (%rcx),%eax
  cmp    %r13,%r12
  jne    L215
L234:
  pxor   %xmm0,%xmm0
  lea    D16(%rip),%rdi
  cvtsi2ss %eax,%xmm0
  mov    $0x1,%eax
  call   <printf@plt>
  lea    0x30(%rsp),%rdi
  xor    %esi,%esi
  call   <gettimeofday@plt>
  movss  0x34(%rsp),%xmm1
  subss  0x2c(%rsp),%xmm1
  lea    D15(%rip),%rdi
  movss  D22(%rip),%xmm2
  movss  0x30(%rsp),%xmm0
  mov    $0x1,%eax
  subss  0x28(%rsp),%xmm0
  divss  %xmm2,%xmm1
  mulss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  call   <printf@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L25
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L65:
  mov    %r14,%rbx
  xor    %esi,%esi
  jmp    L0
L4:
  mov    0x8(%rsi),%rdi
  call   <atoi@plt>
  lea    0x28(%rsp),%rdi
  xor    %esi,%esi
  mov    %eax,%ebx
  mov    %eax,%ebp
  call   <gettimeofday@plt>
  mov    %ebx,%eax
  pxor   %xmm0,%xmm0
  shr    %ebp
  cvtsi2ss %rax,%xmm0
  mov    %ebp,%esi
  mov    $0x1,%eax
  lea    D5(%rip),%rdi
  call   <printf@plt>
  lea    0x0(,%rbx,4),%edi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %ebx,%ebx
  jne    L141
  xor    %edi,%edi
  call   <malloc@plt>
  xor    %esi,%esi
  mov    %rax,%rdi
  mov    %rax,%rbx
  call   <sort_desc@plt>
  mov    $0xffffffff,%eax
  shl    $0x2,%rax
  lea    (%rbx,%rax,1),%rcx
L73:
  mov    (%rcx),%eax
  jmp    L234
L72:
  mov    %ebp,%eax
  mov    %r12,%rcx
  lea    (%r14,%rax,4),%rsi
  sub    %r14,%rcx
  mov    %r14,%rax
  nopl   0x0(%rax)
L203:
  mov    (%rcx,%rax,1),%edx
  add    $0x4,%rax
  mov    %edx,-0x4(%rax)
  cmp    %rsi,%rax
  jne    L203
  jmp    L5
L29:
  mov    %r14,%rbx
  jmp    L236
L39:
  xor    %esi,%esi
  mov    %rax,%rdi
  lea    0x4(%r12),%r13
  or     $0xffffffff,%r15d
  call   <sort_desc@plt>
  mov    $0xffffffff,%ecx
  lea    (%r14,%rcx,4),%rcx
  jmp    L195
L25:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D24
type_guessed: byte[4]
name: unpack_data
arguments: tag: D5
type_guessed: string
name: unpack_data
arguments: tag: D16
type_guessed: string
name: unpack_data
arguments: tag: D15
type_guessed: string
name: unpack_data
arguments: tag: D22
type_guessed: byte[4]

tool: {"D24": [0x00,0x00,0xc8,0x42]}

tool: D5: N=%u,k=%u


tool: D16: %d


tool: D15: costs %lfms


tool: {"D22": [0x00,0x00,0x7a,0x44]}

assistant: ```c
int main(int argc, char *argv[]) {
  unsigned N = 100, k;
  int *arr, *tmp;
  int i = 0, j, m;
  struct timeval start, end;
  if (argc > 1) {
    N = atoi(argv[1]);
  }
  k = N / 2;
  gettimeofday(&start, NULL);
  printf("N=%u,k=%u\n", N, k);
  arr = (int *)malloc(N * sizeof(int));
  for (i = 0; i < N; ++i) {
    srand(i * i);
    arr[i] = rand() % 1000;
  }
  tmp = (int *)malloc(k * sizeof(int));
  for (i = 0; i < k; ++i) {
    tmp[i] = arr[i];
  }
  sort_desc(tmp, k);
  for (i = k; i < N; ++i) {
    if (arr[i] > tmp[k - 1]) {
      int pos = 0;
      for (j = k - 1; j >= 0; --j) {
        if (tmp[j] > arr[i]) {
          pos = j + 1;
          break;
        }
      }
      for (m = k - 1; m >= pos + 1; --m) {
        tmp[m] = tmp[m - 1];
      }
      tmp[pos] = arr[i];
    }
  }
  printf("%d\n", tmp[k - 1]);
  gettimeofday(&end, NULL);
  printf("costs %lfms\n", 1e3f * (end.tv_sec - start.tv_sec) + ((end.tv_usec - start.tv_usec) / 1e3f));
  return 0;
}
```