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

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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_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 }
%"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.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.105 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.114 = 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 void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #1

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #1

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

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_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #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 @_Z21testlevel2unsymmetricPN11alglib_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_vector", align 8
  %8 = alloca %"struct.alglib_impl::ae_vector", align 8
  %9 = alloca %"struct.alglib_impl::ae_vector", align 8
  %10 = alloca %"struct.alglib_impl::ae_vector", 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 double, align 8
  %17 = alloca double, align 8
  %18 = alloca %struct.sparsegenerator, align 8
  %19 = alloca %"struct.alglib_impl::hqrndstate", align 8
  %20 = alloca i8, align 1
  %21 = 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 64, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 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 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 400, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #4
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %22, ptr noundef %4)
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %8, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 64, 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 %18, i8 0, i64 400, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 24, i1 false)
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %7, i64 noundef 0, i64 noundef 3, ptr noundef %23, i1 noundef zeroext true)
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %8, i64 noundef 0, i64 noundef 3, ptr noundef %24, i1 noundef zeroext true)
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %9, i64 noundef 0, i64 noundef 3, ptr noundef %25, i1 noundef zeroext true)
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %10, 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 %13, 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_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef %14, ptr noundef %28, i1 noundef zeroext true)
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef %15, ptr noundef %29, i1 noundef zeroext true)
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_Z21_sparsegenerator_initPvPN11alglib_impl8ae_stateEb(ptr noundef %18, ptr noundef %30, i1 noundef zeroext true)
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef %19, ptr noundef %31, i1 noundef zeroext true)
  store double 0x3D95FD7FE1796496, ptr %16, align 8, !tbaa !9
  store i8 0, ptr %20, align 1, !tbaa !11
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %19, ptr noundef %32)
  store i64 1, ptr %5, align 8, !tbaa !13
  br label %33

33:                                               ; preds = %384, %1
  %34 = load i64, ptr %5, align 8, !tbaa !13
  %35 = icmp sle i64 %34, 20
  br i1 %35, label %36, label %387

36:                                               ; preds = %33
  store i64 1, ptr %6, align 8, !tbaa !13
  br label %37

37:                                               ; preds = %380, %36
  %38 = load i64, ptr %6, align 8, !tbaa !13
  %39 = icmp sle i64 %38, 20
  br i1 %39, label %40, label %383

40:                                               ; preds = %37
  %41 = load i64, ptr %5, align 8, !tbaa !13
  %42 = load i64, ptr %6, align 8, !tbaa !13
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZL28testsparseunit_initgeneratorllllP15sparsegeneratorPN11alglib_impl8ae_stateE(i64 noundef %41, i64 noundef %42, i64 noundef 0, i64 noundef 0, ptr noundef %18, ptr noundef %43)
  br label %44

44:                                               ; preds = %378, %40
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = call noundef zeroext i1 @_ZL27testsparseunit_generatenextP15sparsegeneratorPN11alglib_impl9ae_matrixEPNS1_12sparsematrixEPNS1_8ae_stateE(ptr noundef %18, ptr noundef %13, ptr noundef %15, ptr noundef %45)
  br i1 %46, label %47, label %379

47:                                               ; preds = %44
  %48 = load i64, ptr %5, align 8, !tbaa !13
  %49 = load i64, ptr %6, align 8, !tbaa !13
  %50 = icmp ne i64 %48, %49
  br i1 %50, label %55, label %51

51:                                               ; preds = %47
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %19, ptr noundef %52)
  %54 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %53, double noundef 5.000000e-01)
  br i1 %54, label %55, label %57

55:                                               ; preds = %51, %47
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl15sparsecopytocrsEPNS_12sparsematrixES1_PNS_8ae_stateE(ptr noundef %15, ptr noundef %14, ptr noundef %56)
  br label %59

57:                                               ; preds = %51
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl15sparsecopytosksEPNS_12sparsematrixES1_PNS_8ae_stateE(ptr noundef %15, ptr noundef %14, ptr noundef %58)
  br label %59

59:                                               ; preds = %57, %55
  store i64 0, ptr %11, align 8, !tbaa !13
  br label %60

60:                                               ; preds = %110, %59
  %61 = load i64, ptr %11, align 8, !tbaa !13
  %62 = load i64, ptr %5, align 8, !tbaa !13
  %63 = sub nsw i64 %62, 1
  %64 = icmp sle i64 %61, %63
  br i1 %64, label %65, label %113

65:                                               ; preds = %60
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %66

66:                                               ; preds = %106, %65
  %67 = load i64, ptr %12, align 8, !tbaa !13
  %68 = load i64, ptr %6, align 8, !tbaa !13
  %69 = sub nsw i64 %68, 1
  %70 = icmp sle i64 %67, %69
  br i1 %70, label %71, label %109

71:                                               ; preds = %66
  %72 = load i64, ptr %11, align 8, !tbaa !13
  %73 = load i64, ptr %12, align 8, !tbaa !13
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %15, i64 noundef %72, i64 noundef %73, ptr noundef %74)
  %76 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %77 = load ptr, ptr %76, align 8, !tbaa !15
  %78 = load i64, ptr %11, align 8, !tbaa !13
  %79 = getelementptr inbounds ptr, ptr %77, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = load i64, ptr %12, align 8, !tbaa !13
  %82 = getelementptr inbounds double, ptr %80, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !9
  %84 = fsub double %75, %83
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %84, ptr noundef %85)
  %87 = load double, ptr %16, align 8, !tbaa !9
  %88 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %86, double noundef %87)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %20, i1 noundef zeroext %88, ptr noundef @.str.8, i32 noundef 5279, ptr noundef @.str.105)
  %89 = load i64, ptr %11, align 8, !tbaa !13
  %90 = load i64, ptr %12, align 8, !tbaa !13
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %14, i64 noundef %89, i64 noundef %90, ptr noundef %91)
  %93 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %94 = load ptr, ptr %93, align 8, !tbaa !15
  %95 = load i64, ptr %11, align 8, !tbaa !13
  %96 = getelementptr inbounds ptr, ptr %94, i64 %95
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  %98 = load i64, ptr %12, align 8, !tbaa !13
  %99 = getelementptr inbounds double, ptr %97, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !9
  %101 = fsub double %92, %100
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %101, ptr noundef %102)
  %104 = load double, ptr %16, align 8, !tbaa !9
  %105 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %103, double noundef %104)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %20, i1 noundef zeroext %105, ptr noundef @.str.8, i32 noundef 5280, ptr noundef @.str.106)
  br label %106

106:                                              ; preds = %71
  %107 = load i64, ptr %12, align 8, !tbaa !13
  %108 = add nsw i64 %107, 1
  store i64 %108, ptr %12, align 8, !tbaa !13
  br label %66, !llvm.loop !16

109:                                              ; preds = %66
  br label %110

110:                                              ; preds = %109
  %111 = load i64, ptr %11, align 8, !tbaa !13
  %112 = add nsw i64 %111, 1
  store i64 %112, ptr %11, align 8, !tbaa !13
  br label %60, !llvm.loop !18

113:                                              ; preds = %60
  %114 = load i64, ptr %6, align 8, !tbaa !13
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %7, i64 noundef %114, ptr noundef %115)
  %116 = load i64, ptr %6, align 8, !tbaa !13
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %8, i64 noundef %116, ptr noundef %117)
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %118

118:                                              ; preds = %140, %113
  %119 = load i64, ptr %12, align 8, !tbaa !13
  %120 = load i64, ptr %6, align 8, !tbaa !13
  %121 = sub nsw i64 %120, 1
  %122 = icmp sle i64 %119, %121
  br i1 %122, label %123, label %143

123:                                              ; preds = %118
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %19, ptr noundef %124)
  %126 = fsub double %125, 5.000000e-01
  %127 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %128 = load ptr, ptr %127, align 8, !tbaa !15
  %129 = load i64, ptr %12, align 8, !tbaa !13
  %130 = getelementptr inbounds double, ptr %128, i64 %129
  store double %126, ptr %130, align 8, !tbaa !9
  %131 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %132 = load ptr, ptr %131, align 8, !tbaa !15
  %133 = load i64, ptr %12, align 8, !tbaa !13
  %134 = getelementptr inbounds double, ptr %132, i64 %133
  %135 = load double, ptr %134, align 8, !tbaa !9
  %136 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %137 = load ptr, ptr %136, align 8, !tbaa !15
  %138 = load i64, ptr %12, align 8, !tbaa !13
  %139 = getelementptr inbounds double, ptr %137, i64 %138
  store double %135, ptr %139, align 8, !tbaa !9
  br label %140

140:                                              ; preds = %123
  %141 = load i64, ptr %12, align 8, !tbaa !13
  %142 = add nsw i64 %141, 1
  store i64 %142, ptr %12, align 8, !tbaa !13
  br label %118, !llvm.loop !19

143:                                              ; preds = %118
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl8sparsemvEPNS_12sparsematrixEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %14, ptr noundef %7, ptr noundef %9, ptr noundef %144)
  %145 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %9, i32 0, i32 0
  %146 = load i64, ptr %145, align 8, !tbaa !20
  %147 = load i64, ptr %5, align 8, !tbaa !13
  %148 = icmp slt i64 %146, %147
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %20, i1 noundef zeroext %148, ptr noundef @.str.8, i32 noundef 5295, ptr noundef @.str.107)
  %149 = load i8, ptr %20, align 1, !tbaa !11, !range !23, !noundef !24
  %150 = trunc i8 %149 to i1
  br i1 %150, label %151, label %155

151:                                              ; preds = %143
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %152)
  %153 = load i8, ptr %20, align 1, !tbaa !11, !range !23, !noundef !24
  %154 = trunc i8 %153 to i1
  store i1 %154, ptr %2, align 1
  store i32 1, ptr %21, align 4
  br label %391

155:                                              ; preds = %143
  store i64 0, ptr %11, align 8, !tbaa !13
  br label %156

156:                                              ; preds = %186, %155
  %157 = load i64, ptr %11, align 8, !tbaa !13
  %158 = load i64, ptr %5, align 8, !tbaa !13
  %159 = sub nsw i64 %158, 1
  %160 = icmp sle i64 %157, %159
  br i1 %160, label %161, label %189

161:                                              ; preds = %156
  %162 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %163 = load ptr, ptr %162, align 8, !tbaa !15
  %164 = load i64, ptr %11, align 8, !tbaa !13
  %165 = getelementptr inbounds ptr, ptr %163, i64 %164
  %166 = load ptr, ptr %165, align 8, !tbaa !5
  %167 = getelementptr inbounds double, ptr %166, i64 0
  %168 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %169 = load ptr, ptr %168, align 8, !tbaa !15
  %170 = getelementptr inbounds double, ptr %169, i64 0
  %171 = load i64, ptr %6, align 8, !tbaa !13
  %172 = sub nsw i64 %171, 1
  %173 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %172)
  %174 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %167, i64 noundef 1, ptr noundef %170, i64 noundef 1, i64 noundef %173)
  store double %174, ptr %17, align 8, !tbaa !9
  %175 = load double, ptr %17, align 8, !tbaa !9
  %176 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %9, i32 0, i32 4
  %177 = load ptr, ptr %176, align 8, !tbaa !15
  %178 = load i64, ptr %11, align 8, !tbaa !13
  %179 = getelementptr inbounds double, ptr %177, i64 %178
  %180 = load double, ptr %179, align 8, !tbaa !9
  %181 = fsub double %175, %180
  %182 = load ptr, ptr %3, align 8, !tbaa !5
  %183 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %181, ptr noundef %182)
  %184 = load double, ptr %16, align 8, !tbaa !9
  %185 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %183, double noundef %184)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %20, i1 noundef zeroext %185, ptr noundef @.str.8, i32 noundef 5304, ptr noundef @.str.108)
  br label %186

186:                                              ; preds = %161
  %187 = load i64, ptr %11, align 8, !tbaa !13
  %188 = add nsw i64 %187, 1
  store i64 %188, ptr %11, align 8, !tbaa !13
  br label %156, !llvm.loop !25

189:                                              ; preds = %156
  %190 = load i64, ptr %5, align 8, !tbaa !13
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %7, i64 noundef %190, ptr noundef %191)
  %192 = load i64, ptr %5, align 8, !tbaa !13
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %8, i64 noundef %192, ptr noundef %193)
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %194

194:                                              ; preds = %216, %189
  %195 = load i64, ptr %12, align 8, !tbaa !13
  %196 = load i64, ptr %5, align 8, !tbaa !13
  %197 = sub nsw i64 %196, 1
  %198 = icmp sle i64 %195, %197
  br i1 %198, label %199, label %219

199:                                              ; preds = %194
  %200 = load ptr, ptr %3, align 8, !tbaa !5
  %201 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %19, ptr noundef %200)
  %202 = fsub double %201, 5.000000e-01
  %203 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %204 = load ptr, ptr %203, align 8, !tbaa !15
  %205 = load i64, ptr %12, align 8, !tbaa !13
  %206 = getelementptr inbounds double, ptr %204, i64 %205
  store double %202, ptr %206, align 8, !tbaa !9
  %207 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %208 = load ptr, ptr %207, align 8, !tbaa !15
  %209 = load i64, ptr %12, align 8, !tbaa !13
  %210 = getelementptr inbounds double, ptr %208, i64 %209
  %211 = load double, ptr %210, align 8, !tbaa !9
  %212 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %213 = load ptr, ptr %212, align 8, !tbaa !15
  %214 = load i64, ptr %12, align 8, !tbaa !13
  %215 = getelementptr inbounds double, ptr %213, i64 %214
  store double %211, ptr %215, align 8, !tbaa !9
  br label %216

216:                                              ; preds = %199
  %217 = load i64, ptr %12, align 8, !tbaa !13
  %218 = add nsw i64 %217, 1
  store i64 %218, ptr %12, align 8, !tbaa !13
  br label %194, !llvm.loop !26

219:                                              ; preds = %194
  %220 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl9sparsemtvEPNS_12sparsematrixEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %14, ptr noundef %7, ptr noundef %9, ptr noundef %220)
  %221 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %9, i32 0, i32 0
  %222 = load i64, ptr %221, align 8, !tbaa !20
  %223 = load i64, ptr %6, align 8, !tbaa !13
  %224 = icmp slt i64 %222, %223
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %20, i1 noundef zeroext %224, ptr noundef @.str.8, i32 noundef 5318, ptr noundef @.str.109)
  %225 = load i8, ptr %20, align 1, !tbaa !11, !range !23, !noundef !24
  %226 = trunc i8 %225 to i1
  br i1 %226, label %227, label %231

227:                                              ; preds = %219
  %228 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %228)
  %229 = load i8, ptr %20, align 1, !tbaa !11, !range !23, !noundef !24
  %230 = trunc i8 %229 to i1
  store i1 %230, ptr %2, align 1
  store i32 1, ptr %21, align 4
  br label %391

231:                                              ; preds = %219
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %232

232:                                              ; preds = %264, %231
  %233 = load i64, ptr %12, align 8, !tbaa !13
  %234 = load i64, ptr %6, align 8, !tbaa !13
  %235 = sub nsw i64 %234, 1
  %236 = icmp sle i64 %233, %235
  br i1 %236, label %237, label %267

237:                                              ; preds = %232
  %238 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %239 = load ptr, ptr %238, align 8, !tbaa !15
  %240 = getelementptr inbounds ptr, ptr %239, i64 0
  %241 = load ptr, ptr %240, align 8, !tbaa !5
  %242 = load i64, ptr %12, align 8, !tbaa !13
  %243 = getelementptr inbounds double, ptr %241, i64 %242
  %244 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 2
  %245 = load i64, ptr %244, align 8, !tbaa !27
  %246 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %247 = load ptr, ptr %246, align 8, !tbaa !15
  %248 = getelementptr inbounds double, ptr %247, i64 0
  %249 = load i64, ptr %5, align 8, !tbaa !13
  %250 = sub nsw i64 %249, 1
  %251 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %250)
  %252 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %243, i64 noundef %245, ptr noundef %248, i64 noundef 1, i64 noundef %251)
  store double %252, ptr %17, align 8, !tbaa !9
  %253 = load double, ptr %17, align 8, !tbaa !9
  %254 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %9, i32 0, i32 4
  %255 = load ptr, ptr %254, align 8, !tbaa !15
  %256 = load i64, ptr %12, align 8, !tbaa !13
  %257 = getelementptr inbounds double, ptr %255, i64 %256
  %258 = load double, ptr %257, align 8, !tbaa !9
  %259 = fsub double %253, %258
  %260 = load ptr, ptr %3, align 8, !tbaa !5
  %261 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %259, ptr noundef %260)
  %262 = load double, ptr %16, align 8, !tbaa !9
  %263 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %261, double noundef %262)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %20, i1 noundef zeroext %263, ptr noundef @.str.8, i32 noundef 5327, ptr noundef @.str.110)
  br label %264

264:                                              ; preds = %237
  %265 = load i64, ptr %12, align 8, !tbaa !13
  %266 = add nsw i64 %265, 1
  store i64 %266, ptr %12, align 8, !tbaa !13
  br label %232, !llvm.loop !29

267:                                              ; preds = %232
  %268 = load i64, ptr %5, align 8, !tbaa !13
  %269 = load i64, ptr %6, align 8, !tbaa !13
  %270 = icmp eq i64 %268, %269
  br i1 %270, label %271, label %378

271:                                              ; preds = %267
  %272 = load i64, ptr %6, align 8, !tbaa !13
  %273 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %7, i64 noundef %272, ptr noundef %273)
  %274 = load i64, ptr %6, align 8, !tbaa !13
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %8, i64 noundef %274, ptr noundef %275)
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %276

276:                                              ; preds = %298, %271
  %277 = load i64, ptr %12, align 8, !tbaa !13
  %278 = load i64, ptr %6, align 8, !tbaa !13
  %279 = sub nsw i64 %278, 1
  %280 = icmp sle i64 %277, %279
  br i1 %280, label %281, label %301

281:                                              ; preds = %276
  %282 = load ptr, ptr %3, align 8, !tbaa !5
  %283 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %19, ptr noundef %282)
  %284 = fsub double %283, 5.000000e-01
  %285 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %286 = load ptr, ptr %285, align 8, !tbaa !15
  %287 = load i64, ptr %12, align 8, !tbaa !13
  %288 = getelementptr inbounds double, ptr %286, i64 %287
  store double %284, ptr %288, align 8, !tbaa !9
  %289 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %290 = load ptr, ptr %289, align 8, !tbaa !15
  %291 = load i64, ptr %12, align 8, !tbaa !13
  %292 = getelementptr inbounds double, ptr %290, i64 %291
  %293 = load double, ptr %292, align 8, !tbaa !9
  %294 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %295 = load ptr, ptr %294, align 8, !tbaa !15
  %296 = load i64, ptr %12, align 8, !tbaa !13
  %297 = getelementptr inbounds double, ptr %295, i64 %296
  store double %293, ptr %297, align 8, !tbaa !9
  br label %298

298:                                              ; preds = %281
  %299 = load i64, ptr %12, align 8, !tbaa !13
  %300 = add nsw i64 %299, 1
  store i64 %300, ptr %12, align 8, !tbaa !13
  br label %276, !llvm.loop !30

301:                                              ; preds = %276
  %302 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl9sparsemv2EPNS_12sparsematrixEPNS_9ae_vectorES3_S3_PNS_8ae_stateE(ptr noundef %14, ptr noundef %7, ptr noundef %9, ptr noundef %10, ptr noundef %302)
  %303 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %9, i32 0, i32 0
  %304 = load i64, ptr %303, align 8, !tbaa !20
  %305 = load i64, ptr %6, align 8, !tbaa !13
  %306 = icmp slt i64 %304, %305
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %20, i1 noundef zeroext %306, ptr noundef @.str.8, i32 noundef 5343, ptr noundef @.str.111)
  %307 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %10, i32 0, i32 0
  %308 = load i64, ptr %307, align 8, !tbaa !20
  %309 = load i64, ptr %6, align 8, !tbaa !13
  %310 = icmp slt i64 %308, %309
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %20, i1 noundef zeroext %310, ptr noundef @.str.8, i32 noundef 5344, ptr noundef @.str.112)
  %311 = load i8, ptr %20, align 1, !tbaa !11, !range !23, !noundef !24
  %312 = trunc i8 %311 to i1
  br i1 %312, label %313, label %317

313:                                              ; preds = %301
  %314 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %314)
  %315 = load i8, ptr %20, align 1, !tbaa !11, !range !23, !noundef !24
  %316 = trunc i8 %315 to i1
  store i1 %316, ptr %2, align 1
  store i32 1, ptr %21, align 4
  br label %391

317:                                              ; preds = %301
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %318

318:                                              ; preds = %374, %317
  %319 = load i64, ptr %12, align 8, !tbaa !13
  %320 = load i64, ptr %6, align 8, !tbaa !13
  %321 = sub nsw i64 %320, 1
  %322 = icmp sle i64 %319, %321
  br i1 %322, label %323, label %377

323:                                              ; preds = %318
  %324 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %325 = load ptr, ptr %324, align 8, !tbaa !15
  %326 = load i64, ptr %12, align 8, !tbaa !13
  %327 = getelementptr inbounds ptr, ptr %325, i64 %326
  %328 = load ptr, ptr %327, align 8, !tbaa !5
  %329 = getelementptr inbounds double, ptr %328, i64 0
  %330 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %331 = load ptr, ptr %330, align 8, !tbaa !15
  %332 = getelementptr inbounds double, ptr %331, i64 0
  %333 = load i64, ptr %6, align 8, !tbaa !13
  %334 = sub nsw i64 %333, 1
  %335 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %334)
  %336 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %329, i64 noundef 1, ptr noundef %332, i64 noundef 1, i64 noundef %335)
  store double %336, ptr %17, align 8, !tbaa !9
  %337 = load double, ptr %17, align 8, !tbaa !9
  %338 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %9, i32 0, i32 4
  %339 = load ptr, ptr %338, align 8, !tbaa !15
  %340 = load i64, ptr %12, align 8, !tbaa !13
  %341 = getelementptr inbounds double, ptr %339, i64 %340
  %342 = load double, ptr %341, align 8, !tbaa !9
  %343 = fsub double %337, %342
  %344 = load ptr, ptr %3, align 8, !tbaa !5
  %345 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %343, ptr noundef %344)
  %346 = load double, ptr %16, align 8, !tbaa !9
  %347 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %345, double noundef %346)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %20, i1 noundef zeroext %347, ptr noundef @.str.8, i32 noundef 5353, ptr noundef @.str.113)
  %348 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %349 = load ptr, ptr %348, align 8, !tbaa !15
  %350 = getelementptr inbounds ptr, ptr %349, i64 0
  %351 = load ptr, ptr %350, align 8, !tbaa !5
  %352 = load i64, ptr %12, align 8, !tbaa !13
  %353 = getelementptr inbounds double, ptr %351, i64 %352
  %354 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 2
  %355 = load i64, ptr %354, align 8, !tbaa !27
  %356 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %357 = load ptr, ptr %356, align 8, !tbaa !15
  %358 = getelementptr inbounds double, ptr %357, i64 0
  %359 = load i64, ptr %6, align 8, !tbaa !13
  %360 = sub nsw i64 %359, 1
  %361 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %360)
  %362 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %353, i64 noundef %355, ptr noundef %358, i64 noundef 1, i64 noundef %361)
  store double %362, ptr %17, align 8, !tbaa !9
  %363 = load double, ptr %17, align 8, !tbaa !9
  %364 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %10, i32 0, i32 4
  %365 = load ptr, ptr %364, align 8, !tbaa !15
  %366 = load i64, ptr %12, align 8, !tbaa !13
  %367 = getelementptr inbounds double, ptr %365, i64 %366
  %368 = load double, ptr %367, align 8, !tbaa !9
  %369 = fsub double %363, %368
  %370 = load ptr, ptr %3, align 8, !tbaa !5
  %371 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %369, ptr noundef %370)
  %372 = load double, ptr %16, align 8, !tbaa !9
  %373 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %371, double noundef %372)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef %20, i1 noundef zeroext %373, ptr noundef @.str.8, i32 noundef 5355, ptr noundef @.str.114)
  br label %374

374:                                              ; preds = %323
  %375 = load i64, ptr %12, align 8, !tbaa !13
  %376 = add nsw i64 %375, 1
  store i64 %376, ptr %12, align 8, !tbaa !13
  br label %318, !llvm.loop !31

377:                                              ; preds = %318
  br label %378

378:                                              ; preds = %377, %267
  br label %44, !llvm.loop !32

379:                                              ; preds = %44
  br label %380

380:                                              ; preds = %379
  %381 = load i64, ptr %6, align 8, !tbaa !13
  %382 = add nsw i64 %381, 1
  store i64 %382, ptr %6, align 8, !tbaa !13
  br label %37, !llvm.loop !33

383:                                              ; preds = %37
  br label %384

384:                                              ; preds = %383
  %385 = load i64, ptr %5, align 8, !tbaa !13
  %386 = add nsw i64 %385, 1
  store i64 %386, ptr %5, align 8, !tbaa !13
  br label %33, !llvm.loop !34

387:                                              ; preds = %33
  %388 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %388)
  %389 = load i8, ptr %20, align 1, !tbaa !11, !range !23, !noundef !24
  %390 = trunc i8 %389 to i1
  store i1 %390, ptr %2, align 1
  store i32 1, ptr %21, align 4
  br label %391

391:                                              ; preds = %387, %313, %227, %151
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 400, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 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 64, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 64, 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
  %392 = load i1, ptr %2, align 1
  ret i1 %392
}

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

declare void @_ZN11alglib_impl15sparsecopytocrsEPNS_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_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 void @_ZN11alglib_impl8sparsemvEPNS_12sparsematrixEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

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

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


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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon }
%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 }
%"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.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.105 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.114 = 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 void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr 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_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) 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 @_Z21testlevel2unsymmetricPN11alglib_impl8ae_stateE(ptr noundef %0) local_unnamed_addr #3 {
  %2 = alloca %"struct.alglib_impl::ae_frame", align 8
  %3 = alloca %"struct.alglib_impl::ae_vector", align 8
  %4 = alloca %"struct.alglib_impl::ae_vector", align 8
  %5 = alloca %"struct.alglib_impl::ae_vector", align 8
  %6 = alloca %"struct.alglib_impl::ae_vector", 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.sparsegenerator, align 8
  %11 = alloca %"struct.alglib_impl::hqrndstate", align 8
  %12 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 64, 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 400, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #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(64) %3, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %4, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %5, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %6, i8 0, i64 64, 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(400) %10, i8 0, i64 400, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %11, i8 0, i64 24, i1 false)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %3, i64 noundef 0, i64 noundef 3, ptr noundef %0, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %4, i64 noundef 0, i64 noundef 3, ptr noundef %0, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %5, i64 noundef 0, i64 noundef 3, ptr noundef %0, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %6, 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 @_Z21_sparsegenerator_initPvPN11alglib_impl8ae_stateEb(ptr noundef nonnull %10, ptr noundef %0, i1 noundef zeroext true)
  call void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef nonnull %11, ptr noundef %0, i1 noundef zeroext true)
  store i8 0, ptr %12, align 1, !tbaa !5
  call void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef %0)
  %13 = getelementptr inbounds i8, ptr %7, i64 72
  %14 = getelementptr inbounds i8, ptr %3, i64 56
  %15 = getelementptr inbounds i8, ptr %4, i64 56
  %16 = getelementptr inbounds i8, ptr %5, i64 56
  %17 = getelementptr inbounds i8, ptr %7, i64 16
  %18 = getelementptr inbounds i8, ptr %6, i64 56
  br label %.preheader141

.preheader141:                                    ; preds = %1, %160
  %.0127152 = phi i64 [ 1, %1 ], [ %161, %160 ]
  %19 = add nsw i64 %.0127152, -1
  br label %20

20:                                               ; preds = %.preheader141, %._crit_edge
  %.0126151 = phi i64 [ 1, %.preheader141 ], [ %159, %._crit_edge ]
  call void @_ZL28testsparseunit_initgeneratorllllP15sparsegeneratorPN11alglib_impl8ae_stateE(i64 noundef %.0127152, i64 noundef %.0126151, i64 noundef 0, i64 noundef 0, ptr noundef nonnull %10, ptr noundef %0)
  %21 = call noundef zeroext i1 @_ZL27testsparseunit_generatenextP15sparsegeneratorPN11alglib_impl9ae_matrixEPNS1_12sparsematrixEPNS1_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef %0)
  br i1 %21, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %20
  %.not = icmp eq i64 %.0127152, %.0126151
  %22 = add nsw i64 %.0126151, -1
  br label %23

23:                                               ; preds = %.lr.ph, %.loopexit
  br i1 %.not, label %24, label %27

24:                                               ; preds = %23
  %25 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef %0)
  %26 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %25, double noundef 5.000000e-01)
  br i1 %26, label %27, label %28

27:                                               ; preds = %24, %23
  call void @_ZN11alglib_impl15sparsecopytocrsEPNS_12sparsematrixES1_PNS_8ae_stateE(ptr noundef nonnull %9, ptr noundef nonnull %8, ptr noundef %0)
  br label %.preheader.preheader

28:                                               ; preds = %24
  call void @_ZN11alglib_impl15sparsecopytosksEPNS_12sparsematrixES1_PNS_8ae_stateE(ptr noundef nonnull %9, ptr noundef nonnull %8, ptr noundef %0)
  br label %.preheader.preheader

.preheader.preheader:                             ; preds = %28, %27
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %49
  %.0124144 = phi i64 [ %50, %49 ], [ 0, %.preheader.preheader ]
  br label %29

29:                                               ; preds = %.preheader, %29
  %.0123143 = phi i64 [ 0, %.preheader ], [ %48, %29 ]
  %30 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %.0124144, i64 noundef %.0123143, ptr noundef %0)
  %31 = load ptr, ptr %13, align 8, !tbaa !9
  %32 = getelementptr inbounds ptr, ptr %31, i64 %.0124144
  %33 = load ptr, ptr %32, align 8, !tbaa !10
  %34 = getelementptr inbounds double, ptr %33, i64 %.0123143
  %35 = load double, ptr %34, align 8, !tbaa !12
  %36 = fsub double %30, %35
  %37 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %36, ptr noundef %0)
  %38 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %37, double noundef 0x3D95FD7FE1796496)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %12, i1 noundef zeroext %38, ptr noundef nonnull @.str.8, i32 noundef 5279, ptr noundef nonnull @.str.105)
  %39 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %.0124144, i64 noundef %.0123143, ptr noundef %0)
  %40 = load ptr, ptr %13, align 8, !tbaa !9
  %41 = getelementptr inbounds ptr, ptr %40, i64 %.0124144
  %42 = load ptr, ptr %41, align 8, !tbaa !10
  %43 = getelementptr inbounds double, ptr %42, i64 %.0123143
  %44 = load double, ptr %43, align 8, !tbaa !12
  %45 = fsub double %39, %44
  %46 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %45, ptr noundef %0)
  %47 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %46, double noundef 0x3D95FD7FE1796496)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %12, i1 noundef zeroext %47, ptr noundef nonnull @.str.8, i32 noundef 5280, ptr noundef nonnull @.str.106)
  %48 = add nuw nsw i64 %.0123143, 1
  %exitcond.not = icmp eq i64 %48, %.0126151
  br i1 %exitcond.not, label %49, label %29, !llvm.loop !14

49:                                               ; preds = %29
  %50 = add nuw nsw i64 %.0124144, 1
  %exitcond153.not = icmp eq i64 %50, %.0127152
  br i1 %exitcond153.not, label %51, label %.preheader, !llvm.loop !16

51:                                               ; preds = %49
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %.0126151, ptr noundef %0)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef %.0126151, ptr noundef %0)
  br label %52

52:                                               ; preds = %51, %52
  %.1145 = phi i64 [ 0, %51 ], [ %62, %52 ]
  %53 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef %0)
  %54 = fadd double %53, -5.000000e-01
  %55 = load ptr, ptr %14, align 8, !tbaa !9
  %56 = getelementptr inbounds double, ptr %55, i64 %.1145
  store double %54, ptr %56, align 8, !tbaa !12
  %57 = load ptr, ptr %14, align 8, !tbaa !9
  %58 = getelementptr inbounds double, ptr %57, i64 %.1145
  %59 = load double, ptr %58, align 8, !tbaa !12
  %60 = load ptr, ptr %15, align 8, !tbaa !9
  %61 = getelementptr inbounds double, ptr %60, i64 %.1145
  store double %59, ptr %61, align 8, !tbaa !12
  %62 = add nuw nsw i64 %.1145, 1
  %exitcond154.not = icmp eq i64 %62, %.0126151
  br i1 %exitcond154.not, label %63, label %52, !llvm.loop !17

63:                                               ; preds = %52
  call void @_ZN11alglib_impl8sparsemvEPNS_12sparsematrixEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef nonnull %8, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef %0)
  %64 = load i64, ptr %5, align 8, !tbaa !18
  %65 = icmp slt i64 %64, %.0127152
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %12, i1 noundef zeroext %65, ptr noundef nonnull @.str.8, i32 noundef 5295, ptr noundef nonnull @.str.107)
  %66 = load i8, ptr %12, align 1, !tbaa !5, !range !22, !noundef !23
  %67 = trunc nuw i8 %66 to i1
  br i1 %67, label %.loopexit162, label %.preheader140

.preheader140:                                    ; preds = %63, %.preheader140
  %.1125146 = phi i64 [ %80, %.preheader140 ], [ 0, %63 ]
  %68 = load ptr, ptr %13, align 8, !tbaa !9
  %69 = getelementptr inbounds ptr, ptr %68, i64 %.1125146
  %70 = load ptr, ptr %69, align 8, !tbaa !10
  %71 = load ptr, ptr %15, align 8, !tbaa !9
  %72 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %22)
  %73 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %70, i64 noundef 1, ptr noundef %71, i64 noundef 1, i64 noundef %72)
  %74 = load ptr, ptr %16, align 8, !tbaa !9
  %75 = getelementptr inbounds double, ptr %74, i64 %.1125146
  %76 = load double, ptr %75, align 8, !tbaa !12
  %77 = fsub double %73, %76
  %78 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %77, ptr noundef %0)
  %79 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %78, double noundef 0x3D95FD7FE1796496)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %12, i1 noundef zeroext %79, ptr noundef nonnull @.str.8, i32 noundef 5304, ptr noundef nonnull @.str.108)
  %80 = add nuw nsw i64 %.1125146, 1
  %exitcond155.not = icmp eq i64 %80, %.0127152
  br i1 %exitcond155.not, label %81, label %.preheader140, !llvm.loop !24

81:                                               ; preds = %.preheader140
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %.0127152, ptr noundef %0)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef %.0127152, ptr noundef %0)
  br label %82

82:                                               ; preds = %81, %82
  %.2147 = phi i64 [ 0, %81 ], [ %92, %82 ]
  %83 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef %0)
  %84 = fadd double %83, -5.000000e-01
  %85 = load ptr, ptr %14, align 8, !tbaa !9
  %86 = getelementptr inbounds double, ptr %85, i64 %.2147
  store double %84, ptr %86, align 8, !tbaa !12
  %87 = load ptr, ptr %14, align 8, !tbaa !9
  %88 = getelementptr inbounds double, ptr %87, i64 %.2147
  %89 = load double, ptr %88, align 8, !tbaa !12
  %90 = load ptr, ptr %15, align 8, !tbaa !9
  %91 = getelementptr inbounds double, ptr %90, i64 %.2147
  store double %89, ptr %91, align 8, !tbaa !12
  %92 = add nuw nsw i64 %.2147, 1
  %exitcond156.not = icmp eq i64 %92, %.0127152
  br i1 %exitcond156.not, label %93, label %82, !llvm.loop !25

93:                                               ; preds = %82
  call void @_ZN11alglib_impl9sparsemtvEPNS_12sparsematrixEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef nonnull %8, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef %0)
  %94 = load i64, ptr %5, align 8, !tbaa !18
  %95 = icmp slt i64 %94, %.0126151
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %12, i1 noundef zeroext %95, ptr noundef nonnull @.str.8, i32 noundef 5318, ptr noundef nonnull @.str.109)
  %96 = load i8, ptr %12, align 1, !tbaa !5, !range !22, !noundef !23
  %97 = trunc nuw i8 %96 to i1
  br i1 %97, label %.loopexit162, label %.preheader139

.preheader139:                                    ; preds = %93, %.preheader139
  %.3148 = phi i64 [ %111, %.preheader139 ], [ 0, %93 ]
  %98 = load ptr, ptr %13, align 8, !tbaa !9
  %99 = load ptr, ptr %98, align 8, !tbaa !10
  %100 = getelementptr inbounds double, ptr %99, i64 %.3148
  %101 = load i64, ptr %17, align 8, !tbaa !26
  %102 = load ptr, ptr %15, align 8, !tbaa !9
  %103 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %19)
  %104 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %100, i64 noundef %101, ptr noundef %102, i64 noundef 1, i64 noundef %103)
  %105 = load ptr, ptr %16, align 8, !tbaa !9
  %106 = getelementptr inbounds double, ptr %105, i64 %.3148
  %107 = load double, ptr %106, align 8, !tbaa !12
  %108 = fsub double %104, %107
  %109 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %108, ptr noundef %0)
  %110 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %109, double noundef 0x3D95FD7FE1796496)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %12, i1 noundef zeroext %110, ptr noundef nonnull @.str.8, i32 noundef 5327, ptr noundef nonnull @.str.110)
  %111 = add nuw nsw i64 %.3148, 1
  %exitcond157.not = icmp eq i64 %111, %.0126151
  br i1 %exitcond157.not, label %112, label %.preheader139, !llvm.loop !28

112:                                              ; preds = %.preheader139
  br i1 %.not, label %113, label %.loopexit

113:                                              ; preds = %112
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %.0127152, ptr noundef %0)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef %.0127152, ptr noundef %0)
  br label %114

114:                                              ; preds = %113, %114
  %.4149 = phi i64 [ 0, %113 ], [ %124, %114 ]
  %115 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef %0)
  %116 = fadd double %115, -5.000000e-01
  %117 = load ptr, ptr %14, align 8, !tbaa !9
  %118 = getelementptr inbounds double, ptr %117, i64 %.4149
  store double %116, ptr %118, align 8, !tbaa !12
  %119 = load ptr, ptr %14, align 8, !tbaa !9
  %120 = getelementptr inbounds double, ptr %119, i64 %.4149
  %121 = load double, ptr %120, align 8, !tbaa !12
  %122 = load ptr, ptr %15, align 8, !tbaa !9
  %123 = getelementptr inbounds double, ptr %122, i64 %.4149
  store double %121, ptr %123, align 8, !tbaa !12
  %124 = add nuw nsw i64 %.4149, 1
  %exitcond158.not = icmp eq i64 %124, %.0127152
  br i1 %exitcond158.not, label %125, label %114, !llvm.loop !29

125:                                              ; preds = %114
  call void @_ZN11alglib_impl9sparsemv2EPNS_12sparsematrixEPNS_9ae_vectorES3_S3_PNS_8ae_stateE(ptr noundef nonnull %8, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef %0)
  %126 = load i64, ptr %5, align 8, !tbaa !18
  %127 = icmp slt i64 %126, %.0127152
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %12, i1 noundef zeroext %127, ptr noundef nonnull @.str.8, i32 noundef 5343, ptr noundef nonnull @.str.111)
  %128 = load i64, ptr %6, align 8, !tbaa !18
  %129 = icmp slt i64 %128, %.0127152
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %12, i1 noundef zeroext %129, ptr noundef nonnull @.str.8, i32 noundef 5344, ptr noundef nonnull @.str.112)
  %130 = load i8, ptr %12, align 1, !tbaa !5, !range !22, !noundef !23
  %131 = trunc nuw i8 %130 to i1
  br i1 %131, label %.loopexit162, label %.preheader138

.preheader138:                                    ; preds = %125, %.preheader138
  %.5150 = phi i64 [ %157, %.preheader138 ], [ 0, %125 ]
  %132 = load ptr, ptr %13, align 8, !tbaa !9
  %133 = getelementptr inbounds ptr, ptr %132, i64 %.5150
  %134 = load ptr, ptr %133, align 8, !tbaa !10
  %135 = load ptr, ptr %15, align 8, !tbaa !9
  %136 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %22)
  %137 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %134, i64 noundef 1, ptr noundef %135, i64 noundef 1, i64 noundef %136)
  %138 = load ptr, ptr %16, align 8, !tbaa !9
  %139 = getelementptr inbounds double, ptr %138, i64 %.5150
  %140 = load double, ptr %139, align 8, !tbaa !12
  %141 = fsub double %137, %140
  %142 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %141, ptr noundef %0)
  %143 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %142, double noundef 0x3D95FD7FE1796496)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %12, i1 noundef zeroext %143, ptr noundef nonnull @.str.8, i32 noundef 5353, ptr noundef nonnull @.str.113)
  %144 = load ptr, ptr %13, align 8, !tbaa !9
  %145 = load ptr, ptr %144, align 8, !tbaa !10
  %146 = getelementptr inbounds double, ptr %145, i64 %.5150
  %147 = load i64, ptr %17, align 8, !tbaa !26
  %148 = load ptr, ptr %15, align 8, !tbaa !9
  %149 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %22)
  %150 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %146, i64 noundef %147, ptr noundef %148, i64 noundef 1, i64 noundef %149)
  %151 = load ptr, ptr %18, align 8, !tbaa !9
  %152 = getelementptr inbounds double, ptr %151, i64 %.5150
  %153 = load double, ptr %152, align 8, !tbaa !12
  %154 = fsub double %150, %153
  %155 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %154, ptr noundef %0)
  %156 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %155, double noundef 0x3D95FD7FE1796496)
  call void @_ZN11alglib_impl17ae_set_error_flagEPbbPKciS2_(ptr noundef nonnull %12, i1 noundef zeroext %156, ptr noundef nonnull @.str.8, i32 noundef 5355, ptr noundef nonnull @.str.114)
  %157 = add nuw nsw i64 %.5150, 1
  %exitcond159.not = icmp eq i64 %157, %.0127152
  br i1 %exitcond159.not, label %.loopexit, label %.preheader138, !llvm.loop !30

.loopexit:                                        ; preds = %.preheader138, %112
  %158 = call noundef zeroext i1 @_ZL27testsparseunit_generatenextP15sparsegeneratorPN11alglib_impl9ae_matrixEPNS1_12sparsematrixEPNS1_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef %0)
  br i1 %158, label %23, label %._crit_edge, !llvm.loop !31

._crit_edge:                                      ; preds = %.loopexit, %20
  %159 = add nuw nsw i64 %.0126151, 1
  %exitcond160.not = icmp eq i64 %159, 21
  br i1 %exitcond160.not, label %160, label %20, !llvm.loop !32

160:                                              ; preds = %._crit_edge
  %161 = add nuw nsw i64 %.0127152, 1
  %exitcond161.not = icmp eq i64 %161, 21
  br i1 %exitcond161.not, label %.loopexit162, label %.preheader141, !llvm.loop !33

.loopexit162:                                     ; preds = %160, %125, %93, %63
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %0)
  %.0.in = load i8, ptr %12, align 1, !tbaa !5, !range !22, !noundef !23
  %.0 = trunc nuw i8 %.0.in to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 400, 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 64, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  ret i1 %.0
}

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

declare void @_ZN11alglib_impl15sparsecopytocrsEPNS_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_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 void @_ZN11alglib_impl8sparsemvEPNS_12sparsematrixEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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_impl9sparsemtvEPNS_12sparsematrixEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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


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