; LLVM IR from jgaeddert/liquid-dsp :: src/framing/src (gmskframesync)

; 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.gmskframesync_s = type { ptr, i32, i32, float, ptr, ptr, %struct.framesyncstats_s, %struct.framedatastats_s, { float, float }, float, ptr, ptr, i32, float, float, i32, i32, float, ptr, float, float, float, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i8, i32, i32, i32, i32, i32, ptr, ptr, ptr, i32, i32, i32, i32, i32 }
%struct.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }
%struct.framedatastats_s = type { i32, i32, i32, i64 }

@.str.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [42 x i8], align 1
@__PRETTY_FUNCTION__.gmskframesync_pushpn = external hidden unnamed_addr constant [40 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

declare i32 @firpfb_rrrf_reset(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @gmskframesync_execute_sample(ptr noundef, <2 x float> noundef) #2

declare i32 @firpfb_rrrf_push(ptr noundef, float noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @gmskframesync_pushpn(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca { float, float }, align 4
  %8 = alloca { float, float }, align 4
  %9 = alloca { float, float }, align 4
  %10 = alloca { float, float }, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.gmskframesync_s, ptr %11, i32 0, i32 10
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = call i32 @firpfb_rrrf_reset(ptr noundef %13)
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.gmskframesync_s, ptr %15, i32 0, i32 11
  %17 = load ptr, ptr %16, align 8, !tbaa !16
  %18 = call i32 @firpfb_rrrf_reset(ptr noundef %17)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.gmskframesync_s, ptr %19, i32 0, i32 22
  %21 = load ptr, ptr %20, align 8, !tbaa !17
  %22 = call i32 @windowcf_read(ptr noundef %21, ptr noundef %4)
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.gmskframesync_s, ptr %23, i32 0, i32 19
  %25 = load float, ptr %24, align 8, !tbaa !18
  %26 = fcmp olt float %25, 5.000000e-01
  br i1 %26, label %27, label %33

27:                                               ; preds = %1
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.gmskframesync_s, ptr %28, i32 0, i32 19
  %30 = load float, ptr %29, align 8, !tbaa !18
  %31 = fcmp ogt float %30, -5.000000e-01
  br i1 %31, label %32, label %33

32:                                               ; preds = %27
  br label %34

33:                                               ; preds = %27, %1
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 503, ptr noundef @__PRETTY_FUNCTION__.gmskframesync_pushpn) #6
  unreachable

34:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.gmskframesync_s, ptr %35, i32 0, i32 1
  %37 = load i32, ptr %36, align 8, !tbaa !19
  %38 = mul i32 2, %37
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.gmskframesync_s, ptr %39, i32 0, i32 2
  %41 = load i32, ptr %40, align 4, !tbaa !20
  %42 = mul i32 %38, %41
  %43 = sub i32 %42, 1
  store i32 %43, ptr %5, align 4, !tbaa !21
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.gmskframesync_s, ptr %44, i32 0, i32 19
  %46 = load float, ptr %45, align 8, !tbaa !18
  %47 = fneg float %46
  %48 = load ptr, ptr %2, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.gmskframesync_s, ptr %48, i32 0, i32 12
  %50 = load i32, ptr %49, align 8, !tbaa !22
  %51 = uitofp i32 %50 to float
  %52 = fmul float %47, %51
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.gmskframesync_s, ptr %53, i32 0, i32 14
  store float %52, ptr %54, align 8, !tbaa !23
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.gmskframesync_s, ptr %55, i32 0, i32 14
  %57 = load float, ptr %56, align 8, !tbaa !23
  %58 = call float @llvm.round.f32(float %57)
  %59 = fptosi float %58 to i32
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.gmskframesync_s, ptr %60, i32 0, i32 15
  store i32 %59, ptr %61, align 4, !tbaa !24
  br label %62

62:                                               ; preds = %67, %34
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.gmskframesync_s, ptr %63, i32 0, i32 15
  %65 = load i32, ptr %64, align 4, !tbaa !24
  %66 = icmp slt i32 %65, 0
  br i1 %66, label %67, label %85

67:                                               ; preds = %62
  %68 = load i32, ptr %5, align 4, !tbaa !21
  %69 = sub i32 %68, 1
  store i32 %69, ptr %5, align 4, !tbaa !21
  %70 = load ptr, ptr %2, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.gmskframesync_s, ptr %70, i32 0, i32 12
  %72 = load i32, ptr %71, align 8, !tbaa !22
  %73 = load ptr, ptr %2, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.gmskframesync_s, ptr %73, i32 0, i32 15
  %75 = load i32, ptr %74, align 4, !tbaa !24
  %76 = add i32 %75, %72
  store i32 %76, ptr %74, align 4, !tbaa !24
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.gmskframesync_s, ptr %77, i32 0, i32 12
  %79 = load i32, ptr %78, align 8, !tbaa !22
  %80 = uitofp i32 %79 to float
  %81 = load ptr, ptr %2, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.gmskframesync_s, ptr %81, i32 0, i32 14
  %83 = load float, ptr %82, align 8, !tbaa !23
  %84 = fadd float %83, %80
  store float %84, ptr %82, align 8, !tbaa !23
  br label %62, !llvm.loop !25

85:                                               ; preds = %62
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.gmskframesync_s, ptr %86, i32 0, i32 16
  store i32 0, ptr %87, align 8, !tbaa !27
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.gmskframesync_s, ptr %88, i32 0, i32 23
  %90 = load ptr, ptr %89, align 8, !tbaa !28
  %91 = load ptr, ptr %2, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.gmskframesync_s, ptr %91, i32 0, i32 20
  %93 = load float, ptr %92, align 4, !tbaa !29
  %94 = call i32 @nco_crcf_set_frequency(ptr noundef %90, float noundef %93)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.gmskframesync_s, ptr %95, i32 0, i32 24
  %97 = load i32, ptr %96, align 8, !tbaa !30
  %98 = load ptr, ptr %2, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.gmskframesync_s, ptr %98, i32 0, i32 2
  %100 = load i32, ptr %99, align 4, !tbaa !20
  %101 = add i32 %97, %100
  %102 = load ptr, ptr %2, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.gmskframesync_s, ptr %102, i32 0, i32 1
  %104 = load i32, ptr %103, align 8, !tbaa !19
  %105 = mul i32 %101, %104
  store i32 %105, ptr %6, align 4, !tbaa !21
  store i32 0, ptr %3, align 4, !tbaa !21
  br label %106

106:                                              ; preds = %153, %85
  %107 = load i32, ptr %3, align 4, !tbaa !21
  %108 = load i32, ptr %5, align 4, !tbaa !21
  %109 = icmp ult i32 %107, %108
  br i1 %109, label %110, label %156

110:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %111 = load ptr, ptr %2, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.gmskframesync_s, ptr %111, i32 0, i32 23
  %113 = load ptr, ptr %112, align 8, !tbaa !28
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = load i32, ptr %3, align 4, !tbaa !21
  %116 = zext i32 %115 to i64
  %117 = getelementptr inbounds { float, float }, ptr %114, i64 %116
  %118 = getelementptr inbounds { float, float }, ptr %117, i32 0, i32 0
  %119 = load float, ptr %118, align 4
  %120 = getelementptr inbounds { float, float }, ptr %117, i32 0, i32 1
  %121 = load float, ptr %120, align 4
  %122 = getelementptr inbounds { float, float }, ptr %8, i32 0, i32 0
  %123 = getelementptr inbounds { float, float }, ptr %8, i32 0, i32 1
  store float %119, ptr %122, align 4
  store float %121, ptr %123, align 4
  %124 = load <2 x float>, ptr %8, align 4
  %125 = call i32 @nco_crcf_mix_down(ptr noundef %113, <2 x float> noundef %124, ptr noundef %7)
  %126 = load ptr, ptr %2, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.gmskframesync_s, ptr %126, i32 0, i32 23
  %128 = load ptr, ptr %127, align 8, !tbaa !28
  %129 = call i32 @nco_crcf_step(ptr noundef %128)
  %130 = load ptr, ptr %2, align 8, !tbaa !5
  %131 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %132 = load float, ptr %131, align 4
  %133 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %134 = load float, ptr %133, align 4
  %135 = getelementptr inbounds { float, float }, ptr %9, i32 0, i32 0
  %136 = getelementptr inbounds { float, float }, ptr %9, i32 0, i32 1
  store float %132, ptr %135, align 4
  store float %134, ptr %136, align 4
  %137 = load <2 x float>, ptr %9, align 4
  %138 = call i32 @gmskframesync_update_fi(ptr noundef %130, <2 x float> noundef %137)
  %139 = load ptr, ptr %2, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.gmskframesync_s, ptr %139, i32 0, i32 10
  %141 = load ptr, ptr %140, align 8, !tbaa !9
  %142 = load ptr, ptr %2, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.gmskframesync_s, ptr %142, i32 0, i32 9
  %144 = load float, ptr %143, align 8, !tbaa !31
  %145 = call i32 @firpfb_rrrf_push(ptr noundef %141, float noundef %144)
  %146 = load ptr, ptr %2, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.gmskframesync_s, ptr %146, i32 0, i32 11
  %148 = load ptr, ptr %147, align 8, !tbaa !16
  %149 = load ptr, ptr %2, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.gmskframesync_s, ptr %149, i32 0, i32 9
  %151 = load float, ptr %150, align 8, !tbaa !31
  %152 = call i32 @firpfb_rrrf_push(ptr noundef %148, float noundef %151)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %153

153:                                              ; preds = %110
  %154 = load i32, ptr %3, align 4, !tbaa !21
  %155 = add i32 %154, 1
  store i32 %155, ptr %3, align 4, !tbaa !21
  br label %106, !llvm.loop !32

156:                                              ; preds = %106
  %157 = load ptr, ptr %2, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.gmskframesync_s, ptr %157, i32 0, i32 45
  store i32 1, ptr %158, align 4, !tbaa !33
  %159 = load i32, ptr %5, align 4, !tbaa !21
  store i32 %159, ptr %3, align 4, !tbaa !21
  br label %160

160:                                              ; preds = %178, %156
  %161 = load i32, ptr %3, align 4, !tbaa !21
  %162 = load i32, ptr %6, align 4, !tbaa !21
  %163 = icmp ult i32 %161, %162
  br i1 %163, label %164, label %181

164:                                              ; preds = %160
  %165 = load ptr, ptr %2, align 8, !tbaa !5
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = load i32, ptr %3, align 4, !tbaa !21
  %168 = zext i32 %167 to i64
  %169 = getelementptr inbounds { float, float }, ptr %166, i64 %168
  %170 = getelementptr inbounds { float, float }, ptr %169, i32 0, i32 0
  %171 = load float, ptr %170, align 4
  %172 = getelementptr inbounds { float, float }, ptr %169, i32 0, i32 1
  %173 = load float, ptr %172, align 4
  %174 = getelementptr inbounds { float, float }, ptr %10, i32 0, i32 0
  %175 = getelementptr inbounds { float, float }, ptr %10, i32 0, i32 1
  store float %171, ptr %174, align 4
  store float %173, ptr %175, align 4
  %176 = load <2 x float>, ptr %10, align 4
  %177 = call i32 @gmskframesync_execute_sample(ptr noundef %165, <2 x float> noundef %176)
  br label %178

178:                                              ; preds = %164
  %179 = load i32, ptr %3, align 4, !tbaa !21
  %180 = add i32 %179, 1
  store i32 %180, ptr %3, align 4, !tbaa !21
  br label %160, !llvm.loop !34

181:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret i32 0
}

declare i32 @windowcf_read(ptr noundef, ptr noundef) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

declare i32 @nco_crcf_set_frequency(ptr noundef, float noundef) #1

declare i32 @nco_crcf_mix_down(ptr noundef, <2 x float> noundef, ptr noundef) #1

declare i32 @nco_crcf_step(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @gmskframesync_update_fi(ptr noundef, <2 x float> noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 uwtable "min-legal-vector-width"="64" "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 = { noreturn 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 #5 = { nounwind }
attributes #6 = { noreturn 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, !6, i64 128}
!10 = !{!"gmskframesync_s", !6, i64 0, !11, i64 8, !11, i64 12, !12, i64 16, !6, i64 24, !6, i64 32, !13, i64 40, !14, i64 88, !7, i64 112, !12, i64 120, !6, i64 128, !6, i64 136, !11, i64 144, !12, i64 148, !12, i64 152, !11, i64 156, !11, i64 160, !12, i64 164, !6, i64 168, !12, i64 176, !12, i64 180, !12, i64 184, !6, i64 192, !6, i64 200, !11, i64 208, !6, i64 216, !6, i64 224, !11, i64 232, !11, i64 236, !11, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !11, i64 280, !7, i64 284, !11, i64 288, !11, i64 292, !11, i64 296, !11, i64 300, !11, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !11, i64 336, !11, i64 340, !11, i64 344, !11, i64 348, !11, i64 352}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44}
!14 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !15, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!10, !6, i64 136}
!17 = !{!10, !6, i64 192}
!18 = !{!10, !12, i64 176}
!19 = !{!10, !11, i64 8}
!20 = !{!10, !11, i64 12}
!21 = !{!11, !11, i64 0}
!22 = !{!10, !11, i64 144}
!23 = !{!10, !12, i64 152}
!24 = !{!10, !11, i64 156}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!10, !11, i64 160}
!28 = !{!10, !6, i64 200}
!29 = !{!10, !12, i64 180}
!30 = !{!10, !11, i64 208}
!31 = !{!10, !12, i64 120}
!32 = distinct !{!32, !26}
!33 = !{!10, !11, i64 340}
!34 = distinct !{!34, !26}


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

@.str.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [42 x i8], align 1
@__PRETTY_FUNCTION__.gmskframesync_pushpn = external hidden unnamed_addr constant [40 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

declare i32 @firpfb_rrrf_reset(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @gmskframesync_execute_sample(ptr noundef, <2 x float> noundef) local_unnamed_addr #2

declare i32 @firpfb_rrrf_push(ptr noundef, float noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @gmskframesync_pushpn(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca ptr, align 8
  %3 = alloca { float, float }, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 128
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = tail call i32 @firpfb_rrrf_reset(ptr noundef %5) #6
  %7 = getelementptr inbounds i8, ptr %0, i64 136
  %8 = load ptr, ptr %7, align 8, !tbaa !15
  %9 = tail call i32 @firpfb_rrrf_reset(ptr noundef %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %10 = getelementptr inbounds i8, ptr %0, i64 192
  %11 = load ptr, ptr %10, align 8, !tbaa !16
  %12 = call i32 @windowcf_read(ptr noundef %11, ptr noundef nonnull %2) #6
  %13 = getelementptr inbounds i8, ptr %0, i64 176
  %14 = load float, ptr %13, align 8, !tbaa !17
  %15 = call float @llvm.fabs.f32(float %14)
  %or.cond = fcmp olt float %15, 5.000000e-01
  br i1 %or.cond, label %17, label %16

16:                                               ; preds = %1
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 503, ptr noundef nonnull @__PRETTY_FUNCTION__.gmskframesync_pushpn) #7
  unreachable

17:                                               ; preds = %1
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = load i32, ptr %18, align 8, !tbaa !18
  %20 = shl i32 %19, 1
  %21 = getelementptr inbounds i8, ptr %0, i64 12
  %22 = load i32, ptr %21, align 4, !tbaa !19
  %23 = mul i32 %20, %22
  %24 = fneg float %14
  %25 = getelementptr inbounds i8, ptr %0, i64 144
  %26 = load i32, ptr %25, align 8, !tbaa !20
  %27 = uitofp i32 %26 to float
  %28 = fmul float %24, %27
  %29 = getelementptr inbounds i8, ptr %0, i64 152
  store float %28, ptr %29, align 8, !tbaa !21
  %30 = call float @llvm.round.f32(float %28)
  %31 = fptosi float %30 to i32
  %32 = getelementptr inbounds i8, ptr %0, i64 156
  store i32 %31, ptr %32, align 4, !tbaa !22
  %.04649 = add i32 %23, -1
  %33 = icmp slt i32 %31, 0
  br i1 %33, label %.lr.ph, label %39

.lr.ph:                                           ; preds = %17, %.lr.ph
  %34 = phi float [ %37, %.lr.ph ], [ %28, %17 ]
  %.04650 = phi i32 [ %.046, %.lr.ph ], [ %.04649, %17 ]
  %35 = phi i32 [ %36, %.lr.ph ], [ %31, %17 ]
  %36 = add i32 %35, %26
  %37 = fadd float %34, %27
  %.046 = add i32 %.04650, -1
  %38 = icmp slt i32 %36, 0
  br i1 %38, label %.lr.ph, label %._crit_edge, !llvm.loop !23

._crit_edge:                                      ; preds = %.lr.ph
  store i32 %36, ptr %32, align 4, !tbaa !22
  store float %37, ptr %29, align 8, !tbaa !21
  br label %39

39:                                               ; preds = %._crit_edge, %17
  %.046.lcssa = phi i32 [ %.046, %._crit_edge ], [ %.04649, %17 ]
  %40 = getelementptr inbounds i8, ptr %0, i64 160
  store i32 0, ptr %40, align 8, !tbaa !25
  %41 = getelementptr inbounds i8, ptr %0, i64 200
  %42 = load ptr, ptr %41, align 8, !tbaa !26
  %43 = getelementptr inbounds i8, ptr %0, i64 180
  %44 = load float, ptr %43, align 4, !tbaa !27
  %45 = call i32 @nco_crcf_set_frequency(ptr noundef %42, float noundef %44) #6
  %46 = getelementptr inbounds i8, ptr %0, i64 208
  %47 = load i32, ptr %46, align 8, !tbaa !28
  %48 = load i32, ptr %21, align 4, !tbaa !19
  %49 = add i32 %48, %47
  %50 = load i32, ptr %18, align 8, !tbaa !18
  %51 = mul i32 %49, %50
  %.not = icmp eq i32 %.046.lcssa, 0
  br i1 %.not, label %._crit_edge55, label %.lr.ph54

.lr.ph54:                                         ; preds = %39
  %52 = getelementptr inbounds i8, ptr %0, i64 120
  %wide.trip.count = zext i32 %.046.lcssa to i64
  br label %53

53:                                               ; preds = %.lr.ph54, %53
  %indvars.iv = phi i64 [ 0, %.lr.ph54 ], [ %indvars.iv.next, %53 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %54 = load ptr, ptr %41, align 8, !tbaa !26
  %55 = load ptr, ptr %2, align 8, !tbaa !29
  %56 = getelementptr inbounds { float, float }, ptr %55, i64 %indvars.iv
  %57 = load <2 x float>, ptr %56, align 4
  %58 = call i32 @nco_crcf_mix_down(ptr noundef %54, <2 x float> noundef %57, ptr noundef nonnull %3) #6
  %59 = load ptr, ptr %41, align 8, !tbaa !26
  %60 = call i32 @nco_crcf_step(ptr noundef %59) #6
  %61 = load <2 x float>, ptr %3, align 8
  %62 = call i32 @gmskframesync_update_fi(ptr noundef nonnull %0, <2 x float> noundef %61)
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = load float, ptr %52, align 8, !tbaa !30
  %65 = call i32 @firpfb_rrrf_push(ptr noundef %63, float noundef %64) #6
  %66 = load ptr, ptr %7, align 8, !tbaa !15
  %67 = load float, ptr %52, align 8, !tbaa !30
  %68 = call i32 @firpfb_rrrf_push(ptr noundef %66, float noundef %67) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge55, label %53, !llvm.loop !31

._crit_edge55:                                    ; preds = %53, %39
  %69 = getelementptr inbounds i8, ptr %0, i64 340
  store i32 1, ptr %69, align 4, !tbaa !32
  %70 = icmp ult i32 %.046.lcssa, %51
  br i1 %70, label %.lr.ph58.preheader, label %._crit_edge59

.lr.ph58.preheader:                               ; preds = %._crit_edge55
  %71 = zext i32 %.046.lcssa to i64
  br label %.lr.ph58

.lr.ph58:                                         ; preds = %.lr.ph58.preheader, %.lr.ph58
  %indvars.iv63 = phi i64 [ %71, %.lr.ph58.preheader ], [ %indvars.iv.next64, %.lr.ph58 ]
  %72 = load ptr, ptr %2, align 8, !tbaa !29
  %73 = getelementptr inbounds { float, float }, ptr %72, i64 %indvars.iv63
  %74 = load <2 x float>, ptr %73, align 4
  %75 = call i32 @gmskframesync_execute_sample(ptr noundef %0, <2 x float> noundef %74)
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next64 to i32
  %exitcond66.not = icmp eq i32 %51, %lftr.wideiv
  br i1 %exitcond66.not, label %._crit_edge59, label %.lr.ph58, !llvm.loop !33

._crit_edge59:                                    ; preds = %.lr.ph58, %._crit_edge55
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  ret i32 0
}

declare i32 @windowcf_read(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

declare i32 @nco_crcf_set_frequency(ptr noundef, float noundef) local_unnamed_addr #1

declare i32 @nco_crcf_mix_down(ptr noundef, <2 x float> noundef, ptr noundef) local_unnamed_addr #1

declare i32 @nco_crcf_step(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @gmskframesync_update_fi(ptr noundef, <2 x float> noundef) local_unnamed_addr #2

; 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 = { "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 uwtable "min-legal-vector-width"="64" "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 nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { noreturn 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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 128}
!6 = !{!"gmskframesync_s", !7, i64 0, !10, i64 8, !10, i64 12, !11, i64 16, !7, i64 24, !7, i64 32, !12, i64 40, !13, i64 88, !8, i64 112, !11, i64 120, !7, i64 128, !7, i64 136, !10, i64 144, !11, i64 148, !11, i64 152, !10, i64 156, !10, i64 160, !11, i64 164, !7, i64 168, !11, i64 176, !11, i64 180, !11, i64 184, !7, i64 192, !7, i64 200, !10, i64 208, !7, i64 216, !7, i64 224, !10, i64 232, !10, i64 236, !10, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !7, i64 272, !10, i64 280, !8, i64 284, !10, i64 288, !10, i64 292, !10, i64 296, !10, i64 300, !10, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !10, i64 352}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44}
!13 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !14, i64 16}
!14 = !{!"long", !8, i64 0}
!15 = !{!6, !7, i64 136}
!16 = !{!6, !7, i64 192}
!17 = !{!6, !11, i64 176}
!18 = !{!6, !10, i64 8}
!19 = !{!6, !10, i64 12}
!20 = !{!6, !10, i64 144}
!21 = !{!6, !11, i64 152}
!22 = !{!6, !10, i64 156}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!6, !10, i64 160}
!26 = !{!6, !7, i64 200}
!27 = !{!6, !11, i64 180}
!28 = !{!6, !10, i64 208}
!29 = !{!7, !7, i64 0}
!30 = !{!6, !11, i64 120}
!31 = distinct !{!31, !24}
!32 = !{!6, !10, i64 340}
!33 = distinct !{!33, !24}


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