; LLVM IR from TobiasKozel/VAE :: external/portaudio/qa/loopback/src (audio_analyzer)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.PaQaRecording_s = type { i32, ptr, i32, i32 }
%struct.BiquadFilter_s = type { double, double, double, double, double, double, double, double, double, double, double, double }
%struct.PaQaAnalysisResult_s = type { i32, double, double, double, double, double, double, double, double }
%struct.PaQaTestTone_s = type { i32, i32, double, double, double }

@.str.1 = external hidden unnamed_addr constant [101 x i8], align 1
@g_testsFailed = external global i32, align 4
@g_testsPassed = external global i32, align 4
@.str.11 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [32 x i8], align 1

; 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: nounwind uwtable
declare dso_local i32 @PaQa_InitializeRecording(ptr noundef, i32 noundef, i32 noundef) #1

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
declare dso_local void @PaQa_TerminateRecording(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @PaQa_FilterRecording(ptr noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @PaQa_FadeInRecording(ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @PaQa_DetectPop(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  %12 = alloca %struct.PaQaRecording_s, align 8
  %13 = alloca %struct.BiquadFilter_s, align 8
  %14 = alloca %struct.PaQaRecording_s, align 8
  %15 = alloca %struct.BiquadFilter_s, align 8
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 96, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #5
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 96, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.PaQaRecording_s, ptr %20, i32 0, i32 3
  %22 = load i32, ptr %21, align 4, !tbaa !11
  store i32 %22, ptr %16, align 4, !tbaa !9
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %23, i32 0, i32 4
  store double -1.000000e+00, ptr %24, align 8, !tbaa !13
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %25, i32 0, i32 3
  store double 0.000000e+00, ptr %26, align 8, !tbaa !16
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.PaQaRecording_s, ptr %27, i32 0, i32 2
  %29 = load i32, ptr %28, align 8, !tbaa !17
  %30 = load i32, ptr %16, align 4, !tbaa !9
  %31 = call i32 @PaQa_InitializeRecording(ptr noundef %12, i32 noundef %29, i32 noundef %30)
  store i32 %31, ptr %8, align 4, !tbaa !9
  %32 = load i32, ptr %8, align 4, !tbaa !9
  %33 = icmp ne i32 0, %32
  br i1 %33, label %34, label %39

34:                                               ; preds = %3
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 560, ptr noundef @.str.12, i32 noundef 0, i32 noundef %35)
  %37 = load i32, ptr @g_testsFailed, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr @g_testsFailed, align 4, !tbaa !9
  br label %121

39:                                               ; preds = %3
  %40 = load i32, ptr @g_testsPassed, align 4, !tbaa !9
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr @g_testsPassed, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %39
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.PaQaRecording_s, ptr %43, i32 0, i32 2
  %45 = load i32, ptr %44, align 8, !tbaa !17
  %46 = load i32, ptr %16, align 4, !tbaa !9
  %47 = call i32 @PaQa_InitializeRecording(ptr noundef %14, i32 noundef %45, i32 noundef %46)
  store i32 %47, ptr %8, align 4, !tbaa !9
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = icmp ne i32 0, %48
  br i1 %49, label %50, label %55

50:                                               ; preds = %42
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 563, ptr noundef @.str.12, i32 noundef 0, i32 noundef %51)
  %53 = load i32, ptr @g_testsFailed, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr @g_testsFailed, align 4, !tbaa !9
  br label %121

55:                                               ; preds = %42
  %56 = load i32, ptr @g_testsPassed, align 4, !tbaa !9
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr @g_testsPassed, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %55
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.PaQaTestTone_s, ptr %59, i32 0, i32 3
  %61 = load double, ptr %60, align 8, !tbaa !18
  %62 = load i32, ptr %16, align 4, !tbaa !9
  %63 = sitofp i32 %62 to double
  %64 = fdiv double %61, %63
  call void @BiquadFilter_SetupNotch(ptr noundef %13, double noundef %64, double noundef 5.000000e-01)
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  call void @PaQa_FilterRecording(ptr noundef %65, ptr noundef %12, ptr noundef %13)
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %66, i32 0, i32 1
  %68 = load double, ptr %67, align 8, !tbaa !20
  %69 = fptosi double %68 to i32
  call void @PaQa_FadeInRecording(ptr noundef %12, i32 noundef %69, i32 noundef 500)
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.PaQaTestTone_s, ptr %70, i32 0, i32 3
  %72 = load double, ptr %71, align 8, !tbaa !18
  %73 = fmul double 2.000000e+00, %72
  %74 = load i32, ptr %16, align 4, !tbaa !9
  %75 = sitofp i32 %74 to double
  %76 = fdiv double %73, %75
  call void @BiquadFilter_SetupHighPass(ptr noundef %15, double noundef %76, double noundef 5.000000e-01)
  call void @PaQa_FilterRecording(ptr noundef %12, ptr noundef %14, ptr noundef %15)
  store double 0.000000e+00, ptr %10, align 8, !tbaa !21
  store i32 -1, ptr %11, align 4, !tbaa !9
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %77, i32 0, i32 1
  %79 = load double, ptr %78, align 8, !tbaa !20
  %80 = fptosi double %79 to i32
  store i32 %80, ptr %9, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %106, %58
  %82 = load i32, ptr %9, align 4, !tbaa !9
  %83 = getelementptr inbounds %struct.PaQaRecording_s, ptr %14, i32 0, i32 2
  %84 = load i32, ptr %83, align 8, !tbaa !17
  %85 = icmp slt i32 %82, %84
  br i1 %85, label %86, label %109

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %87 = getelementptr inbounds %struct.PaQaRecording_s, ptr %14, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !22
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds float, ptr %88, i64 %90
  %92 = load float, ptr %91, align 4, !tbaa !23
  store float %92, ptr %17, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %93 = load float, ptr %17, align 4, !tbaa !23
  %94 = fpext float %93 to double
  %95 = call double @llvm.fabs.f64(double %94)
  %96 = fptrunc double %95 to float
  store float %96, ptr %18, align 4, !tbaa !23
  %97 = load float, ptr %18, align 4, !tbaa !23
  %98 = fpext float %97 to double
  %99 = load double, ptr %10, align 8, !tbaa !21
  %100 = fcmp ogt double %98, %99
  br i1 %100, label %101, label %105

101:                                              ; preds = %86
  %102 = load float, ptr %18, align 4, !tbaa !23
  %103 = fpext float %102 to double
  store double %103, ptr %10, align 8, !tbaa !21
  %104 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %104, ptr %11, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %101, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %9, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %9, align 4, !tbaa !9
  br label %81, !llvm.loop !25

109:                                              ; preds = %81
  %110 = load double, ptr %10, align 8, !tbaa !21
  %111 = fcmp ogt double %110, 4.000000e-02
  br i1 %111, label %112, label %120

112:                                              ; preds = %109
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = sitofp i32 %113 to double
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %115, i32 0, i32 4
  store double %114, ptr %116, align 8, !tbaa !13
  %117 = load double, ptr %10, align 8, !tbaa !21
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %118, i32 0, i32 3
  store double %117, ptr %119, align 8, !tbaa !16
  br label %120

120:                                              ; preds = %112, %109
  call void @PaQa_TerminateRecording(ptr noundef %12)
  call void @PaQa_TerminateRecording(ptr noundef %14)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %19, align 4
  br label %122

121:                                              ; preds = %50, %34
  call void @PaQa_TerminateRecording(ptr noundef %12)
  call void @PaQa_TerminateRecording(ptr noundef %14)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %19, align 4
  br label %122

122:                                              ; preds = %121, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 96, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 96, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %123 = load i32, ptr %4, align 4
  ret i32 %123
}

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

declare void @BiquadFilter_SetupNotch(ptr noundef, double noundef, double noundef) #2

declare void @BiquadFilter_SetupHighPass(ptr noundef, double noundef, double noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 20}
!12 = !{!"PaQaRecording_s", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20}
!13 = !{!14, !15, i64 32}
!14 = !{!"PaQaAnalysisResult_s", !10, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64}
!15 = !{!"double", !7, i64 0}
!16 = !{!14, !15, i64 24}
!17 = !{!12, !10, i64 16}
!18 = !{!19, !15, i64 16}
!19 = !{!"PaQaTestTone_s", !10, i64 0, !10, i64 4, !15, i64 8, !15, i64 16, !15, i64 24}
!20 = !{!14, !15, i64 8}
!21 = !{!15, !15, i64 0}
!22 = !{!12, !6, i64 8}
!23 = !{!24, !24, i64 0}
!24 = !{!"float", !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


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

%struct.PaQaRecording_s = type { i32, ptr, i32, i32 }
%struct.BiquadFilter_s = type { double, double, double, double, double, double, double, double, double, double, double, double }

@.str.1 = external hidden unnamed_addr constant [101 x i8], align 1
@g_testsFailed = external local_unnamed_addr global i32, align 4
@g_testsPassed = external local_unnamed_addr global i32, align 4
@.str.11 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [32 x i8], align 1

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @PaQa_InitializeRecording(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @PaQa_TerminateRecording(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @PaQa_FilterRecording(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @PaQa_FadeInRecording(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @PaQa_DetectPop(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef %2) local_unnamed_addr #1 {
  %4 = alloca %struct.PaQaRecording_s, align 8
  %5 = alloca %struct.BiquadFilter_s, align 8
  %6 = alloca %struct.PaQaRecording_s, align 8
  %7 = alloca %struct.BiquadFilter_s, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %4, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %7) #6
  %8 = getelementptr inbounds i8, ptr %0, i64 20
  %9 = load i32, ptr %8, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %2, i64 32
  %11 = getelementptr inbounds i8, ptr %2, i64 24
  store <2 x double> <double 0.000000e+00, double -1.000000e+00>, ptr %11, align 8, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load i32, ptr %12, align 8, !tbaa !13
  %14 = call i32 @PaQa_InitializeRecording(ptr noundef nonnull %4, i32 noundef %13, i32 noundef %9)
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %17, label %15

15:                                               ; preds = %3
  %16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.1, i32 noundef 560, ptr noundef nonnull @.str.12, i32 noundef 0, i32 noundef %14)
  br label %70

17:                                               ; preds = %3
  %18 = load i32, ptr @g_testsPassed, align 4, !tbaa !14
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr @g_testsPassed, align 4, !tbaa !14
  %20 = load i32, ptr %12, align 8, !tbaa !13
  %21 = call i32 @PaQa_InitializeRecording(ptr noundef nonnull %6, i32 noundef %20, i32 noundef %9)
  %.not38 = icmp eq i32 %21, 0
  br i1 %.not38, label %24, label %22

22:                                               ; preds = %17
  %23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.1, i32 noundef 563, ptr noundef nonnull @.str.12, i32 noundef 0, i32 noundef %21)
  br label %70

24:                                               ; preds = %17
  %25 = load i32, ptr @g_testsPassed, align 4, !tbaa !14
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr @g_testsPassed, align 4, !tbaa !14
  %27 = getelementptr inbounds i8, ptr %1, i64 16
  %28 = load double, ptr %27, align 8, !tbaa !15
  %29 = sitofp i32 %9 to double
  %30 = fdiv double %28, %29
  call void @BiquadFilter_SetupNotch(ptr noundef nonnull %5, double noundef %30, double noundef 5.000000e-01) #6
  call void @PaQa_FilterRecording(ptr noundef nonnull %0, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %31 = getelementptr inbounds i8, ptr %2, i64 8
  %32 = load double, ptr %31, align 8, !tbaa !17
  %33 = fptosi double %32 to i32
  call void @PaQa_FadeInRecording(ptr noundef nonnull %4, i32 noundef %33, i32 noundef 500)
  %34 = load double, ptr %27, align 8, !tbaa !15
  %35 = fmul double %34, 2.000000e+00
  %36 = fdiv double %35, %29
  call void @BiquadFilter_SetupHighPass(ptr noundef nonnull %7, double noundef %36, double noundef 5.000000e-01) #6
  call void @PaQa_FilterRecording(ptr noundef nonnull %4, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %37 = load double, ptr %31, align 8, !tbaa !17
  %38 = fptosi double %37 to i32
  %39 = getelementptr inbounds i8, ptr %6, i64 16
  %40 = load i32, ptr %39, align 8, !tbaa !13
  %41 = icmp sgt i32 %40, %38
  br i1 %41, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %24
  %42 = getelementptr inbounds i8, ptr %6, i64 8
  %43 = load ptr, ptr %42, align 8, !tbaa !19
  %44 = sext i32 %38 to i64
  %wide.trip.count = sext i32 %40 to i64
  %45 = sub nsw i64 %wide.trip.count, %44
  %xtraiter = and i64 %45, 1
  %46 = add nsw i64 %wide.trip.count, -1
  %47 = icmp eq i64 %46, %44
  br i1 %47, label %._crit_edge.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %45, -2
  br label %48

48:                                               ; preds = %48, %.lr.ph.new
  %indvars.iv = phi i64 [ %44, %.lr.ph.new ], [ %indvars.iv.next.1, %48 ]
  %.03240 = phi i32 [ -1, %.lr.ph.new ], [ %.1.1, %48 ]
  %.03339 = phi double [ 0.000000e+00, %.lr.ph.new ], [ %.134.1, %48 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %48 ]
  %49 = getelementptr inbounds float, ptr %43, i64 %indvars.iv
  %50 = load float, ptr %49, align 4, !tbaa !20
  %51 = call float @llvm.fabs.f32(float %50)
  %52 = fpext float %51 to double
  %53 = fcmp olt double %.03339, %52
  %.134 = select i1 %53, double %52, double %.03339
  %54 = trunc nsw i64 %indvars.iv to i32
  %.1 = select i1 %53, i32 %54, i32 %.03240
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %55 = getelementptr inbounds float, ptr %43, i64 %indvars.iv.next
  %56 = load float, ptr %55, align 4, !tbaa !20
  %57 = call float @llvm.fabs.f32(float %56)
  %58 = fpext float %57 to double
  %59 = fcmp olt double %.134, %58
  %.134.1 = select i1 %59, double %58, double %.134
  %60 = trunc nsw i64 %indvars.iv.next to i32
  %.1.1 = select i1 %59, i32 %60, i32 %.1
  %indvars.iv.next.1 = add nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.unr-lcssa, label %48, !llvm.loop !22

._crit_edge.unr-lcssa:                            ; preds = %48, %.lr.ph
  %.134.lcssa.ph = phi double [ poison, %.lr.ph ], [ %.134.1, %48 ]
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph ], [ %.1.1, %48 ]
  %indvars.iv.unr = phi i64 [ %44, %.lr.ph ], [ %indvars.iv.next.1, %48 ]
  %.03240.unr = phi i32 [ -1, %.lr.ph ], [ %.1.1, %48 ]
  %.03339.unr = phi double [ 0.000000e+00, %.lr.ph ], [ %.134.1, %48 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.epilog-lcssa

._crit_edge.epilog-lcssa:                         ; preds = %._crit_edge.unr-lcssa
  %61 = getelementptr inbounds float, ptr %43, i64 %indvars.iv.unr
  %62 = load float, ptr %61, align 4, !tbaa !20
  %63 = call float @llvm.fabs.f32(float %62)
  %64 = fpext float %63 to double
  %65 = fcmp olt double %.03339.unr, %64
  %.134.epil = select i1 %65, double %64, double %.03339.unr
  %66 = trunc nsw i64 %indvars.iv.unr to i32
  %.1.epil = select i1 %65, i32 %66, i32 %.03240.unr
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %._crit_edge.epilog-lcssa
  %.134.lcssa = phi double [ %.134.lcssa.ph, %._crit_edge.unr-lcssa ], [ %.134.epil, %._crit_edge.epilog-lcssa ]
  %.1.lcssa = phi i32 [ %.1.lcssa.ph, %._crit_edge.unr-lcssa ], [ %.1.epil, %._crit_edge.epilog-lcssa ]
  %67 = fcmp ogt double %.134.lcssa, 4.000000e-02
  br i1 %67, label %68, label %._crit_edge.thread

68:                                               ; preds = %._crit_edge
  %69 = sitofp i32 %.1.lcssa to double
  store double %69, ptr %10, align 8, !tbaa !24
  store double %.134.lcssa, ptr %11, align 8, !tbaa !25
  br label %._crit_edge.thread

70:                                               ; preds = %22, %15
  %storemerge.in = load i32, ptr @g_testsFailed, align 4, !tbaa !14
  %storemerge = add nsw i32 %storemerge.in, 1
  store i32 %storemerge, ptr @g_testsFailed, align 4, !tbaa !14
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %._crit_edge, %68, %24, %70
  %.0 = phi i32 [ -1, %70 ], [ 0, %24 ], [ 0, %68 ], [ 0, %._crit_edge ]
  call void @PaQa_TerminateRecording(ptr noundef nonnull %4)
  call void @PaQa_TerminateRecording(ptr noundef nonnull %6)
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  ret i32 %.0
}

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

declare void @BiquadFilter_SetupNotch(ptr noundef, double noundef, double noundef) local_unnamed_addr #4

declare void @BiquadFilter_SetupHighPass(ptr noundef, double noundef, double noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nofree 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { "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 = { 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, !7, i64 20}
!6 = !{!"PaQaRecording_s", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 20}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!6, !7, i64 16}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !12, i64 16}
!16 = !{!"PaQaTestTone_s", !7, i64 0, !7, i64 4, !12, i64 8, !12, i64 16, !12, i64 24}
!17 = !{!18, !12, i64 8}
!18 = !{!"PaQaAnalysisResult_s", !7, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64}
!19 = !{!6, !10, i64 8}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !8, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!18, !12, i64 32}
!25 = !{!18, !12, i64 24}


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