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

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

@.str.13 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [42 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @abort() #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11alglib_impl15ae_misalignmentEPKvm(ptr noundef, i64 noundef) #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11alglib_impl9ae_sizeofEl(i64 noundef) #1

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #4

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22ae_matrix_init_from_x2EPNS_9ae_matrixEPNS_8x_matrixElPNS_8ae_stateEb(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i1 noundef zeroext %4) #3 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  %23 = zext i1 %4 to i8
  store i8 %23, ptr %10, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %27, label %26

26:                                               ; preds = %5
  call void @abort() #6
  unreachable

27:                                               ; preds = %5
  %28 = load i64, ptr %8, align 8, !tbaa !9
  %29 = icmp eq i64 %28, 1
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  call void @abort() #6
  unreachable

31:                                               ; preds = %27
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %32, i32 0, i32 0
  %34 = load i64, ptr %33, align 8, !tbaa !13
  store volatile i64 %34, ptr %11, align 8, !tbaa !9
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %35, i32 0, i32 1
  %37 = load i64, ptr %36, align 8, !tbaa !16
  store volatile i64 %37, ptr %12, align 8, !tbaa !9
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %38, i32 0, i32 2
  %40 = load i64, ptr %39, align 8, !tbaa !17
  store volatile i64 %40, ptr %13, align 8, !tbaa !9
  %41 = load volatile i64, ptr %11, align 8, !tbaa !9
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %42, i32 0, i32 0
  %44 = load i64, ptr %43, align 8, !tbaa !13
  %45 = icmp eq i64 %41, %44
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef @.str.13, ptr noundef %46)
  %47 = load volatile i64, ptr %12, align 8, !tbaa !9
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %48, i32 0, i32 1
  %50 = load i64, ptr %49, align 8, !tbaa !16
  %51 = icmp eq i64 %47, %50
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %51, ptr noundef @.str.13, ptr noundef %52)
  %53 = load volatile i64, ptr %13, align 8, !tbaa !9
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %54, i32 0, i32 2
  %56 = load i64, ptr %55, align 8, !tbaa !17
  %57 = icmp eq i64 %53, %56
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %57, ptr noundef @.str.13, ptr noundef %58)
  %59 = load volatile i64, ptr %11, align 8, !tbaa !9
  %60 = icmp sge i64 %59, 0
  br i1 %60, label %61, label %64

61:                                               ; preds = %31
  %62 = load volatile i64, ptr %12, align 8, !tbaa !9
  %63 = icmp sge i64 %62, 0
  br label %64

64:                                               ; preds = %61, %31
  %65 = phi i1 [ false, %31 ], [ %63, %61 ]
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %65, ptr noundef @.str.14, ptr noundef %66)
  %67 = load i64, ptr %8, align 8, !tbaa !9
  %68 = icmp eq i64 %67, 1
  br i1 %68, label %69, label %214

69:                                               ; preds = %64
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %70, i32 0, i32 0
  %72 = load i64, ptr %71, align 8, !tbaa !13
  %73 = icmp eq i64 %72, 0
  br i1 %73, label %79, label %74

74:                                               ; preds = %69
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %75, i32 0, i32 1
  %77 = load i64, ptr %76, align 8, !tbaa !16
  %78 = icmp eq i64 %77, 0
  br i1 %78, label %79, label %87

79:                                               ; preds = %74, %69
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %81, i32 0, i32 3
  %83 = load i64, ptr %82, align 8, !tbaa !18
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = load i8, ptr %10, align 1, !tbaa !11, !range !19, !noundef !20
  %86 = trunc i8 %85 to i1
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %80, i64 noundef 0, i64 noundef 0, i64 noundef %83, ptr noundef %84, i1 noundef zeroext %86)
  store i32 1, ptr %19, align 4
  br label %215

87:                                               ; preds = %74
  %88 = load volatile i64, ptr %13, align 8, !tbaa !9
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %89, i32 0, i32 3
  %91 = load i64, ptr %90, align 8, !tbaa !18
  %92 = call noundef i64 @_ZN11alglib_impl9ae_sizeofEl(i64 noundef %91)
  %93 = mul nsw i64 %88, %92
  store i64 %93, ptr %17, align 8, !tbaa !9
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %94, i32 0, i32 6
  %96 = load ptr, ptr %95, align 8, !tbaa !21
  %97 = call noundef i64 @_ZN11alglib_impl15ae_misalignmentEPKvm(ptr noundef %96, i64 noundef 64)
  %98 = icmp ne i64 %97, 0
  br i1 %98, label %103, label %99

99:                                               ; preds = %87
  %100 = load i64, ptr %17, align 8, !tbaa !9
  %101 = srem i64 %100, 64
  %102 = icmp ne i64 %101, 0
  br i1 %102, label %103, label %161

103:                                              ; preds = %99, %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %105, i32 0, i32 0
  %107 = load i64, ptr %106, align 8, !tbaa !13
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %108, i32 0, i32 1
  %110 = load i64, ptr %109, align 8, !tbaa !16
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %111, i32 0, i32 3
  %113 = load i64, ptr %112, align 8, !tbaa !18
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = load i8, ptr %10, align 1, !tbaa !11, !range !19, !noundef !20
  %116 = trunc i8 %115 to i1
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %104, i64 noundef %107, i64 noundef %110, i64 noundef %113, ptr noundef %114, i1 noundef zeroext %116)
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %117, i32 0, i32 2
  %119 = load i64, ptr %118, align 8, !tbaa !22
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %120, i32 0, i32 3
  %122 = load i64, ptr %121, align 8, !tbaa !18
  %123 = call noundef i64 @_ZN11alglib_impl9ae_sizeofEl(i64 noundef %122)
  %124 = mul nsw i64 %119, %123
  store i64 %124, ptr %20, align 8, !tbaa !9
  %125 = load ptr, ptr %7, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %125, i32 0, i32 6
  %127 = load ptr, ptr %126, align 8, !tbaa !21
  store ptr %127, ptr %14, align 8, !tbaa !5
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %128, i32 0, i32 6
  %130 = load ptr, ptr %129, align 8, !tbaa !21
  %131 = getelementptr inbounds ptr, ptr %130, i64 0
  %132 = load ptr, ptr %131, align 8, !tbaa !5
  store ptr %132, ptr %15, align 8, !tbaa !5
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %133, i32 0, i32 3
  %135 = load i64, ptr %134, align 8, !tbaa !18
  %136 = call noundef i64 @_ZN11alglib_impl9ae_sizeofEl(i64 noundef %135)
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %137, i32 0, i32 1
  %139 = load i64, ptr %138, align 8, !tbaa !16
  %140 = mul nsw i64 %136, %139
  store i64 %140, ptr %16, align 8, !tbaa !9
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %141

141:                                              ; preds = %151, %103
  %142 = load i64, ptr %18, align 8, !tbaa !9
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %143, i32 0, i32 0
  %145 = load i64, ptr %144, align 8, !tbaa !13
  %146 = icmp slt i64 %142, %145
  br i1 %146, label %147, label %160

147:                                              ; preds = %141
  %148 = load ptr, ptr %15, align 8, !tbaa !5
  %149 = load ptr, ptr %14, align 8, !tbaa !5
  %150 = load i64, ptr %16, align 8, !tbaa !9
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %148, ptr align 1 %149, i64 %150, i1 false)
  br label %151

151:                                              ; preds = %147
  %152 = load i64, ptr %18, align 8, !tbaa !9
  %153 = add nsw i64 %152, 1
  store i64 %153, ptr %18, align 8, !tbaa !9
  %154 = load i64, ptr %17, align 8, !tbaa !9
  %155 = load ptr, ptr %14, align 8, !tbaa !5
  %156 = getelementptr inbounds i8, ptr %155, i64 %154
  store ptr %156, ptr %14, align 8, !tbaa !5
  %157 = load i64, ptr %20, align 8, !tbaa !9
  %158 = load ptr, ptr %15, align 8, !tbaa !5
  %159 = getelementptr inbounds i8, ptr %158, i64 %157
  store ptr %159, ptr %15, align 8, !tbaa !5
  br label %141, !llvm.loop !25

160:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %213

161:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %162, i32 0, i32 5
  %164 = load volatile i64, ptr %11, align 8, !tbaa !9
  %165 = mul nsw i64 %164, 8
  %166 = load ptr, ptr %9, align 8, !tbaa !5
  %167 = load i8, ptr %10, align 1, !tbaa !11, !range !19, !noundef !20
  %168 = trunc i8 %167 to i1
  call void @_ZN11alglib_impl10ae_db_initEPNS_12ae_dyn_blockElPNS_8ae_stateEb(ptr noundef %163, i64 noundef %165, ptr noundef %166, i1 noundef zeroext %168)
  %169 = load ptr, ptr %6, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %169, i32 0, i32 4
  store i8 1, ptr %170, align 8, !tbaa !27
  %171 = load volatile i64, ptr %11, align 8, !tbaa !9
  %172 = load ptr, ptr %6, align 8, !tbaa !5
  %173 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %172, i32 0, i32 0
  store i64 %171, ptr %173, align 8, !tbaa !28
  %174 = load volatile i64, ptr %12, align 8, !tbaa !9
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %175, i32 0, i32 1
  store i64 %174, ptr %176, align 8, !tbaa !29
  %177 = load volatile i64, ptr %13, align 8, !tbaa !9
  %178 = load ptr, ptr %6, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %178, i32 0, i32 2
  store i64 %177, ptr %179, align 8, !tbaa !22
  %180 = load ptr, ptr %7, align 8, !tbaa !5
  %181 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %180, i32 0, i32 3
  %182 = load i64, ptr %181, align 8, !tbaa !18
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  %184 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %183, i32 0, i32 3
  store i64 %182, ptr %184, align 8, !tbaa !30
  %185 = load ptr, ptr %7, align 8, !tbaa !5
  %186 = getelementptr inbounds %"struct.alglib_impl::x_matrix", ptr %185, i32 0, i32 6
  %187 = load ptr, ptr %186, align 8, !tbaa !21
  store ptr %187, ptr %21, align 8, !tbaa !5
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %188, i32 0, i32 5
  %190 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %189, i32 0, i32 2
  %191 = load volatile ptr, ptr %190, align 8, !tbaa !31
  store ptr %191, ptr %22, align 8, !tbaa !5
  %192 = load ptr, ptr %22, align 8, !tbaa !5
  %193 = load ptr, ptr %6, align 8, !tbaa !5
  %194 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %193, i32 0, i32 6
  store ptr %192, ptr %194, align 8, !tbaa !21
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %195

195:                                              ; preds = %206, %161
  %196 = load i64, ptr %18, align 8, !tbaa !9
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %197, i32 0, i32 0
  %199 = load i64, ptr %198, align 8, !tbaa !28
  %200 = icmp slt i64 %196, %199
  br i1 %200, label %201, label %212

201:                                              ; preds = %195
  %202 = load ptr, ptr %21, align 8, !tbaa !5
  %203 = load ptr, ptr %22, align 8, !tbaa !5
  %204 = load i64, ptr %18, align 8, !tbaa !9
  %205 = getelementptr inbounds ptr, ptr %203, i64 %204
  store ptr %202, ptr %205, align 8, !tbaa !5
  br label %206

206:                                              ; preds = %201
  %207 = load i64, ptr %18, align 8, !tbaa !9
  %208 = add nsw i64 %207, 1
  store i64 %208, ptr %18, align 8, !tbaa !9
  %209 = load i64, ptr %17, align 8, !tbaa !9
  %210 = load ptr, ptr %21, align 8, !tbaa !5
  %211 = getelementptr inbounds i8, ptr %210, i64 %209
  store ptr %211, ptr %21, align 8, !tbaa !5
  br label %195, !llvm.loop !32

212:                                              ; preds = %195
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %213

213:                                              ; preds = %212, %160
  store i32 1, ptr %19, align 4
  br label %215

214:                                              ; preds = %64
  store i32 0, ptr %19, align 4
  br label %215

215:                                              ; preds = %214, %213, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  %216 = load i32, ptr %19, align 4
  switch i32 %216, label %218 [
    i32 0, label %217
    i32 1, label %217
  ]

217:                                              ; preds = %215, %215
  ret void

218:                                              ; preds = %215
  unreachable
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN11alglib_impl8x_matrixE", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !7, i64 48}
!15 = !{!"long long", !7, i64 0}
!16 = !{!14, !15, i64 8}
!17 = !{!14, !15, i64 16}
!18 = !{!14, !15, i64 24}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !10, i64 16}
!23 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !12, i64 32, !24, i64 40, !7, i64 72}
!24 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!23, !12, i64 32}
!28 = !{!23, !10, i64 0}
!29 = !{!23, !10, i64 8}
!30 = !{!23, !10, i64 24}
!31 = !{!23, !6, i64 56}
!32 = distinct !{!32, !26}


; 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.13 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [42 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11alglib_impl15ae_misalignmentEPKvm(ptr noundef, i64 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11alglib_impl9ae_sizeofEl(i64 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare dso_local 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 #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22ae_matrix_init_from_x2EPNS_9ae_matrixEPNS_8x_matrixElPNS_8ae_stateEb(ptr noundef %0, ptr nocapture noundef readonly %1, i64 noundef %2, ptr noundef %3, i1 noundef zeroext %4) local_unnamed_addr #3 {
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8)
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %9, label %10

9:                                                ; preds = %5
  tail call void @abort() #5
  unreachable

10:                                               ; preds = %5
  %11 = icmp eq i64 %2, 1
  br i1 %11, label %13, label %12

12:                                               ; preds = %10
  tail call void @abort() #5
  unreachable

13:                                               ; preds = %10
  %14 = load i64, ptr %1, align 8, !tbaa !5
  store volatile i64 %14, ptr %6, align 8, !tbaa !10
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  %16 = load i64, ptr %15, align 8, !tbaa !12
  store volatile i64 %16, ptr %7, align 8, !tbaa !10
  %17 = getelementptr inbounds i8, ptr %1, i64 16
  %18 = load i64, ptr %17, align 8, !tbaa !13
  store volatile i64 %18, ptr %8, align 8, !tbaa !10
  %.0..0..0..0.23 = load volatile i64, ptr %6, align 8, !tbaa !10
  %19 = icmp eq i64 %.0..0..0..0.23, %14
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.13, ptr noundef nonnull %3)
  %.0..0..0..0.20 = load volatile i64, ptr %7, align 8, !tbaa !10
  %20 = load i64, ptr %15, align 8, !tbaa !12
  %21 = icmp eq i64 %.0..0..0..0.20, %20
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef nonnull @.str.13, ptr noundef nonnull %3)
  %.0..0..0..0.17 = load volatile i64, ptr %8, align 8, !tbaa !10
  %22 = load i64, ptr %17, align 8, !tbaa !13
  %23 = icmp eq i64 %.0..0..0..0.17, %22
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %23, ptr noundef nonnull @.str.13, ptr noundef nonnull %3)
  %.0..0..0..0.24 = load volatile i64, ptr %6, align 8, !tbaa !10
  %24 = icmp sgt i64 %.0..0..0..0.24, -1
  br i1 %24, label %25, label %27

25:                                               ; preds = %13
  %.0..0..0..0.21 = load volatile i64, ptr %7, align 8, !tbaa !10
  %26 = icmp sgt i64 %.0..0..0..0.21, -1
  br label %27

27:                                               ; preds = %25, %13
  %28 = phi i1 [ false, %13 ], [ %26, %25 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %28, ptr noundef nonnull @.str.14, ptr noundef nonnull %3)
  %29 = load i64, ptr %1, align 8, !tbaa !5
  %30 = icmp eq i64 %29, 0
  br i1 %30, label %34, label %31

31:                                               ; preds = %27
  %32 = load i64, ptr %15, align 8, !tbaa !12
  %33 = icmp eq i64 %32, 0
  br i1 %33, label %34, label %37

34:                                               ; preds = %31, %27
  %35 = getelementptr inbounds i8, ptr %1, i64 24
  %36 = load i64, ptr %35, align 8, !tbaa !14
  tail call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %0, i64 noundef 0, i64 noundef 0, i64 noundef %36, ptr noundef nonnull %3, i1 noundef zeroext %4)
  br label %.loopexit

37:                                               ; preds = %31
  %.0..0..0..0.18 = load volatile i64, ptr %8, align 8, !tbaa !10
  %38 = getelementptr inbounds i8, ptr %1, i64 24
  %39 = load i64, ptr %38, align 8, !tbaa !14
  %40 = tail call noundef i64 @_ZN11alglib_impl9ae_sizeofEl(i64 noundef %39)
  %41 = mul nsw i64 %40, %.0..0..0..0.18
  %42 = getelementptr inbounds i8, ptr %1, i64 48
  %43 = load ptr, ptr %42, align 8, !tbaa !15
  %44 = tail call noundef i64 @_ZN11alglib_impl15ae_misalignmentEPKvm(ptr noundef %43, i64 noundef 64)
  %.not78 = icmp eq i64 %44, 0
  %45 = and i64 %41, 63
  %.not79 = icmp eq i64 %45, 0
  %or.cond = select i1 %.not78, i1 %.not79, i1 false
  br i1 %or.cond, label %70, label %46

46:                                               ; preds = %37
  %47 = load i64, ptr %1, align 8, !tbaa !5
  %48 = load i64, ptr %15, align 8, !tbaa !12
  %49 = load i64, ptr %38, align 8, !tbaa !14
  tail call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %0, i64 noundef %47, i64 noundef %48, i64 noundef %49, ptr noundef nonnull %3, i1 noundef zeroext %4)
  %50 = getelementptr inbounds i8, ptr %0, i64 16
  %51 = load i64, ptr %50, align 8, !tbaa !16
  %52 = load i64, ptr %38, align 8, !tbaa !14
  %53 = tail call noundef i64 @_ZN11alglib_impl9ae_sizeofEl(i64 noundef %52)
  %54 = mul nsw i64 %53, %51
  %55 = load ptr, ptr %42, align 8, !tbaa !15
  %56 = getelementptr inbounds i8, ptr %0, i64 72
  %57 = load ptr, ptr %56, align 8, !tbaa !15
  %58 = load ptr, ptr %57, align 8, !tbaa !21
  %59 = load i64, ptr %38, align 8, !tbaa !14
  %60 = tail call noundef i64 @_ZN11alglib_impl9ae_sizeofEl(i64 noundef %59)
  %61 = load i64, ptr %15, align 8, !tbaa !12
  %62 = mul nsw i64 %61, %60
  %63 = load i64, ptr %1, align 8, !tbaa !5
  %64 = icmp sgt i64 %63, 0
  br i1 %64, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %46, %.lr.ph
  %.083 = phi ptr [ %66, %.lr.ph ], [ %55, %46 ]
  %.07582 = phi ptr [ %67, %.lr.ph ], [ %58, %46 ]
  %.07681 = phi i64 [ %65, %.lr.ph ], [ 0, %46 ]
  tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %.07582, ptr align 1 %.083, i64 %62, i1 false)
  %65 = add nuw nsw i64 %.07681, 1
  %66 = getelementptr inbounds i8, ptr %.083, i64 %41
  %67 = getelementptr inbounds i8, ptr %.07582, i64 %54
  %68 = load i64, ptr %1, align 8, !tbaa !5
  %69 = icmp slt i64 %65, %68
  br i1 %69, label %.lr.ph, label %.loopexit, !llvm.loop !22

70:                                               ; preds = %37
  %71 = getelementptr inbounds i8, ptr %0, i64 40
  %.0..0..0..0.25 = load volatile i64, ptr %6, align 8, !tbaa !10
  %72 = shl nsw i64 %.0..0..0..0.25, 3
  tail call void @_ZN11alglib_impl10ae_db_initEPNS_12ae_dyn_blockElPNS_8ae_stateEb(ptr noundef nonnull %71, i64 noundef %72, ptr noundef nonnull %3, i1 noundef zeroext %4)
  %73 = getelementptr inbounds i8, ptr %0, i64 32
  store i8 1, ptr %73, align 8, !tbaa !24
  %.0..0..0..0.26 = load volatile i64, ptr %6, align 8, !tbaa !10
  store i64 %.0..0..0..0.26, ptr %0, align 8, !tbaa !25
  %.0..0..0..0.22 = load volatile i64, ptr %7, align 8, !tbaa !10
  %74 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %.0..0..0..0.22, ptr %74, align 8, !tbaa !26
  %.0..0..0..0.19 = load volatile i64, ptr %8, align 8, !tbaa !10
  %75 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 %.0..0..0..0.19, ptr %75, align 8, !tbaa !16
  %76 = load i64, ptr %38, align 8, !tbaa !14
  %77 = getelementptr inbounds i8, ptr %0, i64 24
  store i64 %76, ptr %77, align 8, !tbaa !27
  %78 = load ptr, ptr %42, align 8, !tbaa !15
  %79 = getelementptr inbounds i8, ptr %0, i64 56
  %80 = load volatile ptr, ptr %79, align 8, !tbaa !28
  %81 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %80, ptr %81, align 8, !tbaa !15
  %82 = icmp sgt i64 %.0..0..0..0.26, 0
  br i1 %82, label %.lr.ph86.preheader, label %.loopexit

.lr.ph86.preheader:                               ; preds = %70
  %xtraiter = and i64 %.0..0..0..0.26, 7
  %83 = icmp ult i64 %.0..0..0..0.26, 8
  br i1 %83, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph86.preheader.new

.lr.ph86.preheader.new:                           ; preds = %.lr.ph86.preheader
  %unroll_iter = and i64 %.0..0..0..0.26, 9223372036854775800
  br label %.lr.ph86

.lr.ph86:                                         ; preds = %.lr.ph86, %.lr.ph86.preheader.new
  %.07485 = phi ptr [ %78, %.lr.ph86.preheader.new ], [ %107, %.lr.ph86 ]
  %.184 = phi i64 [ 0, %.lr.ph86.preheader.new ], [ %106, %.lr.ph86 ]
  %niter = phi i64 [ 0, %.lr.ph86.preheader.new ], [ %niter.next.7, %.lr.ph86 ]
  %84 = getelementptr inbounds ptr, ptr %80, i64 %.184
  store ptr %.07485, ptr %84, align 8, !tbaa !21
  %85 = or disjoint i64 %.184, 1
  %86 = getelementptr inbounds i8, ptr %.07485, i64 %41
  %87 = getelementptr inbounds ptr, ptr %80, i64 %85
  store ptr %86, ptr %87, align 8, !tbaa !21
  %88 = or disjoint i64 %.184, 2
  %89 = getelementptr inbounds i8, ptr %86, i64 %41
  %90 = getelementptr inbounds ptr, ptr %80, i64 %88
  store ptr %89, ptr %90, align 8, !tbaa !21
  %91 = or disjoint i64 %.184, 3
  %92 = getelementptr inbounds i8, ptr %89, i64 %41
  %93 = getelementptr inbounds ptr, ptr %80, i64 %91
  store ptr %92, ptr %93, align 8, !tbaa !21
  %94 = or disjoint i64 %.184, 4
  %95 = getelementptr inbounds i8, ptr %92, i64 %41
  %96 = getelementptr inbounds ptr, ptr %80, i64 %94
  store ptr %95, ptr %96, align 8, !tbaa !21
  %97 = or disjoint i64 %.184, 5
  %98 = getelementptr inbounds i8, ptr %95, i64 %41
  %99 = getelementptr inbounds ptr, ptr %80, i64 %97
  store ptr %98, ptr %99, align 8, !tbaa !21
  %100 = or disjoint i64 %.184, 6
  %101 = getelementptr inbounds i8, ptr %98, i64 %41
  %102 = getelementptr inbounds ptr, ptr %80, i64 %100
  store ptr %101, ptr %102, align 8, !tbaa !21
  %103 = or disjoint i64 %.184, 7
  %104 = getelementptr inbounds i8, ptr %101, i64 %41
  %105 = getelementptr inbounds ptr, ptr %80, i64 %103
  store ptr %104, ptr %105, align 8, !tbaa !21
  %106 = add nuw nsw i64 %.184, 8
  %107 = getelementptr inbounds i8, ptr %104, i64 %41
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph86, !llvm.loop !29

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph86, %.lr.ph86.preheader
  %.07485.unr = phi ptr [ %78, %.lr.ph86.preheader ], [ %107, %.lr.ph86 ]
  %.184.unr = phi i64 [ 0, %.lr.ph86.preheader ], [ %106, %.lr.ph86 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.lr.ph86.epil

.lr.ph86.epil:                                    ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph86.epil
  %.07485.epil = phi ptr [ %110, %.lr.ph86.epil ], [ %.07485.unr, %.loopexit.loopexit.unr-lcssa ]
  %.184.epil = phi i64 [ %109, %.lr.ph86.epil ], [ %.184.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph86.epil ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %108 = getelementptr inbounds ptr, ptr %80, i64 %.184.epil
  store ptr %.07485.epil, ptr %108, align 8, !tbaa !21
  %109 = add nuw nsw i64 %.184.epil, 1
  %110 = getelementptr inbounds i8, ptr %.07485.epil, i64 %41
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.lr.ph86.epil, !llvm.loop !30

.loopexit:                                        ; preds = %.lr.ph, %.loopexit.loopexit.unr-lcssa, %.lr.ph86.epil, %46, %70, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6)
  ret void
}

attributes #0 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nounwind 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { noreturn 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, !7, i64 0}
!6 = !{!"_ZTSN11alglib_impl8x_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !8, i64 48}
!7 = !{!"long long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!6, !7, i64 8}
!13 = !{!6, !7, i64 16}
!14 = !{!6, !7, i64 24}
!15 = !{!8, !8, i64 0}
!16 = !{!17, !11, i64 16}
!17 = !{!"_ZTSN11alglib_impl9ae_matrixE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !18, i64 32, !19, i64 40, !8, i64 72}
!18 = !{!"bool", !8, i64 0}
!19 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !20, i64 0, !20, i64 8, !20, i64 16, !20, i64 24}
!20 = !{!"any pointer", !8, i64 0}
!21 = !{!20, !20, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!17, !18, i64 32}
!25 = !{!17, !11, i64 0}
!26 = !{!17, !11, i64 8}
!27 = !{!17, !11, i64 24}
!28 = !{!17, !20, i64 56}
!29 = distinct !{!29, !23}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.unroll.disable"}


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