user: What would the C source look like for the assembly code provided here:

```asm
<box_partition>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  movslq %edi,%rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  mov    %esi,%eax
  sub    %ebp,%eax
  cmp    $0x1,%eax
  je     L76
  mov    %eax,%r14d
  mov    %eax,%r10d
  pxor   %xmm0,%xmm0
  movslq %edx,%r9
  shr    $0x1f,%r14d
  pxor   %xmm1,%xmm1
  mov    0x4(%rcx,%r9,8),%r13d
  add    $0x2,%edx
  add    %eax,%r14d
  cvtsi2sd %eax,%xmm1
  sub    (%rcx,%r9,8),%r13d
  movslq %edx,%r12
  sar    %r14d
  imul   $0x55555556,%r12,%r12
  mov    %edx,%ecx
  mov    %esi,%r15d
  sub    %r14d,%r10d
  sar    $0x1f,%ecx
  cvtsi2sd %r10d,%xmm0
  shr    $0x20,%r12
  sub    %ecx,%r12d
  lea    (%r12,%r12,2),%ecx
  divsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  sub    %ecx,%edx
  cvtsi2sd %r13d,%xmm1
  mov    %edx,%r12d
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  sub    %eax,%r13d
  test   %r14d,%r14d
  jne    L67
  test   %r10d,%r10d
  jne    L64
L51:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L63
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L64:
  mov    0x10(%rbx),%rdx
  movdqu (%rbx),%xmm3
  lea    0x20(%rsp),%rcx
  mov    %r15d,%esi
  lea    0x0(%rbp,%r14,1),%edi
  mov    %rdx,0x30(%rsp)
  mov    %r12d,%edx
  movaps %xmm3,0x20(%rsp)
  add    0x20(%rsp,%r9,8),%r13d
  add    %r13d,%eax
  movd   %r13d,%xmm0
  movd   %eax,%xmm4
  punpckldq %xmm4,%xmm0
  movq   %xmm0,0x20(%rsp,%r9,8)
  call   <box_partition>
  jmp    L51
  nopl   (%rax)
L67:
  mov    0x10(%rbx),%rdx
  movdqu (%rbx),%xmm2
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edi
  lea    0x0(%rbp,%r14,1),%esi
  mov    %eax,0x1c(%rsp)
  mov    %rdx,0x30(%rsp)
  movaps %xmm2,0x20(%rsp)
  mov    0x20(%rsp,%r9,8),%edx
  mov    %r10d,0x18(%rsp)
  add    %r13d,%edx
  mov    %r9,0x10(%rsp)
  mov    %edx,0x24(%rsp,%r9,8)
  mov    %r12d,%edx
  mov    %r8,0x8(%rsp)
  call   <box_partition>
  mov    0x18(%rsp),%r10d
  mov    0x1c(%rsp),%eax
  mov    0x10(%rsp),%r9
  mov    0x8(%rsp),%r8
  test   %r10d,%r10d
  je     L51
  jmp    L64
  nop
L76:
  mov    (%rcx),%edx
  lea    0x0(%rbp,%rbp,2),%rax
  lea    (%r8,%rax,8),%rax
  mov    %edx,(%rax)
  mov    0x4(%rcx),%edx
  mov    %edx,0x4(%rax)
  mov    0x8(%rcx),%edx
  mov    %edx,0x8(%rax)
  mov    0xc(%rcx),%edx
  mov    %edx,0xc(%rax)
  mov    0x10(%rcx),%edx
  mov    %edx,0x10(%rax)
  mov    0x14(%rcx),%edx
  mov    %edx,0x14(%rax)
  jmp    L51
L63:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void box_partition(int ip, int up, int axis, const int box[3][2], int p_box[][3][2]) {
  const int np = up - ip;
  if (1 == np) {
    p_box[ip][0][0] = box[0][0];
    p_box[ip][0][1] = box[0][1];
    p_box[ip][1][0] = box[1][0];
    p_box[ip][1][1] = box[1][1];
    p_box[ip][2][0] = box[2][0];
    p_box[ip][2][1] = box[2][1];
  } else {
    const int n = box[axis][1] - box[axis][0];
    const int np_low = np / 2;
    const int np_upp = np - np_low;
    const int n_upp = (int)(((double)n) * (((double)np_upp) / ((double)np)));
    const int n_low = n - n_upp;
    const int next_axis = (axis + 2) % 3;
    if (np_low) {
      int dbox[3][2];
      dbox[0][0] = box[0][0];
      dbox[0][1] = box[0][1];
      dbox[1][0] = box[1][0];
      dbox[1][1] = box[1][1];
      dbox[2][0] = box[2][0];
      dbox[2][1] = box[2][1];
      dbox[axis][1] = dbox[axis][0] + n_low;
      box_partition(ip, ip + np_low, next_axis, (const int(*)[2])dbox, p_box);
    }
    if (np_upp) {
      int dbox[3][2];
      dbox[0][0] = box[0][0];
      dbox[0][1] = box[0][1];
      dbox[1][0] = box[1][0];
      dbox[1][1] = box[1][1];
      dbox[2][0] = box[2][0];
      dbox[2][1] = box[2][1];
      ip += np_low;
      dbox[axis][0] += n_low;
      dbox[axis][1] = dbox[axis][0] + n_upp;
      box_partition(ip, ip + np_upp, next_axis, (const int(*)[2])dbox, p_box);
    }
  }
}
```