; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (optimization)

; 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::xlinearconstraints" = type { i64, i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::sparsematrix" }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_vector" = type { 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 }

@.str.382 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.383 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.384 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.385 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.386 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.387 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.388 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.389 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.390 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.391 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.392 = external hidden unnamed_addr constant [40 x i8], align 1

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

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

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

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) #1

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

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

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef, ptr noundef) #1

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl14xlcsetlc2mixedEPNS_18xlinearconstraintsEPKNS_12sparsematrixElPKNS_9ae_matrixElPKNS_9ae_vectorESA_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #2 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store i64 %2, ptr %11, align 8, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !5
  store i64 %4, ptr %13, align 8, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %21, i32 0, i32 0
  %23 = load i64, ptr %22, align 8, !tbaa !11
  store i64 %23, ptr %17, align 8, !tbaa !9
  %24 = load i64, ptr %13, align 8, !tbaa !9
  %25 = load i64, ptr %11, align 8, !tbaa !9
  %26 = add nsw i64 %24, %25
  store i64 %26, ptr %18, align 8, !tbaa !9
  %27 = load i64, ptr %11, align 8, !tbaa !9
  %28 = icmp sge i64 %27, 0
  %29 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %28, ptr noundef @.str.382, ptr noundef %29)
  %30 = load i64, ptr %11, align 8, !tbaa !9
  %31 = icmp eq i64 %30, 0
  br i1 %31, label %38, label %32

32:                                               ; preds = %8
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = load ptr, ptr %16, align 8, !tbaa !5
  %35 = call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %33, ptr noundef %34)
  %36 = load i64, ptr %17, align 8, !tbaa !9
  %37 = icmp eq i64 %35, %36
  br label %38

38:                                               ; preds = %32, %8
  %39 = phi i1 [ true, %8 ], [ %37, %32 ]
  %40 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %39, ptr noundef @.str.383, ptr noundef %40)
  %41 = load i64, ptr %11, align 8, !tbaa !9
  %42 = icmp eq i64 %41, 0
  br i1 %42, label %49, label %43

43:                                               ; preds = %38
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = load ptr, ptr %16, align 8, !tbaa !5
  %46 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %44, ptr noundef %45)
  %47 = load i64, ptr %11, align 8, !tbaa !9
  %48 = icmp eq i64 %46, %47
  br label %49

49:                                               ; preds = %43, %38
  %50 = phi i1 [ true, %38 ], [ %48, %43 ]
  %51 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %50, ptr noundef @.str.384, ptr noundef %51)
  %52 = load i64, ptr %13, align 8, !tbaa !9
  %53 = icmp sge i64 %52, 0
  %54 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %53, ptr noundef @.str.385, ptr noundef %54)
  %55 = load i64, ptr %13, align 8, !tbaa !9
  %56 = icmp eq i64 %55, 0
  br i1 %56, label %63, label %57

57:                                               ; preds = %49
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %58, i32 0, i32 1
  %60 = load i64, ptr %59, align 8, !tbaa !18
  %61 = load i64, ptr %17, align 8, !tbaa !9
  %62 = icmp sge i64 %60, %61
  br label %63

63:                                               ; preds = %57, %49
  %64 = phi i1 [ true, %49 ], [ %62, %57 ]
  %65 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %64, ptr noundef @.str.386, ptr noundef %65)
  %66 = load i64, ptr %13, align 8, !tbaa !9
  %67 = icmp eq i64 %66, 0
  br i1 %67, label %74, label %68

68:                                               ; preds = %63
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %69, i32 0, i32 0
  %71 = load i64, ptr %70, align 8, !tbaa !19
  %72 = load i64, ptr %13, align 8, !tbaa !9
  %73 = icmp sge i64 %71, %72
  br label %74

74:                                               ; preds = %68, %63
  %75 = phi i1 [ true, %63 ], [ %73, %68 ]
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %75, ptr noundef @.str.387, ptr noundef %76)
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = load i64, ptr %13, align 8, !tbaa !9
  %79 = load i64, ptr %17, align 8, !tbaa !9
  %80 = load ptr, ptr %16, align 8, !tbaa !5
  %81 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %77, i64 noundef %78, i64 noundef %79, ptr noundef %80)
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %81, ptr noundef @.str.388, ptr noundef %82)
  %83 = load ptr, ptr %14, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %83, i32 0, i32 0
  %85 = load i64, ptr %84, align 8, !tbaa !20
  %86 = load i64, ptr %13, align 8, !tbaa !9
  %87 = load i64, ptr %11, align 8, !tbaa !9
  %88 = add nsw i64 %86, %87
  %89 = icmp sge i64 %85, %88
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %89, ptr noundef @.str.389, ptr noundef %90)
  %91 = load ptr, ptr %15, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %91, i32 0, i32 0
  %93 = load i64, ptr %92, align 8, !tbaa !20
  %94 = load i64, ptr %13, align 8, !tbaa !9
  %95 = load i64, ptr %11, align 8, !tbaa !9
  %96 = add nsw i64 %94, %95
  %97 = icmp sge i64 %93, %96
  %98 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %97, ptr noundef @.str.390, ptr noundef %98)
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %99

99:                                               ; preds = %145, %74
  %100 = load i64, ptr %19, align 8, !tbaa !9
  %101 = load i64, ptr %18, align 8, !tbaa !9
  %102 = sub nsw i64 %101, 1
  %103 = icmp sle i64 %100, %102
  br i1 %103, label %104, label %148

104:                                              ; preds = %99
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %105, i32 0, i32 4
  %107 = load ptr, ptr %106, align 8, !tbaa !21
  %108 = load i64, ptr %19, align 8, !tbaa !9
  %109 = getelementptr inbounds double, ptr %107, i64 %108
  %110 = load double, ptr %109, align 8, !tbaa !22
  %111 = load ptr, ptr %16, align 8, !tbaa !5
  %112 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %110, ptr noundef %111)
  br i1 %112, label %122, label %113

113:                                              ; preds = %104
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %114, i32 0, i32 4
  %116 = load ptr, ptr %115, align 8, !tbaa !21
  %117 = load i64, ptr %19, align 8, !tbaa !9
  %118 = getelementptr inbounds double, ptr %116, i64 %117
  %119 = load double, ptr %118, align 8, !tbaa !22
  %120 = load ptr, ptr %16, align 8, !tbaa !5
  %121 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef %119, ptr noundef %120)
  br label %122

122:                                              ; preds = %113, %104
  %123 = phi i1 [ true, %104 ], [ %121, %113 ]
  %124 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %123, ptr noundef @.str.391, ptr noundef %124)
  %125 = load ptr, ptr %15, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %125, i32 0, i32 4
  %127 = load ptr, ptr %126, align 8, !tbaa !21
  %128 = load i64, ptr %19, align 8, !tbaa !9
  %129 = getelementptr inbounds double, ptr %127, i64 %128
  %130 = load double, ptr %129, align 8, !tbaa !22
  %131 = load ptr, ptr %16, align 8, !tbaa !5
  %132 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %130, ptr noundef %131)
  br i1 %132, label %142, label %133

133:                                              ; preds = %122
  %134 = load ptr, ptr %15, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %134, i32 0, i32 4
  %136 = load ptr, ptr %135, align 8, !tbaa !21
  %137 = load i64, ptr %19, align 8, !tbaa !9
  %138 = getelementptr inbounds double, ptr %136, i64 %137
  %139 = load double, ptr %138, align 8, !tbaa !22
  %140 = load ptr, ptr %16, align 8, !tbaa !5
  %141 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef %139, ptr noundef %140)
  br label %142

142:                                              ; preds = %133, %122
  %143 = phi i1 [ true, %122 ], [ %141, %133 ]
  %144 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %143, ptr noundef @.str.392, ptr noundef %144)
  br label %145

145:                                              ; preds = %142
  %146 = load i64, ptr %19, align 8, !tbaa !9
  %147 = add nsw i64 %146, 1
  store i64 %147, ptr %19, align 8, !tbaa !9
  br label %99, !llvm.loop !24

148:                                              ; preds = %99
  %149 = load i64, ptr %18, align 8, !tbaa !9
  %150 = icmp eq i64 %149, 0
  br i1 %150, label %151, label %156

151:                                              ; preds = %148
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %152, i32 0, i32 1
  store i64 0, ptr %153, align 8, !tbaa !26
  %154 = load ptr, ptr %9, align 8, !tbaa !5
  %155 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %154, i32 0, i32 2
  store i64 0, ptr %155, align 8, !tbaa !27
  store i32 1, ptr %20, align 4
  br label %219

156:                                              ; preds = %148
  %157 = load i64, ptr %11, align 8, !tbaa !9
  %158 = load ptr, ptr %9, align 8, !tbaa !5
  %159 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %158, i32 0, i32 7
  %160 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %157, ptr noundef %159, ptr noundef %160)
  %161 = load i64, ptr %11, align 8, !tbaa !9
  %162 = load ptr, ptr %9, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %162, i32 0, i32 8
  %164 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %161, ptr noundef %163, ptr noundef %164)
  %165 = load i64, ptr %13, align 8, !tbaa !9
  %166 = load ptr, ptr %9, align 8, !tbaa !5
  %167 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %166, i32 0, i32 5
  %168 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %165, ptr noundef %167, ptr noundef %168)
  %169 = load i64, ptr %13, align 8, !tbaa !9
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %170, i32 0, i32 6
  %172 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %169, ptr noundef %171, ptr noundef %172)
  %173 = load i64, ptr %11, align 8, !tbaa !9
  %174 = load ptr, ptr %14, align 8, !tbaa !5
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %175, i32 0, i32 7
  %177 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %173, ptr noundef %174, i64 noundef 0, ptr noundef %176, i64 noundef 0, ptr noundef %177)
  %178 = load i64, ptr %11, align 8, !tbaa !9
  %179 = load ptr, ptr %15, align 8, !tbaa !5
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  %181 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %180, i32 0, i32 8
  %182 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %178, ptr noundef %179, i64 noundef 0, ptr noundef %181, i64 noundef 0, ptr noundef %182)
  %183 = load i64, ptr %13, align 8, !tbaa !9
  %184 = load ptr, ptr %14, align 8, !tbaa !5
  %185 = load i64, ptr %11, align 8, !tbaa !9
  %186 = load ptr, ptr %9, align 8, !tbaa !5
  %187 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %186, i32 0, i32 5
  %188 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %183, ptr noundef %184, i64 noundef %185, ptr noundef %187, i64 noundef 0, ptr noundef %188)
  %189 = load i64, ptr %13, align 8, !tbaa !9
  %190 = load ptr, ptr %15, align 8, !tbaa !5
  %191 = load i64, ptr %11, align 8, !tbaa !9
  %192 = load ptr, ptr %9, align 8, !tbaa !5
  %193 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %192, i32 0, i32 6
  %194 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %189, ptr noundef %190, i64 noundef %191, ptr noundef %193, i64 noundef 0, ptr noundef %194)
  %195 = load i64, ptr %13, align 8, !tbaa !9
  %196 = load ptr, ptr %9, align 8, !tbaa !5
  %197 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %196, i32 0, i32 1
  store i64 %195, ptr %197, align 8, !tbaa !26
  %198 = load i64, ptr %11, align 8, !tbaa !9
  %199 = load ptr, ptr %9, align 8, !tbaa !5
  %200 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %199, i32 0, i32 2
  store i64 %198, ptr %200, align 8, !tbaa !27
  %201 = load i64, ptr %11, align 8, !tbaa !9
  %202 = icmp sgt i64 %201, 0
  br i1 %202, label %203, label %208

203:                                              ; preds = %156
  %204 = load ptr, ptr %10, align 8, !tbaa !5
  %205 = load ptr, ptr %9, align 8, !tbaa !5
  %206 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %205, i32 0, i32 4
  %207 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef %204, ptr noundef %206, ptr noundef %207)
  br label %208

208:                                              ; preds = %203, %156
  %209 = load i64, ptr %13, align 8, !tbaa !9
  %210 = icmp sgt i64 %209, 0
  br i1 %210, label %211, label %218

211:                                              ; preds = %208
  %212 = load i64, ptr %13, align 8, !tbaa !9
  %213 = load i64, ptr %17, align 8, !tbaa !9
  %214 = load ptr, ptr %12, align 8, !tbaa !5
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  %216 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %215, i32 0, i32 3
  %217 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl11rcopyallocmEllPKNS_9ae_matrixEPS0_PNS_8ae_stateE(i64 noundef %212, i64 noundef %213, ptr noundef %214, ptr noundef %216, ptr noundef %217)
  br label %218

218:                                              ; preds = %211, %208
  store i32 0, ptr %20, align 4
  br label %219

219:                                              ; preds = %218, %151
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  %220 = load i32, ptr %20, align 4
  switch i32 %220, label %222 [
    i32 0, label %221
    i32 1, label %221
  ]

221:                                              ; preds = %219, %219
  ret void

222:                                              ; preds = %219
  unreachable
}

declare void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 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 = { 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 #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN11alglib_impl18xlinearconstraintsE", !10, i64 0, !10, i64 8, !10, i64 16, !13, i64 24, !16, i64 104, !17, i64 472, !17, i64 536, !17, i64 600, !17, i64 664, !10, i64 728, !10, i64 736, !13, i64 744, !17, i64 824, !17, i64 888, !16, i64 952, !17, i64 1320, !17, i64 1384, !16, i64 1448}
!13 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !14, i64 32, !15, i64 40, !7, i64 72}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"_ZTSN11alglib_impl12sparsematrixE", !17, i64 0, !17, i64 64, !17, i64 128, !17, i64 192, !17, i64 256, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360}
!17 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !14, i64 16, !15, i64 24, !7, i64 56}
!18 = !{!13, !10, i64 8}
!19 = !{!13, !10, i64 0}
!20 = !{!17, !10, i64 0}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!12, !10, i64 8}
!27 = !{!12, !10, i64 16}


; 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"

@.str.382 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.383 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.384 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.385 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.386 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.387 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.388 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.389 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.390 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.391 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.392 = external hidden unnamed_addr constant [40 x i8], align 1

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

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

declare void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @_ZN11alglib_impl11rcopyallocmEllPKNS_9ae_matrixEPS0_PNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

declare noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #0

declare noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl14xlcsetlc2mixedEPNS_18xlinearconstraintsEPKNS_12sparsematrixElPKNS_9ae_matrixElPKNS_9ae_vectorESA_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #1 {
  %9 = load i64, ptr %0, align 8, !tbaa !5
  %10 = add i64 %4, %2
  %11 = icmp sgt i64 %2, -1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.382, ptr noundef %7)
  %12 = icmp eq i64 %2, 0
  br i1 %12, label %.critedge, label %13

13:                                               ; preds = %8
  %14 = tail call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %1, ptr noundef %7)
  %15 = icmp eq i64 %14, %9
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.383, ptr noundef %7)
  %16 = tail call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %1, ptr noundef %7)
  %17 = icmp eq i64 %16, %2
  br label %18

.critedge:                                        ; preds = %8
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext true, ptr noundef nonnull @.str.383, ptr noundef %7)
  br label %18

18:                                               ; preds = %.critedge, %13
  %19 = phi i1 [ %17, %13 ], [ true, %.critedge ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.384, ptr noundef %7)
  %20 = icmp sgt i64 %4, -1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.385, ptr noundef %7)
  %21 = icmp eq i64 %4, 0
  br i1 %21, label %.critedge104, label %22

22:                                               ; preds = %18
  %23 = getelementptr inbounds i8, ptr %3, i64 8
  %24 = load i64, ptr %23, align 8, !tbaa !16
  %25 = icmp sge i64 %24, %9
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef nonnull @.str.386, ptr noundef %7)
  %26 = load i64, ptr %3, align 8, !tbaa !17
  %27 = icmp sge i64 %26, %4
  br label %28

.critedge104:                                     ; preds = %18
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext true, ptr noundef nonnull @.str.386, ptr noundef %7)
  br label %28

28:                                               ; preds = %.critedge104, %22
  %29 = phi i1 [ %27, %22 ], [ true, %.critedge104 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %29, ptr noundef nonnull @.str.387, ptr noundef %7)
  %30 = tail call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %3, i64 noundef %4, i64 noundef %9, ptr noundef %7)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %30, ptr noundef nonnull @.str.388, ptr noundef %7)
  %31 = load i64, ptr %5, align 8, !tbaa !18
  %32 = icmp sge i64 %31, %10
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %32, ptr noundef nonnull @.str.389, ptr noundef %7)
  %33 = load i64, ptr %6, align 8, !tbaa !18
  %34 = icmp sge i64 %33, %10
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef nonnull @.str.390, ptr noundef %7)
  %.not.not105 = icmp sgt i64 %10, 0
  br i1 %.not.not105, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %28
  %35 = getelementptr inbounds i8, ptr %5, i64 56
  %36 = getelementptr inbounds i8, ptr %6, i64 56
  br label %37

37:                                               ; preds = %.lr.ph, %58
  %.0106 = phi i64 [ 0, %.lr.ph ], [ %60, %58 ]
  %38 = load ptr, ptr %35, align 8, !tbaa !19
  %39 = getelementptr inbounds double, ptr %38, i64 %.0106
  %40 = load double, ptr %39, align 8, !tbaa !20
  %41 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %40, ptr noundef %7)
  br i1 %41, label %47, label %42

42:                                               ; preds = %37
  %43 = load ptr, ptr %35, align 8, !tbaa !19
  %44 = getelementptr inbounds double, ptr %43, i64 %.0106
  %45 = load double, ptr %44, align 8, !tbaa !20
  %46 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef %45, ptr noundef %7)
  br label %47

47:                                               ; preds = %42, %37
  %48 = phi i1 [ true, %37 ], [ %46, %42 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %48, ptr noundef nonnull @.str.391, ptr noundef %7)
  %49 = load ptr, ptr %36, align 8, !tbaa !19
  %50 = getelementptr inbounds double, ptr %49, i64 %.0106
  %51 = load double, ptr %50, align 8, !tbaa !20
  %52 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %51, ptr noundef %7)
  br i1 %52, label %58, label %53

53:                                               ; preds = %47
  %54 = load ptr, ptr %36, align 8, !tbaa !19
  %55 = getelementptr inbounds double, ptr %54, i64 %.0106
  %56 = load double, ptr %55, align 8, !tbaa !20
  %57 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef %56, ptr noundef %7)
  br label %58

58:                                               ; preds = %53, %47
  %59 = phi i1 [ true, %47 ], [ %57, %53 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %59, ptr noundef nonnull @.str.392, ptr noundef %7)
  %60 = add nuw nsw i64 %.0106, 1
  %exitcond.not = icmp eq i64 %60, %10
  br i1 %exitcond.not, label %._crit_edge.thread, label %37, !llvm.loop !22

._crit_edge:                                      ; preds = %28
  %61 = icmp eq i64 %10, 0
  br i1 %61, label %62, label %._crit_edge.thread

62:                                               ; preds = %._crit_edge
  %63 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %63, i8 0, i64 16, i1 false)
  br label %77

._crit_edge.thread:                               ; preds = %58, %._crit_edge
  %64 = getelementptr inbounds i8, ptr %0, i64 600
  tail call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %2, ptr noundef nonnull %64, ptr noundef %7)
  %65 = getelementptr inbounds i8, ptr %0, i64 664
  tail call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %2, ptr noundef nonnull %65, ptr noundef %7)
  %66 = getelementptr inbounds i8, ptr %0, i64 472
  tail call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %4, ptr noundef nonnull %66, ptr noundef %7)
  %67 = getelementptr inbounds i8, ptr %0, i64 536
  tail call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %4, ptr noundef nonnull %67, ptr noundef %7)
  tail call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %2, ptr noundef nonnull %5, i64 noundef 0, ptr noundef nonnull %64, i64 noundef 0, ptr noundef %7)
  tail call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %2, ptr noundef nonnull %6, i64 noundef 0, ptr noundef nonnull %65, i64 noundef 0, ptr noundef %7)
  tail call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %4, ptr noundef nonnull %5, i64 noundef %2, ptr noundef nonnull %66, i64 noundef 0, ptr noundef %7)
  tail call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %4, ptr noundef nonnull %6, i64 noundef %2, ptr noundef nonnull %67, i64 noundef 0, ptr noundef %7)
  %68 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %4, ptr %68, align 8, !tbaa !24
  %69 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 %2, ptr %69, align 8, !tbaa !25
  %70 = icmp sgt i64 %2, 0
  br i1 %70, label %71, label %73

71:                                               ; preds = %._crit_edge.thread
  %72 = getelementptr inbounds i8, ptr %0, i64 104
  tail call void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef %1, ptr noundef nonnull %72, ptr noundef %7)
  br label %73

73:                                               ; preds = %71, %._crit_edge.thread
  %74 = icmp sgt i64 %4, 0
  br i1 %74, label %75, label %77

75:                                               ; preds = %73
  %76 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZN11alglib_impl11rcopyallocmEllPKNS_9ae_matrixEPS0_PNS_8ae_stateE(i64 noundef %4, i64 noundef %9, ptr noundef %3, ptr noundef nonnull %76, ptr noundef %7)
  br label %77

77:                                               ; preds = %73, %75, %62
  ret void
}

declare void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

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

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

!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, !7, i64 0}
!6 = !{!"_ZTSN11alglib_impl18xlinearconstraintsE", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !14, i64 104, !15, i64 472, !15, i64 536, !15, i64 600, !15, i64 664, !7, i64 728, !7, i64 736, !10, i64 744, !15, i64 824, !15, i64 888, !14, i64 952, !15, i64 1320, !15, i64 1384, !14, i64 1448}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !12, i64 40, !8, i64 72}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTSN11alglib_impl12sparsematrixE", !15, i64 0, !15, i64 64, !15, i64 128, !15, i64 192, !15, i64 256, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !8, i64 56}
!16 = !{!10, !7, i64 8}
!17 = !{!10, !7, i64 0}
!18 = !{!15, !7, i64 0}
!19 = !{!8, !8, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !8, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!6, !7, i64 8}
!25 = !{!6, !7, i64 16}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass