#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 /*<<< orphan*/ free(double *);
double great_circle_distance(double *, double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ mid_pt_sphere(double *, double *, double *);
void get_edge(int nx, int ny, const double *lont, const double *latt,
              const double *lonc, const double *latc, double *edge_w,
              double *edge_e, double *edge_s, double *edge_n, int on_west_edge,
              int on_east_edge, int on_south_edge, int on_north_edge) {
  int i, j, nxp, nyp;
  int istart, iend, jstart, jend;
  double p1[2], p2[2];
  double *py, *px;
  double d1, d2;
  nxp = nx + 1;
  nyp = ny + 1;
  for (i = 0; i < nxp; i++) {
    edge_s[i] = 0.5;
    edge_n[i] = 0.5;
  }
  for (j = 0; j < nyp; j++) {
    edge_w[j] = 0.5;
    edge_e[j] = 0.5;
  }
  px = (double *)malloc(2 * (nx + 2) * sizeof(double));
  py = (double *)malloc(2 * (ny + 2) * sizeof(double));
  if (on_west_edge)
    istart = 1;
  else
    istart = 0;
  if (on_east_edge)
    iend = nx;
  else
    iend = nxp;
  if (on_south_edge)
    jstart = 1;
  else
    jstart = 0;
  if (on_north_edge)
    jend = ny;
  else
    jend = nyp;
  if (on_west_edge) {
    i = 0;
    for (j = jstart; j <= jend; j++) {
      p1[0] = lont[j * (nx + 2) + i];
      p1[1] = latt[j * (nx + 2) + i];
      p2[0] = lont[j * (nx + 2) + i + 1];
      p2[1] = latt[j * (nx + 2) + i + 1];
      mid_pt_sphere(p1, p2, &(py[2 * j]));
    }
    for (j = jstart; j < jend; j++) {
      p1[0] = lonc[j * nxp + i];
      p1[1] = latc[j * nxp + i];
      d1 = great_circle_distance(py + 2 * j, p1);
      d2 = great_circle_distance(py + 2 * (j + 1), p1);
      edge_w[j] = d2 / (d1 + d2);
    }
  }
  if (on_east_edge) {
    i = nx;
    for (j = jstart; j <= jend; j++) {
      p1[0] = lont[j * (nx + 2) + i];
      p1[1] = latt[j * (nx + 2) + i];
      p2[0] = lont[j * (nx + 2) + i + 1];
      p2[1] = latt[j * (nx + 2) + i + 1];
      mid_pt_sphere(p1, p2, &(py[2 * j]));
    }
    for (j = jstart; j < jend; j++) {
      p1[0] = lonc[j * nxp + i];
      p1[1] = latc[j * nxp + i];
      d1 = great_circle_distance(&(py[2 * j]), p1);
      d2 = great_circle_distance(&(py[2 * (j + 1)]), p1);
      edge_e[j] = d2 / (d1 + d2);
    }
  }
  if (on_south_edge) {
    j = 0;
    for (i = istart; i <= iend; i++) {
      p1[0] = lont[j * (nx + 2) + i];
      p1[1] = latt[j * (nx + 2) + i];
      p2[0] = lont[(j + 1) * (nx + 2) + i];
      p2[1] = latt[(j + 1) * (nx + 2) + i];
      mid_pt_sphere(p1, p2, &(px[2 * i]));
    }
    for (i = istart; i < iend; i++) {
      p1[0] = lonc[j * nxp + i];
      p1[1] = latc[j * nxp + i];
      d1 = great_circle_distance(&(px[2 * i]), p1);
      d2 = great_circle_distance(&(px[2 * (i + 1)]), p1);
      edge_s[i] = d2 / (d1 + d2);
    }
  }
  if (on_north_edge) {
    j = ny;
    for (i = istart; i <= iend; i++) {
      p1[0] = lont[j * (nx + 2) + i];
      p1[1] = latt[j * (nx + 2) + i];
      p2[0] = lont[(j + 1) * (nx + 2) + i];
      p2[1] = latt[(j + 1) * (nx + 2) + i];
      mid_pt_sphere(p1, p2, &(px[2 * i]));
    }
    for (i = istart; i < iend; i++) {
      p1[0] = lonc[j * nxp + i];
      p1[1] = latc[j * nxp + i];
      d1 = great_circle_distance(&(px[2 * i]), p1);
      d2 = great_circle_distance(&(px[2 * (i + 1)]), p1);
      edge_n[i] = d2 / (d1 + d2);
    }
  }
  free(px);
  free(py);
}


x86 assembly (clang, -O0):
<get_edge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    11da <get_edge+0x9a>
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  0xe4e(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  0xe39(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1196 <get_edge+0x56>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    1225 <get_edge+0xe5>
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  0xe03(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  0xdee(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11e1 <get_edge+0xa1>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x80(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x78(%rbp)
cmpl   $0x0,0x30(%rbp)
je     126f <get_edge+0x12f>
movl   $0x1,-0x3c(%rbp)
jmp    1276 <get_edge+0x136>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x0,0x38(%rbp)
je     128b <get_edge+0x14b>
mov    -0x4(%rbp),%eax
mov    %eax,-0x40(%rbp)
jmp    1291 <get_edge+0x151>
mov    -0x34(%rbp),%eax
mov    %eax,-0x40(%rbp)
cmpl   $0x0,0x40(%rbp)
je     12a7 <get_edge+0x167>
movl   $0x1,-0x44(%rbp)
jmp    12ae <get_edge+0x16e>
movl   $0x0,-0x44(%rbp)
cmpl   $0x0,0x48(%rbp)
je     12c3 <get_edge+0x183>
mov    -0x8(%rbp),%eax
mov    %eax,-0x48(%rbp)
jmp    12c9 <get_edge+0x189>
mov    -0x38(%rbp),%eax
mov    %eax,-0x48(%rbp)
cmpl   $0x0,0x30(%rbp)
je     146f <get_edge+0x32f>
movl   $0x0,-0x2c(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x48(%rbp),%eax
jg     13a0 <get_edge+0x260>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
lea    -0x60(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    -0x78(%rbp),%rdx
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
call   1040 <mid_pt_sphere@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    12e0 <get_edge+0x1a0>
mov    -0x44(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x48(%rbp),%eax
jge    146a <get_edge+0x32a>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x78(%rbp),%rdi
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
lea    -0x60(%rbp),%rsi
call   1050 <great_circle_distance@plt>
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x78(%rbp),%rdi
mov    -0x30(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
lea    -0x60(%rbp),%rsi
call   1050 <great_circle_distance@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
addsd  -0x90(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    13a6 <get_edge+0x266>
jmp    146f <get_edge+0x32f>
cmpl   $0x0,0x38(%rbp)
je     1614 <get_edge+0x4d4>
mov    -0x4(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x48(%rbp),%eax
jg     1545 <get_edge+0x405>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
lea    -0x60(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    -0x78(%rbp),%rdx
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
call   1040 <mid_pt_sphere@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1485 <get_edge+0x345>
mov    -0x44(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x48(%rbp),%eax
jge    160f <get_edge+0x4cf>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x78(%rbp),%rdi
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
lea    -0x60(%rbp),%rsi
call   1050 <great_circle_distance@plt>
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x78(%rbp),%rdi
mov    -0x30(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
lea    -0x60(%rbp),%rsi
call   1050 <great_circle_distance@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
addsd  -0x90(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    154b <get_edge+0x40b>
jmp    1614 <get_edge+0x4d4>
cmpl   $0x0,0x40(%rbp)
je     17ba <get_edge+0x67a>
movl   $0x0,-0x30(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jg     16eb <get_edge+0x5ab>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
lea    -0x60(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    -0x80(%rbp),%rdx
mov    -0x2c(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
call   1040 <mid_pt_sphere@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    162b <get_edge+0x4eb>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    17b5 <get_edge+0x675>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x80(%rbp),%rdi
mov    -0x2c(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
lea    -0x60(%rbp),%rsi
call   1050 <great_circle_distance@plt>
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x80(%rbp),%rdi
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
lea    -0x60(%rbp),%rsi
call   1050 <great_circle_distance@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
addsd  -0x90(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    16f1 <get_edge+0x5b1>
jmp    17ba <get_edge+0x67a>
cmpl   $0x0,0x48(%rbp)
je     195f <get_edge+0x81f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jg     1890 <get_edge+0x750>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
mov    -0x4(%rbp),%edx
add    $0x2,%edx
imul   %edx,%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
lea    -0x60(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    -0x80(%rbp),%rdx
mov    -0x2c(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
call   1040 <mid_pt_sphere@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    17d0 <get_edge+0x690>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    195a <get_edge+0x81a>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x80(%rbp),%rdi
mov    -0x2c(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
lea    -0x60(%rbp),%rsi
call   1050 <great_circle_distance@plt>
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x80(%rbp),%rdi
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
lea    -0x60(%rbp),%rsi
call   1050 <great_circle_distance@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
addsd  -0x90(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
mov    0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1896 <get_edge+0x756>
jmp    195f <get_edge+0x81f>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_edge>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %r9,%r14
mov    %r8,%r15
mov    %esi,%r12d
mov    0xf8(%rsp),%r10
mov    0xf0(%rsp),%rbx
lea    0x1(%rdi),%r13d
mov    %rdi,0x90(%rsp)
test   %edi,%edi
js     1328 <get_edge+0x1e8>
mov    %r13d,%r9d
cmp    $0x4,%r13d
jb     11a1 <get_edge+0x61>
lea    (%r10,%r9,8),%rax
cmp    %rbx,%rax
jbe    1224 <get_edge+0xe4>
lea    (%rbx,%r9,8),%rax
cmp    %r10,%rax
jbe    1224 <get_edge+0xe4>
xor    %ebp,%ebp
mov    %rbp,%r8
not    %r8
add    %r9,%r8
mov    %r9,%rsi
and    $0x3,%rsi
je     11d2 <get_edge+0x92>
movabs $0x3fe0000000000000,%rdi
nop
mov    %rdi,(%rbx,%rbp,8)
mov    %rdi,(%r10,%rbp,8)
add    $0x1,%rbp
add    $0xffffffffffffffff,%rsi
jne    11c0 <get_edge+0x80>
cmp    $0x3,%r8
jb     1328 <get_edge+0x1e8>
movabs $0x3fe0000000000000,%rsi
cs nopw 0x0(%rax,%rax,1)
mov    %rsi,(%rbx,%rbp,8)
mov    %rsi,(%r10,%rbp,8)
mov    %rsi,0x8(%rbx,%rbp,8)
mov    %rsi,0x8(%r10,%rbp,8)
mov    %rsi,0x10(%rbx,%rbp,8)
mov    %rsi,0x10(%r10,%rbp,8)
mov    %rsi,0x18(%rbx,%rbp,8)
mov    %rsi,0x18(%r10,%rbp,8)
add    $0x4,%rbp
cmp    %rbp,%r9
jne    11f0 <get_edge+0xb0>
jmp    1328 <get_edge+0x1e8>
mov    %r9d,%ebp
and    $0xfffffffc,%ebp
lea    -0x4(%rbp),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%r8d
and    $0x3,%r8d
cmp    $0xc,%rdi
jae    124d <get_edge+0x10d>
xor    %edi,%edi
jmp    12d0 <get_edge+0x190>
and    $0xfffffffffffffffc,%rsi
xor    %edi,%edi
movapd 0xda5(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movupd %xmm0,(%rbx,%rdi,8)
movupd %xmm0,0x10(%rbx,%rdi,8)
movupd %xmm0,(%r10,%rdi,8)
movupd %xmm0,0x10(%r10,%rdi,8)
movupd %xmm0,0x20(%rbx,%rdi,8)
movupd %xmm0,0x30(%rbx,%rdi,8)
movupd %xmm0,0x20(%r10,%rdi,8)
movupd %xmm0,0x30(%r10,%rdi,8)
movupd %xmm0,0x40(%rbx,%rdi,8)
movupd %xmm0,0x50(%rbx,%rdi,8)
movupd %xmm0,0x40(%r10,%rdi,8)
movupd %xmm0,0x50(%r10,%rdi,8)
movupd %xmm0,0x60(%rbx,%rdi,8)
movupd %xmm0,0x70(%rbx,%rdi,8)
movupd %xmm0,0x60(%r10,%rdi,8)
movupd %xmm0,0x70(%r10,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rsi
jne    1260 <get_edge+0x120>
test   %r8,%r8
je     131f <get_edge+0x1df>
lea    (%r10,%rdi,8),%rsi
add    $0x10,%rsi
lea    (%rbx,%rdi,8),%rdi
add    $0x10,%rdi
shl    $0x5,%r8
xor    %eax,%eax
movapd 0xd0d(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd %xmm0,-0x10(%rdi,%rax,1)
movupd %xmm0,(%rdi,%rax,1)
movupd %xmm0,-0x10(%rsi,%rax,1)
movupd %xmm0,(%rsi,%rax,1)
add    $0x20,%rax
cmp    %rax,%r8
jne    1300 <get_edge+0x1c0>
cmp    %r9,%rbp
jne    11a3 <get_edge+0x63>
mov    0xe8(%rsp),%r9
mov    0xe0(%rsp),%r10
lea    0x1(%r12),%eax
mov    %eax,0x64(%rsp)
test   %r12d,%r12d
js     14f8 <get_edge+0x3b8>
mov    0x64(%rsp),%esi
mov    %esi,%eax
cmp    $0x4,%esi
jb     136f <get_edge+0x22f>
lea    (%r9,%rax,8),%rsi
cmp    %r10,%rsi
jbe    13f4 <get_edge+0x2b4>
lea    (%r10,%rax,8),%rsi
cmp    %r9,%rsi
jbe    13f4 <get_edge+0x2b4>
xor    %ebp,%ebp
mov    %rbp,%rbx
not    %rbx
add    %rax,%rbx
mov    %rax,%rsi
and    $0x3,%rsi
je     13a2 <get_edge+0x262>
movabs $0x3fe0000000000000,%rdi
nopl   (%rax)
mov    %rdi,(%r10,%rbp,8)
mov    %rdi,(%r9,%rbp,8)
add    $0x1,%rbp
add    $0xffffffffffffffff,%rsi
jne    1390 <get_edge+0x250>
cmp    $0x3,%rbx
jb     14f8 <get_edge+0x3b8>
movabs $0x3fe0000000000000,%rsi
cs nopw 0x0(%rax,%rax,1)
mov    %rsi,(%r10,%rbp,8)
mov    %rsi,(%r9,%rbp,8)
mov    %rsi,0x8(%r10,%rbp,8)
mov    %rsi,0x8(%r9,%rbp,8)
mov    %rsi,0x10(%r10,%rbp,8)
mov    %rsi,0x10(%r9,%rbp,8)
mov    %rsi,0x18(%r10,%rbp,8)
mov    %rsi,0x18(%r9,%rbp,8)
add    $0x4,%rbp
cmp    %rbp,%rax
jne    13c0 <get_edge+0x280>
jmp    14f8 <get_edge+0x3b8>
mov    %eax,%ebp
and    $0xfffffffc,%ebp
lea    -0x4(%rbp),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%r8d
and    $0x3,%r8d
cmp    $0xc,%rdi
jae    141c <get_edge+0x2dc>
xor    %edi,%edi
jmp    14a8 <get_edge+0x368>
and    $0xfffffffffffffffc,%rsi
xor    %edi,%edi
movapd 0xbd6(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movupd %xmm0,(%r10,%rdi,8)
movupd %xmm0,0x10(%r10,%rdi,8)
movupd %xmm0,(%r9,%rdi,8)
movupd %xmm0,0x10(%r9,%rdi,8)
movupd %xmm0,0x20(%r10,%rdi,8)
movupd %xmm0,0x30(%r10,%rdi,8)
movupd %xmm0,0x20(%r9,%rdi,8)
movupd %xmm0,0x30(%r9,%rdi,8)
movupd %xmm0,0x40(%r10,%rdi,8)
movupd %xmm0,0x50(%r10,%rdi,8)
movupd %xmm0,0x40(%r9,%rdi,8)
movupd %xmm0,0x50(%r9,%rdi,8)
movupd %xmm0,0x60(%r10,%rdi,8)
movupd %xmm0,0x70(%r10,%rdi,8)
movupd %xmm0,0x60(%r9,%rdi,8)
movupd %xmm0,0x70(%r9,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rsi
jne    1430 <get_edge+0x2f0>
test   %r8,%r8
je     14ef <get_edge+0x3af>
lea    (%r9,%rdi,8),%rsi
add    $0x10,%rsi
lea    (%r10,%rdi,8),%rdi
add    $0x10,%rdi
shl    $0x5,%r8
xor    %ebx,%ebx
movapd 0xb35(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movupd %xmm0,-0x10(%rdi,%rbx,1)
movupd %xmm0,(%rdi,%rbx,1)
movupd %xmm0,-0x10(%rsi,%rbx,1)
movupd %xmm0,(%rsi,%rbx,1)
add    $0x20,%rbx
cmp    %rbx,%r8
jne    14d0 <get_edge+0x390>
cmp    %rax,%rbp
jne    1371 <get_edge+0x231>
mov    %rdx,0x80(%rsp)
mov    %rcx,0x48(%rsp)
mov    0x90(%rsp),%rbx
lea    0x2(%rbx),%edi
mov    %edi,0x34(%rsp)
shl    $0x4,%edi
call   1060 <malloc@plt>
mov    %rax,0x68(%rsp)
mov    %r12d,%edi
shl    $0x4,%edi
add    $0x20,%edi
call   1060 <malloc@plt>
cmpl   $0x0,0x108(%rsp)
mov    %r13d,0x60(%rsp)
cmove  %r13d,%ebx
mov    %rbx,0x40(%rsp)
xor    %ecx,%ecx
cmpl   $0x0,0x110(%rsp)
setne  %cl
mov    %ecx,0x8(%rsp)
cmpl   $0x0,0x118(%rsp)
mov    %r12,0xa0(%rsp)
cmove  0x64(%rsp),%r12d
mov    %r12,0x38(%rsp)
mov    %rax,0x58(%rsp)
movl   $0x0,0x4(%rsp)
cmpl   $0x0,0x100(%rsp)
setne  0xf(%rsp)
mov    %r14,0x50(%rsp)
mov    %r15,0x88(%rsp)
je     1714 <get_edge+0x5d4>
mov    0x38(%rsp),%rax
cmp    0x8(%rsp),%eax
mov    0x48(%rsp),%r14
mov    0x80(%rsp),%r15
jl     1641 <get_edge+0x501>
mov    0x8(%rsp),%ebp
movslq 0x34(%rsp),%r12
mov    0x38(%rsp),%rax
lea    0x1(%rax),%r13d
mov    %r12,%rax
imul   %rbp,%rax
lea    0x8(,%rax,8),%rbx
shl    $0x3,%r12
sub    %rbp,%r13
shl    $0x4,%rbp
add    0x58(%rsp),%rbp
nopl   0x0(%rax,%rax,1)
movsd  -0x8(%r15,%rbx,1),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  -0x8(%r14,%rbx,1),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  (%r15,%rbx,1),%xmm0
movsd  %xmm0,0x70(%rsp)
movsd  (%r14,%rbx,1),%xmm0
movsd  %xmm0,0x78(%rsp)
lea    0x10(%rsp),%rdi
lea    0x70(%rsp),%rsi
mov    %rbp,%rdx
call   1040 <mid_pt_sphere@plt>
add    %r12,%rbx
add    $0x10,%rbp
add    $0xffffffffffffffff,%r13
jne    15f0 <get_edge+0x4b0>
mov    0x38(%rsp),%rax
cmp    0x8(%rsp),%eax
mov    0x50(%rsp),%rcx
mov    0x88(%rsp),%rbx
mov    0xe0(%rsp),%r12
jle    1714 <get_edge+0x5d4>
mov    0x8(%rsp),%ebp
movslq 0x60(%rsp),%r14
mov    0x38(%rsp),%r15d
mov    %r14,0x98(%rsp)
imul   %rbp,%r14
lea    0x2(,%rbp,1),%r13
add    %rbp,%r13
sub    %rbp,%r15
shl    $0x4,%rbp
add    0x58(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
movsd  (%rbx,%r14,8),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rcx,%r14,8),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    %rbp,%rdi
lea    0x10(%rsp),%rsi
call   1050 <great_circle_distance@plt>
movsd  %xmm0,0x28(%rsp)
mov    %r13d,%eax
and    $0xfffffffe,%eax
mov    0x58(%rsp),%rcx
lea    (%rcx,%rax,8),%rdi
lea    0x10(%rsp),%rsi
call   1050 <great_circle_distance@plt>
mov    0x50(%rsp),%rcx
movsd  0x28(%rsp),%xmm1
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%r12,%r13,4)
add    0x98(%rsp),%r14
add    $0x10,%rbp
add    $0x2,%r13
add    $0xffffffffffffffff,%r15
jne    16a0 <get_edge+0x560>
cmpl   $0x0,0x108(%rsp)
je     18a6 <get_edge+0x766>
mov    0x38(%rsp),%rax
cmp    0x8(%rsp),%eax
mov    0x48(%rsp),%r14
mov    0x80(%rsp),%r15
jl     17d1 <get_edge+0x691>
mov    0x8(%rsp),%ebp
movslq 0x34(%rsp),%r12
movslq 0x90(%rsp),%rax
mov    0x38(%rsp),%rcx
lea    0x1(%rcx),%r13d
mov    %r12,%rcx
imul   %rbp,%rcx
add    %rax,%rcx
lea    0x8(,%rcx,8),%rbx
shl    $0x3,%r12
sub    %rbp,%r13
shl    $0x4,%rbp
add    0x58(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
movsd  -0x8(%r15,%rbx,1),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  -0x8(%r14,%rbx,1),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  (%r15,%rbx,1),%xmm0
movsd  %xmm0,0x70(%rsp)
movsd  (%r14,%rbx,1),%xmm0
movsd  %xmm0,0x78(%rsp)
lea    0x10(%rsp),%rdi
lea    0x70(%rsp),%rsi
mov    %rbp,%rdx
call   1040 <mid_pt_sphere@plt>
add    %r12,%rbx
add    $0x10,%rbp
add    $0xffffffffffffffff,%r13
jne    1780 <get_edge+0x640>
mov    0x38(%rsp),%rax
cmp    0x8(%rsp),%eax
mov    0x50(%rsp),%r14
mov    0x88(%rsp),%r13
jle    18a6 <get_edge+0x766>
mov    0x8(%rsp),%r12d
movslq 0x60(%rsp),%rbx
movslq 0x90(%rsp),%rax
mov    0x38(%rsp),%r15d
mov    %rbx,0x98(%rsp)
imul   %r12,%rbx
add    %rax,%rbx
lea    (%r12,%r12,1),%rbp
add    $0x2,%rbp
sub    %r12,%r15
shl    $0x4,%r12
add    0x58(%rsp),%r12
nopw   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rbx,8),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%r14,%rbx,8),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    %r12,%rdi
lea    0x10(%rsp),%rsi
call   1050 <great_circle_distance@plt>
movsd  %xmm0,0x28(%rsp)
mov    %ebp,%eax
and    $0xfffffffe,%eax
mov    0x58(%rsp),%rcx
lea    (%rcx,%rax,8),%rdi
lea    0x10(%rsp),%rsi
call   1050 <great_circle_distance@plt>
mov    0xe8(%rsp),%rax
movsd  0x28(%rsp),%xmm1
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rax,%rbp,4)
add    0x98(%rsp),%rbx
add    $0x10,%r12
add    $0x2,%rbp
add    $0xffffffffffffffff,%r15
jne    1830 <get_edge+0x6f0>
mov    0x4(%rsp),%eax
mov    0xf(%rsp),%cl
mov    %cl,%al
mov    %eax,0x4(%rsp)
cmpl   $0x0,0x110(%rsp)
je     1a18 <get_edge+0x8d8>
mov    0x4(%rsp),%eax
cmp    %eax,0x40(%rsp)
mov    0x80(%rsp),%r15
jl     1964 <get_edge+0x824>
mov    0x4(%rsp),%ebx
movslq 0x34(%rsp),%rax
mov    0x40(%rsp),%rcx
lea    0x1(%rcx),%r12d
lea    (%r15,%rax,8),%r13
mov    0x48(%rsp),%rcx
lea    (%rcx,%rax,8),%r14
mov    %rbx,%rbp
shl    $0x4,%rbp
add    0x68(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%r15,%rbx,8),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x48(%rsp),%rax
movsd  (%rax,%rbx,8),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x0(%r13,%rbx,8),%xmm0
movsd  %xmm0,0x70(%rsp)
movsd  (%r14,%rbx,8),%xmm0
movsd  %xmm0,0x78(%rsp)
lea    0x10(%rsp),%rdi
lea    0x70(%rsp),%rsi
mov    %rbp,%rdx
call   1040 <mid_pt_sphere@plt>
add    $0x1,%rbx
add    $0x10,%rbp
cmp    %rbx,%r12
jne    1910 <get_edge+0x7d0>
mov    0x4(%rsp),%eax
cmp    %eax,0x40(%rsp)
mov    0x50(%rsp),%r12
mov    0x88(%rsp),%r13
mov    0xf0(%rsp),%r15
jle    1a18 <get_edge+0x8d8>
mov    0x4(%rsp),%r14d
mov    0x40(%rsp),%ebp
lea    (%r14,%r14,1),%rbx
add    $0x2,%rbx
sub    %r14,%rbp
shl    $0x4,%r14
add    0x68(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  -0x8(%r13,%rbx,4),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  -0x8(%r12,%rbx,4),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    %r14,%rdi
lea    0x10(%rsp),%rsi
call   1050 <great_circle_distance@plt>
movsd  %xmm0,0x28(%rsp)
mov    %ebx,%eax
and    $0xfffffffe,%eax
mov    0x68(%rsp),%rcx
lea    (%rcx,%rax,8),%rdi
lea    0x10(%rsp),%rsi
call   1050 <great_circle_distance@plt>
movsd  0x28(%rsp),%xmm1
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%r15,%rbx,4)
add    $0x2,%rbx
add    $0x10,%r14
add    $0xffffffffffffffff,%rbp
jne    19b0 <get_edge+0x870>
cmpl   $0x0,0x118(%rsp)
mov    0x68(%rsp),%r13
je     1bce <get_edge+0xa8e>
mov    0x4(%rsp),%eax
cmp    %eax,0x40(%rsp)
jl     1af4 <get_edge+0x9b4>
mov    0x64(%rsp),%ecx
mov    0x34(%rsp),%eax
imul   %eax,%ecx
imul   0xa0(%rsp),%eax
mov    0x4(%rsp),%ebp
cltq
movslq %ecx,%rcx
mov    0x40(%rsp),%rdx
lea    0x1(%rdx),%r13d
add    %rbp,%rcx
mov    0x80(%rsp),%rsi
lea    (%rsi,%rcx,8),%rdx
mov    %rdx,0x28(%rsp)
mov    0x48(%rsp),%rdx
lea    (%rdx,%rcx,8),%rbx
add    %rbp,%rax
lea    (%rsi,%rax,8),%r14
lea    (%rdx,%rax,8),%r15
sub    %rbp,%r13
shl    $0x4,%rbp
add    0x68(%rsp),%rbp
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%r14,%r12,8),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%r15,%r12,8),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    0x28(%rsp),%rax
movsd  (%rax,%r12,8),%xmm0
movsd  %xmm0,0x70(%rsp)
movsd  (%rbx,%r12,8),%xmm0
movsd  %xmm0,0x78(%rsp)
lea    0x10(%rsp),%rdi
lea    0x70(%rsp),%rsi
mov    %rbp,%rdx
call   1040 <mid_pt_sphere@plt>
add    $0x1,%r12
add    $0x10,%rbp
cmp    %r12,%r13
jne    1aa0 <get_edge+0x960>
mov    0x4(%rsp),%eax
cmp    %eax,0x40(%rsp)
mov    0xf8(%rsp),%r15
mov    0x50(%rsp),%rcx
mov    0x88(%rsp),%rdx
mov    0x68(%rsp),%r13
jle    1bce <get_edge+0xa8e>
mov    0x60(%rsp),%eax
imul   0xa0(%rsp),%eax
mov    0x4(%rsp),%ebx
cltq
mov    0x40(%rsp),%r12d
lea    (%rdx,%rax,8),%rdx
mov    %rdx,0x48(%rsp)
lea    (%rbx,%rbx,1),%rbp
add    $0x2,%rbp
lea    (%rcx,%rax,8),%rax
mov    %rax,0x50(%rsp)
sub    %rbx,%r12
shl    $0x4,%rbx
add    %r13,%rbx
lea    0x10(%rsp),%r14
nopl   0x0(%rax)
mov    0x48(%rsp),%rax
movsd  -0x8(%rax,%rbp,4),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x50(%rsp),%rax
movsd  -0x8(%rax,%rbp,4),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <great_circle_distance@plt>
movsd  %xmm0,0x28(%rsp)
mov    %ebp,%eax
and    $0xfffffffe,%eax
lea    0x0(,%rax,8),%rdi
add    %r13,%rdi
mov    %r14,%rsi
call   1050 <great_circle_distance@plt>
movsd  0x28(%rsp),%xmm1
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%r15,%rbp,4)
add    $0x2,%rbp
add    $0x10,%rbx
add    $0xffffffffffffffff,%r12
jne    1b60 <get_edge+0xa20>
mov    %r13,%rdi
call   1030 <free@plt>
mov    0x58(%rsp),%rdi
call   1030 <free@plt>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @get_edge(i32 %0, i32 %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, double* %8, double* %9, i32 %10, i32 %11, i32 %12, i32 %13) {
%15 = alloca i32
%16 = alloca i32
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca double*
%22 = alloca double*
%23 = alloca double*
%24 = alloca double*
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca [2 x double]
%38 = alloca [2 x double]
%39 = alloca double*
%40 = alloca double*
%41 = alloca double
%42 = alloca double
store i32 %0, i32* %15
store i32 %1, i32* %16
store double* %2, double** %17
store double* %3, double** %18
store double* %4, double** %19
store double* %5, double** %20
store double* %6, double** %21
store double* %7, double** %22
store double* %8, double** %23
store double* %9, double** %24
store i32 %10, i32* %25
store i32 %11, i32* %26
store i32 %12, i32* %27
store i32 %13, i32* %28
%43 = load i32, i32* %15
%44 = add nsw i32 %43, 1
store i32 %44, i32* %31
%45 = load i32, i32* %16
%46 = add nsw i32 %45, 1
store i32 %46, i32* %32
store i32 0, i32* %29
br label %47
47: ; preds = %60, %14
%48 = load i32, i32* %29
%49 = load i32, i32* %31
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %63
51: ; preds = %47
%52 = load double*, double** %23
%53 = load i32, i32* %29
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %52, i64 %54
store double 5.000000e-01, double* %55
%56 = load double*, double** %24
%57 = load i32, i32* %29
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds double, double* %56, i64 %58
store double 5.000000e-01, double* %59
br label %60
60: ; preds = %51
%61 = load i32, i32* %29
%62 = add nsw i32 %61, 1
store i32 %62, i32* %29
br label %47
63: ; preds = %47
store i32 0, i32* %30
br label %64
64: ; preds = %77, %63
%65 = load i32, i32* %30
%66 = load i32, i32* %32
%67 = icmp slt i32 %65, %66
br i1 %67, label %68, label %80
68: ; preds = %64
%69 = load double*, double** %21
%70 = load i32, i32* %30
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds double, double* %69, i64 %71
store double 5.000000e-01, double* %72
%73 = load double*, double** %22
%74 = load i32, i32* %30
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds double, double* %73, i64 %75
store double 5.000000e-01, double* %76
br label %77
77: ; preds = %68
%78 = load i32, i32* %30
%79 = add nsw i32 %78, 1
store i32 %79, i32* %30
br label %64
80: ; preds = %64
%81 = load i32, i32* %15
%82 = add nsw i32 %81, 2
%83 = mul nsw i32 2, %82
%84 = sext i32 %83 to i64
%85 = mul i64 %84, 8
%86 = trunc i64 %85 to i32
%87 = call i64 @malloc(i32 %86)
%88 = inttoptr i64 %87 to double*
store double* %88, double** %40
%89 = load i32, i32* %16
%90 = add nsw i32 %89, 2
%91 = mul nsw i32 2, %90
%92 = sext i32 %91 to i64
%93 = mul i64 %92, 8
%94 = trunc i64 %93 to i32
%95 = call i64 @malloc(i32 %94)
%96 = inttoptr i64 %95 to double*
store double* %96, double** %39
%97 = load i32, i32* %25
%98 = icmp ne i32 %97, 0
br i1 %98, label %99, label %100
99: ; preds = %80
store i32 1, i32* %33
br label %101
100: ; preds = %80
store i32 0, i32* %33
br label %101
101: ; preds = %100, %99
%102 = load i32, i32* %26
%103 = icmp ne i32 %102, 0
br i1 %103, label %104, label %106
104: ; preds = %101
%105 = load i32, i32* %15
store i32 %105, i32* %34
br label %108
106: ; preds = %101
%107 = load i32, i32* %31
store i32 %107, i32* %34
br label %108
108: ; preds = %106, %104
%109 = load i32, i32* %27
%110 = icmp ne i32 %109, 0
br i1 %110, label %111, label %112
111: ; preds = %108
store i32 1, i32* %35
br label %113
112: ; preds = %108
store i32 0, i32* %35
br label %113
113: ; preds = %112, %111
%114 = load i32, i32* %28
%115 = icmp ne i32 %114, 0
br i1 %115, label %116, label %118
116: ; preds = %113
%117 = load i32, i32* %16
store i32 %117, i32* %36
br label %120
118: ; preds = %113
%119 = load i32, i32* %32
store i32 %119, i32* %36
br label %120
120: ; preds = %118, %116
%121 = load i32, i32* %25
%122 = icmp ne i32 %121, 0
br i1 %122, label %123, label %242
123: ; preds = %120
store i32 0, i32* %29
%124 = load i32, i32* %35
store i32 %124, i32* %30
br label %125
125: ; preds = %184, %123
%126 = load i32, i32* %30
%127 = load i32, i32* %36
%128 = icmp sle i32 %126, %127
br i1 %128, label %129, label %187
129: ; preds = %125
%130 = load double*, double** %17
%131 = load i32, i32* %30
%132 = load i32, i32* %15
%133 = add nsw i32 %132, 2
%134 = mul nsw i32 %131, %133
%135 = load i32, i32* %29
%136 = add nsw i32 %134, %135
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds double, double* %130, i64 %137
%139 = load double, double* %138
%140 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
store double %139, double* %140
%141 = load double*, double** %18
%142 = load i32, i32* %30
%143 = load i32, i32* %15
%144 = add nsw i32 %143, 2
%145 = mul nsw i32 %142, %144
%146 = load i32, i32* %29
%147 = add nsw i32 %145, %146
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %141, i64 %148
%150 = load double, double* %149
%151 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 1
store double %150, double* %151
%152 = load double*, double** %17
%153 = load i32, i32* %30
%154 = load i32, i32* %15
%155 = add nsw i32 %154, 2
%156 = mul nsw i32 %153, %155
%157 = load i32, i32* %29
%158 = add nsw i32 %156, %157
%159 = add nsw i32 %158, 1
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds double, double* %152, i64 %160
%162 = load double, double* %161
%163 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 0
store double %162, double* %163
%164 = load double*, double** %18
%165 = load i32, i32* %30
%166 = load i32, i32* %15
%167 = add nsw i32 %166, 2
%168 = mul nsw i32 %165, %167
%169 = load i32, i32* %29
%170 = add nsw i32 %168, %169
%171 = add nsw i32 %170, 1
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds double, double* %164, i64 %172
%174 = load double, double* %173
%175 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 1
store double %174, double* %175
%176 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
%177 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 0
%178 = load double*, double** %39
%179 = load i32, i32* %30
%180 = mul nsw i32 2, %179
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double, double* %178, i64 %181
%183 = call i32 @mid_pt_sphere(double* %176, double* %177, double* %182)
br label %184
184: ; preds = %129
%185 = load i32, i32* %30
%186 = add nsw i32 %185, 1
store i32 %186, i32* %30
br label %125
187: ; preds = %125
%188 = load i32, i32* %35
store i32 %188, i32* %30
br label %189
189: ; preds = %238, %187
%190 = load i32, i32* %30
%191 = load i32, i32* %36
%192 = icmp slt i32 %190, %191
br i1 %192, label %193, label %241
193: ; preds = %189
%194 = load double*, double** %19
%195 = load i32, i32* %30
%196 = load i32, i32* %31
%197 = mul nsw i32 %195, %196
%198 = load i32, i32* %29
%199 = add nsw i32 %197, %198
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds double, double* %194, i64 %200
%202 = load double, double* %201
%203 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
store double %202, double* %203
%204 = load double*, double** %20
%205 = load i32, i32* %30
%206 = load i32, i32* %31
%207 = mul nsw i32 %205, %206
%208 = load i32, i32* %29
%209 = add nsw i32 %207, %208
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds double, double* %204, i64 %210
%212 = load double, double* %211
%213 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 1
store double %212, double* %213
%214 = load double*, double** %39
%215 = load i32, i32* %30
%216 = mul nsw i32 2, %215
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds double, double* %214, i64 %217
%219 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
%220 = call double @great_circle_distance(double* %218, double* %219)
store double %220, double* %41
%221 = load double*, double** %39
%222 = load i32, i32* %30
%223 = add nsw i32 %222, 1
%224 = mul nsw i32 2, %223
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds double, double* %221, i64 %225
%227 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
%228 = call double @great_circle_distance(double* %226, double* %227)
store double %228, double* %42
%229 = load double, double* %42
%230 = load double, double* %41
%231 = load double, double* %42
%232 = fadd double %230, %231
%233 = fdiv double %229, %232
%234 = load double*, double** %21
%235 = load i32, i32* %30
%236 = sext i32 %235 to i64
%237 = getelementptr inbounds double, double* %234, i64 %236
store double %233, double* %237
br label %238
238: ; preds = %193
%239 = load i32, i32* %30
%240 = add nsw i32 %239, 1
store i32 %240, i32* %30
br label %189
241: ; preds = %189
br label %242
242: ; preds = %241, %120
%243 = load i32, i32* %26
%244 = icmp ne i32 %243, 0
br i1 %244, label %245, label %365
245: ; preds = %242
%246 = load i32, i32* %15
store i32 %246, i32* %29
%247 = load i32, i32* %35
store i32 %247, i32* %30
br label %248
248: ; preds = %307, %245
%249 = load i32, i32* %30
%250 = load i32, i32* %36
%251 = icmp sle i32 %249, %250
br i1 %251, label %252, label %310
252: ; preds = %248
%253 = load double*, double** %17
%254 = load i32, i32* %30
%255 = load i32, i32* %15
%256 = add nsw i32 %255, 2
%257 = mul nsw i32 %254, %256
%258 = load i32, i32* %29
%259 = add nsw i32 %257, %258
%260 = sext i32 %259 to i64
%261 = getelementptr inbounds double, double* %253, i64 %260
%262 = load double, double* %261
%263 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
store double %262, double* %263
%264 = load double*, double** %18
%265 = load i32, i32* %30
%266 = load i32, i32* %15
%267 = add nsw i32 %266, 2
%268 = mul nsw i32 %265, %267
%269 = load i32, i32* %29
%270 = add nsw i32 %268, %269
%271 = sext i32 %270 to i64
%272 = getelementptr inbounds double, double* %264, i64 %271
%273 = load double, double* %272
%274 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 1
store double %273, double* %274
%275 = load double*, double** %17
%276 = load i32, i32* %30
%277 = load i32, i32* %15
%278 = add nsw i32 %277, 2
%279 = mul nsw i32 %276, %278
%280 = load i32, i32* %29
%281 = add nsw i32 %279, %280
%282 = add nsw i32 %281, 1
%283 = sext i32 %282 to i64
%284 = getelementptr inbounds double, double* %275, i64 %283
%285 = load double, double* %284
%286 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 0
store double %285, double* %286
%287 = load double*, double** %18
%288 = load i32, i32* %30
%289 = load i32, i32* %15
%290 = add nsw i32 %289, 2
%291 = mul nsw i32 %288, %290
%292 = load i32, i32* %29
%293 = add nsw i32 %291, %292
%294 = add nsw i32 %293, 1
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds double, double* %287, i64 %295
%297 = load double, double* %296
%298 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 1
store double %297, double* %298
%299 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
%300 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 0
%301 = load double*, double** %39
%302 = load i32, i32* %30
%303 = mul nsw i32 2, %302
%304 = sext i32 %303 to i64
%305 = getelementptr inbounds double, double* %301, i64 %304
%306 = call i32 @mid_pt_sphere(double* %299, double* %300, double* %305)
br label %307
307: ; preds = %252
%308 = load i32, i32* %30
%309 = add nsw i32 %308, 1
store i32 %309, i32* %30
br label %248
310: ; preds = %248
%311 = load i32, i32* %35
store i32 %311, i32* %30
br label %312
312: ; preds = %361, %310
%313 = load i32, i32* %30
%314 = load i32, i32* %36
%315 = icmp slt i32 %313, %314
br i1 %315, label %316, label %364
316: ; preds = %312
%317 = load double*, double** %19
%318 = load i32, i32* %30
%319 = load i32, i32* %31
%320 = mul nsw i32 %318, %319
%321 = load i32, i32* %29
%322 = add nsw i32 %320, %321
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds double, double* %317, i64 %323
%325 = load double, double* %324
%326 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
store double %325, double* %326
%327 = load double*, double** %20
%328 = load i32, i32* %30
%329 = load i32, i32* %31
%330 = mul nsw i32 %328, %329
%331 = load i32, i32* %29
%332 = add nsw i32 %330, %331
%333 = sext i32 %332 to i64
%334 = getelementptr inbounds double, double* %327, i64 %333
%335 = load double, double* %334
%336 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 1
store double %335, double* %336
%337 = load double*, double** %39
%338 = load i32, i32* %30
%339 = mul nsw i32 2, %338
%340 = sext i32 %339 to i64
%341 = getelementptr inbounds double, double* %337, i64 %340
%342 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
%343 = call double @great_circle_distance(double* %341, double* %342)
store double %343, double* %41
%344 = load double*, double** %39
%345 = load i32, i32* %30
%346 = add nsw i32 %345, 1
%347 = mul nsw i32 2, %346
%348 = sext i32 %347 to i64
%349 = getelementptr inbounds double, double* %344, i64 %348
%350 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
%351 = call double @great_circle_distance(double* %349, double* %350)
store double %351, double* %42
%352 = load double, double* %42
%353 = load double, double* %41
%354 = load double, double* %42
%355 = fadd double %353, %354
%356 = fdiv double %352, %355
%357 = load double*, double** %22
%358 = load i32, i32* %30
%359 = sext i32 %358 to i64
%360 = getelementptr inbounds double, double* %357, i64 %359
store double %356, double* %360
br label %361
361: ; preds = %316
%362 = load i32, i32* %30
%363 = add nsw i32 %362, 1
store i32 %363, i32* %30
br label %312
364: ; preds = %312
br label %365
365: ; preds = %364, %242
%366 = load i32, i32* %27
%367 = icmp ne i32 %366, 0
br i1 %367, label %368, label %487
368: ; preds = %365
store i32 0, i32* %30
%369 = load i32, i32* %33
store i32 %369, i32* %29
br label %370
370: ; preds = %429, %368
%371 = load i32, i32* %29
%372 = load i32, i32* %34
%373 = icmp sle i32 %371, %372
br i1 %373, label %374, label %432
374: ; preds = %370
%375 = load double*, double** %17
%376 = load i32, i32* %30
%377 = load i32, i32* %15
%378 = add nsw i32 %377, 2
%379 = mul nsw i32 %376, %378
%380 = load i32, i32* %29
%381 = add nsw i32 %379, %380
%382 = sext i32 %381 to i64
%383 = getelementptr inbounds double, double* %375, i64 %382
%384 = load double, double* %383
%385 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
store double %384, double* %385
%386 = load double*, double** %18
%387 = load i32, i32* %30
%388 = load i32, i32* %15
%389 = add nsw i32 %388, 2
%390 = mul nsw i32 %387, %389
%391 = load i32, i32* %29
%392 = add nsw i32 %390, %391
%393 = sext i32 %392 to i64
%394 = getelementptr inbounds double, double* %386, i64 %393
%395 = load double, double* %394
%396 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 1
store double %395, double* %396
%397 = load double*, double** %17
%398 = load i32, i32* %30
%399 = add nsw i32 %398, 1
%400 = load i32, i32* %15
%401 = add nsw i32 %400, 2
%402 = mul nsw i32 %399, %401
%403 = load i32, i32* %29
%404 = add nsw i32 %402, %403
%405 = sext i32 %404 to i64
%406 = getelementptr inbounds double, double* %397, i64 %405
%407 = load double, double* %406
%408 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 0
store double %407, double* %408
%409 = load double*, double** %18
%410 = load i32, i32* %30
%411 = add nsw i32 %410, 1
%412 = load i32, i32* %15
%413 = add nsw i32 %412, 2
%414 = mul nsw i32 %411, %413
%415 = load i32, i32* %29
%416 = add nsw i32 %414, %415
%417 = sext i32 %416 to i64
%418 = getelementptr inbounds double, double* %409, i64 %417
%419 = load double, double* %418
%420 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 1
store double %419, double* %420
%421 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
%422 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 0
%423 = load double*, double** %40
%424 = load i32, i32* %29
%425 = mul nsw i32 2, %424
%426 = sext i32 %425 to i64
%427 = getelementptr inbounds double, double* %423, i64 %426
%428 = call i32 @mid_pt_sphere(double* %421, double* %422, double* %427)
br label %429
429: ; preds = %374
%430 = load i32, i32* %29
%431 = add nsw i32 %430, 1
store i32 %431, i32* %29
br label %370
432: ; preds = %370
%433 = load i32, i32* %33
store i32 %433, i32* %29
br label %434
434: ; preds = %483, %432
%435 = load i32, i32* %29
%436 = load i32, i32* %34
%437 = icmp slt i32 %435, %436
br i1 %437, label %438, label %486
438: ; preds = %434
%439 = load double*, double** %19
%440 = load i32, i32* %30
%441 = load i32, i32* %31
%442 = mul nsw i32 %440, %441
%443 = load i32, i32* %29
%444 = add nsw i32 %442, %443
%445 = sext i32 %444 to i64
%446 = getelementptr inbounds double, double* %439, i64 %445
%447 = load double, double* %446
%448 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
store double %447, double* %448
%449 = load double*, double** %20
%450 = load i32, i32* %30
%451 = load i32, i32* %31
%452 = mul nsw i32 %450, %451
%453 = load i32, i32* %29
%454 = add nsw i32 %452, %453
%455 = sext i32 %454 to i64
%456 = getelementptr inbounds double, double* %449, i64 %455
%457 = load double, double* %456
%458 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 1
store double %457, double* %458
%459 = load double*, double** %40
%460 = load i32, i32* %29
%461 = mul nsw i32 2, %460
%462 = sext i32 %461 to i64
%463 = getelementptr inbounds double, double* %459, i64 %462
%464 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
%465 = call double @great_circle_distance(double* %463, double* %464)
store double %465, double* %41
%466 = load double*, double** %40
%467 = load i32, i32* %29
%468 = add nsw i32 %467, 1
%469 = mul nsw i32 2, %468
%470 = sext i32 %469 to i64
%471 = getelementptr inbounds double, double* %466, i64 %470
%472 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
%473 = call double @great_circle_distance(double* %471, double* %472)
store double %473, double* %42
%474 = load double, double* %42
%475 = load double, double* %41
%476 = load double, double* %42
%477 = fadd double %475, %476
%478 = fdiv double %474, %477
%479 = load double*, double** %23
%480 = load i32, i32* %29
%481 = sext i32 %480 to i64
%482 = getelementptr inbounds double, double* %479, i64 %481
store double %478, double* %482
br label %483
483: ; preds = %438
%484 = load i32, i32* %29
%485 = add nsw i32 %484, 1
store i32 %485, i32* %29
br label %434
486: ; preds = %434
br label %487
487: ; preds = %486, %365
%488 = load i32, i32* %28
%489 = icmp ne i32 %488, 0
br i1 %489, label %490, label %610
490: ; preds = %487
%491 = load i32, i32* %16
store i32 %491, i32* %30
%492 = load i32, i32* %33
store i32 %492, i32* %29
br label %493
493: ; preds = %552, %490
%494 = load i32, i32* %29
%495 = load i32, i32* %34
%496 = icmp sle i32 %494, %495
br i1 %496, label %497, label %555
497: ; preds = %493
%498 = load double*, double** %17
%499 = load i32, i32* %30
%500 = load i32, i32* %15
%501 = add nsw i32 %500, 2
%502 = mul nsw i32 %499, %501
%503 = load i32, i32* %29
%504 = add nsw i32 %502, %503
%505 = sext i32 %504 to i64
%506 = getelementptr inbounds double, double* %498, i64 %505
%507 = load double, double* %506
%508 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
store double %507, double* %508
%509 = load double*, double** %18
%510 = load i32, i32* %30
%511 = load i32, i32* %15
%512 = add nsw i32 %511, 2
%513 = mul nsw i32 %510, %512
%514 = load i32, i32* %29
%515 = add nsw i32 %513, %514
%516 = sext i32 %515 to i64
%517 = getelementptr inbounds double, double* %509, i64 %516
%518 = load double, double* %517
%519 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 1
store double %518, double* %519
%520 = load double*, double** %17
%521 = load i32, i32* %30
%522 = add nsw i32 %521, 1
%523 = load i32, i32* %15
%524 = add nsw i32 %523, 2
%525 = mul nsw i32 %522, %524
%526 = load i32, i32* %29
%527 = add nsw i32 %525, %526
%528 = sext i32 %527 to i64
%529 = getelementptr inbounds double, double* %520, i64 %528
%530 = load double, double* %529
%531 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 0
store double %530, double* %531
%532 = load double*, double** %18
%533 = load i32, i32* %30
%534 = add nsw i32 %533, 1
%535 = load i32, i32* %15
%536 = add nsw i32 %535, 2
%537 = mul nsw i32 %534, %536
%538 = load i32, i32* %29
%539 = add nsw i32 %537, %538
%540 = sext i32 %539 to i64
%541 = getelementptr inbounds double, double* %532, i64 %540
%542 = load double, double* %541
%543 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 1
store double %542, double* %543
%544 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
%545 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 0
%546 = load double*, double** %40
%547 = load i32, i32* %29
%548 = mul nsw i32 2, %547
%549 = sext i32 %548 to i64
%550 = getelementptr inbounds double, double* %546, i64 %549
%551 = call i32 @mid_pt_sphere(double* %544, double* %545, double* %550)
br label %552
552: ; preds = %497
%553 = load i32, i32* %29
%554 = add nsw i32 %553, 1
store i32 %554, i32* %29
br label %493
555: ; preds = %493
%556 = load i32, i32* %33
store i32 %556, i32* %29
br label %557
557: ; preds = %606, %555
%558 = load i32, i32* %29
%559 = load i32, i32* %34
%560 = icmp slt i32 %558, %559
br i1 %560, label %561, label %609
561: ; preds = %557
%562 = load double*, double** %19
%563 = load i32, i32* %30
%564 = load i32, i32* %31
%565 = mul nsw i32 %563, %564
%566 = load i32, i32* %29
%567 = add nsw i32 %565, %566
%568 = sext i32 %567 to i64
%569 = getelementptr inbounds double, double* %562, i64 %568
%570 = load double, double* %569
%571 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
store double %570, double* %571
%572 = load double*, double** %20
%573 = load i32, i32* %30
%574 = load i32, i32* %31
%575 = mul nsw i32 %573, %574
%576 = load i32, i32* %29
%577 = add nsw i32 %575, %576
%578 = sext i32 %577 to i64
%579 = getelementptr inbounds double, double* %572, i64 %578
%580 = load double, double* %579
%581 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 1
store double %580, double* %581
%582 = load double*, double** %40
%583 = load i32, i32* %29
%584 = mul nsw i32 2, %583
%585 = sext i32 %584 to i64
%586 = getelementptr inbounds double, double* %582, i64 %585
%587 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
%588 = call double @great_circle_distance(double* %586, double* %587)
store double %588, double* %41
%589 = load double*, double** %40
%590 = load i32, i32* %29
%591 = add nsw i32 %590, 1
%592 = mul nsw i32 2, %591
%593 = sext i32 %592 to i64
%594 = getelementptr inbounds double, double* %589, i64 %593
%595 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
%596 = call double @great_circle_distance(double* %594, double* %595)
store double %596, double* %42
%597 = load double, double* %42
%598 = load double, double* %41
%599 = load double, double* %42
%600 = fadd double %598, %599
%601 = fdiv double %597, %600
%602 = load double*, double** %24
%603 = load i32, i32* %29
%604 = sext i32 %603 to i64
%605 = getelementptr inbounds double, double* %602, i64 %604
store double %601, double* %605
br label %606
606: ; preds = %561
%607 = load i32, i32* %29
%608 = add nsw i32 %607, 1
store i32 %608, i32* %29
br label %557
609: ; preds = %557
br label %610
610: ; preds = %609, %487
%611 = load double*, double** %40
%612 = call i32 @free(double* %611)
%613 = load double*, double** %39
%614 = call i32 @free(double* %613)
ret void
}

LLVM IR (-O2):
define void @get_edge(i32 %0, i32 %1, double* nocapture %2, double* nocapture %3, double* nocapture %4, double* nocapture %5, double* nocapture writeonly %6, double* nocapture writeonly %7, double* nocapture writeonly %8, double* nocapture writeonly %9, i32 %10, i32 %11, i32 %12, i32 %13) {
%15 = alloca [2 x double]
%16 = alloca [2 x double]
%17 = bitcast [2 x double]* %15 to i8*
%18 = bitcast [2 x double]* %16 to i8*
%19 = add i32 %0, 1
%20 = add i32 %1, 1
%21 = icmp slt i32 %0, 0
br i1 %21, label %117, label %22
22: ; preds = %14
%23 = zext i32 %19 to i64
%24 = icmp ult i32 %19, 4
br i1 %24, label %100, label %25
25: ; preds = %22
%26 = getelementptr double, double* %8, i64 %23
%27 = getelementptr double, double* %9, i64 %23
%28 = icmp ugt double* %27, %8
%29 = icmp ugt double* %26, %9
%30 = and i1 %28, %29
br i1 %30, label %100, label %31
31: ; preds = %25
%32 = and i64 %23, 4294967292
%33 = add nsw i64 %32, -4
%34 = lshr exact i64 %33, 2
%35 = add nuw nsw i64 %34, 1
%36 = and i64 %35, 3
%37 = icmp ult i64 %33, 12
br i1 %37, label %81, label %38
38: ; preds = %31
%39 = and i64 %35, 9223372036854775804
br label %40
40: ; preds = %40, %38
%41 = phi i64 [ 0, %38 ], [ %78, %40 ]
%42 = phi i64 [ 0, %38 ], [ %79, %40 ]
%43 = getelementptr inbounds double, double* %8, i64 %41
%44 = bitcast double* %43 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %44
%45 = getelementptr inbounds double, double* %43, i64 2
%46 = bitcast double* %45 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %46
%47 = getelementptr inbounds double, double* %9, i64 %41
%48 = bitcast double* %47 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %48
%49 = getelementptr inbounds double, double* %47, i64 2
%50 = bitcast double* %49 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %50
%51 = or i64 %41, 4
%52 = getelementptr inbounds double, double* %8, i64 %51
%53 = bitcast double* %52 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %53
%54 = getelementptr inbounds double, double* %52, i64 2
%55 = bitcast double* %54 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %55
%56 = getelementptr inbounds double, double* %9, i64 %51
%57 = bitcast double* %56 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %57
%58 = getelementptr inbounds double, double* %56, i64 2
%59 = bitcast double* %58 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %59
%60 = or i64 %41, 8
%61 = getelementptr inbounds double, double* %8, i64 %60
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %62
%63 = getelementptr inbounds double, double* %61, i64 2
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %64
%65 = getelementptr inbounds double, double* %9, i64 %60
%66 = bitcast double* %65 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %66
%67 = getelementptr inbounds double, double* %65, i64 2
%68 = bitcast double* %67 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %68
%69 = or i64 %41, 12
%70 = getelementptr inbounds double, double* %8, i64 %69
%71 = bitcast double* %70 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %71
%72 = getelementptr inbounds double, double* %70, i64 2
%73 = bitcast double* %72 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %73
%74 = getelementptr inbounds double, double* %9, i64 %69
%75 = bitcast double* %74 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %75
%76 = getelementptr inbounds double, double* %74, i64 2
%77 = bitcast double* %76 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %77
%78 = add nuw i64 %41, 16
%79 = add nuw i64 %42, 4
%80 = icmp eq i64 %79, %39
br i1 %80, label %81, label %40
81: ; preds = %40, %31
%82 = phi i64 [ 0, %31 ], [ %78, %40 ]
%83 = icmp eq i64 %36, 0
br i1 %83, label %98, label %84
84: ; preds = %81, %84
%85 = phi i64 [ %95, %84 ], [ %82, %81 ]
%86 = phi i64 [ %96, %84 ], [ 0, %81 ]
%87 = getelementptr inbounds double, double* %8, i64 %85
%88 = bitcast double* %87 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %88
%89 = getelementptr inbounds double, double* %87, i64 2
%90 = bitcast double* %89 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %90
%91 = getelementptr inbounds double, double* %9, i64 %85
%92 = bitcast double* %91 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %92
%93 = getelementptr inbounds double, double* %91, i64 2
%94 = bitcast double* %93 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %94
%95 = add nuw i64 %85, 4
%96 = add i64 %86, 1
%97 = icmp eq i64 %96, %36
br i1 %97, label %98, label %84
98: ; preds = %84, %81
%99 = icmp eq i64 %32, %23
br i1 %99, label %117, label %100
100: ; preds = %25, %22, %98
%101 = phi i64 [ 0, %25 ], [ 0, %22 ], [ %32, %98 ]
%102 = xor i64 %101, -1
%103 = add nsw i64 %102, %23
%104 = and i64 %23, 3
%105 = icmp eq i64 %104, 0
br i1 %105, label %114, label %106
106: ; preds = %100, %106
%107 = phi i64 [ %111, %106 ], [ %101, %100 ]
%108 = phi i64 [ %112, %106 ], [ 0, %100 ]
%109 = getelementptr inbounds double, double* %8, i64 %107
store double 5.000000e-01, double* %109
%110 = getelementptr inbounds double, double* %9, i64 %107
store double 5.000000e-01, double* %110
%111 = add nuw nsw i64 %107, 1
%112 = add i64 %108, 1
%113 = icmp eq i64 %112, %104
br i1 %113, label %114, label %106
114: ; preds = %106, %100
%115 = phi i64 [ %101, %100 ], [ %111, %106 ]
%116 = icmp ult i64 %103, 3
br i1 %116, label %117, label %214
117: ; preds = %114, %214, %98, %14
%118 = icmp slt i32 %1, 0
br i1 %118, label %244, label %119
119: ; preds = %117
%120 = zext i32 %20 to i64
%121 = icmp ult i32 %20, 4
br i1 %121, label %197, label %122
122: ; preds = %119
%123 = getelementptr double, double* %6, i64 %120
%124 = getelementptr double, double* %7, i64 %120
%125 = icmp ugt double* %124, %6
%126 = icmp ugt double* %123, %7
%127 = and i1 %125, %126
br i1 %127, label %197, label %128
128: ; preds = %122
%129 = and i64 %120, 4294967292
%130 = add nsw i64 %129, -4
%131 = lshr exact i64 %130, 2
%132 = add nuw nsw i64 %131, 1
%133 = and i64 %132, 3
%134 = icmp ult i64 %130, 12
br i1 %134, label %178, label %135
135: ; preds = %128
%136 = and i64 %132, 9223372036854775804
br label %137
137: ; preds = %137, %135
%138 = phi i64 [ 0, %135 ], [ %175, %137 ]
%139 = phi i64 [ 0, %135 ], [ %176, %137 ]
%140 = getelementptr inbounds double, double* %6, i64 %138
%141 = bitcast double* %140 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %141
%142 = getelementptr inbounds double, double* %140, i64 2
%143 = bitcast double* %142 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %143
%144 = getelementptr inbounds double, double* %7, i64 %138
%145 = bitcast double* %144 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %145
%146 = getelementptr inbounds double, double* %144, i64 2
%147 = bitcast double* %146 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %147
%148 = or i64 %138, 4
%149 = getelementptr inbounds double, double* %6, i64 %148
%150 = bitcast double* %149 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %150
%151 = getelementptr inbounds double, double* %149, i64 2
%152 = bitcast double* %151 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %152
%153 = getelementptr inbounds double, double* %7, i64 %148
%154 = bitcast double* %153 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %154
%155 = getelementptr inbounds double, double* %153, i64 2
%156 = bitcast double* %155 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %156
%157 = or i64 %138, 8
%158 = getelementptr inbounds double, double* %6, i64 %157
%159 = bitcast double* %158 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %159
%160 = getelementptr inbounds double, double* %158, i64 2
%161 = bitcast double* %160 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %161
%162 = getelementptr inbounds double, double* %7, i64 %157
%163 = bitcast double* %162 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %163
%164 = getelementptr inbounds double, double* %162, i64 2
%165 = bitcast double* %164 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %165
%166 = or i64 %138, 12
%167 = getelementptr inbounds double, double* %6, i64 %166
%168 = bitcast double* %167 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %168
%169 = getelementptr inbounds double, double* %167, i64 2
%170 = bitcast double* %169 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %170
%171 = getelementptr inbounds double, double* %7, i64 %166
%172 = bitcast double* %171 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %172
%173 = getelementptr inbounds double, double* %171, i64 2
%174 = bitcast double* %173 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %174
%175 = add nuw i64 %138, 16
%176 = add nuw i64 %139, 4
%177 = icmp eq i64 %176, %136
br i1 %177, label %178, label %137
178: ; preds = %137, %128
%179 = phi i64 [ 0, %128 ], [ %175, %137 ]
%180 = icmp eq i64 %133, 0
br i1 %180, label %195, label %181
181: ; preds = %178, %181
%182 = phi i64 [ %192, %181 ], [ %179, %178 ]
%183 = phi i64 [ %193, %181 ], [ 0, %178 ]
%184 = getelementptr inbounds double, double* %6, i64 %182
%185 = bitcast double* %184 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %185
%186 = getelementptr inbounds double, double* %184, i64 2
%187 = bitcast double* %186 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %187
%188 = getelementptr inbounds double, double* %7, i64 %182
%189 = bitcast double* %188 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %189
%190 = getelementptr inbounds double, double* %188, i64 2
%191 = bitcast double* %190 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %191
%192 = add nuw i64 %182, 4
%193 = add i64 %183, 1
%194 = icmp eq i64 %193, %133
br i1 %194, label %195, label %181
195: ; preds = %181, %178
%196 = icmp eq i64 %129, %120
br i1 %196, label %244, label %197
197: ; preds = %122, %119, %195
%198 = phi i64 [ 0, %122 ], [ 0, %119 ], [ %129, %195 ]
%199 = xor i64 %198, -1
%200 = add nsw i64 %199, %120
%201 = and i64 %120, 3
%202 = icmp eq i64 %201, 0
br i1 %202, label %211, label %203
203: ; preds = %197, %203
%204 = phi i64 [ %208, %203 ], [ %198, %197 ]
%205 = phi i64 [ %209, %203 ], [ 0, %197 ]
%206 = getelementptr inbounds double, double* %6, i64 %204
store double 5.000000e-01, double* %206
%207 = getelementptr inbounds double, double* %7, i64 %204
store double 5.000000e-01, double* %207
%208 = add nuw nsw i64 %204, 1
%209 = add i64 %205, 1
%210 = icmp eq i64 %209, %201
br i1 %210, label %211, label %203
211: ; preds = %203, %197
%212 = phi i64 [ %198, %197 ], [ %208, %203 ]
%213 = icmp ult i64 %200, 3
br i1 %213, label %244, label %229
214: ; preds = %114, %214
%215 = phi i64 [ %227, %214 ], [ %115, %114 ]
%216 = getelementptr inbounds double, double* %8, i64 %215
store double 5.000000e-01, double* %216
%217 = getelementptr inbounds double, double* %9, i64 %215
store double 5.000000e-01, double* %217
%218 = add nuw nsw i64 %215, 1
%219 = getelementptr inbounds double, double* %8, i64 %218
store double 5.000000e-01, double* %219
%220 = getelementptr inbounds double, double* %9, i64 %218
store double 5.000000e-01, double* %220
%221 = add nuw nsw i64 %215, 2
%222 = getelementptr inbounds double, double* %8, i64 %221
store double 5.000000e-01, double* %222
%223 = getelementptr inbounds double, double* %9, i64 %221
store double 5.000000e-01, double* %223
%224 = add nuw nsw i64 %215, 3
%225 = getelementptr inbounds double, double* %8, i64 %224
store double 5.000000e-01, double* %225
%226 = getelementptr inbounds double, double* %9, i64 %224
store double 5.000000e-01, double* %226
%227 = add nuw nsw i64 %215, 4
%228 = icmp eq i64 %227, %23
br i1 %228, label %117, label %214
229: ; preds = %211, %229
%230 = phi i64 [ %242, %229 ], [ %212, %211 ]
%231 = getelementptr inbounds double, double* %6, i64 %230
store double 5.000000e-01, double* %231
%232 = getelementptr inbounds double, double* %7, i64 %230
store double 5.000000e-01, double* %232
%233 = add nuw nsw i64 %230, 1
%234 = getelementptr inbounds double, double* %6, i64 %233
store double 5.000000e-01, double* %234
%235 = getelementptr inbounds double, double* %7, i64 %233
store double 5.000000e-01, double* %235
%236 = add nuw nsw i64 %230, 2
%237 = getelementptr inbounds double, double* %6, i64 %236
store double 5.000000e-01, double* %237
%238 = getelementptr inbounds double, double* %7, i64 %236
store double 5.000000e-01, double* %238
%239 = add nuw nsw i64 %230, 3
%240 = getelementptr inbounds double, double* %6, i64 %239
store double 5.000000e-01, double* %240
%241 = getelementptr inbounds double, double* %7, i64 %239
store double 5.000000e-01, double* %241
%242 = add nuw nsw i64 %230, 4
%243 = icmp eq i64 %242, %120
br i1 %243, label %244, label %229
244: ; preds = %211, %229, %195, %117
%245 = add nsw i32 %0, 2
%246 = shl i32 %245, 4
%247 = tail call i64 @malloc(i32 %246)
%248 = inttoptr i64 %247 to double*
%249 = shl i32 %1, 4
%250 = add i32 %249, 32
%251 = tail call i64 @malloc(i32 %250)
%252 = inttoptr i64 %251 to double*
%253 = icmp eq i32 %10, 0
%254 = xor i1 %253, true
%255 = zext i1 %254 to i32
%256 = icmp eq i32 %11, 0
%257 = select i1 %256, i32 %19, i32 %0
%258 = icmp eq i32 %12, 0
%259 = xor i1 %258, true
%260 = zext i1 %259 to i32
%261 = icmp eq i32 %13, 0
%262 = select i1 %261, i32 %20, i32 %1
br i1 %253, label %318, label %263
263: ; preds = %244
%264 = icmp slt i32 %262, %260
br i1 %264, label %274, label %265
265: ; preds = %263
%266 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%267 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 1
%268 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 0
%269 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 1
%270 = zext i1 %259 to i64
%271 = sext i32 %245 to i64
%272 = add i32 %262, 1
%273 = zext i32 %272 to i64
br label %282
274: ; preds = %282, %263
%275 = icmp sgt i32 %262, %260
br i1 %275, label %276, label %318
276: ; preds = %274
%277 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%278 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 1
%279 = zext i1 %259 to i64
%280 = sext i32 %19 to i64
%281 = zext i32 %262 to i64
br label %299
282: ; preds = %265, %282
%283 = phi i64 [ %270, %265 ], [ %297, %282 ]
%284 = mul nsw i64 %283, %271
%285 = getelementptr inbounds double, double* %2, i64 %284
%286 = load double, double* %285
store double %286, double* %266
%287 = getelementptr inbounds double, double* %3, i64 %284
%288 = load double, double* %287
store double %288, double* %267
%289 = add nsw i64 %284, 1
%290 = getelementptr inbounds double, double* %2, i64 %289
%291 = load double, double* %290
store double %291, double* %268
%292 = getelementptr inbounds double, double* %3, i64 %289
%293 = load double, double* %292
store double %293, double* %269
%294 = shl nuw nsw i64 %283, 1
%295 = getelementptr inbounds double, double* %252, i64 %294
%296 = call i32 @mid_pt_sphere(double* %266, double* %268, double* %295)
%297 = add nuw nsw i64 %283, 1
%298 = icmp eq i64 %297, %273
br i1 %298, label %274, label %282
299: ; preds = %276, %299
%300 = phi i64 [ %279, %276 ], [ %309, %299 ]
%301 = mul nsw i64 %300, %280
%302 = getelementptr inbounds double, double* %4, i64 %301
%303 = load double, double* %302
store double %303, double* %277
%304 = getelementptr inbounds double, double* %5, i64 %301
%305 = load double, double* %304
store double %305, double* %278
%306 = shl nuw nsw i64 %300, 1
%307 = getelementptr inbounds double, double* %252, i64 %306
%308 = call double @great_circle_distance(double* %307, double* %277)
%309 = add nuw nsw i64 %300, 1
%310 = shl nuw i64 %309, 1
%311 = and i64 %310, 4294967294
%312 = getelementptr inbounds double, double* %252, i64 %311
%313 = call double @great_circle_distance(double* %312, double* %277)
%314 = fadd double %308, %313
%315 = fdiv double %313, %314
%316 = getelementptr inbounds double, double* %6, i64 %300
store double %315, double* %316
%317 = icmp eq i64 %309, %281
br i1 %317, label %318, label %299
318: ; preds = %299, %274, %244
br i1 %256, label %378, label %319
319: ; preds = %318
%320 = icmp slt i32 %262, %260
br i1 %320, label %331, label %321
321: ; preds = %319
%322 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%323 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 1
%324 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 0
%325 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 1
%326 = zext i1 %259 to i64
%327 = sext i32 %245 to i64
%328 = sext i32 %0 to i64
%329 = add i32 %262, 1
%330 = zext i32 %329 to i64
br label %340
331: ; preds = %340, %319
%332 = icmp sgt i32 %262, %260
br i1 %332, label %333, label %378
333: ; preds = %331
%334 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%335 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 1
%336 = zext i1 %259 to i64
%337 = sext i32 %19 to i64
%338 = sext i32 %0 to i64
%339 = zext i32 %262 to i64
br label %358
340: ; preds = %321, %340
%341 = phi i64 [ %326, %321 ], [ %356, %340 ]
%342 = mul nsw i64 %341, %327
%343 = add nsw i64 %342, %328
%344 = getelementptr inbounds double, double* %2, i64 %343
%345 = load double, double* %344
store double %345, double* %322
%346 = getelementptr inbounds double, double* %3, i64 %343
%347 = load double, double* %346
store double %347, double* %323
%348 = add nsw i64 %343, 1
%349 = getelementptr inbounds double, double* %2, i64 %348
%350 = load double, double* %349
store double %350, double* %324
%351 = getelementptr inbounds double, double* %3, i64 %348
%352 = load double, double* %351
store double %352, double* %325
%353 = shl nuw nsw i64 %341, 1
%354 = getelementptr inbounds double, double* %252, i64 %353
%355 = call i32 @mid_pt_sphere(double* %322, double* %324, double* %354)
%356 = add nuw nsw i64 %341, 1
%357 = icmp eq i64 %356, %330
br i1 %357, label %331, label %340
358: ; preds = %333, %358
%359 = phi i64 [ %336, %333 ], [ %369, %358 ]
%360 = mul nsw i64 %359, %337
%361 = add nsw i64 %360, %338
%362 = getelementptr inbounds double, double* %4, i64 %361
%363 = load double, double* %362
store double %363, double* %334
%364 = getelementptr inbounds double, double* %5, i64 %361
%365 = load double, double* %364
store double %365, double* %335
%366 = shl nuw nsw i64 %359, 1
%367 = getelementptr inbounds double, double* %252, i64 %366
%368 = call double @great_circle_distance(double* %367, double* %334)
%369 = add nuw nsw i64 %359, 1
%370 = shl nuw i64 %369, 1
%371 = and i64 %370, 4294967294
%372 = getelementptr inbounds double, double* %252, i64 %371
%373 = call double @great_circle_distance(double* %372, double* %334)
%374 = fadd double %368, %373
%375 = fdiv double %373, %374
%376 = getelementptr inbounds double, double* %7, i64 %359
store double %375, double* %376
%377 = icmp eq i64 %369, %339
br i1 %377, label %378, label %358
378: ; preds = %358, %331, %318
br i1 %258, label %431, label %379
379: ; preds = %378
%380 = icmp slt i32 %257, %255
br i1 %380, label %390, label %381
381: ; preds = %379
%382 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%383 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 1
%384 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 0
%385 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 1
%386 = zext i1 %254 to i64
%387 = sext i32 %245 to i64
%388 = add i32 %257, 1
%389 = zext i32 %388 to i64
br label %397
390: ; preds = %397, %379
%391 = icmp sgt i32 %257, %255
br i1 %391, label %392, label %431
392: ; preds = %390
%393 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%394 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 1
%395 = zext i1 %254 to i64
%396 = zext i32 %257 to i64
br label %413
397: ; preds = %381, %397
%398 = phi i64 [ %386, %381 ], [ %411, %397 ]
%399 = getelementptr inbounds double, double* %2, i64 %398
%400 = load double, double* %399
store double %400, double* %382
%401 = getelementptr inbounds double, double* %3, i64 %398
%402 = load double, double* %401
store double %402, double* %383
%403 = add nsw i64 %398, %387
%404 = getelementptr inbounds double, double* %2, i64 %403
%405 = load double, double* %404
store double %405, double* %384
%406 = getelementptr inbounds double, double* %3, i64 %403
%407 = load double, double* %406
store double %407, double* %385
%408 = shl nuw nsw i64 %398, 1
%409 = getelementptr inbounds double, double* %248, i64 %408
%410 = call i32 @mid_pt_sphere(double* %382, double* %384, double* %409)
%411 = add nuw nsw i64 %398, 1
%412 = icmp eq i64 %411, %389
br i1 %412, label %390, label %397
413: ; preds = %392, %413
%414 = phi i64 [ %395, %392 ], [ %422, %413 ]
%415 = getelementptr inbounds double, double* %4, i64 %414
%416 = load double, double* %415
store double %416, double* %393
%417 = getelementptr inbounds double, double* %5, i64 %414
%418 = load double, double* %417
store double %418, double* %394
%419 = shl nuw nsw i64 %414, 1
%420 = getelementptr inbounds double, double* %248, i64 %419
%421 = call double @great_circle_distance(double* %420, double* %393)
%422 = add nuw nsw i64 %414, 1
%423 = shl nuw i64 %422, 1
%424 = and i64 %423, 4294967294
%425 = getelementptr inbounds double, double* %248, i64 %424
%426 = call double @great_circle_distance(double* %425, double* %393)
%427 = fadd double %421, %426
%428 = fdiv double %426, %427
%429 = getelementptr inbounds double, double* %8, i64 %414
store double %428, double* %429
%430 = icmp eq i64 %422, %396
br i1 %430, label %431, label %413
431: ; preds = %413, %390, %378
br i1 %261, label %491, label %432
432: ; preds = %431
%433 = icmp slt i32 %257, %255
br i1 %433, label %446, label %434
434: ; preds = %432
%435 = mul nsw i32 %245, %1
%436 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%437 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 1
%438 = mul nsw i32 %20, %245
%439 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 0
%440 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 1
%441 = zext i1 %254 to i64
%442 = sext i32 %435 to i64
%443 = sext i32 %438 to i64
%444 = add i32 %257, 1
%445 = zext i32 %444 to i64
br label %455
446: ; preds = %455, %432
%447 = icmp sgt i32 %257, %255
br i1 %447, label %448, label %491
448: ; preds = %446
%449 = mul nsw i32 %19, %1
%450 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%451 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 1
%452 = zext i1 %254 to i64
%453 = sext i32 %449 to i64
%454 = zext i32 %257 to i64
br label %472
455: ; preds = %434, %455
%456 = phi i64 [ %441, %434 ], [ %470, %455 ]
%457 = add nsw i64 %456, %442
%458 = getelementptr inbounds double, double* %2, i64 %457
%459 = load double, double* %458
store double %459, double* %436
%460 = getelementptr inbounds double, double* %3, i64 %457
%461 = load double, double* %460
store double %461, double* %437
%462 = add nsw i64 %456, %443
%463 = getelementptr inbounds double, double* %2, i64 %462
%464 = load double, double* %463
store double %464, double* %439
%465 = getelementptr inbounds double, double* %3, i64 %462
%466 = load double, double* %465
store double %466, double* %440
%467 = shl nuw nsw i64 %456, 1
%468 = getelementptr inbounds double, double* %248, i64 %467
%469 = call i32 @mid_pt_sphere(double* %436, double* %439, double* %468)
%470 = add nuw nsw i64 %456, 1
%471 = icmp eq i64 %470, %445
br i1 %471, label %446, label %455
472: ; preds = %448, %472
%473 = phi i64 [ %452, %448 ], [ %482, %472 ]
%474 = add nsw i64 %473, %453
%475 = getelementptr inbounds double, double* %4, i64 %474
%476 = load double, double* %475
store double %476, double* %450
%477 = getelementptr inbounds double, double* %5, i64 %474
%478 = load double, double* %477
store double %478, double* %451
%479 = shl nuw nsw i64 %473, 1
%480 = getelementptr inbounds double, double* %248, i64 %479
%481 = call double @great_circle_distance(double* %480, double* %450)
%482 = add nuw nsw i64 %473, 1
%483 = shl nuw i64 %482, 1
%484 = and i64 %483, 4294967294
%485 = getelementptr inbounds double, double* %248, i64 %484
%486 = call double @great_circle_distance(double* %485, double* %450)
%487 = fadd double %481, %486
%488 = fdiv double %486, %487
%489 = getelementptr inbounds double, double* %9, i64 %473
store double %488, double* %489
%490 = icmp eq i64 %482, %454
br i1 %490, label %491, label %472
491: ; preds = %472, %446, %431
%492 = call i32 @free(double* %248)
%493 = call i32 @free(double* %252)
ret void
}