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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @fskframegen_create() #0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  %4 = call noalias ptr @malloc(i64 noundef 152) #5
  store ptr %4, ptr %1, align 8, !tbaa !5
  %5 = load ptr, ptr %1, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct.fskframegen_s, ptr %5, i32 0, i32 0
  store i32 4, ptr %6, align 8, !tbaa !9
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.fskframegen_s, ptr %7, i32 0, i32 0
  %9 = load i32, ptr %8, align 8, !tbaa !9
  %10 = shl i32 1, %9
  %11 = load ptr, ptr %1, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.fskframegen_s, ptr %11, i32 0, i32 3
  store i32 %10, ptr %12, align 4, !tbaa !13
  %13 = load ptr, ptr %1, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.fskframegen_s, ptr %13, i32 0, i32 0
  %15 = load i32, ptr %14, align 8, !tbaa !9
  %16 = shl i32 2, %15
  %17 = load ptr, ptr %1, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.fskframegen_s, ptr %17, i32 0, i32 1
  store i32 %16, ptr %18, align 4, !tbaa !14
  %19 = load ptr, ptr %1, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.fskframegen_s, ptr %19, i32 0, i32 2
  store float 2.500000e-01, ptr %20, align 8, !tbaa !15
  %21 = load ptr, ptr %1, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.fskframegen_s, ptr %21, i32 0, i32 1
  %23 = load i32, ptr %22, align 4, !tbaa !14
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.fskframegen_s, ptr %24, i32 0, i32 2
  %26 = load float, ptr %25, align 8, !tbaa !15
  %27 = call ptr @fskmod_create(i32 noundef 1, i32 noundef %23, float noundef %26)
  %28 = load ptr, ptr %1, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.fskframegen_s, ptr %28, i32 0, i32 4
  store ptr %27, ptr %29, align 8, !tbaa !16
  %30 = load ptr, ptr %1, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.fskframegen_s, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !9
  %33 = load ptr, ptr %1, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.fskframegen_s, ptr %33, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !14
  %36 = load ptr, ptr %1, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.fskframegen_s, ptr %36, i32 0, i32 2
  %38 = load float, ptr %37, align 8, !tbaa !15
  %39 = call ptr @fskmod_create(i32 noundef %32, i32 noundef %35, float noundef %38)
  %40 = load ptr, ptr %1, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.fskframegen_s, ptr %40, i32 0, i32 5
  store ptr %39, ptr %41, align 8, !tbaa !17
  %42 = load ptr, ptr %1, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.fskframegen_s, ptr %42, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !14
  %45 = zext i32 %44 to i64
  %46 = mul i64 %45, 8
  %47 = call noalias ptr @malloc(i64 noundef %46) #5
  %48 = load ptr, ptr %1, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.fskframegen_s, ptr %48, i32 0, i32 6
  store ptr %47, ptr %49, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  %50 = call ptr @msequence_create(i32 noundef 6, i32 noundef 109, i32 noundef 1)
  store ptr %50, ptr %2, align 8, !tbaa !5
  %51 = load ptr, ptr %1, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.fskframegen_s, ptr %51, i32 0, i32 7
  store i32 64, ptr %52, align 8, !tbaa !19
  %53 = load ptr, ptr %1, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.fskframegen_s, ptr %53, i32 0, i32 7
  %55 = load i32, ptr %54, align 8, !tbaa !19
  %56 = mul i32 2, %55
  %57 = zext i32 %56 to i64
  %58 = mul i64 %57, 1
  %59 = call noalias ptr @malloc(i64 noundef %58) #5
  %60 = load ptr, ptr %1, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.fskframegen_s, ptr %60, i32 0, i32 8
  store ptr %59, ptr %61, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !21
  br label %62

62:                                               ; preds = %100, %0
  %63 = load i32, ptr %3, align 4, !tbaa !21
  %64 = load ptr, ptr %1, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.fskframegen_s, ptr %64, i32 0, i32 7
  %66 = load i32, ptr %65, align 8, !tbaa !19
  %67 = icmp ult i32 %63, %66
  br i1 %67, label %68, label %103

68:                                               ; preds = %62
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = call i32 @msequence_advance(ptr noundef %69)
  %71 = icmp ne i32 %70, 0
  %72 = zext i1 %71 to i64
  %73 = select i1 %71, i32 1, i32 0
  %74 = trunc i32 %73 to i8
  %75 = load ptr, ptr %1, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.fskframegen_s, ptr %75, i32 0, i32 8
  %77 = load ptr, ptr %76, align 8, !tbaa !20
  %78 = load i32, ptr %3, align 4, !tbaa !21
  %79 = mul i32 2, %78
  %80 = add i32 %79, 0
  %81 = zext i32 %80 to i64
  %82 = getelementptr inbounds i8, ptr %77, i64 %81
  store i8 %74, ptr %82, align 1, !tbaa !22
  %83 = load ptr, ptr %1, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.fskframegen_s, ptr %83, i32 0, i32 8
  %85 = load ptr, ptr %84, align 8, !tbaa !20
  %86 = load i32, ptr %3, align 4, !tbaa !21
  %87 = mul i32 2, %86
  %88 = add i32 %87, 0
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds i8, ptr %85, i64 %89
  %91 = load i8, ptr %90, align 1, !tbaa !22
  %92 = load ptr, ptr %1, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.fskframegen_s, ptr %92, i32 0, i32 8
  %94 = load ptr, ptr %93, align 8, !tbaa !20
  %95 = load i32, ptr %3, align 4, !tbaa !21
  %96 = mul i32 2, %95
  %97 = add i32 %96, 1
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds i8, ptr %94, i64 %98
  store i8 %91, ptr %99, align 1, !tbaa !22
  br label %100

100:                                              ; preds = %68
  %101 = load i32, ptr %3, align 4, !tbaa !21
  %102 = add i32 %101, 1
  store i32 %102, ptr %3, align 4, !tbaa !21
  br label %62, !llvm.loop !23

103:                                              ; preds = %62
  %104 = load ptr, ptr %2, align 8, !tbaa !5
  %105 = call i32 @msequence_destroy(ptr noundef %104)
  %106 = load ptr, ptr %1, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.fskframegen_s, ptr %106, i32 0, i32 9
  store i32 10, ptr %107, align 8, !tbaa !25
  %108 = load ptr, ptr %1, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.fskframegen_s, ptr %108, i32 0, i32 9
  %110 = load i32, ptr %109, align 8, !tbaa !25
  %111 = zext i32 %110 to i64
  %112 = mul i64 %111, 1
  %113 = call noalias ptr @malloc(i64 noundef %112) #5
  %114 = load ptr, ptr %1, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.fskframegen_s, ptr %114, i32 0, i32 11
  store ptr %113, ptr %115, align 8, !tbaa !26
  %116 = call ptr (...) @qpacketmodem_create()
  %117 = load ptr, ptr %1, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.fskframegen_s, ptr %117, i32 0, i32 13
  store ptr %116, ptr %118, align 8, !tbaa !27
  %119 = load ptr, ptr %1, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.fskframegen_s, ptr %119, i32 0, i32 13
  %121 = load ptr, ptr %120, align 8, !tbaa !27
  %122 = load ptr, ptr %1, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.fskframegen_s, ptr %122, i32 0, i32 9
  %124 = load i32, ptr %123, align 8, !tbaa !25
  %125 = call i32 @qpacketmodem_configure(ptr noundef %121, i32 noundef %124, i32 noundef 6, i32 noundef 1, i32 noundef 7, i32 noundef 39)
  %126 = load ptr, ptr %1, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.fskframegen_s, ptr %126, i32 0, i32 13
  %128 = load ptr, ptr %127, align 8, !tbaa !27
  %129 = call i32 @qpacketmodem_get_frame_len(ptr noundef %128)
  %130 = load ptr, ptr %1, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.fskframegen_s, ptr %130, i32 0, i32 10
  store i32 %129, ptr %131, align 4, !tbaa !28
  %132 = load ptr, ptr %1, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.fskframegen_s, ptr %132, i32 0, i32 10
  %134 = load i32, ptr %133, align 4, !tbaa !28
  %135 = zext i32 %134 to i64
  %136 = mul i64 %135, 1
  %137 = call noalias ptr @malloc(i64 noundef %136) #5
  %138 = load ptr, ptr %1, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.fskframegen_s, ptr %138, i32 0, i32 12
  store ptr %137, ptr %139, align 8, !tbaa !29
  %140 = load ptr, ptr %1, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.fskframegen_s, ptr %140, i32 0, i32 14
  store i32 200, ptr %141, align 8, !tbaa !30
  %142 = load ptr, ptr %1, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.fskframegen_s, ptr %142, i32 0, i32 15
  store i32 6, ptr %143, align 4, !tbaa !31
  %144 = load ptr, ptr %1, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.fskframegen_s, ptr %144, i32 0, i32 16
  store i32 1, ptr %145, align 8, !tbaa !32
  %146 = load ptr, ptr %1, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.fskframegen_s, ptr %146, i32 0, i32 17
  store i32 6, ptr %147, align 4, !tbaa !33
  %148 = call ptr (...) @qpacketmodem_create()
  %149 = load ptr, ptr %1, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.fskframegen_s, ptr %149, i32 0, i32 20
  store ptr %148, ptr %150, align 8, !tbaa !34
  %151 = load ptr, ptr %1, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.fskframegen_s, ptr %151, i32 0, i32 20
  %153 = load ptr, ptr %152, align 8, !tbaa !34
  %154 = load ptr, ptr %1, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.fskframegen_s, ptr %154, i32 0, i32 14
  %156 = load i32, ptr %155, align 8, !tbaa !30
  %157 = load ptr, ptr %1, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.fskframegen_s, ptr %157, i32 0, i32 15
  %159 = load i32, ptr %158, align 4, !tbaa !31
  %160 = load ptr, ptr %1, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.fskframegen_s, ptr %160, i32 0, i32 16
  %162 = load i32, ptr %161, align 8, !tbaa !32
  %163 = load ptr, ptr %1, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.fskframegen_s, ptr %163, i32 0, i32 17
  %165 = load i32, ptr %164, align 4, !tbaa !33
  %166 = call i32 @qpacketmodem_configure(ptr noundef %153, i32 noundef %156, i32 noundef %159, i32 noundef %162, i32 noundef %165, i32 noundef 27)
  %167 = load ptr, ptr %1, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.fskframegen_s, ptr %167, i32 0, i32 20
  %169 = load ptr, ptr %168, align 8, !tbaa !34
  %170 = call i32 @qpacketmodem_get_frame_len(ptr noundef %169)
  %171 = load ptr, ptr %1, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.fskframegen_s, ptr %171, i32 0, i32 18
  store i32 %170, ptr %172, align 8, !tbaa !35
  %173 = load ptr, ptr %1, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.fskframegen_s, ptr %173, i32 0, i32 18
  %175 = load i32, ptr %174, align 8, !tbaa !35
  %176 = zext i32 %175 to i64
  %177 = mul i64 %176, 1
  %178 = call noalias ptr @malloc(i64 noundef %177) #5
  %179 = load ptr, ptr %1, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.fskframegen_s, ptr %179, i32 0, i32 19
  store ptr %178, ptr %180, align 8, !tbaa !36
  %181 = load ptr, ptr %1, align 8, !tbaa !5
  %182 = call i32 @fskframegen_reset(ptr noundef %181)
  %183 = load ptr, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret ptr %183
}

; 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 @fskmod_create(i32 noundef, i32 noundef, float noundef) #3

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 @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: nounwind uwtable
declare dso_local i32 @fskframegen_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 = { nounwind }
attributes #5 = { 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, !11, i64 0}
!10 = !{!"fskframegen_s", !11, i64 0, !11, i64 4, !12, i64 8, !11, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !6, i64 48, !11, i64 56, !11, i64 60, !6, i64 64, !6, i64 72, !6, i64 80, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !6, i64 112, !6, i64 120, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!10, !11, i64 12}
!14 = !{!10, !11, i64 4}
!15 = !{!10, !12, i64 8}
!16 = !{!10, !6, i64 16}
!17 = !{!10, !6, i64 24}
!18 = !{!10, !6, i64 32}
!19 = !{!10, !11, i64 40}
!20 = !{!10, !6, i64 48}
!21 = !{!11, !11, i64 0}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!10, !11, i64 56}
!26 = !{!10, !6, i64 64}
!27 = !{!10, !6, i64 80}
!28 = !{!10, !11, i64 60}
!29 = !{!10, !6, i64 72}
!30 = !{!10, !11, i64 88}
!31 = !{!10, !11, i64 92}
!32 = !{!10, !11, i64 96}
!33 = !{!10, !11, i64 100}
!34 = !{!10, !6, i64 120}
!35 = !{!10, !11, i64 104}
!36 = !{!10, !6, i64 112}


; 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 @fskframegen_create() local_unnamed_addr #0 {
.lr.ph.preheader:
  %0 = tail call noalias dereferenceable_or_null(152) ptr @malloc(i64 noundef 152) #3
  store i32 4, ptr %0, align 8, !tbaa !5
  %1 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 16, ptr %1, align 4, !tbaa !12
  %2 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 32, ptr %2, align 4, !tbaa !13
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  store float 2.500000e-01, ptr %3, align 8, !tbaa !14
  %4 = tail call ptr @fskmod_create(i32 noundef 1, i32 noundef 32, float noundef 2.500000e-01) #4
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %4, ptr %5, align 8, !tbaa !15
  %6 = tail call ptr @fskmod_create(i32 noundef 4, i32 noundef 32, float noundef 2.500000e-01) #4
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %6, ptr %7, align 8, !tbaa !16
  %8 = tail call noalias dereferenceable_or_null(256) ptr @malloc(i64 noundef 256) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %8, ptr %9, align 8, !tbaa !17
  %10 = tail call ptr @msequence_create(i32 noundef 6, i32 noundef 109, i32 noundef 1) #4
  %11 = getelementptr inbounds i8, ptr %0, i64 40
  store i32 64, ptr %11, align 8, !tbaa !18
  %12 = tail call noalias dereferenceable_or_null(128) ptr @malloc(i64 noundef 128) #3
  %13 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %12, ptr %13, align 8, !tbaa !19
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %14 = tail call i32 @msequence_advance(ptr noundef %10) #4
  %.not = icmp ne i32 %14, 0
  %15 = zext i1 %.not to i8
  %16 = trunc nuw i64 %indvars.iv to i32
  %17 = shl nuw nsw i32 %16, 1
  %18 = zext nneg i32 %17 to i64
  %19 = getelementptr inbounds i8, ptr %12, i64 %18
  store i8 %15, ptr %19, align 1, !tbaa !20
  %20 = or disjoint i32 %17, 1
  %21 = zext nneg i32 %20 to i64
  %22 = getelementptr inbounds i8, ptr %12, i64 %21
  store i8 %15, ptr %22, align 1, !tbaa !20
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = icmp ult i64 %indvars.iv, 63
  br i1 %23, label %.lr.ph, label %._crit_edge, !llvm.loop !21

._crit_edge:                                      ; preds = %.lr.ph
  %24 = tail call i32 @msequence_destroy(ptr noundef %10) #4
  %25 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 10, ptr %25, align 8, !tbaa !23
  %26 = tail call noalias dereferenceable_or_null(10) ptr @malloc(i64 noundef 10) #3
  %27 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %26, ptr %27, align 8, !tbaa !24
  %28 = tail call ptr (...) @qpacketmodem_create() #4
  %29 = getelementptr inbounds i8, ptr %0, i64 80
  store ptr %28, ptr %29, align 8, !tbaa !25
  %30 = tail call i32 @qpacketmodem_configure(ptr noundef %28, i32 noundef 10, i32 noundef 6, i32 noundef 1, i32 noundef 7, i32 noundef 39) #4
  %31 = tail call i32 @qpacketmodem_get_frame_len(ptr noundef %28) #4
  %32 = getelementptr inbounds i8, ptr %0, i64 60
  store i32 %31, ptr %32, align 4, !tbaa !26
  %33 = zext i32 %31 to i64
  %34 = tail call noalias ptr @malloc(i64 noundef %33) #3
  %35 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %34, ptr %35, align 8, !tbaa !27
  %36 = getelementptr inbounds i8, ptr %0, i64 88
  store <4 x i32> <i32 200, i32 6, i32 1, i32 6>, ptr %36, align 8, !tbaa !28
  %37 = tail call ptr (...) @qpacketmodem_create() #4
  %38 = getelementptr inbounds i8, ptr %0, i64 120
  store ptr %37, ptr %38, align 8, !tbaa !29
  %39 = tail call i32 @qpacketmodem_configure(ptr noundef %37, i32 noundef 200, i32 noundef 6, i32 noundef 1, i32 noundef 6, i32 noundef 27) #4
  %40 = tail call i32 @qpacketmodem_get_frame_len(ptr noundef %37) #4
  %41 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 %40, ptr %41, align 8, !tbaa !30
  %42 = zext i32 %40 to i64
  %43 = tail call noalias ptr @malloc(i64 noundef %42) #3
  %44 = getelementptr inbounds i8, ptr %0, i64 112
  store ptr %43, ptr %44, align 8, !tbaa !31
  %45 = tail call i32 @fskframegen_reset(ptr noundef nonnull %0)
  ret ptr %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 #1

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

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 @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: nounwind uwtable
declare dso_local i32 @fskframegen_reset(ptr noundef) local_unnamed_addr #0

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 = { nounwind allocsize(0) }
attributes #4 = { 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 = !{!"fskframegen_s", !7, i64 0, !7, i64 4, !10, i64 8, !7, i64 12, !11, i64 16, !11, i64 24, !11, i64 32, !7, i64 40, !11, i64 48, !7, i64 56, !7, i64 60, !11, i64 64, !11, i64 72, !11, i64 80, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !11, i64 112, !11, i64 120, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !7, i64 12}
!13 = !{!6, !7, i64 4}
!14 = !{!6, !10, i64 8}
!15 = !{!6, !11, i64 16}
!16 = !{!6, !11, i64 24}
!17 = !{!6, !11, i64 32}
!18 = !{!6, !7, i64 40}
!19 = !{!6, !11, i64 48}
!20 = !{!8, !8, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!6, !7, i64 56}
!24 = !{!6, !11, i64 64}
!25 = !{!6, !11, i64 80}
!26 = !{!6, !7, i64 60}
!27 = !{!6, !11, i64 72}
!28 = !{!7, !7, i64 0}
!29 = !{!6, !11, i64 120}
!30 = !{!6, !7, i64 104}
!31 = !{!6, !11, i64 112}


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