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

; 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::FreeverbImpl::Revmodel" = type { float, float, float, float, float, float, float, float, float, float, float, i32, [8 x %"class.SoLoud::FreeverbImpl::Comb"], [8 x %"class.SoLoud::FreeverbImpl::Comb"], [4 x %"class.SoLoud::FreeverbImpl::Allpass"], [4 x %"class.SoLoud::FreeverbImpl::Allpass"], [1116 x float], [1139 x float], [1188 x float], [1211 x float], [1277 x float], [1300 x float], [1356 x float], [1379 x float], [1422 x float], [1445 x float], [1491 x float], [1514 x float], [1557 x float], [1580 x float], [1617 x float], [1640 x float], [556 x float], [579 x float], [441 x float], [464 x float], [341 x float], [364 x float], [225 x float], [248 x float] }
%"class.SoLoud::FreeverbImpl::Comb" = type { float, float, float, float, ptr, i32, i32 }
%"class.SoLoud::FreeverbImpl::Allpass" = type { float, ptr, i32, i32 }

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN6SoLoud12FreeverbImpl8Revmodel4muteEv(ptr noundef nonnull align 8 dereferenceable(102552) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %5 = load ptr, ptr %2, align 8
  %6 = getelementptr inbounds %"class.SoLoud::FreeverbImpl::Revmodel", ptr %5, i32 0, i32 10
  %7 = load float, ptr %6, align 8, !tbaa !9
  %8 = fcmp oge float %7, 5.000000e-01
  br i1 %8, label %9, label %10

9:                                                ; preds = %1
  br label %44

10:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #2
  store i32 0, ptr %3, align 4, !tbaa !13
  br label %11

11:                                               ; preds = %24, %10
  %12 = load i32, ptr %3, align 4, !tbaa !13
  %13 = icmp slt i32 %12, 8
  br i1 %13, label %15, label %14

14:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #2
  br label %27

15:                                               ; preds = %11
  %16 = getelementptr inbounds %"class.SoLoud::FreeverbImpl::Revmodel", ptr %5, i32 0, i32 12
  %17 = load i32, ptr %3, align 4, !tbaa !13
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [8 x %"class.SoLoud::FreeverbImpl::Comb"], ptr %16, i64 0, i64 %18
  call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %19)
  %20 = getelementptr inbounds %"class.SoLoud::FreeverbImpl::Revmodel", ptr %5, i32 0, i32 13
  %21 = load i32, ptr %3, align 4, !tbaa !13
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [8 x %"class.SoLoud::FreeverbImpl::Comb"], ptr %20, i64 0, i64 %22
  call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %23)
  br label %24

24:                                               ; preds = %15
  %25 = load i32, ptr %3, align 4, !tbaa !13
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %3, align 4, !tbaa !13
  br label %11, !llvm.loop !14

27:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #2
  store i32 0, ptr %4, align 4, !tbaa !13
  br label %28

28:                                               ; preds = %41, %27
  %29 = load i32, ptr %4, align 4, !tbaa !13
  %30 = icmp slt i32 %29, 4
  br i1 %30, label %32, label %31

31:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #2
  br label %44

32:                                               ; preds = %28
  %33 = getelementptr inbounds %"class.SoLoud::FreeverbImpl::Revmodel", ptr %5, i32 0, i32 14
  %34 = load i32, ptr %4, align 4, !tbaa !13
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [4 x %"class.SoLoud::FreeverbImpl::Allpass"], ptr %33, i64 0, i64 %35
  call void @_ZN6SoLoud12FreeverbImpl7Allpass4muteEv(ptr noundef nonnull align 8 dereferenceable(24) %36)
  %37 = getelementptr inbounds %"class.SoLoud::FreeverbImpl::Revmodel", ptr %5, i32 0, i32 15
  %38 = load i32, ptr %4, align 4, !tbaa !13
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [4 x %"class.SoLoud::FreeverbImpl::Allpass"], ptr %37, i64 0, i64 %39
  call void @_ZN6SoLoud12FreeverbImpl7Allpass4muteEv(ptr noundef nonnull align 8 dereferenceable(24) %40)
  br label %41

41:                                               ; preds = %32
  %42 = load i32, ptr %4, align 4, !tbaa !13
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %4, align 4, !tbaa !13
  br label %28, !llvm.loop !16

44:                                               ; preds = %31, %9
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !11, i64 40}
!10 = !{!"_ZTSN6SoLoud12FreeverbImpl8RevmodelE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !12, i64 44, !7, i64 48, !7, i64 304, !7, i64 560, !7, i64 656, !7, i64 752, !7, i64 5216, !7, i64 9772, !7, i64 14524, !7, i64 19368, !7, i64 24476, !7, i64 29676, !7, i64 35100, !7, i64 40616, !7, i64 46304, !7, i64 52084, !7, i64 58048, !7, i64 64104, !7, i64 70332, !7, i64 76652, !7, i64 83120, !7, i64 89680, !7, i64 91904, !7, i64 94220, !7, i64 95984, !7, i64 97840, !7, i64 99204, !7, i64 100660, !7, i64 101560}
!11 = !{!"float", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; 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 void @_ZN6SoLoud12FreeverbImpl7Allpass4muteEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN6SoLoud12FreeverbImpl8Revmodel4muteEv(ptr noundef nonnull align 8 dereferenceable(102552) %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 40
  %3 = load float, ptr %2, align 8, !tbaa !5
  %4 = fcmp ult float %3, 5.000000e-01
  br i1 %4, label %.preheader9, label %.loopexit

.preheader9:                                      ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 48
  %6 = getelementptr inbounds i8, ptr %0, i64 304
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  %7 = getelementptr inbounds i8, ptr %0, i64 80
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
  %8 = getelementptr inbounds i8, ptr %0, i64 336
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %8)
  %9 = getelementptr inbounds i8, ptr %0, i64 112
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %9)
  %10 = getelementptr inbounds i8, ptr %0, i64 368
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
  %11 = getelementptr inbounds i8, ptr %0, i64 144
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %11)
  %12 = getelementptr inbounds i8, ptr %0, i64 400
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %12)
  %13 = getelementptr inbounds i8, ptr %0, i64 176
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
  %14 = getelementptr inbounds i8, ptr %0, i64 432
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %14)
  %15 = getelementptr inbounds i8, ptr %0, i64 208
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %15)
  %16 = getelementptr inbounds i8, ptr %0, i64 464
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %16)
  %17 = getelementptr inbounds i8, ptr %0, i64 240
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %17)
  %18 = getelementptr inbounds i8, ptr %0, i64 496
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
  %19 = getelementptr inbounds i8, ptr %0, i64 272
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %19)
  %20 = getelementptr inbounds i8, ptr %0, i64 528
  tail call void @_ZN6SoLoud12FreeverbImpl4Comb4muteEv(ptr noundef nonnull align 8 dereferenceable(32) %20)
  %21 = getelementptr inbounds i8, ptr %0, i64 560
  %22 = getelementptr inbounds i8, ptr %0, i64 656
  tail call void @_ZN6SoLoud12FreeverbImpl7Allpass4muteEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
  tail call void @_ZN6SoLoud12FreeverbImpl7Allpass4muteEv(ptr noundef nonnull align 8 dereferenceable(24) %22)
  %23 = getelementptr inbounds i8, ptr %0, i64 584
  tail call void @_ZN6SoLoud12FreeverbImpl7Allpass4muteEv(ptr noundef nonnull align 8 dereferenceable(24) %23)
  %24 = getelementptr inbounds i8, ptr %0, i64 680
  tail call void @_ZN6SoLoud12FreeverbImpl7Allpass4muteEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
  %25 = getelementptr inbounds i8, ptr %0, i64 608
  tail call void @_ZN6SoLoud12FreeverbImpl7Allpass4muteEv(ptr noundef nonnull align 8 dereferenceable(24) %25)
  %26 = getelementptr inbounds i8, ptr %0, i64 704
  tail call void @_ZN6SoLoud12FreeverbImpl7Allpass4muteEv(ptr noundef nonnull align 8 dereferenceable(24) %26)
  %27 = getelementptr inbounds i8, ptr %0, i64 632
  tail call void @_ZN6SoLoud12FreeverbImpl7Allpass4muteEv(ptr noundef nonnull align 8 dereferenceable(24) %27)
  %28 = getelementptr inbounds i8, ptr %0, i64 728
  tail call void @_ZN6SoLoud12FreeverbImpl7Allpass4muteEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader9, %1
  ret void
}

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

!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, !7, i64 40}
!6 = !{!"_ZTSN6SoLoud12FreeverbImpl8RevmodelE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !10, i64 44, !8, i64 48, !8, i64 304, !8, i64 560, !8, i64 656, !8, i64 752, !8, i64 5216, !8, i64 9772, !8, i64 14524, !8, i64 19368, !8, i64 24476, !8, i64 29676, !8, i64 35100, !8, i64 40616, !8, i64 46304, !8, i64 52084, !8, i64 58048, !8, i64 64104, !8, i64 70332, !8, i64 76652, !8, i64 83120, !8, i64 89680, !8, i64 91904, !8, i64 94220, !8, i64 95984, !8, i64 97840, !8, i64 99204, !8, i64 100660, !8, i64 101560}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass