#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 */
double abs(double);
long ceil(double);
int /*<<< orphan*/ dot_matrixT_vector_ddd(double *, double *, double *);
int /*<<< orphan*/ dot_matrix_vector_did(double *, long *, double *);
double norm(double *);
double sqrt(double);
size_t unit_cell_get_radius_indexes(double *matrix, double *reciprocal,
                                    double radius, long *max_ranges,
                                    long *indexes) {
  long lowlim[3], uplim[3], index[3], side[3];
  long i0, i1, i2, j0, j1, j2;
  size_t counter, k, sum;
  double center[3], corner[3], pos[3], frac[3];
  double scale, d;
  for (k = 0; k < 3; k++) {
    uplim[k] = ceil(radius * sqrt(reciprocal[k] * reciprocal[k] +
                                  reciprocal[k + 3] * reciprocal[k + 3] +
                                  reciprocal[k + 6] * reciprocal[k + 6]));
    lowlim[k] = -uplim[k];
    if ((max_ranges[k] > 0) && (uplim[k] * 2 + 1 > max_ranges[k])) {
      if (max_ranges[k] % 2 == 0) {
        uplim[k] = max_ranges[k] / 2 - 1;
        lowlim[k] = -max_ranges[k] / 2;
      } else {
        uplim[k] = max_ranges[k] / 2;
        lowlim[k] = -max_ranges[k] / 2;
      }
    }
  }
  counter = 0;
  for (i0 = lowlim[0]; i0 <= uplim[0]; i0++) {
    index[0] = i0;
    for (i1 = lowlim[1]; i1 <= uplim[1]; i1++) {
      index[1] = i1;
      for (i2 = lowlim[2]; i2 <= 0; i2++) {
        index[2] = i2;
        dot_matrix_vector_did(matrix, index, center);
        for (j0 = -1; j0 <= 1; j0++) {
          side[0] = j0;
          for (j1 = -1; j1 <= 1; j1++) {
            side[1] = j1;
            for (j2 = -1; j2 <= 1; j2++) {
              side[2] = j2;
              dot_matrix_vector_did(matrix, side, corner);
              corner[0] += center[0];
              corner[1] += center[1];
              corner[2] += center[2];
              sum = abs(j0) + abs(j1) + abs(j2);
              if (sum == 3) {
                pos[0] = corner[0];
                pos[1] = corner[1];
                pos[2] = corner[2];
              } else if (sum == 2) {
                k = 0;
                if (j1 == 0)
                  k = 1;
                if (j2 == 0)
                  k = 2;
                scale =
                    ((corner[0] * matrix[k] + corner[1] * matrix[k + 3] +
                      corner[2] * matrix[k + 6]) /
                     (matrix[k] * matrix[k] + matrix[k + 3] * matrix[k + 3] +
                      matrix[k + 6] * matrix[k + 6]));
                pos[0] = corner[0] - matrix[k] * scale;
                pos[1] = corner[1] - matrix[k + 3] * scale;
                pos[2] = corner[2] - matrix[k + 6] * scale;
              } else if (sum == 1) {
                k = 0;
                if (j1 != 0)
                  k = 1;
                if (j2 != 0)
                  k = 2;
                scale = ((corner[0] * reciprocal[k] +
                          corner[1] * reciprocal[k + 3] +
                          corner[2] * reciprocal[k + 6]) /
                         (reciprocal[k] * reciprocal[k] +
                          reciprocal[k + 3] * reciprocal[k + 3] +
                          reciprocal[k + 6] * reciprocal[k + 6]));
                pos[0] = reciprocal[k] * scale;
                pos[1] = reciprocal[k + 3] * scale;
                pos[2] = reciprocal[k + 6] * scale;
              } else {
                pos[0] = 0.0;
                pos[1] = 0.0;
                pos[2] = 0.0;
              }
              dot_matrixT_vector_ddd(reciprocal, pos, frac);
              k = 0;
              if ((abs(frac[0] - i0) < 1.000001) &&
                  (abs(frac[1] - i1) < 1.000001) &&
                  (abs(frac[2] - i2) < 1.000001)) {
                d = norm(pos);
                k = d < radius;
              }
              if (k)
                break;
            }
            if (k)
              break;
          }
          if (k)
            break;
        }
        if (k) {
          indexes[counter] = i0;
          indexes[counter + 1] = i1;
          indexes[counter + 2] = i2;
          counter += 3;
          if ((i2 != 0) && (-i2 <= uplim[2])) {
            indexes[counter] = -i0;
            indexes[counter + 1] = -i1;
            indexes[counter + 2] = -i2;
            counter += 3;
          }
        }
      }
    }
  }
  return counter / 3;
}


x86 assembly (clang, -O0):
<unit_cell_get_radius_indexes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movq   $0x0,-0xe0(%rbp)
cmpq   $0x3,-0xe0(%rbp)
03
jae    138c <unit_cell_get_radius_indexes+0x22c>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x18(%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
mulsd  0x18(%rax,%rcx,8),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x30(%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x30(%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1080 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x178(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
call   1040 <ceil@plt>
mov    %rax,%rcx
mov    -0xe0(%rbp),%rax
mov    %rcx,-0x60(%rbp,%rax,8)
mov    -0xe0(%rbp),%rax
xor    %ecx,%ecx
sub    -0x60(%rbp,%rax,8),%rcx
mov    -0xe0(%rbp),%rax
mov    %rcx,-0x40(%rbp,%rax,8)
mov    -0x20(%rbp),%rax
mov    -0xe0(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jle    1370 <unit_cell_get_radius_indexes+0x210>
mov    -0xe0(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rax
shl    $0x1,%rax
add    $0x1,%rax
mov    -0x20(%rbp),%rcx
mov    -0xe0(%rbp),%rdx
cmp    (%rcx,%rdx,8),%rax
jle    1370 <unit_cell_get_radius_indexes+0x210>
mov    -0x20(%rbp),%rax
mov    -0xe0(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    1319 <unit_cell_get_radius_indexes+0x1b9>
mov    -0x20(%rbp),%rax
mov    -0xe0(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
sub    $0x1,%rcx
mov    -0xe0(%rbp),%rax
mov    %rcx,-0x60(%rbp,%rax,8)
mov    -0x20(%rbp),%rcx
mov    -0xe0(%rbp),%rdx
xor    %eax,%eax
sub    (%rcx,%rdx,8),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0xe0(%rbp),%rax
mov    %rcx,-0x40(%rbp,%rax,8)
jmp    136b <unit_cell_get_radius_indexes+0x20b>
mov    -0x20(%rbp),%rax
mov    -0xe0(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0xe0(%rbp),%rax
mov    %rcx,-0x60(%rbp,%rax,8)
mov    -0x20(%rbp),%rcx
mov    -0xe0(%rbp),%rdx
xor    %eax,%eax
sub    (%rcx,%rdx,8),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0xe0(%rbp),%rax
mov    %rcx,-0x40(%rbp,%rax,8)
jmp    1370 <unit_cell_get_radius_indexes+0x210>
jmp    1375 <unit_cell_get_radius_indexes+0x215>
mov    -0xe0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xe0(%rbp)
jmp    118b <unit_cell_get_radius_indexes+0x2b>
movq   $0x0,-0xd8(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0xa8(%rbp),%rax
cmp    -0x60(%rbp),%rax
jg     1c2f <unit_cell_get_radius_indexes+0xacf>
mov    -0xa8(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
cmp    -0x58(%rbp),%rax
jg     1c13 <unit_cell_get_radius_indexes+0xab3>
mov    -0xb0(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0xb8(%rbp)
cmpq   $0x0,-0xb8(%rbp)
jg     1bf7 <unit_cell_get_radius_indexes+0xa97>
mov    -0xb8(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x80(%rbp),%rsi
lea    -0x100(%rbp),%rdx
call   1070 <dot_matrix_vector_did@plt>
movq   $0xffffffffffffffff,-0xc0(%rbp)
ff ff ff ff
cmpq   $0x1,-0xc0(%rbp)
01
jg     1aef <unit_cell_get_radius_indexes+0x98f>
mov    -0xc0(%rbp),%rax
mov    %rax,-0xa0(%rbp)
movq   $0xffffffffffffffff,-0xc8(%rbp)
ff ff ff ff
cmpq   $0x1,-0xc8(%rbp)
01
jg     1ac0 <unit_cell_get_radius_indexes+0x960>
mov    -0xc8(%rbp),%rax
mov    %rax,-0x98(%rbp)
movq   $0xffffffffffffffff,-0xd0(%rbp)
ff ff ff ff
cmpq   $0x1,-0xd0(%rbp)
01
jg     1a91 <unit_cell_get_radius_indexes+0x931>
mov    -0xd0(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0x120(%rbp),%rdx
call   1070 <dot_matrix_vector_did@plt>
movsd  -0x100(%rbp),%xmm1
ff
movsd  -0x120(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0xf8(%rbp),%xmm1
ff
movsd  -0x118(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xf0(%rbp),%xmm1
ff
movsd  -0x110(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
cvtsi2sdq -0xc0(%rbp),%xmm0
ff ff
call   1030 <abs@plt>
movsd  %xmm0,-0x188(%rbp)
ff
cvtsi2sdq -0xc8(%rbp),%xmm0
ff ff
call   1030 <abs@plt>
movaps %xmm0,%xmm1
movsd  -0x188(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x180(%rbp)
ff
cvtsi2sdq -0xd0(%rbp),%xmm0
ff ff
call   1030 <abs@plt>
movaps %xmm0,%xmm1
movsd  -0x180(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
movsd  0xa94(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rcx
and    %rdx,%rcx
or     %rcx,%rax
mov    %rax,-0xe8(%rbp)
cmpq   $0x3,-0xe8(%rbp)
03
jne    15c5 <unit_cell_get_radius_indexes+0x465>
movsd  -0x120(%rbp),%xmm0
ff
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x118(%rbp),%xmm0
ff
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
movsd  %xmm0,-0x130(%rbp)
ff
jmp    197d <unit_cell_get_radius_indexes+0x81d>
cmpq   $0x2,-0xe8(%rbp)
02
jne    17c6 <unit_cell_get_radius_indexes+0x666>
movq   $0x0,-0xe0(%rbp)
cmpq   $0x0,-0xc8(%rbp)
jne    15f7 <unit_cell_get_radius_indexes+0x497>
movq   $0x1,-0xe0(%rbp)
cmpq   $0x0,-0xd0(%rbp)
jne    1610 <unit_cell_get_radius_indexes+0x4b0>
movq   $0x2,-0xe0(%rbp)
movsd  -0x120(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x118(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
mulsd  0x18(%rax,%rcx,8),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x110(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x30(%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm3
mov    -0x8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x18(%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
mulsd  0x18(%rax,%rcx,8),%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x30(%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x30(%rax,%rcx,8),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x120(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x168(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x118(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x18(%rax,%rcx,8),%xmm0
movsd  -0x168(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x110(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x30(%rax,%rcx,8),%xmm0
movsd  -0x168(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
jmp    1978 <unit_cell_get_radius_indexes+0x818>
cmpq   $0x1,-0xe8(%rbp)
01
jne    1952 <unit_cell_get_radius_indexes+0x7f2>
movq   $0x0,-0xe0(%rbp)
cmpq   $0x0,-0xc8(%rbp)
je     17f8 <unit_cell_get_radius_indexes+0x698>
movq   $0x1,-0xe0(%rbp)
cmpq   $0x0,-0xd0(%rbp)
je     1811 <unit_cell_get_radius_indexes+0x6b1>
movq   $0x2,-0xe0(%rbp)
movsd  -0x120(%rbp),%xmm1
ff
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x118(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
mulsd  0x18(%rax,%rcx,8),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x110(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x30(%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm3
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x18(%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
mulsd  0x18(%rax,%rcx,8),%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x30(%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x30(%rax,%rcx,8),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x168(%rbp),%xmm0
ff
movsd  %xmm0,-0x140(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x18(%rax,%rcx,8),%xmm0
mulsd  -0x168(%rbp),%xmm0
ff
movsd  %xmm0,-0x138(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movsd  0x30(%rax,%rcx,8),%xmm0
mulsd  -0x168(%rbp),%xmm0
ff
movsd  %xmm0,-0x130(%rbp)
ff
jmp    1973 <unit_cell_get_radius_indexes+0x813>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
jmp    1978 <unit_cell_get_radius_indexes+0x818>
jmp    197d <unit_cell_get_radius_indexes+0x81d>
mov    -0x10(%rbp),%rdi
lea    -0x140(%rbp),%rsi
lea    -0x160(%rbp),%rdx
call   1050 <dot_matrixT_vector_ddd@plt>
movq   $0x0,-0xe0(%rbp)
movsd  -0x160(%rbp),%xmm0
ff
cvtsi2sdq -0xa8(%rbp),%xmm1
ff ff
subsd  %xmm1,%xmm0
call   1030 <abs@plt>
movaps %xmm0,%xmm1
movsd  0x644(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1a62 <unit_cell_get_radius_indexes+0x902>
movsd  -0x158(%rbp),%xmm0
ff
cvtsi2sdq -0xb0(%rbp),%xmm1
ff ff
subsd  %xmm1,%xmm0
call   1030 <abs@plt>
movaps %xmm0,%xmm1
movsd  0x615(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1a62 <unit_cell_get_radius_indexes+0x902>
movsd  -0x150(%rbp),%xmm0
ff
cvtsi2sdq -0xb8(%rbp),%xmm1
ff ff
subsd  %xmm1,%xmm0
call   1030 <abs@plt>
movaps %xmm0,%xmm1
movsd  0x5e6(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1a62 <unit_cell_get_radius_indexes+0x902>
lea    -0x140(%rbp),%rdi
call   1060 <norm@plt>
movsd  %xmm0,-0x170(%rbp)
ff
movsd  -0x170(%rbp),%xmm1
ff
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
cltq
mov    %rax,-0xe0(%rbp)
cmpq   $0x0,-0xe0(%rbp)
je     1a75 <unit_cell_get_radius_indexes+0x915>
jmp    1a91 <unit_cell_get_radius_indexes+0x931>
jmp    1a7a <unit_cell_get_radius_indexes+0x91a>
mov    -0xd0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xd0(%rbp)
jmp    1476 <unit_cell_get_radius_indexes+0x316>
cmpq   $0x0,-0xe0(%rbp)
je     1aa4 <unit_cell_get_radius_indexes+0x944>
jmp    1ac0 <unit_cell_get_radius_indexes+0x960>
jmp    1aa9 <unit_cell_get_radius_indexes+0x949>
mov    -0xc8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xc8(%rbp)
jmp    144f <unit_cell_get_radius_indexes+0x2ef>
cmpq   $0x0,-0xe0(%rbp)
je     1ad3 <unit_cell_get_radius_indexes+0x973>
jmp    1aef <unit_cell_get_radius_indexes+0x98f>
jmp    1ad8 <unit_cell_get_radius_indexes+0x978>
mov    -0xc0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xc0(%rbp)
jmp    1428 <unit_cell_get_radius_indexes+0x2c8>
cmpq   $0x0,-0xe0(%rbp)
je     1bdb <unit_cell_get_radius_indexes+0xa7b>
mov    -0xa8(%rbp),%rdx
mov    -0x28(%rbp),%rax
mov    -0xd8(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0xb0(%rbp),%rdx
mov    -0x28(%rbp),%rax
mov    -0xd8(%rbp),%rcx
mov    %rdx,0x8(%rax,%rcx,8)
mov    -0xb8(%rbp),%rdx
mov    -0x28(%rbp),%rax
mov    -0xd8(%rbp),%rcx
mov    %rdx,0x10(%rax,%rcx,8)
mov    -0xd8(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0xd8(%rbp)
cmpq   $0x0,-0xb8(%rbp)
je     1bd6 <unit_cell_get_radius_indexes+0xa76>
xor    %eax,%eax
sub    -0xb8(%rbp),%rax
cmp    -0x50(%rbp),%rax
jg     1bd6 <unit_cell_get_radius_indexes+0xa76>
xor    %eax,%eax
mov    %eax,%edx
sub    -0xa8(%rbp),%rdx
mov    -0x28(%rbp),%rax
mov    -0xd8(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
xor    %eax,%eax
mov    %eax,%edx
sub    -0xb0(%rbp),%rdx
mov    -0x28(%rbp),%rax
mov    -0xd8(%rbp),%rcx
mov    %rdx,0x8(%rax,%rcx,8)
xor    %eax,%eax
mov    %eax,%edx
sub    -0xb8(%rbp),%rdx
mov    -0x28(%rbp),%rax
mov    -0xd8(%rbp),%rcx
mov    %rdx,0x10(%rax,%rcx,8)
mov    -0xd8(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0xd8(%rbp)
jmp    1bdb <unit_cell_get_radius_indexes+0xa7b>
jmp    1be0 <unit_cell_get_radius_indexes+0xa80>
mov    -0xb8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xb8(%rbp)
jmp    13f0 <unit_cell_get_radius_indexes+0x290>
jmp    1bfc <unit_cell_get_radius_indexes+0xa9c>
mov    -0xb0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xb0(%rbp)
jmp    13c9 <unit_cell_get_radius_indexes+0x269>
jmp    1c18 <unit_cell_get_radius_indexes+0xab8>
mov    -0xa8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xa8(%rbp)
jmp    13a2 <unit_cell_get_radius_indexes+0x242>
mov    -0xd8(%rbp),%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unit_cell_get_radius_indexes>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x168,%rsp
mov    %rcx,0x70(%rsp)
mov    %rdx,%rbp
movsd  %xmm0,0x8(%rsp)
mov    %rsi,%r15
mov    %rdi,%rbx
movsd  (%rsi),%xmm1
movsd  0x18(%rsi),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x30(%rsi),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11b7 <unit_cell_get_radius_indexes+0x57>
sqrtsd %xmm0,%xmm0
jmp    11bc <unit_cell_get_radius_indexes+0x5c>
call   1080 <sqrt@plt>
mulsd  0x8(%rsp),%xmm0
call   1040 <ceil@plt>
mov    %rax,%r14
mov    0x0(%rbp),%rax
test   %rax,%rax
jle    11f8 <unit_cell_get_radius_indexes+0x98>
lea    (%r14,%r14,1),%rcx
add    $0x1,%rcx
mov    %r14,%r12
cmp    %rax,%rcx
jle    11fb <unit_cell_get_radius_indexes+0x9b>
mov    %eax,%ecx
and    $0x1,%ecx
shr    %rax
lea    (%rcx,%rax,1),%r12
add    $0xffffffffffffffff,%r12
mov    %rax,%r14
jmp    11fb <unit_cell_get_radius_indexes+0x9b>
mov    %r14,%r12
movsd  0x8(%r15),%xmm1
movsd  0x20(%r15),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x38(%r15),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1231 <unit_cell_get_radius_indexes+0xd1>
sqrtsd %xmm0,%xmm0
jmp    1236 <unit_cell_get_radius_indexes+0xd6>
call   1080 <sqrt@plt>
mulsd  0x8(%rsp),%xmm0
call   1040 <ceil@plt>
mov    0x8(%rbp),%rdx
test   %rdx,%rdx
jle    1274 <unit_cell_get_radius_indexes+0x114>
lea    (%rax,%rax,1),%rcx
add    $0x1,%rcx
mov    %rax,(%rsp)
cmp    %rdx,%rcx
jle    1278 <unit_cell_get_radius_indexes+0x118>
mov    %edx,%ecx
and    $0x1,%ecx
shr    %rdx
lea    (%rcx,%rdx,1),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,(%rsp)
mov    %rdx,%rax
jmp    1278 <unit_cell_get_radius_indexes+0x118>
mov    %rax,(%rsp)
movsd  0x10(%r15),%xmm1
movsd  0x28(%r15),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x40(%r15),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
mov    %rax,%r13
ucomisd %xmm1,%xmm0
jb     12b1 <unit_cell_get_radius_indexes+0x151>
sqrtsd %xmm0,%xmm0
jmp    12b6 <unit_cell_get_radius_indexes+0x156>
call   1080 <sqrt@plt>
neg    %r14
mulsd  0x8(%rsp),%xmm0
call   1040 <ceil@plt>
mov    %rax,%rdx
mov    0x10(%rbp),%rax
test   %rax,%rax
jle    1325 <unit_cell_get_radius_indexes+0x1c5>
lea    (%rdx,%rdx,1),%rcx
add    $0x1,%rcx
mov    %rdx,0x30(%rsp)
cmp    %rax,%rcx
jle    12f9 <unit_cell_get_radius_indexes+0x199>
mov    %eax,%ecx
and    $0x1,%ecx
shr    %rax
add    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,0x30(%rsp)
mov    %rax,%rdx
cmp    %r14,%r12
jge    132f <unit_cell_get_radius_indexes+0x1cf>
xor    %eax,%eax
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mul    %rcx
mov    %rdx,%rax
shr    %rax
add    $0x168,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rdx,0x30(%rsp)
cmp    %r14,%r12
jl     12fe <unit_cell_get_radius_indexes+0x19e>
mov    %r12,0x90(%rsp)
neg    %r13
mov    %rdx,%rax
neg    %rax
mov    %rax,0x98(%rsp)
xor    %esi,%esi
lea    0x40(%rsp),%r12
mov    %r13,0x88(%rsp)
mov    %rdx,0xa0(%rsp)
jmp    1393 <unit_cell_get_radius_indexes+0x233>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rsi,%rax
lea    0x1(%r14),%rcx
mov    %rax,%rsi
cmp    0x90(%rsp),%r14
mov    %rcx,%r14
mov    0x88(%rsp),%r13
je     1300 <unit_cell_get_radius_indexes+0x1a0>
mov    %r14,0x130(%rsp)
cmp    %r13,(%rsp)
jl     1370 <unit_cell_get_radius_indexes+0x210>
xorps  %xmm0,%xmm0
cvtsi2sd %r14,%xmm0
movsd  %xmm0,0xd8(%rsp)
mov    %r14,%rax
neg    %rax
mov    %rax,0xa8(%rsp)
mov    %r14,0x60(%rsp)
jmp    13eb <unit_cell_get_radius_indexes+0x28b>
nopw   0x0(%rax,%rax,1)
mov    %rsi,%rax
lea    0x1(%r13),%rcx
mov    %rax,%rsi
cmp    (%rsp),%r13
mov    %rcx,%r13
mov    0xa0(%rsp),%rdx
je     1373 <unit_cell_get_radius_indexes+0x213>
mov    %r13,0x138(%rsp)
test   %rdx,%rdx
js     13d0 <unit_cell_get_radius_indexes+0x270>
xorps  %xmm0,%xmm0
cvtsi2sd %r13,%xmm0
movsd  %xmm0,0xd0(%rsp)
mov    %r13,%rax
neg    %rax
mov    %rax,0xb0(%rsp)
mov    0x98(%rsp),%rbp
mov    %r13,0x68(%rsp)
jmp    143c <unit_cell_get_radius_indexes+0x2dc>
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%rdi),%rbp
mov    %rax,%rsi
test   %rdi,%rdi
je     13d3 <unit_cell_get_radius_indexes+0x273>
mov    %rsi,0x80(%rsp)
mov    %rbp,0x140(%rsp)
mov    %rbx,%rdi
lea    0x130(%rsp),%rsi
lea    0x150(%rsp),%rdx
call   1070 <dot_matrix_vector_did@plt>
mov    %rbp,0x78(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %rbp,%xmm0
movsd  %xmm0,0xc8(%rsp)
mov    $0xffffffffffffffff,%rax
mov    %rax,0x110(%rsp)
mov    %rax,0xb8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,0xe0(%rsp)
mov    $0xffffffffffffffff,%rax
jmp    14c6 <unit_cell_get_radius_indexes+0x366>
nopl   0x0(%rax,%rax,1)
mov    0xc0(%rsp),%rax
add    $0x1,%rax
cmp    $0x2,%rax
je     17db <unit_cell_get_radius_indexes+0x67b>
mov    %rax,0x118(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,0xe8(%rsp)
xor    %r13d,%r13d
xor    %ebp,%ebp
mov    %rax,0xc0(%rsp)
test   %rax,%rax
setne  %r13b
sete   %bpl
mov    $0xffffffffffffffff,%r14
jmp    150a <unit_cell_get_radius_indexes+0x3aa>
add    $0x1,%r14
cmp    $0x2,%r14
je     14b0 <unit_cell_get_radius_indexes+0x350>
mov    %r14,0x120(%rsp)
mov    %rbx,%rdi
lea    0x110(%rsp),%rsi
lea    0x10(%rsp),%rdx
call   1070 <dot_matrix_vector_did@plt>
movapd 0x150(%rsp),%xmm0
addpd  0x10(%rsp),%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0x160(%rsp),%xmm0
addsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0xe0(%rsp),%xmm0
call   1030 <abs@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0xe8(%rsp),%xmm0
call   1030 <abs@plt>
addsd  0x38(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r14,%xmm0
call   1030 <abs@plt>
addsd  0x38(%rsp),%xmm0
cvttsd2si %xmm0,%rcx
mov    %rcx,%rdx
subsd  0xa5e(%rip),%xmm0
cvttsd2si %xmm0,%rax
sar    $0x3f,%rdx
and    %rdx,%rax
or     %rcx,%rax
cmp    $0x1,%rax
je     15f0 <unit_cell_get_radius_indexes+0x490>
cmp    $0x2,%rax
je     1680 <unit_cell_get_radius_indexes+0x520>
cmp    $0x3,%rax
jne    1720 <unit_cell_get_radius_indexes+0x5c0>
movaps 0x10(%rsp),%xmm0
movaps %xmm0,0x40(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
jmp    1733 <unit_cell_get_radius_indexes+0x5d3>
cs nopw 0x0(%rax,%rax,1)
test   %r14,%r14
mov    $0x2,%eax
cmove  %r13,%rax
movsd  (%r15,%rax,8),%xmm0
movsd  0x18(%r15,%rax,8),%xmm1
movsd  0x18(%rsp),%xmm2
mulsd  %xmm1,%xmm2
movsd  0x10(%rsp),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
movsd  0x30(%r15,%rax,8),%xmm2
movsd  0x20(%rsp),%xmm4
mulsd  %xmm2,%xmm4
addsd  %xmm3,%xmm4
movapd %xmm0,%xmm3
unpcklpd %xmm1,%xmm0
mulsd  %xmm1,%xmm1
mulsd  %xmm3,%xmm3
addsd  %xmm1,%xmm3
movapd %xmm2,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm3,%xmm1
divsd  %xmm1,%xmm4
mulsd  %xmm4,%xmm2
unpcklpd %xmm4,%xmm4
mulpd  %xmm0,%xmm4
movapd %xmm4,0x40(%rsp)
movsd  %xmm2,0x50(%rsp)
jmp    1733 <unit_cell_get_radius_indexes+0x5d3>
nopw   0x0(%rax,%rax,1)
test   %r14,%r14
mov    %rbp,%rax
mov    $0x2,%ecx
cmove  %rcx,%rax
movapd 0x10(%rsp),%xmm0
movsd  (%rbx,%rax,8),%xmm1
movsd  0x18(%rbx,%rax,8),%xmm2
movapd %xmm0,%xmm3
unpckhpd %xmm0,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm0,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
movsd  0x20(%rsp),%xmm3
movsd  0x30(%rbx,%rax,8),%xmm5
movapd %xmm3,%xmm6
mulsd  %xmm5,%xmm6
addsd  %xmm4,%xmm6
movapd %xmm1,%xmm4
unpcklpd %xmm2,%xmm1
mulsd  %xmm2,%xmm2
mulsd  %xmm4,%xmm4
addsd  %xmm2,%xmm4
movapd %xmm5,%xmm2
mulsd  %xmm5,%xmm2
addsd  %xmm4,%xmm2
divsd  %xmm2,%xmm6
mulsd  %xmm6,%xmm5
unpcklpd %xmm6,%xmm6
mulpd  %xmm1,%xmm6
subpd  %xmm6,%xmm0
movapd %xmm0,0x40(%rsp)
subsd  %xmm5,%xmm3
movsd  %xmm3,0x50(%rsp)
jmp    1733 <unit_cell_get_radius_indexes+0x5d3>
cs nopw 0x0(%rax,%rax,1)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x40(%rsp)
movq   $0x0,0x50(%rsp)
mov    %r15,%rdi
mov    %r12,%rsi
lea    0xf0(%rsp),%rdx
call   1050 <dot_matrixT_vector_ddd@plt>
movsd  0xf0(%rsp),%xmm0
subsd  0xd8(%rsp),%xmm0
call   1030 <abs@plt>
movsd  0x8a3(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1500 <unit_cell_get_radius_indexes+0x3a0>
movsd  0xf8(%rsp),%xmm0
subsd  0xd0(%rsp),%xmm0
call   1030 <abs@plt>
movsd  0x87a(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1500 <unit_cell_get_radius_indexes+0x3a0>
movsd  0x100(%rsp),%xmm0
subsd  0xc8(%rsp),%xmm0
call   1030 <abs@plt>
movsd  0x851(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1500 <unit_cell_get_radius_indexes+0x3a0>
mov    %r12,%rdi
call   1060 <norm@plt>
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    1500 <unit_cell_get_radius_indexes+0x3a0>
jmp    1810 <unit_cell_get_radius_indexes+0x6b0>
mov    0xb8(%rsp),%rax
add    $0x1,%rax
cmp    $0x2,%rax
jne    1481 <unit_cell_get_radius_indexes+0x321>
mov    0x80(%rsp),%rax
mov    0x60(%rsp),%r14
mov    0x68(%rsp),%r13
mov    0x78(%rsp),%rdi
jmp    1430 <unit_cell_get_radius_indexes+0x2d0>
nopl   (%rax)
mov    0x70(%rsp),%rax
mov    0x60(%rsp),%r14
mov    0x80(%rsp),%rdx
mov    %r14,(%rax,%rdx,8)
mov    0x68(%rsp),%r13
mov    %r13,0x8(%rax,%rdx,8)
mov    0x78(%rsp),%rdi
mov    %rdi,0x10(%rax,%rdx,8)
lea    0x3(%rdx),%rax
test   %rdi,%rdi
je     13d3 <unit_cell_get_radius_indexes+0x273>
mov    %rdi,%rcx
neg    %rcx
cmp    %rcx,0x30(%rsp)
jl     1430 <unit_cell_get_radius_indexes+0x2d0>
mov    0x70(%rsp),%rax
mov    0xa8(%rsp),%rsi
mov    %rsi,0x18(%rax,%rdx,8)
mov    0xb0(%rsp),%rsi
mov    %rsi,0x20(%rax,%rdx,8)
mov    %rcx,0x28(%rax,%rdx,8)
add    $0x6,%rdx
mov    %rdx,%rax
jmp    1430 <unit_cell_get_radius_indexes+0x2d0>

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

LLVM IR (-O2):
define i64 @unit_cell_get_radius_indexes(double* %0, double* %1, double %2, i64* nocapture %3, i64* nocapture writeonly %4) {
%6 = alloca [3 x i64]
%7 = alloca [3 x i64]
%8 = alloca [3 x double]
%9 = alloca [3 x double]
%10 = alloca [3 x double]
%11 = alloca [3 x double]
%12 = bitcast [3 x i64]* %6 to i8*
%13 = bitcast [3 x i64]* %7 to i8*
%14 = bitcast [3 x double]* %8 to i8*
%15 = bitcast [3 x double]* %9 to i8*
%16 = bitcast [3 x double]* %10 to i8*
%17 = bitcast [3 x double]* %11 to i8*
%18 = load double, double* %1
%19 = getelementptr inbounds double, double* %1, i64 3
%20 = load double, double* %19
%21 = fmul double %20, %20
%22 = tail call double @llvm.fmuladd.f64(double %18, double %18, double %21)
%23 = getelementptr inbounds double, double* %1, i64 6
%24 = load double, double* %23
%25 = tail call double @llvm.fmuladd.f64(double %24, double %24, double %22)
%26 = tail call double @sqrt(double %25)
%27 = fmul double %26, %2
%28 = tail call i64 @ceil(double %27)
%29 = load i64, i64* %3
%30 = icmp sgt i64 %29, 0
br i1 %30, label %31, label %40
31: ; preds = %5
%32 = shl nsw i64 %28, 1
%33 = or i64 %32, 1
%34 = icmp sgt i64 %33, %29
br i1 %34, label %35, label %40
35: ; preds = %31
%36 = and i64 %29, 1
%37 = lshr i64 %29, 1
%38 = add nsw i64 %36, -1
%39 = add nsw i64 %37, %38
br label %40
40: ; preds = %35, %5, %31
%41 = phi i64 [ %28, %31 ], [ %28, %5 ], [ %37, %35 ]
%42 = phi i64 [ %28, %31 ], [ %28, %5 ], [ %39, %35 ]
%43 = sub nsw i64 0, %41
%44 = getelementptr inbounds double, double* %1, i64 1
%45 = load double, double* %44
%46 = getelementptr inbounds double, double* %1, i64 4
%47 = load double, double* %46
%48 = fmul double %47, %47
%49 = tail call double @llvm.fmuladd.f64(double %45, double %45, double %48)
%50 = getelementptr inbounds double, double* %1, i64 7
%51 = load double, double* %50
%52 = tail call double @llvm.fmuladd.f64(double %51, double %51, double %49)
%53 = tail call double @sqrt(double %52)
%54 = fmul double %53, %2
%55 = tail call i64 @ceil(double %54)
%56 = getelementptr inbounds i64, i64* %3, i64 1
%57 = load i64, i64* %56
%58 = icmp sgt i64 %57, 0
br i1 %58, label %59, label %68
59: ; preds = %40
%60 = shl nsw i64 %55, 1
%61 = or i64 %60, 1
%62 = icmp sgt i64 %61, %57
br i1 %62, label %63, label %68
63: ; preds = %59
%64 = and i64 %57, 1
%65 = lshr i64 %57, 1
%66 = add nsw i64 %64, -1
%67 = add nsw i64 %65, %66
br label %68
68: ; preds = %63, %59, %40
%69 = phi i64 [ %55, %59 ], [ %55, %40 ], [ %65, %63 ]
%70 = phi i64 [ %55, %59 ], [ %55, %40 ], [ %67, %63 ]
%71 = sub nsw i64 0, %69
%72 = getelementptr inbounds double, double* %1, i64 2
%73 = load double, double* %72
%74 = getelementptr inbounds double, double* %1, i64 5
%75 = load double, double* %74
%76 = fmul double %75, %75
%77 = tail call double @llvm.fmuladd.f64(double %73, double %73, double %76)
%78 = getelementptr inbounds double, double* %1, i64 8
%79 = load double, double* %78
%80 = tail call double @llvm.fmuladd.f64(double %79, double %79, double %77)
%81 = tail call double @sqrt(double %80)
%82 = fmul double %81, %2
%83 = tail call i64 @ceil(double %82)
%84 = getelementptr inbounds i64, i64* %3, i64 2
%85 = load i64, i64* %84
%86 = icmp sgt i64 %85, 0
br i1 %86, label %87, label %96
87: ; preds = %68
%88 = shl nsw i64 %83, 1
%89 = or i64 %88, 1
%90 = icmp sgt i64 %89, %85
br i1 %90, label %91, label %96
91: ; preds = %87
%92 = and i64 %85, 1
%93 = lshr i64 %85, 1
%94 = add nsw i64 %92, -1
%95 = add nsw i64 %93, %94
br label %96
96: ; preds = %91, %87, %68
%97 = phi i64 [ %83, %87 ], [ %83, %68 ], [ %93, %91 ]
%98 = phi i64 [ %83, %87 ], [ %83, %68 ], [ %95, %91 ]
%99 = sub nsw i64 0, %97
%100 = icmp slt i64 %42, %43
br i1 %100, label %291, label %101
101: ; preds = %96
%102 = getelementptr inbounds [3 x i64], [3 x i64]* %6, i64 0, i64 0
%103 = icmp slt i64 %70, %71
%104 = getelementptr inbounds [3 x i64], [3 x i64]* %6, i64 0, i64 1
%105 = icmp sgt i64 %97, -1
%106 = getelementptr inbounds [3 x i64], [3 x i64]* %6, i64 0, i64 2
%107 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%108 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 0
%109 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 1
%110 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 2
%111 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 0
%112 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 1
%113 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
%114 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 2
%115 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 0
%116 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 2
%117 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
%118 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 1
%119 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 2
%120 = bitcast [3 x double]* %10 to i8*
%121 = bitcast [3 x double]* %8 to <2 x double>*
%122 = bitcast [3 x double]* %9 to <2 x double>*
%123 = bitcast [3 x double]* %9 to <2 x double>*
%124 = bitcast [3 x double]* %10 to <2 x double>*
%125 = bitcast [3 x double]* %9 to <2 x double>*
%126 = bitcast [3 x double]* %10 to <2 x double>*
%127 = bitcast [3 x double]* %9 to <2 x double>*
%128 = bitcast [3 x double]* %10 to <2 x double>*
br label %129
129: ; preds = %101, %287
%130 = phi i64 [ %43, %101 ], [ %289, %287 ]
%131 = phi i64 [ 0, %101 ], [ %288, %287 ]
store i64 %130, i64* %102
br i1 %103, label %287, label %132
132: ; preds = %129
%133 = sitofp i64 %130 to double
%134 = sub nsw i64 0, %130
br label %135
135: ; preds = %132, %283
%136 = phi i64 [ %71, %132 ], [ %285, %283 ]
%137 = phi i64 [ %131, %132 ], [ %284, %283 ]
store i64 %136, i64* %104
br i1 %105, label %138, label %283
138: ; preds = %135
%139 = sitofp i64 %136 to double
%140 = sub nsw i64 0, %136
br label %141
141: ; preds = %138, %279
%142 = phi i64 [ %137, %138 ], [ %280, %279 ]
%143 = phi i64 [ %99, %138 ], [ %281, %279 ]
store i64 %143, i64* %106
%144 = call i32 @dot_matrix_vector_did(double* %0, i64* %102, double* %107)
%145 = sitofp i64 %143 to double
br label %146
146: ; preds = %141, %258
%147 = phi i64 [ -1, %141 ], [ %259, %258 ]
store i64 %147, i64* %108
%148 = sitofp i64 %147 to double
br label %149
149: ; preds = %146, %255
%150 = phi i64 [ -1, %146 ], [ %256, %255 ]
store i64 %150, i64* %109
%151 = sitofp i64 %150 to double
%152 = icmp ne i64 %150, 0
%153 = zext i1 %152 to i64
%154 = icmp eq i64 %150, 0
%155 = zext i1 %154 to i64
br label %156
156: ; preds = %149, %252
%157 = phi i64 [ -1, %149 ], [ %253, %252 ]
store i64 %157, i64* %110
%158 = call i32 @dot_matrix_vector_did(double* %0, i64* %108, double* %111)
%159 = load <2 x double>, <2 x double>* %121
%160 = load <2 x double>, <2 x double>* %122
%161 = fadd <2 x double> %159, %160
store <2 x double> %161, <2 x double>* %123
%162 = load double, double* %113
%163 = load double, double* %114
%164 = fadd double %162, %163
store double %164, double* %114
%165 = call double @abs(double %148)
%166 = call double @abs(double %151)
%167 = fadd double %165, %166
%168 = sitofp i64 %157 to double
%169 = call double @abs(double %168)
%170 = fadd double %167, %169
%171 = fptoui double %170 to i64
switch i64 %171, label %232 [
i64 3, label %172
i64 2, label %175
i64 1, label %205
]
172: ; preds = %156
%173 = load <2 x double>, <2 x double>* %127
store <2 x double> %173, <2 x double>* %128
%174 = load double, double* %114
store double %174, double* %116
br label %233
175: ; preds = %156
%176 = icmp eq i64 %157, 0
%177 = select i1 %176, i64 2, i64 %155
%178 = getelementptr inbounds double, double* %0, i64 %177
%179 = load double, double* %178
%180 = load <2 x double>, <2 x double>* %125
%181 = add nuw nsw i64 %177, 3
%182 = getelementptr inbounds double, double* %0, i64 %181
%183 = load double, double* %182
%184 = extractelement <2 x double> %180, i64 1
%185 = fmul double %184, %183
%186 = extractelement <2 x double> %180, i64 0
%187 = call double @llvm.fmuladd.f64(double %186, double %179, double %185)
%188 = load double, double* %114
%189 = add nuw nsw i64 %177, 6
%190 = getelementptr inbounds double, double* %0, i64 %189
%191 = load double, double* %190
%192 = call double @llvm.fmuladd.f64(double %188, double %191, double %187)
%193 = fmul double %183, %183
%194 = call double @llvm.fmuladd.f64(double %179, double %179, double %193)
%195 = call double @llvm.fmuladd.f64(double %191, double %191, double %194)
%196 = fdiv double %192, %195
%197 = insertelement <2 x double> poison, double %179, i64 0
%198 = insertelement <2 x double> %197, double %183, i64 1
%199 = fneg <2 x double> %198
%200 = insertelement <2 x double> poison, double %196, i64 0
%201 = shufflevector <2 x double> %200, <2 x double> poison, <2 x i32> zeroinitializer
%202 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %199, <2 x double> %201, <2 x double> %180)
store <2 x double> %202, <2 x double>* %126
%203 = fneg double %191
%204 = call double @llvm.fmuladd.f64(double %203, double %196, double %188)
store double %204, double* %116
br label %233
205: ; preds = %156
%206 = icmp eq i64 %157, 0
%207 = select i1 %206, i64 %153, i64 2
%208 = load double, double* %111
%209 = getelementptr inbounds double, double* %1, i64 %207
%210 = load double, double* %209
%211 = load double, double* %112
%212 = add nuw nsw i64 %207, 3
%213 = getelementptr inbounds double, double* %1, i64 %212
%214 = load double, double* %213
%215 = fmul double %211, %214
%216 = call double @llvm.fmuladd.f64(double %208, double %210, double %215)
%217 = load double, double* %114
%218 = add nuw nsw i64 %207, 6
%219 = getelementptr inbounds double, double* %1, i64 %218
%220 = load double, double* %219
%221 = call double @llvm.fmuladd.f64(double %217, double %220, double %216)
%222 = fmul double %214, %214
%223 = call double @llvm.fmuladd.f64(double %210, double %210, double %222)
%224 = call double @llvm.fmuladd.f64(double %220, double %220, double %223)
%225 = fdiv double %221, %224
%226 = insertelement <2 x double> poison, double %210, i64 0
%227 = insertelement <2 x double> %226, double %214, i64 1
%228 = insertelement <2 x double> poison, double %225, i64 0
%229 = shufflevector <2 x double> %228, <2 x double> poison, <2 x i32> zeroinitializer
%230 = fmul <2 x double> %227, %229
store <2 x double> %230, <2 x double>* %124
%231 = fmul double %220, %225
store double %231, double* %116
br label %233
232: ; preds = %156
br label %233
233: ; preds = %175, %232, %205, %172
%234 = call i32 @dot_matrixT_vector_ddd(double* %1, double* %115, double* %117)
%235 = load double, double* %117
%236 = fsub double %235, %133
%237 = call double @abs(double %236)
%238 = fcmp olt double %237, 0x3FF000010C6F7A0B
br i1 %238, label %239, label %252
239: ; preds = %233
%240 = load double, double* %118
%241 = fsub double %240, %139
%242 = call double @abs(double %241)
%243 = fcmp olt double %242, 0x3FF000010C6F7A0B
br i1 %243, label %244, label %252
244: ; preds = %239
%245 = load double, double* %119
%246 = fsub double %245, %145
%247 = call double @abs(double %246)
%248 = fcmp olt double %247, 0x3FF000010C6F7A0B
br i1 %248, label %249, label %252
249: ; preds = %244
%250 = call double @norm(double* %115)
%251 = fcmp uge double %250, %2
br i1 %251, label %252, label %261
252: ; preds = %233, %239, %244, %249
%253 = add nsw i64 %157, 1
%254 = icmp eq i64 %253, 2
br i1 %254, label %255, label %156
255: ; preds = %252
%256 = add nsw i64 %150, 1
%257 = icmp eq i64 %256, 2
br i1 %257, label %258, label %149
258: ; preds = %255
%259 = add nsw i64 %147, 1
%260 = icmp eq i64 %259, 2
br i1 %260, label %279, label %146
261: ; preds = %249
%262 = getelementptr inbounds i64, i64* %4, i64 %142
store i64 %130, i64* %262
%263 = add i64 %142, 1
%264 = getelementptr inbounds i64, i64* %4, i64 %263
store i64 %136, i64* %264
%265 = add i64 %142, 2
%266 = getelementptr inbounds i64, i64* %4, i64 %265
store i64 %143, i64* %266
%267 = add i64 %142, 3
%268 = icmp eq i64 %143, 0
br i1 %268, label %283, label %269
269: ; preds = %261
%270 = sub nsw i64 0, %143
%271 = icmp slt i64 %98, %270
br i1 %271, label %279, label %272
272: ; preds = %269
%273 = getelementptr inbounds i64, i64* %4, i64 %267
store i64 %134, i64* %273
%274 = add i64 %142, 4
%275 = getelementptr inbounds i64, i64* %4, i64 %274
store i64 %140, i64* %275
%276 = add i64 %142, 5
%277 = getelementptr inbounds i64, i64* %4, i64 %276
store i64 %270, i64* %277
%278 = add i64 %142, 6
br label %279
279: ; preds = %258, %272, %269
%280 = phi i64 [ %278, %272 ], [ %267, %269 ], [ %142, %258 ]
%281 = add i64 %143, 1
%282 = icmp eq i64 %143, 0
br i1 %282, label %283, label %141
283: ; preds = %261, %279, %135
%284 = phi i64 [ %137, %135 ], [ %267, %261 ], [ %280, %279 ]
%285 = add i64 %136, 1
%286 = icmp eq i64 %136, %70
br i1 %286, label %287, label %135
287: ; preds = %283, %129
%288 = phi i64 [ %131, %129 ], [ %284, %283 ]
%289 = add i64 %130, 1
%290 = icmp eq i64 %130, %42
br i1 %290, label %291, label %129
291: ; preds = %287, %96
%292 = phi i64 [ 0, %96 ], [ %288, %287 ]
%293 = udiv i64 %292, 3
ret i64 %293
}