int get_align_contact(int tile1, int tile2, int nx1, int ny1, int nx2, int ny2,
                      const double *x1, const double *y1, const double *x2,
                      const double *y2, double periodx, double periody,
                      int *istart1, int *iend1, int *jstart1, int *jend1,
                      int *istart2, int *iend2, int *jstart2, int *jend2) {
  double *xb1, *yb1, *xb2, *yb2;
  int ncontact, start1, end1, start2, end2;
  ncontact = 0;
  xb1 = east_bound(x1, nx1, ny1);
  yb1 = east_bound(y1, nx1, ny1);
  xb2 = west_bound(x2, nx2, ny2);
  yb2 = west_bound(y2, nx2, ny2);
  if (get_contact_index(ny1, ny2, xb1, yb1, xb2, yb2, periodx, 0.0, &start1,
                        &end1, &start2, &end2)) {
    istart1[ncontact] = nx1 - 1;
    iend1[ncontact] = nx1 - 1;
    istart2[ncontact] = 1;
    iend2[ncontact] = 1;
    jstart1[ncontact] = start1;
    jend1[ncontact] = end1;
    jstart2[ncontact] = start2;
    jend2[ncontact] = end2;
    ncontact++;
  }
  if (tile1 != tile2) {
    free(xb2);
    free(yb2);
    xb2 = south_bound(x2, nx2, ny2);
    yb2 = south_bound(y2, nx2, ny2);
    if (get_contact_index(ny1, nx2, xb1, yb1, xb2, yb2, 0.0, 0.0, &start1,
                          &end1, &start2, &end2)) {
      istart1[ncontact] = nx1 - 1;
      iend1[ncontact] = nx1 - 1;
      istart2[ncontact] = start2;
      iend2[ncontact] = end2;
      jstart1[ncontact] = start1;
      jend1[ncontact] = end1;
      jstart2[ncontact] = 1;
      jend2[ncontact] = 1;
      ncontact++;
    }
  }
  free(xb1);
  free(yb1);
  free(xb2);
  free(yb2);
  xb1 = south_bound(x1, nx1, ny1);
  yb1 = south_bound(y1, nx1, ny1);
  xb2 = north_bound(x2, nx2, ny2);
  yb2 = north_bound(y2, nx2, ny2);
  if (get_contact_index(nx1, nx2, xb1, yb1, xb2, yb2, 0.0, periody, &start1,
                        &end1, &start2, &end2)) {
    istart1[ncontact] = start1;
    iend1[ncontact] = end1;
    istart2[ncontact] = start2;
    iend2[ncontact] = end2;
    jstart1[ncontact] = 1;
    jend1[ncontact] = 1;
    jstart2[ncontact] = ny2 - 1;
    jend2[ncontact] = ny2 - 1;
    ncontact++;
  }
  if (tile1 != tile2) {
    free(xb2);
    free(yb2);
    xb2 = east_bound(x2, nx2, ny2);
    yb2 = east_bound(y2, nx2, ny2);
    if (get_contact_index(nx1, ny2, xb1, yb1, xb2, yb2, 0.0, 0.0, &start1,
                          &end1, &start2, &end2)) {
      istart1[ncontact] = start1;
      iend1[ncontact] = end1;
      istart2[ncontact] = nx2 - 1;
      iend2[ncontact] = nx2 - 1;
      jstart1[ncontact] = 1;
      jend1[ncontact] = 1;
      jstart2[ncontact] = start2;
      jend2[ncontact] = end2;
      ncontact++;
    }
  }
  free(xb1);
  free(yb1);
  free(xb2);
  free(yb2);
  if (tile1 != tile2) {
    xb1 = west_bound(x1, nx1, ny1);
    yb1 = west_bound(y1, nx1, ny1);
    xb2 = east_bound(x2, nx2, ny2);
    yb2 = east_bound(y2, nx2, ny2);
    if (get_contact_index(ny1, ny2, xb1, yb1, xb2, yb2, periodx, 0.0, &start1,
                          &end1, &start2, &end2)) {
      istart1[ncontact] = 1;
      iend1[ncontact] = 1;
      istart2[ncontact] = nx2 - 1;
      iend2[ncontact] = nx2 - 1;
      jstart1[ncontact] = start1;
      jend1[ncontact] = end1;
      jstart2[ncontact] = start2;
      jend2[ncontact] = end2;
      ncontact++;
    }
    free(xb2);
    free(yb2);
    xb2 = north_bound(x2, nx2, ny2);
    yb2 = north_bound(y2, nx2, ny2);
    if (get_contact_index(ny1, nx2, xb1, yb1, xb2, yb2, 0.0, 0.0, &start1,
                          &end1, &start2, &end2)) {
      istart1[ncontact] = 1;
      iend1[ncontact] = 1;
      istart2[ncontact] = start2;
      iend2[ncontact] = end2;
      jstart1[ncontact] = start1;
      jend1[ncontact] = end1;
      jstart2[ncontact] = ny2 - 1;
      jend2[ncontact] = ny2 - 1;
      ncontact++;
    }
    free(xb1);
    free(yb1);
    free(xb2);
    free(yb2);
    xb1 = north_bound(x1, nx1, ny1);
    yb1 = north_bound(y1, nx1, ny1);
    xb2 = south_bound(x2, nx2, ny2);
    yb2 = south_bound(y2, nx2, ny2);
    if (get_contact_index(nx1, nx2, xb1, yb1, xb2, yb2, 0.0, periody, &start1,
                          &end1, &start2, &end2)) {
      istart1[ncontact] = start1;
      iend1[ncontact] = end1;
      istart2[ncontact] = start2;
      iend2[ncontact] = end2;
      jstart1[ncontact] = ny1 - 1;
      jend1[ncontact] = ny1 - 1;
      jstart2[ncontact] = 1;
      jend2[ncontact] = 1;
      ncontact++;
    }
    free(xb2);
    free(yb2);
    xb2 = west_bound(x2, nx2, ny2);
    yb2 = west_bound(y2, nx2, ny2);
    if (get_contact_index(nx1, ny2, xb1, yb1, xb2, yb2, 0.0, 0.0, &start1,
                          &end1, &start2, &end2)) {
      istart1[ncontact] = start1;
      iend1[ncontact] = end1;
      istart2[ncontact] = 1;
      iend2[ncontact] = 1;
      jstart1[ncontact] = ny1 - 1;
      jend1[ncontact] = ny1 - 1;
      jstart2[ncontact] = start2;
      jend2[ncontact] = end2;
      ncontact++;
    }
    free(xb1);
    free(yb1);
    free(xb2);
    free(yb2);
  }
  if (tile1 == tile2) {
    int i, folded = 1;
    double dx;
    int num;
    num = 0;
    xb1 = north_bound(x1, nx1, ny1);
    yb1 = north_bound(y1, nx1, ny1);
    for (i = 0; i < nx1 / 2; i++) {
      if (yb1[i] != yb1[nx1 - i - 1]) {
        folded = 0;
        break;
      }
      dx = fabs(xb1[i] - xb1[nx1 - i - 1]);
      if (dx != 0 && dx != 360) {
        if (dx == 180)
          num++;
        else {
          folded = 0;
          break;
        }
      }
    }
    if (num > 1)
      folded = 0;
    if (folded) {
      istart1[ncontact] = 1;
      iend1[ncontact] = nx1 / 2;
      istart2[ncontact] = nx1 - 1;
      iend2[ncontact] = nx1 / 2 + 1;
      jstart1[ncontact] = ny1 - 1;
      jend1[ncontact] = ny1 - 1;
      jstart2[ncontact] = ny1 - 1;
      jend2[ncontact] = ny1 - 1;
      ncontact++;
    }
    free(xb1);
    free(yb1);
  }
  return ncontact;
}


x86 assembly (clang, -O0):
<get_align_contact>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x98,%rsp
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
movl   $0x0,-0x54(%rbp)
mov    0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x0,%al
call   1070 <east_bound@plt>
cltq
mov    %rax,-0x38(%rbp)
mov    0x18(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x0,%al
call   1070 <east_bound@plt>
cltq
mov    %rax,-0x40(%rbp)
mov    0x20(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1080 <west_bound@plt>
cltq
mov    %rax,-0x48(%rbp)
mov    0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1080 <west_bound@plt>
cltq
mov    %rax,-0x50(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x50(%rbp),%r9
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
lea    -0x58(%rbp),%rbx
lea    -0x5c(%rbp),%r11
lea    -0x60(%rbp),%r10
lea    -0x64(%rbp),%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x2,%al
call   1060 <get_contact_index@plt>
cmp    $0x0,%eax
je     12ef <get_align_contact+0x18f>
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
mov    0x30(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
mov    0x38(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    0x58(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x58(%rbp),%edx
mov    0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x5c(%rbp),%edx
mov    0x48(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x60(%rbp),%edx
mov    0x60(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x64(%rbp),%edx
mov    0x68(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1410 <get_align_contact+0x2b0>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    0x20(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1050 <south_bound@plt>
cltq
mov    %rax,-0x48(%rbp)
mov    0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1050 <south_bound@plt>
cltq
mov    %rax,-0x50(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x50(%rbp),%r9
xorps  %xmm1,%xmm1
lea    -0x58(%rbp),%rbx
lea    -0x5c(%rbp),%r11
lea    -0x60(%rbp),%r10
lea    -0x64(%rbp),%rax
movaps %xmm1,%xmm0
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x2,%al
call   1060 <get_contact_index@plt>
cmp    $0x0,%eax
je     140b <get_align_contact+0x2ab>
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
mov    0x30(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
mov    0x38(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x60(%rbp),%edx
mov    0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x64(%rbp),%edx
mov    0x58(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x58(%rbp),%edx
mov    0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x5c(%rbp),%edx
mov    0x48(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x60(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    0x68(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1410 <get_align_contact+0x2b0>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x0,%al
call   1050 <south_bound@plt>
cltq
mov    %rax,-0x38(%rbp)
mov    0x18(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x0,%al
call   1050 <south_bound@plt>
cltq
mov    %rax,-0x40(%rbp)
mov    0x20(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1040 <north_bound@plt>
cltq
mov    %rax,-0x48(%rbp)
mov    0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1040 <north_bound@plt>
cltq
mov    %rax,-0x50(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x50(%rbp),%r9
movsd  -0x30(%rbp),%xmm1
xorps  %xmm0,%xmm0
lea    -0x58(%rbp),%rbx
lea    -0x5c(%rbp),%r11
lea    -0x60(%rbp),%r10
lea    -0x64(%rbp),%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x2,%al
call   1060 <get_contact_index@plt>
cmp    $0x0,%eax
je     1562 <get_align_contact+0x402>
mov    -0x58(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x5c(%rbp),%edx
mov    0x38(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x60(%rbp),%edx
mov    0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x64(%rbp),%edx
mov    0x58(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    0x48(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x20(%rbp),%edx
sub    $0x1,%edx
mov    0x60(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%edx
sub    $0x1,%edx
mov    0x68(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1683 <get_align_contact+0x523>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    0x20(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1070 <east_bound@plt>
cltq
mov    %rax,-0x48(%rbp)
mov    0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1070 <east_bound@plt>
cltq
mov    %rax,-0x50(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x50(%rbp),%r9
xorps  %xmm1,%xmm1
lea    -0x58(%rbp),%rbx
lea    -0x5c(%rbp),%r11
lea    -0x60(%rbp),%r10
lea    -0x64(%rbp),%rax
movaps %xmm1,%xmm0
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x2,%al
call   1060 <get_contact_index@plt>
cmp    $0x0,%eax
je     167e <get_align_contact+0x51e>
mov    -0x58(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x5c(%rbp),%edx
mov    0x38(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%edx
sub    $0x1,%edx
mov    0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%edx
sub    $0x1,%edx
mov    0x58(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    0x48(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x60(%rbp),%edx
mov    0x60(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x64(%rbp),%edx
mov    0x68(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1683 <get_align_contact+0x523>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1b77 <get_align_contact+0xa17>
mov    0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x0,%al
call   1080 <west_bound@plt>
cltq
mov    %rax,-0x38(%rbp)
mov    0x18(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x0,%al
call   1080 <west_bound@plt>
cltq
mov    %rax,-0x40(%rbp)
mov    0x20(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1070 <east_bound@plt>
cltq
mov    %rax,-0x48(%rbp)
mov    0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1070 <east_bound@plt>
cltq
mov    %rax,-0x50(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x50(%rbp),%r9
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
lea    -0x58(%rbp),%rbx
lea    -0x5c(%rbp),%r11
lea    -0x60(%rbp),%r10
lea    -0x64(%rbp),%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x2,%al
call   1060 <get_contact_index@plt>
cmp    $0x0,%eax
je     17e1 <get_align_contact+0x681>
mov    0x30(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    0x38(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x1c(%rbp),%edx
sub    $0x1,%edx
mov    0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%edx
sub    $0x1,%edx
mov    0x58(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x58(%rbp),%edx
mov    0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x5c(%rbp),%edx
mov    0x48(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x60(%rbp),%edx
mov    0x60(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x64(%rbp),%edx
mov    0x68(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    0x20(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1040 <north_bound@plt>
cltq
mov    %rax,-0x48(%rbp)
mov    0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1040 <north_bound@plt>
cltq
mov    %rax,-0x50(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x50(%rbp),%r9
xorps  %xmm1,%xmm1
lea    -0x58(%rbp),%rbx
lea    -0x5c(%rbp),%r11
lea    -0x60(%rbp),%r10
lea    -0x64(%rbp),%rax
movaps %xmm1,%xmm0
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x2,%al
call   1060 <get_contact_index@plt>
cmp    $0x0,%eax
je     18f1 <get_align_contact+0x791>
mov    0x30(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    0x38(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x60(%rbp),%edx
mov    0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x64(%rbp),%edx
mov    0x58(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x58(%rbp),%edx
mov    0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x5c(%rbp),%edx
mov    0x48(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%edx
sub    $0x1,%edx
mov    0x60(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%edx
sub    $0x1,%edx
mov    0x68(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x0,%al
call   1040 <north_bound@plt>
cltq
mov    %rax,-0x38(%rbp)
mov    0x18(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x0,%al
call   1040 <north_bound@plt>
cltq
mov    %rax,-0x40(%rbp)
mov    0x20(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1050 <south_bound@plt>
cltq
mov    %rax,-0x48(%rbp)
mov    0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1050 <south_bound@plt>
cltq
mov    %rax,-0x50(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x50(%rbp),%r9
movsd  -0x30(%rbp),%xmm1
xorps  %xmm0,%xmm0
lea    -0x58(%rbp),%rbx
lea    -0x5c(%rbp),%r11
lea    -0x60(%rbp),%r10
lea    -0x64(%rbp),%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x2,%al
call   1060 <get_contact_index@plt>
cmp    $0x0,%eax
je     1a43 <get_align_contact+0x8e3>
mov    -0x58(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x5c(%rbp),%edx
mov    0x38(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x60(%rbp),%edx
mov    0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x64(%rbp),%edx
mov    0x58(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
mov    0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
mov    0x48(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x60(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    0x68(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    0x20(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1080 <west_bound@plt>
cltq
mov    %rax,-0x48(%rbp)
mov    0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x0,%al
call   1080 <west_bound@plt>
cltq
mov    %rax,-0x50(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x50(%rbp),%r9
xorps  %xmm1,%xmm1
lea    -0x58(%rbp),%rbx
lea    -0x5c(%rbp),%r11
lea    -0x60(%rbp),%r10
lea    -0x64(%rbp),%rax
movaps %xmm1,%xmm0
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x2,%al
call   1060 <get_contact_index@plt>
cmp    $0x0,%eax
je     1b53 <get_align_contact+0x9f3>
mov    -0x58(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x5c(%rbp),%edx
mov    0x38(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    0x58(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
mov    0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
mov    0x48(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x60(%rbp),%edx
mov    0x60(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x64(%rbp),%edx
mov    0x68(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1db0 <get_align_contact+0xc50>
movl   $0x1,-0x6c(%rbp)
movl   $0x0,-0x7c(%rbp)
mov    0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x0,%al
call   1040 <north_bound@plt>
cltq
mov    %rax,-0x38(%rbp)
mov    0x18(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x0,%al
call   1040 <north_bound@plt>
cltq
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x80(%rbp),%eax
cmp    %ecx,%eax
jge    1ce3 <get_align_contact+0xb83>
mov    -0x40(%rbp),%rax
movslq -0x68(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    -0x68(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
ucomisd (%rax,%rcx,8),%xmm0
jne    1c17 <get_align_contact+0xab7>
jp     1c17 <get_align_contact+0xab7>
jmp    1c23 <get_align_contact+0xac3>
movl   $0x0,-0x6c(%rbp)
jmp    1ce3 <get_align_contact+0xb83>
mov    -0x38(%rbp),%rax
movslq -0x68(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    -0x68(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
movaps 0x3b4(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1c72 <get_align_contact+0xb12>
jp     1c72 <get_align_contact+0xb12>
jmp    1cd0 <get_align_contact+0xb70>
movsd  -0x78(%rbp),%xmm0
movsd  0x391(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1c94 <get_align_contact+0xb34>
jp     1c94 <get_align_contact+0xb34>
jmp    1cd0 <get_align_contact+0xb70>
movsd  -0x78(%rbp),%xmm0
movsd  0x377(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1cbf <get_align_contact+0xb5f>
jp     1cbf <get_align_contact+0xb5f>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1ccb <get_align_contact+0xb6b>
movl   $0x0,-0x6c(%rbp)
jmp    1ce3 <get_align_contact+0xb83>
jmp    1cd0 <get_align_contact+0xb70>
jmp    1cd5 <get_align_contact+0xb75>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1bc6 <get_align_contact+0xa66>
cmpl   $0x1,-0x7c(%rbp)
jle    1cf4 <get_align_contact+0xb94>
movl   $0x0,-0x6c(%rbp)
cmpl   $0x0,-0x6c(%rbp)
je     1d9e <get_align_contact+0xc3e>
mov    0x30(%rbp),%rax
movslq -0x54(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
mov    0x38(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
mov    0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
add    $0x1,%edx
mov    0x58(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
mov    0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
mov    0x48(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
mov    0x60(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
mov    0x68(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x54(%rbp),%eax
add    $0x98,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_align_contact>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
movsd  %xmm1,0x70(%rsp)
movsd  %xmm0,0x68(%rsp)
mov    %r9d,%r14d
mov    %r8d,%ebp
mov    %ecx,%r15d
mov    %edx,%ebx
mov    %rbx,0x18(%rsp)
mov    %esi,0x20(%rsp)
mov    %edi,0x28(%rsp)
mov    0xc0(%rsp),%r12
mov    0xb8(%rsp),%r13
mov    0xb0(%rsp),%rdi
movl   $0x0,0x4(%rsp)
mov    %edx,%esi
mov    %ecx,%edx
xor    %eax,%eax
call   1070 <east_bound@plt>
cltq
mov    %rax,0x40(%rsp)
mov    %r13,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1070 <east_bound@plt>
movslq %eax,%r13
mov    %r12,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1080 <west_bound@plt>
movslq %eax,%r12
mov    0xc8(%rsp),%rdi
mov    %rbp,0x48(%rsp)
mov    %ebp,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1080 <west_bound@plt>
movslq %eax,%r9
lea    0x8(%rsp),%rbp
lea    0x10(%rsp),%r11
lea    0x14(%rsp),%r10
xorps  %xmm1,%xmm1
mov    %r15,0x38(%rsp)
mov    %r15d,%edi
mov    0xe8(%rsp),%rbx
mov    %r14,0x30(%rsp)
mov    %r14d,%esi
mov    0x40(%rsp),%rdx
mov    %r13,0x60(%rsp)
mov    %r13,%rcx
mov    %r12,0x50(%rsp)
mov    %r12,%r8
mov    %r9,0x58(%rsp)
movsd  0x68(%rsp),%xmm0
mov    $0x2,%al
push   %rbp
lea    0x14(%rsp),%rbp
push   %rbp
push   %r11
push   %r10
call   1060 <get_contact_index@plt>
mov    0x38(%rsp),%rdx
mov    0xf0(%rsp),%rcx
add    $0x20,%rsp
test   %eax,%eax
je     12d8 <get_align_contact+0x178>
lea    -0x1(%rdx),%eax
mov    %eax,(%rcx)
mov    0xd8(%rsp),%rcx
mov    %eax,(%rcx)
mov    0xf0(%rsp),%rax
movl   $0x1,(%rax)
mov    0xf8(%rsp),%rax
movl   $0x1,(%rax)
mov    0x14(%rsp),%eax
mov    0xe0(%rsp),%rcx
mov    %eax,(%rcx)
mov    0x10(%rsp),%eax
mov    %eax,(%rbx)
mov    0xc(%rsp),%eax
mov    0x100(%rsp),%rcx
mov    %eax,(%rcx)
mov    0x8(%rsp),%eax
mov    0x108(%rsp),%rcx
mov    %eax,(%rcx)
movl   $0x1,0x4(%rsp)
mov    0x28(%rsp),%eax
cmp    0x20(%rsp),%eax
jne    1300 <get_align_contact+0x1a0>
mov    0x18(%rsp),%rbx
mov    0x30(%rsp),%r14
mov    0x48(%rsp),%r15
mov    0x40(%rsp),%r12
mov    0x60(%rsp),%r13
jmp    1434 <get_align_contact+0x2d4>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
mov    0x58(%rsp),%rdi
call   1030 <free@plt>
mov    0xc0(%rsp),%rdi
mov    0x48(%rsp),%rbx
mov    %ebx,%esi
mov    0x30(%rsp),%rbp
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <south_bound@plt>
movslq %eax,%r14
mov    0xc8(%rsp),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <south_bound@plt>
movslq %eax,%r9
xorpd  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    0x38(%rsp),%rdi
mov    %rbx,%r15
mov    %ebx,%esi
mov    0x40(%rsp),%r12
mov    %r12,%rdx
mov    0x60(%rsp),%r13
mov    %r13,%rcx
mov    %r14,0x50(%rsp)
mov    %r14,%r8
mov    %r9,0x58(%rsp)
mov    $0x2,%al
lea    0x8(%rsp),%rbp
push   %rbp
lea    0x14(%rsp),%rbp
push   %rbp
lea    0x20(%rsp),%rbp
push   %rbp
lea    0x2c(%rsp),%rbp
push   %rbp
call   1060 <get_contact_index@plt>
add    $0x20,%rsp
test   %eax,%eax
je     142a <get_align_contact+0x2ca>
mov    0x18(%rsp),%rbx
lea    -0x1(%rbx),%eax
mov    0x4(%rsp),%edx
mov    %edx,%ecx
mov    0xd0(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0xd8(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0xc(%rsp),%eax
mov    0xf0(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0x8(%rsp),%eax
mov    0xf8(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0x14(%rsp),%eax
mov    0xe0(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0x10(%rsp),%eax
mov    0xe8(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0x100(%rsp),%rax
movl   $0x1,(%rax,%rcx,4)
mov    0x108(%rsp),%rax
movl   $0x1,(%rax,%rcx,4)
add    $0x1,%edx
mov    %edx,0x4(%rsp)
jmp    142f <get_align_contact+0x2cf>
mov    0x18(%rsp),%rbx
mov    0x30(%rsp),%r14
mov    0x50(%rsp),%rbp
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x58(%rsp),%rdi
call   1030 <free@plt>
mov    0xb0(%rsp),%rdi
mov    %ebx,%esi
mov    %rbx,%r12
mov    0x38(%rsp),%rbx
mov    %ebx,%edx
xor    %eax,%eax
call   1050 <south_bound@plt>
movslq %eax,%r13
mov    0xb8(%rsp),%rdi
mov    %r12d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1050 <south_bound@plt>
movslq %eax,%rbx
mov    0xc0(%rsp),%rdi
mov    %r15d,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1040 <north_bound@plt>
movslq %eax,%rbp
mov    0xc8(%rsp),%rdi
mov    %r15d,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1040 <north_bound@plt>
movslq %eax,%r9
xorpd  %xmm0,%xmm0
mov    %r12d,%edi
mov    %r15d,%esi
mov    %r13,0x40(%rsp)
mov    %r13,%rdx
mov    %rbx,%r12
mov    %rbx,%rcx
mov    %rbp,%r13
mov    %rbp,%r8
mov    %r9,%rbp
movsd  0x70(%rsp),%xmm1
mov    $0x2,%al
lea    0x8(%rsp),%rbx
push   %rbx
lea    0x14(%rsp),%rbx
push   %rbx
lea    0x20(%rsp),%rbx
push   %rbx
lea    0x2c(%rsp),%rbx
push   %rbx
call   1060 <get_contact_index@plt>
add    $0x20,%rsp
test   %eax,%eax
je     1593 <get_align_contact+0x433>
mov    0x14(%rsp),%eax
mov    0x4(%rsp),%edx
mov    %edx,%ecx
mov    0xd0(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0x10(%rsp),%eax
mov    0xd8(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0xc(%rsp),%eax
mov    0xf0(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0x8(%rsp),%eax
mov    0xf8(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0xe0(%rsp),%rax
movl   $0x1,(%rax,%rcx,4)
mov    0xe8(%rsp),%rax
movl   $0x1,(%rax,%rcx,4)
lea    -0x1(%r14),%eax
mov    0x100(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0x108(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
add    $0x1,%edx
mov    %edx,0x4(%rsp)
mov    0x20(%rsp),%r15d
mov    0x48(%rsp),%r14
cmp    %r15d,0x28(%rsp)
je     16b4 <get_align_contact+0x554>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0xc0(%rsp),%rdi
mov    %r14d,%esi
mov    0x30(%rsp),%rbx
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <east_bound@plt>
movslq %eax,%r13
mov    0xc8(%rsp),%rdi
mov    %r14d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <east_bound@plt>
movslq %eax,%rbp
xorpd  %xmm0,%xmm0
xorpd  %xmm1,%xmm1
mov    0x18(%rsp),%rdi
mov    %ebx,%esi
mov    0x40(%rsp),%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %rbp,%r9
mov    $0x2,%al
lea    0x8(%rsp),%rbx
push   %rbx
lea    0x14(%rsp),%rbx
push   %rbx
lea    0x20(%rsp),%rbx
push   %rbx
lea    0x2c(%rsp),%rbx
push   %rbx
call   1060 <get_contact_index@plt>
add    $0x20,%rsp
test   %eax,%eax
je     16b4 <get_align_contact+0x554>
mov    0x14(%rsp),%eax
mov    0x4(%rsp),%edx
mov    %edx,%ecx
mov    0xd0(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0x10(%rsp),%eax
mov    0xd8(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
lea    -0x1(%r14),%eax
mov    0xf0(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0xf8(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0xe0(%rsp),%rax
movl   $0x1,(%rax,%rcx,4)
mov    0xe8(%rsp),%rax
movl   $0x1,(%rax,%rcx,4)
mov    0xc(%rsp),%eax
mov    0x100(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
mov    0x8(%rsp),%eax
mov    0x108(%rsp),%rsi
mov    %eax,(%rsi,%rcx,4)
add    $0x1,%edx
mov    %edx,0x4(%rsp)
mov    0x40(%rsp),%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
cmp    %r15d,0x28(%rsp)
jne    17f1 <get_align_contact+0x691>
xor    %r14d,%r14d
mov    0xb0(%rsp),%rdi
mov    0x18(%rsp),%rbx
mov    %ebx,%esi
mov    0x38(%rsp),%r15
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <north_bound@plt>
movslq %eax,%r12
mov    0xb8(%rsp),%rdi
mov    %ebx,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <north_bound@plt>
movslq %eax,%rbp
mov    %ebx,%eax
shr    $0x1f,%eax
add    %ebx,%eax
sar    %eax
cmp    $0x2,%ebx
mov    0x4(%rsp),%ebx
mov    0x108(%rsp),%r8
mov    0xe0(%rsp),%r9
mov    0xf8(%rsp),%r10
mov    0xf0(%rsp),%r11
mov    0xd8(%rsp),%r13
jl     1935 <get_align_contact+0x7d5>
mov    %eax,%ecx
mov    0x18(%rsp),%rdx
add    $0xffffffff,%edx
xor    %esi,%esi
movapd 0x892(%rip),%xmm0
xorpd  %xmm1,%xmm1
movsd  0x896(%rip),%xmm2
movsd  0x896(%rip),%xmm3
xor    %r14d,%r14d
jmp    17a0 <get_align_contact+0x640>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rsi
add    $0xffffffff,%edx
cmp    %rsi,%rcx
je     1935 <get_align_contact+0x7d5>
movsd  0x0(%rbp,%rsi,8),%xmm4
movslq %edx,%rdi
ucomisd 0x0(%rbp,%rdi,8),%xmm4
jne    1d38 <get_align_contact+0xbd8>
jp     1d38 <get_align_contact+0xbd8>
movsd  (%r12,%rsi,8),%xmm4
subsd  (%r12,%rdi,8),%xmm4
ucomisd %xmm1,%xmm4
jne    17cf <get_align_contact+0x66f>
jnp    1790 <get_align_contact+0x630>
andpd  %xmm0,%xmm4
ucomisd %xmm2,%xmm4
jne    17db <get_align_contact+0x67b>
jnp    1790 <get_align_contact+0x630>
ucomisd %xmm3,%xmm4
jne    1d38 <get_align_contact+0xbd8>
jp     1d38 <get_align_contact+0xbd8>
add    $0x1,%r14d
jmp    1790 <get_align_contact+0x630>
mov    0xb0(%rsp),%rdi
mov    0x18(%rsp),%rbx
mov    %ebx,%esi
mov    0x38(%rsp),%r15
mov    %r15d,%edx
xor    %eax,%eax
call   1080 <west_bound@plt>
mov    0x30(%rsp),%r13
movslq %eax,%r12
mov    0xb8(%rsp),%rdi
mov    %ebx,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1080 <west_bound@plt>
movslq %eax,%rbx
mov    0xc0(%rsp),%rdi
mov    %r14d,%esi
mov    %r13d,%edx
xor    %eax,%eax
call   1070 <east_bound@plt>
movslq %eax,%rbp
mov    0xc8(%rsp),%rdi
mov    %r14d,%esi
mov    %r13d,%edx
xor    %eax,%eax
call   1070 <east_bound@plt>
cltq
xorpd  %xmm1,%xmm1
mov    %r15d,%edi
mov    %r13d,%esi
mov    %r12,0x28(%rsp)
mov    %r12,%rdx
mov    %rax,%r12
mov    %rbx,0x20(%rsp)
mov    %rbx,%rcx
mov    %rbp,%r8
mov    %rax,%r9
movsd  0x68(%rsp),%xmm0
mov    $0x2,%al
lea    0x8(%rsp),%rbx
push   %rbx
lea    0x14(%rsp),%rbx
push   %rbx
lea    0x20(%rsp),%rbx
push   %rbx
lea    0x2c(%rsp),%rbx
push   %rbx
call   1060 <get_contact_index@plt>
add    $0x20,%rsp
test   %eax,%eax
je     1994 <get_align_contact+0x834>
mov    0x4(%rsp),%edx
mov    %edx,%eax
mov    0xd0(%rsp),%rcx
movl   $0x1,(%rcx,%rax,4)
mov    0xd8(%rsp),%rcx
movl   $0x1,(%rcx,%rax,4)
lea    -0x1(%r14),%ecx
mov    0xf0(%rsp),%rsi
mov    %ecx,(%rsi,%rax,4)
mov    0xf8(%rsp),%rsi
mov    %ecx,(%rsi,%rax,4)
mov    0x14(%rsp),%ecx
mov    0xe0(%rsp),%rsi
mov    %ecx,(%rsi,%rax,4)
mov    0x10(%rsp),%ecx
mov    0xe8(%rsp),%rsi
mov    %ecx,(%rsi,%rax,4)
mov    0xc(%rsp),%ecx
mov    0x100(%rsp),%r15
mov    %ecx,(%r15,%rax,4)
mov    0x8(%rsp),%ecx
mov    0x108(%rsp),%rsi
mov    %ecx,(%rsi,%rax,4)
add    $0x1,%edx
mov    %edx,0x4(%rsp)
jmp    199c <get_align_contact+0x83c>
cmp    $0x1,%r14d
jg     1d38 <get_align_contact+0xbd8>
mov    %ebx,%ecx
mov    0xd0(%rsp),%rdx
movl   $0x1,(%rdx,%rcx,4)
mov    %eax,0x0(%r13,%rcx,4)
mov    0x18(%rsp),%rdx
add    $0xffffffff,%edx
mov    %edx,(%r11,%rcx,4)
add    $0x1,%eax
mov    %eax,(%r10,%rcx,4)
add    $0xffffffff,%r15d
mov    %r15d,(%r9,%rcx,4)
mov    0xe8(%rsp),%rax
mov    %r15d,(%rax,%rcx,4)
mov    0x100(%rsp),%rax
mov    %r15d,(%rax,%rcx,4)
mov    %r15d,(%r8,%rcx,4)
add    $0x1,%ebx
jmp    1d38 <get_align_contact+0xbd8>
mov    0x100(%rsp),%r15
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    0xc0(%rsp),%rdi
mov    %r14d,%esi
mov    0x30(%rsp),%rbx
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <north_bound@plt>
movslq %eax,%r12
mov    0xc8(%rsp),%rdi
mov    %r14d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <north_bound@plt>
movslq %eax,%r13
xorpd  %xmm0,%xmm0
xorpd  %xmm1,%xmm1
mov    0x38(%rsp),%rdi
mov    %r14d,%esi
mov    0x28(%rsp),%rdx
mov    0x20(%rsp),%rcx
mov    %r12,%r8
mov    %r13,%r9
mov    $0x2,%al
lea    0x8(%rsp),%rbp
push   %rbp
lea    0x14(%rsp),%rbp
push   %rbp
lea    0x20(%rsp),%rbp
push   %rbp
lea    0x2c(%rsp),%rbp
push   %rbp
call   1060 <get_contact_index@plt>
add    $0x20,%rsp
test   %eax,%eax
je     1a9f <get_align_contact+0x93f>
mov    0x4(%rsp),%edx
mov    %edx,%eax
mov    0xd0(%rsp),%rcx
movl   $0x1,(%rcx,%rax,4)
mov    0xd8(%rsp),%rcx
movl   $0x1,(%rcx,%rax,4)
mov    0xc(%rsp),%ecx
mov    0xf0(%rsp),%rsi
mov    %ecx,(%rsi,%rax,4)
mov    0x8(%rsp),%ecx
mov    0xf8(%rsp),%rsi
mov    %ecx,(%rsi,%rax,4)
mov    0x14(%rsp),%ecx
mov    0xe0(%rsp),%rsi
mov    %ecx,(%rsi,%rax,4)
mov    0x10(%rsp),%ecx
mov    0xe8(%rsp),%rsi
mov    %ecx,(%rsi,%rax,4)
lea    -0x1(%rbx),%ecx
mov    %ecx,(%r15,%rax,4)
mov    0x108(%rsp),%rsi
mov    %ecx,(%rsi,%rax,4)
add    $0x1,%edx
mov    %edx,0x4(%rsp)
mov    %rbx,%r15
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    0xb0(%rsp),%rdi
mov    0x18(%rsp),%rbx
mov    %ebx,%esi
mov    0x38(%rsp),%rbp
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <north_bound@plt>
movslq %eax,%r12
mov    0xb8(%rsp),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <north_bound@plt>
movslq %eax,%r14
mov    0xc0(%rsp),%rdi
mov    0x48(%rsp),%r13
mov    %r13d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <south_bound@plt>
movslq %eax,%rbp
mov    0xc8(%rsp),%rdi
mov    %r13d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <south_bound@plt>
cltq
xorpd  %xmm0,%xmm0
mov    %ebx,%edi
mov    %r13d,%esi
mov    %r12,0x28(%rsp)
mov    %r12,%rdx
mov    %r14,0x20(%rsp)
mov    %r14,%rcx
mov    %rax,%r14
mov    %rbp,%r8
mov    %rax,%r9
movsd  0x70(%rsp),%xmm1
mov    $0x2,%al
lea    0x8(%rsp),%rbx
push   %rbx
lea    0x14(%rsp),%rbx
push   %rbx
lea    0x20(%rsp),%rbx
push   %rbx
lea    0x2c(%rsp),%rbx
push   %rbx
call   1060 <get_contact_index@plt>
add    $0x20,%rsp
test   %eax,%eax
je     1c0b <get_align_contact+0xaab>
mov    0x14(%rsp),%eax
mov    0x4(%rsp),%esi
mov    %esi,%ecx
mov    0xd0(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
mov    0x10(%rsp),%eax
mov    0xd8(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
mov    0xc(%rsp),%eax
mov    0xf0(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
mov    0x8(%rsp),%eax
mov    0xf8(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
mov    0x38(%rsp),%rax
add    $0xffffffff,%eax
mov    0xe0(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
mov    0xe8(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
mov    0x100(%rsp),%r15
movl   $0x1,(%r15,%rcx,4)
mov    0x108(%rsp),%rax
movl   $0x1,(%rax,%rcx,4)
add    $0x1,%esi
mov    %esi,0x4(%rsp)
jmp    1c13 <get_align_contact+0xab3>
mov    0x100(%rsp),%r15
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0xc0(%rsp),%rdi
mov    0x48(%rsp),%rbx
mov    %ebx,%esi
mov    0x30(%rsp),%r14
mov    %r14d,%edx
xor    %eax,%eax
call   1080 <west_bound@plt>
movslq %eax,%r12
mov    0xc8(%rsp),%rdi
mov    %ebx,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1080 <west_bound@plt>
movslq %eax,%rbp
xorpd  %xmm0,%xmm0
xorpd  %xmm1,%xmm1
mov    0x18(%rsp),%rdi
mov    %r14d,%esi
mov    0x28(%rsp),%r14
mov    %r14,%rdx
mov    0x20(%rsp),%r13
mov    %r13,%rcx
mov    %r12,%r8
mov    %rbp,%r9
mov    $0x2,%al
lea    0x8(%rsp),%rbx
push   %rbx
lea    0x14(%rsp),%rbx
push   %rbx
lea    0x20(%rsp),%rbx
push   %rbx
lea    0x2c(%rsp),%rbx
push   %rbx
call   1060 <get_contact_index@plt>
add    $0x20,%rsp
test   %eax,%eax
je     1d24 <get_align_contact+0xbc4>
mov    0x14(%rsp),%eax
mov    0x4(%rsp),%ebx
mov    %ebx,%ecx
mov    0xd0(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
mov    0x10(%rsp),%eax
mov    0xd8(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
mov    0xf0(%rsp),%rax
movl   $0x1,(%rax,%rcx,4)
mov    0xf8(%rsp),%rax
movl   $0x1,(%rax,%rcx,4)
mov    0x38(%rsp),%rax
add    $0xffffffff,%eax
mov    0xe0(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
mov    0xe8(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
mov    0xc(%rsp),%eax
mov    %eax,(%r15,%rcx,4)
mov    0x8(%rsp),%eax
mov    0x108(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
add    $0x1,%ebx
jmp    1d28 <get_align_contact+0xbc8>
mov    0x4(%rsp),%ebx
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %ebx,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @get_align_contact(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, double* %6, double* %7, double* %8, double* %9, double %10, double %11, i32* nocapture writeonly %12, i32* nocapture writeonly %13, i32* nocapture writeonly %14, i32* nocapture writeonly %15, i32* nocapture writeonly %16, i32* nocapture writeonly %17, i32* nocapture writeonly %18, i32* nocapture writeonly %19) {
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = bitcast i32* %21 to i8*
%26 = bitcast i32* %22 to i8*
%27 = bitcast i32* %23 to i8*
%28 = bitcast i32* %24 to i8*
%29 = tail call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @east_bound to i32 (double*, i32, i32, ...)*)(double* %6, i32 %2, i32 %3)
%30 = sext i32 %29 to i64
%31 = inttoptr i64 %30 to double*
%32 = tail call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @east_bound to i32 (double*, i32, i32, ...)*)(double* %7, i32 %2, i32 %3)
%33 = sext i32 %32 to i64
%34 = inttoptr i64 %33 to double*
%35 = tail call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @west_bound to i32 (double*, i32, i32, ...)*)(double* %8, i32 %4, i32 %5)
%36 = sext i32 %35 to i64
%37 = inttoptr i64 %36 to double*
%38 = tail call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @west_bound to i32 (double*, i32, i32, ...)*)(double* %9, i32 %4, i32 %5)
%39 = sext i32 %38 to i64
%40 = inttoptr i64 %39 to double*
%41 = call i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...) bitcast (i32 (...)* @get_contact_index to i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...)*)(i32 %3, i32 %5, double* %31, double* %34, double* %37, double* %40, double %10, double 0.000000e+00, i32* %21, i32* %22, i32* %23, i32* %24)
%42 = icmp eq i32 %41, 0
br i1 %42, label %49, label %43
43: ; preds = %20
%44 = add nsw i32 %2, -1
store i32 %44, i32* %12
store i32 %44, i32* %13
store i32 1, i32* %16
store i32 1, i32* %17
%45 = load i32, i32* %21
store i32 %45, i32* %14
%46 = load i32, i32* %22
store i32 %46, i32* %15
%47 = load i32, i32* %23
store i32 %47, i32* %18
%48 = load i32, i32* %24
store i32 %48, i32* %19
br label %49
49: ; preds = %43, %20
%50 = phi i32 [ 1, %43 ], [ 0, %20 ]
%51 = icmp eq i32 %0, %1
br i1 %51, label %79, label %52
52: ; preds = %49
%53 = inttoptr i64 %36 to i8*
%54 = inttoptr i64 %39 to i8*
%55 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @south_bound to i32 (double*, i32, i32, ...)*)(double* %8, i32 %4, i32 %5)
%56 = sext i32 %55 to i64
%57 = inttoptr i64 %56 to double*
%58 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @south_bound to i32 (double*, i32, i32, ...)*)(double* %9, i32 %4, i32 %5)
%59 = sext i32 %58 to i64
%60 = inttoptr i64 %59 to double*
%61 = call i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...) bitcast (i32 (...)* @get_contact_index to i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...)*)(i32 %3, i32 %4, double* %31, double* %34, double* %57, double* %60, double 0.000000e+00, double 0.000000e+00, i32* %21, i32* %22, i32* %23, i32* %24)
%62 = icmp eq i32 %61, 0
br i1 %62, label %79, label %63
63: ; preds = %52
%64 = add nsw i32 %2, -1
%65 = zext i32 %50 to i64
%66 = getelementptr inbounds i32, i32* %12, i64 %65
store i32 %64, i32* %66
%67 = getelementptr inbounds i32, i32* %13, i64 %65
store i32 %64, i32* %67
%68 = load i32, i32* %23
%69 = getelementptr inbounds i32, i32* %16, i64 %65
store i32 %68, i32* %69
%70 = load i32, i32* %24
%71 = getelementptr inbounds i32, i32* %17, i64 %65
store i32 %70, i32* %71
%72 = load i32, i32* %21
%73 = getelementptr inbounds i32, i32* %14, i64 %65
store i32 %72, i32* %73
%74 = load i32, i32* %22
%75 = getelementptr inbounds i32, i32* %15, i64 %65
store i32 %74, i32* %75
%76 = getelementptr inbounds i32, i32* %18, i64 %65
store i32 1, i32* %76
%77 = getelementptr inbounds i32, i32* %19, i64 %65
store i32 1, i32* %77
%78 = add nuw nsw i32 %50, 1
br label %79
79: ; preds = %52, %63, %49
%80 = phi double* [ %57, %63 ], [ %57, %52 ], [ %37, %49 ]
%81 = phi double* [ %60, %63 ], [ %60, %52 ], [ %40, %49 ]
%82 = phi i32 [ %78, %63 ], [ %50, %52 ], [ %50, %49 ]
%83 = inttoptr i64 %30 to i8*
%84 = inttoptr i64 %33 to i8*
%85 = bitcast double* %80 to i8*
%86 = bitcast double* %81 to i8*
%87 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @south_bound to i32 (double*, i32, i32, ...)*)(double* %6, i32 %2, i32 %3)
%88 = sext i32 %87 to i64
%89 = inttoptr i64 %88 to double*
%90 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @south_bound to i32 (double*, i32, i32, ...)*)(double* %7, i32 %2, i32 %3)
%91 = sext i32 %90 to i64
%92 = inttoptr i64 %91 to double*
%93 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @north_bound to i32 (double*, i32, i32, ...)*)(double* %8, i32 %4, i32 %5)
%94 = sext i32 %93 to i64
%95 = inttoptr i64 %94 to double*
%96 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @north_bound to i32 (double*, i32, i32, ...)*)(double* %9, i32 %4, i32 %5)
%97 = sext i32 %96 to i64
%98 = inttoptr i64 %97 to double*
%99 = call i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...) bitcast (i32 (...)* @get_contact_index to i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...)*)(i32 %2, i32 %4, double* %89, double* %92, double* %95, double* %98, double 0.000000e+00, double %11, i32* %21, i32* %22, i32* %23, i32* %24)
%100 = icmp eq i32 %99, 0
br i1 %100, label %117, label %101
101: ; preds = %79
%102 = load i32, i32* %21
%103 = zext i32 %82 to i64
%104 = getelementptr inbounds i32, i32* %12, i64 %103
store i32 %102, i32* %104
%105 = load i32, i32* %22
%106 = getelementptr inbounds i32, i32* %13, i64 %103
store i32 %105, i32* %106
%107 = load i32, i32* %23
%108 = getelementptr inbounds i32, i32* %16, i64 %103
store i32 %107, i32* %108
%109 = load i32, i32* %24
%110 = getelementptr inbounds i32, i32* %17, i64 %103
store i32 %109, i32* %110
%111 = getelementptr inbounds i32, i32* %14, i64 %103
store i32 1, i32* %111
%112 = getelementptr inbounds i32, i32* %15, i64 %103
store i32 1, i32* %112
%113 = add nsw i32 %5, -1
%114 = getelementptr inbounds i32, i32* %18, i64 %103
store i32 %113, i32* %114
%115 = getelementptr inbounds i32, i32* %19, i64 %103
store i32 %113, i32* %115
%116 = add nuw nsw i32 %82, 1
br label %117
117: ; preds = %101, %79
%118 = phi i32 [ %116, %101 ], [ %82, %79 ]
br i1 %51, label %146, label %119
119: ; preds = %117
%120 = inttoptr i64 %94 to i8*
%121 = inttoptr i64 %97 to i8*
%122 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @east_bound to i32 (double*, i32, i32, ...)*)(double* %8, i32 %4, i32 %5)
%123 = sext i32 %122 to i64
%124 = inttoptr i64 %123 to double*
%125 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @east_bound to i32 (double*, i32, i32, ...)*)(double* %9, i32 %4, i32 %5)
%126 = sext i32 %125 to i64
%127 = inttoptr i64 %126 to double*
%128 = call i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...) bitcast (i32 (...)* @get_contact_index to i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...)*)(i32 %2, i32 %5, double* %89, double* %92, double* %124, double* %127, double 0.000000e+00, double 0.000000e+00, i32* %21, i32* %22, i32* %23, i32* %24)
%129 = icmp eq i32 %128, 0
br i1 %129, label %146, label %130
130: ; preds = %119
%131 = load i32, i32* %21
%132 = zext i32 %118 to i64
%133 = getelementptr inbounds i32, i32* %12, i64 %132
store i32 %131, i32* %133
%134 = load i32, i32* %22
%135 = getelementptr inbounds i32, i32* %13, i64 %132
store i32 %134, i32* %135
%136 = add nsw i32 %4, -1
%137 = getelementptr inbounds i32, i32* %16, i64 %132
store i32 %136, i32* %137
%138 = getelementptr inbounds i32, i32* %17, i64 %132
store i32 %136, i32* %138
%139 = getelementptr inbounds i32, i32* %14, i64 %132
store i32 1, i32* %139
%140 = getelementptr inbounds i32, i32* %15, i64 %132
store i32 1, i32* %140
%141 = load i32, i32* %23
%142 = getelementptr inbounds i32, i32* %18, i64 %132
store i32 %141, i32* %142
%143 = load i32, i32* %24
%144 = getelementptr inbounds i32, i32* %19, i64 %132
store i32 %143, i32* %144
%145 = add nuw nsw i32 %118, 1
br label %146
146: ; preds = %119, %130, %117
%147 = phi double* [ %124, %130 ], [ %124, %119 ], [ %95, %117 ]
%148 = phi double* [ %127, %130 ], [ %127, %119 ], [ %98, %117 ]
%149 = phi i32 [ %145, %130 ], [ %118, %119 ], [ %118, %117 ]
%150 = inttoptr i64 %88 to i8*
%151 = inttoptr i64 %91 to i8*
%152 = bitcast double* %147 to i8*
%153 = bitcast double* %148 to i8*
br i1 %51, label %281, label %154
154: ; preds = %146
%155 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @west_bound to i32 (double*, i32, i32, ...)*)(double* %6, i32 %2, i32 %3)
%156 = sext i32 %155 to i64
%157 = inttoptr i64 %156 to double*
%158 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @west_bound to i32 (double*, i32, i32, ...)*)(double* %7, i32 %2, i32 %3)
%159 = sext i32 %158 to i64
%160 = inttoptr i64 %159 to double*
%161 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @east_bound to i32 (double*, i32, i32, ...)*)(double* %8, i32 %4, i32 %5)
%162 = sext i32 %161 to i64
%163 = inttoptr i64 %162 to double*
%164 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @east_bound to i32 (double*, i32, i32, ...)*)(double* %9, i32 %4, i32 %5)
%165 = sext i32 %164 to i64
%166 = inttoptr i64 %165 to double*
%167 = call i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...) bitcast (i32 (...)* @get_contact_index to i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...)*)(i32 %3, i32 %5, double* %157, double* %160, double* %163, double* %166, double %10, double 0.000000e+00, i32* %21, i32* %22, i32* %23, i32* %24)
%168 = icmp eq i32 %167, 0
br i1 %168, label %185, label %169
169: ; preds = %154
%170 = zext i32 %149 to i64
%171 = getelementptr inbounds i32, i32* %12, i64 %170
store i32 1, i32* %171
%172 = getelementptr inbounds i32, i32* %13, i64 %170
store i32 1, i32* %172
%173 = add nsw i32 %4, -1
%174 = getelementptr inbounds i32, i32* %16, i64 %170
store i32 %173, i32* %174
%175 = getelementptr inbounds i32, i32* %17, i64 %170
store i32 %173, i32* %175
%176 = load i32, i32* %21
%177 = getelementptr inbounds i32, i32* %14, i64 %170
store i32 %176, i32* %177
%178 = load i32, i32* %22
%179 = getelementptr inbounds i32, i32* %15, i64 %170
store i32 %178, i32* %179
%180 = load i32, i32* %23
%181 = getelementptr inbounds i32, i32* %18, i64 %170
store i32 %180, i32* %181
%182 = load i32, i32* %24
%183 = getelementptr inbounds i32, i32* %19, i64 %170
store i32 %182, i32* %183
%184 = add nuw nsw i32 %149, 1
br label %185
185: ; preds = %169, %154
%186 = phi i32 [ %184, %169 ], [ %149, %154 ]
%187 = inttoptr i64 %162 to i8*
%188 = inttoptr i64 %165 to i8*
%189 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @north_bound to i32 (double*, i32, i32, ...)*)(double* %8, i32 %4, i32 %5)
%190 = sext i32 %189 to i64
%191 = inttoptr i64 %190 to double*
%192 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @north_bound to i32 (double*, i32, i32, ...)*)(double* %9, i32 %4, i32 %5)
%193 = sext i32 %192 to i64
%194 = inttoptr i64 %193 to double*
%195 = call i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...) bitcast (i32 (...)* @get_contact_index to i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...)*)(i32 %3, i32 %4, double* %157, double* %160, double* %191, double* %194, double 0.000000e+00, double 0.000000e+00, i32* %21, i32* %22, i32* %23, i32* %24)
%196 = icmp eq i32 %195, 0
br i1 %196, label %213, label %197
197: ; preds = %185
%198 = zext i32 %186 to i64
%199 = getelementptr inbounds i32, i32* %12, i64 %198
store i32 1, i32* %199
%200 = getelementptr inbounds i32, i32* %13, i64 %198
store i32 1, i32* %200
%201 = load i32, i32* %23
%202 = getelementptr inbounds i32, i32* %16, i64 %198
store i32 %201, i32* %202
%203 = load i32, i32* %24
%204 = getelementptr inbounds i32, i32* %17, i64 %198
store i32 %203, i32* %204
%205 = load i32, i32* %21
%206 = getelementptr inbounds i32, i32* %14, i64 %198
store i32 %205, i32* %206
%207 = load i32, i32* %22
%208 = getelementptr inbounds i32, i32* %15, i64 %198
store i32 %207, i32* %208
%209 = add nsw i32 %5, -1
%210 = getelementptr inbounds i32, i32* %18, i64 %198
store i32 %209, i32* %210
%211 = getelementptr inbounds i32, i32* %19, i64 %198
store i32 %209, i32* %211
%212 = add nuw nsw i32 %186, 1
br label %213
213: ; preds = %197, %185
%214 = phi i32 [ %212, %197 ], [ %186, %185 ]
%215 = inttoptr i64 %156 to i8*
%216 = inttoptr i64 %159 to i8*
%217 = inttoptr i64 %190 to i8*
%218 = inttoptr i64 %193 to i8*
%219 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @north_bound to i32 (double*, i32, i32, ...)*)(double* %6, i32 %2, i32 %3)
%220 = sext i32 %219 to i64
%221 = inttoptr i64 %220 to double*
%222 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @north_bound to i32 (double*, i32, i32, ...)*)(double* %7, i32 %2, i32 %3)
%223 = sext i32 %222 to i64
%224 = inttoptr i64 %223 to double*
%225 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @south_bound to i32 (double*, i32, i32, ...)*)(double* %8, i32 %4, i32 %5)
%226 = sext i32 %225 to i64
%227 = inttoptr i64 %226 to double*
%228 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @south_bound to i32 (double*, i32, i32, ...)*)(double* %9, i32 %4, i32 %5)
%229 = sext i32 %228 to i64
%230 = inttoptr i64 %229 to double*
%231 = call i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...) bitcast (i32 (...)* @get_contact_index to i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...)*)(i32 %2, i32 %4, double* %221, double* %224, double* %227, double* %230, double 0.000000e+00, double %11, i32* %21, i32* %22, i32* %23, i32* %24)
%232 = icmp eq i32 %231, 0
br i1 %232, label %249, label %233
233: ; preds = %213
%234 = load i32, i32* %21
%235 = zext i32 %214 to i64
%236 = getelementptr inbounds i32, i32* %12, i64 %235
store i32 %234, i32* %236
%237 = load i32, i32* %22
%238 = getelementptr inbounds i32, i32* %13, i64 %235
store i32 %237, i32* %238
%239 = load i32, i32* %23
%240 = getelementptr inbounds i32, i32* %16, i64 %235
store i32 %239, i32* %240
%241 = load i32, i32* %24
%242 = getelementptr inbounds i32, i32* %17, i64 %235
store i32 %241, i32* %242
%243 = add nsw i32 %3, -1
%244 = getelementptr inbounds i32, i32* %14, i64 %235
store i32 %243, i32* %244
%245 = getelementptr inbounds i32, i32* %15, i64 %235
store i32 %243, i32* %245
%246 = getelementptr inbounds i32, i32* %18, i64 %235
store i32 1, i32* %246
%247 = getelementptr inbounds i32, i32* %19, i64 %235
store i32 1, i32* %247
%248 = add nuw nsw i32 %214, 1
br label %249
249: ; preds = %233, %213
%250 = phi i32 [ %248, %233 ], [ %214, %213 ]
%251 = inttoptr i64 %226 to i8*
%252 = inttoptr i64 %229 to i8*
%253 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @west_bound to i32 (double*, i32, i32, ...)*)(double* %8, i32 %4, i32 %5)
%254 = sext i32 %253 to i64
%255 = inttoptr i64 %254 to double*
%256 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @west_bound to i32 (double*, i32, i32, ...)*)(double* %9, i32 %4, i32 %5)
%257 = sext i32 %256 to i64
%258 = inttoptr i64 %257 to double*
%259 = call i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...) bitcast (i32 (...)* @get_contact_index to i32 (i32, i32, double*, double*, double*, double*, double, double, i32*, i32*, i32*, i32*, ...)*)(i32 %2, i32 %5, double* %221, double* %224, double* %255, double* %258, double 0.000000e+00, double 0.000000e+00, i32* %21, i32* %22, i32* %23, i32* %24)
%260 = icmp eq i32 %259, 0
br i1 %260, label %277, label %261
261: ; preds = %249
%262 = load i32, i32* %21
%263 = zext i32 %250 to i64
%264 = getelementptr inbounds i32, i32* %12, i64 %263
store i32 %262, i32* %264
%265 = load i32, i32* %22
%266 = getelementptr inbounds i32, i32* %13, i64 %263
store i32 %265, i32* %266
%267 = getelementptr inbounds i32, i32* %16, i64 %263
store i32 1, i32* %267
%268 = getelementptr inbounds i32, i32* %17, i64 %263
store i32 1, i32* %268
%269 = add nsw i32 %3, -1
%270 = getelementptr inbounds i32, i32* %14, i64 %263
store i32 %269, i32* %270
%271 = getelementptr inbounds i32, i32* %15, i64 %263
store i32 %269, i32* %271
%272 = load i32, i32* %23
%273 = getelementptr inbounds i32, i32* %18, i64 %263
store i32 %272, i32* %273
%274 = load i32, i32* %24
%275 = getelementptr inbounds i32, i32* %19, i64 %263
store i32 %274, i32* %275
%276 = add nuw nsw i32 %250, 1
br label %277
277: ; preds = %249, %261
%278 = phi i32 [ %276, %261 ], [ %250, %249 ]
%279 = inttoptr i64 %220 to i8*
%280 = inttoptr i64 %223 to i8*
br label %339
281: ; preds = %146
%282 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @north_bound to i32 (double*, i32, i32, ...)*)(double* %6, i32 %2, i32 %3)
%283 = sext i32 %282 to i64
%284 = inttoptr i64 %283 to double*
%285 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @north_bound to i32 (double*, i32, i32, ...)*)(double* %7, i32 %2, i32 %3)
%286 = sext i32 %285 to i64
%287 = inttoptr i64 %286 to double*
%288 = sdiv i32 %2, 2
%289 = icmp sgt i32 %2, 1
br i1 %289, label %290, label %322
290: ; preds = %281
%291 = zext i32 %288 to i64
br label %292
292: ; preds = %290, %318
%293 = phi i64 [ 0, %290 ], [ %320, %318 ]
%294 = phi i32 [ 0, %290 ], [ %319, %318 ]
%295 = getelementptr inbounds double, double* %287, i64 %293
%296 = load double, double* %295
%297 = trunc i64 %293 to i32
%298 = xor i32 %297, -1
%299 = add i32 %298, %2
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds double, double* %287, i64 %300
%302 = load double, double* %301
%303 = fcmp une double %296, %302
br i1 %303, label %339, label %304
304: ; preds = %292
%305 = getelementptr inbounds double, double* %284, i64 %293
%306 = load double, double* %305
%307 = getelementptr inbounds double, double* %284, i64 %300
%308 = load double, double* %307
%309 = fsub double %306, %308
%310 = call double @llvm.fabs.f64(double %309)
%311 = fcmp une double %309, 0.000000e+00
%312 = fcmp une double %310, 3.600000e+02
%313 = select i1 %311, i1 %312, i1 false
br i1 %313, label %314, label %318
314: ; preds = %304
%315 = fcmp oeq double %310, 1.800000e+02
br i1 %315, label %316, label %339
316: ; preds = %314
%317 = add nsw i32 %294, 1
br label %318
318: ; preds = %304, %316
%319 = phi i32 [ %317, %316 ], [ %294, %304 ]
%320 = add nuw nsw i64 %293, 1
%321 = icmp eq i64 %320, %291
br i1 %321, label %322, label %292
322: ; preds = %318, %281
%323 = phi i32 [ 0, %281 ], [ %319, %318 ]
%324 = icmp sgt i32 %323, 1
br i1 %324, label %339, label %325
325: ; preds = %322
%326 = sext i32 %149 to i64
%327 = getelementptr inbounds i32, i32* %12, i64 %326
store i32 1, i32* %327
%328 = getelementptr inbounds i32, i32* %13, i64 %326
store i32 %288, i32* %328
%329 = add nsw i32 %2, -1
%330 = getelementptr inbounds i32, i32* %16, i64 %326
store i32 %329, i32* %330
%331 = add nsw i32 %288, 1
%332 = getelementptr inbounds i32, i32* %17, i64 %326
store i32 %331, i32* %332
%333 = add nsw i32 %3, -1
%334 = getelementptr inbounds i32, i32* %14, i64 %326
store i32 %333, i32* %334
%335 = getelementptr inbounds i32, i32* %15, i64 %326
store i32 %333, i32* %335
%336 = getelementptr inbounds i32, i32* %18, i64 %326
store i32 %333, i32* %336
%337 = getelementptr inbounds i32, i32* %19, i64 %326
store i32 %333, i32* %337
%338 = add nsw i32 %149, 1
br label %339
339: ; preds = %292, %314, %322, %325, %277
%340 = phi i64 [ %254, %277 ], [ %283, %325 ], [ %283, %322 ], [ %283, %314 ], [ %283, %292 ]
%341 = phi i64 [ %257, %277 ], [ %286, %325 ], [ %286, %322 ], [ %286, %314 ], [ %286, %292 ]
%342 = phi i32 [ %278, %277 ], [ %338, %325 ], [ %149, %322 ], [ %149, %314 ], [ %149, %292 ]
%343 = inttoptr i64 %340 to i8*
%344 = inttoptr i64 %341 to i8*
ret i32 %342
}