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

```asm
<test_mink>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0xd8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  D129(%rip),%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  D28(%rip),%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  D27(%rip),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  D127(%rip),%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movsd  D70(%rip),%xmm0
  movsd  %xmm0,-0x68(%rbp)
  movsd  D4(%rip),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  D115(%rip),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  D58(%rip),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  D96(%rip),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  lea    -0xb0(%rbp),%rsi
  lea    -0x90(%rbp),%rax
  mov    $0x5,%ecx
  mov    $0xa,%edx
  mov    %rax,%rdi
  call   <mink@plt>
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0xe0(%rbp)
  jmp    L57
L8:
  mov    -0xe0(%rbp),%eax
  cltq
  mov    -0xb0(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0xe0(%rbp)
L57:
  cmpl   $0x4,-0xe0(%rbp)
  jle    L8
  lea    D75(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x186a0,-0xdc(%rbp)
  mov    -0xdc(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0xd8(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0xf0(%rbp)
  movq   $0x0,-0xe8(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x100(%rbp)
  movq   $0x0,-0xf8(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L18:
  cmp    %rdx,%rsp
  je     L7
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L18
L7:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L49
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L49:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0xd0(%rbp)
  movl   $0x0,-0xe0(%rbp)
  jmp    L95
L5:
  mov    $0x1,%esi
  mov    $0x0,%edi
  call   <normrand@plt>
  movq   %xmm0,%rax
  mov    -0xd0(%rbp),%rdx
  mov    -0xe0(%rbp),%ecx
  movslq %ecx,%rcx
  mov    %rax,(%rdx,%rcx,8)
  addl   $0x1,-0xe0(%rbp)
L95:
  mov    -0xe0(%rbp),%eax
  cmp    -0xdc(%rbp),%eax
  jl     L5
  mov    -0xdc(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0xc8(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L64:
  cmp    %rdx,%rsp
  je     L2
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L64
L2:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L61
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L61:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0xc0(%rbp)
  mov    $0x0,%eax
  call   <get_time_ms@plt>
  movq   %xmm0,%rax
  mov    %rax,-0xb8(%rbp)
  mov    -0xdc(%rbp),%edx
  mov    -0xc0(%rbp),%rcx
  mov    -0xd0(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sort_indices@plt>
  mov    $0x0,%eax
  call   <get_time_ms@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  subsd  -0xb8(%rbp),%xmm1
  movq   %xmm1,%rdx
  mov    -0xdc(%rbp),%eax
  movq   %rdx,%xmm0
  mov    %eax,%esi
  lea    D51(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  call   <get_time_ms@plt>
  movq   %xmm0,%rax
  mov    %rax,-0xb8(%rbp)
  mov    -0xdc(%rbp),%edx
  mov    -0xc0(%rbp),%rsi
  mov    -0xd0(%rbp),%rax
  mov    $0x64,%ecx
  mov    %rax,%rdi
  call   <mink@plt>
  mov    $0x0,%eax
  call   <get_time_ms@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm2
  subsd  -0xb8(%rbp),%xmm2
  movq   %xmm2,%rax
  movq   %rax,%xmm0
  mov    $0x64,%esi
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    %rbx,%rsp
  nop
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L98
  call   <__stack_chk_fail@plt>
L98:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D129
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D28
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D27
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D127
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D70
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D4
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D115
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D58
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D96
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D6
datatype: string
name: disassemble_data
arguments: data_tag: D36
datatype: string
name: disassemble_data
arguments: data_tag: D75
datatype: string
name: disassemble_data
arguments: data_tag: D51
datatype: string
name: disassemble_data
arguments: data_tag: D42
datatype: string

tool: {"D129": [0x00,0x00,0x00,0x00,0x00,0x80,0x56,0x40]}

tool: {"D28": [0x00,0x00,0x00,0x00,0x00,0x80,0x51,0x40]}

tool: {"D27": [0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x40]}

tool: {"D127": [0x00,0x00,0x00,0x00,0x00,0x00,0x34,0x40]}

tool: {"D70": [0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x40]}

tool: {"D4": [0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x40]}

tool: {"D115": [0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x40]}

tool: {"D58": [0x00,0x00,0x00,0x00,0x00,0x00,0x49,0x40]}

tool: {"D96": [0x00,0x00,0x00,0x00,0x00,0x00,0x4e,0x40]}

tool: D6: idx = [ 

tool: D36: %d 

tool: D75: ]

tool: D51: sorted %d numbers in %f ms


tool: D42: got the min %d numbers in %f ms


assistant: ```c
void test_mink() {
  double x[10] = {0, 90, 70, 40, 20, 10, 30, 80, 50, 60};
  int idx[5];
  mink(x, idx, 10, 5);
  printf("idx = [ ");
  int i;
  for (i = 0; i < 5; i++)
    printf("%d ", idx[i]);
  printf("]\n");
  int n = 100000;
  double y[n];
  for (i = 0; i < n; i++)
    y[i] = normrand(0, 1);
  int yi[n];
  double t = get_time_ms();
  sort_indices(y, yi, n);
  printf("sorted %d numbers in %f ms\n", n, get_time_ms() - t);
  t = get_time_ms();
  mink(y, yi, n, 100);
  printf("got the min %d numbers in %f ms\n", 100, get_time_ms() - t);
}
```