; LLVM IR from jgaeddert/liquid-dsp :: src/filter/src (filter_cccf)

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

@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.117 = external hidden unnamed_addr constant [67 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: nounwind allocsize(0)
declare noalias ptr @malloc(i64 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 @liquid_error_config_fl(ptr noundef, i32 noundef, ptr noundef, ...) #2

declare i32 @estimate_req_filter_len(float noundef, float noundef) #2

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

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

22:                                               ; preds = %5
  %23 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.114, i32 noundef 91, ptr noundef @.str.115, ptr noundef @.str.3)
  store ptr %23, ptr %6, align 8
  br label %256

24:                                               ; preds = %5
  %25 = load float, ptr %9, align 4, !tbaa !9
  %26 = fcmp ole float %25, 0.000000e+00
  br i1 %26, label %30, label %27

27:                                               ; preds = %24
  %28 = load float, ptr %9, align 4, !tbaa !9
  %29 = fcmp oge float %28, 5.000000e-01
  br i1 %29, label %30, label %32

30:                                               ; preds = %27, %24
  %31 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.114, i32 noundef 93, ptr noundef @.str.116, ptr noundef @.str.3)
  store ptr %31, ptr %6, align 8
  br label %256

32:                                               ; preds = %27
  %33 = load float, ptr %10, align 4, !tbaa !9
  %34 = fpext float %33 to double
  %35 = fcmp une double %34, 0.000000e+00
  br i1 %35, label %36, label %38

36:                                               ; preds = %32
  %37 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.114, i32 noundef 95, ptr noundef @.str.117, ptr noundef @.str.3)
  store ptr %37, ptr %6, align 8
  br label %256

38:                                               ; preds = %32
  %39 = load float, ptr %9, align 4, !tbaa !9
  %40 = fcmp ogt float %39, 0x3FDFEF9DC0000000
  br i1 %40, label %41, label %42

41:                                               ; preds = %38
  store float 0x3FDFEF9DC0000000, ptr %9, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %41, %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %43 = call noalias ptr @malloc(i64 noundef 88) #7
  store ptr %43, ptr %13, align 8, !tbaa !11
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = icmp eq i32 %44, 0
  %46 = zext i1 %45 to i64
  %47 = select i1 %45, i32 0, i32 1
  %48 = load ptr, ptr %13, align 8, !tbaa !11
  %49 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %48, i32 0, i32 0
  store i32 %47, ptr %49, align 8, !tbaa !13
  %50 = load i32, ptr %8, align 4, !tbaa !5
  %51 = load ptr, ptr %13, align 8, !tbaa !11
  %52 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %51, i32 0, i32 1
  store i32 %50, ptr %52, align 4, !tbaa !15
  %53 = load float, ptr %9, align 4, !tbaa !9
  %54 = load ptr, ptr %13, align 8, !tbaa !11
  %55 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %54, i32 0, i32 2
  store float %53, ptr %55, align 8, !tbaa !16
  %56 = load float, ptr %10, align 4, !tbaa !9
  %57 = load ptr, ptr %13, align 8, !tbaa !11
  %58 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %57, i32 0, i32 3
  store float %56, ptr %58, align 4, !tbaa !17
  %59 = load float, ptr %11, align 4, !tbaa !9
  %60 = load ptr, ptr %13, align 8, !tbaa !11
  %61 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %60, i32 0, i32 4
  store float %59, ptr %61, align 8, !tbaa !18
  %62 = load ptr, ptr %13, align 8, !tbaa !11
  %63 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %62, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !15
  %65 = shl i32 1, %64
  %66 = load ptr, ptr %13, align 8, !tbaa !11
  %67 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %66, i32 0, i32 5
  store i32 %65, ptr %67, align 4, !tbaa !19
  %68 = load ptr, ptr %13, align 8, !tbaa !11
  %69 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %68, i32 0, i32 5
  %70 = load i32, ptr %69, align 4, !tbaa !19
  %71 = uitofp i32 %70 to float
  %72 = fdiv float 1.000000e+00, %71
  %73 = load ptr, ptr %13, align 8, !tbaa !11
  %74 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %73, i32 0, i32 14
  store float %72, ptr %74, align 4, !tbaa !20
  %75 = load ptr, ptr %13, align 8, !tbaa !11
  %76 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %75, i32 0, i32 5
  %77 = load i32, ptr %76, align 4, !tbaa !19
  %78 = zext i32 %77 to i64
  %79 = mul i64 %78, 8
  %80 = call noalias ptr @malloc(i64 noundef %79) #7
  %81 = load ptr, ptr %13, align 8, !tbaa !11
  %82 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %81, i32 0, i32 11
  store ptr %80, ptr %82, align 8, !tbaa !21
  %83 = load ptr, ptr %13, align 8, !tbaa !11
  %84 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %83, i32 0, i32 5
  %85 = load i32, ptr %84, align 4, !tbaa !19
  %86 = zext i32 %85 to i64
  %87 = mul i64 %86, 8
  %88 = call noalias ptr @malloc(i64 noundef %87) #7
  %89 = load ptr, ptr %13, align 8, !tbaa !11
  %90 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %89, i32 0, i32 12
  store ptr %88, ptr %90, align 8, !tbaa !22
  %91 = load ptr, ptr %13, align 8, !tbaa !11
  %92 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %91, i32 0, i32 1
  %93 = load i32, ptr %92, align 4, !tbaa !15
  %94 = zext i32 %93 to i64
  %95 = mul i64 %94, 4
  %96 = call noalias ptr @malloc(i64 noundef %95) #7
  %97 = load ptr, ptr %13, align 8, !tbaa !11
  %98 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %97, i32 0, i32 6
  store ptr %96, ptr %98, align 8, !tbaa !23
  %99 = load ptr, ptr %13, align 8, !tbaa !11
  %100 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %99, i32 0, i32 1
  %101 = load i32, ptr %100, align 4, !tbaa !15
  %102 = zext i32 %101 to i64
  %103 = mul i64 %102, 4
  %104 = call noalias ptr @malloc(i64 noundef %103) #7
  %105 = load ptr, ptr %13, align 8, !tbaa !11
  %106 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %105, i32 0, i32 7
  store ptr %104, ptr %106, align 8, !tbaa !24
  %107 = load ptr, ptr %13, align 8, !tbaa !11
  %108 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %107, i32 0, i32 1
  %109 = load i32, ptr %108, align 4, !tbaa !15
  %110 = zext i32 %109 to i64
  %111 = mul i64 %110, 4
  %112 = call noalias ptr @malloc(i64 noundef %111) #7
  %113 = load ptr, ptr %13, align 8, !tbaa !11
  %114 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %113, i32 0, i32 8
  store ptr %112, ptr %114, align 8, !tbaa !25
  %115 = load ptr, ptr %13, align 8, !tbaa !11
  %116 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %115, i32 0, i32 1
  %117 = load i32, ptr %116, align 4, !tbaa !15
  %118 = zext i32 %117 to i64
  %119 = mul i64 %118, 4
  %120 = call noalias ptr @malloc(i64 noundef %119) #7
  %121 = load ptr, ptr %13, align 8, !tbaa !11
  %122 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %121, i32 0, i32 9
  store ptr %120, ptr %122, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %123 = load ptr, ptr %13, align 8, !tbaa !11
  %124 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %123, i32 0, i32 2
  %125 = load float, ptr %124, align 8, !tbaa !16
  store float %125, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %126 = load ptr, ptr %13, align 8, !tbaa !11
  %127 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %126, i32 0, i32 3
  %128 = load float, ptr %127, align 4, !tbaa !17
  store float %128, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %129 = load ptr, ptr %13, align 8, !tbaa !11
  %130 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %129, i32 0, i32 4
  %131 = load float, ptr %130, align 8, !tbaa !18
  %132 = fadd float %131, 5.000000e+00
  store float %132, ptr %16, align 4, !tbaa !9
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %202, %42
  %134 = load i32, ptr %12, align 4, !tbaa !5
  %135 = load ptr, ptr %13, align 8, !tbaa !11
  %136 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %135, i32 0, i32 1
  %137 = load i32, ptr %136, align 4, !tbaa !15
  %138 = icmp ult i32 %134, %137
  br i1 %138, label %139, label %205

139:                                              ; preds = %133
  %140 = load i32, ptr %12, align 4, !tbaa !5
  %141 = icmp eq i32 %140, 1
  br i1 %141, label %142, label %147

142:                                              ; preds = %139
  %143 = load float, ptr %14, align 4, !tbaa !9
  %144 = fpext float %143 to double
  %145 = fsub double 5.000000e-01, %144
  %146 = fdiv double %145, 2.000000e+00
  br label %151

147:                                              ; preds = %139
  %148 = load float, ptr %14, align 4, !tbaa !9
  %149 = fmul float 5.000000e-01, %148
  %150 = fpext float %149 to double
  br label %151

151:                                              ; preds = %147, %142
  %152 = phi double [ %146, %142 ], [ %150, %147 ]
  %153 = fptrunc double %152 to float
  store float %153, ptr %14, align 4, !tbaa !9
  %154 = load float, ptr %15, align 4, !tbaa !9
  %155 = fmul float 5.000000e-01, %154
  store float %155, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %156 = load float, ptr %14, align 4, !tbaa !9
  %157 = fsub float 2.500000e-01, %156
  %158 = fmul float 2.000000e+00, %157
  store float %158, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %159 = load float, ptr %17, align 4, !tbaa !9
  %160 = load float, ptr %16, align 4, !tbaa !9
  %161 = call i32 @estimate_req_filter_len(float noundef %159, float noundef %160)
  store i32 %161, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %162 = load i32, ptr %18, align 4, !tbaa !5
  %163 = sub i32 %162, 1
  %164 = uitofp i32 %163 to float
  %165 = fdiv float %164, 4.000000e+00
  %166 = call float @llvm.ceil.f32(float %165)
  %167 = fptoui float %166 to i32
  store i32 %167, ptr %19, align 4, !tbaa !5
  %168 = load float, ptr %14, align 4, !tbaa !9
  %169 = load ptr, ptr %13, align 8, !tbaa !11
  %170 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %169, i32 0, i32 6
  %171 = load ptr, ptr %170, align 8, !tbaa !23
  %172 = load i32, ptr %12, align 4, !tbaa !5
  %173 = zext i32 %172 to i64
  %174 = getelementptr inbounds float, ptr %171, i64 %173
  store float %168, ptr %174, align 4, !tbaa !9
  %175 = load float, ptr %15, align 4, !tbaa !9
  %176 = load ptr, ptr %13, align 8, !tbaa !11
  %177 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %176, i32 0, i32 7
  %178 = load ptr, ptr %177, align 8, !tbaa !24
  %179 = load i32, ptr %12, align 4, !tbaa !5
  %180 = zext i32 %179 to i64
  %181 = getelementptr inbounds float, ptr %178, i64 %180
  store float %175, ptr %181, align 4, !tbaa !9
  %182 = load float, ptr %16, align 4, !tbaa !9
  %183 = load ptr, ptr %13, align 8, !tbaa !11
  %184 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %183, i32 0, i32 8
  %185 = load ptr, ptr %184, align 8, !tbaa !25
  %186 = load i32, ptr %12, align 4, !tbaa !5
  %187 = zext i32 %186 to i64
  %188 = getelementptr inbounds float, ptr %185, i64 %187
  store float %182, ptr %188, align 4, !tbaa !9
  %189 = load i32, ptr %19, align 4, !tbaa !5
  %190 = icmp ult i32 %189, 3
  br i1 %190, label %191, label %192

191:                                              ; preds = %151
  br label %194

192:                                              ; preds = %151
  %193 = load i32, ptr %19, align 4, !tbaa !5
  br label %194

194:                                              ; preds = %192, %191
  %195 = phi i32 [ 3, %191 ], [ %193, %192 ]
  %196 = load ptr, ptr %13, align 8, !tbaa !11
  %197 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %196, i32 0, i32 9
  %198 = load ptr, ptr %197, align 8, !tbaa !26
  %199 = load i32, ptr %12, align 4, !tbaa !5
  %200 = zext i32 %199 to i64
  %201 = getelementptr inbounds i32, ptr %198, i64 %200
  store i32 %195, ptr %201, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %202

202:                                              ; preds = %194
  %203 = load i32, ptr %12, align 4, !tbaa !5
  %204 = add i32 %203, 1
  store i32 %204, ptr %12, align 4, !tbaa !5
  br label %133, !llvm.loop !27

205:                                              ; preds = %133
  %206 = load ptr, ptr %13, align 8, !tbaa !11
  %207 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %206, i32 0, i32 1
  %208 = load i32, ptr %207, align 4, !tbaa !15
  %209 = zext i32 %208 to i64
  %210 = mul i64 %209, 8
  %211 = call noalias ptr @malloc(i64 noundef %210) #7
  %212 = load ptr, ptr %13, align 8, !tbaa !11
  %213 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %212, i32 0, i32 10
  store ptr %211, ptr %213, align 8, !tbaa !29
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %214

214:                                              ; preds = %249, %205
  %215 = load i32, ptr %12, align 4, !tbaa !5
  %216 = load ptr, ptr %13, align 8, !tbaa !11
  %217 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %216, i32 0, i32 1
  %218 = load i32, ptr %217, align 4, !tbaa !15
  %219 = icmp ult i32 %215, %218
  br i1 %219, label %220, label %252

220:                                              ; preds = %214
  %221 = load ptr, ptr %13, align 8, !tbaa !11
  %222 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %221, i32 0, i32 9
  %223 = load ptr, ptr %222, align 8, !tbaa !26
  %224 = load i32, ptr %12, align 4, !tbaa !5
  %225 = zext i32 %224 to i64
  %226 = getelementptr inbounds i32, ptr %223, i64 %225
  %227 = load i32, ptr %226, align 4, !tbaa !5
  %228 = load ptr, ptr %13, align 8, !tbaa !11
  %229 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %228, i32 0, i32 7
  %230 = load ptr, ptr %229, align 8, !tbaa !24
  %231 = load i32, ptr %12, align 4, !tbaa !5
  %232 = zext i32 %231 to i64
  %233 = getelementptr inbounds float, ptr %230, i64 %232
  %234 = load float, ptr %233, align 4, !tbaa !9
  %235 = load ptr, ptr %13, align 8, !tbaa !11
  %236 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %235, i32 0, i32 8
  %237 = load ptr, ptr %236, align 8, !tbaa !25
  %238 = load i32, ptr %12, align 4, !tbaa !5
  %239 = zext i32 %238 to i64
  %240 = getelementptr inbounds float, ptr %237, i64 %239
  %241 = load float, ptr %240, align 4, !tbaa !9
  %242 = call ptr @resamp2_cccf_create(i32 noundef %227, float noundef %234, float noundef %241)
  %243 = load ptr, ptr %13, align 8, !tbaa !11
  %244 = getelementptr inbounds %struct.msresamp2_cccf_s, ptr %243, i32 0, i32 10
  %245 = load ptr, ptr %244, align 8, !tbaa !29
  %246 = load i32, ptr %12, align 4, !tbaa !5
  %247 = zext i32 %246 to i64
  %248 = getelementptr inbounds ptr, ptr %245, i64 %247
  store ptr %242, ptr %248, align 8, !tbaa !11
  br label %249

249:                                              ; preds = %220
  %250 = load i32, ptr %12, align 4, !tbaa !5
  %251 = add i32 %250, 1
  store i32 %251, ptr %12, align 4, !tbaa !5
  br label %214, !llvm.loop !30

252:                                              ; preds = %214
  %253 = load ptr, ptr %13, align 8, !tbaa !11
  %254 = call i32 @msresamp2_cccf_reset(ptr noundef %253)
  %255 = load ptr, ptr %13, align 8, !tbaa !11
  store ptr %255, ptr %6, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %256

256:                                              ; preds = %252, %36, %30, %22
  %257 = load ptr, ptr %6, align 8
  ret ptr %257
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @msresamp2_cccf_reset(ptr noundef) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { 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 = !{!"msresamp2_cccf_s", !6, i64 0, !6, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 20, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !6, i64 80, !10, i64 84}
!15 = !{!14, !6, i64 4}
!16 = !{!14, !10, i64 8}
!17 = !{!14, !10, i64 12}
!18 = !{!14, !10, i64 16}
!19 = !{!14, !6, i64 20}
!20 = !{!14, !10, i64 84}
!21 = !{!14, !12, i64 64}
!22 = !{!14, !12, i64 72}
!23 = !{!14, !12, i64 24}
!24 = !{!14, !12, i64 32}
!25 = !{!14, !12, i64 40}
!26 = !{!14, !12, i64 48}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!14, !12, i64 56}
!30 = distinct !{!30, !28}


; 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.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.117 = external hidden unnamed_addr constant [67 x i8], align 1

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

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

declare i32 @estimate_req_filter_len(float noundef, float noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local ptr @msresamp2_cccf_create(i32 noundef %0, i32 noundef %1, float noundef %2, float noundef %3, float noundef %4) local_unnamed_addr #3 {
  %6 = icmp ugt i32 %1, 16
  br i1 %6, label %7, label %9

7:                                                ; preds = %5
  %8 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.114, i32 noundef 91, ptr noundef nonnull @.str.115, ptr noundef nonnull @.str.3) #6
  br label %118

9:                                                ; preds = %5
  %10 = fcmp ole float %2, 0.000000e+00
  %11 = fcmp oge float %2, 5.000000e-01
  %or.cond = or i1 %10, %11
  br i1 %or.cond, label %12, label %14

12:                                               ; preds = %9
  %13 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.114, i32 noundef 93, ptr noundef nonnull @.str.116, ptr noundef nonnull @.str.3) #6
  br label %118

14:                                               ; preds = %9
  %15 = fcmp une float %3, 0.000000e+00
  br i1 %15, label %16, label %18

16:                                               ; preds = %14
  %17 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.114, i32 noundef 95, ptr noundef nonnull @.str.117, ptr noundef nonnull @.str.3) #6
  br label %118

18:                                               ; preds = %14
  %19 = fcmp ogt float %2, 0x3FDFEF9DC0000000
  %.074 = select i1 %19, float 0x3FDFEF9DC0000000, float %2
  %20 = tail call noalias dereferenceable_or_null(88) ptr @malloc(i64 noundef 88) #7
  %21 = icmp ne i32 %0, 0
  %22 = zext i1 %21 to i32
  store i32 %22, ptr %20, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %20, i64 4
  store i32 %1, ptr %23, align 4, !tbaa !12
  %24 = getelementptr inbounds i8, ptr %20, i64 8
  store float %.074, ptr %24, align 8, !tbaa !13
  %25 = getelementptr inbounds i8, ptr %20, i64 12
  store float %3, ptr %25, align 4, !tbaa !14
  %26 = getelementptr inbounds i8, ptr %20, i64 16
  store float %4, ptr %26, align 8, !tbaa !15
  %27 = shl nuw nsw i32 1, %1
  %28 = getelementptr inbounds i8, ptr %20, i64 20
  store i32 %27, ptr %28, align 4, !tbaa !16
  %29 = uitofp nneg i32 %27 to float
  %30 = fdiv float 1.000000e+00, %29
  %31 = getelementptr inbounds i8, ptr %20, i64 84
  store float %30, ptr %31, align 4, !tbaa !17
  %32 = zext nneg i32 %27 to i64
  %33 = shl nuw nsw i64 %32, 3
  %34 = tail call noalias ptr @malloc(i64 noundef %33) #7
  %35 = getelementptr inbounds i8, ptr %20, i64 64
  store ptr %34, ptr %35, align 8, !tbaa !18
  %36 = tail call noalias ptr @malloc(i64 noundef %33) #7
  %37 = getelementptr inbounds i8, ptr %20, i64 72
  store ptr %36, ptr %37, align 8, !tbaa !19
  %38 = shl nuw nsw i32 %1, 2
  %39 = zext nneg i32 %38 to i64
  %40 = tail call noalias ptr @malloc(i64 noundef %39) #7
  %41 = getelementptr inbounds i8, ptr %20, i64 24
  store ptr %40, ptr %41, align 8, !tbaa !20
  %42 = tail call noalias ptr @malloc(i64 noundef %39) #7
  %43 = getelementptr inbounds i8, ptr %20, i64 32
  store ptr %42, ptr %43, align 8, !tbaa !21
  %44 = tail call noalias ptr @malloc(i64 noundef %39) #7
  %45 = getelementptr inbounds i8, ptr %20, i64 40
  store ptr %44, ptr %45, align 8, !tbaa !22
  %46 = tail call noalias ptr @malloc(i64 noundef %39) #7
  %47 = getelementptr inbounds i8, ptr %20, i64 48
  store ptr %46, ptr %47, align 8, !tbaa !23
  %48 = fadd float %4, 5.000000e+00
  %.not = icmp eq i32 %1, 0
  br i1 %.not, label %._crit_edge.thread, label %.lr.ph.preheader

._crit_edge.thread:                               ; preds = %18
  %49 = tail call noalias ptr @malloc(i64 noundef 0) #7
  %50 = getelementptr inbounds i8, ptr %20, i64 56
  store ptr %49, ptr %50, align 8, !tbaa !24
  br label %._crit_edge87

.lr.ph.preheader:                                 ; preds = %18
  %51 = fmul float %.074, 5.000000e-01
  %52 = fmul float %3, 5.000000e-01
  %53 = fsub float 2.500000e-01, %51
  %54 = fmul float %53, 2.000000e+00
  %55 = tail call i32 @estimate_req_filter_len(float noundef %54, float noundef %48) #6
  %56 = add i32 %55, -1
  %57 = uitofp i32 %56 to float
  %58 = fmul float %57, 2.500000e-01
  %59 = tail call float @llvm.ceil.f32(float %58)
  %60 = fptoui float %59 to i32
  store float %51, ptr %40, align 4, !tbaa !25
  store float %52, ptr %42, align 4, !tbaa !25
  store float %48, ptr %44, align 4, !tbaa !25
  %61 = tail call i32 @llvm.umax.i32(i32 %60, i32 3)
  store i32 %61, ptr %46, align 4, !tbaa !26
  %62 = zext nneg i32 %1 to i64
  %.not98 = icmp eq i32 %1, 1
  br i1 %.not98, label %._crit_edge.thread100, label %.lr.ph.peel.next

.lr.ph.peel.next:                                 ; preds = %.lr.ph.preheader
  %63 = fpext float %51 to double
  %64 = fsub double 5.000000e-01, %63
  %65 = fmul double %64, 5.000000e-01
  %66 = fptrunc double %65 to float
  %67 = fmul float %52, 5.000000e-01
  %68 = fsub float 2.500000e-01, %66
  %69 = fmul float %68, 2.000000e+00
  %70 = tail call i32 @estimate_req_filter_len(float noundef %69, float noundef %48) #6
  %71 = add i32 %70, -1
  %72 = uitofp i32 %71 to float
  %73 = fmul float %72, 2.500000e-01
  %74 = tail call float @llvm.ceil.f32(float %73)
  %75 = fptoui float %74 to i32
  %76 = getelementptr inbounds i8, ptr %40, i64 4
  store float %66, ptr %76, align 4, !tbaa !25
  %77 = getelementptr inbounds i8, ptr %42, i64 4
  store float %67, ptr %77, align 4, !tbaa !25
  %78 = getelementptr inbounds i8, ptr %44, i64 4
  store float %48, ptr %78, align 4, !tbaa !25
  %79 = tail call i32 @llvm.umax.i32(i32 %75, i32 3)
  %80 = getelementptr inbounds i8, ptr %46, i64 4
  store i32 %79, ptr %80, align 4, !tbaa !26
  %81 = icmp ugt i32 %1, 2
  br i1 %81, label %.lr.ph.peel.next91, label %._crit_edge.thread100

.lr.ph.peel.next91:                               ; preds = %.lr.ph.peel.next, %.lr.ph.peel.next91
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.peel.next91 ], [ 2, %.lr.ph.peel.next ]
  %.07682 = phi float [ %82, %.lr.ph.peel.next91 ], [ %66, %.lr.ph.peel.next ]
  %.07781 = phi float [ %83, %.lr.ph.peel.next91 ], [ %67, %.lr.ph.peel.next ]
  %82 = fmul float %.07682, 5.000000e-01
  %83 = fmul float %.07781, 5.000000e-01
  %84 = fsub float 2.500000e-01, %82
  %85 = fmul float %84, 2.000000e+00
  %86 = tail call i32 @estimate_req_filter_len(float noundef %85, float noundef %48) #6
  %87 = add i32 %86, -1
  %88 = uitofp i32 %87 to float
  %89 = fmul float %88, 2.500000e-01
  %90 = tail call float @llvm.ceil.f32(float %89)
  %91 = fptoui float %90 to i32
  %92 = getelementptr inbounds float, ptr %40, i64 %indvars.iv
  store float %82, ptr %92, align 4, !tbaa !25
  %93 = getelementptr inbounds float, ptr %42, i64 %indvars.iv
  store float %83, ptr %93, align 4, !tbaa !25
  %94 = getelementptr inbounds float, ptr %44, i64 %indvars.iv
  store float %48, ptr %94, align 4, !tbaa !25
  %95 = tail call i32 @llvm.umax.i32(i32 %91, i32 3)
  %96 = getelementptr inbounds i32, ptr %46, i64 %indvars.iv
  store i32 %95, ptr %96, align 4, !tbaa !26
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %97 = icmp ult i64 %indvars.iv.next, %62
  br i1 %97, label %.lr.ph.peel.next91, label %._crit_edge, !llvm.loop !27

._crit_edge.thread100:                            ; preds = %.lr.ph.preheader, %.lr.ph.peel.next
  %98 = shl nuw nsw i32 %1, 3
  %99 = zext nneg i32 %98 to i64
  %100 = tail call noalias ptr @malloc(i64 noundef %99) #7
  %101 = getelementptr inbounds i8, ptr %20, i64 56
  store ptr %100, ptr %101, align 8, !tbaa !24
  br label %.lr.ph86.preheader

._crit_edge:                                      ; preds = %.lr.ph.peel.next91
  %102 = shl nuw nsw i32 %1, 3
  %103 = zext nneg i32 %102 to i64
  %104 = tail call noalias ptr @malloc(i64 noundef %103) #7
  %105 = getelementptr inbounds i8, ptr %20, i64 56
  store ptr %104, ptr %105, align 8, !tbaa !24
  br i1 %.not, label %._crit_edge87, label %.lr.ph86.preheader

.lr.ph86.preheader:                               ; preds = %._crit_edge.thread100, %._crit_edge
  %106 = phi ptr [ %100, %._crit_edge.thread100 ], [ %104, %._crit_edge ]
  %107 = zext nneg i32 %1 to i64
  br label %.lr.ph86

.lr.ph86:                                         ; preds = %.lr.ph86.preheader, %.lr.ph86
  %indvars.iv95 = phi i64 [ 0, %.lr.ph86.preheader ], [ %indvars.iv.next96, %.lr.ph86 ]
  %108 = getelementptr inbounds i32, ptr %46, i64 %indvars.iv95
  %109 = load i32, ptr %108, align 4, !tbaa !26
  %110 = getelementptr inbounds float, ptr %42, i64 %indvars.iv95
  %111 = load float, ptr %110, align 4, !tbaa !25
  %112 = getelementptr inbounds float, ptr %44, i64 %indvars.iv95
  %113 = load float, ptr %112, align 4, !tbaa !25
  %114 = tail call ptr @resamp2_cccf_create(i32 noundef %109, float noundef %111, float noundef %113)
  %115 = getelementptr inbounds ptr, ptr %106, i64 %indvars.iv95
  store ptr %114, ptr %115, align 8, !tbaa !30
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %116 = icmp ult i64 %indvars.iv.next96, %107
  br i1 %116, label %.lr.ph86, label %._crit_edge87, !llvm.loop !31

._crit_edge87:                                    ; preds = %.lr.ph86, %._crit_edge.thread, %._crit_edge
  %117 = tail call i32 @msresamp2_cccf_reset(ptr noundef nonnull %20)
  br label %118

118:                                              ; preds = %._crit_edge87, %16, %12, %7
  %.0 = phi ptr [ %8, %7 ], [ %13, %12 ], [ %17, %16 ], [ %20, %._crit_edge87 ]
  ret ptr %.0
}

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

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

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

attributes #0 = { 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 #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 = { 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 = { 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 = !{!"msresamp2_cccf_s", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !7, i64 20, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !7, i64 80, !10, i64 84}
!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 = !{!6, !7, i64 4}
!13 = !{!6, !10, i64 8}
!14 = !{!6, !10, i64 12}
!15 = !{!6, !10, i64 16}
!16 = !{!6, !7, i64 20}
!17 = !{!6, !10, i64 84}
!18 = !{!6, !11, i64 64}
!19 = !{!6, !11, i64 72}
!20 = !{!6, !11, i64 24}
!21 = !{!6, !11, i64 32}
!22 = !{!6, !11, i64 40}
!23 = !{!6, !11, i64 48}
!24 = !{!6, !11, i64 56}
!25 = !{!10, !10, i64 0}
!26 = !{!7, !7, i64 0}
!27 = distinct !{!27, !28, !29}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!"llvm.loop.peeled.count", i32 2}
!30 = !{!11, !11, i64 0}
!31 = distinct !{!31, !28}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass