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

42:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  %43 = load float, ptr %8, align 4, !tbaa !16
  %44 = fcmp ogt float %43, 0.000000e+00
  %45 = zext i1 %44 to i64
  %46 = select i1 %44, i32 1, i32 0
  %47 = trunc i32 %46 to i8
  store i8 %47, ptr %10, align 1, !tbaa !19
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.gmskframesync_s, ptr %48, i32 0, i32 35
  %50 = load i8, ptr %49, align 4, !tbaa !20
  %51 = sext i8 %50 to i32
  %52 = shl i32 %51, 1
  %53 = trunc i32 %52 to i8
  store i8 %53, ptr %49, align 4, !tbaa !20
  %54 = load i8, ptr %10, align 1, !tbaa !19
  %55 = zext i8 %54 to i32
  %56 = icmp ne i32 %55, 0
  %57 = zext i1 %56 to i64
  %58 = select i1 %56, i32 1, i32 0
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.gmskframesync_s, ptr %59, i32 0, i32 35
  %61 = load i8, ptr %60, align 4, !tbaa !20
  %62 = sext i8 %61 to i32
  %63 = or i32 %62, %58
  %64 = trunc i32 %63 to i8
  store i8 %64, ptr %60, align 4, !tbaa !20
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.gmskframesync_s, ptr %65, i32 0, i32 35
  %67 = load i8, ptr %66, align 4, !tbaa !20
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.gmskframesync_s, ptr %68, i32 0, i32 41
  %70 = load ptr, ptr %69, align 8, !tbaa !21
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.gmskframesync_s, ptr %71, i32 0, i32 48
  %73 = load i32, ptr %72, align 8, !tbaa !22
  %74 = udiv i32 %73, 8
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds i8, ptr %70, i64 %75
  store i8 %67, ptr %76, align 1, !tbaa !19
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.gmskframesync_s, ptr %77, i32 0, i32 48
  %79 = load i32, ptr %78, align 8, !tbaa !22
  %80 = add i32 %79, 1
  store i32 %80, ptr %78, align 8, !tbaa !22
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.gmskframesync_s, ptr %81, i32 0, i32 48
  %83 = load i32, ptr %82, align 8, !tbaa !22
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.gmskframesync_s, ptr %84, i32 0, i32 39
  %86 = load i32, ptr %85, align 4, !tbaa !23
  %87 = mul i32 8, %86
  %88 = icmp eq i32 %83, %87
  br i1 %88, label %89, label %197

89:                                               ; preds = %42
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.gmskframesync_s, ptr %90, i32 0, i32 43
  %92 = load ptr, ptr %91, align 8, !tbaa !24
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.gmskframesync_s, ptr %93, i32 0, i32 41
  %95 = load ptr, ptr %94, align 8, !tbaa !21
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.gmskframesync_s, ptr %96, i32 0, i32 42
  %98 = load ptr, ptr %97, align 8, !tbaa !25
  %99 = call i32 @packetizer_decode(ptr noundef %92, ptr noundef %95, ptr noundef %98)
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.gmskframesync_s, ptr %100, i32 0, i32 44
  store i32 %99, ptr %101, align 8, !tbaa !26
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.gmskframesync_s, ptr %102, i32 0, i32 7
  %104 = getelementptr inbounds %struct.framedatastats_s, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %104, align 4, !tbaa !27
  %106 = add i32 %105, 1
  store i32 %106, ptr %104, align 4, !tbaa !27
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.gmskframesync_s, ptr %107, i32 0, i32 44
  %109 = load i32, ptr %108, align 8, !tbaa !26
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.gmskframesync_s, ptr %110, i32 0, i32 7
  %112 = getelementptr inbounds %struct.framedatastats_s, ptr %111, i32 0, i32 2
  %113 = load i32, ptr %112, align 8, !tbaa !28
  %114 = add i32 %113, %109
  store i32 %114, ptr %112, align 8, !tbaa !28
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.gmskframesync_s, ptr %115, i32 0, i32 40
  %117 = load i32, ptr %116, align 8, !tbaa !29
  %118 = zext i32 %117 to i64
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.gmskframesync_s, ptr %119, i32 0, i32 7
  %121 = getelementptr inbounds %struct.framedatastats_s, ptr %120, i32 0, i32 3
  %122 = load i64, ptr %121, align 8, !tbaa !30
  %123 = add i64 %122, %118
  store i64 %123, ptr %121, align 8, !tbaa !30
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.gmskframesync_s, ptr %124, i32 0, i32 4
  %126 = load ptr, ptr %125, align 8, !tbaa !31
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %194

128:                                              ; preds = %89
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.gmskframesync_s, ptr %129, i32 0, i32 21
  %131 = load float, ptr %130, align 8, !tbaa !32
  %132 = call float @log10f(float noundef %131) #5
  %133 = fmul float 2.000000e+01, %132
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.gmskframesync_s, ptr %134, i32 0, i32 6
  %136 = getelementptr inbounds %struct.framesyncstats_s, ptr %135, i32 0, i32 1
  store float %133, ptr %136, align 4, !tbaa !33
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.gmskframesync_s, ptr %137, i32 0, i32 6
  %139 = getelementptr inbounds %struct.framesyncstats_s, ptr %138, i32 0, i32 0
  store float 0.000000e+00, ptr %139, align 8, !tbaa !34
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.gmskframesync_s, ptr %140, i32 0, i32 6
  %142 = getelementptr inbounds %struct.framesyncstats_s, ptr %141, i32 0, i32 3
  store ptr null, ptr %142, align 8, !tbaa !35
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.gmskframesync_s, ptr %143, i32 0, i32 6
  %145 = getelementptr inbounds %struct.framesyncstats_s, ptr %144, i32 0, i32 4
  store i32 0, ptr %145, align 8, !tbaa !36
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.gmskframesync_s, ptr %146, i32 0, i32 6
  %148 = getelementptr inbounds %struct.framesyncstats_s, ptr %147, i32 0, i32 5
  store i32 0, ptr %148, align 4, !tbaa !37
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.gmskframesync_s, ptr %149, i32 0, i32 6
  %151 = getelementptr inbounds %struct.framesyncstats_s, ptr %150, i32 0, i32 6
  store i32 1, ptr %151, align 8, !tbaa !38
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.gmskframesync_s, ptr %152, i32 0, i32 36
  %154 = load i32, ptr %153, align 8, !tbaa !39
  %155 = load ptr, ptr %4, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.gmskframesync_s, ptr %155, i32 0, i32 6
  %157 = getelementptr inbounds %struct.framesyncstats_s, ptr %156, i32 0, i32 7
  store i32 %154, ptr %157, align 4, !tbaa !40
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.gmskframesync_s, ptr %158, i32 0, i32 37
  %160 = load i32, ptr %159, align 4, !tbaa !41
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.gmskframesync_s, ptr %161, i32 0, i32 6
  %163 = getelementptr inbounds %struct.framesyncstats_s, ptr %162, i32 0, i32 8
  store i32 %160, ptr %163, align 8, !tbaa !42
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.gmskframesync_s, ptr %164, i32 0, i32 38
  %166 = load i32, ptr %165, align 8, !tbaa !43
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.gmskframesync_s, ptr %167, i32 0, i32 6
  %169 = getelementptr inbounds %struct.framesyncstats_s, ptr %168, i32 0, i32 9
  store i32 %166, ptr %169, align 4, !tbaa !44
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.gmskframesync_s, ptr %170, i32 0, i32 4
  %172 = load ptr, ptr %171, align 8, !tbaa !31
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.gmskframesync_s, ptr %173, i32 0, i32 32
  %175 = load ptr, ptr %174, align 8, !tbaa !45
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.gmskframesync_s, ptr %176, i32 0, i32 34
  %178 = load i32, ptr %177, align 8, !tbaa !46
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.gmskframesync_s, ptr %179, i32 0, i32 42
  %181 = load ptr, ptr %180, align 8, !tbaa !25
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.gmskframesync_s, ptr %182, i32 0, i32 40
  %184 = load i32, ptr %183, align 8, !tbaa !29
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.gmskframesync_s, ptr %185, i32 0, i32 44
  %187 = load i32, ptr %186, align 8, !tbaa !26
  %188 = load ptr, ptr %4, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.gmskframesync_s, ptr %188, i32 0, i32 6
  %190 = load ptr, ptr %4, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.gmskframesync_s, ptr %190, i32 0, i32 5
  %192 = load ptr, ptr %191, align 8, !tbaa !47
  %193 = call i32 %172(ptr noundef %175, i32 noundef %178, ptr noundef %181, i32 noundef %184, i32 noundef %187, ptr noundef byval(%struct.framesyncstats_s) align 8 %189, ptr noundef %192)
  br label %194

194:                                              ; preds = %128, %89
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = call i32 @gmskframesync_reset(ptr noundef %195)
  br label %197

197:                                              ; preds = %194, %42
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  br label %198

198:                                              ; preds = %197, %2
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret i32 0
}

; 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
declare float @log10f(float noundef) #4

declare i32 @packetizer_decode(ptr noundef, ptr noundef, ptr noundef) #3

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, !7, i64 284}
!21 = !{!10, !6, i64 312}
!22 = !{!10, !11, i64 352}
!23 = !{!10, !11, i64 300}
!24 = !{!10, !6, i64 328}
!25 = !{!10, !6, i64 320}
!26 = !{!10, !11, i64 336}
!27 = !{!10, !11, i64 92}
!28 = !{!10, !11, i64 96}
!29 = !{!10, !11, i64 304}
!30 = !{!10, !15, i64 104}
!31 = !{!10, !6, i64 24}
!32 = !{!10, !12, i64 184}
!33 = !{!10, !12, i64 44}
!34 = !{!10, !12, i64 40}
!35 = !{!10, !6, i64 56}
!36 = !{!10, !11, i64 64}
!37 = !{!10, !11, i64 68}
!38 = !{!10, !11, i64 72}
!39 = !{!10, !11, i64 288}
!40 = !{!10, !11, i64 76}
!41 = !{!10, !11, i64 292}
!42 = !{!10, !11, i64 80}
!43 = !{!10, !11, i64 296}
!44 = !{!10, !11, i64 84}
!45 = !{!10, !6, i64 264}
!46 = !{!10, !11, i64 280}
!47 = !{!10, !6, i64 32}


; 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 noundef i32 @gmskframesync_execute_rxpayload(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 %84, label %15

15:                                               ; preds = %2
  %16 = load float, ptr %4, align 4, !tbaa !15
  %17 = fcmp ogt float %16, 0.000000e+00
  %18 = getelementptr inbounds i8, ptr %0, i64 284
  %19 = load i8, ptr %18, align 4, !tbaa !17
  %20 = shl i8 %19, 1
  %21 = zext i1 %17 to i8
  %22 = or disjoint i8 %20, %21
  store i8 %22, ptr %18, align 4, !tbaa !17
  %23 = getelementptr inbounds i8, ptr %0, i64 312
  %24 = load ptr, ptr %23, align 8, !tbaa !18
  %25 = getelementptr inbounds i8, ptr %0, i64 352
  %26 = load i32, ptr %25, align 8, !tbaa !19
  %27 = lshr i32 %26, 3
  %28 = zext nneg i32 %27 to i64
  %29 = getelementptr inbounds i8, ptr %24, i64 %28
  store i8 %22, ptr %29, align 1, !tbaa !20
  %30 = load i32, ptr %25, align 8, !tbaa !19
  %31 = add i32 %30, 1
  store i32 %31, ptr %25, align 8, !tbaa !19
  %32 = getelementptr inbounds i8, ptr %0, i64 300
  %33 = load i32, ptr %32, align 4, !tbaa !21
  %34 = shl i32 %33, 3
  %35 = icmp eq i32 %31, %34
  br i1 %35, label %36, label %84

36:                                               ; preds = %15
  %37 = getelementptr inbounds i8, ptr %0, i64 328
  %38 = load ptr, ptr %37, align 8, !tbaa !22
  %39 = load ptr, ptr %23, align 8, !tbaa !18
  %40 = getelementptr inbounds i8, ptr %0, i64 320
  %41 = load ptr, ptr %40, align 8, !tbaa !23
  %42 = call i32 @packetizer_decode(ptr noundef %38, ptr noundef %39, ptr noundef %41) #6
  %43 = getelementptr inbounds i8, ptr %0, i64 336
  store i32 %42, ptr %43, align 8, !tbaa !24
  %44 = getelementptr inbounds i8, ptr %0, i64 92
  %45 = load <2 x i32>, ptr %44, align 4, !tbaa !25
  %46 = insertelement <2 x i32> <i32 1, i32 poison>, i32 %42, i64 1
  %47 = add <2 x i32> %45, %46
  store <2 x i32> %47, ptr %44, align 4, !tbaa !25
  %48 = getelementptr inbounds i8, ptr %0, i64 304
  %49 = load i32, ptr %48, align 8, !tbaa !26
  %50 = zext i32 %49 to i64
  %51 = getelementptr inbounds i8, ptr %0, i64 104
  %52 = load i64, ptr %51, align 8, !tbaa !27
  %53 = add i64 %52, %50
  store i64 %53, ptr %51, align 8, !tbaa !27
  %54 = getelementptr inbounds i8, ptr %0, i64 24
  %55 = load ptr, ptr %54, align 8, !tbaa !28
  %.not50 = icmp eq ptr %55, null
  br i1 %.not50, label %82, label %56

56:                                               ; preds = %36
  %57 = getelementptr inbounds i8, ptr %0, i64 184
  %58 = load float, ptr %57, align 8, !tbaa !29
  %59 = call float @log10f(float noundef %58) #6
  %60 = fmul float %59, 2.000000e+01
  %61 = getelementptr inbounds i8, ptr %0, i64 40
  %62 = getelementptr inbounds i8, ptr %0, i64 44
  store float %60, ptr %62, align 4, !tbaa !30
  store float 0.000000e+00, ptr %61, align 8, !tbaa !31
  %63 = getelementptr inbounds i8, ptr %0, i64 56
  %64 = getelementptr inbounds i8, ptr %0, i64 72
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %63, i8 0, i64 16, i1 false)
  store i32 1, ptr %64, align 8, !tbaa !32
  %65 = getelementptr inbounds i8, ptr %0, i64 288
  %66 = getelementptr inbounds i8, ptr %0, i64 76
  %67 = load <2 x i32>, ptr %65, align 8, !tbaa !25
  store <2 x i32> %67, ptr %66, align 4, !tbaa !25
  %68 = getelementptr inbounds i8, ptr %0, i64 296
  %69 = load i32, ptr %68, align 8, !tbaa !33
  %70 = getelementptr inbounds i8, ptr %0, i64 84
  store i32 %69, ptr %70, align 4, !tbaa !34
  %71 = load ptr, ptr %54, align 8, !tbaa !28
  %72 = getelementptr inbounds i8, ptr %0, i64 264
  %73 = load ptr, ptr %72, align 8, !tbaa !35
  %74 = getelementptr inbounds i8, ptr %0, i64 280
  %75 = load i32, ptr %74, align 8, !tbaa !36
  %76 = load ptr, ptr %40, align 8, !tbaa !23
  %77 = load i32, ptr %48, align 8, !tbaa !26
  %78 = load i32, ptr %43, align 8, !tbaa !24
  %79 = getelementptr inbounds i8, ptr %0, i64 32
  %80 = load ptr, ptr %79, align 8, !tbaa !37
  %81 = call i32 %71(ptr noundef %73, i32 noundef %75, ptr noundef %76, i32 noundef %77, i32 noundef %78, ptr noundef nonnull byval(%struct.framesyncstats_s) align 8 %61, ptr noundef %80) #6
  br label %82

82:                                               ; preds = %56, %36
  %83 = call i32 @gmskframesync_reset(ptr noundef nonnull %0)
  br label %84

84:                                               ; preds = %15, %82, %2
  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 0
}

; 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: mustprogress nofree nounwind willreturn memory(write)
declare float @log10f(float noundef) local_unnamed_addr #4

declare i32 @packetizer_decode(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; 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, !8, i64 284}
!18 = !{!6, !7, i64 312}
!19 = !{!6, !10, i64 352}
!20 = !{!8, !8, i64 0}
!21 = !{!6, !10, i64 300}
!22 = !{!6, !7, i64 328}
!23 = !{!6, !7, i64 320}
!24 = !{!6, !10, i64 336}
!25 = !{!10, !10, i64 0}
!26 = !{!6, !10, i64 304}
!27 = !{!6, !14, i64 104}
!28 = !{!6, !7, i64 24}
!29 = !{!6, !11, i64 184}
!30 = !{!6, !11, i64 44}
!31 = !{!6, !11, i64 40}
!32 = !{!6, !10, i64 72}
!33 = !{!6, !10, i64 296}
!34 = !{!6, !10, i64 84}
!35 = !{!6, !7, i64 264}
!36 = !{!6, !10, i64 280}
!37 = !{!6, !7, i64 32}


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