; LLVM IR from jgaeddert/liquid-dsp :: src/modem/src (fskdem)

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

@.str = external hidden unnamed_addr constant [77 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [72 x i8], align 1

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

23:                                               ; preds = %3
  %24 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 64, ptr noundef @.str.1)
  store ptr %24, ptr %4, align 8
  br label %252

25:                                               ; preds = %3
  %26 = load i32, ptr %6, align 4, !tbaa !5
  %27 = icmp ult i32 %26, 2
  br i1 %27, label %31, label %28

28:                                               ; preds = %25
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = icmp ugt i32 %29, 2048
  br i1 %30, label %31, label %33

31:                                               ; preds = %28, %25
  %32 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 66, ptr noundef @.str.2)
  store ptr %32, ptr %4, align 8
  br label %252

33:                                               ; preds = %28
  %34 = load float, ptr %7, align 4, !tbaa !9
  %35 = fcmp ole float %34, 0.000000e+00
  br i1 %35, label %39, label %36

36:                                               ; preds = %33
  %37 = load float, ptr %7, align 4, !tbaa !9
  %38 = fcmp oge float %37, 5.000000e-01
  br i1 %38, label %39, label %41

39:                                               ; preds = %36, %33
  %40 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 68, ptr noundef @.str.3)
  store ptr %40, ptr %4, align 8
  br label %252

41:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %42 = call noalias ptr @malloc(i64 noundef 64) #6
  store ptr %42, ptr %8, align 8, !tbaa !11
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = load ptr, ptr %8, align 8, !tbaa !11
  %45 = getelementptr inbounds %struct.fskdem_s, ptr %44, i32 0, i32 0
  store i32 %43, ptr %45, align 8, !tbaa !13
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = load ptr, ptr %8, align 8, !tbaa !11
  %48 = getelementptr inbounds %struct.fskdem_s, ptr %47, i32 0, i32 1
  store i32 %46, ptr %48, align 4, !tbaa !15
  %49 = load float, ptr %7, align 4, !tbaa !9
  %50 = load ptr, ptr %8, align 8, !tbaa !11
  %51 = getelementptr inbounds %struct.fskdem_s, ptr %50, i32 0, i32 2
  store float %49, ptr %51, align 8, !tbaa !16
  %52 = load ptr, ptr %8, align 8, !tbaa !11
  %53 = getelementptr inbounds %struct.fskdem_s, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !13
  %55 = shl i32 1, %54
  %56 = load ptr, ptr %8, align 8, !tbaa !11
  %57 = getelementptr inbounds %struct.fskdem_s, ptr %56, i32 0, i32 3
  store i32 %55, ptr %57, align 4, !tbaa !17
  %58 = load ptr, ptr %8, align 8, !tbaa !11
  %59 = getelementptr inbounds %struct.fskdem_s, ptr %58, i32 0, i32 3
  %60 = load i32, ptr %59, align 4, !tbaa !17
  %61 = sub i32 %60, 1
  %62 = uitofp i32 %61 to float
  %63 = fmul float 5.000000e-01, %62
  %64 = load ptr, ptr %8, align 8, !tbaa !11
  %65 = getelementptr inbounds %struct.fskdem_s, ptr %64, i32 0, i32 4
  store float %63, ptr %65, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %66 = load ptr, ptr %8, align 8, !tbaa !11
  %67 = getelementptr inbounds %struct.fskdem_s, ptr %66, i32 0, i32 2
  %68 = load float, ptr %67, align 8, !tbaa !16
  %69 = load ptr, ptr %8, align 8, !tbaa !11
  %70 = getelementptr inbounds %struct.fskdem_s, ptr %69, i32 0, i32 4
  %71 = load float, ptr %70, align 8, !tbaa !18
  %72 = fdiv float %68, %71
  store float %72, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store float 1.000000e+09, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %73 = load ptr, ptr %8, align 8, !tbaa !11
  %74 = getelementptr inbounds %struct.fskdem_s, ptr %73, i32 0, i32 1
  %75 = load i32, ptr %74, align 4, !tbaa !15
  store i32 %75, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %76 = load ptr, ptr %8, align 8, !tbaa !11
  %77 = getelementptr inbounds %struct.fskdem_s, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !15
  %79 = mul i32 %78, 4
  %80 = icmp ult i32 %79, 16
  br i1 %80, label %81, label %82

81:                                               ; preds = %41
  br label %87

82:                                               ; preds = %41
  %83 = load ptr, ptr %8, align 8, !tbaa !11
  %84 = getelementptr inbounds %struct.fskdem_s, ptr %83, i32 0, i32 1
  %85 = load i32, ptr %84, align 4, !tbaa !15
  %86 = mul i32 %85, 4
  br label %87

87:                                               ; preds = %82, %81
  %88 = phi i32 [ 16, %81 ], [ %86, %82 ]
  store i32 %88, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %89 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %89, ptr %13, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %125, %87
  %91 = load i32, ptr %13, align 4, !tbaa !5
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = icmp ule i32 %91, %92
  br i1 %93, label %94, label %128

94:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %95 = load float, ptr %9, align 4, !tbaa !9
  %96 = fmul float 5.000000e-01, %95
  %97 = load i32, ptr %13, align 4, !tbaa !5
  %98 = uitofp i32 %97 to float
  %99 = fmul float %96, %98
  store float %99, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %100 = load float, ptr %14, align 4, !tbaa !9
  %101 = call float @llvm.round.f32(float %100)
  %102 = load float, ptr %14, align 4, !tbaa !9
  %103 = fsub float %101, %102
  %104 = call float @llvm.fabs.f32(float %103)
  store float %104, ptr %15, align 4, !tbaa !9
  %105 = load i32, ptr %13, align 4, !tbaa !5
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = icmp eq i32 %105, %106
  br i1 %107, label %112, label %108

108:                                              ; preds = %94
  %109 = load float, ptr %15, align 4, !tbaa !9
  %110 = load float, ptr %10, align 4, !tbaa !9
  %111 = fcmp olt float %109, %110
  br i1 %111, label %112, label %117

112:                                              ; preds = %108, %94
  %113 = load i32, ptr %13, align 4, !tbaa !5
  %114 = load ptr, ptr %8, align 8, !tbaa !11
  %115 = getelementptr inbounds %struct.fskdem_s, ptr %114, i32 0, i32 5
  store i32 %113, ptr %115, align 4, !tbaa !19
  %116 = load float, ptr %15, align 4, !tbaa !9
  store float %116, ptr %10, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %112, %108
  %118 = load float, ptr %15, align 4, !tbaa !9
  %119 = fcmp olt float %118, 0x3EB0C6F7A0000000
  br i1 %119, label %120, label %121

120:                                              ; preds = %117
  store i32 2, ptr %16, align 4
  br label %122

121:                                              ; preds = %117
  store i32 0, ptr %16, align 4
  br label %122

122:                                              ; preds = %121, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  %123 = load i32, ptr %16, align 4
  switch i32 %123, label %254 [
    i32 0, label %124
    i32 2, label %128
  ]

124:                                              ; preds = %122
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %13, align 4, !tbaa !5
  %127 = add i32 %126, 1
  store i32 %127, ptr %13, align 4, !tbaa !5
  br label %90, !llvm.loop !20

128:                                              ; preds = %122, %90
  %129 = load ptr, ptr %8, align 8, !tbaa !11
  %130 = getelementptr inbounds %struct.fskdem_s, ptr %129, i32 0, i32 3
  %131 = load i32, ptr %130, align 4, !tbaa !17
  %132 = zext i32 %131 to i64
  %133 = mul i64 %132, 4
  %134 = call noalias ptr @malloc(i64 noundef %133) #6
  %135 = load ptr, ptr %8, align 8, !tbaa !11
  %136 = getelementptr inbounds %struct.fskdem_s, ptr %135, i32 0, i32 9
  store ptr %134, ptr %136, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %187, %128
  %138 = load i32, ptr %17, align 4, !tbaa !5
  %139 = load ptr, ptr %8, align 8, !tbaa !11
  %140 = getelementptr inbounds %struct.fskdem_s, ptr %139, i32 0, i32 3
  %141 = load i32, ptr %140, align 4, !tbaa !17
  %142 = icmp ult i32 %138, %141
  br i1 %142, label %143, label %190

143:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %144 = load i32, ptr %17, align 4, !tbaa !5
  %145 = uitofp i32 %144 to float
  %146 = load ptr, ptr %8, align 8, !tbaa !11
  %147 = getelementptr inbounds %struct.fskdem_s, ptr %146, i32 0, i32 4
  %148 = load float, ptr %147, align 8, !tbaa !18
  %149 = fsub float %145, %148
  %150 = load ptr, ptr %8, align 8, !tbaa !11
  %151 = getelementptr inbounds %struct.fskdem_s, ptr %150, i32 0, i32 2
  %152 = load float, ptr %151, align 8, !tbaa !16
  %153 = fmul float %149, %152
  %154 = load ptr, ptr %8, align 8, !tbaa !11
  %155 = getelementptr inbounds %struct.fskdem_s, ptr %154, i32 0, i32 4
  %156 = load float, ptr %155, align 8, !tbaa !18
  %157 = fdiv float %153, %156
  store float %157, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %158 = load float, ptr %18, align 4, !tbaa !9
  %159 = load ptr, ptr %8, align 8, !tbaa !11
  %160 = getelementptr inbounds %struct.fskdem_s, ptr %159, i32 0, i32 5
  %161 = load i32, ptr %160, align 4, !tbaa !19
  %162 = uitofp i32 %161 to float
  %163 = fmul float %158, %162
  store float %163, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %164 = load float, ptr %19, align 4, !tbaa !9
  %165 = fcmp olt float %164, 0.000000e+00
  br i1 %165, label %166, label %174

166:                                              ; preds = %143
  %167 = load float, ptr %19, align 4, !tbaa !9
  %168 = load ptr, ptr %8, align 8, !tbaa !11
  %169 = getelementptr inbounds %struct.fskdem_s, ptr %168, i32 0, i32 5
  %170 = load i32, ptr %169, align 4, !tbaa !19
  %171 = uitofp i32 %170 to float
  %172 = fadd float %167, %171
  %173 = call float @llvm.round.f32(float %172)
  br label %177

174:                                              ; preds = %143
  %175 = load float, ptr %19, align 4, !tbaa !9
  %176 = call float @llvm.round.f32(float %175)
  br label %177

177:                                              ; preds = %174, %166
  %178 = phi float [ %173, %166 ], [ %176, %174 ]
  %179 = fptoui float %178 to i32
  store i32 %179, ptr %20, align 4, !tbaa !5
  %180 = load i32, ptr %20, align 4, !tbaa !5
  %181 = load ptr, ptr %8, align 8, !tbaa !11
  %182 = getelementptr inbounds %struct.fskdem_s, ptr %181, i32 0, i32 9
  %183 = load ptr, ptr %182, align 8, !tbaa !22
  %184 = load i32, ptr %17, align 4, !tbaa !5
  %185 = zext i32 %184 to i64
  %186 = getelementptr inbounds i32, ptr %183, i64 %185
  store i32 %180, ptr %186, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %187

187:                                              ; preds = %177
  %188 = load i32, ptr %17, align 4, !tbaa !5
  %189 = add i32 %188, 1
  store i32 %189, ptr %17, align 4, !tbaa !5
  br label %137, !llvm.loop !23

190:                                              ; preds = %137
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %191

191:                                              ; preds = %217, %190
  %192 = load i32, ptr %17, align 4, !tbaa !5
  %193 = load ptr, ptr %8, align 8, !tbaa !11
  %194 = getelementptr inbounds %struct.fskdem_s, ptr %193, i32 0, i32 3
  %195 = load i32, ptr %194, align 4, !tbaa !17
  %196 = icmp ult i32 %192, %195
  br i1 %196, label %197, label %220

197:                                              ; preds = %191
  %198 = load ptr, ptr %8, align 8, !tbaa !11
  %199 = getelementptr inbounds %struct.fskdem_s, ptr %198, i32 0, i32 9
  %200 = load ptr, ptr %199, align 8, !tbaa !22
  %201 = load i32, ptr %17, align 4, !tbaa !5
  %202 = zext i32 %201 to i64
  %203 = getelementptr inbounds i32, ptr %200, i64 %202
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = load ptr, ptr %8, align 8, !tbaa !11
  %206 = getelementptr inbounds %struct.fskdem_s, ptr %205, i32 0, i32 9
  %207 = load ptr, ptr %206, align 8, !tbaa !22
  %208 = load i32, ptr %17, align 4, !tbaa !5
  %209 = sub i32 %208, 1
  %210 = zext i32 %209 to i64
  %211 = getelementptr inbounds i32, ptr %207, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !5
  %213 = icmp eq i32 %204, %212
  br i1 %213, label %214, label %216

214:                                              ; preds = %197
  %215 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str, i32 noundef 128, ptr noundef @.str.4)
  br label %220

216:                                              ; preds = %197
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %17, align 4, !tbaa !5
  %219 = add i32 %218, 1
  store i32 %219, ptr %17, align 4, !tbaa !5
  br label %191, !llvm.loop !24

220:                                              ; preds = %214, %191
  %221 = load ptr, ptr %8, align 8, !tbaa !11
  %222 = getelementptr inbounds %struct.fskdem_s, ptr %221, i32 0, i32 5
  %223 = load i32, ptr %222, align 4, !tbaa !19
  %224 = zext i32 %223 to i64
  %225 = mul i64 %224, 8
  %226 = call noalias ptr @malloc(i64 noundef %225) #6
  %227 = load ptr, ptr %8, align 8, !tbaa !11
  %228 = getelementptr inbounds %struct.fskdem_s, ptr %227, i32 0, i32 6
  store ptr %226, ptr %228, align 8, !tbaa !25
  %229 = load ptr, ptr %8, align 8, !tbaa !11
  %230 = getelementptr inbounds %struct.fskdem_s, ptr %229, i32 0, i32 5
  %231 = load i32, ptr %230, align 4, !tbaa !19
  %232 = zext i32 %231 to i64
  %233 = mul i64 %232, 8
  %234 = call noalias ptr @malloc(i64 noundef %233) #6
  %235 = load ptr, ptr %8, align 8, !tbaa !11
  %236 = getelementptr inbounds %struct.fskdem_s, ptr %235, i32 0, i32 7
  store ptr %234, ptr %236, align 8, !tbaa !26
  %237 = load ptr, ptr %8, align 8, !tbaa !11
  %238 = getelementptr inbounds %struct.fskdem_s, ptr %237, i32 0, i32 5
  %239 = load i32, ptr %238, align 4, !tbaa !19
  %240 = load ptr, ptr %8, align 8, !tbaa !11
  %241 = getelementptr inbounds %struct.fskdem_s, ptr %240, i32 0, i32 6
  %242 = load ptr, ptr %241, align 8, !tbaa !25
  %243 = load ptr, ptr %8, align 8, !tbaa !11
  %244 = getelementptr inbounds %struct.fskdem_s, ptr %243, i32 0, i32 7
  %245 = load ptr, ptr %244, align 8, !tbaa !26
  %246 = call ptr @fft_create_plan(i32 noundef %239, ptr noundef %242, ptr noundef %245, i32 noundef 1, i32 noundef 0)
  %247 = load ptr, ptr %8, align 8, !tbaa !11
  %248 = getelementptr inbounds %struct.fskdem_s, ptr %247, i32 0, i32 8
  store ptr %246, ptr %248, align 8, !tbaa !27
  %249 = load ptr, ptr %8, align 8, !tbaa !11
  %250 = call i32 @fskdem_reset(ptr noundef %249)
  %251 = load ptr, ptr %8, align 8, !tbaa !11
  store ptr %251, ptr %4, align 8
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %252

252:                                              ; preds = %220, %39, %31, %23
  %253 = load ptr, ptr %4, align 8
  ret ptr %253

254:                                              ; preds = %122
  unreachable
}

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.round.f32(float) #4

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @fskdem_reset(ptr noundef) #0

attributes #0 = { 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 #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 = { nounwind }
attributes #6 = { 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 = !{!"fskdem_s", !6, i64 0, !6, i64 4, !10, i64 8, !6, i64 12, !10, i64 16, !6, i64 20, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !6, i64 56}
!15 = !{!14, !6, i64 4}
!16 = !{!14, !10, i64 8}
!17 = !{!14, !6, i64 12}
!18 = !{!14, !10, i64 16}
!19 = !{!14, !6, i64 20}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!14, !12, i64 48}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}
!25 = !{!14, !12, i64 24}
!26 = !{!14, !12, i64 32}
!27 = !{!14, !12, i64 40}


; 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 [77 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [72 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @fskdem_create(i32 noundef %0, i32 noundef %1, float noundef %2) local_unnamed_addr #0 {
  %4 = icmp eq i32 %0, 0
  br i1 %4, label %5, label %7

5:                                                ; preds = %3
  %6 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str, i32 noundef 64, ptr noundef nonnull @.str.1) #5
  br label %94

7:                                                ; preds = %3
  %8 = add i32 %1, -2049
  %or.cond = icmp ult i32 %8, -2047
  br i1 %or.cond, label %9, label %11

9:                                                ; preds = %7
  %10 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str, i32 noundef 66, ptr noundef nonnull @.str.2) #5
  br label %94

11:                                               ; preds = %7
  %12 = fcmp ole float %2, 0.000000e+00
  %13 = fcmp oge float %2, 5.000000e-01
  %or.cond3 = or i1 %12, %13
  br i1 %or.cond3, label %14, label %16

14:                                               ; preds = %11
  %15 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str, i32 noundef 68, ptr noundef nonnull @.str.3) #5
  br label %94

16:                                               ; preds = %11
  %17 = tail call noalias dereferenceable_or_null(64) ptr @malloc(i64 noundef 64) #6
  store i32 %0, ptr %17, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %17, i64 4
  store i32 %1, ptr %18, align 4, !tbaa !12
  %19 = getelementptr inbounds i8, ptr %17, i64 8
  store float %2, ptr %19, align 8, !tbaa !13
  %20 = shl nuw i32 1, %0
  %21 = getelementptr inbounds i8, ptr %17, i64 12
  store i32 %20, ptr %21, align 4, !tbaa !14
  %22 = add i32 %20, -1
  %23 = uitofp i32 %22 to float
  %24 = fmul float %23, 5.000000e-01
  %25 = getelementptr inbounds i8, ptr %17, i64 16
  store float %24, ptr %25, align 8, !tbaa !15
  %26 = shl nuw nsw i32 %1, 2
  %spec.select = tail call i32 @llvm.umax.i32(i32 %26, i32 16)
  %.not87 = icmp ult i32 %spec.select, %1
  br i1 %.not87, label %.lr.ph93, label %27

27:                                               ; preds = %16
  %28 = fdiv float %2, %24
  %29 = fmul float %28, 5.000000e-01
  %30 = getelementptr inbounds i8, ptr %17, i64 20
  %31 = uitofp nneg i32 %1 to float
  %32 = fmul float %29, %31
  %33 = tail call float @llvm.round.f32(float %32)
  %34 = fsub float %33, %32
  %35 = tail call float @llvm.fabs.f32(float %34)
  store i32 %1, ptr %30, align 4, !tbaa !16
  %36 = fcmp olt float %35, 0x3EB0C6F7A0000000
  %exitcond.peel = icmp eq i32 %spec.select, %1
  %or.cond106 = or i1 %36, %exitcond.peel
  br i1 %or.cond106, label %.lr.ph93, label %.peel.next

.peel.next:                                       ; preds = %27, %46
  %37 = phi i32 [ %47, %46 ], [ %1, %27 ]
  %.07589 = phi float [ %.1, %46 ], [ %35, %27 ]
  %.07688.in = phi i32 [ %.07688, %46 ], [ %1, %27 ]
  %.07688 = add nuw i32 %.07688.in, 1
  %38 = uitofp i32 %.07688 to float
  %39 = fmul float %29, %38
  %40 = tail call float @llvm.round.f32(float %39)
  %41 = fsub float %40, %39
  %42 = tail call float @llvm.fabs.f32(float %41)
  %43 = icmp eq i32 %.07688, %1
  %44 = fcmp olt float %42, %.07589
  %or.cond86 = select i1 %43, i1 true, i1 %44
  br i1 %or.cond86, label %45, label %46

45:                                               ; preds = %.peel.next
  store i32 %.07688, ptr %30, align 4, !tbaa !16
  br label %46

46:                                               ; preds = %.peel.next, %45
  %47 = phi i32 [ %.07688, %45 ], [ %37, %.peel.next ]
  %.1 = phi float [ %42, %45 ], [ %.07589, %.peel.next ]
  %48 = fcmp olt float %42, 0x3EB0C6F7A0000000
  %exitcond = icmp eq i32 %.07688, %spec.select
  %or.cond105 = or i1 %48, %exitcond
  br i1 %or.cond105, label %.lr.ph93, label %.peel.next, !llvm.loop !17

.lr.ph93:                                         ; preds = %46, %16, %27
  %49 = phi i32 [ undef, %16 ], [ %1, %27 ], [ %47, %46 ]
  %50 = zext i32 %20 to i64
  %51 = shl nuw nsw i64 %50, 2
  %52 = tail call noalias ptr @malloc(i64 noundef %51) #6
  %53 = getelementptr inbounds i8, ptr %17, i64 48
  store ptr %52, ptr %53, align 8, !tbaa !20
  %54 = uitofp i32 %49 to float
  %min.iters.check = icmp eq i32 %0, 1
  br i1 %min.iters.check, label %scalar.ph, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph93
  %n.vec = and i64 %50, 4294967292
  %broadcast.splatinsert = insertelement <4 x float> poison, float %24, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert107 = insertelement <4 x float> poison, float %2, i64 0
  %broadcast.splat108 = shufflevector <4 x float> %broadcast.splatinsert107, <4 x float> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert109 = insertelement <4 x float> poison, float %54, i64 0
  %broadcast.splat110 = shufflevector <4 x float> %broadcast.splatinsert109, <4 x float> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %55 = uitofp <4 x i32> %vec.ind to <4 x float>
  %56 = fsub <4 x float> %55, %broadcast.splat
  %57 = fmul <4 x float> %56, %broadcast.splat108
  %58 = fdiv <4 x float> %57, %broadcast.splat
  %59 = fmul <4 x float> %58, %broadcast.splat110
  %60 = fcmp olt <4 x float> %59, zeroinitializer
  %61 = fadd <4 x float> %59, %broadcast.splat110
  %62 = select <4 x i1> %60, <4 x float> %61, <4 x float> %59
  %63 = tail call <4 x float> @llvm.round.v4f32(<4 x float> %62)
  %64 = fptoui <4 x float> %63 to <4 x i32>
  %65 = getelementptr inbounds i32, ptr %52, i64 %index
  store <4 x i32> %64, ptr %65, align 4, !tbaa !21
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %66 = icmp eq i64 %index.next, %n.vec
  br i1 %66, label %.lr.ph95.preheader, label %vector.body, !llvm.loop !22

.lr.ph95.preheader:                               ; preds = %vector.body, %scalar.ph
  %.pre = load i32, ptr %52, align 4, !tbaa !21
  br label %.lr.ph95

scalar.ph:                                        ; preds = %.lr.ph93, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ 0, %.lr.ph93 ]
  %67 = trunc nuw i64 %indvars.iv to i32
  %68 = uitofp i32 %67 to float
  %69 = fsub float %68, %24
  %70 = fmul float %69, %2
  %71 = fdiv float %70, %24
  %72 = fmul float %71, %54
  %73 = fcmp olt float %72, 0.000000e+00
  %74 = fadd float %72, %54
  %.sink = select i1 %73, float %74, float %72
  %75 = tail call float @llvm.round.f32(float %.sink)
  %76 = fptoui float %75 to i32
  %77 = getelementptr inbounds i32, ptr %52, i64 %indvars.iv
  store i32 %76, ptr %77, align 4, !tbaa !21
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond99.not = icmp eq i64 %indvars.iv.next, %50
  br i1 %exitcond99.not, label %.lr.ph95.preheader, label %scalar.ph, !llvm.loop !25

78:                                               ; preds = %.lr.ph95
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %exitcond104.not = icmp eq i64 %indvars.iv.next101, %50
  br i1 %exitcond104.not, label %.loopexit, label %.lr.ph95, !llvm.loop !26

.lr.ph95:                                         ; preds = %.lr.ph95.preheader, %78
  %79 = phi i32 [ %.pre, %.lr.ph95.preheader ], [ %81, %78 ]
  %indvars.iv100 = phi i64 [ 1, %.lr.ph95.preheader ], [ %indvars.iv.next101, %78 ]
  %80 = getelementptr inbounds i32, ptr %52, i64 %indvars.iv100
  %81 = load i32, ptr %80, align 4, !tbaa !21
  %82 = icmp eq i32 %81, %79
  br i1 %82, label %83, label %78

83:                                               ; preds = %.lr.ph95
  %84 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str, i32 noundef 128, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

.loopexit:                                        ; preds = %78, %83
  %85 = zext i32 %49 to i64
  %86 = shl nuw nsw i64 %85, 3
  %87 = tail call noalias ptr @malloc(i64 noundef %86) #6
  %88 = getelementptr inbounds i8, ptr %17, i64 24
  store ptr %87, ptr %88, align 8, !tbaa !27
  %89 = tail call noalias ptr @malloc(i64 noundef %86) #6
  %90 = getelementptr inbounds i8, ptr %17, i64 32
  store ptr %89, ptr %90, align 8, !tbaa !28
  %91 = tail call ptr @fft_create_plan(i32 noundef %49, ptr noundef %87, ptr noundef %89, i32 noundef 1, i32 noundef 0) #5
  %92 = getelementptr inbounds i8, ptr %17, i64 40
  store ptr %91, ptr %92, align 8, !tbaa !29
  %93 = tail call i32 @fskdem_reset(ptr noundef nonnull %17)
  br label %94

94:                                               ; preds = %.loopexit, %14, %9, %5
  %.0 = phi ptr [ %6, %5 ], [ %10, %9 ], [ %15, %14 ], [ %17, %.loopexit ]
  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.round.f32(float) #3

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x float> @llvm.round.v4f32(<4 x float>) #4

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { 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 = !{!"fskdem_s", !7, i64 0, !7, i64 4, !10, i64 8, !7, i64 12, !10, i64 16, !7, i64 20, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !7, i64 56}
!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, !7, i64 12}
!15 = !{!6, !10, i64 16}
!16 = !{!6, !7, i64 20}
!17 = distinct !{!17, !18, !19}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.peeled.count", i32 1}
!20 = !{!6, !11, i64 48}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !18, !23, !24}
!23 = !{!"llvm.loop.isvectorized", i32 1}
!24 = !{!"llvm.loop.unroll.runtime.disable"}
!25 = distinct !{!25, !18, !24, !23}
!26 = distinct !{!26, !18}
!27 = !{!6, !11, i64 24}
!28 = !{!6, !11, i64 32}
!29 = !{!6, !11, i64 40}


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