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


x86 assembly (clang, -O0):
<Mastrfu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1290 <cdoInitialize@plt>
xor    %edi,%edi
mov    $0x0,%al
call   10b0 <cdoStreamName@plt>
mov    %eax,%edi
mov    $0x0,%al
call   1180 <pstreamOpenRead@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1160 <pstreamInqVlist@plt>
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%edi
mov    $0x0,%al
call   1100 <vlistNvars@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x1,-0x2c(%rbp)
je     13e1 <Mastrfu+0x61>
lea    0xc26(%rip),%rdi
mov    $0x0,%al
call   11b0 <cdoAbort@plt>
mov    -0x40(%rbp),%edi
xor    %esi,%esi
mov    $0x0,%al
call   10c0 <vlistInqVarCode@plt>
mov    %eax,-0x30(%rbp)
cmpl   $0x0,-0x30(%rbp)
jle    1418 <Mastrfu+0x98>
cmpl   $0x84,-0x30(%rbp)
je     1418 <Mastrfu+0x98>
mov    -0x30(%rbp),%esi
lea    0xc1b(%rip),%rdi
mov    $0x0,%al
call   1250 <cdoWarning@plt>
mov    -0x40(%rbp),%edi
xor    %esi,%esi
mov    $0x0,%al
call   1130 <vlistInqVarMissval@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x40(%rbp),%edi
xor    %esi,%esi
mov    $0x0,%al
call   11f0 <vlistInqVarZaxis@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x0,%al
call   1210 <zaxisInqType@plt>
cmp    $0x4,%eax
je     1488 <Mastrfu+0x108>
mov    -0x38(%rbp),%edi
mov    $0x0,%al
call   1210 <zaxisInqType@plt>
cmp    $0x1,%eax
je     1488 <Mastrfu+0x108>
mov    -0x38(%rbp),%edi
lea    -0x170(%rbp),%rsi
mov    $0x0,%al
call   11c0 <zaxisInqLongname@plt>
lea    -0x170(%rbp),%rsi
lea    0xbbf(%rip),%rdi
mov    $0x0,%al
call   1250 <cdoWarning@plt>
mov    -0x40(%rbp),%edi
xor    %esi,%esi
mov    $0x0,%al
call   10a0 <vlistInqVarGrid@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%edi
mov    $0x0,%al
call   1140 <gridInqXsize@plt>
cmp    $0x1,%eax
jle    14b8 <Mastrfu+0x138>
lea    0xbac(%rip),%rdi
mov    $0x0,%al
call   11b0 <cdoAbort@plt>
mov    -0x34(%rbp),%edi
mov    $0x0,%al
call   1270 <gridInqSize@plt>
mov    %eax,-0x28(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x0,%al
call   1050 <zaxisInqSize@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x40(%rbp),%edi
mov    $0x0,%al
call   10d0 <vlistDuplicate@plt>
mov    %eax,-0x44(%rbp)
mov    -0x40(%rbp),%edi
mov    $0x0,%al
call   1110 <vlistInqTaxis@plt>
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%edi
mov    $0x0,%al
call   12a0 <taxisDuplicate@plt>
mov    %eax,-0x70(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x70(%rbp),%esi
mov    $0x0,%al
call   1070 <vlistDefTaxis@plt>
mov    -0x44(%rbp),%edi
xor    %esi,%esi
mov    $0x110,%edx
mov    $0x0,%al
call   1170 <vlistDefVarCode@plt>
mov    -0x44(%rbp),%edi
xor    %esi,%esi
lea    0xb55(%rip),%rdx
mov    $0x0,%al
call   1060 <vlistDefVarName@plt>
mov    -0x44(%rbp),%edi
xor    %esi,%esi
lea    0xb4a(%rip),%rdx
mov    $0x0,%al
call   1120 <vlistDefVarLongname@plt>
mov    -0x44(%rbp),%edi
xor    %esi,%esi
lea    0xb4c(%rip),%rdx
mov    $0x0,%al
call   10f0 <vlistDefVarUnits@plt>
mov    -0x44(%rbp),%edi
xor    %esi,%esi
mov    $0x84,%edx
mov    $0x0,%al
call   1090 <vlistDefVarDatatype@plt>
mov    $0x1,%edi
mov    $0x0,%al
call   10b0 <cdoStreamName@plt>
mov    %eax,-0x174(%rbp)
mov    $0x0,%al
call   1200 <cdoFiletype@plt>
mov    -0x174(%rbp),%edi
mov    %eax,%esi
mov    $0x0,%al
call   1150 <pstreamOpenWrite@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x44(%rbp),%esi
mov    $0x0,%al
call   1260 <pstreamDefVlist@plt>
mov    -0x28(%rbp),%eax
imul   -0x3c(%rbp),%eax
movslq %eax,%rcx
shl    $0x3,%rcx
lea    0xaec(%rip),%rdi
lea    0xaed(%rip),%rsi
mov    $0xaa,%edx
mov    $0x0,%al
call   1030 <Malloc@plt>
cltq
mov    %rax,-0x60(%rbp)
mov    -0x28(%rbp),%eax
imul   -0x3c(%rbp),%eax
movslq %eax,%rcx
shl    $0x3,%rcx
lea    0xabe(%rip),%rdi
lea    0xabf(%rip),%rsi
mov    $0xab,%edx
mov    $0x0,%al
call   1030 <Malloc@plt>
cltq
mov    %rax,-0x68(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    $0x0,%al
call   11a0 <pstreamInqTimestep@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1729 <Mastrfu+0x3a9>
mov    -0x70(%rbp),%edi
mov    -0x6c(%rbp),%esi
mov    $0x0,%al
call   1240 <taxisCopyTimestep@plt>
mov    -0x10(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    $0x0,%al
call   1080 <pstreamDefTimestep@plt>
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1699 <Mastrfu+0x319>
mov    -0xc(%rbp),%edi
lea    -0x20(%rbp),%rsi
lea    -0x24(%rbp),%rdx
mov    $0x0,%al
call   1190 <pstreamInqRecord@plt>
mov    -0x28(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x60(%rbp),%rsi
movslq -0x48(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
lea    -0x50(%rbp),%rdx
mov    $0x0,%al
call   1220 <pstreamReadRecord@plt>
mov    -0x50(%rbp),%eax
add    -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    163d <Mastrfu+0x2bd>
mov    -0x34(%rbp),%edi
mov    -0x38(%rbp),%esi
mov    -0x60(%rbp),%rdx
mov    -0x68(%rbp),%rcx
mov    -0x4c(%rbp),%r8d
movsd  -0x58(%rbp),%xmm0
mov    $0x1,%al
call   1040 <mastrfu@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    171b <Mastrfu+0x39b>
movl   $0x0,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    $0x0,%al
call   10e0 <pstreamDefRecord@plt>
mov    -0x28(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x68(%rbp),%rsi
movslq -0x48(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x4c(%rbp),%edx
mov    $0x0,%al
call   1280 <pstreamWriteRecord@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    16be <Mastrfu+0x33e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    15fc <Mastrfu+0x27c>
mov    -0x10(%rbp),%edi
mov    $0x0,%al
call   11d0 <pstreamClose@plt>
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   11d0 <pstreamClose@plt>
cmpq   $0x0,-0x60(%rbp)
je     1766 <Mastrfu+0x3e6>
mov    -0x60(%rbp),%rcx
lea    0x947(%rip),%rdi
lea    0x948(%rip),%rsi
mov    $0xcd,%edx
mov    $0x0,%al
call   11e0 <Free@plt>
cmpq   $0x0,-0x68(%rbp)
je     178f <Mastrfu+0x40f>
mov    -0x68(%rbp),%rcx
lea    0x91e(%rip),%rdi
lea    0x91f(%rip),%rsi
mov    $0xce,%edx
mov    $0x0,%al
call   11e0 <Free@plt>
mov    $0x0,%al
call   1230 <cdoFinish@plt>
xor    %eax,%eax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mastrfu>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x158,%rsp
xor    %eax,%eax
call   1290 <cdoInitialize@plt>
xor    %edi,%edi
xor    %eax,%eax
call   10b0 <cdoStreamName@plt>
mov    %eax,%edi
xor    %eax,%eax
call   1180 <pstreamOpenRead@plt>
mov    %eax,%ebx
mov    %eax,%edi
xor    %eax,%eax
call   1160 <pstreamInqVlist@plt>
mov    %eax,%r14d
mov    %eax,%edi
xor    %eax,%eax
call   1100 <vlistNvars@plt>
cmp    $0x1,%eax
je     13d4 <Mastrfu+0x54>
lea    0xc33(%rip),%rdi
xor    %eax,%eax
call   11b0 <cdoAbort@plt>
mov    %r14d,%edi
xor    %esi,%esi
xor    %eax,%eax
call   10c0 <vlistInqVarCode@plt>
test   %eax,%eax
jle    13fb <Mastrfu+0x7b>
cmp    $0x84,%eax
je     13fb <Mastrfu+0x7b>
lea    0xc3a(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1250 <cdoWarning@plt>
mov    %r14d,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1130 <vlistInqVarMissval@plt>
mov    %eax,0xc(%rsp)
mov    %r14d,%edi
xor    %esi,%esi
xor    %eax,%eax
call   11f0 <vlistInqVarZaxis@plt>
mov    %eax,%ebp
mov    %eax,%edi
xor    %eax,%eax
call   1210 <zaxisInqType@plt>
cmp    $0x4,%eax
je     1457 <Mastrfu+0xd7>
mov    %ebp,%edi
xor    %eax,%eax
call   1210 <zaxisInqType@plt>
cmp    $0x1,%eax
je     1457 <Mastrfu+0xd7>
lea    0x50(%rsp),%r15
mov    %ebp,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   11c0 <zaxisInqLongname@plt>
lea    0xbf3(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1250 <cdoWarning@plt>
mov    %ebx,0x14(%rsp)
mov    %r14d,%edi
xor    %esi,%esi
xor    %eax,%eax
call   10a0 <vlistInqVarGrid@plt>
mov    %eax,0x4(%rsp)
mov    %eax,%edi
xor    %eax,%eax
call   1140 <gridInqXsize@plt>
cmp    $0x2,%eax
jl     1487 <Mastrfu+0x107>
lea    0xbdd(%rip),%rdi
xor    %eax,%eax
call   11b0 <cdoAbort@plt>
mov    0x4(%rsp),%edi
xor    %eax,%eax
call   1270 <gridInqSize@plt>
mov    %eax,%ebx
mov    %ebp,0x10(%rsp)
mov    %ebp,%edi
xor    %eax,%eax
call   1050 <zaxisInqSize@plt>
mov    %eax,%r12d
mov    %r14d,%edi
xor    %eax,%eax
call   10d0 <vlistDuplicate@plt>
mov    %eax,%r13d
mov    %r14d,%edi
xor    %eax,%eax
call   1110 <vlistInqTaxis@plt>
mov    %eax,0x34(%rsp)
mov    %eax,%edi
xor    %eax,%eax
call   12a0 <taxisDuplicate@plt>
mov    %r13d,%edi
mov    %eax,0x30(%rsp)
mov    %eax,%esi
xor    %eax,%eax
call   1070 <vlistDefTaxis@plt>
mov    %r13d,%edi
xor    %esi,%esi
mov    $0x110,%edx
xor    %eax,%eax
call   1170 <vlistDefVarCode@plt>
lea    0xb88(%rip),%rdx
mov    %r13d,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1060 <vlistDefVarName@plt>
lea    0xb7d(%rip),%rdx
mov    %r13d,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1120 <vlistDefVarLongname@plt>
lea    0xb7f(%rip),%rdx
mov    %r13d,%edi
xor    %esi,%esi
xor    %eax,%eax
call   10f0 <vlistDefVarUnits@plt>
mov    %r13d,%edi
xor    %esi,%esi
mov    $0x84,%edx
xor    %eax,%eax
call   1090 <vlistDefVarDatatype@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   10b0 <cdoStreamName@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1200 <cdoFiletype@plt>
mov    %ebp,%edi
mov    %eax,%esi
xor    %eax,%eax
call   1150 <pstreamOpenWrite@plt>
mov    %eax,0x8(%rsp)
mov    %eax,%edi
mov    %r13d,%esi
xor    %eax,%eax
call   1260 <pstreamDefVlist@plt>
mov    %ebx,0x2c(%rsp)
imul   %ebx,%r12d
movslq %r12d,%rbp
shl    $0x3,%rbp
lea    0xb21(%rip),%r14
lea    0xb22(%rip),%r13
mov    %r14,%rdi
mov    %r13,%rsi
mov    $0xaa,%edx
mov    %rbp,%rcx
xor    %eax,%eax
call   1030 <Malloc@plt>
mov    %eax,0x24(%rsp)
cltq
mov    %rax,0x18(%rsp)
mov    %r14,%rdi
mov    %r13,%rsi
mov    $0xab,%edx
mov    %rbp,%rcx
xor    %eax,%eax
call   1030 <Malloc@plt>
mov    %eax,0x28(%rsp)
movslq %eax,%r12
mov    0x14(%rsp),%r13d
mov    %r13d,%edi
xor    %esi,%esi
xor    %eax,%eax
call   11a0 <pstreamInqTimestep@plt>
test   %eax,%eax
je     172f <Mastrfu+0x3af>
mov    %eax,%r15d
cvtsi2sdl 0xc(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
mov    %rsp,%r14
xor    %ebp,%ebp
mov    %r12,0x48(%rsp)
jmp    1636 <Mastrfu+0x2b6>
mov    0x4(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0x18(%rsp),%rdx
mov    %r12,%rcx
xor    %r8d,%r8d
movsd  0x40(%rsp),%xmm0
mov    $0x1,%al
call   1040 <mastrfu@plt>
mov    0xc(%rsp),%ebp
add    $0x1,%ebp
mov    0x14(%rsp),%r13d
mov    %r13d,%edi
mov    %ebp,%esi
xor    %eax,%eax
call   11a0 <pstreamInqTimestep@plt>
mov    %eax,%r15d
test   %eax,%eax
mov    %rsp,%r14
je     172f <Mastrfu+0x3af>
mov    0x30(%rsp),%edi
mov    0x34(%rsp),%esi
xor    %eax,%eax
call   1240 <taxisCopyTimestep@plt>
mov    0x8(%rsp),%edi
mov    %ebp,%esi
xor    %eax,%eax
call   1080 <pstreamDefTimestep@plt>
test   %r15d,%r15d
mov    %ebp,0xc(%rsp)
jle    15f0 <Mastrfu+0x270>
mov    %r13d,%r12d
xor    %r13d,%r13d
mov    %r15d,0x38(%rsp)
mov    %r15d,%ebp
mov    0x2c(%rsp),%r15d
xchg   %ax,%ax
mov    %r12d,%edi
lea    0x50(%rsp),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1190 <pstreamInqRecord@plt>
movslq (%rsp),%rax
movslq %r15d,%rbx
imul   %rbx,%rax
mov    0x18(%rsp),%rcx
lea    (%rcx,%rax,8),%rsi
mov    %r12d,%edi
lea    0x3c(%rsp),%rdx
xor    %eax,%eax
call   1220 <pstreamReadRecord@plt>
add    0x3c(%rsp),%r13d
add    $0xffffffff,%ebp
jne    1670 <Mastrfu+0x2f0>
mov    0x4(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0x18(%rsp),%rdx
mov    0x48(%rsp),%r12
mov    %r12,%rcx
mov    %r13d,%r8d
movsd  0x40(%rsp),%xmm0
mov    $0x1,%al
call   1040 <mastrfu@plt>
mov    0x38(%rsp),%r14d
test   %r14d,%r14d
mov    0x8(%rsp),%r15d
jle    1610 <Mastrfu+0x290>
xor    %ebp,%ebp
nopl   0x0(%rax)
movl   $0x0,0x50(%rsp)
mov    %ebp,(%rsp)
mov    %r15d,%edi
xor    %esi,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   10e0 <pstreamDefRecord@plt>
movslq (%rsp),%rax
imul   %rbx,%rax
lea    (%r12,%rax,8),%rsi
mov    %r15d,%edi
mov    %r13d,%edx
xor    %eax,%eax
call   1280 <pstreamWriteRecord@plt>
add    $0x1,%ebp
cmp    %ebp,%r14d
jne    16f0 <Mastrfu+0x370>
jmp    1610 <Mastrfu+0x290>
mov    0x8(%rsp),%edi
xor    %eax,%eax
call   11d0 <pstreamClose@plt>
mov    %r13d,%edi
xor    %eax,%eax
call   11d0 <pstreamClose@plt>
cmpl   $0x0,0x24(%rsp)
je     176a <Mastrfu+0x3ea>
lea    0x948(%rip),%rdi
lea    0x949(%rip),%rsi
mov    $0xcd,%edx
mov    0x18(%rsp),%rcx
xor    %eax,%eax
call   11e0 <Free@plt>
cmpl   $0x0,0x28(%rsp)
je     178e <Mastrfu+0x40e>
lea    0x922(%rip),%rdi
lea    0x923(%rip),%rsi
mov    $0xce,%edx
mov    %r12,%rcx
xor    %eax,%eax
call   11e0 <Free@plt>
xor    %eax,%eax
call   1230 <cdoFinish@plt>
xor    %eax,%eax
add    $0x158,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [44 x i8] c"This operator works only with one variable!\00"
@.str.1 = [20 x i8] c"Unexpected code %d!\00"
@.str.2 = [29 x i8] c"Unexpected vertical grid %s!\00"
@.str.3 = [27 x i8] c"Grid must be a zonal mean!\00"
@.str.4 = [8 x i8] c"mastrfu\00"
@.str.5 = [21 x i8] c"mass stream function\00"
@.str.6 = [5 x i8] c"kg/s\00"
@__func__.Mastrfu = [8 x i8] c"Mastrfu\00"
@.str.7 = [131 x i8] c"/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\00"
define i8* @Mastrfu(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca double
%22 = alloca double*
%23 = alloca double*
%24 = alloca i32
%25 = alloca i32
%26 = alloca [256 x i8]
store i8* %0, i8** %2
%27 = load i8*, i8** %2
%28 = call i32 (i8*, ...) bitcast (i32 (...)* @cdoInitialize to i32 (i8*, ...)*)(i8* %27)
%29 = call i32 (i32, ...) bitcast (i32 (...)* @cdoStreamName to i32 (i32, ...)*)(i32 0)
%30 = call i32 (i32, ...) bitcast (i32 (...)* @pstreamOpenRead to i32 (i32, ...)*)(i32 %29)
store i32 %30, i32* %3
%31 = load i32, i32* %3
%32 = call i32 (i32, ...) bitcast (i32 (...)* @pstreamInqVlist to i32 (i32, ...)*)(i32 %31)
store i32 %32, i32* %16
%33 = load i32, i32* %16
%34 = call i32 (i32, ...) bitcast (i32 (...)* @vlistNvars to i32 (i32, ...)*)(i32 %33)
store i32 %34, i32* %11
%35 = load i32, i32* %11
%36 = icmp ne i32 %35, 1
br i1 %36, label %37, label %39
37: ; preds = %1
%38 = call i32 (i8*, ...) bitcast (i32 (...)* @cdoAbort to i32 (i8*, ...)*)(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
br label %39
39: ; preds = %37, %1
%40 = load i32, i32* %16
%41 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vlistInqVarCode to i32 (i32, i32, ...)*)(i32 %40, i32 0)
store i32 %41, i32* %12
%42 = load i32, i32* %12
%43 = icmp sgt i32 %42, 0
br i1 %43, label %44, label %50
44: ; preds = %39
%45 = load i32, i32* %12
%46 = icmp ne i32 %45, 132
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = load i32, i32* %12
%49 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @cdoWarning to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %48)
br label %50
50: ; preds = %47, %44, %39
%51 = load i32, i32* %16
%52 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vlistInqVarMissval to i32 (i32, i32, ...)*)(i32 %51, i32 0)
%53 = sitofp i32 %52 to double
store double %53, double* %21
%54 = load i32, i32* %16
%55 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vlistInqVarZaxis to i32 (i32, i32, ...)*)(i32 %54, i32 0)
store i32 %55, i32* %14
%56 = load i32, i32* %14
%57 = call i32 (i32, ...) bitcast (i32 (...)* @zaxisInqType to i32 (i32, ...)*)(i32 %56)
%58 = icmp ne i32 %57, 4
br i1 %58, label %59, label %69
59: ; preds = %50
%60 = load i32, i32* %14
%61 = call i32 (i32, ...) bitcast (i32 (...)* @zaxisInqType to i32 (i32, ...)*)(i32 %60)
%62 = icmp ne i32 %61, 1
br i1 %62, label %63, label %69
63: ; preds = %59
%64 = load i32, i32* %14
%65 = getelementptr inbounds [256 x i8], [256 x i8]* %26, i64 0, i64 0
%66 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @zaxisInqLongname to i32 (i32, i8*, ...)*)(i32 %64, i8* %65)
%67 = getelementptr inbounds [256 x i8], [256 x i8]* %26, i64 0, i64 0
%68 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @cdoWarning to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %67)
br label %69
69: ; preds = %63, %59, %50
%70 = load i32, i32* %16
%71 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vlistInqVarGrid to i32 (i32, i32, ...)*)(i32 %70, i32 0)
store i32 %71, i32* %13
%72 = load i32, i32* %13
%73 = call i32 (i32, ...) bitcast (i32 (...)* @gridInqXsize to i32 (i32, ...)*)(i32 %72)
%74 = icmp sgt i32 %73, 1
br i1 %74, label %75, label %77
75: ; preds = %69
%76 = call i32 (i8*, ...) bitcast (i32 (...)* @cdoAbort to i32 (i8*, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
br label %77
77: ; preds = %75, %69
%78 = load i32, i32* %13
%79 = call i32 (i32, ...) bitcast (i32 (...)* @gridInqSize to i32 (i32, ...)*)(i32 %78)
store i32 %79, i32* %10
%80 = load i32, i32* %14
%81 = call i32 (i32, ...) bitcast (i32 (...)* @zaxisInqSize to i32 (i32, ...)*)(i32 %80)
store i32 %81, i32* %15
%82 = load i32, i32* %16
%83 = call i32 (i32, ...) bitcast (i32 (...)* @vlistDuplicate to i32 (i32, ...)*)(i32 %82)
store i32 %83, i32* %17
%84 = load i32, i32* %16
%85 = call i32 (i32, ...) bitcast (i32 (...)* @vlistInqTaxis to i32 (i32, ...)*)(i32 %84)
store i32 %85, i32* %24
%86 = load i32, i32* %24
%87 = call i32 (i32, ...) bitcast (i32 (...)* @taxisDuplicate to i32 (i32, ...)*)(i32 %86)
store i32 %87, i32* %25
%88 = load i32, i32* %17
%89 = load i32, i32* %25
%90 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vlistDefTaxis to i32 (i32, i32, ...)*)(i32 %88, i32 %89)
%91 = load i32, i32* %17
%92 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @vlistDefVarCode to i32 (i32, i32, i32, ...)*)(i32 %91, i32 0, i32 272)
%93 = load i32, i32* %17
%94 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @vlistDefVarName to i32 (i32, i32, i8*, ...)*)(i32 %93, i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%95 = load i32, i32* %17
%96 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @vlistDefVarLongname to i32 (i32, i32, i8*, ...)*)(i32 %95, i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%97 = load i32, i32* %17
%98 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @vlistDefVarUnits to i32 (i32, i32, i8*, ...)*)(i32 %97, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%99 = load i32, i32* %17
%100 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @vlistDefVarDatatype to i32 (i32, i32, i32, ...)*)(i32 %99, i32 0, i32 132)
%101 = call i32 (i32, ...) bitcast (i32 (...)* @cdoStreamName to i32 (i32, ...)*)(i32 1)
%102 = call i32 (...) @cdoFiletype()
%103 = call i32 (i32, i32, ...) bitcast (i32 (...)* @pstreamOpenWrite to i32 (i32, i32, ...)*)(i32 %101, i32 %102)
store i32 %103, i32* %4
%104 = load i32, i32* %4
%105 = load i32, i32* %17
%106 = call i32 (i32, i32, ...) bitcast (i32 (...)* @pstreamDefVlist to i32 (i32, i32, ...)*)(i32 %104, i32 %105)
%107 = load i32, i32* %10
%108 = load i32, i32* %15
%109 = mul nsw i32 %107, %108
%110 = sext i32 %109 to i64
%111 = mul i64 %110, 8
%112 = call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.Mastrfu, i64 0, i64 0), i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.7, i64 0, i64 0), i32 170, i64 %111)
%113 = sext i32 %112 to i64
%114 = inttoptr i64 %113 to double*
store double* %114, double** %22
%115 = load i32, i32* %10
%116 = load i32, i32* %15
%117 = mul nsw i32 %115, %116
%118 = sext i32 %117 to i64
%119 = mul i64 %118, 8
%120 = call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.Mastrfu, i64 0, i64 0), i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.7, i64 0, i64 0), i32 171, i64 %119)
%121 = sext i32 %120 to i64
%122 = inttoptr i64 %121 to double*
store double* %122, double** %23
store i32 0, i32* %6
br label %123
123: ; preds = %188, %77
%124 = load i32, i32* %3
%125 = load i32, i32* %6
%126 = call i32 (i32, i32, ...) bitcast (i32 (...)* @pstreamInqTimestep to i32 (i32, i32, ...)*)(i32 %124, i32 %125)
store i32 %126, i32* %5
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %191
128: ; preds = %123
%129 = load i32, i32* %25
%130 = load i32, i32* %24
%131 = call i32 (i32, i32, ...) bitcast (i32 (...)* @taxisCopyTimestep to i32 (i32, i32, ...)*)(i32 %129, i32 %130)
%132 = load i32, i32* %4
%133 = load i32, i32* %6
%134 = call i32 (i32, i32, ...) bitcast (i32 (...)* @pstreamDefTimestep to i32 (i32, i32, ...)*)(i32 %132, i32 %133)
store i32 0, i32* %19
store i32 0, i32* %7
br label %135
135: ; preds = %154, %128
%136 = load i32, i32* %7
%137 = load i32, i32* %5
%138 = icmp slt i32 %136, %137
br i1 %138, label %139, label %157
139: ; preds = %135
%140 = load i32, i32* %3
%141 = call i32 (i32, i32*, i32*, ...) bitcast (i32 (...)* @pstreamInqRecord to i32 (i32, i32*, i32*, ...)*)(i32 %140, i32* %8, i32* %9)
%142 = load i32, i32* %10
%143 = load i32, i32* %9
%144 = mul nsw i32 %142, %143
store i32 %144, i32* %18
%145 = load i32, i32* %3
%146 = load double*, double** %22
%147 = load i32, i32* %18
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %146, i64 %148
%150 = call i32 (i32, double*, i32*, ...) bitcast (i32 (...)* @pstreamReadRecord to i32 (i32, double*, i32*, ...)*)(i32 %145, double* %149, i32* %20)
%151 = load i32, i32* %20
%152 = load i32, i32* %19
%153 = add nsw i32 %152, %151
store i32 %153, i32* %19
br label %154
154: ; preds = %139
%155 = load i32, i32* %7
%156 = add nsw i32 %155, 1
store i32 %156, i32* %7
br label %135
157: ; preds = %135
%158 = load i32, i32* %13
%159 = load i32, i32* %14
%160 = load double*, double** %22
%161 = load double*, double** %23
%162 = load i32, i32* %19
%163 = load double, double* %21
%164 = call i32 (i32, i32, double*, double*, i32, double, ...) bitcast (i32 (...)* @mastrfu to i32 (i32, i32, double*, double*, i32, double, ...)*)(i32 %158, i32 %159, double* %160, double* %161, i32 %162, double %163)
store i32 0, i32* %7
br label %165
165: ; preds = %185, %157
%166 = load i32, i32* %7
%167 = load i32, i32* %5
%168 = icmp slt i32 %166, %167
br i1 %168, label %169, label %188
169: ; preds = %165
store i32 0, i32* %8
%170 = load i32, i32* %7
store i32 %170, i32* %9
%171 = load i32, i32* %4
%172 = load i32, i32* %8
%173 = load i32, i32* %9
%174 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @pstreamDefRecord to i32 (i32, i32, i32, ...)*)(i32 %171, i32 %172, i32 %173)
%175 = load i32, i32* %10
%176 = load i32, i32* %9
%177 = mul nsw i32 %175, %176
store i32 %177, i32* %18
%178 = load i32, i32* %4
%179 = load double*, double** %23
%180 = load i32, i32* %18
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double, double* %179, i64 %181
%183 = load i32, i32* %19
%184 = call i32 (i32, double*, i32, ...) bitcast (i32 (...)* @pstreamWriteRecord to i32 (i32, double*, i32, ...)*)(i32 %178, double* %182, i32 %183)
br label %185
185: ; preds = %169
%186 = load i32, i32* %7
%187 = add nsw i32 %186, 1
store i32 %187, i32* %7
br label %165
188: ; preds = %165
%189 = load i32, i32* %6
%190 = add nsw i32 %189, 1
store i32 %190, i32* %6
br label %123
191: ; preds = %123
%192 = load i32, i32* %4
%193 = call i32 (i32, ...) bitcast (i32 (...)* @pstreamClose to i32 (i32, ...)*)(i32 %192)
%194 = load i32, i32* %3
%195 = call i32 (i32, ...) bitcast (i32 (...)* @pstreamClose to i32 (i32, ...)*)(i32 %194)
%196 = load double*, double** %22
%197 = icmp ne double* %196, null
br i1 %197, label %198, label %201
198: ; preds = %191
%199 = load double*, double** %22
%200 = call i32 (i8*, i8*, i32, double*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, double*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.Mastrfu, i64 0, i64 0), i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.7, i64 0, i64 0), i32 205, double* %199)
br label %201
201: ; preds = %198, %191
%202 = load double*, double** %23
%203 = icmp ne double* %202, null
br i1 %203, label %204, label %207
204: ; preds = %201
%205 = load double*, double** %23
%206 = call i32 (i8*, i8*, i32, double*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, double*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.Mastrfu, i64 0, i64 0), i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.7, i64 0, i64 0), i32 206, double* %205)
br label %207
207: ; preds = %204, %201
%208 = call i32 (...) @cdoFinish()
ret i8* null
}

LLVM IR (-O2):
@.str = [44 x i8] c"This operator works only with one variable!\00"
@.str.1 = [20 x i8] c"Unexpected code %d!\00"
@.str.2 = [29 x i8] c"Unexpected vertical grid %s!\00"
@.str.3 = [27 x i8] c"Grid must be a zonal mean!\00"
@.str.4 = [8 x i8] c"mastrfu\00"
@.str.5 = [21 x i8] c"mass stream function\00"
@.str.6 = [5 x i8] c"kg/s\00"
@__func__.Mastrfu = [8 x i8] c"Mastrfu\00"
@.str.7 = [131 x i8] c"/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\00"
define i8* @Mastrfu(i8* %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [256 x i8]
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @cdoInitialize to i32 (i8*, ...)*)(i8* %0)
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @cdoStreamName to i32 (i32, ...)*)(i32 0)
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @pstreamOpenRead to i32 (i32, ...)*)(i32 %10)
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @pstreamInqVlist to i32 (i32, ...)*)(i32 %11)
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @vlistNvars to i32 (i32, ...)*)(i32 %12)
%14 = icmp eq i32 %13, 1
br i1 %14, label %17, label %15
15: ; preds = %1
%16 = tail call i32 (i8*, ...) bitcast (i32 (...)* @cdoAbort to i32 (i8*, ...)*)(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %1
%18 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vlistInqVarCode to i32 (i32, i32, ...)*)(i32 %12, i32 0)
%19 = icmp sgt i32 %18, 0
%20 = icmp ne i32 %18, 132
%21 = and i1 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %17
%23 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @cdoWarning to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %18)
br label %24
24: ; preds = %22, %17
%25 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vlistInqVarMissval to i32 (i32, i32, ...)*)(i32 %12, i32 0)
%26 = sitofp i32 %25 to double
%27 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vlistInqVarZaxis to i32 (i32, i32, ...)*)(i32 %12, i32 0)
%28 = tail call i32 (i32, ...) bitcast (i32 (...)* @zaxisInqType to i32 (i32, ...)*)(i32 %27)
%29 = icmp eq i32 %28, 4
br i1 %29, label %37, label %30
30: ; preds = %24
%31 = tail call i32 (i32, ...) bitcast (i32 (...)* @zaxisInqType to i32 (i32, ...)*)(i32 %27)
%32 = icmp eq i32 %31, 1
br i1 %32, label %37, label %33
33: ; preds = %30
%34 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%35 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @zaxisInqLongname to i32 (i32, i8*, ...)*)(i32 %27, i8* %34)
%36 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @cdoWarning to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %34)
br label %37
37: ; preds = %33, %30, %24
%38 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vlistInqVarGrid to i32 (i32, i32, ...)*)(i32 %12, i32 0)
%39 = call i32 (i32, ...) bitcast (i32 (...)* @gridInqXsize to i32 (i32, ...)*)(i32 %38)
%40 = icmp sgt i32 %39, 1
br i1 %40, label %41, label %43
41: ; preds = %37
%42 = call i32 (i8*, ...) bitcast (i32 (...)* @cdoAbort to i32 (i8*, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
br label %43
43: ; preds = %41, %37
%44 = call i32 (i32, ...) bitcast (i32 (...)* @gridInqSize to i32 (i32, ...)*)(i32 %38)
%45 = call i32 (i32, ...) bitcast (i32 (...)* @zaxisInqSize to i32 (i32, ...)*)(i32 %27)
%46 = call i32 (i32, ...) bitcast (i32 (...)* @vlistDuplicate to i32 (i32, ...)*)(i32 %12)
%47 = call i32 (i32, ...) bitcast (i32 (...)* @vlistInqTaxis to i32 (i32, ...)*)(i32 %12)
%48 = call i32 (i32, ...) bitcast (i32 (...)* @taxisDuplicate to i32 (i32, ...)*)(i32 %47)
%49 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vlistDefTaxis to i32 (i32, i32, ...)*)(i32 %46, i32 %48)
%50 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @vlistDefVarCode to i32 (i32, i32, i32, ...)*)(i32 %46, i32 0, i32 272)
%51 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @vlistDefVarName to i32 (i32, i32, i8*, ...)*)(i32 %46, i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%52 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @vlistDefVarLongname to i32 (i32, i32, i8*, ...)*)(i32 %46, i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%53 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @vlistDefVarUnits to i32 (i32, i32, i8*, ...)*)(i32 %46, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%54 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @vlistDefVarDatatype to i32 (i32, i32, i32, ...)*)(i32 %46, i32 0, i32 132)
%55 = call i32 (i32, ...) bitcast (i32 (...)* @cdoStreamName to i32 (i32, ...)*)(i32 1)
%56 = call i32 (...) @cdoFiletype()
%57 = call i32 (i32, i32, ...) bitcast (i32 (...)* @pstreamOpenWrite to i32 (i32, i32, ...)*)(i32 %55, i32 %56)
%58 = call i32 (i32, i32, ...) bitcast (i32 (...)* @pstreamDefVlist to i32 (i32, i32, ...)*)(i32 %57, i32 %46)
%59 = mul nsw i32 %45, %44
%60 = sext i32 %59 to i64
%61 = shl nsw i64 %60, 3
%62 = call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.Mastrfu, i64 0, i64 0), i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.7, i64 0, i64 0), i32 170, i64 %61)
%63 = sext i32 %62 to i64
%64 = inttoptr i64 %63 to double*
%65 = call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.Mastrfu, i64 0, i64 0), i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.7, i64 0, i64 0), i32 171, i64 %61)
%66 = sext i32 %65 to i64
%67 = inttoptr i64 %66 to double*
%68 = call i32 (i32, i32, ...) bitcast (i32 (...)* @pstreamInqTimestep to i32 (i32, i32, ...)*)(i32 %11, i32 0)
%69 = icmp eq i32 %68, 0
br i1 %69, label %107, label %70
70: ; preds = %43, %103
%71 = phi i32 [ %105, %103 ], [ %68, %43 ]
%72 = phi i32 [ %104, %103 ], [ 0, %43 ]
%73 = call i32 (i32, i32, ...) bitcast (i32 (...)* @taxisCopyTimestep to i32 (i32, i32, ...)*)(i32 %48, i32 %47)
%74 = call i32 (i32, i32, ...) bitcast (i32 (...)* @pstreamDefTimestep to i32 (i32, i32, ...)*)(i32 %57, i32 %72)
%75 = icmp sgt i32 %71, 0
br i1 %75, label %78, label %76
76: ; preds = %70
%77 = call i32 (i32, i32, double*, double*, i32, double, ...) bitcast (i32 (...)* @mastrfu to i32 (i32, i32, double*, double*, i32, double, ...)*)(i32 %38, i32 %27, double* %64, double* %67, i32 0, double %26)
br label %103
78: ; preds = %70, %78
%79 = phi i32 [ %89, %78 ], [ 0, %70 ]
%80 = phi i32 [ %88, %78 ], [ 0, %70 ]
%81 = call i32 (i32, i32*, i32*, ...) bitcast (i32 (...)* @pstreamInqRecord to i32 (i32, i32*, i32*, ...)*)(i32 %11, i32* %2, i32* %3)
%82 = load i32, i32* %3
%83 = mul nsw i32 %82, %44
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %64, i64 %84
%86 = call i32 (i32, double*, i32*, ...) bitcast (i32 (...)* @pstreamReadRecord to i32 (i32, double*, i32*, ...)*)(i32 %11, double* %85, i32* %4)
%87 = load i32, i32* %4
%88 = add nsw i32 %87, %80
%89 = add nuw nsw i32 %79, 1
%90 = icmp eq i32 %89, %71
br i1 %90, label %91, label %78
91: ; preds = %78
%92 = call i32 (i32, i32, double*, double*, i32, double, ...) bitcast (i32 (...)* @mastrfu to i32 (i32, i32, double*, double*, i32, double, ...)*)(i32 %38, i32 %27, double* %64, double* %67, i32 %88, double %26)
br i1 %75, label %93, label %103
93: ; preds = %91, %93
%94 = phi i32 [ %101, %93 ], [ 0, %91 ]
store i32 0, i32* %2
store i32 %94, i32* %3
%95 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @pstreamDefRecord to i32 (i32, i32, i32, ...)*)(i32 %57, i32 0, i32 %94)
%96 = load i32, i32* %3
%97 = mul nsw i32 %96, %44
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds double, double* %67, i64 %98
%100 = call i32 (i32, double*, i32, ...) bitcast (i32 (...)* @pstreamWriteRecord to i32 (i32, double*, i32, ...)*)(i32 %57, double* %99, i32 %88)
%101 = add nuw nsw i32 %94, 1
%102 = icmp eq i32 %101, %71
br i1 %102, label %103, label %93
103: ; preds = %93, %76, %91
%104 = add nuw nsw i32 %72, 1
%105 = call i32 (i32, i32, ...) bitcast (i32 (...)* @pstreamInqTimestep to i32 (i32, i32, ...)*)(i32 %11, i32 %104)
%106 = icmp eq i32 %105, 0
br i1 %106, label %107, label %70
107: ; preds = %103, %43
%108 = call i32 (i32, ...) bitcast (i32 (...)* @pstreamClose to i32 (i32, ...)*)(i32 %57)
%109 = call i32 (i32, ...) bitcast (i32 (...)* @pstreamClose to i32 (i32, ...)*)(i32 %11)
%110 = icmp eq i32 %62, 0
br i1 %110, label %113, label %111
111: ; preds = %107
%112 = call i32 (i8*, i8*, i32, double*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, double*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.Mastrfu, i64 0, i64 0), i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.7, i64 0, i64 0), i32 205, double* %64)
br label %113
113: ; preds = %111, %107
%114 = icmp eq i32 %65, 0
br i1 %114, label %117, label %115
115: ; preds = %113
%116 = call i32 (i8*, i8*, i32, double*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, double*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.Mastrfu, i64 0, i64 0), i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.7, i64 0, i64 0), i32 206, double* %67)
br label %117
117: ; preds = %115, %113
%118 = call i32 (...) @cdoFinish()
ret i8* null
}