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

; 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.framesync64_s = type { ptr, ptr, %struct.framesyncstats_s, %struct.framedatastats_s, i32, float, ptr, [64 x { float, float }], [64 x { float, float }], [600 x { float, float }], [72 x i8], ptr, ptr, i32, ptr, ptr, ptr, 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 [84 x i8], align 1
@__PRETTY_FUNCTION__.framesync64_create = external hidden unnamed_addr constant [59 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @framesync64_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 ptr, align 8
  %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 6056) #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.framesync64_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.framesync64_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.framesync64_s, ptr %19, i32 0, i32 4
  store i32 7, ptr %20, align 8, !tbaa !17
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.framesync64_s, ptr %21, i32 0, i32 5
  store float 0x3FD3333340000000, ptr %22, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %23 = call ptr @msequence_create(i32 noundef 7, i32 noundef 137, i32 noundef 1)
  store ptr %23, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !19
  br label %24

24:                                               ; preds = %65, %2
  %25 = load i32, ptr %6, align 4, !tbaa !19
  %26 = icmp ult i32 %25, 64
  br i1 %26, label %27, label %68

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

65:                                               ; preds = %27
  %66 = load i32, ptr %6, align 4, !tbaa !19
  %67 = add i32 %66, 1
  store i32 %67, ptr %6, align 4, !tbaa !19
  br label %24, !llvm.loop !20

68:                                               ; preds = %24
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = call i32 @msequence_destroy(ptr noundef %69)
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.framesync64_s, ptr %71, i32 0, i32 7
  %73 = getelementptr inbounds [64 x { float, float }], ptr %72, i64 0, i64 0
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.framesync64_s, ptr %74, i32 0, i32 4
  %76 = load i32, ptr %75, align 8, !tbaa !17
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.framesync64_s, ptr %77, i32 0, i32 5
  %79 = load float, ptr %78, align 4, !tbaa !18
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = call ptr @qdsync_cccf_create_linear(ptr noundef %73, i32 noundef 64, i32 noundef 7, i32 noundef 2, i32 noundef %76, float noundef %79, ptr noundef @framesync64_callback_internal, ptr noundef %80)
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.framesync64_s, ptr %82, i32 0, i32 6
  store ptr %81, ptr %83, align 8, !tbaa !22
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.framesync64_s, ptr %84, i32 0, i32 6
  %86 = load ptr, ptr %85, align 8, !tbaa !22
  %87 = call i32 @qdsync_cccf_set_buf_len(ptr noundef %86, i32 noundef 694)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 5, ptr %8, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 7, ptr %10, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 40, ptr %11, align 4, !tbaa !19
  %88 = call ptr (...) @qpacketmodem_create()
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.framesync64_s, ptr %89, i32 0, i32 11
  store ptr %88, ptr %90, align 8, !tbaa !23
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.framesync64_s, ptr %91, i32 0, i32 11
  %93 = load ptr, ptr %92, align 8, !tbaa !23
  %94 = load i32, ptr %8, align 4, !tbaa !19
  %95 = load i32, ptr %9, align 4, !tbaa !19
  %96 = load i32, ptr %10, align 4, !tbaa !19
  %97 = load i32, ptr %11, align 4, !tbaa !19
  %98 = call i32 @qpacketmodem_configure(ptr noundef %93, i32 noundef 72, i32 noundef %94, i32 noundef %95, i32 noundef %96, i32 noundef %97)
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.framesync64_s, ptr %99, i32 0, i32 11
  %101 = load ptr, ptr %100, align 8, !tbaa !23
  %102 = call i32 @qpacketmodem_get_frame_len(ptr noundef %101)
  %103 = icmp eq i32 %102, 600
  br i1 %103, label %104, label %105

104:                                              ; preds = %68
  br label %106

105:                                              ; preds = %68
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 111, ptr noundef @__PRETTY_FUNCTION__.framesync64_create) #7
  unreachable

106:                                              ; preds = %104
  %107 = call ptr @qpilotsync_create(i32 noundef 600, i32 noundef 21)
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.framesync64_s, ptr %108, i32 0, i32 12
  store ptr %107, ptr %109, align 8, !tbaa !24
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.framesync64_s, ptr %110, i32 0, i32 12
  %112 = load ptr, ptr %111, align 8, !tbaa !24
  %113 = call i32 @qpilotsync_get_frame_len(ptr noundef %112)
  %114 = icmp eq i32 %113, 630
  br i1 %114, label %115, label %116

115:                                              ; preds = %106
  br label %117

116:                                              ; preds = %106
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 115, ptr noundef @__PRETTY_FUNCTION__.framesync64_create) #7
  unreachable

117:                                              ; preds = %115
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = call i32 @framesync64_reset_framedatastats(ptr noundef %118)
  %120 = call ptr @windowcf_create(i32 noundef 1440)
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.framesync64_s, ptr %121, i32 0, i32 14
  store ptr %120, ptr %122, align 8, !tbaa !25
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.framesync64_s, ptr %123, i32 0, i32 15
  store ptr null, ptr %124, align 8, !tbaa !26
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.framesync64_s, ptr %125, i32 0, i32 16
  store ptr null, ptr %126, align 8, !tbaa !27
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.framesync64_s, ptr %127, i32 0, i32 17
  store i32 0, ptr %128, align 8, !tbaa !28
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = call i32 @framesync64_set_prefix(ptr noundef %129, ptr noundef @.str.3)
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = call i32 @framesync64_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 8, 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 i32 @msequence_destroy(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

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

declare i32 @qdsync_cccf_set_buf_len(ptr noundef, i32 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 @framesync64_reset_framedatastats(ptr noundef) #0

declare ptr @windowcf_create(i32 noundef) #3

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @framesync64_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 = !{!"framesync64_s", !6, i64 0, !6, i64 8, !11, i64 16, !14, i64 64, !13, i64 88, !12, i64 92, !6, i64 96, !7, i64 104, !7, i64 616, !7, i64 1128, !7, i64 5928, !6, i64 6000, !6, i64 6008, !13, i64 6016, !6, i64 6024, !6, i64 6032, !6, i64 6040, !13, i64 6048}
!11 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !6, i64 16, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44}
!12 = !{!"float", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !15, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!10, !6, i64 8}
!17 = !{!10, !13, i64 88}
!18 = !{!10, !12, i64 92}
!19 = !{!13, !13, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!10, !6, i64 96}
!23 = !{!10, !6, i64 6000}
!24 = !{!10, !6, i64 6008}
!25 = !{!10, !6, i64 6024}
!26 = !{!10, !6, i64 6032}
!27 = !{!10, !6, i64 6040}
!28 = !{!10, !13, i64 6048}


; 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 [84 x i8], align 1
@__PRETTY_FUNCTION__.framesync64_create = external hidden unnamed_addr constant [59 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @framesync64_create(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = tail call noalias dereferenceable_or_null(6056) ptr @malloc(i64 noundef 6056) #6
  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 88
  store i32 7, ptr %5, align 8, !tbaa !16
  %6 = getelementptr inbounds i8, ptr %3, i64 92
  store float 0x3FD3333340000000, ptr %6, align 4, !tbaa !17
  %7 = tail call ptr @msequence_create(i32 noundef 7, i32 noundef 137, i32 noundef 1) #7
  %8 = getelementptr inbounds i8, ptr %3, i64 104
  br label %9

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

20:                                               ; preds = %9
  %21 = tail call i32 @msequence_destroy(ptr noundef %7) #7
  %22 = tail call ptr @qdsync_cccf_create_linear(ptr noundef nonnull %8, i32 noundef 64, i32 noundef 7, i32 noundef 2, i32 noundef 7, float noundef 0x3FD3333340000000, ptr noundef nonnull @framesync64_callback_internal, ptr noundef nonnull %3) #7
  %23 = getelementptr inbounds i8, ptr %3, i64 96
  store ptr %22, ptr %23, align 8, !tbaa !20
  %24 = tail call i32 @qdsync_cccf_set_buf_len(ptr noundef %22, i32 noundef 694) #7
  %25 = tail call ptr (...) @qpacketmodem_create() #7
  %26 = getelementptr inbounds i8, ptr %3, i64 6000
  store ptr %25, ptr %26, align 8, !tbaa !21
  %27 = tail call i32 @qpacketmodem_configure(ptr noundef %25, i32 noundef 72, i32 noundef 5, i32 noundef 1, i32 noundef 7, i32 noundef 40) #7
  %28 = load ptr, ptr %26, align 8, !tbaa !21
  %29 = tail call i32 @qpacketmodem_get_frame_len(ptr noundef %28) #7
  %30 = icmp eq i32 %29, 600
  br i1 %30, label %32, label %31

31:                                               ; preds = %20
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 111, ptr noundef nonnull @__PRETTY_FUNCTION__.framesync64_create) #8
  unreachable

32:                                               ; preds = %20
  %33 = tail call ptr @qpilotsync_create(i32 noundef 600, i32 noundef 21) #7
  %34 = getelementptr inbounds i8, ptr %3, i64 6008
  store ptr %33, ptr %34, align 8, !tbaa !22
  %35 = tail call i32 @qpilotsync_get_frame_len(ptr noundef %33) #7
  %36 = icmp eq i32 %35, 630
  br i1 %36, label %38, label %37

37:                                               ; preds = %32
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 115, ptr noundef nonnull @__PRETTY_FUNCTION__.framesync64_create) #8
  unreachable

38:                                               ; preds = %32
  %39 = tail call i32 @framesync64_reset_framedatastats(ptr noundef nonnull %3)
  %40 = tail call ptr @windowcf_create(i32 noundef 1440) #7
  %41 = getelementptr inbounds i8, ptr %3, i64 6024
  store ptr %40, ptr %41, align 8, !tbaa !23
  %42 = getelementptr inbounds i8, ptr %3, i64 6032
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %42, i8 0, i64 20, i1 false)
  %43 = tail call i32 @framesync64_set_prefix(ptr noundef nonnull %3, ptr noundef nonnull @.str.3)
  %44 = tail call i32 @framesync64_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 i32 @msequence_destroy(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

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

declare i32 @qdsync_cccf_set_buf_len(ptr noundef, i32 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 @framesync64_reset_framedatastats(ptr noundef) local_unnamed_addr #0

declare ptr @windowcf_create(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @framesync64_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

; 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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { nounwind }
attributes #8 = { 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 = !{!"framesync64_s", !7, i64 0, !7, i64 8, !10, i64 16, !13, i64 64, !12, i64 88, !11, i64 92, !7, i64 96, !8, i64 104, !8, i64 616, !8, i64 1128, !8, i64 5928, !7, i64 6000, !7, i64 6008, !12, i64 6016, !7, i64 6024, !7, i64 6032, !7, i64 6040, !12, i64 6048}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44}
!11 = !{!"float", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !14, i64 16}
!14 = !{!"long", !8, i64 0}
!15 = !{!6, !7, i64 8}
!16 = !{!6, !12, i64 88}
!17 = !{!6, !11, i64 92}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!6, !7, i64 96}
!21 = !{!6, !7, i64 6000}
!22 = !{!6, !7, i64 6008}
!23 = !{!6, !7, i64 6024}


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