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

```asm
<CreateDenseGrid>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %edx,-0x3c(%rbp)
  mov    %rcx,-0x48(%rbp)
  mov    %r8,-0x50(%rbp)
  mov    %r9,-0x58(%rbp)
  mov    -0x34(%rbp),%eax
  shl    $0x4,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D5(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  cmpl   $0x0,0x30(%rbp)
  jne    L14
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x10(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L14
  mov    -0x48(%rbp),%rax
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L14:
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
  jmp    L48
L47:
  mov    -0x20(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    0x18(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x20(%rbp),%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x10(%rbp),%xmm1
  movsd  D5(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x1c(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L60
L89:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    0x20(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    0x28(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x18(%rbp),%xmm0
  addsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  addl   $0x1,-0x24(%rbp)
  addl   $0x1,-0x28(%rbp)
L60:
  mov    -0x28(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L89
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x20(%rbp)
L48:
  mov    -0x20(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L47
  cmpl   $0x0,0x30(%rbp)
  jne    L27
  mov    0x10(%rbp),%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  D5(%rip),%xmm1
  subsd  -0x10(%rbp),%xmm1
  comisd %xmm1,%xmm0
  ja     L57
  jmp    L27
L57:
  mov    -0x38(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L27
  mov    0x10(%rbp),%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  D5(%rip),%xmm0
  subsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L27:
  nop
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: label: D5
data_type: f64

tool: D5: 0.5

assistant: ```c
void CreateDenseGrid(int r, int numtaps, int numband, double bands[], double des[], double weight[], int *gridsize, double Grid[], double D[], double W[], int symmetry) {
  int i, j, k, band;
  double delf, lowf, highf;
  delf = 0.5 / (16 * r);
  if ((symmetry == 0) && (delf > bands[0]))
    bands[0] = delf;
  j = 0;
  for (band = 0; band < numband; band++) {
    Grid[j] = bands[2 * band];
    lowf = bands[2 * band];
    highf = bands[2 * band + 1];
    k = (int)((highf - lowf) / delf + 0.5);
    for (i = 0; i < k; i++) {
      D[j] = des[band];
      W[j] = weight[band];
      Grid[j] = lowf;
      lowf += delf;
      j++;
    }
    Grid[j - 1] = highf;
  }
  if ((symmetry == 0) && (Grid[*gridsize - 1] > (0.5 - delf)) && (numtaps % 2)) {
    Grid[*gridsize - 1] = 0.5 - delf;
  }
}
```