; LLVM IR from Overload-Technologies/Overload :: Dependencies/soloud/src/filter (soloud_flangerfilter)

; 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.SoLoud::FlangerFilterInstance" = type { %"class.SoLoud::FilterInstance", ptr, i32, ptr, i32, double }
%"class.SoLoud::FilterInstance" = type { ptr, i32, i32, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6SoLoud21FlangerFilterInstance6filterEPfjjjfd(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, float noundef %5, double noundef %6) unnamed_addr #0 align 2 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca float, align 4
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca double, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca float, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store float %5, ptr %13, align 4, !tbaa !11
  store double %6, ptr %14, align 8, !tbaa !13
  %23 = load ptr, ptr %8, align 8
  %24 = load double, ptr %14, align 8, !tbaa !13
  %25 = load ptr, ptr %23, align 8, !tbaa !15
  %26 = getelementptr inbounds ptr, ptr %25, i64 1
  %27 = load ptr, ptr %26, align 8
  call void %27(ptr noundef nonnull align 8 dereferenceable(32) %23, double noundef %24)
  %28 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 2
  %29 = load i32, ptr %28, align 8, !tbaa !17
  %30 = uitofp i32 %29 to float
  %31 = getelementptr inbounds %"class.SoLoud::FilterInstance", ptr %23, i32 0, i32 3
  %32 = load ptr, ptr %31, align 8, !tbaa !20
  %33 = getelementptr inbounds float, ptr %32, i64 1
  %34 = load float, ptr %33, align 4, !tbaa !11
  %35 = load float, ptr %13, align 4, !tbaa !11
  %36 = fmul float %34, %35
  %37 = fcmp olt float %30, %36
  br i1 %37, label %38, label %79

38:                                               ; preds = %7
  %39 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 1
  %40 = load ptr, ptr %39, align 8, !tbaa !21
  %41 = icmp eq ptr %40, null
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  call void @_ZdaPv(ptr noundef %40) #8
  br label %43

43:                                               ; preds = %42, %38
  %44 = getelementptr inbounds %"class.SoLoud::FilterInstance", ptr %23, i32 0, i32 3
  %45 = load ptr, ptr %44, align 8, !tbaa !20
  %46 = getelementptr inbounds float, ptr %45, i64 1
  %47 = load float, ptr %46, align 4, !tbaa !11
  %48 = load float, ptr %13, align 4, !tbaa !11
  %49 = fmul float %47, %48
  %50 = call noundef float @_ZSt4ceilf(float noundef %49)
  %51 = fptosi float %50 to i32
  %52 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 2
  store i32 %51, ptr %52, align 8, !tbaa !17
  %53 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 2
  %54 = load i32, ptr %53, align 8, !tbaa !17
  %55 = load i32, ptr %12, align 4, !tbaa !9
  %56 = mul i32 %54, %55
  %57 = zext i32 %56 to i64
  %58 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %57, i64 4)
  %59 = extractvalue { i64, i1 } %58, 1
  %60 = extractvalue { i64, i1 } %58, 0
  %61 = select i1 %59, i64 -1, i64 %60
  %62 = call noalias noundef nonnull ptr @_Znam(i64 noundef %61) #9
  %63 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 1
  store ptr %62, ptr %63, align 8, !tbaa !21
  %64 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !21
  %66 = icmp eq ptr %65, null
  br i1 %66, label %67, label %69

67:                                               ; preds = %43
  %68 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 2
  store i32 0, ptr %68, align 8, !tbaa !17
  br label %212

69:                                               ; preds = %43
  %70 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 1
  %71 = load ptr, ptr %70, align 8, !tbaa !21
  %72 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 2
  %73 = load i32, ptr %72, align 8, !tbaa !17
  %74 = zext i32 %73 to i64
  %75 = mul i64 4, %74
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = mul i64 %75, %77
  call void @llvm.memset.p0.i64(ptr align 4 %71, i8 0, i64 %78, i1 false)
  br label %79

79:                                               ; preds = %69, %7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  %80 = getelementptr inbounds %"class.SoLoud::FilterInstance", ptr %23, i32 0, i32 3
  %81 = load ptr, ptr %80, align 8, !tbaa !20
  %82 = getelementptr inbounds float, ptr %81, i64 1
  %83 = load float, ptr %82, align 4, !tbaa !11
  %84 = load float, ptr %13, align 4, !tbaa !11
  %85 = fmul float %83, %84
  %86 = call noundef float @_ZSt4ceilf(float noundef %85)
  %87 = fptosi float %86 to i32
  store i32 %87, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %88 = getelementptr inbounds %"class.SoLoud::FilterInstance", ptr %23, i32 0, i32 3
  %89 = load ptr, ptr %88, align 8, !tbaa !20
  %90 = getelementptr inbounds float, ptr %89, i64 2
  %91 = load float, ptr %90, align 4, !tbaa !11
  %92 = fpext float %91 to double
  %93 = fmul double %92, 0x400921FB54442D18
  %94 = fmul double %93, 2.000000e+00
  %95 = load float, ptr %13, align 4, !tbaa !11
  %96 = fpext float %95 to double
  %97 = fdiv double %94, %96
  store double %97, ptr %18, align 8, !tbaa !13
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %199, %79
  %99 = load i32, ptr %15, align 4, !tbaa !9
  %100 = load i32, ptr %12, align 4, !tbaa !9
  %101 = icmp ult i32 %99, %100
  br i1 %101, label %102, label %202

102:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  %103 = load i32, ptr %15, align 4, !tbaa !9
  %104 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 2
  %105 = load i32, ptr %104, align 8, !tbaa !17
  %106 = mul i32 %103, %105
  store i32 %106, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #10
  %107 = load i32, ptr %15, align 4, !tbaa !9
  %108 = load i32, ptr %11, align 4, !tbaa !9
  %109 = mul i32 %107, %108
  store i32 %109, ptr %20, align 4, !tbaa !9
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %189, %102
  %111 = load i32, ptr %16, align 4, !tbaa !9
  %112 = load i32, ptr %10, align 4, !tbaa !9
  %113 = icmp ult i32 %111, %112
  br i1 %113, label %114, label %194

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  %115 = load i32, ptr %17, align 4, !tbaa !9
  %116 = sitofp i32 %115 to double
  %117 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 5
  %118 = load double, ptr %117, align 8, !tbaa !22
  %119 = call double @cos(double noundef %118) #10
  %120 = fadd double 1.000000e+00, %119
  %121 = fmul double %116, %120
  %122 = call double @llvm.floor.f64(double %121)
  %123 = fptosi double %122 to i32
  %124 = sdiv i32 %123, 2
  store i32 %124, ptr %21, align 4, !tbaa !9
  %125 = load double, ptr %18, align 8, !tbaa !13
  %126 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 5
  %127 = load double, ptr %126, align 8, !tbaa !22
  %128 = fadd double %127, %125
  store double %128, ptr %126, align 8, !tbaa !22
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = load i32, ptr %20, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds float, ptr %129, i64 %131
  %133 = load float, ptr %132, align 4, !tbaa !11
  %134 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !21
  %136 = load i32, ptr %19, align 4, !tbaa !9
  %137 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 4
  %138 = load i32, ptr %137, align 8, !tbaa !23
  %139 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 2
  %140 = load i32, ptr %139, align 8, !tbaa !17
  %141 = urem i32 %138, %140
  %142 = add i32 %136, %141
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds float, ptr %135, i64 %143
  store float %133, ptr %144, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = load i32, ptr %20, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds float, ptr %145, i64 %147
  %149 = load float, ptr %148, align 4, !tbaa !11
  %150 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 1
  %151 = load ptr, ptr %150, align 8, !tbaa !21
  %152 = load i32, ptr %19, align 4, !tbaa !9
  %153 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 2
  %154 = load i32, ptr %153, align 8, !tbaa !17
  %155 = load i32, ptr %21, align 4, !tbaa !9
  %156 = sub i32 %154, %155
  %157 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 4
  %158 = load i32, ptr %157, align 8, !tbaa !23
  %159 = add i32 %156, %158
  %160 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 2
  %161 = load i32, ptr %160, align 8, !tbaa !17
  %162 = urem i32 %159, %161
  %163 = add i32 %152, %162
  %164 = zext i32 %163 to i64
  %165 = getelementptr inbounds float, ptr %151, i64 %164
  %166 = load float, ptr %165, align 4, !tbaa !11
  %167 = fadd float %149, %166
  %168 = fmul float 5.000000e-01, %167
  store float %168, ptr %22, align 4, !tbaa !11
  %169 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 4
  %170 = load i32, ptr %169, align 8, !tbaa !23
  %171 = add i32 %170, 1
  store i32 %171, ptr %169, align 8, !tbaa !23
  %172 = load float, ptr %22, align 4, !tbaa !11
  %173 = load ptr, ptr %9, align 8, !tbaa !5
  %174 = load i32, ptr %20, align 4, !tbaa !9
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds float, ptr %173, i64 %175
  %177 = load float, ptr %176, align 4, !tbaa !11
  %178 = fsub float %172, %177
  %179 = getelementptr inbounds %"class.SoLoud::FilterInstance", ptr %23, i32 0, i32 3
  %180 = load ptr, ptr %179, align 8, !tbaa !20
  %181 = getelementptr inbounds float, ptr %180, i64 0
  %182 = load float, ptr %181, align 4, !tbaa !11
  %183 = load ptr, ptr %9, align 8, !tbaa !5
  %184 = load i32, ptr %20, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds float, ptr %183, i64 %185
  %187 = load float, ptr %186, align 4, !tbaa !11
  %188 = call float @llvm.fmuladd.f32(float %178, float %182, float %187)
  store float %188, ptr %186, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  br label %189

189:                                              ; preds = %114
  %190 = load i32, ptr %16, align 4, !tbaa !9
  %191 = add i32 %190, 1
  store i32 %191, ptr %16, align 4, !tbaa !9
  %192 = load i32, ptr %20, align 4, !tbaa !9
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %20, align 4, !tbaa !9
  br label %110, !llvm.loop !24

194:                                              ; preds = %110
  %195 = load i32, ptr %10, align 4, !tbaa !9
  %196 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 4
  %197 = load i32, ptr %196, align 8, !tbaa !23
  %198 = sub i32 %197, %195
  store i32 %198, ptr %196, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  br label %199

199:                                              ; preds = %194
  %200 = load i32, ptr %15, align 4, !tbaa !9
  %201 = add i32 %200, 1
  store i32 %201, ptr %15, align 4, !tbaa !9
  br label %98, !llvm.loop !26

202:                                              ; preds = %98
  %203 = load i32, ptr %10, align 4, !tbaa !9
  %204 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 4
  %205 = load i32, ptr %204, align 8, !tbaa !23
  %206 = add i32 %205, %203
  store i32 %206, ptr %204, align 8, !tbaa !23
  %207 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 2
  %208 = load i32, ptr %207, align 8, !tbaa !17
  %209 = getelementptr inbounds %"class.SoLoud::FlangerFilterInstance", ptr %23, i32 0, i32 4
  %210 = load i32, ptr %209, align 8, !tbaa !23
  %211 = urem i32 %210, %208
  store i32 %211, ptr %209, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  br label %212

212:                                              ; preds = %202, %67
  ret void
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4ceilf(float noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #3

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

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

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

; Function Attrs: nounwind
declare double @cos(double noundef) #7

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

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

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 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { builtin nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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 = !{!"float", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}
!17 = !{!18, !10, i64 40}
!18 = !{!"_ZTSN6SoLoud21FlangerFilterInstanceE", !19, i64 0, !6, i64 32, !10, i64 40, !6, i64 48, !10, i64 56, !14, i64 64}
!19 = !{!"_ZTSN6SoLoud14FilterInstanceE", !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24}
!20 = !{!19, !6, i64 16}
!21 = !{!18, !6, i64 32}
!22 = !{!18, !14, i64 64}
!23 = !{!18, !10, i64 56}
!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"

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6SoLoud21FlangerFilterInstance6filterEPfjjjfd(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr nocapture noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, float noundef %5, double noundef %6) unnamed_addr #0 align 2 {
  %8 = load ptr, ptr %0, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %8, i64 8
  %10 = load ptr, ptr %9, align 8
  tail call void %10(ptr noundef nonnull align 8 dereferenceable(32) %0, double noundef %6)
  %11 = getelementptr inbounds i8, ptr %0, i64 40
  %12 = load i32, ptr %11, align 8, !tbaa !8
  %13 = uitofp i32 %12 to float
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  %15 = load ptr, ptr %14, align 8, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %15, i64 4
  %17 = load float, ptr %16, align 4, !tbaa !16
  %18 = fmul float %17, %5
  %19 = fcmp ogt float %18, %13
  br i1 %19, label %20, label %36

20:                                               ; preds = %7
  %21 = getelementptr inbounds i8, ptr %0, i64 32
  %22 = load ptr, ptr %21, align 8, !tbaa !18
  %23 = icmp eq ptr %22, null
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  tail call void @_ZdaPv(ptr noundef nonnull %22) #7
  %.pre = load ptr, ptr %14, align 8, !tbaa !15
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.pre, i64 4
  %.pre48 = load float, ptr %.phi.trans.insert, align 4, !tbaa !16
  %.pre57 = fmul float %.pre48, %5
  br label %25

25:                                               ; preds = %24, %20
  %.pre-phi = phi float [ %.pre57, %24 ], [ %18, %20 ]
  %26 = tail call noundef float @_ZSt4ceilf(float noundef %.pre-phi)
  %27 = fptosi float %26 to i32
  store i32 %27, ptr %11, align 8, !tbaa !8
  %28 = mul i32 %27, %4
  %29 = zext i32 %28 to i64
  %30 = shl nuw nsw i64 %29, 2
  %31 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %30) #8
  store ptr %31, ptr %21, align 8, !tbaa !18
  %32 = zext i32 %27 to i64
  %33 = zext i32 %4 to i64
  %34 = shl nuw nsw i64 %33, 2
  %35 = mul i64 %34, %32
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 %31, i8 0, i64 %35, i1 false)
  %.pre49 = load ptr, ptr %14, align 8, !tbaa !15
  %.phi.trans.insert50 = getelementptr inbounds i8, ptr %.pre49, i64 4
  %.pre51 = load float, ptr %.phi.trans.insert50, align 4, !tbaa !16
  %.pre58 = fmul float %.pre51, %5
  br label %36

36:                                               ; preds = %25, %7
  %.pre-phi59 = phi float [ %.pre58, %25 ], [ %18, %7 ]
  %37 = tail call noundef float @_ZSt4ceilf(float noundef %.pre-phi59)
  %38 = load ptr, ptr %14, align 8, !tbaa !15
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = load float, ptr %39, align 4, !tbaa !16
  %41 = fpext float %40 to double
  %42 = fmul double %41, 0x400921FB54442D18
  %43 = fmul double %42, 2.000000e+00
  %44 = fpext float %5 to double
  %45 = fdiv double %43, %44
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %.._crit_edge42_crit_edge, label %.lr.ph41

.._crit_edge42_crit_edge:                         ; preds = %36
  %.phi.trans.insert54 = getelementptr inbounds i8, ptr %0, i64 56
  %.pre55 = load i32, ptr %.phi.trans.insert54, align 8, !tbaa !19
  br label %._crit_edge42

.lr.ph41:                                         ; preds = %36
  %46 = fptosi float %37 to i32
  %.not43 = icmp eq i32 %2, 0
  %47 = sitofp i32 %46 to double
  %48 = getelementptr inbounds i8, ptr %0, i64 64
  %49 = getelementptr inbounds i8, ptr %0, i64 32
  %50 = getelementptr inbounds i8, ptr %0, i64 56
  br i1 %.not43, label %.lr.ph41.split, label %.lr.ph.us.preheader

.lr.ph.us.preheader:                              ; preds = %.lr.ph41
  %.pre52 = load i32, ptr %11, align 8, !tbaa !8
  %.pre53.pre = load double, ptr %48, align 8, !tbaa !20
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %.pre53 = phi double [ %.pre53.pre, %.lr.ph.us.preheader ], [ %62, %._crit_edge.us ]
  %51 = phi i32 [ %.pre52, %.lr.ph.us.preheader ], [ %67, %._crit_edge.us ]
  %indvars.iv = phi i32 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next, %._crit_edge.us ]
  %.039.us = phi i32 [ 0, %.lr.ph.us.preheader ], [ %88, %._crit_edge.us ]
  %52 = sext i32 %indvars.iv to i64
  %53 = mul i32 %51, %.039.us
  br label %54

54:                                               ; preds = %.lr.ph.us, %54
  %55 = phi double [ %.pre53, %.lr.ph.us ], [ %62, %54 ]
  %indvars.iv44 = phi i64 [ %52, %.lr.ph.us ], [ %indvars.iv.next45, %54 ]
  %.03338.us = phi i32 [ 0, %.lr.ph.us ], [ %86, %54 ]
  %56 = tail call double @cos(double noundef %55) #9
  %57 = fadd double %56, 1.000000e+00
  %58 = fmul double %57, %47
  %59 = tail call double @llvm.floor.f64(double %58)
  %60 = fptosi double %59 to i32
  %.neg.us = sdiv i32 %60, -2
  %61 = load double, ptr %48, align 8, !tbaa !20
  %62 = fadd double %45, %61
  store double %62, ptr %48, align 8, !tbaa !20
  %63 = getelementptr inbounds float, ptr %1, i64 %indvars.iv44
  %64 = load float, ptr %63, align 4, !tbaa !16
  %65 = load ptr, ptr %49, align 8, !tbaa !18
  %66 = load i32, ptr %50, align 8, !tbaa !19
  %67 = load i32, ptr %11, align 8, !tbaa !8
  %68 = urem i32 %66, %67
  %69 = add i32 %68, %53
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds float, ptr %65, i64 %70
  store float %64, ptr %71, align 4, !tbaa !16
  %72 = add i32 %66, %.neg.us
  %73 = add i32 %72, %67
  %74 = urem i32 %73, %67
  %75 = add i32 %74, %53
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds float, ptr %65, i64 %76
  %78 = load float, ptr %77, align 4, !tbaa !16
  %79 = fadd float %64, %78
  %80 = fmul float %79, 5.000000e-01
  %81 = add i32 %66, 1
  store i32 %81, ptr %50, align 8, !tbaa !19
  %82 = fsub float %80, %64
  %83 = load ptr, ptr %14, align 8, !tbaa !15
  %84 = load float, ptr %83, align 4, !tbaa !16
  %85 = tail call float @llvm.fmuladd.f32(float %82, float %84, float %64)
  store float %85, ptr %63, align 4, !tbaa !16
  %86 = add nuw i32 %.03338.us, 1
  %indvars.iv.next45 = add nsw i64 %indvars.iv44, 1
  %exitcond.not = icmp eq i32 %86, %2
  br i1 %exitcond.not, label %._crit_edge.us, label %54, !llvm.loop !21

._crit_edge.us:                                   ; preds = %54
  %87 = sub i32 %81, %2
  store i32 %87, ptr %50, align 8, !tbaa !19
  %88 = add nuw i32 %.039.us, 1
  %indvars.iv.next = add i32 %indvars.iv, %3
  %exitcond47.not = icmp eq i32 %88, %4
  br i1 %exitcond47.not, label %._crit_edge42, label %.lr.ph.us, !llvm.loop !23

.lr.ph41.split:                                   ; preds = %.lr.ph41
  %.promoted = load i32, ptr %50, align 8, !tbaa !19
  br label %._crit_edge42

._crit_edge42:                                    ; preds = %._crit_edge.us, %.._crit_edge42_crit_edge, %.lr.ph41.split
  %89 = phi i32 [ %.pre55, %.._crit_edge42_crit_edge ], [ %.promoted, %.lr.ph41.split ], [ %87, %._crit_edge.us ]
  %90 = getelementptr inbounds i8, ptr %0, i64 56
  %91 = add i32 %89, %2
  %92 = load i32, ptr %11, align 8, !tbaa !8
  %93 = urem i32 %91, %92
  store i32 %93, ptr %90, align 8, !tbaa !19
  ret void
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4ceilf(float noundef) local_unnamed_addr #2

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

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


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