user: 请从给定的汇编指令推导出C源代码:

```asm
<partition_double>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x38,%rsp
  mov    %rdi,-0x88(%rbp)
  mov    %rsi,-0x90(%rbp)
  mov    %edx,-0x94(%rbp)
  mov    %rcx,-0xa0(%rbp)
  mov    %r8,-0xa8(%rbp)
  mov    %r9,-0xb0(%rbp)
  movl   $0x0,-0x80(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0xa0(%rbp),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x40(%rbp)
  movl   $0x0,-0x7c(%rbp)
  jmp    L18
L6:
  mov    -0x7c(%rbp),%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x7c(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  comisd -0x60(%rbp),%xmm0
  jbe    L155
  mov    -0x7c(%rbp),%eax
  mov    %eax,-0x80(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
L155:
  addl   $0x1,-0x7c(%rbp)
L18:
  mov    -0x7c(%rbp),%eax
  cmp    -0x94(%rbp),%eax
  jl     L6
  mov    -0x80(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x80(%rbp),%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x38(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  jb     L148
  mov    $0x1,%eax
  jmp    L167
L148:
  movsd  -0x38(%rbp),%xmm0
  addsd  -0x30(%rbp),%xmm0
  movsd  D5(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0xa0(%rbp),%rax
  mov    %rax,-0x78(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x70(%rbp)
  jmp    L179
L143:
  mov    -0x94(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x78(%rbp),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x90(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  imul   %rax,%rdx
  mov    -0x80(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x58(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L84
  addq   $0x1,-0x78(%rbp)
  jmp    L179
L84:
  mov    -0x94(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x70(%rbp),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x90(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  imul   %rax,%rdx
  mov    -0x80(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x58(%rbp),%xmm0
  jb     L59
  cmpq   $0x0,-0x70(%rbp)
  je     L80
  subq   $0x1,-0x70(%rbp)
  jmp    L179
L59:
  mov    -0x78(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x70(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    -0x78(%rbp),%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x90(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x70(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rax,(%rdx)
  addq   $0x1,-0x78(%rbp)
  subq   $0x1,-0x70(%rbp)
L179:
  mov    -0x78(%rbp),%rax
  cmp    -0x70(%rbp),%rax
  jbe    L143
  jmp    L142
L80:
  nop
L142:
  mov    -0x78(%rbp),%rax
  cmp    -0xa0(%rbp),%rax
  jne    L108
  mov    -0xa0(%rbp),%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x94(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x50(%rbp),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x90(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  imul   %rax,%rdx
  mov    -0x80(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0xa0(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x68(%rbp)
  jmp    L79
L149:
  mov    -0x94(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x68(%rbp),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x90(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  imul   %rax,%rdx
  mov    -0x80(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x58(%rbp),%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L33
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x50(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
L33:
  addq   $0x1,-0x68(%rbp)
L79:
  mov    -0x68(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jbe    L149
  mov    -0x50(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0xa0(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    -0x50(%rbp),%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x90(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0xa0(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0xa0(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x78(%rbp)
  jmp    L185
L108:
  mov    -0x40(%rbp),%rax
  add    $0x1,%rax
  cmp    %rax,-0x78(%rbp)
  jne    L185
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x94(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x90(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  imul   %rax,%rdx
  mov    -0x80(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0xa0(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  jmp    L16
L184:
  mov    -0x94(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x68(%rbp),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x90(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  imul   %rax,%rdx
  mov    -0x80(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  comisd -0x58(%rbp),%xmm0
  jbe    L170
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
L170:
  addq   $0x1,-0x68(%rbp)
L16:
  mov    -0x68(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jb     L184
  mov    -0x48(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    -0x48(%rbp),%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x90(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x78(%rbp)
L185:
  mov    0x10(%rbp),%rax
  mov    -0x80(%rbp),%edx
  mov    %edx,(%rax)
  mov    0x18(%rbp),%rax
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x78(%rbp),%rax
  sub    -0xa0(%rbp),%rax
  mov    %rax,%rdx
  mov    0x20(%rbp),%rax
  mov    %rdx,(%rax)
  mov    $0x0,%eax
L167:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D5
type: f32[2]

tool: {"D5": [0.0,2.0]}

assistant: ```c
int partition_double(double *pa, uint32_t *pidx, int8_t no_dims, uint32_t start_idx, uint32_t n, double *bbox, int8_t *cut_dim, double *cut_val, uint32_t *n_lo) {
  int8_t dim = 0, i;
  uint32_t p, q, i2;
  double size = 0, min_val, max_val, split, side_len, cur_val;
  uint32_t end_idx = start_idx + n - 1;
  for (i = 0; i < no_dims; i++) {
    side_len = bbox[2 * i + 1] - bbox[2 * i];
    if (side_len > size) {
      dim = i;
      size = side_len;
    }
  }
  min_val = bbox[2 * dim];
  max_val = bbox[2 * dim + 1];
  if (min_val >= max_val)
    return 1;
  split = (min_val + max_val) / 2;
  p = start_idx;
  q = end_idx;
  while (p <= q) {
    if ((pa[no_dims * pidx[p] + dim]) < split) {
      p++;
    } else if ((pa[no_dims * pidx[q] + dim]) >= split) {
      if (q > 0) {
        q--;
      } else {
        break;
      }
    } else {
      {
        uint32_t tmp = pidx[p];
        pidx[p] = pidx[q];
        pidx[q] = tmp;
      };
      p++;
      q--;
    }
  }
  if (p == start_idx) {
    uint32_t j = start_idx;
    split = (pa[no_dims * pidx[j] + dim]);
    for (i2 = start_idx + 1; i2 <= end_idx; i2++) {
      cur_val = (pa[no_dims * pidx[i2] + dim]);
      if (cur_val < split) {
        j = i2;
        split = cur_val;
      }
    }
    {
      uint32_t tmp = pidx[j];
      pidx[j] = pidx[start_idx];
      pidx[start_idx] = tmp;
    };
    p = start_idx + 1;
  } else if (p == end_idx + 1) {
    uint32_t j = end_idx;
    split = (pa[no_dims * pidx[j] + dim]);
    for (i2 = start_idx; i2 < end_idx; i2++) {
      cur_val = (pa[no_dims * pidx[i2] + dim]);
      if (cur_val > split) {
        j = i2;
        split = cur_val;
      }
    }
    {
      uint32_t tmp = pidx[j];
      pidx[j] = pidx[end_idx];
      pidx[end_idx] = tmp;
    };
    p = end_idx;
  }
  *cut_dim = dim;
  *cut_val = split;
  *n_lo = p - start_idx;
  return 0;
}
```