user: 请将以下的汇编代码转换成C语言代码:

```asm
<Mastrfu>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x178,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x168(%rsp)
  xor    %eax,%eax
  call   <cdoInitialize@plt>
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <cdoStreamName@plt>
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <pstreamOpenRead@plt>
  mov    %eax,%r12d
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <pstreamInqVlist@plt>
  mov    %eax,%r13d
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <vlistNvars@plt>
  cmp    $0x1,%eax
  jne    L191
L143:
  mov    $0x0,%esi
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <vlistInqVarCode@plt>
  test   %eax,%eax
  jle    L149
  cmp    $0x84,%eax
  jne    L64
L149:
  mov    $0x0,%esi
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <vlistInqVarMissval@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  %xmm1,0x40(%rsp)
  mov    $0x0,%esi
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <vlistInqVarZaxis@plt>
  mov    %eax,%r15d
  mov    %eax,0x28(%rsp)
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <zaxisInqType@plt>
  cmp    $0x4,%eax
  jne    L25
L133:
  mov    $0x0,%esi
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <vlistInqVarGrid@plt>
  mov    %eax,0x2c(%rsp)
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <gridInqXsize@plt>
  cmp    $0x1,%eax
  jg     L172
L184:
  mov    0x2c(%rsp),%edi
  mov    $0x0,%eax
  call   <gridInqSize@plt>
  mov    %eax,%r15d
  mov    0x28(%rsp),%edi
  mov    $0x0,%eax
  call   <zaxisInqSize@plt>
  mov    %eax,%ebp
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <vlistDuplicate@plt>
  mov    %eax,%ebx
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <vlistInqTaxis@plt>
  mov    %eax,0x38(%rsp)
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <taxisDuplicate@plt>
  mov    %eax,0x3c(%rsp)
  mov    %eax,%esi
  mov    %ebx,%edi
  mov    $0x0,%eax
  call   <vlistDefTaxis@plt>
  mov    $0x110,%edx
  mov    $0x0,%esi
  mov    %ebx,%edi
  mov    $0x0,%eax
  call   <vlistDefVarCode@plt>
  lea    D31(%rip),%rdx
  mov    $0x0,%esi
  mov    %ebx,%edi
  mov    $0x0,%eax
  call   <vlistDefVarName@plt>
  lea    D34(%rip),%rdx
  mov    $0x0,%esi
  mov    %ebx,%edi
  mov    $0x0,%eax
  call   <vlistDefVarLongname@plt>
  lea    D74(%rip),%rdx
  mov    $0x0,%esi
  mov    %ebx,%edi
  mov    $0x0,%eax
  call   <vlistDefVarUnits@plt>
  mov    $0x84,%edx
  mov    $0x0,%esi
  mov    %ebx,%edi
  mov    $0x0,%eax
  call   <vlistDefVarDatatype@plt>
  mov    $0x0,%eax
  call   <cdoFiletype@plt>
  mov    %eax,%r13d
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <cdoStreamName@plt>
  mov    %eax,%edi
  mov    %r13d,%esi
  mov    $0x0,%eax
  call   <pstreamOpenWrite@plt>
  mov    %eax,%r13d
  mov    %ebx,%esi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <pstreamDefVlist@plt>
  imul   %r15d,%ebp
  movslq %ebp,%rbx
  shl    $0x3,%rbx
  mov    %rbx,%rcx
  mov    $0xaa,%edx
  lea    D91(%rip),%r14
  mov    %r14,%rsi
  lea    D115(%rip),%rbp
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <Malloc@plt>
  mov    %eax,0x48(%rsp)
  cltq
  mov    %rax,0x18(%rsp)
  mov    %rbx,%rcx
  mov    $0xab,%edx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <Malloc@plt>
  mov    %eax,0x4c(%rsp)
  movslq %eax,%r14
  movl   $0x0,0x14(%rsp)
  lea    0x58(%rsp),%rax
  mov    %rax,0x8(%rsp)
  mov    %r14,0x30(%rsp)
  jmp    L126
L191:
  lea    D80(%rip),%rdi
  mov    $0x0,%eax
  call   <cdoAbort@plt>
  jmp    L143
L64:
  mov    %eax,%esi
  lea    D5(%rip),%rdi
  mov    $0x0,%eax
  call   <cdoWarning@plt>
  jmp    L149
L25:
  mov    %r15d,%edi
  mov    $0x0,%eax
  call   <zaxisInqType@plt>
  cmp    $0x1,%eax
  je     L133
  lea    0x60(%rsp),%rbx
  mov    %rbx,%rsi
  mov    %r15d,%edi
  mov    $0x0,%eax
  call   <zaxisInqLongname@plt>
  mov    %rbx,%rsi
  lea    D44(%rip),%rdi
  mov    $0x0,%eax
  call   <cdoWarning@plt>
  jmp    L133
L172:
  lea    D107(%rip),%rdi
  mov    $0x0,%eax
  call   <cdoAbort@plt>
  jmp    L184
L119:
  mov    0x30(%rsp),%r14
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <pstreamClose@plt>
  mov    %r12d,%edi
  mov    $0x0,%eax
  call   <pstreamClose@plt>
  cmpl   $0x0,0x48(%rsp)
  jne    L171
L181:
  cmpl   $0x0,0x4c(%rsp)
  jne    L82
L138:
  mov    $0x0,%eax
  call   <cdoFinish@plt>
  mov    0x168(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L173
  mov    $0x0,%eax
  add    $0x178,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L171:
  mov    0x18(%rsp),%rcx
  mov    $0xcd,%edx
  lea    D91(%rip),%rsi
  lea    D115(%rip),%rdi
  mov    $0x0,%eax
  call   <Free@plt>
  jmp    L181
L82:
  mov    %r14,%rcx
  mov    $0xce,%edx
  lea    D91(%rip),%rsi
  lea    D115(%rip),%rdi
  mov    $0x0,%eax
  call   <Free@plt>
  jmp    L138
L135:
  movsd  0x40(%rsp),%xmm0
  mov    $0x0,%r8d
  mov    0x30(%rsp),%rcx
  mov    0x18(%rsp),%rdx
  mov    0x28(%rsp),%esi
  mov    0x2c(%rsp),%edi
  mov    $0x1,%eax
  call   <mastrfu@plt>
L83:
  addl   $0x1,0x14(%rsp)
L126:
  mov    0x14(%rsp),%esi
  mov    %r12d,%edi
  mov    $0x0,%eax
  call   <pstreamInqTimestep@plt>
  mov    %eax,%r14d
  test   %eax,%eax
  je     L119
  mov    0x38(%rsp),%esi
  mov    0x3c(%rsp),%edi
  mov    $0x0,%eax
  call   <taxisCopyTimestep@plt>
  mov    0x14(%rsp),%esi
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <pstreamDefTimestep@plt>
  test   %r14d,%r14d
  jle    L135
  mov    $0x0,%ebp
  mov    $0x0,%ebx
  mov    %r13d,0x24(%rsp)
  mov    0x18(%rsp),%r13
L190:
  lea    0x54(%rsp),%rsi
  mov    0x8(%rsp),%rdx
  mov    %r12d,%edi
  mov    $0x0,%eax
  call   <pstreamInqRecord@plt>
  lea    0x5c(%rsp),%rdx
  mov    %r15d,%eax
  imul   0x58(%rsp),%eax
  cltq
  lea    0x0(%r13,%rax,8),%rsi
  mov    %r12d,%edi
  mov    $0x0,%eax
  call   <pstreamReadRecord@plt>
  add    0x5c(%rsp),%ebp
  mov    %ebx,%eax
  add    $0x1,%ebx
  cmp    %ebx,%r14d
  jne    L190
  mov    %eax,0x20(%rsp)
  mov    0x24(%rsp),%r13d
  movsd  0x40(%rsp),%xmm0
  mov    %ebp,%r8d
  mov    0x30(%rsp),%r14
  mov    %r14,%rcx
  mov    0x18(%rsp),%rdx
  mov    0x28(%rsp),%esi
  mov    0x2c(%rsp),%edi
  mov    $0x1,%eax
  call   <mastrfu@plt>
  mov    $0x0,%ebx
  mov    %r12d,0x24(%rsp)
  mov    0x20(%rsp),%r12d
L92:
  movl   $0x0,0x54(%rsp)
  mov    %ebx,0x58(%rsp)
  mov    %ebx,%edx
  mov    $0x0,%esi
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <pstreamDefRecord@plt>
  mov    %r15d,%eax
  imul   0x58(%rsp),%eax
  cltq
  lea    (%r14,%rax,8),%rsi
  mov    %ebp,%edx
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <pstreamWriteRecord@plt>
  mov    %ebx,%eax
  add    $0x1,%ebx
  cmp    %eax,%r12d
  jne    L92
  mov    0x24(%rsp),%r12d
  jmp    L83
L173:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D31
type_infered: string
name: disassemble_data
arguments: data_tag: D34
type_infered: string
name: disassemble_data
arguments: data_tag: D74
type_infered: string
name: disassemble_data
arguments: data_tag: D91
type_infered: string
name: disassemble_data
arguments: data_tag: D115
type_infered: string
name: disassemble_data
arguments: data_tag: D80
type_infered: string
name: disassemble_data
arguments: data_tag: D5
type_infered: string
name: disassemble_data
arguments: data_tag: D44
type_infered: string
name: disassemble_data
arguments: data_tag: D107
type_infered: string

tool: D31: mastrfu

tool: D34: mass stream function

tool: D74: kg/s

tool: D91: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Mastrfu.c

tool: D115: Mastrfu

tool: D80: This operator works only with one variable!

tool: D5: Unexpected code %d!

tool: D44: Unexpected vertical grid %s!

tool: D107: Grid must be a zonal mean!

assistant: ```c
void *Mastrfu(void *argument) {
  int streamID1, streamID2;
  int nrecs;
  int tsID, recID, varID, levelID;
  int gridsize;
  int nvars, code, gridID, zaxisID, nlev;
  int vlistID1, vlistID2;
  int offset;
  int nmiss, nmiss1;
  double missval;
  double *array1, *array2;
  int taxisID1, taxisID2;
  cdoInitialize(argument);
  streamID1 = pstreamOpenRead(cdoStreamName(0));
  vlistID1 = pstreamInqVlist(streamID1);
  nvars = vlistNvars(vlistID1);
  if (nvars != 1)
    cdoAbort("This operator works only with one variable!");
  code = vlistInqVarCode(vlistID1, 0);
  if (code > 0 && code != 132)
    cdoWarning("Unexpected code %d!", code);
  missval = vlistInqVarMissval(vlistID1, 0);
  zaxisID = vlistInqVarZaxis(vlistID1, 0);
  if (zaxisInqType(zaxisID) != 4 && zaxisInqType(zaxisID) != 1) {
    char longname[256];
    zaxisInqLongname(zaxisID, longname);
    cdoWarning("Unexpected vertical grid %s!", longname);
  }
  gridID = vlistInqVarGrid(vlistID1, 0);
  if (gridInqXsize(gridID) > 1)
    cdoAbort("Grid must be a zonal mean!");
  gridsize = gridInqSize(gridID);
  nlev = zaxisInqSize(zaxisID);
  vlistID2 = vlistDuplicate(vlistID1);
  taxisID1 = vlistInqTaxis(vlistID1);
  taxisID2 = taxisDuplicate(taxisID1);
  vlistDefTaxis(vlistID2, taxisID2);
  vlistDefVarCode(vlistID2, 0, 272);
  vlistDefVarName(vlistID2, 0, "mastrfu");
  vlistDefVarLongname(vlistID2, 0, "mass stream function");
  vlistDefVarUnits(vlistID2, 0, "kg/s");
  vlistDefVarDatatype(vlistID2, 0, 132);
  streamID2 = pstreamOpenWrite(cdoStreamName(1), cdoFiletype());
  pstreamDefVlist(streamID2, vlistID2);
  array1 = (double *)Malloc(__func__, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Mastrfu.c", 170, (gridsize * nlev * sizeof(double)));
  array2 = (double *)Malloc(__func__, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Mastrfu.c", 171, (gridsize * nlev * sizeof(double)));
  tsID = 0;
  while ((nrecs = pstreamInqTimestep(streamID1, tsID))) {
    taxisCopyTimestep(taxisID2, taxisID1);
    pstreamDefTimestep(streamID2, tsID);
    nmiss = 0;
    for (recID = 0; recID < nrecs; recID++) {
      pstreamInqRecord(streamID1, &varID, &levelID);
      offset = gridsize * levelID;
      pstreamReadRecord(streamID1, array1 + offset, &nmiss1);
      nmiss += nmiss1;
    }
    mastrfu(gridID, zaxisID, array1, array2, nmiss, missval);
    for (recID = 0; recID < nrecs; recID++) {
      varID = 0;
      levelID = recID;
      pstreamDefRecord(streamID2, varID, levelID);
      offset = gridsize * levelID;
      pstreamWriteRecord(streamID2, array2 + offset, nmiss);
    }
    tsID++;
  }
  pstreamClose(streamID2);
  pstreamClose(streamID1);
  if (array1)
    Free(__func__, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Mastrfu.c", 205, (array1));
  if (array2)
    Free(__func__, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Mastrfu.c", 206, (array2));
  cdoFinish();
  return (0);
}
```