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

; 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.dsssframe64sync_s = type { ptr, ptr, i32, float, i32, %struct.framesyncstats_s, %struct.framedatastats_s, [1024 x { float, float }], [1024 x { float, float }], [650 x { float, float }], [600 x { float, float }], [72 x i8], ptr, ptr, { float, float }, ptr, ptr, 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 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@__PRETTY_FUNCTION__.dsssframe64sync_create = external hidden unnamed_addr constant [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @dsssframe64sync_callback_internal(ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local ptr @dsssframe64sync_create(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %12 = call noalias ptr @malloc(i64 noundef 26616) #6
  store ptr %12, ptr %5, align 8, !tbaa !5
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %14, i32 0, i32 0
  store ptr %13, ptr %15, align 8, !tbaa !9
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %17, i32 0, i32 1
  store ptr %16, ptr %18, align 8, !tbaa !16
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %19, i32 0, i32 2
  store i32 15, ptr %20, align 8, !tbaa !17
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %21, i32 0, i32 3
  store float 0x3FC99999A0000000, ptr %22, align 4, !tbaa !18
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %23, i32 0, i32 4
  store i32 80, ptr %24, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %25 = call ptr @msequence_create(i32 noundef 11, i32 noundef 1280, i32 noundef 1)
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %26, i32 0, i32 13
  store ptr %25, ptr %27, align 8, !tbaa !20
  store i32 0, ptr %6, align 4, !tbaa !21
  br label %28

28:                                               ; preds = %73, %2
  %29 = load i32, ptr %6, align 4, !tbaa !21
  %30 = icmp ult i32 %29, 1024
  br i1 %30, label %31, label %76

31:                                               ; preds = %28
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %32, i32 0, i32 13
  %34 = load ptr, ptr %33, align 8, !tbaa !20
  %35 = call i32 @msequence_advance(ptr noundef %34)
  %36 = icmp ne i32 %35, 0
  %37 = zext i1 %36 to i64
  %38 = select i1 %36, double 0x3FE6A09E667F3BCD, double 0xBFE6A09E667F3BCD
  %39 = fptrunc double %38 to float
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %40, i32 0, i32 7
  %42 = load i32, ptr %6, align 4, !tbaa !21
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds [1024 x { float, float }], ptr %41, i64 0, i64 %43
  %45 = getelementptr inbounds { float, float }, ptr %44, i32 0, i32 0
  %46 = getelementptr inbounds { float, float }, ptr %44, i32 0, i32 1
  store float %39, ptr %45, align 8
  store float 0.000000e+00, ptr %46, align 4
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %47, i32 0, i32 13
  %49 = load ptr, ptr %48, align 8, !tbaa !20
  %50 = call i32 @msequence_advance(ptr noundef %49)
  %51 = icmp ne i32 %50, 0
  %52 = zext i1 %51 to i64
  %53 = select i1 %51, double 0x3FE6A09E667F3BCD, double 0xBFE6A09E667F3BCD
  %54 = fmul double %53, 0.000000e+00
  %55 = fmul double %53, 1.000000e+00
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %56, i32 0, i32 7
  %58 = load i32, ptr %6, align 4, !tbaa !21
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds [1024 x { float, float }], ptr %57, i64 0, i64 %59
  %61 = getelementptr inbounds { float, float }, ptr %60, i32 0, i32 0
  %62 = load float, ptr %61, align 8
  %63 = getelementptr inbounds { float, float }, ptr %60, i32 0, i32 1
  %64 = load float, ptr %63, align 4
  %65 = fpext float %62 to double
  %66 = fpext float %64 to double
  %67 = fadd double %65, %54
  %68 = fadd double %66, %55
  %69 = fptrunc double %67 to float
  %70 = fptrunc double %68 to float
  %71 = getelementptr inbounds { float, float }, ptr %60, i32 0, i32 0
  %72 = getelementptr inbounds { float, float }, ptr %60, i32 0, i32 1
  store float %69, ptr %71, align 8
  store float %70, ptr %72, align 4
  br label %73

73:                                               ; preds = %31
  %74 = load i32, ptr %6, align 4, !tbaa !21
  %75 = add i32 %74, 1
  store i32 %75, ptr %6, align 4, !tbaa !21
  br label %28, !llvm.loop !22

76:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 2, ptr %7, align 4, !tbaa !21
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %77, i32 0, i32 7
  %79 = getelementptr inbounds [1024 x { float, float }], ptr %78, i64 0, i64 0
  %80 = load i32, ptr %7, align 4, !tbaa !21
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %81, i32 0, i32 2
  %83 = load i32, ptr %82, align 8, !tbaa !17
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %84, i32 0, i32 3
  %86 = load float, ptr %85, align 4, !tbaa !18
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = call ptr @qdsync_cccf_create_linear(ptr noundef %79, i32 noundef 1024, i32 noundef 7, i32 noundef %80, i32 noundef %83, float noundef %86, ptr noundef @dsssframe64sync_callback_internal, ptr noundef %87)
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %89, i32 0, i32 12
  store ptr %88, ptr %90, align 8, !tbaa !24
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %91, i32 0, i32 12
  %93 = load ptr, ptr %92, align 8, !tbaa !24
  %94 = call i32 @qdsync_cccf_set_threshold(ptr noundef %93, float noundef 0x3FB8D4FE00000000)
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %95, i32 0, i32 12
  %97 = load ptr, ptr %96, align 8, !tbaa !24
  %98 = call i32 @qdsync_cccf_set_range(ptr noundef %97, float noundef 0x3F789374C0000000)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 5, ptr %8, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 7, ptr %10, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 40, ptr %11, align 4, !tbaa !21
  %99 = call ptr (...) @qpacketmodem_create()
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %100, i32 0, i32 15
  store ptr %99, ptr %101, align 8, !tbaa !25
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %102, i32 0, i32 15
  %104 = load ptr, ptr %103, align 8, !tbaa !25
  %105 = load i32, ptr %8, align 4, !tbaa !21
  %106 = load i32, ptr %9, align 4, !tbaa !21
  %107 = load i32, ptr %10, align 4, !tbaa !21
  %108 = load i32, ptr %11, align 4, !tbaa !21
  %109 = call i32 @qpacketmodem_configure(ptr noundef %104, i32 noundef 72, i32 noundef %105, i32 noundef %106, i32 noundef %107, i32 noundef %108)
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %110, i32 0, i32 15
  %112 = load ptr, ptr %111, align 8, !tbaa !25
  %113 = call i32 @qpacketmodem_get_frame_len(ptr noundef %112)
  %114 = icmp eq i32 %113, 600
  br i1 %114, label %115, label %116

115:                                              ; preds = %76
  br label %117

116:                                              ; preds = %76
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 122, ptr noundef @__PRETTY_FUNCTION__.dsssframe64sync_create) #7
  unreachable

117:                                              ; preds = %115
  %118 = call ptr @qpilotsync_create(i32 noundef 600, i32 noundef 13)
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %119, i32 0, i32 16
  store ptr %118, ptr %120, align 8, !tbaa !26
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.dsssframe64sync_s, ptr %121, i32 0, i32 16
  %123 = load ptr, ptr %122, align 8, !tbaa !26
  %124 = call i32 @qpilotsync_get_frame_len(ptr noundef %123)
  %125 = icmp eq i32 %124, 650
  br i1 %125, label %126, label %127

126:                                              ; preds = %117
  br label %128

127:                                              ; preds = %117
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 126, ptr noundef @__PRETTY_FUNCTION__.dsssframe64sync_create) #7
  unreachable

128:                                              ; preds = %126
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = call i32 @dsssframe64sync_reset_framedatastats(ptr noundef %129)
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = call i32 @dsssframe64sync_reset(ptr noundef %131)
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  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 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret ptr %133
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

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

declare i32 @msequence_advance(ptr noundef) #3

declare ptr @qdsync_cccf_create_linear(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) #3

declare i32 @qdsync_cccf_set_threshold(ptr noundef, float noundef) #3

declare i32 @qdsync_cccf_set_range(ptr noundef, float noundef) #3

declare ptr @qpacketmodem_create(...) #3

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

declare i32 @qpacketmodem_get_frame_len(ptr noundef) #3

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

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

declare i32 @qpilotsync_get_frame_len(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @dsssframe64sync_reset_framedatastats(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @dsssframe64sync_reset(ptr noundef) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind allocsize(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 #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 = { 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 = { nounwind allocsize(0) }
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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"dsssframe64sync_s", !6, i64 0, !6, i64 8, !11, i64 16, !12, i64 20, !11, i64 24, !13, i64 32, !14, i64 80, !7, i64 104, !7, i64 8296, !7, i64 16488, !7, i64 21688, !7, i64 26488, !6, i64 26560, !6, i64 26568, !7, i64 26576, !6, i64 26584, !6, i64 26592, !11, i64 26600, !11, i64 26604, !11, i64 26608}
!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 8}
!17 = !{!10, !11, i64 16}
!18 = !{!10, !12, i64 20}
!19 = !{!10, !11, i64 24}
!20 = !{!10, !6, i64 26568}
!21 = !{!11, !11, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!10, !6, i64 26560}
!25 = !{!10, !6, i64 26584}
!26 = !{!10, !6, i64 26592}


; 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 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@__PRETTY_FUNCTION__.dsssframe64sync_create = external hidden unnamed_addr constant [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @dsssframe64sync_callback_internal(ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @dsssframe64sync_create(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = tail call noalias dereferenceable_or_null(26616) ptr @malloc(i64 noundef 26616) #5
  store ptr %0, ptr %3, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %1, ptr %4, align 8, !tbaa !15
  %5 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 15, ptr %5, align 8, !tbaa !16
  %6 = getelementptr inbounds i8, ptr %3, i64 20
  store float 0x3FC99999A0000000, ptr %6, align 4, !tbaa !17
  %7 = getelementptr inbounds i8, ptr %3, i64 24
  store i32 80, ptr %7, align 8, !tbaa !18
  %8 = tail call ptr @msequence_create(i32 noundef 11, i32 noundef 1280, i32 noundef 1) #6
  %9 = getelementptr inbounds i8, ptr %3, i64 26568
  store ptr %8, ptr %9, align 8, !tbaa !19
  %10 = getelementptr inbounds i8, ptr %3, i64 104
  br label %11

11:                                               ; preds = %2, %11
  %indvars.iv = phi i64 [ 0, %2 ], [ %indvars.iv.next, %11 ]
  %12 = load ptr, ptr %9, align 8, !tbaa !19
  %13 = tail call i32 @msequence_advance(ptr noundef %12) #6
  %.not = icmp eq i32 %13, 0
  %14 = select i1 %.not, float 0xBFE6A09E60000000, float 0x3FE6A09E60000000
  %15 = getelementptr inbounds [1024 x { float, float }], ptr %10, i64 0, i64 %indvars.iv
  %16 = getelementptr inbounds i8, ptr %15, i64 4
  store float %14, ptr %15, align 8
  store float 0.000000e+00, ptr %16, align 4
  %17 = load ptr, ptr %9, align 8, !tbaa !19
  %18 = tail call i32 @msequence_advance(ptr noundef %17) #6
  %.not35 = icmp eq i32 %18, 0
  %19 = select i1 %.not35, double 0xBFE6A09E667F3BCD, double 0x3FE6A09E667F3BCD
  %20 = tail call double @llvm.copysign.f64(double 0.000000e+00, double %19)
  %21 = fpext float %14 to double
  %22 = fadd double %20, %21
  %23 = insertelement <2 x double> poison, double %22, i64 0
  %24 = insertelement <2 x double> %23, double %19, i64 1
  %25 = fptrunc <2 x double> %24 to <2 x float>
  store <2 x float> %25, ptr %15, align 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1024
  br i1 %exitcond.not, label %26, label %11, !llvm.loop !20

26:                                               ; preds = %11
  %27 = tail call ptr @qdsync_cccf_create_linear(ptr noundef nonnull %10, i32 noundef 1024, i32 noundef 7, i32 noundef 2, i32 noundef 15, float noundef 0x3FC99999A0000000, ptr noundef nonnull @dsssframe64sync_callback_internal, ptr noundef nonnull %3) #6
  %28 = getelementptr inbounds i8, ptr %3, i64 26560
  store ptr %27, ptr %28, align 8, !tbaa !22
  %29 = tail call i32 @qdsync_cccf_set_threshold(ptr noundef %27, float noundef 0x3FB8D4FE00000000) #6
  %30 = load ptr, ptr %28, align 8, !tbaa !22
  %31 = tail call i32 @qdsync_cccf_set_range(ptr noundef %30, float noundef 0x3F789374C0000000) #6
  %32 = tail call ptr (...) @qpacketmodem_create() #6
  %33 = getelementptr inbounds i8, ptr %3, i64 26584
  store ptr %32, ptr %33, align 8, !tbaa !23
  %34 = tail call i32 @qpacketmodem_configure(ptr noundef %32, i32 noundef 72, i32 noundef 5, i32 noundef 1, i32 noundef 7, i32 noundef 40) #6
  %35 = load ptr, ptr %33, align 8, !tbaa !23
  %36 = tail call i32 @qpacketmodem_get_frame_len(ptr noundef %35) #6
  %37 = icmp eq i32 %36, 600
  br i1 %37, label %39, label %38

38:                                               ; preds = %26
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 122, ptr noundef nonnull @__PRETTY_FUNCTION__.dsssframe64sync_create) #7
  unreachable

39:                                               ; preds = %26
  %40 = tail call ptr @qpilotsync_create(i32 noundef 600, i32 noundef 13) #6
  %41 = getelementptr inbounds i8, ptr %3, i64 26592
  store ptr %40, ptr %41, align 8, !tbaa !24
  %42 = tail call i32 @qpilotsync_get_frame_len(ptr noundef %40) #6
  %43 = icmp eq i32 %42, 650
  br i1 %43, label %45, label %44

44:                                               ; preds = %39
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 126, ptr noundef nonnull @__PRETTY_FUNCTION__.dsssframe64sync_create) #7
  unreachable

45:                                               ; preds = %39
  %46 = tail call i32 @dsssframe64sync_reset_framedatastats(ptr noundef nonnull %3)
  %47 = tail call i32 @dsssframe64sync_reset(ptr noundef nonnull %3)
  ret ptr %3
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

declare ptr @msequence_create(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @msequence_advance(ptr noundef) local_unnamed_addr #2

declare ptr @qdsync_cccf_create_linear(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @qdsync_cccf_set_threshold(ptr noundef, float noundef) local_unnamed_addr #2

declare i32 @qdsync_cccf_set_range(ptr noundef, float noundef) local_unnamed_addr #2

declare ptr @qpacketmodem_create(...) local_unnamed_addr #2

declare i32 @qpacketmodem_configure(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @qpacketmodem_get_frame_len(ptr noundef) local_unnamed_addr #2

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

declare ptr @qpilotsync_create(i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @qpilotsync_get_frame_len(ptr noundef) local_unnamed_addr #2

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

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

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

attributes #0 = { 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 #1 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind allocsize(0) }
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 0}
!6 = !{!"dsssframe64sync_s", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 20, !10, i64 24, !12, i64 32, !13, i64 80, !8, i64 104, !8, i64 8296, !8, i64 16488, !8, i64 21688, !8, i64 26488, !7, i64 26560, !7, i64 26568, !8, i64 26576, !7, i64 26584, !7, i64 26592, !10, i64 26600, !10, i64 26604, !10, i64 26608}
!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 8}
!16 = !{!6, !10, i64 16}
!17 = !{!6, !11, i64 20}
!18 = !{!6, !10, i64 24}
!19 = !{!6, !7, i64 26568}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!6, !7, i64 26560}
!23 = !{!6, !7, i64 26584}
!24 = !{!6, !7, i64 26592}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass