; LLVM IR from sp-nitech/SPTK :: third_party/WORLD (matlabfunctions)

; 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.sptk::world::fft_plan" = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"struct.sptk::world::ForwardRealFFT" = type { i32, ptr, ptr, %"struct.sptk::world::fft_plan" }
%"struct.sptk::world::InverseRealFFT" = type { i32, ptr, ptr, %"struct.sptk::world::fft_plan" }

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #2

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4sptk5world12fast_fftfiltEPKdiS2_iiPKNS0_14ForwardRealFFTEPKNS0_14InverseRealFFTEPd(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #4 {
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.sptk::world::fft_plan", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"struct.sptk::world::fft_plan", align 8
  %25 = alloca i32, align 4
  %26 = alloca %"struct.sptk::world::fft_plan", align 8
  %27 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i32 %1, ptr %10, align 4, !tbaa !9
  store ptr %2, ptr %11, align 8, !tbaa !5
  store i32 %3, ptr %12, align 4, !tbaa !9
  store i32 %4, ptr %13, align 4, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %28 = load i32, ptr %13, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %29, i64 16)
  %31 = extractvalue { i64, i1 } %30, 1
  %32 = extractvalue { i64, i1 } %30, 0
  %33 = mul i64 %29, 2
  %34 = select i1 %31, i64 -1, i64 %32
  %35 = call noalias noundef nonnull ptr @_Znam(i64 noundef %34) #8
  store ptr %35, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %56, %8
  %37 = load i32, ptr %18, align 4, !tbaa !9
  %38 = load i32, ptr %10, align 4, !tbaa !9
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %59

41:                                               ; preds = %36
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = load i32, ptr %18, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds double, ptr %42, i64 %44
  %46 = load double, ptr %45, align 8, !tbaa !11
  %47 = load i32, ptr %13, align 4, !tbaa !9
  %48 = sitofp i32 %47 to double
  %49 = fdiv double %46, %48
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.sptk::world::ForwardRealFFT", ptr %50, i32 0, i32 1
  %52 = load ptr, ptr %51, align 8, !tbaa !13
  %53 = load i32, ptr %18, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds double, ptr %52, i64 %54
  store double %49, ptr %55, align 8, !tbaa !11
  br label %56

56:                                               ; preds = %41
  %57 = load i32, ptr %18, align 4, !tbaa !9
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %18, align 4, !tbaa !9
  br label %36, !llvm.loop !16

59:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %60 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %60, ptr %19, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %73, %59
  %62 = load i32, ptr %19, align 4, !tbaa !9
  %63 = load i32, ptr %13, align 4, !tbaa !9
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %76

66:                                               ; preds = %61
  %67 = load ptr, ptr %14, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.sptk::world::ForwardRealFFT", ptr %67, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !13
  %70 = load i32, ptr %19, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds double, ptr %69, i64 %71
  store double 0.000000e+00, ptr %72, align 8, !tbaa !11
  br label %73

73:                                               ; preds = %66
  %74 = load i32, ptr %19, align 4, !tbaa !9
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %19, align 4, !tbaa !9
  br label %61, !llvm.loop !18

76:                                               ; preds = %65
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.sptk::world::ForwardRealFFT", ptr %77, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %78, i64 72, i1 false), !tbaa.struct !19
  call void @_ZN4sptk5world11fft_executeENS0_8fft_planE(ptr noundef byval(%"struct.sptk::world::fft_plan") align 8 %20)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %112, %76
  %80 = load i32, ptr %21, align 4, !tbaa !9
  %81 = load i32, ptr %13, align 4, !tbaa !9
  %82 = sdiv i32 %81, 2
  %83 = icmp sle i32 %80, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %115

85:                                               ; preds = %79
  %86 = load ptr, ptr %14, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.sptk::world::ForwardRealFFT", ptr %86, i32 0, i32 2
  %88 = load ptr, ptr %87, align 8, !tbaa !20
  %89 = load i32, ptr %21, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [2 x double], ptr %88, i64 %90
  %92 = getelementptr inbounds [2 x double], ptr %91, i64 0, i64 0
  %93 = load double, ptr %92, align 8, !tbaa !11
  %94 = load ptr, ptr %17, align 8, !tbaa !5
  %95 = load i32, ptr %21, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [2 x double], ptr %94, i64 %96
  %98 = getelementptr inbounds [2 x double], ptr %97, i64 0, i64 0
  store double %93, ptr %98, align 8, !tbaa !11
  %99 = load ptr, ptr %14, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.sptk::world::ForwardRealFFT", ptr %99, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !20
  %102 = load i32, ptr %21, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [2 x double], ptr %101, i64 %103
  %105 = getelementptr inbounds [2 x double], ptr %104, i64 0, i64 1
  %106 = load double, ptr %105, align 8, !tbaa !11
  %107 = load ptr, ptr %17, align 8, !tbaa !5
  %108 = load i32, ptr %21, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [2 x double], ptr %107, i64 %109
  %111 = getelementptr inbounds [2 x double], ptr %110, i64 0, i64 1
  store double %106, ptr %111, align 8, !tbaa !11
  br label %112

112:                                              ; preds = %85
  %113 = load i32, ptr %21, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %21, align 4, !tbaa !9
  br label %79, !llvm.loop !21

115:                                              ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %136, %115
  %117 = load i32, ptr %22, align 4, !tbaa !9
  %118 = load i32, ptr %12, align 4, !tbaa !9
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %139

121:                                              ; preds = %116
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = load i32, ptr %22, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds double, ptr %122, i64 %124
  %126 = load double, ptr %125, align 8, !tbaa !11
  %127 = load i32, ptr %13, align 4, !tbaa !9
  %128 = sitofp i32 %127 to double
  %129 = fdiv double %126, %128
  %130 = load ptr, ptr %14, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.sptk::world::ForwardRealFFT", ptr %130, i32 0, i32 1
  %132 = load ptr, ptr %131, align 8, !tbaa !13
  %133 = load i32, ptr %22, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds double, ptr %132, i64 %134
  store double %129, ptr %135, align 8, !tbaa !11
  br label %136

136:                                              ; preds = %121
  %137 = load i32, ptr %22, align 4, !tbaa !9
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %22, align 4, !tbaa !9
  br label %116, !llvm.loop !22

139:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %140 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %140, ptr %23, align 4, !tbaa !9
  br label %141

141:                                              ; preds = %153, %139
  %142 = load i32, ptr %23, align 4, !tbaa !9
  %143 = load i32, ptr %13, align 4, !tbaa !9
  %144 = icmp slt i32 %142, %143
  br i1 %144, label %146, label %145

145:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %156

146:                                              ; preds = %141
  %147 = load ptr, ptr %14, align 8, !tbaa !5
  %148 = getelementptr inbounds %"struct.sptk::world::ForwardRealFFT", ptr %147, i32 0, i32 1
  %149 = load ptr, ptr %148, align 8, !tbaa !13
  %150 = load i32, ptr %23, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds double, ptr %149, i64 %151
  store double 0.000000e+00, ptr %152, align 8, !tbaa !11
  br label %153

153:                                              ; preds = %146
  %154 = load i32, ptr %23, align 4, !tbaa !9
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %23, align 4, !tbaa !9
  br label %141, !llvm.loop !23

156:                                              ; preds = %145
  %157 = load ptr, ptr %14, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.sptk::world::ForwardRealFFT", ptr %157, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %158, i64 72, i1 false), !tbaa.struct !19
  call void @_ZN4sptk5world11fft_executeENS0_8fft_planE(ptr noundef byval(%"struct.sptk::world::fft_plan") align 8 %24)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %159

159:                                              ; preds = %241, %156
  %160 = load i32, ptr %25, align 4, !tbaa !9
  %161 = load i32, ptr %13, align 4, !tbaa !9
  %162 = sdiv i32 %161, 2
  %163 = icmp sle i32 %160, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %244

165:                                              ; preds = %159
  %166 = load ptr, ptr %17, align 8, !tbaa !5
  %167 = load i32, ptr %25, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [2 x double], ptr %166, i64 %168
  %170 = getelementptr inbounds [2 x double], ptr %169, i64 0, i64 0
  %171 = load double, ptr %170, align 8, !tbaa !11
  %172 = load ptr, ptr %14, align 8, !tbaa !5
  %173 = getelementptr inbounds %"struct.sptk::world::ForwardRealFFT", ptr %172, i32 0, i32 2
  %174 = load ptr, ptr %173, align 8, !tbaa !20
  %175 = load i32, ptr %25, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [2 x double], ptr %174, i64 %176
  %178 = getelementptr inbounds [2 x double], ptr %177, i64 0, i64 0
  %179 = load double, ptr %178, align 8, !tbaa !11
  %180 = load ptr, ptr %17, align 8, !tbaa !5
  %181 = load i32, ptr %25, align 4, !tbaa !9
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [2 x double], ptr %180, i64 %182
  %184 = getelementptr inbounds [2 x double], ptr %183, i64 0, i64 1
  %185 = load double, ptr %184, align 8, !tbaa !11
  %186 = load ptr, ptr %14, align 8, !tbaa !5
  %187 = getelementptr inbounds %"struct.sptk::world::ForwardRealFFT", ptr %186, i32 0, i32 2
  %188 = load ptr, ptr %187, align 8, !tbaa !20
  %189 = load i32, ptr %25, align 4, !tbaa !9
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [2 x double], ptr %188, i64 %190
  %192 = getelementptr inbounds [2 x double], ptr %191, i64 0, i64 1
  %193 = load double, ptr %192, align 8, !tbaa !11
  %194 = fmul double %185, %193
  %195 = fneg double %194
  %196 = call double @llvm.fmuladd.f64(double %171, double %179, double %195)
  %197 = load ptr, ptr %15, align 8, !tbaa !5
  %198 = getelementptr inbounds %"struct.sptk::world::InverseRealFFT", ptr %197, i32 0, i32 2
  %199 = load ptr, ptr %198, align 8, !tbaa !24
  %200 = load i32, ptr %25, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [2 x double], ptr %199, i64 %201
  %203 = getelementptr inbounds [2 x double], ptr %202, i64 0, i64 0
  store double %196, ptr %203, align 8, !tbaa !11
  %204 = load ptr, ptr %17, align 8, !tbaa !5
  %205 = load i32, ptr %25, align 4, !tbaa !9
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [2 x double], ptr %204, i64 %206
  %208 = getelementptr inbounds [2 x double], ptr %207, i64 0, i64 0
  %209 = load double, ptr %208, align 8, !tbaa !11
  %210 = load ptr, ptr %14, align 8, !tbaa !5
  %211 = getelementptr inbounds %"struct.sptk::world::ForwardRealFFT", ptr %210, i32 0, i32 2
  %212 = load ptr, ptr %211, align 8, !tbaa !20
  %213 = load i32, ptr %25, align 4, !tbaa !9
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [2 x double], ptr %212, i64 %214
  %216 = getelementptr inbounds [2 x double], ptr %215, i64 0, i64 1
  %217 = load double, ptr %216, align 8, !tbaa !11
  %218 = load ptr, ptr %17, align 8, !tbaa !5
  %219 = load i32, ptr %25, align 4, !tbaa !9
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [2 x double], ptr %218, i64 %220
  %222 = getelementptr inbounds [2 x double], ptr %221, i64 0, i64 1
  %223 = load double, ptr %222, align 8, !tbaa !11
  %224 = load ptr, ptr %14, align 8, !tbaa !5
  %225 = getelementptr inbounds %"struct.sptk::world::ForwardRealFFT", ptr %224, i32 0, i32 2
  %226 = load ptr, ptr %225, align 8, !tbaa !20
  %227 = load i32, ptr %25, align 4, !tbaa !9
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [2 x double], ptr %226, i64 %228
  %230 = getelementptr inbounds [2 x double], ptr %229, i64 0, i64 0
  %231 = load double, ptr %230, align 8, !tbaa !11
  %232 = fmul double %223, %231
  %233 = call double @llvm.fmuladd.f64(double %209, double %217, double %232)
  %234 = load ptr, ptr %15, align 8, !tbaa !5
  %235 = getelementptr inbounds %"struct.sptk::world::InverseRealFFT", ptr %234, i32 0, i32 2
  %236 = load ptr, ptr %235, align 8, !tbaa !24
  %237 = load i32, ptr %25, align 4, !tbaa !9
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [2 x double], ptr %236, i64 %238
  %240 = getelementptr inbounds [2 x double], ptr %239, i64 0, i64 1
  store double %233, ptr %240, align 8, !tbaa !11
  br label %241

241:                                              ; preds = %165
  %242 = load i32, ptr %25, align 4, !tbaa !9
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %25, align 4, !tbaa !9
  br label %159, !llvm.loop !26

244:                                              ; preds = %164
  %245 = load ptr, ptr %15, align 8, !tbaa !5
  %246 = getelementptr inbounds %"struct.sptk::world::InverseRealFFT", ptr %245, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %246, i64 72, i1 false), !tbaa.struct !19
  call void @_ZN4sptk5world11fft_executeENS0_8fft_planE(ptr noundef byval(%"struct.sptk::world::fft_plan") align 8 %26)
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 0, ptr %27, align 4, !tbaa !9
  br label %247

247:                                              ; preds = %264, %244
  %248 = load i32, ptr %27, align 4, !tbaa !9
  %249 = load i32, ptr %13, align 4, !tbaa !9
  %250 = icmp slt i32 %248, %249
  br i1 %250, label %252, label %251

251:                                              ; preds = %247
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %267

252:                                              ; preds = %247
  %253 = load ptr, ptr %15, align 8, !tbaa !5
  %254 = getelementptr inbounds %"struct.sptk::world::InverseRealFFT", ptr %253, i32 0, i32 1
  %255 = load ptr, ptr %254, align 8, !tbaa !27
  %256 = load i32, ptr %27, align 4, !tbaa !9
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds double, ptr %255, i64 %257
  %259 = load double, ptr %258, align 8, !tbaa !11
  %260 = load ptr, ptr %16, align 8, !tbaa !5
  %261 = load i32, ptr %27, align 4, !tbaa !9
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds double, ptr %260, i64 %262
  store double %259, ptr %263, align 8, !tbaa !11
  br label %264

264:                                              ; preds = %252
  %265 = load i32, ptr %27, align 4, !tbaa !9
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %27, align 4, !tbaa !9
  br label %247, !llvm.loop !28

267:                                              ; preds = %251
  %268 = load ptr, ptr %17, align 8, !tbaa !5
  %269 = icmp eq ptr %268, null
  br i1 %269, label %272, label %270

270:                                              ; preds = %267
  %271 = getelementptr inbounds [2 x double], ptr %268, i32 0, i32 0
  call void @_ZdaPv(ptr noundef %271) #9
  br label %272

272:                                              ; preds = %270, %267
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  ret void
}

declare void @_ZN4sptk5world11fft_executeENS0_8fft_planE(ptr noundef byval(%"struct.sptk::world::fft_plan") align 8) #5

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 #5 = { "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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTSN4sptk5world14ForwardRealFFTE", !10, i64 0, !6, i64 8, !6, i64 16, !15, i64 24}
!15 = !{!"_ZTSN4sptk5world8fft_planE", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 16, i64 8, !5, i64 24, i64 8, !5, i64 32, i64 8, !5, i64 40, i64 8, !5, i64 48, i64 8, !5, i64 56, i64 8, !5, i64 64, i64 8, !5}
!20 = !{!14, !6, i64 16}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}
!24 = !{!25, !6, i64 16}
!25 = !{!"_ZTSN4sptk5world14InverseRealFFTE", !10, i64 0, !6, i64 8, !6, i64 16, !15, i64 24}
!26 = distinct !{!26, !17}
!27 = !{!25, !6, i64 8}
!28 = distinct !{!28, !17}


; 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.sptk::world::fft_plan" = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #0

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4sptk5world12fast_fftfiltEPKdiS2_iiPKNS0_14ForwardRealFFTEPKNS0_14InverseRealFFTEPd(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef readonly %2, i32 noundef %3, i32 noundef %4, ptr nocapture noundef readonly %5, ptr nocapture noundef readonly %6, ptr nocapture noundef writeonly %7) local_unnamed_addr #3 {
  %9 = ptrtoint ptr %7 to i64
  %10 = ptrtoint ptr %2 to i64
  %11 = zext i32 %4 to i64
  %12 = icmp slt i32 %4, 0
  %13 = shl nuw nsw i64 %11, 4
  %14 = select i1 %12, i64 -1, i64 %13
  %15 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %14) #7
  %16 = icmp sgt i32 %1, 0
  br i1 %16, label %.lr.ph, label %.preheader85

.lr.ph:                                           ; preds = %8
  %17 = ptrtoint ptr %0 to i64
  %18 = sitofp i32 %4 to double
  %19 = getelementptr inbounds i8, ptr %5, i64 8
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %wide.trip.count = zext nneg i32 %1 to i64
  %min.iters.check = icmp eq i32 %1, 1
  %21 = ptrtoint ptr %20 to i64
  %22 = sub i64 %21, %17
  %diff.check = icmp ult i64 %22, 16
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %23 = sub nsw i64 %wide.trip.count, %indvars.iv.ph
  %xtraiter = and i64 %23, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %24 = getelementptr inbounds double, ptr %0, i64 %indvars.iv.prol
  %25 = load double, ptr %24, align 8, !tbaa !12
  %26 = fdiv double %25, %18
  %27 = getelementptr inbounds double, ptr %20, i64 %indvars.iv.prol
  store double %26, ptr %27, align 8, !tbaa !12
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !14

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %28 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %29 = icmp ugt i64 %28, -4
  br i1 %29, label %.preheader85, label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 2147483646
  %broadcast.splatinsert = insertelement <2 x double> poison, double %18, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %30 = getelementptr inbounds double, ptr %0, i64 %index
  %wide.load = load <2 x double>, ptr %30, align 8, !tbaa !12
  %31 = fdiv <2 x double> %wide.load, %broadcast.splat
  %32 = getelementptr inbounds double, ptr %20, i64 %index
  store <2 x double> %31, ptr %32, align 8, !tbaa !12
  %index.next = add nuw i64 %index, 2
  %33 = icmp eq i64 %index.next, %n.vec
  br i1 %33, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader85, label %scalar.ph.preheader

.preheader85:                                     ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %8
  %34 = icmp slt i32 %1, %4
  br i1 %34, label %.lr.ph88, label %._crit_edge

.lr.ph88:                                         ; preds = %.preheader85
  %35 = getelementptr inbounds i8, ptr %5, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = sext i32 %1 to i64
  %38 = shl nsw i64 %37, 3
  %scevgep = getelementptr i8, ptr %36, i64 %38
  %39 = xor i32 %1, -1
  %40 = add i32 %39, %4
  %41 = zext i32 %40 to i64
  %42 = shl nuw nsw i64 %41, 3
  %43 = add nuw nsw i64 %42, 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep, i8 0, i64 %43, i1 false), !tbaa !12
  br label %._crit_edge

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %44 = getelementptr inbounds double, ptr %0, i64 %indvars.iv
  %45 = load double, ptr %44, align 8, !tbaa !12
  %46 = fdiv double %45, %18
  %47 = getelementptr inbounds double, ptr %20, i64 %indvars.iv
  store double %46, ptr %47, align 8, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %48 = getelementptr inbounds double, ptr %0, i64 %indvars.iv.next
  %49 = load double, ptr %48, align 8, !tbaa !12
  %50 = fdiv double %49, %18
  %51 = getelementptr inbounds double, ptr %20, i64 %indvars.iv.next
  store double %50, ptr %51, align 8, !tbaa !12
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %52 = getelementptr inbounds double, ptr %0, i64 %indvars.iv.next.1
  %53 = load double, ptr %52, align 8, !tbaa !12
  %54 = fdiv double %53, %18
  %55 = getelementptr inbounds double, ptr %20, i64 %indvars.iv.next.1
  store double %54, ptr %55, align 8, !tbaa !12
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %56 = getelementptr inbounds double, ptr %0, i64 %indvars.iv.next.2
  %57 = load double, ptr %56, align 8, !tbaa !12
  %58 = fdiv double %57, %18
  %59 = getelementptr inbounds double, ptr %20, i64 %indvars.iv.next.2
  store double %58, ptr %59, align 8, !tbaa !12
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %.preheader85, label %scalar.ph, !llvm.loop !20

._crit_edge:                                      ; preds = %.lr.ph88, %.preheader85
  %60 = getelementptr inbounds i8, ptr %5, i64 24
  tail call void @_ZN4sptk5world11fft_executeENS0_8fft_planE(ptr noundef nonnull byval(%"struct.sptk::world::fft_plan") align 8 %60)
  %61 = sdiv i32 %4, 2
  %.not89 = icmp slt i32 %4, -1
  br i1 %.not89, label %.preheader84, label %.lr.ph92

.lr.ph92:                                         ; preds = %._crit_edge
  %62 = getelementptr inbounds i8, ptr %5, i64 16
  %63 = load ptr, ptr %62, align 8, !tbaa !21
  %64 = add nsw i32 %61, 1
  %wide.trip.count114 = zext i32 %64 to i64
  %xtraiter196 = and i64 %wide.trip.count114, 1
  %.off = add i32 %4, 1
  %65 = icmp ult i32 %.off, 3
  br i1 %65, label %.preheader84.loopexit.unr-lcssa, label %.lr.ph92.new

.lr.ph92.new:                                     ; preds = %.lr.ph92
  %unroll_iter = and i64 %wide.trip.count114, 4294967294
  br label %89

.preheader84.loopexit.unr-lcssa:                  ; preds = %89, %.lr.ph92
  %indvars.iv111.unr = phi i64 [ 0, %.lr.ph92 ], [ %indvars.iv.next112.1, %89 ]
  %lcmp.mod197.not = icmp eq i64 %xtraiter196, 0
  br i1 %lcmp.mod197.not, label %.preheader84, label %.preheader84.loopexit.epilog-lcssa

.preheader84.loopexit.epilog-lcssa:               ; preds = %.preheader84.loopexit.unr-lcssa
  %66 = getelementptr inbounds [2 x double], ptr %63, i64 %indvars.iv111.unr
  %67 = load double, ptr %66, align 8, !tbaa !12
  %68 = getelementptr inbounds [2 x double], ptr %15, i64 %indvars.iv111.unr
  store double %67, ptr %68, align 8, !tbaa !12
  %69 = getelementptr inbounds [2 x double], ptr %63, i64 %indvars.iv111.unr, i64 1
  %70 = load double, ptr %69, align 8, !tbaa !12
  %71 = getelementptr inbounds i8, ptr %68, i64 8
  store double %70, ptr %71, align 8, !tbaa !12
  br label %.preheader84

.preheader84:                                     ; preds = %.preheader84.loopexit.epilog-lcssa, %.preheader84.loopexit.unr-lcssa, %._crit_edge
  %72 = icmp sgt i32 %3, 0
  br i1 %72, label %.lr.ph94, label %.preheader

.lr.ph94:                                         ; preds = %.preheader84
  %73 = sitofp i32 %4 to double
  %74 = getelementptr inbounds i8, ptr %5, i64 8
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %wide.trip.count119 = zext nneg i32 %3 to i64
  %min.iters.check139 = icmp eq i32 %3, 1
  %76 = ptrtoint ptr %75 to i64
  %77 = sub i64 %76, %10
  %diff.check136 = icmp ult i64 %77, 16
  %or.cond193 = select i1 %min.iters.check139, i1 true, i1 %diff.check136
  br i1 %or.cond193, label %scalar.ph138.preheader, label %vector.ph140

scalar.ph138.preheader:                           ; preds = %middle.block137, %.lr.ph94
  %indvars.iv116.ph = phi i64 [ 0, %.lr.ph94 ], [ %n.vec142, %middle.block137 ]
  %78 = sub nsw i64 %wide.trip.count119, %indvars.iv116.ph
  %xtraiter198 = and i64 %78, 3
  %lcmp.mod199.not = icmp eq i64 %xtraiter198, 0
  br i1 %lcmp.mod199.not, label %scalar.ph138.prol.loopexit, label %scalar.ph138.prol

scalar.ph138.prol:                                ; preds = %scalar.ph138.preheader, %scalar.ph138.prol
  %indvars.iv116.prol = phi i64 [ %indvars.iv.next117.prol, %scalar.ph138.prol ], [ %indvars.iv116.ph, %scalar.ph138.preheader ]
  %prol.iter200 = phi i64 [ %prol.iter200.next, %scalar.ph138.prol ], [ 0, %scalar.ph138.preheader ]
  %79 = getelementptr inbounds double, ptr %2, i64 %indvars.iv116.prol
  %80 = load double, ptr %79, align 8, !tbaa !12
  %81 = fdiv double %80, %73
  %82 = getelementptr inbounds double, ptr %75, i64 %indvars.iv116.prol
  store double %81, ptr %82, align 8, !tbaa !12
  %indvars.iv.next117.prol = add nuw nsw i64 %indvars.iv116.prol, 1
  %prol.iter200.next = add i64 %prol.iter200, 1
  %prol.iter200.cmp.not = icmp eq i64 %prol.iter200.next, %xtraiter198
  br i1 %prol.iter200.cmp.not, label %scalar.ph138.prol.loopexit, label %scalar.ph138.prol, !llvm.loop !22

scalar.ph138.prol.loopexit:                       ; preds = %scalar.ph138.prol, %scalar.ph138.preheader
  %indvars.iv116.unr = phi i64 [ %indvars.iv116.ph, %scalar.ph138.preheader ], [ %indvars.iv.next117.prol, %scalar.ph138.prol ]
  %83 = sub nsw i64 %indvars.iv116.ph, %wide.trip.count119
  %84 = icmp ugt i64 %83, -4
  br i1 %84, label %.preheader, label %scalar.ph138

vector.ph140:                                     ; preds = %.lr.ph94
  %n.vec142 = and i64 %wide.trip.count119, 2147483646
  %broadcast.splatinsert147 = insertelement <2 x double> poison, double %73, i64 0
  %broadcast.splat148 = shufflevector <2 x double> %broadcast.splatinsert147, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body144

vector.body144:                                   ; preds = %vector.body144, %vector.ph140
  %index145 = phi i64 [ 0, %vector.ph140 ], [ %index.next149, %vector.body144 ]
  %85 = getelementptr inbounds double, ptr %2, i64 %index145
  %wide.load146 = load <2 x double>, ptr %85, align 8, !tbaa !12
  %86 = fdiv <2 x double> %wide.load146, %broadcast.splat148
  %87 = getelementptr inbounds double, ptr %75, i64 %index145
  store <2 x double> %86, ptr %87, align 8, !tbaa !12
  %index.next149 = add nuw i64 %index145, 2
  %88 = icmp eq i64 %index.next149, %n.vec142
  br i1 %88, label %middle.block137, label %vector.body144, !llvm.loop !23

middle.block137:                                  ; preds = %vector.body144
  %cmp.n150 = icmp eq i64 %n.vec142, %wide.trip.count119
  br i1 %cmp.n150, label %.preheader, label %scalar.ph138.preheader

89:                                               ; preds = %89, %.lr.ph92.new
  %indvars.iv111 = phi i64 [ 0, %.lr.ph92.new ], [ %indvars.iv.next112.1, %89 ]
  %niter = phi i64 [ 0, %.lr.ph92.new ], [ %niter.next.1, %89 ]
  %90 = getelementptr inbounds [2 x double], ptr %63, i64 %indvars.iv111
  %91 = load double, ptr %90, align 8, !tbaa !12
  %92 = getelementptr inbounds [2 x double], ptr %15, i64 %indvars.iv111
  store double %91, ptr %92, align 8, !tbaa !12
  %93 = getelementptr inbounds [2 x double], ptr %63, i64 %indvars.iv111, i64 1
  %94 = load double, ptr %93, align 8, !tbaa !12
  %95 = getelementptr inbounds i8, ptr %92, i64 8
  store double %94, ptr %95, align 8, !tbaa !12
  %indvars.iv.next112 = or disjoint i64 %indvars.iv111, 1
  %96 = getelementptr inbounds [2 x double], ptr %63, i64 %indvars.iv.next112
  %97 = load double, ptr %96, align 8, !tbaa !12
  %98 = getelementptr inbounds [2 x double], ptr %15, i64 %indvars.iv.next112
  store double %97, ptr %98, align 8, !tbaa !12
  %99 = getelementptr inbounds [2 x double], ptr %63, i64 %indvars.iv.next112, i64 1
  %100 = load double, ptr %99, align 8, !tbaa !12
  %101 = getelementptr inbounds i8, ptr %98, i64 8
  store double %100, ptr %101, align 8, !tbaa !12
  %indvars.iv.next112.1 = add nuw nsw i64 %indvars.iv111, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader84.loopexit.unr-lcssa, label %89, !llvm.loop !24

.preheader:                                       ; preds = %scalar.ph138.prol.loopexit, %scalar.ph138, %middle.block137, %.preheader84
  %102 = icmp slt i32 %3, %4
  br i1 %102, label %.lr.ph96, label %._crit_edge97

.lr.ph96:                                         ; preds = %.preheader
  %103 = getelementptr inbounds i8, ptr %5, i64 8
  %104 = load ptr, ptr %103, align 8, !tbaa !5
  %105 = sext i32 %3 to i64
  %106 = shl nsw i64 %105, 3
  %scevgep121 = getelementptr i8, ptr %104, i64 %106
  %107 = xor i32 %3, -1
  %108 = add i32 %107, %4
  %109 = zext i32 %108 to i64
  %110 = shl nuw nsw i64 %109, 3
  %111 = add nuw nsw i64 %110, 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep121, i8 0, i64 %111, i1 false), !tbaa !12
  br label %._crit_edge97

scalar.ph138:                                     ; preds = %scalar.ph138.prol.loopexit, %scalar.ph138
  %indvars.iv116 = phi i64 [ %indvars.iv.next117.3, %scalar.ph138 ], [ %indvars.iv116.unr, %scalar.ph138.prol.loopexit ]
  %112 = getelementptr inbounds double, ptr %2, i64 %indvars.iv116
  %113 = load double, ptr %112, align 8, !tbaa !12
  %114 = fdiv double %113, %73
  %115 = getelementptr inbounds double, ptr %75, i64 %indvars.iv116
  store double %114, ptr %115, align 8, !tbaa !12
  %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1
  %116 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next117
  %117 = load double, ptr %116, align 8, !tbaa !12
  %118 = fdiv double %117, %73
  %119 = getelementptr inbounds double, ptr %75, i64 %indvars.iv.next117
  store double %118, ptr %119, align 8, !tbaa !12
  %indvars.iv.next117.1 = add nuw nsw i64 %indvars.iv116, 2
  %120 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next117.1
  %121 = load double, ptr %120, align 8, !tbaa !12
  %122 = fdiv double %121, %73
  %123 = getelementptr inbounds double, ptr %75, i64 %indvars.iv.next117.1
  store double %122, ptr %123, align 8, !tbaa !12
  %indvars.iv.next117.2 = add nuw nsw i64 %indvars.iv116, 3
  %124 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next117.2
  %125 = load double, ptr %124, align 8, !tbaa !12
  %126 = fdiv double %125, %73
  %127 = getelementptr inbounds double, ptr %75, i64 %indvars.iv.next117.2
  store double %126, ptr %127, align 8, !tbaa !12
  %indvars.iv.next117.3 = add nuw nsw i64 %indvars.iv116, 4
  %exitcond120.not.3 = icmp eq i64 %indvars.iv.next117.3, %wide.trip.count119
  br i1 %exitcond120.not.3, label %.preheader, label %scalar.ph138, !llvm.loop !25

._crit_edge97:                                    ; preds = %.lr.ph96, %.preheader
  tail call void @_ZN4sptk5world11fft_executeENS0_8fft_planE(ptr noundef nonnull byval(%"struct.sptk::world::fft_plan") align 8 %60)
  br i1 %.not89, label %._crit_edge102, label %.lr.ph101

.lr.ph101:                                        ; preds = %._crit_edge97
  %128 = getelementptr inbounds i8, ptr %5, i64 16
  %129 = load ptr, ptr %128, align 8, !tbaa !21
  %130 = getelementptr inbounds i8, ptr %6, i64 16
  %131 = load ptr, ptr %130, align 8, !tbaa !26
  %132 = add nsw i32 %61, 1
  %wide.trip.count128 = zext i32 %132 to i64
  %min.iters.check160 = icmp ult i32 %132, 4
  br i1 %min.iters.check160, label %scalar.ph159.preheader, label %vector.memcheck151

scalar.ph159.preheader:                           ; preds = %middle.block158, %vector.memcheck151, %.lr.ph101
  %indvars.iv125.ph = phi i64 [ 0, %vector.memcheck151 ], [ 0, %.lr.ph101 ], [ %n.vec163, %middle.block158 ]
  br label %scalar.ph159

vector.memcheck151:                               ; preds = %.lr.ph101
  %133 = shl nuw nsw i64 %wide.trip.count128, 4
  %scevgep152 = getelementptr i8, ptr %131, i64 %133
  %scevgep153 = getelementptr i8, ptr %15, i64 %133
  %scevgep154 = getelementptr i8, ptr %129, i64 %133
  %bound0 = icmp ult ptr %131, %scevgep153
  %bound1 = icmp ult ptr %15, %scevgep152
  %found.conflict = and i1 %bound0, %bound1
  %bound0155 = icmp ult ptr %131, %scevgep154
  %bound1156 = icmp ult ptr %129, %scevgep152
  %found.conflict157 = and i1 %bound0155, %bound1156
  %conflict.rdx = or i1 %found.conflict, %found.conflict157
  br i1 %conflict.rdx, label %scalar.ph159.preheader, label %vector.ph161

vector.ph161:                                     ; preds = %vector.memcheck151
  %n.vec163 = and i64 %wide.trip.count128, 4294967294
  br label %vector.body165

vector.body165:                                   ; preds = %vector.body165, %vector.ph161
  %index166 = phi i64 [ 0, %vector.ph161 ], [ %index.next174, %vector.body165 ]
  %134 = getelementptr inbounds [2 x double], ptr %15, i64 %index166
  %wide.vec = load <4 x double>, ptr %134, align 8, !tbaa !12
  %strided.vec = shufflevector <4 x double> %wide.vec, <4 x double> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec167 = shufflevector <4 x double> %wide.vec, <4 x double> poison, <2 x i32> <i32 1, i32 3>
  %135 = getelementptr inbounds [2 x double], ptr %129, i64 %index166
  %wide.vec168 = load <4 x double>, ptr %135, align 8, !tbaa !12
  %strided.vec169 = shufflevector <4 x double> %wide.vec168, <4 x double> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec170 = shufflevector <4 x double> %wide.vec168, <4 x double> poison, <2 x i32> <i32 1, i32 3>
  %136 = fneg <2 x double> %strided.vec167
  %137 = fmul <2 x double> %strided.vec170, %136
  %138 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %strided.vec, <2 x double> %strided.vec169, <2 x double> %137)
  %strided.vec172 = shufflevector <4 x double> %wide.vec168, <4 x double> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec173 = shufflevector <4 x double> %wide.vec168, <4 x double> poison, <2 x i32> <i32 1, i32 3>
  %139 = fmul <2 x double> %strided.vec167, %strided.vec172
  %140 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %strided.vec, <2 x double> %strided.vec173, <2 x double> %139)
  %141 = getelementptr inbounds [2 x double], ptr %131, i64 %index166
  %interleaved.vec = shufflevector <2 x double> %138, <2 x double> %140, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
  store <4 x double> %interleaved.vec, ptr %141, align 8, !tbaa !12
  %index.next174 = add nuw i64 %index166, 2
  %142 = icmp eq i64 %index.next174, %n.vec163
  br i1 %142, label %middle.block158, label %vector.body165, !llvm.loop !28

middle.block158:                                  ; preds = %vector.body165
  %cmp.n175 = icmp eq i64 %n.vec163, %wide.trip.count128
  br i1 %cmp.n175, label %._crit_edge102, label %scalar.ph159.preheader

._crit_edge102:                                   ; preds = %scalar.ph159, %middle.block158, %._crit_edge97
  %143 = getelementptr inbounds i8, ptr %6, i64 24
  tail call void @_ZN4sptk5world11fft_executeENS0_8fft_planE(ptr noundef nonnull byval(%"struct.sptk::world::fft_plan") align 8 %143)
  %144 = icmp sgt i32 %4, 0
  br i1 %144, label %.lr.ph105, label %._crit_edge106

.lr.ph105:                                        ; preds = %._crit_edge102
  %145 = getelementptr inbounds i8, ptr %6, i64 8
  %146 = load ptr, ptr %145, align 8, !tbaa !29
  %min.iters.check180 = icmp ult i32 %4, 6
  %147 = ptrtoint ptr %146 to i64
  %148 = sub i64 %9, %147
  %diff.check177 = icmp ult i64 %148, 32
  %or.cond195 = select i1 %min.iters.check180, i1 true, i1 %diff.check177
  br i1 %or.cond195, label %scalar.ph179.preheader, label %vector.ph181

scalar.ph179.preheader:                           ; preds = %middle.block178, %.lr.ph105
  %indvars.iv130.ph = phi i64 [ 0, %.lr.ph105 ], [ %n.vec183, %middle.block178 ]
  %xtraiter201 = and i64 %11, 3
  %lcmp.mod202.not = icmp eq i64 %xtraiter201, 0
  br i1 %lcmp.mod202.not, label %scalar.ph179.prol.loopexit, label %scalar.ph179.prol

scalar.ph179.prol:                                ; preds = %scalar.ph179.preheader, %scalar.ph179.prol
  %indvars.iv130.prol = phi i64 [ %indvars.iv.next131.prol, %scalar.ph179.prol ], [ %indvars.iv130.ph, %scalar.ph179.preheader ]
  %prol.iter203 = phi i64 [ %prol.iter203.next, %scalar.ph179.prol ], [ 0, %scalar.ph179.preheader ]
  %149 = getelementptr inbounds double, ptr %146, i64 %indvars.iv130.prol
  %150 = load double, ptr %149, align 8, !tbaa !12
  %151 = getelementptr inbounds double, ptr %7, i64 %indvars.iv130.prol
  store double %150, ptr %151, align 8, !tbaa !12
  %indvars.iv.next131.prol = add nuw nsw i64 %indvars.iv130.prol, 1
  %prol.iter203.next = add i64 %prol.iter203, 1
  %prol.iter203.cmp.not = icmp eq i64 %prol.iter203.next, %xtraiter201
  br i1 %prol.iter203.cmp.not, label %scalar.ph179.prol.loopexit, label %scalar.ph179.prol, !llvm.loop !30

scalar.ph179.prol.loopexit:                       ; preds = %scalar.ph179.prol, %scalar.ph179.preheader
  %indvars.iv130.unr = phi i64 [ %indvars.iv130.ph, %scalar.ph179.preheader ], [ %indvars.iv.next131.prol, %scalar.ph179.prol ]
  %152 = sub nsw i64 %indvars.iv130.ph, %11
  %153 = icmp ugt i64 %152, -4
  br i1 %153, label %._crit_edge106, label %scalar.ph179

vector.ph181:                                     ; preds = %.lr.ph105
  %n.vec183 = and i64 %11, 2147483644
  br label %vector.body185

vector.body185:                                   ; preds = %vector.body185, %vector.ph181
  %index186 = phi i64 [ 0, %vector.ph181 ], [ %index.next189, %vector.body185 ]
  %154 = getelementptr inbounds double, ptr %146, i64 %index186
  %155 = getelementptr inbounds i8, ptr %154, i64 16
  %wide.load187 = load <2 x double>, ptr %154, align 8, !tbaa !12
  %wide.load188 = load <2 x double>, ptr %155, align 8, !tbaa !12
  %156 = getelementptr inbounds double, ptr %7, i64 %index186
  %157 = getelementptr inbounds i8, ptr %156, i64 16
  store <2 x double> %wide.load187, ptr %156, align 8, !tbaa !12
  store <2 x double> %wide.load188, ptr %157, align 8, !tbaa !12
  %index.next189 = add nuw i64 %index186, 4
  %158 = icmp eq i64 %index.next189, %n.vec183
  br i1 %158, label %middle.block178, label %vector.body185, !llvm.loop !31

middle.block178:                                  ; preds = %vector.body185
  %cmp.n190 = icmp eq i64 %n.vec183, %11
  br i1 %cmp.n190, label %._crit_edge106, label %scalar.ph179.preheader

scalar.ph159:                                     ; preds = %scalar.ph159.preheader, %scalar.ph159
  %indvars.iv125 = phi i64 [ %indvars.iv.next126, %scalar.ph159 ], [ %indvars.iv125.ph, %scalar.ph159.preheader ]
  %159 = getelementptr inbounds [2 x double], ptr %15, i64 %indvars.iv125
  %160 = load double, ptr %159, align 8, !tbaa !12
  %161 = getelementptr inbounds [2 x double], ptr %129, i64 %indvars.iv125
  %162 = load double, ptr %161, align 8, !tbaa !12
  %163 = getelementptr inbounds i8, ptr %159, i64 8
  %164 = load double, ptr %163, align 8, !tbaa !12
  %165 = getelementptr inbounds i8, ptr %161, i64 8
  %166 = load double, ptr %165, align 8, !tbaa !12
  %167 = fneg double %164
  %168 = fmul double %166, %167
  %169 = tail call double @llvm.fmuladd.f64(double %160, double %162, double %168)
  %170 = getelementptr inbounds [2 x double], ptr %131, i64 %indvars.iv125
  store double %169, ptr %170, align 8, !tbaa !12
  %171 = load double, ptr %165, align 8, !tbaa !12
  %172 = load double, ptr %161, align 8, !tbaa !12
  %173 = fmul double %164, %172
  %174 = tail call double @llvm.fmuladd.f64(double %160, double %171, double %173)
  %175 = getelementptr inbounds [2 x double], ptr %131, i64 %indvars.iv125, i64 1
  store double %174, ptr %175, align 8, !tbaa !12
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %exitcond129.not = icmp eq i64 %indvars.iv.next126, %wide.trip.count128
  br i1 %exitcond129.not, label %._crit_edge102, label %scalar.ph159, !llvm.loop !32

scalar.ph179:                                     ; preds = %scalar.ph179.prol.loopexit, %scalar.ph179
  %indvars.iv130 = phi i64 [ %indvars.iv.next131.3, %scalar.ph179 ], [ %indvars.iv130.unr, %scalar.ph179.prol.loopexit ]
  %176 = getelementptr inbounds double, ptr %146, i64 %indvars.iv130
  %177 = load double, ptr %176, align 8, !tbaa !12
  %178 = getelementptr inbounds double, ptr %7, i64 %indvars.iv130
  store double %177, ptr %178, align 8, !tbaa !12
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %179 = getelementptr inbounds double, ptr %146, i64 %indvars.iv.next131
  %180 = load double, ptr %179, align 8, !tbaa !12
  %181 = getelementptr inbounds double, ptr %7, i64 %indvars.iv.next131
  store double %180, ptr %181, align 8, !tbaa !12
  %indvars.iv.next131.1 = add nuw nsw i64 %indvars.iv130, 2
  %182 = getelementptr inbounds double, ptr %146, i64 %indvars.iv.next131.1
  %183 = load double, ptr %182, align 8, !tbaa !12
  %184 = getelementptr inbounds double, ptr %7, i64 %indvars.iv.next131.1
  store double %183, ptr %184, align 8, !tbaa !12
  %indvars.iv.next131.2 = add nuw nsw i64 %indvars.iv130, 3
  %185 = getelementptr inbounds double, ptr %146, i64 %indvars.iv.next131.2
  %186 = load double, ptr %185, align 8, !tbaa !12
  %187 = getelementptr inbounds double, ptr %7, i64 %indvars.iv.next131.2
  store double %186, ptr %187, align 8, !tbaa !12
  %indvars.iv.next131.3 = add nuw nsw i64 %indvars.iv130, 4
  %exitcond134.not.3 = icmp eq i64 %indvars.iv.next131.3, %11
  br i1 %exitcond134.not.3, label %._crit_edge106, label %scalar.ph179, !llvm.loop !33

._crit_edge106:                                   ; preds = %scalar.ph179.prol.loopexit, %scalar.ph179, %middle.block178, %._crit_edge102
  tail call void @_ZdaPv(ptr noundef nonnull %15) #8
  ret void
}

declare void @_ZN4sptk5world11fft_executeENS0_8fft_planE(ptr noundef byval(%"struct.sptk::world::fft_plan") align 8) local_unnamed_addr #4

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #6

attributes #0 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin 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, !10, i64 8}
!6 = !{!"_ZTSN4sptk5world14ForwardRealFFTE", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTSN4sptk5world8fft_planE", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !17, !18, !19}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!"llvm.loop.isvectorized", i32 1}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = distinct !{!20, !17, !18}
!21 = !{!6, !10, i64 16}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !17, !18, !19}
!24 = distinct !{!24, !17}
!25 = distinct !{!25, !17, !18}
!26 = !{!27, !10, i64 16}
!27 = !{!"_ZTSN4sptk5world14InverseRealFFTE", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24}
!28 = distinct !{!28, !17, !18, !19}
!29 = !{!27, !10, i64 8}
!30 = distinct !{!30, !15}
!31 = distinct !{!31, !17, !18, !19}
!32 = distinct !{!32, !17, !18}
!33 = distinct !{!33, !17, !18}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass