; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (statistics)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl12samplemedianEPNS_9ae_vectorElPdPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca %"struct.alglib_impl::ae_vector", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %20, ptr noundef %9)
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 64, i1 false)
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef %10, ptr noundef %21, ptr noundef %22, i1 noundef zeroext true)
  store ptr %10, ptr %5, align 8, !tbaa !5
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  store double 0.000000e+00, ptr %23, align 8, !tbaa !11
  %24 = load i64, ptr %6, align 8, !tbaa !9
  %25 = icmp sge i64 %24, 0
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef @.str.12, ptr noundef %26)
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %27, i32 0, i32 0
  %29 = load i64, ptr %28, align 8, !tbaa !13
  %30 = load i64, ptr %6, align 8, !tbaa !9
  %31 = icmp sge i64 %29, %30
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef @.str.13, ptr noundef %32)
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load i64, ptr %6, align 8, !tbaa !9
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %33, i64 noundef %34, ptr noundef %35)
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %36, ptr noundef @.str.14, ptr noundef %37)
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  store double 0.000000e+00, ptr %38, align 8, !tbaa !11
  %39 = load i64, ptr %6, align 8, !tbaa !9
  %40 = icmp sle i64 %39, 0
  br i1 %40, label %41, label %43

41:                                               ; preds = %4
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %42)
  store i32 1, ptr %19, align 4
  br label %435

43:                                               ; preds = %4
  %44 = load i64, ptr %6, align 8, !tbaa !9
  %45 = icmp eq i64 %44, 1
  br i1 %45, label %46, label %54

46:                                               ; preds = %43
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %47, i32 0, i32 4
  %49 = load ptr, ptr %48, align 8, !tbaa !17
  %50 = getelementptr inbounds double, ptr %49, i64 0
  %51 = load double, ptr %50, align 8, !tbaa !11
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  store double %51, ptr %52, align 8, !tbaa !11
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %53)
  store i32 1, ptr %19, align 4
  br label %435

54:                                               ; preds = %43
  %55 = load i64, ptr %6, align 8, !tbaa !9
  %56 = icmp eq i64 %55, 2
  br i1 %56, label %57, label %72

57:                                               ; preds = %54
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %58, i32 0, i32 4
  %60 = load ptr, ptr %59, align 8, !tbaa !17
  %61 = getelementptr inbounds double, ptr %60, i64 0
  %62 = load double, ptr %61, align 8, !tbaa !11
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %63, i32 0, i32 4
  %65 = load ptr, ptr %64, align 8, !tbaa !17
  %66 = getelementptr inbounds double, ptr %65, i64 1
  %67 = load double, ptr %66, align 8, !tbaa !11
  %68 = fadd double %62, %67
  %69 = fmul double 5.000000e-01, %68
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  store double %69, ptr %70, align 8, !tbaa !11
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %71)
  store i32 1, ptr %19, align 4
  br label %435

72:                                               ; preds = %54
  store i64 0, ptr %14, align 8, !tbaa !9
  %73 = load i64, ptr %6, align 8, !tbaa !9
  %74 = sub nsw i64 %73, 1
  store i64 %74, ptr %12, align 8, !tbaa !9
  %75 = load i64, ptr %6, align 8, !tbaa !9
  %76 = sub nsw i64 %75, 1
  %77 = sdiv i64 %76, 2
  store i64 %77, ptr %16, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %374, %72
  %79 = load i64, ptr %12, align 8, !tbaa !9
  %80 = load i64, ptr %14, align 8, !tbaa !9
  %81 = add nsw i64 %80, 1
  %82 = icmp sle i64 %79, %81
  br i1 %82, label %83, label %127

83:                                               ; preds = %78
  %84 = load i64, ptr %12, align 8, !tbaa !9
  %85 = load i64, ptr %14, align 8, !tbaa !9
  %86 = add nsw i64 %85, 1
  %87 = icmp eq i64 %84, %86
  br i1 %87, label %88, label %126

88:                                               ; preds = %83
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %89, i32 0, i32 4
  %91 = load ptr, ptr %90, align 8, !tbaa !17
  %92 = load i64, ptr %12, align 8, !tbaa !9
  %93 = getelementptr inbounds double, ptr %91, i64 %92
  %94 = load double, ptr %93, align 8, !tbaa !11
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %95, i32 0, i32 4
  %97 = load ptr, ptr %96, align 8, !tbaa !17
  %98 = load i64, ptr %14, align 8, !tbaa !9
  %99 = getelementptr inbounds double, ptr %97, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !11
  %101 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %94, double noundef %100)
  br i1 %101, label %102, label %126

102:                                              ; preds = %88
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %103, i32 0, i32 4
  %105 = load ptr, ptr %104, align 8, !tbaa !17
  %106 = load i64, ptr %14, align 8, !tbaa !9
  %107 = getelementptr inbounds double, ptr %105, i64 %106
  %108 = load double, ptr %107, align 8, !tbaa !11
  store double %108, ptr %18, align 8, !tbaa !11
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %109, i32 0, i32 4
  %111 = load ptr, ptr %110, align 8, !tbaa !17
  %112 = load i64, ptr %12, align 8, !tbaa !9
  %113 = getelementptr inbounds double, ptr %111, i64 %112
  %114 = load double, ptr %113, align 8, !tbaa !11
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %115, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !17
  %118 = load i64, ptr %14, align 8, !tbaa !9
  %119 = getelementptr inbounds double, ptr %117, i64 %118
  store double %114, ptr %119, align 8, !tbaa !11
  %120 = load double, ptr %18, align 8, !tbaa !11
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %121, i32 0, i32 4
  %123 = load ptr, ptr %122, align 8, !tbaa !17
  %124 = load i64, ptr %12, align 8, !tbaa !9
  %125 = getelementptr inbounds double, ptr %123, i64 %124
  store double %120, ptr %125, align 8, !tbaa !11
  br label %126

126:                                              ; preds = %102, %88, %83
  br label %375

127:                                              ; preds = %78
  %128 = load i64, ptr %14, align 8, !tbaa !9
  %129 = load i64, ptr %12, align 8, !tbaa !9
  %130 = add nsw i64 %128, %129
  %131 = sdiv i64 %130, 2
  store i64 %131, ptr %15, align 8, !tbaa !9
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %132, i32 0, i32 4
  %134 = load ptr, ptr %133, align 8, !tbaa !17
  %135 = load i64, ptr %15, align 8, !tbaa !9
  %136 = getelementptr inbounds double, ptr %134, i64 %135
  %137 = load double, ptr %136, align 8, !tbaa !11
  store double %137, ptr %18, align 8, !tbaa !11
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %138, i32 0, i32 4
  %140 = load ptr, ptr %139, align 8, !tbaa !17
  %141 = load i64, ptr %14, align 8, !tbaa !9
  %142 = add nsw i64 %141, 1
  %143 = getelementptr inbounds double, ptr %140, i64 %142
  %144 = load double, ptr %143, align 8, !tbaa !11
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %145, i32 0, i32 4
  %147 = load ptr, ptr %146, align 8, !tbaa !17
  %148 = load i64, ptr %15, align 8, !tbaa !9
  %149 = getelementptr inbounds double, ptr %147, i64 %148
  store double %144, ptr %149, align 8, !tbaa !11
  %150 = load double, ptr %18, align 8, !tbaa !11
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  %152 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %151, i32 0, i32 4
  %153 = load ptr, ptr %152, align 8, !tbaa !17
  %154 = load i64, ptr %14, align 8, !tbaa !9
  %155 = add nsw i64 %154, 1
  %156 = getelementptr inbounds double, ptr %153, i64 %155
  store double %150, ptr %156, align 8, !tbaa !11
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %157, i32 0, i32 4
  %159 = load ptr, ptr %158, align 8, !tbaa !17
  %160 = load i64, ptr %14, align 8, !tbaa !9
  %161 = getelementptr inbounds double, ptr %159, i64 %160
  %162 = load double, ptr %161, align 8, !tbaa !11
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %163, i32 0, i32 4
  %165 = load ptr, ptr %164, align 8, !tbaa !17
  %166 = load i64, ptr %12, align 8, !tbaa !9
  %167 = getelementptr inbounds double, ptr %165, i64 %166
  %168 = load double, ptr %167, align 8, !tbaa !11
  %169 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %162, double noundef %168)
  br i1 %169, label %170, label %194

170:                                              ; preds = %127
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %171, i32 0, i32 4
  %173 = load ptr, ptr %172, align 8, !tbaa !17
  %174 = load i64, ptr %14, align 8, !tbaa !9
  %175 = getelementptr inbounds double, ptr %173, i64 %174
  %176 = load double, ptr %175, align 8, !tbaa !11
  store double %176, ptr %18, align 8, !tbaa !11
  %177 = load ptr, ptr %5, align 8, !tbaa !5
  %178 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %177, i32 0, i32 4
  %179 = load ptr, ptr %178, align 8, !tbaa !17
  %180 = load i64, ptr %12, align 8, !tbaa !9
  %181 = getelementptr inbounds double, ptr %179, i64 %180
  %182 = load double, ptr %181, align 8, !tbaa !11
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %183, i32 0, i32 4
  %185 = load ptr, ptr %184, align 8, !tbaa !17
  %186 = load i64, ptr %14, align 8, !tbaa !9
  %187 = getelementptr inbounds double, ptr %185, i64 %186
  store double %182, ptr %187, align 8, !tbaa !11
  %188 = load double, ptr %18, align 8, !tbaa !11
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %189, i32 0, i32 4
  %191 = load ptr, ptr %190, align 8, !tbaa !17
  %192 = load i64, ptr %12, align 8, !tbaa !9
  %193 = getelementptr inbounds double, ptr %191, i64 %192
  store double %188, ptr %193, align 8, !tbaa !11
  br label %194

194:                                              ; preds = %170, %127
  %195 = load ptr, ptr %5, align 8, !tbaa !5
  %196 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %195, i32 0, i32 4
  %197 = load ptr, ptr %196, align 8, !tbaa !17
  %198 = load i64, ptr %14, align 8, !tbaa !9
  %199 = add nsw i64 %198, 1
  %200 = getelementptr inbounds double, ptr %197, i64 %199
  %201 = load double, ptr %200, align 8, !tbaa !11
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %202, i32 0, i32 4
  %204 = load ptr, ptr %203, align 8, !tbaa !17
  %205 = load i64, ptr %12, align 8, !tbaa !9
  %206 = getelementptr inbounds double, ptr %204, i64 %205
  %207 = load double, ptr %206, align 8, !tbaa !11
  %208 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %201, double noundef %207)
  br i1 %208, label %209, label %235

209:                                              ; preds = %194
  %210 = load ptr, ptr %5, align 8, !tbaa !5
  %211 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %210, i32 0, i32 4
  %212 = load ptr, ptr %211, align 8, !tbaa !17
  %213 = load i64, ptr %14, align 8, !tbaa !9
  %214 = add nsw i64 %213, 1
  %215 = getelementptr inbounds double, ptr %212, i64 %214
  %216 = load double, ptr %215, align 8, !tbaa !11
  store double %216, ptr %18, align 8, !tbaa !11
  %217 = load ptr, ptr %5, align 8, !tbaa !5
  %218 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %217, i32 0, i32 4
  %219 = load ptr, ptr %218, align 8, !tbaa !17
  %220 = load i64, ptr %12, align 8, !tbaa !9
  %221 = getelementptr inbounds double, ptr %219, i64 %220
  %222 = load double, ptr %221, align 8, !tbaa !11
  %223 = load ptr, ptr %5, align 8, !tbaa !5
  %224 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %223, i32 0, i32 4
  %225 = load ptr, ptr %224, align 8, !tbaa !17
  %226 = load i64, ptr %14, align 8, !tbaa !9
  %227 = add nsw i64 %226, 1
  %228 = getelementptr inbounds double, ptr %225, i64 %227
  store double %222, ptr %228, align 8, !tbaa !11
  %229 = load double, ptr %18, align 8, !tbaa !11
  %230 = load ptr, ptr %5, align 8, !tbaa !5
  %231 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %230, i32 0, i32 4
  %232 = load ptr, ptr %231, align 8, !tbaa !17
  %233 = load i64, ptr %12, align 8, !tbaa !9
  %234 = getelementptr inbounds double, ptr %232, i64 %233
  store double %229, ptr %234, align 8, !tbaa !11
  br label %235

235:                                              ; preds = %209, %194
  %236 = load ptr, ptr %5, align 8, !tbaa !5
  %237 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %236, i32 0, i32 4
  %238 = load ptr, ptr %237, align 8, !tbaa !17
  %239 = load i64, ptr %14, align 8, !tbaa !9
  %240 = getelementptr inbounds double, ptr %238, i64 %239
  %241 = load double, ptr %240, align 8, !tbaa !11
  %242 = load ptr, ptr %5, align 8, !tbaa !5
  %243 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %242, i32 0, i32 4
  %244 = load ptr, ptr %243, align 8, !tbaa !17
  %245 = load i64, ptr %14, align 8, !tbaa !9
  %246 = add nsw i64 %245, 1
  %247 = getelementptr inbounds double, ptr %244, i64 %246
  %248 = load double, ptr %247, align 8, !tbaa !11
  %249 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %241, double noundef %248)
  br i1 %249, label %250, label %276

250:                                              ; preds = %235
  %251 = load ptr, ptr %5, align 8, !tbaa !5
  %252 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %251, i32 0, i32 4
  %253 = load ptr, ptr %252, align 8, !tbaa !17
  %254 = load i64, ptr %14, align 8, !tbaa !9
  %255 = getelementptr inbounds double, ptr %253, i64 %254
  %256 = load double, ptr %255, align 8, !tbaa !11
  store double %256, ptr %18, align 8, !tbaa !11
  %257 = load ptr, ptr %5, align 8, !tbaa !5
  %258 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %257, i32 0, i32 4
  %259 = load ptr, ptr %258, align 8, !tbaa !17
  %260 = load i64, ptr %14, align 8, !tbaa !9
  %261 = add nsw i64 %260, 1
  %262 = getelementptr inbounds double, ptr %259, i64 %261
  %263 = load double, ptr %262, align 8, !tbaa !11
  %264 = load ptr, ptr %5, align 8, !tbaa !5
  %265 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %264, i32 0, i32 4
  %266 = load ptr, ptr %265, align 8, !tbaa !17
  %267 = load i64, ptr %14, align 8, !tbaa !9
  %268 = getelementptr inbounds double, ptr %266, i64 %267
  store double %263, ptr %268, align 8, !tbaa !11
  %269 = load double, ptr %18, align 8, !tbaa !11
  %270 = load ptr, ptr %5, align 8, !tbaa !5
  %271 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %270, i32 0, i32 4
  %272 = load ptr, ptr %271, align 8, !tbaa !17
  %273 = load i64, ptr %14, align 8, !tbaa !9
  %274 = add nsw i64 %273, 1
  %275 = getelementptr inbounds double, ptr %272, i64 %274
  store double %269, ptr %275, align 8, !tbaa !11
  br label %276

276:                                              ; preds = %250, %235
  %277 = load i64, ptr %14, align 8, !tbaa !9
  %278 = add nsw i64 %277, 1
  store i64 %278, ptr %11, align 8, !tbaa !9
  %279 = load i64, ptr %12, align 8, !tbaa !9
  store i64 %279, ptr %13, align 8, !tbaa !9
  %280 = load ptr, ptr %5, align 8, !tbaa !5
  %281 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %280, i32 0, i32 4
  %282 = load ptr, ptr %281, align 8, !tbaa !17
  %283 = load i64, ptr %14, align 8, !tbaa !9
  %284 = add nsw i64 %283, 1
  %285 = getelementptr inbounds double, ptr %282, i64 %284
  %286 = load double, ptr %285, align 8, !tbaa !11
  store double %286, ptr %17, align 8, !tbaa !11
  br label %287

287:                                              ; preds = %318, %276
  br label %288

288:                                              ; preds = %291, %287
  %289 = load i64, ptr %11, align 8, !tbaa !9
  %290 = add nsw i64 %289, 1
  store i64 %290, ptr %11, align 8, !tbaa !9
  br label %291

291:                                              ; preds = %288
  %292 = load ptr, ptr %5, align 8, !tbaa !5
  %293 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %292, i32 0, i32 4
  %294 = load ptr, ptr %293, align 8, !tbaa !17
  %295 = load i64, ptr %11, align 8, !tbaa !9
  %296 = getelementptr inbounds double, ptr %294, i64 %295
  %297 = load double, ptr %296, align 8, !tbaa !11
  %298 = load double, ptr %17, align 8, !tbaa !11
  %299 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %297, double noundef %298)
  br i1 %299, label %288, label %300, !llvm.loop !18

300:                                              ; preds = %291
  br label %301

301:                                              ; preds = %304, %300
  %302 = load i64, ptr %13, align 8, !tbaa !9
  %303 = sub nsw i64 %302, 1
  store i64 %303, ptr %13, align 8, !tbaa !9
  br label %304

304:                                              ; preds = %301
  %305 = load ptr, ptr %5, align 8, !tbaa !5
  %306 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %305, i32 0, i32 4
  %307 = load ptr, ptr %306, align 8, !tbaa !17
  %308 = load i64, ptr %13, align 8, !tbaa !9
  %309 = getelementptr inbounds double, ptr %307, i64 %308
  %310 = load double, ptr %309, align 8, !tbaa !11
  %311 = load double, ptr %17, align 8, !tbaa !11
  %312 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %310, double noundef %311)
  br i1 %312, label %301, label %313, !llvm.loop !20

313:                                              ; preds = %304
  %314 = load i64, ptr %13, align 8, !tbaa !9
  %315 = load i64, ptr %11, align 8, !tbaa !9
  %316 = icmp slt i64 %314, %315
  br i1 %316, label %317, label %318

317:                                              ; preds = %313
  br label %342

318:                                              ; preds = %313
  %319 = load ptr, ptr %5, align 8, !tbaa !5
  %320 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %319, i32 0, i32 4
  %321 = load ptr, ptr %320, align 8, !tbaa !17
  %322 = load i64, ptr %11, align 8, !tbaa !9
  %323 = getelementptr inbounds double, ptr %321, i64 %322
  %324 = load double, ptr %323, align 8, !tbaa !11
  store double %324, ptr %18, align 8, !tbaa !11
  %325 = load ptr, ptr %5, align 8, !tbaa !5
  %326 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %325, i32 0, i32 4
  %327 = load ptr, ptr %326, align 8, !tbaa !17
  %328 = load i64, ptr %13, align 8, !tbaa !9
  %329 = getelementptr inbounds double, ptr %327, i64 %328
  %330 = load double, ptr %329, align 8, !tbaa !11
  %331 = load ptr, ptr %5, align 8, !tbaa !5
  %332 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %331, i32 0, i32 4
  %333 = load ptr, ptr %332, align 8, !tbaa !17
  %334 = load i64, ptr %11, align 8, !tbaa !9
  %335 = getelementptr inbounds double, ptr %333, i64 %334
  store double %330, ptr %335, align 8, !tbaa !11
  %336 = load double, ptr %18, align 8, !tbaa !11
  %337 = load ptr, ptr %5, align 8, !tbaa !5
  %338 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %337, i32 0, i32 4
  %339 = load ptr, ptr %338, align 8, !tbaa !17
  %340 = load i64, ptr %13, align 8, !tbaa !9
  %341 = getelementptr inbounds double, ptr %339, i64 %340
  store double %336, ptr %341, align 8, !tbaa !11
  br label %287, !llvm.loop !21

342:                                              ; preds = %317
  %343 = load ptr, ptr %5, align 8, !tbaa !5
  %344 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %343, i32 0, i32 4
  %345 = load ptr, ptr %344, align 8, !tbaa !17
  %346 = load i64, ptr %13, align 8, !tbaa !9
  %347 = getelementptr inbounds double, ptr %345, i64 %346
  %348 = load double, ptr %347, align 8, !tbaa !11
  %349 = load ptr, ptr %5, align 8, !tbaa !5
  %350 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %349, i32 0, i32 4
  %351 = load ptr, ptr %350, align 8, !tbaa !17
  %352 = load i64, ptr %14, align 8, !tbaa !9
  %353 = add nsw i64 %352, 1
  %354 = getelementptr inbounds double, ptr %351, i64 %353
  store double %348, ptr %354, align 8, !tbaa !11
  %355 = load double, ptr %17, align 8, !tbaa !11
  %356 = load ptr, ptr %5, align 8, !tbaa !5
  %357 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %356, i32 0, i32 4
  %358 = load ptr, ptr %357, align 8, !tbaa !17
  %359 = load i64, ptr %13, align 8, !tbaa !9
  %360 = getelementptr inbounds double, ptr %358, i64 %359
  store double %355, ptr %360, align 8, !tbaa !11
  %361 = load i64, ptr %13, align 8, !tbaa !9
  %362 = load i64, ptr %16, align 8, !tbaa !9
  %363 = icmp sge i64 %361, %362
  br i1 %363, label %364, label %367

364:                                              ; preds = %342
  %365 = load i64, ptr %13, align 8, !tbaa !9
  %366 = sub nsw i64 %365, 1
  store i64 %366, ptr %12, align 8, !tbaa !9
  br label %367

367:                                              ; preds = %364, %342
  %368 = load i64, ptr %13, align 8, !tbaa !9
  %369 = load i64, ptr %16, align 8, !tbaa !9
  %370 = icmp sle i64 %368, %369
  br i1 %370, label %371, label %373

371:                                              ; preds = %367
  %372 = load i64, ptr %11, align 8, !tbaa !9
  store i64 %372, ptr %14, align 8, !tbaa !9
  br label %373

373:                                              ; preds = %371, %367
  br label %374

374:                                              ; preds = %373
  br label %78, !llvm.loop !22

375:                                              ; preds = %126
  %376 = load i64, ptr %6, align 8, !tbaa !9
  %377 = srem i64 %376, 2
  %378 = icmp eq i64 %377, 1
  br i1 %378, label %379, label %388

379:                                              ; preds = %375
  %380 = load ptr, ptr %5, align 8, !tbaa !5
  %381 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %380, i32 0, i32 4
  %382 = load ptr, ptr %381, align 8, !tbaa !17
  %383 = load i64, ptr %16, align 8, !tbaa !9
  %384 = getelementptr inbounds double, ptr %382, i64 %383
  %385 = load double, ptr %384, align 8, !tbaa !11
  %386 = load ptr, ptr %7, align 8, !tbaa !5
  store double %385, ptr %386, align 8, !tbaa !11
  %387 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %387)
  store i32 1, ptr %19, align 4
  br label %435

388:                                              ; preds = %375
  %389 = load ptr, ptr %5, align 8, !tbaa !5
  %390 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %389, i32 0, i32 4
  %391 = load ptr, ptr %390, align 8, !tbaa !17
  %392 = load i64, ptr %6, align 8, !tbaa !9
  %393 = sub nsw i64 %392, 1
  %394 = getelementptr inbounds double, ptr %391, i64 %393
  %395 = load double, ptr %394, align 8, !tbaa !11
  store double %395, ptr %17, align 8, !tbaa !11
  %396 = load i64, ptr %16, align 8, !tbaa !9
  %397 = add nsw i64 %396, 1
  store i64 %397, ptr %11, align 8, !tbaa !9
  br label %398

398:                                              ; preds = %420, %388
  %399 = load i64, ptr %11, align 8, !tbaa !9
  %400 = load i64, ptr %6, align 8, !tbaa !9
  %401 = sub nsw i64 %400, 1
  %402 = icmp sle i64 %399, %401
  br i1 %402, label %403, label %423

403:                                              ; preds = %398
  %404 = load ptr, ptr %5, align 8, !tbaa !5
  %405 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %404, i32 0, i32 4
  %406 = load ptr, ptr %405, align 8, !tbaa !17
  %407 = load i64, ptr %11, align 8, !tbaa !9
  %408 = getelementptr inbounds double, ptr %406, i64 %407
  %409 = load double, ptr %408, align 8, !tbaa !11
  %410 = load double, ptr %17, align 8, !tbaa !11
  %411 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %409, double noundef %410)
  br i1 %411, label %412, label %419

412:                                              ; preds = %403
  %413 = load ptr, ptr %5, align 8, !tbaa !5
  %414 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %413, i32 0, i32 4
  %415 = load ptr, ptr %414, align 8, !tbaa !17
  %416 = load i64, ptr %11, align 8, !tbaa !9
  %417 = getelementptr inbounds double, ptr %415, i64 %416
  %418 = load double, ptr %417, align 8, !tbaa !11
  store double %418, ptr %17, align 8, !tbaa !11
  br label %419

419:                                              ; preds = %412, %403
  br label %420

420:                                              ; preds = %419
  %421 = load i64, ptr %11, align 8, !tbaa !9
  %422 = add nsw i64 %421, 1
  store i64 %422, ptr %11, align 8, !tbaa !9
  br label %398, !llvm.loop !23

423:                                              ; preds = %398
  %424 = load ptr, ptr %5, align 8, !tbaa !5
  %425 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %424, i32 0, i32 4
  %426 = load ptr, ptr %425, align 8, !tbaa !17
  %427 = load i64, ptr %16, align 8, !tbaa !9
  %428 = getelementptr inbounds double, ptr %426, i64 %427
  %429 = load double, ptr %428, align 8, !tbaa !11
  %430 = load double, ptr %17, align 8, !tbaa !11
  %431 = fadd double %429, %430
  %432 = fmul double 5.000000e-01, %431
  %433 = load ptr, ptr %7, align 8, !tbaa !5
  store double %432, ptr %433, align 8, !tbaa !11
  %434 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %434)
  store i32 0, ptr %19, align 4
  br label %435

435:                                              ; preds = %423, %379, %57, %46, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  %436 = load i32, ptr %19, align 4
  switch i32 %436, label %438 [
    i32 0, label %437
    i32 1, label %437
  ]

437:                                              ; preds = %435, %435
  ret void

438:                                              ; preds = %435
  unreachable
}

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) #2

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

declare void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !15, i64 16, !16, i64 24, !7, i64 56}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl12samplemedianEPNS_9ae_vectorElPdPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr nocapture noundef writeonly %2, ptr noundef %3) local_unnamed_addr #1 {
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %3, ptr noundef nonnull %5)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %6, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef nonnull %6, ptr noundef %0, ptr noundef %3, i1 noundef zeroext true)
  store double 0.000000e+00, ptr %2, align 8, !tbaa !5
  %7 = icmp sgt i64 %1, -1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %7, ptr noundef nonnull @.str.12, ptr noundef %3)
  %8 = load i64, ptr %6, align 8, !tbaa !9
  %9 = icmp sge i64 %8, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.13, ptr noundef %3)
  %10 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %1, ptr noundef %3)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.14, ptr noundef %3)
  store double 0.000000e+00, ptr %2, align 8, !tbaa !5
  %11 = icmp slt i64 %1, 1
  br i1 %11, label %157, label %12

12:                                               ; preds = %4
  switch i64 %1, label %.lr.ph [
    i64 1, label %13
    i64 2, label %17
  ]

13:                                               ; preds = %12
  %14 = getelementptr inbounds i8, ptr %6, i64 56
  %15 = load ptr, ptr %14, align 8, !tbaa !15
  %16 = load double, ptr %15, align 8, !tbaa !5
  br label %.sink.split

17:                                               ; preds = %12
  %18 = getelementptr inbounds i8, ptr %6, i64 56
  %19 = load ptr, ptr %18, align 8, !tbaa !15
  %20 = load double, ptr %19, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %19, i64 8
  %22 = load double, ptr %21, align 8, !tbaa !5
  %23 = fadd double %20, %22
  %24 = fmul double %23, 5.000000e-01
  br label %.sink.split

.lr.ph:                                           ; preds = %12
  %25 = add nsw i64 %1, -1
  %26 = lshr i64 %25, 1
  %27 = getelementptr inbounds i8, ptr %6, i64 56
  br label %45

._crit_edge:                                      ; preds = %125
  %28 = icmp eq i64 %spec.select, %132
  br i1 %28, label %29, label %133

29:                                               ; preds = %._crit_edge
  %30 = getelementptr inbounds i8, ptr %6, i64 56
  %31 = load ptr, ptr %30, align 8, !tbaa !15
  %32 = getelementptr inbounds double, ptr %31, i64 %spec.select
  %33 = load double, ptr %32, align 8, !tbaa !5
  %34 = getelementptr inbounds double, ptr %31, i64 %.1153
  %35 = load double, ptr %34, align 8, !tbaa !5
  %36 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %33, double noundef %35)
  br i1 %36, label %37, label %133

37:                                               ; preds = %29
  %38 = load ptr, ptr %30, align 8, !tbaa !15
  %39 = getelementptr inbounds double, ptr %38, i64 %.1153
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = getelementptr inbounds double, ptr %38, i64 %spec.select
  %42 = load double, ptr %41, align 8, !tbaa !5
  store double %42, ptr %39, align 8, !tbaa !5
  %43 = load ptr, ptr %30, align 8, !tbaa !15
  %44 = getelementptr inbounds double, ptr %43, i64 %spec.select
  store double %40, ptr %44, align 8, !tbaa !5
  br label %133

45:                                               ; preds = %.lr.ph, %125
  %46 = phi i64 [ 1, %.lr.ph ], [ %132, %125 ]
  %.0152174 = phi i64 [ 0, %.lr.ph ], [ %.1153, %125 ]
  %.0156173 = phi i64 [ %25, %.lr.ph ], [ %spec.select, %125 ]
  %47 = add nsw i64 %.0152174, %.0156173
  %48 = sdiv i64 %47, 2
  %49 = load ptr, ptr %27, align 8, !tbaa !15
  %50 = getelementptr inbounds double, ptr %49, i64 %48
  %51 = load double, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds double, ptr %49, i64 %46
  %53 = load double, ptr %52, align 8, !tbaa !5
  store double %53, ptr %50, align 8, !tbaa !5
  %54 = load ptr, ptr %27, align 8, !tbaa !15
  %55 = getelementptr inbounds double, ptr %54, i64 %46
  store double %51, ptr %55, align 8, !tbaa !5
  %56 = load ptr, ptr %27, align 8, !tbaa !15
  %57 = getelementptr inbounds double, ptr %56, i64 %.0152174
  %58 = load double, ptr %57, align 8, !tbaa !5
  %59 = getelementptr inbounds double, ptr %56, i64 %.0156173
  %60 = load double, ptr %59, align 8, !tbaa !5
  %61 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %58, double noundef %60)
  br i1 %61, label %62, label %70

62:                                               ; preds = %45
  %63 = load ptr, ptr %27, align 8, !tbaa !15
  %64 = getelementptr inbounds double, ptr %63, i64 %.0152174
  %65 = load double, ptr %64, align 8, !tbaa !5
  %66 = getelementptr inbounds double, ptr %63, i64 %.0156173
  %67 = load double, ptr %66, align 8, !tbaa !5
  store double %67, ptr %64, align 8, !tbaa !5
  %68 = load ptr, ptr %27, align 8, !tbaa !15
  %69 = getelementptr inbounds double, ptr %68, i64 %.0156173
  store double %65, ptr %69, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %62, %45
  %71 = load ptr, ptr %27, align 8, !tbaa !15
  %72 = getelementptr inbounds double, ptr %71, i64 %46
  %73 = load double, ptr %72, align 8, !tbaa !5
  %74 = getelementptr inbounds double, ptr %71, i64 %.0156173
  %75 = load double, ptr %74, align 8, !tbaa !5
  %76 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %73, double noundef %75)
  br i1 %76, label %77, label %85

77:                                               ; preds = %70
  %78 = load ptr, ptr %27, align 8, !tbaa !15
  %79 = getelementptr inbounds double, ptr %78, i64 %46
  %80 = load double, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds double, ptr %78, i64 %.0156173
  %82 = load double, ptr %81, align 8, !tbaa !5
  store double %82, ptr %79, align 8, !tbaa !5
  %83 = load ptr, ptr %27, align 8, !tbaa !15
  %84 = getelementptr inbounds double, ptr %83, i64 %.0156173
  store double %80, ptr %84, align 8, !tbaa !5
  br label %85

85:                                               ; preds = %77, %70
  %86 = load ptr, ptr %27, align 8, !tbaa !15
  %87 = getelementptr inbounds double, ptr %86, i64 %.0152174
  %88 = load double, ptr %87, align 8, !tbaa !5
  %89 = getelementptr inbounds double, ptr %86, i64 %46
  %90 = load double, ptr %89, align 8, !tbaa !5
  %91 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %88, double noundef %90)
  br i1 %91, label %92, label %100

92:                                               ; preds = %85
  %93 = load ptr, ptr %27, align 8, !tbaa !15
  %94 = getelementptr inbounds double, ptr %93, i64 %.0152174
  %95 = load double, ptr %94, align 8, !tbaa !5
  %96 = getelementptr inbounds double, ptr %93, i64 %46
  %97 = load double, ptr %96, align 8, !tbaa !5
  store double %97, ptr %94, align 8, !tbaa !5
  %98 = load ptr, ptr %27, align 8, !tbaa !15
  %99 = getelementptr inbounds double, ptr %98, i64 %46
  store double %95, ptr %99, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %92, %85
  %101 = load ptr, ptr %27, align 8, !tbaa !15
  %102 = getelementptr inbounds double, ptr %101, i64 %46
  %103 = load double, ptr %102, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %118, %100
  %.0154 = phi i64 [ %.0156173, %100 ], [ %111, %118 ]
  %.0150 = phi i64 [ %46, %100 ], [ %106, %118 ]
  br label %105

105:                                              ; preds = %105, %104
  %.1151 = phi i64 [ %.0150, %104 ], [ %106, %105 ]
  %106 = add nsw i64 %.1151, 1
  %107 = load ptr, ptr %27, align 8, !tbaa !15
  %108 = getelementptr inbounds double, ptr %107, i64 %106
  %109 = load double, ptr %108, align 8, !tbaa !5
  %110 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %109, double noundef %103)
  br i1 %110, label %105, label %.preheader, !llvm.loop !16

.preheader:                                       ; preds = %105, %.preheader
  %.1155 = phi i64 [ %111, %.preheader ], [ %.0154, %105 ]
  %111 = add nsw i64 %.1155, -1
  %112 = load ptr, ptr %27, align 8, !tbaa !15
  %113 = getelementptr inbounds double, ptr %112, i64 %111
  %114 = load double, ptr %113, align 8, !tbaa !5
  %115 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %114, double noundef %103)
  br i1 %115, label %.preheader, label %116, !llvm.loop !18

116:                                              ; preds = %.preheader
  %.not165 = icmp sgt i64 %.1155, %106
  %117 = load ptr, ptr %27, align 8, !tbaa !15
  br i1 %.not165, label %118, label %125

118:                                              ; preds = %116
  %119 = getelementptr inbounds double, ptr %117, i64 %106
  %120 = load double, ptr %119, align 8, !tbaa !5
  %121 = getelementptr inbounds double, ptr %117, i64 %111
  %122 = load double, ptr %121, align 8, !tbaa !5
  store double %122, ptr %119, align 8, !tbaa !5
  %123 = load ptr, ptr %27, align 8, !tbaa !15
  %124 = getelementptr inbounds double, ptr %123, i64 %111
  store double %120, ptr %124, align 8, !tbaa !5
  br label %104, !llvm.loop !19

125:                                              ; preds = %116
  %126 = getelementptr inbounds double, ptr %117, i64 %111
  %127 = load double, ptr %126, align 8, !tbaa !5
  %128 = getelementptr inbounds double, ptr %117, i64 %46
  store double %127, ptr %128, align 8, !tbaa !5
  %129 = load ptr, ptr %27, align 8, !tbaa !15
  %130 = getelementptr inbounds double, ptr %129, i64 %111
  store double %103, ptr %130, align 8, !tbaa !5
  %.not166.not = icmp sgt i64 %.1155, %26
  %131 = add nsw i64 %.1155, -2
  %spec.select = select i1 %.not166.not, i64 %131, i64 %.0156173
  %.not167 = icmp sgt i64 %111, %26
  %.1153 = select i1 %.not167, i64 %.0152174, i64 %106
  %132 = add nsw i64 %.1153, 1
  %.not = icmp sgt i64 %spec.select, %132
  br i1 %.not, label %45, label %._crit_edge, !llvm.loop !20

133:                                              ; preds = %._crit_edge, %29, %37
  %134 = and i64 %1, 1
  %.not168 = icmp eq i64 %134, 0
  %135 = getelementptr inbounds i8, ptr %6, i64 56
  %136 = load ptr, ptr %135, align 8, !tbaa !15
  br i1 %.not168, label %140, label %137

137:                                              ; preds = %133
  %138 = getelementptr inbounds double, ptr %136, i64 %26
  %139 = load double, ptr %138, align 8, !tbaa !5
  br label %.sink.split

140:                                              ; preds = %133
  %141 = getelementptr inbounds double, ptr %136, i64 %25
  %142 = load double, ptr %141, align 8, !tbaa !5
  %.not169.not178.not = icmp eq i64 %1, 1
  br i1 %.not169.not178.not, label %._crit_edge183, label %.lr.ph182

.lr.ph182:                                        ; preds = %140, %151
  %.2180.in = phi i64 [ %.2180, %151 ], [ %26, %140 ]
  %.0179 = phi double [ %.1, %151 ], [ %142, %140 ]
  %.2180 = add nuw nsw i64 %.2180.in, 1
  %143 = load ptr, ptr %135, align 8, !tbaa !15
  %144 = getelementptr inbounds double, ptr %143, i64 %.2180
  %145 = load double, ptr %144, align 8, !tbaa !5
  %146 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %145, double noundef %.0179)
  br i1 %146, label %147, label %151

147:                                              ; preds = %.lr.ph182
  %148 = load ptr, ptr %135, align 8, !tbaa !15
  %149 = getelementptr inbounds double, ptr %148, i64 %.2180
  %150 = load double, ptr %149, align 8, !tbaa !5
  br label %151

151:                                              ; preds = %.lr.ph182, %147
  %.1 = phi double [ %150, %147 ], [ %.0179, %.lr.ph182 ]
  %.not169.not = icmp slt i64 %.2180, %25
  br i1 %.not169.not, label %.lr.ph182, label %._crit_edge183.loopexit, !llvm.loop !21

._crit_edge183.loopexit:                          ; preds = %151
  %.pre = load ptr, ptr %135, align 8, !tbaa !15
  br label %._crit_edge183

._crit_edge183:                                   ; preds = %._crit_edge183.loopexit, %140
  %152 = phi ptr [ %136, %140 ], [ %.pre, %._crit_edge183.loopexit ]
  %.0.lcssa = phi double [ %142, %140 ], [ %.1, %._crit_edge183.loopexit ]
  %153 = getelementptr inbounds double, ptr %152, i64 %26
  %154 = load double, ptr %153, align 8, !tbaa !5
  %155 = fadd double %.0.lcssa, %154
  %156 = fmul double %155, 5.000000e-01
  br label %.sink.split

.sink.split:                                      ; preds = %13, %17, %137, %._crit_edge183
  %.sink = phi double [ %156, %._crit_edge183 ], [ %139, %137 ], [ %24, %17 ], [ %16, %13 ]
  store double %.sink, ptr %2, align 8, !tbaa !5
  br label %157

157:                                              ; preds = %.sink.split, %4
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  ret void
}

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

declare void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !12, i64 16, !13, i64 24, !7, i64 56}
!11 = !{!"long", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass