void read_mosaic_contact(const char *mosaic_file, int *tile1, int *tile2,
                         int *istart1, int *iend1, int *jstart1, int *jend1,
                         int *istart2, int *iend2, int *jstart2, int *jend2) {
  char contacts[255];
  char **gridtiles;
  char pstring[40][255];
  int ntiles, ncontacts, n, m, l, nstr, found;
  const int x_refine = 2, y_refine = 2;
  ntiles = get_dimlen(mosaic_file, "ntiles");
  gridtiles = (char **)malloc(ntiles * sizeof(char *));
  for (n = 0; n < ntiles; n++) {
    gridtiles[n] = (char *)malloc(255 * sizeof(char));
    get_string_data_level(mosaic_file, "gridtiles", gridtiles[n], &n);
  }
  ncontacts = get_dimlen(mosaic_file, "ncontact");
  for (n = 0; n < ncontacts; n++) {
    get_string_data_level(mosaic_file, "contacts", contacts, &n);
    tokenize(contacts, ":", 255, 40, pstring, &nstr);
    if (nstr != 4)
      error_handler("Error from read_mosaic: number of elements "
                    "in contact seperated by :/:: should be 4");
    found = 0;
    for (m = 0; m < ntiles; m++) {
      if (strcmp(gridtiles[m], pstring[1]) == 0) {
        found = 1;
        tile1[n] = m + 1;
        break;
      }
    }
    if (!found)
      error_handler("error from read_mosaic: the first tile name specified "
                    "in contact is not found in tile list");
    found = 0;
    for (m = 0; m < ntiles; m++) {
      if (strcmp(gridtiles[m], pstring[3]) == 0) {
        found = 1;
        tile2[n] = m + 1;
        break;
      }
    }
    if (!found)
      error_handler("error from read_mosaic: the second tile name specified "
                    "in contact is not found in tile list");
    get_string_data_level(mosaic_file, "contact_index", contacts, &n);
    tokenize(contacts, ":,", 255, 40, pstring, &nstr);
    if (nstr != 8)
      error_handler("Error from read_mosaic: number of elements "
                    "in contact_index seperated by :/, should be 8");
    for (m = 0; m < nstr; m++)
      for (l = 0; l < strlen(pstring[m]); l++) {
        if (pstring[m][l] > '9' || pstring[m][l] < '0') {
          error_handler("Error from read_mosaic: some of the character in "
                        "contact_indices except token is not digit number");
        }
      }
    istart1[n] = atoi(pstring[0]);
    iend1[n] = atoi(pstring[1]);
    jstart1[n] = atoi(pstring[2]);
    jend1[n] = atoi(pstring[3]);
    istart2[n] = atoi(pstring[4]);
    iend2[n] = atoi(pstring[5]);
    jstart2[n] = atoi(pstring[6]);
    jend2[n] = atoi(pstring[7]);
    if (istart1[n] == iend1[n]) {
      istart1[n] = (istart1[n] + 1) / x_refine - 1;
      iend1[n] = istart1[n];
      if (jend1[n] > jstart1[n]) {
        jstart1[n] -= 1;
        jend1[n] -= y_refine;
      } else if (jend1[n] < jstart1[n]) {
        jstart1[n] -= y_refine;
        jend1[n] -= 1;
      } else
        error_handler("Error from read_mosaic_contact: jstart1 and jend1 "
                      "should not be equal when istart1=iend1");
      if (jstart1[n] % y_refine || jend1[n] % y_refine)
        error_handler("Error from read_mosaic_contact: mismatch between "
                      "y_refine and jstart1/jend1 when istart1=iend1");
      jstart1[n] /= y_refine;
      jend1[n] /= y_refine;
    } else if (jstart1[n] == jend1[n]) {
      jstart1[n] = (jstart1[n] + 1) / y_refine - 1;
      jend1[n] = jstart1[n];
      if (iend1[n] > istart1[n]) {
        istart1[n] -= 1;
        iend1[n] -= x_refine;
      } else if (istart1[n] > iend1[n]) {
        istart1[n] -= x_refine;
        iend1[n] -= 1;
      } else
        error_handler("Error from read_mosaic_contact: istart1 and iend1 "
                      "should not be equal when jstart1=jend1");
      if (istart1[n] % x_refine || iend1[n] % x_refine)
        error_handler("Error from read_mosaic_contact: mismatch between "
                      "x_refine and istart1/iend1 when jstart1=jend1");
      istart1[n] /= x_refine;
      iend1[n] /= x_refine;
    } else {
      error_handler("Error from read_mosaic_contact: only line contact is "
                    "supported now, contact developer");
    }
    if (istart2[n] == iend2[n]) {
      istart2[n] = (istart2[n] + 1) / x_refine - 1;
      iend2[n] = istart2[n];
      if (jend2[n] > jstart2[n]) {
        jstart2[n] -= 1;
        jend2[n] -= y_refine;
      } else if (jstart2[n] > jend2[n]) {
        jstart2[n] -= y_refine;
        jend2[n] -= 1;
      } else
        error_handler("Error from read_mosaic_contact: jstart2 and jend2 "
                      "should not be equal when istart2=iend2");
      if (jstart2[n] % y_refine || jend2[n] % y_refine)
        error_handler("Error from read_mosaic_contact: mismatch between "
                      "y_refine and jstart2/jend2 when istart2=iend2");
      jstart2[n] /= y_refine;
      jend2[n] /= y_refine;
    } else if (jstart2[n] == jend2[n]) {
      jstart2[n] = (jstart2[n] + 1) / y_refine - 1;
      jend2[n] = jstart2[n];
      if (iend2[n] > istart2[n]) {
        istart2[n] -= 1;
        iend2[n] -= x_refine;
      } else if (istart2[n] > iend2[n]) {
        istart2[n] -= x_refine;
        iend2[n] -= 1;
      } else
        error_handler("Error from read_mosaic_contact: istart2 and iend2 "
                      "should not be equal when jstart2=jend2");
      if (istart2[n] % x_refine || iend2[n] % x_refine)
        error_handler("Error from read_mosaic_contact: mismatch between "
                      "x_refine and istart2/iend2 when jstart2=jend2");
      istart2[n] /= x_refine;
      iend2[n] /= x_refine;
    } else {
      error_handler("Error from read_mosaic_contact: only line contact is "
                    "supported now, contact developer");
    }
  }
}


x86 assembly (clang, -O0):
<read_mosaic_contact>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2980,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x2,-0x2930(%rbp)
movl   $0x2,-0x2934(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe2a(%rip),%rsi
mov    $0x0,%al
call   10a0 <get_dimlen@plt>
mov    %eax,-0x2914(%rbp)
movslq -0x2914(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x138(%rbp)
movl   $0x0,-0x291c(%rbp)
mov    -0x291c(%rbp),%eax
cmp    -0x2914(%rbp),%eax
jge    1274 <read_mosaic_contact+0xf4>
mov    $0xff,%edi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x138(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x8(%rbp),%rdi
mov    -0x138(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xdb5(%rip),%rsi
lea    -0x291c(%rbp),%rcx
mov    $0x0,%al
call   1030 <get_string_data_level@plt>
mov    -0x291c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x291c(%rbp)
jmp    1204 <read_mosaic_contact+0x84>
mov    -0x8(%rbp),%rdi
lea    0xd92(%rip),%rsi
mov    $0x0,%al
call   10a0 <get_dimlen@plt>
mov    %eax,-0x2918(%rbp)
movl   $0x0,-0x291c(%rbp)
mov    -0x291c(%rbp),%eax
cmp    -0x2918(%rbp),%eax
jge    1e28 <read_mosaic_contact+0xca8>
mov    -0x8(%rbp),%rdi
lea    -0x130(%rbp),%rdx
lea    0xd60(%rip),%rsi
lea    -0x291c(%rbp),%rcx
mov    $0x0,%al
call   1030 <get_string_data_level@plt>
lea    -0x130(%rbp),%rdi
lea    -0x2910(%rbp),%r8
lea    0xd46(%rip),%rsi
mov    $0xff,%edx
mov    $0x28,%ecx
lea    -0x2928(%rbp),%r9
mov    $0x0,%al
call   1080 <tokenize@plt>
cmpl   $0x4,-0x2928(%rbp)
je     1310 <read_mosaic_contact+0x190>
lea    0xd1c(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
movl   $0x0,-0x292c(%rbp)
movl   $0x0,-0x2920(%rbp)
mov    -0x2920(%rbp),%eax
cmp    -0x2914(%rbp),%eax
jge    13a3 <read_mosaic_contact+0x223>
mov    -0x138(%rbp),%rax
movslq -0x2920(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x2910(%rbp),%rsi
add    $0xff,%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    138a <read_mosaic_contact+0x20a>
movl   $0x1,-0x292c(%rbp)
mov    -0x2920(%rbp),%edx
add    $0x1,%edx
mov    -0x10(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    13a3 <read_mosaic_contact+0x223>
jmp    138f <read_mosaic_contact+0x20f>
mov    -0x2920(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2920(%rbp)
jmp    1324 <read_mosaic_contact+0x1a4>
cmpl   $0x0,-0x292c(%rbp)
jne    13be <read_mosaic_contact+0x23e>
lea    0xcc2(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
movl   $0x0,-0x292c(%rbp)
movl   $0x0,-0x2920(%rbp)
mov    -0x2920(%rbp),%eax
cmp    -0x2914(%rbp),%eax
jge    1451 <read_mosaic_contact+0x2d1>
mov    -0x138(%rbp),%rax
movslq -0x2920(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x2910(%rbp),%rsi
add    $0x2fd,%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1438 <read_mosaic_contact+0x2b8>
movl   $0x1,-0x292c(%rbp)
mov    -0x2920(%rbp),%edx
add    $0x1,%edx
mov    -0x18(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    1451 <read_mosaic_contact+0x2d1>
jmp    143d <read_mosaic_contact+0x2bd>
mov    -0x2920(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2920(%rbp)
jmp    13d2 <read_mosaic_contact+0x252>
cmpl   $0x0,-0x292c(%rbp)
jne    146c <read_mosaic_contact+0x2ec>
lea    0xc6f(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
mov    -0x8(%rbp),%rdi
lea    -0x130(%rbp),%rdx
lea    0xcb2(%rip),%rsi
lea    -0x291c(%rbp),%rcx
mov    $0x0,%al
call   1030 <get_string_data_level@plt>
lea    -0x130(%rbp),%rdi
lea    -0x2910(%rbp),%r8
lea    0xc9d(%rip),%rsi
mov    $0xff,%edx
mov    $0x28,%ecx
lea    -0x2928(%rbp),%r9
mov    $0x0,%al
call   1080 <tokenize@plt>
cmpl   $0x8,-0x2928(%rbp)
je     14d4 <read_mosaic_contact+0x354>
lea    0xc74(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
movl   $0x0,-0x2920(%rbp)
mov    -0x2920(%rbp),%eax
cmp    -0x2928(%rbp),%eax
jge    15d0 <read_mosaic_contact+0x450>
movl   $0x0,-0x2924(%rbp)
movslq -0x2924(%rbp),%rax
mov    %rax,-0x2940(%rbp)
movslq -0x2920(%rbp),%rax
lea    -0x2910(%rbp),%rdi
imul   $0xff,%rax,%rax
add    %rax,%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x2940(%rbp),%rax
cmp    %rcx,%rax
jae    15b7 <read_mosaic_contact+0x437>
movslq -0x2920(%rbp),%rcx
lea    -0x2910(%rbp),%rax
imul   $0xff,%rcx,%rcx
add    %rcx,%rax
movslq -0x2924(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
jg     1590 <read_mosaic_contact+0x410>
movslq -0x2920(%rbp),%rcx
lea    -0x2910(%rbp),%rax
imul   $0xff,%rcx,%rcx
add    %rcx,%rax
movslq -0x2924(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x30,%eax
jge    159e <read_mosaic_contact+0x41e>
lea    0xc03(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
jmp    15a3 <read_mosaic_contact+0x423>
mov    -0x2924(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2924(%rbp)
jmp    14fa <read_mosaic_contact+0x37a>
jmp    15bc <read_mosaic_contact+0x43c>
mov    -0x2920(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2920(%rbp)
jmp    14de <read_mosaic_contact+0x35e>
lea    -0x2910(%rbp),%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    %eax,%edx
mov    -0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
lea    -0x2910(%rbp),%rdi
add    $0xff,%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    %eax,%edx
mov    -0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
lea    -0x2910(%rbp),%rdi
add    $0x1fe,%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    %eax,%edx
mov    -0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
lea    -0x2910(%rbp),%rdi
add    $0x2fd,%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    %eax,%edx
mov    0x10(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
lea    -0x2910(%rbp),%rdi
add    $0x3fc,%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    %eax,%edx
mov    0x18(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
lea    -0x2910(%rbp),%rdi
add    $0x4fb,%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    %eax,%edx
mov    0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
lea    -0x2910(%rbp),%rdi
add    $0x5fa,%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    %eax,%edx
mov    0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
lea    -0x2910(%rbp),%rdi
add    $0x6f9,%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    %eax,%edx
mov    0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x28(%rbp),%rcx
movslq -0x291c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    18af <read_mosaic_contact+0x72f>
mov    -0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
sub    $0x1,%edx
mov    -0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x10(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x30(%rbp),%rcx
movslq -0x291c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jle    17aa <read_mosaic_contact+0x62a>
mov    -0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    0x10(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x2,%edx
mov    %edx,(%rax,%rcx,4)
jmp    180c <read_mosaic_contact+0x68c>
mov    0x10(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x30(%rbp),%rcx
movslq -0x291c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jge    17f9 <read_mosaic_contact+0x679>
mov    -0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x2,%edx
mov    %edx,(%rax,%rcx,4)
mov    0x10(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
jmp    1807 <read_mosaic_contact+0x687>
lea    0x9fc(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
jmp    180c <read_mosaic_contact+0x68c>
mov    -0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    184a <read_mosaic_contact+0x6ca>
mov    0x10(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1858 <read_mosaic_contact+0x6d8>
lea    0xa04(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
mov    -0x30(%rbp),%rax
mov    %rax,-0x2950(%rbp)
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x2950(%rbp),%rax
mov    %edx,(%rax,%rcx,4)
mov    0x10(%rbp),%rax
mov    %rax,-0x2948(%rbp)
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x2948(%rbp),%rax
mov    %edx,(%rax,%rcx,4)
jmp    1a80 <read_mosaic_contact+0x900>
mov    -0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    0x10(%rbp),%rcx
movslq -0x291c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    1a6d <read_mosaic_contact+0x8ed>
mov    -0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
sub    $0x1,%edx
mov    -0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    0x10(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x20(%rbp),%rcx
movslq -0x291c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jle    1968 <read_mosaic_contact+0x7e8>
mov    -0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x2,%edx
mov    %edx,(%rax,%rcx,4)
jmp    19ca <read_mosaic_contact+0x84a>
mov    -0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x28(%rbp),%rcx
movslq -0x291c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jle    19b7 <read_mosaic_contact+0x837>
mov    -0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x2,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
jmp    19c5 <read_mosaic_contact+0x845>
lea    0x8f6(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
jmp    19ca <read_mosaic_contact+0x84a>
mov    -0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1a08 <read_mosaic_contact+0x888>
mov    -0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1a16 <read_mosaic_contact+0x896>
lea    0x8fe(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x2960(%rbp)
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x2960(%rbp),%rax
mov    %edx,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    %rax,-0x2958(%rbp)
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x2958(%rbp),%rax
mov    %edx,(%rax,%rcx,4)
jmp    1a7b <read_mosaic_contact+0x8fb>
lea    0x8f8(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
jmp    1a80 <read_mosaic_contact+0x900>
mov    0x18(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    0x20(%rbp),%rcx
movslq -0x291c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    1c3e <read_mosaic_contact+0xabe>
mov    0x18(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
sub    $0x1,%edx
mov    0x18(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x18(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    0x28(%rbp),%rcx
movslq -0x291c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jle    1b39 <read_mosaic_contact+0x9b9>
mov    0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x2,%edx
mov    %edx,(%rax,%rcx,4)
jmp    1b9b <read_mosaic_contact+0xa1b>
mov    0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    0x30(%rbp),%rcx
movslq -0x291c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jle    1b88 <read_mosaic_contact+0xa08>
mov    0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x2,%edx
mov    %edx,(%rax,%rcx,4)
mov    0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
jmp    1b96 <read_mosaic_contact+0xa16>
lea    0x833(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
jmp    1b9b <read_mosaic_contact+0xa1b>
mov    0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1bd9 <read_mosaic_contact+0xa59>
mov    0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1be7 <read_mosaic_contact+0xa67>
lea    0x83b(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
mov    0x28(%rbp),%rax
mov    %rax,-0x2970(%rbp)
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x2970(%rbp),%rax
mov    %edx,(%rax,%rcx,4)
mov    0x30(%rbp),%rax
mov    %rax,-0x2968(%rbp)
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x2968(%rbp),%rax
mov    %edx,(%rax,%rcx,4)
jmp    1e0f <read_mosaic_contact+0xc8f>
mov    0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    0x30(%rbp),%rcx
movslq -0x291c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    1dfc <read_mosaic_contact+0xc7c>
mov    0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
sub    $0x1,%edx
mov    0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x28(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    0x30(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    0x18(%rbp),%rcx
movslq -0x291c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jle    1cf7 <read_mosaic_contact+0xb77>
mov    0x18(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x2,%edx
mov    %edx,(%rax,%rcx,4)
jmp    1d59 <read_mosaic_contact+0xbd9>
mov    0x18(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    0x20(%rbp),%rcx
movslq -0x291c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jle    1d46 <read_mosaic_contact+0xbc6>
mov    0x18(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x2,%edx
mov    %edx,(%rax,%rcx,4)
mov    0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
jmp    1d54 <read_mosaic_contact+0xbd4>
lea    0x72d(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
jmp    1d59 <read_mosaic_contact+0xbd9>
mov    0x18(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1d97 <read_mosaic_contact+0xc17>
mov    0x20(%rbp),%rax
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1da5 <read_mosaic_contact+0xc25>
lea    0x735(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
mov    0x18(%rbp),%rax
mov    %rax,-0x2980(%rbp)
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x2980(%rbp),%rax
mov    %edx,(%rax,%rcx,4)
mov    0x20(%rbp),%rax
mov    %rax,-0x2978(%rbp)
movslq -0x291c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x2978(%rbp),%rax
mov    %edx,(%rax,%rcx,4)
jmp    1e0a <read_mosaic_contact+0xc8a>
lea    0x569(%rip),%rdi
mov    $0x0,%al
call   1050 <error_handler@plt>
jmp    1e0f <read_mosaic_contact+0xc8f>
jmp    1e14 <read_mosaic_contact+0xc94>
mov    -0x291c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x291c(%rbp)
jmp    1296 <read_mosaic_contact+0x116>
add    $0x2980,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_mosaic_contact>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2928,%rsp
mov    %r9,0x48(%rsp)
mov    %r8,0x40(%rsp)
mov    %rcx,0x38(%rsp)
mov    %rdx,0x30(%rsp)
mov    %rsi,0x28(%rsp)
mov    %rdi,%r15
lea    0xe4c(%rip),%rsi
xor    %eax,%eax
call   10a0 <get_dimlen@plt>
mov    %eax,%r12d
movslq %eax,%rbx
lea    0x0(,%rbx,8),%rdi
call   1070 <malloc@plt>
mov    %rax,%r13
movl   $0x0,0x4(%rsp)
test   %ebx,%ebx
jle    1225 <read_mosaic_contact+0xa5>
lea    0xe23(%rip),%r14
lea    0x4(%rsp),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0xff,%edi
call   1070 <malloc@plt>
movslq %ebp,%rcx
mov    %rax,0x0(%r13,%rcx,8)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <get_string_data_level@plt>
mov    0x4(%rsp),%ebp
add    $0x1,%ebp
mov    %ebp,0x4(%rsp)
cmp    %r12d,%ebp
jl     11f0 <read_mosaic_contact+0x70>
lea    0xde5(%rip),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   10a0 <get_dimlen@plt>
movl   $0x0,0x4(%rsp)
mov    %eax,0x1c(%rsp)
test   %eax,%eax
jle    1945 <read_mosaic_contact+0x7c5>
lea    0x24f(%rsp),%rbp
mov    %r12d,%eax
mov    %rax,0x20(%rsp)
lea    0xf39(%rip),%r14
mov    %r12d,0x8(%rsp)
mov    %r15,0x10(%rsp)
jmp    129b <read_mosaic_contact+0x11b>
nopl   (%rax)
lea    0x10f5(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
mov    0x4(%rsp),%ecx
lea    0x24f(%rsp),%rbp
add    $0x1,%ecx
mov    %ecx,0x4(%rsp)
cmp    0x1c(%rsp),%ecx
jge    1945 <read_mosaic_contact+0x7c5>
mov    %r15,%rdi
lea    0xd75(%rip),%rsi
lea    0x50(%rsp),%rbx
mov    %rbx,%rdx
lea    0x4(%rsp),%rcx
xor    %eax,%eax
call   1030 <get_string_data_level@plt>
mov    %rbx,%rdi
lea    0xd60(%rip),%rsi
mov    $0xff,%edx
mov    $0x28,%ecx
lea    0x150(%rsp),%r8
lea    0xc(%rsp),%r9
xor    %eax,%eax
call   1080 <tokenize@plt>
cmpl   $0x4,0xc(%rsp)
je     12f6 <read_mosaic_contact+0x176>
lea    0xd36(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
test   %r12d,%r12d
jle    131c <read_mosaic_contact+0x19c>
xor    %ebx,%ebx
nopl   (%rax)
mov    0x0(%r13,%rbx,8),%rdi
mov    %rbp,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1330 <read_mosaic_contact+0x1b0>
add    $0x1,%rbx
cmp    %rbx,0x20(%rsp)
jne    1300 <read_mosaic_contact+0x180>
lea    0xd56(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
jmp    1340 <read_mosaic_contact+0x1c0>
nopl   0x0(%rax)
add    $0x1,%ebx
movslq 0x4(%rsp),%rax
mov    0x28(%rsp),%rcx
mov    %ebx,(%rcx,%rax,4)
test   %r12d,%r12d
lea    0x44d(%rsp),%rbp
jle    136c <read_mosaic_contact+0x1ec>
xor    %ebx,%ebx
nop
mov    0x0(%r13,%rbx,8),%rdi
mov    %rbp,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1380 <read_mosaic_contact+0x200>
add    $0x1,%rbx
cmp    %rbx,0x20(%rsp)
jne    1350 <read_mosaic_contact+0x1d0>
lea    0xd61(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
jmp    1390 <read_mosaic_contact+0x210>
nopl   0x0(%rax)
add    $0x1,%ebx
movslq 0x4(%rsp),%rax
mov    0x30(%rsp),%rcx
mov    %ebx,(%rcx,%rax,4)
mov    %r15,%rdi
lea    0xd96(%rip),%rsi
lea    0x50(%rsp),%rbx
mov    %rbx,%rdx
lea    0x4(%rsp),%rcx
xor    %eax,%eax
call   1030 <get_string_data_level@plt>
mov    %rbx,%rdi
lea    0xd86(%rip),%rsi
mov    $0xff,%edx
mov    $0x28,%ecx
lea    0x150(%rsp),%r8
lea    0xc(%rsp),%r9
xor    %eax,%eax
call   1080 <tokenize@plt>
mov    $0x8,%ebx
cmpl   $0x8,0xc(%rsp)
je     13fc <read_mosaic_contact+0x27c>
lea    0xd58(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
mov    0xc(%rsp),%ebx
test   %ebx,%ebx
jle    1480 <read_mosaic_contact+0x300>
lea    0x150(%rsp),%rbp
xor    %r12d,%r12d
jmp    1427 <read_mosaic_contact+0x2a7>
nopl   0x0(%rax)
mov    0xc(%rsp),%ebx
add    $0x1,%r12
movslq %ebx,%rax
add    $0xff,%rbp
cmp    %rax,%r12
jge    1480 <read_mosaic_contact+0x300>
mov    %r12,%rax
shl    $0x8,%rax
sub    %r12,%rax
lea    (%rsp,%rax,1),%r15
add    $0x150,%r15
mov    %r15,%rdi
call   1040 <strlen@plt>
test   %rax,%rax
je     1414 <read_mosaic_contact+0x294>
xor    %ebx,%ebx
jmp    1461 <read_mosaic_contact+0x2e1>
nopl   (%rax)
add    $0x1,%rbx
mov    %r15,%rdi
call   1040 <strlen@plt>
cmp    %rbx,%rax
jbe    1410 <read_mosaic_contact+0x290>
movzbl 0x0(%rbp,%rbx,1),%eax
add    $0xc6,%al
cmp    $0xf5,%al
ja     1450 <read_mosaic_contact+0x2d0>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
jmp    1450 <read_mosaic_contact+0x2d0>
nopl   0x0(%rax,%rax,1)
lea    0x150(%rsp),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
movslq 0x4(%rsp),%rcx
mov    0x38(%rsp),%rbp
mov    %eax,0x0(%rbp,%rcx,4)
lea    0x24f(%rsp),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
movslq 0x4(%rsp),%rcx
mov    0x40(%rsp),%r15
mov    %eax,(%r15,%rcx,4)
lea    0x34e(%rsp),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
movslq 0x4(%rsp),%rcx
mov    0x48(%rsp),%rbx
mov    %eax,(%rbx,%rcx,4)
lea    0x44d(%rsp),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
movslq 0x4(%rsp),%rcx
mov    0x2960(%rsp),%r12
mov    %eax,(%r12,%rcx,4)
lea    0x54c(%rsp),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
movslq 0x4(%rsp),%rcx
mov    0x2968(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
lea    0x64b(%rsp),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
movslq 0x4(%rsp),%rcx
mov    0x2970(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
lea    0x74a(%rsp),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
movslq 0x4(%rsp),%rcx
mov    0x2978(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
lea    0x849(%rsp),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
mov    0x4(%rsp),%ecx
movslq %ecx,%rdx
mov    0x2980(%rsp),%rsi
mov    %eax,(%rsi,%rdx,4)
mov    0x0(%rbp,%rdx,4),%eax
cmp    (%r15,%rdx,4),%eax
jne    15c0 <read_mosaic_contact+0x440>
mov    %eax,%esi
add    $0x1,%esi
shr    $0x1f,%esi
add    %esi,%eax
add    $0x1,%eax
sar    %eax
add    $0xffffffff,%eax
mov    %eax,0x0(%rbp,%rdx,4)
mov    %eax,(%r15,%rdx,4)
mov    (%rbx,%rdx,4),%eax
cmp    %eax,(%r12,%rdx,4)
jle    1600 <read_mosaic_contact+0x480>
add    $0xffffffff,%eax
mov    %eax,(%rbx,%rdx,4)
addl   $0xfffffffe,(%r12,%rdx,4)
jmp    1680 <read_mosaic_contact+0x500>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rbx,%rdx,4),%eax
cmp    (%r12,%rdx,4),%eax
jne    1610 <read_mosaic_contact+0x490>
mov    %eax,%esi
add    $0x1,%esi
shr    $0x1f,%esi
add    %esi,%eax
add    $0x1,%eax
sar    %eax
add    $0xffffffff,%eax
mov    %eax,(%rbx,%rdx,4)
mov    %eax,(%r12,%rdx,4)
mov    (%r15,%rdx,4),%esi
mov    0x0(%rbp,%rdx,4),%eax
cmp    %eax,%esi
jle    1654 <read_mosaic_contact+0x4d4>
add    $0xffffffff,%eax
mov    %eax,0x0(%rbp,%rdx,4)
addl   $0xfffffffe,(%r15,%rdx,4)
jmp    171d <read_mosaic_contact+0x59d>
nop
jge    166b <read_mosaic_contact+0x4eb>
add    $0xfffffffe,%eax
mov    %eax,(%rbx,%rdx,4)
addl   $0xffffffff,(%r12,%rdx,4)
jmp    1680 <read_mosaic_contact+0x500>
nop
lea    0xd55(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
mov    0x4(%rsp),%ecx
movslq %ecx,%rax
mov    0x10(%rsp),%r15
mov    0x8(%rsp),%r12d
mov    0x2980(%rsp),%rbx
mov    0x2978(%rsp),%rbp
mov    0x2970(%rsp),%rdi
mov    0x2968(%rsp),%r8
jmp    1794 <read_mosaic_contact+0x614>
jge    1708 <read_mosaic_contact+0x588>
add    $0xfffffffe,%eax
mov    %eax,0x0(%rbp,%rdx,4)
addl   $0xffffffff,(%r15,%rdx,4)
jmp    171d <read_mosaic_contact+0x59d>
lea    0xb8a(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
mov    0x4(%rsp),%ecx
movslq %ecx,%rdx
mov    0x10(%rsp),%r15
mov    0x8(%rsp),%r12d
mov    0x2978(%rsp),%rbp
mov    (%rbx,%rdx,4),%esi
test   $0x1,%sil
jne    16b0 <read_mosaic_contact+0x530>
mov    0x2960(%rsp),%rax
testb  $0x1,(%rax,%rdx,4)
jne    16b0 <read_mosaic_contact+0x530>
movslq %ecx,%rax
jmp    16c8 <read_mosaic_contact+0x548>
xchg   %ax,%ax
lea    0xb9e(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
mov    0x4(%rsp),%ecx
movslq %ecx,%rax
mov    (%rbx,%rax,4),%esi
mov    0x2970(%rsp),%rdi
mov    0x2968(%rsp),%r8
mov    %esi,%edx
shr    $0x1f,%edx
add    %esi,%edx
sar    %edx
mov    %edx,(%rbx,%rax,4)
mov    0x2960(%rsp),%rbx
mov    (%rbx,%rax,4),%edx
mov    %edx,%esi
shr    $0x1f,%esi
add    %edx,%esi
sar    %esi
mov    %esi,(%rbx,%rax,4)
mov    0x2980(%rsp),%rbx
jmp    1794 <read_mosaic_contact+0x614>
lea    0xba5(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
mov    0x4(%rsp),%ecx
movslq %ecx,%rdx
mov    0x2980(%rsp),%rbx
mov    0x0(%rbp,%rdx,4),%esi
test   $0x1,%sil
jne    173b <read_mosaic_contact+0x5bb>
testb  $0x1,(%r15,%rdx,4)
jne    173b <read_mosaic_contact+0x5bb>
movslq %ecx,%rax
jmp    1754 <read_mosaic_contact+0x5d4>
lea    0xbcb(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
mov    0x4(%rsp),%ecx
movslq %ecx,%rax
mov    0x0(%rbp,%rax,4),%esi
mov    0x2970(%rsp),%rdi
mov    0x2968(%rsp),%r8
mov    %esi,%edx
shr    $0x1f,%edx
add    %esi,%edx
sar    %edx
mov    %edx,0x0(%rbp,%rax,4)
mov    (%r15,%rax,4),%edx
mov    %edx,%esi
shr    $0x1f,%esi
add    %edx,%esi
sar    %esi
mov    %esi,(%r15,%rax,4)
mov    0x10(%rsp),%r15
mov    0x8(%rsp),%r12d
mov    0x2978(%rsp),%rbp
mov    (%r8,%rax,4),%edx
cmp    (%rdi,%rax,4),%edx
jne    17e0 <read_mosaic_contact+0x660>
mov    %edx,%esi
add    $0x1,%esi
shr    $0x1f,%esi
add    %esi,%edx
add    $0x1,%edx
sar    %edx
add    $0xffffffff,%edx
mov    %edx,(%r8,%rax,4)
mov    %edx,(%rdi,%rax,4)
mov    (%rbx,%rax,4),%esi
mov    0x0(%rbp,%rax,4),%edx
cmp    %edx,%esi
jle    1830 <read_mosaic_contact+0x6b0>
add    $0xffffffff,%edx
mov    %edx,0x0(%rbp,%rax,4)
addl   $0xfffffffe,(%rbx,%rax,4)
jmp    1866 <read_mosaic_contact+0x6e6>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x0(%rbp,%rax,4),%edx
cmp    (%rbx,%rax,4),%edx
jne    1270 <read_mosaic_contact+0xf0>
mov    %edx,%esi
add    $0x1,%esi
shr    $0x1f,%esi
add    %esi,%edx
add    $0x1,%edx
sar    %edx
add    $0xffffffff,%edx
mov    %edx,0x0(%rbp,%rax,4)
mov    %edx,(%rbx,%rax,4)
mov    (%rdi,%rax,4),%esi
mov    (%r8,%rax,4),%edx
cmp    %edx,%esi
jle    183f <read_mosaic_contact+0x6bf>
add    $0xffffffff,%edx
mov    %edx,(%r8,%rax,4)
addl   $0xfffffffe,(%rdi,%rax,4)
jmp    18df <read_mosaic_contact+0x75f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
jge    1851 <read_mosaic_contact+0x6d1>
add    $0xfffffffe,%edx
mov    %edx,0x0(%rbp,%rax,4)
addl   $0xffffffff,(%rbx,%rax,4)
jmp    1866 <read_mosaic_contact+0x6e6>
jge    18ba <read_mosaic_contact+0x73a>
add    $0xfffffffe,%edx
mov    %edx,(%r8,%rax,4)
addl   $0xffffffff,(%rdi,%rax,4)
jmp    18df <read_mosaic_contact+0x75f>
lea    0xb6a(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
mov    0x4(%rsp),%ecx
movslq %ecx,%rax
mov    0x0(%rbp,%rax,4),%edx
test   $0x1,%dl
jne    1880 <read_mosaic_contact+0x700>
testb  $0x1,(%rbx,%rax,4)
jne    1880 <read_mosaic_contact+0x700>
movslq %ecx,%rax
jmp    1899 <read_mosaic_contact+0x719>
nopw   0x0(%rax,%rax,1)
lea    0xb94(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
mov    0x4(%rsp),%ecx
movslq %ecx,%rax
mov    0x0(%rbp,%rax,4),%edx
mov    %edx,%esi
shr    $0x1f,%esi
add    %edx,%esi
sar    %esi
mov    %esi,0x0(%rbp,%rax,4)
mov    (%rbx,%rax,4),%edx
mov    %edx,%esi
shr    $0x1f,%esi
add    %edx,%esi
sar    %esi
mov    %esi,(%rbx,%rax,4)
jmp    1282 <read_mosaic_contact+0x102>
lea    0xbb9(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
mov    0x2968(%rsp),%r8
mov    0x2970(%rsp),%rdi
mov    0x4(%rsp),%ecx
movslq %ecx,%rax
lea    0x24f(%rsp),%rbp
mov    (%r8,%rax,4),%edx
test   $0x1,%dl
jne    18fb <read_mosaic_contact+0x77b>
testb  $0x1,(%rdi,%rax,4)
jne    18fb <read_mosaic_contact+0x77b>
movslq %ecx,%rax
jmp    1924 <read_mosaic_contact+0x7a4>
lea    0xbd1(%rip),%rdi
xor    %eax,%eax
call   1050 <error_handler@plt>
mov    0x2968(%rsp),%r8
mov    0x2970(%rsp),%rdi
mov    0x4(%rsp),%ecx
movslq %ecx,%rax
mov    (%r8,%rax,4),%edx
mov    %edx,%esi
shr    $0x1f,%esi
add    %edx,%esi
sar    %esi
mov    %esi,(%r8,%rax,4)
mov    (%rdi,%rax,4),%edx
mov    %edx,%esi
shr    $0x1f,%esi
add    %edx,%esi
sar    %esi
mov    %esi,(%rdi,%rax,4)
jmp    128a <read_mosaic_contact+0x10a>
add    $0x2928,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"ntiles\00"
@.str.1 = [10 x i8] c"gridtiles\00"
@.str.2 = [9 x i8] c"ncontact\00"
@.str.3 = [9 x i8] c"contacts\00"
@.str.4 = [2 x i8] c":\00"
@.str.5 = [84 x i8] c"Error from read_mosaic: number of elements in contact seperated by :/:: should be 4\00"
@.str.6 = [91 x i8] c"error from read_mosaic: the first tile name specified in contact is not found in tile list\00"
@.str.7 = [92 x i8] c"error from read_mosaic: the second tile name specified in contact is not found in tile list\00"
@.str.8 = [14 x i8] c"contact_index\00"
@.str.9 = [3 x i8] c":,\00"
@.str.10 = [89 x i8] c"Error from read_mosaic: number of elements in contact_index seperated by :/, should be 8\00"
@.str.11 = [98 x i8] c"Error from read_mosaic: some of the character in contact_indices except token is not digit number\00"
@.str.12 = [89 x i8] c"Error from read_mosaic_contact: jstart1 and jend1 should not be equal when istart1=iend1\00"
@.str.13 = [95 x i8] c"Error from read_mosaic_contact: mismatch between y_refine and jstart1/jend1 when istart1=iend1\00"
@.str.14 = [89 x i8] c"Error from read_mosaic_contact: istart1 and iend1 should not be equal when jstart1=jend1\00"
@.str.15 = [95 x i8] c"Error from read_mosaic_contact: mismatch between x_refine and istart1/iend1 when jstart1=jend1\00"
@.str.16 = [86 x i8] c"Error from read_mosaic_contact: only line contact is supported now, contact developer\00"
@.str.17 = [89 x i8] c"Error from read_mosaic_contact: jstart2 and jend2 should not be equal when istart2=iend2\00"
@.str.18 = [95 x i8] c"Error from read_mosaic_contact: mismatch between y_refine and jstart2/jend2 when istart2=iend2\00"
@.str.19 = [89 x i8] c"Error from read_mosaic_contact: istart2 and iend2 should not be equal when jstart2=jend2\00"
@.str.20 = [95 x i8] c"Error from read_mosaic_contact: mismatch between x_refine and istart2/iend2 when jstart2=jend2\00"
define void @read_mosaic_contact(i8* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10) {
%12 = alloca i8*
%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 i32*
%22 = alloca i32*
%23 = alloca [255 x i8]
%24 = alloca i8**
%25 = alloca [40 x [255 x i8]]
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
store i8* %0, i8** %12
store i32* %1, i32** %13
store i32* %2, i32** %14
store i32* %3, i32** %15
store i32* %4, i32** %16
store i32* %5, i32** %17
store i32* %6, i32** %18
store i32* %7, i32** %19
store i32* %8, i32** %20
store i32* %9, i32** %21
store i32* %10, i32** %22
store i32 2, i32* %33
store i32 2, i32* %34
%35 = load i8*, i8** %12
%36 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @get_dimlen to i32 (i8*, i8*, ...)*)(i8* %35, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 %36, i32* %26
%37 = load i32, i32* %26
%38 = sext i32 %37 to i64
%39 = mul i64 %38, 8
%40 = call i8* @malloc(i64 %39)
%41 = bitcast i8* %40 to i8**
store i8** %41, i8*** %24
store i32 0, i32* %28
br label %42
42: ; preds = %59, %11
%43 = load i32, i32* %28
%44 = load i32, i32* %26
%45 = icmp slt i32 %43, %44
br i1 %45, label %46, label %62
46: ; preds = %42
%47 = call i8* @malloc(i64 255)
%48 = load i8**, i8*** %24
%49 = load i32, i32* %28
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8*, i8** %48, i64 %50
store i8* %47, i8** %51
%52 = load i8*, i8** %12
%53 = load i8**, i8*** %24
%54 = load i32, i32* %28
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8*, i8** %53, i64 %55
%57 = load i8*, i8** %56
%58 = call i32 (i8*, i8*, i8*, i32*, ...) bitcast (i32 (...)* @get_string_data_level to i32 (i8*, i8*, i8*, i32*, ...)*)(i8* %52, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %57, i32* %28)
br label %59
59: ; preds = %46
%60 = load i32, i32* %28
%61 = add nsw i32 %60, 1
store i32 %61, i32* %28
br label %42
62: ; preds = %42
%63 = load i8*, i8** %12
%64 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @get_dimlen to i32 (i8*, i8*, ...)*)(i8* %63, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
store i32 %64, i32* %27
store i32 0, i32* %28
br label %65
65: ; preds = %729, %62
%66 = load i32, i32* %28
%67 = load i32, i32* %27
%68 = icmp slt i32 %66, %67
br i1 %68, label %69, label %732
69: ; preds = %65
%70 = load i8*, i8** %12
%71 = getelementptr inbounds [255 x i8], [255 x i8]* %23, i64 0, i64 0
%72 = call i32 (i8*, i8*, i8*, i32*, ...) bitcast (i32 (...)* @get_string_data_level to i32 (i8*, i8*, i8*, i32*, ...)*)(i8* %70, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %71, i32* %28)
%73 = getelementptr inbounds [255 x i8], [255 x i8]* %23, i64 0, i64 0
%74 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 0
%75 = call i32 (i8*, i8*, i32, i32, [255 x i8]*, i32*, ...) bitcast (i32 (...)* @tokenize to i32 (i8*, i8*, i32, i32, [255 x i8]*, i32*, ...)*)(i8* %73, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 255, i32 40, [255 x i8]* %74, i32* %31)
%76 = load i32, i32* %31
%77 = icmp ne i32 %76, 4
br i1 %77, label %78, label %80
78: ; preds = %69
%79 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.5, i64 0, i64 0))
br label %80
80: ; preds = %78, %69
store i32 0, i32* %32
store i32 0, i32* %29
br label %81
81: ; preds = %103, %80
%82 = load i32, i32* %29
%83 = load i32, i32* %26
%84 = icmp slt i32 %82, %83
br i1 %84, label %85, label %106
85: ; preds = %81
%86 = load i8**, i8*** %24
%87 = load i32, i32* %29
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i8*, i8** %86, i64 %88
%90 = load i8*, i8** %89
%91 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 1
%92 = getelementptr inbounds [255 x i8], [255 x i8]* %91, i64 0, i64 0
%93 = call i32 @strcmp(i8* %90, i8* %92)
%94 = icmp eq i32 %93, 0
br i1 %94, label %95, label %102
95: ; preds = %85
store i32 1, i32* %32
%96 = load i32, i32* %29
%97 = add nsw i32 %96, 1
%98 = load i32*, i32** %13
%99 = load i32, i32* %28
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i32, i32* %98, i64 %100
store i32 %97, i32* %101
br label %106
102: ; preds = %85
br label %103
103: ; preds = %102
%104 = load i32, i32* %29
%105 = add nsw i32 %104, 1
store i32 %105, i32* %29
br label %81
106: ; preds = %95, %81
%107 = load i32, i32* %32
%108 = icmp ne i32 %107, 0
br i1 %108, label %111, label %109
109: ; preds = %106
%110 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.6, i64 0, i64 0))
br label %111
111: ; preds = %109, %106
store i32 0, i32* %32
store i32 0, i32* %29
br label %112
112: ; preds = %134, %111
%113 = load i32, i32* %29
%114 = load i32, i32* %26
%115 = icmp slt i32 %113, %114
br i1 %115, label %116, label %137
116: ; preds = %112
%117 = load i8**, i8*** %24
%118 = load i32, i32* %29
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds i8*, i8** %117, i64 %119
%121 = load i8*, i8** %120
%122 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 3
%123 = getelementptr inbounds [255 x i8], [255 x i8]* %122, i64 0, i64 0
%124 = call i32 @strcmp(i8* %121, i8* %123)
%125 = icmp eq i32 %124, 0
br i1 %125, label %126, label %133
126: ; preds = %116
store i32 1, i32* %32
%127 = load i32, i32* %29
%128 = add nsw i32 %127, 1
%129 = load i32*, i32** %14
%130 = load i32, i32* %28
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds i32, i32* %129, i64 %131
store i32 %128, i32* %132
br label %137
133: ; preds = %116
br label %134
134: ; preds = %133
%135 = load i32, i32* %29
%136 = add nsw i32 %135, 1
store i32 %136, i32* %29
br label %112
137: ; preds = %126, %112
%138 = load i32, i32* %32
%139 = icmp ne i32 %138, 0
br i1 %139, label %142, label %140
140: ; preds = %137
%141 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.7, i64 0, i64 0))
br label %142
142: ; preds = %140, %137
%143 = load i8*, i8** %12
%144 = getelementptr inbounds [255 x i8], [255 x i8]* %23, i64 0, i64 0
%145 = call i32 (i8*, i8*, i8*, i32*, ...) bitcast (i32 (...)* @get_string_data_level to i32 (i8*, i8*, i8*, i32*, ...)*)(i8* %143, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* %144, i32* %28)
%146 = getelementptr inbounds [255 x i8], [255 x i8]* %23, i64 0, i64 0
%147 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 0
%148 = call i32 (i8*, i8*, i32, i32, [255 x i8]*, i32*, ...) bitcast (i32 (...)* @tokenize to i32 (i8*, i8*, i32, i32, [255 x i8]*, i32*, ...)*)(i8* %146, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 255, i32 40, [255 x i8]* %147, i32* %31)
%149 = load i32, i32* %31
%150 = icmp ne i32 %149, 8
br i1 %150, label %151, label %153
151: ; preds = %142
%152 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.10, i64 0, i64 0))
br label %153
153: ; preds = %151, %142
store i32 0, i32* %29
br label %154
154: ; preds = %195, %153
%155 = load i32, i32* %29
%156 = load i32, i32* %31
%157 = icmp slt i32 %155, %156
br i1 %157, label %158, label %198
158: ; preds = %154
store i32 0, i32* %30
br label %159
159: ; preds = %191, %158
%160 = load i32, i32* %30
%161 = sext i32 %160 to i64
%162 = load i32, i32* %29
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 %163
%165 = getelementptr inbounds [255 x i8], [255 x i8]* %164, i64 0, i64 0
%166 = call i64 @strlen(i8* %165)
%167 = icmp ult i64 %161, %166
br i1 %167, label %168, label %194
168: ; preds = %159
%169 = load i32, i32* %29
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 %170
%172 = load i32, i32* %30
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds [255 x i8], [255 x i8]* %171, i64 0, i64 %173
%175 = load i8, i8* %174
%176 = sext i8 %175 to i32
%177 = icmp sgt i32 %176, 57
br i1 %177, label %188, label %178
178: ; preds = %168
%179 = load i32, i32* %29
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 %180
%182 = load i32, i32* %30
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds [255 x i8], [255 x i8]* %181, i64 0, i64 %183
%185 = load i8, i8* %184
%186 = sext i8 %185 to i32
%187 = icmp slt i32 %186, 48
br i1 %187, label %188, label %190
188: ; preds = %178, %168
%189 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str.11, i64 0, i64 0))
br label %190
190: ; preds = %188, %178
br label %191
191: ; preds = %190
%192 = load i32, i32* %30
%193 = add nsw i32 %192, 1
store i32 %193, i32* %30
br label %159
194: ; preds = %159
br label %195
195: ; preds = %194
%196 = load i32, i32* %29
%197 = add nsw i32 %196, 1
store i32 %197, i32* %29
br label %154
198: ; preds = %154
%199 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 0
%200 = getelementptr inbounds [255 x i8], [255 x i8]* %199, i64 0, i64 0
%201 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %200)
%202 = load i32*, i32** %15
%203 = load i32, i32* %28
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds i32, i32* %202, i64 %204
store i32 %201, i32* %205
%206 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 1
%207 = getelementptr inbounds [255 x i8], [255 x i8]* %206, i64 0, i64 0
%208 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %207)
%209 = load i32*, i32** %16
%210 = load i32, i32* %28
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds i32, i32* %209, i64 %211
store i32 %208, i32* %212
%213 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 2
%214 = getelementptr inbounds [255 x i8], [255 x i8]* %213, i64 0, i64 0
%215 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %214)
%216 = load i32*, i32** %17
%217 = load i32, i32* %28
%218 = sext i32 %217 to i64
%219 = getelementptr inbounds i32, i32* %216, i64 %218
store i32 %215, i32* %219
%220 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 3
%221 = getelementptr inbounds [255 x i8], [255 x i8]* %220, i64 0, i64 0
%222 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %221)
%223 = load i32*, i32** %18
%224 = load i32, i32* %28
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds i32, i32* %223, i64 %225
store i32 %222, i32* %226
%227 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 4
%228 = getelementptr inbounds [255 x i8], [255 x i8]* %227, i64 0, i64 0
%229 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %228)
%230 = load i32*, i32** %19
%231 = load i32, i32* %28
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds i32, i32* %230, i64 %232
store i32 %229, i32* %233
%234 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 5
%235 = getelementptr inbounds [255 x i8], [255 x i8]* %234, i64 0, i64 0
%236 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %235)
%237 = load i32*, i32** %20
%238 = load i32, i32* %28
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds i32, i32* %237, i64 %239
store i32 %236, i32* %240
%241 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 6
%242 = getelementptr inbounds [255 x i8], [255 x i8]* %241, i64 0, i64 0
%243 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %242)
%244 = load i32*, i32** %21
%245 = load i32, i32* %28
%246 = sext i32 %245 to i64
%247 = getelementptr inbounds i32, i32* %244, i64 %246
store i32 %243, i32* %247
%248 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %25, i64 0, i64 7
%249 = getelementptr inbounds [255 x i8], [255 x i8]* %248, i64 0, i64 0
%250 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %249)
%251 = load i32*, i32** %22
%252 = load i32, i32* %28
%253 = sext i32 %252 to i64
%254 = getelementptr inbounds i32, i32* %251, i64 %253
store i32 %250, i32* %254
%255 = load i32*, i32** %15
%256 = load i32, i32* %28
%257 = sext i32 %256 to i64
%258 = getelementptr inbounds i32, i32* %255, i64 %257
%259 = load i32, i32* %258
%260 = load i32*, i32** %16
%261 = load i32, i32* %28
%262 = sext i32 %261 to i64
%263 = getelementptr inbounds i32, i32* %260, i64 %262
%264 = load i32, i32* %263
%265 = icmp eq i32 %259, %264
br i1 %265, label %266, label %371
266: ; preds = %198
%267 = load i32*, i32** %15
%268 = load i32, i32* %28
%269 = sext i32 %268 to i64
%270 = getelementptr inbounds i32, i32* %267, i64 %269
%271 = load i32, i32* %270
%272 = add nsw i32 %271, 1
%273 = sdiv i32 %272, 2
%274 = sub nsw i32 %273, 1
%275 = load i32*, i32** %15
%276 = load i32, i32* %28
%277 = sext i32 %276 to i64
%278 = getelementptr inbounds i32, i32* %275, i64 %277
store i32 %274, i32* %278
%279 = load i32*, i32** %15
%280 = load i32, i32* %28
%281 = sext i32 %280 to i64
%282 = getelementptr inbounds i32, i32* %279, i64 %281
%283 = load i32, i32* %282
%284 = load i32*, i32** %16
%285 = load i32, i32* %28
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds i32, i32* %284, i64 %286
store i32 %283, i32* %287
%288 = load i32*, i32** %18
%289 = load i32, i32* %28
%290 = sext i32 %289 to i64
%291 = getelementptr inbounds i32, i32* %288, i64 %290
%292 = load i32, i32* %291
%293 = load i32*, i32** %17
%294 = load i32, i32* %28
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds i32, i32* %293, i64 %295
%297 = load i32, i32* %296
%298 = icmp sgt i32 %292, %297
br i1 %298, label %299, label %312
299: ; preds = %266
%300 = load i32*, i32** %17
%301 = load i32, i32* %28
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds i32, i32* %300, i64 %302
%304 = load i32, i32* %303
%305 = sub nsw i32 %304, 1
store i32 %305, i32* %303
%306 = load i32*, i32** %18
%307 = load i32, i32* %28
%308 = sext i32 %307 to i64
%309 = getelementptr inbounds i32, i32* %306, i64 %308
%310 = load i32, i32* %309
%311 = sub nsw i32 %310, 2
store i32 %311, i32* %309
br label %340
312: ; preds = %266
%313 = load i32*, i32** %18
%314 = load i32, i32* %28
%315 = sext i32 %314 to i64
%316 = getelementptr inbounds i32, i32* %313, i64 %315
%317 = load i32, i32* %316
%318 = load i32*, i32** %17
%319 = load i32, i32* %28
%320 = sext i32 %319 to i64
%321 = getelementptr inbounds i32, i32* %318, i64 %320
%322 = load i32, i32* %321
%323 = icmp slt i32 %317, %322
br i1 %323, label %324, label %337
324: ; preds = %312
%325 = load i32*, i32** %17
%326 = load i32, i32* %28
%327 = sext i32 %326 to i64
%328 = getelementptr inbounds i32, i32* %325, i64 %327
%329 = load i32, i32* %328
%330 = sub nsw i32 %329, 2
store i32 %330, i32* %328
%331 = load i32*, i32** %18
%332 = load i32, i32* %28
%333 = sext i32 %332 to i64
%334 = getelementptr inbounds i32, i32* %331, i64 %333
%335 = load i32, i32* %334
%336 = sub nsw i32 %335, 1
store i32 %336, i32* %334
br label %339
337: ; preds = %312
%338 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.12, i64 0, i64 0))
br label %339
339: ; preds = %337, %324
br label %340
340: ; preds = %339, %299
%341 = load i32*, i32** %17
%342 = load i32, i32* %28
%343 = sext i32 %342 to i64
%344 = getelementptr inbounds i32, i32* %341, i64 %343
%345 = load i32, i32* %344
%346 = srem i32 %345, 2
%347 = icmp ne i32 %346, 0
br i1 %347, label %356, label %348
348: ; preds = %340
%349 = load i32*, i32** %18
%350 = load i32, i32* %28
%351 = sext i32 %350 to i64
%352 = getelementptr inbounds i32, i32* %349, i64 %351
%353 = load i32, i32* %352
%354 = srem i32 %353, 2
%355 = icmp ne i32 %354, 0
br i1 %355, label %356, label %358
356: ; preds = %348, %340
%357 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.13, i64 0, i64 0))
br label %358
358: ; preds = %356, %348
%359 = load i32*, i32** %17
%360 = load i32, i32* %28
%361 = sext i32 %360 to i64
%362 = getelementptr inbounds i32, i32* %359, i64 %361
%363 = load i32, i32* %362
%364 = sdiv i32 %363, 2
store i32 %364, i32* %362
%365 = load i32*, i32** %18
%366 = load i32, i32* %28
%367 = sext i32 %366 to i64
%368 = getelementptr inbounds i32, i32* %365, i64 %367
%369 = load i32, i32* %368
%370 = sdiv i32 %369, 2
store i32 %370, i32* %368
br label %491
371: ; preds = %198
%372 = load i32*, i32** %17
%373 = load i32, i32* %28
%374 = sext i32 %373 to i64
%375 = getelementptr inbounds i32, i32* %372, i64 %374
%376 = load i32, i32* %375
%377 = load i32*, i32** %18
%378 = load i32, i32* %28
%379 = sext i32 %378 to i64
%380 = getelementptr inbounds i32, i32* %377, i64 %379
%381 = load i32, i32* %380
%382 = icmp eq i32 %376, %381
br i1 %382, label %383, label %488
383: ; preds = %371
%384 = load i32*, i32** %17
%385 = load i32, i32* %28
%386 = sext i32 %385 to i64
%387 = getelementptr inbounds i32, i32* %384, i64 %386
%388 = load i32, i32* %387
%389 = add nsw i32 %388, 1
%390 = sdiv i32 %389, 2
%391 = sub nsw i32 %390, 1
%392 = load i32*, i32** %17
%393 = load i32, i32* %28
%394 = sext i32 %393 to i64
%395 = getelementptr inbounds i32, i32* %392, i64 %394
store i32 %391, i32* %395
%396 = load i32*, i32** %17
%397 = load i32, i32* %28
%398 = sext i32 %397 to i64
%399 = getelementptr inbounds i32, i32* %396, i64 %398
%400 = load i32, i32* %399
%401 = load i32*, i32** %18
%402 = load i32, i32* %28
%403 = sext i32 %402 to i64
%404 = getelementptr inbounds i32, i32* %401, i64 %403
store i32 %400, i32* %404
%405 = load i32*, i32** %16
%406 = load i32, i32* %28
%407 = sext i32 %406 to i64
%408 = getelementptr inbounds i32, i32* %405, i64 %407
%409 = load i32, i32* %408
%410 = load i32*, i32** %15
%411 = load i32, i32* %28
%412 = sext i32 %411 to i64
%413 = getelementptr inbounds i32, i32* %410, i64 %412
%414 = load i32, i32* %413
%415 = icmp sgt i32 %409, %414
br i1 %415, label %416, label %429
416: ; preds = %383
%417 = load i32*, i32** %15
%418 = load i32, i32* %28
%419 = sext i32 %418 to i64
%420 = getelementptr inbounds i32, i32* %417, i64 %419
%421 = load i32, i32* %420
%422 = sub nsw i32 %421, 1
store i32 %422, i32* %420
%423 = load i32*, i32** %16
%424 = load i32, i32* %28
%425 = sext i32 %424 to i64
%426 = getelementptr inbounds i32, i32* %423, i64 %425
%427 = load i32, i32* %426
%428 = sub nsw i32 %427, 2
store i32 %428, i32* %426
br label %457
429: ; preds = %383
%430 = load i32*, i32** %15
%431 = load i32, i32* %28
%432 = sext i32 %431 to i64
%433 = getelementptr inbounds i32, i32* %430, i64 %432
%434 = load i32, i32* %433
%435 = load i32*, i32** %16
%436 = load i32, i32* %28
%437 = sext i32 %436 to i64
%438 = getelementptr inbounds i32, i32* %435, i64 %437
%439 = load i32, i32* %438
%440 = icmp sgt i32 %434, %439
br i1 %440, label %441, label %454
441: ; preds = %429
%442 = load i32*, i32** %15
%443 = load i32, i32* %28
%444 = sext i32 %443 to i64
%445 = getelementptr inbounds i32, i32* %442, i64 %444
%446 = load i32, i32* %445
%447 = sub nsw i32 %446, 2
store i32 %447, i32* %445
%448 = load i32*, i32** %16
%449 = load i32, i32* %28
%450 = sext i32 %449 to i64
%451 = getelementptr inbounds i32, i32* %448, i64 %450
%452 = load i32, i32* %451
%453 = sub nsw i32 %452, 1
store i32 %453, i32* %451
br label %456
454: ; preds = %429
%455 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.14, i64 0, i64 0))
br label %456
456: ; preds = %454, %441
br label %457
457: ; preds = %456, %416
%458 = load i32*, i32** %15
%459 = load i32, i32* %28
%460 = sext i32 %459 to i64
%461 = getelementptr inbounds i32, i32* %458, i64 %460
%462 = load i32, i32* %461
%463 = srem i32 %462, 2
%464 = icmp ne i32 %463, 0
br i1 %464, label %473, label %465
465: ; preds = %457
%466 = load i32*, i32** %16
%467 = load i32, i32* %28
%468 = sext i32 %467 to i64
%469 = getelementptr inbounds i32, i32* %466, i64 %468
%470 = load i32, i32* %469
%471 = srem i32 %470, 2
%472 = icmp ne i32 %471, 0
br i1 %472, label %473, label %475
473: ; preds = %465, %457
%474 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.15, i64 0, i64 0))
br label %475
475: ; preds = %473, %465
%476 = load i32*, i32** %15
%477 = load i32, i32* %28
%478 = sext i32 %477 to i64
%479 = getelementptr inbounds i32, i32* %476, i64 %478
%480 = load i32, i32* %479
%481 = sdiv i32 %480, 2
store i32 %481, i32* %479
%482 = load i32*, i32** %16
%483 = load i32, i32* %28
%484 = sext i32 %483 to i64
%485 = getelementptr inbounds i32, i32* %482, i64 %484
%486 = load i32, i32* %485
%487 = sdiv i32 %486, 2
store i32 %487, i32* %485
br label %490
488: ; preds = %371
%489 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.16, i64 0, i64 0))
br label %490
490: ; preds = %488, %475
br label %491
491: ; preds = %490, %358
%492 = load i32*, i32** %19
%493 = load i32, i32* %28
%494 = sext i32 %493 to i64
%495 = getelementptr inbounds i32, i32* %492, i64 %494
%496 = load i32, i32* %495
%497 = load i32*, i32** %20
%498 = load i32, i32* %28
%499 = sext i32 %498 to i64
%500 = getelementptr inbounds i32, i32* %497, i64 %499
%501 = load i32, i32* %500
%502 = icmp eq i32 %496, %501
br i1 %502, label %503, label %608
503: ; preds = %491
%504 = load i32*, i32** %19
%505 = load i32, i32* %28
%506 = sext i32 %505 to i64
%507 = getelementptr inbounds i32, i32* %504, i64 %506
%508 = load i32, i32* %507
%509 = add nsw i32 %508, 1
%510 = sdiv i32 %509, 2
%511 = sub nsw i32 %510, 1
%512 = load i32*, i32** %19
%513 = load i32, i32* %28
%514 = sext i32 %513 to i64
%515 = getelementptr inbounds i32, i32* %512, i64 %514
store i32 %511, i32* %515
%516 = load i32*, i32** %19
%517 = load i32, i32* %28
%518 = sext i32 %517 to i64
%519 = getelementptr inbounds i32, i32* %516, i64 %518
%520 = load i32, i32* %519
%521 = load i32*, i32** %20
%522 = load i32, i32* %28
%523 = sext i32 %522 to i64
%524 = getelementptr inbounds i32, i32* %521, i64 %523
store i32 %520, i32* %524
%525 = load i32*, i32** %22
%526 = load i32, i32* %28
%527 = sext i32 %526 to i64
%528 = getelementptr inbounds i32, i32* %525, i64 %527
%529 = load i32, i32* %528
%530 = load i32*, i32** %21
%531 = load i32, i32* %28
%532 = sext i32 %531 to i64
%533 = getelementptr inbounds i32, i32* %530, i64 %532
%534 = load i32, i32* %533
%535 = icmp sgt i32 %529, %534
br i1 %535, label %536, label %549
536: ; preds = %503
%537 = load i32*, i32** %21
%538 = load i32, i32* %28
%539 = sext i32 %538 to i64
%540 = getelementptr inbounds i32, i32* %537, i64 %539
%541 = load i32, i32* %540
%542 = sub nsw i32 %541, 1
store i32 %542, i32* %540
%543 = load i32*, i32** %22
%544 = load i32, i32* %28
%545 = sext i32 %544 to i64
%546 = getelementptr inbounds i32, i32* %543, i64 %545
%547 = load i32, i32* %546
%548 = sub nsw i32 %547, 2
store i32 %548, i32* %546
br label %577
549: ; preds = %503
%550 = load i32*, i32** %21
%551 = load i32, i32* %28
%552 = sext i32 %551 to i64
%553 = getelementptr inbounds i32, i32* %550, i64 %552
%554 = load i32, i32* %553
%555 = load i32*, i32** %22
%556 = load i32, i32* %28
%557 = sext i32 %556 to i64
%558 = getelementptr inbounds i32, i32* %555, i64 %557
%559 = load i32, i32* %558
%560 = icmp sgt i32 %554, %559
br i1 %560, label %561, label %574
561: ; preds = %549
%562 = load i32*, i32** %21
%563 = load i32, i32* %28
%564 = sext i32 %563 to i64
%565 = getelementptr inbounds i32, i32* %562, i64 %564
%566 = load i32, i32* %565
%567 = sub nsw i32 %566, 2
store i32 %567, i32* %565
%568 = load i32*, i32** %22
%569 = load i32, i32* %28
%570 = sext i32 %569 to i64
%571 = getelementptr inbounds i32, i32* %568, i64 %570
%572 = load i32, i32* %571
%573 = sub nsw i32 %572, 1
store i32 %573, i32* %571
br label %576
574: ; preds = %549
%575 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.17, i64 0, i64 0))
br label %576
576: ; preds = %574, %561
br label %577
577: ; preds = %576, %536
%578 = load i32*, i32** %21
%579 = load i32, i32* %28
%580 = sext i32 %579 to i64
%581 = getelementptr inbounds i32, i32* %578, i64 %580
%582 = load i32, i32* %581
%583 = srem i32 %582, 2
%584 = icmp ne i32 %583, 0
br i1 %584, label %593, label %585
585: ; preds = %577
%586 = load i32*, i32** %22
%587 = load i32, i32* %28
%588 = sext i32 %587 to i64
%589 = getelementptr inbounds i32, i32* %586, i64 %588
%590 = load i32, i32* %589
%591 = srem i32 %590, 2
%592 = icmp ne i32 %591, 0
br i1 %592, label %593, label %595
593: ; preds = %585, %577
%594 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.18, i64 0, i64 0))
br label %595
595: ; preds = %593, %585
%596 = load i32*, i32** %21
%597 = load i32, i32* %28
%598 = sext i32 %597 to i64
%599 = getelementptr inbounds i32, i32* %596, i64 %598
%600 = load i32, i32* %599
%601 = sdiv i32 %600, 2
store i32 %601, i32* %599
%602 = load i32*, i32** %22
%603 = load i32, i32* %28
%604 = sext i32 %603 to i64
%605 = getelementptr inbounds i32, i32* %602, i64 %604
%606 = load i32, i32* %605
%607 = sdiv i32 %606, 2
store i32 %607, i32* %605
br label %728
608: ; preds = %491
%609 = load i32*, i32** %21
%610 = load i32, i32* %28
%611 = sext i32 %610 to i64
%612 = getelementptr inbounds i32, i32* %609, i64 %611
%613 = load i32, i32* %612
%614 = load i32*, i32** %22
%615 = load i32, i32* %28
%616 = sext i32 %615 to i64
%617 = getelementptr inbounds i32, i32* %614, i64 %616
%618 = load i32, i32* %617
%619 = icmp eq i32 %613, %618
br i1 %619, label %620, label %725
620: ; preds = %608
%621 = load i32*, i32** %21
%622 = load i32, i32* %28
%623 = sext i32 %622 to i64
%624 = getelementptr inbounds i32, i32* %621, i64 %623
%625 = load i32, i32* %624
%626 = add nsw i32 %625, 1
%627 = sdiv i32 %626, 2
%628 = sub nsw i32 %627, 1
%629 = load i32*, i32** %21
%630 = load i32, i32* %28
%631 = sext i32 %630 to i64
%632 = getelementptr inbounds i32, i32* %629, i64 %631
store i32 %628, i32* %632
%633 = load i32*, i32** %21
%634 = load i32, i32* %28
%635 = sext i32 %634 to i64
%636 = getelementptr inbounds i32, i32* %633, i64 %635
%637 = load i32, i32* %636
%638 = load i32*, i32** %22
%639 = load i32, i32* %28
%640 = sext i32 %639 to i64
%641 = getelementptr inbounds i32, i32* %638, i64 %640
store i32 %637, i32* %641
%642 = load i32*, i32** %20
%643 = load i32, i32* %28
%644 = sext i32 %643 to i64
%645 = getelementptr inbounds i32, i32* %642, i64 %644
%646 = load i32, i32* %645
%647 = load i32*, i32** %19
%648 = load i32, i32* %28
%649 = sext i32 %648 to i64
%650 = getelementptr inbounds i32, i32* %647, i64 %649
%651 = load i32, i32* %650
%652 = icmp sgt i32 %646, %651
br i1 %652, label %653, label %666
653: ; preds = %620
%654 = load i32*, i32** %19
%655 = load i32, i32* %28
%656 = sext i32 %655 to i64
%657 = getelementptr inbounds i32, i32* %654, i64 %656
%658 = load i32, i32* %657
%659 = sub nsw i32 %658, 1
store i32 %659, i32* %657
%660 = load i32*, i32** %20
%661 = load i32, i32* %28
%662 = sext i32 %661 to i64
%663 = getelementptr inbounds i32, i32* %660, i64 %662
%664 = load i32, i32* %663
%665 = sub nsw i32 %664, 2
store i32 %665, i32* %663
br label %694
666: ; preds = %620
%667 = load i32*, i32** %19
%668 = load i32, i32* %28
%669 = sext i32 %668 to i64
%670 = getelementptr inbounds i32, i32* %667, i64 %669
%671 = load i32, i32* %670
%672 = load i32*, i32** %20
%673 = load i32, i32* %28
%674 = sext i32 %673 to i64
%675 = getelementptr inbounds i32, i32* %672, i64 %674
%676 = load i32, i32* %675
%677 = icmp sgt i32 %671, %676
br i1 %677, label %678, label %691
678: ; preds = %666
%679 = load i32*, i32** %19
%680 = load i32, i32* %28
%681 = sext i32 %680 to i64
%682 = getelementptr inbounds i32, i32* %679, i64 %681
%683 = load i32, i32* %682
%684 = sub nsw i32 %683, 2
store i32 %684, i32* %682
%685 = load i32*, i32** %20
%686 = load i32, i32* %28
%687 = sext i32 %686 to i64
%688 = getelementptr inbounds i32, i32* %685, i64 %687
%689 = load i32, i32* %688
%690 = sub nsw i32 %689, 1
store i32 %690, i32* %688
br label %693
691: ; preds = %666
%692 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.19, i64 0, i64 0))
br label %693
693: ; preds = %691, %678
br label %694
694: ; preds = %693, %653
%695 = load i32*, i32** %19
%696 = load i32, i32* %28
%697 = sext i32 %696 to i64
%698 = getelementptr inbounds i32, i32* %695, i64 %697
%699 = load i32, i32* %698
%700 = srem i32 %699, 2
%701 = icmp ne i32 %700, 0
br i1 %701, label %710, label %702
702: ; preds = %694
%703 = load i32*, i32** %20
%704 = load i32, i32* %28
%705 = sext i32 %704 to i64
%706 = getelementptr inbounds i32, i32* %703, i64 %705
%707 = load i32, i32* %706
%708 = srem i32 %707, 2
%709 = icmp ne i32 %708, 0
br i1 %709, label %710, label %712
710: ; preds = %702, %694
%711 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.20, i64 0, i64 0))
br label %712
712: ; preds = %710, %702
%713 = load i32*, i32** %19
%714 = load i32, i32* %28
%715 = sext i32 %714 to i64
%716 = getelementptr inbounds i32, i32* %713, i64 %715
%717 = load i32, i32* %716
%718 = sdiv i32 %717, 2
store i32 %718, i32* %716
%719 = load i32*, i32** %20
%720 = load i32, i32* %28
%721 = sext i32 %720 to i64
%722 = getelementptr inbounds i32, i32* %719, i64 %721
%723 = load i32, i32* %722
%724 = sdiv i32 %723, 2
store i32 %724, i32* %722
br label %727
725: ; preds = %608
%726 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.16, i64 0, i64 0))
br label %727
727: ; preds = %725, %712
br label %728
728: ; preds = %727, %595
br label %729
729: ; preds = %728
%730 = load i32, i32* %28
%731 = add nsw i32 %730, 1
store i32 %731, i32* %28
br label %65
732: ; preds = %65
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"ntiles\00"
@.str.1 = [10 x i8] c"gridtiles\00"
@.str.2 = [9 x i8] c"ncontact\00"
@.str.3 = [9 x i8] c"contacts\00"
@.str.4 = [2 x i8] c":\00"
@.str.5 = [84 x i8] c"Error from read_mosaic: number of elements in contact seperated by :/:: should be 4\00"
@.str.6 = [91 x i8] c"error from read_mosaic: the first tile name specified in contact is not found in tile list\00"
@.str.7 = [92 x i8] c"error from read_mosaic: the second tile name specified in contact is not found in tile list\00"
@.str.8 = [14 x i8] c"contact_index\00"
@.str.9 = [3 x i8] c":,\00"
@.str.10 = [89 x i8] c"Error from read_mosaic: number of elements in contact_index seperated by :/, should be 8\00"
@.str.11 = [98 x i8] c"Error from read_mosaic: some of the character in contact_indices except token is not digit number\00"
@.str.12 = [89 x i8] c"Error from read_mosaic_contact: jstart1 and jend1 should not be equal when istart1=iend1\00"
@.str.13 = [95 x i8] c"Error from read_mosaic_contact: mismatch between y_refine and jstart1/jend1 when istart1=iend1\00"
@.str.14 = [89 x i8] c"Error from read_mosaic_contact: istart1 and iend1 should not be equal when jstart1=jend1\00"
@.str.15 = [95 x i8] c"Error from read_mosaic_contact: mismatch between x_refine and istart1/iend1 when jstart1=jend1\00"
@.str.16 = [86 x i8] c"Error from read_mosaic_contact: only line contact is supported now, contact developer\00"
@.str.17 = [89 x i8] c"Error from read_mosaic_contact: jstart2 and jend2 should not be equal when istart2=iend2\00"
@.str.18 = [95 x i8] c"Error from read_mosaic_contact: mismatch between y_refine and jstart2/jend2 when istart2=iend2\00"
@.str.19 = [89 x i8] c"Error from read_mosaic_contact: istart2 and iend2 should not be equal when jstart2=jend2\00"
@.str.20 = [95 x i8] c"Error from read_mosaic_contact: mismatch between x_refine and istart2/iend2 when jstart2=jend2\00"
define void @read_mosaic_contact(i8* %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5, i32* nocapture %6, i32* nocapture %7, i32* nocapture %8, i32* nocapture %9, i32* nocapture %10) {
%12 = alloca [255 x i8]
%13 = alloca [40 x [255 x i8]]
%14 = alloca i32
%15 = alloca i32
%16 = getelementptr inbounds [255 x i8], [255 x i8]* %12, i64 0, i64 0
%17 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %13, i64 0, i64 0, i64 0
%18 = bitcast i32* %14 to i8*
%19 = bitcast i32* %15 to i8*
%20 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @get_dimlen to i32 (i8*, i8*, ...)*)(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%21 = sext i32 %20 to i64
%22 = shl nsw i64 %21, 3
%23 = tail call i8* @malloc(i64 %22)
%24 = bitcast i8* %23 to i8**
store i32 0, i32* %14
%25 = icmp sgt i32 %20, 0
br i1 %25, label %26, label %35
26: ; preds = %11, %26
%27 = phi i32 [ %33, %26 ], [ 0, %11 ]
%28 = call dereferenceable_or_null(255) i8* @malloc(i64 255)
%29 = sext i32 %27 to i64
%30 = getelementptr inbounds i8*, i8** %24, i64 %29
store i8* %28, i8** %30
%31 = call i32 (i8*, i8*, i8*, i32*, ...) bitcast (i32 (...)* @get_string_data_level to i32 (i8*, i8*, i8*, i32*, ...)*)(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %28, i32* %14)
%32 = load i32, i32* %14
%33 = add nsw i32 %32, 1
store i32 %33, i32* %14
%34 = icmp slt i32 %33, %20
br i1 %34, label %26, label %35
35: ; preds = %26, %11
%36 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @get_dimlen to i32 (i8*, i8*, ...)*)(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %14
%37 = icmp sgt i32 %36, 0
br i1 %37, label %38, label %401
38: ; preds = %35
%39 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %13, i64 0, i64 0
%40 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %13, i64 0, i64 1, i64 0
%41 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %13, i64 0, i64 3, i64 0
%42 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %13, i64 0, i64 2, i64 0
%43 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %13, i64 0, i64 4, i64 0
%44 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %13, i64 0, i64 5, i64 0
%45 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %13, i64 0, i64 6, i64 0
%46 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %13, i64 0, i64 7, i64 0
%47 = zext i32 %20 to i64
%48 = zext i32 %20 to i64
br label %49
49: ; preds = %38, %397
%50 = call i32 (i8*, i8*, i8*, i32*, ...) bitcast (i32 (...)* @get_string_data_level to i32 (i8*, i8*, i8*, i32*, ...)*)(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %16, i32* %14)
%51 = call i32 (i8*, i8*, i32, i32, [255 x i8]*, i32*, ...) bitcast (i32 (...)* @tokenize to i32 (i8*, i8*, i32, i32, [255 x i8]*, i32*, ...)*)(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 255, i32 40, [255 x i8]* %39, i32* %15)
%52 = load i32, i32* %15
%53 = icmp eq i32 %52, 4
br i1 %53, label %56, label %54
54: ; preds = %49
%55 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.5, i64 0, i64 0))
br label %56
56: ; preds = %54, %49
br i1 %25, label %57, label %72
57: ; preds = %56, %69
%58 = phi i64 [ %70, %69 ], [ 0, %56 ]
%59 = getelementptr inbounds i8*, i8** %24, i64 %58
%60 = load i8*, i8** %59
%61 = call i32 @strcmp(i8* dereferenceable(1) %60, i8* %40)
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %69
63: ; preds = %57
%64 = trunc i64 %58 to i32
%65 = add nuw nsw i32 %64, 1
%66 = load i32, i32* %14
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i32, i32* %1, i64 %67
store i32 %65, i32* %68
br label %74
69: ; preds = %57
%70 = add nuw nsw i64 %58, 1
%71 = icmp eq i64 %70, %47
br i1 %71, label %72, label %57
72: ; preds = %69, %56
%73 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.6, i64 0, i64 0))
br label %74
74: ; preds = %63, %72
br i1 %25, label %75, label %90
75: ; preds = %74, %87
%76 = phi i64 [ %88, %87 ], [ 0, %74 ]
%77 = getelementptr inbounds i8*, i8** %24, i64 %76
%78 = load i8*, i8** %77
%79 = call i32 @strcmp(i8* dereferenceable(1) %78, i8* %41)
%80 = icmp eq i32 %79, 0
br i1 %80, label %81, label %87
81: ; preds = %75
%82 = trunc i64 %76 to i32
%83 = add nuw nsw i32 %82, 1
%84 = load i32, i32* %14
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i32, i32* %2, i64 %85
store i32 %83, i32* %86
br label %92
87: ; preds = %75
%88 = add nuw nsw i64 %76, 1
%89 = icmp eq i64 %88, %48
br i1 %89, label %90, label %75
90: ; preds = %87, %74
%91 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.7, i64 0, i64 0))
br label %92
92: ; preds = %81, %90
%93 = call i32 (i8*, i8*, i8*, i32*, ...) bitcast (i32 (...)* @get_string_data_level to i32 (i8*, i8*, i8*, i32*, ...)*)(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* %16, i32* %14)
%94 = call i32 (i8*, i8*, i32, i32, [255 x i8]*, i32*, ...) bitcast (i32 (...)* @tokenize to i32 (i8*, i8*, i32, i32, [255 x i8]*, i32*, ...)*)(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 255, i32 40, [255 x i8]* %39, i32* %15)
%95 = load i32, i32* %15
%96 = icmp eq i32 %95, 8
br i1 %96, label %101, label %97
97: ; preds = %92
%98 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.10, i64 0, i64 0))
%99 = load i32, i32* %15
%100 = icmp sgt i32 %99, 0
br i1 %100, label %101, label %128
101: ; preds = %92, %97
%102 = phi i32 [ 8, %92 ], [ %99, %97 ]
br label %103
103: ; preds = %101, %123
%104 = phi i32 [ %124, %123 ], [ %102, %101 ]
%105 = phi i64 [ %125, %123 ], [ 0, %101 ]
%106 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %13, i64 0, i64 %105, i64 0
%107 = call i64 @strlen(i8* %106)
%108 = icmp eq i64 %107, 0
br i1 %108, label %123, label %109
109: ; preds = %103, %117
%110 = phi i64 [ %118, %117 ], [ 0, %103 ]
%111 = getelementptr inbounds [40 x [255 x i8]], [40 x [255 x i8]]* %13, i64 0, i64 %105, i64 %110
%112 = load i8, i8* %111
%113 = add i8 %112, -58
%114 = icmp ult i8 %113, -10
br i1 %114, label %115, label %117
115: ; preds = %109
%116 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str.11, i64 0, i64 0))
br label %117
117: ; preds = %109, %115
%118 = add nuw i64 %110, 1
%119 = call i64 @strlen(i8* %106)
%120 = icmp ugt i64 %119, %118
br i1 %120, label %109, label %121
121: ; preds = %117
%122 = load i32, i32* %15
br label %123
123: ; preds = %121, %103
%124 = phi i32 [ %122, %121 ], [ %104, %103 ]
%125 = add nuw nsw i64 %105, 1
%126 = sext i32 %124 to i64
%127 = icmp slt i64 %125, %126
br i1 %127, label %103, label %128
128: ; preds = %123, %97
%129 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %17)
%130 = load i32, i32* %14
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds i32, i32* %3, i64 %131
store i32 %129, i32* %132
%133 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %40)
%134 = load i32, i32* %14
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i32, i32* %4, i64 %135
store i32 %133, i32* %136
%137 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %42)
%138 = load i32, i32* %14
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds i32, i32* %5, i64 %139
store i32 %137, i32* %140
%141 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %41)
%142 = load i32, i32* %14
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds i32, i32* %6, i64 %143
store i32 %141, i32* %144
%145 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %43)
%146 = load i32, i32* %14
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i32, i32* %7, i64 %147
store i32 %145, i32* %148
%149 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %44)
%150 = load i32, i32* %14
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds i32, i32* %8, i64 %151
store i32 %149, i32* %152
%153 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %45)
%154 = load i32, i32* %14
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds i32, i32* %9, i64 %155
store i32 %153, i32* %156
%157 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %46)
%158 = load i32, i32* %14
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds i32, i32* %10, i64 %159
store i32 %157, i32* %160
%161 = getelementptr inbounds i32, i32* %3, i64 %159
%162 = load i32, i32* %161
%163 = getelementptr inbounds i32, i32* %4, i64 %159
%164 = load i32, i32* %163
%165 = icmp eq i32 %162, %164
br i1 %165, label %166, label %218
166: ; preds = %128
%167 = add nsw i32 %162, 1
%168 = sdiv i32 %167, 2
%169 = add nsw i32 %168, -1
store i32 %169, i32* %161
store i32 %169, i32* %163
%170 = getelementptr inbounds i32, i32* %6, i64 %159
%171 = load i32, i32* %170
%172 = getelementptr inbounds i32, i32* %5, i64 %159
%173 = load i32, i32* %172
%174 = icmp sgt i32 %171, %173
br i1 %174, label %175, label %179
175: ; preds = %166
%176 = add nsw i32 %173, -1
store i32 %176, i32* %172
%177 = load i32, i32* %170
%178 = add nsw i32 %177, -2
store i32 %178, i32* %170
br label %189
179: ; preds = %166
%180 = icmp slt i32 %171, %173
br i1 %180, label %181, label %185
181: ; preds = %179
%182 = add nsw i32 %173, -2
store i32 %182, i32* %172
%183 = load i32, i32* %170
%184 = add nsw i32 %183, -1
store i32 %184, i32* %170
br label %189
185: ; preds = %179
%186 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.12, i64 0, i64 0))
%187 = load i32, i32* %14
%188 = sext i32 %187 to i64
br label %189
189: ; preds = %181, %185, %175
%190 = phi i64 [ %159, %181 ], [ %188, %185 ], [ %159, %175 ]
%191 = phi i32 [ %158, %181 ], [ %187, %185 ], [ %158, %175 ]
%192 = getelementptr inbounds i32, i32* %5, i64 %190
%193 = load i32, i32* %192
%194 = and i32 %193, 1
%195 = icmp eq i32 %194, 0
br i1 %195, label %196, label %203
196: ; preds = %189
%197 = getelementptr inbounds i32, i32* %6, i64 %190
%198 = load i32, i32* %197
%199 = and i32 %198, 1
%200 = icmp eq i32 %199, 0
br i1 %200, label %201, label %203
201: ; preds = %196
%202 = sext i32 %191 to i64
br label %209
203: ; preds = %196, %189
%204 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.13, i64 0, i64 0))
%205 = load i32, i32* %14
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds i32, i32* %5, i64 %206
%208 = load i32, i32* %207
br label %209
209: ; preds = %201, %203
%210 = phi i64 [ %202, %201 ], [ %206, %203 ]
%211 = phi i32 [ %193, %201 ], [ %208, %203 ]
%212 = phi i32 [ %191, %201 ], [ %205, %203 ]
%213 = getelementptr inbounds i32, i32* %5, i64 %210
%214 = sdiv i32 %211, 2
store i32 %214, i32* %213
%215 = getelementptr inbounds i32, i32* %6, i64 %210
%216 = load i32, i32* %215
%217 = sdiv i32 %216, 2
store i32 %217, i32* %215
br label %278
218: ; preds = %128
%219 = getelementptr inbounds i32, i32* %5, i64 %159
%220 = load i32, i32* %219
%221 = getelementptr inbounds i32, i32* %6, i64 %159
%222 = load i32, i32* %221
%223 = icmp eq i32 %220, %222
br i1 %223, label %224, label %274
224: ; preds = %218
%225 = add nsw i32 %220, 1
%226 = sdiv i32 %225, 2
%227 = add nsw i32 %226, -1
store i32 %227, i32* %219
store i32 %227, i32* %221
%228 = load i32, i32* %163
%229 = load i32, i32* %161
%230 = icmp sgt i32 %228, %229
br i1 %230, label %231, label %235
231: ; preds = %224
%232 = add nsw i32 %229, -1
store i32 %232, i32* %161
%233 = load i32, i32* %163
%234 = add nsw i32 %233, -2
store i32 %234, i32* %163
br label %245
235: ; preds = %224
%236 = icmp sgt i32 %229, %228
br i1 %236, label %237, label %241
237: ; preds = %235
%238 = add nsw i32 %229, -2
store i32 %238, i32* %161
%239 = load i32, i32* %163
%240 = add nsw i32 %239, -1
store i32 %240, i32* %163
br label %245
241: ; preds = %235
%242 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.14, i64 0, i64 0))
%243 = load i32, i32* %14
%244 = sext i32 %243 to i64
br label %245
245: ; preds = %237, %241, %231
%246 = phi i64 [ %159, %237 ], [ %244, %241 ], [ %159, %231 ]
%247 = phi i32 [ %158, %237 ], [ %243, %241 ], [ %158, %231 ]
%248 = getelementptr inbounds i32, i32* %3, i64 %246
%249 = load i32, i32* %248
%250 = and i32 %249, 1
%251 = icmp eq i32 %250, 0
br i1 %251, label %252, label %259
252: ; preds = %245
%253 = getelementptr inbounds i32, i32* %4, i64 %246
%254 = load i32, i32* %253
%255 = and i32 %254, 1
%256 = icmp eq i32 %255, 0
br i1 %256, label %257, label %259
257: ; preds = %252
%258 = sext i32 %247 to i64
br label %265
259: ; preds = %252, %245
%260 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.15, i64 0, i64 0))
%261 = load i32, i32* %14
%262 = sext i32 %261 to i64
%263 = getelementptr inbounds i32, i32* %3, i64 %262
%264 = load i32, i32* %263
br label %265
265: ; preds = %257, %259
%266 = phi i64 [ %258, %257 ], [ %262, %259 ]
%267 = phi i32 [ %249, %257 ], [ %264, %259 ]
%268 = phi i32 [ %247, %257 ], [ %261, %259 ]
%269 = getelementptr inbounds i32, i32* %3, i64 %266
%270 = sdiv i32 %267, 2
store i32 %270, i32* %269
%271 = getelementptr inbounds i32, i32* %4, i64 %266
%272 = load i32, i32* %271
%273 = sdiv i32 %272, 2
store i32 %273, i32* %271
br label %278
274: ; preds = %218
%275 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.16, i64 0, i64 0))
%276 = load i32, i32* %14
%277 = sext i32 %276 to i64
br label %278
278: ; preds = %265, %274, %209
%279 = phi i64 [ %266, %265 ], [ %277, %274 ], [ %210, %209 ]
%280 = phi i32 [ %268, %265 ], [ %276, %274 ], [ %212, %209 ]
%281 = getelementptr inbounds i32, i32* %7, i64 %279
%282 = load i32, i32* %281
%283 = getelementptr inbounds i32, i32* %8, i64 %279
%284 = load i32, i32* %283
%285 = icmp eq i32 %282, %284
br i1 %285, label %286, label %338
286: ; preds = %278
%287 = add nsw i32 %282, 1
%288 = sdiv i32 %287, 2
%289 = add nsw i32 %288, -1
store i32 %289, i32* %281
store i32 %289, i32* %283
%290 = getelementptr inbounds i32, i32* %10, i64 %279
%291 = load i32, i32* %290
%292 = getelementptr inbounds i32, i32* %9, i64 %279
%293 = load i32, i32* %292
%294 = icmp sgt i32 %291, %293
br i1 %294, label %295, label %299
295: ; preds = %286
%296 = add nsw i32 %293, -1
store i32 %296, i32* %292
%297 = load i32, i32* %290
%298 = add nsw i32 %297, -2
store i32 %298, i32* %290
br label %309
299: ; preds = %286
%300 = icmp sgt i32 %293, %291
br i1 %300, label %301, label %305
301: ; preds = %299
%302 = add nsw i32 %293, -2
store i32 %302, i32* %292
%303 = load i32, i32* %290
%304 = add nsw i32 %303, -1
store i32 %304, i32* %290
br label %309
305: ; preds = %299
%306 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.17, i64 0, i64 0))
%307 = load i32, i32* %14
%308 = sext i32 %307 to i64
br label %309
309: ; preds = %301, %305, %295
%310 = phi i64 [ %279, %301 ], [ %308, %305 ], [ %279, %295 ]
%311 = phi i32 [ %280, %301 ], [ %307, %305 ], [ %280, %295 ]
%312 = getelementptr inbounds i32, i32* %9, i64 %310
%313 = load i32, i32* %312
%314 = and i32 %313, 1
%315 = icmp eq i32 %314, 0
br i1 %315, label %316, label %323
316: ; preds = %309
%317 = getelementptr inbounds i32, i32* %10, i64 %310
%318 = load i32, i32* %317
%319 = and i32 %318, 1
%320 = icmp eq i32 %319, 0
br i1 %320, label %321, label %323
321: ; preds = %316
%322 = sext i32 %311 to i64
br label %329
323: ; preds = %316, %309
%324 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.18, i64 0, i64 0))
%325 = load i32, i32* %14
%326 = sext i32 %325 to i64
%327 = getelementptr inbounds i32, i32* %9, i64 %326
%328 = load i32, i32* %327
br label %329
329: ; preds = %321, %323
%330 = phi i64 [ %322, %321 ], [ %326, %323 ]
%331 = phi i32 [ %313, %321 ], [ %328, %323 ]
%332 = phi i32 [ %311, %321 ], [ %325, %323 ]
%333 = getelementptr inbounds i32, i32* %9, i64 %330
%334 = sdiv i32 %331, 2
store i32 %334, i32* %333
%335 = getelementptr inbounds i32, i32* %10, i64 %330
%336 = load i32, i32* %335
%337 = sdiv i32 %336, 2
store i32 %337, i32* %335
br label %397
338: ; preds = %278
%339 = getelementptr inbounds i32, i32* %9, i64 %279
%340 = load i32, i32* %339
%341 = getelementptr inbounds i32, i32* %10, i64 %279
%342 = load i32, i32* %341
%343 = icmp eq i32 %340, %342
br i1 %343, label %344, label %394
344: ; preds = %338
%345 = add nsw i32 %340, 1
%346 = sdiv i32 %345, 2
%347 = add nsw i32 %346, -1
store i32 %347, i32* %339
store i32 %347, i32* %341
%348 = load i32, i32* %283
%349 = load i32, i32* %281
%350 = icmp sgt i32 %348, %349
br i1 %350, label %351, label %355
351: ; preds = %344
%352 = add nsw i32 %349, -1
store i32 %352, i32* %281
%353 = load i32, i32* %283
%354 = add nsw i32 %353, -2
store i32 %354, i32* %283
br label %365
355: ; preds = %344
%356 = icmp sgt i32 %349, %348
br i1 %356, label %357, label %361
357: ; preds = %355
%358 = add nsw i32 %349, -2
store i32 %358, i32* %281
%359 = load i32, i32* %283
%360 = add nsw i32 %359, -1
store i32 %360, i32* %283
br label %365
361: ; preds = %355
%362 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.19, i64 0, i64 0))
%363 = load i32, i32* %14
%364 = sext i32 %363 to i64
br label %365
365: ; preds = %357, %361, %351
%366 = phi i64 [ %279, %357 ], [ %364, %361 ], [ %279, %351 ]
%367 = phi i32 [ %280, %357 ], [ %363, %361 ], [ %280, %351 ]
%368 = getelementptr inbounds i32, i32* %7, i64 %366
%369 = load i32, i32* %368
%370 = and i32 %369, 1
%371 = icmp eq i32 %370, 0
br i1 %371, label %372, label %379
372: ; preds = %365
%373 = getelementptr inbounds i32, i32* %8, i64 %366
%374 = load i32, i32* %373
%375 = and i32 %374, 1
%376 = icmp eq i32 %375, 0
br i1 %376, label %377, label %379
377: ; preds = %372
%378 = sext i32 %367 to i64
br label %385
379: ; preds = %372, %365
%380 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.20, i64 0, i64 0))
%381 = load i32, i32* %14
%382 = sext i32 %381 to i64
%383 = getelementptr inbounds i32, i32* %7, i64 %382
%384 = load i32, i32* %383
br label %385
385: ; preds = %377, %379
%386 = phi i64 [ %378, %377 ], [ %382, %379 ]
%387 = phi i32 [ %369, %377 ], [ %384, %379 ]
%388 = phi i32 [ %367, %377 ], [ %381, %379 ]
%389 = getelementptr inbounds i32, i32* %7, i64 %386
%390 = sdiv i32 %387, 2
store i32 %390, i32* %389
%391 = getelementptr inbounds i32, i32* %8, i64 %386
%392 = load i32, i32* %391
%393 = sdiv i32 %392, 2
store i32 %393, i32* %391
br label %397
394: ; preds = %338
%395 = call i32 (i8*, ...) bitcast (i32 (...)* @error_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.16, i64 0, i64 0))
%396 = load i32, i32* %14
br label %397
397: ; preds = %329, %394, %385
%398 = phi i32 [ %332, %329 ], [ %396, %394 ], [ %388, %385 ]
%399 = add nsw i32 %398, 1
store i32 %399, i32* %14
%400 = icmp slt i32 %399, %36
br i1 %400, label %49, label %401
401: ; preds = %397, %35
ret void
}