#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int get_overlap_index(double const, double const, int, int, double const *,
                      double const *, int *, int *);
int get_overlap_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, int *istart1,
                        int *iend1, int *jstart1, int *jend1, int *istart2,
                        int *iend2, int *jstart2, int *jend2) {
  int l1, l2, count;
  int p1x[4], p1y[4], p2x[4], p2y[4];
  double dx, dy;
  l2 = 0;
  p2x[0] = 0;
  p2y[0] = 0;
  count = get_overlap_index(x2[l2], y2[l2], nx1, ny1, x1, y1, p1x, p1y);
  p2x[1] = nx2 - 1;
  p2y[1] = 0;
  if (count > 0) {
    l2 = nx2 - 1;
    count =
        get_overlap_index(x2[l2], y2[l2], nx1, ny1, x1, y1, p1x + 1, p1y + 1);
  }
  p2x[2] = 0;
  p2y[2] = ny2 - 1;
  if (count > 0) {
    l2 = (ny2 - 1) * nx2;
    count =
        get_overlap_index(x2[l2], y2[l2], nx1, ny1, x1, y1, p1x + 2, p1y + 2);
  }
  p2x[3] = nx2 - 1;
  p2y[3] = ny2 - 1;
  if (count > 0) {
    l2 = (ny2 - 1) * nx2 + nx2 - 1;
    count =
        get_overlap_index(x2[l2], y2[l2], nx1, ny1, x1, y1, p1x + 3, p1y + 3);
  }
  if (count == 0) {
    l1 = 0;
    p1x[0] = 0;
    p1y[0] = 0;
    count = get_overlap_index(x1[l1], y1[l1], nx2, ny2, x2, y2, p2x, p2y);
    if (count == 0)
      return 0;
    p1x[1] = nx1 - 1;
    p1y[1] = 0;
    l1 = nx1 - 1;
    count =
        get_overlap_index(x1[l1], y1[l1], nx2, ny2, x2, y2, p2x + 1, p2y + 1);
    if (count == 0)
      return 0;
    p1x[2] = 0;
    p1y[2] = ny1 - 1;
    l1 = (ny1 - 1) * nx1;
    count =
        get_overlap_index(x1[l1], y1[l1], nx2, ny2, x2, y2, p2x + 2, p2y + 2);
    if (count == 0)
      return 0;
    p1x[3] = nx1 - 1;
    p1y[3] = ny1 - 1;
    l1 = (ny1 - 1) * nx1 + nx1 - 1;
    count =
        get_overlap_index(x1[l1], y1[l1], nx2, ny2, x2, y2, p2x + 3, p2y + 3);
    if (count == 0)
      return 0;
  }
  if (p1y[0] != p1y[1])
    return 0;
  if (p2y[0] != p2y[1])
    return 0;
  if (p1x[0] != p1x[2])
    return 0;
  if (p2x[0] != p2x[2])
    return 0;
  if (p1y[2] != p1y[3])
    return 0;
  if (p2y[2] != p2y[3])
    return 0;
  if (p1x[1] != p1x[3])
    return 0;
  if (p2x[1] != p2x[3])
    return 0;
  if (p1y[0] == p1y[2] || p1x[0] == p1x[1])
    return 0;
  if (p2y[0] == p2y[2] || p2x[0] == p2x[1])
    return 0;
  istart1[0] = p1x[0] + 1;
  iend1[0] = p1x[1];
  jstart1[0] = p1y[0] + 1;
  jend1[0] = p1y[3];
  istart2[0] = p2x[0] + 1;
  iend2[0] = p2x[1];
  jstart2[0] = p2y[0] + 1;
  jend2[0] = p2y[3];
  return 1;
}


x86 assembly (clang, -O0):
<get_overlap_contact>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%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,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x60(%rbp)
movl   $0x0,-0x70(%rbp)
mov    0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    0x10(%rbp),%rdx
mov    0x18(%rbp),%rcx
lea    -0x40(%rbp),%r8
lea    -0x50(%rbp),%r9
call   1030 <get_overlap_index@plt>
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x5c(%rbp)
movl   $0x0,-0x6c(%rbp)
cmpl   $0x0,-0x28(%rbp)
jle    120f <get_overlap_contact+0xff>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    0x10(%rbp),%rdx
mov    0x18(%rbp),%rcx
lea    -0x40(%rbp),%r8
add    $0x4,%r8
lea    -0x50(%rbp),%r9
add    $0x4,%r9
call   1030 <get_overlap_index@plt>
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x58(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x68(%rbp)
cmpl   $0x0,-0x28(%rbp)
jle    1276 <get_overlap_contact+0x166>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    0x10(%rbp),%rdx
mov    0x18(%rbp),%rcx
lea    -0x40(%rbp),%r8
add    $0x8,%r8
lea    -0x50(%rbp),%r9
add    $0x8,%r9
call   1030 <get_overlap_index@plt>
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x64(%rbp)
cmpl   $0x0,-0x28(%rbp)
jle    12e5 <get_overlap_contact+0x1d5>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
imul   -0x18(%rbp),%eax
add    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    0x10(%rbp),%rdx
mov    0x18(%rbp),%rcx
lea    -0x40(%rbp),%r8
add    $0xc,%r8
lea    -0x50(%rbp),%r9
add    $0xc,%r9
call   1030 <get_overlap_index@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jne    14b4 <get_overlap_contact+0x3a4>
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x50(%rbp)
mov    0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    0x20(%rbp),%rdx
mov    0x28(%rbp),%rcx
lea    -0x60(%rbp),%r8
lea    -0x70(%rbp),%r9
call   1030 <get_overlap_index@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jne    1352 <get_overlap_contact+0x242>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x3c(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    0x20(%rbp),%rdx
mov    0x28(%rbp),%rcx
lea    -0x60(%rbp),%r8
add    $0x4,%r8
lea    -0x70(%rbp),%r9
add    $0x4,%r9
call   1030 <get_overlap_index@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jne    13c1 <get_overlap_contact+0x2b1>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
movl   $0x0,-0x38(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    0x20(%rbp),%rdx
mov    0x28(%rbp),%rcx
lea    -0x60(%rbp),%r8
add    $0x8,%r8
lea    -0x70(%rbp),%r9
add    $0x8,%r9
call   1030 <get_overlap_index@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jne    1434 <get_overlap_contact+0x324>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
imul   -0x10(%rbp),%eax
add    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    0x20(%rbp),%rdx
mov    0x28(%rbp),%rcx
lea    -0x60(%rbp),%r8
add    $0xc,%r8
lea    -0x70(%rbp),%r9
add    $0xc,%r9
call   1030 <get_overlap_index@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jne    14af <get_overlap_contact+0x39f>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
jmp    14b4 <get_overlap_contact+0x3a4>
mov    -0x50(%rbp),%eax
cmp    -0x4c(%rbp),%eax
je     14cc <get_overlap_contact+0x3bc>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
mov    -0x70(%rbp),%eax
cmp    -0x6c(%rbp),%eax
je     14e4 <get_overlap_contact+0x3d4>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
mov    -0x40(%rbp),%eax
cmp    -0x38(%rbp),%eax
je     14fc <get_overlap_contact+0x3ec>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
mov    -0x60(%rbp),%eax
cmp    -0x58(%rbp),%eax
je     1514 <get_overlap_contact+0x404>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
je     152c <get_overlap_contact+0x41c>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
mov    -0x68(%rbp),%eax
cmp    -0x64(%rbp),%eax
je     1544 <get_overlap_contact+0x434>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
mov    -0x3c(%rbp),%eax
cmp    -0x34(%rbp),%eax
je     155c <get_overlap_contact+0x44c>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
mov    -0x5c(%rbp),%eax
cmp    -0x54(%rbp),%eax
je     1574 <get_overlap_contact+0x464>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
mov    -0x50(%rbp),%eax
cmp    -0x48(%rbp),%eax
je     158c <get_overlap_contact+0x47c>
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jne    1598 <get_overlap_contact+0x488>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
mov    -0x70(%rbp),%eax
cmp    -0x68(%rbp),%eax
je     15b0 <get_overlap_contact+0x4a0>
mov    -0x60(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jne    15bc <get_overlap_contact+0x4ac>
movl   $0x0,-0x4(%rbp)
jmp    1617 <get_overlap_contact+0x507>
mov    -0x40(%rbp),%ecx
add    $0x1,%ecx
mov    0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x3c(%rbp),%ecx
mov    0x38(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x50(%rbp),%ecx
add    $0x1,%ecx
mov    0x40(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x44(%rbp),%ecx
mov    0x48(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x60(%rbp),%ecx
add    $0x1,%ecx
mov    0x50(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x5c(%rbp),%ecx
mov    0x58(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x70(%rbp),%ecx
add    $0x1,%ecx
mov    0x60(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x64(%rbp),%ecx
mov    0x68(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_overlap_contact>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %r9d,%ebx
mov    %r8d,%ebp
mov    %ecx,%r15d
mov    %edx,%r14d
mov    0xd8(%rsp),%r12
mov    0xd0(%rsp),%r13
mov    0xc8(%rsp),%rcx
mov    0xc0(%rsp),%rdx
movl   $0x0,(%rsp)
movl   $0x0,0x10(%rsp)
movsd  0x0(%r13),%xmm0
movsd  (%r12),%xmm1
lea    0x40(%rsp),%r8
lea    0x30(%rsp),%r9
mov    %r14d,%edi
mov    %r15d,%esi
call   1030 <get_overlap_index@plt>
mov    %rbp,0x28(%rsp)
add    $0xffffffff,%ebp
mov    %ebp,0x4(%rsp)
movl   $0x0,0x14(%rsp)
test   %eax,%eax
mov    %r14,0x80(%rsp)
jle    12c2 <get_overlap_contact+0x1b2>
movslq %ebp,%rax
movsd  0x0(%r13,%rax,8),%xmm0
movsd  (%r12,%rax,8),%xmm1
lea    0x44(%rsp),%r8
lea    0x34(%rsp),%r9
mov    %r14d,%edi
mov    %r15d,%esi
mov    0xc0(%rsp),%rdx
mov    0xc8(%rsp),%rcx
call   1030 <get_overlap_index@plt>
lea    0x8(%rsp),%rcx
mov    %rcx,0x60(%rsp)
movl   $0x0,0x8(%rsp)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r13,%rdx
mov    %rbx,%r13
lea    -0x1(%rbx),%r12d
lea    0x18(%rsp),%rcx
mov    %rcx,0x58(%rsp)
mov    %r12d,0x18(%rsp)
test   %eax,%eax
jle    12f7 <get_overlap_contact+0x1e7>
mov    %r12d,%eax
imul   0x28(%rsp),%eax
cltq
movsd  (%rdx,%rax,8),%xmm0
movsd  (%rdi,%rax,8),%xmm1
lea    0x48(%rsp),%r8
lea    0x38(%rsp),%r9
mov    %r14d,%edi
mov    %rsi,%r15
mov    0xc0(%rsp),%rbx
mov    %rbx,%rdx
mov    0xc8(%rsp),%rcx
call   1030 <get_overlap_index@plt>
lea    0xc(%rsp),%rsi
mov    %ebp,0xc(%rsp)
lea    0x1c(%rsp),%rbp
mov    %r12d,0x1c(%rsp)
test   %eax,%eax
jle    142a <get_overlap_contact+0x31a>
mov    %r14,%rdi
mov    %r13d,%eax
mov    0x28(%rsp),%r14
imul   %r14d,%eax
cltq
mov    0xd0(%rsp),%rcx
movsd  -0x8(%rcx,%rax,8),%xmm0
mov    0xd8(%rsp),%r12
movsd  -0x8(%r12,%rax,8),%xmm1
lea    0x4c(%rsp),%r8
lea    0x3c(%rsp),%r9
mov    %r15d,%esi
mov    %rbx,%rdx
mov    0xc8(%rsp),%rbx
mov    %rbx,%rcx
call   1030 <get_overlap_index@plt>
lea    0xc(%rsp),%rsi
test   %eax,%eax
jne    132b <get_overlap_contact+0x21b>
jmp    1447 <get_overlap_contact+0x337>
mov    0xc8(%rsp),%rdx
mov    %r12,%rcx
lea    0x8(%rsp),%rsi
mov    %rsi,0x60(%rsp)
movl   $0x0,0x8(%rsp)
mov    %rbx,%r13
lea    -0x1(%rbx),%r12d
lea    0x18(%rsp),%rsi
mov    %rsi,0x58(%rsp)
mov    %r12d,0x18(%rsp)
jmp    1305 <get_overlap_contact+0x1f5>
mov    0xc8(%rsp),%rdx
mov    %rdi,%rcx
mov    %rsi,%r15
lea    0xc(%rsp),%rsi
mov    %ebp,0xc(%rsp)
lea    0x1c(%rsp),%rbp
mov    %r12d,0x1c(%rsp)
mov    %rcx,%r12
mov    0x28(%rsp),%r14
mov    %rdx,%rbx
test   %eax,%eax
je     1447 <get_overlap_contact+0x337>
mov    0x30(%rsp),%ecx
xor    %esi,%esi
cmp    0x34(%rsp),%ecx
jne    15a8 <get_overlap_contact+0x498>
mov    0x10(%rsp),%eax
cmp    0x14(%rsp),%eax
jne    15a8 <get_overlap_contact+0x498>
mov    0x40(%rsp),%edi
cmp    0x48(%rsp),%edi
jne    15a8 <get_overlap_contact+0x498>
mov    (%rsp),%edx
cmp    0x8(%rsp),%edx
jne    15a8 <get_overlap_contact+0x498>
mov    0x38(%rsp),%ebx
cmp    0x3c(%rsp),%ebx
jne    15a8 <get_overlap_contact+0x498>
mov    0x18(%rsp),%ebp
cmp    0x1c(%rsp),%ebp
jne    15a8 <get_overlap_contact+0x498>
mov    0x44(%rsp),%r9d
cmp    0x4c(%rsp),%r9d
jne    15a8 <get_overlap_contact+0x498>
mov    0x4(%rsp),%r8d
cmp    0xc(%rsp),%r8d
jne    15a8 <get_overlap_contact+0x498>
cmp    %ebx,%ecx
je     15a8 <get_overlap_contact+0x498>
cmp    %r9d,%edi
je     15a8 <get_overlap_contact+0x498>
cmp    %ebp,%eax
je     15a8 <get_overlap_contact+0x498>
cmp    %r8d,%edx
je     15a8 <get_overlap_contact+0x498>
mov    0xe0(%rsp),%rsi
add    $0x1,%edi
mov    %edi,(%rsi)
mov    0xe8(%rsp),%rdi
mov    %r9d,(%rdi)
mov    0xf0(%rsp),%rdi
add    $0x1,%ecx
mov    %ecx,(%rdi)
mov    0xf8(%rsp),%rcx
mov    %ebx,(%rcx)
mov    0x100(%rsp),%rcx
add    $0x1,%edx
mov    %edx,(%rcx)
mov    0x108(%rsp),%rcx
mov    %r8d,(%rcx)
mov    0x110(%rsp),%rcx
add    $0x1,%eax
mov    %eax,(%rcx)
mov    0x118(%rsp),%rax
mov    %ebp,(%rax)
mov    $0x1,%esi
jmp    15a8 <get_overlap_contact+0x498>
mov    0xd8(%rsp),%r12
mov    0x28(%rsp),%r14
mov    0xc8(%rsp),%rbx
test   %eax,%eax
jne    132b <get_overlap_contact+0x21b>
mov    %rbp,0x70(%rsp)
mov    %rsi,0x78(%rsp)
mov    %r15,0x28(%rsp)
movl   $0x0,0x40(%rsp)
movl   $0x0,0x30(%rsp)
mov    0xc0(%rsp),%rax
movsd  (%rax),%xmm0
movsd  (%rbx),%xmm1
mov    %rsp,%r8
lea    0x10(%rsp),%r9
mov    %r14d,%edi
mov    %r13d,%esi
mov    0xd0(%rsp),%r15
mov    %r15,%rdx
mov    %r12,%rcx
call   1030 <get_overlap_index@plt>
xor    %esi,%esi
test   %eax,%eax
je     15a8 <get_overlap_contact+0x498>
lea    0x4(%rsp),%r8
lea    0x14(%rsp),%r9
mov    0x80(%rsp),%rbp
lea    -0x1(%rbp),%eax
mov    %eax,0x54(%rsp)
mov    %eax,0x44(%rsp)
movl   $0x0,0x34(%rsp)
movslq %ebp,%rax
mov    0xc0(%rsp),%rcx
movsd  -0x8(%rcx,%rax,8),%xmm0
movsd  -0x8(%rbx,%rax,8),%xmm1
mov    %r14d,%edi
mov    %r13d,%esi
mov    %r15,%rdx
mov    %r12,%rcx
call   1030 <get_overlap_index@plt>
test   %eax,%eax
je     15a6 <get_overlap_contact+0x496>
movl   $0x0,0x48(%rsp)
mov    %r12,%r8
mov    %r13,%rsi
mov    0x28(%rsp),%r13
lea    -0x1(%r13),%r12d
mov    %r12d,0x38(%rsp)
mov    %r12d,%eax
imul   %ebp,%eax
cltq
mov    0xc0(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  (%rbx,%rax,8),%xmm1
mov    %r14d,%edi
mov    %rsi,0x68(%rsp)
mov    %r15,%rdx
mov    %r8,%rcx
mov    0x60(%rsp),%r8
mov    0x58(%rsp),%r9
call   1030 <get_overlap_index@plt>
test   %eax,%eax
je     15a6 <get_overlap_contact+0x496>
mov    0x54(%rsp),%eax
mov    %eax,0x4c(%rsp)
mov    %r12d,0x3c(%rsp)
imul   %ebp,%r13d
movslq %r13d,%rax
mov    0xc0(%rsp),%rcx
movsd  -0x8(%rcx,%rax,8),%xmm0
movsd  -0x8(%rbx,%rax,8),%xmm1
mov    %r14d,%edi
mov    0x68(%rsp),%rsi
mov    %r15,%rdx
mov    0xd8(%rsp),%rcx
mov    0x78(%rsp),%r8
mov    0x70(%rsp),%r9
call   1030 <get_overlap_index@plt>
test   %eax,%eax
mov    $0x0,%esi
jne    132b <get_overlap_contact+0x21b>
jmp    15a8 <get_overlap_contact+0x498>
xor    %esi,%esi
mov    %esi,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @get_overlap_contact(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, double* %6, double* %7, double* %8, double* %9, i32* nocapture writeonly %10, i32* nocapture writeonly %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) {
%19 = alloca [4 x i32]
%20 = alloca [4 x i32]
%21 = alloca [4 x i32]
%22 = alloca [4 x i32]
%23 = bitcast [4 x i32]* %19 to i8*
%24 = bitcast [4 x i32]* %20 to i8*
%25 = bitcast [4 x i32]* %21 to i8*
%26 = bitcast [4 x i32]* %22 to i8*
%27 = getelementptr inbounds [4 x i32], [4 x i32]* %21, i64 0, i64 0
store i32 0, i32* %27
%28 = getelementptr inbounds [4 x i32], [4 x i32]* %22, i64 0, i64 0
store i32 0, i32* %28
%29 = load double, double* %8
%30 = load double, double* %9
%31 = getelementptr inbounds [4 x i32], [4 x i32]* %19, i64 0, i64 0
%32 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 0
%33 = call i32 @get_overlap_index(double %29, double %30, i32 %2, i32 %3, double* %6, double* %7, i32* %31, i32* %32)
%34 = add nsw i32 %4, -1
%35 = getelementptr inbounds [4 x i32], [4 x i32]* %21, i64 0, i64 1
store i32 %34, i32* %35
%36 = getelementptr inbounds [4 x i32], [4 x i32]* %22, i64 0, i64 1
store i32 0, i32* %36
%37 = icmp sgt i32 %33, 0
br i1 %37, label %42, label %38
38: ; preds = %18
%39 = getelementptr inbounds [4 x i32], [4 x i32]* %21, i64 0, i64 2
store i32 0, i32* %39
%40 = add nsw i32 %5, -1
%41 = getelementptr inbounds [4 x i32], [4 x i32]* %22, i64 0, i64 2
store i32 %40, i32* %41
br label %55
42: ; preds = %18
%43 = sext i32 %34 to i64
%44 = getelementptr inbounds double, double* %8, i64 %43
%45 = load double, double* %44
%46 = getelementptr inbounds double, double* %9, i64 %43
%47 = load double, double* %46
%48 = getelementptr inbounds [4 x i32], [4 x i32]* %19, i64 0, i64 1
%49 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 1
%50 = call i32 @get_overlap_index(double %45, double %47, i32 %2, i32 %3, double* %6, double* %7, i32* %48, i32* %49)
%51 = getelementptr inbounds [4 x i32], [4 x i32]* %21, i64 0, i64 2
store i32 0, i32* %51
%52 = add nsw i32 %5, -1
%53 = getelementptr inbounds [4 x i32], [4 x i32]* %22, i64 0, i64 2
store i32 %52, i32* %53
%54 = icmp sgt i32 %50, 0
br i1 %54, label %62, label %55
55: ; preds = %42, %38
%56 = phi i32* [ %41, %38 ], [ %53, %42 ]
%57 = phi i32 [ %40, %38 ], [ %52, %42 ]
%58 = phi i32* [ %39, %38 ], [ %51, %42 ]
%59 = phi i32 [ %33, %38 ], [ %50, %42 ]
%60 = getelementptr inbounds [4 x i32], [4 x i32]* %21, i64 0, i64 3
store i32 %34, i32* %60
%61 = getelementptr inbounds [4 x i32], [4 x i32]* %22, i64 0, i64 3
store i32 %57, i32* %61
br label %86
62: ; preds = %42
%63 = mul nsw i32 %52, %4
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double, double* %8, i64 %64
%66 = load double, double* %65
%67 = getelementptr inbounds double, double* %9, i64 %64
%68 = load double, double* %67
%69 = getelementptr inbounds [4 x i32], [4 x i32]* %19, i64 0, i64 2
%70 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 2
%71 = call i32 @get_overlap_index(double %66, double %68, i32 %2, i32 %3, double* %6, double* %7, i32* %69, i32* %70)
%72 = getelementptr inbounds [4 x i32], [4 x i32]* %21, i64 0, i64 3
store i32 %34, i32* %72
%73 = getelementptr inbounds [4 x i32], [4 x i32]* %22, i64 0, i64 3
store i32 %52, i32* %73
%74 = icmp sgt i32 %71, 0
br i1 %74, label %75, label %86
75: ; preds = %62
%76 = mul i32 %5, %4
%77 = add nsw i32 %76, -1
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %8, i64 %78
%80 = load double, double* %79
%81 = getelementptr inbounds double, double* %9, i64 %78
%82 = load double, double* %81
%83 = getelementptr inbounds [4 x i32], [4 x i32]* %19, i64 0, i64 3
%84 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 3
%85 = call i32 @get_overlap_index(double %80, double %82, i32 %2, i32 %3, double* %6, double* %7, i32* %83, i32* %84)
br label %86
86: ; preds = %55, %75, %62
%87 = phi i32* [ %73, %75 ], [ %73, %62 ], [ %61, %55 ]
%88 = phi i32* [ %72, %75 ], [ %72, %62 ], [ %60, %55 ]
%89 = phi i32* [ %51, %75 ], [ %51, %62 ], [ %58, %55 ]
%90 = phi i32* [ %53, %75 ], [ %53, %62 ], [ %56, %55 ]
%91 = phi i32 [ %85, %75 ], [ %71, %62 ], [ %59, %55 ]
%92 = icmp eq i32 %91, 0
br i1 %92, label %93, label %133
93: ; preds = %86
store i32 0, i32* %31
store i32 0, i32* %32
%94 = load double, double* %6
%95 = load double, double* %7
%96 = call i32 @get_overlap_index(double %94, double %95, i32 %4, i32 %5, double* %8, double* %9, i32* %27, i32* %28)
%97 = icmp eq i32 %96, 0
br i1 %97, label %184, label %98
98: ; preds = %93
%99 = add nsw i32 %2, -1
%100 = getelementptr inbounds [4 x i32], [4 x i32]* %19, i64 0, i64 1
store i32 %99, i32* %100
%101 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 1
store i32 0, i32* %101
%102 = sext i32 %99 to i64
%103 = getelementptr inbounds double, double* %6, i64 %102
%104 = load double, double* %103
%105 = getelementptr inbounds double, double* %7, i64 %102
%106 = load double, double* %105
%107 = call i32 @get_overlap_index(double %104, double %106, i32 %4, i32 %5, double* %8, double* %9, i32* %35, i32* %36)
%108 = icmp eq i32 %107, 0
br i1 %108, label %184, label %109
109: ; preds = %98
%110 = getelementptr inbounds [4 x i32], [4 x i32]* %19, i64 0, i64 2
store i32 0, i32* %110
%111 = add nsw i32 %3, -1
%112 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 2
store i32 %111, i32* %112
%113 = mul nsw i32 %111, %2
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double, double* %6, i64 %114
%116 = load double, double* %115
%117 = getelementptr inbounds double, double* %7, i64 %114
%118 = load double, double* %117
%119 = call i32 @get_overlap_index(double %116, double %118, i32 %4, i32 %5, double* %8, double* %9, i32* %89, i32* %90)
%120 = icmp eq i32 %119, 0
br i1 %120, label %184, label %121
121: ; preds = %109
%122 = getelementptr inbounds [4 x i32], [4 x i32]* %19, i64 0, i64 3
store i32 %99, i32* %122
%123 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 3
store i32 %111, i32* %123
%124 = mul i32 %3, %2
%125 = add nsw i32 %124, -1
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds double, double* %6, i64 %126
%128 = load double, double* %127
%129 = getelementptr inbounds double, double* %7, i64 %126
%130 = load double, double* %129
%131 = call i32 @get_overlap_index(double %128, double %130, i32 %4, i32 %5, double* %8, double* %9, i32* %88, i32* %87)
%132 = icmp eq i32 %131, 0
br i1 %132, label %184, label %133
133: ; preds = %121, %86
%134 = load i32, i32* %32
%135 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 1
%136 = load i32, i32* %135
%137 = icmp eq i32 %134, %136
br i1 %137, label %138, label %184
138: ; preds = %133
%139 = load i32, i32* %28
%140 = load i32, i32* %36
%141 = icmp eq i32 %139, %140
br i1 %141, label %142, label %184
142: ; preds = %138
%143 = load i32, i32* %31
%144 = getelementptr inbounds [4 x i32], [4 x i32]* %19, i64 0, i64 2
%145 = load i32, i32* %144
%146 = icmp eq i32 %143, %145
br i1 %146, label %147, label %184
147: ; preds = %142
%148 = load i32, i32* %27
%149 = load i32, i32* %89
%150 = icmp eq i32 %148, %149
br i1 %150, label %151, label %184
151: ; preds = %147
%152 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 2
%153 = load i32, i32* %152
%154 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 3
%155 = load i32, i32* %154
%156 = icmp eq i32 %153, %155
br i1 %156, label %157, label %184
157: ; preds = %151
%158 = load i32, i32* %90
%159 = load i32, i32* %87
%160 = icmp eq i32 %158, %159
br i1 %160, label %161, label %184
161: ; preds = %157
%162 = getelementptr inbounds [4 x i32], [4 x i32]* %19, i64 0, i64 1
%163 = load i32, i32* %162
%164 = getelementptr inbounds [4 x i32], [4 x i32]* %19, i64 0, i64 3
%165 = load i32, i32* %164
%166 = icmp eq i32 %163, %165
br i1 %166, label %167, label %184
167: ; preds = %161
%168 = load i32, i32* %35
%169 = load i32, i32* %88
%170 = icmp eq i32 %168, %169
br i1 %170, label %171, label %184
171: ; preds = %167
%172 = icmp eq i32 %134, %153
%173 = icmp eq i32 %143, %163
%174 = select i1 %172, i1 true, i1 %173
br i1 %174, label %184, label %175
175: ; preds = %171
%176 = icmp eq i32 %139, %158
%177 = icmp eq i32 %148, %168
%178 = select i1 %176, i1 true, i1 %177
br i1 %178, label %184, label %179
179: ; preds = %175
%180 = add nsw i32 %143, 1
store i32 %180, i32* %10
store i32 %163, i32* %11
%181 = add nsw i32 %134, 1
store i32 %181, i32* %12
store i32 %153, i32* %13
%182 = add nsw i32 %148, 1
store i32 %182, i32* %14
store i32 %168, i32* %15
%183 = add nsw i32 %139, 1
store i32 %183, i32* %16
store i32 %158, i32* %17
br label %184
184: ; preds = %175, %171, %167, %161, %157, %151, %147, %142, %138, %133, %121, %109, %98, %93, %179
%185 = phi i32 [ 1, %179 ], [ 0, %93 ], [ 0, %98 ], [ 0, %109 ], [ 0, %121 ], [ 0, %133 ], [ 0, %138 ], [ 0, %142 ], [ 0, %147 ], [ 0, %151 ], [ 0, %157 ], [ 0, %161 ], [ 0, %167 ], [ 0, %171 ], [ 0, %175 ]
ret i32 %185
}