; LLVM IR from jgaeddert/liquid-dsp :: src/modem/tests (ampmodem_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 = external hidden unnamed_addr constant [28 x i8], align 1
@liquid_autotest_verbose = external global i32, align 4
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @ampmodem_test_harness(float noundef %0, i32 noundef %1, i32 noundef %2, float noundef %3, float noundef %4) #0 {
  %6 = alloca float, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca float, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca ptr, align 8
  %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, align 4
  %34 = alloca { float, float }, align 4
  %35 = alloca float, align 4
  %36 = alloca float, align 4
  %37 = alloca float, align 4
  store float %0, ptr %6, align 4, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store float %3, ptr %9, align 4, !tbaa !5
  store float %4, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store float 4.000000e+01, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr @.str, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %38 = load float, ptr %11, align 4, !tbaa !5
  %39 = fneg float %38
  %40 = fdiv float %39, 2.000000e+01
  %41 = call float @powf(float noundef 1.000000e+01, float noundef %40) #5
  store float %41, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %42 = load float, ptr %6, align 4, !tbaa !5
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = load i32, ptr %8, align 4, !tbaa !9
  %45 = call ptr @ampmodem_create(float noundef %42, i32 noundef %43, i32 noundef %44)
  store ptr %45, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %46 = load float, ptr %6, align 4, !tbaa !5
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = call ptr @ampmodem_create(float noundef %46, i32 noundef %47, i32 noundef %48)
  store ptr %49, ptr %16, align 8, !tbaa !11
  %50 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !9
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %55

52:                                               ; preds = %5
  %53 = load ptr, ptr %15, align 8, !tbaa !11
  %54 = call i32 @ampmodem_print(ptr noundef %53)
  br label %55

55:                                               ; preds = %52, %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %56 = load ptr, ptr %15, align 8, !tbaa !11
  %57 = call i32 @ampmodem_get_delay_mod(ptr noundef %56)
  %58 = load ptr, ptr %16, align 8, !tbaa !11
  %59 = call i32 @ampmodem_get_delay_demod(ptr noundef %58)
  %60 = add i32 %57, %59
  store i32 %60, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %61 = load i32, ptr %17, align 4, !tbaa !9
  %62 = call ptr @wdelayf_create(i32 noundef %61)
  store ptr %62, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 2400, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store float 0.000000e+00, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store float 0.000000e+00, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %63 = call float @sqrtf(float noundef 1.031000e+03) #5
  %64 = fdiv float 1.000000e+00, %63
  store float %64, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %65 = call float @sqrtf(float noundef 1.723000e+03) #5
  %66 = fdiv float 1.000000e+00, %65
  store float %66, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %67 = load i32, ptr %12, align 4, !tbaa !9
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %72

69:                                               ; preds = %55
  %70 = load ptr, ptr %13, align 8, !tbaa !11
  %71 = call noalias ptr @fopen(ptr noundef %70, ptr noundef @.str.1)
  br label %73

72:                                               ; preds = %55
  br label %73

73:                                               ; preds = %72, %69
  %74 = phi ptr [ %71, %69 ], [ null, %72 ]
  store ptr %74, ptr %26, align 8, !tbaa !11
  %75 = load i32, ptr %12, align 4, !tbaa !9
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %80

77:                                               ; preds = %73
  %78 = load ptr, ptr %26, align 8, !tbaa !11
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %78, ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef @.str.5, ptr noundef @.str.6, ptr noundef @.str.7, ptr noundef @.str.8) #5
  br label %80

80:                                               ; preds = %77, %73
  br label %81

81:                                               ; preds = %245, %80
  %82 = load i32, ptr %21, align 4, !tbaa !9
  %83 = icmp ult i32 %82, 8000
  br i1 %83, label %84, label %248

84:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %85 = load float, ptr %24, align 4, !tbaa !5
  %86 = fpext float %85 to double
  %87 = fmul double 0x401921FB54442D18, %86
  %88 = load i32, ptr %19, align 4, !tbaa !9
  %89 = uitofp i32 %88 to double
  %90 = fmul double %87, %89
  %91 = call double @cos(double noundef %90) #5
  %92 = load float, ptr %25, align 4, !tbaa !5
  %93 = fpext float %92 to double
  %94 = fmul double 0x401921FB54442D18, %93
  %95 = load i32, ptr %19, align 4, !tbaa !9
  %96 = uitofp i32 %95 to double
  %97 = fmul double %94, %96
  %98 = call double @cos(double noundef %97) #5
  %99 = fmul double 0x3FD99999A0000000, %98
  %100 = call double @llvm.fmuladd.f64(double 0x3FE3333340000000, double %91, double %99)
  %101 = fptrunc double %100 to float
  store float %101, ptr %27, align 4, !tbaa !5
  %102 = load ptr, ptr %18, align 8, !tbaa !11
  %103 = load float, ptr %27, align 4, !tbaa !5
  %104 = call i32 @wdelayf_push(ptr noundef %102, float noundef %103)
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %105 = load ptr, ptr %15, align 8, !tbaa !11
  %106 = load float, ptr %27, align 4, !tbaa !5
  %107 = call i32 @ampmodem_modulate(ptr noundef %105, float noundef %106, ptr noundef %28)
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %108 = getelementptr inbounds { float, float }, ptr %28, i32 0, i32 0
  %109 = load float, ptr %108, align 4
  %110 = getelementptr inbounds { float, float }, ptr %28, i32 0, i32 1
  %111 = load float, ptr %110, align 4
  %112 = load float, ptr %10, align 4, !tbaa !5
  %113 = fmul float 0.000000e+00, %112
  %114 = fmul float 1.000000e+00, %112
  %115 = getelementptr inbounds { float, float }, ptr %30, i32 0, i32 0
  %116 = getelementptr inbounds { float, float }, ptr %30, i32 0, i32 1
  store float %113, ptr %115, align 4
  store float %114, ptr %116, align 4
  %117 = load <2 x float>, ptr %30, align 4
  %118 = call <2 x float> @cexpf(<2 x float> noundef %117) #5
  store <2 x float> %118, ptr %31, align 4
  %119 = getelementptr inbounds { float, float }, ptr %31, i32 0, i32 0
  %120 = load float, ptr %119, align 4
  %121 = getelementptr inbounds { float, float }, ptr %31, i32 0, i32 1
  %122 = load float, ptr %121, align 4
  %123 = fmul float %109, %120
  %124 = fmul float %111, %122
  %125 = fmul float %109, %122
  %126 = fmul float %111, %120
  %127 = fsub float %123, %124
  %128 = fadd float %125, %126
  %129 = fcmp uno float %127, %127
  br i1 %129, label %130, label %138, !prof !13

130:                                              ; preds = %84
  %131 = fcmp uno float %128, %128
  br i1 %131, label %132, label %138, !prof !13

132:                                              ; preds = %130
  %133 = call <2 x float> @__mulsc3(float noundef %109, float noundef %111, float noundef %120, float noundef %122) #5
  store <2 x float> %133, ptr %32, align 4
  %134 = getelementptr inbounds { float, float }, ptr %32, i32 0, i32 0
  %135 = load float, ptr %134, align 4
  %136 = getelementptr inbounds { float, float }, ptr %32, i32 0, i32 1
  %137 = load float, ptr %136, align 4
  br label %138

138:                                              ; preds = %132, %130, %84
  %139 = phi float [ %127, %84 ], [ %127, %130 ], [ %135, %132 ]
  %140 = phi float [ %128, %84 ], [ %128, %130 ], [ %137, %132 ]
  %141 = fpext float %139 to double
  %142 = fpext float %140 to double
  %143 = load float, ptr %14, align 4, !tbaa !5
  %144 = call float (...) @randnf()
  %145 = call float (...) @randnf()
  %146 = fmul float 0.000000e+00, %145
  %147 = fmul float 1.000000e+00, %145
  %148 = fadd float %144, %146
  %149 = fmul float %143, %148
  %150 = fmul float %143, %147
  %151 = fpext float %149 to double
  %152 = fpext float %150 to double
  %153 = fmul double %151, 0x3FE6A09E667F3BCD
  %154 = fmul double %152, 0x3FE6A09E667F3BCD
  %155 = fadd double %141, %153
  %156 = fadd double %142, %154
  %157 = fptrunc double %155 to float
  %158 = fptrunc double %156 to float
  %159 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 0
  %160 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 1
  store float %157, ptr %159, align 4
  store float %158, ptr %160, align 4
  %161 = load float, ptr %9, align 4, !tbaa !5
  %162 = load float, ptr %10, align 4, !tbaa !5
  %163 = fadd float %162, %161
  store float %163, ptr %10, align 4, !tbaa !5
  br label %164

164:                                              ; preds = %168, %138
  %165 = load float, ptr %10, align 4, !tbaa !5
  %166 = fpext float %165 to double
  %167 = fcmp ogt double %166, 0x400921FB54442D18
  br i1 %167, label %168, label %173

168:                                              ; preds = %164
  %169 = load float, ptr %10, align 4, !tbaa !5
  %170 = fpext float %169 to double
  %171 = fsub double %170, 0x401921FB54442D18
  %172 = fptrunc double %171 to float
  store float %172, ptr %10, align 4, !tbaa !5
  br label %164, !llvm.loop !14

173:                                              ; preds = %164
  br label %174

174:                                              ; preds = %178, %173
  %175 = load float, ptr %10, align 4, !tbaa !5
  %176 = fpext float %175 to double
  %177 = fcmp olt double %176, 0xC00921FB54442D18
  br i1 %177, label %178, label %183

178:                                              ; preds = %174
  %179 = load float, ptr %10, align 4, !tbaa !5
  %180 = fpext float %179 to double
  %181 = fadd double %180, 0x401921FB54442D18
  %182 = fptrunc double %181 to float
  store float %182, ptr %10, align 4, !tbaa !5
  br label %174, !llvm.loop !16

183:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  %184 = load ptr, ptr %16, align 8, !tbaa !11
  %185 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 0
  %186 = load float, ptr %185, align 4
  %187 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 1
  %188 = load float, ptr %187, align 4
  %189 = getelementptr inbounds { float, float }, ptr %34, i32 0, i32 0
  %190 = getelementptr inbounds { float, float }, ptr %34, i32 0, i32 1
  store float %186, ptr %189, align 4
  store float %188, ptr %190, align 4
  %191 = load <2 x float>, ptr %34, align 4
  %192 = call i32 @ampmodem_demodulate(ptr noundef %184, <2 x float> noundef %191, ptr noundef %33)
  %193 = load ptr, ptr %18, align 8, !tbaa !11
  %194 = call i32 @wdelayf_read(ptr noundef %193, ptr noundef %27)
  %195 = load i32, ptr %12, align 4, !tbaa !9
  %196 = icmp ne i32 %195, 0
  br i1 %196, label %197, label %224

197:                                              ; preds = %183
  %198 = load ptr, ptr %26, align 8, !tbaa !11
  %199 = load float, ptr %27, align 4, !tbaa !5
  %200 = fpext float %199 to double
  %201 = getelementptr inbounds { float, float }, ptr %28, i32 0, i32 0
  %202 = load float, ptr %201, align 4
  %203 = getelementptr inbounds { float, float }, ptr %28, i32 0, i32 1
  %204 = load float, ptr %203, align 4
  %205 = fpext float %202 to double
  %206 = getelementptr inbounds { float, float }, ptr %28, i32 0, i32 0
  %207 = load float, ptr %206, align 4
  %208 = getelementptr inbounds { float, float }, ptr %28, i32 0, i32 1
  %209 = load float, ptr %208, align 4
  %210 = fpext float %209 to double
  %211 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 0
  %212 = load float, ptr %211, align 4
  %213 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 1
  %214 = load float, ptr %213, align 4
  %215 = fpext float %212 to double
  %216 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 0
  %217 = load float, ptr %216, align 4
  %218 = getelementptr inbounds { float, float }, ptr %29, i32 0, i32 1
  %219 = load float, ptr %218, align 4
  %220 = fpext float %219 to double
  %221 = load float, ptr %33, align 4, !tbaa !5
  %222 = fpext float %221 to double
  %223 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %198, ptr noundef @.str.9, double noundef %200, double noundef %205, double noundef %210, double noundef %215, double noundef %220, double noundef %222) #5
  br label %224

224:                                              ; preds = %197, %183
  %225 = load i32, ptr %19, align 4, !tbaa !9
  %226 = load i32, ptr %20, align 4, !tbaa !9
  %227 = icmp uge i32 %225, %226
  br i1 %227, label %228, label %245

228:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #5
  %229 = load float, ptr %27, align 4, !tbaa !5
  %230 = load float, ptr %33, align 4, !tbaa !5
  %231 = fsub float %229, %230
  store float %231, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #5
  %232 = load float, ptr %27, align 4, !tbaa !5
  %233 = load float, ptr %33, align 4, !tbaa !5
  %234 = fadd float %232, %233
  store float %234, ptr %36, align 4, !tbaa !5
  %235 = load float, ptr %35, align 4, !tbaa !5
  %236 = load float, ptr %35, align 4, !tbaa !5
  %237 = load float, ptr %22, align 4, !tbaa !5
  %238 = call float @llvm.fmuladd.f32(float %235, float %236, float %237)
  store float %238, ptr %22, align 4, !tbaa !5
  %239 = load float, ptr %36, align 4, !tbaa !5
  %240 = load float, ptr %36, align 4, !tbaa !5
  %241 = load float, ptr %23, align 4, !tbaa !5
  %242 = call float @llvm.fmuladd.f32(float %239, float %240, float %241)
  store float %242, ptr %23, align 4, !tbaa !5
  %243 = load i32, ptr %21, align 4, !tbaa !9
  %244 = add i32 %243, 1
  store i32 %244, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  br label %245

245:                                              ; preds = %228, %224
  %246 = load i32, ptr %19, align 4, !tbaa !9
  %247 = add i32 %246, 1
  store i32 %247, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %81, !llvm.loop !17

248:                                              ; preds = %81
  %249 = load i32, ptr %12, align 4, !tbaa !9
  %250 = icmp ne i32 %249, 0
  br i1 %250, label %251, label %254

251:                                              ; preds = %248
  %252 = load ptr, ptr %26, align 8, !tbaa !11
  %253 = call i32 @fclose(ptr noundef %252)
  br label %254

254:                                              ; preds = %251, %248
  %255 = load ptr, ptr %15, align 8, !tbaa !11
  %256 = call i32 @ampmodem_destroy(ptr noundef %255)
  %257 = load ptr, ptr %16, align 8, !tbaa !11
  %258 = call i32 @ampmodem_destroy(ptr noundef %257)
  %259 = load ptr, ptr %18, align 8, !tbaa !11
  %260 = call i32 @wdelayf_destroy(ptr noundef %259)
  %261 = load float, ptr %22, align 4, !tbaa !5
  %262 = load i32, ptr %21, align 4, !tbaa !9
  %263 = uitofp i32 %262 to float
  %264 = fdiv float %261, %263
  %265 = call float @log10f(float noundef %264) #5
  %266 = fmul float 1.000000e+01, %265
  store float %266, ptr %22, align 4, !tbaa !5
  %267 = load float, ptr %23, align 4, !tbaa !5
  %268 = load i32, ptr %21, align 4, !tbaa !9
  %269 = uitofp i32 %268 to float
  %270 = fdiv float %267, %269
  %271 = call float @log10f(float noundef %270) #5
  %272 = fmul float 1.000000e+01, %271
  store float %272, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #5
  %273 = load i32, ptr %7, align 4, !tbaa !9
  %274 = icmp eq i32 %273, 0
  br i1 %274, label %275, label %288

275:                                              ; preds = %254
  %276 = load i32, ptr %8, align 4, !tbaa !9
  %277 = icmp ne i32 %276, 0
  br i1 %277, label %278, label %288

278:                                              ; preds = %275
  %279 = load float, ptr %22, align 4, !tbaa !5
  %280 = load float, ptr %23, align 4, !tbaa !5
  %281 = fcmp olt float %279, %280
  br i1 %281, label %282, label %284

282:                                              ; preds = %278
  %283 = load float, ptr %22, align 4, !tbaa !5
  br label %286

284:                                              ; preds = %278
  %285 = load float, ptr %23, align 4, !tbaa !5
  br label %286

286:                                              ; preds = %284, %282
  %287 = phi float [ %283, %282 ], [ %285, %284 ]
  br label %290

288:                                              ; preds = %275, %254
  %289 = load float, ptr %22, align 4, !tbaa !5
  br label %290

290:                                              ; preds = %288, %286
  %291 = phi float [ %287, %286 ], [ %289, %288 ]
  store float %291, ptr %37, align 4, !tbaa !5
  %292 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !9
  %293 = icmp ne i32 %292, 0
  br i1 %293, label %294, label %302

294:                                              ; preds = %290
  %295 = load float, ptr %37, align 4, !tbaa !5
  %296 = fpext float %295 to double
  %297 = load float, ptr %22, align 4, !tbaa !5
  %298 = fpext float %297 to double
  %299 = load float, ptr %23, align 4, !tbaa !5
  %300 = fpext float %299 to double
  %301 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %296, double noundef %298, double noundef %300)
  br label %302

302:                                              ; preds = %294, %290
  %303 = load float, ptr %37, align 4, !tbaa !5
  %304 = fcmp oge float %303, -1.800000e+01
  br i1 %304, label %305, label %308

305:                                              ; preds = %302
  %306 = load float, ptr %37, align 4, !tbaa !5
  %307 = fpext float %306 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.11, i32 noundef 113, ptr noundef @.str.12, double noundef %307, ptr noundef @.str.13, ptr noundef @.str.14, double noundef -1.800000e+01)
  br label %309

308:                                              ; preds = %302
  call void (...) @liquid_autotest_passed()
  br label %309

309:                                              ; preds = %308, %305
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  ret void
}

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

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

declare ptr @ampmodem_create(float noundef, i32 noundef, i32 noundef) #3

declare i32 @ampmodem_print(ptr noundef) #3

declare i32 @ampmodem_get_delay_mod(ptr noundef) #3

declare i32 @ampmodem_get_delay_demod(ptr noundef) #3

declare ptr @wdelayf_create(i32 noundef) #3

; Function Attrs: nounwind
declare float @sqrtf(float noundef) #2

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

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

; Function Attrs: nounwind
declare double @cos(double noundef) #2

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

declare i32 @wdelayf_push(ptr noundef, float noundef) #3

declare i32 @ampmodem_modulate(ptr noundef, float noundef, ptr noundef) #3

; Function Attrs: nounwind
declare <2 x float> @cexpf(<2 x float> noundef) #2

declare <2 x float> @__mulsc3(float, float, float, float)

declare float @randnf(...) #3

declare i32 @ampmodem_demodulate(ptr noundef, <2 x float> noundef, ptr noundef) #3

declare i32 @wdelayf_read(ptr noundef, ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

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

declare i32 @fclose(ptr noundef) #3

declare i32 @ampmodem_destroy(ptr noundef) #3

declare i32 @wdelayf_destroy(ptr noundef) #3

; Function Attrs: nounwind
declare float @log10f(float noundef) #2

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

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

declare void @liquid_autotest_passed(...) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"branch_weights", i32 1, i32 1048575}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


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

@liquid_autotest_verbose = external local_unnamed_addr global i32, align 4
@.str.10 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @ampmodem_test_harness(float noundef %0, i32 noundef %1, i32 noundef %2, float noundef %3, float noundef %4) local_unnamed_addr #0 {
  %6 = alloca float, align 4
  %7 = alloca { float, float }, align 4
  %8 = alloca float, align 4
  %9 = tail call ptr @ampmodem_create(float noundef %0, i32 noundef %1, i32 noundef %2) #8
  %10 = tail call ptr @ampmodem_create(float noundef %0, i32 noundef %1, i32 noundef %2) #8
  %11 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %14, label %12

12:                                               ; preds = %5
  %13 = tail call i32 @ampmodem_print(ptr noundef %9) #8
  br label %14

14:                                               ; preds = %12, %5
  %15 = tail call i32 @ampmodem_get_delay_mod(ptr noundef %9) #8
  %16 = tail call i32 @ampmodem_get_delay_demod(ptr noundef %10) #8
  %17 = add i32 %16, %15
  %18 = tail call ptr @wdelayf_create(i32 noundef %17) #8
  %19 = getelementptr inbounds i8, ptr %7, i64 4
  br label %20

20:                                               ; preds = %14, %96
  %.092 = phi float [ %4, %14 ], [ %.2.lcssa, %96 ]
  %.07591 = phi i32 [ 0, %14 ], [ %98, %96 ]
  %.07690 = phi i32 [ 0, %14 ], [ %.177, %96 ]
  %21 = phi <2 x float> [ zeroinitializer, %14 ], [ %97, %96 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  %22 = uitofp i32 %.07591 to double
  %23 = fmul double %22, 0x3FC90C1A5C3F18E3
  %24 = call double @cos(double noundef %23) #8
  %25 = fmul double %22, 0x3FC3600FFCC07081
  %26 = call double @cos(double noundef %25) #8
  %27 = fmul double %26, 0x3FD99999A0000000
  %28 = call double @llvm.fmuladd.f64(double %24, double 0x3FE3333340000000, double %27)
  %29 = fptrunc double %28 to float
  store float %29, ptr %6, align 4, !tbaa !9
  %30 = call i32 @wdelayf_push(ptr noundef %18, float noundef %29) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %31 = load float, ptr %6, align 4, !tbaa !9
  %32 = call i32 @ampmodem_modulate(ptr noundef %9, float noundef %31, ptr noundef nonnull %7) #8
  %33 = load float, ptr %7, align 4
  %34 = load float, ptr %19, align 4
  %35 = fmul float %.092, 0.000000e+00
  %.sroa.011.0.vec.insert = insertelement <2 x float> poison, float %35, i64 0
  %.sroa.011.4.vec.insert = insertelement <2 x float> %.sroa.011.0.vec.insert, float %.092, i64 1
  %36 = call <2 x float> @cexpf(<2 x float> noundef %.sroa.011.4.vec.insert) #8
  %37 = insertelement <2 x float> poison, float %33, i64 0
  %38 = shufflevector <2 x float> %37, <2 x float> poison, <2 x i32> zeroinitializer
  %39 = fmul <2 x float> %38, %36
  %40 = insertelement <2 x float> poison, float %34, i64 0
  %41 = shufflevector <2 x float> %40, <2 x float> poison, <2 x i32> zeroinitializer
  %42 = fmul <2 x float> %41, %36
  %43 = shufflevector <2 x float> %42, <2 x float> poison, <2 x i32> <i32 1, i32 0>
  %44 = fsub <2 x float> %39, %43
  %45 = fadd <2 x float> %39, %43
  %46 = shufflevector <2 x float> %44, <2 x float> %45, <2 x i32> <i32 0, i32 3>
  %47 = extractelement <2 x float> %44, i64 0
  %48 = fcmp uno float %47, 0.000000e+00
  br i1 %48, label %49, label %56, !prof !11

49:                                               ; preds = %20
  %50 = extractelement <2 x float> %45, i64 1
  %51 = fcmp uno float %50, 0.000000e+00
  br i1 %51, label %52, label %56, !prof !11

52:                                               ; preds = %49
  %53 = extractelement <2 x float> %36, i64 0
  %54 = extractelement <2 x float> %36, i64 1
  %55 = call <2 x float> @__mulsc3(float noundef %33, float noundef %34, float noundef %53, float noundef %54) #8
  br label %56

56:                                               ; preds = %52, %49, %20
  %57 = phi <2 x float> [ %46, %20 ], [ %46, %49 ], [ %55, %52 ]
  %58 = fpext <2 x float> %57 to <2 x double>
  %59 = call float (...) @randnf() #8
  %60 = call float (...) @randnf() #8
  %61 = fmul float %60, 0.000000e+00
  %62 = fadd float %59, %61
  %63 = insertelement <2 x float> poison, float %62, i64 0
  %64 = insertelement <2 x float> %63, float %60, i64 1
  %65 = fmul <2 x float> %64, <float 0x3F847AE140000000, float 0x3F847AE140000000>
  %66 = fpext <2 x float> %65 to <2 x double>
  %67 = fmul <2 x double> %66, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %68 = fadd <2 x double> %67, %58
  %69 = fptrunc <2 x double> %68 to <2 x float>
  %70 = fadd float %.092, %3
  %71 = fpext float %70 to double
  %72 = fcmp ogt double %71, 0x400921FB54442D18
  br i1 %72, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %.lr.ph, %56
  %.pre-phi = phi double [ %71, %56 ], [ %77, %.lr.ph ]
  %.1.lcssa = phi float [ %70, %56 ], [ %76, %.lr.ph ]
  %73 = fcmp olt double %.pre-phi, 0xC00921FB54442D18
  br i1 %73, label %.lr.ph86, label %._crit_edge

.lr.ph:                                           ; preds = %56, %.lr.ph
  %74 = phi double [ %77, %.lr.ph ], [ %71, %56 ]
  %75 = fadd double %74, 0xC01921FB54442D18
  %76 = fptrunc double %75 to float
  %77 = fpext float %76 to double
  %78 = fcmp ogt double %77, 0x400921FB54442D18
  br i1 %78, label %.lr.ph, label %.preheader, !llvm.loop !12

.lr.ph86:                                         ; preds = %.preheader, %.lr.ph86
  %79 = phi double [ %82, %.lr.ph86 ], [ %.pre-phi, %.preheader ]
  %80 = fadd double %79, 0x401921FB54442D18
  %81 = fptrunc double %80 to float
  %82 = fpext float %81 to double
  %83 = fcmp olt double %82, 0xC00921FB54442D18
  br i1 %83, label %.lr.ph86, label %._crit_edge, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph86, %.preheader
  %.2.lcssa = phi float [ %.1.lcssa, %.preheader ], [ %81, %.lr.ph86 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  %84 = call i32 @ampmodem_demodulate(ptr noundef %10, <2 x float> noundef %69, ptr noundef nonnull %8) #8
  %85 = call i32 @wdelayf_read(ptr noundef %18, ptr noundef nonnull %6) #8
  %86 = icmp ugt i32 %.07591, 2399
  br i1 %86, label %87, label %96

87:                                               ; preds = %._crit_edge
  %88 = load float, ptr %6, align 4, !tbaa !9
  %89 = load float, ptr %8, align 4, !tbaa !9
  %90 = fsub float %88, %89
  %91 = fadd float %88, %89
  %92 = insertelement <2 x float> poison, float %91, i64 0
  %93 = insertelement <2 x float> %92, float %90, i64 1
  %94 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %93, <2 x float> %93, <2 x float> %21)
  %95 = add nuw nsw i32 %.07690, 1
  br label %96

96:                                               ; preds = %87, %._crit_edge
  %.177 = phi i32 [ %95, %87 ], [ %.07690, %._crit_edge ]
  %97 = phi <2 x float> [ %94, %87 ], [ %21, %._crit_edge ]
  %98 = add i32 %.07591, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  %99 = icmp ult i32 %.177, 8000
  br i1 %99, label %20, label %100, !llvm.loop !15

100:                                              ; preds = %96
  %101 = call i32 @ampmodem_destroy(ptr noundef %9) #8
  %102 = call i32 @ampmodem_destroy(ptr noundef %10) #8
  %103 = call i32 @wdelayf_destroy(ptr noundef %18) #8
  %104 = uitofp i32 %.177 to float
  %105 = extractelement <2 x float> %97, i64 1
  %106 = fdiv float %105, %104
  %107 = call float @log10f(float noundef %106) #8
  %108 = fmul float %107, 1.000000e+01
  %109 = extractelement <2 x float> %97, i64 0
  %110 = fdiv float %109, %104
  %111 = call float @log10f(float noundef %110) #8
  %112 = fmul float %111, 1.000000e+01
  %113 = icmp eq i32 %1, 0
  %114 = icmp ne i32 %2, 0
  %or.cond = and i1 %113, %114
  %115 = fcmp olt float %108, %112
  %116 = select i1 %115, float %108, float %112
  %117 = select i1 %or.cond, float %116, float %108
  %118 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %.not85 = icmp eq i32 %118, 0
  br i1 %.not85, label %124, label %119

119:                                              ; preds = %100
  %120 = fpext float %117 to double
  %121 = fpext float %108 to double
  %122 = fpext float %112 to double
  %123 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %120, double noundef %121, double noundef %122)
  br label %124

124:                                              ; preds = %119, %100
  %125 = fcmp ult float %117, -1.800000e+01
  br i1 %125, label %128, label %126

126:                                              ; preds = %124
  %127 = fpext float %117 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.11, i32 noundef 113, ptr noundef nonnull @.str.12, double noundef %127, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.14, double noundef -1.800000e+01) #8
  br label %129

128:                                              ; preds = %124
  call void (...) @liquid_autotest_passed() #8
  br label %129

129:                                              ; preds = %128, %126
  ret void
}

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

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

declare i32 @ampmodem_print(ptr noundef) local_unnamed_addr #2

declare i32 @ampmodem_get_delay_mod(ptr noundef) local_unnamed_addr #2

declare i32 @ampmodem_get_delay_demod(ptr noundef) local_unnamed_addr #2

declare ptr @wdelayf_create(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: nounwind
declare <2 x float> @cexpf(<2 x float> noundef) local_unnamed_addr #5

declare <2 x float> @__mulsc3(float, float, float, float) local_unnamed_addr

declare float @randnf(...) local_unnamed_addr #2

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

declare i32 @wdelayf_read(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare i32 @ampmodem_destroy(ptr noundef) local_unnamed_addr #2

declare i32 @wdelayf_destroy(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @log10f(float noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fmuladd.v2f32(<2 x float>, <2 x float>, <2 x float>) #7

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


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