; LLVM IR from jgaeddert/liquid-dsp :: src/filter/tests (firfilt_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.6 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [12 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

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

declare i32 @firfilt_crcf_destroy(ptr noundef) #1

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

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

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

declare void @liquid_autotest_passed(...) #1

declare i32 @firfilt_crcf_print(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @autotest_firfilt_recreate() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca float, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca { float, float }, align 4
  %11 = alloca { float, float }, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 21, ptr %2, align 4, !tbaa !5
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = zext i32 %12 to i64
  %14 = call ptr @llvm.stacksave.p0()
  store ptr %14, ptr %3, align 8
  %15 = alloca float, i64 %13, align 16
  store i64 %13, ptr %4, align 8
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = zext i32 %16 to i64
  %18 = alloca float, i64 %17, align 16
  store i64 %17, ptr %5, align 8
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %38, %0
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = icmp ult i32 %20, %21
  br i1 %22, label %23, label %41

23:                                               ; preds = %19
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = uitofp i32 %24 to double
  %26 = fmul double 3.000000e-01, %25
  %27 = fptrunc double %26 to float
  %28 = call float @cosf(float noundef %27) #6
  %29 = call float @sqrtf(float noundef 2.000000e+00) #6
  %30 = load i32, ptr %1, align 4, !tbaa !5
  %31 = uitofp i32 %30 to float
  %32 = fmul float %29, %31
  %33 = call float @sinf(float noundef %32) #6
  %34 = fadd float %28, %33
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = zext i32 %35 to i64
  %37 = getelementptr inbounds float, ptr %15, i64 %36
  store float %34, ptr %37, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %23
  %39 = load i32, ptr %1, align 4, !tbaa !5
  %40 = add i32 %39, 1
  store i32 %40, ptr %1, align 4, !tbaa !5
  br label %19, !llvm.loop !11

41:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = call ptr @firfilt_crcf_create(ptr noundef %15, i32 noundef %42)
  store ptr %43, ptr %6, align 8, !tbaa !13
  %44 = load ptr, ptr %6, align 8, !tbaa !13
  %45 = call i32 @firfilt_crcf_print(ptr noundef %44)
  %46 = icmp ne i32 0, %45
  br i1 %46, label %47, label %51

47:                                               ; preds = %41
  %48 = load ptr, ptr %6, align 8, !tbaa !13
  %49 = call i32 @firfilt_crcf_print(ptr noundef %48)
  %50 = sitofp i32 %49 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.6, i32 noundef 152, ptr noundef @.str.18, double noundef 0.000000e+00, ptr noundef @.str.8, ptr noundef @.str.19, double noundef %50)
  br label %52

51:                                               ; preds = %41
  call void (...) @liquid_autotest_passed()
  br label %52

52:                                               ; preds = %51, %47
  %53 = load ptr, ptr %6, align 8, !tbaa !13
  %54 = call i32 @firfilt_crcf_set_scale(ptr noundef %53, float noundef 3.000000e+00)
  %55 = icmp ne i32 0, %54
  br i1 %55, label %56, label %60

56:                                               ; preds = %52
  %57 = load ptr, ptr %6, align 8, !tbaa !13
  %58 = call i32 @firfilt_crcf_set_scale(ptr noundef %57, float noundef 3.000000e+00)
  %59 = sitofp i32 %58 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.6, i32 noundef 153, ptr noundef @.str.18, double noundef 0.000000e+00, ptr noundef @.str.8, ptr noundef @.str.20, double noundef %59)
  br label %61

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

61:                                               ; preds = %60, %56
  %62 = load ptr, ptr %6, align 8, !tbaa !13
  %63 = call i32 @firfilt_crcf_copy_coefficients(ptr noundef %62, ptr noundef %18)
  %64 = icmp ne i32 0, %63
  br i1 %64, label %65, label %69

65:                                               ; preds = %61
  %66 = load ptr, ptr %6, align 8, !tbaa !13
  %67 = call i32 @firfilt_crcf_copy_coefficients(ptr noundef %66, ptr noundef %18)
  %68 = sitofp i32 %67 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.6, i32 noundef 156, ptr noundef @.str.18, double noundef 0.000000e+00, ptr noundef @.str.8, ptr noundef @.str.26, double noundef %68)
  br label %70

69:                                               ; preds = %61
  call void (...) @liquid_autotest_passed()
  br label %70

70:                                               ; preds = %69, %65
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %81, %70
  %72 = load i32, ptr %1, align 4, !tbaa !5
  %73 = load i32, ptr %2, align 4, !tbaa !5
  %74 = icmp ult i32 %72, %73
  br i1 %74, label %75, label %84

75:                                               ; preds = %71
  %76 = load i32, ptr %1, align 4, !tbaa !5
  %77 = zext i32 %76 to i64
  %78 = getelementptr inbounds float, ptr %18, i64 %77
  %79 = load float, ptr %78, align 4, !tbaa !9
  %80 = fmul float %79, 0x401C666660000000
  store float %80, ptr %78, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %75
  %82 = load i32, ptr %1, align 4, !tbaa !5
  %83 = add i32 %82, 1
  store i32 %83, ptr %1, align 4, !tbaa !5
  br label %71, !llvm.loop !15

84:                                               ; preds = %71
  %85 = load ptr, ptr %6, align 8, !tbaa !13
  %86 = load i32, ptr %2, align 4, !tbaa !5
  %87 = call ptr @firfilt_crcf_recreate(ptr noundef %85, ptr noundef %18, i32 noundef %86)
  store ptr %87, ptr %6, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %88 = load ptr, ptr %6, align 8, !tbaa !13
  %89 = call i32 @firfilt_crcf_get_scale(ptr noundef %88, ptr noundef %7)
  %90 = load float, ptr %7, align 4, !tbaa !9
  %91 = fcmp une float %90, 3.000000e+00
  br i1 %91, label %92, label %95

92:                                               ; preds = %84
  %93 = load float, ptr %7, align 4, !tbaa !9
  %94 = fpext float %93 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.6, i32 noundef 168, ptr noundef @.str.22, double noundef %94, ptr noundef @.str.8, ptr noundef @.str.23, double noundef 3.000000e+00)
  br label %96

95:                                               ; preds = %84
  call void (...) @liquid_autotest_passed()
  br label %96

96:                                               ; preds = %95, %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %97 = load ptr, ptr %6, align 8, !tbaa !13
  %98 = call ptr @firfilt_crcf_get_coefficients(ptr noundef %97)
  store ptr %98, ptr %8, align 8, !tbaa !13
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %136, %96
  %100 = load i32, ptr %1, align 4, !tbaa !5
  %101 = load i32, ptr %2, align 4, !tbaa !5
  %102 = icmp ult i32 %100, %101
  br i1 %102, label %103, label %139

103:                                              ; preds = %99
  %104 = load ptr, ptr %8, align 8, !tbaa !13
  %105 = load i32, ptr %2, align 4, !tbaa !5
  %106 = load i32, ptr %1, align 4, !tbaa !5
  %107 = sub i32 %105, %106
  %108 = sub i32 %107, 1
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds float, ptr %104, i64 %109
  %111 = load float, ptr %110, align 4, !tbaa !9
  %112 = load i32, ptr %1, align 4, !tbaa !5
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds float, ptr %15, i64 %113
  %115 = load float, ptr %114, align 4, !tbaa !9
  %116 = fmul float %115, 0x401C666660000000
  %117 = fcmp une float %111, %116
  br i1 %117, label %118, label %134

118:                                              ; preds = %103
  %119 = load ptr, ptr %8, align 8, !tbaa !13
  %120 = load i32, ptr %2, align 4, !tbaa !5
  %121 = load i32, ptr %1, align 4, !tbaa !5
  %122 = sub i32 %120, %121
  %123 = sub i32 %122, 1
  %124 = zext i32 %123 to i64
  %125 = getelementptr inbounds float, ptr %119, i64 %124
  %126 = load float, ptr %125, align 4, !tbaa !9
  %127 = fpext float %126 to double
  %128 = load i32, ptr %1, align 4, !tbaa !5
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds float, ptr %15, i64 %129
  %131 = load float, ptr %130, align 4, !tbaa !9
  %132 = fmul float %131, 0x401C666660000000
  %133 = fpext float %132 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.6, i32 noundef 174, ptr noundef @.str.27, double noundef %127, ptr noundef @.str.8, ptr noundef @.str.28, double noundef %133)
  br label %135

134:                                              ; preds = %103
  call void (...) @liquid_autotest_passed()
  br label %135

135:                                              ; preds = %134, %118
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %1, align 4, !tbaa !5
  %138 = add i32 %137, 1
  store i32 %138, ptr %1, align 4, !tbaa !5
  br label %99, !llvm.loop !16

139:                                              ; preds = %99
  %140 = load i32, ptr %2, align 4, !tbaa !5
  %141 = mul i32 2, %140
  %142 = add i32 %141, 1
  %143 = zext i32 %142 to i64
  %144 = alloca float, i64 %143, align 16
  store i64 %143, ptr %9, align 8
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %145

145:                                              ; preds = %166, %139
  %146 = load i32, ptr %1, align 4, !tbaa !5
  %147 = load i32, ptr %2, align 4, !tbaa !5
  %148 = mul i32 2, %147
  %149 = add i32 %148, 1
  %150 = icmp ult i32 %146, %149
  br i1 %150, label %151, label %169

151:                                              ; preds = %145
  %152 = load i32, ptr %1, align 4, !tbaa !5
  %153 = uitofp i32 %152 to double
  %154 = call double @llvm.fmuladd.f64(double 2.000000e-01, double %153, double 1.000000e+00)
  %155 = fptrunc double %154 to float
  %156 = call float @cosf(float noundef %155) #6
  %157 = call float @logf(float noundef 2.000000e+00) #6
  %158 = load i32, ptr %1, align 4, !tbaa !5
  %159 = uitofp i32 %158 to float
  %160 = fmul float %157, %159
  %161 = call float @sinf(float noundef %160) #6
  %162 = fadd float %156, %161
  %163 = load i32, ptr %1, align 4, !tbaa !5
  %164 = zext i32 %163 to i64
  %165 = getelementptr inbounds float, ptr %144, i64 %164
  store float %162, ptr %165, align 4, !tbaa !9
  br label %166

166:                                              ; preds = %151
  %167 = load i32, ptr %1, align 4, !tbaa !5
  %168 = add i32 %167, 1
  store i32 %168, ptr %1, align 4, !tbaa !5
  br label %145, !llvm.loop !17

169:                                              ; preds = %145
  %170 = load ptr, ptr %6, align 8, !tbaa !13
  %171 = load i32, ptr %2, align 4, !tbaa !5
  %172 = mul i32 2, %171
  %173 = add i32 %172, 1
  %174 = call ptr @firfilt_crcf_recreate(ptr noundef %170, ptr noundef %144, i32 noundef %173)
  store ptr %174, ptr %6, align 8, !tbaa !13
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %175

175:                                              ; preds = %220, %169
  %176 = load i32, ptr %1, align 4, !tbaa !5
  %177 = load i32, ptr %2, align 4, !tbaa !5
  %178 = mul i32 2, %177
  %179 = add i32 %178, 1
  %180 = icmp ult i32 %176, %179
  br i1 %180, label %181, label %223

181:                                              ; preds = %175
  %182 = load ptr, ptr %6, align 8, !tbaa !13
  %183 = load i32, ptr %1, align 4, !tbaa !5
  %184 = icmp eq i32 %183, 0
  %185 = zext i1 %184 to i64
  %186 = select i1 %184, i32 1, i32 0
  %187 = sitofp i32 %186 to float
  %188 = getelementptr inbounds { float, float }, ptr %10, i32 0, i32 0
  %189 = getelementptr inbounds { float, float }, ptr %10, i32 0, i32 1
  store float %187, ptr %188, align 4
  store float 0.000000e+00, ptr %189, align 4
  %190 = load <2 x float>, ptr %10, align 4
  %191 = call i32 @firfilt_crcf_push(ptr noundef %182, <2 x float> noundef %190)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %192 = load ptr, ptr %6, align 8, !tbaa !13
  %193 = call i32 @firfilt_crcf_execute(ptr noundef %192, ptr noundef %11)
  %194 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 0
  %195 = load float, ptr %194, align 4
  %196 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 1
  %197 = load float, ptr %196, align 4
  %198 = load i32, ptr %1, align 4, !tbaa !5
  %199 = zext i32 %198 to i64
  %200 = getelementptr inbounds float, ptr %144, i64 %199
  %201 = load float, ptr %200, align 4, !tbaa !9
  %202 = load float, ptr %7, align 4, !tbaa !9
  %203 = fmul float %201, %202
  %204 = fcmp une float %195, %203
  %205 = fcmp une float %197, 0.000000e+00
  %206 = or i1 %204, %205
  br i1 %206, label %207, label %218

207:                                              ; preds = %181
  %208 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 0
  %209 = load float, ptr %208, align 4
  %210 = fpext float %209 to double
  %211 = load i32, ptr %1, align 4, !tbaa !5
  %212 = zext i32 %211 to i64
  %213 = getelementptr inbounds float, ptr %144, i64 %212
  %214 = load float, ptr %213, align 4, !tbaa !9
  %215 = load float, ptr %7, align 4, !tbaa !9
  %216 = fmul float %214, %215
  %217 = fpext float %216 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.6, i32 noundef 186, ptr noundef @.str.29, double noundef %210, ptr noundef @.str.8, ptr noundef @.str.30, double noundef %217)
  br label %219

218:                                              ; preds = %181
  call void (...) @liquid_autotest_passed()
  br label %219

219:                                              ; preds = %218, %207
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %220

220:                                              ; preds = %219
  %221 = load i32, ptr %1, align 4, !tbaa !5
  %222 = add i32 %221, 1
  store i32 %222, ptr %1, align 4, !tbaa !5
  br label %175, !llvm.loop !18

223:                                              ; preds = %175
  %224 = load ptr, ptr %6, align 8, !tbaa !13
  %225 = call i32 @firfilt_crcf_destroy(ptr noundef %224)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %226 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %226)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void
}

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

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

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

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

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

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

declare ptr @firfilt_crcf_get_coefficients(ptr noundef) #1

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

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

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

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

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

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 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn }
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 }

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


; 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.6 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [12 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

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

declare i32 @firfilt_crcf_destroy(ptr noundef) local_unnamed_addr #1

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

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

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

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

declare i32 @firfilt_crcf_print(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @autotest_firfilt_recreate() local_unnamed_addr #2 {
  %1 = alloca float, align 4
  %2 = alloca { float, float }, align 4
  %3 = alloca [21 x float], align 16
  %4 = alloca [21 x float], align 16
  store <4 x float> <float 1.000000e+00, float 0x3FFF16F2A0000000, float 0x3FF2226FC0000000, float 0xBFD148DCC0000000>, ptr %3, align 16, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %3, i64 16
  store <4 x float> <float 0xBFCCA61640000000, float 0x3FE8F27880000000, float 0x3FE28FD860000000, float 0xBFEEC82780000000>, ptr %5, align 16, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %3, i64 32
  store <4 x float> <float 0xBFFAFED4C0000000, float 0xBFE7C87BC0000000, float 0x3F84785800000000, float 0xBFEAC42960000000>, ptr %6, align 16, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %3, i64 48
  store <4 x float> <float 0xBFFD982080000000, float 0xBFF2C95B00000000, float 0x3FD4A92BA0000000, float 0x3FDF6CE480000000>, ptr %7, align 16, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %3, i64 64
  store <4 x float> <float 0xBFE036E040000000, float 0xBFE04B0FA0000000, float 0x3FEE787100000000, float 0x3FFD225340000000>, ptr %8, align 16, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %3, i64 80
  store float 0x3FEE684F40000000, ptr %9, align 16, !tbaa !5
  %10 = call ptr @firfilt_crcf_create(ptr noundef nonnull %3, i32 noundef 21) #5
  %11 = call i32 @firfilt_crcf_print(ptr noundef %10) #5
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %15, label %12

12:                                               ; preds = %0
  %13 = call i32 @firfilt_crcf_print(ptr noundef %10) #5
  %14 = sitofp i32 %13 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.6, i32 noundef 152, ptr noundef nonnull @.str.18, double noundef 0.000000e+00, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.19, double noundef %14) #5
  br label %16

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

16:                                               ; preds = %15, %12
  %17 = call i32 @firfilt_crcf_set_scale(ptr noundef %10, float noundef 3.000000e+00) #5
  %.not56 = icmp eq i32 %17, 0
  br i1 %.not56, label %21, label %18

18:                                               ; preds = %16
  %19 = call i32 @firfilt_crcf_set_scale(ptr noundef %10, float noundef 3.000000e+00) #5
  %20 = sitofp i32 %19 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.6, i32 noundef 153, ptr noundef nonnull @.str.18, double noundef 0.000000e+00, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.20, double noundef %20) #5
  br label %22

21:                                               ; preds = %16
  call void (...) @liquid_autotest_passed() #5
  br label %22

22:                                               ; preds = %21, %18
  %23 = call i32 @firfilt_crcf_copy_coefficients(ptr noundef %10, ptr noundef nonnull %4) #5
  %.not57 = icmp eq i32 %23, 0
  br i1 %.not57, label %27, label %24

24:                                               ; preds = %22
  %25 = call i32 @firfilt_crcf_copy_coefficients(ptr noundef %10, ptr noundef nonnull %4) #5
  %26 = sitofp i32 %25 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.6, i32 noundef 156, ptr noundef nonnull @.str.18, double noundef 0.000000e+00, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.26, double noundef %26) #5
  br label %28

27:                                               ; preds = %22
  call void (...) @liquid_autotest_passed() #5
  br label %28

28:                                               ; preds = %27, %24
  %29 = load <4 x float>, ptr %4, align 16, !tbaa !5
  %30 = fmul <4 x float> %29, <float 0x401C666660000000, float 0x401C666660000000, float 0x401C666660000000, float 0x401C666660000000>
  store <4 x float> %30, ptr %4, align 16, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %4, i64 16
  %32 = load <4 x float>, ptr %31, align 16, !tbaa !5
  %33 = fmul <4 x float> %32, <float 0x401C666660000000, float 0x401C666660000000, float 0x401C666660000000, float 0x401C666660000000>
  store <4 x float> %33, ptr %31, align 16, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %4, i64 32
  %35 = load <4 x float>, ptr %34, align 16, !tbaa !5
  %36 = fmul <4 x float> %35, <float 0x401C666660000000, float 0x401C666660000000, float 0x401C666660000000, float 0x401C666660000000>
  store <4 x float> %36, ptr %34, align 16, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %4, i64 48
  %38 = load <4 x float>, ptr %37, align 16, !tbaa !5
  %39 = fmul <4 x float> %38, <float 0x401C666660000000, float 0x401C666660000000, float 0x401C666660000000, float 0x401C666660000000>
  store <4 x float> %39, ptr %37, align 16, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %4, i64 64
  %41 = load <4 x float>, ptr %40, align 16, !tbaa !5
  %42 = fmul <4 x float> %41, <float 0x401C666660000000, float 0x401C666660000000, float 0x401C666660000000, float 0x401C666660000000>
  store <4 x float> %42, ptr %40, align 16, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %4, i64 80
  %44 = load float, ptr %43, align 16, !tbaa !5
  %45 = fmul float %44, 0x401C666660000000
  store float %45, ptr %43, align 16, !tbaa !5
  %46 = call ptr @firfilt_crcf_recreate(ptr noundef %10, ptr noundef nonnull %4, i32 noundef 21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %47 = call i32 @firfilt_crcf_get_scale(ptr noundef %46, ptr noundef nonnull %1) #5
  %48 = load float, ptr %1, align 4, !tbaa !5
  %49 = fcmp une float %48, 3.000000e+00
  br i1 %49, label %50, label %52

50:                                               ; preds = %28
  %51 = fpext float %48 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.6, i32 noundef 168, ptr noundef nonnull @.str.22, double noundef %51, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.23, double noundef 3.000000e+00) #5
  br label %53

52:                                               ; preds = %28
  call void (...) @liquid_autotest_passed() #5
  br label %53

53:                                               ; preds = %52, %50
  %54 = call ptr @firfilt_crcf_get_coefficients(ptr noundef %46) #5
  br label %55

55:                                               ; preds = %53, %67
  %indvars.iv = phi i64 [ 0, %53 ], [ %indvars.iv.next, %67 ]
  %56 = sub nuw nsw i64 20, %indvars.iv
  %57 = getelementptr inbounds float, ptr %54, i64 %56
  %58 = load float, ptr %57, align 4, !tbaa !5
  %59 = getelementptr inbounds float, ptr %3, i64 %indvars.iv
  %60 = load float, ptr %59, align 4, !tbaa !5
  %61 = fmul float %60, 0x401C666660000000
  %62 = fcmp une float %58, %61
  br i1 %62, label %63, label %66

63:                                               ; preds = %55
  %64 = fpext float %58 to double
  %65 = fpext float %61 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.6, i32 noundef 174, ptr noundef nonnull @.str.27, double noundef %64, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.28, double noundef %65) #5
  br label %67

66:                                               ; preds = %55
  call void (...) @liquid_autotest_passed() #5
  br label %67

67:                                               ; preds = %63, %66
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 21
  br i1 %exitcond.not, label %68, label %55, !llvm.loop !9

68:                                               ; preds = %67
  %69 = alloca [43 x float], align 16
  br label %70

70:                                               ; preds = %81, %68
  %indvars.iv66 = phi i64 [ 0, %68 ], [ %indvars.iv.next67.1, %81 ]
  %71 = trunc nuw nsw i64 %indvars.iv66 to i32
  %72 = uitofp nneg i32 %71 to double
  %73 = call double @llvm.fmuladd.f64(double %72, double 2.000000e-01, double 1.000000e+00)
  %74 = fptrunc double %73 to float
  %75 = call float @cosf(float noundef %74) #5
  %76 = uitofp nneg i32 %71 to float
  %77 = fmul float %76, 0x3FE62E4300000000
  %78 = call float @sinf(float noundef %77) #5
  %79 = fadd float %75, %78
  %80 = getelementptr inbounds float, ptr %69, i64 %indvars.iv66
  store float %79, ptr %80, align 8, !tbaa !5
  %exitcond69.not = icmp eq i64 %indvars.iv66, 42
  br i1 %exitcond69.not, label %92, label %81, !llvm.loop !11

81:                                               ; preds = %70
  %indvars.iv.next67 = or disjoint i64 %indvars.iv66, 1
  %82 = trunc nuw nsw i64 %indvars.iv.next67 to i32
  %83 = uitofp nneg i32 %82 to double
  %84 = call double @llvm.fmuladd.f64(double %83, double 2.000000e-01, double 1.000000e+00)
  %85 = fptrunc double %84 to float
  %86 = call float @cosf(float noundef %85) #5
  %87 = uitofp nneg i32 %82 to float
  %88 = fmul float %87, 0x3FE62E4300000000
  %89 = call float @sinf(float noundef %88) #5
  %90 = fadd float %86, %89
  %91 = getelementptr inbounds float, ptr %69, i64 %indvars.iv.next67
  store float %90, ptr %91, align 4, !tbaa !5
  %indvars.iv.next67.1 = add nuw nsw i64 %indvars.iv66, 2
  br label %70

92:                                               ; preds = %70
  %93 = call ptr @firfilt_crcf_recreate(ptr noundef %46, ptr noundef nonnull %69, i32 noundef 43) #5
  %94 = getelementptr inbounds i8, ptr %2, i64 4
  br label %95

95:                                               ; preds = %92, %113
  %indvars.iv70 = phi i64 [ 0, %92 ], [ %indvars.iv.next71, %113 ]
  %96 = icmp eq i64 %indvars.iv70, 0
  %97 = uitofp i1 %96 to float
  %.sroa.0.4.vec.insert = insertelement <2 x float> <float poison, float 0.000000e+00>, float %97, i64 0
  %98 = call i32 @firfilt_crcf_push(ptr noundef %93, <2 x float> noundef %.sroa.0.4.vec.insert) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %99 = call i32 @firfilt_crcf_execute(ptr noundef %93, ptr noundef nonnull %2) #5
  %100 = load float, ptr %2, align 4
  %101 = load float, ptr %94, align 4
  %102 = getelementptr inbounds float, ptr %69, i64 %indvars.iv70
  %103 = load float, ptr %102, align 4, !tbaa !5
  %104 = load float, ptr %1, align 4, !tbaa !5
  %105 = fmul float %103, %104
  %106 = fcmp une float %100, %105
  %107 = fcmp une float %101, 0.000000e+00
  %108 = or i1 %107, %106
  br i1 %108, label %109, label %112

109:                                              ; preds = %95
  %110 = fpext float %100 to double
  %111 = fpext float %105 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.6, i32 noundef 186, ptr noundef nonnull @.str.29, double noundef %110, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.30, double noundef %111) #5
  br label %113

112:                                              ; preds = %95
  call void (...) @liquid_autotest_passed() #5
  br label %113

113:                                              ; preds = %112, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond73.not = icmp eq i64 %indvars.iv.next71, 43
  br i1 %exitcond73.not, label %114, label %95, !llvm.loop !12

114:                                              ; preds = %113
  %115 = call i32 @firfilt_crcf_destroy(ptr noundef %93) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret void
}

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

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

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

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

declare ptr @firfilt_crcf_get_coefficients(ptr noundef) local_unnamed_addr #1

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

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

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

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 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 }

!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 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


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