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

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

@.str = external hidden unnamed_addr constant [90 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [85 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @ofdmflexframesync_create(i32 noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #0 {
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  store i32 %0, ptr %8, align 4, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !9
  store ptr %4, ptr %12, align 8, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !9
  %15 = load i32, ptr %8, align 4, !tbaa !5
  %16 = icmp ult i32 %15, 8
  br i1 %16, label %17, label %19

17:                                               ; preds = %6
  %18 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 149, ptr noundef @.str.1)
  store ptr %18, ptr %7, align 8
  br label %186

19:                                               ; preds = %6
  %20 = load i32, ptr %8, align 4, !tbaa !5
  %21 = urem i32 %20, 2
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %25

23:                                               ; preds = %19
  %24 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 151, ptr noundef @.str.2)
  store ptr %24, ptr %7, align 8
  br label %186

25:                                               ; preds = %19
  %26 = load i32, ptr %9, align 4, !tbaa !5
  %27 = load i32, ptr %8, align 4, !tbaa !5
  %28 = icmp ugt i32 %26, %27
  br i1 %28, label %29, label %31

29:                                               ; preds = %25
  %30 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 153, ptr noundef @.str.3)
  store ptr %30, ptr %7, align 8
  br label %186

31:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %32 = call noalias ptr @malloc(i64 noundef 336) #6
  store ptr %32, ptr %14, align 8, !tbaa !9
  %33 = load i32, ptr %8, align 4, !tbaa !5
  %34 = load ptr, ptr %14, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %34, i32 0, i32 0
  store i32 %33, ptr %35, align 8, !tbaa !11
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = load ptr, ptr %14, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %37, i32 0, i32 1
  store i32 %36, ptr %38, align 4, !tbaa !18
  %39 = load i32, ptr %10, align 4, !tbaa !5
  %40 = load ptr, ptr %14, align 8, !tbaa !9
  %41 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %40, i32 0, i32 2
  store i32 %39, ptr %41, align 8, !tbaa !19
  %42 = load ptr, ptr %12, align 8, !tbaa !9
  %43 = load ptr, ptr %14, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %43, i32 0, i32 36
  store ptr %42, ptr %44, align 8, !tbaa !20
  %45 = load ptr, ptr %13, align 8, !tbaa !9
  %46 = load ptr, ptr %14, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %46, i32 0, i32 37
  store ptr %45, ptr %47, align 8, !tbaa !21
  %48 = load ptr, ptr %14, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 8, !tbaa !11
  %51 = zext i32 %50 to i64
  %52 = mul i64 %51, 1
  %53 = call noalias ptr @malloc(i64 noundef %52) #6
  %54 = load ptr, ptr %14, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %54, i32 0, i32 3
  store ptr %53, ptr %55, align 8, !tbaa !22
  %56 = load ptr, ptr %11, align 8, !tbaa !9
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %66

58:                                               ; preds = %31
  %59 = load ptr, ptr %14, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !11
  %62 = load ptr, ptr %14, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %62, i32 0, i32 3
  %64 = load ptr, ptr %63, align 8, !tbaa !22
  %65 = call i32 @ofdmframe_init_default_sctype(i32 noundef %61, ptr noundef %64)
  br label %76

66:                                               ; preds = %31
  %67 = load ptr, ptr %14, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %67, i32 0, i32 3
  %69 = load ptr, ptr %68, align 8, !tbaa !22
  %70 = load ptr, ptr %11, align 8, !tbaa !9
  %71 = load ptr, ptr %14, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %71, i32 0, i32 0
  %73 = load i32, ptr %72, align 8, !tbaa !11
  %74 = zext i32 %73 to i64
  %75 = mul i64 %74, 1
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %69, ptr align 1 %70, i64 %75, i1 false)
  br label %76

76:                                               ; preds = %66, %58
  %77 = load ptr, ptr %14, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %77, i32 0, i32 3
  %79 = load ptr, ptr %78, align 8, !tbaa !22
  %80 = load ptr, ptr %14, align 8, !tbaa !9
  %81 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %80, i32 0, i32 0
  %82 = load i32, ptr %81, align 8, !tbaa !11
  %83 = load ptr, ptr %14, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %83, i32 0, i32 4
  %85 = load ptr, ptr %14, align 8, !tbaa !9
  %86 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %85, i32 0, i32 5
  %87 = load ptr, ptr %14, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %87, i32 0, i32 6
  %89 = call i32 @ofdmframe_validate_sctype(ptr noundef %79, i32 noundef %82, ptr noundef %84, ptr noundef %86, ptr noundef %88)
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = load ptr, ptr %11, align 8, !tbaa !9
  %94 = load ptr, ptr %14, align 8, !tbaa !9
  %95 = call ptr @ofdmframesync_create(i32 noundef %90, i32 noundef %91, i32 noundef %92, ptr noundef %93, ptr noundef @ofdmflexframesync_internal_callback, ptr noundef %94)
  %96 = load ptr, ptr %14, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %96, i32 0, i32 41
  store ptr %95, ptr %97, align 8, !tbaa !23
  %98 = load ptr, ptr %14, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %98, i32 0, i32 12
  store ptr null, ptr %99, align 8, !tbaa !24
  %100 = load ptr, ptr %14, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %100, i32 0, i32 11
  store ptr null, ptr %101, align 8, !tbaa !25
  %102 = load ptr, ptr %14, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %102, i32 0, i32 13
  store ptr null, ptr %103, align 8, !tbaa !26
  %104 = load ptr, ptr %14, align 8, !tbaa !9
  %105 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %104, i32 0, i32 14
  store ptr null, ptr %105, align 8, !tbaa !27
  %106 = load ptr, ptr %14, align 8, !tbaa !9
  %107 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %106, i32 0, i32 10
  store ptr null, ptr %107, align 8, !tbaa !28
  %108 = load ptr, ptr %14, align 8, !tbaa !9
  %109 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %108, i32 0, i32 15
  store i32 8, ptr %109, align 8, !tbaa !29
  %110 = load ptr, ptr %14, align 8, !tbaa !9
  %111 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %110, i32 0, i32 9
  store i32 0, ptr %111, align 4, !tbaa !30
  %112 = load ptr, ptr %14, align 8, !tbaa !9
  %113 = call i32 @ofdmflexframesync_set_header_props(ptr noundef %112, ptr noundef null)
  %114 = load ptr, ptr %14, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %114, i32 0, i32 21
  store i32 40, ptr %115, align 4, !tbaa !31
  %116 = load ptr, ptr %14, align 8, !tbaa !9
  %117 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %116, i32 0, i32 22
  store i32 2, ptr %117, align 8, !tbaa !32
  %118 = load ptr, ptr %14, align 8, !tbaa !9
  %119 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %118, i32 0, i32 23
  store i32 1, ptr %119, align 4, !tbaa !33
  %120 = load ptr, ptr %14, align 8, !tbaa !9
  %121 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %120, i32 0, i32 24
  store i32 1, ptr %121, align 8, !tbaa !34
  %122 = load ptr, ptr %14, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %122, i32 0, i32 25
  store i32 1, ptr %123, align 4, !tbaa !35
  %124 = load ptr, ptr %14, align 8, !tbaa !9
  %125 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %124, i32 0, i32 26
  store i32 1, ptr %125, align 8, !tbaa !36
  %126 = load ptr, ptr %14, align 8, !tbaa !9
  %127 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %126, i32 0, i32 21
  %128 = load i32, ptr %127, align 4, !tbaa !31
  %129 = call ptr @modemcf_create(i32 noundef %128)
  %130 = load ptr, ptr %14, align 8, !tbaa !9
  %131 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %130, i32 0, i32 29
  store ptr %129, ptr %131, align 8, !tbaa !37
  %132 = load ptr, ptr %14, align 8, !tbaa !9
  %133 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %132, i32 0, i32 27
  store i32 0, ptr %133, align 4, !tbaa !38
  %134 = load ptr, ptr %14, align 8, !tbaa !9
  %135 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %134, i32 0, i32 23
  %136 = load i32, ptr %135, align 4, !tbaa !33
  %137 = load ptr, ptr %14, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %137, i32 0, i32 24
  %139 = load i32, ptr %138, align 8, !tbaa !34
  %140 = load ptr, ptr %14, align 8, !tbaa !9
  %141 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %140, i32 0, i32 25
  %142 = load i32, ptr %141, align 4, !tbaa !35
  %143 = load ptr, ptr %14, align 8, !tbaa !9
  %144 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %143, i32 0, i32 26
  %145 = load i32, ptr %144, align 8, !tbaa !36
  %146 = call ptr @packetizer_create(i32 noundef %136, i32 noundef %139, i32 noundef %142, i32 noundef %145)
  %147 = load ptr, ptr %14, align 8, !tbaa !9
  %148 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %147, i32 0, i32 28
  store ptr %146, ptr %148, align 8, !tbaa !39
  %149 = load ptr, ptr %14, align 8, !tbaa !9
  %150 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %149, i32 0, i32 28
  %151 = load ptr, ptr %150, align 8, !tbaa !39
  %152 = call i32 @packetizer_get_enc_msg_len(ptr noundef %151)
  %153 = load ptr, ptr %14, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %153, i32 0, i32 32
  store i32 %152, ptr %154, align 8, !tbaa !40
  %155 = load ptr, ptr %14, align 8, !tbaa !9
  %156 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %155, i32 0, i32 32
  %157 = load i32, ptr %156, align 8, !tbaa !40
  %158 = zext i32 %157 to i64
  %159 = mul i64 %158, 1
  %160 = call noalias ptr @malloc(i64 noundef %159) #6
  %161 = load ptr, ptr %14, align 8, !tbaa !9
  %162 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %161, i32 0, i32 30
  store ptr %160, ptr %162, align 8, !tbaa !41
  %163 = load ptr, ptr %14, align 8, !tbaa !9
  %164 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %163, i32 0, i32 23
  %165 = load i32, ptr %164, align 4, !tbaa !33
  %166 = zext i32 %165 to i64
  %167 = mul i64 %166, 1
  %168 = call noalias ptr @malloc(i64 noundef %167) #6
  %169 = load ptr, ptr %14, align 8, !tbaa !9
  %170 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %169, i32 0, i32 31
  store ptr %168, ptr %170, align 8, !tbaa !42
  %171 = load ptr, ptr %14, align 8, !tbaa !9
  %172 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %171, i32 0, i32 23
  %173 = load i32, ptr %172, align 4, !tbaa !33
  %174 = zext i32 %173 to i64
  %175 = mul i64 %174, 8
  %176 = call noalias ptr @malloc(i64 noundef %175) #6
  %177 = load ptr, ptr %14, align 8, !tbaa !9
  %178 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %177, i32 0, i32 35
  store ptr %176, ptr %178, align 8, !tbaa !43
  %179 = load ptr, ptr %14, align 8, !tbaa !9
  %180 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %179, i32 0, i32 33
  store i32 0, ptr %180, align 4, !tbaa !44
  %181 = load ptr, ptr %14, align 8, !tbaa !9
  %182 = call i32 @ofdmflexframesync_reset_framedatastats(ptr noundef %181)
  %183 = load ptr, ptr %14, align 8, !tbaa !9
  %184 = call i32 @ofdmflexframesync_reset(ptr noundef %183)
  %185 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %185, ptr %7, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %186

186:                                              ; preds = %76, %29, %23, %17
  %187 = load ptr, ptr %7, align 8
  ret ptr %187
}

declare ptr @liquid_error_config_fl(ptr noundef, i32 noundef, ptr noundef, ...) #1

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

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

declare i32 @ofdmframe_init_default_sctype(i32 noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #4

declare i32 @ofdmframe_validate_sctype(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare ptr @ofdmframesync_create(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

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

declare ptr @modemcf_create(i32 noundef) #1

declare ptr @packetizer_create(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare i32 @packetizer_get_enc_msg_len(ptr noundef) #1

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

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

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

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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"ofdmflexframesync_s", !6, i64 0, !6, i64 4, !6, i64 8, !10, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !6, i64 88, !6, i64 92, !6, i64 96, !6, i64 100, !6, i64 104, !13, i64 108, !6, i64 124, !6, i64 128, !6, i64 132, !6, i64 136, !6, i64 140, !6, i64 144, !6, i64 148, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !6, i64 184, !6, i64 188, !6, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !14, i64 224, !16, i64 272, !15, i64 296, !10, i64 304, !6, i64 312, !6, i64 316, !6, i64 320, !6, i64 324, !6, i64 328}
!13 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!14 = !{!"", !15, i64 0, !15, i64 4, !15, i64 8, !10, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44}
!15 = !{!"float", !7, i64 0}
!16 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !17, i64 16}
!17 = !{!"long", !7, i64 0}
!18 = !{!12, !6, i64 4}
!19 = !{!12, !6, i64 8}
!20 = !{!12, !10, i64 208}
!21 = !{!12, !10, i64 216}
!22 = !{!12, !10, i64 16}
!23 = !{!12, !10, i64 304}
!24 = !{!12, !10, i64 64}
!25 = !{!12, !10, i64 56}
!26 = !{!12, !10, i64 72}
!27 = !{!12, !10, i64 80}
!28 = !{!12, !10, i64 48}
!29 = !{!12, !6, i64 88}
!30 = !{!12, !6, i64 44}
!31 = !{!12, !6, i64 124}
!32 = !{!12, !6, i64 128}
!33 = !{!12, !6, i64 132}
!34 = !{!12, !6, i64 136}
!35 = !{!12, !6, i64 140}
!36 = !{!12, !6, i64 144}
!37 = !{!12, !10, i64 160}
!38 = !{!12, !6, i64 148}
!39 = !{!12, !10, i64 152}
!40 = !{!12, !6, i64 184}
!41 = !{!12, !10, i64 168}
!42 = !{!12, !10, i64 176}
!43 = !{!12, !10, i64 200}
!44 = !{!12, !6, i64 188}


; 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 [90 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [85 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @ofdmflexframesync_create(i32 noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #0 {
  %7 = icmp ult i32 %0, 8
  br i1 %7, label %8, label %10

8:                                                ; preds = %6
  %9 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str, i32 noundef 149, ptr noundef nonnull @.str.1) #5
  br label %71

10:                                               ; preds = %6
  %11 = and i32 %0, 1
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %14, label %12

12:                                               ; preds = %10
  %13 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str, i32 noundef 151, ptr noundef nonnull @.str.2) #5
  br label %71

14:                                               ; preds = %10
  %15 = icmp ugt i32 %1, %0
  br i1 %15, label %16, label %18

16:                                               ; preds = %14
  %17 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str, i32 noundef 153, ptr noundef nonnull @.str.3) #5
  br label %71

18:                                               ; preds = %14
  %19 = tail call noalias dereferenceable_or_null(336) ptr @malloc(i64 noundef 336) #6
  store i32 %0, ptr %19, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 4
  store i32 %1, ptr %20, align 4, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %19, i64 8
  store i32 %2, ptr %21, align 8, !tbaa !17
  %22 = getelementptr inbounds i8, ptr %19, i64 208
  store ptr %4, ptr %22, align 8, !tbaa !18
  %23 = getelementptr inbounds i8, ptr %19, i64 216
  store ptr %5, ptr %23, align 8, !tbaa !19
  %24 = zext i32 %0 to i64
  %25 = tail call noalias ptr @malloc(i64 noundef %24) #6
  %26 = getelementptr inbounds i8, ptr %19, i64 16
  store ptr %25, ptr %26, align 8, !tbaa !20
  %27 = icmp eq ptr %3, null
  br i1 %27, label %28, label %30

28:                                               ; preds = %18
  %29 = tail call i32 @ofdmframe_init_default_sctype(i32 noundef %0, ptr noundef %25) #5
  br label %31

30:                                               ; preds = %18
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %25, ptr nonnull align 1 %3, i64 %24, i1 false)
  br label %31

31:                                               ; preds = %30, %28
  %32 = getelementptr inbounds i8, ptr %19, i64 24
  %33 = getelementptr inbounds i8, ptr %19, i64 28
  %34 = getelementptr inbounds i8, ptr %19, i64 32
  %35 = tail call i32 @ofdmframe_validate_sctype(ptr noundef %25, i32 noundef %0, ptr noundef nonnull %32, ptr noundef nonnull %33, ptr noundef nonnull %34) #5
  %36 = tail call ptr @ofdmframesync_create(i32 noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef nonnull @ofdmflexframesync_internal_callback, ptr noundef nonnull %19) #5
  %37 = getelementptr inbounds i8, ptr %19, i64 304
  store ptr %36, ptr %37, align 8, !tbaa !21
  %38 = getelementptr inbounds i8, ptr %19, i64 48
  %39 = getelementptr inbounds i8, ptr %19, i64 88
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %38, i8 0, i64 40, i1 false)
  store i32 8, ptr %39, align 8, !tbaa !22
  %40 = getelementptr inbounds i8, ptr %19, i64 44
  store i32 0, ptr %40, align 4, !tbaa !23
  %41 = tail call i32 @ofdmflexframesync_set_header_props(ptr noundef nonnull %19, ptr noundef null)
  %42 = getelementptr inbounds i8, ptr %19, i64 124
  %43 = getelementptr inbounds i8, ptr %19, i64 132
  %44 = getelementptr inbounds i8, ptr %19, i64 136
  store <4 x i32> <i32 40, i32 2, i32 1, i32 1>, ptr %42, align 4, !tbaa !24
  %45 = getelementptr inbounds i8, ptr %19, i64 140
  store i32 1, ptr %45, align 4, !tbaa !25
  %46 = getelementptr inbounds i8, ptr %19, i64 144
  store i32 1, ptr %46, align 8, !tbaa !26
  %47 = tail call ptr @modemcf_create(i32 noundef 40) #5
  %48 = getelementptr inbounds i8, ptr %19, i64 160
  store ptr %47, ptr %48, align 8, !tbaa !27
  %49 = getelementptr inbounds i8, ptr %19, i64 148
  store i32 0, ptr %49, align 4, !tbaa !28
  %50 = load i32, ptr %43, align 4, !tbaa !29
  %51 = load i32, ptr %44, align 8, !tbaa !30
  %52 = load i32, ptr %45, align 4, !tbaa !25
  %53 = load i32, ptr %46, align 8, !tbaa !26
  %54 = tail call ptr @packetizer_create(i32 noundef %50, i32 noundef %51, i32 noundef %52, i32 noundef %53) #5
  %55 = getelementptr inbounds i8, ptr %19, i64 152
  store ptr %54, ptr %55, align 8, !tbaa !31
  %56 = tail call i32 @packetizer_get_enc_msg_len(ptr noundef %54) #5
  %57 = getelementptr inbounds i8, ptr %19, i64 184
  store i32 %56, ptr %57, align 8, !tbaa !32
  %58 = zext i32 %56 to i64
  %59 = tail call noalias ptr @malloc(i64 noundef %58) #6
  %60 = getelementptr inbounds i8, ptr %19, i64 168
  store ptr %59, ptr %60, align 8, !tbaa !33
  %61 = load i32, ptr %43, align 4, !tbaa !29
  %62 = zext i32 %61 to i64
  %63 = tail call noalias ptr @malloc(i64 noundef %62) #6
  %64 = getelementptr inbounds i8, ptr %19, i64 176
  store ptr %63, ptr %64, align 8, !tbaa !34
  %65 = shl nuw nsw i64 %62, 3
  %66 = tail call noalias ptr @malloc(i64 noundef %65) #6
  %67 = getelementptr inbounds i8, ptr %19, i64 200
  store ptr %66, ptr %67, align 8, !tbaa !35
  %68 = getelementptr inbounds i8, ptr %19, i64 188
  store i32 0, ptr %68, align 4, !tbaa !36
  %69 = tail call i32 @ofdmflexframesync_reset_framedatastats(ptr noundef nonnull %19)
  %70 = tail call i32 @ofdmflexframesync_reset(ptr noundef nonnull %19)
  br label %71

71:                                               ; preds = %31, %16, %12, %8
  %.0 = phi ptr [ %9, %8 ], [ %13, %12 ], [ %17, %16 ], [ %19, %31 ]
  ret ptr %.0
}

declare ptr @liquid_error_config_fl(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #1

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

declare i32 @ofdmframe_init_default_sctype(i32 noundef, ptr noundef) local_unnamed_addr #1

declare i32 @ofdmframe_validate_sctype(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @ofdmframesync_create(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

declare ptr @modemcf_create(i32 noundef) local_unnamed_addr #1

declare ptr @packetizer_create(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare i32 @packetizer_get_enc_msg_len(ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { "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 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
attributes #6 = { 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 = !{!"ofdmflexframesync_s", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !11, i64 108, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !7, i64 184, !7, i64 188, !7, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !12, i64 224, !14, i64 272, !13, i64 296, !10, i64 304, !7, i64 312, !7, i64 316, !7, i64 320, !7, i64 324, !7, i64 328}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12}
!12 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44}
!13 = !{!"float", !8, i64 0}
!14 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !15, i64 16}
!15 = !{!"long", !8, i64 0}
!16 = !{!6, !7, i64 4}
!17 = !{!6, !7, i64 8}
!18 = !{!6, !10, i64 208}
!19 = !{!6, !10, i64 216}
!20 = !{!6, !10, i64 16}
!21 = !{!6, !10, i64 304}
!22 = !{!6, !7, i64 88}
!23 = !{!6, !7, i64 44}
!24 = !{!7, !7, i64 0}
!25 = !{!6, !7, i64 140}
!26 = !{!6, !7, i64 144}
!27 = !{!6, !10, i64 160}
!28 = !{!6, !7, i64 148}
!29 = !{!6, !7, i64 132}
!30 = !{!6, !7, i64 136}
!31 = !{!6, !10, i64 152}
!32 = !{!6, !7, i64 184}
!33 = !{!6, !10, i64 168}
!34 = !{!6, !10, i64 176}
!35 = !{!6, !10, i64 200}
!36 = !{!6, !7, i64 188}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SLPVectorizerPass,SROAPass,TailCallElimPass