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

; 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::sparsematrix" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64, i64 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon }
%union.anon = type { 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.8 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [22 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 zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef, double 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

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

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

declare void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef, i1 noundef zeroext, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z13basicfunctestPN11alglib_impl8ae_stateE(ptr noundef %0) #3 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca %"struct.alglib_impl::ae_frame", align 8
  %5 = alloca %"struct.alglib_impl::sparsematrix", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 368, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, 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 80, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %17, ptr noundef %4)
  call void @llvm.memset.p0.i64(ptr align 8 %5, i8 0, i64 368, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 80, i1 false)
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef %5, ptr noundef %18, i1 noundef zeroext true)
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %14, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %19, i1 noundef zeroext true)
  store i64 10, ptr %6, align 8, !tbaa !9
  store i64 10, ptr %7, align 8, !tbaa !9
  store i8 0, ptr %15, align 1, !tbaa !11
  store i64 1, ptr %8, align 8, !tbaa !9
  br label %20

20:                                               ; preds = %264, %1
  %21 = load i64, ptr %8, align 8, !tbaa !9
  %22 = load i64, ptr %7, align 8, !tbaa !9
  %23 = sub nsw i64 %22, 1
  %24 = icmp sle i64 %21, %23
  br i1 %24, label %25, label %267

25:                                               ; preds = %20
  store i64 1, ptr %9, align 8, !tbaa !9
  br label %26

26:                                               ; preds = %260, %25
  %27 = load i64, ptr %9, align 8, !tbaa !9
  %28 = load i64, ptr %6, align 8, !tbaa !9
  %29 = sub nsw i64 %28, 1
  %30 = icmp sle i64 %27, %29
  br i1 %30, label %31, label %263

31:                                               ; preds = %26
  %32 = load i64, ptr %8, align 8, !tbaa !9
  %33 = load i64, ptr %9, align 8, !tbaa !9
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl12sparsecreateElllPNS_12sparsematrixEPNS_8ae_stateE(i64 noundef %32, i64 noundef %33, i64 noundef 1, ptr noundef %5, ptr noundef %34)
  %35 = load i64, ptr %8, align 8, !tbaa !9
  %36 = load i64, ptr %9, align 8, !tbaa !9
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %14, i64 noundef %35, i64 noundef %36, ptr noundef %37)
  store i64 0, ptr %12, align 8, !tbaa !9
  store i64 0, ptr %13, align 8, !tbaa !9
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %38

38:                                               ; preds = %141, %31
  %39 = load i64, ptr %10, align 8, !tbaa !9
  %40 = load i64, ptr %8, align 8, !tbaa !9
  %41 = sub nsw i64 %40, 1
  %42 = icmp sle i64 %39, %41
  br i1 %42, label %43, label %144

43:                                               ; preds = %38
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %44

44:                                               ; preds = %137, %43
  %45 = load i64, ptr %11, align 8, !tbaa !9
  %46 = load i64, ptr %9, align 8, !tbaa !9
  %47 = sub nsw i64 %46, 1
  %48 = icmp sle i64 %45, %47
  br i1 %48, label %49, label %140

49:                                               ; preds = %44
  %50 = load i64, ptr %11, align 8, !tbaa !9
  %51 = load i64, ptr %10, align 8, !tbaa !9
  %52 = icmp sgt i64 %50, %51
  br i1 %52, label %53, label %55

53:                                               ; preds = %49
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl3incEPlPNS_8ae_stateE(ptr noundef %12, ptr noundef %54)
  br label %55

55:                                               ; preds = %53, %49
  %56 = load i64, ptr %11, align 8, !tbaa !9
  %57 = load i64, ptr %10, align 8, !tbaa !9
  %58 = icmp slt i64 %56, %57
  br i1 %58, label %59, label %61

59:                                               ; preds = %55
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl3incEPlPNS_8ae_stateE(ptr noundef %13, ptr noundef %60)
  br label %61

61:                                               ; preds = %59, %55
  %62 = load i64, ptr %10, align 8, !tbaa !9
  %63 = load i64, ptr %11, align 8, !tbaa !9
  %64 = add nsw i64 %62, %63
  %65 = sitofp i64 %64 to double
  %66 = load i64, ptr %8, align 8, !tbaa !9
  %67 = load i64, ptr %9, align 8, !tbaa !9
  %68 = add nsw i64 %66, %67
  %69 = load i64, ptr %7, align 8, !tbaa !9
  %70 = load i64, ptr %6, align 8, !tbaa !9
  %71 = add nsw i64 %69, %70
  %72 = mul nsw i64 %68, %71
  %73 = sitofp i64 %72 to double
  %74 = fdiv double %73, 2.000000e+00
  %75 = fadd double %65, %74
  %76 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 6
  %77 = load ptr, ptr %76, align 8, !tbaa !13
  %78 = load i64, ptr %10, align 8, !tbaa !9
  %79 = getelementptr inbounds ptr, ptr %77, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = load i64, ptr %11, align 8, !tbaa !9
  %82 = getelementptr inbounds double, ptr %80, i64 %81
  store double %75, ptr %82, align 8, !tbaa !14
  %83 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 6
  %84 = load ptr, ptr %83, align 8, !tbaa !13
  %85 = load i64, ptr %10, align 8, !tbaa !9
  %86 = getelementptr inbounds ptr, ptr %84, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = load i64, ptr %11, align 8, !tbaa !9
  %89 = getelementptr inbounds double, ptr %87, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !14
  %91 = fadd double %90, 1.000000e+00
  %92 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 6
  %93 = load ptr, ptr %92, align 8, !tbaa !13
  %94 = load i64, ptr %10, align 8, !tbaa !9
  %95 = getelementptr inbounds ptr, ptr %93, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = load i64, ptr %11, align 8, !tbaa !9
  %98 = getelementptr inbounds double, ptr %96, i64 %97
  store double %91, ptr %98, align 8, !tbaa !14
  %99 = load i64, ptr %10, align 8, !tbaa !9
  %100 = load i64, ptr %11, align 8, !tbaa !9
  %101 = load i64, ptr %10, align 8, !tbaa !9
  %102 = load i64, ptr %11, align 8, !tbaa !9
  %103 = add nsw i64 %101, %102
  %104 = sitofp i64 %103 to double
  %105 = load i64, ptr %8, align 8, !tbaa !9
  %106 = load i64, ptr %9, align 8, !tbaa !9
  %107 = add nsw i64 %105, %106
  %108 = load i64, ptr %7, align 8, !tbaa !9
  %109 = load i64, ptr %6, align 8, !tbaa !9
  %110 = add nsw i64 %108, %109
  %111 = mul nsw i64 %107, %110
  %112 = sitofp i64 %111 to double
  %113 = fdiv double %112, 2.000000e+00
  %114 = fadd double %104, %113
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl9sparsesetEPNS_12sparsematrixElldPNS_8ae_stateE(ptr noundef %5, i64 noundef %99, i64 noundef %100, double noundef %114, ptr noundef %115)
  %116 = load i64, ptr %10, align 8, !tbaa !9
  %117 = load i64, ptr %11, align 8, !tbaa !9
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl9sparseaddEPNS_12sparsematrixElldPNS_8ae_stateE(ptr noundef %5, i64 noundef %116, i64 noundef %117, double noundef 1.000000e+00, ptr noundef %118)
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 6
  %120 = load ptr, ptr %119, align 8, !tbaa !13
  %121 = load i64, ptr %10, align 8, !tbaa !9
  %122 = getelementptr inbounds ptr, ptr %120, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = load i64, ptr %11, align 8, !tbaa !9
  %125 = getelementptr inbounds double, ptr %123, i64 %124
  %126 = load double, ptr %125, align 8, !tbaa !14
  %127 = load i64, ptr %10, align 8, !tbaa !9
  %128 = load i64, ptr %11, align 8, !tbaa !9
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %5, i64 noundef %127, i64 noundef %128, ptr noundef %129)
  %131 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %126, double noundef %130)
  br i1 %131, label %132, label %136

132:                                              ; preds = %61
  store i8 1, ptr %15, align 1, !tbaa !11
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %133)
  %134 = load i8, ptr %15, align 1, !tbaa !11, !range !16, !noundef !17
  %135 = trunc i8 %134 to i1
  store i1 %135, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %271

136:                                              ; preds = %61
  br label %137

137:                                              ; preds = %136
  %138 = load i64, ptr %11, align 8, !tbaa !9
  %139 = add nsw i64 %138, 1
  store i64 %139, ptr %11, align 8, !tbaa !9
  br label %44, !llvm.loop !18

140:                                              ; preds = %44
  br label %141

141:                                              ; preds = %140
  %142 = load i64, ptr %10, align 8, !tbaa !9
  %143 = add nsw i64 %142, 1
  store i64 %143, ptr %10, align 8, !tbaa !9
  br label %38, !llvm.loop !20

144:                                              ; preds = %38
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %145

145:                                              ; preds = %171, %144
  %146 = load i64, ptr %10, align 8, !tbaa !9
  %147 = load i64, ptr %8, align 8, !tbaa !9
  %148 = load i64, ptr %9, align 8, !tbaa !9
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %147, i64 noundef %148, ptr noundef %149)
  %151 = sub nsw i64 %150, 1
  %152 = icmp sle i64 %146, %151
  br i1 %152, label %153, label %174

153:                                              ; preds = %145
  %154 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 6
  %155 = load ptr, ptr %154, align 8, !tbaa !13
  %156 = load i64, ptr %10, align 8, !tbaa !9
  %157 = getelementptr inbounds ptr, ptr %155, i64 %156
  %158 = load ptr, ptr %157, align 8, !tbaa !5
  %159 = load i64, ptr %10, align 8, !tbaa !9
  %160 = getelementptr inbounds double, ptr %158, i64 %159
  %161 = load double, ptr %160, align 8, !tbaa !14
  %162 = load i64, ptr %10, align 8, !tbaa !9
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = call noundef double @_ZN11alglib_impl17sparsegetdiagonalEPNS_12sparsematrixElPNS_8ae_stateE(ptr noundef %5, i64 noundef %162, ptr noundef %163)
  %165 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %161, double noundef %164)
  br i1 %165, label %166, label %170

166:                                              ; preds = %153
  store i8 1, ptr %15, align 1, !tbaa !11
  %167 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %167)
  %168 = load i8, ptr %15, align 1, !tbaa !11, !range !16, !noundef !17
  %169 = trunc i8 %168 to i1
  store i1 %169, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %271

170:                                              ; preds = %153
  br label %171

171:                                              ; preds = %170
  %172 = load i64, ptr %10, align 8, !tbaa !9
  %173 = add nsw i64 %172, 1
  store i64 %173, ptr %10, align 8, !tbaa !9
  br label %145, !llvm.loop !21

174:                                              ; preds = %145
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = call noundef i64 @_ZN11alglib_impl19sparsegetuppercountEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %5, ptr noundef %175)
  %177 = load i64, ptr %12, align 8, !tbaa !9
  %178 = icmp ne i64 %176, %177
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %15, i1 noundef zeroext %178, ptr noundef @.str.8, i32 noundef 5158, ptr noundef @.str.101)
  %179 = load ptr, ptr %3, align 8, !tbaa !5
  %180 = call noundef i64 @_ZN11alglib_impl19sparsegetlowercountEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %5, ptr noundef %179)
  %181 = load i64, ptr %13, align 8, !tbaa !9
  %182 = icmp ne i64 %180, %181
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %15, i1 noundef zeroext %182, ptr noundef @.str.8, i32 noundef 5159, ptr noundef @.str.102)
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparseconverttocrsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %5, ptr noundef %183)
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %184

184:                                              ; preds = %218, %174
  %185 = load i64, ptr %10, align 8, !tbaa !9
  %186 = load i64, ptr %8, align 8, !tbaa !9
  %187 = sub nsw i64 %186, 1
  %188 = icmp sle i64 %185, %187
  br i1 %188, label %189, label %221

189:                                              ; preds = %184
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %190

190:                                              ; preds = %214, %189
  %191 = load i64, ptr %11, align 8, !tbaa !9
  %192 = load i64, ptr %9, align 8, !tbaa !9
  %193 = sub nsw i64 %192, 1
  %194 = icmp sle i64 %191, %193
  br i1 %194, label %195, label %217

195:                                              ; preds = %190
  %196 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 6
  %197 = load ptr, ptr %196, align 8, !tbaa !13
  %198 = load i64, ptr %10, align 8, !tbaa !9
  %199 = getelementptr inbounds ptr, ptr %197, i64 %198
  %200 = load ptr, ptr %199, align 8, !tbaa !5
  %201 = load i64, ptr %11, align 8, !tbaa !9
  %202 = getelementptr inbounds double, ptr %200, i64 %201
  %203 = load double, ptr %202, align 8, !tbaa !14
  %204 = load i64, ptr %10, align 8, !tbaa !9
  %205 = load i64, ptr %11, align 8, !tbaa !9
  %206 = load ptr, ptr %3, align 8, !tbaa !5
  %207 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %5, i64 noundef %204, i64 noundef %205, ptr noundef %206)
  %208 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %203, double noundef %207)
  br i1 %208, label %209, label %213

209:                                              ; preds = %195
  store i8 1, ptr %15, align 1, !tbaa !11
  %210 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %210)
  %211 = load i8, ptr %15, align 1, !tbaa !11, !range !16, !noundef !17
  %212 = trunc i8 %211 to i1
  store i1 %212, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %271

213:                                              ; preds = %195
  br label %214

214:                                              ; preds = %213
  %215 = load i64, ptr %11, align 8, !tbaa !9
  %216 = add nsw i64 %215, 1
  store i64 %216, ptr %11, align 8, !tbaa !9
  br label %190, !llvm.loop !22

217:                                              ; preds = %190
  br label %218

218:                                              ; preds = %217
  %219 = load i64, ptr %10, align 8, !tbaa !9
  %220 = add nsw i64 %219, 1
  store i64 %220, ptr %10, align 8, !tbaa !9
  br label %184, !llvm.loop !23

221:                                              ; preds = %184
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %222

222:                                              ; preds = %248, %221
  %223 = load i64, ptr %10, align 8, !tbaa !9
  %224 = load i64, ptr %8, align 8, !tbaa !9
  %225 = load i64, ptr %9, align 8, !tbaa !9
  %226 = load ptr, ptr %3, align 8, !tbaa !5
  %227 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %224, i64 noundef %225, ptr noundef %226)
  %228 = sub nsw i64 %227, 1
  %229 = icmp sle i64 %223, %228
  br i1 %229, label %230, label %251

230:                                              ; preds = %222
  %231 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 6
  %232 = load ptr, ptr %231, align 8, !tbaa !13
  %233 = load i64, ptr %10, align 8, !tbaa !9
  %234 = getelementptr inbounds ptr, ptr %232, i64 %233
  %235 = load ptr, ptr %234, align 8, !tbaa !5
  %236 = load i64, ptr %10, align 8, !tbaa !9
  %237 = getelementptr inbounds double, ptr %235, i64 %236
  %238 = load double, ptr %237, align 8, !tbaa !14
  %239 = load i64, ptr %10, align 8, !tbaa !9
  %240 = load ptr, ptr %3, align 8, !tbaa !5
  %241 = call noundef double @_ZN11alglib_impl17sparsegetdiagonalEPNS_12sparsematrixElPNS_8ae_stateE(ptr noundef %5, i64 noundef %239, ptr noundef %240)
  %242 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %238, double noundef %241)
  br i1 %242, label %243, label %247

243:                                              ; preds = %230
  store i8 1, ptr %15, align 1, !tbaa !11
  %244 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %244)
  %245 = load i8, ptr %15, align 1, !tbaa !11, !range !16, !noundef !17
  %246 = trunc i8 %245 to i1
  store i1 %246, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %271

247:                                              ; preds = %230
  br label %248

248:                                              ; preds = %247
  %249 = load i64, ptr %10, align 8, !tbaa !9
  %250 = add nsw i64 %249, 1
  store i64 %250, ptr %10, align 8, !tbaa !9
  br label %222, !llvm.loop !24

251:                                              ; preds = %222
  %252 = load ptr, ptr %3, align 8, !tbaa !5
  %253 = call noundef i64 @_ZN11alglib_impl19sparsegetuppercountEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %5, ptr noundef %252)
  %254 = load i64, ptr %12, align 8, !tbaa !9
  %255 = icmp ne i64 %253, %254
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %15, i1 noundef zeroext %255, ptr noundef @.str.8, i32 noundef 5186, ptr noundef @.str.103)
  %256 = load ptr, ptr %3, align 8, !tbaa !5
  %257 = call noundef i64 @_ZN11alglib_impl19sparsegetlowercountEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %5, ptr noundef %256)
  %258 = load i64, ptr %13, align 8, !tbaa !9
  %259 = icmp ne i64 %257, %258
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %15, i1 noundef zeroext %259, ptr noundef @.str.8, i32 noundef 5187, ptr noundef @.str.104)
  br label %260

260:                                              ; preds = %251
  %261 = load i64, ptr %9, align 8, !tbaa !9
  %262 = add nsw i64 %261, 1
  store i64 %262, ptr %9, align 8, !tbaa !9
  br label %26, !llvm.loop !25

263:                                              ; preds = %26
  br label %264

264:                                              ; preds = %263
  %265 = load i64, ptr %8, align 8, !tbaa !9
  %266 = add nsw i64 %265, 1
  store i64 %266, ptr %8, align 8, !tbaa !9
  br label %20, !llvm.loop !26

267:                                              ; preds = %20
  %268 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %268)
  %269 = load i8, ptr %15, align 1, !tbaa !11, !range !16, !noundef !17
  %270 = trunc i8 %269 to i1
  store i1 %270, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %271

271:                                              ; preds = %267, %243, %209, %166, %132
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 80, 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 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 368, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #4
  %272 = load i1, ptr %2, align 1
  ret i1 %272
}

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

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

declare void @_ZN11alglib_impl9sparsesetEPNS_12sparsematrixElldPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, double noundef, ptr noundef) #1

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

declare noundef double @_ZN11alglib_impl17sparsegetdiagonalEPNS_12sparsematrixElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #1

declare noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

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

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

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

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

declare void @_ZN11alglib_impl9sparseaddEPNS_12sparsematrixElldPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, double noundef, ptr noundef) #1

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 = { 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 = !{!"bool", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !19}
!26 = distinct !{!26, !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::sparsematrix" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64, i64 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon }
%union.anon = type { 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.8 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [22 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 zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef, double noundef) local_unnamed_addr #1

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

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

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

declare void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef, i1 noundef zeroext, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z13basicfunctestPN11alglib_impl8ae_stateE(ptr noundef %0) local_unnamed_addr #3 {
  %2 = alloca %"struct.alglib_impl::ae_frame", align 8
  %3 = alloca %"struct.alglib_impl::sparsematrix", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %7 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 368, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %0, ptr noundef nonnull %2)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(368) %3, i8 0, i64 368, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %6, i8 0, i64 80, i1 false)
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef nonnull %3, ptr noundef %0, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %6, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %0, i1 noundef zeroext true)
  store i8 0, ptr %7, align 1, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %6, i64 72
  br label %.preheader109

.preheader109:                                    ; preds = %1, %96
  %.098121 = phi i64 [ 1, %1 ], [ %97, %96 ]
  br label %9

9:                                                ; preds = %.preheader109, %._crit_edge119
  %.097120 = phi i64 [ 1, %.preheader109 ], [ %95, %._crit_edge119 ]
  call void @_ZN11alglib_impl12sparsecreateElllPNS_12sparsematrixEPNS_8ae_stateE(i64 noundef %.098121, i64 noundef %.097120, i64 noundef 1, ptr noundef nonnull %3, ptr noundef %0)
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %.098121, i64 noundef %.097120, ptr noundef %0)
  store i64 0, ptr %4, align 8, !tbaa !9
  store i64 0, ptr %5, align 8, !tbaa !9
  %10 = add nuw nsw i64 %.097120, %.098121
  %11 = mul nuw nsw i64 %10, 20
  %12 = uitofp nneg i64 %11 to double
  %13 = fmul double %12, 5.000000e-01
  br label %.preheader106

.preheader108:                                    ; preds = %45
  %14 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %.098121, i64 noundef %.097120, ptr noundef %0)
  %.not.not101112 = icmp sgt i64 %14, 0
  br i1 %.not.not101112, label %.lr.ph, label %._crit_edge

.preheader106:                                    ; preds = %9, %45
  %.095111 = phi i64 [ 0, %9 ], [ %46, %45 ]
  br label %17

15:                                               ; preds = %23
  %16 = add nuw nsw i64 %.0110, 1
  %exitcond.not = icmp eq i64 %16, %.097120
  br i1 %exitcond.not, label %45, label %17, !llvm.loop !11

17:                                               ; preds = %.preheader106, %15
  %.0110 = phi i64 [ 0, %.preheader106 ], [ %16, %15 ]
  %18 = icmp ugt i64 %.0110, %.095111
  br i1 %18, label %19, label %20

19:                                               ; preds = %17
  call void @_ZN11alglib_impl3incEPlPNS_8ae_stateE(ptr noundef nonnull %4, ptr noundef %0)
  br label %20

20:                                               ; preds = %19, %17
  %21 = icmp ult i64 %.0110, %.095111
  br i1 %21, label %22, label %23

22:                                               ; preds = %20
  call void @_ZN11alglib_impl3incEPlPNS_8ae_stateE(ptr noundef nonnull %5, ptr noundef %0)
  br label %23

23:                                               ; preds = %22, %20
  %24 = add nuw nsw i64 %.0110, %.095111
  %25 = uitofp nneg i64 %24 to double
  %26 = fadd double %13, %25
  %27 = load ptr, ptr %8, align 8, !tbaa !13
  %28 = getelementptr inbounds ptr, ptr %27, i64 %.095111
  %29 = load ptr, ptr %28, align 8, !tbaa !14
  %30 = getelementptr inbounds double, ptr %29, i64 %.0110
  store double %26, ptr %30, align 8, !tbaa !16
  %31 = load ptr, ptr %8, align 8, !tbaa !13
  %32 = getelementptr inbounds ptr, ptr %31, i64 %.095111
  %33 = load ptr, ptr %32, align 8, !tbaa !14
  %34 = getelementptr inbounds double, ptr %33, i64 %.0110
  %35 = load double, ptr %34, align 8, !tbaa !16
  %36 = fadd double %35, 1.000000e+00
  store double %36, ptr %34, align 8, !tbaa !16
  call void @_ZN11alglib_impl9sparsesetEPNS_12sparsematrixElldPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %.095111, i64 noundef %.0110, double noundef %26, ptr noundef %0)
  call void @_ZN11alglib_impl9sparseaddEPNS_12sparsematrixElldPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %.095111, i64 noundef %.0110, double noundef 1.000000e+00, ptr noundef %0)
  %37 = load ptr, ptr %8, align 8, !tbaa !13
  %38 = getelementptr inbounds ptr, ptr %37, i64 %.095111
  %39 = load ptr, ptr %38, align 8, !tbaa !14
  %40 = getelementptr inbounds double, ptr %39, i64 %.0110
  %41 = load double, ptr %40, align 8, !tbaa !16
  %42 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %.095111, i64 noundef %.0110, ptr noundef %0)
  %43 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %41, double noundef %42)
  br i1 %43, label %44, label %15

44:                                               ; preds = %23
  store i8 1, ptr %7, align 1, !tbaa !5
  br label %.loopexit

45:                                               ; preds = %15
  %46 = add nuw nsw i64 %.095111, 1
  %exitcond122.not = icmp eq i64 %46, %.098121
  br i1 %exitcond122.not, label %.preheader108, label %.preheader106, !llvm.loop !18

47:                                               ; preds = %.lr.ph
  %48 = add nuw nsw i64 %.196113, 1
  %49 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %.098121, i64 noundef %.097120, ptr noundef %0)
  %.not.not101 = icmp slt i64 %48, %49
  br i1 %.not.not101, label %.lr.ph, label %._crit_edge, !llvm.loop !19

.lr.ph:                                           ; preds = %.preheader108, %47
  %.196113 = phi i64 [ %48, %47 ], [ 0, %.preheader108 ]
  %50 = load ptr, ptr %8, align 8, !tbaa !13
  %51 = getelementptr inbounds ptr, ptr %50, i64 %.196113
  %52 = load ptr, ptr %51, align 8, !tbaa !14
  %53 = getelementptr inbounds double, ptr %52, i64 %.196113
  %54 = load double, ptr %53, align 8, !tbaa !16
  %55 = call noundef double @_ZN11alglib_impl17sparsegetdiagonalEPNS_12sparsematrixElPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %.196113, ptr noundef %0)
  %56 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %54, double noundef %55)
  br i1 %56, label %57, label %47

57:                                               ; preds = %.lr.ph
  store i8 1, ptr %7, align 1, !tbaa !5
  br label %.loopexit

._crit_edge:                                      ; preds = %47, %.preheader108
  %58 = call noundef i64 @_ZN11alglib_impl19sparsegetuppercountEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %3, ptr noundef %0)
  %59 = load i64, ptr %4, align 8, !tbaa !9
  %60 = icmp ne i64 %58, %59
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %7, i1 noundef zeroext %60, ptr noundef nonnull @.str.8, i32 noundef 5158, ptr noundef nonnull @.str.101)
  %61 = call noundef i64 @_ZN11alglib_impl19sparsegetlowercountEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %3, ptr noundef %0)
  %62 = load i64, ptr %5, align 8, !tbaa !9
  %63 = icmp ne i64 %61, %62
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %7, i1 noundef zeroext %63, ptr noundef nonnull @.str.8, i32 noundef 5159, ptr noundef nonnull @.str.102)
  call void @_ZN11alglib_impl18sparseconverttocrsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %3, ptr noundef %0)
  br label %.preheader

.preheader107:                                    ; preds = %76
  %64 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %.098121, i64 noundef %.097120, ptr noundef %0)
  %.not.not103116 = icmp sgt i64 %64, 0
  br i1 %.not.not103116, label %.lr.ph118, label %._crit_edge119

.preheader:                                       ; preds = %._crit_edge, %76
  %.2115 = phi i64 [ 0, %._crit_edge ], [ %77, %76 ]
  br label %67

65:                                               ; preds = %67
  %66 = add nuw nsw i64 %.1114, 1
  %exitcond123.not = icmp eq i64 %66, %.097120
  br i1 %exitcond123.not, label %76, label %67, !llvm.loop !20

67:                                               ; preds = %.preheader, %65
  %.1114 = phi i64 [ 0, %.preheader ], [ %66, %65 ]
  %68 = load ptr, ptr %8, align 8, !tbaa !13
  %69 = getelementptr inbounds ptr, ptr %68, i64 %.2115
  %70 = load ptr, ptr %69, align 8, !tbaa !14
  %71 = getelementptr inbounds double, ptr %70, i64 %.1114
  %72 = load double, ptr %71, align 8, !tbaa !16
  %73 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %.2115, i64 noundef %.1114, ptr noundef %0)
  %74 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %72, double noundef %73)
  br i1 %74, label %75, label %65

75:                                               ; preds = %67
  store i8 1, ptr %7, align 1, !tbaa !5
  br label %.loopexit

76:                                               ; preds = %65
  %77 = add nuw nsw i64 %.2115, 1
  %exitcond124.not = icmp eq i64 %77, %.098121
  br i1 %exitcond124.not, label %.preheader107, label %.preheader, !llvm.loop !21

78:                                               ; preds = %.lr.ph118
  %79 = add nuw nsw i64 %.3117, 1
  %80 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %.098121, i64 noundef %.097120, ptr noundef %0)
  %.not.not103 = icmp slt i64 %79, %80
  br i1 %.not.not103, label %.lr.ph118, label %._crit_edge119, !llvm.loop !22

.lr.ph118:                                        ; preds = %.preheader107, %78
  %.3117 = phi i64 [ %79, %78 ], [ 0, %.preheader107 ]
  %81 = load ptr, ptr %8, align 8, !tbaa !13
  %82 = getelementptr inbounds ptr, ptr %81, i64 %.3117
  %83 = load ptr, ptr %82, align 8, !tbaa !14
  %84 = getelementptr inbounds double, ptr %83, i64 %.3117
  %85 = load double, ptr %84, align 8, !tbaa !16
  %86 = call noundef double @_ZN11alglib_impl17sparsegetdiagonalEPNS_12sparsematrixElPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %.3117, ptr noundef %0)
  %87 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %85, double noundef %86)
  br i1 %87, label %88, label %78

88:                                               ; preds = %.lr.ph118
  store i8 1, ptr %7, align 1, !tbaa !5
  br label %.loopexit

._crit_edge119:                                   ; preds = %78, %.preheader107
  %89 = call noundef i64 @_ZN11alglib_impl19sparsegetuppercountEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %3, ptr noundef %0)
  %90 = load i64, ptr %4, align 8, !tbaa !9
  %91 = icmp ne i64 %89, %90
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %7, i1 noundef zeroext %91, ptr noundef nonnull @.str.8, i32 noundef 5186, ptr noundef nonnull @.str.103)
  %92 = call noundef i64 @_ZN11alglib_impl19sparsegetlowercountEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %3, ptr noundef %0)
  %93 = load i64, ptr %5, align 8, !tbaa !9
  %94 = icmp ne i64 %92, %93
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %7, i1 noundef zeroext %94, ptr noundef nonnull @.str.8, i32 noundef 5187, ptr noundef nonnull @.str.104)
  %95 = add nuw nsw i64 %.097120, 1
  %exitcond125.not = icmp eq i64 %95, 10
  br i1 %exitcond125.not, label %96, label %9, !llvm.loop !23

96:                                               ; preds = %._crit_edge119
  %97 = add nuw nsw i64 %.098121, 1
  %exitcond126.not = icmp eq i64 %97, 10
  br i1 %exitcond126.not, label %.loopexit, label %.preheader109, !llvm.loop !24

.loopexit:                                        ; preds = %96, %88, %75, %57, %44
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %0)
  %.099.in = load i8, ptr %7, align 1, !tbaa !5, !range !25, !noundef !26
  %.099 = trunc nuw i8 %.099.in to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 368, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  ret i1 %.099
}

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

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

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

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

declare noundef double @_ZN11alglib_impl17sparsegetdiagonalEPNS_12sparsematrixElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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 = { 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 = { 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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = !{i8 0, i8 2}
!26 = !{}


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