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

```asm
<update_parameters>:
  endbr64
  push   %r15
  movapd %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  push   %r14
  mov    %edi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    0x98(%rsp),%eax
  sub    0xa0(%rsp),%eax
  mov    %rsi,0x8(%rsp)
  cvtsi2sdl 0xa0(%rsp),%xmm0
  mov    0x80(%rsp),%rsi
  add    $0x1,%eax
  mov    0x70(%rsp),%rdi
  mov    %rcx,0x18(%rsp)
  mov    0x78(%rsp),%r15
  mov    0x88(%rsp),%rcx
  mov    %eax,(%r9)
  mov    0xa8(%rsp),%eax
  sub    0xb0(%rsp),%eax
  mov    %rdx,0x20(%rsp)
  mulsd  %xmm1,%xmm0
  add    $0x1,%eax
  mov    %r8,(%rsp)
  mov    0x90(%rsp),%rdx
  addsd  (%rsi),%xmm0
  mov    %eax,(%rdi)
  mov    0xb8(%rsp),%eax
  sub    0xc0(%rsp),%eax
  mov    %r9,0x10(%rsp)
  add    $0x1,%eax
  mov    0xd8(%rsp),%rbx
  mov    0xe8(%rsp),%rbp
  mov    %eax,(%r15)
  movsd  %xmm0,(%rsi)
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0xb0(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  (%rcx),%xmm0
  movsd  %xmm0,(%rcx)
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0xc0(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
  cmp    $0x2,%r14d
  je     L56
  cmp    $0x3,%r14d
  je     L115
  cmp    $0x1,%r14d
  je     L118
  mov    (%r8),%eax
L119:
  mov    %eax,%edx
  mov    0xe0(%rsp),%rdi
  shr    $0x1f,%edx
  add    %edx,%eax
  mov    0xc8(%rsp),%rdx
  sar    %eax
  mov    %eax,(%rdx)
  mov    0x70(%rsp),%rax
  mov    (%rax),%esi
  mov    0x10(%rsp),%rax
  imul   (%r15),%esi
  imul   (%rax),%esi
  mov    %rsi,0x0(%rbp)
  call   <calc_min@plt>
  mov    0x0(%rbp),%rsi
  mov    0xe0(%rsp),%rdi
  movsd  %xmm0,0x28(%rsp)
  call   <calc_max@plt>
  addsd  0x28(%rsp),%xmm0
  mulsd  D37(%rip),%xmm0
  mov    0xd0(%rsp),%rax
  movsd  %xmm0,(%rax)
  mov    0x20(%rsp),%rax
  pxor   %xmm0,%xmm0
  cvtsi2sdl (%rax),%xmm0
  divsd  D22(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <ceil@plt>
  pxor   %xmm0,%xmm0
  mov    %eax,(%rbx)
  mov    %eax,%ebp
  mov    0x18(%rsp),%rax
  cvtsi2sdl (%rax),%xmm0
  divsd  D22(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <ceil@plt>
  cmp    %eax,%ebp
  jl     L39
  mov    (%rbx),%eax
L10:
  test   %eax,%eax
  jg     L157
  movl   $0x1,(%rbx)
L157:
  mov    0x8(%rsp),%rbx
  mov    (%rbx),%rdi
  call   <free@plt>
  mov    0x20(%rsp),%rbp
  mov    0x18(%rsp),%rax
  mov    %rbx,%rdi
  mov    0x0(%rbp),%esi
  imul   (%rax),%esi
  movslq %esi,%rsi
  call   <do_vect@plt>
  mov    0x0(%rbp),%ecx
  xor    %ebp,%ebp
  test   %ecx,%ecx
  jle    L149
  nopl   0x0(%rax,%rax,1)
L18:
  mov    0x18(%rsp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jle    L87
  mov    (%rsp),%rax
  xor    %r12d,%r12d
  mov    (%rax),%esi
  nopl   0x0(%rax,%rax,1)
L154:
  mov    %ecx,%ebx
  imul   %r12d,%ebx
  add    %ebp,%ebx
  movslq %ebx,%rbx
  shl    $0x3,%rbx
  test   %esi,%esi
  jle    L20
  xor    %r13d,%r13d
  nopw   0x0(%rax,%rax,1)
L123:
  mov    (%r15),%eax
  sub    $0x8,%rsp
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %r14d,%edi
  add    $0x1,%r13d
  push   %rax
  mov    0x80(%rsp),%rax
  mov    (%rax),%r9d
  mov    0x20(%rsp),%rax
  mov    (%rax),%r8d
  call   <pindex@plt>
  mov    0x18(%rsp),%rdx
  mov    0x10(%rsp),%rcx
  mov    %rax,%r8
  mov    0xf0(%rsp),%rdi
  mov    (%rdx),%rax
  mov    (%rcx),%esi
  movsd  (%rdi,%r8,8),%xmm0
  add    %rbx,%rax
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  pop    %rdx
  pop    %rcx
  cmp    %r13d,%esi
  jg     L123
  mov    0x20(%rsp),%rbx
  mov    (%rbx),%ecx
L97:
  pxor   %xmm1,%xmm1
  add    $0x1,%r12d
  cvtsi2sd %esi,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    0x18(%rsp),%rax
  cmp    %r12d,(%rax)
  jg     L154
L87:
  add    $0x1,%ebp
  cmp    %ecx,%ebp
  jl     L18
L149:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L20:
  mov    0x8(%rsp),%rdx
  mov    (%rdx),%rax
  add    %rbx,%rax
  movsd  (%rax),%xmm0
  jmp    L97
L39:
  mov    0x18(%rsp),%rax
  pxor   %xmm0,%xmm0
  cvtsi2sdl (%rax),%xmm0
  divsd  D22(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <ceil@plt>
  mov    %eax,(%rbx)
  jmp    L10
L118:
  mov    0x10(%rsp),%rax
  mov    0x20(%rsp),%rdi
  mov    (%rax),%eax
  mov    %eax,(%rdi)
  mov    0x70(%rsp),%rax
  mov    0x18(%rsp),%rdi
  mov    (%rax),%eax
  mov    %eax,(%rdi)
  mov    (%rsp),%rdi
  mov    (%r15),%eax
  mov    %eax,(%rdi)
  jmp    L119
L115:
  mov    0x70(%rsp),%rax
  mov    0x20(%rsp),%rdi
  mov    (%rax),%eax
  mov    %eax,(%rdi)
  mov    0x18(%rsp),%rdi
  mov    (%r15),%eax
  mov    %eax,(%rdi)
  mov    0x10(%rsp),%rax
  mov    (%rsp),%rdi
  mov    (%rax),%eax
  mov    %eax,(%rdi)
  jmp    L119
L56:
  mov    0x20(%rsp),%rdi
  mov    %eax,(%rdi)
  mov    0x10(%rsp),%rax
  mov    0x18(%rsp),%rdi
  mov    (%rax),%eax
  mov    %eax,(%rdi)
  mov    0x70(%rsp),%rax
  mov    (%rsp),%rdi
  mov    (%rax),%eax
  mov    %eax,(%rdi)
  jmp    L119
```

tool_calls: name: read_data
arguments: label: D37
data_type: f64
name: read_data
arguments: label: D22
data_type: f64

tool: D37: 0.5

tool: D22: 100

assistant: ```c
void update_parameters(int slicemode, double **ppro, int *rangea, int *rangeb, int *rangec, unsigned *extx, unsigned *exty, unsigned *extz, double *origx, double *origy, double *origz, int maxx, int minx, int maxy, int miny, int maxz, int minz, double width, int *k, double *cutoff, int *stride, double *pphi, unsigned long *nvox) {
  double maxdensity, mindensity;
  int i, j, l;
  unsigned long ind1, ind2;
  *extx = maxx - minx + 1;
  *exty = maxy - miny + 1;
  *extz = maxz - minz + 1;
  *origx += minx * width;
  *origy += miny * width;
  *origz += minz * width;
  switch (slicemode) {
  case 1:
    *rangea = *extx;
    *rangeb = *exty;
    *rangec = *extz;
    break;
  case 2:
    *rangea = *extz;
    *rangeb = *extx;
    *rangec = *exty;
    break;
  case 3:
    *rangea = *exty;
    *rangeb = *extz;
    *rangec = *extx;
    break;
  }
  *k = (*rangec) / 2;
  *nvox = (*extx) * (*exty) * (*extz);
  mindensity = calc_min(pphi, *nvox);
  maxdensity = calc_max(pphi, *nvox);
  *cutoff = 0.5 * (maxdensity + mindensity);
  *stride = ceil(*rangea / 100.0);
  if (*stride < ceil(*rangeb / 100.0))
    *stride = ceil(*rangeb / 100.0);
  if (*stride < 1)
    *stride = 1;
  free(*ppro);
  do_vect(ppro, (unsigned long)(*rangea * *rangeb));
  for (i = 0; i < *rangea; i++)
    for (j = 0; j < *rangeb; j++) {
      ind2 = i + j * *rangea;
      for (l = 0; l < *rangec; l++) {
        ind1 = pindex(slicemode, i, j, l, *extx, *exty, *extz);
        *(*ppro + ind2) += *(pphi + ind1);
      }
      *(*ppro + ind2) /= ((double)*rangec);
    }
}
```