#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 compute_distance(double *, double const *, unsigned int);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(unsigned int);
void furthest_first(double *CX, const double *X, unsigned int dim,
                    unsigned int npts, unsigned int nclus) {
  int max_i;
  double *distances, max_d;
  distances = (double *)malloc(npts * sizeof(*distances));
  for (int i = 0; i < npts; i++)
    distances[i] = 10e8;
  for (int i = 1; i < nclus; i++) {
    double *a = CX + (i - 1) * dim;
    max_d = 0;
    max_i = 0;
    for (int j = 0; j < npts; j++) {
      double d = compute_distance(a, X + j * dim, dim);
      if (d < distances[j])
        distances[j] = d;
      if (max_d < distances[j]) {
        max_d = distances[j];
        max_i = j;
      }
    }
    a = CX + i * dim;
    const double *b = X + max_i * dim;
    for (int j = 0; j < dim; j++)
      a[j] = b[j];
  }
  free(distances);
}


x86 assembly (clang, -O0):
<furthest_first>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x18(%rbp),%eax
jae    1192 <furthest_first+0x62>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xe81(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1163 <furthest_first+0x33>
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jae    12fa <furthest_first+0x1ca>
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x14(%rbp),%ecx
mov    %ecx,%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x18(%rbp),%eax
jae    127c <furthest_first+0x14c>
mov    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x44(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,%eax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
call   1050 <compute_distance@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm1
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    1235 <furthest_first+0x105>
movsd  -0x50(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm1
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    1269 <furthest_first+0x139>
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    126e <furthest_first+0x13e>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11d6 <furthest_first+0xa6>
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x14(%rbp),%ecx
mov    %ecx,%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x14(%rbp),%ecx
mov    %ecx,%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    12e7 <furthest_first+0x1b7>
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    12b3 <furthest_first+0x183>
jmp    12ec <furthest_first+0x1bc>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1199 <furthest_first+0x69>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<furthest_first>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r8d,%r14d
mov    %ecx,%ebx
mov    %edx,%r13d
mov    %rsi,0x18(%rsp)
mov    %rdi,0x8(%rsp)
lea    0x0(,%rbx,8),%edi
call   1040 <malloc@plt>
mov    %rax,%r8
mov    %ebx,%ebp
mov    %rbx,0x20(%rsp)
test   %ebx,%ebx
je     12ad <furthest_first+0x17d>
cmpl   $0x4,0x20(%rsp)
jae    117f <furthest_first+0x4f>
xor    %eax,%eax
jmp    1289 <furthest_first+0x159>
mov    %ebp,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x1c,%rsi
jae    11a5 <furthest_first+0x75>
xor    %esi,%esi
jmp    1255 <furthest_first+0x125>
and    $0xfffffffffffffff8,%rdx
xor    %esi,%esi
movapd 0xe4d(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd %xmm0,(%r8,%rsi,8)
movupd %xmm0,0x10(%r8,%rsi,8)
movupd %xmm0,0x20(%r8,%rsi,8)
movupd %xmm0,0x30(%r8,%rsi,8)
movupd %xmm0,0x40(%r8,%rsi,8)
movupd %xmm0,0x50(%r8,%rsi,8)
movupd %xmm0,0x60(%r8,%rsi,8)
movupd %xmm0,0x70(%r8,%rsi,8)
movupd %xmm0,0x80(%r8,%rsi,8)
movupd %xmm0,0x90(%r8,%rsi,8)
movupd %xmm0,0xa0(%r8,%rsi,8)
movupd %xmm0,0xb0(%r8,%rsi,8)
movupd %xmm0,0xc0(%r8,%rsi,8)
movupd %xmm0,0xd0(%r8,%rsi,8)
movupd %xmm0,0xe0(%r8,%rsi,8)
movupd %xmm0,0xf0(%r8,%rsi,8)
add    $0x20,%rsi
add    $0xfffffffffffffff8,%rdx
jne    11c0 <furthest_first+0x90>
test   %rcx,%rcx
je     1284 <furthest_first+0x154>
lea    (%r8,%rsi,8),%rdx
add    $0x10,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
movapd 0xd90(%rip),%xmm0
movupd %xmm0,-0x10(%rdx,%rsi,1)
movupd %xmm0,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    1270 <furthest_first+0x140>
cmp    %rbp,%rax
je     12ad <furthest_first+0x17d>
movabs $0x41cdcd6500000000,%rcx
cd cd 41
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rcx,(%r8,%rax,8)
add    $0x1,%rax
cmp    %rax,%rbp
jne    12a0 <furthest_first+0x170>
cmp    $0x2,%r14d
jb     1665 <furthest_first+0x535>
mov    %r14d,%eax
mov    %rax,0xa0(%rsp)
mov    %r13d,%r14d
mov    0x8(%rsp),%rdx
lea    (%rdx,%r14,8),%rax
mov    %rax,0x68(%rsp)
mov    0x18(%rsp),%rcx
lea    (%rcx,%r14,8),%rax
mov    %rax,0x80(%rsp)
mov    %r14d,%eax
and    $0xfffffffc,%eax
mov    %rax,0x60(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x58(%rsp)
shr    $0x2,%rax
add    $0x1,%rax
movabs $0x7ffffffffffffff8,%rsi
ff ff 7f
or     $0x4,%rsi
and    %rax,%rsi
mov    %rsi,0x38(%rsp)
and    $0x3,%eax
mov    %r14d,%r9d
and    $0x3,%r9d
lea    0x70(%rcx),%rsi
mov    %rsi,0x30(%rsp)
lea    0x70(%rdx),%rsi
mov    %rsi,0x28(%rsp)
lea    0x10(%rdx),%rsi
mov    %rsi,0x48(%rsp)
lea    0x10(%rcx),%rsi
mov    %rsi,0x40(%rsp)
mov    %rax,0x50(%rsp)
mov    %rax,%r10
shl    $0x5,%r10
lea    0x18(%rdx),%rax
mov    %rax,0x78(%rsp)
lea    0x18(%rcx),%rax
mov    %rax,0x70(%rsp)
mov    $0x1,%eax
mov    %rax,0x10(%rsp)
xor    %r11d,%r11d
mov    %r13d,%ebx
mov    %r14,0x98(%rsp)
mov    %r9,0x90(%rsp)
mov    %r10,0x88(%rsp)
jmp    13b3 <furthest_first+0x283>
nopl   0x0(%rax)
mov    0x10(%rsp),%rax
add    $0x1,%rax
add    $0x1,%r11d
add    %r13d,%ebx
mov    %rax,0x10(%rsp)
cmp    0xa0(%rsp),%rax
je     1665 <furthest_first+0x535>
mov    %rbx,0xa8(%rsp)
mov    %r11,0xb0(%rsp)
mov    $0x0,%r15d
cmpl   $0x0,0x20(%rsp)
je     1470 <furthest_first+0x340>
mov    0x10(%rsp),%rax
add    $0xffffffff,%eax
imul   %r13d,%eax
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
mov    %rax,0xb8(%rsp)
xorps  %xmm1,%xmm1
xor    %r12d,%r12d
xor    %r14d,%r14d
xor    %r15d,%r15d
jmp    1424 <furthest_first+0x2f4>
nop
movsd  0xc0(%rsp),%xmm0
ucomisd %xmm0,%xmm1
cmova  %r14d,%r15d
maxsd  %xmm0,%xmm1
add    $0x1,%r14
add    %ebx,%r12d
cmp    %r14,%rbp
mov    %ebx,%r13d
je     1470 <furthest_first+0x340>
movsd  %xmm1,0xc0(%rsp)
mov    %r12d,%eax
mov    0x18(%rsp),%rcx
lea    (%rcx,%rax,8),%rsi
mov    0xb8(%rsp),%rdi
mov    %r13d,%edx
mov    %r13d,%ebx
mov    %r8,%r13
call   1050 <compute_distance@plt>
mov    %r13,%r8
movsd  0x0(%r13,%r14,8),%xmm1
ucomisd %xmm0,%xmm1
jbe    1400 <furthest_first+0x2d0>
movsd  %xmm0,(%r8,%r14,8)
movapd %xmm0,%xmm1
jmp    1400 <furthest_first+0x2d0>
nopl   0x0(%rax,%rax,1)
mov    0xa8(%rsp),%rbx
mov    %ebx,%ebx
test   %r13d,%r13d
mov    0x98(%rsp),%r14
mov    0x90(%rsp),%r9
mov    0x88(%rsp),%r10
mov    0xb0(%rsp),%r11
je     1390 <furthest_first+0x260>
imul   %r13d,%r15d
mov    0x18(%rsp),%rax
lea    (%rax,%r15,8),%rax
cmp    $0x4,%r13d
jb     14f0 <furthest_first+0x3c0>
mov    %r11d,%ecx
imul   %r13d,%ecx
add    %r13d,%ecx
mov    0x8(%rsp),%rdx
lea    (%rdx,%rcx,8),%rdx
mov    0x80(%rsp),%rsi
lea    (%rsi,%r15,8),%rsi
cmp    %rsi,%rdx
jae    157c <furthest_first+0x44c>
mov    0x68(%rsp),%rdx
lea    (%rdx,%rcx,8),%rcx
cmp    %rcx,%rax
jae    157c <furthest_first+0x44c>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
add    %r14,%rdx
test   %r9,%r9
je     1524 <furthest_first+0x3f4>
mov    0x8(%rsp),%rsi
lea    (%rsi,%rbx,8),%rsi
mov    %r9,%rdi
nopl   0x0(%rax)
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rsi,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rdi
jne    1510 <furthest_first+0x3e0>
cmp    $0x3,%rdx
jb     1390 <furthest_first+0x260>
mov    0x78(%rsp),%rax
lea    (%rax,%rbx,8),%rax
mov    0x70(%rsp),%rdx
lea    (%rdx,%r15,8),%rdx
movsd  -0x18(%rdx,%rcx,8),%xmm0
movsd  %xmm0,-0x18(%rax,%rcx,8)
movsd  -0x10(%rdx,%rcx,8),%xmm0
movsd  %xmm0,-0x10(%rax,%rcx,8)
movsd  -0x8(%rdx,%rcx,8),%xmm0
movsd  %xmm0,-0x8(%rax,%rcx,8)
movsd  (%rdx,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%r14
jne    1540 <furthest_first+0x410>
jmp    1390 <furthest_first+0x260>
cmpq   $0xc,0x58(%rsp)
jae    158b <furthest_first+0x45b>
xor    %ecx,%ecx
jmp    160c <furthest_first+0x4dc>
mov    0x28(%rsp),%rcx
lea    (%rcx,%rbx,8),%rdx
mov    0x30(%rsp),%rcx
lea    (%rcx,%r15,8),%rsi
mov    0x38(%rsp),%rdi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movups -0x70(%rsi,%rcx,8),%xmm0
movups -0x60(%rsi,%rcx,8),%xmm1
movups %xmm0,-0x70(%rdx,%rcx,8)
movups %xmm1,-0x60(%rdx,%rcx,8)
movups -0x50(%rsi,%rcx,8),%xmm0
movups -0x40(%rsi,%rcx,8),%xmm1
movups %xmm0,-0x50(%rdx,%rcx,8)
movups %xmm1,-0x40(%rdx,%rcx,8)
movups -0x30(%rsi,%rcx,8),%xmm0
movups -0x20(%rsi,%rcx,8),%xmm1
movups %xmm0,-0x30(%rdx,%rcx,8)
movups %xmm1,-0x20(%rdx,%rcx,8)
movupd -0x10(%rsi,%rcx,8),%xmm0
movupd (%rsi,%rcx,8),%xmm1
movupd %xmm0,-0x10(%rdx,%rcx,8)
movupd %xmm1,(%rdx,%rcx,8)
add    $0x10,%rcx
add    $0xfffffffffffffffc,%rdi
jne    15b0 <furthest_first+0x480>
cmpq   $0x0,0x50(%rsp)
je     164f <furthest_first+0x51f>
lea    (%rcx,%rbx,1),%rdx
mov    0x48(%rsp),%rsi
lea    (%rsi,%rdx,8),%rdx
add    %r15,%rcx
mov    0x40(%rsp),%rsi
lea    (%rsi,%rcx,8),%rcx
xor    %esi,%esi
nop
movupd -0x10(%rcx,%rsi,1),%xmm0
movupd (%rcx,%rsi,1),%xmm1
movupd %xmm0,-0x10(%rdx,%rsi,1)
movupd %xmm1,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%r10
jne    1630 <furthest_first+0x500>
mov    0x60(%rsp),%rdx
mov    %rdx,%rcx
cmp    %r14,%rdx
je     1390 <furthest_first+0x260>
jmp    14f2 <furthest_first+0x3c2>
mov    %r8,%rdi
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @furthest_first(double* %0, double* %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double
%14 = alloca i32
%15 = alloca i32
%16 = alloca double*
%17 = alloca i32
%18 = alloca double
%19 = alloca double*
%20 = alloca i32
store double* %0, double** %6
store double* %1, double** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%21 = load i32, i32* %9
%22 = zext i32 %21 to i64
%23 = mul i64 %22, 8
%24 = trunc i64 %23 to i32
%25 = call i64 @malloc(i32 %24)
%26 = inttoptr i64 %25 to double*
store double* %26, double** %12
store i32 0, i32* %14
br label %27
27: ; preds = %36, %5
%28 = load i32, i32* %14
%29 = load i32, i32* %9
%30 = icmp ult i32 %28, %29
br i1 %30, label %31, label %39
31: ; preds = %27
%32 = load double*, double** %12
%33 = load i32, i32* %14
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds double, double* %32, i64 %34
store double 1.000000e+09, double* %35
br label %36
36: ; preds = %31
%37 = load i32, i32* %14
%38 = add nsw i32 %37, 1
store i32 %38, i32* %14
br label %27
39: ; preds = %27
store i32 1, i32* %15
br label %40
40: ; preds = %129, %39
%41 = load i32, i32* %15
%42 = load i32, i32* %10
%43 = icmp ult i32 %41, %42
br i1 %43, label %44, label %132
44: ; preds = %40
%45 = load double*, double** %6
%46 = load i32, i32* %15
%47 = sub nsw i32 %46, 1
%48 = load i32, i32* %8
%49 = mul i32 %47, %48
%50 = zext i32 %49 to i64
%51 = getelementptr inbounds double, double* %45, i64 %50
store double* %51, double** %16
store double 0.000000e+00, double* %13
store i32 0, i32* %11
store i32 0, i32* %17
br label %52
52: ; preds = %95, %44
%53 = load i32, i32* %17
%54 = load i32, i32* %9
%55 = icmp ult i32 %53, %54
br i1 %55, label %56, label %98
56: ; preds = %52
%57 = load double*, double** %16
%58 = load double*, double** %7
%59 = load i32, i32* %17
%60 = load i32, i32* %8
%61 = mul i32 %59, %60
%62 = zext i32 %61 to i64
%63 = getelementptr inbounds double, double* %58, i64 %62
%64 = load i32, i32* %8
%65 = call double @compute_distance(double* %57, double* %63, i32 %64)
store double %65, double* %18
%66 = load double, double* %18
%67 = load double*, double** %12
%68 = load i32, i32* %17
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds double, double* %67, i64 %69
%71 = load double, double* %70
%72 = fcmp olt double %66, %71
br i1 %72, label %73, label %79
73: ; preds = %56
%74 = load double, double* %18
%75 = load double*, double** %12
%76 = load i32, i32* %17
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %75, i64 %77
store double %74, double* %78
br label %79
79: ; preds = %73, %56
%80 = load double, double* %13
%81 = load double*, double** %12
%82 = load i32, i32* %17
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds double, double* %81, i64 %83
%85 = load double, double* %84
%86 = fcmp olt double %80, %85
br i1 %86, label %87, label %94
87: ; preds = %79
%88 = load double*, double** %12
%89 = load i32, i32* %17
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %88, i64 %90
%92 = load double, double* %91
store double %92, double* %13
%93 = load i32, i32* %17
store i32 %93, i32* %11
br label %94
94: ; preds = %87, %79
br label %95
95: ; preds = %94
%96 = load i32, i32* %17
%97 = add nsw i32 %96, 1
store i32 %97, i32* %17
br label %52
98: ; preds = %52
%99 = load double*, double** %6
%100 = load i32, i32* %15
%101 = load i32, i32* %8
%102 = mul i32 %100, %101
%103 = zext i32 %102 to i64
%104 = getelementptr inbounds double, double* %99, i64 %103
store double* %104, double** %16
%105 = load double*, double** %7
%106 = load i32, i32* %11
%107 = load i32, i32* %8
%108 = mul i32 %106, %107
%109 = zext i32 %108 to i64
%110 = getelementptr inbounds double, double* %105, i64 %109
store double* %110, double** %19
store i32 0, i32* %20
br label %111
111: ; preds = %125, %98
%112 = load i32, i32* %20
%113 = load i32, i32* %8
%114 = icmp ult i32 %112, %113
br i1 %114, label %115, label %128
115: ; preds = %111
%116 = load double*, double** %19
%117 = load i32, i32* %20
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %116, i64 %118
%120 = load double, double* %119
%121 = load double*, double** %16
%122 = load i32, i32* %20
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %121, i64 %123
store double %120, double* %124
br label %125
125: ; preds = %115
%126 = load i32, i32* %20
%127 = add nsw i32 %126, 1
store i32 %127, i32* %20
br label %111
128: ; preds = %111
br label %129
129: ; preds = %128
%130 = load i32, i32* %15
%131 = add nsw i32 %130, 1
store i32 %131, i32* %15
br label %40
132: ; preds = %40
%133 = load double*, double** %12
%134 = call i32 @free(double* %133)
ret void
}

LLVM IR (-O2):
define void @furthest_first(double* %0, double* %1, i32 %2, i32 %3, i32 %4) {
%6 = shl i32 %3, 3
%7 = tail call i64 @malloc(i32 %6)
%8 = inttoptr i64 %7 to double*
%9 = icmp eq i32 %3, 0
br i1 %9, label %84, label %10
10: ; preds = %5
%11 = zext i32 %3 to i64
%12 = icmp ult i32 %3, 4
br i1 %12, label %82, label %13
13: ; preds = %10
%14 = and i64 %11, 4294967292
%15 = add nsw i64 %14, -4
%16 = lshr exact i64 %15, 2
%17 = add nuw nsw i64 %16, 1
%18 = and i64 %17, 7
%19 = icmp ult i64 %15, 28
br i1 %19, label %67, label %20
20: ; preds = %13
%21 = and i64 %17, 9223372036854775800
br label %22
22: ; preds = %22, %20
%23 = phi i64 [ 0, %20 ], [ %64, %22 ]
%24 = phi i64 [ 0, %20 ], [ %65, %22 ]
%25 = getelementptr inbounds double, double* %8, i64 %23
%26 = bitcast double* %25 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %26
%27 = getelementptr inbounds double, double* %25, i64 2
%28 = bitcast double* %27 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %28
%29 = or i64 %23, 4
%30 = getelementptr inbounds double, double* %8, i64 %29
%31 = bitcast double* %30 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %31
%32 = getelementptr inbounds double, double* %30, i64 2
%33 = bitcast double* %32 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %33
%34 = or i64 %23, 8
%35 = getelementptr inbounds double, double* %8, i64 %34
%36 = bitcast double* %35 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %36
%37 = getelementptr inbounds double, double* %35, i64 2
%38 = bitcast double* %37 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %38
%39 = or i64 %23, 12
%40 = getelementptr inbounds double, double* %8, i64 %39
%41 = bitcast double* %40 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %41
%42 = getelementptr inbounds double, double* %40, i64 2
%43 = bitcast double* %42 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %43
%44 = or i64 %23, 16
%45 = getelementptr inbounds double, double* %8, i64 %44
%46 = bitcast double* %45 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %46
%47 = getelementptr inbounds double, double* %45, i64 2
%48 = bitcast double* %47 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %48
%49 = or i64 %23, 20
%50 = getelementptr inbounds double, double* %8, i64 %49
%51 = bitcast double* %50 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %51
%52 = getelementptr inbounds double, double* %50, i64 2
%53 = bitcast double* %52 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %53
%54 = or i64 %23, 24
%55 = getelementptr inbounds double, double* %8, i64 %54
%56 = bitcast double* %55 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %56
%57 = getelementptr inbounds double, double* %55, i64 2
%58 = bitcast double* %57 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %58
%59 = or i64 %23, 28
%60 = getelementptr inbounds double, double* %8, i64 %59
%61 = bitcast double* %60 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %61
%62 = getelementptr inbounds double, double* %60, i64 2
%63 = bitcast double* %62 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %63
%64 = add nuw i64 %23, 32
%65 = add i64 %24, 8
%66 = icmp eq i64 %65, %21
br i1 %66, label %67, label %22
67: ; preds = %22, %13
%68 = phi i64 [ 0, %13 ], [ %64, %22 ]
%69 = icmp eq i64 %18, 0
br i1 %69, label %80, label %70
70: ; preds = %67, %70
%71 = phi i64 [ %77, %70 ], [ %68, %67 ]
%72 = phi i64 [ %78, %70 ], [ 0, %67 ]
%73 = getelementptr inbounds double, double* %8, i64 %71
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %74
%75 = getelementptr inbounds double, double* %73, i64 2
%76 = bitcast double* %75 to <2 x double>*
store <2 x double> <double 1.000000e+09, double 1.000000e+09>, <2 x double>* %76
%77 = add nuw i64 %71, 4
%78 = add i64 %72, 1
%79 = icmp eq i64 %78, %18
br i1 %79, label %80, label %70
80: ; preds = %70, %67
%81 = icmp eq i64 %14, %11
br i1 %81, label %84, label %82
82: ; preds = %10, %80
%83 = phi i64 [ 0, %10 ], [ %14, %80 ]
br label %106
84: ; preds = %106, %80, %5
%85 = icmp ugt i32 %4, 1
br i1 %85, label %86, label %111
86: ; preds = %84
%87 = icmp eq i32 %2, 0
%88 = zext i32 %4 to i64
%89 = zext i32 %3 to i64
%90 = zext i32 %2 to i64
%91 = getelementptr double, double* %0, i64 %90
%92 = getelementptr double, double* %1, i64 %90
%93 = and i64 %90, 4294967292
%94 = add nsw i64 %93, -4
%95 = lshr exact i64 %94, 2
%96 = add nuw nsw i64 %95, 1
%97 = icmp ult i32 %2, 4
%98 = and i64 %90, 4294967292
%99 = and i64 %96, 3
%100 = icmp ult i64 %94, 12
%101 = and i64 %96, 9223372036854775804
%102 = icmp eq i64 %99, 0
%103 = icmp eq i64 %98, %90
%104 = and i64 %90, 3
%105 = icmp eq i64 %104, 0
br label %113
106: ; preds = %82, %106
%107 = phi i64 [ %109, %106 ], [ %83, %82 ]
%108 = getelementptr inbounds double, double* %8, i64 %107
store double 1.000000e+09, double* %108
%109 = add nuw nsw i64 %107, 1
%110 = icmp eq i64 %109, %11
br i1 %110, label %84, label %106
111: ; preds = %246, %84
%112 = tail call i32 @free(double* %8)
ret void
113: ; preds = %86, %246
%114 = phi i32 [ 0, %86 ], [ %249, %246 ]
%115 = phi i64 [ 1, %86 ], [ %247, %246 ]
%116 = mul i32 %114, %2
%117 = add i32 %116, %2
%118 = zext i32 %117 to i64
%119 = getelementptr double, double* %0, i64 %118
%120 = getelementptr double, double* %91, i64 %118
%121 = trunc i64 %115 to i32
%122 = add i32 %121, -1
%123 = mul i32 %122, %2
%124 = zext i32 %123 to i64
%125 = getelementptr inbounds double, double* %0, i64 %124
br i1 %9, label %126, label %226
126: ; preds = %239, %113
%127 = phi i32 [ 0, %113 ], [ %243, %239 ]
%128 = trunc i64 %115 to i32
%129 = mul i32 %128, %2
%130 = zext i32 %129 to i64
%131 = getelementptr inbounds double, double* %0, i64 %130
%132 = mul i32 %127, %2
%133 = zext i32 %132 to i64
%134 = getelementptr double, double* %1, i64 %133
br i1 %87, label %246, label %135
135: ; preds = %126
br i1 %97, label %210, label %136
136: ; preds = %135
%137 = getelementptr double, double* %92, i64 %133
%138 = icmp ult double* %119, %137
%139 = icmp ult double* %134, %120
%140 = and i1 %138, %139
br i1 %140, label %210, label %141
141: ; preds = %136
br i1 %100, label %191, label %142
142: ; preds = %141, %142
%143 = phi i64 [ %188, %142 ], [ 0, %141 ]
%144 = phi i64 [ %189, %142 ], [ 0, %141 ]
%145 = getelementptr inbounds double, double* %134, i64 %143
%146 = bitcast double* %145 to <2 x double>*
%147 = load <2 x double>, <2 x double>* %146
%148 = getelementptr inbounds double, double* %145, i64 2
%149 = bitcast double* %148 to <2 x double>*
%150 = load <2 x double>, <2 x double>* %149
%151 = getelementptr inbounds double, double* %131, i64 %143
%152 = bitcast double* %151 to <2 x double>*
store <2 x double> %147, <2 x double>* %152
%153 = getelementptr inbounds double, double* %151, i64 2
%154 = bitcast double* %153 to <2 x double>*
store <2 x double> %150, <2 x double>* %154
%155 = or i64 %143, 4
%156 = getelementptr inbounds double, double* %134, i64 %155
%157 = bitcast double* %156 to <2 x double>*
%158 = load <2 x double>, <2 x double>* %157
%159 = getelementptr inbounds double, double* %156, i64 2
%160 = bitcast double* %159 to <2 x double>*
%161 = load <2 x double>, <2 x double>* %160
%162 = getelementptr inbounds double, double* %131, i64 %155
%163 = bitcast double* %162 to <2 x double>*
store <2 x double> %158, <2 x double>* %163
%164 = getelementptr inbounds double, double* %162, i64 2
%165 = bitcast double* %164 to <2 x double>*
store <2 x double> %161, <2 x double>* %165
%166 = or i64 %143, 8
%167 = getelementptr inbounds double, double* %134, i64 %166
%168 = bitcast double* %167 to <2 x double>*
%169 = load <2 x double>, <2 x double>* %168
%170 = getelementptr inbounds double, double* %167, i64 2
%171 = bitcast double* %170 to <2 x double>*
%172 = load <2 x double>, <2 x double>* %171
%173 = getelementptr inbounds double, double* %131, i64 %166
%174 = bitcast double* %173 to <2 x double>*
store <2 x double> %169, <2 x double>* %174
%175 = getelementptr inbounds double, double* %173, i64 2
%176 = bitcast double* %175 to <2 x double>*
store <2 x double> %172, <2 x double>* %176
%177 = or i64 %143, 12
%178 = getelementptr inbounds double, double* %134, i64 %177
%179 = bitcast double* %178 to <2 x double>*
%180 = load <2 x double>, <2 x double>* %179
%181 = getelementptr inbounds double, double* %178, i64 2
%182 = bitcast double* %181 to <2 x double>*
%183 = load <2 x double>, <2 x double>* %182
%184 = getelementptr inbounds double, double* %131, i64 %177
%185 = bitcast double* %184 to <2 x double>*
store <2 x double> %180, <2 x double>* %185
%186 = getelementptr inbounds double, double* %184, i64 2
%187 = bitcast double* %186 to <2 x double>*
store <2 x double> %183, <2 x double>* %187
%188 = add nuw i64 %143, 16
%189 = add nuw i64 %144, 4
%190 = icmp eq i64 %189, %101
br i1 %190, label %191, label %142
191: ; preds = %142, %141
%192 = phi i64 [ 0, %141 ], [ %188, %142 ]
br i1 %102, label %209, label %193
193: ; preds = %191, %193
%194 = phi i64 [ %206, %193 ], [ %192, %191 ]
%195 = phi i64 [ %207, %193 ], [ 0, %191 ]
%196 = getelementptr inbounds double, double* %134, i64 %194
%197 = bitcast double* %196 to <2 x double>*
%198 = load <2 x double>, <2 x double>* %197
%199 = getelementptr inbounds double, double* %196, i64 2
%200 = bitcast double* %199 to <2 x double>*
%201 = load <2 x double>, <2 x double>* %200
%202 = getelementptr inbounds double, double* %131, i64 %194
%203 = bitcast double* %202 to <2 x double>*
store <2 x double> %198, <2 x double>* %203
%204 = getelementptr inbounds double, double* %202, i64 2
%205 = bitcast double* %204 to <2 x double>*
store <2 x double> %201, <2 x double>* %205
%206 = add nuw i64 %194, 4
%207 = add i64 %195, 1
%208 = icmp eq i64 %207, %99
br i1 %208, label %209, label %193
209: ; preds = %193, %191
br i1 %103, label %246, label %210
210: ; preds = %136, %135, %209
%211 = phi i64 [ 0, %136 ], [ 0, %135 ], [ %98, %209 ]
%212 = xor i64 %211, -1
%213 = add nsw i64 %212, %90
br i1 %105, label %223, label %214
214: ; preds = %210, %214
%215 = phi i64 [ %220, %214 ], [ %211, %210 ]
%216 = phi i64 [ %221, %214 ], [ 0, %210 ]
%217 = getelementptr inbounds double, double* %134, i64 %215
%218 = load double, double* %217
%219 = getelementptr inbounds double, double* %131, i64 %215
store double %218, double* %219
%220 = add nuw nsw i64 %215, 1
%221 = add i64 %216, 1
%222 = icmp eq i64 %221, %104
br i1 %222, label %223, label %214
223: ; preds = %214, %210
%224 = phi i64 [ %211, %210 ], [ %220, %214 ]
%225 = icmp ult i64 %213, 3
br i1 %225, label %246, label %250
226: ; preds = %113, %239
%227 = phi i64 [ %244, %239 ], [ 0, %113 ]
%228 = phi i32 [ %243, %239 ], [ 0, %113 ]
%229 = phi double [ %242, %239 ], [ 0.000000e+00, %113 ]
%230 = trunc i64 %227 to i32
%231 = mul i32 %230, %2
%232 = zext i32 %231 to i64
%233 = getelementptr inbounds double, double* %1, i64 %232
%234 = tail call double @compute_distance(double* %125, double* %233, i32 %2)
%235 = getelementptr inbounds double, double* %8, i64 %227
%236 = load double, double* %235
%237 = fcmp olt double %234, %236
br i1 %237, label %238, label %239
238: ; preds = %226
store double %234, double* %235
br label %239
239: ; preds = %238, %226
%240 = phi double [ %234, %238 ], [ %236, %226 ]
%241 = fcmp olt double %229, %240
%242 = select i1 %241, double %240, double %229
%243 = select i1 %241, i32 %230, i32 %228
%244 = add nuw nsw i64 %227, 1
%245 = icmp eq i64 %244, %89
br i1 %245, label %126, label %226
246: ; preds = %223, %250, %209, %126
%247 = add nuw nsw i64 %115, 1
%248 = icmp eq i64 %247, %88
%249 = add i32 %114, 1
br i1 %248, label %111, label %113
250: ; preds = %223, %250
%251 = phi i64 [ %267, %250 ], [ %224, %223 ]
%252 = getelementptr inbounds double, double* %134, i64 %251
%253 = load double, double* %252
%254 = getelementptr inbounds double, double* %131, i64 %251
store double %253, double* %254
%255 = add nuw nsw i64 %251, 1
%256 = getelementptr inbounds double, double* %134, i64 %255
%257 = load double, double* %256
%258 = getelementptr inbounds double, double* %131, i64 %255
store double %257, double* %258
%259 = add nuw nsw i64 %251, 2
%260 = getelementptr inbounds double, double* %134, i64 %259
%261 = load double, double* %260
%262 = getelementptr inbounds double, double* %131, i64 %259
store double %261, double* %262
%263 = add nuw nsw i64 %251, 3
%264 = getelementptr inbounds double, double* %134, i64 %263
%265 = load double, double* %264
%266 = getelementptr inbounds double, double* %131, i64 %263
store double %265, double* %266
%267 = add nuw nsw i64 %251, 4
%268 = icmp eq i64 %267, %90
br i1 %268, label %246, label %250
}