; LLVM IR from sp-nitech/SPTK :: third_party/SWIPE (swipe)

; 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::swipe::matrix" = type { i32, i32, ptr }
%"struct.sptk::swipe::vector" = type { i32, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN4sptk5swipe6fixnanEd(double noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4sptk5swipe2LaENS0_6matrixENS0_6vectorES2_RKNS_30RealValuedFastFourierTransformERKSt6vectorIdSaIdEEPS6_IS8_SaIS8_EEPNS3_6BufferEiii(i64 %0, ptr %1, i32 %2, ptr %3, i32 %4, ptr %5, ptr noundef nonnull align 8 dereferenceable(104) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef %8, ptr noundef %9, i32 noundef %10, i32 noundef %11, i32 noundef %12) #1 {
  %14 = alloca %"struct.sptk::swipe::matrix", align 8
  %15 = alloca %"struct.sptk::swipe::vector", align 8
  %16 = alloca %"struct.sptk::swipe::vector", align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca %"struct.sptk::swipe::vector", align 8
  %29 = alloca %"struct.sptk::swipe::vector", align 8
  %30 = alloca %"struct.sptk::swipe::vector", align 8
  %31 = alloca %"struct.sptk::swipe::vector", align 8
  %32 = alloca %"struct.sptk::swipe::vector", align 8
  %33 = alloca %"struct.sptk::swipe::vector", align 8
  %34 = alloca %"struct.sptk::swipe::vector", align 8
  %35 = alloca %"struct.sptk::swipe::vector", align 8
  %36 = alloca %"struct.sptk::swipe::vector", align 8
  %37 = alloca %"struct.sptk::swipe::vector", align 8
  %38 = alloca %"struct.sptk::swipe::vector", align 8
  %39 = alloca %"struct.sptk::swipe::vector", align 8
  %40 = alloca %"struct.sptk::swipe::vector", align 8
  %41 = getelementptr inbounds { i64, ptr }, ptr %14, i32 0, i32 0
  store i64 %0, ptr %41, align 8
  %42 = getelementptr inbounds { i64, ptr }, ptr %14, i32 0, i32 1
  store ptr %1, ptr %42, align 8
  %43 = getelementptr inbounds { i32, ptr }, ptr %15, i32 0, i32 0
  store i32 %2, ptr %43, align 8
  %44 = getelementptr inbounds { i32, ptr }, ptr %15, i32 0, i32 1
  store ptr %3, ptr %44, align 8
  %45 = getelementptr inbounds { i32, ptr }, ptr %16, i32 0, i32 0
  store i32 %4, ptr %45, align 8
  %46 = getelementptr inbounds { i32, ptr }, ptr %16, i32 0, i32 1
  store ptr %5, ptr %46, align 8
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  store ptr %9, ptr %20, align 8, !tbaa !5
  store i32 %10, ptr %21, align 4, !tbaa !9
  store i32 %11, ptr %22, align 4, !tbaa !9
  store i32 %12, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %47 = load ptr, ptr %17, align 8, !tbaa !5
  %48 = load ptr, ptr %18, align 8, !tbaa !5
  %49 = load ptr, ptr %19, align 8, !tbaa !5
  %50 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef 0) #7
  %51 = load ptr, ptr %19, align 8, !tbaa !5
  %52 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef 1) #7
  %53 = load ptr, ptr %20, align 8, !tbaa !5
  %54 = call noundef zeroext i1 @_ZNK4sptk30RealValuedFastFourierTransform3RunERKSt6vectorIdSaIdEEPS3_S6_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(104) %47, ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef %50, ptr noundef %52, ptr noundef %53)
  br i1 %54, label %56, label %55

55:                                               ; preds = %13
  store i32 1, ptr %25, align 4
  br label %207

56:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %57 = load ptr, ptr %19, align 8, !tbaa !5
  %58 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef 0) #7
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef 0) #7
  store ptr %59, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %60 = load ptr, ptr %19, align 8, !tbaa !5
  %61 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef 1) #7
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef 0) #7
  store ptr %62, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #7
  %63 = load i32, ptr %21, align 4, !tbaa !9
  %64 = call { i32, ptr } @_ZN4sptk5swipe5makevEi(i32 noundef %63)
  %65 = getelementptr inbounds { i32, ptr }, ptr %28, i32 0, i32 0
  %66 = extractvalue { i32, ptr } %64, 0
  store i32 %66, ptr %65, align 8
  %67 = getelementptr inbounds { i32, ptr }, ptr %28, i32 0, i32 1
  %68 = extractvalue { i32, ptr } %64, 1
  store ptr %68, ptr %67, align 8
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %102, %56
  %70 = load i32, ptr %24, align 4, !tbaa !9
  %71 = load i32, ptr %21, align 4, !tbaa !9
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %73, label %105

73:                                               ; preds = %69
  %74 = load ptr, ptr %26, align 8, !tbaa !5
  %75 = load i32, ptr %24, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds double, ptr %74, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !11
  %79 = load ptr, ptr %26, align 8, !tbaa !5
  %80 = load i32, ptr %24, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds double, ptr %79, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !11
  %84 = load ptr, ptr %27, align 8, !tbaa !5
  %85 = load i32, ptr %24, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds double, ptr %84, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !11
  %89 = load ptr, ptr %27, align 8, !tbaa !5
  %90 = load i32, ptr %24, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds double, ptr %89, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !11
  %94 = fmul double %88, %93
  %95 = call double @llvm.fmuladd.f64(double %78, double %83, double %94)
  %96 = call double @sqrt(double noundef %95) #7
  %97 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %28, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !13
  %99 = load i32, ptr %24, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds double, ptr %98, i64 %100
  store double %96, ptr %101, align 8, !tbaa !11
  br label %102

102:                                              ; preds = %73
  %103 = load i32, ptr %24, align 4, !tbaa !9
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %24, align 4, !tbaa !9
  br label %69, !llvm.loop !15

105:                                              ; preds = %69
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %28, i64 16, i1 false), !tbaa.struct !17
  %106 = getelementptr inbounds { i32, ptr }, ptr %30, i32 0, i32 0
  %107 = load i32, ptr %106, align 8
  %108 = getelementptr inbounds { i32, ptr }, ptr %30, i32 0, i32 1
  %109 = load ptr, ptr %108, align 8
  %110 = getelementptr inbounds { i32, ptr }, ptr %31, i32 0, i32 0
  %111 = load i32, ptr %110, align 8
  %112 = getelementptr inbounds { i32, ptr }, ptr %31, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8
  %114 = call { i32, ptr } @_ZN4sptk5swipe6splineENS0_6vectorES1_(i32 %107, ptr %109, i32 %111, ptr %113)
  %115 = getelementptr inbounds { i32, ptr }, ptr %29, i32 0, i32 0
  %116 = extractvalue { i32, ptr } %114, 0
  store i32 %116, ptr %115, align 8
  %117 = getelementptr inbounds { i32, ptr }, ptr %29, i32 0, i32 1
  %118 = extractvalue { i32, ptr } %114, 1
  store ptr %118, ptr %117, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %32, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %28, i64 16, i1 false), !tbaa.struct !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %29, i64 16, i1 false), !tbaa.struct !17
  %119 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %16, i32 0, i32 1
  %120 = load ptr, ptr %119, align 8, !tbaa !13
  %121 = getelementptr inbounds double, ptr %120, i64 0
  %122 = load double, ptr %121, align 8, !tbaa !11
  %123 = load i32, ptr %22, align 4, !tbaa !9
  %124 = getelementptr inbounds { i32, ptr }, ptr %32, i32 0, i32 0
  %125 = load i32, ptr %124, align 8
  %126 = getelementptr inbounds { i32, ptr }, ptr %32, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8
  %128 = getelementptr inbounds { i32, ptr }, ptr %33, i32 0, i32 0
  %129 = load i32, ptr %128, align 8
  %130 = getelementptr inbounds { i32, ptr }, ptr %33, i32 0, i32 1
  %131 = load ptr, ptr %130, align 8
  %132 = getelementptr inbounds { i32, ptr }, ptr %34, i32 0, i32 0
  %133 = load i32, ptr %132, align 8
  %134 = getelementptr inbounds { i32, ptr }, ptr %34, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8
  %136 = call noundef double @_ZN4sptk5swipe6splinvENS0_6vectorES1_S1_di(i32 %125, ptr %127, i32 %129, ptr %131, i32 %133, ptr %135, double noundef %122, i32 noundef %123)
  %137 = call double @sqrt(double noundef %136) #7
  %138 = call noundef double @_ZN4sptk5swipe6fixnanEd(double noundef %137)
  %139 = getelementptr inbounds %"struct.sptk::swipe::matrix", ptr %14, i32 0, i32 2
  %140 = load ptr, ptr %139, align 8, !tbaa !18
  %141 = load i32, ptr %23, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds ptr, ptr %140, i64 %142
  %144 = load ptr, ptr %143, align 8, !tbaa !5
  %145 = getelementptr inbounds double, ptr %144, i64 0
  store double %138, ptr %145, align 8, !tbaa !11
  store i32 1, ptr %24, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %195, %105
  %147 = load i32, ptr %24, align 4, !tbaa !9
  %148 = getelementptr inbounds %"struct.sptk::swipe::matrix", ptr %14, i32 0, i32 1
  %149 = load i32, ptr %148, align 4, !tbaa !20
  %150 = icmp slt i32 %147, %149
  br i1 %150, label %151, label %198

151:                                              ; preds = %146
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !17
  %152 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %16, i32 0, i32 1
  %153 = load ptr, ptr %152, align 8, !tbaa !13
  %154 = load i32, ptr %24, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds double, ptr %153, i64 %155
  %157 = load double, ptr %156, align 8, !tbaa !11
  %158 = load i32, ptr %22, align 4, !tbaa !9
  %159 = getelementptr inbounds { i32, ptr }, ptr %35, i32 0, i32 0
  %160 = load i32, ptr %159, align 8
  %161 = getelementptr inbounds { i32, ptr }, ptr %35, i32 0, i32 1
  %162 = load ptr, ptr %161, align 8
  %163 = call noundef i32 @_ZN4sptk5swipe7bilookvENS0_6vectorEdi(i32 %160, ptr %162, double noundef %157, i32 noundef %158)
  store i32 %163, ptr %22, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %36, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %37, ptr align 8 %28, i64 16, i1 false), !tbaa.struct !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %38, ptr align 8 %29, i64 16, i1 false), !tbaa.struct !17
  %164 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %16, i32 0, i32 1
  %165 = load ptr, ptr %164, align 8, !tbaa !13
  %166 = load i32, ptr %24, align 4, !tbaa !9
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds double, ptr %165, i64 %167
  %169 = load double, ptr %168, align 8, !tbaa !11
  %170 = load i32, ptr %22, align 4, !tbaa !9
  %171 = getelementptr inbounds { i32, ptr }, ptr %36, i32 0, i32 0
  %172 = load i32, ptr %171, align 8
  %173 = getelementptr inbounds { i32, ptr }, ptr %36, i32 0, i32 1
  %174 = load ptr, ptr %173, align 8
  %175 = getelementptr inbounds { i32, ptr }, ptr %37, i32 0, i32 0
  %176 = load i32, ptr %175, align 8
  %177 = getelementptr inbounds { i32, ptr }, ptr %37, i32 0, i32 1
  %178 = load ptr, ptr %177, align 8
  %179 = getelementptr inbounds { i32, ptr }, ptr %38, i32 0, i32 0
  %180 = load i32, ptr %179, align 8
  %181 = getelementptr inbounds { i32, ptr }, ptr %38, i32 0, i32 1
  %182 = load ptr, ptr %181, align 8
  %183 = call noundef double @_ZN4sptk5swipe6splinvENS0_6vectorES1_S1_di(i32 %172, ptr %174, i32 %176, ptr %178, i32 %180, ptr %182, double noundef %169, i32 noundef %170)
  %184 = call double @sqrt(double noundef %183) #7
  %185 = call noundef double @_ZN4sptk5swipe6fixnanEd(double noundef %184)
  %186 = getelementptr inbounds %"struct.sptk::swipe::matrix", ptr %14, i32 0, i32 2
  %187 = load ptr, ptr %186, align 8, !tbaa !18
  %188 = load i32, ptr %23, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds ptr, ptr %187, i64 %189
  %191 = load ptr, ptr %190, align 8, !tbaa !5
  %192 = load i32, ptr %24, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds double, ptr %191, i64 %193
  store double %185, ptr %194, align 8, !tbaa !11
  br label %195

195:                                              ; preds = %151
  %196 = load i32, ptr %24, align 4, !tbaa !9
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %24, align 4, !tbaa !9
  br label %146, !llvm.loop !21

198:                                              ; preds = %146
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %39, ptr align 8 %28, i64 16, i1 false), !tbaa.struct !17
  %199 = getelementptr inbounds { i32, ptr }, ptr %39, i32 0, i32 0
  %200 = load i32, ptr %199, align 8
  %201 = getelementptr inbounds { i32, ptr }, ptr %39, i32 0, i32 1
  %202 = load ptr, ptr %201, align 8
  call void @_ZN4sptk5swipe5freevENS0_6vectorE(i32 %200, ptr %202)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %40, ptr align 8 %29, i64 16, i1 false), !tbaa.struct !17
  %203 = getelementptr inbounds { i32, ptr }, ptr %40, i32 0, i32 0
  %204 = load i32, ptr %203, align 8
  %205 = getelementptr inbounds { i32, ptr }, ptr %40, i32 0, i32 1
  %206 = load ptr, ptr %205, align 8
  call void @_ZN4sptk5swipe5freevENS0_6vectorE(i32 %204, ptr %206)
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  store i32 0, ptr %25, align 4
  br label %207

207:                                              ; preds = %198, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  %208 = load i32, ptr %25, align 4
  switch i32 %208, label %210 [
    i32 0, label %209
    i32 1, label %209
  ]

209:                                              ; preds = %207, %207
  ret void

210:                                              ; preds = %207
  unreachable
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

declare noundef zeroext i1 @_ZNK4sptk30RealValuedFastFourierTransform3RunERKSt6vectorIdSaIdEEPS3_S6_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

declare { i32, ptr } @_ZN4sptk5swipe5makevEi(i32 noundef) #3

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

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

declare { i32, ptr } @_ZN4sptk5swipe6splineENS0_6vectorES1_(i32, ptr, i32, ptr) #3

; 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

declare noundef double @_ZN4sptk5swipe6splinvENS0_6vectorES1_S1_di(i32, ptr, i32, ptr, i32, ptr, double noundef, i32 noundef) #3

declare noundef i32 @_ZN4sptk5swipe7bilookvENS0_6vectorEdi(i32, ptr, double noundef, i32 noundef) #3

declare void @_ZN4sptk5swipe5freevENS0_6vectorE(i32, ptr) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

attributes #0 = { mustprogress nounwind 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 = !{!"_ZTSN4sptk5swipe6vectorE", !10, i64 0, !6, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{i64 0, i64 4, !9, i64 8, i64 8, !5}
!18 = !{!19, !6, i64 8}
!19 = !{!"_ZTSN4sptk5swipe6matrixE", !10, i64 0, !10, i64 4, !6, i64 8}
!20 = !{!19, !10, i64 4}
!21 = distinct !{!21, !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"

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN4sptk5swipe6fixnanEd(double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4sptk5swipe2LaENS0_6matrixENS0_6vectorES2_RKNS_30RealValuedFastFourierTransformERKSt6vectorIdSaIdEEPS6_IS8_SaIS8_EEPNS3_6BufferEiii(i64 %0, ptr nocapture readonly %1, i32 %2, ptr %3, i32 %4, ptr nocapture readonly %5, ptr noundef nonnull align 8 dereferenceable(104) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull %8, ptr noundef %9, i32 noundef %10, i32 noundef %11, i32 noundef %12) local_unnamed_addr #1 {
  %.sroa.184.0.extract.shift = lshr i64 %0, 32
  %.sroa.184.0.extract.trunc = trunc nuw i64 %.sroa.184.0.extract.shift to i32
  %14 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #6
  %15 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 1) #6
  %16 = tail call noundef zeroext i1 @_ZNK4sptk30RealValuedFastFourierTransform3RunERKSt6vectorIdSaIdEEPS3_S6_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(104) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef %9)
  br i1 %16, label %17, label %81

17:                                               ; preds = %13
  %18 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #6
  %19 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef 0) #6
  %20 = ptrtoint ptr %19 to i64
  %21 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 1) #6
  %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef 0) #6
  %23 = ptrtoint ptr %22 to i64
  %24 = tail call { i32, ptr } @_ZN4sptk5swipe5makevEi(i32 noundef %10)
  %25 = extractvalue { i32, ptr } %24, 0
  %26 = extractvalue { i32, ptr } %24, 1
  %27 = ptrtoint ptr %26 to i64
  %28 = icmp sgt i32 %10, 0
  br i1 %28, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %17
  %wide.trip.count = zext nneg i32 %10 to i64
  %min.iters.check = icmp ult i32 %10, 4
  br i1 %min.iters.check, label %.lr.ph.preheader102, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph.preheader
  %29 = sub i64 %27, %20
  %diff.check = icmp ult i64 %29, 16
  %30 = sub i64 %27, %23
  %diff.check100 = icmp ult i64 %30, 16
  %conflict.rdx = or i1 %diff.check, %diff.check100
  br i1 %conflict.rdx, label %.lr.ph.preheader102, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 2147483646
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %31 = getelementptr inbounds double, ptr %19, i64 %index
  %wide.load = load <2 x double>, ptr %31, align 8, !tbaa !5
  %32 = getelementptr inbounds double, ptr %22, i64 %index
  %wide.load101 = load <2 x double>, ptr %32, align 8, !tbaa !5
  %33 = fmul <2 x double> %wide.load101, %wide.load101
  %34 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load, <2 x double> %wide.load, <2 x double> %33)
  %35 = tail call <2 x double> @llvm.sqrt.v2f64(<2 x double> %34)
  %36 = getelementptr inbounds double, ptr %26, i64 %index
  store <2 x double> %35, ptr %36, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 2
  %37 = icmp eq i64 %index.next, %n.vec
  br i1 %37, label %middle.block, label %vector.body, !llvm.loop !9

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

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

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader102
  %38 = getelementptr inbounds double, ptr %19, i64 %indvars.iv.ph
  %39 = load double, ptr %38, align 8, !tbaa !5
  %40 = getelementptr inbounds double, ptr %22, i64 %indvars.iv.ph
  %41 = load double, ptr %40, align 8, !tbaa !5
  %42 = fmul double %41, %41
  %43 = tail call double @llvm.fmuladd.f64(double %39, double %39, double %42)
  %sqrt.prol = tail call double @llvm.sqrt.f64(double %43)
  %44 = getelementptr inbounds double, ptr %26, i64 %indvars.iv.ph
  store double %sqrt.prol, ptr %44, align 8, !tbaa !5
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %.lr.ph.prol.loopexit

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader102
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph.preheader102 ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %45 = add nsw i64 %wide.trip.count, -1
  %46 = icmp eq i64 %indvars.iv.ph, %45
  br i1 %46, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %47 = getelementptr inbounds double, ptr %19, i64 %indvars.iv
  %48 = load double, ptr %47, align 8, !tbaa !5
  %49 = getelementptr inbounds double, ptr %22, i64 %indvars.iv
  %50 = load double, ptr %49, align 8, !tbaa !5
  %51 = fmul double %50, %50
  %52 = tail call double @llvm.fmuladd.f64(double %48, double %48, double %51)
  %sqrt = tail call double @llvm.sqrt.f64(double %52)
  %53 = getelementptr inbounds double, ptr %26, i64 %indvars.iv
  store double %sqrt, ptr %53, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %54 = getelementptr inbounds double, ptr %19, i64 %indvars.iv.next
  %55 = load double, ptr %54, align 8, !tbaa !5
  %56 = getelementptr inbounds double, ptr %22, i64 %indvars.iv.next
  %57 = load double, ptr %56, align 8, !tbaa !5
  %58 = fmul double %57, %57
  %59 = tail call double @llvm.fmuladd.f64(double %55, double %55, double %58)
  %sqrt.1 = tail call double @llvm.sqrt.f64(double %59)
  %60 = getelementptr inbounds double, ptr %26, i64 %indvars.iv.next
  store double %sqrt.1, ptr %60, align 8, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge, label %.lr.ph, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %17
  %61 = tail call { i32, ptr } @_ZN4sptk5swipe6splineENS0_6vectorES1_(i32 %2, ptr %3, i32 %25, ptr %26)
  %62 = extractvalue { i32, ptr } %61, 0
  %63 = extractvalue { i32, ptr } %61, 1
  %64 = load double, ptr %5, align 8, !tbaa !5
  %65 = tail call noundef double @_ZN4sptk5swipe6splinvENS0_6vectorES1_S1_di(i32 %2, ptr %3, i32 %25, ptr %26, i32 %62, ptr %63, double noundef %64, i32 noundef %11)
  %66 = tail call double @sqrt(double noundef %65) #6
  %67 = tail call noundef double @_ZN4sptk5swipe6fixnanEd(double noundef %66)
  %68 = sext i32 %12 to i64
  %69 = getelementptr inbounds ptr, ptr %1, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !14
  store double %67, ptr %70, align 8, !tbaa !5
  %71 = icmp sgt i32 %.sroa.184.0.extract.trunc, 1
  br i1 %71, label %.lr.ph92, label %._crit_edge93

.lr.ph92:                                         ; preds = %._crit_edge, %.lr.ph92
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %.lr.ph92 ], [ 1, %._crit_edge ]
  %.090 = phi i32 [ %74, %.lr.ph92 ], [ %11, %._crit_edge ]
  %72 = getelementptr inbounds double, ptr %5, i64 %indvars.iv95
  %73 = load double, ptr %72, align 8, !tbaa !5
  %74 = tail call noundef i32 @_ZN4sptk5swipe7bilookvENS0_6vectorEdi(i32 %2, ptr %3, double noundef %73, i32 noundef %.090)
  %75 = load double, ptr %72, align 8, !tbaa !5
  %76 = tail call noundef double @_ZN4sptk5swipe6splinvENS0_6vectorES1_S1_di(i32 %2, ptr %3, i32 %25, ptr %26, i32 %62, ptr %63, double noundef %75, i32 noundef %74)
  %77 = tail call double @sqrt(double noundef %76) #6
  %78 = tail call noundef double @_ZN4sptk5swipe6fixnanEd(double noundef %77)
  %79 = load ptr, ptr %69, align 8, !tbaa !14
  %80 = getelementptr inbounds double, ptr %79, i64 %indvars.iv95
  store double %78, ptr %80, align 8, !tbaa !5
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %exitcond99.not = icmp eq i64 %indvars.iv.next96, %.sroa.184.0.extract.shift
  br i1 %exitcond99.not, label %._crit_edge93, label %.lr.ph92, !llvm.loop !16

._crit_edge93:                                    ; preds = %.lr.ph92, %._crit_edge
  tail call void @_ZN4sptk5swipe5freevENS0_6vectorE(i32 %25, ptr %26)
  tail call void @_ZN4sptk5swipe5freevENS0_6vectorE(i32 %62, ptr %63)
  br label %81

81:                                               ; preds = %13, %._crit_edge93
  ret void
}

declare noundef zeroext i1 @_ZNK4sptk30RealValuedFastFourierTransform3RunERKSt6vectorIdSaIdEEPS3_S6_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

declare { i32, ptr } @_ZN4sptk5swipe5makevEi(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #3

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

declare { i32, ptr } @_ZN4sptk5swipe6splineENS0_6vectorES1_(i32, ptr, i32, ptr) local_unnamed_addr #2

declare noundef double @_ZN4sptk5swipe6splinvENS0_6vectorES1_S1_di(i32, ptr, i32, ptr, i32, ptr, double noundef, i32 noundef) local_unnamed_addr #2

declare noundef i32 @_ZN4sptk5swipe7bilookvENS0_6vectorEdi(i32, ptr, double noundef, i32 noundef) local_unnamed_addr #2

declare void @_ZN4sptk5swipe5freevENS0_6vectorE(i32, ptr) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sqrt.f64(double) #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>) #5

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

attributes #0 = { mustprogress nounwind 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 #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 nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !11}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = distinct !{!16, !10}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass