int conv_cmor_table(const char *filename) {
  void *kvlist;
  int nlists, listID;
  int nelements, elemID;
  int len;
  int hasmissval = 0;
  double missval;
  const char *listname;
  const char *ename;
  const char *evalue;
  char *ovalue;
  kvlist = kvlParseFile(filename);
  nlists = kvlGetNumLists(kvlist);
  for (listID = 0; listID < nlists; ++listID) {
    listname = kvlGetListName(kvlist, listID);
    nelements = kvlGetListNumElements(kvlist, listID);
    if (strncmp("global", listname, strlen(listname)) == 0) {
      for (elemID = 0; elemID < nelements; ++elemID) {
        ename = kvlGetListElementName(kvlist, listID, elemID);
        evalue = kvlGetListElementValue(kvlist, listID, elemID);
        len = strlen(ename);
        if (strncmp("missing_value", ename, len) == 0) {
          missval = atof(evalue);
          hasmissval = 1;
        }
      }
    } else if (strncmp("variable", listname, strlen(listname)) == 0) {
      int vlen;
      printf("&%s\n", "parameter");
      for (elemID = 0; elemID < nelements; ++elemID) {
        ename = kvlGetListElementName(kvlist, listID, elemID);
        evalue = kvlGetListElementValue(kvlist, listID, elemID);
        len = strlen(ename);
        vlen = strlen(evalue);
        if (vlen > 1 && evalue[0] == '"' && evalue[vlen - 1] == '"') {
          vlen -= 2;
          evalue++;
        }
        ovalue = strdup(evalue);
        for (int i = 1; i < vlen; ++i) {
          if (ovalue[i - 1] == '"' && ovalue[i] == '"') {
            ovalue[i - 1] = '\'';
            for (int j = i + 1; j < vlen; ++j)
              ovalue[j - 1] = ovalue[j];
            vlen -= 1;
          }
        }
        if (strncmp("name", ename, len) == 0 ||
            strncmp("standard_name", ename, len) == 0 ||
            strncmp("out_name", ename, len) == 0 ||
            strncmp("type", ename, len) == 0 ||
            strncmp("valid_min", ename, len) == 0 ||
            strncmp("valid_max", ename, len) == 0 ||
            strncmp("ok_min_mean_abs", ename, len) == 0 ||
            strncmp("ok_max_mean_abs", ename, len) == 0)
          printf("  %-15s = %s\n", ename, ovalue);
        else if (strncmp("long_name", ename, len) == 0 ||
                 strncmp("units", ename, len) == 0 ||
                 strncmp("cell_methods", ename, len) == 0 ||
                 strncmp("cell_measures", ename, len) == 0 ||
                 strncmp("comment", ename, len) == 0)
          printf("  %-15s = \"%.*s\"\n", ename, vlen, ovalue);
        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/Kvl.c",
             142, (ovalue));
      }
      if (hasmissval)
        printf("  %-15s = %g\n", "missing_value", missval);
      printf("/\n");
    }
  }
  kvlDelete(kvlist);
  return (0);
}


x86 assembly (clang, -O0):
<conv_cmor_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   10c0 <kvlParseFile@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   10e0 <kvlGetNumLists@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    16ca <conv_cmor_table+0x4fa>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    $0x0,%al
call   1050 <kvlGetListName@plt>
cltq
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    $0x0,%al
call   1070 <kvlGetListNumElements@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x38(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x68(%rbp),%rsi
mov    %rax,%rdx
lea    0xda7(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1304 <conv_cmor_table+0x134>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12ff <conv_cmor_table+0x12f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1090 <kvlGetListElementName@plt>
cltq
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   10b0 <kvlGetListElementValue@plt>
cltq
mov    %rax,-0x48(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xd44(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    12ec <conv_cmor_table+0x11c>
mov    -0x48(%rbp),%rdi
mov    $0x0,%al
call   1040 <atof@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x1,-0x28(%rbp)
jmp    12f1 <conv_cmor_table+0x121>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    126e <conv_cmor_table+0x9e>
jmp    16b7 <conv_cmor_table+0x4e7>
mov    -0x38(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x38(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x70(%rbp),%rsi
mov    %rax,%rdx
lea    0xcf2(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    16b2 <conv_cmor_table+0x4e2>
lea    0xce6(%rip),%rdi
lea    0xce4(%rip),%rsi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1680 <conv_cmor_table+0x4b0>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1090 <kvlGetListElementName@plt>
cltq
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   10b0 <kvlGetListElementValue@plt>
cltq
mov    %rax,-0x48(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x48(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0x1,-0x54(%rbp)
jle    13e8 <conv_cmor_table+0x218>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    13e8 <conv_cmor_table+0x218>
mov    -0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x22,%eax
jne    13e8 <conv_cmor_table+0x218>
mov    -0x54(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x54(%rbp)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
call   10f0 <strdup@plt>
mov    %rax,-0x50(%rbp)
movl   $0x1,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    14a2 <conv_cmor_table+0x2d2>
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x22,%eax
jne    148f <conv_cmor_table+0x2bf>
mov    -0x50(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x22,%eax
jne    148f <conv_cmor_table+0x2bf>
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x27,(%rax,%rcx,1)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    1486 <conv_cmor_table+0x2b6>
mov    -0x50(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x50(%rbp),%rax
mov    -0x5c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1451 <conv_cmor_table+0x281>
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1494 <conv_cmor_table+0x2c4>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    13fc <conv_cmor_table+0x22c>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xb85(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     158a <conv_cmor_table+0x3ba>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xb5f(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     158a <conv_cmor_table+0x3ba>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xb50(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     158a <conv_cmor_table+0x3ba>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xb3c(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     158a <conv_cmor_table+0x3ba>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xb24(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     158a <conv_cmor_table+0x3ba>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xb11(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     158a <conv_cmor_table+0x3ba>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xafe(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     158a <conv_cmor_table+0x3ba>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xaf1(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    15a5 <conv_cmor_table+0x3d5>
mov    -0x40(%rbp),%rsi
mov    -0x50(%rbp),%rdx
lea    0xae4(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1654 <conv_cmor_table+0x484>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xad7(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     1636 <conv_cmor_table+0x466>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xac4(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     1636 <conv_cmor_table+0x466>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xaad(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     1636 <conv_cmor_table+0x466>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xa9d(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     1636 <conv_cmor_table+0x466>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rdx
lea    0xa8e(%rip),%rdi
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    164f <conv_cmor_table+0x47f>
mov    -0x40(%rbp),%rsi
mov    -0x54(%rbp),%edx
mov    -0x50(%rbp),%rcx
lea    0xa76(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1654 <conv_cmor_table+0x484>
mov    -0x50(%rbp),%rcx
lea    0xa71(%rip),%rdi
lea    0xa7a(%rip),%rsi
mov    $0x8e,%edx
mov    $0x0,%al
call   10d0 <Free@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    134d <conv_cmor_table+0x17d>
cmpl   $0x0,-0x28(%rbp)
je     16a4 <conv_cmor_table+0x4d4>
movsd  -0x30(%rbp),%xmm0
lea    0xac9(%rip),%rdi
lea    0x96a(%rip),%rsi
mov    $0x1,%al
call   1080 <printf@plt>
lea    0xac2(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    16b7 <conv_cmor_table+0x4e7>
jmp    16bc <conv_cmor_table+0x4ec>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1209 <conv_cmor_table+0x39>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   10a0 <kvlDelete@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv_cmor_table>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
xor    %eax,%eax
call   10d0 <kvlParseFile@plt>
movslq %eax,%r15
mov    %r15,%rdi
xor    %eax,%eax
call   10f0 <kvlGetNumLists@plt>
mov    %eax,0x8(%rsp)
test   %eax,%eax
jle    17bf <conv_cmor_table+0x5df>
xor    %r12d,%r12d
movl   $0x0,0x4(%rsp)
mov    %r15,0x28(%rsp)
jmp    123b <conv_cmor_table+0x5b>
lea    0xf46(%rip),%rdi
call   1040 <puts@plt>
add    $0x1,%r12d
cmp    0x8(%rsp),%r12d
je     17bf <conv_cmor_table+0x5df>
mov    %r15,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1060 <kvlGetListName@plt>
movslq %eax,%rbx
mov    %r15,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1080 <kvlGetListNumElements@plt>
mov    %eax,%r13d
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %rax,%rbp
lea    0xd93(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1740 <conv_cmor_table+0x560>
lea    0xd8e(%rip),%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
jne    122c <conv_cmor_table+0x4c>
lea    0xd81(%rip),%rdi
lea    0xd7f(%rip),%rsi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %r13d,0x14(%rsp)
test   %r13d,%r13d
jle    170a <conv_cmor_table+0x52a>
xor    %r13d,%r13d
mov    %r12d,0x10(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r12d,%esi
mov    %r13d,%edx
xor    %eax,%eax
call   10a0 <kvlGetListElementName@plt>
movslq %eax,%r14
mov    %r15,%rdi
mov    %r12d,%esi
mov    %r13d,%edx
xor    %eax,%eax
call   10c0 <kvlGetListElementValue@plt>
movslq %eax,%rbx
mov    %r14,%rdi
call   1070 <strlen@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %rax,%rbp
cmp    $0x1,%ebp
mov    %r15,0x30(%rsp)
jle    1350 <conv_cmor_table+0x170>
cmpb   $0x22,(%rbx)
jne    1360 <conv_cmor_table+0x180>
mov    %ebp,%eax
add    $0xffffffff,%eax
cmpb   $0x22,(%rbx,%rax,1)
jne    1360 <conv_cmor_table+0x180>
add    $0xfffffffe,%ebp
add    $0x1,%rbx
mov    %rbx,%rdi
call   1100 <strdup@plt>
mov    %rax,%r12
cmp    $0x2,%ebp
jae    136b <conv_cmor_table+0x18b>
jmp    155a <conv_cmor_table+0x37a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1100 <strdup@plt>
mov    %rax,%r12
jmp    155a <conv_cmor_table+0x37a>
mov    %rbx,%rdi
call   1100 <strdup@plt>
mov    %rax,%r12
mov    %r14,0x20(%rsp)
mov    %r13d,0xc(%rsp)
lea    0x32(%r12),%rax
lea    0x2(%r12),%rcx
mov    $0x2,%r14d
mov    $0x1,%esi
mov    $0xffffffffffffffff,%r8
xor    %r9d,%r9d
jmp    13c4 <conv_cmor_table+0x1e4>
mov    %ebx,%ebp
nopl   0x0(%rax,%rax,1)
add    $0x1,%rsi
movslq %ebp,%rdx
add    $0x1,%r14
add    $0x1,%r9
add    $0x1,%rax
add    $0xffffffffffffffff,%r8
add    $0x1,%rcx
cmp    %rdx,%rsi
jge    1550 <conv_cmor_table+0x370>
cmpb   $0x22,-0x1(%rsi,%r12,1)
jne    13a0 <conv_cmor_table+0x1c0>
cmpb   $0x22,(%r12,%rsi,1)
jne    13a0 <conv_cmor_table+0x1c0>
movb   $0x27,-0x1(%r12,%rsi,1)
lea    0x1(%rsi),%rdx
movslq %ebp,%rdi
lea    -0x1(%rdi),%ebx
cmp    %rdi,%rdx
jge    1396 <conv_cmor_table+0x1b6>
mov    %r9,%r13
not    %r13
mov    %ebx,(%rsp)
mov    %ebx,%r10d
lea    (%r10,%r13,1),%r11
mov    %rsi,%r15
mov    %r14,%rdx
cmp    $0x8,%r11
jb     151d <conv_cmor_table+0x33d>
mov    %rbp,%rdi
cmp    $0x20,%r11
jae    1418 <conv_cmor_table+0x238>
xor    %ebp,%ebp
jmp    14ca <conv_cmor_table+0x2ea>
mov    %r11,%rbp
and    $0xffffffffffffffe0,%rbp
lea    -0x20(%rbp),%rdx
mov    %rdx,%rbx
shr    $0x5,%rbx
add    $0x1,%rbx
test   %rdx,%rdx
je     1509 <conv_cmor_table+0x329>
lea    (%r8,%r10,1),%rdx
and    $0xffffffffffffffe0,%rdx
add    $0xffffffffffffffe0,%rdx
shr    $0x5,%rdx
add    $0x1,%rdx
and    $0xfffffffffffffffe,%rdx
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd -0x30(%rax,%r15,1),%xmm0
movups -0x20(%rax,%r15,1),%xmm1
movups -0x10(%rax,%r15,1),%xmm2
movups (%rax,%r15,1),%xmm3
movupd %xmm0,-0x31(%rax,%r15,1)
movups %xmm1,-0x21(%rax,%r15,1)
movups %xmm2,-0x11(%rax,%r15,1)
movups %xmm3,-0x1(%rax,%r15,1)
add    $0x40,%r15
add    $0xfffffffffffffffe,%rdx
jne    1460 <conv_cmor_table+0x280>
test   $0x1,%bl
je     14bf <conv_cmor_table+0x2df>
lea    (%rsi,%r15,1),%rdx
add    %r14,%r15
movupd (%r12,%r15,1),%xmm0
movups 0x10(%r12,%r15,1),%xmm1
movupd %xmm0,(%r12,%rdx,1)
movups %xmm1,0x10(%r12,%rdx,1)
cmp    %rbp,%r11
je     1541 <conv_cmor_table+0x361>
test   $0x18,%r11b
je     1513 <conv_cmor_table+0x333>
add    $0xffffffff,%edi
add    %rdi,%r13
mov    %r13,%r11
and    $0xfffffffffffffff8,%r11
lea    (%rsi,%r11,1),%r15
lea    (%r14,%r11,1),%rdx
lea    (%r8,%r10,1),%rdi
and    $0xfffffffffffffff8,%rdi
nopw   0x0(%rax,%rax,1)
mov    (%rcx,%rbp,1),%rbx
mov    %rbx,-0x1(%rcx,%rbp,1)
add    $0x8,%rbp
cmp    %rbp,%rdi
jne    14f0 <conv_cmor_table+0x310>
cmp    %r11,%r13
jne    151d <conv_cmor_table+0x33d>
jmp    1541 <conv_cmor_table+0x361>
xor    %r15d,%r15d
test   $0x1,%bl
jne    14a0 <conv_cmor_table+0x2c0>
jmp    14bf <conv_cmor_table+0x2df>
lea    (%r14,%rbp,1),%rdx
add    %rsi,%rbp
mov    %rbp,%r15
lea    (%r12,%r15,1),%rbp
sub    %r15,%r10
add    %r12,%rdx
xor    %edi,%edi
nopl   0x0(%rax)
movzbl (%rdx,%rdi,1),%ebx
mov    %bl,0x0(%rbp,%rdi,1)
add    $0x1,%rdi
cmp    %rdi,%r10
jne    1530 <conv_cmor_table+0x350>
mov    (%rsp),%edx
mov    %edx,%ebp
jmp    13a0 <conv_cmor_table+0x1c0>
nopl   0x0(%rax,%rax,1)
mov    0xc(%rsp),%r13d
mov    0x20(%rsp),%r14
movslq 0x30(%rsp),%rbx
lea    0xad0(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     16c0 <conv_cmor_table+0x4e0>
lea    0xaad(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     16c0 <conv_cmor_table+0x4e0>
lea    0xaa1(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     16c0 <conv_cmor_table+0x4e0>
lea    0xa90(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     16c0 <conv_cmor_table+0x4e0>
lea    0xa7b(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     16c0 <conv_cmor_table+0x4e0>
lea    0xa6b(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     16c0 <conv_cmor_table+0x4e0>
lea    0xa5b(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     16c0 <conv_cmor_table+0x4e0>
lea    0xa51(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     16c0 <conv_cmor_table+0x4e0>
lea    0xa55(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     169d <conv_cmor_table+0x4bd>
lea    0xa49(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     169d <conv_cmor_table+0x4bd>
lea    0xa39(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     169d <conv_cmor_table+0x4bd>
lea    0xa30(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     169d <conv_cmor_table+0x4bd>
lea    0xa28(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
jne    16d4 <conv_cmor_table+0x4f4>
lea    0xa1a(%rip),%rdi
mov    %r14,%rsi
mov    %ebp,%edx
mov    %r12,%rcx
xor    %eax,%eax
call   1090 <printf@plt>
jmp    16d4 <conv_cmor_table+0x4f4>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x9b6(%rip),%rdi
mov    %r14,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
lea    0x9f5(%rip),%rdi
lea    0x9fe(%rip),%rsi
mov    $0x8e,%edx
mov    %r12,%rcx
xor    %eax,%eax
call   10e0 <Free@plt>
add    $0x1,%r13d
cmp    0x14(%rsp),%r13d
mov    0x28(%rsp),%r15
mov    0x10(%rsp),%r12d
jne    12d0 <conv_cmor_table+0xf0>
cmpl   $0x0,0x4(%rsp)
je     1220 <conv_cmor_table+0x40>
lea    0xa43(%rip),%rdi
lea    0x8e4(%rip),%rsi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1090 <printf@plt>
jmp    1220 <conv_cmor_table+0x40>
cs nopw 0x0(%rax,%rax,1)
nop
test   %r13d,%r13d
jle    122c <conv_cmor_table+0x4c>
xor    %ebx,%ebx
jmp    175c <conv_cmor_table+0x57c>
nopl   (%rax)
add    $0x1,%ebx
cmp    %ebx,%r13d
je     122c <conv_cmor_table+0x4c>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   10a0 <kvlGetListElementName@plt>
movslq %eax,%rbp
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   10c0 <kvlGetListElementValue@plt>
mov    %eax,%r14d
mov    %rbp,%rdi
call   1070 <strlen@plt>
movslq %eax,%rdx
lea    0x875(%rip),%rdi
mov    %rbp,%rsi
call   1030 <strncmp@plt>
test   %eax,%eax
jne    1750 <conv_cmor_table+0x570>
movslq %r14d,%rdi
xor    %eax,%eax
call   1050 <atof@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x18(%rsp)
movl   $0x1,0x4(%rsp)
jmp    1750 <conv_cmor_table+0x570>
mov    %r15,%rdi
xor    %eax,%eax
call   10b0 <kvlDelete@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"global\00"
@.str.1 = [14 x i8] c"missing_value\00"
@.str.2 = [9 x i8] c"variable\00"
@.str.3 = [5 x i8] c"&%s\0A\00"
@.str.4 = [10 x i8] c"parameter\00"
@.str.5 = [5 x i8] c"name\00"
@.str.6 = [14 x i8] c"standard_name\00"
@.str.7 = [9 x i8] c"out_name\00"
@.str.8 = [5 x i8] c"type\00"
@.str.9 = [10 x i8] c"valid_min\00"
@.str.10 = [10 x i8] c"valid_max\00"
@.str.11 = [16 x i8] c"ok_min_mean_abs\00"
@.str.12 = [16 x i8] c"ok_max_mean_abs\00"
@.str.13 = [14 x i8] c" %-15s = %s\0A\00"
@.str.14 = [10 x i8] c"long_name\00"
@.str.15 = [6 x i8] c"units\00"
@.str.16 = [13 x i8] c"cell_methods\00"
@.str.17 = [14 x i8] c"cell_measures\00"
@.str.18 = [8 x i8] c"comment\00"
@.str.19 = [18 x i8] c" %-15s = \22%.*s\22\0A\00"
@__func__.conv_cmor_table = [16 x i8] c"conv_cmor_table\00"
@.str.20 = [127 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/Kvl.c\00"
@.str.21 = [14 x i8] c" %-15s = %g\0A\00"
@.str.22 = [3 x i8] c"/\0A\00"
define i32 @conv_cmor_table(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %9
%18 = load i8*, i8** %2
%19 = call i32 (i8*, ...) bitcast (i32 (...)* @kvlParseFile to i32 (i8*, ...)*)(i8* %18)
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i8*
store i8* %21, i8** %3
%22 = load i8*, i8** %3
%23 = call i32 (i8*, ...) bitcast (i32 (...)* @kvlGetNumLists to i32 (i8*, ...)*)(i8* %22)
store i32 %23, i32* %4
store i32 0, i32* %5
br label %24
24: ; preds = %291, %1
%25 = load i32, i32* %5
%26 = load i32, i32* %4
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %294
28: ; preds = %24
%29 = load i8*, i8** %3
%30 = load i32, i32* %5
%31 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @kvlGetListName to i32 (i8*, i32, ...)*)(i8* %29, i32 %30)
%32 = sext i32 %31 to i64
%33 = inttoptr i64 %32 to i8*
store i8* %33, i8** %11
%34 = load i8*, i8** %3
%35 = load i32, i32* %5
%36 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @kvlGetListNumElements to i32 (i8*, i32, ...)*)(i8* %34, i32 %35)
store i32 %36, i32* %6
%37 = load i8*, i8** %11
%38 = load i8*, i8** %11
%39 = call i64 @strlen(i8* %38)
%40 = call i32 @strncmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %37, i64 %39)
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %77
42: ; preds = %28
store i32 0, i32* %7
br label %43
43: ; preds = %73, %42
%44 = load i32, i32* %7
%45 = load i32, i32* %6
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %76
47: ; preds = %43
%48 = load i8*, i8** %3
%49 = load i32, i32* %5
%50 = load i32, i32* %7
%51 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @kvlGetListElementName to i32 (i8*, i32, i32, ...)*)(i8* %48, i32 %49, i32 %50)
%52 = sext i32 %51 to i64
%53 = inttoptr i64 %52 to i8*
store i8* %53, i8** %12
%54 = load i8*, i8** %3
%55 = load i32, i32* %5
%56 = load i32, i32* %7
%57 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @kvlGetListElementValue to i32 (i8*, i32, i32, ...)*)(i8* %54, i32 %55, i32 %56)
%58 = sext i32 %57 to i64
%59 = inttoptr i64 %58 to i8*
store i8* %59, i8** %13
%60 = load i8*, i8** %12
%61 = call i64 @strlen(i8* %60)
%62 = trunc i64 %61 to i32
store i32 %62, i32* %8
%63 = load i8*, i8** %12
%64 = load i32, i32* %8
%65 = sext i32 %64 to i64
%66 = call i32 @strncmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %63, i64 %65)
%67 = icmp eq i32 %66, 0
br i1 %67, label %68, label %72
68: ; preds = %47
%69 = load i8*, i8** %13
%70 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %69)
%71 = sitofp i32 %70 to double
store double %71, double* %10
store i32 1, i32* %9
br label %72
72: ; preds = %68, %47
br label %73
73: ; preds = %72
%74 = load i32, i32* %7
%75 = add nsw i32 %74, 1
store i32 %75, i32* %7
br label %43
76: ; preds = %43
br label %290
77: ; preds = %28
%78 = load i8*, i8** %11
%79 = load i8*, i8** %11
%80 = call i64 @strlen(i8* %79)
%81 = call i32 @strncmp(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %78, i64 %80)
%82 = icmp eq i32 %81, 0
br i1 %82, label %83, label %289
83: ; preds = %77
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %7
br label %85
85: ; preds = %278, %83
%86 = load i32, i32* %7
%87 = load i32, i32* %6
%88 = icmp slt i32 %86, %87
br i1 %88, label %89, label %281
89: ; preds = %85
%90 = load i8*, i8** %3
%91 = load i32, i32* %5
%92 = load i32, i32* %7
%93 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @kvlGetListElementName to i32 (i8*, i32, i32, ...)*)(i8* %90, i32 %91, i32 %92)
%94 = sext i32 %93 to i64
%95 = inttoptr i64 %94 to i8*
store i8* %95, i8** %12
%96 = load i8*, i8** %3
%97 = load i32, i32* %5
%98 = load i32, i32* %7
%99 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @kvlGetListElementValue to i32 (i8*, i32, i32, ...)*)(i8* %96, i32 %97, i32 %98)
%100 = sext i32 %99 to i64
%101 = inttoptr i64 %100 to i8*
store i8* %101, i8** %13
%102 = load i8*, i8** %12
%103 = call i64 @strlen(i8* %102)
%104 = trunc i64 %103 to i32
store i32 %104, i32* %8
%105 = load i8*, i8** %13
%106 = call i64 @strlen(i8* %105)
%107 = trunc i64 %106 to i32
store i32 %107, i32* %15
%108 = load i32, i32* %15
%109 = icmp sgt i32 %108, 1
br i1 %109, label %110, label %130
110: ; preds = %89
%111 = load i8*, i8** %13
%112 = getelementptr inbounds i8, i8* %111, i64 0
%113 = load i8, i8* %112
%114 = sext i8 %113 to i32
%115 = icmp eq i32 %114, 34
br i1 %115, label %116, label %130
116: ; preds = %110
%117 = load i8*, i8** %13
%118 = load i32, i32* %15
%119 = sub nsw i32 %118, 1
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i8, i8* %117, i64 %120
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp eq i32 %123, 34
br i1 %124, label %125, label %130
125: ; preds = %116
%126 = load i32, i32* %15
%127 = sub nsw i32 %126, 2
store i32 %127, i32* %15
%128 = load i8*, i8** %13
%129 = getelementptr inbounds i8, i8* %128, i32 1
store i8* %129, i8** %13
br label %130
130: ; preds = %125, %116, %110, %89
%131 = load i8*, i8** %13
%132 = call i8* @strdup(i8* %131)
store i8* %132, i8** %14
store i32 1, i32* %16
br label %133
133: ; preds = %184, %130
%134 = load i32, i32* %16
%135 = load i32, i32* %15
%136 = icmp slt i32 %134, %135
br i1 %136, label %137, label %187
137: ; preds = %133
%138 = load i8*, i8** %14
%139 = load i32, i32* %16
%140 = sub nsw i32 %139, 1
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds i8, i8* %138, i64 %141
%143 = load i8, i8* %142
%144 = sext i8 %143 to i32
%145 = icmp eq i32 %144, 34
br i1 %145, label %146, label %183
146: ; preds = %137
%147 = load i8*, i8** %14
%148 = load i32, i32* %16
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds i8, i8* %147, i64 %149
%151 = load i8, i8* %150
%152 = sext i8 %151 to i32
%153 = icmp eq i32 %152, 34
br i1 %153, label %154, label %183
154: ; preds = %146
%155 = load i8*, i8** %14
%156 = load i32, i32* %16
%157 = sub nsw i32 %156, 1
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds i8, i8* %155, i64 %158
store i8 39, i8* %159
%160 = load i32, i32* %16
%161 = add nsw i32 %160, 1
store i32 %161, i32* %17
br label %162
162: ; preds = %177, %154
%163 = load i32, i32* %17
%164 = load i32, i32* %15
%165 = icmp slt i32 %163, %164
br i1 %165, label %166, label %180
166: ; preds = %162
%167 = load i8*, i8** %14
%168 = load i32, i32* %17
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds i8, i8* %167, i64 %169
%171 = load i8, i8* %170
%172 = load i8*, i8** %14
%173 = load i32, i32* %17
%174 = sub nsw i32 %173, 1
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds i8, i8* %172, i64 %175
store i8 %171, i8* %176
br label %177
177: ; preds = %166
%178 = load i32, i32* %17
%179 = add nsw i32 %178, 1
store i32 %179, i32* %17
br label %162
180: ; preds = %162
%181 = load i32, i32* %15
%182 = sub nsw i32 %181, 1
store i32 %182, i32* %15
br label %183
183: ; preds = %180, %146, %137
br label %184
184: ; preds = %183
%185 = load i32, i32* %16
%186 = add nsw i32 %185, 1
store i32 %186, i32* %16
br label %133
187: ; preds = %133
%188 = load i8*, i8** %12
%189 = load i32, i32* %8
%190 = sext i32 %189 to i64
%191 = call i32 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* %188, i64 %190)
%192 = icmp eq i32 %191, 0
br i1 %192, label %235, label %193
193: ; preds = %187
%194 = load i8*, i8** %12
%195 = load i32, i32* %8
%196 = sext i32 %195 to i64
%197 = call i32 @strncmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %194, i64 %196)
%198 = icmp eq i32 %197, 0
br i1 %198, label %235, label %199
199: ; preds = %193
%200 = load i8*, i8** %12
%201 = load i32, i32* %8
%202 = sext i32 %201 to i64
%203 = call i32 @strncmp(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* %200, i64 %202)
%204 = icmp eq i32 %203, 0
br i1 %204, label %235, label %205
205: ; preds = %199
%206 = load i8*, i8** %12
%207 = load i32, i32* %8
%208 = sext i32 %207 to i64
%209 = call i32 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %206, i64 %208)
%210 = icmp eq i32 %209, 0
br i1 %210, label %235, label %211
211: ; preds = %205
%212 = load i8*, i8** %12
%213 = load i32, i32* %8
%214 = sext i32 %213 to i64
%215 = call i32 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8* %212, i64 %214)
%216 = icmp eq i32 %215, 0
br i1 %216, label %235, label %217
217: ; preds = %211
%218 = load i8*, i8** %12
%219 = load i32, i32* %8
%220 = sext i32 %219 to i64
%221 = call i32 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i8* %218, i64 %220)
%222 = icmp eq i32 %221, 0
br i1 %222, label %235, label %223
223: ; preds = %217
%224 = load i8*, i8** %12
%225 = load i32, i32* %8
%226 = sext i32 %225 to i64
%227 = call i32 @strncmp(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i8* %224, i64 %226)
%228 = icmp eq i32 %227, 0
br i1 %228, label %235, label %229
229: ; preds = %223
%230 = load i8*, i8** %12
%231 = load i32, i32* %8
%232 = sext i32 %231 to i64
%233 = call i32 @strncmp(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i8* %230, i64 %232)
%234 = icmp eq i32 %233, 0
br i1 %234, label %235, label %239
235: ; preds = %229, %223, %217, %211, %205, %199, %193, %187
%236 = load i8*, i8** %12
%237 = load i8*, i8** %14
%238 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0), i8* %236, i8* %237)
br label %275
239: ; preds = %229
%240 = load i8*, i8** %12
%241 = load i32, i32* %8
%242 = sext i32 %241 to i64
%243 = call i32 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i8* %240, i64 %242)
%244 = icmp eq i32 %243, 0
br i1 %244, label %269, label %245
245: ; preds = %239
%246 = load i8*, i8** %12
%247 = load i32, i32* %8
%248 = sext i32 %247 to i64
%249 = call i32 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i8* %246, i64 %248)
%250 = icmp eq i32 %249, 0
br i1 %250, label %269, label %251
251: ; preds = %245
%252 = load i8*, i8** %12
%253 = load i32, i32* %8
%254 = sext i32 %253 to i64
%255 = call i32 @strncmp(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0), i8* %252, i64 %254)
%256 = icmp eq i32 %255, 0
br i1 %256, label %269, label %257
257: ; preds = %251
%258 = load i8*, i8** %12
%259 = load i32, i32* %8
%260 = sext i32 %259 to i64
%261 = call i32 @strncmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0), i8* %258, i64 %260)
%262 = icmp eq i32 %261, 0
br i1 %262, label %269, label %263
263: ; preds = %257
%264 = load i8*, i8** %12
%265 = load i32, i32* %8
%266 = sext i32 %265 to i64
%267 = call i32 @strncmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0), i8* %264, i64 %266)
%268 = icmp eq i32 %267, 0
br i1 %268, label %269, label %274
269: ; preds = %263, %257, %251, %245, %239
%270 = load i8*, i8** %12
%271 = load i32, i32* %15
%272 = load i8*, i8** %14
%273 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.19, i64 0, i64 0), i8* %270, i32 %271, i8* %272)
br label %274
274: ; preds = %269, %263
br label %275
275: ; preds = %274, %235
%276 = load i8*, i8** %14
%277 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.conv_cmor_table, i64 0, i64 0), i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.20, i64 0, i64 0), i32 142, i8* %276)
br label %278
278: ; preds = %275
%279 = load i32, i32* %7
%280 = add nsw i32 %279, 1
store i32 %280, i32* %7
br label %85
281: ; preds = %85
%282 = load i32, i32* %9
%283 = icmp ne i32 %282, 0
br i1 %283, label %284, label %287
284: ; preds = %281
%285 = load double, double* %10
%286 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %285)
br label %287
287: ; preds = %284, %281
%288 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0))
br label %289
289: ; preds = %287, %77
br label %290
290: ; preds = %289, %76
br label %291
291: ; preds = %290
%292 = load i32, i32* %5
%293 = add nsw i32 %292, 1
store i32 %293, i32* %5
br label %24
294: ; preds = %24
%295 = load i8*, i8** %3
%296 = call i32 (i8*, ...) bitcast (i32 (...)* @kvlDelete to i32 (i8*, ...)*)(i8* %295)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"global\00"
@.str.1 = [14 x i8] c"missing_value\00"
@.str.2 = [9 x i8] c"variable\00"
@.str.3 = [5 x i8] c"&%s\0A\00"
@.str.4 = [10 x i8] c"parameter\00"
@.str.5 = [5 x i8] c"name\00"
@.str.6 = [14 x i8] c"standard_name\00"
@.str.7 = [9 x i8] c"out_name\00"
@.str.8 = [5 x i8] c"type\00"
@.str.9 = [10 x i8] c"valid_min\00"
@.str.10 = [10 x i8] c"valid_max\00"
@.str.11 = [16 x i8] c"ok_min_mean_abs\00"
@.str.12 = [16 x i8] c"ok_max_mean_abs\00"
@.str.13 = [14 x i8] c" %-15s = %s\0A\00"
@.str.14 = [10 x i8] c"long_name\00"
@.str.15 = [6 x i8] c"units\00"
@.str.16 = [13 x i8] c"cell_methods\00"
@.str.17 = [14 x i8] c"cell_measures\00"
@.str.18 = [8 x i8] c"comment\00"
@.str.19 = [18 x i8] c" %-15s = \22%.*s\22\0A\00"
@__func__.conv_cmor_table = [16 x i8] c"conv_cmor_table\00"
@.str.20 = [127 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/Kvl.c\00"
@.str.21 = [14 x i8] c" %-15s = %g\0A\00"
@str = [2 x i8] c"/\00"
define i32 @conv_cmor_table(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @kvlParseFile to i32 (i8*, ...)*)(i8* %0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @kvlGetNumLists to i32 (i8*, ...)*)(i8* %4)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %273
7: ; preds = %1, %268
%8 = phi i32 [ %271, %268 ], [ 0, %1 ]
%9 = phi double [ %270, %268 ], [ undef, %1 ]
%10 = phi i32 [ %269, %268 ], [ 0, %1 ]
%11 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @kvlGetListName to i32 (i8*, i32, ...)*)(i8* %4, i32 %8)
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
%14 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @kvlGetListNumElements to i32 (i8*, i32, ...)*)(i8* %4, i32 %8)
%15 = tail call i64 @strlen(i8* dereferenceable(1) %13)
%16 = tail call i32 @strncmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %13, i64 %15)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %43
18: ; preds = %7
%19 = icmp sgt i32 %14, 0
br i1 %19, label %20, label %268
20: ; preds = %18, %38
%21 = phi i32 [ %41, %38 ], [ 0, %18 ]
%22 = phi double [ %40, %38 ], [ %9, %18 ]
%23 = phi i32 [ %39, %38 ], [ %10, %18 ]
%24 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @kvlGetListElementName to i32 (i8*, i32, i32, ...)*)(i8* %4, i32 %8, i32 %21)
%25 = sext i32 %24 to i64
%26 = inttoptr i64 %25 to i8*
%27 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @kvlGetListElementValue to i32 (i8*, i32, i32, ...)*)(i8* %4, i32 %8, i32 %21)
%28 = tail call i64 @strlen(i8* dereferenceable(1) %26)
%29 = shl i64 %28, 32
%30 = ashr exact i64 %29, 32
%31 = tail call i32 @strncmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %26, i64 %30)
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %38
33: ; preds = %20
%34 = sext i32 %27 to i64
%35 = inttoptr i64 %34 to i8*
%36 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %35)
%37 = sitofp i32 %36 to double
br label %38
38: ; preds = %20, %33
%39 = phi i32 [ 1, %33 ], [ %23, %20 ]
%40 = phi double [ %37, %33 ], [ %22, %20 ]
%41 = add nuw nsw i32 %21, 1
%42 = icmp eq i32 %41, %14
br i1 %42, label %268, label %20
43: ; preds = %7
%44 = tail call i32 @strncmp(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %13, i64 %15)
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %268
46: ; preds = %43
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%48 = icmp sgt i32 %14, 0
br i1 %48, label %49, label %262
49: ; preds = %46, %258
%50 = phi i32 [ %260, %258 ], [ 0, %46 ]
%51 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @kvlGetListElementName to i32 (i8*, i32, i32, ...)*)(i8* %4, i32 %8, i32 %50)
%52 = sext i32 %51 to i64
%53 = inttoptr i64 %52 to i8*
%54 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @kvlGetListElementValue to i32 (i8*, i32, i32, ...)*)(i8* %4, i32 %8, i32 %50)
%55 = sext i32 %54 to i64
%56 = inttoptr i64 %55 to i8*
%57 = tail call i64 @strlen(i8* dereferenceable(1) %53)
%58 = tail call i64 @strlen(i8* dereferenceable(1) %56)
%59 = trunc i64 %58 to i32
%60 = icmp sgt i32 %59, 1
br i1 %60, label %63, label %61
61: ; preds = %49
%62 = tail call i8* @strdup(i8* %56)
br label %82
63: ; preds = %49
%64 = load i8, i8* %56
%65 = icmp eq i8 %64, 34
br i1 %65, label %66, label %72
66: ; preds = %63
%67 = add i64 %58, 4294967295
%68 = and i64 %67, 4294967295
%69 = getelementptr inbounds i8, i8* %56, i64 %68
%70 = load i8, i8* %69
%71 = icmp eq i8 %70, 34
br i1 %71, label %74, label %72
72: ; preds = %66, %63
%73 = tail call i8* @strdup(i8* %56)
br label %79
74: ; preds = %66
%75 = add nsw i32 %59, -2
%76 = getelementptr inbounds i8, i8* %56, i64 1
%77 = tail call i8* @strdup(i8* %76)
%78 = icmp ugt i32 %75, 1
br i1 %78, label %79, label %82
79: ; preds = %72, %74
%80 = phi i8* [ %73, %72 ], [ %77, %74 ]
%81 = phi i32 [ %59, %72 ], [ %75, %74 ]
br label %89
82: ; preds = %211, %61, %74
%83 = phi i8* [ %77, %74 ], [ %62, %61 ], [ %80, %211 ]
%84 = phi i32 [ %75, %74 ], [ %59, %61 ], [ %212, %211 ]
%85 = shl i64 %57, 32
%86 = ashr exact i64 %85, 32
%87 = tail call i32 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* %53, i64 %86)
%88 = icmp eq i32 %87, 0
br i1 %88, label %239, label %218
89: ; preds = %79, %211
%90 = phi i64 [ 0, %79 ], [ %217, %211 ]
%91 = phi i64 [ 1, %79 ], [ %213, %211 ]
%92 = phi i64 [ 2, %79 ], [ %216, %211 ]
%93 = phi i32 [ %81, %79 ], [ %212, %211 ]
%94 = xor i64 %90, -1
%95 = xor i64 %90, -1
%96 = add nsw i64 %91, -1
%97 = getelementptr inbounds i8, i8* %80, i64 %96
%98 = load i8, i8* %97
%99 = icmp eq i8 %98, 34
br i1 %99, label %100, label %211
100: ; preds = %89
%101 = getelementptr inbounds i8, i8* %80, i64 %91
%102 = load i8, i8* %101
%103 = icmp eq i8 %102, 34
br i1 %103, label %104, label %211
104: ; preds = %100
store i8 39, i8* %97
%105 = add nuw nsw i64 %91, 1
%106 = sext i32 %93 to i64
%107 = icmp slt i64 %105, %106
%108 = add i32 %93, -1
br i1 %107, label %109, label %211
109: ; preds = %104
%110 = zext i32 %108 to i64
%111 = add i64 %95, %110
%112 = icmp ult i64 %111, 8
br i1 %112, label %199, label %113
113: ; preds = %109
%114 = icmp ult i64 %111, 32
br i1 %114, label %178, label %115
115: ; preds = %113
%116 = and i64 %111, -32
%117 = add i64 %116, -32
%118 = lshr exact i64 %117, 5
%119 = add nuw nsw i64 %118, 1
%120 = and i64 %119, 1
%121 = icmp eq i64 %117, 0
br i1 %121, label %155, label %122
122: ; preds = %115
%123 = and i64 %119, 1152921504606846974
br label %124
124: ; preds = %124, %122
%125 = phi i64 [ 0, %122 ], [ %152, %124 ]
%126 = phi i64 [ 0, %122 ], [ %153, %124 ]
%127 = add i64 %91, %125
%128 = add i64 %92, %125
%129 = getelementptr inbounds i8, i8* %80, i64 %128
%130 = bitcast i8* %129 to <16 x i8>*
%131 = load <16 x i8>, <16 x i8>* %130
%132 = getelementptr inbounds i8, i8* %129, i64 16
%133 = bitcast i8* %132 to <16 x i8>*
%134 = load <16 x i8>, <16 x i8>* %133
%135 = getelementptr inbounds i8, i8* %80, i64 %127
%136 = bitcast i8* %135 to <16 x i8>*
store <16 x i8> %131, <16 x i8>* %136
%137 = getelementptr inbounds i8, i8* %135, i64 16
%138 = bitcast i8* %137 to <16 x i8>*
store <16 x i8> %134, <16 x i8>* %138
%139 = or i64 %125, 32
%140 = add i64 %91, %139
%141 = add i64 %92, %139
%142 = getelementptr inbounds i8, i8* %80, i64 %141
%143 = bitcast i8* %142 to <16 x i8>*
%144 = load <16 x i8>, <16 x i8>* %143
%145 = getelementptr inbounds i8, i8* %142, i64 16
%146 = bitcast i8* %145 to <16 x i8>*
%147 = load <16 x i8>, <16 x i8>* %146
%148 = getelementptr inbounds i8, i8* %80, i64 %140
%149 = bitcast i8* %148 to <16 x i8>*
store <16 x i8> %144, <16 x i8>* %149
%150 = getelementptr inbounds i8, i8* %148, i64 16
%151 = bitcast i8* %150 to <16 x i8>*
store <16 x i8> %147, <16 x i8>* %151
%152 = add nuw i64 %125, 64
%153 = add i64 %126, 2
%154 = icmp eq i64 %153, %123
br i1 %154, label %155, label %124
155: ; preds = %124, %115
%156 = phi i64 [ 0, %115 ], [ %152, %124 ]
%157 = icmp eq i64 %120, 0
br i1 %157, label %171, label %158
158: ; preds = %155
%159 = add i64 %91, %156
%160 = add i64 %92, %156
%161 = getelementptr inbounds i8, i8* %80, i64 %160
%162 = bitcast i8* %161 to <16 x i8>*
%163 = load <16 x i8>, <16 x i8>* %162
%164 = getelementptr inbounds i8, i8* %161, i64 16
%165 = bitcast i8* %164 to <16 x i8>*
%166 = load <16 x i8>, <16 x i8>* %165
%167 = getelementptr inbounds i8, i8* %80, i64 %159
%168 = bitcast i8* %167 to <16 x i8>*
store <16 x i8> %163, <16 x i8>* %168
%169 = getelementptr inbounds i8, i8* %167, i64 16
%170 = bitcast i8* %169 to <16 x i8>*
store <16 x i8> %166, <16 x i8>* %170
br label %171
171: ; preds = %155, %158
%172 = icmp eq i64 %111, %116
br i1 %172, label %211, label %173
173: ; preds = %171
%174 = add i64 %92, %116
%175 = add i64 %91, %116
%176 = and i64 %111, 24
%177 = icmp eq i64 %176, 0
br i1 %177, label %199, label %178
178: ; preds = %113, %173
%179 = phi i64 [ %116, %173 ], [ 0, %113 ]
%180 = add i32 %93, -1
%181 = zext i32 %180 to i64
%182 = add i64 %94, %181
%183 = and i64 %182, -8
%184 = add i64 %91, %183
%185 = add i64 %92, %183
br label %186
186: ; preds = %186, %178
%187 = phi i64 [ %179, %178 ], [ %195, %186 ]
%188 = add i64 %91, %187
%189 = add i64 %92, %187
%190 = getelementptr inbounds i8, i8* %80, i64 %189
%191 = bitcast i8* %190 to <8 x i8>*
%192 = load <8 x i8>, <8 x i8>* %191
%193 = getelementptr inbounds i8, i8* %80, i64 %188
%194 = bitcast i8* %193 to <8 x i8>*
store <8 x i8> %192, <8 x i8>* %194
%195 = add nuw i64 %187, 8
%196 = icmp eq i64 %195, %183
br i1 %196, label %197, label %186
197: ; preds = %186
%198 = icmp eq i64 %182, %183
br i1 %198, label %211, label %199
199: ; preds = %109, %173, %197
%200 = phi i64 [ %91, %109 ], [ %175, %173 ], [ %184, %197 ]
%201 = phi i64 [ %92, %109 ], [ %174, %173 ], [ %185, %197 ]
br label %202
202: ; preds = %199, %202
%203 = phi i64 [ %205, %202 ], [ %200, %199 ]
%204 = phi i64 [ %209, %202 ], [ %201, %199 ]
%205 = add nuw nsw i64 %203, 1
%206 = getelementptr inbounds i8, i8* %80, i64 %204
%207 = load i8, i8* %206
%208 = getelementptr inbounds i8, i8* %80, i64 %203
store i8 %207, i8* %208
%209 = add nuw nsw i64 %204, 1
%210 = icmp eq i64 %205, %110
br i1 %210, label %211, label %202
211: ; preds = %202, %171, %197, %104, %89, %100
%212 = phi i32 [ %93, %100 ], [ %93, %89 ], [ %108, %104 ], [ %108, %197 ], [ %108, %171 ], [ %108, %202 ]
%213 = add nuw nsw i64 %91, 1
%214 = sext i32 %212 to i64
%215 = icmp slt i64 %213, %214
%216 = add nuw nsw i64 %92, 1
%217 = add i64 %90, 1
br i1 %215, label %89, label %82
218: ; preds = %82
%219 = tail call i32 @strncmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %53, i64 %86)
%220 = icmp eq i32 %219, 0
br i1 %220, label %239, label %221
221: ; preds = %218
%222 = tail call i32 @strncmp(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* %53, i64 %86)
%223 = icmp eq i32 %222, 0
br i1 %223, label %239, label %224
224: ; preds = %221
%225 = tail call i32 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %53, i64 %86)
%226 = icmp eq i32 %225, 0
br i1 %226, label %239, label %227
227: ; preds = %224
%228 = tail call i32 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8* %53, i64 %86)
%229 = icmp eq i32 %228, 0
br i1 %229, label %239, label %230
230: ; preds = %227
%231 = tail call i32 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i8* %53, i64 %86)
%232 = icmp eq i32 %231, 0
br i1 %232, label %239, label %233
233: ; preds = %230
%234 = tail call i32 @strncmp(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i8* %53, i64 %86)
%235 = icmp eq i32 %234, 0
br i1 %235, label %239, label %236
236: ; preds = %233
%237 = tail call i32 @strncmp(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i8* %53, i64 %86)
%238 = icmp eq i32 %237, 0
br i1 %238, label %239, label %241
239: ; preds = %236, %233, %230, %227, %224, %221, %218, %82
%240 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0), i8* %53, i8* %83)
br label %258
241: ; preds = %236
%242 = tail call i32 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i8* %53, i64 %86)
%243 = icmp eq i32 %242, 0
br i1 %243, label %256, label %244
244: ; preds = %241
%245 = tail call i32 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i8* %53, i64 %86)
%246 = icmp eq i32 %245, 0
br i1 %246, label %256, label %247
247: ; preds = %244
%248 = tail call i32 @strncmp(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0), i8* %53, i64 %86)
%249 = icmp eq i32 %248, 0
br i1 %249, label %256, label %250
250: ; preds = %247
%251 = tail call i32 @strncmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0), i8* %53, i64 %86)
%252 = icmp eq i32 %251, 0
br i1 %252, label %256, label %253
253: ; preds = %250
%254 = tail call i32 @strncmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0), i8* %53, i64 %86)
%255 = icmp eq i32 %254, 0
br i1 %255, label %256, label %258
256: ; preds = %253, %250, %247, %244, %241
%257 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.19, i64 0, i64 0), i8* %53, i32 %84, i8* %83)
br label %258
258: ; preds = %253, %256, %239
%259 = tail call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.conv_cmor_table, i64 0, i64 0), i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.20, i64 0, i64 0), i32 142, i8* %83)
%260 = add nuw nsw i32 %50, 1
%261 = icmp eq i32 %260, %14
br i1 %261, label %262, label %49
262: ; preds = %258, %46
%263 = icmp eq i32 %10, 0
br i1 %263, label %266, label %264
264: ; preds = %262
%265 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %9)
br label %266
266: ; preds = %264, %262
%267 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
br label %268
268: ; preds = %38, %18, %266, %43
%269 = phi i32 [ %10, %266 ], [ %10, %43 ], [ %10, %18 ], [ %39, %38 ]
%270 = phi double [ %9, %266 ], [ %9, %43 ], [ %9, %18 ], [ %40, %38 ]
%271 = add nuw nsw i32 %8, 1
%272 = icmp eq i32 %271, %5
br i1 %272, label %273, label %7
273: ; preds = %268, %1
%274 = tail call i32 (i8*, ...) bitcast (i32 (...)* @kvlDelete to i32 (i8*, ...)*)(i8* %4)
ret i32 0
}