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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ center_of_mass(int, float const *, float const *,
                                  float const *, float *, float *);
float distance_s(float, float, float const, float const);
float weiszfeld_distance_sum(int, float const *, float const *, float, float,
                             float);
int weiszfeld_test_optimum(int, float const *, float const *, float const *,
                           int);
void __attribute__((__always___, __gnu___, __nonnull__, __artificial__))
point_geometric_median(int count, const float *restrict ptsx,
                       const float *restrict ptsy,
                       const float *restrict weights, float *restrict retx,
                       float *restrict rety) {
  for (int i = 0; i < count; i++) {
    int result = weiszfeld_test_optimum(count, ptsx, ptsy, weights, i);
    if (result != -1) {
      *retx = ptsx[i];
      *rety = ptsy[i];
      return;
    }
  }
  float xx, xy;
  center_of_mass(count, ptsx, ptsy, weights, &xx, &xy);
  float e0, e1;
  float epsilon = 0.000001f;
  float hyperbolaE = 0.001f;
  float xnewx, xnewy;
  int iterations = 0;
  do {
    float xt = 0;
    float yt = 0;
    float id = 0;
    float dist = 0;
    for (int i = 0; i < count; i++) {
      dist = distance_s(xx, xy, ptsx[i], ptsy[i]);
      xt += weights[i] * (ptsx[i] / dist);
      yt += weights[i] * (ptsy[i] / dist);
      id += weights[i] * (1.0f / dist);
    }
    xnewx = xt / id;
    xnewy = yt / id;
    e0 = weiszfeld_distance_sum(count, ptsx, ptsy, xx, xy, hyperbolaE);
    e1 = weiszfeld_distance_sum(count, ptsx, ptsy, xnewx, xnewy, hyperbolaE);
    if (e1 >= e0)
      break;
    if (((e0 - e1) / e0) < epsilon)
      break;
    xx = xnewx;
    xy = xnewy;
    iterations++;
  } while (iterations <= 100);
  *retx = xx;
  *rety = xy;
  return;
}


x86 assembly (clang, -O0):
<point_geometric_median>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11d9 <point_geometric_median+0x99>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x34(%rbp),%r8d
call   1060 <weiszfeld_test_optimum@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0xffffffff,-0x38(%rbp)
je     11c6 <point_geometric_median+0x86>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x30(%rbp),%rax
movss  %xmm0,(%rax)
jmp    13f0 <point_geometric_median+0x2b0>
jmp    11cb <point_geometric_median+0x8b>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1166 <point_geometric_median+0x26>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    -0x3c(%rbp),%r8
lea    -0x40(%rbp),%r9
call   1050 <center_of_mass@plt>
movss  0xe07(%rip),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  0xdf6(%rip),%xmm0
movss  %xmm0,-0x50(%rbp)
movl   $0x0,-0x5c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x64(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x6c(%rbp)
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1313 <point_geometric_median+0x1d3>
movss  -0x3c(%rbp),%xmm0
movss  -0x40(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x70(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
mov    -0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm3
call   1030 <distance_s@plt>
movss  %xmm0,-0x6c(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x70(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x70(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
divss  -0x6c(%rbp),%xmm2
movss  -0x60(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x60(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x70(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
divss  -0x6c(%rbp),%xmm2
movss  -0x64(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x64(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x70(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  0xd1a(%rip),%xmm2
divss  -0x6c(%rbp),%xmm2
movss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x68(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    123d <point_geometric_median+0xfd>
movss  -0x60(%rbp),%xmm0
divss  -0x68(%rbp),%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x64(%rbp),%xmm0
divss  -0x68(%rbp),%xmm0
movss  %xmm0,-0x58(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movss  -0x3c(%rbp),%xmm0
movss  -0x40(%rbp),%xmm1
movss  -0x50(%rbp),%xmm2
call   1040 <weiszfeld_distance_sum@plt>
movss  %xmm0,-0x44(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movss  -0x54(%rbp),%xmm0
movss  -0x58(%rbp),%xmm1
movss  -0x50(%rbp),%xmm2
call   1040 <weiszfeld_distance_sum@plt>
movss  %xmm0,-0x48(%rbp)
movss  -0x48(%rbp),%xmm0
ucomiss -0x44(%rbp),%xmm0
jb     138d <point_geometric_median+0x24d>
jmp    13d6 <point_geometric_median+0x296>
movss  -0x44(%rbp),%xmm1
subss  -0x48(%rbp),%xmm1
divss  -0x44(%rbp),%xmm1
movss  -0x4c(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    13af <point_geometric_median+0x26f>
jmp    13d6 <point_geometric_median+0x296>
movss  -0x54(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x58(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
cmpl   $0x64,-0x5c(%rbp)
jle    1216 <point_geometric_median+0xd6>
movss  -0x3c(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x40(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<point_geometric_median>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,0x28(%rsp)
mov    %r8,0x20(%rsp)
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %edi,%r14d
test   %edi,%edi
jle    1196 <point_geometric_median+0x56>
xor    %r15d,%r15d
nopl   (%rax)
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15d,%r8d
call   1060 <weiszfeld_test_optimum@plt>
cmp    $0xffffffff,%eax
jne    1326 <point_geometric_median+0x1e6>
add    $0x1,%r15
cmp    %r15d,%r14d
jne    1170 <point_geometric_median+0x30>
lea    0x14(%rsp),%r8
lea    0x10(%rsp),%r9
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
call   1050 <center_of_mass@plt>
xor    %r15d,%r15d
mov    %ebp,0x18(%rsp)
nopw   0x0(%rax,%rax,1)
test   %ebp,%ebp
jle    1260 <point_geometric_median+0x120>
xorps  %xmm0,%xmm0
xorps  %xmm3,%xmm3
xor    %ebp,%ebp
movss  %xmm3,0xc(%rsp)
movaps %xmm0,0x30(%rsp)
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movss  (%rbx,%rbp,4),%xmm2
movss  0x0(%r13,%rbp,4),%xmm3
call   1030 <distance_s@plt>
movss  0xc(%rsp),%xmm3
movss  (%r12,%rbp,4),%xmm4
movss  (%rbx,%rbp,4),%xmm1
divss  %xmm0,%xmm1
mulss  %xmm4,%xmm1
addss  %xmm1,%xmm3
movss  0x0(%r13,%rbp,4),%xmm1
movaps 0xddd(%rip),%xmm2
movss  %xmm1,%xmm2
movaps 0x30(%rsp),%xmm1
shufps $0x0,%xmm0,%xmm0
divps  %xmm0,%xmm2
shufps $0x0,%xmm4,%xmm4
mulps  %xmm2,%xmm4
movaps %xmm4,%xmm0
addps  %xmm1,%xmm0
add    $0x1,%rbp
cmp    %rbp,%r14
jne    11d0 <point_geometric_median+0x90>
addps  %xmm1,%xmm4
mov    0x18(%rsp),%ebp
jmp    1266 <point_geometric_median+0x126>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xorps  %xmm4,%xmm4
xorps  %xmm3,%xmm3
movaps %xmm4,%xmm0
shufps $0x55,%xmm4,%xmm0
divss  %xmm0,%xmm3
movss  %xmm3,0xc(%rsp)
divss  %xmm0,%xmm4
movaps %xmm4,0x30(%rsp)
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r13,%rdx
movss  0xd74(%rip),%xmm2
call   1040 <weiszfeld_distance_sum@plt>
movss  %xmm0,0x1c(%rsp)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r13,%rdx
movss  0xc(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movss  0xd4e(%rip),%xmm2
call   1040 <weiszfeld_distance_sum@plt>
movss  0x1c(%rsp),%xmm2
ucomiss %xmm2,%xmm0
jae    130f <point_geometric_median+0x1cf>
movaps %xmm2,%xmm1
subss  %xmm0,%xmm1
divss  %xmm2,%xmm1
movss  0xd2f(%rip),%xmm0
ucomiss %xmm1,%xmm0
ja     130f <point_geometric_median+0x1cf>
movss  0xc(%rsp),%xmm0
movss  %xmm0,0x14(%rsp)
movaps 0x30(%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
add    $0x1,%r15d
cmp    $0x65,%r15d
jne    11c0 <point_geometric_median+0x80>
movss  0x14(%rsp),%xmm0
mov    0x20(%rsp),%rax
movss  %xmm0,(%rax)
movss  0x10(%rsp),%xmm0
jmp    133c <point_geometric_median+0x1fc>
movss  (%rbx,%r15,4),%xmm0
mov    0x20(%rsp),%rax
movss  %xmm0,(%rax)
movss  0x0(%r13,%r15,4),%xmm0
mov    0x28(%rsp),%rax
movss  %xmm0,(%rax)
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @point_geometric_median(i32 %0, float* noalias %1, float* noalias %2, float* noalias %3, float* noalias %4, float* noalias %5) {
%7 = alloca i32
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca float*
%12 = alloca float*
%13 = alloca i32
%14 = alloca i32
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca float
%21 = alloca float
%22 = alloca float
%23 = alloca i32
%24 = alloca float
%25 = alloca float
%26 = alloca float
%27 = alloca float
%28 = alloca i32
store i32 %0, i32* %7
store float* %1, float** %8
store float* %2, float** %9
store float* %3, float** %10
store float* %4, float** %11
store float* %5, float** %12
store i32 0, i32* %13
br label %29
29: ; preds = %56, %6
%30 = load i32, i32* %13
%31 = load i32, i32* %7
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %59
33: ; preds = %29
%34 = load i32, i32* %7
%35 = load float*, float** %8
%36 = load float*, float** %9
%37 = load float*, float** %10
%38 = load i32, i32* %13
%39 = call i32 @weiszfeld_test_optimum(i32 %34, float* %35, float* %36, float* %37, i32 %38)
store i32 %39, i32* %14
%40 = load i32, i32* %14
%41 = icmp ne i32 %40, -1
br i1 %41, label %42, label %55
42: ; preds = %33
%43 = load float*, float** %8
%44 = load i32, i32* %13
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds float, float* %43, i64 %45
%47 = load float, float* %46
%48 = load float*, float** %11
store float %47, float* %48
%49 = load float*, float** %9
%50 = load i32, i32* %13
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds float, float* %49, i64 %51
%53 = load float, float* %52
%54 = load float*, float** %12
store float %53, float* %54
br label %171
55: ; preds = %33
br label %56
56: ; preds = %55
%57 = load i32, i32* %13
%58 = add nsw i32 %57, 1
store i32 %58, i32* %13
br label %29
59: ; preds = %29
%60 = load i32, i32* %7
%61 = load float*, float** %8
%62 = load float*, float** %9
%63 = load float*, float** %10
%64 = call i32 @center_of_mass(i32 %60, float* %61, float* %62, float* %63, float* %15, float* %16)
store float 0x3EB0C6F7A0000000, float* %19
store float 0x3F50624DE0000000, float* %20
store i32 0, i32* %23
br label %65
65: ; preds = %163, %59
store float 0.000000e+00, float* %24
store float 0.000000e+00, float* %25
store float 0.000000e+00, float* %26
store float 0.000000e+00, float* %27
store i32 0, i32* %28
br label %66
66: ; preds = %121, %65
%67 = load i32, i32* %28
%68 = load i32, i32* %7
%69 = icmp slt i32 %67, %68
br i1 %69, label %70, label %124
70: ; preds = %66
%71 = load float, float* %15
%72 = load float, float* %16
%73 = load float*, float** %8
%74 = load i32, i32* %28
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds float, float* %73, i64 %75
%77 = load float, float* %76
%78 = load float*, float** %9
%79 = load i32, i32* %28
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds float, float* %78, i64 %80
%82 = load float, float* %81
%83 = call float @distance_s(float %71, float %72, float %77, float %82)
store float %83, float* %27
%84 = load float*, float** %10
%85 = load i32, i32* %28
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds float, float* %84, i64 %86
%88 = load float, float* %87
%89 = load float*, float** %8
%90 = load i32, i32* %28
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds float, float* %89, i64 %91
%93 = load float, float* %92
%94 = load float, float* %27
%95 = fdiv float %93, %94
%96 = load float, float* %24
%97 = call float @llvm.fmuladd.f32(float %88, float %95, float %96)
store float %97, float* %24
%98 = load float*, float** %10
%99 = load i32, i32* %28
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds float, float* %98, i64 %100
%102 = load float, float* %101
%103 = load float*, float** %9
%104 = load i32, i32* %28
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds float, float* %103, i64 %105
%107 = load float, float* %106
%108 = load float, float* %27
%109 = fdiv float %107, %108
%110 = load float, float* %25
%111 = call float @llvm.fmuladd.f32(float %102, float %109, float %110)
store float %111, float* %25
%112 = load float*, float** %10
%113 = load i32, i32* %28
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds float, float* %112, i64 %114
%116 = load float, float* %115
%117 = load float, float* %27
%118 = fdiv float 1.000000e+00, %117
%119 = load float, float* %26
%120 = call float @llvm.fmuladd.f32(float %116, float %118, float %119)
store float %120, float* %26
br label %121
121: ; preds = %70
%122 = load i32, i32* %28
%123 = add nsw i32 %122, 1
store i32 %123, i32* %28
br label %66
124: ; preds = %66
%125 = load float, float* %24
%126 = load float, float* %26
%127 = fdiv float %125, %126
store float %127, float* %21
%128 = load float, float* %25
%129 = load float, float* %26
%130 = fdiv float %128, %129
store float %130, float* %22
%131 = load i32, i32* %7
%132 = load float*, float** %8
%133 = load float*, float** %9
%134 = load float, float* %15
%135 = load float, float* %16
%136 = load float, float* %20
%137 = call float @weiszfeld_distance_sum(i32 %131, float* %132, float* %133, float %134, float %135, float %136)
store float %137, float* %17
%138 = load i32, i32* %7
%139 = load float*, float** %8
%140 = load float*, float** %9
%141 = load float, float* %21
%142 = load float, float* %22
%143 = load float, float* %20
%144 = call float @weiszfeld_distance_sum(i32 %138, float* %139, float* %140, float %141, float %142, float %143)
store float %144, float* %18
%145 = load float, float* %18
%146 = load float, float* %17
%147 = fcmp oge float %145, %146
br i1 %147, label %148, label %149
148: ; preds = %124
br label %166
149: ; preds = %124
%150 = load float, float* %17
%151 = load float, float* %18
%152 = fsub float %150, %151
%153 = load float, float* %17
%154 = fdiv float %152, %153
%155 = load float, float* %19
%156 = fcmp olt float %154, %155
br i1 %156, label %157, label %158
157: ; preds = %149
br label %166
158: ; preds = %149
%159 = load float, float* %21
store float %159, float* %15
%160 = load float, float* %22
store float %160, float* %16
%161 = load i32, i32* %23
%162 = add nsw i32 %161, 1
store i32 %162, i32* %23
br label %163
163: ; preds = %158
%164 = load i32, i32* %23
%165 = icmp sle i32 %164, 100
br i1 %165, label %65, label %166
166: ; preds = %163, %157, %148
%167 = load float, float* %15
%168 = load float*, float** %11
store float %167, float* %168
%169 = load float, float* %16
%170 = load float*, float** %12
store float %169, float* %170
br label %171
171: ; preds = %166, %42
ret void
}

LLVM IR (-O2):
define void @point_geometric_median(i32 %0, float* noalias %1, float* noalias %2, float* noalias %3, float* noalias nocapture writeonly %4, float* noalias nocapture writeonly %5) {
%7 = alloca float
%8 = alloca float
%9 = icmp sgt i32 %0, 0
br i1 %9, label %10, label %23
10: ; preds = %6, %14
%11 = phi i32 [ %15, %14 ], [ 0, %6 ]
%12 = tail call i32 @weiszfeld_test_optimum(i32 %0, float* %1, float* %2, float* %3, i32 %11)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = add nuw nsw i32 %11, 1
%16 = icmp eq i32 %15, %0
br i1 %16, label %23, label %10
17: ; preds = %10
%18 = zext i32 %11 to i64
%19 = getelementptr inbounds float, float* %1, i64 %18
%20 = load float, float* %19
store float %20, float* %4
%21 = getelementptr inbounds float, float* %2, i64 %18
%22 = load float, float* %21
store float %22, float* %5
br label %80
23: ; preds = %14, %6
%24 = bitcast float* %7 to i8*
%25 = bitcast float* %8 to i8*
%26 = call i32 @center_of_mass(i32 %0, float* %1, float* %2, float* %3, float* %7, float* %8)
%27 = zext i32 %0 to i64
br label %28
28: ; preds = %74, %23
%29 = phi i32 [ 0, %23 ], [ %75, %74 ]
br i1 %9, label %44, label %32
30: ; preds = %44
%31 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %66, <2 x float> %64, <2 x float> %47)
br label %32
32: ; preds = %30, %28
%33 = phi float [ 0.000000e+00, %28 ], [ %59, %30 ]
%34 = phi <2 x float> [ zeroinitializer, %28 ], [ %31, %30 ]
%35 = extractelement <2 x float> %34, i64 1
%36 = fdiv float %33, %35
%37 = extractelement <2 x float> %34, i64 0
%38 = fdiv float %37, %35
%39 = load float, float* %7
%40 = load float, float* %8
%41 = call float @weiszfeld_distance_sum(i32 %0, float* %1, float* %2, float %39, float %40, float 0x3F50624DE0000000)
%42 = call float @weiszfeld_distance_sum(i32 %0, float* %1, float* %2, float %36, float %38, float 0x3F50624DE0000000)
%43 = fcmp ult float %42, %41
br i1 %43, label %70, label %77
44: ; preds = %28, %44
%45 = phi i64 [ %68, %44 ], [ 0, %28 ]
%46 = phi float [ %59, %44 ], [ 0.000000e+00, %28 ]
%47 = phi <2 x float> [ %67, %44 ], [ zeroinitializer, %28 ]
%48 = load float, float* %7
%49 = load float, float* %8
%50 = getelementptr inbounds float, float* %1, i64 %45
%51 = load float, float* %50
%52 = getelementptr inbounds float, float* %2, i64 %45
%53 = load float, float* %52
%54 = call float @distance_s(float %48, float %49, float %51, float %53)
%55 = getelementptr inbounds float, float* %3, i64 %45
%56 = load float, float* %55
%57 = load float, float* %50
%58 = fdiv float %57, %54
%59 = call float @llvm.fmuladd.f32(float %56, float %58, float %46)
%60 = load float, float* %52
%61 = insertelement <2 x float> <float poison, float 1.000000e+00>, float %60, i64 0
%62 = insertelement <2 x float> poison, float %54, i64 0
%63 = shufflevector <2 x float> %62, <2 x float> poison, <2 x i32> zeroinitializer
%64 = fdiv <2 x float> %61, %63
%65 = insertelement <2 x float> poison, float %56, i64 0
%66 = shufflevector <2 x float> %65, <2 x float> poison, <2 x i32> zeroinitializer
%67 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %66, <2 x float> %64, <2 x float> %47)
%68 = add nuw nsw i64 %45, 1
%69 = icmp eq i64 %68, %27
br i1 %69, label %30, label %44
70: ; preds = %32
%71 = fsub float %41, %42
%72 = fdiv float %71, %41
%73 = fcmp olt float %72, 0x3EB0C6F7A0000000
br i1 %73, label %77, label %74
74: ; preds = %70
store float %36, float* %7
store float %38, float* %8
%75 = add nuw nsw i32 %29, 1
%76 = icmp eq i32 %75, 101
br i1 %76, label %77, label %28
77: ; preds = %70, %32, %74
%78 = load float, float* %7
store float %78, float* %4
%79 = load float, float* %8
store float %79, float* %5
br label %80
80: ; preds = %17, %77
ret void
}