; 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::fasttransformplan" = type { %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_shared_pool" }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_shared_pool" = type { %"struct.alglib_impl::ae_lock", ptr, ptr, ptr, ptr, i64, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }
%"struct.alglib_impl::ae_complex" = type { double, double }

@.str.27 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [38 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
define dso_local void @_ZN11alglib_impl21convc1dcircularinvbufEPKNS_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 i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca %"struct.alglib_impl::ae_vector", align 8
  %19 = alloca %"struct.alglib_impl::ae_vector", align 8
  %20 = alloca %"struct.alglib_impl::ae_vector", align 8
  %21 = alloca %"struct.alglib_impl::fasttransformplan", align 8
  %22 = alloca %"struct.alglib_impl::ae_complex", align 8
  %23 = alloca %"struct.alglib_impl::ae_complex", align 8
  %24 = alloca %"struct.alglib_impl::ae_complex", align 8
  %25 = alloca double, align 8
  %26 = alloca %"struct.alglib_impl::ae_complex", align 8
  %27 = alloca i32, align 4
  %28 = alloca %"struct.alglib_impl::ae_complex", align 8
  %29 = alloca %"struct.alglib_impl::ae_complex", align 8
  %30 = 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 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, 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 64, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 408, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %31, ptr noundef %13)
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 408, i1 false)
  %32 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %18, i64 noundef 0, i64 noundef 3, ptr noundef %32, i1 noundef zeroext true)
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %19, i64 noundef 0, i64 noundef 3, ptr noundef %33, i1 noundef zeroext true)
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %20, i64 noundef 0, i64 noundef 4, ptr noundef %34, i1 noundef zeroext true)
  %35 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23_fasttransformplan_initEPvPNS_8ae_stateEb(ptr noundef %21, ptr noundef %35, i1 noundef zeroext true)
  %36 = load i64, ptr %10, align 8, !tbaa !9
  %37 = icmp sgt i64 %36, 0
  br i1 %37, label %38, label %41

38:                                               ; preds = %6
  %39 = load i64, ptr %8, align 8, !tbaa !9
  %40 = icmp sgt i64 %39, 0
  br label %41

41:                                               ; preds = %38, %6
  %42 = phi i1 [ false, %6 ], [ %40, %38 ]
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %42, ptr noundef @.str.28, ptr noundef %43)
  %44 = load i64, ptr %8, align 8, !tbaa !9
  %45 = load i64, ptr %10, align 8, !tbaa !9
  %46 = icmp slt i64 %44, %45
  br i1 %46, label %47, label %105

47:                                               ; preds = %41
  %48 = load i64, ptr %8, align 8, !tbaa !9
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %20, i64 noundef %48, ptr noundef %49)
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %50

50:                                               ; preds = %65, %47
  %51 = load i64, ptr %14, align 8, !tbaa !9
  %52 = load i64, ptr %8, align 8, !tbaa !9
  %53 = sub nsw i64 %52, 1
  %54 = icmp sle i64 %51, %53
  br i1 %54, label %55, label %68

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  %56 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 0)
  %57 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %58 = extractvalue { double, double } %56, 0
  store double %58, ptr %57, align 8
  %59 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %60 = extractvalue { double, double } %56, 1
  store double %60, ptr %59, align 8
  %61 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %20, i32 0, i32 4
  %62 = load ptr, ptr %61, align 8, !tbaa !11
  %63 = load i64, ptr %14, align 8, !tbaa !9
  %64 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %62, i64 %63
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %64, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  br label %65

65:                                               ; preds = %55
  %66 = load i64, ptr %14, align 8, !tbaa !9
  %67 = add nsw i64 %66, 1
  store i64 %67, ptr %14, align 8, !tbaa !9
  br label %50, !llvm.loop !15

68:                                               ; preds = %50
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %73, %68
  %70 = load i64, ptr %15, align 8, !tbaa !9
  %71 = load i64, ptr %10, align 8, !tbaa !9
  %72 = icmp slt i64 %70, %71
  br i1 %72, label %73, label %98

73:                                               ; preds = %69
  %74 = load i64, ptr %15, align 8, !tbaa !9
  %75 = load i64, ptr %8, align 8, !tbaa !9
  %76 = add nsw i64 %74, %75
  %77 = sub nsw i64 %76, 1
  %78 = load i64, ptr %10, align 8, !tbaa !9
  %79 = sub nsw i64 %78, 1
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %77, i64 noundef %79, ptr noundef %80)
  store i64 %81, ptr %16, align 8, !tbaa !9
  %82 = load i64, ptr %16, align 8, !tbaa !9
  %83 = load i64, ptr %15, align 8, !tbaa !9
  %84 = sub nsw i64 %82, %83
  store i64 %84, ptr %17, align 8, !tbaa !9
  %85 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %20, i32 0, i32 4
  %86 = load ptr, ptr %85, align 8, !tbaa !11
  %87 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %86, i64 0
  %88 = load ptr, ptr %9, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %88, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !11
  %91 = load i64, ptr %15, align 8, !tbaa !9
  %92 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %90, i64 %91
  %93 = load i64, ptr %17, align 8, !tbaa !9
  %94 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %93)
  call void @_ZN11alglib_impl9ae_v_caddEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %87, i64 noundef 1, ptr noundef %92, i64 noundef 1, ptr noundef @.str.27, i64 noundef %94)
  %95 = load i64, ptr %15, align 8, !tbaa !9
  %96 = load i64, ptr %8, align 8, !tbaa !9
  %97 = add nsw i64 %95, %96
  store i64 %97, ptr %15, align 8, !tbaa !9
  br label %69, !llvm.loop !17

98:                                               ; preds = %69
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = load i64, ptr %8, align 8, !tbaa !9
  %101 = load i64, ptr %8, align 8, !tbaa !9
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  %103 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl21convc1dcircularinvbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %99, i64 noundef %100, ptr noundef %20, i64 noundef %101, ptr noundef %102, ptr noundef %103)
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %104)
  store i32 1, ptr %27, align 4
  br label %332

105:                                              ; preds = %41
  %106 = load i64, ptr %8, align 8, !tbaa !9
  %107 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl16ftcomplexfftplanEllPNS_17fasttransformplanEPNS_8ae_stateE(i64 noundef %106, i64 noundef 1, ptr noundef %21, ptr noundef %107)
  %108 = load i64, ptr %8, align 8, !tbaa !9
  %109 = mul nsw i64 2, %108
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %18, i64 noundef %109, ptr noundef %110)
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %111

111:                                              ; preds = %143, %105
  %112 = load i64, ptr %14, align 8, !tbaa !9
  %113 = load i64, ptr %8, align 8, !tbaa !9
  %114 = sub nsw i64 %113, 1
  %115 = icmp sle i64 %112, %114
  br i1 %115, label %116, label %146

116:                                              ; preds = %111
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %117, i32 0, i32 4
  %119 = load ptr, ptr %118, align 8, !tbaa !11
  %120 = load i64, ptr %14, align 8, !tbaa !9
  %121 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %119, i64 %120
  %122 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %121, i32 0, i32 0
  %123 = load double, ptr %122, align 8, !tbaa !18
  %124 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %125 = load ptr, ptr %124, align 8, !tbaa !11
  %126 = load i64, ptr %14, align 8, !tbaa !9
  %127 = mul nsw i64 2, %126
  %128 = add nsw i64 %127, 0
  %129 = getelementptr inbounds double, ptr %125, i64 %128
  store double %123, ptr %129, align 8, !tbaa !13
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %130, i32 0, i32 4
  %132 = load ptr, ptr %131, align 8, !tbaa !11
  %133 = load i64, ptr %14, align 8, !tbaa !9
  %134 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %132, i64 %133
  %135 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %134, i32 0, i32 1
  %136 = load double, ptr %135, align 8, !tbaa !20
  %137 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %138 = load ptr, ptr %137, align 8, !tbaa !11
  %139 = load i64, ptr %14, align 8, !tbaa !9
  %140 = mul nsw i64 2, %139
  %141 = add nsw i64 %140, 1
  %142 = getelementptr inbounds double, ptr %138, i64 %141
  store double %136, ptr %142, align 8, !tbaa !13
  br label %143

143:                                              ; preds = %116
  %144 = load i64, ptr %14, align 8, !tbaa !9
  %145 = add nsw i64 %144, 1
  store i64 %145, ptr %14, align 8, !tbaa !9
  br label %111, !llvm.loop !21

146:                                              ; preds = %111
  %147 = load i64, ptr %8, align 8, !tbaa !9
  %148 = mul nsw i64 2, %147
  %149 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %19, i64 noundef %148, ptr noundef %149)
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %150

150:                                              ; preds = %182, %146
  %151 = load i64, ptr %14, align 8, !tbaa !9
  %152 = load i64, ptr %10, align 8, !tbaa !9
  %153 = sub nsw i64 %152, 1
  %154 = icmp sle i64 %151, %153
  br i1 %154, label %155, label %185

155:                                              ; preds = %150
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %156, i32 0, i32 4
  %158 = load ptr, ptr %157, align 8, !tbaa !11
  %159 = load i64, ptr %14, align 8, !tbaa !9
  %160 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %158, i64 %159
  %161 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %160, i32 0, i32 0
  %162 = load double, ptr %161, align 8, !tbaa !18
  %163 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %164 = load ptr, ptr %163, align 8, !tbaa !11
  %165 = load i64, ptr %14, align 8, !tbaa !9
  %166 = mul nsw i64 2, %165
  %167 = add nsw i64 %166, 0
  %168 = getelementptr inbounds double, ptr %164, i64 %167
  store double %162, ptr %168, align 8, !tbaa !13
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %169, i32 0, i32 4
  %171 = load ptr, ptr %170, align 8, !tbaa !11
  %172 = load i64, ptr %14, align 8, !tbaa !9
  %173 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %171, i64 %172
  %174 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %173, i32 0, i32 1
  %175 = load double, ptr %174, align 8, !tbaa !20
  %176 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %177 = load ptr, ptr %176, align 8, !tbaa !11
  %178 = load i64, ptr %14, align 8, !tbaa !9
  %179 = mul nsw i64 2, %178
  %180 = add nsw i64 %179, 1
  %181 = getelementptr inbounds double, ptr %177, i64 %180
  store double %175, ptr %181, align 8, !tbaa !13
  br label %182

182:                                              ; preds = %155
  %183 = load i64, ptr %14, align 8, !tbaa !9
  %184 = add nsw i64 %183, 1
  store i64 %184, ptr %14, align 8, !tbaa !9
  br label %150, !llvm.loop !22

185:                                              ; preds = %150
  %186 = load i64, ptr %10, align 8, !tbaa !9
  store i64 %186, ptr %14, align 8, !tbaa !9
  br label %187

187:                                              ; preds = %205, %185
  %188 = load i64, ptr %14, align 8, !tbaa !9
  %189 = load i64, ptr %8, align 8, !tbaa !9
  %190 = sub nsw i64 %189, 1
  %191 = icmp sle i64 %188, %190
  br i1 %191, label %192, label %208

192:                                              ; preds = %187
  %193 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %194 = load ptr, ptr %193, align 8, !tbaa !11
  %195 = load i64, ptr %14, align 8, !tbaa !9
  %196 = mul nsw i64 2, %195
  %197 = add nsw i64 %196, 0
  %198 = getelementptr inbounds double, ptr %194, i64 %197
  store double 0.000000e+00, ptr %198, align 8, !tbaa !13
  %199 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %200 = load ptr, ptr %199, align 8, !tbaa !11
  %201 = load i64, ptr %14, align 8, !tbaa !9
  %202 = mul nsw i64 2, %201
  %203 = add nsw i64 %202, 1
  %204 = getelementptr inbounds double, ptr %200, i64 %203
  store double 0.000000e+00, ptr %204, align 8, !tbaa !13
  br label %205

205:                                              ; preds = %192
  %206 = load i64, ptr %14, align 8, !tbaa !9
  %207 = add nsw i64 %206, 1
  store i64 %207, ptr %14, align 8, !tbaa !9
  br label %187, !llvm.loop !23

208:                                              ; preds = %187
  %209 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl11ftapplyplanEPNS_17fasttransformplanEPNS_9ae_vectorEllPNS_8ae_stateE(ptr noundef %21, ptr noundef %18, i64 noundef 0, i64 noundef 1, ptr noundef %209)
  %210 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl11ftapplyplanEPNS_17fasttransformplanEPNS_9ae_vectorEllPNS_8ae_stateE(ptr noundef %21, ptr noundef %19, i64 noundef 0, i64 noundef 1, ptr noundef %210)
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %211

211:                                              ; preds = %279, %208
  %212 = load i64, ptr %14, align 8, !tbaa !9
  %213 = load i64, ptr %8, align 8, !tbaa !9
  %214 = sub nsw i64 %213, 1
  %215 = icmp sle i64 %212, %214
  br i1 %215, label %216, label %282

216:                                              ; preds = %211
  %217 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %218 = load ptr, ptr %217, align 8, !tbaa !11
  %219 = load i64, ptr %14, align 8, !tbaa !9
  %220 = mul nsw i64 2, %219
  %221 = add nsw i64 %220, 0
  %222 = getelementptr inbounds double, ptr %218, i64 %221
  %223 = load double, ptr %222, align 8, !tbaa !13
  %224 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %22, i32 0, i32 0
  store double %223, ptr %224, align 8, !tbaa !18
  %225 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %226 = load ptr, ptr %225, align 8, !tbaa !11
  %227 = load i64, ptr %14, align 8, !tbaa !9
  %228 = mul nsw i64 2, %227
  %229 = add nsw i64 %228, 1
  %230 = getelementptr inbounds double, ptr %226, i64 %229
  %231 = load double, ptr %230, align 8, !tbaa !13
  %232 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %22, i32 0, i32 1
  store double %231, ptr %232, align 8, !tbaa !20
  %233 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %234 = load ptr, ptr %233, align 8, !tbaa !11
  %235 = load i64, ptr %14, align 8, !tbaa !9
  %236 = mul nsw i64 2, %235
  %237 = add nsw i64 %236, 0
  %238 = getelementptr inbounds double, ptr %234, i64 %237
  %239 = load double, ptr %238, align 8, !tbaa !13
  %240 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %23, i32 0, i32 0
  store double %239, ptr %240, align 8, !tbaa !18
  %241 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %242 = load ptr, ptr %241, align 8, !tbaa !11
  %243 = load i64, ptr %14, align 8, !tbaa !9
  %244 = mul nsw i64 2, %243
  %245 = add nsw i64 %244, 1
  %246 = getelementptr inbounds double, ptr %242, i64 %245
  %247 = load double, ptr %246, align 8, !tbaa !13
  %248 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %23, i32 0, i32 1
  store double %247, ptr %248, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %29, ptr align 8 %22, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 8 %23, i64 16, i1 false), !tbaa.struct !12
  %249 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %250 = load double, ptr %249, align 8
  %251 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %252 = load double, ptr %251, align 8
  %253 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %254 = load double, ptr %253, align 8
  %255 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %256 = load double, ptr %255, align 8
  %257 = call { double, double } @_ZN11alglib_impl8ae_c_divENS_10ae_complexES0_(double %250, double %252, double %254, double %256)
  %258 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %259 = extractvalue { double, double } %257, 0
  store double %259, ptr %258, align 8
  %260 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %261 = extractvalue { double, double } %257, 1
  store double %261, ptr %260, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %28, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  %262 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %24, i32 0, i32 0
  %263 = load double, ptr %262, align 8, !tbaa !18
  %264 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %265 = load ptr, ptr %264, align 8, !tbaa !11
  %266 = load i64, ptr %14, align 8, !tbaa !9
  %267 = mul nsw i64 2, %266
  %268 = add nsw i64 %267, 0
  %269 = getelementptr inbounds double, ptr %265, i64 %268
  store double %263, ptr %269, align 8, !tbaa !13
  %270 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %24, i32 0, i32 1
  %271 = load double, ptr %270, align 8, !tbaa !20
  %272 = fneg double %271
  %273 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %274 = load ptr, ptr %273, align 8, !tbaa !11
  %275 = load i64, ptr %14, align 8, !tbaa !9
  %276 = mul nsw i64 2, %275
  %277 = add nsw i64 %276, 1
  %278 = getelementptr inbounds double, ptr %274, i64 %277
  store double %272, ptr %278, align 8, !tbaa !13
  br label %279

279:                                              ; preds = %216
  %280 = load i64, ptr %14, align 8, !tbaa !9
  %281 = add nsw i64 %280, 1
  store i64 %281, ptr %14, align 8, !tbaa !9
  br label %211, !llvm.loop !24

282:                                              ; preds = %211
  %283 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl11ftapplyplanEPNS_17fasttransformplanEPNS_9ae_vectorEllPNS_8ae_stateE(ptr noundef %21, ptr noundef %18, i64 noundef 0, i64 noundef 1, ptr noundef %283)
  %284 = load i64, ptr %8, align 8, !tbaa !9
  %285 = sitofp i64 %284 to double
  %286 = fdiv double 1.000000e+00, %285
  store double %286, ptr %25, align 8, !tbaa !13
  %287 = load i64, ptr %8, align 8, !tbaa !9
  %288 = load ptr, ptr %11, align 8, !tbaa !5
  %289 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl7callocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %287, ptr noundef %288, ptr noundef %289)
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %290

290:                                              ; preds = %327, %282
  %291 = load i64, ptr %14, align 8, !tbaa !9
  %292 = load i64, ptr %8, align 8, !tbaa !9
  %293 = sub nsw i64 %292, 1
  %294 = icmp sle i64 %291, %293
  br i1 %294, label %295, label %330

295:                                              ; preds = %290
  %296 = load double, ptr %25, align 8, !tbaa !13
  %297 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %298 = load ptr, ptr %297, align 8, !tbaa !11
  %299 = load i64, ptr %14, align 8, !tbaa !9
  %300 = mul nsw i64 2, %299
  %301 = add nsw i64 %300, 0
  %302 = getelementptr inbounds double, ptr %298, i64 %301
  %303 = load double, ptr %302, align 8, !tbaa !13
  %304 = fmul double %296, %303
  %305 = load ptr, ptr %11, align 8, !tbaa !5
  %306 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %305, i32 0, i32 4
  %307 = load ptr, ptr %306, align 8, !tbaa !11
  %308 = load i64, ptr %14, align 8, !tbaa !9
  %309 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %307, i64 %308
  %310 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %309, i32 0, i32 0
  store double %304, ptr %310, align 8, !tbaa !18
  %311 = load double, ptr %25, align 8, !tbaa !13
  %312 = fneg double %311
  %313 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %314 = load ptr, ptr %313, align 8, !tbaa !11
  %315 = load i64, ptr %14, align 8, !tbaa !9
  %316 = mul nsw i64 2, %315
  %317 = add nsw i64 %316, 1
  %318 = getelementptr inbounds double, ptr %314, i64 %317
  %319 = load double, ptr %318, align 8, !tbaa !13
  %320 = fmul double %312, %319
  %321 = load ptr, ptr %11, align 8, !tbaa !5
  %322 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %321, i32 0, i32 4
  %323 = load ptr, ptr %322, align 8, !tbaa !11
  %324 = load i64, ptr %14, align 8, !tbaa !9
  %325 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %323, i64 %324
  %326 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %325, i32 0, i32 1
  store double %320, ptr %326, align 8, !tbaa !20
  br label %327

327:                                              ; preds = %295
  %328 = load i64, ptr %14, align 8, !tbaa !9
  %329 = add nsw i64 %328, 1
  store i64 %329, ptr %14, align 8, !tbaa !9
  br label %290, !llvm.loop !25

330:                                              ; preds = %290
  %331 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %331)
  store i32 0, ptr %27, align 4
  br label %332

332:                                              ; preds = %330, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 408, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 64, 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 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  %333 = load i32, ptr %27, align 4
  switch i32 %333, label %335 [
    i32 0, label %334
    i32 1, label %334
  ]

334:                                              ; preds = %332, %332
  ret void

335:                                              ; preds = %332
  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_impl23_fasttransformplan_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #2

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_impl16ftcomplexfftplanEllPNS_17fasttransformplanEPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, ptr noundef) #2

declare void @_ZN11alglib_impl11ftapplyplanEPNS_17fasttransformplanEPNS_9ae_vectorEllPNS_8ae_stateE(ptr noundef, ptr noundef, i64 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_impl8ae_c_divENS_10ae_complexES0_(double, double, double, double) #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

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 = !{!19, !14, i64 0}
!19 = !{!"_ZTSN11alglib_impl10ae_complexE", !14, i64 0, !14, i64 8}
!20 = !{!19, !14, i64 8}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !16}
!25 = distinct !{!25, !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::fasttransformplan" = type { %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_shared_pool" }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_shared_pool" = type { %"struct.alglib_impl::ae_lock", ptr, ptr, ptr, ptr, i64, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }
%"struct.alglib_impl::ae_complex" = type { double, double }

@.str.27 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [38 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
define dso_local void @_ZN11alglib_impl21convc1dcircularinvbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr nocapture noundef readonly %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
  %10 = alloca %"struct.alglib_impl::ae_vector", align 8
  %11 = alloca %"struct.alglib_impl::fasttransformplan", 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 @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 408, ptr nonnull %11) #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 @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %10, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(408) %11, i8 0, i64 408, i1 false)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 3, 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 3, ptr noundef %5, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %10, i64 noundef 0, i64 noundef 4, ptr noundef %5, i1 noundef zeroext true)
  call void @_ZN11alglib_impl23_fasttransformplan_initEPvPNS_8ae_stateEb(ptr noundef nonnull %11, ptr noundef %5, i1 noundef zeroext true)
  %12 = icmp sgt i64 %3, 0
  %13 = icmp sgt i64 %1, 0
  %14 = and i1 %13, %12
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %14, ptr noundef nonnull @.str.28, ptr noundef %5)
  %15 = icmp slt i64 %1, %3
  br i1 %15, label %16, label %38

16:                                               ; preds = %6
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %1, ptr noundef %5)
  br i1 %13, label %.lr.ph138, label %.preheader

.lr.ph138:                                        ; preds = %16
  %17 = getelementptr inbounds i8, ptr %10, i64 56
  br label %21

.preheader:                                       ; preds = %21, %16
  br i1 %12, label %.lr.ph140, label %._crit_edge141

.lr.ph140:                                        ; preds = %.preheader
  %18 = add nsw i64 %3, -1
  %19 = getelementptr inbounds i8, ptr %10, i64 56
  %20 = getelementptr inbounds i8, ptr %2, i64 56
  br label %28

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

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

._crit_edge141:                                   ; preds = %28, %.preheader
  call void @_ZN11alglib_impl21convc1dcircularinvbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef nonnull %10, i64 noundef %1, ptr noundef %4, ptr noundef %5)
  br label %._crit_edge134

38:                                               ; preds = %6
  call void @_ZN11alglib_impl16ftcomplexfftplanEllPNS_17fasttransformplanEPNS_8ae_stateE(i64 noundef %1, i64 noundef 1, ptr noundef nonnull %11, ptr noundef %5)
  %39 = shl nsw i64 %1, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %39, ptr noundef %5)
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %38
  %40 = getelementptr inbounds i8, ptr %0, i64 56
  %41 = getelementptr inbounds i8, ptr %8, i64 56
  br label %42

42:                                               ; preds = %.lr.ph, %42
  %.1116 = phi i64 [ 0, %.lr.ph ], [ %55, %42 ]
  %43 = load ptr, ptr %40, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %43, i64 %.1116
  %45 = load double, ptr %44, align 8, !tbaa !13
  %46 = load ptr, ptr %41, align 8, !tbaa !5
  %47 = shl nuw nsw i64 %.1116, 1
  %48 = getelementptr inbounds double, ptr %46, i64 %47
  store double %45, ptr %48, align 8, !tbaa !8
  %49 = load ptr, ptr %40, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %49, i64 %.1116, i32 1
  %51 = load double, ptr %50, align 8, !tbaa !15
  %52 = load ptr, ptr %41, align 8, !tbaa !5
  %53 = or disjoint i64 %47, 1
  %54 = getelementptr inbounds double, ptr %52, i64 %53
  store double %51, ptr %54, align 8, !tbaa !8
  %55 = add nuw nsw i64 %.1116, 1
  %exitcond.not = icmp eq i64 %55, %1
  br i1 %exitcond.not, label %._crit_edge, label %42, !llvm.loop !16

._crit_edge:                                      ; preds = %42, %38
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %39, ptr noundef %5)
  br i1 %12, label %.lr.ph120, label %.preheader114

.lr.ph120:                                        ; preds = %._crit_edge
  %56 = getelementptr inbounds i8, ptr %2, i64 56
  %57 = getelementptr inbounds i8, ptr %9, i64 56
  br label %69

.preheader114:                                    ; preds = %69, %._crit_edge
  %.not.not110121 = icmp slt i64 %3, %1
  br i1 %.not.not110121, label %.lr.ph123, label %._crit_edge124

.lr.ph123:                                        ; preds = %.preheader114
  %58 = getelementptr inbounds i8, ptr %9, i64 56
  %59 = sub i64 %1, %3
  %xtraiter = and i64 %59, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.prol.loopexit, label %.prol.loopexit.unr-lcssa

.prol.loopexit.unr-lcssa:                         ; preds = %.lr.ph123
  %60 = load ptr, ptr %58, align 8, !tbaa !5
  %61 = shl nsw i64 %3, 1
  %62 = getelementptr inbounds double, ptr %60, i64 %61
  store double 0.000000e+00, ptr %62, align 8, !tbaa !8
  %63 = load ptr, ptr %58, align 8, !tbaa !5
  %64 = or disjoint i64 %61, 1
  %65 = getelementptr inbounds double, ptr %63, i64 %64
  store double 0.000000e+00, ptr %65, align 8, !tbaa !8
  %66 = add nsw i64 %3, 1
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph123
  %.3122.unr = phi i64 [ %3, %.lr.ph123 ], [ %66, %.prol.loopexit.unr-lcssa ]
  %67 = add i64 %1, -1
  %68 = icmp eq i64 %67, %3
  br i1 %68, label %._crit_edge124, label %.lr.ph123.new

69:                                               ; preds = %.lr.ph120, %69
  %.2118 = phi i64 [ 0, %.lr.ph120 ], [ %82, %69 ]
  %70 = load ptr, ptr %56, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %70, i64 %.2118
  %72 = load double, ptr %71, align 8, !tbaa !13
  %73 = load ptr, ptr %57, align 8, !tbaa !5
  %74 = shl nuw nsw i64 %.2118, 1
  %75 = getelementptr inbounds double, ptr %73, i64 %74
  store double %72, ptr %75, align 8, !tbaa !8
  %76 = load ptr, ptr %56, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %76, i64 %.2118, i32 1
  %78 = load double, ptr %77, align 8, !tbaa !15
  %79 = load ptr, ptr %57, align 8, !tbaa !5
  %80 = or disjoint i64 %74, 1
  %81 = getelementptr inbounds double, ptr %79, i64 %80
  store double %78, ptr %81, align 8, !tbaa !8
  %82 = add nuw nsw i64 %.2118, 1
  %exitcond142.not = icmp eq i64 %82, %3
  br i1 %exitcond142.not, label %.preheader114, label %69, !llvm.loop !17

.lr.ph123.new:                                    ; preds = %.prol.loopexit, %.lr.ph123.new
  %.3122 = phi i64 [ %96, %.lr.ph123.new ], [ %.3122.unr, %.prol.loopexit ]
  %83 = load ptr, ptr %58, align 8, !tbaa !5
  %84 = shl nsw i64 %.3122, 1
  %85 = getelementptr inbounds double, ptr %83, i64 %84
  store double 0.000000e+00, ptr %85, align 8, !tbaa !8
  %86 = load ptr, ptr %58, align 8, !tbaa !5
  %87 = or disjoint i64 %84, 1
  %88 = getelementptr inbounds double, ptr %86, i64 %87
  store double 0.000000e+00, ptr %88, align 8, !tbaa !8
  %89 = load ptr, ptr %58, align 8, !tbaa !5
  %90 = shl i64 %.3122, 1
  %91 = add i64 %90, 2
  %92 = getelementptr inbounds double, ptr %89, i64 %91
  store double 0.000000e+00, ptr %92, align 8, !tbaa !8
  %93 = load ptr, ptr %58, align 8, !tbaa !5
  %94 = or disjoint i64 %91, 1
  %95 = getelementptr inbounds double, ptr %93, i64 %94
  store double 0.000000e+00, ptr %95, align 8, !tbaa !8
  %96 = add nsw i64 %.3122, 2
  %exitcond143.not.1 = icmp eq i64 %96, %1
  br i1 %exitcond143.not.1, label %._crit_edge124, label %.lr.ph123.new, !llvm.loop !18

._crit_edge124:                                   ; preds = %.prol.loopexit, %.lr.ph123.new, %.preheader114
  call void @_ZN11alglib_impl11ftapplyplanEPNS_17fasttransformplanEPNS_9ae_vectorEllPNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef nonnull %8, i64 noundef 0, i64 noundef 1, ptr noundef %5)
  call void @_ZN11alglib_impl11ftapplyplanEPNS_17fasttransformplanEPNS_9ae_vectorEllPNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef nonnull %9, i64 noundef 0, i64 noundef 1, ptr noundef %5)
  br i1 %13, label %.lr.ph128, label %._crit_edge129

.lr.ph128:                                        ; preds = %._crit_edge124
  %97 = getelementptr inbounds i8, ptr %8, i64 56
  %98 = getelementptr inbounds i8, ptr %9, i64 56
  br label %99

99:                                               ; preds = %.lr.ph128, %99
  %.4126 = phi i64 [ 0, %.lr.ph128 ], [ %120, %99 ]
  %100 = load ptr, ptr %97, align 8, !tbaa !5
  %101 = shl nuw nsw i64 %.4126, 1
  %102 = getelementptr inbounds double, ptr %100, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !8
  %104 = or disjoint i64 %101, 1
  %105 = getelementptr inbounds double, ptr %100, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !8
  %107 = load ptr, ptr %98, align 8, !tbaa !5
  %108 = getelementptr inbounds double, ptr %107, i64 %101
  %109 = load double, ptr %108, align 8, !tbaa !8
  %110 = getelementptr inbounds double, ptr %107, i64 %104
  %111 = load double, ptr %110, align 8, !tbaa !8
  %112 = call { double, double } @_ZN11alglib_impl8ae_c_divENS_10ae_complexES0_(double %103, double %106, double %109, double %111)
  %113 = extractvalue { double, double } %112, 0
  %114 = extractvalue { double, double } %112, 1
  %115 = load ptr, ptr %97, align 8, !tbaa !5
  %116 = getelementptr inbounds double, ptr %115, i64 %101
  store double %113, ptr %116, align 8, !tbaa !8
  %117 = fneg double %114
  %118 = load ptr, ptr %97, align 8, !tbaa !5
  %119 = getelementptr inbounds double, ptr %118, i64 %104
  store double %117, ptr %119, align 8, !tbaa !8
  %120 = add nuw nsw i64 %.4126, 1
  %exitcond144.not = icmp eq i64 %120, %1
  br i1 %exitcond144.not, label %._crit_edge129, label %99, !llvm.loop !19

._crit_edge129:                                   ; preds = %99, %._crit_edge124
  call void @_ZN11alglib_impl11ftapplyplanEPNS_17fasttransformplanEPNS_9ae_vectorEllPNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef nonnull %8, i64 noundef 0, i64 noundef 1, ptr noundef %5)
  %121 = sitofp i64 %1 to double
  %122 = fdiv double 1.000000e+00, %121
  call void @_ZN11alglib_impl7callocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %1, ptr noundef %4, ptr noundef %5)
  br i1 %13, label %.lr.ph133, label %._crit_edge134

.lr.ph133:                                        ; preds = %._crit_edge129
  %123 = getelementptr inbounds i8, ptr %8, i64 56
  %124 = getelementptr inbounds i8, ptr %4, i64 56
  %125 = fneg double %122
  br label %126

126:                                              ; preds = %.lr.ph133, %126
  %.5131 = phi i64 [ 0, %.lr.ph133 ], [ %141, %126 ]
  %127 = load ptr, ptr %123, align 8, !tbaa !5
  %128 = shl nuw nsw i64 %.5131, 1
  %129 = getelementptr inbounds double, ptr %127, i64 %128
  %130 = load double, ptr %129, align 8, !tbaa !8
  %131 = fmul double %122, %130
  %132 = load ptr, ptr %124, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %132, i64 %.5131
  store double %131, ptr %133, align 8, !tbaa !13
  %134 = load ptr, ptr %123, align 8, !tbaa !5
  %135 = or disjoint i64 %128, 1
  %136 = getelementptr inbounds double, ptr %134, i64 %135
  %137 = load double, ptr %136, align 8, !tbaa !8
  %138 = fmul double %137, %125
  %139 = load ptr, ptr %124, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %139, i64 %.5131, i32 1
  store double %138, ptr %140, align 8, !tbaa !15
  %141 = add nuw nsw i64 %.5131, 1
  %exitcond145.not = icmp eq i64 %141, %1
  br i1 %exitcond145.not, label %._crit_edge134, label %126, !llvm.loop !20

._crit_edge134:                                   ; preds = %126, %._crit_edge129, %._crit_edge141
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 408, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #4
  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_impl23_fasttransformplan_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

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_impl16ftcomplexfftplanEllPNS_17fasttransformplanEPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl11ftapplyplanEPNS_17fasttransformplanEPNS_9ae_vectorEllPNS_8ae_stateE(ptr noundef, ptr noundef, i64 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_impl8ae_c_divENS_10ae_complexES0_(double, double, double, double) 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

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 = !{!14, !9, i64 0}
!14 = !{!"_ZTSN11alglib_impl10ae_complexE", !9, i64 0, !9, i64 8}
!15 = !{!14, !9, i64 8}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11}
!20 = distinct !{!20, !11}


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