; 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::spline2dinterpolant" = type { i64, i8, i64, i64, 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" }
%"struct.alglib_impl::ae_vector" = type { 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 }

@.str.821 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.822 = external hidden unnamed_addr constant [29 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_impl12spline2dcopyEPKNS_19spline2dinterpolantEPS0_PNS_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 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 8, ptr %7) #3
  %8 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN11alglib_impl26_spline2dinterpolant_clearEPv(ptr noundef %8)
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %9, i32 0, i32 0
  %11 = load i64, ptr %10, align 8, !tbaa !9
  %12 = icmp eq i64 %11, -1
  br i1 %12, label %18, label %13

13:                                               ; preds = %3
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %14, i32 0, i32 0
  %16 = load i64, ptr %15, align 8, !tbaa !9
  %17 = icmp eq i64 %16, -3
  br label %18

18:                                               ; preds = %13, %3
  %19 = phi i1 [ true, %3 ], [ %17, %13 ]
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef @.str.821, ptr noundef %20)
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %21, i32 0, i32 2
  %23 = load i64, ptr %22, align 8, !tbaa !15
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %24, i32 0, i32 2
  store i64 %23, ptr %25, align 8, !tbaa !15
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %26, i32 0, i32 3
  %28 = load i64, ptr %27, align 8, !tbaa !16
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %29, i32 0, i32 3
  store i64 %28, ptr %30, align 8, !tbaa !16
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %31, i32 0, i32 4
  %33 = load i64, ptr %32, align 8, !tbaa !17
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %34, i32 0, i32 4
  store i64 %33, ptr %35, align 8, !tbaa !17
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %36, i32 0, i32 0
  %38 = load i64, ptr %37, align 8, !tbaa !9
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %39, i32 0, i32 0
  store i64 %38, ptr %40, align 8, !tbaa !9
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %41, i32 0, i32 1
  %43 = load i8, ptr %42, align 8, !tbaa !18, !range !19, !noundef !20
  %44 = trunc i8 %43 to i1
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %45, i32 0, i32 1
  %47 = zext i1 %44 to i8
  store i8 %47, ptr %46, align 8, !tbaa !18
  store i64 -1, ptr %7, align 8, !tbaa !21
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %48, i32 0, i32 0
  %50 = load i64, ptr %49, align 8, !tbaa !9
  %51 = icmp eq i64 %50, -3
  br i1 %51, label %52, label %65

52:                                               ; preds = %18
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %53, i32 0, i32 2
  %55 = load i64, ptr %54, align 8, !tbaa !15
  %56 = mul nsw i64 4, %55
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %57, i32 0, i32 3
  %59 = load i64, ptr %58, align 8, !tbaa !16
  %60 = mul nsw i64 %56, %59
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %61, i32 0, i32 4
  %63 = load i64, ptr %62, align 8, !tbaa !17
  %64 = mul nsw i64 %60, %63
  store i64 %64, ptr %7, align 8, !tbaa !21
  br label %65

65:                                               ; preds = %52, %18
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %66, i32 0, i32 0
  %68 = load i64, ptr %67, align 8, !tbaa !9
  %69 = icmp eq i64 %68, -1
  br i1 %69, label %70, label %82

70:                                               ; preds = %65
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %71, i32 0, i32 2
  %73 = load i64, ptr %72, align 8, !tbaa !15
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %74, i32 0, i32 3
  %76 = load i64, ptr %75, align 8, !tbaa !16
  %77 = mul nsw i64 %73, %76
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %78, i32 0, i32 4
  %80 = load i64, ptr %79, align 8, !tbaa !17
  %81 = mul nsw i64 %77, %80
  store i64 %81, ptr %7, align 8, !tbaa !21
  br label %82

82:                                               ; preds = %70, %65
  %83 = load i64, ptr %7, align 8, !tbaa !21
  %84 = icmp sgt i64 %83, 0
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %84, ptr noundef @.str.822, ptr noundef %85)
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %86, i32 0, i32 5
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %88, i32 0, i32 2
  %90 = load i64, ptr %89, align 8, !tbaa !15
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %87, i64 noundef %90, ptr noundef %91)
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %92, i32 0, i32 6
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %94, i32 0, i32 3
  %96 = load i64, ptr %95, align 8, !tbaa !16
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %93, i64 noundef %96, ptr noundef %97)
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %98, i32 0, i32 7
  %100 = load i64, ptr %7, align 8, !tbaa !21
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %99, i64 noundef %100, ptr noundef %101)
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %102, i32 0, i32 5
  %104 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %103, i32 0, i32 4
  %105 = load ptr, ptr %104, align 8, !tbaa !22
  %106 = getelementptr inbounds double, ptr %105, i64 0
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %107, i32 0, i32 5
  %109 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %108, i32 0, i32 4
  %110 = load ptr, ptr %109, align 8, !tbaa !22
  %111 = getelementptr inbounds double, ptr %110, i64 0
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %112, i32 0, i32 2
  %114 = load i64, ptr %113, align 8, !tbaa !15
  %115 = sub nsw i64 %114, 1
  %116 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %115)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %106, i64 noundef 1, ptr noundef %111, i64 noundef 1, i64 noundef %116)
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %117, i32 0, i32 6
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %118, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !22
  %121 = getelementptr inbounds double, ptr %120, i64 0
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %122, i32 0, i32 6
  %124 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %123, i32 0, i32 4
  %125 = load ptr, ptr %124, align 8, !tbaa !22
  %126 = getelementptr inbounds double, ptr %125, i64 0
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %127, i32 0, i32 3
  %129 = load i64, ptr %128, align 8, !tbaa !16
  %130 = sub nsw i64 %129, 1
  %131 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %130)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %121, i64 noundef 1, ptr noundef %126, i64 noundef 1, i64 noundef %131)
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %132, i32 0, i32 7
  %134 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %133, i32 0, i32 4
  %135 = load ptr, ptr %134, align 8, !tbaa !22
  %136 = getelementptr inbounds double, ptr %135, i64 0
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %137, i32 0, i32 7
  %139 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %138, i32 0, i32 4
  %140 = load ptr, ptr %139, align 8, !tbaa !22
  %141 = getelementptr inbounds double, ptr %140, i64 0
  %142 = load i64, ptr %7, align 8, !tbaa !21
  %143 = sub nsw i64 %142, 1
  %144 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %143)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %136, i64 noundef 1, ptr noundef %141, i64 noundef 1, i64 noundef %144)
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %145, i32 0, i32 1
  %147 = load i8, ptr %146, align 8, !tbaa !18, !range !19, !noundef !20
  %148 = trunc i8 %147 to i1
  br i1 %148, label %149, label %176

149:                                              ; preds = %82
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %150, i32 0, i32 2
  %152 = load i64, ptr %151, align 8, !tbaa !15
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %153, i32 0, i32 3
  %155 = load i64, ptr %154, align 8, !tbaa !16
  %156 = mul nsw i64 %152, %155
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %157, i32 0, i32 8
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  %160 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %159, i32 0, i32 8
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl11bcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %156, ptr noundef %158, ptr noundef %160, ptr noundef %161)
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %162, i32 0, i32 2
  %164 = load i64, ptr %163, align 8, !tbaa !15
  %165 = sub nsw i64 %164, 1
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %166, i32 0, i32 3
  %168 = load i64, ptr %167, align 8, !tbaa !16
  %169 = sub nsw i64 %168, 1
  %170 = mul nsw i64 %165, %169
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %171, i32 0, i32 9
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %173, i32 0, i32 9
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl11bcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %170, ptr noundef %172, ptr noundef %174, ptr noundef %175)
  br label %176

176:                                              ; preds = %149, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  ret void
}

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #1

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

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

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

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

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, !11, i64 0}
!10 = !{!"_ZTSN11alglib_impl19spline2dinterpolantE", !11, i64 0, !12, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !13, i64 40, !13, i64 104, !13, i64 168, !13, i64 232, !13, i64 296}
!11 = !{!"long", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !12, i64 16, !14, i64 24, !7, i64 56}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!10, !11, i64 16}
!16 = !{!10, !11, i64 24}
!17 = !{!10, !11, i64 32}
!18 = !{!10, !12, i64 8}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!11, !11, i64 0}
!22 = !{!7, !7, 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"

@.str.821 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.822 = external hidden unnamed_addr constant [29 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl12spline2dcopyEPKNS_19spline2dinterpolantEPS0_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 {
  tail call void @_ZN11alglib_impl26_spline2dinterpolant_clearEPv(ptr noundef %1)
  %4 = load i64, ptr %0, align 8, !tbaa !5
  %5 = and i64 %4, -3
  %spec.select = icmp eq i64 %5, -3
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.821, ptr noundef %2)
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = load i64, ptr %6, align 8, !tbaa !14
  %8 = getelementptr inbounds i8, ptr %1, i64 16
  store i64 %7, ptr %8, align 8, !tbaa !14
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = load i64, ptr %9, align 8, !tbaa !15
  %11 = getelementptr inbounds i8, ptr %1, i64 24
  store i64 %10, ptr %11, align 8, !tbaa !15
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  %13 = load i64, ptr %12, align 8, !tbaa !16
  %14 = getelementptr inbounds i8, ptr %1, i64 32
  store i64 %13, ptr %14, align 8, !tbaa !16
  %15 = load i64, ptr %0, align 8, !tbaa !5
  store i64 %15, ptr %1, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = load i8, ptr %16, align 8, !tbaa !17, !range !18, !noundef !19
  %18 = getelementptr inbounds i8, ptr %1, i64 8
  store i8 %17, ptr %18, align 8, !tbaa !17
  switch i64 %15, label %25 [
    i64 -3, label %.thread
    i64 -1, label %22
  ]

.thread:                                          ; preds = %3
  %19 = shl nsw i64 %7, 2
  %20 = mul nsw i64 %19, %10
  %21 = mul nsw i64 %20, %13
  br label %25

22:                                               ; preds = %3
  %23 = mul nsw i64 %10, %7
  %24 = mul nsw i64 %23, %13
  br label %25

25:                                               ; preds = %3, %.thread, %22
  %.1 = phi i64 [ %24, %22 ], [ %21, %.thread ], [ -1, %3 ]
  %26 = icmp sgt i64 %.1, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %26, ptr noundef nonnull @.str.822, ptr noundef %2)
  %27 = getelementptr inbounds i8, ptr %1, i64 40
  %28 = load i64, ptr %8, align 8, !tbaa !14
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %27, i64 noundef %28, ptr noundef %2)
  %29 = getelementptr inbounds i8, ptr %1, i64 104
  %30 = load i64, ptr %11, align 8, !tbaa !15
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %29, i64 noundef %30, ptr noundef %2)
  %31 = getelementptr inbounds i8, ptr %1, i64 168
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %31, i64 noundef %.1, ptr noundef %2)
  %32 = getelementptr inbounds i8, ptr %1, i64 96
  %33 = load ptr, ptr %32, align 8, !tbaa !20
  %34 = getelementptr inbounds i8, ptr %0, i64 96
  %35 = load ptr, ptr %34, align 8, !tbaa !20
  %36 = load i64, ptr %8, align 8, !tbaa !14
  %37 = add nsw i64 %36, -1
  %38 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %37)
  tail call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %33, i64 noundef 1, ptr noundef %35, i64 noundef 1, i64 noundef %38)
  %39 = getelementptr inbounds i8, ptr %1, i64 160
  %40 = load ptr, ptr %39, align 8, !tbaa !20
  %41 = getelementptr inbounds i8, ptr %0, i64 160
  %42 = load ptr, ptr %41, align 8, !tbaa !20
  %43 = load i64, ptr %11, align 8, !tbaa !15
  %44 = add nsw i64 %43, -1
  %45 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %44)
  tail call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %40, i64 noundef 1, ptr noundef %42, i64 noundef 1, i64 noundef %45)
  %46 = getelementptr inbounds i8, ptr %1, i64 224
  %47 = load ptr, ptr %46, align 8, !tbaa !20
  %48 = getelementptr inbounds i8, ptr %0, i64 224
  %49 = load ptr, ptr %48, align 8, !tbaa !20
  %50 = add nsw i64 %.1, -1
  %51 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %50)
  tail call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %47, i64 noundef 1, ptr noundef %49, i64 noundef 1, i64 noundef %51)
  %52 = load i8, ptr %16, align 8, !tbaa !17, !range !18, !noundef !19
  %53 = trunc nuw i8 %52 to i1
  br i1 %53, label %54, label %67

54:                                               ; preds = %25
  %55 = load i64, ptr %6, align 8, !tbaa !14
  %56 = load i64, ptr %9, align 8, !tbaa !15
  %57 = mul nsw i64 %56, %55
  %58 = getelementptr inbounds i8, ptr %0, i64 232
  %59 = getelementptr inbounds i8, ptr %1, i64 232
  tail call void @_ZN11alglib_impl11bcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %57, ptr noundef nonnull %58, ptr noundef nonnull %59, ptr noundef %2)
  %60 = load i64, ptr %6, align 8, !tbaa !14
  %61 = add nsw i64 %60, -1
  %62 = load i64, ptr %9, align 8, !tbaa !15
  %63 = add nsw i64 %62, -1
  %64 = mul nsw i64 %63, %61
  %65 = getelementptr inbounds i8, ptr %0, i64 296
  %66 = getelementptr inbounds i8, ptr %1, i64 296
  tail call void @_ZN11alglib_impl11bcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %64, ptr noundef nonnull %65, ptr noundef nonnull %66, ptr noundef %2)
  br label %67

67:                                               ; preds = %54, %25
  ret void
}

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) local_unnamed_addr #0

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

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

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

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

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

!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_impl19spline2dinterpolantE", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !11, i64 40, !11, i64 104, !11, i64 168, !11, i64 232, !11, i64 296}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !12, i64 24, !8, i64 56}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!6, !7, i64 16}
!15 = !{!6, !7, i64 24}
!16 = !{!6, !7, i64 32}
!17 = !{!6, !10, i64 8}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!8, !8, i64 0}


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