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

; 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::ae_complex" = type { double, double }

@.str.26 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl18corrc1dcircularbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5) #1 {
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.alglib_impl::ae_frame", align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca %"struct.alglib_impl::ae_complex", align 8
  %21 = alloca i32, align 4
  %22 = alloca %"struct.alglib_impl::ae_complex", align 8
  %23 = alloca %"struct.alglib_impl::ae_complex", align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i64 %1, ptr %8, align 8, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i64 %3, ptr %10, align 8, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %24 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %24, ptr noundef %13)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 64, i1 false)
  %25 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %14, i64 noundef 0, i64 noundef 4, ptr noundef %25, i1 noundef zeroext true)
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %15, i64 noundef 0, i64 noundef 4, ptr noundef %26, i1 noundef zeroext true)
  %27 = load i64, ptr %10, align 8, !tbaa !9
  %28 = icmp sgt i64 %27, 0
  br i1 %28, label %29, label %32

29:                                               ; preds = %6
  %30 = load i64, ptr %8, align 8, !tbaa !9
  %31 = icmp sgt i64 %30, 0
  br label %32

32:                                               ; preds = %29, %6
  %33 = phi i1 [ false, %6 ], [ %31, %29 ]
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef @.str.26, ptr noundef %34)
  %35 = load i64, ptr %8, align 8, !tbaa !9
  %36 = load i64, ptr %10, align 8, !tbaa !9
  %37 = icmp slt i64 %35, %36
  br i1 %37, label %38, label %96

38:                                               ; preds = %32
  %39 = load i64, ptr %8, align 8, !tbaa !9
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %15, i64 noundef %39, ptr noundef %40)
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %41

41:                                               ; preds = %56, %38
  %42 = load i64, ptr %16, align 8, !tbaa !9
  %43 = load i64, ptr %8, align 8, !tbaa !9
  %44 = sub nsw i64 %43, 1
  %45 = icmp sle i64 %42, %44
  br i1 %45, label %46, label %59

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  %47 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 0)
  %48 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %49 = extractvalue { double, double } %47, 0
  store double %49, ptr %48, align 8
  %50 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %51 = extractvalue { double, double } %47, 1
  store double %51, ptr %50, align 8
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %54 = load i64, ptr %16, align 8, !tbaa !9
  %55 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %53, i64 %54
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %55, ptr align 8 %20, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  br label %56

56:                                               ; preds = %46
  %57 = load i64, ptr %16, align 8, !tbaa !9
  %58 = add nsw i64 %57, 1
  store i64 %58, ptr %16, align 8, !tbaa !9
  br label %41, !llvm.loop !15

59:                                               ; preds = %41
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %60

60:                                               ; preds = %64, %59
  %61 = load i64, ptr %16, align 8, !tbaa !9
  %62 = load i64, ptr %10, align 8, !tbaa !9
  %63 = icmp slt i64 %61, %62
  br i1 %63, label %64, label %89

64:                                               ; preds = %60
  %65 = load i64, ptr %16, align 8, !tbaa !9
  %66 = load i64, ptr %8, align 8, !tbaa !9
  %67 = add nsw i64 %65, %66
  %68 = sub nsw i64 %67, 1
  %69 = load i64, ptr %10, align 8, !tbaa !9
  %70 = sub nsw i64 %69, 1
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %68, i64 noundef %70, ptr noundef %71)
  store i64 %72, ptr %17, align 8, !tbaa !9
  %73 = load i64, ptr %17, align 8, !tbaa !9
  %74 = load i64, ptr %16, align 8, !tbaa !9
  %75 = sub nsw i64 %73, %74
  store i64 %75, ptr %19, align 8, !tbaa !9
  %76 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %77 = load ptr, ptr %76, align 8, !tbaa !11
  %78 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %77, i64 0
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %79, i32 0, i32 4
  %81 = load ptr, ptr %80, align 8, !tbaa !11
  %82 = load i64, ptr %16, align 8, !tbaa !9
  %83 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %81, i64 %82
  %84 = load i64, ptr %19, align 8, !tbaa !9
  %85 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %84)
  call void @_ZN11alglib_impl9ae_v_caddEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %78, i64 noundef 1, ptr noundef %83, i64 noundef 1, ptr noundef @.str.27, i64 noundef %85)
  %86 = load i64, ptr %16, align 8, !tbaa !9
  %87 = load i64, ptr %8, align 8, !tbaa !9
  %88 = add nsw i64 %86, %87
  store i64 %88, ptr %16, align 8, !tbaa !9
  br label %60, !llvm.loop !17

89:                                               ; preds = %60
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = load i64, ptr %8, align 8, !tbaa !9
  %92 = load i64, ptr %8, align 8, !tbaa !9
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl18corrc1dcircularbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %90, i64 noundef %91, ptr noundef %15, i64 noundef %92, ptr noundef %93, ptr noundef %94)
  %95 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %95)
  store i32 1, ptr %21, align 4
  br label %179

96:                                               ; preds = %32
  %97 = load i64, ptr %10, align 8, !tbaa !9
  %98 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %97, ptr noundef %98)
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %99

99:                                               ; preds = %127, %96
  %100 = load i64, ptr %18, align 8, !tbaa !9
  %101 = load i64, ptr %10, align 8, !tbaa !9
  %102 = sub nsw i64 %101, 1
  %103 = icmp sle i64 %100, %102
  br i1 %103, label %104, label %130

104:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %105, i32 0, i32 4
  %107 = load ptr, ptr %106, align 8, !tbaa !11
  %108 = load i64, ptr %18, align 8, !tbaa !9
  %109 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %107, i64 %108
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %109, i64 16, i1 false), !tbaa.struct !12
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  %111 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %112 = load double, ptr %111, align 8
  %113 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %114 = load double, ptr %113, align 8
  %115 = call { double, double } @_ZN11alglib_impl9ae_c_conjENS_10ae_complexEPNS_8ae_stateE(double %112, double %114, ptr noundef %110)
  %116 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %117 = extractvalue { double, double } %115, 0
  store double %117, ptr %116, align 8
  %118 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %119 = extractvalue { double, double } %115, 1
  store double %119, ptr %118, align 8
  %120 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %121 = load ptr, ptr %120, align 8, !tbaa !11
  %122 = load i64, ptr %10, align 8, !tbaa !9
  %123 = sub nsw i64 %122, 1
  %124 = load i64, ptr %18, align 8, !tbaa !9
  %125 = sub nsw i64 %123, %124
  %126 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %121, i64 %125
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %126, ptr align 8 %22, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br label %127

127:                                              ; preds = %104
  %128 = load i64, ptr %18, align 8, !tbaa !9
  %129 = add nsw i64 %128, 1
  store i64 %129, ptr %18, align 8, !tbaa !9
  br label %99, !llvm.loop !18

130:                                              ; preds = %99
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = load i64, ptr %8, align 8, !tbaa !9
  %133 = load i64, ptr %10, align 8, !tbaa !9
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl15convc1dcircularEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %131, i64 noundef %132, ptr noundef %14, i64 noundef %133, ptr noundef %15, ptr noundef %134)
  %135 = load i64, ptr %8, align 8, !tbaa !9
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  %137 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl7callocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %135, ptr noundef %136, ptr noundef %137)
  %138 = load ptr, ptr %11, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %138, i32 0, i32 4
  %140 = load ptr, ptr %139, align 8, !tbaa !11
  %141 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %140, i64 0
  %142 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %143 = load ptr, ptr %142, align 8, !tbaa !11
  %144 = load i64, ptr %10, align 8, !tbaa !9
  %145 = sub nsw i64 %144, 1
  %146 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %143, i64 %145
  %147 = load i64, ptr %8, align 8, !tbaa !9
  %148 = load i64, ptr %10, align 8, !tbaa !9
  %149 = sub nsw i64 %147, %148
  %150 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %149)
  call void @_ZN11alglib_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %141, i64 noundef 1, ptr noundef %146, i64 noundef 1, ptr noundef @.str.27, i64 noundef %150)
  %151 = load i64, ptr %8, align 8, !tbaa !9
  %152 = load i64, ptr %10, align 8, !tbaa !9
  %153 = sub nsw i64 %151, %152
  %154 = add nsw i64 %153, 1
  %155 = load i64, ptr %8, align 8, !tbaa !9
  %156 = sub nsw i64 %155, 1
  %157 = icmp sle i64 %154, %156
  br i1 %157, label %158, label %177

158:                                              ; preds = %130
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  %160 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %159, i32 0, i32 4
  %161 = load ptr, ptr %160, align 8, !tbaa !11
  %162 = load i64, ptr %8, align 8, !tbaa !9
  %163 = load i64, ptr %10, align 8, !tbaa !9
  %164 = sub nsw i64 %162, %163
  %165 = add nsw i64 %164, 1
  %166 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %161, i64 %165
  %167 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %168 = load ptr, ptr %167, align 8, !tbaa !11
  %169 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %168, i64 0
  %170 = load i64, ptr %8, align 8, !tbaa !9
  %171 = load i64, ptr %10, align 8, !tbaa !9
  %172 = sub nsw i64 %170, %171
  %173 = add nsw i64 %172, 1
  %174 = load i64, ptr %8, align 8, !tbaa !9
  %175 = sub nsw i64 %174, 1
  %176 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %173, i64 noundef %175)
  call void @_ZN11alglib_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %166, i64 noundef 1, ptr noundef %169, i64 noundef 1, ptr noundef @.str.27, i64 noundef %176)
  br label %177

177:                                              ; preds = %158, %130
  %178 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %178)
  store i32 0, ptr %21, align 4
  br label %179

179:                                              ; preds = %177, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  %180 = load i32, ptr %21, align 4
  switch i32 %180, label %182 [
    i32 0, label %181
    i32 1, label %181
  ]

181:                                              ; preds = %179, %179
  ret void

182:                                              ; preds = %179
  unreachable
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

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

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

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

declare { double, double } @_ZN11alglib_impl9ae_c_conjENS_10ae_complexEPNS_8ae_stateE(double, double, ptr noundef) #2

declare { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef) #2

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{i64 0, i64 8, !13, i64 8, i64 8, !13}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


; 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 }
%"struct.alglib_impl::ae_complex" = type { double, double }

@.str.26 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl18corrc1dcircularbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr nocapture noundef readonly %2, i64 noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #1 {
  %7 = alloca %"struct.alglib_impl::ae_frame", align 8
  %8 = alloca %"struct.alglib_impl::ae_vector", align 8
  %9 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %5, ptr noundef nonnull %7)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %8, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %9, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 4, ptr noundef %5, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 4, ptr noundef %5, i1 noundef zeroext true)
  %10 = icmp sgt i64 %3, 0
  %11 = icmp sgt i64 %1, 0
  %12 = and i1 %11, %10
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.26, ptr noundef %5)
  %13 = icmp slt i64 %1, %3
  br i1 %13, label %14, label %36

14:                                               ; preds = %6
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %1, ptr noundef %5)
  br i1 %11, label %.lr.ph81, label %.preheader

.lr.ph81:                                         ; preds = %14
  %15 = getelementptr inbounds i8, ptr %9, i64 56
  br label %19

.preheader:                                       ; preds = %19, %14
  br i1 %10, label %.lr.ph83, label %._crit_edge84

.lr.ph83:                                         ; preds = %.preheader
  %16 = add nsw i64 %3, -1
  %17 = getelementptr inbounds i8, ptr %9, i64 56
  %18 = getelementptr inbounds i8, ptr %2, i64 56
  br label %26

19:                                               ; preds = %.lr.ph81, %19
  %.079 = phi i64 [ 0, %.lr.ph81 ], [ %25, %19 ]
  %20 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 0)
  %21 = extractvalue { double, double } %20, 0
  %22 = extractvalue { double, double } %20, 1
  %23 = load ptr, ptr %15, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %23, i64 %.079
  store double %21, ptr %24, align 8, !tbaa !8
  %.sroa.43.0..sroa_idx = getelementptr inbounds i8, ptr %24, i64 8
  store double %22, ptr %.sroa.43.0..sroa_idx, align 8, !tbaa !8
  %25 = add nuw nsw i64 %.079, 1
  %exitcond85.not = icmp eq i64 %25, %1
  br i1 %exitcond85.not, label %.preheader, label %19, !llvm.loop !10

26:                                               ; preds = %.lr.ph83, %26
  %.182 = phi i64 [ 0, %.lr.ph83 ], [ %27, %26 ]
  %27 = add nsw i64 %.182, %1
  %28 = add nsw i64 %27, -1
  %29 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %28, i64 noundef %16, ptr noundef %5)
  %30 = sub nsw i64 %29, %.182
  %31 = load ptr, ptr %17, align 8, !tbaa !5
  %32 = load ptr, ptr %18, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %32, i64 %.182
  %34 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %30)
  call void @_ZN11alglib_impl9ae_v_caddEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %31, i64 noundef 1, ptr noundef %33, i64 noundef 1, ptr noundef nonnull @.str.27, i64 noundef %34)
  %35 = icmp slt i64 %27, %3
  br i1 %35, label %26, label %._crit_edge84, !llvm.loop !12

._crit_edge84:                                    ; preds = %26, %.preheader
  call void @_ZN11alglib_impl18corrc1dcircularbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef nonnull %9, i64 noundef %1, ptr noundef %4, ptr noundef %5)
  br label %64

36:                                               ; preds = %6
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %3, ptr noundef %5)
  %37 = add nsw i64 %3, -1
  br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %36
  %38 = getelementptr inbounds i8, ptr %2, i64 56
  %39 = getelementptr inbounds i8, ptr %8, i64 56
  br label %40

40:                                               ; preds = %.lr.ph, %40
  %.06677 = phi i64 [ 0, %.lr.ph ], [ %49, %40 ]
  %41 = load ptr, ptr %38, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %41, i64 %.06677
  %.sroa.0.0.copyload = load double, ptr %42, align 8, !tbaa !8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %42, i64 8
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !8
  %43 = call { double, double } @_ZN11alglib_impl9ae_c_conjENS_10ae_complexEPNS_8ae_stateE(double %.sroa.0.0.copyload, double %.sroa.2.0.copyload, ptr noundef %5)
  %44 = extractvalue { double, double } %43, 0
  %45 = extractvalue { double, double } %43, 1
  %46 = load ptr, ptr %39, align 8, !tbaa !5
  %47 = sub nsw i64 %37, %.06677
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %46, i64 %47
  store double %44, ptr %48, align 8, !tbaa !8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %48, i64 8
  store double %45, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !8
  %49 = add nuw nsw i64 %.06677, 1
  %exitcond.not = icmp eq i64 %49, %3
  br i1 %exitcond.not, label %._crit_edge, label %40, !llvm.loop !13

._crit_edge:                                      ; preds = %40, %36
  call void @_ZN11alglib_impl15convc1dcircularEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef nonnull %8, i64 noundef %3, ptr noundef nonnull %9, ptr noundef %5)
  call void @_ZN11alglib_impl7callocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %1, ptr noundef %4, ptr noundef %5)
  %50 = getelementptr inbounds i8, ptr %4, i64 56
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %9, i64 56
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %53, i64 %37
  %55 = sub nsw i64 %1, %3
  %56 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %55)
  call void @_ZN11alglib_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %51, i64 noundef 1, ptr noundef %54, i64 noundef 1, ptr noundef nonnull @.str.27, i64 noundef %56)
  %57 = add nsw i64 %1, -1
  %.not.not74 = icmp slt i64 %55, %57
  br i1 %.not.not74, label %58, label %64

58:                                               ; preds = %._crit_edge
  %59 = add nsw i64 %55, 1
  %60 = load ptr, ptr %50, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %60, i64 %59
  %62 = load ptr, ptr %52, align 8, !tbaa !5
  %63 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %59, i64 noundef %57)
  call void @_ZN11alglib_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %61, i64 noundef 1, ptr noundef %62, i64 noundef 1, ptr noundef nonnull @.str.27, i64 noundef %63)
  br label %64

64:                                               ; preds = %._crit_edge, %58, %._crit_edge84
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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

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

declare { double, double } @_ZN11alglib_impl9ae_c_conjENS_10ae_complexEPNS_8ae_stateE(double, double, ptr noundef) local_unnamed_addr #2

declare { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef) local_unnamed_addr #2

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"double", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}


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