; LLVM IR from sp-nitech/SPTK :: src/window (data_windowing)

; 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"

%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.anon = type { double }
%"class.sptk::DataWindowing" = type { ptr, i32, i32, i8, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTVN4sptk13DataWindowingE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4sptk13DataWindowingC2EPKNS_15WindowInterfaceEiNS0_17NormalizationTypeE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca double, align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca i32, align 4
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %class.anon, align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !11
  %25 = load ptr, ptr %5, align 8
  store ptr getelementptr inbounds inrange(-16, 16) ({ [4 x ptr] }, ptr @_ZTVN4sptk13DataWindowingE, i32 0, i32 0, i32 2), ptr %25, align 8, !tbaa !13
  %26 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 1
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %35

29:                                               ; preds = %4
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  %32 = getelementptr inbounds ptr, ptr %31, i64 2
  %33 = load ptr, ptr %32, align 8
  %34 = call noundef i32 %33(ptr noundef nonnull align 8 dereferenceable(8) %30)
  br label %36

35:                                               ; preds = %4
  br label %36

36:                                               ; preds = %35, %29
  %37 = phi i32 [ %34, %29 ], [ 0, %35 ]
  store i32 %37, ptr %26, align 8, !tbaa !15
  %38 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 2
  %39 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %39, ptr %38, align 4, !tbaa !22
  %40 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 3
  store i8 1, ptr %40, align 8, !tbaa !23
  %41 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 4
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %41) #5
  %42 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 1
  %43 = load i32, ptr %42, align 8, !tbaa !15
  %44 = icmp sle i32 %43, 0
  br i1 %44, label %51, label %45

45:                                               ; preds = %36
  %46 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 2
  %47 = load i32, ptr %46, align 4, !tbaa !22
  %48 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 1
  %49 = load i32, ptr %48, align 8, !tbaa !15
  %50 = icmp slt i32 %47, %49
  br i1 %50, label %51, label %53

51:                                               ; preds = %45, %36
  %52 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 3
  store i8 0, ptr %52, align 8, !tbaa !23
  br label %148

53:                                               ; preds = %45
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = getelementptr inbounds ptr, ptr %55, i64 4
  %57 = load ptr, ptr %56, align 8
  %58 = invoke noundef nonnull align 8 dereferenceable(24) ptr %57(ptr noundef nonnull align 8 dereferenceable(8) %54)
          to label %59 unwind label %64

59:                                               ; preds = %53
  %60 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 4
  %61 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIdSaIdEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %60, ptr noundef nonnull align 8 dereferenceable(24) %58)
          to label %62 unwind label %64

62:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store double 1.000000e+00, ptr %11, align 8, !tbaa !24
  %63 = load i32, ptr %8, align 4, !tbaa !11
  switch i32 %63, label %113 [
    i32 0, label %68
    i32 1, label %69
    i32 2, label %94
  ]

64:                                               ; preds = %59, %53
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %9, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %10, align 4
  br label %150

68:                                               ; preds = %62
  br label %115

69:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %70 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 4
  %71 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %70) #5
  %72 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %71, ptr %72, align 8
  %73 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 4
  %74 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %73) #5
  %75 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %74, ptr %75, align 8
  %76 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 4
  %77 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #5
  %78 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %77, ptr %78, align 8
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8
  %81 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8
  %83 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8
  %85 = invoke noundef double @_ZSt13inner_productIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEES6_dET1_T_S8_T0_S7_(ptr %80, ptr %82, ptr %84, double noundef 0.000000e+00)
          to label %86 unwind label %90

86:                                               ; preds = %69
  store double %85, ptr %12, align 8, !tbaa !24
  %87 = load double, ptr %12, align 8, !tbaa !24
  %88 = call double @sqrt(double noundef %87) #5
  %89 = fdiv double 1.000000e+00, %88
  store double %89, ptr %11, align 8, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %115

90:                                               ; preds = %69
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %9, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %149

94:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %95 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 4
  %96 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %95) #5
  %97 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %96, ptr %97, align 8
  %98 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 4
  %99 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %98) #5
  %100 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %99, ptr %100, align 8
  %101 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8
  %103 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8
  %105 = invoke noundef double @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEdET0_T_S8_S7_(ptr %102, ptr %104, double noundef 0.000000e+00)
          to label %106 unwind label %109

106:                                              ; preds = %94
  store double %105, ptr %16, align 8, !tbaa !24
  %107 = load double, ptr %16, align 8, !tbaa !24
  %108 = fdiv double 1.000000e+00, %107
  store double %108, ptr %11, align 8, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %115

109:                                              ; preds = %94
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %9, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %149

113:                                              ; preds = %62
  %114 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 3
  store i8 0, ptr %114, align 8, !tbaa !23
  store i32 1, ptr %19, align 4
  br label %146

115:                                              ; preds = %106, %86, %68
  %116 = load double, ptr %11, align 8, !tbaa !24
  %117 = fcmp une double 1.000000e+00, %116
  br i1 %117, label %118, label %145

118:                                              ; preds = %115
  %119 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 4
  %120 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %119) #5
  %121 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %120, ptr %121, align 8
  %122 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 4
  %123 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %122) #5
  %124 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %123, ptr %124, align 8
  %125 = getelementptr inbounds %"class.sptk::DataWindowing", ptr %25, i32 0, i32 4
  %126 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %125) #5
  %127 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %126, ptr %127, align 8
  %128 = getelementptr inbounds %class.anon, ptr %23, i32 0, i32 0
  %129 = load double, ptr %11, align 8, !tbaa !24
  store double %129, ptr %128, align 8, !tbaa !26
  %130 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8
  %132 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  %133 = load ptr, ptr %132, align 8
  %134 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8
  %136 = getelementptr inbounds %class.anon, ptr %23, i32 0, i32 0
  %137 = load double, ptr %136, align 8
  %138 = invoke ptr @"_ZSt9transformIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEES6_ZN4sptk13DataWindowingC1EPKNS7_15WindowInterfaceEiNS8_17NormalizationTypeEE3$_0ET0_T_SF_SE_T1_"(ptr %131, ptr %133, ptr %135, double %137)
          to label %139 unwind label %141

139:                                              ; preds = %118
  %140 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %138, ptr %140, align 8
  br label %145

141:                                              ; preds = %118
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %9, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %10, align 4
  br label %149

145:                                              ; preds = %139, %115
  store i32 0, ptr %19, align 4
  br label %146

146:                                              ; preds = %145, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  %147 = load i32, ptr %19, align 4
  switch i32 %147, label %156 [
    i32 0, label %148
    i32 1, label %148
  ]

148:                                              ; preds = %146, %146, %51
  ret void

149:                                              ; preds = %141, %109, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %150

150:                                              ; preds = %149, %64
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %41) #5
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %9, align 8
  %153 = load i32, ptr %10, align 4
  %154 = insertvalue { ptr, i32 } poison, ptr %152, 0
  %155 = insertvalue { ptr, i32 } %154, i32 %153, 1
  resume { ptr, i32 } %155

156:                                              ; preds = %146
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt13inner_productIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEES6_dET1_T_S8_T0_S7_(ptr, ptr, ptr, double noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEdET0_T_S8_S7_(ptr, ptr, double noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden ptr @"_ZSt9transformIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEES6_ZN4sptk13DataWindowingC1EPKNS7_15WindowInterfaceEiNS8_17NormalizationTypeEE3$_0ET0_T_SF_SE_T1_"(ptr, ptr, ptr, double) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #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 = { 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 = !{!"_ZTSN4sptk13DataWindowing17NormalizationTypeE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !10, i64 8}
!16 = !{!"_ZTSN4sptk13DataWindowingE", !10, i64 8, !10, i64 12, !17, i64 16, !18, i64 24}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSSt6vectorIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!16, !10, i64 12}
!23 = !{!16, !17, i64 16}
!24 = !{!25, !25, i64 0}
!25 = !{!"double", !7, i64 0}
!26 = !{!27, !25, i64 0}
!27 = !{!"_ZTSZN4sptk13DataWindowingC1EPKNS_15WindowInterfaceEiNS0_17NormalizationTypeEE3$_0", !25, i64 0}


; 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"

@_ZTVN4sptk13DataWindowingE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4sptk13DataWindowingC2EPKNS_15WindowInterfaceEiNS0_17NormalizationTypeE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTVN4sptk13DataWindowingE, i64 16), ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %11, label %6

6:                                                ; preds = %4
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 16
  %9 = load ptr, ptr %8, align 8
  %10 = tail call noundef i32 %9(ptr noundef nonnull align 8 dereferenceable(8) %1)
  br label %11

11:                                               ; preds = %4, %6
  %12 = phi i32 [ %10, %6 ], [ 0, %4 ]
  store i32 %12, ptr %5, align 8, !tbaa !8
  %13 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %2, ptr %13, align 4, !tbaa !18
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  store i8 1, ptr %14, align 8, !tbaa !19
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %16 = load i32, ptr %5, align 8, !tbaa !8
  %17 = icmp slt i32 %16, 1
  %18 = load i32, ptr %13, align 4
  %19 = icmp slt i32 %18, %16
  %or.cond = select i1 %17, i1 true, i1 %19
  br i1 %or.cond, label %.thread.sink.split, label %20

20:                                               ; preds = %11
  %21 = load ptr, ptr %1, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i64 32
  %23 = load ptr, ptr %22, align 8
  %24 = invoke noundef nonnull align 8 dereferenceable(24) ptr %23(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %25 unwind label %28

25:                                               ; preds = %20
  %26 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIdSaIdEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %27 unwind label %28

27:                                               ; preds = %25
  switch i32 %3, label %.thread.sink.split [
    i32 0, label %.thread
    i32 1, label %30
    i32 2, label %36
  ]

28:                                               ; preds = %25, %20
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %49

30:                                               ; preds = %27
  %31 = tail call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %32 = tail call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %33 = tail call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %34 = tail call noundef double @_ZSt13inner_productIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEES6_dET1_T_S8_T0_S7_(ptr %31, ptr %32, ptr %33, double noundef 0.000000e+00)
  %35 = tail call double @sqrt(double noundef %34) #4
  br label %40

36:                                               ; preds = %27
  %37 = tail call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %38 = tail call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %39 = tail call noundef double @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEdET0_T_S8_S7_(ptr %37, ptr %38, double noundef 0.000000e+00)
  br label %40

40:                                               ; preds = %36, %30
  %.pn27 = phi double [ %39, %36 ], [ %35, %30 ]
  %.021 = fdiv double 1.000000e+00, %.pn27
  %41 = fcmp une double %.021, 1.000000e+00
  br i1 %41, label %42, label %.thread

42:                                               ; preds = %40
  %43 = tail call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %44 = tail call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %45 = tail call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %46 = invoke ptr @"_ZSt9transformIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEES6_ZN4sptk13DataWindowingC1EPKNS7_15WindowInterfaceEiNS8_17NormalizationTypeEE3$_0ET0_T_SF_SE_T1_"(ptr %43, ptr %44, ptr %45, double %.021)
          to label %.thread unwind label %47

47:                                               ; preds = %42
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %49

.thread.sink.split:                               ; preds = %27, %11
  store i8 0, ptr %14, align 8, !tbaa !19
  br label %.thread

.thread:                                          ; preds = %.thread.sink.split, %27, %42, %40
  ret void

49:                                               ; preds = %47, %28
  %.pn = phi { ptr, i32 } [ %48, %47 ], [ %29, %28 ]
  tail call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt13inner_productIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEES6_dET1_T_S8_T0_S7_(ptr, ptr, ptr, double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEdET0_T_S8_S7_(ptr, ptr, double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden ptr @"_ZSt9transformIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEES6_ZN4sptk13DataWindowingC1EPKNS7_15WindowInterfaceEiNS8_17NormalizationTypeEE3$_0ET0_T_SF_SE_T1_"(ptr, ptr, ptr, double) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

attributes #0 = { 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 #1 = { 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 #2 = { inlinehint 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 #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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 8}
!9 = !{!"_ZTSN4sptk13DataWindowingE", !10, i64 8, !10, i64 12, !12, i64 16, !13, i64 24}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"bool", !11, i64 0}
!13 = !{!"_ZTSSt6vectorIdSaIdEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"any pointer", !11, i64 0}
!18 = !{!9, !10, i64 12}
!19 = !{!9, !12, i64 16}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass