; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/tests (test_c)

; 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_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 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

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

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

declare noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef, ptr noundef) #1

declare i32 @printf(ptr noundef, ...) #1

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #1

; 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 noundef zeroext i1 @_Z19testnearestneighborbPN11alglib_impl8ae_stateE(i1 noundef zeroext %0, ptr noundef %1) #3 {
  %3 = alloca i8, align 1
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca double, align 8
  %10 = alloca i64, 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 i64, align 8
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca i8, align 1
  %21 = zext i1 %0 to i8
  store i8 %21, ptr %3, align 1, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  %22 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %22, ptr noundef %5)
  call void @llvm.memset.p0.i64(ptr align 8 %6, i8 0, i64 80, i1 false)
  %23 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %6, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %23, i1 noundef zeroext true)
  store i8 0, ptr %19, align 1, !tbaa !5
  store i64 2, ptr %16, align 8, !tbaa !11
  store i64 256, ptr %14, align 8, !tbaa !11
  store i64 2048, ptr %15, align 8, !tbaa !11
  store i64 3, ptr %12, align 8, !tbaa !11
  %24 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZL47testnearestneighborunit_testkdtreeserializationPbPN11alglib_impl8ae_stateE(ptr noundef %19, ptr noundef %24)
  store i64 1, ptr %17, align 8, !tbaa !11
  br label %25

25:                                               ; preds = %243, %2
  %26 = load i64, ptr %17, align 8, !tbaa !11
  %27 = load i64, ptr %16, align 8, !tbaa !11
  %28 = icmp sle i64 %26, %27
  br i1 %28, label %29, label %246

29:                                               ; preds = %25
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %30

30:                                               ; preds = %239, %29
  %31 = load i64, ptr %10, align 8, !tbaa !11
  %32 = icmp sle i64 %31, 2
  br i1 %32, label %33, label %242

33:                                               ; preds = %30
  store i64 1, ptr %11, align 8, !tbaa !11
  br label %34

34:                                               ; preds = %235, %33
  %35 = load i64, ptr %11, align 8, !tbaa !11
  %36 = icmp sle i64 %35, 3
  br i1 %36, label %37, label %238

37:                                               ; preds = %34
  %38 = load i64, ptr %15, align 8, !tbaa !11
  %39 = load i64, ptr %11, align 8, !tbaa !11
  %40 = load i64, ptr %12, align 8, !tbaa !11
  %41 = add nsw i64 %39, %40
  %42 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %6, i64 noundef %38, i64 noundef %41, ptr noundef %42)
  store i64 0, ptr %7, align 8, !tbaa !11
  br label %43

43:                                               ; preds = %71, %37
  %44 = load i64, ptr %7, align 8, !tbaa !11
  %45 = load i64, ptr %15, align 8, !tbaa !11
  %46 = sub nsw i64 %45, 1
  %47 = icmp sle i64 %44, %46
  br i1 %47, label %48, label %74

48:                                               ; preds = %43
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %49

49:                                               ; preds = %67, %48
  %50 = load i64, ptr %8, align 8, !tbaa !11
  %51 = load i64, ptr %11, align 8, !tbaa !11
  %52 = load i64, ptr %12, align 8, !tbaa !11
  %53 = add nsw i64 %51, %52
  %54 = sub nsw i64 %53, 1
  %55 = icmp sle i64 %50, %54
  br i1 %55, label %56, label %70

56:                                               ; preds = %49
  %57 = load ptr, ptr %4, align 8, !tbaa !9
  %58 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %57)
  %59 = call double @llvm.fmuladd.f64(double 1.000000e+01, double %58, double -5.000000e+00)
  %60 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %6, i32 0, i32 6
  %61 = load ptr, ptr %60, align 8, !tbaa !13
  %62 = load i64, ptr %7, align 8, !tbaa !11
  %63 = getelementptr inbounds ptr, ptr %61, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  %65 = load i64, ptr %8, align 8, !tbaa !11
  %66 = getelementptr inbounds double, ptr %64, i64 %65
  store double %59, ptr %66, align 8, !tbaa !14
  br label %67

67:                                               ; preds = %56
  %68 = load i64, ptr %8, align 8, !tbaa !11
  %69 = add nsw i64 %68, 1
  store i64 %69, ptr %8, align 8, !tbaa !11
  br label %49, !llvm.loop !16

70:                                               ; preds = %49
  br label %71

71:                                               ; preds = %70
  %72 = load i64, ptr %7, align 8, !tbaa !11
  %73 = add nsw i64 %72, 1
  store i64 %73, ptr %7, align 8, !tbaa !11
  br label %43, !llvm.loop !18

74:                                               ; preds = %43
  store i64 1, ptr %13, align 8, !tbaa !11
  br label %75

75:                                               ; preds = %87, %74
  %76 = load i64, ptr %13, align 8, !tbaa !11
  %77 = icmp sle i64 %76, 10
  br i1 %77, label %78, label %90

78:                                               ; preds = %75
  %79 = load i64, ptr %13, align 8, !tbaa !11
  %80 = load i64, ptr %11, align 8, !tbaa !11
  %81 = load i64, ptr %12, align 8, !tbaa !11
  %82 = add nsw i64 %81, 1
  %83 = load ptr, ptr %4, align 8, !tbaa !9
  %84 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef %82, ptr noundef %83)
  %85 = load i64, ptr %10, align 8, !tbaa !11
  %86 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef %6, i64 noundef %79, i64 noundef %80, i64 noundef %84, i64 noundef %85, ptr noundef %19, ptr noundef %86)
  br label %87

87:                                               ; preds = %78
  %88 = load i64, ptr %13, align 8, !tbaa !11
  %89 = add nsw i64 %88, 1
  store i64 %89, ptr %13, align 8, !tbaa !11
  br label %75, !llvm.loop !19

90:                                               ; preds = %75
  %91 = load i64, ptr %15, align 8, !tbaa !11
  %92 = load i64, ptr %11, align 8, !tbaa !11
  %93 = load i64, ptr %12, align 8, !tbaa !11
  %94 = add nsw i64 %93, 1
  %95 = load ptr, ptr %4, align 8, !tbaa !9
  %96 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef %94, ptr noundef %95)
  %97 = load i64, ptr %10, align 8, !tbaa !11
  %98 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef %6, i64 noundef %91, i64 noundef %92, i64 noundef %96, i64 noundef %97, ptr noundef %19, ptr noundef %98)
  %99 = load i64, ptr %14, align 8, !tbaa !11
  %100 = mul nsw i64 2, %99
  %101 = load i64, ptr %11, align 8, !tbaa !11
  %102 = load i64, ptr %12, align 8, !tbaa !11
  %103 = add nsw i64 %101, %102
  %104 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %6, i64 noundef %100, i64 noundef %103, ptr noundef %104)
  store i64 0, ptr %7, align 8, !tbaa !11
  br label %105

105:                                              ; preds = %154, %90
  %106 = load i64, ptr %7, align 8, !tbaa !11
  %107 = load i64, ptr %14, align 8, !tbaa !11
  %108 = sub nsw i64 %107, 1
  %109 = icmp sle i64 %106, %108
  br i1 %109, label %110, label %157

110:                                              ; preds = %105
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %111

111:                                              ; preds = %150, %110
  %112 = load i64, ptr %8, align 8, !tbaa !11
  %113 = load i64, ptr %11, align 8, !tbaa !11
  %114 = load i64, ptr %12, align 8, !tbaa !11
  %115 = add nsw i64 %113, %114
  %116 = sub nsw i64 %115, 1
  %117 = icmp sle i64 %112, %116
  br i1 %117, label %118, label %153

118:                                              ; preds = %111
  %119 = load ptr, ptr %4, align 8, !tbaa !9
  %120 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %119)
  %121 = call double @llvm.fmuladd.f64(double 1.000000e+01, double %120, double -5.000000e+00)
  %122 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %6, i32 0, i32 6
  %123 = load ptr, ptr %122, align 8, !tbaa !13
  %124 = load i64, ptr %7, align 8, !tbaa !11
  %125 = mul nsw i64 2, %124
  %126 = add nsw i64 %125, 0
  %127 = getelementptr inbounds ptr, ptr %123, i64 %126
  %128 = load ptr, ptr %127, align 8, !tbaa !9
  %129 = load i64, ptr %8, align 8, !tbaa !11
  %130 = getelementptr inbounds double, ptr %128, i64 %129
  store double %121, ptr %130, align 8, !tbaa !14
  %131 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %6, i32 0, i32 6
  %132 = load ptr, ptr %131, align 8, !tbaa !13
  %133 = load i64, ptr %7, align 8, !tbaa !11
  %134 = mul nsw i64 2, %133
  %135 = add nsw i64 %134, 0
  %136 = getelementptr inbounds ptr, ptr %132, i64 %135
  %137 = load ptr, ptr %136, align 8, !tbaa !9
  %138 = load i64, ptr %8, align 8, !tbaa !11
  %139 = getelementptr inbounds double, ptr %137, i64 %138
  %140 = load double, ptr %139, align 8, !tbaa !14
  %141 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %6, i32 0, i32 6
  %142 = load ptr, ptr %141, align 8, !tbaa !13
  %143 = load i64, ptr %7, align 8, !tbaa !11
  %144 = mul nsw i64 2, %143
  %145 = add nsw i64 %144, 1
  %146 = getelementptr inbounds ptr, ptr %142, i64 %145
  %147 = load ptr, ptr %146, align 8, !tbaa !9
  %148 = load i64, ptr %8, align 8, !tbaa !11
  %149 = getelementptr inbounds double, ptr %147, i64 %148
  store double %140, ptr %149, align 8, !tbaa !14
  br label %150

150:                                              ; preds = %118
  %151 = load i64, ptr %8, align 8, !tbaa !11
  %152 = add nsw i64 %151, 1
  store i64 %152, ptr %8, align 8, !tbaa !11
  br label %111, !llvm.loop !20

153:                                              ; preds = %111
  br label %154

154:                                              ; preds = %153
  %155 = load i64, ptr %7, align 8, !tbaa !11
  %156 = add nsw i64 %155, 1
  store i64 %156, ptr %7, align 8, !tbaa !11
  br label %105, !llvm.loop !21

157:                                              ; preds = %105
  %158 = load i64, ptr %14, align 8, !tbaa !11
  %159 = mul nsw i64 2, %158
  %160 = load i64, ptr %11, align 8, !tbaa !11
  %161 = load i64, ptr %12, align 8, !tbaa !11
  %162 = add nsw i64 %161, 1
  %163 = load ptr, ptr %4, align 8, !tbaa !9
  %164 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef %162, ptr noundef %163)
  %165 = load i64, ptr %10, align 8, !tbaa !11
  %166 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef %6, i64 noundef %159, i64 noundef %160, i64 noundef %164, i64 noundef %165, ptr noundef %19, ptr noundef %166)
  %167 = load i64, ptr %14, align 8, !tbaa !11
  %168 = load i64, ptr %11, align 8, !tbaa !11
  %169 = load i64, ptr %12, align 8, !tbaa !11
  %170 = add nsw i64 %168, %169
  %171 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %6, i64 noundef %167, i64 noundef %170, ptr noundef %171)
  %172 = load ptr, ptr %4, align 8, !tbaa !9
  %173 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %172)
  store double %173, ptr %9, align 8, !tbaa !14
  store i64 0, ptr %7, align 8, !tbaa !11
  br label %174

174:                                              ; preds = %200, %157
  %175 = load i64, ptr %7, align 8, !tbaa !11
  %176 = load i64, ptr %14, align 8, !tbaa !11
  %177 = sub nsw i64 %176, 2
  %178 = icmp sle i64 %175, %177
  br i1 %178, label %179, label %203

179:                                              ; preds = %174
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %180

180:                                              ; preds = %196, %179
  %181 = load i64, ptr %8, align 8, !tbaa !11
  %182 = load i64, ptr %11, align 8, !tbaa !11
  %183 = load i64, ptr %12, align 8, !tbaa !11
  %184 = add nsw i64 %182, %183
  %185 = sub nsw i64 %184, 1
  %186 = icmp sle i64 %181, %185
  br i1 %186, label %187, label %199

187:                                              ; preds = %180
  %188 = load double, ptr %9, align 8, !tbaa !14
  %189 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %6, i32 0, i32 6
  %190 = load ptr, ptr %189, align 8, !tbaa !13
  %191 = load i64, ptr %7, align 8, !tbaa !11
  %192 = getelementptr inbounds ptr, ptr %190, i64 %191
  %193 = load ptr, ptr %192, align 8, !tbaa !9
  %194 = load i64, ptr %8, align 8, !tbaa !11
  %195 = getelementptr inbounds double, ptr %193, i64 %194
  store double %188, ptr %195, align 8, !tbaa !14
  br label %196

196:                                              ; preds = %187
  %197 = load i64, ptr %8, align 8, !tbaa !11
  %198 = add nsw i64 %197, 1
  store i64 %198, ptr %8, align 8, !tbaa !11
  br label %180, !llvm.loop !22

199:                                              ; preds = %180
  br label %200

200:                                              ; preds = %199
  %201 = load i64, ptr %7, align 8, !tbaa !11
  %202 = add nsw i64 %201, 1
  store i64 %202, ptr %7, align 8, !tbaa !11
  br label %174, !llvm.loop !23

203:                                              ; preds = %174
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %204

204:                                              ; preds = %223, %203
  %205 = load i64, ptr %8, align 8, !tbaa !11
  %206 = load i64, ptr %11, align 8, !tbaa !11
  %207 = load i64, ptr %12, align 8, !tbaa !11
  %208 = add nsw i64 %206, %207
  %209 = sub nsw i64 %208, 1
  %210 = icmp sle i64 %205, %209
  br i1 %210, label %211, label %226

211:                                              ; preds = %204
  %212 = load ptr, ptr %4, align 8, !tbaa !9
  %213 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %212)
  %214 = call double @llvm.fmuladd.f64(double 1.000000e+01, double %213, double -5.000000e+00)
  %215 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %6, i32 0, i32 6
  %216 = load ptr, ptr %215, align 8, !tbaa !13
  %217 = load i64, ptr %14, align 8, !tbaa !11
  %218 = sub nsw i64 %217, 1
  %219 = getelementptr inbounds ptr, ptr %216, i64 %218
  %220 = load ptr, ptr %219, align 8, !tbaa !9
  %221 = load i64, ptr %8, align 8, !tbaa !11
  %222 = getelementptr inbounds double, ptr %220, i64 %221
  store double %214, ptr %222, align 8, !tbaa !14
  br label %223

223:                                              ; preds = %211
  %224 = load i64, ptr %8, align 8, !tbaa !11
  %225 = add nsw i64 %224, 1
  store i64 %225, ptr %8, align 8, !tbaa !11
  br label %204, !llvm.loop !24

226:                                              ; preds = %204
  %227 = load i64, ptr %14, align 8, !tbaa !11
  %228 = load i64, ptr %11, align 8, !tbaa !11
  %229 = load i64, ptr %12, align 8, !tbaa !11
  %230 = add nsw i64 %229, 1
  %231 = load ptr, ptr %4, align 8, !tbaa !9
  %232 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef %230, ptr noundef %231)
  %233 = load i64, ptr %10, align 8, !tbaa !11
  %234 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef %6, i64 noundef %227, i64 noundef %228, i64 noundef %232, i64 noundef %233, ptr noundef %19, ptr noundef %234)
  br label %235

235:                                              ; preds = %226
  %236 = load i64, ptr %11, align 8, !tbaa !11
  %237 = add nsw i64 %236, 1
  store i64 %237, ptr %11, align 8, !tbaa !11
  br label %34, !llvm.loop !25

238:                                              ; preds = %34
  br label %239

239:                                              ; preds = %238
  %240 = load i64, ptr %10, align 8, !tbaa !11
  %241 = add nsw i64 %240, 1
  store i64 %241, ptr %10, align 8, !tbaa !11
  br label %30, !llvm.loop !26

242:                                              ; preds = %30
  br label %243

243:                                              ; preds = %242
  %244 = load i64, ptr %17, align 8, !tbaa !11
  %245 = add nsw i64 %244, 1
  store i64 %245, ptr %17, align 8, !tbaa !11
  br label %25, !llvm.loop !27

246:                                              ; preds = %25
  %247 = load i8, ptr %19, align 1, !tbaa !5, !range !28, !noundef !29
  %248 = trunc i8 %247 to i1
  br i1 %248, label %252, label %249

249:                                              ; preds = %246
  %250 = load ptr, ptr %4, align 8, !tbaa !9
  %251 = call noundef zeroext i1 @_ZL40testnearestneighborunit_testspecialcasesPN11alglib_impl8ae_stateE(ptr noundef %250)
  br label %252

252:                                              ; preds = %249, %246
  %253 = phi i1 [ true, %246 ], [ %251, %249 ]
  %254 = zext i1 %253 to i8
  store i8 %254, ptr %19, align 1, !tbaa !5
  %255 = load i8, ptr %19, align 1, !tbaa !5, !range !28, !noundef !29
  %256 = trunc i8 %255 to i1
  %257 = zext i1 %256 to i8
  store i8 %257, ptr %18, align 1, !tbaa !5
  %258 = load i8, ptr %3, align 1, !tbaa !5, !range !28, !noundef !29
  %259 = trunc i8 %258 to i1
  br i1 %259, label %278, label %260

260:                                              ; preds = %252
  %261 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %262 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %263 = load i8, ptr %19, align 1, !tbaa !5, !range !28, !noundef !29
  %264 = trunc i8 %263 to i1
  br i1 %264, label %267, label %265

265:                                              ; preds = %260
  %266 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %269

267:                                              ; preds = %260
  %268 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  br label %269

269:                                              ; preds = %267, %265
  %270 = load i8, ptr %18, align 1, !tbaa !5, !range !28, !noundef !29
  %271 = trunc i8 %270 to i1
  br i1 %271, label %272, label %274

272:                                              ; preds = %269
  %273 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  br label %276

274:                                              ; preds = %269
  %275 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %276

276:                                              ; preds = %274, %272
  %277 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %278

278:                                              ; preds = %276, %252
  %279 = load i8, ptr %18, align 1, !tbaa !5, !range !28, !noundef !29
  %280 = trunc i8 %279 to i1
  %281 = xor i1 %280, true
  %282 = zext i1 %281 to i8
  store i8 %282, ptr %20, align 1, !tbaa !5
  %283 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %283)
  %284 = load i8, ptr %20, align 1, !tbaa !5, !range !28, !noundef !29
  %285 = trunc i8 %284 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #5
  ret i1 %285
}

declare void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL47testnearestneighborunit_testkdtreeserializationPbPN11alglib_impl8ae_stateE(ptr noundef, ptr noundef) #3

declare void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

declare noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL40testnearestneighborunit_testspecialcasesPN11alglib_impl8ae_stateE(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !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}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !17}
!25 = distinct !{!25, !17}
!26 = distinct !{!26, !17}
!27 = distinct !{!27, !17}
!28 = !{i8 0, i8 2}
!29 = !{}


; 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_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 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

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

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

declare noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

; 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 noundef zeroext i1 @_Z19testnearestneighborbPN11alglib_impl8ae_stateE(i1 noundef zeroext %0, ptr noundef %1) local_unnamed_addr #4 {
  %3 = alloca %"struct.alglib_impl::ae_frame", align 8
  %4 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %5 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %1, ptr noundef nonnull %3)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %4, i8 0, i64 80, i1 false)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %4, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %1, i1 noundef zeroext true)
  store i8 0, ptr %5, align 1, !tbaa !5
  call void @_ZL47testnearestneighborunit_testkdtreeserializationPbPN11alglib_impl8ae_stateE(ptr noundef nonnull %5, ptr noundef %1)
  %6 = getelementptr inbounds i8, ptr %4, i64 72
  br label %.preheader110

.preheader110:                                    ; preds = %2, %94
  %.098121 = phi i64 [ 1, %2 ], [ %95, %94 ]
  br label %.preheader109

.preheader109:                                    ; preds = %.preheader110, %92
  %.099120 = phi i64 [ 0, %.preheader110 ], [ %93, %92 ]
  br label %7

7:                                                ; preds = %.preheader109, %89
  %indvars.iv = phi i64 [ 4, %.preheader109 ], [ %indvars.iv.next, %89 ]
  %.0100119 = phi i64 [ 1, %.preheader109 ], [ %91, %89 ]
  %8 = add nuw nsw i64 %.0100119, 3
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 2048, i64 noundef %8, ptr noundef %1)
  br label %.preheader106

.preheader106:                                    ; preds = %7, %17
  %.0112 = phi i64 [ 0, %7 ], [ %18, %17 ]
  br label %9

9:                                                ; preds = %.preheader106, %9
  %.095111 = phi i64 [ 0, %.preheader106 ], [ %16, %9 ]
  %10 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %11 = call double @llvm.fmuladd.f64(double %10, double 1.000000e+01, double -5.000000e+00)
  %12 = load ptr, ptr %6, align 8, !tbaa !9
  %13 = getelementptr inbounds ptr, ptr %12, i64 %.0112
  %14 = load ptr, ptr %13, align 8, !tbaa !10
  %15 = getelementptr inbounds double, ptr %14, i64 %.095111
  store double %11, ptr %15, align 8, !tbaa !12
  %16 = add nuw nsw i64 %.095111, 1
  %exitcond.not = icmp eq i64 %16, %indvars.iv
  br i1 %exitcond.not, label %17, label %9, !llvm.loop !14

17:                                               ; preds = %9
  %18 = add nuw nsw i64 %.0112, 1
  %exitcond122.not = icmp eq i64 %18, 2048
  br i1 %exitcond122.not, label %.preheader108.preheader, label %.preheader106, !llvm.loop !16

.preheader108.preheader:                          ; preds = %17
  %19 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 4, ptr noundef %1)
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 1, i64 noundef %.0100119, i64 noundef %19, i64 noundef %.099120, ptr noundef nonnull %5, ptr noundef %1)
  %20 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 4, ptr noundef %1)
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 2, i64 noundef %.0100119, i64 noundef %20, i64 noundef %.099120, ptr noundef nonnull %5, ptr noundef %1)
  %21 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 4, ptr noundef %1)
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 3, i64 noundef %.0100119, i64 noundef %21, i64 noundef %.099120, ptr noundef nonnull %5, ptr noundef %1)
  %22 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 4, ptr noundef %1)
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 4, i64 noundef %.0100119, i64 noundef %22, i64 noundef %.099120, ptr noundef nonnull %5, ptr noundef %1)
  %23 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 4, ptr noundef %1)
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 5, i64 noundef %.0100119, i64 noundef %23, i64 noundef %.099120, ptr noundef nonnull %5, ptr noundef %1)
  %24 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 4, ptr noundef %1)
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 6, i64 noundef %.0100119, i64 noundef %24, i64 noundef %.099120, ptr noundef nonnull %5, ptr noundef %1)
  %25 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 4, ptr noundef %1)
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 7, i64 noundef %.0100119, i64 noundef %25, i64 noundef %.099120, ptr noundef nonnull %5, ptr noundef %1)
  %26 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 4, ptr noundef %1)
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 8, i64 noundef %.0100119, i64 noundef %26, i64 noundef %.099120, ptr noundef nonnull %5, ptr noundef %1)
  %27 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 4, ptr noundef %1)
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 9, i64 noundef %.0100119, i64 noundef %27, i64 noundef %.099120, ptr noundef nonnull %5, ptr noundef %1)
  %28 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 4, ptr noundef %1)
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 10, i64 noundef %.0100119, i64 noundef %28, i64 noundef %.099120, ptr noundef nonnull %5, ptr noundef %1)
  %29 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 4, ptr noundef %1)
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 2048, i64 noundef %.0100119, i64 noundef %29, i64 noundef %.099120, ptr noundef nonnull %5, ptr noundef %1)
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 512, i64 noundef %8, ptr noundef %1)
  br label %.preheader105

.preheader105:                                    ; preds = %.preheader108.preheader, %48
  %.1115 = phi i64 [ 0, %.preheader108.preheader ], [ %49, %48 ]
  %30 = shl nuw nsw i64 %.1115, 1
  %31 = or disjoint i64 %30, 1
  br label %32

32:                                               ; preds = %.preheader105, %32
  %.196114 = phi i64 [ 0, %.preheader105 ], [ %47, %32 ]
  %33 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %34 = call double @llvm.fmuladd.f64(double %33, double 1.000000e+01, double -5.000000e+00)
  %35 = load ptr, ptr %6, align 8, !tbaa !9
  %36 = getelementptr inbounds ptr, ptr %35, i64 %30
  %37 = load ptr, ptr %36, align 8, !tbaa !10
  %38 = getelementptr inbounds double, ptr %37, i64 %.196114
  store double %34, ptr %38, align 8, !tbaa !12
  %39 = load ptr, ptr %6, align 8, !tbaa !9
  %40 = getelementptr inbounds ptr, ptr %39, i64 %30
  %41 = load ptr, ptr %40, align 8, !tbaa !10
  %42 = getelementptr inbounds double, ptr %41, i64 %.196114
  %43 = load double, ptr %42, align 8, !tbaa !12
  %44 = getelementptr inbounds ptr, ptr %39, i64 %31
  %45 = load ptr, ptr %44, align 8, !tbaa !10
  %46 = getelementptr inbounds double, ptr %45, i64 %.196114
  store double %43, ptr %46, align 8, !tbaa !12
  %47 = add nuw nsw i64 %.196114, 1
  %exitcond124.not = icmp eq i64 %47, %indvars.iv
  br i1 %exitcond124.not, label %48, label %32, !llvm.loop !17

48:                                               ; preds = %32
  %49 = add nuw nsw i64 %.1115, 1
  %exitcond125.not = icmp eq i64 %49, 256
  br i1 %exitcond125.not, label %50, label %.preheader105, !llvm.loop !18

50:                                               ; preds = %48
  %51 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 4, ptr noundef %1)
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 512, i64 noundef %.0100119, i64 noundef %51, i64 noundef %.099120, ptr noundef nonnull %5, ptr noundef %1)
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 256, i64 noundef %8, ptr noundef %1)
  %52 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %exitcond126.not.1 = icmp eq i64 %indvars.iv, 2
  %exitcond126.not.2 = icmp eq i64 %indvars.iv, 3
  %exitcond126.not.3 = icmp eq i64 %indvars.iv, 4
  %exitcond126.not.4 = icmp eq i64 %indvars.iv, 5
  br label %.preheader

.preheader:                                       ; preds = %50, %80
  %.2117 = phi i64 [ 0, %50 ], [ %81, %80 ]
  %53 = load ptr, ptr %6, align 8, !tbaa !9
  %54 = getelementptr inbounds ptr, ptr %53, i64 %.2117
  %55 = load ptr, ptr %54, align 8, !tbaa !10
  store double %52, ptr %55, align 8, !tbaa !12
  %56 = load ptr, ptr %6, align 8, !tbaa !9
  %57 = getelementptr inbounds ptr, ptr %56, i64 %.2117
  %58 = load ptr, ptr %57, align 8, !tbaa !10
  %59 = getelementptr inbounds i8, ptr %58, i64 8
  store double %52, ptr %59, align 8, !tbaa !12
  br i1 %exitcond126.not.1, label %80, label %60, !llvm.loop !19

60:                                               ; preds = %.preheader
  %61 = load ptr, ptr %6, align 8, !tbaa !9
  %62 = getelementptr inbounds ptr, ptr %61, i64 %.2117
  %63 = load ptr, ptr %62, align 8, !tbaa !10
  %64 = getelementptr inbounds i8, ptr %63, i64 16
  store double %52, ptr %64, align 8, !tbaa !12
  br i1 %exitcond126.not.2, label %80, label %65, !llvm.loop !19

65:                                               ; preds = %60
  %66 = load ptr, ptr %6, align 8, !tbaa !9
  %67 = getelementptr inbounds ptr, ptr %66, i64 %.2117
  %68 = load ptr, ptr %67, align 8, !tbaa !10
  %69 = getelementptr inbounds i8, ptr %68, i64 24
  store double %52, ptr %69, align 8, !tbaa !12
  br i1 %exitcond126.not.3, label %80, label %70, !llvm.loop !19

70:                                               ; preds = %65
  %71 = load ptr, ptr %6, align 8, !tbaa !9
  %72 = getelementptr inbounds ptr, ptr %71, i64 %.2117
  %73 = load ptr, ptr %72, align 8, !tbaa !10
  %74 = getelementptr inbounds i8, ptr %73, i64 32
  store double %52, ptr %74, align 8, !tbaa !12
  br i1 %exitcond126.not.4, label %80, label %75, !llvm.loop !19

75:                                               ; preds = %70
  %76 = load ptr, ptr %6, align 8, !tbaa !9
  %77 = getelementptr inbounds ptr, ptr %76, i64 %.2117
  %78 = load ptr, ptr %77, align 8, !tbaa !10
  %79 = getelementptr inbounds i8, ptr %78, i64 40
  store double %52, ptr %79, align 8, !tbaa !12
  br label %80

80:                                               ; preds = %75, %70, %65, %60, %.preheader
  %81 = add nuw nsw i64 %.2117, 1
  %exitcond127.not = icmp eq i64 %81, 255
  br i1 %exitcond127.not, label %.preheader107, label %.preheader, !llvm.loop !20

.preheader107:                                    ; preds = %80, %.preheader107
  %.3118 = phi i64 [ %88, %.preheader107 ], [ 0, %80 ]
  %82 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %83 = call double @llvm.fmuladd.f64(double %82, double 1.000000e+01, double -5.000000e+00)
  %84 = load ptr, ptr %6, align 8, !tbaa !9
  %85 = getelementptr inbounds i8, ptr %84, i64 2040
  %86 = load ptr, ptr %85, align 8, !tbaa !10
  %87 = getelementptr inbounds double, ptr %86, i64 %.3118
  store double %83, ptr %87, align 8, !tbaa !12
  %88 = add nuw nsw i64 %.3118, 1
  %exitcond128.not = icmp eq i64 %88, %indvars.iv
  br i1 %exitcond128.not, label %89, label %.preheader107, !llvm.loop !21

89:                                               ; preds = %.preheader107
  %90 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 4, ptr noundef %1)
  call void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 256, i64 noundef %.0100119, i64 noundef %90, i64 noundef %.099120, ptr noundef nonnull %5, ptr noundef %1)
  %91 = add nuw nsw i64 %.0100119, 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond129.not = icmp eq i64 %indvars.iv.next, 7
  br i1 %exitcond129.not, label %92, label %7, !llvm.loop !22

92:                                               ; preds = %89
  %93 = add nuw nsw i64 %.099120, 1
  %exitcond130.not = icmp eq i64 %93, 3
  br i1 %exitcond130.not, label %94, label %.preheader109, !llvm.loop !23

94:                                               ; preds = %92
  %95 = add nuw nsw i64 %.098121, 1
  %exitcond131.not = icmp eq i64 %95, 3
  br i1 %exitcond131.not, label %96, label %.preheader110, !llvm.loop !24

96:                                               ; preds = %94
  %97 = load i8, ptr %5, align 1, !tbaa !5, !range !25, !noundef !26
  %98 = trunc nuw i8 %97 to i1
  br i1 %98, label %101, label %99

99:                                               ; preds = %96
  %100 = call noundef zeroext i1 @_ZL40testnearestneighborunit_testspecialcasesPN11alglib_impl8ae_stateE(ptr noundef %1)
  br label %101

101:                                              ; preds = %99, %96
  %102 = phi i1 [ true, %96 ], [ %100, %99 ]
  %103 = zext i1 %102 to i8
  store i8 %103, ptr %5, align 1, !tbaa !5
  br i1 %0, label %112, label %104

104:                                              ; preds = %101
  %105 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %106 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %107 = load i8, ptr %5, align 1, !tbaa !5, !range !25, !noundef !26
  %108 = trunc nuw i8 %107 to i1
  %.str.7..str.6 = select i1 %108, ptr @.str.7, ptr @.str.6
  %109 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.7..str.6)
  %.str.2.sink = select i1 %102, ptr @.str.1, ptr @.str.2
  %110 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink)
  %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %112

112:                                              ; preds = %104, %101
  %113 = xor i1 %102, true
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %1)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  ret i1 %113
}

declare void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL47testnearestneighborunit_testkdtreeserializationPbPN11alglib_impl8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL38testnearestneighborunit_testkdtuniformPN11alglib_impl9ae_matrixEllllPbPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL40testnearestneighborunit_testspecialcasesPN11alglib_impl8ae_stateE(ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree nounwind "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 #4 = { 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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}
!24 = distinct !{!24, !15}
!25 = !{i8 0, i8 2}
!26 = !{}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass