; LLVM IR from jgaeddert/liquid-dsp :: examples (nco_pll_modem_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.modulation_type_s = type { ptr, ptr, i32, i32 }

@.str.8 = external hidden unnamed_addr constant [15 x i8], align 1
@optarg = external global ptr, align 8
@stderr = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@modulation_types = external constant [53 x %struct.modulation_type_s], align 16
@.str.18 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.38 = 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) #2 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca float, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca float, align 4
  %28 = alloca { float, float }, align 4
  %29 = alloca { float, float }, align 4
  %30 = alloca { float, float }, align 4
  %31 = alloca { float, float }, align 4
  %32 = alloca { float, float }, align 4
  %33 = alloca { float, float }, align 4
  %34 = alloca { float, float }, 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
  %35 = call i64 @time(ptr noundef null) #7
  %36 = trunc i64 %35 to i32
  call void @srand(i32 noundef %36) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store float 0x3FD41B2F80000000, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store float 0x3FB99999A0000000, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store float 3.000000e+01, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store float 0x3F60624DE0000000, ptr %9, align 4, !tbaa !11
  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 1200, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  br label %37

37:                                               ; preds = %78, %2
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = load ptr, ptr %5, align 8, !tbaa !9
  %40 = call i32 @getopt(i32 noundef %38, ptr noundef %39, ptr noundef @.str.8) #7
  store i32 %40, ptr %12, align 4, !tbaa !5
  %41 = icmp ne i32 %40, -1
  br i1 %41, label %42, label %79

42:                                               ; preds = %37
  %43 = load i32, ptr %12, align 4, !tbaa !5
  switch i32 %43, label %77 [
    i32 117, label %44
    i32 104, label %44
    i32 115, label %45
    i32 98, label %49
    i32 110, label %53
    i32 80, label %56
    i32 70, label %60
    i32 109, label %64
  ]

44:                                               ; preds = %42, %42
  call void @usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %306

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

49:                                               ; preds = %42
  %50 = load ptr, ptr @optarg, align 8, !tbaa !9
  %51 = call double @atof(ptr noundef %50) #8
  %52 = fptrunc double %51 to float
  store float %52, ptr %9, align 4, !tbaa !11
  br label %78

53:                                               ; preds = %42
  %54 = load ptr, ptr @optarg, align 8, !tbaa !9
  %55 = call i32 @atoi(ptr noundef %54) #8
  store i32 %55, ptr %11, align 4, !tbaa !5
  br label %78

56:                                               ; preds = %42
  %57 = load ptr, ptr @optarg, align 8, !tbaa !9
  %58 = call double @atof(ptr noundef %57) #8
  %59 = fptrunc double %58 to float
  store float %59, ptr %6, align 4, !tbaa !11
  br label %78

60:                                               ; preds = %42
  %61 = load ptr, ptr @optarg, align 8, !tbaa !9
  %62 = call double @atof(ptr noundef %61) #8
  %63 = fptrunc double %62 to float
  store float %63, ptr %7, align 4, !tbaa !11
  br label %78

64:                                               ; preds = %42
  %65 = load ptr, ptr @optarg, align 8, !tbaa !9
  %66 = call i32 @liquid_getopt_str2mod(ptr noundef %65)
  store i32 %66, ptr %10, align 4, !tbaa !5
  %67 = load i32, ptr %10, align 4, !tbaa !5
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %76

69:                                               ; preds = %64
  %70 = load ptr, ptr @stderr, align 8, !tbaa !9
  %71 = load ptr, ptr %5, align 8, !tbaa !9
  %72 = getelementptr inbounds ptr, ptr %71, i64 0
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = load ptr, ptr @optarg, align 8, !tbaa !9
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef @.str.9, ptr noundef %73, ptr noundef %74) #7
  store i32 1, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %306

76:                                               ; preds = %64
  br label %78

77:                                               ; preds = %42
  call void @exit(i32 noundef 1) #9
  unreachable

78:                                               ; preds = %76, %60, %56, %53, %49, %45
  br label %37, !llvm.loop !13

79:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %80 = load i32, ptr %11, align 4, !tbaa !5
  %81 = udiv i32 %80, 32
  store i32 %81, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %82 = call noalias ptr @fopen(ptr noundef @.str.10, ptr noundef @.str.11)
  store ptr %82, ptr %15, align 8, !tbaa !9
  %83 = load ptr, ptr %15, align 8, !tbaa !9
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef @.str.12, ptr noundef @.str.10) #7
  %85 = load ptr, ptr %15, align 8, !tbaa !9
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef @.str.13) #7
  %87 = load ptr, ptr %15, align 8, !tbaa !9
  %88 = load i32, ptr %11, align 4, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.14, i32 noundef %88) #7
  %90 = load ptr, ptr %15, align 8, !tbaa !9
  %91 = load i32, ptr %11, align 4, !tbaa !5
  %92 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %90, ptr noundef @.str.15, i32 noundef %91) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %93 = call ptr @nco_crcf_create(i32 noundef 1)
  store ptr %93, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %94 = call ptr @nco_crcf_create(i32 noundef 1)
  store ptr %94, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %95 = load i32, ptr %10, align 4, !tbaa !5
  %96 = call ptr @modemcf_create(i32 noundef %95)
  store ptr %96, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %97 = load i32, ptr %10, align 4, !tbaa !5
  %98 = call ptr @modemcf_create(i32 noundef %97)
  store ptr %98, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %99 = load ptr, ptr %18, align 8, !tbaa !9
  %100 = call i32 @modemcf_get_bps(ptr noundef %99)
  store i32 %100, ptr %20, align 4, !tbaa !5
  %101 = load ptr, ptr %16, align 8, !tbaa !9
  %102 = load float, ptr %6, align 4, !tbaa !11
  %103 = call i32 @nco_crcf_set_phase(ptr noundef %101, float noundef %102)
  %104 = load ptr, ptr %16, align 8, !tbaa !9
  %105 = load float, ptr %7, align 4, !tbaa !11
  %106 = call i32 @nco_crcf_set_frequency(ptr noundef %104, float noundef %105)
  %107 = load ptr, ptr %17, align 8, !tbaa !9
  %108 = load float, ptr %9, align 4, !tbaa !11
  %109 = call i32 @nco_crcf_pll_set_bandwidth(ptr noundef %107, float noundef %108)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %110 = load float, ptr %8, align 4, !tbaa !11
  %111 = fneg float %110
  %112 = fdiv float %111, 2.000000e+01
  %113 = call float @powf(float noundef 1.000000e+01, float noundef %112) #7
  store float %113, ptr %21, align 4, !tbaa !11
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  %115 = load i32, ptr %20, align 4, !tbaa !5
  %116 = shl i32 1, %115
  %117 = load i32, ptr %10, align 4, !tbaa !5
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds [53 x %struct.modulation_type_s], ptr @modulation_types, i64 0, i64 %118
  %120 = getelementptr inbounds %struct.modulation_type_s, ptr %119, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8, !tbaa !15
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, i32 noundef %116, ptr noundef %121)
  %123 = load float, ptr %7, align 4, !tbaa !11
  %124 = fpext float %123 to double
  %125 = load float, ptr %6, align 4, !tbaa !11
  %126 = fpext float %125 to double
  %127 = load float, ptr %8, align 4, !tbaa !11
  %128 = fpext float %127 to double
  %129 = load float, ptr %9, align 4, !tbaa !11
  %130 = fpext float %129 to double
  %131 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, double noundef %124, double noundef %126, double noundef %128, double noundef %130)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %132 = load i32, ptr %20, align 4, !tbaa !5
  %133 = shl i32 1, %132
  store i32 %133, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 0, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %257, %79
  %135 = load i32, ptr %22, align 4, !tbaa !5
  %136 = load i32, ptr %11, align 4, !tbaa !5
  %137 = icmp ult i32 %135, %136
  br i1 %137, label %138, label %260

138:                                              ; preds = %134
  %139 = call i32 @rand() #7
  %140 = load i32, ptr %23, align 4, !tbaa !5
  %141 = urem i32 %139, %140
  store i32 %141, ptr %24, align 4, !tbaa !5
  %142 = load ptr, ptr %18, align 8, !tbaa !9
  %143 = load i32, ptr %24, align 4, !tbaa !5
  %144 = call i32 @modemcf_modulate(ptr noundef %142, i32 noundef %143, ptr noundef %28)
  %145 = load ptr, ptr %16, align 8, !tbaa !9
  %146 = getelementptr inbounds { float, float }, ptr %28, i32 0, i32 0
  %147 = load float, ptr %146, align 4
  %148 = getelementptr inbounds { float, float }, ptr %28, i32 0, i32 1
  %149 = load float, ptr %148, align 4
  %150 = getelementptr inbounds { float, float }, ptr %32, i32 0, i32 0
  %151 = getelementptr inbounds { float, float }, ptr %32, i32 0, i32 1
  store float %147, ptr %150, align 4
  store float %149, ptr %151, align 4
  %152 = load <2 x float>, ptr %32, align 4
  %153 = call i32 @nco_crcf_mix_up(ptr noundef %145, <2 x float> noundef %152, ptr noundef %29)
  call void @crandnf(ptr noundef %31)
  %154 = getelementptr inbounds { float, float }, ptr %31, i32 0, i32 0
  %155 = load float, ptr %154, align 4
  %156 = getelementptr inbounds { float, float }, ptr %31, i32 0, i32 1
  %157 = load float, ptr %156, align 4
  %158 = load float, ptr %21, align 4, !tbaa !11
  %159 = fmul float %155, %158
  %160 = fmul float %157, %158
  %161 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 0
  %162 = load float, ptr %161, align 4
  %163 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 1
  %164 = load float, ptr %163, align 4
  %165 = fadd float %162, %159
  %166 = fadd float %164, %160
  %167 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 0
  %168 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 1
  store float %165, ptr %167, align 4
  store float %166, ptr %168, align 4
  %169 = load ptr, ptr %17, align 8, !tbaa !9
  %170 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 0
  %171 = load float, ptr %170, align 4
  %172 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 1
  %173 = load float, ptr %172, align 4
  %174 = getelementptr inbounds { float, float }, ptr %33, i32 0, i32 0
  %175 = getelementptr inbounds { float, float }, ptr %33, i32 0, i32 1
  store float %171, ptr %174, align 4
  store float %173, ptr %175, align 4
  %176 = load <2 x float>, ptr %33, align 4
  %177 = call i32 @nco_crcf_mix_down(ptr noundef %169, <2 x float> noundef %176, ptr noundef %30)
  %178 = load ptr, ptr %19, align 8, !tbaa !9
  %179 = getelementptr inbounds { float, float }, ptr %30, i32 0, i32 0
  %180 = load float, ptr %179, align 4
  %181 = getelementptr inbounds { float, float }, ptr %30, i32 0, i32 1
  %182 = load float, ptr %181, align 4
  %183 = getelementptr inbounds { float, float }, ptr %34, i32 0, i32 0
  %184 = getelementptr inbounds { float, float }, ptr %34, i32 0, i32 1
  store float %180, ptr %183, align 4
  store float %182, ptr %184, align 4
  %185 = load <2 x float>, ptr %34, align 4
  %186 = call i32 @modemcf_demodulate(ptr noundef %178, <2 x float> noundef %185, ptr noundef %25)
  %187 = load i32, ptr %24, align 4, !tbaa !5
  %188 = load i32, ptr %25, align 4, !tbaa !5
  %189 = call i32 @count_bit_errors(i32 noundef %187, i32 noundef %188)
  %190 = load i32, ptr %26, align 4, !tbaa !5
  %191 = add i32 %190, %189
  store i32 %191, ptr %26, align 4, !tbaa !5
  %192 = load ptr, ptr %19, align 8, !tbaa !9
  %193 = call float @modemcf_get_demodulator_phase_error(ptr noundef %192)
  store float %193, ptr %27, align 4, !tbaa !11
  %194 = load ptr, ptr %15, align 8, !tbaa !9
  %195 = load i32, ptr %22, align 4, !tbaa !5
  %196 = add i32 %195, 1
  %197 = load float, ptr %27, align 4, !tbaa !11
  %198 = fpext float %197 to double
  %199 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %194, ptr noundef @.str.19, i32 noundef %196, double noundef %198) #7
  %200 = load ptr, ptr %15, align 8, !tbaa !9
  %201 = load i32, ptr %22, align 4, !tbaa !5
  %202 = add i32 %201, 1
  %203 = load ptr, ptr %17, align 8, !tbaa !9
  %204 = call float @nco_crcf_get_frequency(ptr noundef %203)
  %205 = fpext float %204 to double
  %206 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %200, ptr noundef @.str.20, i32 noundef %202, double noundef %205) #7
  %207 = load ptr, ptr %15, align 8, !tbaa !9
  %208 = load i32, ptr %22, align 4, !tbaa !5
  %209 = add i32 %208, 1
  %210 = getelementptr inbounds { float, float }, ptr %30, i32 0, i32 0
  %211 = load float, ptr %210, align 4
  %212 = getelementptr inbounds { float, float }, ptr %30, i32 0, i32 1
  %213 = load float, ptr %212, align 4
  %214 = fpext float %211 to double
  %215 = getelementptr inbounds { float, float }, ptr %30, i32 0, i32 0
  %216 = load float, ptr %215, align 4
  %217 = getelementptr inbounds { float, float }, ptr %30, i32 0, i32 1
  %218 = load float, ptr %217, align 4
  %219 = fpext float %218 to double
  %220 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %207, ptr noundef @.str.21, i32 noundef %209, double noundef %214, double noundef %219) #7
  %221 = load i32, ptr %22, align 4, !tbaa !5
  %222 = add i32 %221, 1
  %223 = load i32, ptr %14, align 4, !tbaa !5
  %224 = urem i32 %222, %223
  %225 = icmp eq i32 %224, 0
  br i1 %225, label %231, label %226

226:                                              ; preds = %138
  %227 = load i32, ptr %22, align 4, !tbaa !5
  %228 = load i32, ptr %11, align 4, !tbaa !5
  %229 = sub i32 %228, 1
  %230 = icmp eq i32 %227, %229
  br i1 %230, label %231, label %249

231:                                              ; preds = %226, %138
  %232 = load i32, ptr %22, align 4, !tbaa !5
  %233 = add i32 %232, 1
  %234 = load float, ptr %27, align 4, !tbaa !11
  %235 = fpext float %234 to double
  %236 = load ptr, ptr %16, align 8, !tbaa !9
  %237 = call float @nco_crcf_get_phase(ptr noundef %236)
  %238 = load ptr, ptr %17, align 8, !tbaa !9
  %239 = call float @nco_crcf_get_phase(ptr noundef %238)
  %240 = fsub float %237, %239
  %241 = fpext float %240 to double
  %242 = load ptr, ptr %16, align 8, !tbaa !9
  %243 = call float @nco_crcf_get_frequency(ptr noundef %242)
  %244 = load ptr, ptr %17, align 8, !tbaa !9
  %245 = call float @nco_crcf_get_frequency(ptr noundef %244)
  %246 = fsub float %243, %245
  %247 = fpext float %246 to double
  %248 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, i32 noundef %233, double noundef %235, double noundef %241, double noundef %247)
  br label %249

249:                                              ; preds = %231, %226
  %250 = load ptr, ptr %16, align 8, !tbaa !9
  %251 = call i32 @nco_crcf_step(ptr noundef %250)
  %252 = load ptr, ptr %17, align 8, !tbaa !9
  %253 = load float, ptr %27, align 4, !tbaa !11
  %254 = call i32 @nco_crcf_pll_step(ptr noundef %252, float noundef %253)
  %255 = load ptr, ptr %17, align 8, !tbaa !9
  %256 = call i32 @nco_crcf_step(ptr noundef %255)
  br label %257

257:                                              ; preds = %249
  %258 = load i32, ptr %22, align 4, !tbaa !5
  %259 = add i32 %258, 1
  store i32 %259, ptr %22, align 4, !tbaa !5
  br label %134, !llvm.loop !17

260:                                              ; preds = %134
  %261 = load ptr, ptr %15, align 8, !tbaa !9
  %262 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %261, ptr noundef @.str.23) #7
  %263 = load ptr, ptr %15, align 8, !tbaa !9
  %264 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %263, ptr noundef @.str.24) #7
  %265 = load ptr, ptr %15, align 8, !tbaa !9
  %266 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %265, ptr noundef @.str.25) #7
  %267 = load ptr, ptr %15, align 8, !tbaa !9
  %268 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %267, ptr noundef @.str.26) #7
  %269 = load ptr, ptr %15, align 8, !tbaa !9
  %270 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %269, ptr noundef @.str.27) #7
  %271 = load ptr, ptr %15, align 8, !tbaa !9
  %272 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %271, ptr noundef @.str.28) #7
  %273 = load ptr, ptr %15, align 8, !tbaa !9
  %274 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %273, ptr noundef @.str.29) #7
  %275 = load ptr, ptr %15, align 8, !tbaa !9
  %276 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %275, ptr noundef @.str.30) #7
  %277 = load ptr, ptr %15, align 8, !tbaa !9
  %278 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %277, ptr noundef @.str.31) #7
  %279 = load ptr, ptr %15, align 8, !tbaa !9
  %280 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %279, ptr noundef @.str.28) #7
  %281 = load ptr, ptr %15, align 8, !tbaa !9
  %282 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %281, ptr noundef @.str.32) #7
  %283 = load ptr, ptr %15, align 8, !tbaa !9
  %284 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %283, ptr noundef @.str.33) #7
  %285 = load ptr, ptr %15, align 8, !tbaa !9
  %286 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %285, ptr noundef @.str.34) #7
  %287 = load ptr, ptr %15, align 8, !tbaa !9
  %288 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %287, ptr noundef @.str.35) #7
  %289 = load ptr, ptr %15, align 8, !tbaa !9
  %290 = call i32 @fclose(ptr noundef %289)
  %291 = call i32 (ptr, ...) @printf(ptr noundef @.str.36, ptr noundef @.str.10)
  %292 = load ptr, ptr %16, align 8, !tbaa !9
  %293 = call i32 @nco_crcf_destroy(ptr noundef %292)
  %294 = load ptr, ptr %17, align 8, !tbaa !9
  %295 = call i32 @nco_crcf_destroy(ptr noundef %294)
  %296 = load ptr, ptr %18, align 8, !tbaa !9
  %297 = call i32 @modemcf_destroy(ptr noundef %296)
  %298 = load ptr, ptr %19, align 8, !tbaa !9
  %299 = call i32 @modemcf_destroy(ptr noundef %298)
  %300 = load i32, ptr %26, align 4, !tbaa !5
  %301 = load i32, ptr %20, align 4, !tbaa !5
  %302 = load i32, ptr %11, align 4, !tbaa !5
  %303 = mul i32 %301, %302
  %304 = call i32 (ptr, ...) @printf(ptr noundef @.str.37, i32 noundef %300, i32 noundef %303)
  %305 = call i32 (ptr, ...) @printf(ptr noundef @.str.38)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, 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 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %306

306:                                              ; preds = %260, %69, %44
  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
  %307 = load i32, ptr %3, align 4
  ret i32 %307
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) #3

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #3

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

; 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) #5

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

declare i32 @liquid_getopt_str2mod(ptr noundef) #1

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

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #1

declare ptr @nco_crcf_create(i32 noundef) #1

declare ptr @modemcf_create(i32 noundef) #1

declare i32 @modemcf_get_bps(ptr noundef) #1

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

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

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

; Function Attrs: nounwind
declare float @powf(float noundef, float noundef) #3

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

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

declare i32 @nco_crcf_mix_up(ptr noundef, <2 x float> noundef, ptr noundef) #1

declare void @crandnf(ptr noundef) #1

declare i32 @nco_crcf_mix_down(ptr noundef, <2 x float> noundef, ptr noundef) #1

declare i32 @modemcf_demodulate(ptr noundef, <2 x float> noundef, ptr noundef) #1

declare i32 @count_bit_errors(i32 noundef, i32 noundef) #1

declare float @modemcf_get_demodulator_phase_error(ptr noundef) #1

declare float @nco_crcf_get_frequency(ptr noundef) #1

declare float @nco_crcf_get_phase(ptr noundef) #1

declare i32 @nco_crcf_step(ptr noundef) #1

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

declare i32 @fclose(ptr noundef) #1

declare i32 @nco_crcf_destroy(ptr noundef) #1

declare i32 @modemcf_destroy(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { nounwind uwtable "min-legal-vector-width"="64" "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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #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 = { 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, !10, i64 0}
!16 = !{!"modulation_type_s", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 20}
!17 = distinct !{!17, !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.modulation_type_s = type { ptr, ptr, i32, i32 }

@.str.8 = external hidden unnamed_addr constant [15 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@modulation_types = external local_unnamed_addr constant [53 x %struct.modulation_type_s], align 16
@.str.18 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.38 = 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 range(i32 0, 2) i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca i32, align 4
  %4 = alloca { float, float }, align 8
  %5 = alloca { float, float }, align 8
  %6 = alloca { float, float }, align 8
  %7 = alloca { float, float }, align 8
  %8 = tail call i64 @time(ptr noundef null) #9
  %9 = trunc i64 %8 to i32
  tail call void @srand(i32 noundef %9) #9
  br label %.outer

.outer:                                           ; preds = %21, %2
  %.0102.ph = phi i32 [ %23, %21 ], [ 1200, %2 ]
  %.0100.ph = phi i32 [ %.0100.ph182, %21 ], [ 40, %2 ]
  %.098.ph = phi float [ %.098.ph188, %21 ], [ 0x3F60624DE0000000, %2 ]
  %.096.ph = phi float [ %.096.ph193, %21 ], [ 3.000000e+01, %2 ]
  %.093.ph = phi float [ %.093.ph197, %21 ], [ 0x3FB99999A0000000, %2 ]
  %.092.ph = phi float [ %.092, %21 ], [ 0x3FD41B2F80000000, %2 ]
  br label %.outer181

.outer181:                                        ; preds = %.outer, %32
  %.0100.ph182 = phi i32 [ %.0100.ph, %.outer ], [ %34, %32 ]
  %.098.ph183 = phi float [ %.098.ph, %.outer ], [ %.098.ph188, %32 ]
  %.096.ph184 = phi float [ %.096.ph, %.outer ], [ %.096.ph193, %32 ]
  %.093.ph185 = phi float [ %.093.ph, %.outer ], [ %.093.ph197, %32 ]
  %.092.ph186 = phi float [ %.092.ph, %.outer ], [ %.092, %32 ]
  br label %.outer187

.outer187:                                        ; preds = %.outer181, %17
  %.098.ph188 = phi float [ %.098.ph183, %.outer181 ], [ %20, %17 ]
  %.096.ph189 = phi float [ %.096.ph184, %.outer181 ], [ %.096.ph193, %17 ]
  %.093.ph190 = phi float [ %.093.ph185, %.outer181 ], [ %.093.ph197, %17 ]
  %.092.ph191 = phi float [ %.092.ph186, %.outer181 ], [ %.092, %17 ]
  br label %.outer192

.outer192:                                        ; preds = %.outer187, %13
  %.096.ph193 = phi float [ %.096.ph189, %.outer187 ], [ %16, %13 ]
  %.093.ph194 = phi float [ %.093.ph190, %.outer187 ], [ %.093.ph197, %13 ]
  %.092.ph195 = phi float [ %.092.ph191, %.outer187 ], [ %.092, %13 ]
  br label %.outer196

.outer196:                                        ; preds = %.outer192, %28
  %.093.ph197 = phi float [ %.093.ph194, %.outer192 ], [ %31, %28 ]
  %.092.ph198 = phi float [ %.092.ph195, %.outer192 ], [ %.092, %28 ]
  br label %10

10:                                               ; preds = %.outer196, %24
  %.092 = phi float [ %27, %24 ], [ %.092.ph198, %.outer196 ]
  %11 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.8) #9
  switch i32 %11, label %41 [
    i32 -1, label %42
    i32 117, label %12
    i32 104, label %12
    i32 115, label %13
    i32 98, label %17
    i32 110, label %21
    i32 80, label %24
    i32 70, label %28
    i32 109, label %32
  ]

12:                                               ; preds = %10, %10
  tail call void @usage()
  br label %143

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

17:                                               ; preds = %10
  %18 = load ptr, ptr @optarg, align 8, !tbaa !5
  %19 = tail call double @atof(ptr noundef %18) #10
  %20 = fptrunc double %19 to float
  br label %.outer187, !llvm.loop !9

21:                                               ; preds = %10
  %22 = load ptr, ptr @optarg, align 8, !tbaa !5
  %23 = tail call i32 @atoi(ptr nocapture noundef %22) #10
  br label %.outer, !llvm.loop !9

24:                                               ; preds = %10
  %25 = load ptr, ptr @optarg, align 8, !tbaa !5
  %26 = tail call double @atof(ptr noundef %25) #10
  %27 = fptrunc double %26 to float
  br label %10, !llvm.loop !9

28:                                               ; preds = %10
  %29 = load ptr, ptr @optarg, align 8, !tbaa !5
  %30 = tail call double @atof(ptr noundef %29) #10
  %31 = fptrunc double %30 to float
  br label %.outer196, !llvm.loop !9

32:                                               ; preds = %10
  %33 = load ptr, ptr @optarg, align 8, !tbaa !5
  %34 = tail call i32 @liquid_getopt_str2mod(ptr noundef %33) #9
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %.outer181, !llvm.loop !9

36:                                               ; preds = %32
  %37 = load ptr, ptr @stderr, align 8, !tbaa !5
  %38 = load ptr, ptr %1, align 8, !tbaa !5
  %39 = load ptr, ptr @optarg, align 8, !tbaa !5
  %40 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.9, ptr noundef %38, ptr noundef %39) #11
  br label %143

41:                                               ; preds = %10
  tail call void @exit(i32 noundef 1) #12
  unreachable

42:                                               ; preds = %10
  %43 = lshr i32 %.0102.ph, 5
  %44 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.11)
  %45 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.10) #9
  %46 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.13) #9
  %47 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.14, i32 noundef %.0102.ph) #9
  %48 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.15, i32 noundef %.0102.ph) #9
  %49 = tail call ptr @nco_crcf_create(i32 noundef 1) #9
  %50 = tail call ptr @nco_crcf_create(i32 noundef 1) #9
  %51 = tail call ptr @modemcf_create(i32 noundef %.0100.ph182) #9
  %52 = tail call ptr @modemcf_create(i32 noundef %.0100.ph182) #9
  %53 = tail call i32 @modemcf_get_bps(ptr noundef %51) #9
  %54 = tail call i32 @nco_crcf_set_phase(ptr noundef %49, float noundef %.092) #9
  %55 = tail call i32 @nco_crcf_set_frequency(ptr noundef %49, float noundef %.093.ph197) #9
  %56 = tail call i32 @nco_crcf_pll_set_bandwidth(ptr noundef %50, float noundef %.098.ph188) #9
  %57 = fdiv float %.096.ph193, -2.000000e+01
  %58 = tail call float @powf(float noundef 1.000000e+01, float noundef %57) #9
  %59 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  %60 = shl nuw i32 1, %53
  %61 = zext i32 %.0100.ph182 to i64
  %62 = getelementptr inbounds [53 x %struct.modulation_type_s], ptr @modulation_types, i64 0, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !11
  %64 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, i32 noundef %60, ptr noundef %63)
  %65 = fpext float %.093.ph197 to double
  %66 = fpext float %.092 to double
  %67 = fpext float %.096.ph193 to double
  %68 = fpext float %.098.ph188 to double
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, double noundef %65, double noundef %66, double noundef %67, double noundef %68)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %.not = icmp eq i32 %.0102.ph, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %42
  %70 = add i32 %60, -1
  %71 = getelementptr inbounds i8, ptr %6, i64 4
  %72 = add i32 %.0102.ph, -1
  %73 = insertelement <2 x float> poison, float %58, i64 0
  %74 = shufflevector <2 x float> %73, <2 x float> poison, <2 x i32> zeroinitializer
  br label %75

75:                                               ; preds = %.lr.ph, %116
  %.091126 = phi i32 [ 0, %.lr.ph ], [ %90, %116 ]
  %.095125 = phi i32 [ 0, %.lr.ph ], [ %92, %116 ]
  %76 = call i32 @rand() #9
  %77 = and i32 %76, %70
  %78 = call i32 @modemcf_modulate(ptr noundef %51, i32 noundef %77, ptr noundef nonnull %4) #9
  %79 = load <2 x float>, ptr %4, align 8
  %80 = call i32 @nco_crcf_mix_up(ptr noundef %49, <2 x float> noundef %79, ptr noundef nonnull %5) #9
  call void @crandnf(ptr noundef nonnull %7) #9
  %81 = load <2 x float>, ptr %7, align 8
  %82 = fmul <2 x float> %74, %81
  %83 = load <2 x float>, ptr %5, align 8
  %84 = fadd <2 x float> %82, %83
  store <2 x float> %84, ptr %5, align 8
  %85 = call i32 @nco_crcf_mix_down(ptr noundef %50, <2 x float> noundef %84, ptr noundef nonnull %6) #9
  %86 = load <2 x float>, ptr %6, align 8
  %87 = call i32 @modemcf_demodulate(ptr noundef %52, <2 x float> noundef %86, ptr noundef nonnull %3) #9
  %88 = load i32, ptr %3, align 4, !tbaa !14
  %89 = call i32 @count_bit_errors(i32 noundef %77, i32 noundef %88) #9
  %90 = add i32 %89, %.091126
  %91 = call float @modemcf_get_demodulator_phase_error(ptr noundef %52) #9
  %92 = add nuw i32 %.095125, 1
  %93 = fpext float %91 to double
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.19, i32 noundef %92, double noundef %93) #9
  %95 = call float @nco_crcf_get_frequency(ptr noundef %50) #9
  %96 = fpext float %95 to double
  %97 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.20, i32 noundef %92, double noundef %96) #9
  %98 = load float, ptr %6, align 8
  %99 = fpext float %98 to double
  %100 = load float, ptr %71, align 4
  %101 = fpext float %100 to double
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.21, i32 noundef %92, double noundef %99, double noundef %101) #9
  %103 = urem i32 %92, %43
  %104 = icmp eq i32 %103, 0
  %105 = icmp eq i32 %.095125, %72
  %or.cond = select i1 %104, i1 true, i1 %105
  br i1 %or.cond, label %106, label %116

106:                                              ; preds = %75
  %107 = call float @nco_crcf_get_phase(ptr noundef %49) #9
  %108 = call float @nco_crcf_get_phase(ptr noundef %50) #9
  %109 = fsub float %107, %108
  %110 = fpext float %109 to double
  %111 = call float @nco_crcf_get_frequency(ptr noundef %49) #9
  %112 = call float @nco_crcf_get_frequency(ptr noundef %50) #9
  %113 = fsub float %111, %112
  %114 = fpext float %113 to double
  %115 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, i32 noundef %92, double noundef %93, double noundef %110, double noundef %114)
  br label %116

116:                                              ; preds = %75, %106
  %117 = call i32 @nco_crcf_step(ptr noundef %49) #9
  %118 = call i32 @nco_crcf_pll_step(ptr noundef %50, float noundef %91) #9
  %119 = call i32 @nco_crcf_step(ptr noundef %50) #9
  %exitcond.not = icmp eq i32 %92, %.0102.ph
  br i1 %exitcond.not, label %._crit_edge, label %75, !llvm.loop !15

._crit_edge:                                      ; preds = %116, %42
  %.091.lcssa = phi i32 [ 0, %42 ], [ %90, %116 ]
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.23) #9
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.24) #9
  %122 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.25) #9
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.26) #9
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.27) #9
  %125 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.28) #9
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.29) #9
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.30) #9
  %128 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.31) #9
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.28) #9
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.32) #9
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.33) #9
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.34) #9
  %133 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.35) #9
  %134 = call i32 @fclose(ptr noundef %44)
  %135 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.36, ptr noundef nonnull @.str.10)
  %136 = call i32 @nco_crcf_destroy(ptr noundef %49) #9
  %137 = call i32 @nco_crcf_destroy(ptr noundef %50) #9
  %138 = call i32 @modemcf_destroy(ptr noundef %51) #9
  %139 = call i32 @modemcf_destroy(ptr noundef %52) #9
  %140 = mul i32 %53, %.0102.ph
  %141 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.37, i32 noundef %.091.lcssa, i32 noundef %140)
  %142 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  br label %143

143:                                              ; preds = %._crit_edge, %36, %12
  %.0 = phi i32 [ 1, %36 ], [ 0, %12 ], [ 0, %._crit_edge ]
  ret i32 %.0
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #3

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

; 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 #5

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

declare i32 @liquid_getopt_str2mod(ptr noundef) local_unnamed_addr #6

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

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

declare ptr @nco_crcf_create(i32 noundef) local_unnamed_addr #6

declare ptr @modemcf_create(i32 noundef) local_unnamed_addr #6

declare i32 @modemcf_get_bps(ptr noundef) local_unnamed_addr #6

declare i32 @nco_crcf_set_phase(ptr noundef, float noundef) local_unnamed_addr #6

declare i32 @nco_crcf_set_frequency(ptr noundef, float noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @powf(float noundef, float noundef) local_unnamed_addr #8

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

declare i32 @modemcf_modulate(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

declare i32 @nco_crcf_mix_up(ptr noundef, <2 x float> noundef, ptr noundef) local_unnamed_addr #6

declare void @crandnf(ptr noundef) local_unnamed_addr #6

declare i32 @nco_crcf_mix_down(ptr noundef, <2 x float> noundef, ptr noundef) local_unnamed_addr #6

declare i32 @modemcf_demodulate(ptr noundef, <2 x float> noundef, ptr noundef) local_unnamed_addr #6

declare i32 @count_bit_errors(i32 noundef, i32 noundef) local_unnamed_addr #6

declare float @modemcf_get_demodulator_phase_error(ptr noundef) local_unnamed_addr #6

declare float @nco_crcf_get_frequency(ptr noundef) local_unnamed_addr #6

declare float @nco_crcf_get_phase(ptr noundef) local_unnamed_addr #6

declare i32 @nco_crcf_step(ptr noundef) local_unnamed_addr #6

declare i32 @nco_crcf_pll_step(ptr noundef, float noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #1

declare i32 @nco_crcf_destroy(ptr noundef) local_unnamed_addr #6

declare i32 @modemcf_destroy(ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { 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 = { nounwind uwtable "min-legal-vector-width"="64" "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 "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { "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 = { 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 #8 = { mustprogress nofree nounwind willreturn memory(write) "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 #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { cold nounwind }
attributes #12 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 0}
!12 = !{!"modulation_type_s", !6, i64 0, !6, i64 8, !13, i64 16, !13, i64 20}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = distinct !{!15, !10}


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