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

; 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.qsourcecf_s = type { i32, i32, i32, i32, float, float, float, i32, ptr, ptr, float, float, i32, ptr, ptr, ptr, ptr, i32, i64, i32, %union.anon }
%union.anon = type { %struct.anon.1 }
%struct.anon.1 = type { ptr, float, i32, i32, i64, i64 }

@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [61 x i8], align 1

declare ptr @liquid_error_config_fl(ptr noundef, i32 noundef, ptr noundef, ...) #0

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

declare ptr @firpfbch2_crcf_create_kaiser(i32 noundef, i32 noundef, i32 noundef, float noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local ptr @qsourcecf_create(i32 noundef %0, i32 noundef %1, float noundef %2, float noundef %3, float noundef %4, float noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca ptr, align 8
  %15 = alloca float, align 4
  store i32 %0, ptr %8, align 4, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !5
  store float %2, ptr %10, align 4, !tbaa !9
  store float %3, ptr %11, align 4, !tbaa !9
  store float %4, ptr %12, align 4, !tbaa !9
  store float %5, ptr %13, align 4, !tbaa !9
  %16 = load i32, ptr %8, align 4, !tbaa !5
  %17 = icmp ult i32 %16, 2
  br i1 %17, label %22, label %18

18:                                               ; preds = %6
  %19 = load i32, ptr %8, align 4, !tbaa !5
  %20 = urem i32 %19, 2
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %25

22:                                               ; preds = %18, %6
  %23 = load i32, ptr %8, align 4, !tbaa !5
  %24 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.31, i32 noundef 92, ptr noundef @.str.32, ptr noundef @.str.2, i32 noundef %23)
  store ptr %24, ptr %7, align 8
  br label %190

25:                                               ; preds = %18
  %26 = load i32, ptr %9, align 4, !tbaa !5
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %28, label %31

28:                                               ; preds = %25
  %29 = load i32, ptr %9, align 4, !tbaa !5
  %30 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.31, i32 noundef 94, ptr noundef @.str.33, ptr noundef @.str.2, i32 noundef %29)
  store ptr %30, ptr %7, align 8
  br label %190

31:                                               ; preds = %25
  %32 = load float, ptr %11, align 4, !tbaa !9
  %33 = fcmp olt float %32, -5.000000e-01
  br i1 %33, label %37, label %34

34:                                               ; preds = %31
  %35 = load float, ptr %11, align 4, !tbaa !9
  %36 = fcmp ogt float %35, 5.000000e-01
  br i1 %36, label %37, label %41

37:                                               ; preds = %34, %31
  %38 = load float, ptr %11, align 4, !tbaa !9
  %39 = fpext float %38 to double
  %40 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.31, i32 noundef 96, ptr noundef @.str.34, ptr noundef @.str.2, double noundef %39)
  store ptr %40, ptr %7, align 8
  br label %190

41:                                               ; preds = %34
  %42 = load float, ptr %12, align 4, !tbaa !9
  %43 = fcmp olt float %42, 0.000000e+00
  br i1 %43, label %47, label %44

44:                                               ; preds = %41
  %45 = load float, ptr %12, align 4, !tbaa !9
  %46 = fcmp ogt float %45, 1.000000e+00
  br i1 %46, label %47, label %51

47:                                               ; preds = %44, %41
  %48 = load float, ptr %11, align 4, !tbaa !9
  %49 = fpext float %48 to double
  %50 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.31, i32 noundef 98, ptr noundef @.str.35, ptr noundef @.str.2, double noundef %49)
  store ptr %50, ptr %7, align 8
  br label %190

51:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %52 = call noalias ptr @malloc(i64 noundef 160) #7
  store ptr %52, ptr %14, align 8, !tbaa !11
  %53 = load ptr, ptr %14, align 8, !tbaa !11
  %54 = getelementptr inbounds %struct.qsourcecf_s, ptr %53, i32 0, i32 0
  store i32 -1, ptr %54, align 8, !tbaa !13
  %55 = load ptr, ptr %14, align 8, !tbaa !11
  %56 = getelementptr inbounds %struct.qsourcecf_s, ptr %55, i32 0, i32 19
  store i32 0, ptr %56, align 8, !tbaa !16
  %57 = load float, ptr %13, align 4, !tbaa !9
  %58 = fdiv float %57, 2.000000e+01
  %59 = call float @powf(float noundef 1.000000e+01, float noundef %58) #6
  %60 = load ptr, ptr %14, align 8, !tbaa !11
  %61 = getelementptr inbounds %struct.qsourcecf_s, ptr %60, i32 0, i32 10
  store float %59, ptr %61, align 8, !tbaa !17
  %62 = load ptr, ptr %14, align 8, !tbaa !11
  %63 = getelementptr inbounds %struct.qsourcecf_s, ptr %62, i32 0, i32 17
  store i32 1, ptr %63, align 8, !tbaa !18
  %64 = load ptr, ptr %14, align 8, !tbaa !11
  %65 = getelementptr inbounds %struct.qsourcecf_s, ptr %64, i32 0, i32 18
  store i64 0, ptr %65, align 8, !tbaa !19
  %66 = load float, ptr %11, align 4, !tbaa !9
  %67 = load ptr, ptr %14, align 8, !tbaa !11
  %68 = getelementptr inbounds %struct.qsourcecf_s, ptr %67, i32 0, i32 5
  store float %66, ptr %68, align 4, !tbaa !20
  %69 = load float, ptr %12, align 4, !tbaa !9
  %70 = load ptr, ptr %14, align 8, !tbaa !11
  %71 = getelementptr inbounds %struct.qsourcecf_s, ptr %70, i32 0, i32 6
  store float %69, ptr %71, align 8, !tbaa !21
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = load ptr, ptr %14, align 8, !tbaa !11
  %74 = getelementptr inbounds %struct.qsourcecf_s, ptr %73, i32 0, i32 1
  store i32 %72, ptr %74, align 4, !tbaa !22
  %75 = load float, ptr %12, align 4, !tbaa !9
  %76 = fpext float %75 to double
  %77 = fmul double 5.000000e-01, %76
  %78 = load i32, ptr %8, align 4, !tbaa !5
  %79 = uitofp i32 %78 to double
  %80 = fmul double %77, %79
  %81 = fptrunc double %80 to float
  %82 = call float @llvm.ceil.f32(float %81)
  %83 = fptoui float %82 to i32
  %84 = mul i32 2, %83
  %85 = load ptr, ptr %14, align 8, !tbaa !11
  %86 = getelementptr inbounds %struct.qsourcecf_s, ptr %85, i32 0, i32 2
  store i32 %84, ptr %86, align 8, !tbaa !23
  %87 = load ptr, ptr %14, align 8, !tbaa !11
  %88 = getelementptr inbounds %struct.qsourcecf_s, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 8, !tbaa !23
  %90 = icmp ugt i32 2, %89
  br i1 %90, label %91, label %92

91:                                               ; preds = %51
  br label %96

92:                                               ; preds = %51
  %93 = load ptr, ptr %14, align 8, !tbaa !11
  %94 = getelementptr inbounds %struct.qsourcecf_s, ptr %93, i32 0, i32 2
  %95 = load i32, ptr %94, align 8, !tbaa !23
  br label %96

96:                                               ; preds = %92, %91
  %97 = phi i32 [ 2, %91 ], [ %95, %92 ]
  %98 = load ptr, ptr %14, align 8, !tbaa !11
  %99 = getelementptr inbounds %struct.qsourcecf_s, ptr %98, i32 0, i32 2
  store i32 %97, ptr %99, align 8, !tbaa !23
  %100 = load i32, ptr %9, align 4, !tbaa !5
  %101 = load ptr, ptr %14, align 8, !tbaa !11
  %102 = getelementptr inbounds %struct.qsourcecf_s, ptr %101, i32 0, i32 3
  store i32 %100, ptr %102, align 4, !tbaa !24
  %103 = load float, ptr %10, align 4, !tbaa !9
  %104 = load ptr, ptr %14, align 8, !tbaa !11
  %105 = getelementptr inbounds %struct.qsourcecf_s, ptr %104, i32 0, i32 4
  store float %103, ptr %105, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %106 = load float, ptr %12, align 4, !tbaa !9
  %107 = fcmp oeq float %106, 0.000000e+00
  br i1 %107, label %108, label %109

108:                                              ; preds = %96
  br label %121

109:                                              ; preds = %96
  %110 = load float, ptr %12, align 4, !tbaa !9
  %111 = load ptr, ptr %14, align 8, !tbaa !11
  %112 = getelementptr inbounds %struct.qsourcecf_s, ptr %111, i32 0, i32 1
  %113 = load i32, ptr %112, align 4, !tbaa !22
  %114 = uitofp i32 %113 to float
  %115 = fmul float %110, %114
  %116 = load ptr, ptr %14, align 8, !tbaa !11
  %117 = getelementptr inbounds %struct.qsourcecf_s, ptr %116, i32 0, i32 2
  %118 = load i32, ptr %117, align 8, !tbaa !23
  %119 = uitofp i32 %118 to float
  %120 = fdiv float %115, %119
  br label %121

121:                                              ; preds = %109, %108
  %122 = phi float [ 1.000000e+00, %108 ], [ %120, %109 ]
  store float %122, ptr %15, align 4, !tbaa !9
  %123 = load float, ptr %15, align 4, !tbaa !9
  %124 = load ptr, ptr %14, align 8, !tbaa !11
  %125 = getelementptr inbounds %struct.qsourcecf_s, ptr %124, i32 0, i32 4
  %126 = load float, ptr %125, align 8, !tbaa !25
  %127 = call ptr @resamp_crcf_create(float noundef %123, i32 noundef 12, float noundef 0x3FDCCCCCC0000000, float noundef %126, i32 noundef 64)
  %128 = load ptr, ptr %14, align 8, !tbaa !11
  %129 = getelementptr inbounds %struct.qsourcecf_s, ptr %128, i32 0, i32 8
  store ptr %127, ptr %129, align 8, !tbaa !26
  %130 = call ptr @nco_crcf_create(i32 noundef 1)
  %131 = load ptr, ptr %14, align 8, !tbaa !11
  %132 = getelementptr inbounds %struct.qsourcecf_s, ptr %131, i32 0, i32 9
  store ptr %130, ptr %132, align 8, !tbaa !27
  %133 = load ptr, ptr %14, align 8, !tbaa !11
  %134 = load float, ptr %11, align 4, !tbaa !9
  %135 = call i32 @qsourcecf_set_frequency(ptr noundef %133, float noundef %134)
  %136 = load ptr, ptr %14, align 8, !tbaa !11
  %137 = getelementptr inbounds %struct.qsourcecf_s, ptr %136, i32 0, i32 12
  store i32 64, ptr %137, align 8, !tbaa !28
  %138 = load ptr, ptr %14, align 8, !tbaa !11
  %139 = getelementptr inbounds %struct.qsourcecf_s, ptr %138, i32 0, i32 12
  %140 = load i32, ptr %139, align 8, !tbaa !28
  %141 = zext i32 %140 to i64
  %142 = mul i64 %141, 8
  %143 = call noalias ptr @malloc(i64 noundef %142) #7
  %144 = load ptr, ptr %14, align 8, !tbaa !11
  %145 = getelementptr inbounds %struct.qsourcecf_s, ptr %144, i32 0, i32 13
  store ptr %143, ptr %145, align 8, !tbaa !29
  %146 = load ptr, ptr %14, align 8, !tbaa !11
  %147 = getelementptr inbounds %struct.qsourcecf_s, ptr %146, i32 0, i32 2
  %148 = load i32, ptr %147, align 8, !tbaa !23
  %149 = udiv i32 %148, 2
  %150 = zext i32 %149 to i64
  %151 = mul i64 %150, 8
  %152 = call noalias ptr @malloc(i64 noundef %151) #7
  %153 = load ptr, ptr %14, align 8, !tbaa !11
  %154 = getelementptr inbounds %struct.qsourcecf_s, ptr %153, i32 0, i32 14
  store ptr %152, ptr %154, align 8, !tbaa !30
  %155 = load ptr, ptr %14, align 8, !tbaa !11
  %156 = getelementptr inbounds %struct.qsourcecf_s, ptr %155, i32 0, i32 2
  %157 = load i32, ptr %156, align 8, !tbaa !23
  %158 = zext i32 %157 to i64
  %159 = mul i64 %158, 8
  %160 = call noalias ptr @malloc(i64 noundef %159) #7
  %161 = load ptr, ptr %14, align 8, !tbaa !11
  %162 = getelementptr inbounds %struct.qsourcecf_s, ptr %161, i32 0, i32 15
  store ptr %160, ptr %162, align 8, !tbaa !31
  %163 = load ptr, ptr %14, align 8, !tbaa !11
  %164 = getelementptr inbounds %struct.qsourcecf_s, ptr %163, i32 0, i32 2
  %165 = load i32, ptr %164, align 8, !tbaa !23
  %166 = load ptr, ptr %14, align 8, !tbaa !11
  %167 = getelementptr inbounds %struct.qsourcecf_s, ptr %166, i32 0, i32 3
  %168 = load i32, ptr %167, align 4, !tbaa !24
  %169 = load ptr, ptr %14, align 8, !tbaa !11
  %170 = getelementptr inbounds %struct.qsourcecf_s, ptr %169, i32 0, i32 4
  %171 = load float, ptr %170, align 8, !tbaa !25
  %172 = call ptr @firpfbch2_crcf_create_kaiser(i32 noundef 0, i32 noundef %165, i32 noundef %168, float noundef %171)
  %173 = load ptr, ptr %14, align 8, !tbaa !11
  %174 = getelementptr inbounds %struct.qsourcecf_s, ptr %173, i32 0, i32 16
  store ptr %172, ptr %174, align 8, !tbaa !32
  %175 = load ptr, ptr %14, align 8, !tbaa !11
  %176 = getelementptr inbounds %struct.qsourcecf_s, ptr %175, i32 0, i32 2
  %177 = load i32, ptr %176, align 8, !tbaa !23
  %178 = uitofp i32 %177 to float
  %179 = load ptr, ptr %14, align 8, !tbaa !11
  %180 = getelementptr inbounds %struct.qsourcecf_s, ptr %179, i32 0, i32 1
  %181 = load i32, ptr %180, align 4, !tbaa !22
  %182 = uitofp i32 %181 to float
  %183 = fdiv float %178, %182
  %184 = call float @sqrtf(float noundef %183) #6
  %185 = load ptr, ptr %14, align 8, !tbaa !11
  %186 = getelementptr inbounds %struct.qsourcecf_s, ptr %185, i32 0, i32 11
  store float %184, ptr %186, align 4, !tbaa !33
  %187 = load ptr, ptr %14, align 8, !tbaa !11
  %188 = call i32 @qsourcecf_reset(ptr noundef %187)
  %189 = load ptr, ptr %14, align 8, !tbaa !11
  store ptr %189, ptr %7, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %190

190:                                              ; preds = %121, %47, %37, %28, %22
  %191 = load ptr, ptr %7, align 8
  ret ptr %191
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @qsourcecf_set_frequency(ptr noundef, float noundef) #3

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

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

declare ptr @resamp_crcf_create(float noundef, i32 noundef, float noundef, float noundef, i32 noundef) #0

declare ptr @nco_crcf_create(i32 noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @qsourcecf_reset(ptr noundef) #3

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind allocsize(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 #3 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"qsourcecf_s", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !6, i64 28, !12, i64 32, !12, i64 40, !10, i64 48, !10, i64 52, !6, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !6, i64 96, !15, i64 104, !6, i64 112, !7, i64 120}
!15 = !{!"long", !7, i64 0}
!16 = !{!14, !6, i64 112}
!17 = !{!14, !10, i64 48}
!18 = !{!14, !6, i64 96}
!19 = !{!14, !15, i64 104}
!20 = !{!14, !10, i64 20}
!21 = !{!14, !10, i64 24}
!22 = !{!14, !6, i64 4}
!23 = !{!14, !6, i64 8}
!24 = !{!14, !6, i64 12}
!25 = !{!14, !10, i64 16}
!26 = !{!14, !12, i64 32}
!27 = !{!14, !12, i64 40}
!28 = !{!14, !6, i64 56}
!29 = !{!14, !12, i64 64}
!30 = !{!14, !12, i64 72}
!31 = !{!14, !12, i64 80}
!32 = !{!14, !12, i64 88}
!33 = !{!14, !10, i64 52}


; 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 [3 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [61 x i8], align 1

declare ptr @liquid_error_config_fl(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

declare ptr @firpfbch2_crcf_create_kaiser(i32 noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local ptr @qsourcecf_create(i32 noundef %0, i32 noundef %1, float noundef %2, float noundef %3, float noundef %4, float noundef %5) local_unnamed_addr #2 {
  %7 = icmp ugt i32 %0, 1
  %8 = and i32 %0, 1
  %.not = icmp eq i32 %8, 0
  %or.cond67 = and i1 %7, %.not
  br i1 %or.cond67, label %11, label %9

9:                                                ; preds = %6
  %10 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.31, i32 noundef 92, ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.2, i32 noundef %0) #6
  br label %84

11:                                               ; preds = %6
  %12 = icmp eq i32 %1, 0
  br i1 %12, label %13, label %15

13:                                               ; preds = %11
  %14 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.31, i32 noundef 94, ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.2, i32 noundef 0) #6
  br label %84

15:                                               ; preds = %11
  %16 = tail call float @llvm.fabs.f32(float %3)
  %or.cond = fcmp ogt float %16, 5.000000e-01
  br i1 %or.cond, label %17, label %20

17:                                               ; preds = %15
  %18 = fpext float %3 to double
  %19 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.31, i32 noundef 96, ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.2, double noundef %18) #6
  br label %84

20:                                               ; preds = %15
  %21 = fcmp olt float %4, 0.000000e+00
  %22 = fcmp ogt float %4, 1.000000e+00
  %or.cond3 = or i1 %21, %22
  br i1 %or.cond3, label %23, label %26

23:                                               ; preds = %20
  %24 = fpext float %3 to double
  %25 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.31, i32 noundef 98, ptr noundef nonnull @.str.35, ptr noundef nonnull @.str.2, double noundef %24) #6
  br label %84

26:                                               ; preds = %20
  %27 = tail call noalias dereferenceable_or_null(160) ptr @malloc(i64 noundef 160) #7
  store i32 -1, ptr %27, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 112
  store i32 0, ptr %28, align 8, !tbaa !13
  %29 = fdiv float %5, 2.000000e+01
  %30 = tail call float @powf(float noundef 1.000000e+01, float noundef %29) #6
  %31 = getelementptr inbounds i8, ptr %27, i64 48
  store float %30, ptr %31, align 8, !tbaa !14
  %32 = getelementptr inbounds i8, ptr %27, i64 96
  store i32 1, ptr %32, align 8, !tbaa !15
  %33 = getelementptr inbounds i8, ptr %27, i64 104
  store i64 0, ptr %33, align 8, !tbaa !16
  %34 = getelementptr inbounds i8, ptr %27, i64 20
  store float %3, ptr %34, align 4, !tbaa !17
  %35 = getelementptr inbounds i8, ptr %27, i64 24
  store float %4, ptr %35, align 8, !tbaa !18
  %36 = getelementptr inbounds i8, ptr %27, i64 4
  store i32 %0, ptr %36, align 4, !tbaa !19
  %37 = fpext float %4 to double
  %38 = fmul double %37, 5.000000e-01
  %39 = uitofp i32 %0 to double
  %40 = fmul double %38, %39
  %41 = fptrunc double %40 to float
  %42 = tail call float @llvm.ceil.f32(float %41)
  %43 = fptoui float %42 to i32
  %44 = shl i32 %43, 1
  %45 = getelementptr inbounds i8, ptr %27, i64 8
  %46 = icmp eq i32 %44, 0
  %spec.select = select i1 %46, i32 2, i32 %44
  store i32 %spec.select, ptr %45, align 8, !tbaa !20
  %47 = getelementptr inbounds i8, ptr %27, i64 12
  store i32 %1, ptr %47, align 4, !tbaa !21
  %48 = getelementptr inbounds i8, ptr %27, i64 16
  store float %2, ptr %48, align 8, !tbaa !22
  %49 = fcmp oeq float %4, 0.000000e+00
  %50 = uitofp i32 %0 to float
  %51 = fmul float %50, %4
  %52 = uitofp i32 %spec.select to float
  %53 = fdiv float %51, %52
  %54 = select i1 %49, float 1.000000e+00, float %53
  %55 = tail call ptr @resamp_crcf_create(float noundef %54, i32 noundef 12, float noundef 0x3FDCCCCCC0000000, float noundef %2, i32 noundef 64) #6
  %56 = getelementptr inbounds i8, ptr %27, i64 32
  store ptr %55, ptr %56, align 8, !tbaa !23
  %57 = tail call ptr @nco_crcf_create(i32 noundef 1) #6
  %58 = getelementptr inbounds i8, ptr %27, i64 40
  store ptr %57, ptr %58, align 8, !tbaa !24
  %59 = tail call i32 @qsourcecf_set_frequency(ptr noundef nonnull %27, float noundef %3)
  %60 = getelementptr inbounds i8, ptr %27, i64 56
  store i32 64, ptr %60, align 8, !tbaa !25
  %61 = tail call noalias dereferenceable_or_null(512) ptr @malloc(i64 noundef 512) #7
  %62 = getelementptr inbounds i8, ptr %27, i64 64
  store ptr %61, ptr %62, align 8, !tbaa !26
  %63 = load i32, ptr %45, align 8, !tbaa !20
  %64 = lshr i32 %63, 1
  %65 = zext nneg i32 %64 to i64
  %66 = shl nuw nsw i64 %65, 3
  %67 = tail call noalias ptr @malloc(i64 noundef %66) #7
  %68 = getelementptr inbounds i8, ptr %27, i64 72
  store ptr %67, ptr %68, align 8, !tbaa !27
  %69 = zext i32 %63 to i64
  %70 = shl nuw nsw i64 %69, 3
  %71 = tail call noalias ptr @malloc(i64 noundef %70) #7
  %72 = getelementptr inbounds i8, ptr %27, i64 80
  store ptr %71, ptr %72, align 8, !tbaa !28
  %73 = load i32, ptr %47, align 4, !tbaa !21
  %74 = load float, ptr %48, align 8, !tbaa !22
  %75 = tail call ptr @firpfbch2_crcf_create_kaiser(i32 noundef 0, i32 noundef %63, i32 noundef %73, float noundef %74) #6
  %76 = getelementptr inbounds i8, ptr %27, i64 88
  store ptr %75, ptr %76, align 8, !tbaa !29
  %77 = load i32, ptr %45, align 8, !tbaa !20
  %78 = uitofp i32 %77 to float
  %79 = load i32, ptr %36, align 4, !tbaa !19
  %80 = uitofp i32 %79 to float
  %81 = fdiv float %78, %80
  %sqrt = tail call float @llvm.sqrt.f32(float %81)
  %82 = getelementptr inbounds i8, ptr %27, i64 52
  store float %sqrt, ptr %82, align 4, !tbaa !30
  %83 = tail call i32 @qsourcecf_reset(ptr noundef nonnull %27)
  br label %84

84:                                               ; preds = %26, %23, %17, %13, %9
  %.0 = phi ptr [ %10, %9 ], [ %14, %13 ], [ %19, %17 ], [ %25, %23 ], [ %27, %26 ]
  ret ptr %.0
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @qsourcecf_set_frequency(ptr noundef, float noundef) local_unnamed_addr #2

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

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

declare ptr @resamp_crcf_create(float noundef, i32 noundef, float noundef, float noundef, i32 noundef) local_unnamed_addr #0

declare ptr @nco_crcf_create(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @qsourcecf_reset(ptr noundef) local_unnamed_addr #2

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

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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, !7, i64 0}
!6 = !{!"qsourcecf_s", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !7, i64 28, !11, i64 32, !11, i64 40, !10, i64 48, !10, i64 52, !7, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !7, i64 96, !12, i64 104, !7, i64 112, !8, i64 120}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !7, i64 112}
!14 = !{!6, !10, i64 48}
!15 = !{!6, !7, i64 96}
!16 = !{!6, !12, i64 104}
!17 = !{!6, !10, i64 20}
!18 = !{!6, !10, i64 24}
!19 = !{!6, !7, i64 4}
!20 = !{!6, !7, i64 8}
!21 = !{!6, !7, i64 12}
!22 = !{!6, !10, i64 16}
!23 = !{!6, !11, i64 32}
!24 = !{!6, !11, i64 40}
!25 = !{!6, !7, i64 56}
!26 = !{!6, !11, i64 64}
!27 = !{!6, !11, i64 72}
!28 = !{!6, !11, i64 80}
!29 = !{!6, !11, i64 88}
!30 = !{!6, !10, i64 52}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass