; 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.PaQaTestTone_s = type { i32, i32, double, double, double }
%struct.PaQaAnalysisResult_s = type { i32, double, double, double, double, double, double, double, double }
%struct.PaQaRecording_s = type { i32, 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: nounwind uwtable
declare dso_local double @PaQa_CorrelateSine(ptr noundef, double noundef, double noundef, i32 noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local double @PaQa_ComputePhaseDifference(double noundef, double noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @PaQa_DetectPhaseError(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.PaQaTestTone_s, ptr %27, i32 0, i32 2
  %29 = load double, ptr %28, align 8, !tbaa !9
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.PaQaTestTone_s, ptr %30, i32 0, i32 3
  %32 = load double, ptr %31, align 8, !tbaa !13
  %33 = fdiv double %29, %32
  store double %33, ptr %8, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #2
  %34 = load double, ptr %8, align 8, !tbaa !14
  %35 = fadd double %34, 5.000000e-01
  %36 = fptosi double %35 to i32
  store i32 %36, ptr %9, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  store double 0.000000e+00, ptr %10, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #2
  store double 0.000000e+00, ptr %11, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #2
  store double 0.000000e+00, ptr %12, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #2
  store double 0.000000e+00, ptr %13, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  store i32 0, ptr %14, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #2
  %37 = load i32, ptr %9, align 4, !tbaa !15
  store i32 %37, ptr %15, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #2
  %38 = load i32, ptr %9, align 4, !tbaa !15
  store i32 %38, ptr %16, align 4, !tbaa !15
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %39, i32 0, i32 5
  store double 0.000000e+00, ptr %40, align 8, !tbaa !16
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %41, i32 0, i32 7
  store double 0.000000e+00, ptr %42, align 8, !tbaa !18
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %43, i32 0, i32 6
  store double -1.000000e+00, ptr %44, align 8, !tbaa !19
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %45, i32 0, i32 8
  store double -1.000000e+00, ptr %46, align 8, !tbaa !20
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %47, i32 0, i32 1
  %49 = load double, ptr %48, align 8, !tbaa !21
  %50 = fptosi double %49 to i32
  store i32 %50, ptr %7, align 4, !tbaa !15
  br label %51

51:                                               ; preds = %150, %3
  %52 = load i32, ptr %7, align 4, !tbaa !15
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.PaQaRecording_s, ptr %53, i32 0, i32 2
  %55 = load i32, ptr %54, align 8, !tbaa !22
  %56 = load i32, ptr %16, align 4, !tbaa !15
  %57 = sub nsw i32 %55, %56
  %58 = icmp slt i32 %52, %57
  br i1 %58, label %59, label %154

59:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #2
  %60 = load double, ptr %12, align 8, !tbaa !14
  %61 = load i32, ptr %15, align 4, !tbaa !15
  %62 = sitofp i32 %61 to double
  %63 = fmul double %62, 0x401921FB54442D18
  %64 = load double, ptr %8, align 8, !tbaa !14
  %65 = fdiv double %63, %64
  %66 = fadd double %60, %65
  store double %66, ptr %17, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #2
  %67 = load double, ptr %17, align 8, !tbaa !14
  %68 = load double, ptr %12, align 8, !tbaa !14
  %69 = call double @PaQa_ComputePhaseDifference(double noundef %67, double noundef %68)
  store double %69, ptr %18, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #2
  store double 6.660000e+02, ptr %19, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #2
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.PaQaTestTone_s, ptr %71, i32 0, i32 3
  %73 = load double, ptr %72, align 8, !tbaa !13
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.PaQaTestTone_s, ptr %74, i32 0, i32 2
  %76 = load double, ptr %75, align 8, !tbaa !9
  %77 = load i32, ptr %7, align 4, !tbaa !15
  %78 = load i32, ptr %16, align 4, !tbaa !15
  %79 = call double @PaQa_CorrelateSine(ptr noundef %70, double noundef %73, double noundef %76, i32 noundef %77, i32 noundef %78, ptr noundef %19)
  store double %79, ptr %20, align 8, !tbaa !14
  %80 = load i32, ptr %14, align 4, !tbaa !15
  %81 = icmp sgt i32 %80, 1
  br i1 %81, label %82, label %146

82:                                               ; preds = %59
  %83 = load double, ptr %20, align 8, !tbaa !14
  %84 = fcmp ogt double %83, 0.000000e+00
  br i1 %84, label %85, label %146

85:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #2
  %86 = load double, ptr %19, align 8, !tbaa !14
  %87 = load double, ptr %12, align 8, !tbaa !14
  %88 = call double @PaQa_ComputePhaseDifference(double noundef %86, double noundef %87)
  store double %88, ptr %21, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #2
  %89 = load double, ptr %21, align 8, !tbaa !14
  %90 = load double, ptr %18, align 8, !tbaa !14
  %91 = call double @PaQa_ComputePhaseDifference(double noundef %89, double noundef %90)
  store double %91, ptr %22, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #2
  %92 = load double, ptr %8, align 8, !tbaa !14
  %93 = load double, ptr %22, align 8, !tbaa !14
  %94 = fmul double %92, %93
  %95 = fdiv double %94, 0x401921FB54442D18
  store double %95, ptr %23, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #2
  %96 = load double, ptr %23, align 8, !tbaa !14
  %97 = load double, ptr %13, align 8, !tbaa !14
  %98 = fadd double %96, %97
  store double %98, ptr %24, align 8, !tbaa !14
  %99 = load double, ptr %24, align 8, !tbaa !14
  %100 = fcmp ogt double %99, 8.000000e-01
  br i1 %100, label %101, label %120

101:                                              ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #2
  %102 = load double, ptr %24, align 8, !tbaa !14
  store double %102, ptr %25, align 8, !tbaa !14
  %103 = load double, ptr %25, align 8, !tbaa !14
  %104 = load double, ptr %11, align 8, !tbaa !14
  %105 = fmul double %104, 1.001000e+00
  %106 = fcmp ogt double %103, %105
  br i1 %106, label %107, label %119

107:                                              ; preds = %101
  %108 = load double, ptr %25, align 8, !tbaa !14
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %109, i32 0, i32 5
  store double %108, ptr %110, align 8, !tbaa !16
  %111 = load i32, ptr %7, align 4, !tbaa !15
  %112 = load i32, ptr %16, align 4, !tbaa !15
  %113 = sdiv i32 %112, 2
  %114 = add nsw i32 %111, %113
  %115 = sitofp i32 %114 to double
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %116, i32 0, i32 6
  store double %115, ptr %117, align 8, !tbaa !19
  %118 = load double, ptr %25, align 8, !tbaa !14
  store double %118, ptr %11, align 8, !tbaa !14
  br label %119

119:                                              ; preds = %107, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #2
  br label %144

120:                                              ; preds = %85
  %121 = load double, ptr %24, align 8, !tbaa !14
  %122 = fcmp olt double %121, -8.000000e-01
  br i1 %122, label %123, label %143

123:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #2
  %124 = load double, ptr %24, align 8, !tbaa !14
  %125 = fsub double 0.000000e+00, %124
  store double %125, ptr %26, align 8, !tbaa !14
  %126 = load double, ptr %26, align 8, !tbaa !14
  %127 = load double, ptr %10, align 8, !tbaa !14
  %128 = fmul double %127, 1.001000e+00
  %129 = fcmp ogt double %126, %128
  br i1 %129, label %130, label %142

130:                                              ; preds = %123
  %131 = load double, ptr %26, align 8, !tbaa !14
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %132, i32 0, i32 7
  store double %131, ptr %133, align 8, !tbaa !18
  %134 = load i32, ptr %7, align 4, !tbaa !15
  %135 = load i32, ptr %16, align 4, !tbaa !15
  %136 = sdiv i32 %135, 2
  %137 = add nsw i32 %134, %136
  %138 = sitofp i32 %137 to double
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.PaQaAnalysisResult_s, ptr %139, i32 0, i32 8
  store double %138, ptr %140, align 8, !tbaa !20
  %141 = load double, ptr %26, align 8, !tbaa !14
  store double %141, ptr %10, align 8, !tbaa !14
  br label %142

142:                                              ; preds = %130, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #2
  br label %143

143:                                              ; preds = %142, %120
  br label %144

144:                                              ; preds = %143, %119
  %145 = load double, ptr %23, align 8, !tbaa !14
  store double %145, ptr %13, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #2
  br label %146

146:                                              ; preds = %144, %82, %59
  %147 = load double, ptr %19, align 8, !tbaa !14
  store double %147, ptr %12, align 8, !tbaa !14
  %148 = load i32, ptr %14, align 4, !tbaa !15
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %14, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #2
  br label %150

150:                                              ; preds = %146
  %151 = load i32, ptr %15, align 4, !tbaa !15
  %152 = load i32, ptr %7, align 4, !tbaa !15
  %153 = add nsw i32 %152, %151
  store i32 %153, ptr %7, align 4, !tbaa !15
  br label %51, !llvm.loop !24

154:                                              ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  ret i32 0
}

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 = { 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, !12, i64 8}
!10 = !{!"PaQaTestTone_s", !11, i64 0, !11, i64 4, !12, i64 8, !12, i64 16, !12, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !12, i64 16}
!14 = !{!12, !12, i64 0}
!15 = !{!11, !11, i64 0}
!16 = !{!17, !12, i64 40}
!17 = !{!"PaQaAnalysisResult_s", !11, 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}
!18 = !{!17, !12, i64 56}
!19 = !{!17, !12, i64 48}
!20 = !{!17, !12, i64 64}
!21 = !{!17, !12, i64 8}
!22 = !{!23, !11, i64 16}
!23 = !{!"PaQaRecording_s", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20}
!24 = distinct !{!24, !25}
!25 = !{!"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"

; 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 double @PaQa_CorrelateSine(ptr noundef, double noundef, double noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local double @PaQa_ComputePhaseDifference(double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @PaQa_DetectPhaseError(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef %2) local_unnamed_addr #1 {
  %4 = alloca double, align 8
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = load double, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 16
  %8 = load double, ptr %7, align 8, !tbaa !11
  %9 = fdiv double %6, %8
  %10 = fadd double %9, 5.000000e-01
  %11 = fptosi double %10 to i32
  %12 = getelementptr inbounds i8, ptr %2, i64 40
  %13 = getelementptr inbounds i8, ptr %2, i64 56
  %14 = getelementptr inbounds i8, ptr %2, i64 48
  store <2 x double> <double 0.000000e+00, double -1.000000e+00>, ptr %12, align 8, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %2, i64 64
  store <2 x double> <double 0.000000e+00, double -1.000000e+00>, ptr %13, align 8, !tbaa !12
  %16 = getelementptr inbounds i8, ptr %2, i64 8
  %17 = load double, ptr %16, align 8, !tbaa !13
  %18 = fptosi double %17 to i32
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  %20 = load i32, ptr %19, align 8, !tbaa !15
  %21 = sub nsw i32 %20, %11
  %22 = icmp sgt i32 %21, %18
  br i1 %22, label %23, label %._crit_edge

23:                                               ; preds = %3
  %24 = sitofp i32 %11 to double
  %25 = fmul double %24, 0x401921FB54442D18
  %26 = fdiv double %25, %9
  %27 = sdiv i32 %11, 2
  %28 = fadd double %26, 0.000000e+00
  %29 = tail call double @PaQa_ComputePhaseDifference(double noundef %28, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #2
  store double 6.660000e+02, ptr %4, align 8, !tbaa !12
  %30 = load double, ptr %7, align 8, !tbaa !11
  %31 = load double, ptr %5, align 8, !tbaa !5
  %32 = call double @PaQa_CorrelateSine(ptr noundef nonnull %0, double noundef %30, double noundef %31, i32 noundef %18, i32 noundef %11, ptr noundef nonnull %4)
  %.pre = load double, ptr %4, align 8, !tbaa !12
  %.pre83 = load i32, ptr %19, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #2
  %33 = add nsw i32 %18, %11
  %34 = sub nsw i32 %.pre83, %11
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %36, label %._crit_edge

36:                                               ; preds = %23
  %37 = fadd double %26, %.pre
  %38 = call double @PaQa_ComputePhaseDifference(double noundef %37, double noundef %.pre)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #2
  store double 6.660000e+02, ptr %4, align 8, !tbaa !12
  %39 = load double, ptr %7, align 8, !tbaa !11
  %40 = load double, ptr %5, align 8, !tbaa !5
  %41 = call double @PaQa_CorrelateSine(ptr noundef nonnull %0, double noundef %39, double noundef %40, i32 noundef %33, i32 noundef %11, ptr noundef nonnull %4)
  %.pre87 = load double, ptr %4, align 8, !tbaa !12
  %.pre88 = load i32, ptr %19, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #2
  %42 = add nsw i32 %33, %11
  %43 = sub nsw i32 %.pre88, %11
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %.peel.next74, label %._crit_edge

.peel.next74:                                     ; preds = %36, %72
  %.073 = phi i32 [ %74, %72 ], [ %42, %36 ]
  %.05672 = phi double [ %.3, %72 ], [ 0.000000e+00, %36 ]
  %.05771 = phi double [ %.360, %72 ], [ 0.000000e+00, %36 ]
  %.06170 = phi double [ %73, %72 ], [ %.pre87, %36 ]
  %.06269 = phi double [ %.163, %72 ], [ 0.000000e+00, %36 ]
  %45 = fadd double %26, %.06170
  %46 = call double @PaQa_ComputePhaseDifference(double noundef %45, double noundef %.06170)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #2
  store double 6.660000e+02, ptr %4, align 8, !tbaa !12
  %47 = load double, ptr %7, align 8, !tbaa !11
  %48 = load double, ptr %5, align 8, !tbaa !5
  %49 = call double @PaQa_CorrelateSine(ptr noundef nonnull %0, double noundef %47, double noundef %48, i32 noundef %.073, i32 noundef %11, ptr noundef nonnull %4)
  %50 = fcmp ogt double %49, 0.000000e+00
  br i1 %50, label %51, label %72

51:                                               ; preds = %.peel.next74
  %52 = load double, ptr %4, align 8, !tbaa !12
  %53 = call double @PaQa_ComputePhaseDifference(double noundef %52, double noundef %.06170)
  %54 = call double @PaQa_ComputePhaseDifference(double noundef %53, double noundef %46)
  %55 = fmul double %9, %54
  %56 = fdiv double %55, 0x401921FB54442D18
  %57 = fadd double %.06269, %56
  %58 = fcmp ogt double %57, 8.000000e-01
  br i1 %58, label %59, label %63

59:                                               ; preds = %51
  %60 = fmul double %.05771, 1.001000e+00
  %61 = fcmp ogt double %57, %60
  br i1 %61, label %62, label %72

62:                                               ; preds = %59
  store double %57, ptr %12, align 8, !tbaa !18
  br label %.sink.split

63:                                               ; preds = %51
  %64 = fcmp olt double %57, -8.000000e-01
  br i1 %64, label %65, label %72

65:                                               ; preds = %63
  %66 = fsub double 0.000000e+00, %57
  %67 = fmul double %.05672, 1.001000e+00
  %68 = fcmp ogt double %66, %67
  br i1 %68, label %69, label %72

69:                                               ; preds = %65
  store double %66, ptr %13, align 8, !tbaa !19
  br label %.sink.split

.sink.split:                                      ; preds = %69, %62
  %.sink89 = phi ptr [ %14, %62 ], [ %15, %69 ]
  %.360.ph = phi double [ %57, %62 ], [ %.05771, %69 ]
  %.3.ph = phi double [ %.05672, %62 ], [ %66, %69 ]
  %70 = add nsw i32 %.073, %27
  %71 = sitofp i32 %70 to double
  store double %71, ptr %.sink89, align 8, !tbaa !12
  br label %72

72:                                               ; preds = %.sink.split, %63, %59, %65, %.peel.next74
  %.163 = phi double [ %.06269, %.peel.next74 ], [ %56, %65 ], [ %56, %59 ], [ %56, %63 ], [ %56, %.sink.split ]
  %.360 = phi double [ %.05771, %.peel.next74 ], [ %.05771, %65 ], [ %.05771, %59 ], [ %.05771, %63 ], [ %.360.ph, %.sink.split ]
  %.3 = phi double [ %.05672, %.peel.next74 ], [ %.05672, %65 ], [ %.05672, %59 ], [ %.05672, %63 ], [ %.3.ph, %.sink.split ]
  %73 = load double, ptr %4, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #2
  %74 = add nsw i32 %.073, %11
  %75 = load i32, ptr %19, align 8, !tbaa !15
  %76 = sub nsw i32 %75, %11
  %77 = icmp slt i32 %74, %76
  br i1 %77, label %.peel.next74, label %._crit_edge, !llvm.loop !20

._crit_edge:                                      ; preds = %72, %23, %36, %3
  ret i32 0
}

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 = { 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, !10, i64 8}
!6 = !{!"PaQaTestTone_s", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!6, !10, i64 16}
!12 = !{!10, !10, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"PaQaAnalysisResult_s", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!15 = !{!16, !7, i64 16}
!16 = !{!"PaQaRecording_s", !7, i64 0, !17, i64 8, !7, i64 16, !7, i64 20}
!17 = !{!"any pointer", !8, i64 0}
!18 = !{!14, !10, i64 40}
!19 = !{!14, !10, i64 56}
!20 = distinct !{!20, !21, !22}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.peeled.count", i32 2}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass