user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<partition_float>:
  endbr64
  push   %r15
  mov    %rcx,%r11
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  test   %edx,%edx
  jle    L77
  movslq %edx,%rdx
  xor    %eax,%eax
  pxor   %xmm1,%xmm1
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L144:
  movss  0x4(%r9,%rax,8),%xmm0
  subss  (%r9,%rax,8),%xmm0
  comiss %xmm1,%xmm0
  maxss  %xmm1,%xmm0
  cmova  %eax,%ecx
  add    $0x1,%rax
  movaps %xmm0,%xmm1
  cmp    %rdx,%rax
  jne    L144
  lea    (%rcx,%rcx,1),%eax
  cltq
  lea    (%r9,%rax,4),%rdx
  lea    0x4(,%rax,4),%rax
L159:
  movss  (%r9,%rax,1),%xmm1
  movss  (%rdx),%xmm0
  mov    $0x1,%eax
  comiss %xmm1,%xmm0
  jae    L117
  lea    (%r11,%r8,1),%rax
  addss  %xmm1,%xmm0
  movslq %r12d,%r15
  movslq %ecx,%r8
  lea    -0x1(%rax),%r14
  mulss  D8(%rip),%xmm0
  mov    %rax,-0x8(%rsp)
  cmp    %r14,%r11
  ja     L169
  mov    %r14,%rdx
  mov    %r11,%rax
  cmp    $0x1,%r12d
  je     L96
  jmp    L6
  nopl   (%rax)
L110:
  add    $0x1,%rax
  cmp    %rax,%rdx
  jb     L222
L96:
  lea    (%rsi,%rax,8),%r10
  mov    (%r10),%r9
  lea    (%r9,%r8,1),%rbx
  comiss (%rdi,%rbx,4),%xmm0
  ja     L110
  lea    (%rsi,%rdx,8),%rbx
  mov    (%rbx),%rbp
  lea    0x0(%rbp,%r8,1),%r13
  movss  (%rdi,%r13,4),%xmm1
  comiss %xmm0,%xmm1
  jb     L3
  test   %rdx,%rdx
  je     L222
L320:
  sub    $0x1,%rdx
  cmp    %rax,%rdx
  jae    L96
L222:
  cmp    %rax,%r11
  je     L169
  cmp    %rax,-0x8(%rsp)
  je     L237
L151:
  sub    %r11,%rax
L301:
  mov    0x38(%rsp),%rdx
  mov    %ecx,(%rdx)
  mov    0x40(%rsp),%rdx
  movss  %xmm0,(%rdx)
  mov    0x48(%rsp),%rdx
  mov    %rax,(%rdx)
  xor    %eax,%eax
L117:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L162:
  add    $0x1,%rax
L73:
  cmp    %rax,%rdx
  jb     L222
L6:
  lea    (%rsi,%rax,8),%rbx
  mov    (%rbx),%r10
  mov    %r10,%r9
  imul   %r15,%r9
  add    %r8,%r9
  comiss (%rdi,%r9,4),%xmm0
  ja     L162
  lea    (%rsi,%rdx,8),%rbp
  mov    0x0(%rbp),%r13
  mov    %r13,%r9
  imul   %r15,%r9
  add    %r8,%r9
  movss  (%rdi,%r9,4),%xmm1
  comiss %xmm0,%xmm1
  jae    L240
  mov    %r13,(%rbx)
  add    $0x1,%rax
  mov    %r10,0x0(%rbp)
L203:
  sub    $0x1,%rdx
  jmp    L73
  nop
L3:
  mov    %rbp,(%r10)
  add    $0x1,%rax
  mov    %r9,(%rbx)
  jmp    L320
  nop
L240:
  test   %rdx,%rdx
  jne    L203
  jmp    L222
  nopw   0x0(%rax,%rax,1)
L169:
  lea    (%rsi,%r11,8),%r9
  mov    (%r9),%r10
  mov    %r10,%rax
  imul   %r15,%rax
  add    %r8,%rax
  movss  (%rdi,%rax,4),%xmm0
  lea    0x1(%r11),%rax
  cmp    %rax,%r14
  jb     L213
  cmp    $0x1,%r12d
  jne    L137
  nopl   0x0(%rax)
L208:
  mov    (%rsi,%rax,8),%rdx
  add    %r8,%rdx
  movss  (%rdi,%rdx,4),%xmm1
  comiss %xmm1,%xmm0
  minss  %xmm0,%xmm1
  cmova  %rax,%r11
  add    $0x1,%rax
  movaps %xmm1,%xmm0
  cmp    %rax,%r14
  jae    L208
L60:
  lea    (%rsi,%r11,8),%rax
  mov    (%rax),%rdx
L303:
  mov    %r10,(%rax)
  mov    $0x1,%eax
  mov    %rdx,(%r9)
  jmp    L301
  nopw   0x0(%rax,%rax,1)
L137:
  mov    (%rsi,%rax,8),%rdx
  imul   %r15,%rdx
  add    %r8,%rdx
  movss  (%rdi,%rdx,4),%xmm1
  comiss %xmm1,%xmm0
  minss  %xmm0,%xmm1
  cmova  %rax,%r11
  add    $0x1,%rax
  movaps %xmm1,%xmm0
  cmp    %rax,%r14
  jae    L137
  jmp    L60
  nopl   0x0(%rax)
L237:
  lea    (%rsi,%r14,8),%r10
  mov    (%r10),%rbx
  mov    %rbx,%rax
  imul   %r15,%rax
  add    %r8,%rax
  movss  (%rdi,%rax,4),%xmm0
  cmp    %r14,%r11
  jae    L285
  mov    %r11,%rax
  mov    %r14,%rdx
  cmp    $0x1,%r12d
  jne    L184
  nopl   0x0(%rax,%rax,1)
L165:
  mov    (%rsi,%rax,8),%r9
  add    %r8,%r9
  movss  (%rdi,%r9,4),%xmm1
  comiss %xmm0,%xmm1
  maxss  %xmm0,%xmm1
  cmova  %rax,%rdx
  add    $0x1,%rax
  movaps %xmm1,%xmm0
  cmp    %rax,%r14
  jne    L165
L275:
  lea    (%rsi,%rdx,8),%rax
  mov    (%rax),%rdx
L1:
  mov    %rbx,(%rax)
  mov    %r14,%rax
  mov    %rdx,(%r10)
  jmp    L151
  nopl   0x0(%rax)
L184:
  mov    (%rsi,%rax,8),%r9
  imul   %r15,%r9
  add    %r8,%r9
  movss  (%rdi,%r9,4),%xmm1
  comiss %xmm0,%xmm1
  maxss  %xmm0,%xmm1
  cmova  %rax,%rdx
  add    $0x1,%rax
  movaps %xmm1,%xmm0
  cmp    %r14,%rax
  jne    L184
  jmp    L275
  nopw   0x0(%rax,%rax,1)
L77:
  mov    %r9,%rdx
  mov    $0x4,%eax
  xor    %ecx,%ecx
  jmp    L159
L213:
  mov    %r10,%rdx
  mov    %r9,%rax
  jmp    L303
L285:
  mov    %rbx,%rdx
  mov    %r10,%rax
  jmp    L1
```

tool_calls: name: unpack_data
arguments: data_label: D8
type_infered: byte[4]

tool: {"D8": [0x00,0x00,0x00,0x3f]}

assistant: ```c
int partition_float(float *pa, uint32_t *pidx, int8_t no_dims, uint32_t start_idx, uint32_t n, float *bbox, int8_t *cut_dim, float *cut_val, uint32_t *n_lo) {
  int8_t dim = 0;
  uint32_t p, q;
  float size = 0, min_val, max_val, split, side_len, cur_val;
  uint32_t end_idx = start_idx + n - 1;
  for (int8_t 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 (uint32_t i = start_idx + 1; i <= end_idx; i++) {
      cur_val = (pa[no_dims * pidx[i] + dim]);
      if (cur_val < split) {
        j = i;
        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 (uint32_t i = start_idx; i < end_idx; i++) {
      cur_val = (pa[no_dims * pidx[i] + dim]);
      if (cur_val > split) {
        j = i;
        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;
}
```