user: Please show me the C implementation that matches the assembly code listed below:

```asm
<boxesForGauss>:
  endbr64
  push   %r13
  pxor   %xmm0,%xmm0
  pxor   %xmm2,%xmm2
  push   %r12
  cvtsi2sd %edi,%xmm0
  push   %rbp
  cvtsi2sd %edx,%xmm2
  mov    %rsi,%rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x18,%rsp
  movsd  D39(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  divsd  %xmm2,%xmm0
  addsd  D9(%rip),%xmm0
  call   <sqrt@plt>
  mov    %eax,%edi
  call   <floor@plt>
  movsd  0x8(%rsp),%xmm1
  test   $0x1,%al
  mov    %rax,%rdx
  je     L181
  lea    0x1(%rax),%eax
  mov    %edx,%r13d
L79:
  mov    %r13d,%edx
  pxor   %xmm2,%xmm2
  lea    0x2(%r13),%r12d
  neg    %eax
  imul   %ebx,%edx
  shl    $0x2,%eax
  mov    %edx,%ecx
  shl    $0x2,%edx
  imul   %r13d,%ecx
  cvtsi2sd %ecx,%xmm2
  subsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %edx,%xmm1
  lea    (%rbx,%rbx,2),%edx
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %edx,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  divsd  %xmm1,%xmm0
  call   <round@plt>
  test   %ebx,%ebx
  jle    L33
  test   %eax,%eax
  jle    L105
  cmp    %eax,%ebx
  mov    $0x1,%esi
  cmovle %ebx,%eax
  test   %eax,%eax
  mov    %eax,%edx
  cmovg  %eax,%esi
  cmp    $0x3,%eax
  jle    L91
  mov    %esi,%ecx
  movd   %r13d,%xmm5
  movdqa D32(%rip),%xmm1
  movdqa D44(%rip),%xmm3
  shr    $0x2,%ecx
  movdqa D31(%rip),%xmm2
  pshufd $0x0,%xmm5,%xmm4
  mov    %rbp,%rax
  sub    $0x1,%ecx
  shl    $0x4,%rcx
  lea    0x10(%rbp,%rcx,1),%rcx
L40:
  movdqa %xmm1,%xmm0
  movups %xmm4,(%rax)
  add    $0x10,%rax
  paddd  %xmm3,%xmm1
  paddd  %xmm2,%xmm0
  cmp    %rcx,%rax
  jne    L40
  mov    %esi,%ecx
  pshufd $0xff,%xmm0,%xmm0
  and    $0xfffffffc,%ecx
  and    $0x3,%esi
  movd   %xmm0,%eax
  je     L125
L80:
  movslq %ecx,%rax
  mov    %r13d,0x0(%rbp,%rax,4)
  lea    0x0(,%rax,4),%rsi
  lea    0x1(%rcx),%eax
  cmp    %eax,%edx
  jle    L125
  lea    0x2(%rcx),%eax
  mov    %r13d,0x4(%rbp,%rsi,1)
  cmp    %eax,%edx
  jle    L125
  mov    %r13d,0x8(%rbp,%rsi,1)
  lea    0x3(%rcx),%eax
L125:
  cmp    %eax,%ebx
  jle    L33
L166:
  mov    %ebx,%edx
  mov    $0x1,%edi
  sub    %eax,%edx
  cmp    %eax,%ebx
  cmovg  %edx,%edi
  sub    $0x1,%edx
  cmp    $0x2,%edx
  jbe    L48
  cmp    %eax,%ebx
  jle    L48
  movslq %eax,%rdx
  movd   %r12d,%xmm6
  lea    0x0(%rbp,%rdx,4),%rcx
  mov    %edi,%edx
  pshufd $0x0,%xmm6,%xmm0
  shr    $0x2,%edx
  lea    -0x1(%rdx),%esi
  lea    0x10(%rcx),%rdx
  shl    $0x4,%rsi
  add    %rdx,%rsi
  jmp    L14
  nop
L16:
  add    $0x10,%rdx
L14:
  movups %xmm0,(%rcx)
  mov    %rdx,%rcx
  cmp    %rdx,%rsi
  jne    L16
  mov    %edi,%edx
  and    $0xfffffffc,%edx
  add    %edx,%eax
  cmp    %edx,%edi
  je     L33
L48:
  movslq %eax,%rdx
  mov    %r12d,0x0(%rbp,%rdx,4)
  lea    0x0(,%rdx,4),%rcx
  lea    0x1(%rax),%edx
  cmp    %ebx,%edx
  jge    L33
  add    $0x2,%eax
  mov    %r12d,0x4(%rbp,%rcx,1)
  cmp    %eax,%ebx
  jle    L33
  mov    %r12d,0x8(%rbp,%rcx,1)
L33:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L105:
  xor    %eax,%eax
  jmp    L166
  nopw   0x0(%rax,%rax,1)
L181:
  lea    -0x1(%rax),%r13d
  jmp    L79
L91:
  xor    %ecx,%ecx
  jmp    L80
```

tool_calls: name: retrieve_data
arguments: data_tag: D39
data_type: f64
name: retrieve_data
arguments: data_tag: D9
data_type: byte[8]
name: retrieve_data
arguments: data_tag: D32
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D44
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D31
data_type: byte[16]

tool: D39: 12

tool: {"D9": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D32": [0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00]}

tool: {"D44": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D31": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

assistant: ```c
void boxesForGauss(int sigma, int *sizes, int n) {
  int i;
  int wl = (int)floor(sqrt(((double)12 * sigma * sigma / n) + 1));
  if (wl % 2 == 0)
    wl--;
  int wu = wl + 2;
  double mIdeal = ((double)12 * sigma * sigma - n * wl * wl - 4 * n * wl - 3 * n) / (-4 * wl - 4);
  int m = (int)round(mIdeal);
  for (i = 0; i < n; i++)
    sizes[i] = (int)(i < m ? wl : wu);
}
```