; LLVM IR from venumb/ZSPACE :: cpp/depends/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::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::spline2dinterpolant" = type { i64, i64, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }

@.str.711 = external hidden unnamed_addr constant [61 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; 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) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl17spline2dlintransfEPNS_19spline2dinterpolantEddPNS_8ae_stateE(ptr noundef %0, double noundef %1, double noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca %"struct.alglib_impl::ae_vector", align 8
  %11 = alloca %"struct.alglib_impl::ae_vector", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store double %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 64, 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
  %15 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %15, ptr noundef %9)
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 64, i1 false)
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %10, i64 noundef 0, i64 noundef 3, ptr noundef %16, i1 noundef zeroext true)
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %11, i64 noundef 0, i64 noundef 3, ptr noundef %17, i1 noundef zeroext true)
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %12, i64 noundef 0, i64 noundef 3, ptr noundef %18, i1 noundef zeroext true)
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %19, i32 0, i32 0
  %21 = load i64, ptr %20, align 8, !tbaa !11
  %22 = icmp eq i64 %21, -3
  br i1 %22, label %28, label %23

23:                                               ; preds = %4
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %24, i32 0, i32 0
  %26 = load i64, ptr %25, align 8, !tbaa !11
  %27 = icmp eq i64 %26, -1
  br label %28

28:                                               ; preds = %23, %4
  %29 = phi i1 [ true, %4 ], [ %27, %23 ]
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %29, ptr noundef @.str.711, ptr noundef %30)
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %31, i32 0, i32 1
  %33 = load i64, ptr %32, align 8, !tbaa !17
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %10, i64 noundef %33, ptr noundef %34)
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %35, i32 0, i32 2
  %37 = load i64, ptr %36, align 8, !tbaa !18
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %11, i64 noundef %37, ptr noundef %38)
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %39, i32 0, i32 2
  %41 = load i64, ptr %40, align 8, !tbaa !18
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %42, i32 0, i32 1
  %44 = load i64, ptr %43, align 8, !tbaa !17
  %45 = mul nsw i64 %41, %44
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %46, i32 0, i32 3
  %48 = load i64, ptr %47, align 8, !tbaa !19
  %49 = mul nsw i64 %45, %48
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %12, i64 noundef %49, ptr noundef %50)
  store i64 0, ptr %14, align 8, !tbaa !20
  br label %51

51:                                               ; preds = %70, %28
  %52 = load i64, ptr %14, align 8, !tbaa !20
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %53, i32 0, i32 1
  %55 = load i64, ptr %54, align 8, !tbaa !17
  %56 = sub nsw i64 %55, 1
  %57 = icmp sle i64 %52, %56
  br i1 %57, label %58, label %73

58:                                               ; preds = %51
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %59, i32 0, i32 4
  %61 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %60, i32 0, i32 4
  %62 = load ptr, ptr %61, align 8, !tbaa !21
  %63 = load i64, ptr %14, align 8, !tbaa !20
  %64 = getelementptr inbounds double, ptr %62, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !9
  %66 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %10, i32 0, i32 4
  %67 = load ptr, ptr %66, align 8, !tbaa !21
  %68 = load i64, ptr %14, align 8, !tbaa !20
  %69 = getelementptr inbounds double, ptr %67, i64 %68
  store double %65, ptr %69, align 8, !tbaa !9
  br label %70

70:                                               ; preds = %58
  %71 = load i64, ptr %14, align 8, !tbaa !20
  %72 = add nsw i64 %71, 1
  store i64 %72, ptr %14, align 8, !tbaa !20
  br label %51, !llvm.loop !22

73:                                               ; preds = %51
  store i64 0, ptr %13, align 8, !tbaa !20
  br label %74

74:                                               ; preds = %93, %73
  %75 = load i64, ptr %13, align 8, !tbaa !20
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %76, i32 0, i32 2
  %78 = load i64, ptr %77, align 8, !tbaa !18
  %79 = sub nsw i64 %78, 1
  %80 = icmp sle i64 %75, %79
  br i1 %80, label %81, label %96

81:                                               ; preds = %74
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %82, i32 0, i32 5
  %84 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %83, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !21
  %86 = load i64, ptr %13, align 8, !tbaa !20
  %87 = getelementptr inbounds double, ptr %85, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !9
  %89 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %11, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !21
  %91 = load i64, ptr %13, align 8, !tbaa !20
  %92 = getelementptr inbounds double, ptr %90, i64 %91
  store double %88, ptr %92, align 8, !tbaa !9
  br label %93

93:                                               ; preds = %81
  %94 = load i64, ptr %13, align 8, !tbaa !20
  %95 = add nsw i64 %94, 1
  store i64 %95, ptr %13, align 8, !tbaa !20
  br label %74, !llvm.loop !24

96:                                               ; preds = %74
  store i64 0, ptr %13, align 8, !tbaa !20
  br label %97

97:                                               ; preds = %127, %96
  %98 = load i64, ptr %13, align 8, !tbaa !20
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %99, i32 0, i32 2
  %101 = load i64, ptr %100, align 8, !tbaa !18
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %102, i32 0, i32 1
  %104 = load i64, ptr %103, align 8, !tbaa !17
  %105 = mul nsw i64 %101, %104
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %106, i32 0, i32 3
  %108 = load i64, ptr %107, align 8, !tbaa !19
  %109 = mul nsw i64 %105, %108
  %110 = sub nsw i64 %109, 1
  %111 = icmp sle i64 %98, %110
  br i1 %111, label %112, label %130

112:                                              ; preds = %97
  %113 = load double, ptr %6, align 8, !tbaa !9
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %114, i32 0, i32 6
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %115, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !21
  %118 = load i64, ptr %13, align 8, !tbaa !20
  %119 = getelementptr inbounds double, ptr %117, i64 %118
  %120 = load double, ptr %119, align 8, !tbaa !9
  %121 = load double, ptr %7, align 8, !tbaa !9
  %122 = call double @llvm.fmuladd.f64(double %113, double %120, double %121)
  %123 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %124 = load ptr, ptr %123, align 8, !tbaa !21
  %125 = load i64, ptr %13, align 8, !tbaa !20
  %126 = getelementptr inbounds double, ptr %124, i64 %125
  store double %122, ptr %126, align 8, !tbaa !9
  br label %127

127:                                              ; preds = %112
  %128 = load i64, ptr %13, align 8, !tbaa !20
  %129 = add nsw i64 %128, 1
  store i64 %129, ptr %13, align 8, !tbaa !20
  br label %97, !llvm.loop !25

130:                                              ; preds = %97
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %131, i32 0, i32 0
  %133 = load i64, ptr %132, align 8, !tbaa !11
  %134 = icmp eq i64 %133, -3
  br i1 %134, label %135, label %147

135:                                              ; preds = %130
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %136, i32 0, i32 1
  %138 = load i64, ptr %137, align 8, !tbaa !17
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %139, i32 0, i32 2
  %141 = load i64, ptr %140, align 8, !tbaa !18
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %142, i32 0, i32 3
  %144 = load i64, ptr %143, align 8, !tbaa !19
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl21spline2dbuildbicubicvEPNS_9ae_vectorElS1_lS1_lPNS_19spline2dinterpolantEPNS_8ae_stateE(ptr noundef %10, i64 noundef %138, ptr noundef %11, i64 noundef %141, ptr noundef %12, i64 noundef %144, ptr noundef %145, ptr noundef %146)
  br label %147

147:                                              ; preds = %135, %130
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  %149 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %148, i32 0, i32 0
  %150 = load i64, ptr %149, align 8, !tbaa !11
  %151 = icmp eq i64 %150, -1
  br i1 %151, label %152, label %164

152:                                              ; preds = %147
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %153, i32 0, i32 1
  %155 = load i64, ptr %154, align 8, !tbaa !17
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %156, i32 0, i32 2
  %158 = load i64, ptr %157, align 8, !tbaa !18
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  %160 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %159, i32 0, i32 3
  %161 = load i64, ptr %160, align 8, !tbaa !19
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl22spline2dbuildbilinearvEPNS_9ae_vectorElS1_lS1_lPNS_19spline2dinterpolantEPNS_8ae_stateE(ptr noundef %10, i64 noundef %155, ptr noundef %11, i64 noundef %158, ptr noundef %12, i64 noundef %161, ptr noundef %162, ptr noundef %163)
  br label %164

164:                                              ; preds = %152, %147
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %165)
  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 64, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  ret void
}

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #2

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "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 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 nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN11alglib_impl19spline2dinterpolantE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !14, i64 32, !14, i64 96, !14, i64 160}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl9ae_vectorE", !13, i64 0, !13, i64 8, !15, i64 16, !16, i64 24, !7, i64 56}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!12, !13, i64 8}
!18 = !{!12, !13, i64 16}
!19 = !{!12, !13, i64 24}
!20 = !{!13, !13, i64 0}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}


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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.711 = external hidden unnamed_addr constant [61 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; 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 #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl17spline2dlintransfEPNS_19spline2dinterpolantEddPNS_8ae_stateE(ptr noundef %0, double noundef %1, double noundef %2, ptr noundef %3) local_unnamed_addr #3 {
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca %"struct.alglib_impl::ae_vector", align 8
  %7 = alloca %"struct.alglib_impl::ae_vector", align 8
  %8 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %3, ptr noundef nonnull %5)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %6, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %8, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %6, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %7, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  %9 = load i64, ptr %0, align 8, !tbaa !5
  %10 = and i64 %9, -3
  %spec.select = icmp eq i64 %10, -3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.711, ptr noundef %3)
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load i64, ptr %11, align 8, !tbaa !14
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %12, ptr noundef %3)
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = load i64, ptr %13, align 8, !tbaa !15
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %14, ptr noundef %3)
  %15 = load i64, ptr %13, align 8, !tbaa !15
  %16 = load i64, ptr %11, align 8, !tbaa !14
  %17 = mul nsw i64 %16, %15
  %18 = getelementptr inbounds i8, ptr %0, i64 24
  %19 = load i64, ptr %18, align 8, !tbaa !16
  %20 = mul nsw i64 %17, %19
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %20, ptr noundef %3)
  %21 = load i64, ptr %11, align 8, !tbaa !14
  %.not.not56 = icmp sgt i64 %21, 0
  br i1 %.not.not56, label %.lr.ph, label %.preheader53

.lr.ph:                                           ; preds = %4
  %22 = getelementptr inbounds i8, ptr %0, i64 88
  %23 = getelementptr inbounds i8, ptr %6, i64 56
  %xtraiter = and i64 %21, 3
  %24 = icmp ult i64 %21, 4
  br i1 %24, label %.preheader53.loopexit.unr-lcssa, label %.lr.ph.new

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

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

.epil.preheader:                                  ; preds = %.preheader53.loopexit.unr-lcssa, %.epil.preheader
  %.057.epil = phi i64 [ %30, %.epil.preheader ], [ %.057.unr, %.preheader53.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader53.loopexit.unr-lcssa ]
  %25 = load ptr, ptr %22, align 8, !tbaa !17
  %26 = getelementptr inbounds double, ptr %25, i64 %.057.epil
  %27 = load double, ptr %26, align 8, !tbaa !18
  %28 = load ptr, ptr %23, align 8, !tbaa !17
  %29 = getelementptr inbounds double, ptr %28, i64 %.057.epil
  store double %27, ptr %29, align 8, !tbaa !18
  %30 = add nuw nsw i64 %.057.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 %.preheader53, label %.epil.preheader, !llvm.loop !20

.preheader53:                                     ; preds = %.preheader53.loopexit.unr-lcssa, %.epil.preheader, %4
  %31 = load i64, ptr %13, align 8, !tbaa !15
  %.not.not5158 = icmp sgt i64 %31, 0
  br i1 %.not.not5158, label %.lr.ph60, label %.preheader

.lr.ph60:                                         ; preds = %.preheader53
  %32 = getelementptr inbounds i8, ptr %0, i64 152
  %33 = getelementptr inbounds i8, ptr %7, i64 56
  %xtraiter69 = and i64 %31, 3
  %34 = icmp ult i64 %31, 4
  br i1 %34, label %.preheader.loopexit.unr-lcssa, label %.lr.ph60.new

.lr.ph60.new:                                     ; preds = %.lr.ph60
  %unroll_iter72 = and i64 %31, 9223372036854775804
  br label %72

35:                                               ; preds = %35, %.lr.ph.new
  %.057 = phi i64 [ 0, %.lr.ph.new ], [ %59, %35 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %35 ]
  %36 = load ptr, ptr %22, align 8, !tbaa !17
  %37 = getelementptr inbounds double, ptr %36, i64 %.057
  %38 = load double, ptr %37, align 8, !tbaa !18
  %39 = load ptr, ptr %23, align 8, !tbaa !17
  %40 = getelementptr inbounds double, ptr %39, i64 %.057
  store double %38, ptr %40, align 8, !tbaa !18
  %41 = or disjoint i64 %.057, 1
  %42 = load ptr, ptr %22, align 8, !tbaa !17
  %43 = getelementptr inbounds double, ptr %42, i64 %41
  %44 = load double, ptr %43, align 8, !tbaa !18
  %45 = load ptr, ptr %23, align 8, !tbaa !17
  %46 = getelementptr inbounds double, ptr %45, i64 %41
  store double %44, ptr %46, align 8, !tbaa !18
  %47 = or disjoint i64 %.057, 2
  %48 = load ptr, ptr %22, align 8, !tbaa !17
  %49 = getelementptr inbounds double, ptr %48, i64 %47
  %50 = load double, ptr %49, align 8, !tbaa !18
  %51 = load ptr, ptr %23, align 8, !tbaa !17
  %52 = getelementptr inbounds double, ptr %51, i64 %47
  store double %50, ptr %52, align 8, !tbaa !18
  %53 = or disjoint i64 %.057, 3
  %54 = load ptr, ptr %22, align 8, !tbaa !17
  %55 = getelementptr inbounds double, ptr %54, i64 %53
  %56 = load double, ptr %55, align 8, !tbaa !18
  %57 = load ptr, ptr %23, align 8, !tbaa !17
  %58 = getelementptr inbounds double, ptr %57, i64 %53
  store double %56, ptr %58, align 8, !tbaa !18
  %59 = add nuw nsw i64 %.057, 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 %.preheader53.loopexit.unr-lcssa, label %35, !llvm.loop !22

.preheader.loopexit.unr-lcssa:                    ; preds = %72, %.lr.ph60
  %.04959.unr = phi i64 [ 0, %.lr.ph60 ], [ %96, %72 ]
  %lcmp.mod71.not = icmp eq i64 %xtraiter69, 0
  br i1 %lcmp.mod71.not, label %.preheader, label %.epil.preheader68

.epil.preheader68:                                ; preds = %.preheader.loopexit.unr-lcssa, %.epil.preheader68
  %.04959.epil = phi i64 [ %65, %.epil.preheader68 ], [ %.04959.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter70 = phi i64 [ %epil.iter70.next, %.epil.preheader68 ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %60 = load ptr, ptr %32, align 8, !tbaa !17
  %61 = getelementptr inbounds double, ptr %60, i64 %.04959.epil
  %62 = load double, ptr %61, align 8, !tbaa !18
  %63 = load ptr, ptr %33, align 8, !tbaa !17
  %64 = getelementptr inbounds double, ptr %63, i64 %.04959.epil
  store double %62, ptr %64, align 8, !tbaa !18
  %65 = add nuw nsw i64 %.04959.epil, 1
  %epil.iter70.next = add i64 %epil.iter70, 1
  %epil.iter70.cmp.not = icmp eq i64 %epil.iter70.next, %xtraiter69
  br i1 %epil.iter70.cmp.not, label %.preheader, label %.epil.preheader68, !llvm.loop !24

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.epil.preheader68, %.preheader53
  %66 = mul nsw i64 %31, %21
  %67 = load i64, ptr %18, align 8, !tbaa !16
  %68 = mul nsw i64 %66, %67
  %.not.not5262 = icmp sgt i64 %68, 0
  br i1 %.not.not5262, label %.lr.ph64, label %._crit_edge

.lr.ph64:                                         ; preds = %.preheader
  %69 = getelementptr inbounds i8, ptr %0, i64 216
  %70 = getelementptr inbounds i8, ptr %8, i64 56
  %xtraiter75 = and i64 %68, 1
  %71 = icmp eq i64 %68, 1
  br i1 %71, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph64.new

.lr.ph64.new:                                     ; preds = %.lr.ph64
  %unroll_iter78 = and i64 %68, 9223372036854775806
  br label %97

72:                                               ; preds = %72, %.lr.ph60.new
  %.04959 = phi i64 [ 0, %.lr.ph60.new ], [ %96, %72 ]
  %niter73 = phi i64 [ 0, %.lr.ph60.new ], [ %niter73.next.3, %72 ]
  %73 = load ptr, ptr %32, align 8, !tbaa !17
  %74 = getelementptr inbounds double, ptr %73, i64 %.04959
  %75 = load double, ptr %74, align 8, !tbaa !18
  %76 = load ptr, ptr %33, align 8, !tbaa !17
  %77 = getelementptr inbounds double, ptr %76, i64 %.04959
  store double %75, ptr %77, align 8, !tbaa !18
  %78 = or disjoint i64 %.04959, 1
  %79 = load ptr, ptr %32, align 8, !tbaa !17
  %80 = getelementptr inbounds double, ptr %79, i64 %78
  %81 = load double, ptr %80, align 8, !tbaa !18
  %82 = load ptr, ptr %33, align 8, !tbaa !17
  %83 = getelementptr inbounds double, ptr %82, i64 %78
  store double %81, ptr %83, align 8, !tbaa !18
  %84 = or disjoint i64 %.04959, 2
  %85 = load ptr, ptr %32, align 8, !tbaa !17
  %86 = getelementptr inbounds double, ptr %85, i64 %84
  %87 = load double, ptr %86, align 8, !tbaa !18
  %88 = load ptr, ptr %33, align 8, !tbaa !17
  %89 = getelementptr inbounds double, ptr %88, i64 %84
  store double %87, ptr %89, align 8, !tbaa !18
  %90 = or disjoint i64 %.04959, 3
  %91 = load ptr, ptr %32, align 8, !tbaa !17
  %92 = getelementptr inbounds double, ptr %91, i64 %90
  %93 = load double, ptr %92, align 8, !tbaa !18
  %94 = load ptr, ptr %33, align 8, !tbaa !17
  %95 = getelementptr inbounds double, ptr %94, i64 %90
  store double %93, ptr %95, align 8, !tbaa !18
  %96 = add nuw nsw i64 %.04959, 4
  %niter73.next.3 = add i64 %niter73, 4
  %niter73.ncmp.3 = icmp eq i64 %niter73.next.3, %unroll_iter72
  br i1 %niter73.ncmp.3, label %.preheader.loopexit.unr-lcssa, label %72, !llvm.loop !25

97:                                               ; preds = %97, %.lr.ph64.new
  %.163 = phi i64 [ 0, %.lr.ph64.new ], [ %111, %97 ]
  %niter79 = phi i64 [ 0, %.lr.ph64.new ], [ %niter79.next.1, %97 ]
  %98 = load ptr, ptr %69, align 8, !tbaa !17
  %99 = getelementptr inbounds double, ptr %98, i64 %.163
  %100 = load double, ptr %99, align 8, !tbaa !18
  %101 = call double @llvm.fmuladd.f64(double %1, double %100, double %2)
  %102 = load ptr, ptr %70, align 8, !tbaa !17
  %103 = getelementptr inbounds double, ptr %102, i64 %.163
  store double %101, ptr %103, align 8, !tbaa !18
  %104 = or disjoint i64 %.163, 1
  %105 = load ptr, ptr %69, align 8, !tbaa !17
  %106 = getelementptr inbounds double, ptr %105, i64 %104
  %107 = load double, ptr %106, align 8, !tbaa !18
  %108 = call double @llvm.fmuladd.f64(double %1, double %107, double %2)
  %109 = load ptr, ptr %70, align 8, !tbaa !17
  %110 = getelementptr inbounds double, ptr %109, i64 %104
  store double %108, ptr %110, align 8, !tbaa !18
  %111 = add nuw nsw i64 %.163, 2
  %niter79.next.1 = add i64 %niter79, 2
  %niter79.ncmp.1 = icmp eq i64 %niter79.next.1, %unroll_iter78
  br i1 %niter79.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %97, !llvm.loop !26

._crit_edge.loopexit.unr-lcssa:                   ; preds = %97, %.lr.ph64
  %.163.unr = phi i64 [ 0, %.lr.ph64 ], [ %111, %97 ]
  %lcmp.mod77.not = icmp eq i64 %xtraiter75, 0
  br i1 %lcmp.mod77.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %112 = load ptr, ptr %69, align 8, !tbaa !17
  %113 = getelementptr inbounds double, ptr %112, i64 %.163.unr
  %114 = load double, ptr %113, align 8, !tbaa !18
  %115 = call double @llvm.fmuladd.f64(double %1, double %114, double %2)
  %116 = load ptr, ptr %70, align 8, !tbaa !17
  %117 = getelementptr inbounds double, ptr %116, i64 %.163.unr
  store double %115, ptr %117, align 8, !tbaa !18
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %.preheader
  %118 = load i64, ptr %0, align 8, !tbaa !5
  %119 = icmp eq i64 %118, -3
  br i1 %119, label %120, label %121

120:                                              ; preds = %._crit_edge
  call void @_ZN11alglib_impl21spline2dbuildbicubicvEPNS_9ae_vectorElS1_lS1_lPNS_19spline2dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %21, ptr noundef nonnull %7, i64 noundef %31, ptr noundef nonnull %8, i64 noundef %67, ptr noundef nonnull %0, ptr noundef %3)
  %.pr = load i64, ptr %0, align 8, !tbaa !5
  br label %121

121:                                              ; preds = %120, %._crit_edge
  %122 = phi i64 [ %.pr, %120 ], [ %118, %._crit_edge ]
  %123 = icmp eq i64 %122, -1
  br i1 %123, label %124, label %128

124:                                              ; preds = %121
  %125 = load i64, ptr %11, align 8, !tbaa !14
  %126 = load i64, ptr %13, align 8, !tbaa !15
  %127 = load i64, ptr %18, align 8, !tbaa !16
  call void @_ZN11alglib_impl22spline2dbuildbilinearvEPNS_9ae_vectorElS1_lS1_lPNS_19spline2dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %125, ptr noundef nonnull %7, i64 noundef %126, ptr noundef nonnull %8, i64 noundef %127, ptr noundef nonnull %0, ptr noundef %3)
  br label %128

128:                                              ; preds = %124, %121
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  ret void
}

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "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 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 nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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_impl19spline2dinterpolantE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 96, !10, i64 160}
!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 = !{!6, !7, i64 8}
!15 = !{!6, !7, i64 16}
!16 = !{!6, !7, i64 24}
!17 = !{!8, !8, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !8, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !21}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}


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