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

```asm
<write_vtkFile_debug>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x128,%rsp
  mov    %edx,%r14d
  mov    %ecx,0xc(%rsp)
  mov    %r8d,0x60(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movq   %xmm4,%r12
  movq   %xmm5,%rbp
  mov    %r9,0x40(%rsp)
  mov    0x160(%rsp),%rax
  mov    %rax,0x48(%rsp)
  mov    0x168(%rsp),%rax
  mov    %rax,0x50(%rsp)
  mov    0x170(%rsp),%rax
  mov    %rax,0x58(%rsp)
  mov    0x178(%rsp),%r13
  mov    %fs:0x28,%rdx
  mov    %rdx,0x118(%rsp)
  xor    %edx,%edx
  lea    0x70(%rsp),%rbx
  mov    %esi,%ecx
  mov    %rdi,%rdx
  lea    D40(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    D167(%rip),%rsi
  mov    %rbx,%rdi
  call   <fopen@plt>
  test   %rax,%rax
  je     L63
  mov    %rax,%r15
  movq   %rbp,%xmm2
  movq   %r12,%xmm1
  movsd  0x10(%rsp),%xmm0
  mov    0x60(%rsp),%ebx
  mov    %ebx,%ecx
  mov    0xc(%rsp),%edx
  mov    %r14d,%esi
  mov    %rax,%rdi
  call   <write_vtkHeader_debug@plt>
  movq   %rbp,%xmm2
  movq   %r12,%xmm1
  movsd  0x10(%rsp),%xmm0
  mov    %ebx,%ecx
  mov    0xc(%rsp),%ebp
  mov    %ebp,%edx
  mov    %r14d,%esi
  mov    %r15,%rdi
  call   <write_vtkPointCoordinates_debug@plt>
  lea    0x3(%r14),%edx
  mov    %ebp,%eax
  add    $0x3,%eax
  imul   %eax,%edx
  lea    0x3(%rbx),%eax
  imul   %eax,%edx
  lea    D178(%rip),%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %r15,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %r15,%rcx
  mov    $0x17,%edx
  mov    $0x1,%esi
  lea    D179(%rip),%rdi
  call   <fwrite@plt>
  lea    0x1(%rbx),%eax
  mov    %eax,0x64(%rsp)
  mov    $0xfffffffffffffff8,%rbp
  movl   $0xffffffff,0x18(%rsp)
  cmp    $0xffffffff,%eax
  jl     L166
  mov    %r13,0x68(%rsp)
  mov    %r15,%r13
  mov    %rbp,%r15
  jmp    L298
L63:
  mov    %rbx,%rdx
  lea    0xc0(%rsp),%rbx
  lea    D6(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rbx,%rdx
  lea    D173(%rip),%rsi
  mov    $0x59,%edi
  call   <errhandler@plt>
  jmp    L348
L310:
  mov    %rbp,%rcx
  mov    $0x6,%edx
  mov    $0x1,%esi
  lea    D61(%rip),%rdi
  call   <fwrite@plt>
L306:
  add    $0x1,%rbx
  lea    -0x1(%rbx),%eax
  cmp    %eax,%r14d
  jl     L292
L38:
  mov    %r13d,%eax
  or     %ebx,%eax
  js     L310
  cmp    %ebx,%r14d
  jl     L310
  mov    0x10(%rsp),%ecx
  cmp    %ecx,0xc(%rsp)
  jl     L310
  mov    0x18(%rsp),%esi
  cmp    %esi,0x60(%rsp)
  jl     L310
  mov    0x40(%rsp),%rax
  mov    (%rax,%rbx,8),%rax
  mov    (%rax,%r12,1),%rdx
  mov    0x20(%rsp),%rcx
  mov    (%rax,%rcx,1),%rax
  movsd  (%rdx,%r15,1),%xmm0
  addsd  (%rax,%r15,1),%xmm0
  mov    0x28(%rsp),%rcx
  addsd  (%rdx,%rcx,1),%xmm0
  addsd  (%rax,%rcx,1),%xmm0
  mulsd  D217(%rip),%xmm0
  call   <getValidValue@plt>
  movsd  %xmm0,0x30(%rsp)
  mov    0x48(%rsp),%rsi
  mov    (%rsi,%rbx,8),%rax
  mov    (%rax,%r12,1),%rdx
  mov    0x8(%rsi,%rbx,8),%rax
  mov    (%rax,%r12,1),%rax
  movsd  (%rdx,%r15,1),%xmm0
  addsd  (%rax,%r15,1),%xmm0
  mov    0x28(%rsp),%rcx
  addsd  (%rdx,%rcx,1),%xmm0
  addsd  (%rax,%rcx,1),%xmm0
  mulsd  D217(%rip),%xmm0
  call   <getValidValue@plt>
  movsd  %xmm0,0x38(%rsp)
  mov    0x50(%rsp),%rax
  mov    (%rax,%rbx,8),%rdx
  mov    0x8(%rax,%rbx,8),%rax
  mov    (%rdx,%r12,1),%rsi
  mov    (%rax,%r12,1),%rcx
  movsd  (%rsi,%r15,1),%xmm0
  addsd  (%rcx,%r15,1),%xmm0
  mov    0x20(%rsp),%rcx
  mov    (%rdx,%rcx,1),%rdx
  addsd  (%rdx,%r15,1),%xmm0
  mov    (%rax,%rcx,1),%rax
  addsd  (%rax,%r15,1),%xmm0
  mulsd  D217(%rip),%xmm0
  call   <getValidValue@plt>
  movapd %xmm0,%xmm2
  movsd  0x38(%rsp),%xmm1
  movsd  0x30(%rsp),%xmm0
  lea    D47(%rip),%rsi
  mov    %rbp,%rdi
  mov    $0x3,%eax
  call   <fprintf@plt>
  jmp    L306
L292:
  mov    0x10(%rsp),%esi
  lea    0x1(%rsi),%eax
  add    $0x8,%r12
  cmp    %esi,0xc(%rsp)
  jl     L140
  mov    %eax,0x10(%rsp)
L237:
  lea    0x8(%r12),%rax
  mov    %rax,0x20(%rsp)
  mov    $0xffffffffffffffff,%rbx
  mov    0x10(%rsp),%r13d
  or     0x18(%rsp),%r13d
  cmp    $0xfffffffe,%r14d
  jge    L38
  jmp    L292
L140:
  mov    %rbp,%r13
L29:
  mov    0x18(%rsp),%ecx
  lea    0x1(%rcx),%eax
  add    $0x8,%r15
  cmp    %ecx,0x60(%rsp)
  jl     L89
  mov    %eax,0x18(%rsp)
L298:
  cmpl   $0xfffffffe,0xc(%rsp)
  jl     L29
  lea    0x8(%r15),%rax
  mov    %rax,0x28(%rsp)
  mov    $0xfffffffffffffff8,%r12
  movl   $0xffffffff,0x10(%rsp)
  mov    %r13,%rbp
  jmp    L237
L89:
  mov    %r13,%r15
  mov    0x68(%rsp),%r13
L166:
  mov    %r15,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  lea    0x2(%r14),%edx
  mov    0xc(%rsp),%eax
  add    $0x2,%eax
  imul   %eax,%edx
  mov    0x60(%rsp),%eax
  add    $0x2,%eax
  imul   %eax,%edx
  lea    D62(%rip),%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %r15,%rcx
  mov    $0x1a,%edx
  mov    $0x1,%esi
  lea    D125(%rip),%rdi
  call   <fwrite@plt>
  mov    %r15,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  lea    D101(%rip),%rdi
  call   <fwrite@plt>
  movq   $0x0,0x18(%rsp)
  cmpl   $0x0,0x64(%rsp)
  js     L273
  mov    %r13,0x28(%rsp)
  mov    0x58(%rsp),%r13
  jmp    L102
L211:
  mov    0x0(%r13,%rbx,8),%rax
  mov    (%rax,%rbp,1),%rax
  movsd  (%rax,%r12,1),%xmm0
  call   <getValidValue@plt>
  lea    D45(%rip),%rsi
  mov    %r15,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  add    $0x1,%rbx
  lea    -0x1(%rbx),%eax
  cmp    %r14d,%eax
  jle    L211
L146:
  addq   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%rax
  sub    $0x1,%eax
  cmp    0xc(%rsp),%eax
  jg     L12
L189:
  mov    0x10(%rsp),%rax
  lea    0x0(,%rax,8),%rbp
  mov    $0x0,%ebx
  cmp    $0xffffffff,%r14d
  jge    L211
  jmp    L146
L12:
  addq   $0x1,0x18(%rsp)
  mov    0x18(%rsp),%rax
  sub    $0x1,%eax
  cmp    0x60(%rsp),%eax
  jg     L198
L102:
  mov    0xc(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x20(%rsp)
  js     L12
  mov    0x18(%rsp),%rax
  lea    0x0(,%rax,8),%r12
  movq   $0x0,0x10(%rsp)
  jmp    L189
L351:
  mov    0x0(%r13,%rbx,8),%rax
  mov    (%rax,%rbp,1),%rax
  mov    (%rax,%r12,1),%edi
  call   <getcelltype@plt>
  mov    %eax,%edx
  lea    D137(%rip),%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  add    $0x1,%rbx
  lea    -0x1(%rbx),%eax
  cmp    %eax,%r14d
  jge    L351
L191:
  addq   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%rax
  sub    $0x1,%eax
  cmp    0xc(%rsp),%eax
  jg     L238
L253:
  mov    0x10(%rsp),%rax
  lea    0x0(,%rax,8),%rbp
  mov    $0x0,%ebx
  cmp    $0xffffffff,%r14d
  jge    L351
  jmp    L191
L238:
  add    $0x4,%r12
  cmp    %r12,0x18(%rsp)
  je     L241
L24:
  movq   $0x0,0x10(%rsp)
  cmpl   $0x0,0x20(%rsp)
  jns    L253
  jmp    L238
L231:
  lea    0x70(%rsp),%rdx
  lea    0xc0(%rsp),%rbx
  lea    D7(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rbx,%rdx
  lea    D173(%rip),%rsi
  mov    $0x92,%edi
  call   <errhandler@plt>
  jmp    L348
L198:
  mov    0x28(%rsp),%r13
  mov    %r15,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %r15,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  lea    D171(%rip),%rdi
  call   <fwrite@plt>
  mov    %r15,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  lea    D101(%rip),%rdi
  call   <fwrite@plt>
  mov    0x60(%rsp),%eax
  lea    0x1(%rax),%eax
  lea    0x4(,%rax,4),%rax
  mov    %rax,0x18(%rsp)
  mov    $0x0,%r12d
  jmp    L24
L273:
  mov    %r15,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %r15,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  lea    D171(%rip),%rdi
  call   <fwrite@plt>
  mov    %r15,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  lea    D101(%rip),%rdi
  call   <fwrite@plt>
L241:
  mov    %r15,%rdi
  call   <fclose@plt>
  test   %rax,%rax
  jne    L231
L348:
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L54
  add    $0x128,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L54:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D40
datatype: string
name: parse_data
arguments: data_tag: D167
datatype: string
name: parse_data
arguments: data_tag: D178
datatype: string
name: parse_data
arguments: data_tag: D179
datatype: string
name: parse_data
arguments: data_tag: D6
datatype: string
name: parse_data
arguments: data_tag: D173
datatype: string
name: parse_data
arguments: data_tag: D61
datatype: string
name: parse_data
arguments: data_tag: D217
datatype: f64
name: parse_data
arguments: data_tag: D47
datatype: string
name: parse_data
arguments: data_tag: D62
datatype: string
name: parse_data
arguments: data_tag: D125
datatype: string
name: parse_data
arguments: data_tag: D101
datatype: string
name: parse_data
arguments: data_tag: D45
datatype: string
name: parse_data
arguments: data_tag: D137
datatype: string
name: parse_data
arguments: data_tag: D7
datatype: string
name: parse_data
arguments: data_tag: D171
datatype: string

tool: D40: /media/norbert/940CB6150CB5F27A/Documents/simulation/%s.%i_debug.vtk

tool: D167: w

tool: D178: POINT_DATA %i 


tool: D179: VECTORS velocity float


tool: D6: Failed to open %s

tool: D173: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProject/visual.c

tool: D61: 0 0 0


tool: D217: 0.25

tool: D47: %f %f %f


tool: D62: CELL_DATA %i 


tool: D125: SCALARS pressure float 1 


tool: D101: LOOKUP_TABLE default 


tool: D45: %f


tool: D137: %d


tool: D7: Failed to close %s

tool: D171: SCALARS flag short 1 


assistant: ```c
void write_vtkFile_debug(const char *szProblem, int timeStepNumber, double xlength, double ylength, double zlength, int imax, int jmax, int kmax, double dx, double dy, double dz, double ***U, double ***V, double ***W, double ***P, int ***Flag) {
  int i, j, k;
  double uVel, vVel, wVel;
  char szFileName[80];
  FILE *fp = NULL;
  sprintf(szFileName, "/media/norbert/940CB6150CB5F27A/Documents/simulation/%s.%i_debug.vtk", szProblem, timeStepNumber);
  fp = fopen(szFileName, "w");
  if (fp == NULL) {
    char szBuff[80];
    sprintf(szBuff, "Failed to open %s", szFileName);
    errhandler(89, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProject/visual.c", szBuff);
    return;
  }
  write_vtkHeader_debug(fp, imax, jmax, kmax, dx, dy, dz);
  write_vtkPointCoordinates_debug(fp, imax, jmax, kmax, dx, dy, dz);
  fprintf(fp, "POINT_DATA %i \n", (imax + 3) * (jmax + 3) * (kmax + 3));
  fprintf(fp, "\n");
  fprintf(fp, "VECTORS velocity float\n");
  for (k = -1; k < kmax + 2; k++) {
    for (j = -1; j < jmax + 2; j++) {
      for (i = -1; i < imax + 2; i++) {
        if (i >= 0 && j >= 0 && k >= 0 && i < imax + 1 && j < jmax + 1 && k < kmax + 1) {
          uVel = getValidValue((U[i][j][k] + U[i][j + 1][k] + U[i][j][k + 1] + U[i][j + 1][k + 1]) * 0.25);
          vVel = getValidValue((V[i][j][k] + V[i + 1][j][k] + V[i][j][k + 1] + V[i + 1][j][k + 1]) * 0.25);
          wVel = getValidValue((W[i][j][k] + W[i + 1][j][k] + W[i][j + 1][k] + W[i + 1][j + 1][k]) * 0.25);
          fprintf(fp, "%f %f %f\n", uVel, vVel, wVel);
        } else {
          fprintf(fp, "0 0 0\n");
        }
      }
    }
  }
  fprintf(fp, "\n");
  fprintf(fp, "CELL_DATA %i \n", ((imax + 2) * (jmax + 2) * (kmax + 2)));
  fprintf(fp, "SCALARS pressure float 1 \n");
  fprintf(fp, "LOOKUP_TABLE default \n");
  for (k = 0; k < kmax + 2; k++) {
    for (j = 0; j < jmax + 2; j++) {
      for (i = 0; i < imax + 2; i++) {
        fprintf(fp, "%f\n", getValidValue(P[i][j][k]));
      }
    }
  }
  fprintf(fp, "\n");
  fprintf(fp, "SCALARS flag short 1 \n");
  fprintf(fp, "LOOKUP_TABLE default \n");
  for (k = 0; k < kmax + 2; k++) {
    for (j = 0; j < jmax + 2; j++) {
      for (i = 0; i < imax + 2; i++) {
        fprintf(fp, "%d\n", getcelltype(Flag[i][j][k]));
      }
    }
  }
  if (fclose(fp)) {
    char szBuff[80];
    sprintf(szBuff, "Failed to close %s", szFileName);
    errhandler(146, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProject/visual.c", szBuff);
  }
}
```