#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 const mat_Dabs(int /*<<< orphan*/);
int /*<<< orphan*/ mat_copy_vector_d3(double *, double *);
int /*<<< orphan*/ mat_get_determinant_d3(double **);
scalar_t__ mat_norm_squared_d3(double *);
void get_delaunay_shortest_vectors_2D(double basis[3][3],
                                      const double unique_vec[3],
                                      const double symprec) {
  int i, j;
  double b[4][3], tmpmat[3][3];
  double tmpvec[3];
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      b[i][j] = basis[i][j];
    }
  }
  for (i = 0; i < 3; i++) {
    b[3][i] = basis[0][i] + basis[1][i];
  }
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      if (mat_norm_squared_d3(b[j]) > mat_norm_squared_d3(b[j + 1]) + 1e-10) {
        mat_copy_vector_d3(tmpvec, b[j]);
        mat_copy_vector_d3(b[j], b[j + 1]);
        mat_copy_vector_d3(b[j + 1], tmpvec);
      }
    }
  }
  for (i = 0; i < 3; i++) {
    tmpmat[i][0] = b[0][i];
    tmpmat[i][1] = unique_vec[i];
  }
  for (i = 1; i < 4; i++) {
    for (j = 0; j < 3; j++) {
      tmpmat[j][2] = b[i][j];
    }
    if (mat_Dabs(mat_get_determinant_d3(tmpmat)) > symprec) {
      for (j = 0; j < 3; j++) {
        basis[0][j] = b[0][j];
        basis[1][j] = b[i][j];
      }
      break;
    }
  }
}


x86 assembly (clang, -O0):
<get_delaunay_shortest_vectors_2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    11cb <get_delaunay_shortest_vectors_2D+0x8b>
movl   $0x0,-0x20(%rbp)
cmpl   $0x3,-0x20(%rbp)
jge    11b8 <get_delaunay_shortest_vectors_2D+0x78>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x1c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1170 <get_delaunay_shortest_vectors_2D+0x30>
jmp    11bd <get_delaunay_shortest_vectors_2D+0x7d>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    115f <get_delaunay_shortest_vectors_2D+0x1f>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    120f <get_delaunay_shortest_vectors_2D+0xcf>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
addsd  0x18(%rax,%rcx,8),%xmm0
movslq -0x1c(%rbp),%rax
movsd  %xmm0,-0x38(%rbp,%rax,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11d2 <get_delaunay_shortest_vectors_2D+0x92>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    1314 <get_delaunay_shortest_vectors_2D+0x1d4>
movl   $0x0,-0x20(%rbp)
cmpl   $0x3,-0x20(%rbp)
jge    1301 <get_delaunay_shortest_vectors_2D+0x1c1>
movslq -0x20(%rbp),%rax
lea    -0x80(%rbp),%rdi
imul   $0x18,%rax,%rax
add    %rax,%rdi
call   1040 <mat_norm_squared_d3@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0x20(%rbp),%eax
add    $0x1,%eax
cltq
lea    -0x80(%rbp),%rdi
imul   $0x18,%rax,%rax
add    %rax,%rdi
call   1040 <mat_norm_squared_d3@plt>
movsd  -0xf8(%rbp),%xmm0
ff
cvtsi2sd %rax,%xmm1
movsd  0xd81(%rip),%xmm2
addsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    12ee <get_delaunay_shortest_vectors_2D+0x1ae>
lea    -0xf0(%rbp),%rdi
movslq -0x20(%rbp),%rax
lea    -0x80(%rbp),%rsi
imul   $0x18,%rax,%rax
add    %rax,%rsi
call   1050 <mat_copy_vector_d3@plt>
movslq -0x20(%rbp),%rax
lea    -0x80(%rbp),%rdi
imul   $0x18,%rax,%rax
add    %rax,%rdi
mov    -0x20(%rbp),%eax
add    $0x1,%eax
cltq
lea    -0x80(%rbp),%rsi
imul   $0x18,%rax,%rax
add    %rax,%rsi
call   1050 <mat_copy_vector_d3@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
cltq
lea    -0x80(%rbp),%rdi
imul   $0x18,%rax,%rax
add    %rax,%rdi
lea    -0xf0(%rbp),%rsi
call   1050 <mat_copy_vector_d3@plt>
jmp    12f3 <get_delaunay_shortest_vectors_2D+0x1b3>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1227 <get_delaunay_shortest_vectors_2D+0xe7>
jmp    1306 <get_delaunay_shortest_vectors_2D+0x1c6>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1216 <get_delaunay_shortest_vectors_2D+0xd6>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    1377 <get_delaunay_shortest_vectors_2D+0x237>
movslq -0x1c(%rbp),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
movslq -0x1c(%rbp),%rcx
lea    -0xd0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x1c(%rbp),%rcx
lea    -0xd0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    131b <get_delaunay_shortest_vectors_2D+0x1db>
movl   $0x1,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    1468 <get_delaunay_shortest_vectors_2D+0x328>
movl   $0x0,-0x20(%rbp)
cmpl   $0x3,-0x20(%rbp)
jge    13d6 <get_delaunay_shortest_vectors_2D+0x296>
movslq -0x1c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x20(%rbp),%rcx
lea    -0xd0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,0x10(%rax)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    138f <get_delaunay_shortest_vectors_2D+0x24f>
lea    -0xd0(%rbp),%rdi
call   1030 <mat_get_determinant_d3@plt>
mov    %eax,%edi
call   1060 <mat_Dabs@plt>
ucomisd -0x18(%rbp),%xmm0
jbe    1455 <get_delaunay_shortest_vectors_2D+0x315>
movl   $0x0,-0x20(%rbp)
cmpl   $0x3,-0x20(%rbp)
jge    1450 <get_delaunay_shortest_vectors_2D+0x310>
movslq -0x20(%rbp),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x1c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,0x18(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    13fb <get_delaunay_shortest_vectors_2D+0x2bb>
jmp    1468 <get_delaunay_shortest_vectors_2D+0x328>
jmp    145a <get_delaunay_shortest_vectors_2D+0x31a>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    137e <get_delaunay_shortest_vectors_2D+0x23e>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_delaunay_shortest_vectors_2D>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %rsi,0xc8(%rsp)
movups (%rdi),%xmm0
movups 0x10(%rdi),%xmm1
movups 0x20(%rdi),%xmm2
movups 0x30(%rdi),%xmm3
movaps %xmm0,0x10(%rsp)
movaps %xmm1,0x20(%rsp)
movaps %xmm2,0x30(%rsp)
movaps %xmm3,0x40(%rsp)
mov    0x40(%rdi),%rax
mov    %rax,0x50(%rsp)
lea    0x40(%rsp),%r13
lea    0x18(%rdi),%rax
mov    %rax,0xb8(%rsp)
lea    0x58(%rsp),%r12
movupd (%rdi),%xmm0
movupd 0x18(%rdi),%xmm1
addpd  %xmm0,%xmm1
movupd %xmm1,0x58(%rsp)
movsd  0x10(%rdi),%xmm0
mov    %rdi,0xc0(%rsp)
addsd  0x28(%rdi),%xmm0
movsd  %xmm0,0x68(%rsp)
lea    0x28(%rsp),%rbx
mov    $0x3,%r15d
lea    0x10(%rsp),%rbp
lea    0xd0(%rsp),%r14
jmp    11fa <get_delaunay_shortest_vectors_2D+0xba>
cs nopw 0x0(%rax,%rax,1)
add    $0xffffffff,%r15d
je     1312 <get_delaunay_shortest_vectors_2D+0x1d2>
mov    %rbp,%rdi
call   1040 <mat_norm_squared_d3@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rsp)
mov    %rbx,%rdi
call   1040 <mat_norm_squared_d3@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0xdd9(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    1257 <get_delaunay_shortest_vectors_2D+0x117>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1050 <mat_copy_vector_d3@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1050 <mat_copy_vector_d3@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <mat_copy_vector_d3@plt>
mov    %rbx,%rdi
call   1040 <mat_norm_squared_d3@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rsp)
mov    %r13,%rdi
call   1040 <mat_norm_squared_d3@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xd7c(%rip),%xmm0
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    12b0 <get_delaunay_shortest_vectors_2D+0x170>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <mat_copy_vector_d3@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1050 <mat_copy_vector_d3@plt>
mov    %r13,%rdi
mov    %r14,%rsi
call   1050 <mat_copy_vector_d3@plt>
mov    %r13,%rdi
call   1040 <mat_norm_squared_d3@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rsp)
mov    %r12,%rdi
call   1040 <mat_norm_squared_d3@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xd23(%rip),%xmm0
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    11f0 <get_delaunay_shortest_vectors_2D+0xb0>
mov    %r14,%rdi
mov    %r13,%rsi
call   1050 <mat_copy_vector_d3@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1050 <mat_copy_vector_d3@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   1050 <mat_copy_vector_d3@plt>
jmp    11f0 <get_delaunay_shortest_vectors_2D+0xb0>
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  %xmm0,0x70(%rsp)
mov    0xc8(%rsp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,0x78(%rsp)
movsd  %xmm1,0x88(%rsp)
movsd  0x8(%rax),%xmm0
movsd  %xmm0,0x90(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,0xa0(%rsp)
movsd  0x10(%rax),%xmm0
movsd  %xmm0,0xa8(%rsp)
movsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x80(%rsp)
movsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x98(%rsp)
movsd  0x38(%rsp),%xmm0
movsd  %xmm0,0xb0(%rsp)
lea    0x70(%rsp),%rdi
call   1030 <mat_get_determinant_d3@plt>
mov    %eax,%edi
call   1060 <mat_Dabs@plt>
mov    $0x1,%eax
ucomisd 0x8(%rsp),%xmm0
ja     144f <get_delaunay_shortest_vectors_2D+0x30f>
movsd  0x40(%rsp),%xmm0
movsd  0x48(%rsp),%xmm1
movsd  %xmm0,0x80(%rsp)
movsd  %xmm1,0x98(%rsp)
movsd  0x50(%rsp),%xmm0
movsd  %xmm0,0xb0(%rsp)
lea    0x70(%rsp),%rdi
call   1030 <mat_get_determinant_d3@plt>
mov    %eax,%edi
call   1060 <mat_Dabs@plt>
mov    $0x2,%eax
ucomisd 0x8(%rsp),%xmm0
ja     144f <get_delaunay_shortest_vectors_2D+0x30f>
movsd  0x58(%rsp),%xmm0
movsd  0x60(%rsp),%xmm1
movsd  %xmm0,0x80(%rsp)
movsd  %xmm1,0x98(%rsp)
movsd  0x68(%rsp),%xmm0
movsd  %xmm0,0xb0(%rsp)
lea    0x70(%rsp),%rdi
call   1030 <mat_get_determinant_d3@plt>
mov    %eax,%edi
call   1060 <mat_Dabs@plt>
mov    $0x3,%eax
ucomisd 0x8(%rsp),%xmm0
jbe    1487 <get_delaunay_shortest_vectors_2D+0x347>
mov    0x20(%rsp),%rcx
mov    0xc0(%rsp),%rdx
mov    %rcx,0x10(%rdx)
movaps 0x10(%rsp),%xmm0
movups %xmm0,(%rdx)
lea    (%rax,%rax,2),%rax
mov    0x20(%rsp,%rax,8),%rcx
mov    0xb8(%rsp),%rdx
mov    %rcx,0x10(%rdx)
movupd 0x10(%rsp,%rax,8),%xmm0
movupd %xmm0,(%rdx)
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @get_delaunay_shortest_vectors_2D([3 x double]* %0, double* %1, double %2) {
%4 = alloca [3 x double]*
%5 = alloca double*
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
%9 = alloca [4 x [3 x double]]
%10 = alloca [3 x [3 x double]]
%11 = alloca [3 x double]
store [3 x double]* %0, [3 x double]** %4
store double* %1, double** %5
store double %2, double* %6
store i32 0, i32* %7
br label %12
12: ; preds = %38, %3
%13 = load i32, i32* %7
%14 = icmp slt i32 %13, 3
br i1 %14, label %15, label %41
15: ; preds = %12
store i32 0, i32* %8
br label %16
16: ; preds = %34, %15
%17 = load i32, i32* %8
%18 = icmp slt i32 %17, 3
br i1 %18, label %19, label %37
19: ; preds = %16
%20 = load [3 x double]*, [3 x double]** %4
%21 = load i32, i32* %7
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 %22
%24 = load i32, i32* %8
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 %25
%27 = load double, double* %26
%28 = load i32, i32* %7
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %9, i64 0, i64 %29
%31 = load i32, i32* %8
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [3 x double], [3 x double]* %30, i64 0, i64 %32
store double %27, double* %33
br label %34
34: ; preds = %19
%35 = load i32, i32* %8
%36 = add nsw i32 %35, 1
store i32 %36, i32* %8
br label %16
37: ; preds = %16
br label %38
38: ; preds = %37
%39 = load i32, i32* %7
%40 = add nsw i32 %39, 1
store i32 %40, i32* %7
br label %12
41: ; preds = %12
store i32 0, i32* %7
br label %42
42: ; preds = %63, %41
%43 = load i32, i32* %7
%44 = icmp slt i32 %43, 3
br i1 %44, label %45, label %66
45: ; preds = %42
%46 = load [3 x double]*, [3 x double]** %4
%47 = getelementptr inbounds [3 x double], [3 x double]* %46, i64 0
%48 = load i32, i32* %7
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [3 x double], [3 x double]* %47, i64 0, i64 %49
%51 = load double, double* %50
%52 = load [3 x double]*, [3 x double]** %4
%53 = getelementptr inbounds [3 x double], [3 x double]* %52, i64 1
%54 = load i32, i32* %7
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [3 x double], [3 x double]* %53, i64 0, i64 %55
%57 = load double, double* %56
%58 = fadd double %51, %57
%59 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %9, i64 0, i64 3
%60 = load i32, i32* %7
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [3 x double], [3 x double]* %59, i64 0, i64 %61
store double %58, double* %62
br label %63
63: ; preds = %45
%64 = load i32, i32* %7
%65 = add nsw i32 %64, 1
store i32 %65, i32* %7
br label %42
66: ; preds = %42
store i32 0, i32* %7
br label %67
67: ; preds = %119, %66
%68 = load i32, i32* %7
%69 = icmp slt i32 %68, 3
br i1 %69, label %70, label %122
70: ; preds = %67
store i32 0, i32* %8
br label %71
71: ; preds = %115, %70
%72 = load i32, i32* %8
%73 = icmp slt i32 %72, 3
br i1 %73, label %74, label %118
74: ; preds = %71
%75 = load i32, i32* %8
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %9, i64 0, i64 %76
%78 = getelementptr inbounds [3 x double], [3 x double]* %77, i64 0, i64 0
%79 = call i64 @mat_norm_squared_d3(double* %78)
%80 = sitofp i64 %79 to double
%81 = load i32, i32* %8
%82 = add nsw i32 %81, 1
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %9, i64 0, i64 %83
%85 = getelementptr inbounds [3 x double], [3 x double]* %84, i64 0, i64 0
%86 = call i64 @mat_norm_squared_d3(double* %85)
%87 = sitofp i64 %86 to double
%88 = fadd double %87, 1.000000e-10
%89 = fcmp ogt double %80, %88
br i1 %89, label %90, label %114
90: ; preds = %74
%91 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
%92 = load i32, i32* %8
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %9, i64 0, i64 %93
%95 = getelementptr inbounds [3 x double], [3 x double]* %94, i64 0, i64 0
%96 = call i32 @mat_copy_vector_d3(double* %91, double* %95)
%97 = load i32, i32* %8
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %9, i64 0, i64 %98
%100 = getelementptr inbounds [3 x double], [3 x double]* %99, i64 0, i64 0
%101 = load i32, i32* %8
%102 = add nsw i32 %101, 1
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %9, i64 0, i64 %103
%105 = getelementptr inbounds [3 x double], [3 x double]* %104, i64 0, i64 0
%106 = call i32 @mat_copy_vector_d3(double* %100, double* %105)
%107 = load i32, i32* %8
%108 = add nsw i32 %107, 1
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %9, i64 0, i64 %109
%111 = getelementptr inbounds [3 x double], [3 x double]* %110, i64 0, i64 0
%112 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
%113 = call i32 @mat_copy_vector_d3(double* %111, double* %112)
br label %114
114: ; preds = %90, %74
br label %115
115: ; preds = %114
%116 = load i32, i32* %8
%117 = add nsw i32 %116, 1
store i32 %117, i32* %8
br label %71
118: ; preds = %71
br label %119
119: ; preds = %118
%120 = load i32, i32* %7
%121 = add nsw i32 %120, 1
store i32 %121, i32* %7
br label %67
122: ; preds = %67
store i32 0, i32* %7
br label %123
123: ; preds = %145, %122
%124 = load i32, i32* %7
%125 = icmp slt i32 %124, 3
br i1 %125, label %126, label %148
126: ; preds = %123
%127 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %9, i64 0, i64 0
%128 = load i32, i32* %7
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds [3 x double], [3 x double]* %127, i64 0, i64 %129
%131 = load double, double* %130
%132 = load i32, i32* %7
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %10, i64 0, i64 %133
%135 = getelementptr inbounds [3 x double], [3 x double]* %134, i64 0, i64 0
store double %131, double* %135
%136 = load double*, double** %5
%137 = load i32, i32* %7
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds double, double* %136, i64 %138
%140 = load double, double* %139
%141 = load i32, i32* %7
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %10, i64 0, i64 %142
%144 = getelementptr inbounds [3 x double], [3 x double]* %143, i64 0, i64 1
store double %140, double* %144
br label %145
145: ; preds = %126
%146 = load i32, i32* %7
%147 = add nsw i32 %146, 1
store i32 %147, i32* %7
br label %123
148: ; preds = %123
store i32 1, i32* %7
br label %149
149: ; preds = %210, %148
%150 = load i32, i32* %7
%151 = icmp slt i32 %150, 4
br i1 %151, label %152, label %213
152: ; preds = %149
store i32 0, i32* %8
br label %153
153: ; preds = %168, %152
%154 = load i32, i32* %8
%155 = icmp slt i32 %154, 3
br i1 %155, label %156, label %171
156: ; preds = %153
%157 = load i32, i32* %7
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %9, i64 0, i64 %158
%160 = load i32, i32* %8
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds [3 x double], [3 x double]* %159, i64 0, i64 %161
%163 = load double, double* %162
%164 = load i32, i32* %8
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %10, i64 0, i64 %165
%167 = getelementptr inbounds [3 x double], [3 x double]* %166, i64 0, i64 2
store double %163, double* %167
br label %168
168: ; preds = %156
%169 = load i32, i32* %8
%170 = add nsw i32 %169, 1
store i32 %170, i32* %8
br label %153
171: ; preds = %153
%172 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %10, i64 0, i64 0
%173 = bitcast [3 x double]* %172 to double**
%174 = call i32 @mat_get_determinant_d3(double** %173)
%175 = call double @mat_Dabs(i32 %174)
%176 = load double, double* %6
%177 = fcmp ogt double %175, %176
br i1 %177, label %178, label %209
178: ; preds = %171
store i32 0, i32* %8
br label %179
179: ; preds = %205, %178
%180 = load i32, i32* %8
%181 = icmp slt i32 %180, 3
br i1 %181, label %182, label %208
182: ; preds = %179
%183 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %9, i64 0, i64 0
%184 = load i32, i32* %8
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds [3 x double], [3 x double]* %183, i64 0, i64 %185
%187 = load double, double* %186
%188 = load [3 x double]*, [3 x double]** %4
%189 = getelementptr inbounds [3 x double], [3 x double]* %188, i64 0
%190 = load i32, i32* %8
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds [3 x double], [3 x double]* %189, i64 0, i64 %191
store double %187, double* %192
%193 = load i32, i32* %7
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %9, i64 0, i64 %194
%196 = load i32, i32* %8
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds [3 x double], [3 x double]* %195, i64 0, i64 %197
%199 = load double, double* %198
%200 = load [3 x double]*, [3 x double]** %4
%201 = getelementptr inbounds [3 x double], [3 x double]* %200, i64 1
%202 = load i32, i32* %8
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds [3 x double], [3 x double]* %201, i64 0, i64 %203
store double %199, double* %204
br label %205
205: ; preds = %182
%206 = load i32, i32* %8
%207 = add nsw i32 %206, 1
store i32 %207, i32* %8
br label %179
208: ; preds = %179
br label %213
209: ; preds = %171
br label %210
210: ; preds = %209
%211 = load i32, i32* %7
%212 = add nsw i32 %211, 1
store i32 %212, i32* %7
br label %149
213: ; preds = %208, %149
ret void
}

LLVM IR (-O2):
define void @get_delaunay_shortest_vectors_2D([3 x double]* nocapture %0, double* nocapture %1, double %2) {
%4 = bitcast [3 x double]* %0 to i8*
%5 = alloca [4 x [3 x double]]
%6 = bitcast [4 x [3 x double]]* %5 to i8*
%7 = alloca [3 x [3 x double]]
%8 = alloca [3 x double]
%9 = bitcast [3 x [3 x double]]* %7 to i8*
%10 = bitcast [3 x double]* %8 to i8*
%11 = getelementptr [3 x double], [3 x double]* %0, i64 1, i64 0
%12 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %5, i64 0, i64 3, i64 0
%13 = bitcast [3 x double]* %0 to <2 x double>*
%14 = load <2 x double>, <2 x double>* %13
%15 = bitcast double* %11 to <2 x double>*
%16 = load <2 x double>, <2 x double>* %15
%17 = fadd <2 x double> %14, %16
%18 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %5, i64 0, i64 3, i64 1
%19 = bitcast double* %12 to <2 x double>*
store <2 x double> %17, <2 x double>* %19
%20 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 2
%21 = load double, double* %20
%22 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 2
%23 = load double, double* %22
%24 = fadd double %21, %23
%25 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %5, i64 0, i64 3, i64 2
store double %24, double* %25
%26 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%27 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %5, i64 0, i64 0, i64 0
%28 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %5, i64 0, i64 1, i64 0
%29 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %5, i64 0, i64 2, i64 0
br label %30
30: ; preds = %3, %64
%31 = phi i32 [ 0, %3 ], [ %65, %64 ]
%32 = call i64 @mat_norm_squared_d3(double* %27)
%33 = sitofp i64 %32 to double
%34 = call i64 @mat_norm_squared_d3(double* %28)
%35 = sitofp i64 %34 to double
%36 = fadd double %35, 1.000000e-10
%37 = fcmp olt double %36, %33
br i1 %37, label %38, label %42
38: ; preds = %30
%39 = call i32 @mat_copy_vector_d3(double* %26, double* %27)
%40 = call i32 @mat_copy_vector_d3(double* %27, double* %28)
%41 = call i32 @mat_copy_vector_d3(double* %28, double* %26)
br label %42
42: ; preds = %30, %38
%43 = call i64 @mat_norm_squared_d3(double* %28)
%44 = sitofp i64 %43 to double
%45 = call i64 @mat_norm_squared_d3(double* %29)
%46 = sitofp i64 %45 to double
%47 = fadd double %46, 1.000000e-10
%48 = fcmp olt double %47, %44
br i1 %48, label %49, label %53
49: ; preds = %42
%50 = call i32 @mat_copy_vector_d3(double* %26, double* %28)
%51 = call i32 @mat_copy_vector_d3(double* %28, double* %29)
%52 = call i32 @mat_copy_vector_d3(double* %29, double* %26)
br label %53
53: ; preds = %49, %42
%54 = call i64 @mat_norm_squared_d3(double* %29)
%55 = sitofp i64 %54 to double
%56 = call i64 @mat_norm_squared_d3(double* %12)
%57 = sitofp i64 %56 to double
%58 = fadd double %57, 1.000000e-10
%59 = fcmp olt double %58, %55
br i1 %59, label %60, label %64
60: ; preds = %53
%61 = call i32 @mat_copy_vector_d3(double* %26, double* %29)
%62 = call i32 @mat_copy_vector_d3(double* %29, double* %12)
%63 = call i32 @mat_copy_vector_d3(double* %12, double* %26)
br label %64
64: ; preds = %60, %53
%65 = add nuw nsw i32 %31, 1
%66 = icmp eq i32 %65, 3
br i1 %66, label %67, label %30
67: ; preds = %64
%68 = load double, double* %27
%69 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0, i64 0
store double %68, double* %69
%70 = load double, double* %1
%71 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0, i64 1
store double %70, double* %71
%72 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %5, i64 0, i64 0, i64 1
%73 = load double, double* %72
%74 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1, i64 0
store double %73, double* %74
%75 = getelementptr inbounds double, double* %1, i64 1
%76 = load double, double* %75
%77 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1, i64 1
store double %76, double* %77
%78 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %5, i64 0, i64 0, i64 2
%79 = load double, double* %78
%80 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2, i64 0
store double %79, double* %80
%81 = getelementptr inbounds double, double* %1, i64 2
%82 = load double, double* %81
%83 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2, i64 1
store double %82, double* %83
%84 = bitcast [3 x [3 x double]]* %7 to double**
%85 = load double, double* %28
%86 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 0, i64 2
store double %85, double* %86
%87 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %5, i64 0, i64 1, i64 1
%88 = load double, double* %87
%89 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 1, i64 2
store double %88, double* %89
%90 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %5, i64 0, i64 1, i64 2
%91 = load double, double* %90
%92 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i64 0, i64 2, i64 2
store double %91, double* %92
%93 = call i32 @mat_get_determinant_d3(double** %84)
%94 = call double @mat_Dabs(i32 %93)
%95 = fcmp ogt double %94, %2
br i1 %95, label %96, label %101
96: ; preds = %110, %101, %67
%97 = phi i64 [ 1, %67 ], [ 2, %101 ], [ 3, %110 ]
%98 = bitcast double* %11 to i8*
%99 = getelementptr [4 x [3 x double]], [4 x [3 x double]]* %5, i64 0, i64 %97, i64 0
%100 = bitcast double* %99 to i8*
br label %117
101: ; preds = %67
%102 = load double, double* %29
store double %102, double* %86
%103 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %5, i64 0, i64 2, i64 1
%104 = load double, double* %103
store double %104, double* %89
%105 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %5, i64 0, i64 2, i64 2
%106 = load double, double* %105
store double %106, double* %92
%107 = call i32 @mat_get_determinant_d3(double** %84)
%108 = call double @mat_Dabs(i32 %107)
%109 = fcmp ogt double %108, %2
br i1 %109, label %96, label %110
110: ; preds = %101
%111 = load double, double* %12
store double %111, double* %86
%112 = load double, double* %18
store double %112, double* %89
%113 = load double, double* %25
store double %113, double* %92
%114 = call i32 @mat_get_determinant_d3(double** %84)
%115 = call double @mat_Dabs(i32 %114)
%116 = fcmp ogt double %115, %2
br i1 %116, label %96, label %117
117: ; preds = %110, %96
ret void
}