; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (alglibinternal)

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

; 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_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl25hpcpreparechunkedgradientEPNS_9ae_vectorEllllPNS_10mlpbuffersEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6) #2 {
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i64 %1, ptr %9, align 8, !tbaa !9
  store i64 %2, ptr %10, align 8, !tbaa !9
  store i64 %3, ptr %11, align 8, !tbaa !9
  store i64 %4, ptr %12, align 8, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, 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
  store i64 4, ptr %17, align 8, !tbaa !9
  %18 = load i64, ptr %17, align 8, !tbaa !9
  %19 = mul nsw i64 3, %18
  %20 = load i64, ptr %10, align 8, !tbaa !9
  %21 = mul nsw i64 %19, %20
  %22 = load i64, ptr %17, align 8, !tbaa !9
  %23 = load i64, ptr %12, align 8, !tbaa !9
  %24 = mul nsw i64 2, %23
  %25 = add nsw i64 %24, 1
  %26 = mul nsw i64 %22, %25
  %27 = add nsw i64 %21, %26
  store i64 %27, ptr %16, align 8, !tbaa !9
  %28 = load ptr, ptr %13, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %28, i32 0, i32 7
  %30 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %29, i32 0, i32 0
  %31 = load i64, ptr %30, align 8, !tbaa !11
  %32 = load i64, ptr %17, align 8, !tbaa !9
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %43, label %34

34:                                               ; preds = %7
  %35 = load ptr, ptr %13, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %35, i32 0, i32 7
  %37 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %36, i32 0, i32 1
  %38 = load i64, ptr %37, align 8, !tbaa !18
  %39 = load i64, ptr %11, align 8, !tbaa !9
  %40 = load i64, ptr %12, align 8, !tbaa !9
  %41 = add nsw i64 %39, %40
  %42 = icmp slt i64 %38, %41
  br i1 %42, label %43, label %51

43:                                               ; preds = %34, %7
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %44, i32 0, i32 7
  %46 = load i64, ptr %17, align 8, !tbaa !9
  %47 = load i64, ptr %11, align 8, !tbaa !9
  %48 = load i64, ptr %12, align 8, !tbaa !9
  %49 = add nsw i64 %47, %48
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %45, i64 noundef %46, i64 noundef %49, ptr noundef %50)
  br label %51

51:                                               ; preds = %43, %34
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %52, i32 0, i32 8
  %54 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %53, i32 0, i32 0
  %55 = load i64, ptr %54, align 8, !tbaa !19
  %56 = load i64, ptr %17, align 8, !tbaa !9
  %57 = icmp slt i64 %55, %56
  br i1 %57, label %67, label %58

58:                                               ; preds = %51
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %59, i32 0, i32 8
  %61 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %60, i32 0, i32 1
  %62 = load i64, ptr %61, align 8, !tbaa !20
  %63 = load i64, ptr %11, align 8, !tbaa !9
  %64 = load i64, ptr %12, align 8, !tbaa !9
  %65 = add nsw i64 %63, %64
  %66 = icmp slt i64 %62, %65
  br i1 %66, label %67, label %75

67:                                               ; preds = %58, %51
  %68 = load ptr, ptr %13, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %68, i32 0, i32 8
  %70 = load i64, ptr %17, align 8, !tbaa !9
  %71 = load i64, ptr %11, align 8, !tbaa !9
  %72 = load i64, ptr %12, align 8, !tbaa !9
  %73 = add nsw i64 %71, %72
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %69, i64 noundef %70, i64 noundef %73, ptr noundef %74)
  br label %75

75:                                               ; preds = %67, %58
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %76, i32 0, i32 9
  %78 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %77, i32 0, i32 0
  %79 = load i64, ptr %78, align 8, !tbaa !21
  %80 = load i64, ptr %11, align 8, !tbaa !9
  %81 = load i64, ptr %12, align 8, !tbaa !9
  %82 = add nsw i64 %80, %81
  %83 = icmp slt i64 %79, %82
  br i1 %83, label %84, label %91

84:                                               ; preds = %75
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %85, i32 0, i32 9
  %87 = load i64, ptr %11, align 8, !tbaa !9
  %88 = load i64, ptr %12, align 8, !tbaa !9
  %89 = add nsw i64 %87, %88
  %90 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %86, i64 noundef %89, ptr noundef %90)
  br label %91

91:                                               ; preds = %84, %75
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %92, i32 0, i32 10
  %94 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %93, i32 0, i32 0
  %95 = load i64, ptr %94, align 8, !tbaa !22
  %96 = load i64, ptr %11, align 8, !tbaa !9
  %97 = icmp slt i64 %95, %96
  br i1 %97, label %98, label %103

98:                                               ; preds = %91
  %99 = load ptr, ptr %13, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %99, i32 0, i32 10
  %101 = load i64, ptr %11, align 8, !tbaa !9
  %102 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %100, i64 noundef %101, ptr noundef %102)
  br label %103

103:                                              ; preds = %98, %91
  %104 = load ptr, ptr %13, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %104, i32 0, i32 11
  %106 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %105, i32 0, i32 0
  %107 = load i64, ptr %106, align 8, !tbaa !23
  %108 = load i64, ptr %12, align 8, !tbaa !9
  %109 = icmp slt i64 %107, %108
  br i1 %109, label %110, label %115

110:                                              ; preds = %103
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %111, i32 0, i32 11
  %113 = load i64, ptr %12, align 8, !tbaa !9
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %112, i64 noundef %113, ptr noundef %114)
  br label %115

115:                                              ; preds = %110, %103
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %116, i32 0, i32 12
  %118 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %117, i32 0, i32 0
  %119 = load i64, ptr %118, align 8, !tbaa !24
  %120 = load i64, ptr %12, align 8, !tbaa !9
  %121 = icmp slt i64 %119, %120
  br i1 %121, label %122, label %127

122:                                              ; preds = %115
  %123 = load ptr, ptr %13, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %123, i32 0, i32 12
  %125 = load i64, ptr %12, align 8, !tbaa !9
  %126 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %124, i64 noundef %125, ptr noundef %126)
  br label %127

127:                                              ; preds = %122, %115
  %128 = load ptr, ptr %13, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %128, i32 0, i32 5
  %130 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %129, i32 0, i32 0
  %131 = load i64, ptr %130, align 8, !tbaa !25
  %132 = load i64, ptr %16, align 8, !tbaa !9
  %133 = icmp slt i64 %131, %132
  br i1 %133, label %134, label %139

134:                                              ; preds = %127
  %135 = load ptr, ptr %13, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %135, i32 0, i32 5
  %137 = load i64, ptr %16, align 8, !tbaa !9
  %138 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %136, i64 noundef %137, ptr noundef %138)
  br label %139

139:                                              ; preds = %134, %127
  %140 = load ptr, ptr %13, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %140, i32 0, i32 6
  %142 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %141, i32 0, i32 0
  %143 = load i64, ptr %142, align 8, !tbaa !26
  %144 = load i64, ptr %9, align 8, !tbaa !9
  %145 = icmp slt i64 %143, %144
  br i1 %145, label %146, label %151

146:                                              ; preds = %139
  %147 = load ptr, ptr %13, align 8, !tbaa !5
  %148 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %147, i32 0, i32 6
  %149 = load i64, ptr %9, align 8, !tbaa !9
  %150 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %148, i64 noundef %149, ptr noundef %150)
  br label %151

151:                                              ; preds = %146, %139
  %152 = load ptr, ptr %13, align 8, !tbaa !5
  %153 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %152, i32 0, i32 14
  %154 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %153, i32 0, i32 0
  %155 = load i64, ptr %154, align 8, !tbaa !27
  %156 = load i64, ptr %9, align 8, !tbaa !9
  %157 = icmp slt i64 %155, %156
  br i1 %157, label %158, label %163

158:                                              ; preds = %151
  %159 = load ptr, ptr %13, align 8, !tbaa !5
  %160 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %159, i32 0, i32 14
  %161 = load i64, ptr %9, align 8, !tbaa !9
  %162 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %160, i64 noundef %161, ptr noundef %162)
  br label %163

163:                                              ; preds = %158, %151
  %164 = load ptr, ptr %8, align 8, !tbaa !5
  %165 = load i64, ptr %9, align 8, !tbaa !9
  %166 = load ptr, ptr %13, align 8, !tbaa !5
  %167 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %166, i32 0, i32 6
  %168 = load ptr, ptr %14, align 8, !tbaa !5
  %169 = call noundef zeroext i1 @_ZN11alglib_implL35hpccores_hpcpreparechunkedgradientxEPNS_9ae_vectorElS1_PNS_8ae_stateE(ptr noundef %164, i64 noundef %165, ptr noundef %167, ptr noundef %168)
  br i1 %169, label %187, label %170

170:                                              ; preds = %163
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %171

171:                                              ; preds = %183, %170
  %172 = load i64, ptr %15, align 8, !tbaa !9
  %173 = load i64, ptr %9, align 8, !tbaa !9
  %174 = sub nsw i64 %173, 1
  %175 = icmp sle i64 %172, %174
  br i1 %175, label %176, label %186

176:                                              ; preds = %171
  %177 = load ptr, ptr %13, align 8, !tbaa !5
  %178 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %177, i32 0, i32 6
  %179 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %178, i32 0, i32 4
  %180 = load ptr, ptr %179, align 8, !tbaa !28
  %181 = load i64, ptr %15, align 8, !tbaa !9
  %182 = getelementptr inbounds double, ptr %180, i64 %181
  store double 0.000000e+00, ptr %182, align 8, !tbaa !29
  br label %183

183:                                              ; preds = %176
  %184 = load i64, ptr %15, align 8, !tbaa !9
  %185 = add nsw i64 %184, 1
  store i64 %185, ptr %15, align 8, !tbaa !9
  br label %171, !llvm.loop !30

186:                                              ; preds = %171
  br label %187

187:                                              ; preds = %186, %163
  %188 = load i64, ptr %9, align 8, !tbaa !9
  %189 = load ptr, ptr %13, align 8, !tbaa !5
  %190 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %189, i32 0, i32 4
  store i64 %188, ptr %190, align 8, !tbaa !32
  %191 = load i64, ptr %10, align 8, !tbaa !9
  %192 = load ptr, ptr %13, align 8, !tbaa !5
  %193 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %192, i32 0, i32 1
  store i64 %191, ptr %193, align 8, !tbaa !33
  %194 = load i64, ptr %11, align 8, !tbaa !9
  %195 = load ptr, ptr %13, align 8, !tbaa !5
  %196 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %195, i32 0, i32 2
  store i64 %194, ptr %196, align 8, !tbaa !34
  %197 = load i64, ptr %12, align 8, !tbaa !9
  %198 = load ptr, ptr %13, align 8, !tbaa !5
  %199 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %198, i32 0, i32 3
  store i64 %197, ptr %199, align 8, !tbaa !35
  %200 = load i64, ptr %17, align 8, !tbaa !9
  %201 = load ptr, ptr %13, align 8, !tbaa !5
  %202 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %201, i32 0, i32 0
  store i64 %200, ptr %202, align 8, !tbaa !36
  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 8, ptr %15) #4
  ret void
}

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

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 = { 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 #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 168}
!12 = !{!"_ZTSN11alglib_impl10mlpbuffersE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !13, i64 40, !13, i64 104, !16, i64 168, !16, i64 248, !13, i64 328, !13, i64 392, !13, i64 456, !13, i64 520, !17, i64 584, !13, i64 592, !13, i64 656}
!13 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !14, i64 16, !15, i64 24, !7, i64 56}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !14, i64 32, !15, i64 40, !7, i64 72}
!17 = !{!"double", !7, i64 0}
!18 = !{!12, !10, i64 176}
!19 = !{!12, !10, i64 248}
!20 = !{!12, !10, i64 256}
!21 = !{!12, !10, i64 328}
!22 = !{!12, !10, i64 392}
!23 = !{!12, !10, i64 456}
!24 = !{!12, !10, i64 520}
!25 = !{!12, !10, i64 40}
!26 = !{!12, !10, i64 104}
!27 = !{!12, !10, i64 592}
!28 = !{!7, !7, i64 0}
!29 = !{!17, !17, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!12, !10, i64 32}
!33 = !{!12, !10, i64 8}
!34 = !{!12, !10, i64 16}
!35 = !{!12, !10, i64 24}
!36 = !{!12, !10, i64 0}


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

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

declare void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_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_impl25hpcpreparechunkedgradientEPNS_9ae_vectorEllllPNS_10mlpbuffersEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #1 {
  %8 = mul nsw i64 %2, 12
  %9 = shl i64 %4, 3
  %10 = add i64 %8, 4
  %11 = add i64 %10, %9
  %12 = getelementptr inbounds i8, ptr %5, i64 168
  %13 = load i64, ptr %12, align 8, !tbaa !5
  %14 = icmp slt i64 %13, 4
  br i1 %14, label %._crit_edge87, label %15

._crit_edge87:                                    ; preds = %7
  %.pre = add nsw i64 %4, %3
  br label %20

15:                                               ; preds = %7
  %16 = getelementptr inbounds i8, ptr %5, i64 176
  %17 = load i64, ptr %16, align 8, !tbaa !16
  %18 = add nsw i64 %4, %3
  %19 = icmp slt i64 %17, %18
  br i1 %19, label %20, label %21

20:                                               ; preds = %._crit_edge87, %15
  %.pre-phi88 = phi i64 [ %.pre, %._crit_edge87 ], [ %18, %15 ]
  tail call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef 4, i64 noundef %.pre-phi88, ptr noundef %6)
  br label %21

21:                                               ; preds = %20, %15
  %22 = getelementptr inbounds i8, ptr %5, i64 248
  %23 = load i64, ptr %22, align 8, !tbaa !17
  %24 = icmp slt i64 %23, 4
  br i1 %24, label %._crit_edge, label %25

._crit_edge:                                      ; preds = %21
  %.pre89 = add nsw i64 %4, %3
  br label %30

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %5, i64 256
  %27 = load i64, ptr %26, align 8, !tbaa !18
  %28 = add nsw i64 %4, %3
  %29 = icmp slt i64 %27, %28
  br i1 %29, label %30, label %31

30:                                               ; preds = %._crit_edge, %25
  %.pre-phi90 = phi i64 [ %.pre89, %._crit_edge ], [ %28, %25 ]
  tail call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %22, i64 noundef 4, i64 noundef %.pre-phi90, ptr noundef %6)
  br label %31

31:                                               ; preds = %30, %25
  %.pre-phi = phi i64 [ %.pre-phi90, %30 ], [ %28, %25 ]
  %32 = getelementptr inbounds i8, ptr %5, i64 328
  %33 = load i64, ptr %32, align 8, !tbaa !19
  %34 = icmp slt i64 %33, %.pre-phi
  br i1 %34, label %35, label %36

35:                                               ; preds = %31
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %32, i64 noundef %.pre-phi, ptr noundef %6)
  br label %36

36:                                               ; preds = %35, %31
  %37 = getelementptr inbounds i8, ptr %5, i64 392
  %38 = load i64, ptr %37, align 8, !tbaa !20
  %39 = icmp slt i64 %38, %3
  br i1 %39, label %40, label %41

40:                                               ; preds = %36
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %37, i64 noundef %3, ptr noundef %6)
  br label %41

41:                                               ; preds = %40, %36
  %42 = getelementptr inbounds i8, ptr %5, i64 456
  %43 = load i64, ptr %42, align 8, !tbaa !21
  %44 = icmp slt i64 %43, %4
  br i1 %44, label %45, label %46

45:                                               ; preds = %41
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %42, i64 noundef %4, ptr noundef %6)
  br label %46

46:                                               ; preds = %45, %41
  %47 = getelementptr inbounds i8, ptr %5, i64 520
  %48 = load i64, ptr %47, align 8, !tbaa !22
  %49 = icmp slt i64 %48, %4
  br i1 %49, label %50, label %51

50:                                               ; preds = %46
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %47, i64 noundef %4, ptr noundef %6)
  br label %51

51:                                               ; preds = %50, %46
  %52 = getelementptr inbounds i8, ptr %5, i64 40
  %53 = load i64, ptr %52, align 8, !tbaa !23
  %54 = icmp slt i64 %53, %11
  br i1 %54, label %55, label %56

55:                                               ; preds = %51
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %52, i64 noundef %11, ptr noundef %6)
  br label %56

56:                                               ; preds = %55, %51
  %57 = getelementptr inbounds i8, ptr %5, i64 104
  %58 = load i64, ptr %57, align 8, !tbaa !24
  %59 = icmp slt i64 %58, %1
  br i1 %59, label %60, label %61

60:                                               ; preds = %56
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %57, i64 noundef %1, ptr noundef %6)
  br label %61

61:                                               ; preds = %60, %56
  %62 = getelementptr inbounds i8, ptr %5, i64 592
  %63 = load i64, ptr %62, align 8, !tbaa !25
  %64 = icmp slt i64 %63, %1
  br i1 %64, label %65, label %66

65:                                               ; preds = %61
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %62, i64 noundef %1, ptr noundef %6)
  br label %66

66:                                               ; preds = %65, %61
  %67 = tail call noundef zeroext i1 @_ZN11alglib_implL35hpccores_hpcpreparechunkedgradientxEPNS_9ae_vectorElS1_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef nonnull %57, ptr noundef %6)
  %.not.not85 = icmp slt i64 %1, 1
  %or.cond.not = or i1 %.not.not85, %67
  br i1 %or.cond.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %66
  %68 = getelementptr inbounds i8, ptr %5, i64 160
  %69 = add nsw i64 %1, -1
  %xtraiter = and i64 %1, 3
  %70 = icmp ult i64 %69, 3
  br i1 %70, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %1, 9223372036854775804
  br label %71

71:                                               ; preds = %71, %.lr.ph.new
  %.086 = phi i64 [ 0, %.lr.ph.new ], [ %83, %71 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %71 ]
  %72 = load ptr, ptr %68, align 8, !tbaa !26
  %73 = getelementptr inbounds double, ptr %72, i64 %.086
  store double 0.000000e+00, ptr %73, align 8, !tbaa !27
  %74 = or disjoint i64 %.086, 1
  %75 = load ptr, ptr %68, align 8, !tbaa !26
  %76 = getelementptr inbounds double, ptr %75, i64 %74
  store double 0.000000e+00, ptr %76, align 8, !tbaa !27
  %77 = or disjoint i64 %.086, 2
  %78 = load ptr, ptr %68, align 8, !tbaa !26
  %79 = getelementptr inbounds double, ptr %78, i64 %77
  store double 0.000000e+00, ptr %79, align 8, !tbaa !27
  %80 = or disjoint i64 %.086, 3
  %81 = load ptr, ptr %68, align 8, !tbaa !26
  %82 = getelementptr inbounds double, ptr %81, i64 %80
  store double 0.000000e+00, ptr %82, align 8, !tbaa !27
  %83 = add nuw nsw i64 %.086, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %71, !llvm.loop !28

.loopexit.loopexit.unr-lcssa:                     ; preds = %71, %.lr.ph
  %.086.unr = phi i64 [ 0, %.lr.ph ], [ %83, %71 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader
  %.086.epil = phi i64 [ %86, %.epil.preheader ], [ %.086.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %84 = load ptr, ptr %68, align 8, !tbaa !26
  %85 = getelementptr inbounds double, ptr %84, i64 %.086.epil
  store double 0.000000e+00, ptr %85, align 8, !tbaa !27
  %86 = add nuw nsw i64 %.086.epil, 1
  %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 %.epil.preheader, !llvm.loop !30

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader, %66
  %87 = getelementptr inbounds i8, ptr %5, i64 32
  store i64 %1, ptr %87, align 8, !tbaa !32
  %88 = getelementptr inbounds i8, ptr %5, i64 8
  store i64 %2, ptr %88, align 8, !tbaa !33
  %89 = getelementptr inbounds i8, ptr %5, i64 16
  store i64 %3, ptr %89, align 8, !tbaa !34
  %90 = getelementptr inbounds i8, ptr %5, i64 24
  store i64 %4, ptr %90, align 8, !tbaa !35
  store i64 4, ptr %5, align 8, !tbaa !36
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN11alglib_implL35hpccores_hpcpreparechunkedgradientxEPNS_9ae_vectorElS1_PNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #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 = { 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" }

!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 168}
!6 = !{!"_ZTSN11alglib_impl10mlpbuffersE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !10, i64 104, !14, i64 168, !14, i64 248, !10, i64 328, !10, i64 392, !10, i64 456, !10, i64 520, !15, i64 584, !10, i64 592, !10, i64 656}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !8, i64 56}
!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_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !12, i64 40, !8, i64 72}
!15 = !{!"double", !8, i64 0}
!16 = !{!6, !7, i64 176}
!17 = !{!6, !7, i64 248}
!18 = !{!6, !7, i64 256}
!19 = !{!6, !7, i64 328}
!20 = !{!6, !7, i64 392}
!21 = !{!6, !7, i64 456}
!22 = !{!6, !7, i64 520}
!23 = !{!6, !7, i64 40}
!24 = !{!6, !7, i64 104}
!25 = !{!6, !7, i64 592}
!26 = !{!8, !8, i64 0}
!27 = !{!15, !15, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.unroll.disable"}
!32 = !{!6, !7, i64 32}
!33 = !{!6, !7, i64 8}
!34 = !{!6, !7, i64 16}
!35 = !{!6, !7, i64 24}
!36 = !{!6, !7, i64 0}


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