; LLVM IR from jgaeddert/liquid-dsp :: src/framing/src (detector_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.detector_cccf_s = type { ptr, i32, float, float, ptr, ptr, i32, float, float, ptr, ptr, ptr, ptr, i32, i32, ptr, float, float, i32, i32 }

@.str = external hidden unnamed_addr constant [86 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [78 x i8], align 1

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

20:                                               ; preds = %4
  %21 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 116, ptr noundef @.str.1)
  store ptr %21, ptr %5, align 8
  br label %266

22:                                               ; preds = %4
  %23 = load float, ptr %8, align 4, !tbaa !11
  %24 = fcmp ole float %23, 0.000000e+00
  br i1 %24, label %25, label %27

25:                                               ; preds = %22
  %26 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 118, ptr noundef @.str.2)
  store ptr %26, ptr %5, align 8
  br label %266

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %28 = call noalias ptr @malloc(i64 noundef 120) #10
  store ptr %28, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.detector_cccf_s, ptr %30, i32 0, i32 1
  store i32 %29, ptr %31, align 8, !tbaa !13
  %32 = load float, ptr %8, align 4, !tbaa !11
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.detector_cccf_s, ptr %33, i32 0, i32 2
  store float %32, ptr %34, align 4, !tbaa !15
  %35 = load float, ptr %9, align 4, !tbaa !11
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.detector_cccf_s, ptr %36, i32 0, i32 8
  store float %35, ptr %37, align 8, !tbaa !16
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.detector_cccf_s, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 8, !tbaa !13
  %41 = uitofp i32 %40 to float
  %42 = fdiv float 1.000000e+00, %41
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.detector_cccf_s, ptr %43, i32 0, i32 3
  store float %42, ptr %44, align 8, !tbaa !17
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.detector_cccf_s, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 8, !tbaa !13
  %48 = uitofp i32 %47 to float
  %49 = fpext float %48 to double
  %50 = fdiv double 0x40041B2F7BA3BCBE, %49
  %51 = fptrunc double %50 to float
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.detector_cccf_s, ptr %52, i32 0, i32 7
  store float %51, ptr %53, align 4, !tbaa !18
  %54 = load float, ptr %9, align 4, !tbaa !11
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.detector_cccf_s, ptr %55, i32 0, i32 7
  %57 = load float, ptr %56, align 4, !tbaa !18
  %58 = fdiv float %54, %57
  %59 = call float @llvm.fabs.f32(float %58)
  %60 = call float @llvm.ceil.f32(float %59)
  %61 = fptosi float %60 to i32
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.detector_cccf_s, ptr %62, i32 0, i32 6
  store i32 %61, ptr %63, align 8, !tbaa !19
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.detector_cccf_s, ptr %64, i32 0, i32 6
  %66 = load i32, ptr %65, align 8, !tbaa !19
  %67 = icmp ult i32 %66, 2
  br i1 %67, label %68, label %71

68:                                               ; preds = %27
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.detector_cccf_s, ptr %69, i32 0, i32 6
  store i32 2, ptr %70, align 8, !tbaa !19
  br label %71

71:                                               ; preds = %68, %27
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.detector_cccf_s, ptr %72, i32 0, i32 6
  %74 = load i32, ptr %73, align 8, !tbaa !19
  %75 = uitofp i32 %74 to float
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.detector_cccf_s, ptr %76, i32 0, i32 7
  %78 = load float, ptr %77, align 4, !tbaa !18
  %79 = fmul float %75, %78
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.detector_cccf_s, ptr %80, i32 0, i32 8
  store float %79, ptr %81, align 8, !tbaa !16
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.detector_cccf_s, ptr %82, i32 0, i32 1
  %84 = load i32, ptr %83, align 8, !tbaa !13
  %85 = zext i32 %84 to i64
  %86 = mul i64 %85, 8
  %87 = call noalias ptr @malloc(i64 noundef %86) #10
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.detector_cccf_s, ptr %88, i32 0, i32 0
  store ptr %87, ptr %89, align 8, !tbaa !20
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.detector_cccf_s, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !20
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.detector_cccf_s, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 8, !tbaa !13
  %97 = zext i32 %96 to i64
  %98 = mul i64 %97, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 4 %92, ptr align 4 %93, i64 %98, i1 false)
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.detector_cccf_s, ptr %99, i32 0, i32 1
  %101 = load i32, ptr %100, align 8, !tbaa !13
  %102 = call ptr @windowcf_create(i32 noundef %101)
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.detector_cccf_s, ptr %103, i32 0, i32 4
  store ptr %102, ptr %104, align 8, !tbaa !21
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.detector_cccf_s, ptr %105, i32 0, i32 1
  %107 = load i32, ptr %106, align 8, !tbaa !13
  %108 = call ptr @wdelayf_create(i32 noundef %107)
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.detector_cccf_s, ptr %109, i32 0, i32 15
  store ptr %108, ptr %110, align 8, !tbaa !22
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.detector_cccf_s, ptr %111, i32 0, i32 6
  %113 = load i32, ptr %112, align 8, !tbaa !19
  %114 = zext i32 %113 to i64
  %115 = mul i64 %114, 8
  %116 = call noalias ptr @malloc(i64 noundef %115) #10
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.detector_cccf_s, ptr %117, i32 0, i32 5
  store ptr %116, ptr %118, align 8, !tbaa !23
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.detector_cccf_s, ptr %119, i32 0, i32 6
  %121 = load i32, ptr %120, align 8, !tbaa !19
  %122 = zext i32 %121 to i64
  %123 = mul i64 %122, 4
  %124 = call noalias ptr @malloc(i64 noundef %123) #10
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.detector_cccf_s, ptr %125, i32 0, i32 9
  store ptr %124, ptr %126, align 8, !tbaa !24
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.detector_cccf_s, ptr %127, i32 0, i32 6
  %129 = load i32, ptr %128, align 8, !tbaa !19
  %130 = zext i32 %129 to i64
  %131 = mul i64 %130, 4
  %132 = call noalias ptr @malloc(i64 noundef %131) #10
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.detector_cccf_s, ptr %133, i32 0, i32 11
  store ptr %132, ptr %134, align 8, !tbaa !25
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.detector_cccf_s, ptr %135, i32 0, i32 6
  %137 = load i32, ptr %136, align 8, !tbaa !19
  %138 = zext i32 %137 to i64
  %139 = mul i64 %138, 4
  %140 = call noalias ptr @malloc(i64 noundef %139) #10
  %141 = load ptr, ptr %10, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.detector_cccf_s, ptr %141, i32 0, i32 12
  store ptr %140, ptr %142, align 8, !tbaa !26
  %143 = load ptr, ptr %10, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.detector_cccf_s, ptr %143, i32 0, i32 6
  %145 = load i32, ptr %144, align 8, !tbaa !19
  %146 = zext i32 %145 to i64
  %147 = mul i64 %146, 4
  %148 = call noalias ptr @malloc(i64 noundef %147) #10
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.detector_cccf_s, ptr %149, i32 0, i32 10
  store ptr %148, ptr %150, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.detector_cccf_s, ptr %151, i32 0, i32 1
  %153 = load i32, ptr %152, align 8, !tbaa !13
  %154 = zext i32 %153 to i64
  %155 = call ptr @llvm.stacksave.p0()
  store ptr %155, ptr %13, align 8
  %156 = alloca { float, float }, i64 %154, align 16
  store i64 %154, ptr %14, align 8
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %157

157:                                              ; preds = %259, %71
  %158 = load i32, ptr %12, align 4, !tbaa !9
  %159 = load ptr, ptr %10, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.detector_cccf_s, ptr %159, i32 0, i32 6
  %161 = load i32, ptr %160, align 8, !tbaa !19
  %162 = icmp ult i32 %158, %161
  br i1 %162, label %163, label %262

163:                                              ; preds = %157
  %164 = load i32, ptr %12, align 4, !tbaa !9
  %165 = uitofp i32 %164 to float
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.detector_cccf_s, ptr %166, i32 0, i32 6
  %168 = load i32, ptr %167, align 8, !tbaa !19
  %169 = sub i32 %168, 1
  %170 = uitofp i32 %169 to float
  %171 = fdiv float %170, 2.000000e+00
  %172 = fsub float %165, %171
  %173 = load ptr, ptr %10, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.detector_cccf_s, ptr %173, i32 0, i32 7
  %175 = load float, ptr %174, align 4, !tbaa !18
  %176 = fmul float %172, %175
  %177 = load ptr, ptr %10, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.detector_cccf_s, ptr %177, i32 0, i32 9
  %179 = load ptr, ptr %178, align 8, !tbaa !24
  %180 = load i32, ptr %12, align 4, !tbaa !9
  %181 = zext i32 %180 to i64
  %182 = getelementptr inbounds float, ptr %179, i64 %181
  store float %176, ptr %182, align 4, !tbaa !11
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %245, %163
  %184 = load i32, ptr %11, align 4, !tbaa !9
  %185 = load ptr, ptr %10, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.detector_cccf_s, ptr %185, i32 0, i32 1
  %187 = load i32, ptr %186, align 8, !tbaa !13
  %188 = icmp ult i32 %184, %187
  br i1 %188, label %189, label %248

189:                                              ; preds = %183
  %190 = load ptr, ptr %10, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.detector_cccf_s, ptr %190, i32 0, i32 0
  %192 = load ptr, ptr %191, align 8, !tbaa !20
  %193 = load i32, ptr %11, align 4, !tbaa !9
  %194 = zext i32 %193 to i64
  %195 = getelementptr inbounds { float, float }, ptr %192, i64 %194
  %196 = getelementptr inbounds { float, float }, ptr %195, i32 0, i32 0
  %197 = load float, ptr %196, align 4
  %198 = getelementptr inbounds { float, float }, ptr %195, i32 0, i32 1
  %199 = load float, ptr %198, align 4
  %200 = fneg float %199
  %201 = load ptr, ptr %10, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.detector_cccf_s, ptr %201, i32 0, i32 9
  %203 = load ptr, ptr %202, align 8, !tbaa !24
  %204 = load i32, ptr %12, align 4, !tbaa !9
  %205 = zext i32 %204 to i64
  %206 = getelementptr inbounds float, ptr %203, i64 %205
  %207 = load float, ptr %206, align 4, !tbaa !11
  %208 = fmul float -0.000000e+00, %207
  %209 = fmul float -1.000000e+00, %207
  %210 = load i32, ptr %11, align 4, !tbaa !9
  %211 = uitofp i32 %210 to float
  %212 = fmul float %208, %211
  %213 = fmul float %209, %211
  %214 = getelementptr inbounds { float, float }, ptr %15, i32 0, i32 0
  %215 = getelementptr inbounds { float, float }, ptr %15, i32 0, i32 1
  store float %212, ptr %214, align 4
  store float %213, ptr %215, align 4
  %216 = load <2 x float>, ptr %15, align 4
  %217 = call <2 x float> @cexpf(<2 x float> noundef %216) #9
  store <2 x float> %217, ptr %16, align 4
  %218 = getelementptr inbounds { float, float }, ptr %16, i32 0, i32 0
  %219 = load float, ptr %218, align 4
  %220 = getelementptr inbounds { float, float }, ptr %16, i32 0, i32 1
  %221 = load float, ptr %220, align 4
  %222 = fmul float %197, %219
  %223 = fmul float %200, %221
  %224 = fmul float %197, %221
  %225 = fmul float %200, %219
  %226 = fsub float %222, %223
  %227 = fadd float %224, %225
  %228 = fcmp uno float %226, %226
  br i1 %228, label %229, label %237, !prof !28

229:                                              ; preds = %189
  %230 = fcmp uno float %227, %227
  br i1 %230, label %231, label %237, !prof !28

231:                                              ; preds = %229
  %232 = call <2 x float> @__mulsc3(float noundef %197, float noundef %200, float noundef %219, float noundef %221) #9
  store <2 x float> %232, ptr %17, align 4
  %233 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 0
  %234 = load float, ptr %233, align 4
  %235 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 1
  %236 = load float, ptr %235, align 4
  br label %237

237:                                              ; preds = %231, %229, %189
  %238 = phi float [ %226, %189 ], [ %226, %229 ], [ %234, %231 ]
  %239 = phi float [ %227, %189 ], [ %227, %229 ], [ %236, %231 ]
  %240 = load i32, ptr %11, align 4, !tbaa !9
  %241 = zext i32 %240 to i64
  %242 = getelementptr inbounds { float, float }, ptr %156, i64 %241
  %243 = getelementptr inbounds { float, float }, ptr %242, i32 0, i32 0
  %244 = getelementptr inbounds { float, float }, ptr %242, i32 0, i32 1
  store float %238, ptr %243, align 8
  store float %239, ptr %244, align 4
  br label %245

245:                                              ; preds = %237
  %246 = load i32, ptr %11, align 4, !tbaa !9
  %247 = add i32 %246, 1
  store i32 %247, ptr %11, align 4, !tbaa !9
  br label %183, !llvm.loop !29

248:                                              ; preds = %183
  %249 = load ptr, ptr %10, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.detector_cccf_s, ptr %249, i32 0, i32 1
  %251 = load i32, ptr %250, align 8, !tbaa !13
  %252 = call ptr @dotprod_cccf_create(ptr noundef %156, i32 noundef %251)
  %253 = load ptr, ptr %10, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.detector_cccf_s, ptr %253, i32 0, i32 5
  %255 = load ptr, ptr %254, align 8, !tbaa !23
  %256 = load i32, ptr %12, align 4, !tbaa !9
  %257 = zext i32 %256 to i64
  %258 = getelementptr inbounds ptr, ptr %255, i64 %257
  store ptr %252, ptr %258, align 8, !tbaa !5
  br label %259

259:                                              ; preds = %248
  %260 = load i32, ptr %12, align 4, !tbaa !9
  %261 = add i32 %260, 1
  store i32 %261, ptr %12, align 4, !tbaa !9
  br label %157, !llvm.loop !31

262:                                              ; preds = %157
  %263 = load ptr, ptr %10, align 8, !tbaa !5
  call void @detector_cccf_reset(ptr noundef %263)
  %264 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %264, ptr %5, align 8
  %265 = load ptr, ptr %13, align 8
  call void @llvm.stackrestore.p0(ptr %265)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  br label %266

266:                                              ; preds = %262, %25, %20
  %267 = load ptr, ptr %5, align 8
  ret ptr %267
}

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #5

declare ptr @windowcf_create(i32 noundef) #1

declare ptr @wdelayf_create(i32 noundef) #1

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @detector_cccf_reset(ptr noundef) #8

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nocallback nofree nosync nounwind willreturn }
attributes #7 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"detector_cccf_s", !6, i64 0, !10, i64 8, !12, i64 12, !12, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !12, i64 44, !12, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !6, i64 96, !12, i64 104, !12, i64 108, !10, i64 112, !10, i64 116}
!15 = !{!14, !12, i64 12}
!16 = !{!14, !12, i64 48}
!17 = !{!14, !12, i64 16}
!18 = !{!14, !12, i64 44}
!19 = !{!14, !10, i64 40}
!20 = !{!14, !6, i64 0}
!21 = !{!14, !6, i64 24}
!22 = !{!14, !6, i64 96}
!23 = !{!14, !6, i64 32}
!24 = !{!14, !6, i64 56}
!25 = !{!14, !6, i64 72}
!26 = !{!14, !6, i64 80}
!27 = !{!14, !6, i64 64}
!28 = !{!"branch_weights", i32 1, i32 1048575}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}


; 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 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [78 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @detector_cccf_create(ptr nocapture noundef readonly %0, i32 noundef %1, float noundef %2, float noundef %3) local_unnamed_addr #0 {
  %5 = icmp eq i32 %1, 0
  br i1 %5, label %6, label %8

6:                                                ; preds = %4
  %7 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str, i32 noundef 116, ptr noundef nonnull @.str.1) #9
  br label %102

8:                                                ; preds = %4
  %9 = fcmp ugt float %2, 0.000000e+00
  br i1 %9, label %.lr.ph75.preheader, label %10

10:                                               ; preds = %8
  %11 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str, i32 noundef 118, ptr noundef nonnull @.str.2) #9
  br label %102

.lr.ph75.preheader:                               ; preds = %8
  %12 = tail call noalias dereferenceable_or_null(120) ptr @malloc(i64 noundef 120) #10
  %13 = getelementptr inbounds i8, ptr %12, i64 8
  store i32 %1, ptr %13, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %12, i64 12
  store float %2, ptr %14, align 4, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %12, i64 48
  %16 = uitofp i32 %1 to float
  %17 = fdiv float 1.000000e+00, %16
  %18 = getelementptr inbounds i8, ptr %12, i64 16
  store float %17, ptr %18, align 8, !tbaa !13
  %19 = fpext float %16 to double
  %20 = fdiv double 0x40041B2F7BA3BCBE, %19
  %21 = fptrunc double %20 to float
  %22 = getelementptr inbounds i8, ptr %12, i64 44
  store float %21, ptr %22, align 4, !tbaa !14
  %23 = fdiv float %3, %21
  %24 = tail call float @llvm.fabs.f32(float %23)
  %25 = tail call float @llvm.ceil.f32(float %24)
  %26 = fptosi float %25 to i32
  %27 = getelementptr inbounds i8, ptr %12, i64 40
  %spec.select = tail call i32 @llvm.umax.i32(i32 %26, i32 2)
  store i32 %spec.select, ptr %27, align 8, !tbaa !15
  %28 = uitofp i32 %spec.select to float
  %29 = fmul float %21, %28
  store float %29, ptr %15, align 8, !tbaa !16
  %30 = zext i32 %1 to i64
  %31 = shl nuw nsw i64 %30, 3
  %32 = tail call noalias ptr @malloc(i64 noundef %31) #10
  store ptr %32, ptr %12, align 8, !tbaa !17
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %0, i64 %31, i1 false)
  %33 = tail call ptr @windowcf_create(i32 noundef %1) #9
  %34 = getelementptr inbounds i8, ptr %12, i64 24
  store ptr %33, ptr %34, align 8, !tbaa !18
  %35 = tail call ptr @wdelayf_create(i32 noundef %1) #9
  %36 = getelementptr inbounds i8, ptr %12, i64 96
  store ptr %35, ptr %36, align 8, !tbaa !19
  %37 = zext i32 %spec.select to i64
  %38 = shl nuw nsw i64 %37, 3
  %39 = tail call noalias ptr @malloc(i64 noundef %38) #10
  %40 = getelementptr inbounds i8, ptr %12, i64 32
  store ptr %39, ptr %40, align 8, !tbaa !20
  %41 = shl nuw nsw i64 %37, 2
  %42 = tail call noalias ptr @malloc(i64 noundef %41) #10
  %43 = getelementptr inbounds i8, ptr %12, i64 56
  store ptr %42, ptr %43, align 8, !tbaa !21
  %44 = tail call noalias ptr @malloc(i64 noundef %41) #10
  %45 = getelementptr inbounds i8, ptr %12, i64 72
  store ptr %44, ptr %45, align 8, !tbaa !22
  %46 = tail call noalias ptr @malloc(i64 noundef %41) #10
  %47 = getelementptr inbounds i8, ptr %12, i64 80
  store ptr %46, ptr %47, align 8, !tbaa !23
  %48 = tail call noalias ptr @malloc(i64 noundef %41) #10
  %49 = getelementptr inbounds i8, ptr %12, i64 64
  store ptr %48, ptr %49, align 8, !tbaa !24
  %50 = tail call ptr @llvm.stacksave.p0()
  %51 = alloca { float, float }, i64 %30, align 16
  %52 = add i32 %spec.select, -1
  %53 = uitofp i32 %52 to float
  %54 = fmul float %53, 5.000000e-01
  br label %.lr.ph75

.lr.ph75:                                         ; preds = %.lr.ph75.preheader, %._crit_edge
  %55 = phi i32 [ 1, %.lr.ph75.preheader ], [ %98, %._crit_edge ]
  %indvars.iv80 = phi i64 [ 0, %.lr.ph75.preheader ], [ %indvars.iv.next81, %._crit_edge ]
  %56 = trunc nuw i64 %indvars.iv80 to i32
  %57 = uitofp i32 %56 to float
  %58 = fsub float %57, %54
  %59 = fmul float %58, %21
  %60 = getelementptr inbounds float, ptr %42, i64 %indvars.iv80
  store float %59, ptr %60, align 4, !tbaa !25
  %.not77 = icmp eq i32 %55, 0
  br i1 %.not77, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph75
  %61 = getelementptr inbounds float, ptr %42, i64 %indvars.iv80
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %92
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %92 ]
  %62 = getelementptr inbounds { float, float }, ptr %32, i64 %indvars.iv
  %63 = load float, ptr %61, align 4, !tbaa !25
  %64 = fmul float %63, -0.000000e+00
  %65 = fneg float %63
  %66 = trunc nuw i64 %indvars.iv to i32
  %67 = uitofp i32 %66 to float
  %68 = insertelement <2 x float> poison, float %64, i64 0
  %69 = insertelement <2 x float> %68, float %65, i64 1
  %70 = insertelement <2 x float> poison, float %67, i64 0
  %71 = shufflevector <2 x float> %70, <2 x float> poison, <2 x i32> zeroinitializer
  %72 = fmul <2 x float> %69, %71
  %73 = load <2 x float>, ptr %62, align 4
  %74 = extractelement <2 x float> %73, i64 1
  %75 = fneg float %74
  %76 = call <2 x float> @cexpf(<2 x float> noundef %72) #9
  %77 = shufflevector <2 x float> %76, <2 x float> poison, <2 x i32> <i32 1, i32 0>
  %78 = fmul <2 x float> %73, %76
  %shift = shufflevector <2 x float> %78, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %79 = fadd <2 x float> %78, %shift
  %80 = extractelement <2 x float> %79, i64 0
  %81 = fmul <2 x float> %73, %77
  %shift83 = shufflevector <2 x float> %81, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %82 = fsub <2 x float> %81, %shift83
  %83 = extractelement <2 x float> %82, i64 0
  %84 = fcmp uno float %80, 0.000000e+00
  br i1 %84, label %85, label %92, !prof !26

85:                                               ; preds = %.lr.ph
  %86 = fcmp uno float %83, 0.000000e+00
  br i1 %86, label %87, label %92, !prof !26

87:                                               ; preds = %85
  %88 = extractelement <2 x float> %73, i64 0
  %89 = extractelement <2 x float> %76, i64 0
  %90 = extractelement <2 x float> %76, i64 1
  %91 = call <2 x float> @__mulsc3(float noundef %88, float noundef %75, float noundef %89, float noundef %90) #9
  %.sroa.0.0.vec.extract = extractelement <2 x float> %91, i64 0
  %.sroa.0.4.vec.extract = extractelement <2 x float> %91, i64 1
  br label %92

92:                                               ; preds = %87, %85, %.lr.ph
  %93 = phi float [ %80, %.lr.ph ], [ %80, %85 ], [ %.sroa.0.0.vec.extract, %87 ]
  %94 = phi float [ %83, %.lr.ph ], [ %83, %85 ], [ %.sroa.0.4.vec.extract, %87 ]
  %95 = getelementptr inbounds { float, float }, ptr %51, i64 %indvars.iv
  %96 = getelementptr inbounds i8, ptr %95, i64 4
  store float %93, ptr %95, align 8
  store float %94, ptr %96, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %97 = icmp ult i64 %indvars.iv.next, %30
  br i1 %97, label %.lr.ph, label %._crit_edge, !llvm.loop !27

._crit_edge:                                      ; preds = %92, %.lr.ph75
  %98 = phi i32 [ 0, %.lr.ph75 ], [ %1, %92 ]
  %99 = call ptr @dotprod_cccf_create(ptr noundef nonnull %51, i32 noundef %98) #9
  %100 = getelementptr inbounds ptr, ptr %39, i64 %indvars.iv80
  store ptr %99, ptr %100, align 8, !tbaa !29
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %101 = icmp ult i64 %indvars.iv.next81, %37
  br i1 %101, label %.lr.ph75, label %._crit_edge76, !llvm.loop !30

._crit_edge76:                                    ; preds = %._crit_edge
  call void @detector_cccf_reset(ptr noundef nonnull %12)
  call void @llvm.stackrestore.p0(ptr %50)
  br label %102

102:                                              ; preds = %._crit_edge76, %10, %6
  %.0 = phi ptr [ %7, %6 ], [ %11, %10 ], [ %12, %._crit_edge76 ]
  ret ptr %.0
}

declare ptr @liquid_error_config_fl(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #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 #2

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

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

declare ptr @windowcf_create(i32 noundef) local_unnamed_addr #1

declare ptr @wdelayf_create(i32 noundef) local_unnamed_addr #1

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @detector_cccf_reset(ptr noundef) local_unnamed_addr #6

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8

attributes #0 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { nounwind }
attributes #10 = { 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, !10, i64 8}
!6 = !{!"detector_cccf_s", !7, i64 0, !10, i64 8, !11, i64 12, !11, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !11, i64 44, !11, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !10, i64 88, !10, i64 92, !7, i64 96, !11, i64 104, !11, i64 108, !10, i64 112, !10, i64 116}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !11, i64 12}
!13 = !{!6, !11, i64 16}
!14 = !{!6, !11, i64 44}
!15 = !{!6, !10, i64 40}
!16 = !{!6, !11, i64 48}
!17 = !{!6, !7, i64 0}
!18 = !{!6, !7, i64 24}
!19 = !{!6, !7, i64 96}
!20 = !{!6, !7, i64 32}
!21 = !{!6, !7, i64 56}
!22 = !{!6, !7, i64 72}
!23 = !{!6, !7, i64 80}
!24 = !{!6, !7, i64 64}
!25 = !{!11, !11, i64 0}
!26 = !{!"branch_weights", i32 1, i32 1048575}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!7, !7, i64 0}
!30 = distinct !{!30, !28}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass