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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @dsssframesync_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 ptr, align 8
  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) #6
  %9 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 328) #7
  store ptr %9, ptr %5, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.dsssframesync_s, ptr %11, i32 0, i32 0
  store ptr %10, ptr %12, align 8, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.dsssframesync_s, ptr %14, i32 0, i32 1
  store ptr %13, ptr %15, align 8, !tbaa !17
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.dsssframesync_s, ptr %16, i32 0, i32 4
  store i32 2, ptr %17, align 8, !tbaa !18
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.dsssframesync_s, ptr %18, i32 0, i32 5
  store i32 7, ptr %19, align 4, !tbaa !19
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.dsssframesync_s, ptr %20, i32 0, i32 6
  store float 0x3FD3333340000000, ptr %21, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %22 = call noalias ptr @calloc(i64 noundef 64, i64 noundef 8) #7
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.dsssframesync_s, ptr %23, i32 0, i32 18
  store ptr %22, ptr %24, align 8, !tbaa !21
  %25 = call noalias ptr @calloc(i64 noundef 64, i64 noundef 8) #7
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.dsssframesync_s, ptr %26, i32 0, i32 19
  store ptr %25, ptr %27, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %28 = call ptr @msequence_create(i32 noundef 7, i32 noundef 137, i32 noundef 1)
  store ptr %28, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !23
  br label %29

29:                                               ; preds = %72, %2
  %30 = load i32, ptr %6, align 4, !tbaa !23
  %31 = icmp ult i32 %30, 64
  br i1 %31, label %32, label %75

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

72:                                               ; preds = %32
  %73 = load i32, ptr %6, align 4, !tbaa !23
  %74 = add i32 %73, 1
  store i32 %74, ptr %6, align 4, !tbaa !23
  br label %29, !llvm.loop !24

75:                                               ; preds = %29
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = call i32 @msequence_destroy(ptr noundef %76)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %78 = call noalias ptr @calloc(i64 noundef 64, i64 noundef 8) #7
  store ptr %78, ptr %8, align 8, !tbaa !5
  %79 = call ptr @msequence_create(i32 noundef 7, i32 noundef 203, i32 noundef 83)
  store ptr %79, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !23
  br label %80

80:                                               ; preds = %119, %75
  %81 = load i32, ptr %6, align 4, !tbaa !23
  %82 = icmp ult i32 %81, 64
  br i1 %82, label %83, label %122

83:                                               ; preds = %80
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = call i32 @msequence_advance(ptr noundef %84)
  %86 = icmp ne i32 %85, 0
  %87 = zext i1 %86 to i64
  %88 = select i1 %86, double 0x3FE6A09E667F3BCD, double 0xBFE6A09E667F3BCD
  %89 = fptrunc double %88 to float
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = load i32, ptr %6, align 4, !tbaa !23
  %92 = zext i32 %91 to i64
  %93 = getelementptr inbounds { float, float }, ptr %90, i64 %92
  %94 = getelementptr inbounds { float, float }, ptr %93, i32 0, i32 0
  %95 = getelementptr inbounds { float, float }, ptr %93, i32 0, i32 1
  store float %89, ptr %94, align 4
  store float 0.000000e+00, ptr %95, align 4
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = call i32 @msequence_advance(ptr noundef %96)
  %98 = icmp ne i32 %97, 0
  %99 = zext i1 %98 to i64
  %100 = select i1 %98, double 0x3FE6A09E667F3BCD, double 0xBFE6A09E667F3BCD
  %101 = fmul double %100, 0.000000e+00
  %102 = fmul double %100, 1.000000e+00
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = load i32, ptr %6, align 4, !tbaa !23
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds { float, float }, ptr %103, i64 %105
  %107 = getelementptr inbounds { float, float }, ptr %106, i32 0, i32 0
  %108 = load float, ptr %107, align 4
  %109 = getelementptr inbounds { float, float }, ptr %106, i32 0, i32 1
  %110 = load float, ptr %109, align 4
  %111 = fpext float %108 to double
  %112 = fpext float %110 to double
  %113 = fadd double %111, %101
  %114 = fadd double %112, %102
  %115 = fptrunc double %113 to float
  %116 = fptrunc double %114 to float
  %117 = getelementptr inbounds { float, float }, ptr %106, i32 0, i32 0
  %118 = getelementptr inbounds { float, float }, ptr %106, i32 0, i32 1
  store float %115, ptr %117, align 4
  store float %116, ptr %118, align 4
  br label %119

119:                                              ; preds = %83
  %120 = load i32, ptr %6, align 4, !tbaa !23
  %121 = add i32 %120, 1
  store i32 %121, ptr %6, align 4, !tbaa !23
  br label %80, !llvm.loop !26

122:                                              ; preds = %80
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = call ptr @synth_crcf_create(ptr noundef %123, i32 noundef 64)
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.dsssframesync_s, ptr %125, i32 0, i32 20
  store ptr %124, ptr %126, align 8, !tbaa !27
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = call ptr @synth_crcf_create(ptr noundef %127, i32 noundef 64)
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.dsssframesync_s, ptr %129, i32 0, i32 21
  store ptr %128, ptr %130, align 8, !tbaa !28
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.dsssframesync_s, ptr %131, i32 0, i32 20
  %133 = load ptr, ptr %132, align 8, !tbaa !27
  call void @synth_crcf_pll_set_bandwidth(ptr noundef %133, float noundef 0x3F1A36E2E0000000)
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.dsssframesync_s, ptr %134, i32 0, i32 21
  %136 = load ptr, ptr %135, align 8, !tbaa !28
  call void @synth_crcf_pll_set_bandwidth(ptr noundef %136, float noundef 0x3F1A36E2E0000000)
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %137) #6
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = call i32 @msequence_destroy(ptr noundef %138)
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.dsssframesync_s, ptr %140, i32 0, i32 18
  %142 = load ptr, ptr %141, align 8, !tbaa !21
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.dsssframesync_s, ptr %143, i32 0, i32 4
  %145 = load i32, ptr %144, align 8, !tbaa !18
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.dsssframesync_s, ptr %146, i32 0, i32 5
  %148 = load i32, ptr %147, align 4, !tbaa !19
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.dsssframesync_s, ptr %149, i32 0, i32 6
  %151 = load float, ptr %150, align 8, !tbaa !20
  %152 = call ptr @qdetector_cccf_create_linear(ptr noundef %142, i32 noundef 64, i32 noundef 7, i32 noundef %145, i32 noundef %148, float noundef %151)
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.dsssframesync_s, ptr %153, i32 0, i32 7
  store ptr %152, ptr %154, align 8, !tbaa !29
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.dsssframesync_s, ptr %155, i32 0, i32 7
  %157 = load ptr, ptr %156, align 8, !tbaa !29
  %158 = call i32 @qdetector_cccf_set_threshold(ptr noundef %157, float noundef 5.000000e-01)
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.dsssframesync_s, ptr %159, i32 0, i32 15
  store i32 32, ptr %160, align 8, !tbaa !30
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.dsssframesync_s, ptr %161, i32 0, i32 15
  %163 = load i32, ptr %162, align 8, !tbaa !30
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.dsssframesync_s, ptr %164, i32 0, i32 4
  %166 = load i32, ptr %165, align 8, !tbaa !18
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.dsssframesync_s, ptr %167, i32 0, i32 5
  %169 = load i32, ptr %168, align 4, !tbaa !19
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.dsssframesync_s, ptr %170, i32 0, i32 6
  %172 = load float, ptr %171, align 8, !tbaa !20
  %173 = call ptr @firpfb_crcf_create_rnyquist(i32 noundef 7, i32 noundef %163, i32 noundef %166, i32 noundef %169, float noundef %172)
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.dsssframesync_s, ptr %174, i32 0, i32 14
  store ptr %173, ptr %175, align 8, !tbaa !31
  %176 = call ptr @nco_crcf_create(i32 noundef 0)
  %177 = load ptr, ptr %5, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.dsssframesync_s, ptr %177, i32 0, i32 12
  store ptr %176, ptr %178, align 8, !tbaa !32
  %179 = call ptr @nco_crcf_create(i32 noundef 0)
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.dsssframesync_s, ptr %180, i32 0, i32 13
  store ptr %179, ptr %181, align 8, !tbaa !33
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.dsssframesync_s, ptr %182, i32 0, i32 13
  %184 = load ptr, ptr %183, align 8, !tbaa !33
  %185 = call i32 @nco_crcf_pll_set_bandwidth(ptr noundef %184, float noundef 0x3F1A36E2E0000000)
  %186 = call ptr (...) @qpacketmodem_create()
  %187 = load ptr, ptr %5, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.dsssframesync_s, ptr %187, i32 0, i32 26
  store ptr %186, ptr %188, align 8, !tbaa !34
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.dsssframesync_s, ptr %189, i32 0, i32 27
  store i32 8, ptr %190, align 8, !tbaa !35
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = call i32 @dsssframesync_set_header_props(ptr noundef %191, ptr noundef null)
  %193 = call ptr (...) @qpacketmodem_create()
  %194 = load ptr, ptr %5, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.dsssframesync_s, ptr %194, i32 0, i32 34
  store ptr %193, ptr %195, align 8, !tbaa !36
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.dsssframesync_s, ptr %196, i32 0, i32 33
  store i32 64, ptr %197, align 8, !tbaa !37
  %198 = load ptr, ptr %5, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.dsssframesync_s, ptr %198, i32 0, i32 33
  %200 = load i32, ptr %199, align 8, !tbaa !37
  %201 = zext i32 %200 to i64
  %202 = mul i64 %201, 8
  %203 = call noalias ptr @malloc(i64 noundef %202) #8
  %204 = load ptr, ptr %5, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.dsssframesync_s, ptr %204, i32 0, i32 32
  store ptr %203, ptr %205, align 8, !tbaa !38
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = call i32 @dsssframesync_reset_framedatastats(ptr noundef %206)
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = call i32 @dsssframesync_reset(ptr noundef %208)
  %210 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret ptr %210
}

; 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,1)
declare noalias ptr @calloc(i64 noundef, 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 @synth_crcf_create(ptr noundef, i32 noundef) #3

declare void @synth_crcf_pll_set_bandwidth(ptr noundef, float noundef) #3

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

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

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

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

declare ptr @nco_crcf_create(i32 noundef) #3

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

declare ptr @qpacketmodem_create(...) #3

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @dsssframesync_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,1) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0,1) }
attributes #8 = { nounwind allocsize(0) }

!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 = !{!"dsssframesync_s", !6, i64 0, !6, i64 8, !11, i64 16, !14, i64 64, !13, i64 88, !13, i64 92, !12, i64 96, !6, i64 104, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !6, i64 128, !6, i64 136, !6, i64 144, !13, i64 152, !13, i64 156, !13, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !13, i64 200, !16, i64 204, !6, i64 224, !13, i64 232, !6, i64 240, !13, i64 248, !13, i64 252, !6, i64 256, !13, i64 264, !13, i64 268, !6, i64 272, !13, i64 280, !6, i64 288, !13, i64 296, !6, i64 304, !13, i64 312, !13, i64 316, !13, i64 320, !13, i64 324}
!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 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!17 = !{!10, !6, i64 8}
!18 = !{!10, !13, i64 88}
!19 = !{!10, !13, i64 92}
!20 = !{!10, !12, i64 96}
!21 = !{!10, !6, i64 168}
!22 = !{!10, !6, i64 176}
!23 = !{!13, !13, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = !{!10, !6, i64 184}
!28 = !{!10, !6, i64 192}
!29 = !{!10, !6, i64 104}
!30 = !{!10, !13, i64 152}
!31 = !{!10, !6, i64 144}
!32 = !{!10, !6, i64 128}
!33 = !{!10, !6, i64 136}
!34 = !{!10, !6, i64 240}
!35 = !{!10, !13, i64 248}
!36 = !{!10, !6, i64 288}
!37 = !{!10, !13, i64 280}
!38 = !{!10, !6, i64 272}


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

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @dsssframesync_create(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = tail call noalias dereferenceable_or_null(328) ptr @calloc(i64 noundef 1, i64 noundef 328) #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 !16
  %5 = getelementptr inbounds i8, ptr %3, i64 88
  store i32 2, ptr %5, align 8, !tbaa !17
  %6 = getelementptr inbounds i8, ptr %3, i64 92
  store i32 7, ptr %6, align 4, !tbaa !18
  %7 = getelementptr inbounds i8, ptr %3, i64 96
  store float 0x3FD3333340000000, ptr %7, align 8, !tbaa !19
  %8 = tail call noalias dereferenceable_or_null(512) ptr @calloc(i64 noundef 64, i64 noundef 8) #6
  %9 = getelementptr inbounds i8, ptr %3, i64 168
  store ptr %8, ptr %9, align 8, !tbaa !20
  %10 = tail call noalias dereferenceable_or_null(512) ptr @calloc(i64 noundef 64, i64 noundef 8) #6
  %11 = getelementptr inbounds i8, ptr %3, i64 176
  store ptr %10, ptr %11, align 8, !tbaa !21
  %12 = tail call ptr @msequence_create(i32 noundef 7, i32 noundef 137, i32 noundef 1) #7
  br label %13

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

27:                                               ; preds = %13
  %28 = tail call i32 @msequence_destroy(ptr noundef %12) #7
  %29 = tail call noalias dereferenceable_or_null(512) ptr @calloc(i64 noundef 64, i64 noundef 8) #6
  %30 = tail call ptr @msequence_create(i32 noundef 7, i32 noundef 203, i32 noundef 83) #7
  br label %31

31:                                               ; preds = %27, %31
  %indvars.iv64 = phi i64 [ 0, %27 ], [ %indvars.iv.next65, %31 ]
  %32 = tail call i32 @msequence_advance(ptr noundef %30) #7
  %.not = icmp eq i32 %32, 0
  %33 = getelementptr inbounds { float, float }, ptr %29, i64 %indvars.iv64
  %34 = tail call i32 @msequence_advance(ptr noundef %30) #7
  %.not58 = icmp eq i32 %34, 0
  %35 = select i1 %.not58, double 0xBFE6A09E667F3BCD, double 0x3FE6A09E667F3BCD
  %36 = tail call double @llvm.copysign.f64(double 0.000000e+00, double %35)
  %37 = select i1 %.not, double 0xBFE6A09E60000000, double 0x3FE6A09E60000000
  %38 = fadd double %36, %37
  %39 = insertelement <2 x double> poison, double %38, i64 0
  %40 = insertelement <2 x double> %39, double %35, i64 1
  %41 = fptrunc <2 x double> %40 to <2 x float>
  store <2 x float> %41, ptr %33, align 4
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %exitcond67.not = icmp eq i64 %indvars.iv.next65, 64
  br i1 %exitcond67.not, label %42, label %31, !llvm.loop !24

42:                                               ; preds = %31
  %43 = tail call ptr @synth_crcf_create(ptr noundef nonnull %29, i32 noundef 64) #7
  %44 = getelementptr inbounds i8, ptr %3, i64 184
  store ptr %43, ptr %44, align 8, !tbaa !25
  %45 = tail call ptr @synth_crcf_create(ptr noundef nonnull %29, i32 noundef 64) #7
  %46 = getelementptr inbounds i8, ptr %3, i64 192
  store ptr %45, ptr %46, align 8, !tbaa !26
  tail call void @synth_crcf_pll_set_bandwidth(ptr noundef %43, float noundef 0x3F1A36E2E0000000) #7
  tail call void @synth_crcf_pll_set_bandwidth(ptr noundef %45, float noundef 0x3F1A36E2E0000000) #7
  tail call void @free(ptr noundef nonnull %29) #7
  %47 = tail call i32 @msequence_destroy(ptr noundef %30) #7
  %48 = tail call ptr @qdetector_cccf_create_linear(ptr noundef %8, i32 noundef 64, i32 noundef 7, i32 noundef 2, i32 noundef 7, float noundef 0x3FD3333340000000) #7
  %49 = getelementptr inbounds i8, ptr %3, i64 104
  store ptr %48, ptr %49, align 8, !tbaa !27
  %50 = tail call i32 @qdetector_cccf_set_threshold(ptr noundef %48, float noundef 5.000000e-01) #7
  %51 = getelementptr inbounds i8, ptr %3, i64 152
  store i32 32, ptr %51, align 8, !tbaa !28
  %52 = tail call ptr @firpfb_crcf_create_rnyquist(i32 noundef 7, i32 noundef 32, i32 noundef 2, i32 noundef 7, float noundef 0x3FD3333340000000) #7
  %53 = getelementptr inbounds i8, ptr %3, i64 144
  store ptr %52, ptr %53, align 8, !tbaa !29
  %54 = tail call ptr @nco_crcf_create(i32 noundef 0) #7
  %55 = getelementptr inbounds i8, ptr %3, i64 128
  store ptr %54, ptr %55, align 8, !tbaa !30
  %56 = tail call ptr @nco_crcf_create(i32 noundef 0) #7
  %57 = getelementptr inbounds i8, ptr %3, i64 136
  store ptr %56, ptr %57, align 8, !tbaa !31
  %58 = tail call i32 @nco_crcf_pll_set_bandwidth(ptr noundef %56, float noundef 0x3F1A36E2E0000000) #7
  %59 = tail call ptr (...) @qpacketmodem_create() #7
  %60 = getelementptr inbounds i8, ptr %3, i64 240
  store ptr %59, ptr %60, align 8, !tbaa !32
  %61 = getelementptr inbounds i8, ptr %3, i64 248
  store i32 8, ptr %61, align 8, !tbaa !33
  %62 = tail call i32 @dsssframesync_set_header_props(ptr noundef nonnull %3, ptr noundef null)
  %63 = tail call ptr (...) @qpacketmodem_create() #7
  %64 = getelementptr inbounds i8, ptr %3, i64 288
  store ptr %63, ptr %64, align 8, !tbaa !34
  %65 = getelementptr inbounds i8, ptr %3, i64 280
  store i32 64, ptr %65, align 8, !tbaa !35
  %66 = tail call noalias dereferenceable_or_null(512) ptr @malloc(i64 noundef 512) #8
  %67 = getelementptr inbounds i8, ptr %3, i64 272
  store ptr %66, ptr %67, align 8, !tbaa !36
  %68 = tail call i32 @dsssframesync_reset_framedatastats(ptr noundef nonnull %3)
  %69 = tail call i32 @dsssframesync_reset(ptr noundef nonnull %3)
  ret ptr %3
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, 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 @synth_crcf_create(ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @synth_crcf_pll_set_bandwidth(ptr noundef, float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

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

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

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

declare ptr @nco_crcf_create(i32 noundef) local_unnamed_addr #2

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.copysign.f64(double, double) #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,zeroed") allocsize(0,1) 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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 #4 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind allocsize(0,1) }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }

!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 = !{!"dsssframesync_s", !7, i64 0, !7, i64 8, !10, i64 16, !13, i64 64, !12, i64 88, !12, i64 92, !11, i64 96, !7, i64 104, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !7, i64 128, !7, i64 136, !7, i64 144, !12, i64 152, !12, i64 156, !12, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !12, i64 200, !15, i64 204, !7, i64 224, !12, i64 232, !7, i64 240, !12, i64 248, !12, i64 252, !7, i64 256, !12, i64 264, !12, i64 268, !7, i64 272, !12, i64 280, !7, i64 288, !12, i64 296, !7, i64 304, !12, i64 312, !12, i64 316, !12, i64 320, !12, i64 324}
!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 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!16 = !{!6, !7, i64 8}
!17 = !{!6, !12, i64 88}
!18 = !{!6, !12, i64 92}
!19 = !{!6, !11, i64 96}
!20 = !{!6, !7, i64 168}
!21 = !{!6, !7, i64 176}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!6, !7, i64 184}
!26 = !{!6, !7, i64 192}
!27 = !{!6, !7, i64 104}
!28 = !{!6, !12, i64 152}
!29 = !{!6, !7, i64 144}
!30 = !{!6, !7, i64 128}
!31 = !{!6, !7, i64 136}
!32 = !{!6, !7, i64 240}
!33 = !{!6, !12, i64 248}
!34 = !{!6, !7, i64 288}
!35 = !{!6, !12, i64 280}
!36 = !{!6, !7, i64 272}


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