; LLVM IR from venumb/ZSPACE :: cpp/depends/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.18 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.19 = 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_impl15convc1dcircularEPNS_9ae_vectorElS1_lS1_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_impl15corrc1dcircularEPNS_9ae_vectorElS1_lS1_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 %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %25)
  %26 = 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 %26, i1 noundef zeroext true)
  %27 = 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 %27, i1 noundef zeroext true)
  %28 = load i64, ptr %10, align 8, !tbaa !9
  %29 = icmp sgt i64 %28, 0
  br i1 %29, label %30, label %33

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

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

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

42:                                               ; preds = %57, %39
  %43 = load i64, ptr %16, align 8, !tbaa !9
  %44 = load i64, ptr %8, align 8, !tbaa !9
  %45 = sub nsw i64 %44, 1
  %46 = icmp sle i64 %43, %45
  br i1 %46, label %47, label %60

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

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

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

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

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

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

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

100:                                              ; preds = %128, %97
  %101 = load i64, ptr %18, align 8, !tbaa !9
  %102 = load i64, ptr %10, align 8, !tbaa !9
  %103 = sub nsw i64 %102, 1
  %104 = icmp sle i64 %101, %103
  br i1 %104, label %105, label %131

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

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

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

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

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

180:                                              ; preds = %178, %90
  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
  %181 = load i32, ptr %21, align 4
  switch i32 %181, label %183 [
    i32 0, label %182
    i32 1, label %182
  ]

182:                                              ; preds = %180, %180
  ret void

183:                                              ; preds = %180
  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_impl15ae_vector_clearEPNS_9ae_vectorE(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.18 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.19 = 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_impl15convc1dcircularEPNS_9ae_vectorElS1_lS1_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_impl15corrc1dcircularEPNS_9ae_vectorElS1_lS1_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_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %4)
  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.18, 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.ph82, label %.preheader

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

.preheader:                                       ; preds = %19, %14
  br i1 %10, label %.lr.ph84, label %._crit_edge85

.lr.ph84:                                         ; 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.ph82, %19
  %.080 = phi i64 [ 0, %.lr.ph82 ], [ %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 %.080
  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 %.080, 1
  %exitcond86.not = icmp eq i64 %25, %1
  br i1 %exitcond86.not, label %.preheader, label %19, !llvm.loop !10

26:                                               ; preds = %.lr.ph84, %26
  %.183 = phi i64 [ 0, %.lr.ph84 ], [ %27, %26 ]
  %27 = add nsw i64 %.183, %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, %.183
  %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 %.183
  %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.19, i64 noundef %34)
  %35 = icmp slt i64 %27, %3
  br i1 %35, label %26, label %._crit_edge85, !llvm.loop !12

._crit_edge85:                                    ; preds = %26, %.preheader
  call void @_ZN11alglib_impl15corrc1dcircularEPNS_9ae_vectorElS1_lS1_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
  %.06778 = 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 %.06778
  %.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, %.06778
  %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 %.06778, 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_impl15convc1dcircularEPNS_9ae_vectorElS1_lS1_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_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %4, i64 noundef %1, 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.19, i64 noundef %56)
  %57 = add nsw i64 %1, -1
  %.not.not75 = icmp slt i64 %55, %57
  br i1 %.not.not75, 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.19, i64 noundef %63)
  br label %64

64:                                               ; preds = %._crit_edge, %58, %._crit_edge85
  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_impl15ae_vector_clearEPNS_9ae_vectorE(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