; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/tests/test_c.ll (Z19testlevel3symmetricPN11alglib_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::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { 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.sparsegenerator = type { i64, i64, i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::hqrndstate", %"struct.alglib_impl::rcommstate" }
%"struct.alglib_impl::hqrndstate" = type { i64, i64, i64 }
%"struct.alglib_impl::rcommstate" = type { i32, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }

@.str.8 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [23 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_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #1

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

declare noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef, ptr noundef) #1

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

declare noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr noundef) #1

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

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

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

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z19testlevel3symmetricPN11alglib_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 i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %8 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %9 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %10 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %14 = alloca %"struct.alglib_impl::sparsematrix", align 8
  %15 = alloca %"struct.alglib_impl::sparsematrix", align 8
  %16 = alloca %"struct.alglib_impl::sparsematrix", align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca %struct.sparsegenerator, align 8
  %20 = alloca %"struct.alglib_impl::hqrndstate", align 8
  %21 = alloca i8, align 1
  %22 = alloca i64, align 8
  %23 = alloca i8, align 1
  %24 = 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 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 80, 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 80, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 368, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 368, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 368, 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
  call void @llvm.lifetime.start.p0(i64 400, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #4
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %25, ptr noundef %4)
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %8, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 368, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 368, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 368, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 400, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 24, i1 false)
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %7, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %26, i1 noundef zeroext true)
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %8, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %27, i1 noundef zeroext true)
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %9, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %28, i1 noundef zeroext true)
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %10, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %29, i1 noundef zeroext true)
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %13, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %30, i1 noundef zeroext true)
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef %14, ptr noundef %31, i1 noundef zeroext true)
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef %15, ptr noundef %32, i1 noundef zeroext true)
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef %16, ptr noundef %33, i1 noundef zeroext true)
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_Z21_sparsegenerator_initPvPN11alglib_impl8ae_stateEb(ptr noundef %19, ptr noundef %34, i1 noundef zeroext true)
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef %20, ptr noundef %35, i1 noundef zeroext true)
  store double 0x3D95FD7FE1796496, ptr %17, align 8, !tbaa !9
  store i8 0, ptr %23, align 1, !tbaa !11
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %20, ptr noundef %36)
  store i64 1, ptr %5, align 8, !tbaa !13
  br label %37

37:                                               ; preds = %378, %1
  %38 = load i64, ptr %5, align 8, !tbaa !13
  %39 = icmp sle i64 %38, 20
  br i1 %39, label %40, label %381

40:                                               ; preds = %37
  store i64 -1, ptr %22, align 8, !tbaa !13
  br label %41

41:                                               ; preds = %374, %40
  %42 = load i64, ptr %22, align 8, !tbaa !13
  %43 = icmp sle i64 %42, 1
  br i1 %43, label %44, label %377

44:                                               ; preds = %41
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %20, ptr noundef %45)
  %47 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %46, double noundef 5.000000e-01)
  %48 = zext i1 %47 to i8
  store i8 %48, ptr %21, align 1, !tbaa !11
  %49 = load i64, ptr %22, align 8, !tbaa !13
  %50 = icmp slt i64 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %44
  store i8 0, ptr %21, align 1, !tbaa !11
  br label %52

52:                                               ; preds = %51, %44
  %53 = load i64, ptr %22, align 8, !tbaa !13
  %54 = icmp sgt i64 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %52
  store i8 1, ptr %21, align 1, !tbaa !11
  br label %56

56:                                               ; preds = %55, %52
  %57 = load i64, ptr %5, align 8, !tbaa !13
  %58 = load i64, ptr %5, align 8, !tbaa !13
  %59 = load i64, ptr %22, align 8, !tbaa !13
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZL28testsparseunit_initgeneratorllllP15sparsegeneratorPN11alglib_impl8ae_stateE(i64 noundef %57, i64 noundef %58, i64 noundef 0, i64 noundef %59, ptr noundef %19, ptr noundef %60)
  br label %61

61:                                               ; preds = %372, %56
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = call noundef zeroext i1 @_ZL27testsparseunit_generatenextP15sparsegeneratorPN11alglib_impl9ae_matrixEPNS1_12sparsematrixEPNS1_8ae_stateE(ptr noundef %19, ptr noundef %13, ptr noundef %16, ptr noundef %62)
  br i1 %63, label %64, label %373

64:                                               ; preds = %61
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = call noundef i64 @_ZN11alglib_impl13hqrnduniformiEPNS_10hqrndstateElPNS_8ae_stateE(ptr noundef %20, i64 noundef 20, ptr noundef %65)
  %67 = add nsw i64 1, %66
  store i64 %67, ptr %6, align 8, !tbaa !13
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl16sparsecopytohashEPNS_12sparsematrixES1_PNS_8ae_stateE(ptr noundef %16, ptr noundef %15, ptr noundef %68)
  store i64 0, ptr %11, align 8, !tbaa !13
  br label %69

69:                                               ; preds = %105, %64
  %70 = load i64, ptr %11, align 8, !tbaa !13
  %71 = load i64, ptr %5, align 8, !tbaa !13
  %72 = sub nsw i64 %71, 1
  %73 = icmp sle i64 %70, %72
  br i1 %73, label %74, label %108

74:                                               ; preds = %69
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %75

75:                                               ; preds = %101, %74
  %76 = load i64, ptr %12, align 8, !tbaa !13
  %77 = load i64, ptr %5, align 8, !tbaa !13
  %78 = sub nsw i64 %77, 1
  %79 = icmp sle i64 %76, %78
  br i1 %79, label %80, label %104

80:                                               ; preds = %75
  %81 = load i64, ptr %12, align 8, !tbaa !13
  %82 = load i64, ptr %11, align 8, !tbaa !13
  %83 = icmp slt i64 %81, %82
  br i1 %83, label %84, label %87

84:                                               ; preds = %80
  %85 = load i8, ptr %21, align 1, !tbaa !11, !range !15, !noundef !16
  %86 = trunc i8 %85 to i1
  br i1 %86, label %94, label %87

87:                                               ; preds = %84, %80
  %88 = load i64, ptr %12, align 8, !tbaa !13
  %89 = load i64, ptr %11, align 8, !tbaa !13
  %90 = icmp sgt i64 %88, %89
  br i1 %90, label %91, label %100

91:                                               ; preds = %87
  %92 = load i8, ptr %21, align 1, !tbaa !11, !range !15, !noundef !16
  %93 = trunc i8 %92 to i1
  br i1 %93, label %100, label %94

94:                                               ; preds = %91, %84
  %95 = load i64, ptr %11, align 8, !tbaa !13
  %96 = load i64, ptr %12, align 8, !tbaa !13
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %20, ptr noundef %97)
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl9sparsesetEPNS_12sparsematrixElldPNS_8ae_stateE(ptr noundef %15, i64 noundef %95, i64 noundef %96, double noundef %98, ptr noundef %99)
  br label %100

100:                                              ; preds = %94, %91, %87
  br label %101

101:                                              ; preds = %100
  %102 = load i64, ptr %12, align 8, !tbaa !13
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %12, align 8, !tbaa !13
  br label %75, !llvm.loop !17

104:                                              ; preds = %75
  br label %105

105:                                              ; preds = %104
  %106 = load i64, ptr %11, align 8, !tbaa !13
  %107 = add nsw i64 %106, 1
  store i64 %107, ptr %11, align 8, !tbaa !13
  br label %69, !llvm.loop !19

108:                                              ; preds = %69
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %20, ptr noundef %109)
  %111 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %110, double noundef 5.000000e-01)
  br i1 %111, label %112, label %115

112:                                              ; preds = %108
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl15sparsecopytocrsEPNS_12sparsematrixES1_PNS_8ae_stateE(ptr noundef %16, ptr noundef %14, ptr noundef %113)
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparseconverttocrsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %15, ptr noundef %114)
  br label %118

115:                                              ; preds = %108
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl15sparsecopytosksEPNS_12sparsematrixES1_PNS_8ae_stateE(ptr noundef %16, ptr noundef %14, ptr noundef %116)
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparseconverttosksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %15, ptr noundef %117)
  br label %118

118:                                              ; preds = %115, %112
  store i64 0, ptr %11, align 8, !tbaa !13
  br label %119

119:                                              ; preds = %197, %118
  %120 = load i64, ptr %11, align 8, !tbaa !13
  %121 = load i64, ptr %5, align 8, !tbaa !13
  %122 = sub nsw i64 %121, 1
  %123 = icmp sle i64 %120, %122
  br i1 %123, label %124, label %200

124:                                              ; preds = %119
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %125

125:                                              ; preds = %193, %124
  %126 = load i64, ptr %12, align 8, !tbaa !13
  %127 = load i64, ptr %5, align 8, !tbaa !13
  %128 = sub nsw i64 %127, 1
  %129 = icmp sle i64 %126, %128
  br i1 %129, label %130, label %196

130:                                              ; preds = %125
  %131 = load i64, ptr %11, align 8, !tbaa !13
  %132 = load i64, ptr %12, align 8, !tbaa !13
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %16, i64 noundef %131, i64 noundef %132, ptr noundef %133)
  %135 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %136 = load ptr, ptr %135, align 8, !tbaa !20
  %137 = load i64, ptr %11, align 8, !tbaa !13
  %138 = getelementptr inbounds ptr, ptr %136, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = load i64, ptr %12, align 8, !tbaa !13
  %141 = getelementptr inbounds double, ptr %139, i64 %140
  %142 = load double, ptr %141, align 8, !tbaa !9
  %143 = fsub double %134, %142
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %143, ptr noundef %144)
  %146 = load double, ptr %17, align 8, !tbaa !9
  %147 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %145, double noundef %146)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %23, i1 noundef zeroext %147, ptr noundef @.str.8, i32 noundef 5884, ptr noundef @.str.139)
  %148 = load i64, ptr %11, align 8, !tbaa !13
  %149 = load i64, ptr %12, align 8, !tbaa !13
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %14, i64 noundef %148, i64 noundef %149, ptr noundef %150)
  %152 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %153 = load ptr, ptr %152, align 8, !tbaa !20
  %154 = load i64, ptr %11, align 8, !tbaa !13
  %155 = getelementptr inbounds ptr, ptr %153, i64 %154
  %156 = load ptr, ptr %155, align 8, !tbaa !5
  %157 = load i64, ptr %12, align 8, !tbaa !13
  %158 = getelementptr inbounds double, ptr %156, i64 %157
  %159 = load double, ptr %158, align 8, !tbaa !9
  %160 = fsub double %151, %159
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %160, ptr noundef %161)
  %163 = load double, ptr %17, align 8, !tbaa !9
  %164 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %162, double noundef %163)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %23, i1 noundef zeroext %164, ptr noundef @.str.8, i32 noundef 5885, ptr noundef @.str.140)
  %165 = load i64, ptr %12, align 8, !tbaa !13
  %166 = load i64, ptr %11, align 8, !tbaa !13
  %167 = icmp slt i64 %165, %166
  br i1 %167, label %168, label %177

168:                                              ; preds = %130
  %169 = load i64, ptr %22, align 8, !tbaa !13
  %170 = icmp eq i64 %169, 1
  br i1 %170, label %171, label %177

171:                                              ; preds = %168
  %172 = load i64, ptr %11, align 8, !tbaa !13
  %173 = load i64, ptr %12, align 8, !tbaa !13
  %174 = load ptr, ptr %3, align 8, !tbaa !5
  %175 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %14, i64 noundef %172, i64 noundef %173, ptr noundef %174)
  %176 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %175, double noundef 0.000000e+00)
  br label %177

177:                                              ; preds = %171, %168, %130
  %178 = phi i1 [ false, %168 ], [ false, %130 ], [ %176, %171 ]
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %23, i1 noundef zeroext %178, ptr noundef @.str.8, i32 noundef 5886, ptr noundef @.str.141)
  %179 = load i64, ptr %12, align 8, !tbaa !13
  %180 = load i64, ptr %11, align 8, !tbaa !13
  %181 = icmp sgt i64 %179, %180
  br i1 %181, label %182, label %191

182:                                              ; preds = %177
  %183 = load i64, ptr %22, align 8, !tbaa !13
  %184 = icmp eq i64 %183, -1
  br i1 %184, label %185, label %191

185:                                              ; preds = %182
  %186 = load i64, ptr %11, align 8, !tbaa !13
  %187 = load i64, ptr %12, align 8, !tbaa !13
  %188 = load ptr, ptr %3, align 8, !tbaa !5
  %189 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %14, i64 noundef %186, i64 noundef %187, ptr noundef %188)
  %190 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %189, double noundef 0.000000e+00)
  br label %191

191:                                              ; preds = %185, %182, %177
  %192 = phi i1 [ false, %182 ], [ false, %177 ], [ %190, %185 ]
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %23, i1 noundef zeroext %192, ptr noundef @.str.8, i32 noundef 5887, ptr noundef @.str.142)
  br label %193

193:                                              ; preds = %191
  %194 = load i64, ptr %12, align 8, !tbaa !13
  %195 = add nsw i64 %194, 1
  store i64 %195, ptr %12, align 8, !tbaa !13
  br label %125, !llvm.loop !21

196:                                              ; preds = %125
  br label %197

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

200:                                              ; preds = %119
  store i64 0, ptr %11, align 8, !tbaa !13
  br label %201

201:                                              ; preds = %247, %200
  %202 = load i64, ptr %11, align 8, !tbaa !13
  %203 = load i64, ptr %5, align 8, !tbaa !13
  %204 = sub nsw i64 %203, 1
  %205 = icmp sle i64 %202, %204
  br i1 %205, label %206, label %250

206:                                              ; preds = %201
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %207

207:                                              ; preds = %243, %206
  %208 = load i64, ptr %12, align 8, !tbaa !13
  %209 = load i64, ptr %5, align 8, !tbaa !13
  %210 = sub nsw i64 %209, 1
  %211 = icmp sle i64 %208, %210
  br i1 %211, label %212, label %246

212:                                              ; preds = %207
  %213 = load i64, ptr %12, align 8, !tbaa !13
  %214 = load i64, ptr %11, align 8, !tbaa !13
  %215 = icmp slt i64 %213, %214
  br i1 %215, label %216, label %219

216:                                              ; preds = %212
  %217 = load i8, ptr %21, align 1, !tbaa !11, !range !15, !noundef !16
  %218 = trunc i8 %217 to i1
  br i1 %218, label %226, label %219

219:                                              ; preds = %216, %212
  %220 = load i64, ptr %12, align 8, !tbaa !13
  %221 = load i64, ptr %11, align 8, !tbaa !13
  %222 = icmp sgt i64 %220, %221
  br i1 %222, label %223, label %242

223:                                              ; preds = %219
  %224 = load i8, ptr %21, align 1, !tbaa !11, !range !15, !noundef !16
  %225 = trunc i8 %224 to i1
  br i1 %225, label %242, label %226

226:                                              ; preds = %223, %216
  %227 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %228 = load ptr, ptr %227, align 8, !tbaa !20
  %229 = load i64, ptr %12, align 8, !tbaa !13
  %230 = getelementptr inbounds ptr, ptr %228, i64 %229
  %231 = load ptr, ptr %230, align 8, !tbaa !5
  %232 = load i64, ptr %11, align 8, !tbaa !13
  %233 = getelementptr inbounds double, ptr %231, i64 %232
  %234 = load double, ptr %233, align 8, !tbaa !9
  %235 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %236 = load ptr, ptr %235, align 8, !tbaa !20
  %237 = load i64, ptr %11, align 8, !tbaa !13
  %238 = getelementptr inbounds ptr, ptr %236, i64 %237
  %239 = load ptr, ptr %238, align 8, !tbaa !5
  %240 = load i64, ptr %12, align 8, !tbaa !13
  %241 = getelementptr inbounds double, ptr %239, i64 %240
  store double %234, ptr %241, align 8, !tbaa !9
  br label %242

242:                                              ; preds = %226, %223, %219
  br label %243

243:                                              ; preds = %242
  %244 = load i64, ptr %12, align 8, !tbaa !13
  %245 = add nsw i64 %244, 1
  store i64 %245, ptr %12, align 8, !tbaa !13
  br label %207, !llvm.loop !23

246:                                              ; preds = %207
  br label %247

247:                                              ; preds = %246
  %248 = load i64, ptr %11, align 8, !tbaa !13
  %249 = add nsw i64 %248, 1
  store i64 %249, ptr %11, align 8, !tbaa !13
  br label %201, !llvm.loop !24

250:                                              ; preds = %201
  %251 = load i64, ptr %5, align 8, !tbaa !13
  %252 = load i64, ptr %6, align 8, !tbaa !13
  %253 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %7, i64 noundef %251, i64 noundef %252, ptr noundef %253)
  %254 = load i64, ptr %5, align 8, !tbaa !13
  %255 = load i64, ptr %6, align 8, !tbaa !13
  %256 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %8, i64 noundef %254, i64 noundef %255, ptr noundef %256)
  store i64 0, ptr %11, align 8, !tbaa !13
  br label %257

257:                                              ; preds = %298, %250
  %258 = load i64, ptr %11, align 8, !tbaa !13
  %259 = load i64, ptr %5, align 8, !tbaa !13
  %260 = sub nsw i64 %259, 1
  %261 = icmp sle i64 %258, %260
  br i1 %261, label %262, label %301

262:                                              ; preds = %257
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %263

263:                                              ; preds = %294, %262
  %264 = load i64, ptr %12, align 8, !tbaa !13
  %265 = load i64, ptr %6, align 8, !tbaa !13
  %266 = sub nsw i64 %265, 1
  %267 = icmp sle i64 %264, %266
  br i1 %267, label %268, label %297

268:                                              ; preds = %263
  %269 = load ptr, ptr %3, align 8, !tbaa !5
  %270 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %20, ptr noundef %269)
  %271 = fsub double %270, 5.000000e-01
  %272 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %7, i32 0, i32 6
  %273 = load ptr, ptr %272, align 8, !tbaa !20
  %274 = load i64, ptr %11, align 8, !tbaa !13
  %275 = getelementptr inbounds ptr, ptr %273, i64 %274
  %276 = load ptr, ptr %275, align 8, !tbaa !5
  %277 = load i64, ptr %12, align 8, !tbaa !13
  %278 = getelementptr inbounds double, ptr %276, i64 %277
  store double %271, ptr %278, align 8, !tbaa !9
  %279 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %7, i32 0, i32 6
  %280 = load ptr, ptr %279, align 8, !tbaa !20
  %281 = load i64, ptr %11, align 8, !tbaa !13
  %282 = getelementptr inbounds ptr, ptr %280, i64 %281
  %283 = load ptr, ptr %282, align 8, !tbaa !5
  %284 = load i64, ptr %12, align 8, !tbaa !13
  %285 = getelementptr inbounds double, ptr %283, i64 %284
  %286 = load double, ptr %285, align 8, !tbaa !9
  %287 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %8, i32 0, i32 6
  %288 = load ptr, ptr %287, align 8, !tbaa !20
  %289 = load i64, ptr %11, align 8, !tbaa !13
  %290 = getelementptr inbounds ptr, ptr %288, i64 %289
  %291 = load ptr, ptr %290, align 8, !tbaa !5
  %292 = load i64, ptr %12, align 8, !tbaa !13
  %293 = getelementptr inbounds double, ptr %291, i64 %292
  store double %286, ptr %293, align 8, !tbaa !9
  br label %294

294:                                              ; preds = %268
  %295 = load i64, ptr %12, align 8, !tbaa !13
  %296 = add nsw i64 %295, 1
  store i64 %296, ptr %12, align 8, !tbaa !13
  br label %263, !llvm.loop !25

297:                                              ; preds = %263
  br label %298

298:                                              ; preds = %297
  %299 = load i64, ptr %11, align 8, !tbaa !13
  %300 = add nsw i64 %299, 1
  store i64 %300, ptr %11, align 8, !tbaa !13
  br label %257, !llvm.loop !26

301:                                              ; preds = %257
  %302 = load i8, ptr %21, align 1, !tbaa !11, !range !15, !noundef !16
  %303 = trunc i8 %302 to i1
  %304 = load i64, ptr %6, align 8, !tbaa !13
  %305 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl9sparsesmmEPNS_12sparsematrixEbPNS_9ae_matrixElS3_PNS_8ae_stateE(ptr noundef %14, i1 noundef zeroext %303, ptr noundef %7, i64 noundef %304, ptr noundef %9, ptr noundef %305)
  %306 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %9, i32 0, i32 0
  %307 = load i64, ptr %306, align 8, !tbaa !27
  %308 = load i64, ptr %5, align 8, !tbaa !13
  %309 = icmp slt i64 %307, %308
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %23, i1 noundef zeroext %309, ptr noundef @.str.8, i32 noundef 5920, ptr noundef @.str.143)
  %310 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %9, i32 0, i32 1
  %311 = load i64, ptr %310, align 8, !tbaa !30
  %312 = load i64, ptr %6, align 8, !tbaa !13
  %313 = icmp slt i64 %311, %312
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %23, i1 noundef zeroext %313, ptr noundef @.str.8, i32 noundef 5921, ptr noundef @.str.144)
  %314 = load i8, ptr %23, align 1, !tbaa !11, !range !15, !noundef !16
  %315 = trunc i8 %314 to i1
  br i1 %315, label %316, label %320

316:                                              ; preds = %301
  %317 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %317)
  %318 = load i8, ptr %23, align 1, !tbaa !11, !range !15, !noundef !16
  %319 = trunc i8 %318 to i1
  store i1 %319, ptr %2, align 1
  store i32 1, ptr %24, align 4
  br label %385

320:                                              ; preds = %301
  store i64 0, ptr %11, align 8, !tbaa !13
  br label %321

321:                                              ; preds = %369, %320
  %322 = load i64, ptr %11, align 8, !tbaa !13
  %323 = load i64, ptr %5, align 8, !tbaa !13
  %324 = sub nsw i64 %323, 1
  %325 = icmp sle i64 %322, %324
  br i1 %325, label %326, label %372

326:                                              ; preds = %321
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %327

327:                                              ; preds = %365, %326
  %328 = load i64, ptr %12, align 8, !tbaa !13
  %329 = load i64, ptr %6, align 8, !tbaa !13
  %330 = sub nsw i64 %329, 1
  %331 = icmp sle i64 %328, %330
  br i1 %331, label %332, label %368

332:                                              ; preds = %327
  %333 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %334 = load ptr, ptr %333, align 8, !tbaa !20
  %335 = load i64, ptr %11, align 8, !tbaa !13
  %336 = getelementptr inbounds ptr, ptr %334, i64 %335
  %337 = load ptr, ptr %336, align 8, !tbaa !5
  %338 = getelementptr inbounds double, ptr %337, i64 0
  %339 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %8, i32 0, i32 6
  %340 = load ptr, ptr %339, align 8, !tbaa !20
  %341 = getelementptr inbounds ptr, ptr %340, i64 0
  %342 = load ptr, ptr %341, align 8, !tbaa !5
  %343 = load i64, ptr %12, align 8, !tbaa !13
  %344 = getelementptr inbounds double, ptr %342, i64 %343
  %345 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %8, i32 0, i32 2
  %346 = load i64, ptr %345, align 8, !tbaa !31
  %347 = load i64, ptr %5, align 8, !tbaa !13
  %348 = sub nsw i64 %347, 1
  %349 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %348)
  %350 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %338, i64 noundef 1, ptr noundef %344, i64 noundef %346, i64 noundef %349)
  store double %350, ptr %18, align 8, !tbaa !9
  %351 = load double, ptr %18, align 8, !tbaa !9
  %352 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %9, i32 0, i32 6
  %353 = load ptr, ptr %352, align 8, !tbaa !20
  %354 = load i64, ptr %11, align 8, !tbaa !13
  %355 = getelementptr inbounds ptr, ptr %353, i64 %354
  %356 = load ptr, ptr %355, align 8, !tbaa !5
  %357 = load i64, ptr %12, align 8, !tbaa !13
  %358 = getelementptr inbounds double, ptr %356, i64 %357
  %359 = load double, ptr %358, align 8, !tbaa !9
  %360 = fsub double %351, %359
  %361 = load ptr, ptr %3, align 8, !tbaa !5
  %362 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %360, ptr noundef %361)
  %363 = load double, ptr %17, align 8, !tbaa !9
  %364 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %362, double noundef %363)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %23, i1 noundef zeroext %364, ptr noundef @.str.8, i32 noundef 5932, ptr noundef @.str.145)
  br label %365

365:                                              ; preds = %332
  %366 = load i64, ptr %12, align 8, !tbaa !13
  %367 = add nsw i64 %366, 1
  store i64 %367, ptr %12, align 8, !tbaa !13
  br label %327, !llvm.loop !32

368:                                              ; preds = %327
  br label %369

369:                                              ; preds = %368
  %370 = load i64, ptr %11, align 8, !tbaa !13
  %371 = add nsw i64 %370, 1
  store i64 %371, ptr %11, align 8, !tbaa !13
  br label %321, !llvm.loop !33

372:                                              ; preds = %321
  br label %61, !llvm.loop !34

373:                                              ; preds = %61
  br label %374

374:                                              ; preds = %373
  %375 = load i64, ptr %22, align 8, !tbaa !13
  %376 = add nsw i64 %375, 1
  store i64 %376, ptr %22, align 8, !tbaa !13
  br label %41, !llvm.loop !35

377:                                              ; preds = %41
  br label %378

378:                                              ; preds = %377
  %379 = load i64, ptr %5, align 8, !tbaa !13
  %380 = add nsw i64 %379, 1
  store i64 %380, ptr %5, align 8, !tbaa !13
  br label %37, !llvm.loop !36

381:                                              ; preds = %37
  %382 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %382)
  %383 = load i8, ptr %23, align 1, !tbaa !11, !range !15, !noundef !16
  %384 = trunc i8 %383 to i1
  store i1 %384, ptr %2, align 1
  store i32 1, ptr %24, align 4
  br label %385

385:                                              ; preds = %381, %316
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 400, ptr %19) #4
  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 368, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 368, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 368, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 80, 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 80, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #4
  %386 = load i1, ptr %2, align 1
  ret i1 %386
}

declare void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #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 void @_ZN11alglib_impl15sparsecopytocrsEPNS_12sparsematrixES1_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z21_sparsegenerator_initPvPN11alglib_impl8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #3

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

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

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

declare void @_ZN11alglib_impl9sparsesmmEPNS_12sparsematrixEbPNS_9ae_matrixElS3_PNS_8ae_stateE(ptr noundef, i1 noundef zeroext, ptr noundef, i64 noundef, ptr 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !18}
!23 = distinct !{!23, !18}
!24 = distinct !{!24, !18}
!25 = distinct !{!25, !18}
!26 = distinct !{!26, !18}
!27 = !{!28, !14, i64 0}
!28 = !{!"_ZTSN11alglib_impl9ae_matrixE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !12, i64 32, !29, i64 40, !7, i64 72}
!29 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!30 = !{!28, !14, i64 8}
!31 = !{!28, !14, i64 16}
!32 = distinct !{!32, !18}
!33 = distinct !{!33, !18}
!34 = distinct !{!34, !18}
!35 = distinct !{!35, !18}
!36 = distinct !{!36, !18}


; 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 }
%"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.sparsegenerator = type { i64, i64, i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::hqrndstate", %"struct.alglib_impl::rcommstate" }
%"struct.alglib_impl::hqrndstate" = type { i64, i64, i64 }
%"struct.alglib_impl::rcommstate" = type { i32, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }

@.str.8 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [23 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_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

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

declare noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #1

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

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double 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

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z19testlevel3symmetricPN11alglib_impl8ae_stateE(ptr noundef %0) local_unnamed_addr #3 {
  %2 = alloca %"struct.alglib_impl::ae_frame", align 8
  %3 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %4 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %5 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %6 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %7 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %8 = alloca %"struct.alglib_impl::sparsematrix", align 8
  %9 = alloca %"struct.alglib_impl::sparsematrix", align 8
  %10 = alloca %"struct.alglib_impl::sparsematrix", align 8
  %11 = alloca %struct.sparsegenerator, align 8
  %12 = alloca %"struct.alglib_impl::hqrndstate", align 8
  %13 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 368, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 368, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 368, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #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(80) %3, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %4, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %5, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %6, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %7, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(368) %8, i8 0, i64 368, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(368) %9, i8 0, i64 368, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(368) %10, i8 0, i64 368, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(400) %11, i8 0, i64 400, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %12, i8 0, i64 24, i1 false)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %3, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %0, i1 noundef zeroext true)
  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 %0, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %5, i64 noundef 0, i64 noundef 0, i64 noundef 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)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %7, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %0, i1 noundef zeroext true)
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef nonnull %8, ptr noundef %0, i1 noundef zeroext true)
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef nonnull %9, ptr noundef %0, i1 noundef zeroext true)
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef nonnull %10, ptr noundef %0, i1 noundef zeroext true)
  call void @_Z21_sparsegenerator_initPvPN11alglib_impl8ae_stateEb(ptr noundef nonnull %11, ptr noundef %0, i1 noundef zeroext true)
  call void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef nonnull %12, ptr noundef %0, i1 noundef zeroext true)
  store i8 0, ptr %13, align 1, !tbaa !5
  call void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %12, ptr noundef %0)
  %14 = getelementptr inbounds i8, ptr %7, i64 72
  %15 = getelementptr inbounds i8, ptr %3, i64 72
  %16 = getelementptr inbounds i8, ptr %4, i64 72
  %17 = getelementptr inbounds i8, ptr %5, i64 8
  %18 = getelementptr inbounds i8, ptr %4, i64 16
  %19 = getelementptr inbounds i8, ptr %5, i64 72
  br label %.preheader176

.preheader176:                                    ; preds = %1, %163
  %indvar = phi i64 [ 0, %1 ], [ %indvar.next, %163 ]
  %.0140195 = phi i64 [ 1, %1 ], [ %164, %163 ]
  %20 = add nsw i64 %.0140195, -1
  %xtraiter = and i64 %.0140195, 1
  %21 = icmp eq i64 %indvar, 0
  %unroll_iter = and i64 %.0140195, 9223372036854775806
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %22

22:                                               ; preds = %.preheader176, %._crit_edge193
  %.0194 = phi i64 [ -1, %.preheader176 ], [ %162, %._crit_edge193 ]
  %23 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %12, ptr noundef %0)
  %24 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %23, double noundef 5.000000e-01)
  %25 = icmp sgt i64 %.0194, -1
  %narrow = and i1 %25, %24
  %26 = icmp eq i64 %.0194, 1
  %narrow149 = or i1 %26, %narrow
  call void @_ZL28testsparseunit_initgeneratorllllP15sparsegeneratorPN11alglib_impl8ae_stateE(i64 noundef %.0140195, i64 noundef %.0140195, i64 noundef 0, i64 noundef %.0194, ptr noundef nonnull %11, ptr noundef %0)
  %27 = call noundef zeroext i1 @_ZL27testsparseunit_generatenextP15sparsegeneratorPN11alglib_impl9ae_matrixEPNS1_12sparsematrixEPNS1_8ae_stateE(ptr noundef nonnull %11, ptr noundef nonnull %7, ptr noundef nonnull %10, ptr noundef %0)
  br i1 %27, label %.lr.ph, label %._crit_edge193

.lr.ph:                                           ; preds = %22
  %28 = icmp eq i64 %.0194, -1
  br label %30

.loopexit:                                        ; preds = %._crit_edge190, %.preheader174
  %29 = call noundef zeroext i1 @_ZL27testsparseunit_generatenextP15sparsegeneratorPN11alglib_impl9ae_matrixEPNS1_12sparsematrixEPNS1_8ae_stateE(ptr noundef nonnull %11, ptr noundef nonnull %7, ptr noundef nonnull %10, ptr noundef %0)
  br i1 %29, label %30, label %._crit_edge193, !llvm.loop !9

30:                                               ; preds = %.lr.ph, %.loopexit
  %31 = call noundef i64 @_ZN11alglib_impl13hqrnduniformiEPNS_10hqrndstateElPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef 20, ptr noundef %0)
  call void @_ZN11alglib_impl16sparsecopytohashEPNS_12sparsematrixES1_PNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %9, ptr noundef %0)
  br label %.preheader173

.preheader173:                                    ; preds = %30, %39
  %.0142178 = phi i64 [ 0, %30 ], [ %40, %39 ]
  br label %32

32:                                               ; preds = %.preheader173, %37
  %.0141177 = phi i64 [ 0, %.preheader173 ], [ %38, %37 ]
  %33 = icmp uge i64 %.0141177, %.0142178
  %34 = icmp ule i64 %.0141177, %.0142178
  %or.cond168 = select i1 %narrow149, i1 %33, i1 %34
  br i1 %or.cond168, label %37, label %35

35:                                               ; preds = %32
  %36 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %12, ptr noundef %0)
  call void @_ZN11alglib_impl9sparsesetEPNS_12sparsematrixElldPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %.0142178, i64 noundef %.0141177, double noundef %36, ptr noundef %0)
  br label %37

37:                                               ; preds = %32, %35
  %38 = add nuw nsw i64 %.0141177, 1
  %exitcond.not = icmp eq i64 %38, %.0140195
  br i1 %exitcond.not, label %39, label %32, !llvm.loop !11

39:                                               ; preds = %37
  %40 = add nuw nsw i64 %.0142178, 1
  %exitcond199.not = icmp eq i64 %40, %.0140195
  br i1 %exitcond199.not, label %41, label %.preheader173, !llvm.loop !12

41:                                               ; preds = %39
  %42 = add i64 %31, 1
  %43 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %12, ptr noundef %0)
  %44 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %43, double noundef 5.000000e-01)
  br i1 %44, label %45, label %46

45:                                               ; preds = %41
  call void @_ZN11alglib_impl15sparsecopytocrsEPNS_12sparsematrixES1_PNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %8, ptr noundef %0)
  call void @_ZN11alglib_impl18sparseconverttocrsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %9, ptr noundef %0)
  br label %.preheader172.preheader

46:                                               ; preds = %41
  call void @_ZN11alglib_impl15sparsecopytosksEPNS_12sparsematrixES1_PNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %8, ptr noundef %0)
  call void @_ZN11alglib_impl18sparseconverttosksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %9, ptr noundef %0)
  br label %.preheader172.preheader

.preheader172.preheader:                          ; preds = %46, %45
  br label %.preheader172

.preheader172:                                    ; preds = %.preheader172.preheader, %77
  %.1143180 = phi i64 [ %78, %77 ], [ 0, %.preheader172.preheader ]
  br label %47

47:                                               ; preds = %.preheader172, %74
  %.1179 = phi i64 [ 0, %.preheader172 ], [ %76, %74 ]
  %48 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %.1143180, i64 noundef %.1179, ptr noundef %0)
  %49 = load ptr, ptr %14, align 8, !tbaa !13
  %50 = getelementptr inbounds ptr, ptr %49, i64 %.1143180
  %51 = load ptr, ptr %50, align 8, !tbaa !14
  %52 = getelementptr inbounds double, ptr %51, i64 %.1179
  %53 = load double, ptr %52, align 8, !tbaa !16
  %54 = fsub double %48, %53
  %55 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %54, ptr noundef %0)
  %56 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %55, double noundef 0x3D95FD7FE1796496)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %13, i1 noundef zeroext %56, ptr noundef nonnull @.str.8, i32 noundef 5884, ptr noundef nonnull @.str.139)
  %57 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %.1143180, i64 noundef %.1179, ptr noundef %0)
  %58 = load ptr, ptr %14, align 8, !tbaa !13
  %59 = getelementptr inbounds ptr, ptr %58, i64 %.1143180
  %60 = load ptr, ptr %59, align 8, !tbaa !14
  %61 = getelementptr inbounds double, ptr %60, i64 %.1179
  %62 = load double, ptr %61, align 8, !tbaa !16
  %63 = fsub double %57, %62
  %64 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %63, ptr noundef %0)
  %65 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %64, double noundef 0x3D95FD7FE1796496)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %13, i1 noundef zeroext %65, ptr noundef nonnull @.str.8, i32 noundef 5885, ptr noundef nonnull @.str.140)
  %66 = icmp ult i64 %.1179, %.1143180
  %or.cond = and i1 %26, %66
  br i1 %or.cond, label %.thread, label %69

.thread:                                          ; preds = %47
  %67 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %.1143180, i64 noundef %.1179, ptr noundef %0)
  %68 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %67, double noundef 0.000000e+00)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %13, i1 noundef zeroext %68, ptr noundef nonnull @.str.8, i32 noundef 5886, ptr noundef nonnull @.str.141)
  br label %74

69:                                               ; preds = %47
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %13, i1 noundef zeroext false, ptr noundef nonnull @.str.8, i32 noundef 5886, ptr noundef nonnull @.str.141)
  %70 = icmp ugt i64 %.1179, %.1143180
  %or.cond3 = and i1 %28, %70
  br i1 %or.cond3, label %71, label %74

71:                                               ; preds = %69
  %72 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %.1143180, i64 noundef %.1179, ptr noundef %0)
  %73 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %72, double noundef 0.000000e+00)
  br label %74

74:                                               ; preds = %.thread, %71, %69
  %75 = phi i1 [ false, %69 ], [ %73, %71 ], [ false, %.thread ]
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %13, i1 noundef zeroext %75, ptr noundef nonnull @.str.8, i32 noundef 5887, ptr noundef nonnull @.str.142)
  %76 = add nuw nsw i64 %.1179, 1
  %exitcond200.not = icmp eq i64 %76, %.0140195
  br i1 %exitcond200.not, label %77, label %47, !llvm.loop !18

77:                                               ; preds = %74
  %78 = add nuw nsw i64 %.1143180, 1
  %exitcond201.not = icmp eq i64 %78, %.0140195
  br i1 %exitcond201.not, label %.preheader171, label %.preheader172, !llvm.loop !19

.preheader171:                                    ; preds = %77, %.epilog-lcssa
  %.2144182 = phi i64 [ %116, %.epilog-lcssa ], [ 0, %77 ]
  br i1 %21, label %.unr-lcssa, label %.preheader171.new

.preheader171.new:                                ; preds = %.preheader171, %103
  %.2181 = phi i64 [ %104, %103 ], [ 0, %.preheader171 ]
  %niter = phi i64 [ %niter.next.1, %103 ], [ 0, %.preheader171 ]
  %79 = icmp uge i64 %.2181, %.2144182
  %80 = icmp ule i64 %.2181, %.2144182
  %or.cond169 = select i1 %narrow149, i1 %79, i1 %80
  br i1 %or.cond169, label %90, label %81

81:                                               ; preds = %.preheader171.new
  %82 = load ptr, ptr %14, align 8, !tbaa !13
  %83 = getelementptr inbounds ptr, ptr %82, i64 %.2181
  %84 = load ptr, ptr %83, align 8, !tbaa !14
  %85 = getelementptr inbounds double, ptr %84, i64 %.2144182
  %86 = load double, ptr %85, align 8, !tbaa !16
  %87 = getelementptr inbounds ptr, ptr %82, i64 %.2144182
  %88 = load ptr, ptr %87, align 8, !tbaa !14
  %89 = getelementptr inbounds double, ptr %88, i64 %.2181
  store double %86, ptr %89, align 8, !tbaa !16
  br label %90

90:                                               ; preds = %.preheader171.new, %81
  %91 = or disjoint i64 %.2181, 1
  %92 = icmp uge i64 %91, %.2144182
  %93 = icmp ult i64 %.2181, %.2144182
  %or.cond169.1 = select i1 %narrow149, i1 %92, i1 %93
  br i1 %or.cond169.1, label %103, label %94

94:                                               ; preds = %90
  %95 = load ptr, ptr %14, align 8, !tbaa !13
  %96 = getelementptr inbounds ptr, ptr %95, i64 %91
  %97 = load ptr, ptr %96, align 8, !tbaa !14
  %98 = getelementptr inbounds double, ptr %97, i64 %.2144182
  %99 = load double, ptr %98, align 8, !tbaa !16
  %100 = getelementptr inbounds ptr, ptr %95, i64 %.2144182
  %101 = load ptr, ptr %100, align 8, !tbaa !14
  %102 = getelementptr inbounds double, ptr %101, i64 %91
  store double %99, ptr %102, align 8, !tbaa !16
  br label %103

103:                                              ; preds = %94, %90
  %104 = add nuw nsw i64 %.2181, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.unr-lcssa, label %.preheader171.new, !llvm.loop !20

.unr-lcssa:                                       ; preds = %103, %.preheader171
  %.2181.unr = phi i64 [ 0, %.preheader171 ], [ %104, %103 ]
  br i1 %lcmp.mod.not, label %.epilog-lcssa, label %.epil.preheader

.epil.preheader:                                  ; preds = %.unr-lcssa
  %105 = icmp uge i64 %.2181.unr, %.2144182
  %106 = icmp ule i64 %.2181.unr, %.2144182
  %or.cond169.epil = select i1 %narrow149, i1 %105, i1 %106
  br i1 %or.cond169.epil, label %.epilog-lcssa, label %107

107:                                              ; preds = %.epil.preheader
  %108 = load ptr, ptr %14, align 8, !tbaa !13
  %109 = getelementptr inbounds ptr, ptr %108, i64 %.2181.unr
  %110 = load ptr, ptr %109, align 8, !tbaa !14
  %111 = getelementptr inbounds double, ptr %110, i64 %.2144182
  %112 = load double, ptr %111, align 8, !tbaa !16
  %113 = getelementptr inbounds ptr, ptr %108, i64 %.2144182
  %114 = load ptr, ptr %113, align 8, !tbaa !14
  %115 = getelementptr inbounds double, ptr %114, i64 %.2181.unr
  store double %112, ptr %115, align 8, !tbaa !16
  br label %.epilog-lcssa

.epilog-lcssa:                                    ; preds = %.epil.preheader, %107, %.unr-lcssa
  %116 = add nuw nsw i64 %.2144182, 1
  %exitcond203.not = icmp eq i64 %116, %.0140195
  br i1 %exitcond203.not, label %117, label %.preheader171, !llvm.loop !21

117:                                              ; preds = %.epilog-lcssa
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %.0140195, i64 noundef %42, ptr noundef %0)
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef %.0140195, i64 noundef %42, ptr noundef %0)
  %.not154183 = icmp slt i64 %31, 0
  br i1 %.not154183, label %.split187.us, label %.preheader170

.preheader170:                                    ; preds = %117, %._crit_edge
  %.3145185 = phi i64 [ %135, %._crit_edge ], [ 0, %117 ]
  br label %118

118:                                              ; preds = %.preheader170, %118
  %.3184 = phi i64 [ 0, %.preheader170 ], [ %134, %118 ]
  %119 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %12, ptr noundef %0)
  %120 = fadd double %119, -5.000000e-01
  %121 = load ptr, ptr %15, align 8, !tbaa !13
  %122 = getelementptr inbounds ptr, ptr %121, i64 %.3145185
  %123 = load ptr, ptr %122, align 8, !tbaa !14
  %124 = getelementptr inbounds double, ptr %123, i64 %.3184
  store double %120, ptr %124, align 8, !tbaa !16
  %125 = load ptr, ptr %15, align 8, !tbaa !13
  %126 = getelementptr inbounds ptr, ptr %125, i64 %.3145185
  %127 = load ptr, ptr %126, align 8, !tbaa !14
  %128 = getelementptr inbounds double, ptr %127, i64 %.3184
  %129 = load double, ptr %128, align 8, !tbaa !16
  %130 = load ptr, ptr %16, align 8, !tbaa !13
  %131 = getelementptr inbounds ptr, ptr %130, i64 %.3145185
  %132 = load ptr, ptr %131, align 8, !tbaa !14
  %133 = getelementptr inbounds double, ptr %132, i64 %.3184
  store double %129, ptr %133, align 8, !tbaa !16
  %134 = add nuw i64 %.3184, 1
  %exitcond204.not = icmp eq i64 %.3184, %31
  br i1 %exitcond204.not, label %._crit_edge, label %118, !llvm.loop !22

._crit_edge:                                      ; preds = %118
  %135 = add nuw nsw i64 %.3145185, 1
  %exitcond205.not = icmp eq i64 %135, %.0140195
  br i1 %exitcond205.not, label %.split187.us, label %.preheader170, !llvm.loop !23

.split187.us:                                     ; preds = %._crit_edge, %117
  call void @_ZN11alglib_impl9sparsesmmEPNS_12sparsematrixEbPNS_9ae_matrixElS3_PNS_8ae_stateE(ptr noundef nonnull %8, i1 noundef zeroext %narrow149, ptr noundef nonnull %3, i64 noundef %42, ptr noundef nonnull %5, ptr noundef %0)
  %136 = load i64, ptr %5, align 8, !tbaa !24
  %137 = icmp slt i64 %136, %.0140195
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %13, i1 noundef zeroext %137, ptr noundef nonnull @.str.8, i32 noundef 5920, ptr noundef nonnull @.str.143)
  %138 = load i64, ptr %17, align 8, !tbaa !28
  %139 = icmp sle i64 %138, %31
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %13, i1 noundef zeroext %139, ptr noundef nonnull @.str.8, i32 noundef 5921, ptr noundef nonnull @.str.144)
  %140 = load i8, ptr %13, align 1, !tbaa !5, !range !29, !noundef !30
  %141 = trunc nuw i8 %140 to i1
  br i1 %141, label %.loopexit211, label %.preheader174

.preheader174:                                    ; preds = %.split187.us
  br i1 %.not154183, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %.preheader174, %._crit_edge190
  %.4146191 = phi i64 [ %161, %._crit_edge190 ], [ 0, %.preheader174 ]
  br label %142

142:                                              ; preds = %.preheader, %142
  %.4189 = phi i64 [ 0, %.preheader ], [ %160, %142 ]
  %143 = load ptr, ptr %14, align 8, !tbaa !13
  %144 = getelementptr inbounds ptr, ptr %143, i64 %.4146191
  %145 = load ptr, ptr %144, align 8, !tbaa !14
  %146 = load ptr, ptr %16, align 8, !tbaa !13
  %147 = load ptr, ptr %146, align 8, !tbaa !14
  %148 = getelementptr inbounds double, ptr %147, i64 %.4189
  %149 = load i64, ptr %18, align 8, !tbaa !31
  %150 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %20)
  %151 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %145, i64 noundef 1, ptr noundef %148, i64 noundef %149, i64 noundef %150)
  %152 = load ptr, ptr %19, align 8, !tbaa !13
  %153 = getelementptr inbounds ptr, ptr %152, i64 %.4146191
  %154 = load ptr, ptr %153, align 8, !tbaa !14
  %155 = getelementptr inbounds double, ptr %154, i64 %.4189
  %156 = load double, ptr %155, align 8, !tbaa !16
  %157 = fsub double %151, %156
  %158 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %157, ptr noundef %0)
  %159 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %158, double noundef 0x3D95FD7FE1796496)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %13, i1 noundef zeroext %159, ptr noundef nonnull @.str.8, i32 noundef 5932, ptr noundef nonnull @.str.145)
  %160 = add nuw i64 %.4189, 1
  %exitcond206.not = icmp eq i64 %.4189, %31
  br i1 %exitcond206.not, label %._crit_edge190, label %142, !llvm.loop !32

._crit_edge190:                                   ; preds = %142
  %161 = add nuw nsw i64 %.4146191, 1
  %exitcond207.not = icmp eq i64 %161, %.0140195
  br i1 %exitcond207.not, label %.loopexit, label %.preheader, !llvm.loop !33

._crit_edge193:                                   ; preds = %.loopexit, %22
  %162 = add nsw i64 %.0194, 1
  %exitcond208.not = icmp eq i64 %162, 2
  br i1 %exitcond208.not, label %163, label %22, !llvm.loop !34

163:                                              ; preds = %._crit_edge193
  %164 = add nuw nsw i64 %.0140195, 1
  %exitcond209.not = icmp eq i64 %164, 21
  %indvar.next = add i64 %indvar, 1
  br i1 %exitcond209.not, label %.loopexit211, label %.preheader176, !llvm.loop !35

.loopexit211:                                     ; preds = %163, %.split187.us
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %0)
  %.0139.in = load i8, ptr %13, align 1, !tbaa !5, !range !29, !noundef !30
  %.0139 = trunc nuw i8 %.0139.in to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 368, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 368, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 368, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  ret i1 %.0139
}

declare void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) 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 void @_ZN11alglib_impl15sparsecopytocrsEPNS_12sparsematrixES1_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl16sparsecopytohashEPNS_12sparsematrixES1_PNS_8ae_stateE(ptr noundef, ptr 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 void @_ZN11alglib_impl18sparseconverttosksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z21_sparsegenerator_initPvPN11alglib_impl8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

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

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

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

declare void @_ZN11alglib_impl9sparsesmmEPNS_12sparsematrixEbPNS_9ae_matrixElS3_PNS_8ae_stateE(ptr noundef, i1 noundef zeroext, ptr noundef, i64 noundef, ptr 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!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, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = !{!25, !26, i64 0}
!25 = !{!"_ZTSN11alglib_impl9ae_matrixE", !26, i64 0, !26, i64 8, !26, i64 16, !26, i64 24, !6, i64 32, !27, i64 40, !7, i64 72}
!26 = !{!"long", !7, i64 0}
!27 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!28 = !{!25, !26, i64 8}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!25, !26, i64 16}
!32 = distinct !{!32, !10}
!33 = distinct !{!33, !10}
!34 = distinct !{!34, !10}
!35 = distinct !{!35, !10}


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