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

```asm
<write_vtkFile_debug>:
  endbr64
  push   %r15
  push   %r14
  mov    %edx,%r14d
  mov    %rdi,%rdx
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  movq   %xmm3,%rbx
  sub    $0x128,%rsp
  mov    0x160(%rsp),%rax
  mov    %ecx,0x18(%rsp)
  lea    0x70(%rsp),%r15
  mov    %esi,%ecx
  mov    %r8d,0x58(%rsp)
  lea    D63(%rip),%rsi
  mov    %r15,%rdi
  mov    0x170(%rsp),%rbp
  mov    %rax,0x40(%rsp)
  mov    0x168(%rsp),%rax
  mov    %r9,0x38(%rsp)
  mov    0x178(%rsp),%r13
  mov    %rax,0x48(%rsp)
  movsd  %xmm4,0x8(%rsp)
  movsd  %xmm5,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  mov    %r15,0x50(%rsp)
  call   <sprintf@plt>
  lea    D217(%rip),%rsi
  mov    %r15,%rdi
  call   <fopen@plt>
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  test   %rax,%rax
  je     L230
  mov    0x58(%rsp),%r12d
  mov    0x18(%rsp),%edx
  mov    %r14d,%esi
  mov    %rax,%rdi
  movq   %rbx,%xmm0
  mov    %rax,%r15
  movsd  %xmm2,0x8(%rsp)
  mov    %r12d,%ecx
  movsd  %xmm1,(%rsp)
  call   <write_vtkHeader_debug@plt>
  movq   %rbx,%xmm0
  mov    %r12d,%ecx
  mov    %r12d,%ebx
  mov    0x18(%rsp),%r12d
  movsd  (%rsp),%xmm1
  mov    %r14d,%esi
  mov    %r15,%rdi
  movsd  0x8(%rsp),%xmm2
  mov    %r12d,%edx
  call   <write_vtkPointCoordinates_debug@plt>
  mov    %r12d,%eax
  lea    0x3(%r14),%edx
  mov    %r15,%rdi
  add    $0x3,%eax
  lea    D193(%rip),%rsi
  imul   %eax,%edx
  lea    0x3(%rbx),%eax
  imul   %eax,%edx
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r15,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  lea    D107(%rip),%rdi
  mov    %r15,%rcx
  mov    $0x17,%edx
  mov    $0x1,%esi
  call   <fwrite@plt>
  lea    0x1(%rbx),%eax
  movl   $0xffffffff,0x1c(%rsp)
  mov    $0xfffffffffffffff8,%rdi
  mov    %eax,0x5c(%rsp)
  lea    D188(%rip),%rbx
  cmp    $0xffffffff,%eax
  jl     L173
  mov    %rbp,0x60(%rsp)
  mov    %rdi,%r12
  mov    %r13,0x68(%rsp)
  nopl   0x0(%rax)
L111:
  lea    0x8(%r12),%rax
  cmpl   $0xfffffffe,0x18(%rsp)
  mov    %rax,0x20(%rsp)
  jl     L4
  movl   $0xffffffff,0x8(%rsp)
  mov    $0xfffffffffffffff8,%r13
  nopl   0x0(%rax)
L9:
  lea    0x8(%r13),%rax
  mov    $0xffffffffffffffff,%rbp
  mov    %rax,0x10(%rsp)
  mov    0x8(%rsp),%eax
  or     0x1c(%rsp),%eax
  mov    %eax,(%rsp)
  cmp    $0xfffffffe,%r14d
  jge    L264
  jmp    L162
  nopw   0x0(%rax,%rax,1)
L32:
  mov    0x8(%rsp),%esi
  cmp    %esi,0x18(%rsp)
  jl     L78
  mov    0x1c(%rsp),%ecx
  cmp    %ecx,0x58(%rsp)
  jl     L78
  mov    0x38(%rsp),%rax
  mov    0x10(%rsp),%rsi
  mov    (%rax,%rbp,8),%rax
  mov    (%rax,%r13,1),%rdx
  mov    (%rax,%rsi,1),%rax
  mov    0x20(%rsp),%rsi
  movsd  (%rdx,%r12,1),%xmm0
  addsd  (%rax,%r12,1),%xmm0
  addsd  (%rdx,%rsi,1),%xmm0
  addsd  (%rax,%rsi,1),%xmm0
  mulsd  D70(%rip),%xmm0
  call   <getValidValue@plt>
  mov    0x40(%rsp),%rcx
  mov    0x20(%rsp),%rsi
  movsd  %xmm0,0x30(%rsp)
  mov    (%rcx,%rbp,8),%rax
  mov    (%rax,%r13,1),%rdx
  mov    0x8(%rcx,%rbp,8),%rax
  mov    (%rax,%r13,1),%rax
  movsd  (%rdx,%r12,1),%xmm0
  addsd  (%rax,%r12,1),%xmm0
  addsd  (%rdx,%rsi,1),%xmm0
  addsd  (%rax,%rsi,1),%xmm0
  mulsd  D70(%rip),%xmm0
  call   <getValidValue@plt>
  mov    0x48(%rsp),%rax
  movsd  %xmm0,0x28(%rsp)
  mov    (%rax,%rbp,8),%rdx
  mov    0x8(%rax,%rbp,8),%rax
  add    $0x1,%rbp
  mov    (%rdx,%r13,1),%rsi
  mov    (%rax,%r13,1),%rcx
  movsd  (%rsi,%r12,1),%xmm0
  mov    0x10(%rsp),%rsi
  addsd  (%rcx,%r12,1),%xmm0
  mov    (%rdx,%rsi,1),%rdx
  mov    (%rax,%rsi,1),%rax
  addsd  (%rdx,%r12,1),%xmm0
  addsd  (%rax,%r12,1),%xmm0
  mulsd  D70(%rip),%xmm0
  call   <getValidValue@plt>
  movsd  0x30(%rsp),%xmm3
  mov    %r15,%rdi
  mov    $0x3,%eax
  movsd  0x28(%rsp),%xmm1
  movapd %xmm0,%xmm2
  lea    D192(%rip),%rsi
  movapd %xmm3,%xmm0
  call   <fprintf@plt>
  lea    -0x1(%rbp),%eax
  cmp    %eax,%r14d
  jl     L162
L264:
  mov    (%rsp),%eax
  or     %ebp,%eax
  js     L78
  cmp    %ebp,%r14d
  jge    L32
L78:
  mov    %r15,%rcx
  mov    $0x6,%edx
  mov    $0x1,%esi
  mov    %rbx,%rdi
  call   <fwrite@plt>
  add    $0x1,%rbp
  lea    -0x1(%rbp),%eax
  cmp    %eax,%r14d
  jge    L264
L162:
  mov    0x8(%rsp),%edx
  mov    0x10(%rsp),%r13
  lea    0x1(%rdx),%eax
  cmp    %edx,0x18(%rsp)
  jl     L4
  mov    %eax,0x8(%rsp)
  jmp    L9
  nopl   0x0(%rax)
L4:
  mov    0x1c(%rsp),%edi
  mov    0x20(%rsp),%r12
  lea    0x1(%rdi),%eax
  cmp    %edi,0x58(%rsp)
  jl     L278
  mov    %eax,0x1c(%rsp)
  jmp    L111
L278:
  mov    %r15,%rsi
  mov    $0xa,%edi
  mov    0x60(%rsp),%rbp
  mov    0x68(%rsp),%r13
  call   <fputc@plt>
  mov    0x18(%rsp),%ebx
  lea    0x2(%r14),%edx
  mov    %r15,%rdi
  lea    D12(%rip),%rsi
  lea    0x2(%rbx),%eax
  imul   %eax,%edx
  mov    0x58(%rsp),%eax
  add    $0x2,%eax
  imul   %eax,%edx
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r15,%rcx
  mov    $0x1a,%edx
  mov    $0x1,%esi
  lea    D159(%rip),%rdi
  call   <fwrite@plt>
  lea    D92(%rip),%rax
  mov    %r15,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  mov    %rax,0x20(%rsp)
  call   <fwrite@plt>
  mov    0x5c(%rsp),%ecx
  test   %ecx,%ecx
  js     L234
  lea    0x1(%rbx),%eax
  mov    %r14d,(%rsp)
  lea    D103(%rip),%r12
  mov    %eax,0x1c(%rsp)
  movq   $0x0,0x10(%rsp)
  mov    %r13,0x28(%rsp)
  nopl   0x0(%rax)
L76:
  mov    0x1c(%rsp),%edx
  test   %edx,%edx
  js     L37
  movq   $0x0,0x8(%rsp)
  mov    0x10(%rsp),%rax
  lea    0x0(,%rax,8),%r13
  cs nopw 0x0(%rax,%rax,1)
L0:
  mov    0x8(%rsp),%rax
  xor    %ebx,%ebx
  cmpl   $0xffffffff,(%rsp)
  lea    0x0(,%rax,8),%r14
  jl     L163
  nopl   (%rax)
L157:
  mov    0x0(%rbp,%rbx,8),%rax
  add    $0x1,%rbx
  mov    (%rax,%r14,1),%rax
  movsd  (%rax,%r13,1),%xmm0
  call   <getValidValue@plt>
  mov    %r12,%rsi
  mov    %r15,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  lea    -0x1(%rbx),%eax
  cmp    (%rsp),%eax
  jle    L157
L163:
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  sub    $0x1,%eax
  cmp    0x18(%rsp),%eax
  jle    L0
L37:
  addq   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%rax
  sub    $0x1,%eax
  cmp    %eax,0x58(%rsp)
  jge    L76
  mov    %r15,%rsi
  mov    $0xa,%edi
  mov    (%rsp),%r14d
  xor    %ebp,%ebp
  mov    0x28(%rsp),%r13
  lea    D106(%rip),%r12
  call   <fputc@plt>
  mov    %r15,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  lea    D98(%rip),%rdi
  call   <fwrite@plt>
  mov    0x20(%rsp),%rdi
  mov    %r15,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  call   <fwrite@plt>
  mov    0x5c(%rsp),%eax
  mov    %r14d,(%rsp)
  lea    0x4(,%rax,4),%rax
  mov    %rax,0x10(%rsp)
  nopl   0x0(%rax,%rax,1)
L97:
  movq   $0x0,0x8(%rsp)
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  js     L226
  nopl   0x0(%rax)
L121:
  mov    0x8(%rsp),%rax
  xor    %ebx,%ebx
  cmpl   $0xffffffff,(%rsp)
  lea    0x0(,%rax,8),%r14
  jl     L43
  nopl   (%rax)
L178:
  mov    0x0(%r13,%rbx,8),%rax
  add    $0x1,%rbx
  mov    (%rax,%r14,1),%rax
  mov    (%rax,%rbp,1),%edi
  call   <getcelltype@plt>
  mov    %r12,%rsi
  mov    %r15,%rdi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <fprintf@plt>
  lea    -0x1(%rbx),%eax
  cmp    %eax,(%rsp)
  jge    L178
L43:
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  sub    $0x1,%eax
  cmp    %eax,0x18(%rsp)
  jge    L121
L226:
  add    $0x4,%rbp
  cmp    %rbp,0x10(%rsp)
  jne    L97
L262:
  mov    %r15,%rdi
  call   <fclose@plt>
  test   %rax,%rax
  jne    L77
L265:
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L135
  add    $0x128,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L77:
  mov    0x50(%rsp),%rdx
  lea    0xc0(%rsp),%r12
  lea    D99(%rip),%rsi
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    $0x92,%edi
  lea    D111(%rip),%rsi
  call   <errhandler@plt>
  jmp    L265
L230:
  mov    0x50(%rsp),%rdx
  lea    0xc0(%rsp),%r12
  lea    D196(%rip),%rsi
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    $0x59,%edi
  lea    D111(%rip),%rsi
  call   <errhandler@plt>
  jmp    L265
L173:
  mov    %r15,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    0x18(%rsp),%eax
  lea    0x2(%r14),%edx
  mov    %r15,%rdi
  lea    D12(%rip),%rsi
  add    $0x2,%eax
  imul   %eax,%edx
  mov    0x58(%rsp),%eax
  add    $0x2,%eax
  imul   %eax,%edx
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r15,%rcx
  mov    $0x1a,%edx
  mov    $0x1,%esi
  lea    D159(%rip),%rdi
  call   <fwrite@plt>
  lea    D92(%rip),%rax
  mov    %r15,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  mov    %rax,0x20(%rsp)
  call   <fwrite@plt>
L234:
  mov    %r15,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %r15,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  lea    D98(%rip),%rdi
  call   <fwrite@plt>
  mov    0x20(%rsp),%rdi
  mov    %r15,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  call   <fwrite@plt>
  jmp    L262
L135:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D63
datatype: string
name: read_data
arguments: data_tag: D217
datatype: string
name: read_data
arguments: data_tag: D193
datatype: string
name: read_data
arguments: data_tag: D107
datatype: string
name: read_data
arguments: data_tag: D188
datatype: string
name: read_data
arguments: data_tag: D70
datatype: f64
name: read_data
arguments: data_tag: D192
datatype: string
name: read_data
arguments: data_tag: D12
datatype: string
name: read_data
arguments: data_tag: D159
datatype: string
name: read_data
arguments: data_tag: D92
datatype: string
name: read_data
arguments: data_tag: D103
datatype: string
name: read_data
arguments: data_tag: D106
datatype: string
name: read_data
arguments: data_tag: D98
datatype: string
name: read_data
arguments: data_tag: D99
datatype: string
name: read_data
arguments: data_tag: D111
datatype: string
name: read_data
arguments: data_tag: D196
datatype: string

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

tool: D217: w

tool: D193: POINT_DATA %i 


tool: D107: VECTORS velocity float


tool: D188: 0 0 0


tool: D70: 0.25

tool: D192: %f %f %f


tool: D12: CELL_DATA %i 


tool: D159: SCALARS pressure float 1 


tool: D92: LOOKUP_TABLE default 


tool: D103: %f


tool: D106: %d


tool: D98: SCALARS flag short 1 


tool: D99: Failed to close %s

tool: D111: /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: D196: Failed to open %s

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