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

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

@.str.2 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@__const.autotest_msourcecf_copy.filename = external hidden unnamed_addr constant [31 x i8], align 16
@.str.37 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [23 x i8], align 1

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

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

declare ptr @spgramcf_create_default(i32 noundef) #1

declare ptr @msourcecf_create_default() #1

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

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

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

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

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

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

declare i32 @msourcecf_destroy(ptr noundef) #1

declare i32 @spgramcf_destroy(ptr noundef) #1

; 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 nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

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

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

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

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

declare void @liquid_autotest_failed_expr(ptr noundef, i32 noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, double noundef) #1

declare void @liquid_autotest_passed(...) #1

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

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

declare ptr @msourcecf_copy(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @autotest_msourcecf_copy() #5 {
  %1 = alloca float, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca [31 x i8], align 16
  %21 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #7
  store float 1.500000e+00, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 40, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 12, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store float 0x3FD3333340000000, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store float 0x3FD6666660000000, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1200, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 720000, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = call ptr @spgramcf_create_default(i32 noundef %22)
  store ptr %23, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = call ptr @spgramcf_create_default(i32 noundef %24)
  store ptr %25, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1024, ptr %10, align 4, !tbaa !9
  %26 = load i32, ptr %10, align 4, !tbaa !9
  %27 = zext i32 %26 to i64
  %28 = call ptr @llvm.stacksave.p0()
  store ptr %28, ptr %11, align 8
  %29 = alloca { float, float }, i64 %27, align 16
  store i64 %27, ptr %12, align 8
  %30 = load i32, ptr %10, align 4, !tbaa !9
  %31 = zext i32 %30 to i64
  %32 = alloca { float, float }, i64 %31, align 16
  store i64 %31, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %33 = call ptr @msourcecf_create_default()
  store ptr %33, ptr %14, align 8, !tbaa !11
  %34 = load ptr, ptr %14, align 8, !tbaa !11
  %35 = call i32 @msourcecf_add_noise(ptr noundef %34, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef -4.000000e+01)
  %36 = load ptr, ptr %14, align 8, !tbaa !11
  %37 = call i32 @msourcecf_add_tone(ptr noundef %36, float noundef 0xBFDCCCCCC0000000, float noundef 0.000000e+00, float noundef 2.000000e+01)
  %38 = load ptr, ptr %14, align 8, !tbaa !11
  %39 = call i32 @msourcecf_add_fsk(ptr noundef %38, float noundef 0xBFD51EB860000000, float noundef 0x3FA99999A0000000, float noundef -1.000000e+01, i32 noundef 3, i32 noundef 16)
  %40 = load ptr, ptr %14, align 8, !tbaa !11
  %41 = load i32, ptr %3, align 4, !tbaa !9
  %42 = load float, ptr %5, align 4, !tbaa !5
  %43 = call i32 @msourcecf_add_gmsk(ptr noundef %40, float noundef 0xBFC99999A0000000, float noundef 0x3FA99999A0000000, float noundef 0.000000e+00, i32 noundef %41, float noundef %42)
  %44 = load ptr, ptr %14, align 8, !tbaa !11
  %45 = call i32 @msourcecf_add_noise(ptr noundef %44, float noundef 0xBFA99999A0000000, float noundef 0x3FB99999A0000000, float noundef 0.000000e+00)
  %46 = load ptr, ptr %14, align 8, !tbaa !11
  %47 = call i32 @msourcecf_add_chirp(ptr noundef %46, float noundef 0x3FB1EB8520000000, float noundef 0x3FB1EB8520000000, float noundef 2.000000e+01, float noundef 8.000000e+03, i32 noundef 0, i32 noundef 0)
  %48 = load ptr, ptr %14, align 8, !tbaa !11
  %49 = load i32, ptr %2, align 4, !tbaa !9
  %50 = load i32, ptr %3, align 4, !tbaa !9
  %51 = load float, ptr %4, align 4, !tbaa !5
  %52 = call i32 @msourcecf_add_modem(ptr noundef %48, float noundef 0x3FC99999A0000000, float noundef 0x3FB99999A0000000, float noundef 0.000000e+00, i32 noundef %49, i32 noundef %50, float noundef %51)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %53 = load ptr, ptr %14, align 8, !tbaa !11
  %54 = call ptr @msourcecf_copy(ptr noundef %53)
  store ptr %54, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %59, %0
  %56 = load i32, ptr %16, align 4, !tbaa !9
  %57 = load i32, ptr %7, align 4, !tbaa !9
  %58 = icmp ult i32 %56, %57
  br i1 %58, label %59, label %75

59:                                               ; preds = %55
  %60 = load ptr, ptr %14, align 8, !tbaa !11
  %61 = load i32, ptr %10, align 4, !tbaa !9
  %62 = call i32 @msourcecf_write_samples(ptr noundef %60, ptr noundef %29, i32 noundef %61)
  %63 = load ptr, ptr %15, align 8, !tbaa !11
  %64 = load i32, ptr %10, align 4, !tbaa !9
  %65 = call i32 @msourcecf_write_samples(ptr noundef %63, ptr noundef %32, i32 noundef %64)
  %66 = load ptr, ptr %8, align 8, !tbaa !11
  %67 = load i32, ptr %10, align 4, !tbaa !9
  %68 = call i32 @spgramcf_write(ptr noundef %66, ptr noundef %29, i32 noundef %67)
  %69 = load ptr, ptr %9, align 8, !tbaa !11
  %70 = load i32, ptr %10, align 4, !tbaa !9
  %71 = call i32 @spgramcf_write(ptr noundef %69, ptr noundef %32, i32 noundef %70)
  %72 = load i32, ptr %10, align 4, !tbaa !9
  %73 = load i32, ptr %16, align 4, !tbaa !9
  %74 = add i32 %73, %72
  store i32 %74, ptr %16, align 4, !tbaa !9
  br label %55, !llvm.loop !13

75:                                               ; preds = %55
  %76 = load i32, ptr %16, align 4, !tbaa !9
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %76)
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = alloca float, i64 %79, align 16
  store i64 %79, ptr %17, align 8
  %81 = load i32, ptr %6, align 4, !tbaa !9
  %82 = zext i32 %81 to i64
  %83 = alloca float, i64 %82, align 16
  store i64 %82, ptr %18, align 8
  %84 = load ptr, ptr %8, align 8, !tbaa !11
  %85 = call i32 @spgramcf_get_psd(ptr noundef %84, ptr noundef %80)
  %86 = load ptr, ptr %9, align 8, !tbaa !11
  %87 = call i32 @spgramcf_get_psd(ptr noundef %86, ptr noundef %83)
  %88 = load ptr, ptr %14, align 8, !tbaa !11
  %89 = call i32 @msourcecf_destroy(ptr noundef %88)
  %90 = load ptr, ptr %15, align 8, !tbaa !11
  %91 = call i32 @msourcecf_destroy(ptr noundef %90)
  %92 = load ptr, ptr %8, align 8, !tbaa !11
  %93 = call i32 @spgramcf_destroy(ptr noundef %92)
  %94 = load ptr, ptr %9, align 8, !tbaa !11
  %95 = call i32 @spgramcf_destroy(ptr noundef %94)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 31, ptr %20) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 @__const.autotest_msourcecf_copy.filename, i64 31, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %96 = getelementptr inbounds [31 x i8], ptr %20, i64 0, i64 0
  %97 = call noalias ptr @fopen(ptr noundef %96, ptr noundef @.str.37)
  store ptr %97, ptr %21, align 8, !tbaa !11
  %98 = load ptr, ptr %21, align 8, !tbaa !11
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef @.str.38) #7
  %100 = load ptr, ptr %21, align 8, !tbaa !11
  %101 = load i32, ptr %6, align 4, !tbaa !9
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef @.str.39, i32 noundef %101) #7
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %240, %75
  %104 = load i32, ptr %19, align 4, !tbaa !9
  %105 = load i32, ptr %6, align 4, !tbaa !9
  %106 = icmp ult i32 %104, %105
  br i1 %106, label %107, label %243

107:                                              ; preds = %103
  %108 = load i32, ptr %19, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds float, ptr %80, i64 %109
  %111 = load float, ptr %110, align 4, !tbaa !5
  %112 = load i32, ptr %19, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds float, ptr %83, i64 %113
  %115 = load float, ptr %114, align 4, !tbaa !5
  %116 = fsub float %111, %115
  %117 = fpext float %116 to double
  %118 = load i32, ptr %19, align 4, !tbaa !9
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds float, ptr %80, i64 %119
  %121 = load float, ptr %120, align 4, !tbaa !5
  %122 = load i32, ptr %19, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds float, ptr %83, i64 %123
  %125 = load float, ptr %124, align 4, !tbaa !5
  %126 = fsub float %121, %125
  %127 = fpext float %126 to double
  %128 = load i32, ptr %19, align 4, !tbaa !9
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds float, ptr %80, i64 %129
  %131 = load float, ptr %130, align 4, !tbaa !5
  %132 = load i32, ptr %19, align 4, !tbaa !9
  %133 = zext i32 %132 to i64
  %134 = getelementptr inbounds float, ptr %83, i64 %133
  %135 = load float, ptr %134, align 4, !tbaa !5
  %136 = fsub float %131, %135
  %137 = fpext float %136 to double
  %138 = load i32, ptr %19, align 4, !tbaa !9
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds float, ptr %80, i64 %139
  %141 = load float, ptr %140, align 4, !tbaa !5
  %142 = load i32, ptr %19, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds float, ptr %83, i64 %143
  %145 = load float, ptr %144, align 4, !tbaa !5
  %146 = fsub float %141, %145
  %147 = fpext float %146 to double
  %148 = call double @llvm.fmuladd.f64(double %117, double %127, double 0.000000e+00)
  %149 = call double @sqrt(double noundef %148) #7
  %150 = load float, ptr %1, align 4, !tbaa !5
  %151 = fpext float %150 to double
  %152 = fcmp ogt double %149, %151
  br i1 %152, label %177, label %153

153:                                              ; preds = %107
  %154 = load i32, ptr %19, align 4, !tbaa !9
  %155 = zext i32 %154 to i64
  %156 = getelementptr inbounds float, ptr %80, i64 %155
  %157 = load float, ptr %156, align 4, !tbaa !5
  %158 = call i1 @llvm.is.fpclass.f32(float %157, i32 3)
  br i1 %158, label %177, label %159

159:                                              ; preds = %153
  %160 = load i32, ptr %19, align 4, !tbaa !9
  %161 = zext i32 %160 to i64
  %162 = getelementptr inbounds float, ptr %80, i64 %161
  %163 = load float, ptr %162, align 4, !tbaa !5
  %164 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %164, label %177, label %165

165:                                              ; preds = %159
  %166 = load i32, ptr %19, align 4, !tbaa !9
  %167 = zext i32 %166 to i64
  %168 = getelementptr inbounds float, ptr %83, i64 %167
  %169 = load float, ptr %168, align 4, !tbaa !5
  %170 = call i1 @llvm.is.fpclass.f32(float %169, i32 3)
  br i1 %170, label %177, label %171

171:                                              ; preds = %165
  %172 = load i32, ptr %19, align 4, !tbaa !9
  %173 = zext i32 %172 to i64
  %174 = getelementptr inbounds float, ptr %83, i64 %173
  %175 = load float, ptr %174, align 4, !tbaa !5
  %176 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %176, label %177, label %222

177:                                              ; preds = %171, %165, %159, %153, %107
  %178 = load i32, ptr %19, align 4, !tbaa !9
  %179 = zext i32 %178 to i64
  %180 = getelementptr inbounds float, ptr %80, i64 %179
  %181 = load float, ptr %180, align 4, !tbaa !5
  %182 = load i32, ptr %19, align 4, !tbaa !9
  %183 = zext i32 %182 to i64
  %184 = getelementptr inbounds float, ptr %83, i64 %183
  %185 = load float, ptr %184, align 4, !tbaa !5
  %186 = fsub float %181, %185
  %187 = fpext float %186 to double
  %188 = load i32, ptr %19, align 4, !tbaa !9
  %189 = zext i32 %188 to i64
  %190 = getelementptr inbounds float, ptr %80, i64 %189
  %191 = load float, ptr %190, align 4, !tbaa !5
  %192 = load i32, ptr %19, align 4, !tbaa !9
  %193 = zext i32 %192 to i64
  %194 = getelementptr inbounds float, ptr %83, i64 %193
  %195 = load float, ptr %194, align 4, !tbaa !5
  %196 = fsub float %191, %195
  %197 = fpext float %196 to double
  %198 = load i32, ptr %19, align 4, !tbaa !9
  %199 = zext i32 %198 to i64
  %200 = getelementptr inbounds float, ptr %80, i64 %199
  %201 = load float, ptr %200, align 4, !tbaa !5
  %202 = load i32, ptr %19, align 4, !tbaa !9
  %203 = zext i32 %202 to i64
  %204 = getelementptr inbounds float, ptr %83, i64 %203
  %205 = load float, ptr %204, align 4, !tbaa !5
  %206 = fsub float %201, %205
  %207 = fpext float %206 to double
  %208 = load i32, ptr %19, align 4, !tbaa !9
  %209 = zext i32 %208 to i64
  %210 = getelementptr inbounds float, ptr %80, i64 %209
  %211 = load float, ptr %210, align 4, !tbaa !5
  %212 = load i32, ptr %19, align 4, !tbaa !9
  %213 = zext i32 %212 to i64
  %214 = getelementptr inbounds float, ptr %83, i64 %213
  %215 = load float, ptr %214, align 4, !tbaa !5
  %216 = fsub float %211, %215
  %217 = fpext float %216 to double
  %218 = call double @llvm.fmuladd.f64(double %187, double %197, double 0.000000e+00)
  %219 = call double @sqrt(double noundef %218) #7
  %220 = load float, ptr %1, align 4, !tbaa !5
  %221 = fpext float %220 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.2, i32 noundef 461, ptr noundef @.str.40, double noundef %219, ptr noundef @.str.41, ptr noundef @.str.42, double noundef %221)
  br label %223

222:                                              ; preds = %171
  call void (...) @liquid_autotest_passed()
  br label %223

223:                                              ; preds = %222, %177
  %224 = load ptr, ptr %21, align 8, !tbaa !11
  %225 = load i32, ptr %19, align 4, !tbaa !9
  %226 = add i32 %225, 1
  %227 = load i32, ptr %19, align 4, !tbaa !9
  %228 = zext i32 %227 to i64
  %229 = getelementptr inbounds float, ptr %80, i64 %228
  %230 = load float, ptr %229, align 4, !tbaa !5
  %231 = fpext float %230 to double
  %232 = load i32, ptr %19, align 4, !tbaa !9
  %233 = add i32 %232, 1
  %234 = load i32, ptr %19, align 4, !tbaa !9
  %235 = zext i32 %234 to i64
  %236 = getelementptr inbounds float, ptr %83, i64 %235
  %237 = load float, ptr %236, align 4, !tbaa !5
  %238 = fpext float %237 to double
  %239 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %224, ptr noundef @.str.43, i32 noundef %226, double noundef %231, i32 noundef %233, double noundef %238) #7
  br label %240

240:                                              ; preds = %223
  %241 = load i32, ptr %19, align 4, !tbaa !9
  %242 = add i32 %241, 1
  store i32 %242, ptr %19, align 4, !tbaa !9
  br label %103, !llvm.loop !15

243:                                              ; preds = %103
  %244 = load ptr, ptr %21, align 8, !tbaa !11
  %245 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %244, ptr noundef @.str.44) #7
  %246 = load ptr, ptr %21, align 8, !tbaa !11
  %247 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %246, ptr noundef @.str.45) #7
  %248 = load ptr, ptr %21, align 8, !tbaa !11
  %249 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %248, ptr noundef @.str.46) #7
  %250 = load ptr, ptr %21, align 8, !tbaa !11
  %251 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %250, ptr noundef @.str.47) #7
  %252 = load ptr, ptr %21, align 8, !tbaa !11
  %253 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %252, ptr noundef @.str.48) #7
  %254 = load ptr, ptr %21, align 8, !tbaa !11
  %255 = call i32 @fclose(ptr noundef %254)
  %256 = getelementptr inbounds [31 x i8], ptr %20, i64 0, i64 0
  %257 = call i32 (ptr, ...) @printf(ptr noundef @.str.49, ptr noundef %256)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 31, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %258 = load ptr, ptr %11, align 8
  call void @llvm.stackrestore.p0(ptr %258)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #7
  ret void
}

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i1 @llvm.is.fpclass.f32(float, i32 immarg) #6

declare i32 @fclose(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !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"

@.str.2 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@__const.autotest_msourcecf_copy.filename = external hidden unnamed_addr constant [31 x i8], align 16
@.str.37 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [23 x i8], align 1

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

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

declare ptr @spgramcf_create_default(i32 noundef) local_unnamed_addr #1

declare ptr @msourcecf_create_default() local_unnamed_addr #1

declare i32 @msourcecf_add_noise(ptr noundef, float noundef, float noundef, float noundef) local_unnamed_addr #1

declare i32 @msourcecf_add_tone(ptr noundef, float noundef, float noundef, float noundef) local_unnamed_addr #1

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

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

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

declare i32 @msourcecf_destroy(ptr noundef) local_unnamed_addr #1

declare i32 @spgramcf_destroy(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress 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) #2

declare i32 @msourcecf_add_chirp(ptr noundef, float noundef, float noundef, float noundef, float noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare i32 @msourcecf_add_fsk(ptr noundef, float noundef, float noundef, float noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare i32 @msourcecf_add_gmsk(ptr noundef, float noundef, float noundef, float noundef, i32 noundef, float noundef) local_unnamed_addr #1

declare i32 @msourcecf_add_modem(ptr noundef, float noundef, float noundef, float noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #1

declare void @liquid_autotest_failed_expr(ptr noundef, i32 noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, double noundef) local_unnamed_addr #1

declare void @liquid_autotest_passed(...) local_unnamed_addr #1

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

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

declare ptr @msourcecf_copy(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @autotest_msourcecf_copy() local_unnamed_addr #4 {
  %1 = alloca [31 x i8], align 16
  %2 = tail call ptr @spgramcf_create_default(i32 noundef 1200) #7
  %3 = tail call ptr @spgramcf_create_default(i32 noundef 1200) #7
  %4 = alloca [1024 x { float, float }], align 16
  %5 = alloca [1024 x { float, float }], align 16
  %6 = tail call ptr @msourcecf_create_default() #7
  %7 = tail call i32 @msourcecf_add_noise(ptr noundef %6, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef -4.000000e+01) #7
  %8 = tail call i32 @msourcecf_add_tone(ptr noundef %6, float noundef 0xBFDCCCCCC0000000, float noundef 0.000000e+00, float noundef 2.000000e+01) #7
  %9 = tail call i32 @msourcecf_add_fsk(ptr noundef %6, float noundef 0xBFD51EB860000000, float noundef 0x3FA99999A0000000, float noundef -1.000000e+01, i32 noundef 3, i32 noundef 16) #7
  %10 = tail call i32 @msourcecf_add_gmsk(ptr noundef %6, float noundef 0xBFC99999A0000000, float noundef 0x3FA99999A0000000, float noundef 0.000000e+00, i32 noundef 12, float noundef 0x3FD6666660000000) #7
  %11 = tail call i32 @msourcecf_add_noise(ptr noundef %6, float noundef 0xBFA99999A0000000, float noundef 0x3FB99999A0000000, float noundef 0.000000e+00) #7
  %12 = tail call i32 @msourcecf_add_chirp(ptr noundef %6, float noundef 0x3FB1EB8520000000, float noundef 0x3FB1EB8520000000, float noundef 2.000000e+01, float noundef 8.000000e+03, i32 noundef 0, i32 noundef 0) #7
  %13 = tail call i32 @msourcecf_add_modem(ptr noundef %6, float noundef 0x3FC99999A0000000, float noundef 0x3FB99999A0000000, float noundef 0.000000e+00, i32 noundef 40, i32 noundef 12, float noundef 0x3FD3333340000000) #7
  %14 = tail call ptr @msourcecf_copy(ptr noundef %6) #7
  br label %15

15:                                               ; preds = %0, %15
  %.079 = phi i32 [ 0, %0 ], [ %20, %15 ]
  %16 = call i32 @msourcecf_write_samples(ptr noundef %6, ptr noundef nonnull %4, i32 noundef 1024) #7
  %17 = call i32 @msourcecf_write_samples(ptr noundef %14, ptr noundef nonnull %5, i32 noundef 1024) #7
  %18 = call i32 @spgramcf_write(ptr noundef %2, ptr noundef nonnull %4, i32 noundef 1024) #7
  %19 = call i32 @spgramcf_write(ptr noundef %3, ptr noundef nonnull %5, i32 noundef 1024) #7
  %20 = add nuw nsw i32 %.079, 1024
  %21 = icmp ult i32 %.079, 718976
  br i1 %21, label %15, label %22, !llvm.loop !5

22:                                               ; preds = %15
  %23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 720896)
  %24 = alloca [1200 x float], align 16
  %25 = alloca [1200 x float], align 16
  %26 = call i32 @spgramcf_get_psd(ptr noundef %2, ptr noundef nonnull %24) #7
  %27 = call i32 @spgramcf_get_psd(ptr noundef %3, ptr noundef nonnull %25) #7
  %28 = call i32 @msourcecf_destroy(ptr noundef %6) #7
  %29 = call i32 @msourcecf_destroy(ptr noundef %14) #7
  %30 = call i32 @spgramcf_destroy(ptr noundef %2) #7
  %31 = call i32 @spgramcf_destroy(ptr noundef %3) #7
  call void @llvm.lifetime.start.p0(i64 31, ptr nonnull %1) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(31) %1, ptr noundef nonnull align 16 dereferenceable(31) @__const.autotest_msourcecf_copy.filename, i64 31, i1 false)
  %32 = call noalias ptr @fopen(ptr noundef nonnull %1, ptr noundef nonnull @.str.37)
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.38) #7
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.39, i32 noundef 1200) #7
  br label %35

35:                                               ; preds = %22, %48
  %indvars.iv = phi i64 [ 0, %22 ], [ %indvars.iv.next, %48 ]
  %36 = getelementptr inbounds float, ptr %24, i64 %indvars.iv
  %37 = load float, ptr %36, align 4, !tbaa !7
  %38 = getelementptr inbounds float, ptr %25, i64 %indvars.iv
  %39 = load float, ptr %38, align 4, !tbaa !7
  %40 = fsub float %37, %39
  %41 = fpext float %40 to double
  %42 = call double @llvm.fmuladd.f64(double %41, double %41, double 0.000000e+00)
  %sqrt = call double @llvm.sqrt.f64(double %42)
  %43 = fcmp ogt double %sqrt, 1.500000e+00
  %44 = fcmp uno float %37, 0.000000e+00
  %or.cond = select i1 %43, i1 true, i1 %44
  %45 = fcmp uno float %39, 0.000000e+00
  %or.cond82 = select i1 %or.cond, i1 true, i1 %45
  br i1 %or.cond82, label %46, label %47

46:                                               ; preds = %35
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.2, i32 noundef 461, ptr noundef nonnull @.str.40, double noundef %sqrt, ptr noundef nonnull @.str.41, ptr noundef nonnull @.str.42, double noundef 1.500000e+00) #7
  br label %48

47:                                               ; preds = %35
  call void (...) @liquid_autotest_passed() #7
  br label %48

48:                                               ; preds = %47, %46
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %49 = load float, ptr %36, align 4, !tbaa !7
  %50 = fpext float %49 to double
  %51 = load float, ptr %38, align 4, !tbaa !7
  %52 = fpext float %51 to double
  %53 = trunc nuw nsw i64 %indvars.iv.next to i32
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.43, i32 noundef %53, double noundef %50, i32 noundef %53, double noundef %52) #7
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1200
  br i1 %exitcond.not, label %55, label %35, !llvm.loop !11

55:                                               ; preds = %48
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.44) #7
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.45) #7
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.46) #7
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.47) #7
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.48) #7
  %61 = call i32 @fclose(ptr noundef %32)
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49, ptr noundef nonnull %1)
  call void @llvm.lifetime.end.p0(i64 31, ptr nonnull %1) #7
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sqrt.f64(double) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = distinct !{!11, !6}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopRotatePass,SROAPass,SimplifyCFGPass,TailCallElimPass