; LLVM IR from kacperks/Fractal_Engine :: Engine/Thirdparty/cmake/Engine/Thirdparty/cmake/openal-soft/common/polyphase/7c89c002 (ZN15PPhaseResampler7processEjPKdjPd)

; 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.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 }
%struct.PPhaseResampler = type { i32, i32, i32, i32, %"class.std::vector" }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15PPhaseResampler7processEjPKdjPd(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca double, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  %29 = load ptr, ptr %6, align 8
  %30 = load i32, ptr %9, align 4, !tbaa !9
  %31 = icmp eq i32 %30, 0
  %32 = xor i1 %31, true
  %33 = xor i1 %32, true
  %34 = zext i1 %33 to i64
  %35 = call i64 @llvm.expect.i64(i64 %34, i64 0)
  %36 = icmp ne i64 %35, 0
  br i1 %36, label %37, label %38

37:                                               ; preds = %5
  br label %207

38:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %39, ptr %12, align 8, !tbaa !5
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = icmp eq ptr %40, %41
  %43 = xor i1 %42, true
  %44 = xor i1 %43, true
  %45 = zext i1 %44 to i64
  %46 = call i64 @llvm.expect.i64(i64 %45, i64 0)
  %47 = icmp ne i64 %46, 0
  br i1 %47, label %48, label %57

48:                                               ; preds = %38
  %49 = load i32, ptr %9, align 4, !tbaa !9
  %50 = zext i32 %49 to i64
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %50)
          to label %51 unwind label %53

51:                                               ; preds = %48
  %52 = call noundef ptr @_ZNSt6vectorIdSaIdEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  store ptr %52, ptr %12, align 8, !tbaa !5
  br label %57

53:                                               ; preds = %48
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %13, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %14, align 4
  br label %209

57:                                               ; preds = %51, %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %58 = getelementptr inbounds %struct.PPhaseResampler, ptr %29, i32 0, i32 0
  %59 = load i32, ptr %58, align 8, !tbaa !11
  store i32 %59, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %60 = getelementptr inbounds %struct.PPhaseResampler, ptr %29, i32 0, i32 1
  %61 = load i32, ptr %60, align 4, !tbaa !17
  store i32 %61, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %62 = getelementptr inbounds %struct.PPhaseResampler, ptr %29, i32 0, i32 2
  %63 = load i32, ptr %62, align 8, !tbaa !18
  store i32 %63, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %64 = getelementptr inbounds %struct.PPhaseResampler, ptr %29, i32 0, i32 3
  %65 = load i32, ptr %64, align 4, !tbaa !19
  store i32 %65, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %66 = getelementptr inbounds %struct.PPhaseResampler, ptr %29, i32 0, i32 4
  %67 = call noundef ptr @_ZNSt6vectorIdSaIdEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #7
  store ptr %67, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %189, %57
  %69 = load i32, ptr %20, align 4, !tbaa !9
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = icmp ult i32 %69, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %192

73:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %74 = load i32, ptr %18, align 4, !tbaa !9
  %75 = load i32, ptr %16, align 4, !tbaa !9
  %76 = load i32, ptr %20, align 4, !tbaa !9
  %77 = mul i32 %75, %76
  %78 = add i32 %74, %77
  %79 = load i32, ptr %15, align 4, !tbaa !9
  %80 = urem i32 %78, %79
  %81 = zext i32 %80 to i64
  store i64 %81, ptr %21, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %82 = load i32, ptr %18, align 4, !tbaa !9
  %83 = load i32, ptr %16, align 4, !tbaa !9
  %84 = load i32, ptr %20, align 4, !tbaa !9
  %85 = mul i32 %83, %84
  %86 = add i32 %82, %85
  %87 = load i32, ptr %15, align 4, !tbaa !9
  %88 = udiv i32 %86, %87
  %89 = zext i32 %88 to i64
  store i64 %89, ptr %22, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store double 0.000000e+00, ptr %23, align 8, !tbaa !22
  %90 = load i64, ptr %21, align 8, !tbaa !20
  %91 = load i32, ptr %17, align 4, !tbaa !9
  %92 = zext i32 %91 to i64
  %93 = icmp ult i64 %90, %92
  %94 = xor i1 %93, true
  %95 = xor i1 %94, true
  %96 = zext i1 %95 to i64
  %97 = call i64 @llvm.expect.i64(i64 %96, i64 1)
  %98 = icmp ne i64 %97, 0
  br i1 %98, label %99, label %183

99:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %100 = load i32, ptr %17, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = load i64, ptr %21, align 8, !tbaa !20
  %103 = sub i64 %101, %102
  %104 = load i32, ptr %15, align 4, !tbaa !9
  %105 = zext i32 %104 to i64
  %106 = add i64 %103, %105
  %107 = sub i64 %106, 1
  %108 = load i32, ptr %15, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = udiv i64 %107, %109
  store i64 %110, ptr %24, align 8, !tbaa !20
  %111 = load i64, ptr %22, align 8, !tbaa !20
  %112 = add i64 %111, 1
  %113 = load i32, ptr %7, align 4, !tbaa !9
  %114 = zext i32 %113 to i64
  %115 = icmp ugt i64 %112, %114
  %116 = xor i1 %115, true
  %117 = xor i1 %116, true
  %118 = zext i1 %117 to i64
  %119 = call i64 @llvm.expect.i64(i64 %118, i64 1)
  %120 = icmp ne i64 %119, 0
  br i1 %120, label %121, label %146

121:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %122 = load i64, ptr %22, align 8, !tbaa !20
  %123 = add i64 %122, 1
  %124 = load i32, ptr %7, align 4, !tbaa !9
  %125 = zext i32 %124 to i64
  %126 = sub i64 %123, %125
  store i64 %126, ptr %26, align 8, !tbaa !20
  %127 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %128 unwind label %142

128:                                              ; preds = %121
  %129 = load i64, ptr %127, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  store i64 %129, ptr %25, align 8, !tbaa !20
  %130 = load i32, ptr %15, align 4, !tbaa !9
  %131 = zext i32 %130 to i64
  %132 = load i64, ptr %25, align 8, !tbaa !20
  %133 = mul i64 %131, %132
  %134 = load i64, ptr %21, align 8, !tbaa !20
  %135 = add i64 %134, %133
  store i64 %135, ptr %21, align 8, !tbaa !20
  %136 = load i64, ptr %25, align 8, !tbaa !20
  %137 = load i64, ptr %22, align 8, !tbaa !20
  %138 = sub i64 %137, %136
  store i64 %138, ptr %22, align 8, !tbaa !20
  %139 = load i64, ptr %25, align 8, !tbaa !20
  %140 = load i64, ptr %24, align 8, !tbaa !20
  %141 = sub i64 %140, %139
  store i64 %141, ptr %24, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %146

142:                                              ; preds = %121
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %13, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %182

146:                                              ; preds = %128, %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %147 = load i64, ptr %22, align 8, !tbaa !20
  %148 = add i64 %147, 1
  store i64 %148, ptr %28, align 8, !tbaa !20
  %149 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %150 unwind label %177

150:                                              ; preds = %146
  %151 = load i64, ptr %149, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  store i64 %151, ptr %27, align 8, !tbaa !20
  %152 = load i64, ptr %27, align 8, !tbaa !20
  %153 = icmp ne i64 %152, 0
  br i1 %153, label %154, label %181

154:                                              ; preds = %150
  br label %155

155:                                              ; preds = %172, %154
  %156 = load ptr, ptr %19, align 8, !tbaa !5
  %157 = load i64, ptr %21, align 8, !tbaa !20
  %158 = getelementptr inbounds double, ptr %156, i64 %157
  %159 = load double, ptr %158, align 8, !tbaa !22
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = load i64, ptr %22, align 8, !tbaa !20
  %162 = getelementptr inbounds double, ptr %160, i64 %161
  %163 = load double, ptr %162, align 8, !tbaa !22
  %164 = load double, ptr %23, align 8, !tbaa !22
  %165 = call double @llvm.fmuladd.f64(double %159, double %163, double %164)
  store double %165, ptr %23, align 8, !tbaa !22
  %166 = load i32, ptr %15, align 4, !tbaa !9
  %167 = zext i32 %166 to i64
  %168 = load i64, ptr %21, align 8, !tbaa !20
  %169 = add i64 %168, %167
  store i64 %169, ptr %21, align 8, !tbaa !20
  %170 = load i64, ptr %22, align 8, !tbaa !20
  %171 = add i64 %170, -1
  store i64 %171, ptr %22, align 8, !tbaa !20
  br label %172

172:                                              ; preds = %155
  %173 = load i64, ptr %27, align 8, !tbaa !20
  %174 = add i64 %173, -1
  store i64 %174, ptr %27, align 8, !tbaa !20
  %175 = icmp ne i64 %174, 0
  br i1 %175, label %155, label %176, !llvm.loop !24

176:                                              ; preds = %172
  br label %181

177:                                              ; preds = %146
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %13, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %182

181:                                              ; preds = %176, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %183

182:                                              ; preds = %177, %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %208

183:                                              ; preds = %181, %73
  %184 = load double, ptr %23, align 8, !tbaa !22
  %185 = load ptr, ptr %12, align 8, !tbaa !5
  %186 = load i32, ptr %20, align 4, !tbaa !9
  %187 = zext i32 %186 to i64
  %188 = getelementptr inbounds double, ptr %185, i64 %187
  store double %184, ptr %188, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %189

189:                                              ; preds = %183
  %190 = load i32, ptr %20, align 4, !tbaa !9
  %191 = add i32 %190, 1
  store i32 %191, ptr %20, align 4, !tbaa !9
  br label %68, !llvm.loop !26

192:                                              ; preds = %72
  %193 = load ptr, ptr %12, align 8, !tbaa !5
  %194 = load ptr, ptr %10, align 8, !tbaa !5
  %195 = icmp ne ptr %193, %194
  br i1 %195, label %196, label %206

196:                                              ; preds = %192
  %197 = load ptr, ptr %12, align 8, !tbaa !5
  %198 = load i32, ptr %9, align 4, !tbaa !9
  %199 = load ptr, ptr %10, align 8, !tbaa !5
  %200 = invoke noundef ptr @_ZSt6copy_nIPdjS0_ET1_T_T0_S1_(ptr noundef %197, i32 noundef %198, ptr noundef %199)
          to label %201 unwind label %202

201:                                              ; preds = %196
  br label %206

202:                                              ; preds = %196
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %13, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %14, align 4
  br label %208

206:                                              ; preds = %201, %192
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  br label %207

207:                                              ; preds = %206, %37
  ret void

208:                                              ; preds = %202, %182
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %209

209:                                              ; preds = %208, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  br label %210

210:                                              ; preds = %209
  %211 = load ptr, ptr %13, align 8
  %212 = load i32, ptr %14, align 4
  %213 = insertvalue { ptr, i32 } poison, ptr %211, 0
  %214 = insertvalue { ptr, i32 } %213, i32 %212, 1
  resume { ptr, i32 } %214
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6copy_nIPdjS0_ET1_T_T0_S1_(ptr noundef, i32 noundef, ptr noundef) #6

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #3 = { 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 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { inlinehint 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 #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, !10, i64 0}
!12 = !{!"_ZTS15PPhaseResampler", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !13, i64 16}
!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", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!12, !10, i64 4}
!18 = !{!12, !10, i64 8}
!19 = !{!12, !10, i64 12}
!20 = !{!21, !21, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}


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

%"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 }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15PPhaseResampler7processEjPKdjPd(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 noundef %1, ptr noundef readonly %2, i32 noundef %3, ptr noundef %4) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = icmp eq i32 %3, 0
  br i1 %10, label %89, label %11, !prof !5

11:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %12 = icmp eq ptr %4, %2
  br i1 %12, label %13, label %19, !prof !5

13:                                               ; preds = %11
  %14 = zext i32 %3 to i64
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %14)
          to label %15 unwind label %17

15:                                               ; preds = %13
  %16 = call noundef ptr @_ZNSt6vectorIdSaIdEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %19

17:                                               ; preds = %13
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %90

19:                                               ; preds = %15, %11
  %.053 = phi ptr [ %16, %15 ], [ %4, %11 ]
  %20 = load i32, ptr %0, align 8, !tbaa !6
  %21 = getelementptr inbounds i8, ptr %0, i64 4
  %22 = load i32, ptr %21, align 4, !tbaa !16
  %23 = getelementptr inbounds i8, ptr %0, i64 8
  %24 = load i32, ptr %23, align 8, !tbaa !17
  %25 = getelementptr inbounds i8, ptr %0, i64 12
  %26 = load i32, ptr %25, align 4, !tbaa !18
  %27 = getelementptr inbounds i8, ptr %0, i64 16
  %28 = call noundef ptr @_ZNSt6vectorIdSaIdEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #6
  %29 = zext i32 %24 to i64
  %30 = zext i32 %20 to i64
  %31 = add nsw i64 %30, -1
  %32 = add nsw i64 %31, %29
  %33 = zext i32 %1 to i64
  %wide.trip.count = zext i32 %3 to i64
  %invariant.gep = getelementptr i8, ptr %2, i64 -8
  br label %35

34:                                               ; preds = %82
  %.not = icmp eq ptr %.053, %4
  br i1 %.not, label %88, label %84

35:                                               ; preds = %19, %82
  %indvars.iv = phi i64 [ 0, %19 ], [ %indvars.iv.next, %82 ]
  %36 = trunc nuw i64 %indvars.iv to i32
  %37 = mul i32 %22, %36
  %38 = add i32 %37, %26
  %39 = urem i32 %38, %20
  %40 = zext i32 %39 to i64
  %41 = udiv i32 %38, %20
  %42 = zext i32 %41 to i64
  %43 = icmp ult i32 %39, %24
  br i1 %43, label %44, label %82, !prof !19

44:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %45 = sub nsw i64 %32, %40
  %46 = udiv i64 %45, %30
  store i64 %46, ptr %7, align 8, !tbaa !20
  %.not71 = icmp ult i32 %41, %1
  br i1 %.not71, label %56, label %47, !prof !5

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %reass.sub = sub nsw i64 %42, %33
  %48 = add nsw i64 %reass.sub, 1
  store i64 %48, ptr %8, align 8, !tbaa !20
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %50 = load i64, ptr %49, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %51 = mul i64 %50, %30
  %52 = add i64 %51, %40
  %53 = sub i64 %42, %50
  %54 = load i64, ptr %7, align 8, !tbaa !20
  %55 = sub i64 %54, %50
  store i64 %55, ptr %7, align 8, !tbaa !20
  br label %56

56:                                               ; preds = %47, %44
  %.057 = phi i64 [ %52, %47 ], [ %40, %44 ]
  %.055 = phi i64 [ %53, %47 ], [ %42, %44 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %57 = add i64 %.055, 1
  store i64 %57, ptr %9, align 8, !tbaa !20
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %59 = load i64, ptr %58, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %.not72 = icmp eq i64 %59, 0
  br i1 %.not72, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %56
  %xtraiter = and i64 %59, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader.prol.loopexit, label %.preheader.prol

.preheader.prol:                                  ; preds = %.preheader.preheader
  %60 = getelementptr inbounds double, ptr %28, i64 %.057
  %61 = load double, ptr %60, align 8, !tbaa !22
  %62 = getelementptr inbounds double, ptr %2, i64 %.055
  %63 = load double, ptr %62, align 8, !tbaa !22
  %64 = call double @llvm.fmuladd.f64(double %61, double %63, double 0.000000e+00)
  %65 = add i64 %.057, %30
  %66 = add i64 %.055, -1
  %67 = add nsw i64 %59, -1
  br label %.preheader.prol.loopexit

.preheader.prol.loopexit:                         ; preds = %.preheader.prol, %.preheader.preheader
  %.lcssa.unr = phi double [ poison, %.preheader.preheader ], [ %64, %.preheader.prol ]
  %.158.unr = phi i64 [ %.057, %.preheader.preheader ], [ %65, %.preheader.prol ]
  %.156.unr = phi i64 [ %.055, %.preheader.preheader ], [ %66, %.preheader.prol ]
  %.054.unr = phi double [ 0.000000e+00, %.preheader.preheader ], [ %64, %.preheader.prol ]
  %.0.unr = phi i64 [ %59, %.preheader.preheader ], [ %67, %.preheader.prol ]
  %68 = icmp eq i64 %59, 1
  br i1 %68, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %.preheader.prol.loopexit, %.preheader
  %.158 = phi i64 [ %79, %.preheader ], [ %.158.unr, %.preheader.prol.loopexit ]
  %.156 = phi i64 [ %80, %.preheader ], [ %.156.unr, %.preheader.prol.loopexit ]
  %.054 = phi double [ %78, %.preheader ], [ %.054.unr, %.preheader.prol.loopexit ]
  %.0 = phi i64 [ %81, %.preheader ], [ %.0.unr, %.preheader.prol.loopexit ]
  %69 = getelementptr inbounds double, ptr %28, i64 %.158
  %70 = load double, ptr %69, align 8, !tbaa !22
  %71 = getelementptr inbounds double, ptr %2, i64 %.156
  %72 = load double, ptr %71, align 8, !tbaa !22
  %73 = call double @llvm.fmuladd.f64(double %70, double %72, double %.054)
  %74 = add i64 %.158, %30
  %75 = getelementptr inbounds double, ptr %28, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !22
  %gep = getelementptr double, ptr %invariant.gep, i64 %.156
  %77 = load double, ptr %gep, align 8, !tbaa !22
  %78 = call double @llvm.fmuladd.f64(double %76, double %77, double %73)
  %79 = add i64 %74, %30
  %80 = add i64 %.156, -2
  %81 = add i64 %.0, -2
  %.not73.1 = icmp eq i64 %81, 0
  br i1 %.not73.1, label %.loopexit, label %.preheader, !llvm.loop !24

.loopexit:                                        ; preds = %.preheader.prol.loopexit, %.preheader, %56
  %.1 = phi double [ 0.000000e+00, %56 ], [ %.lcssa.unr, %.preheader.prol.loopexit ], [ %78, %.preheader ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %82

82:                                               ; preds = %.loopexit, %35
  %.2 = phi double [ %.1, %.loopexit ], [ 0.000000e+00, %35 ]
  %83 = getelementptr inbounds double, ptr %.053, i64 %indvars.iv
  store double %.2, ptr %83, align 8, !tbaa !22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %34, label %35, !llvm.loop !26

84:                                               ; preds = %34
  %85 = invoke noundef ptr @_ZSt6copy_nIPdjS0_ET1_T_T0_S1_(ptr noundef nonnull %.053, i32 noundef %3, ptr noundef %4)
          to label %88 unwind label %86

86:                                               ; preds = %84
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %90

88:                                               ; preds = %84, %34
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %89

89:                                               ; preds = %5, %88
  ret void

90:                                               ; preds = %86, %17
  %.pn = phi { ptr, i32 } [ %87, %86 ], [ %18, %17 ]
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  resume { ptr, i32 } %.pn
}

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6copy_nIPdjS0_ET1_T_T0_S1_(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { inlinehint 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 #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 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!6 = !{!7, !8, i64 0}
!7 = !{!"_ZTS15PPhaseResampler", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !11, i64 16}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSSt6vectorIdSaIdEE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!7, !8, i64 4}
!17 = !{!7, !8, i64 8}
!18 = !{!7, !8, i64 12}
!19 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!20 = !{!21, !21, i64 0}
!21 = !{!"long", !9, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !9, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}


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