; LLVM IR from jgaeddert/liquid-dsp :: examples (ofdmflexframesync_example)

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

@.str.12 = external hidden unnamed_addr constant [22 x i8], align 1
@optarg = external global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @usage() #0

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  %24 = alloca [8 x i8], align 1
  %25 = alloca i64, align 8
  %26 = alloca %struct.ofdmflexframegenprops_s, align 4
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 64, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 16, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 4, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 120, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 40, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 6, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 6, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store float -8.000000e+01, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store float 2.000000e+01, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store float 0x3F947AE140000000, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  br label %31

31:                                               ; preds = %71, %2
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = load ptr, ptr %5, align 8, !tbaa !9
  %34 = call i32 @getopt(i32 noundef %32, ptr noundef %33, ptr noundef @.str.12) #7
  store i32 %34, ptr %18, align 4, !tbaa !5
  %35 = icmp ne i32 %34, -1
  br i1 %35, label %36, label %72

36:                                               ; preds = %31
  %37 = load i32, ptr %18, align 4, !tbaa !5
  switch i32 %37, label %70 [
    i32 117, label %38
    i32 104, label %38
    i32 100, label %39
    i32 115, label %40
    i32 70, label %44
    i32 77, label %48
    i32 67, label %51
    i32 110, label %54
    i32 109, label %58
    i32 118, label %61
    i32 99, label %64
    i32 107, label %67
  ]

38:                                               ; preds = %36, %36
  call void @usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %19, align 4
  br label %179

39:                                               ; preds = %36
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %71

40:                                               ; preds = %36
  %41 = load ptr, ptr @optarg, align 8, !tbaa !9
  %42 = call double @atof(ptr noundef %41) #8
  %43 = fptrunc double %42 to float
  store float %43, ptr %15, align 4, !tbaa !11
  br label %71

44:                                               ; preds = %36
  %45 = load ptr, ptr @optarg, align 8, !tbaa !9
  %46 = call double @atof(ptr noundef %45) #8
  %47 = fptrunc double %46 to float
  store float %47, ptr %16, align 4, !tbaa !11
  br label %71

48:                                               ; preds = %36
  %49 = load ptr, ptr @optarg, align 8, !tbaa !9
  %50 = call i32 @atoi(ptr noundef %49) #8
  store i32 %50, ptr %6, align 4, !tbaa !5
  br label %71

51:                                               ; preds = %36
  %52 = load ptr, ptr @optarg, align 8, !tbaa !9
  %53 = call i32 @atoi(ptr noundef %52) #8
  store i32 %53, ptr %7, align 4, !tbaa !5
  br label %71

54:                                               ; preds = %36
  %55 = load ptr, ptr @optarg, align 8, !tbaa !9
  %56 = call i64 @atol(ptr noundef %55) #8
  %57 = trunc i64 %56 to i32
  store i32 %57, ptr %9, align 4, !tbaa !5
  br label %71

58:                                               ; preds = %36
  %59 = load ptr, ptr @optarg, align 8, !tbaa !9
  %60 = call i32 @liquid_getopt_str2mod(ptr noundef %59)
  store i32 %60, ptr %10, align 4, !tbaa !5
  br label %71

61:                                               ; preds = %36
  %62 = load ptr, ptr @optarg, align 8, !tbaa !9
  %63 = call i32 @liquid_getopt_str2crc(ptr noundef %62)
  store i32 %63, ptr %13, align 4, !tbaa !5
  br label %71

64:                                               ; preds = %36
  %65 = load ptr, ptr @optarg, align 8, !tbaa !9
  %66 = call i32 @liquid_getopt_str2fec(ptr noundef %65)
  store i32 %66, ptr %11, align 4, !tbaa !5
  br label %71

67:                                               ; preds = %36
  %68 = load ptr, ptr @optarg, align 8, !tbaa !9
  %69 = call i32 @liquid_getopt_str2fec(ptr noundef %68)
  store i32 %69, ptr %12, align 4, !tbaa !5
  br label %71

70:                                               ; preds = %36
  call void @exit(i32 noundef -1) #9
  unreachable

71:                                               ; preds = %67, %64, %61, %58, %54, %51, %48, %44, %40, %39
  br label %31, !llvm.loop !13

72:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 256, ptr %21, align 4, !tbaa !5
  %73 = load i32, ptr %21, align 4, !tbaa !5
  %74 = zext i32 %73 to i64
  %75 = call ptr @llvm.stacksave.p0()
  store ptr %75, ptr %22, align 8
  %76 = alloca { float, float }, i64 %74, align 16
  store i64 %74, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %77 = load i32, ptr %9, align 4, !tbaa !5
  %78 = zext i32 %77 to i64
  %79 = alloca i8, i64 %78, align 16
  store i64 %78, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #7
  %80 = call i32 @ofdmflexframegenprops_init_default(ptr noundef %26)
  %81 = load i32, ptr %13, align 4, !tbaa !5
  %82 = getelementptr inbounds %struct.ofdmflexframegenprops_s, ptr %26, i32 0, i32 0
  store i32 %81, ptr %82, align 4, !tbaa !15
  %83 = load i32, ptr %11, align 4, !tbaa !5
  %84 = getelementptr inbounds %struct.ofdmflexframegenprops_s, ptr %26, i32 0, i32 1
  store i32 %83, ptr %84, align 4, !tbaa !17
  %85 = load i32, ptr %12, align 4, !tbaa !5
  %86 = getelementptr inbounds %struct.ofdmflexframegenprops_s, ptr %26, i32 0, i32 2
  store i32 %85, ptr %86, align 4, !tbaa !18
  %87 = load i32, ptr %10, align 4, !tbaa !5
  %88 = getelementptr inbounds %struct.ofdmflexframegenprops_s, ptr %26, i32 0, i32 3
  store i32 %87, ptr %88, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %89 = load i32, ptr %6, align 4, !tbaa !5
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = load i32, ptr %8, align 4, !tbaa !5
  %92 = call ptr @ofdmflexframegen_create(i32 noundef %89, i32 noundef %90, i32 noundef %91, ptr noundef null, ptr noundef %26)
  store ptr %92, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %93 = load i32, ptr %6, align 4, !tbaa !5
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = load i32, ptr %8, align 4, !tbaa !5
  %96 = call ptr @ofdmflexframesync_create(i32 noundef %93, i32 noundef %94, i32 noundef %95, ptr noundef null, ptr noundef @callback, ptr noundef %79)
  store ptr %96, ptr %28, align 8, !tbaa !9
  %97 = load i32, ptr %17, align 4, !tbaa !5
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %102

99:                                               ; preds = %72
  %100 = load ptr, ptr %28, align 8, !tbaa !9
  %101 = call i32 @ofdmflexframesync_debug_enable(ptr noundef %100)
  br label %102

102:                                              ; preds = %99, %72
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %113, %102
  %104 = load i32, ptr %20, align 4, !tbaa !5
  %105 = icmp ult i32 %104, 8
  br i1 %105, label %106, label %116

106:                                              ; preds = %103
  %107 = load i32, ptr %20, align 4, !tbaa !5
  %108 = and i32 %107, 255
  %109 = trunc i32 %108 to i8
  %110 = load i32, ptr %20, align 4, !tbaa !5
  %111 = zext i32 %110 to i64
  %112 = getelementptr inbounds [8 x i8], ptr %24, i64 0, i64 %111
  store i8 %109, ptr %112, align 1, !tbaa !20
  br label %113

113:                                              ; preds = %106
  %114 = load i32, ptr %20, align 4, !tbaa !5
  %115 = add i32 %114, 1
  store i32 %115, ptr %20, align 4, !tbaa !5
  br label %103, !llvm.loop !21

116:                                              ; preds = %103
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %128, %116
  %118 = load i32, ptr %20, align 4, !tbaa !5
  %119 = load i32, ptr %9, align 4, !tbaa !5
  %120 = icmp ult i32 %118, %119
  br i1 %120, label %121, label %131

121:                                              ; preds = %117
  %122 = call i32 @rand() #7
  %123 = and i32 %122, 255
  %124 = trunc i32 %123 to i8
  %125 = load i32, ptr %20, align 4, !tbaa !5
  %126 = zext i32 %125 to i64
  %127 = getelementptr inbounds i8, ptr %79, i64 %126
  store i8 %124, ptr %127, align 1, !tbaa !20
  br label %128

128:                                              ; preds = %121
  %129 = load i32, ptr %20, align 4, !tbaa !5
  %130 = add i32 %129, 1
  store i32 %130, ptr %20, align 4, !tbaa !5
  br label %117, !llvm.loop !22

131:                                              ; preds = %117
  %132 = load ptr, ptr %27, align 8, !tbaa !9
  %133 = getelementptr inbounds [8 x i8], ptr %24, i64 0, i64 0
  %134 = load i32, ptr %9, align 4, !tbaa !5
  %135 = call i32 @ofdmflexframegen_assemble(ptr noundef %132, ptr noundef %133, ptr noundef %79, i32 noundef %134)
  %136 = load ptr, ptr %27, align 8, !tbaa !9
  %137 = call i32 @ofdmflexframegen_print(ptr noundef %136)
  %138 = load ptr, ptr %28, align 8, !tbaa !9
  %139 = call i32 @ofdmflexframesync_print(ptr noundef %138)
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %140 = call ptr @channel_cccf_create()
  store ptr %140, ptr %29, align 8, !tbaa !9
  %141 = load ptr, ptr %29, align 8, !tbaa !9
  %142 = load float, ptr %14, align 4, !tbaa !11
  %143 = load float, ptr %15, align 4, !tbaa !11
  %144 = call i32 @channel_cccf_add_awgn(ptr noundef %141, float noundef %142, float noundef %143)
  %145 = load ptr, ptr %29, align 8, !tbaa !9
  %146 = load float, ptr %16, align 4, !tbaa !11
  %147 = call i32 @channel_cccf_add_carrier_offset(ptr noundef %145, float noundef %146, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %152, %131
  %149 = load i32, ptr %30, align 4, !tbaa !5
  %150 = icmp ne i32 %149, 0
  %151 = xor i1 %150, true
  br i1 %151, label %152, label %162

152:                                              ; preds = %148
  %153 = load ptr, ptr %27, align 8, !tbaa !9
  %154 = load i32, ptr %21, align 4, !tbaa !5
  %155 = call i32 @ofdmflexframegen_write(ptr noundef %153, ptr noundef %76, i32 noundef %154)
  store i32 %155, ptr %30, align 4, !tbaa !5
  %156 = load ptr, ptr %29, align 8, !tbaa !9
  %157 = load i32, ptr %21, align 4, !tbaa !5
  %158 = call i32 @channel_cccf_execute_block(ptr noundef %156, ptr noundef %76, i32 noundef %157, ptr noundef %76)
  %159 = load ptr, ptr %28, align 8, !tbaa !9
  %160 = load i32, ptr %21, align 4, !tbaa !5
  %161 = call i32 @ofdmflexframesync_execute(ptr noundef %159, ptr noundef %76, i32 noundef %160)
  br label %148, !llvm.loop !23

162:                                              ; preds = %148
  %163 = load i32, ptr %17, align 4, !tbaa !5
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %168

165:                                              ; preds = %162
  %166 = load ptr, ptr %28, align 8, !tbaa !9
  %167 = call i32 @ofdmflexframesync_debug_print(ptr noundef %166, ptr noundef @.str.13)
  br label %168

168:                                              ; preds = %165, %162
  %169 = load ptr, ptr %28, align 8, !tbaa !9
  %170 = call i32 @ofdmflexframesync_print(ptr noundef %169)
  %171 = load ptr, ptr %27, align 8, !tbaa !9
  %172 = call i32 @ofdmflexframegen_destroy(ptr noundef %171)
  %173 = load ptr, ptr %28, align 8, !tbaa !9
  %174 = call i32 @ofdmflexframesync_destroy(ptr noundef %173)
  %175 = load ptr, ptr %29, align 8, !tbaa !9
  %176 = call i32 @channel_cccf_destroy(ptr noundef %175)
  %177 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  %178 = load ptr, ptr %22, align 8
  call void @llvm.stackrestore.p0(ptr %178)
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %179

179:                                              ; preds = %168, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %180 = load i32, ptr %3, align 4
  ret i32 %180
}

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

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare double @atof(ptr noundef nonnull) #4

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #4

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i64 @atol(ptr noundef nonnull) #4

declare i32 @liquid_getopt_str2mod(ptr noundef) #1

declare i32 @liquid_getopt_str2crc(ptr noundef) #1

declare i32 @liquid_getopt_str2fec(ptr noundef) #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #6

declare i32 @ofdmflexframegenprops_init_default(ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @callback(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%struct.framesyncstats_s) align 8, ptr noundef) #0

declare i32 @ofdmflexframesync_debug_enable(ptr noundef) #1

; Function Attrs: nounwind
declare i32 @rand() #3

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

declare i32 @ofdmflexframegen_print(ptr noundef) #1

declare i32 @ofdmflexframesync_print(ptr noundef) #1

declare ptr @channel_cccf_create() #1

declare i32 @channel_cccf_add_awgn(ptr noundef, float noundef, float noundef) #1

declare i32 @channel_cccf_add_carrier_offset(ptr noundef, float noundef, float noundef) #1

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

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

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

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

declare i32 @ofdmflexframegen_destroy(ptr noundef) #1

declare i32 @ofdmflexframesync_destroy(ptr noundef) #1

declare i32 @channel_cccf_destroy(ptr noundef) #1

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #6

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 "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 = { inlinehint nounwind willreturn memory(read) 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 #5 = { 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 #6 = { nocallback nofree nosync nounwind willreturn }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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 = !{!"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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !6, i64 0}
!16 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!17 = !{!16, !6, i64 4}
!18 = !{!16, !6, i64 8}
!19 = !{!16, !6, i64 12}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}


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

%struct.ofdmflexframegenprops_s = type { i32, i32, i32, i32 }
%struct.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }

@.str.12 = external hidden unnamed_addr constant [22 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @usage() local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca [8 x i8], align 8
  %4 = alloca %struct.ofdmflexframegenprops_s, align 4
  br label %5

5:                                                ; preds = %.backedge, %2
  %.068 = phi float [ 2.000000e+01, %2 ], [ %.068.be, %.backedge ]
  %.066 = phi float [ 0x3F947AE140000000, %2 ], [ %.066.be, %.backedge ]
  %.064 = phi i32 [ 0, %2 ], [ %.064.be, %.backedge ]
  %.062 = phi i32 [ 6, %2 ], [ %.062.be, %.backedge ]
  %.058 = phi i32 [ 6, %2 ], [ %.058.be, %.backedge ]
  %.056 = phi i32 [ 1, %2 ], [ %.056.be, %.backedge ]
  %.054 = phi i32 [ 40, %2 ], [ %.054.be, %.backedge ]
  %.052 = phi i32 [ 120, %2 ], [ %.052.be, %.backedge ]
  %.050 = phi i32 [ 16, %2 ], [ %.050.be, %.backedge ]
  %.049 = phi i32 [ 64, %2 ], [ %.049.be, %.backedge ]
  %6 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.12) #8
  switch i32 %6, label %38 [
    i32 -1, label %39
    i32 117, label %7
    i32 104, label %7
    i32 100, label %.backedge
    i32 115, label %8
    i32 70, label %12
    i32 77, label %16
    i32 67, label %19
    i32 110, label %22
    i32 109, label %26
    i32 118, label %29
    i32 99, label %32
    i32 107, label %35
  ]

.backedge:                                        ; preds = %5, %35, %32, %29, %26, %22, %19, %16, %12, %8
  %.068.be = phi float [ %.068, %35 ], [ %.068, %32 ], [ %.068, %29 ], [ %.068, %26 ], [ %.068, %22 ], [ %.068, %19 ], [ %.068, %16 ], [ %.068, %12 ], [ %11, %8 ], [ %.068, %5 ]
  %.066.be = phi float [ %.066, %35 ], [ %.066, %32 ], [ %.066, %29 ], [ %.066, %26 ], [ %.066, %22 ], [ %.066, %19 ], [ %.066, %16 ], [ %15, %12 ], [ %.066, %8 ], [ %.066, %5 ]
  %.064.be = phi i32 [ %.064, %35 ], [ %.064, %32 ], [ %.064, %29 ], [ %.064, %26 ], [ %.064, %22 ], [ %.064, %19 ], [ %.064, %16 ], [ %.064, %12 ], [ %.064, %8 ], [ 1, %5 ]
  %.062.be = phi i32 [ %.062, %35 ], [ %.062, %32 ], [ %31, %29 ], [ %.062, %26 ], [ %.062, %22 ], [ %.062, %19 ], [ %.062, %16 ], [ %.062, %12 ], [ %.062, %8 ], [ %.062, %5 ]
  %.058.be = phi i32 [ %37, %35 ], [ %.058, %32 ], [ %.058, %29 ], [ %.058, %26 ], [ %.058, %22 ], [ %.058, %19 ], [ %.058, %16 ], [ %.058, %12 ], [ %.058, %8 ], [ %.058, %5 ]
  %.056.be = phi i32 [ %.056, %35 ], [ %34, %32 ], [ %.056, %29 ], [ %.056, %26 ], [ %.056, %22 ], [ %.056, %19 ], [ %.056, %16 ], [ %.056, %12 ], [ %.056, %8 ], [ %.056, %5 ]
  %.054.be = phi i32 [ %.054, %35 ], [ %.054, %32 ], [ %.054, %29 ], [ %28, %26 ], [ %.054, %22 ], [ %.054, %19 ], [ %.054, %16 ], [ %.054, %12 ], [ %.054, %8 ], [ %.054, %5 ]
  %.052.be = phi i32 [ %.052, %35 ], [ %.052, %32 ], [ %.052, %29 ], [ %.052, %26 ], [ %25, %22 ], [ %.052, %19 ], [ %.052, %16 ], [ %.052, %12 ], [ %.052, %8 ], [ %.052, %5 ]
  %.050.be = phi i32 [ %.050, %35 ], [ %.050, %32 ], [ %.050, %29 ], [ %.050, %26 ], [ %.050, %22 ], [ %21, %19 ], [ %.050, %16 ], [ %.050, %12 ], [ %.050, %8 ], [ %.050, %5 ]
  %.049.be = phi i32 [ %.049, %35 ], [ %.049, %32 ], [ %.049, %29 ], [ %.049, %26 ], [ %.049, %22 ], [ %.049, %19 ], [ %18, %16 ], [ %.049, %12 ], [ %.049, %8 ], [ %.049, %5 ]
  br label %5, !llvm.loop !5

7:                                                ; preds = %5, %5
  tail call void @usage()
  br label %74

8:                                                ; preds = %5
  %9 = load ptr, ptr @optarg, align 8, !tbaa !7
  %10 = tail call double @atof(ptr noundef %9) #9
  %11 = fptrunc double %10 to float
  br label %.backedge

12:                                               ; preds = %5
  %13 = load ptr, ptr @optarg, align 8, !tbaa !7
  %14 = tail call double @atof(ptr noundef %13) #9
  %15 = fptrunc double %14 to float
  br label %.backedge

16:                                               ; preds = %5
  %17 = load ptr, ptr @optarg, align 8, !tbaa !7
  %18 = tail call i32 @atoi(ptr nocapture noundef %17) #9
  br label %.backedge

19:                                               ; preds = %5
  %20 = load ptr, ptr @optarg, align 8, !tbaa !7
  %21 = tail call i32 @atoi(ptr nocapture noundef %20) #9
  br label %.backedge

22:                                               ; preds = %5
  %23 = load ptr, ptr @optarg, align 8, !tbaa !7
  %24 = tail call i64 @atol(ptr nocapture noundef %23) #9
  %25 = trunc i64 %24 to i32
  br label %.backedge

26:                                               ; preds = %5
  %27 = load ptr, ptr @optarg, align 8, !tbaa !7
  %28 = tail call i32 @liquid_getopt_str2mod(ptr noundef %27) #8
  br label %.backedge

29:                                               ; preds = %5
  %30 = load ptr, ptr @optarg, align 8, !tbaa !7
  %31 = tail call i32 @liquid_getopt_str2crc(ptr noundef %30) #8
  br label %.backedge

32:                                               ; preds = %5
  %33 = load ptr, ptr @optarg, align 8, !tbaa !7
  %34 = tail call i32 @liquid_getopt_str2fec(ptr noundef %33) #8
  br label %.backedge

35:                                               ; preds = %5
  %36 = load ptr, ptr @optarg, align 8, !tbaa !7
  %37 = tail call i32 @liquid_getopt_str2fec(ptr noundef %36) #8
  br label %.backedge

38:                                               ; preds = %5
  tail call void @exit(i32 noundef -1) #10
  unreachable

39:                                               ; preds = %5
  %40 = tail call ptr @llvm.stacksave.p0()
  %41 = alloca [256 x { float, float }], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %42 = zext i32 %.052 to i64
  %43 = alloca i8, i64 %42, align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  %44 = call i32 @ofdmflexframegenprops_init_default(ptr noundef nonnull %4) #8
  store i32 %.062, ptr %4, align 4, !tbaa !11
  %45 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 %.056, ptr %45, align 4, !tbaa !14
  %46 = getelementptr inbounds i8, ptr %4, i64 8
  store i32 %.058, ptr %46, align 4, !tbaa !15
  %47 = getelementptr inbounds i8, ptr %4, i64 12
  store i32 %.054, ptr %47, align 4, !tbaa !16
  %48 = call ptr @ofdmflexframegen_create(i32 noundef %.049, i32 noundef %.050, i32 noundef 4, ptr noundef null, ptr noundef nonnull %4) #8
  %49 = call ptr @ofdmflexframesync_create(i32 noundef %.049, i32 noundef %.050, i32 noundef 4, ptr noundef null, ptr noundef nonnull @callback, ptr noundef nonnull %43) #8
  %.not71 = icmp eq i32 %.064, 0
  br i1 %.not71, label %.preheader, label %50

50:                                               ; preds = %39
  %51 = call i32 @ofdmflexframesync_debug_enable(ptr noundef %49) #8
  br label %.preheader

.preheader:                                       ; preds = %50, %39
  store <8 x i8> <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7>, ptr %3, align 8, !tbaa !17
  %.not = icmp eq i32 %.052, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader ]
  %52 = call i32 @rand() #8
  %53 = trunc i32 %52 to i8
  %54 = getelementptr inbounds i8, ptr %43, i64 %indvars.iv
  store i8 %53, ptr %54, align 1, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %42
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %55 = call i32 @ofdmflexframegen_assemble(ptr noundef %48, ptr noundef nonnull %3, ptr noundef nonnull %43, i32 noundef %.052) #8
  %56 = call i32 @ofdmflexframegen_print(ptr noundef %48) #8
  %57 = call i32 @ofdmflexframesync_print(ptr noundef %49) #8
  %58 = call ptr @channel_cccf_create() #8
  %59 = call i32 @channel_cccf_add_awgn(ptr noundef %58, float noundef -8.000000e+01, float noundef %.068) #8
  %60 = call i32 @channel_cccf_add_carrier_offset(ptr noundef %58, float noundef %.066, float noundef 0.000000e+00) #8
  br label %61

61:                                               ; preds = %._crit_edge, %61
  %62 = call i32 @ofdmflexframegen_write(ptr noundef %48, ptr noundef nonnull %41, i32 noundef 256) #8
  %63 = call i32 @channel_cccf_execute_block(ptr noundef %58, ptr noundef nonnull %41, i32 noundef 256, ptr noundef nonnull %41) #8
  %64 = call i32 @ofdmflexframesync_execute(ptr noundef %49, ptr noundef nonnull %41, i32 noundef 256) #8
  %.not72 = icmp eq i32 %62, 0
  br i1 %.not72, label %61, label %65, !llvm.loop !19

65:                                               ; preds = %61
  br i1 %.not71, label %68, label %66

66:                                               ; preds = %65
  %67 = call i32 @ofdmflexframesync_debug_print(ptr noundef %49, ptr noundef nonnull @.str.13) #8
  br label %68

68:                                               ; preds = %66, %65
  %69 = call i32 @ofdmflexframesync_print(ptr noundef %49) #8
  %70 = call i32 @ofdmflexframegen_destroy(ptr noundef %48) #8
  %71 = call i32 @ofdmflexframesync_destroy(ptr noundef %49) #8
  %72 = call i32 @channel_cccf_destroy(ptr noundef %58) #8
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.stackrestore.p0(ptr %40)
  br label %74

74:                                               ; preds = %68, %7
  ret i32 0
}

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare double @atof(ptr nocapture noundef nonnull) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i64 @atol(ptr nocapture noundef nonnull) local_unnamed_addr #4

declare i32 @liquid_getopt_str2mod(ptr noundef) local_unnamed_addr #5

declare i32 @liquid_getopt_str2crc(ptr noundef) local_unnamed_addr #5

declare i32 @liquid_getopt_str2fec(ptr noundef) local_unnamed_addr #5

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #7

declare i32 @ofdmflexframegenprops_init_default(ptr noundef) local_unnamed_addr #5

declare ptr @ofdmflexframegen_create(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare ptr @ofdmflexframesync_create(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare dso_local i32 @callback(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%struct.framesyncstats_s) align 8, ptr noundef) #0

declare i32 @ofdmflexframesync_debug_enable(ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #3

declare i32 @ofdmflexframegen_assemble(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

declare i32 @ofdmflexframegen_print(ptr noundef) local_unnamed_addr #5

declare i32 @ofdmflexframesync_print(ptr noundef) local_unnamed_addr #5

declare ptr @channel_cccf_create() local_unnamed_addr #5

declare i32 @channel_cccf_add_awgn(ptr noundef, float noundef, float noundef) local_unnamed_addr #5

declare i32 @channel_cccf_add_carrier_offset(ptr noundef, float noundef, float noundef) local_unnamed_addr #5

declare i32 @ofdmflexframegen_write(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

declare i32 @channel_cccf_execute_block(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

declare i32 @ofdmflexframesync_execute(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

declare i32 @ofdmflexframesync_debug_print(ptr noundef, ptr noundef) local_unnamed_addr #5

declare i32 @ofdmflexframegen_destroy(ptr noundef) local_unnamed_addr #5

declare i32 @ofdmflexframesync_destroy(ptr noundef) local_unnamed_addr #5

declare i32 @channel_cccf_destroy(ptr noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #7

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 = { nofree 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 #5 = { "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 = { 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 #7 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !13, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!13 = !{!"int", !9, i64 0}
!14 = !{!12, !13, i64 4}
!15 = !{!12, !13, i64 8}
!16 = !{!12, !13, i64 12}
!17 = !{!9, !9, i64 0}
!18 = distinct !{!18, !6}
!19 = distinct !{!19, !6}


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