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

; 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::idwmodel" = type { i64, i64, %"struct.alglib_impl::ae_vector", i64, i64, double, double, double, double, double, double, i8, %"struct.alglib_impl::kdtree", i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::idwcalcbuffer" }
%"struct.alglib_impl::kdtree" = type { i64, i64, i64, i64, %"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", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::kdtreerequestbuffer", i64 }
%"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::kdtreerequestbuffer" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, double, i8, double, i64, %"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", double, %"struct.alglib_impl::ae_vector" }
%"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::idwcalcbuffer" = 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_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::kdtreerequestbuffer" }

@.str.187 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.188 = 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl14idwunserializeEPNS_13ae_serializerEPNS_8idwmodelEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %9 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN11alglib_impl15_idwmodel_clearEPv(ptr noundef %9)
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %10, ptr noundef %8, ptr noundef %11)
  %12 = load i64, ptr %8, align 8, !tbaa !9
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  %14 = call noundef i64 @_ZN11alglib_impl23getidwserializationcodeEPNS_8ae_stateE(ptr noundef %13)
  %15 = icmp eq i64 %12, %14
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef @.str.188, ptr noundef %16)
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %18, i32 0, i32 3
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %17, ptr noundef %19, ptr noundef %20)
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %21, ptr noundef %23, ptr noundef %24)
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %26, i32 0, i32 1
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %25, ptr noundef %27, ptr noundef %28)
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %30, i32 0, i32 2
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl20unserializerealarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %29, ptr noundef %31, ptr noundef %32)
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %34, i32 0, i32 4
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %33, ptr noundef %35, ptr noundef %36)
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %38, i32 0, i32 5
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %37, ptr noundef %39, ptr noundef %40)
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %42, i32 0, i32 6
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %41, ptr noundef %43, ptr noundef %44)
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %46, i32 0, i32 7
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %45, ptr noundef %47, ptr noundef %48)
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %50, i32 0, i32 8
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %49, ptr noundef %51, ptr noundef %52)
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %54, i32 0, i32 9
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %53, ptr noundef %55, ptr noundef %56)
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %58, i32 0, i32 10
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %57, ptr noundef %59, ptr noundef %60)
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %61, i32 0, i32 11
  store i8 0, ptr %62, align 8, !tbaa !11
  store i8 0, ptr %7, align 1, !tbaa !21
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %63, i32 0, i32 3
  %65 = load i64, ptr %64, align 8, !tbaa !22
  %66 = icmp eq i64 %65, 0
  br i1 %66, label %67, label %76

67:                                               ; preds = %3
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %69, i32 0, i32 13
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %68, ptr noundef %70, ptr noundef %71)
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %73, i32 0, i32 14
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl20unserializerealarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %72, ptr noundef %74, ptr noundef %75)
  store i8 1, ptr %7, align 1, !tbaa !21
  br label %76

76:                                               ; preds = %67, %3
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %77, i32 0, i32 3
  %79 = load i64, ptr %78, align 8, !tbaa !22
  %80 = icmp sgt i64 %79, 0
  br i1 %80, label %81, label %86

81:                                               ; preds = %76
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %83, i32 0, i32 12
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl17kdtreeunserializeEPNS_13ae_serializerEPNS_6kdtreeEPNS_8ae_stateE(ptr noundef %82, ptr noundef %84, ptr noundef %85)
  store i8 1, ptr %7, align 1, !tbaa !21
  br label %86

86:                                               ; preds = %81, %76
  %87 = load i8, ptr %7, align 1, !tbaa !21, !range !23, !noundef !24
  %88 = trunc i8 %87 to i1
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %88, ptr noundef @.str.187, ptr noundef %89)
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %91, i32 0, i32 15
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl19idwcreatecalcbufferEPKNS_8idwmodelEPNS_13idwcalcbufferEPNS_8ae_stateE(ptr noundef %90, ptr noundef %92, ptr noundef %93)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #3
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl19idwcreatecalcbufferEPKNS_8idwmodelEPNS_13idwcalcbufferEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl15_idwmodel_clearEPv(ptr noundef) #2

declare noundef i64 @_ZN11alglib_impl23getidwserializationcodeEPNS_8ae_stateE(ptr noundef) #1

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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, !14, i64 144}
!12 = !{!"_ZTSN11alglib_impl8idwmodelE", !10, i64 0, !10, i64 8, !13, i64 16, !10, i64 80, !10, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !16, i64 120, !16, i64 128, !16, i64 136, !14, i64 144, !17, i64 152, !10, i64 1216, !13, i64 1224, !20, i64 1288}
!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 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl6kdtreeE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !18, i64 32, !13, i64 112, !13, i64 176, !13, i64 240, !13, i64 304, !13, i64 368, !19, i64 432, !10, i64 1056}
!18 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !14, i64 32, !15, i64 40, !7, i64 72}
!19 = !{!"_ZTSN11alglib_impl19kdtreerequestbufferE", !13, i64 0, !13, i64 64, !13, i64 128, !10, i64 192, !16, i64 200, !14, i64 208, !16, i64 216, !10, i64 224, !13, i64 232, !13, i64 296, !13, i64 360, !13, i64 424, !13, i64 488, !16, i64 552, !13, i64 560}
!20 = !{!"_ZTSN11alglib_impl13idwcalcbufferE", !13, i64 0, !13, i64 64, !13, i64 128, !13, i64 192, !18, i64 256, !13, i64 336, !19, i64 400}
!21 = !{!14, !14, i64 0}
!22 = !{!12, !10, i64 80}
!23 = !{i8 0, i8 2}
!24 = !{}


; 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.187 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.188 = external hidden unnamed_addr constant [40 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl14idwunserializeEPNS_13ae_serializerEPNS_8idwmodelEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  tail call void @_ZN11alglib_impl15_idwmodel_clearEPv(ptr noundef %1)
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %4, ptr noundef %2)
  %5 = load i64, ptr %4, align 8, !tbaa !5
  %6 = call noundef i64 @_ZN11alglib_impl23getidwserializationcodeEPNS_8ae_stateE(ptr noundef %2)
  %7 = icmp eq i64 %5, %6
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %7, ptr noundef nonnull @.str.188, ptr noundef %2)
  %8 = getelementptr inbounds i8, ptr %1, i64 80
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %8, ptr noundef %2)
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2)
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %9, ptr noundef %2)
  %10 = getelementptr inbounds i8, ptr %1, i64 16
  call void @_ZN11alglib_impl20unserializerealarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %10, ptr noundef %2)
  %11 = getelementptr inbounds i8, ptr %1, i64 88
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %11, ptr noundef %2)
  %12 = getelementptr inbounds i8, ptr %1, i64 96
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %12, ptr noundef %2)
  %13 = getelementptr inbounds i8, ptr %1, i64 104
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %13, ptr noundef %2)
  %14 = getelementptr inbounds i8, ptr %1, i64 112
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %14, ptr noundef %2)
  %15 = getelementptr inbounds i8, ptr %1, i64 120
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %15, ptr noundef %2)
  %16 = getelementptr inbounds i8, ptr %1, i64 128
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %16, ptr noundef %2)
  %17 = getelementptr inbounds i8, ptr %1, i64 136
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %17, ptr noundef %2)
  %18 = getelementptr inbounds i8, ptr %1, i64 144
  store i8 0, ptr %18, align 8, !tbaa !9
  %19 = load i64, ptr %8, align 8, !tbaa !20
  %20 = icmp eq i64 %19, 0
  br i1 %20, label %21, label %24

21:                                               ; preds = %3
  %22 = getelementptr inbounds i8, ptr %1, i64 1216
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %22, ptr noundef %2)
  %23 = getelementptr inbounds i8, ptr %1, i64 1224
  call void @_ZN11alglib_impl20unserializerealarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %23, ptr noundef %2)
  %.pr = load i64, ptr %8, align 8, !tbaa !20
  br label %24

24:                                               ; preds = %21, %3
  %25 = phi i64 [ %.pr, %21 ], [ %19, %3 ]
  %26 = icmp sgt i64 %25, 0
  br i1 %26, label %27, label %29

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %1, i64 152
  call void @_ZN11alglib_impl17kdtreeunserializeEPNS_13ae_serializerEPNS_6kdtreeEPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %28, ptr noundef %2)
  br label %29

29:                                               ; preds = %27, %24
  %.1 = phi i1 [ true, %27 ], [ %20, %24 ]
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %.1, ptr noundef nonnull @.str.187, ptr noundef %2)
  %30 = getelementptr inbounds i8, ptr %1, i64 1288
  call void @_ZN11alglib_impl19idwcreatecalcbufferEPKNS_8idwmodelEPNS_13idwcalcbufferEPNS_8ae_stateE(ptr noundef nonnull %1, ptr noundef nonnull %30, ptr noundef %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl19idwcreatecalcbufferEPKNS_8idwmodelEPNS_13idwcalcbufferEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl15_idwmodel_clearEPv(ptr noundef) local_unnamed_addr #2

declare noundef i64 @_ZN11alglib_impl23getidwserializationcodeEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 144}
!10 = !{!"_ZTSN11alglib_impl8idwmodelE", !6, i64 0, !6, i64 8, !11, i64 16, !6, i64 80, !6, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !15, i64 136, !12, i64 144, !16, i64 152, !6, i64 1216, !11, i64 1224, !19, i64 1288}
!11 = !{!"_ZTSN11alglib_impl9ae_vectorE", !6, i64 0, !6, i64 8, !12, i64 16, !13, i64 24, !7, i64 56}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl6kdtreeE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !17, i64 32, !11, i64 112, !11, i64 176, !11, i64 240, !11, i64 304, !11, i64 368, !18, i64 432, !6, i64 1056}
!17 = !{!"_ZTSN11alglib_impl9ae_matrixE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !13, i64 40, !7, i64 72}
!18 = !{!"_ZTSN11alglib_impl19kdtreerequestbufferE", !11, i64 0, !11, i64 64, !11, i64 128, !6, i64 192, !15, i64 200, !12, i64 208, !15, i64 216, !6, i64 224, !11, i64 232, !11, i64 296, !11, i64 360, !11, i64 424, !11, i64 488, !15, i64 552, !11, i64 560}
!19 = !{!"_ZTSN11alglib_impl13idwcalcbufferE", !11, i64 0, !11, i64 64, !11, i64 128, !11, i64 192, !17, i64 256, !11, i64 336, !18, i64 400}
!20 = !{!10, !6, i64 80}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,TailCallElimPass