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

```asm
<update_parameters>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %r8,-0x68(%rbp)
  mov    %r9,-0x70(%rbp)
  movsd  %xmm0,-0x78(%rbp)
  mov    0x38(%rbp),%eax
  sub    0x40(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x70(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x48(%rbp),%eax
  sub    0x50(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    0x10(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x58(%rbp),%eax
  sub    0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x20(%rbp),%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x40(%rbp),%xmm0
  mulsd  -0x78(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    0x20(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    0x28(%rbp),%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x50(%rbp),%xmm0
  mulsd  -0x78(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    0x28(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    0x30(%rbp),%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x60(%rbp),%xmm0
  mulsd  -0x78(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  cmpl   $0x3,-0x44(%rbp)
  je     L148
  cmpl   $0x3,-0x44(%rbp)
  jg     L14
  cmpl   $0x1,-0x44(%rbp)
  je     L33
  cmpl   $0x2,-0x44(%rbp)
  je     L25
  jmp    L14
L33:
  mov    -0x70(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x10(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x18(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  mov    -0x68(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L14
L25:
  mov    0x18(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x70(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x10(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  mov    -0x68(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L14
L148:
  mov    0x10(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x18(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x70(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  mov    -0x68(%rbp),%rax
  mov    %edx,(%rax)
  nop
L14:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    0x68(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x70(%rbp),%rax
  mov    (%rax),%edx
  mov    0x10(%rbp),%rax
  mov    (%rax),%eax
  imul   %eax,%edx
  mov    0x18(%rbp),%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  mov    %eax,%edx
  mov    0x88(%rbp),%rax
  mov    %rdx,(%rax)
  mov    0x88(%rbp),%rax
  mov    (%rax),%rdx
  mov    0x80(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <calc_min@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x30(%rbp)
  mov    0x88(%rbp),%rax
  mov    (%rax),%rdx
  mov    0x80(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <calc_max@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  -0x30(%rbp),%xmm1
  movsd  D34(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    0x70(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D30(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <ceil@plt>
  mov    0x78(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    0x78(%rbp),%rax
  mov    (%rax),%ebx
  mov    -0x60(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D30(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <ceil@plt>
  cmp    %eax,%ebx
  jge    L42
  mov    -0x60(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D30(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <ceil@plt>
  mov    0x78(%rbp),%rdx
  mov    %eax,(%rdx)
L42:
  mov    0x78(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jg     L83
  mov    0x78(%rbp),%rax
  movl   $0x1,(%rax)
L83:
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x58(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x60(%rbp),%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  movslq %eax,%rdx
  mov    -0x50(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <do_vect@plt>
  movl   $0x0,-0x3c(%rbp)
  jmp    L111
L110:
  movl   $0x0,-0x38(%rbp)
  jmp    L10
L116:
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  imul   -0x38(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  mov    %rax,-0x20(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L126
L140:
  mov    0x18(%rbp),%rax
  mov    (%rax),%edi
  mov    0x10(%rbp),%rax
  mov    (%rax),%r9d
  mov    -0x70(%rbp),%rax
  mov    (%rax),%r8d
  mov    -0x34(%rbp),%ecx
  mov    -0x38(%rbp),%edx
  mov    -0x3c(%rbp),%esi
  mov    -0x44(%rbp),%eax
  sub    $0x8,%rsp
  push   %rdi
  mov    %eax,%edi
  call   <pindex@plt>
  add    $0x10,%rsp
  mov    %rax,-0x18(%rbp)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x80(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L126:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x34(%rbp)
  jl     L140
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x38(%rbp)
L10:
  mov    -0x60(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x38(%rbp)
  jl     L116
  addl   $0x1,-0x3c(%rbp)
L111:
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x3c(%rbp)
  jl     L110
  nop
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D34
type_guessed: f64
name: read_data
arguments: data_tag: D30
type_guessed: f64

tool: D34: 0.5

tool: D30: 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);
    }
}
```