; LLVM IR from jgaeddert/liquid-dsp :: src/multichannel/src (ofdmframesync)

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

@.str = external hidden unnamed_addr constant [91 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [64 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
declare float @cosf(float noundef) #1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @ofdmframesync_estimate_eqgain_poly(ptr noundef %0, i32 noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca { float, float }, align 4
  %18 = alloca { float, float }, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.ofdmframesync_s, ptr %22, i32 0, i32 6
  %24 = load i32, ptr %23, align 8, !tbaa !11
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.ofdmframesync_s, ptr %25, i32 0, i32 7
  %27 = load i32, ptr %26, align 4, !tbaa !14
  %28 = add i32 %24, %27
  store i32 %28, ptr %7, align 4, !tbaa !9
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = sub i32 %30, 1
  %32 = icmp ugt i32 %29, %31
  br i1 %32, label %33, label %36

33:                                               ; preds = %2
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = sub i32 %34, 1
  store i32 %35, ptr %5, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %33, %2
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = icmp ugt i32 %37, 10
  br i1 %38, label %39, label %40

39:                                               ; preds = %36
  store i32 10, ptr %5, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %39, %36
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = zext i32 %41 to i64
  %43 = call ptr @llvm.stacksave.p0()
  store ptr %43, ptr %8, align 8
  %44 = alloca float, i64 %42, align 16
  store i64 %42, ptr %9, align 8
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = zext i32 %45 to i64
  %47 = alloca float, i64 %46, align 16
  store i64 %46, ptr %10, align 8
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = alloca float, i64 %49, align 16
  store i64 %49, ptr %11, align 8
  %51 = load i32, ptr %5, align 4, !tbaa !9
  %52 = add i32 %51, 1
  %53 = zext i32 %52 to i64
  %54 = alloca float, i64 %53, align 16
  store i64 %53, ptr %12, align 8
  %55 = load i32, ptr %5, align 4, !tbaa !9
  %56 = add i32 %55, 1
  %57 = zext i32 %56 to i64
  %58 = alloca float, i64 %57, align 16
  store i64 %57, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %59

59:                                               ; preds = %161, %40
  %60 = load i32, ptr %6, align 4, !tbaa !9
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ofdmframesync_s, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 8, !tbaa !15
  %64 = icmp ult i32 %60, %63
  br i1 %64, label %65, label %164

65:                                               ; preds = %59
  %66 = load i32, ptr %6, align 4, !tbaa !9
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.ofdmframesync_s, ptr %67, i32 0, i32 1
  %69 = load i32, ptr %68, align 4, !tbaa !16
  %70 = add i32 %66, %69
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.ofdmframesync_s, ptr %71, i32 0, i32 0
  %73 = load i32, ptr %72, align 8, !tbaa !15
  %74 = urem i32 %70, %73
  store i32 %74, ptr %15, align 4, !tbaa !9
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ofdmframesync_s, ptr %75, i32 0, i32 3
  %77 = load ptr, ptr %76, align 8, !tbaa !17
  %78 = load i32, ptr %15, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds i8, ptr %77, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !18
  %82 = zext i8 %81 to i32
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %160

84:                                               ; preds = %65
  %85 = load i32, ptr %14, align 4, !tbaa !9
  %86 = load i32, ptr %7, align 4, !tbaa !9
  %87 = icmp eq i32 %85, %86
  br i1 %87, label %88, label %90

88:                                               ; preds = %84
  %89 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 1, ptr noundef @.str, i32 noundef 983, ptr noundef @.str.14)
  store i32 %89, ptr %3, align 4
  store i32 1, ptr %16, align 4
  br label %255

90:                                               ; preds = %84
  %91 = load i32, ptr %15, align 4, !tbaa !9
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ofdmframesync_s, ptr %92, i32 0, i32 1
  %94 = load i32, ptr %93, align 4, !tbaa !16
  %95 = icmp ugt i32 %91, %94
  br i1 %95, label %96, label %104

96:                                               ; preds = %90
  %97 = load i32, ptr %15, align 4, !tbaa !9
  %98 = uitofp i32 %97 to float
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.ofdmframesync_s, ptr %99, i32 0, i32 0
  %101 = load i32, ptr %100, align 8, !tbaa !15
  %102 = uitofp i32 %101 to float
  %103 = fsub float %98, %102
  br label %107

104:                                              ; preds = %90
  %105 = load i32, ptr %15, align 4, !tbaa !9
  %106 = uitofp i32 %105 to float
  br label %107

107:                                              ; preds = %104, %96
  %108 = phi float [ %103, %96 ], [ %106, %104 ]
  %109 = load i32, ptr %14, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds float, ptr %44, i64 %110
  store float %108, ptr %111, align 4, !tbaa !19
  %112 = load i32, ptr %14, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds float, ptr %44, i64 %113
  %115 = load float, ptr %114, align 4, !tbaa !19
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ofdmframesync_s, ptr %116, i32 0, i32 0
  %118 = load i32, ptr %117, align 8, !tbaa !15
  %119 = uitofp i32 %118 to float
  %120 = fdiv float %115, %119
  %121 = load i32, ptr %14, align 4, !tbaa !9
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds float, ptr %44, i64 %122
  store float %120, ptr %123, align 4, !tbaa !19
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.ofdmframesync_s, ptr %124, i32 0, i32 25
  %126 = load ptr, ptr %125, align 8, !tbaa !20
  %127 = load i32, ptr %15, align 4, !tbaa !9
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds { float, float }, ptr %126, i64 %128
  %130 = getelementptr inbounds { float, float }, ptr %129, i32 0, i32 0
  %131 = load float, ptr %130, align 4
  %132 = getelementptr inbounds { float, float }, ptr %129, i32 0, i32 1
  %133 = load float, ptr %132, align 4
  %134 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 0
  %135 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 1
  store float %131, ptr %134, align 4
  store float %133, ptr %135, align 4
  %136 = load <2 x float>, ptr %17, align 4
  %137 = call float @cabsf(<2 x float> noundef %136) #5
  %138 = load i32, ptr %14, align 4, !tbaa !9
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds float, ptr %47, i64 %139
  store float %137, ptr %140, align 4, !tbaa !19
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.ofdmframesync_s, ptr %141, i32 0, i32 25
  %143 = load ptr, ptr %142, align 8, !tbaa !20
  %144 = load i32, ptr %15, align 4, !tbaa !9
  %145 = zext i32 %144 to i64
  %146 = getelementptr inbounds { float, float }, ptr %143, i64 %145
  %147 = getelementptr inbounds { float, float }, ptr %146, i32 0, i32 0
  %148 = load float, ptr %147, align 4
  %149 = getelementptr inbounds { float, float }, ptr %146, i32 0, i32 1
  %150 = load float, ptr %149, align 4
  %151 = getelementptr inbounds { float, float }, ptr %18, i32 0, i32 0
  %152 = getelementptr inbounds { float, float }, ptr %18, i32 0, i32 1
  store float %148, ptr %151, align 4
  store float %150, ptr %152, align 4
  %153 = load <2 x float>, ptr %18, align 4
  %154 = call float @cargf(<2 x float> noundef %153) #5
  %155 = load i32, ptr %14, align 4, !tbaa !9
  %156 = zext i32 %155 to i64
  %157 = getelementptr inbounds float, ptr %50, i64 %156
  store float %154, ptr %157, align 4, !tbaa !19
  %158 = load i32, ptr %14, align 4, !tbaa !9
  %159 = add i32 %158, 1
  store i32 %159, ptr %14, align 4, !tbaa !9
  br label %160

160:                                              ; preds = %107, %65
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %6, align 4, !tbaa !9
  %163 = add i32 %162, 1
  store i32 %163, ptr %6, align 4, !tbaa !9
  br label %59, !llvm.loop !21

164:                                              ; preds = %59
  %165 = load i32, ptr %14, align 4, !tbaa !9
  %166 = load i32, ptr %7, align 4, !tbaa !9
  %167 = icmp ne i32 %165, %166
  br i1 %167, label %168, label %170

168:                                              ; preds = %164
  %169 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 1, ptr noundef @.str, i32 noundef 996, ptr noundef @.str.14)
  store i32 %169, ptr %3, align 4
  store i32 1, ptr %16, align 4
  br label %255

170:                                              ; preds = %164
  %171 = load i32, ptr %7, align 4, !tbaa !9
  call void @liquid_unwrap_phase(ptr noundef %50, i32 noundef %171)
  %172 = load i32, ptr %7, align 4, !tbaa !9
  %173 = load i32, ptr %5, align 4, !tbaa !9
  %174 = add i32 %173, 1
  %175 = call i32 @polyf_fit(ptr noundef %44, ptr noundef %47, i32 noundef %172, ptr noundef %54, i32 noundef %174)
  %176 = load i32, ptr %7, align 4, !tbaa !9
  %177 = load i32, ptr %5, align 4, !tbaa !9
  %178 = add i32 %177, 1
  %179 = call i32 @polyf_fit(ptr noundef %44, ptr noundef %50, i32 noundef %176, ptr noundef %58, i32 noundef %178)
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %180

180:                                              ; preds = %251, %170
  %181 = load i32, ptr %6, align 4, !tbaa !9
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.ofdmframesync_s, ptr %182, i32 0, i32 0
  %184 = load i32, ptr %183, align 8, !tbaa !15
  %185 = icmp ult i32 %181, %184
  br i1 %185, label %186, label %254

186:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %187 = load i32, ptr %6, align 4, !tbaa !9
  %188 = load ptr, ptr %4, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.ofdmframesync_s, ptr %188, i32 0, i32 1
  %190 = load i32, ptr %189, align 4, !tbaa !16
  %191 = icmp ugt i32 %187, %190
  br i1 %191, label %192, label %200

192:                                              ; preds = %186
  %193 = load i32, ptr %6, align 4, !tbaa !9
  %194 = uitofp i32 %193 to float
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.ofdmframesync_s, ptr %195, i32 0, i32 0
  %197 = load i32, ptr %196, align 8, !tbaa !15
  %198 = uitofp i32 %197 to float
  %199 = fsub float %194, %198
  br label %203

200:                                              ; preds = %186
  %201 = load i32, ptr %6, align 4, !tbaa !9
  %202 = uitofp i32 %201 to float
  br label %203

203:                                              ; preds = %200, %192
  %204 = phi float [ %199, %192 ], [ %202, %200 ]
  store float %204, ptr %19, align 4, !tbaa !19
  %205 = load float, ptr %19, align 4, !tbaa !19
  %206 = load ptr, ptr %4, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.ofdmframesync_s, ptr %206, i32 0, i32 0
  %208 = load i32, ptr %207, align 8, !tbaa !15
  %209 = uitofp i32 %208 to float
  %210 = fdiv float %205, %209
  store float %210, ptr %19, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %211 = load i32, ptr %5, align 4, !tbaa !9
  %212 = add i32 %211, 1
  %213 = load float, ptr %19, align 4, !tbaa !19
  %214 = call float @polyf_val(ptr noundef %54, i32 noundef %212, float noundef %213)
  store float %214, ptr %20, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %215 = load i32, ptr %5, align 4, !tbaa !9
  %216 = add i32 %215, 1
  %217 = load float, ptr %19, align 4, !tbaa !19
  %218 = call float @polyf_val(ptr noundef %58, i32 noundef %216, float noundef %217)
  store float %218, ptr %21, align 4, !tbaa !19
  %219 = load ptr, ptr %4, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.ofdmframesync_s, ptr %219, i32 0, i32 3
  %221 = load ptr, ptr %220, align 8, !tbaa !17
  %222 = load i32, ptr %6, align 4, !tbaa !9
  %223 = zext i32 %222 to i64
  %224 = getelementptr inbounds i8, ptr %221, i64 %223
  %225 = load i8, ptr %224, align 1, !tbaa !18
  %226 = zext i8 %225 to i32
  %227 = icmp eq i32 %226, 0
  br i1 %227, label %228, label %229

228:                                              ; preds = %203
  br label %240

229:                                              ; preds = %203
  %230 = load float, ptr %20, align 4, !tbaa !19
  %231 = load float, ptr %21, align 4, !tbaa !19
  %232 = call float @cosf(float noundef %231) #5
  %233 = load float, ptr %21, align 4, !tbaa !19
  %234 = call float @sinf(float noundef %233) #5
  %235 = fmul float 0.000000e+00, %234
  %236 = fmul float 1.000000e+00, %234
  %237 = fadd float %232, %235
  %238 = fmul float %230, %237
  %239 = fmul float %230, %236
  br label %240

240:                                              ; preds = %229, %228
  %241 = phi float [ 0.000000e+00, %228 ], [ %238, %229 ]
  %242 = phi float [ 0.000000e+00, %228 ], [ %239, %229 ]
  %243 = load ptr, ptr %4, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.ofdmframesync_s, ptr %243, i32 0, i32 25
  %245 = load ptr, ptr %244, align 8, !tbaa !20
  %246 = load i32, ptr %6, align 4, !tbaa !9
  %247 = zext i32 %246 to i64
  %248 = getelementptr inbounds { float, float }, ptr %245, i64 %247
  %249 = getelementptr inbounds { float, float }, ptr %248, i32 0, i32 0
  %250 = getelementptr inbounds { float, float }, ptr %248, i32 0, i32 1
  store float %241, ptr %249, align 4
  store float %242, ptr %250, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %251

251:                                              ; preds = %240
  %252 = load i32, ptr %6, align 4, !tbaa !9
  %253 = add i32 %252, 1
  store i32 %253, ptr %6, align 4, !tbaa !9
  br label %180, !llvm.loop !23

254:                                              ; preds = %180
  store i32 0, ptr %3, align 4
  store i32 1, ptr %16, align 4
  br label %255

255:                                              ; preds = %254, %168, %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  %256 = load ptr, ptr %8, align 8
  call void @llvm.stackrestore.p0(ptr %256)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %257 = load i32, ptr %3, align 4
  ret i32 %257
}

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

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

declare void @liquid_unwrap_phase(ptr noundef, i32 noundef) #4

declare i32 @polyf_fit(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #4

declare float @polyf_val(ptr noundef, i32 noundef, float noundef) #4

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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, !10, i64 32}
!12 = !{!"ofdmframesync_s", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !13, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !10, i64 184, !6, i64 192, !6, i64 200, !13, i64 208, !13, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !7, i64 228, !7, i64 236, !13, i64 244, !13, i64 248, !6, i64 256, !6, i64 264}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !10, i64 36}
!15 = !{!12, !10, i64 0}
!16 = !{!12, !10, i64 4}
!17 = !{!12, !6, i64 16}
!18 = !{!7, !7, i64 0}
!19 = !{!13, !13, i64 0}
!20 = !{!12, !6, i64 160}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


; 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 [91 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [64 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @ofdmframesync_estimate_eqgain_poly(ptr nocapture noundef readonly %0, i32 noundef %1) local_unnamed_addr #2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 32
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 36
  %6 = load i32, ptr %5, align 4, !tbaa !12
  %7 = add i32 %6, %4
  %8 = add i32 %7, -1
  %spec.select = tail call i32 @llvm.umin.i32(i32 %8, i32 %1)
  %spec.store.select = tail call i32 @llvm.umin.i32(i32 %spec.select, i32 10)
  %9 = zext i32 %7 to i64
  %10 = alloca float, i64 %9, align 16
  %11 = alloca float, i64 %9, align 16
  %12 = alloca float, i64 %9, align 16
  %13 = add nuw nsw i32 %spec.store.select, 1
  %14 = zext nneg i32 %13 to i64
  %15 = alloca float, i64 %14, align 16
  %16 = alloca float, i64 %14, align 16
  %17 = load i32, ptr %0, align 8, !tbaa !13
  %.not87 = icmp eq i32 %17, 0
  br i1 %.not87, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %18 = getelementptr inbounds i8, ptr %0, i64 4
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  %20 = getelementptr inbounds i8, ptr %0, i64 160
  br label %21

21:                                               ; preds = %.lr.ph, %52
  %22 = phi i32 [ %17, %.lr.ph ], [ %53, %52 ]
  %.07083 = phi i32 [ 0, %.lr.ph ], [ %54, %52 ]
  %.07182 = phi i32 [ 0, %.lr.ph ], [ %.172, %52 ]
  %23 = load i32, ptr %18, align 4, !tbaa !14
  %24 = add i32 %23, %.07083
  %25 = urem i32 %24, %22
  %26 = load ptr, ptr %19, align 8, !tbaa !15
  %27 = zext i32 %25 to i64
  %28 = getelementptr inbounds i8, ptr %26, i64 %27
  %29 = load i8, ptr %28, align 1, !tbaa !16
  %.not80 = icmp eq i8 %29, 0
  br i1 %.not80, label %52, label %30

30:                                               ; preds = %21
  %31 = icmp eq i32 %.07182, %7
  br i1 %31, label %.loopexit.sink.split, label %32

32:                                               ; preds = %30
  %33 = icmp ugt i32 %25, %23
  %34 = uitofp i32 %25 to float
  %35 = uitofp i32 %22 to float
  %36 = select i1 %33, float %35, float 0.000000e+00
  %37 = fsub float %34, %36
  %38 = zext i32 %.07182 to i64
  %39 = getelementptr inbounds float, ptr %10, i64 %38
  %40 = fdiv float %37, %35
  store float %40, ptr %39, align 4, !tbaa !17
  %41 = load ptr, ptr %20, align 8, !tbaa !18
  %42 = getelementptr inbounds { float, float }, ptr %41, i64 %27
  %43 = load <2 x float>, ptr %42, align 4
  %44 = tail call float @cabsf(<2 x float> noundef %43) #5
  %45 = getelementptr inbounds float, ptr %11, i64 %38
  store float %44, ptr %45, align 4, !tbaa !17
  %46 = load ptr, ptr %20, align 8, !tbaa !18
  %47 = getelementptr inbounds { float, float }, ptr %46, i64 %27
  %48 = load <2 x float>, ptr %47, align 4
  %49 = tail call float @cargf(<2 x float> noundef %48) #5
  %50 = getelementptr inbounds float, ptr %12, i64 %38
  store float %49, ptr %50, align 4, !tbaa !17
  %51 = add i32 %.07182, 1
  %.pre = load i32, ptr %0, align 8, !tbaa !13
  br label %52

52:                                               ; preds = %21, %32
  %53 = phi i32 [ %.pre, %32 ], [ %22, %21 ]
  %.172 = phi i32 [ %51, %32 ], [ %.07182, %21 ]
  %54 = add nuw i32 %.07083, 1
  %55 = icmp ult i32 %54, %53
  br i1 %55, label %21, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %52, %2
  %.071.lcssa = phi i32 [ 0, %2 ], [ %.172, %52 ]
  %.not = icmp eq i32 %.071.lcssa, %7
  br i1 %.not, label %56, label %.loopexit.sink.split

56:                                               ; preds = %._crit_edge
  call void @liquid_unwrap_phase(ptr noundef nonnull %12, i32 noundef %7) #5
  %57 = call i32 @polyf_fit(ptr noundef nonnull %10, ptr noundef nonnull %11, i32 noundef %7, ptr noundef nonnull %15, i32 noundef %13) #5
  %58 = call i32 @polyf_fit(ptr noundef nonnull %10, ptr noundef nonnull %12, i32 noundef %7, ptr noundef nonnull %16, i32 noundef %13) #5
  %59 = load i32, ptr %0, align 8, !tbaa !13
  %.not88 = icmp eq i32 %59, 0
  br i1 %.not88, label %.loopexit, label %.lr.ph86

.lr.ph86:                                         ; preds = %56
  %60 = getelementptr inbounds i8, ptr %0, i64 4
  %61 = getelementptr inbounds i8, ptr %0, i64 16
  %62 = getelementptr inbounds i8, ptr %0, i64 160
  br label %63

63:                                               ; preds = %.lr.ph86, %90
  %indvars.iv = phi i64 [ 0, %.lr.ph86 ], [ %indvars.iv.next, %90 ]
  %64 = phi i32 [ %59, %.lr.ph86 ], [ %94, %90 ]
  %65 = load i32, ptr %60, align 4, !tbaa !14
  %66 = zext i32 %65 to i64
  %67 = icmp ugt i64 %indvars.iv, %66
  %68 = trunc nuw i64 %indvars.iv to i32
  %69 = uitofp i32 %68 to float
  %70 = uitofp i32 %64 to float
  %71 = select i1 %67, float %70, float 0.000000e+00
  %72 = fsub float %69, %71
  %73 = fdiv float %72, %70
  %74 = call float @polyf_val(ptr noundef nonnull %15, i32 noundef %13, float noundef %73) #5
  %75 = call float @polyf_val(ptr noundef nonnull %16, i32 noundef %13, float noundef %73) #5
  %76 = load ptr, ptr %61, align 8, !tbaa !15
  %77 = getelementptr inbounds i8, ptr %76, i64 %indvars.iv
  %78 = load i8, ptr %77, align 1, !tbaa !16
  %79 = icmp eq i8 %78, 0
  br i1 %79, label %90, label %80

80:                                               ; preds = %63
  %81 = call float @cosf(float noundef %75) #5
  %82 = call float @sinf(float noundef %75) #5
  %83 = fmul float %82, 0.000000e+00
  %84 = fadd float %81, %83
  %85 = insertelement <2 x float> poison, float %74, i64 0
  %86 = shufflevector <2 x float> %85, <2 x float> poison, <2 x i32> zeroinitializer
  %87 = insertelement <2 x float> poison, float %84, i64 0
  %88 = insertelement <2 x float> %87, float %82, i64 1
  %89 = fmul <2 x float> %86, %88
  br label %90

90:                                               ; preds = %63, %80
  %91 = phi <2 x float> [ %89, %80 ], [ zeroinitializer, %63 ]
  %92 = load ptr, ptr %62, align 8, !tbaa !18
  %93 = getelementptr inbounds { float, float }, ptr %92, i64 %indvars.iv
  store <2 x float> %91, ptr %93, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %94 = load i32, ptr %0, align 8, !tbaa !13
  %95 = zext i32 %94 to i64
  %96 = icmp ult i64 %indvars.iv.next, %95
  br i1 %96, label %63, label %.loopexit, !llvm.loop !21

.loopexit.sink.split:                             ; preds = %30, %._crit_edge
  %.sink = phi i32 [ 996, %._crit_edge ], [ 983, %30 ]
  %97 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 1, ptr noundef nonnull @.str, i32 noundef %.sink, ptr noundef nonnull @.str.14) #5
  br label %.loopexit

.loopexit:                                        ; preds = %90, %.loopexit.sink.split, %56
  %.0 = phi i32 [ 0, %56 ], [ %97, %.loopexit.sink.split ], [ 0, %90 ]
  ret i32 %.0
}

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

declare void @liquid_unwrap_phase(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @polyf_fit(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare float @polyf_val(ptr noundef, i32 noundef, float noundef) local_unnamed_addr #3

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

attributes #0 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #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 = { "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 }

!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 32}
!6 = !{!"ofdmframesync_s", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !11, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !7, i64 184, !10, i64 192, !10, i64 200, !11, i64 208, !11, i64 212, !7, i64 216, !7, i64 220, !7, i64 224, !8, i64 228, !8, i64 236, !11, i64 244, !11, i64 248, !10, i64 256, !10, i64 264}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !7, i64 36}
!13 = !{!6, !7, i64 0}
!14 = !{!6, !7, i64 4}
!15 = !{!6, !10, i64 16}
!16 = !{!8, !8, i64 0}
!17 = !{!11, !11, i64 0}
!18 = !{!6, !10, i64 160}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}


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