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

; 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 @gmskframesync_reset(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @gmskframesync_execute_rxheader(ptr noundef %0, <2 x float> noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca { float, float }, align 4
  %5 = alloca ptr, align 8
  %6 = alloca { float, float }, align 4
  %7 = alloca { float, float }, align 4
  %8 = alloca { float, float }, align 4
  %9 = alloca float, align 4
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  store <2 x float> %1, ptr %4, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.gmskframesync_s, ptr %13, i32 0, i32 23
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  %16 = getelementptr inbounds { float, float }, ptr %4, i32 0, i32 0
  %17 = load float, ptr %16, align 4
  %18 = getelementptr inbounds { float, float }, ptr %4, i32 0, i32 1
  %19 = load float, ptr %18, align 4
  %20 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %21 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  store float %17, ptr %20, align 4
  store float %19, ptr %21, align 4
  %22 = load <2 x float>, ptr %7, align 4
  %23 = call i32 @nco_crcf_mix_down(ptr noundef %15, <2 x float> noundef %22, ptr noundef %6)
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.gmskframesync_s, ptr %24, i32 0, i32 23
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = call i32 @nco_crcf_step(ptr noundef %26)
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 0
  %30 = load float, ptr %29, align 4
  %31 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 1
  %32 = load float, ptr %31, align 4
  %33 = getelementptr inbounds { float, float }, ptr %8, i32 0, i32 0
  %34 = getelementptr inbounds { float, float }, ptr %8, i32 0, i32 1
  store float %30, ptr %33, align 4
  store float %32, ptr %34, align 4
  %35 = load <2 x float>, ptr %8, align 4
  %36 = call i32 @gmskframesync_update_fi(ptr noundef %28, <2 x float> noundef %35)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store float 0.000000e+00, ptr %9, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.gmskframesync_s, ptr %38, i32 0, i32 9
  %40 = load float, ptr %39, align 8, !tbaa !17
  %41 = call i32 @gmskframesync_update_symsync(ptr noundef %37, float noundef %40, ptr noundef %9)
  store i32 %41, ptr %10, align 4, !tbaa !18
  %42 = load i32, ptr %10, align 4, !tbaa !18
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %152

44:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  %45 = load float, ptr %9, align 4, !tbaa !16
  %46 = fcmp ogt float %45, 0.000000e+00
  %47 = zext i1 %46 to i64
  %48 = select i1 %46, i32 1, i32 0
  %49 = trunc i32 %48 to i8
  store i8 %49, ptr %11, align 1, !tbaa !19
  %50 = load i8, ptr %11, align 1, !tbaa !19
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.gmskframesync_s, ptr %51, i32 0, i32 30
  %53 = load ptr, ptr %52, align 8, !tbaa !20
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.gmskframesync_s, ptr %54, i32 0, i32 47
  %56 = load i32, ptr %55, align 4, !tbaa !21
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %53, i64 %57
  store i8 %50, ptr %58, align 1, !tbaa !19
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.gmskframesync_s, ptr %59, i32 0, i32 47
  %61 = load i32, ptr %60, align 4, !tbaa !21
  %62 = add i32 %61, 1
  store i32 %62, ptr %60, align 4, !tbaa !21
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.gmskframesync_s, ptr %63, i32 0, i32 47
  %65 = load i32, ptr %64, align 4, !tbaa !21
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.gmskframesync_s, ptr %66, i32 0, i32 29
  %68 = load i32, ptr %67, align 8, !tbaa !22
  %69 = icmp eq i32 %65, %68
  br i1 %69, label %70, label %148

70:                                               ; preds = %44
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = call i32 @gmskframesync_decode_header(ptr noundef %71)
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.gmskframesync_s, ptr %73, i32 0, i32 7
  %75 = getelementptr inbounds %struct.framedatastats_s, ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 8, !tbaa !23
  %77 = add i32 %76, 1
  store i32 %77, ptr %75, align 8, !tbaa !23
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.gmskframesync_s, ptr %78, i32 0, i32 34
  %80 = load i32, ptr %79, align 8, !tbaa !24
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %137, label %82

82:                                               ; preds = %70
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.gmskframesync_s, ptr %83, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !25
  %86 = icmp ne ptr %85, null
  br i1 %86, label %87, label %137

87:                                               ; preds = %82
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.gmskframesync_s, ptr %88, i32 0, i32 21
  %90 = load float, ptr %89, align 8, !tbaa !26
  %91 = call float @log10f(float noundef %90) #5
  %92 = fmul float 2.000000e+01, %91
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.gmskframesync_s, ptr %93, i32 0, i32 6
  %95 = getelementptr inbounds %struct.framesyncstats_s, ptr %94, i32 0, i32 1
  store float %92, ptr %95, align 4, !tbaa !27
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.gmskframesync_s, ptr %96, i32 0, i32 6
  %98 = getelementptr inbounds %struct.framesyncstats_s, ptr %97, i32 0, i32 0
  store float 0.000000e+00, ptr %98, align 8, !tbaa !28
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.gmskframesync_s, ptr %99, i32 0, i32 6
  %101 = getelementptr inbounds %struct.framesyncstats_s, ptr %100, i32 0, i32 3
  store ptr null, ptr %101, align 8, !tbaa !29
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.gmskframesync_s, ptr %102, i32 0, i32 6
  %104 = getelementptr inbounds %struct.framesyncstats_s, ptr %103, i32 0, i32 4
  store i32 0, ptr %104, align 8, !tbaa !30
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.gmskframesync_s, ptr %105, i32 0, i32 6
  %107 = getelementptr inbounds %struct.framesyncstats_s, ptr %106, i32 0, i32 5
  store i32 0, ptr %107, align 4, !tbaa !31
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.gmskframesync_s, ptr %108, i32 0, i32 6
  %110 = getelementptr inbounds %struct.framesyncstats_s, ptr %109, i32 0, i32 6
  store i32 1, ptr %110, align 8, !tbaa !32
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.gmskframesync_s, ptr %111, i32 0, i32 6
  %113 = getelementptr inbounds %struct.framesyncstats_s, ptr %112, i32 0, i32 7
  store i32 0, ptr %113, align 4, !tbaa !33
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.gmskframesync_s, ptr %114, i32 0, i32 6
  %116 = getelementptr inbounds %struct.framesyncstats_s, ptr %115, i32 0, i32 8
  store i32 0, ptr %116, align 8, !tbaa !34
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.gmskframesync_s, ptr %117, i32 0, i32 6
  %119 = getelementptr inbounds %struct.framesyncstats_s, ptr %118, i32 0, i32 9
  store i32 0, ptr %119, align 4, !tbaa !35
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.gmskframesync_s, ptr %120, i32 0, i32 4
  %122 = load ptr, ptr %121, align 8, !tbaa !25
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.gmskframesync_s, ptr %123, i32 0, i32 32
  %125 = load ptr, ptr %124, align 8, !tbaa !36
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.gmskframesync_s, ptr %126, i32 0, i32 34
  %128 = load i32, ptr %127, align 8, !tbaa !24
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.gmskframesync_s, ptr %129, i32 0, i32 6
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.gmskframesync_s, ptr %131, i32 0, i32 5
  %133 = load ptr, ptr %132, align 8, !tbaa !37
  %134 = call i32 %122(ptr noundef %125, i32 noundef %128, ptr noundef null, i32 noundef 0, i32 noundef 0, ptr noundef byval(%struct.framesyncstats_s) align 8 %130, ptr noundef %133)
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = call i32 @gmskframesync_reset(ptr noundef %135)
  br label %137

137:                                              ; preds = %87, %82, %70
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.gmskframesync_s, ptr %138, i32 0, i32 34
  %140 = load i32, ptr %139, align 8, !tbaa !24
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %145, label %142

142:                                              ; preds = %137
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = call i32 @gmskframesync_reset(ptr noundef %143)
  store i32 %144, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %149

145:                                              ; preds = %137
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.gmskframesync_s, ptr %146, i32 0, i32 45
  store i32 3, ptr %147, align 4, !tbaa !38
  br label %148

148:                                              ; preds = %145, %44
  store i32 0, ptr %12, align 4
  br label %149

149:                                              ; preds = %148, %142
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  %150 = load i32, ptr %12, align 4
  switch i32 %150, label %153 [
    i32 0, label %151
  ]

151:                                              ; preds = %149
  br label %152

152:                                              ; preds = %151, %2
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %153

153:                                              ; preds = %152, %149
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %154 = load i32, ptr %3, align 4
  ret i32 %154
}

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

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

declare i32 @nco_crcf_step(ptr noundef) #3

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

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

; Function Attrs: nounwind
declare float @log10f(float noundef) #4

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

!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 200}
!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 = !{!12, !12, i64 0}
!17 = !{!10, !12, i64 120}
!18 = !{!11, !11, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!10, !6, i64 248}
!21 = !{!10, !11, i64 348}
!22 = !{!10, !11, i64 240}
!23 = !{!10, !11, i64 88}
!24 = !{!10, !11, i64 280}
!25 = !{!10, !6, i64 24}
!26 = !{!10, !12, i64 184}
!27 = !{!10, !12, i64 44}
!28 = !{!10, !12, i64 40}
!29 = !{!10, !6, i64 56}
!30 = !{!10, !11, i64 64}
!31 = !{!10, !11, i64 68}
!32 = !{!10, !11, i64 72}
!33 = !{!10, !11, i64 76}
!34 = !{!10, !11, i64 80}
!35 = !{!10, !11, i64 84}
!36 = !{!10, !6, i64 264}
!37 = !{!10, !6, i64 32}
!38 = !{!10, !11, i64 340}


; 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.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }

; 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 @gmskframesync_reset(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @gmskframesync_execute_rxheader(ptr noundef %0, <2 x float> noundef %1) local_unnamed_addr #2 {
  %3 = alloca { float, float }, align 8
  %4 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %5 = getelementptr inbounds i8, ptr %0, i64 200
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = call i32 @nco_crcf_mix_down(ptr noundef %6, <2 x float> noundef %1, ptr noundef nonnull %3) #6
  %8 = load ptr, ptr %5, align 8, !tbaa !5
  %9 = call i32 @nco_crcf_step(ptr noundef %8) #6
  %10 = load <2 x float>, ptr %3, align 8
  %11 = call i32 @gmskframesync_update_fi(ptr noundef %0, <2 x float> noundef %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store float 0.000000e+00, ptr %4, align 4, !tbaa !15
  %12 = getelementptr inbounds i8, ptr %0, i64 120
  %13 = load float, ptr %12, align 8, !tbaa !16
  %14 = call i32 @gmskframesync_update_symsync(ptr noundef %0, float noundef %13, ptr noundef nonnull %4)
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %.thread45, label %15

15:                                               ; preds = %2
  %16 = load float, ptr %4, align 4, !tbaa !15
  %17 = fcmp ogt float %16, 0.000000e+00
  %18 = zext i1 %17 to i8
  %19 = getelementptr inbounds i8, ptr %0, i64 248
  %20 = load ptr, ptr %19, align 8, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %0, i64 348
  %22 = load i32, ptr %21, align 4, !tbaa !18
  %23 = zext i32 %22 to i64
  %24 = getelementptr inbounds i8, ptr %20, i64 %23
  store i8 %18, ptr %24, align 1, !tbaa !19
  %25 = load i32, ptr %21, align 4, !tbaa !18
  %26 = add i32 %25, 1
  store i32 %26, ptr %21, align 4, !tbaa !18
  %27 = getelementptr inbounds i8, ptr %0, i64 240
  %28 = load i32, ptr %27, align 8, !tbaa !20
  %29 = icmp eq i32 %26, %28
  br i1 %29, label %30, label %.thread45

30:                                               ; preds = %15
  %31 = call i32 @gmskframesync_decode_header(ptr noundef nonnull %0)
  %32 = getelementptr inbounds i8, ptr %0, i64 88
  %33 = load i32, ptr %32, align 8, !tbaa !21
  %34 = add i32 %33, 1
  store i32 %34, ptr %32, align 8, !tbaa !21
  %35 = getelementptr inbounds i8, ptr %0, i64 280
  %36 = load i32, ptr %35, align 8, !tbaa !22
  %.not41 = icmp eq i32 %36, 0
  br i1 %.not41, label %37, label %.thread

37:                                               ; preds = %30
  %38 = getelementptr inbounds i8, ptr %0, i64 24
  %39 = load ptr, ptr %38, align 8, !tbaa !23
  %.not42 = icmp eq ptr %39, null
  br i1 %.not42, label %.thread49, label %40

40:                                               ; preds = %37
  %41 = getelementptr inbounds i8, ptr %0, i64 184
  %42 = load float, ptr %41, align 8, !tbaa !24
  %43 = call float @log10f(float noundef %42) #6
  %44 = fmul float %43, 2.000000e+01
  %45 = getelementptr inbounds i8, ptr %0, i64 40
  %46 = getelementptr inbounds i8, ptr %0, i64 44
  store float %44, ptr %46, align 4, !tbaa !25
  store float 0.000000e+00, ptr %45, align 8, !tbaa !26
  %47 = getelementptr inbounds i8, ptr %0, i64 56
  %48 = getelementptr inbounds i8, ptr %0, i64 72
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %47, i8 0, i64 16, i1 false)
  store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, ptr %48, align 8, !tbaa !27
  %49 = load ptr, ptr %38, align 8, !tbaa !23
  %50 = getelementptr inbounds i8, ptr %0, i64 264
  %51 = load ptr, ptr %50, align 8, !tbaa !28
  %52 = load i32, ptr %35, align 8, !tbaa !22
  %53 = getelementptr inbounds i8, ptr %0, i64 32
  %54 = load ptr, ptr %53, align 8, !tbaa !29
  %55 = call i32 %49(ptr noundef %51, i32 noundef %52, ptr noundef null, i32 noundef 0, i32 noundef 0, ptr noundef nonnull byval(%struct.framesyncstats_s) align 8 %45, ptr noundef %54) #6
  %56 = call i32 @gmskframesync_reset(ptr noundef nonnull %0)
  %.pr.pre = load i32, ptr %35, align 8, !tbaa !22
  %57 = icmp eq i32 %.pr.pre, 0
  br i1 %57, label %.thread49, label %.thread

.thread:                                          ; preds = %30, %40
  %58 = getelementptr inbounds i8, ptr %0, i64 340
  store i32 3, ptr %58, align 4, !tbaa !30
  br label %.thread45

.thread49:                                        ; preds = %37, %40
  %59 = call i32 @gmskframesync_reset(ptr noundef nonnull %0)
  br label %.thread45

.thread45:                                        ; preds = %15, %.thread, %2, %.thread49
  %.1 = phi i32 [ %59, %.thread49 ], [ 0, %2 ], [ 0, %.thread ], [ 0, %15 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret i32 %.1
}

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

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

declare i32 @nco_crcf_step(ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @log10f(float noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { 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 = { "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 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 200}
!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 = !{!11, !11, i64 0}
!16 = !{!6, !11, i64 120}
!17 = !{!6, !7, i64 248}
!18 = !{!6, !10, i64 348}
!19 = !{!8, !8, i64 0}
!20 = !{!6, !10, i64 240}
!21 = !{!6, !10, i64 88}
!22 = !{!6, !10, i64 280}
!23 = !{!6, !7, i64 24}
!24 = !{!6, !11, i64 184}
!25 = !{!6, !11, i64 44}
!26 = !{!6, !11, i64 40}
!27 = !{!10, !10, i64 0}
!28 = !{!6, !7, i64 264}
!29 = !{!6, !7, i64 32}
!30 = !{!6, !10, i64 340}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass