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

%struct.autotest_psd_s = type { float, float, float, float, i32, i32 }

@liquid_autotest_verbose = external global i32, align 4
@.str.2 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [6 x i8], align 1
@__const.autotest_msourcecf_accessor.regions = external hidden unnamed_addr constant [3 x %struct.autotest_psd_s], align 16
@.str.36 = external hidden unnamed_addr constant [44 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 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 i64 @msourcecf_get_num_samples(ptr noundef) #1

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

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

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

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 ptr @msourcecf_create(i32 noundef, i32 noundef, float noundef) #1

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @autotest_msourcecf_accessor() #4 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca float, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca [3 x %struct.autotest_psd_s], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  %12 = call ptr @msourcecf_create(i32 noundef 240, i32 noundef 12, float noundef 6.000000e+01)
  store ptr %12, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  %13 = load ptr, ptr %1, align 8, !tbaa !5
  %14 = call i32 @msourcecf_add_tone(ptr noundef %13, float noundef 0xBFBF9AD000000000, float noundef 0.000000e+00, float noundef 2.000000e+01)
  store i32 %14, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %15 = load ptr, ptr %1, align 8, !tbaa !5
  %16 = call i32 @msourcecf_add_noise(ptr noundef %15, float noundef 0x3FCC4284E0000000, float noundef 0x3FB99999A0000000, float noundef 0.000000e+00)
  store i32 %16, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %17 = load ptr, ptr %1, align 8, !tbaa !5
  %18 = load i32, ptr %2, align 4, !tbaa !9
  %19 = call i32 @msourcecf_get_frequency(ptr noundef %17, i32 noundef %18, ptr noundef %4)
  %20 = load float, ptr %4, align 4, !tbaa !11
  %21 = fcmp une float %20, 0xBFBF9AD000000000
  br i1 %21, label %22, label %25

22:                                               ; preds = %0
  %23 = load float, ptr %4, align 4, !tbaa !11
  %24 = fpext float %23 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.2, i32 noundef 316, ptr noundef @.str.30, double noundef %24, ptr noundef @.str.4, ptr noundef @.str.31, double noundef 0xBFBF9AD000000000)
  br label %26

25:                                               ; preds = %0
  call void (...) @liquid_autotest_passed()
  br label %26

26:                                               ; preds = %25, %22
  %27 = load ptr, ptr %1, align 8, !tbaa !5
  %28 = load i32, ptr %3, align 4, !tbaa !9
  %29 = call i32 @msourcecf_get_frequency(ptr noundef %27, i32 noundef %28, ptr noundef %4)
  %30 = load float, ptr %4, align 4, !tbaa !11
  %31 = fcmp une float %30, 0x3FCC4284E0000000
  br i1 %31, label %32, label %35

32:                                               ; preds = %26
  %33 = load float, ptr %4, align 4, !tbaa !11
  %34 = fpext float %33 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.2, i32 noundef 320, ptr noundef @.str.30, double noundef %34, ptr noundef @.str.4, ptr noundef @.str.32, double noundef 0x3FCC4284E0000000)
  br label %36

35:                                               ; preds = %26
  call void (...) @liquid_autotest_passed()
  br label %36

36:                                               ; preds = %35, %32
  %37 = load ptr, ptr %1, align 8, !tbaa !5
  %38 = load i32, ptr %2, align 4, !tbaa !9
  %39 = call i32 @msourcecf_get_gain(ptr noundef %37, i32 noundef %38, ptr noundef %4)
  %40 = load float, ptr %4, align 4, !tbaa !11
  %41 = fcmp une float %40, 2.000000e+01
  br i1 %41, label %42, label %45

42:                                               ; preds = %36
  %43 = load float, ptr %4, align 4, !tbaa !11
  %44 = fpext float %43 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.2, i32 noundef 324, ptr noundef @.str.30, double noundef %44, ptr noundef @.str.4, ptr noundef @.str.33, double noundef 2.000000e+01)
  br label %46

45:                                               ; preds = %36
  call void (...) @liquid_autotest_passed()
  br label %46

46:                                               ; preds = %45, %42
  %47 = load ptr, ptr %1, align 8, !tbaa !5
  %48 = load i32, ptr %3, align 4, !tbaa !9
  %49 = call i32 @msourcecf_get_gain(ptr noundef %47, i32 noundef %48, ptr noundef %4)
  %50 = load float, ptr %4, align 4, !tbaa !11
  %51 = fcmp une float %50, 0.000000e+00
  br i1 %51, label %52, label %55

52:                                               ; preds = %46
  %53 = load float, ptr %4, align 4, !tbaa !11
  %54 = fpext float %53 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.2, i32 noundef 328, ptr noundef @.str.30, double noundef %54, ptr noundef @.str.4, ptr noundef @.str.26, double noundef 0.000000e+00)
  br label %56

55:                                               ; preds = %46
  call void (...) @liquid_autotest_passed()
  br label %56

56:                                               ; preds = %55, %52
  %57 = load ptr, ptr %1, align 8, !tbaa !5
  %58 = load i32, ptr %2, align 4, !tbaa !9
  %59 = call i32 @msourcecf_remove(ptr noundef %57, i32 noundef %58)
  %60 = load ptr, ptr %1, align 8, !tbaa !5
  %61 = load i32, ptr %3, align 4, !tbaa !9
  %62 = call i32 @msourcecf_disable(ptr noundef %60, i32 noundef %61)
  %63 = load ptr, ptr %1, align 8, !tbaa !5
  %64 = load i32, ptr %3, align 4, !tbaa !9
  %65 = call i32 @msourcecf_set_frequency(ptr noundef %63, i32 noundef %64, float noundef 0x3FD5554760000000)
  %66 = load ptr, ptr %1, align 8, !tbaa !5
  %67 = load i32, ptr %3, align 4, !tbaa !9
  %68 = call i32 @msourcecf_get_frequency(ptr noundef %66, i32 noundef %67, ptr noundef %4)
  %69 = load float, ptr %4, align 4, !tbaa !11
  %70 = fcmp une float %69, 0x3FD5554760000000
  br i1 %70, label %71, label %74

71:                                               ; preds = %56
  %72 = load float, ptr %4, align 4, !tbaa !11
  %73 = fpext float %72 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.2, i32 noundef 339, ptr noundef @.str.30, double noundef %73, ptr noundef @.str.4, ptr noundef @.str.34, double noundef 0x3FD5554760000000)
  br label %75

74:                                               ; preds = %56
  call void (...) @liquid_autotest_passed()
  br label %75

75:                                               ; preds = %74, %71
  %76 = load ptr, ptr %1, align 8, !tbaa !5
  %77 = load i32, ptr %3, align 4, !tbaa !9
  %78 = call i32 @msourcecf_set_gain(ptr noundef %76, i32 noundef %77, float noundef 3.000000e+01)
  %79 = load ptr, ptr %1, align 8, !tbaa !5
  %80 = load i32, ptr %3, align 4, !tbaa !9
  %81 = call i32 @msourcecf_get_gain(ptr noundef %79, i32 noundef %80, ptr noundef %4)
  %82 = load float, ptr %4, align 4, !tbaa !11
  %83 = fcmp une float %82, 3.000000e+01
  br i1 %83, label %84, label %87

84:                                               ; preds = %75
  %85 = load float, ptr %4, align 4, !tbaa !11
  %86 = fpext float %85 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.2, i32 noundef 344, ptr noundef @.str.30, double noundef %86, ptr noundef @.str.4, ptr noundef @.str.35, double noundef 3.000000e+01)
  br label %88

87:                                               ; preds = %75
  call void (...) @liquid_autotest_passed()
  br label %88

88:                                               ; preds = %87, %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1024, ptr %5, align 4, !tbaa !9
  %89 = load i32, ptr %5, align 4, !tbaa !9
  %90 = zext i32 %89 to i64
  %91 = call ptr @llvm.stacksave.p0()
  store ptr %91, ptr %6, align 8
  %92 = alloca { float, float }, i64 %90, align 16
  store i64 %90, ptr %7, align 8
  %93 = load ptr, ptr %1, align 8, !tbaa !5
  %94 = load i32, ptr %5, align 4, !tbaa !9
  %95 = call i32 @msourcecf_write_samples(ptr noundef %93, ptr noundef %92, i32 noundef %94)
  %96 = load i32, ptr %5, align 4, !tbaa !9
  %97 = call float @liquid_sumsqcf(ptr noundef %92, i32 noundef %96)
  %98 = fcmp une float 0.000000e+00, %97
  br i1 %98, label %99, label %103

99:                                               ; preds = %88
  %100 = load i32, ptr %5, align 4, !tbaa !9
  %101 = call float @liquid_sumsqcf(ptr noundef %92, i32 noundef %100)
  %102 = fpext float %101 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.2, i32 noundef 350, ptr noundef @.str.26, double noundef 0.000000e+00, ptr noundef @.str.4, ptr noundef @.str.27, double noundef %102)
  br label %104

103:                                              ; preds = %88
  call void (...) @liquid_autotest_passed()
  br label %104

104:                                              ; preds = %103, %99
  %105 = load ptr, ptr %1, align 8, !tbaa !5
  %106 = load i32, ptr %3, align 4, !tbaa !9
  %107 = call i32 @msourcecf_enable(ptr noundef %105, i32 noundef %106)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 2400, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %108 = load i32, ptr %8, align 4, !tbaa !9
  %109 = call ptr @spgramcf_create_default(i32 noundef %108)
  store ptr %109, ptr %9, align 8, !tbaa !5
  br label %110

110:                                              ; preds = %114, %104
  %111 = load ptr, ptr %1, align 8, !tbaa !5
  %112 = call i64 @msourcecf_get_num_samples(ptr noundef %111)
  %113 = icmp ult i64 %112, 192000
  br i1 %113, label %114, label %121

114:                                              ; preds = %110
  %115 = load ptr, ptr %1, align 8, !tbaa !5
  %116 = load i32, ptr %5, align 4, !tbaa !9
  %117 = call i32 @msourcecf_write_samples(ptr noundef %115, ptr noundef %92, i32 noundef %116)
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = load i32, ptr %5, align 4, !tbaa !9
  %120 = call i32 @spgramcf_write(ptr noundef %118, ptr noundef %92, i32 noundef %119)
  br label %110, !llvm.loop !13

121:                                              ; preds = %110
  %122 = load i32, ptr %8, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = alloca float, i64 %123, align 16
  store i64 %123, ptr %10, align 8
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  %126 = call i32 @spgramcf_get_psd(ptr noundef %125, ptr noundef %124)
  %127 = load ptr, ptr %1, align 8, !tbaa !5
  %128 = call i32 @msourcecf_destroy(ptr noundef %127)
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = call i32 @spgramcf_destroy(ptr noundef %129)
  call void @llvm.lifetime.start.p0(i64 72, ptr %11) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %11, ptr align 16 @__const.autotest_msourcecf_accessor.regions, i64 72, i1 false)
  %131 = load i32, ptr %8, align 4, !tbaa !9
  %132 = getelementptr inbounds [3 x %struct.autotest_psd_s], ptr %11, i64 0, i64 0
  %133 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !9
  %134 = icmp ne i32 %133, 0
  %135 = zext i1 %134 to i64
  %136 = select i1 %134, ptr @.str.36, ptr null
  %137 = call i32 @liquid_autotest_validate_spectrum(ptr noundef %124, i32 noundef %131, ptr noundef %132, i32 noundef 3, ptr noundef %136)
  call void @llvm.lifetime.end.p0(i64 72, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %138 = load ptr, ptr %6, align 8
  call void @llvm.stackrestore.p0(ptr %138)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void
}

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 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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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.autotest_psd_s = type { float, float, float, float, i32, i32 }

@liquid_autotest_verbose = external local_unnamed_addr global i32, align 4
@.str.2 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [6 x i8], align 1
@__const.autotest_msourcecf_accessor.regions = external hidden unnamed_addr constant [3 x %struct.autotest_psd_s], align 16
@.str.36 = external hidden unnamed_addr constant [44 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 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

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

declare i64 @msourcecf_get_num_samples(ptr 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) #3

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @autotest_msourcecf_accessor() local_unnamed_addr #4 {
  %1 = alloca float, align 4
  %2 = alloca [3 x %struct.autotest_psd_s], align 16
  %3 = tail call ptr @msourcecf_create(i32 noundef 240, i32 noundef 12, float noundef 6.000000e+01) #5
  %4 = tail call i32 @msourcecf_add_tone(ptr noundef %3, float noundef 0xBFBF9AD000000000, float noundef 0.000000e+00, float noundef 2.000000e+01) #5
  %5 = tail call i32 @msourcecf_add_noise(ptr noundef %3, float noundef 0x3FCC4284E0000000, float noundef 0x3FB99999A0000000, float noundef 0.000000e+00) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %6 = call i32 @msourcecf_get_frequency(ptr noundef %3, i32 noundef %4, ptr noundef nonnull %1) #5
  %7 = load float, ptr %1, align 4, !tbaa !5
  %8 = fcmp une float %7, 0xBFBF9AD000000000
  br i1 %8, label %9, label %11

9:                                                ; preds = %0
  %10 = fpext float %7 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.2, i32 noundef 316, ptr noundef nonnull @.str.30, double noundef %10, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.31, double noundef 0xBFBF9AD000000000) #5
  br label %12

11:                                               ; preds = %0
  call void (...) @liquid_autotest_passed() #5
  br label %12

12:                                               ; preds = %11, %9
  %13 = call i32 @msourcecf_get_frequency(ptr noundef %3, i32 noundef %5, ptr noundef nonnull %1) #5
  %14 = load float, ptr %1, align 4, !tbaa !5
  %15 = fcmp une float %14, 0x3FCC4284E0000000
  br i1 %15, label %16, label %18

16:                                               ; preds = %12
  %17 = fpext float %14 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.2, i32 noundef 320, ptr noundef nonnull @.str.30, double noundef %17, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.32, double noundef 0x3FCC4284E0000000) #5
  br label %19

18:                                               ; preds = %12
  call void (...) @liquid_autotest_passed() #5
  br label %19

19:                                               ; preds = %18, %16
  %20 = call i32 @msourcecf_get_gain(ptr noundef %3, i32 noundef %4, ptr noundef nonnull %1) #5
  %21 = load float, ptr %1, align 4, !tbaa !5
  %22 = fcmp une float %21, 2.000000e+01
  br i1 %22, label %23, label %25

23:                                               ; preds = %19
  %24 = fpext float %21 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.2, i32 noundef 324, ptr noundef nonnull @.str.30, double noundef %24, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.33, double noundef 2.000000e+01) #5
  br label %26

25:                                               ; preds = %19
  call void (...) @liquid_autotest_passed() #5
  br label %26

26:                                               ; preds = %25, %23
  %27 = call i32 @msourcecf_get_gain(ptr noundef %3, i32 noundef %5, ptr noundef nonnull %1) #5
  %28 = load float, ptr %1, align 4, !tbaa !5
  %29 = fcmp une float %28, 0.000000e+00
  br i1 %29, label %30, label %32

30:                                               ; preds = %26
  %31 = fpext float %28 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.2, i32 noundef 328, ptr noundef nonnull @.str.30, double noundef %31, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.26, double noundef 0.000000e+00) #5
  br label %33

32:                                               ; preds = %26
  call void (...) @liquid_autotest_passed() #5
  br label %33

33:                                               ; preds = %32, %30
  %34 = call i32 @msourcecf_remove(ptr noundef %3, i32 noundef %4) #5
  %35 = call i32 @msourcecf_disable(ptr noundef %3, i32 noundef %5) #5
  %36 = call i32 @msourcecf_set_frequency(ptr noundef %3, i32 noundef %5, float noundef 0x3FD5554760000000) #5
  %37 = call i32 @msourcecf_get_frequency(ptr noundef %3, i32 noundef %5, ptr noundef nonnull %1) #5
  %38 = load float, ptr %1, align 4, !tbaa !5
  %39 = fcmp une float %38, 0x3FD5554760000000
  br i1 %39, label %40, label %42

40:                                               ; preds = %33
  %41 = fpext float %38 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.2, i32 noundef 339, ptr noundef nonnull @.str.30, double noundef %41, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.34, double noundef 0x3FD5554760000000) #5
  br label %43

42:                                               ; preds = %33
  call void (...) @liquid_autotest_passed() #5
  br label %43

43:                                               ; preds = %42, %40
  %44 = call i32 @msourcecf_set_gain(ptr noundef %3, i32 noundef %5, float noundef 3.000000e+01) #5
  %45 = call i32 @msourcecf_get_gain(ptr noundef %3, i32 noundef %5, ptr noundef nonnull %1) #5
  %46 = load float, ptr %1, align 4, !tbaa !5
  %47 = fcmp une float %46, 3.000000e+01
  br i1 %47, label %48, label %50

48:                                               ; preds = %43
  %49 = fpext float %46 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.2, i32 noundef 344, ptr noundef nonnull @.str.30, double noundef %49, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.35, double noundef 3.000000e+01) #5
  br label %51

50:                                               ; preds = %43
  call void (...) @liquid_autotest_passed() #5
  br label %51

51:                                               ; preds = %50, %48
  %52 = call ptr @llvm.stacksave.p0()
  %53 = alloca [1024 x { float, float }], align 16
  %54 = call i32 @msourcecf_write_samples(ptr noundef %3, ptr noundef nonnull %53, i32 noundef 1024) #5
  %55 = call float @liquid_sumsqcf(ptr noundef nonnull %53, i32 noundef 1024) #5
  %56 = fcmp une float %55, 0.000000e+00
  br i1 %56, label %57, label %60

57:                                               ; preds = %51
  %58 = call float @liquid_sumsqcf(ptr noundef nonnull %53, i32 noundef 1024) #5
  %59 = fpext float %58 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.2, i32 noundef 350, ptr noundef nonnull @.str.26, double noundef 0.000000e+00, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.27, double noundef %59) #5
  br label %61

60:                                               ; preds = %51
  call void (...) @liquid_autotest_passed() #5
  br label %61

61:                                               ; preds = %60, %57
  %62 = call i32 @msourcecf_enable(ptr noundef %3, i32 noundef %5) #5
  %63 = call ptr @spgramcf_create_default(i32 noundef 2400) #5
  %64 = call i64 @msourcecf_get_num_samples(ptr noundef %3) #5
  %65 = icmp ult i64 %64, 192000
  br i1 %65, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %61, %.lr.ph
  %66 = call i32 @msourcecf_write_samples(ptr noundef %3, ptr noundef nonnull %53, i32 noundef 1024) #5
  %67 = call i32 @spgramcf_write(ptr noundef %63, ptr noundef nonnull %53, i32 noundef 1024) #5
  %68 = call i64 @msourcecf_get_num_samples(ptr noundef %3) #5
  %69 = icmp ult i64 %68, 192000
  br i1 %69, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %61
  %70 = alloca [2400 x float], align 16
  %71 = call i32 @spgramcf_get_psd(ptr noundef %63, ptr noundef nonnull %70) #5
  %72 = call i32 @msourcecf_destroy(ptr noundef %3) #5
  %73 = call i32 @spgramcf_destroy(ptr noundef %63) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %2) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(72) %2, ptr noundef nonnull align 16 dereferenceable(72) @__const.autotest_msourcecf_accessor.regions, i64 72, i1 false)
  %74 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !11
  %.not = icmp eq i32 %74, 0
  %75 = select i1 %.not, ptr null, ptr @.str.36
  %76 = call i32 @liquid_autotest_validate_spectrum(ptr noundef nonnull %70, i32 noundef 2400, ptr noundef nonnull %2, i32 noundef 3, ptr noundef %75) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %2) #5
  call void @llvm.stackrestore.p0(ptr %52)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret void
}

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 nosync nounwind willreturn }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass