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

; 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.modemcf_s = type { i32, i32, i32, [8 x float], ptr, i32, { float, float }, { float, float }, %union.anon, ptr, ptr, ptr, i32 }
%union.anon = type { %struct.anon.3 }
%struct.anon.3 = type { i32, [8 x i32], [8 x float], [8 x float], [8 x float], ptr }
%struct.anon.2 = type { i32, i32, i32, i32, float }

@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [42 x i8], align 1
@__PRETTY_FUNCTION__.modemcf_create_qam = external hidden unnamed_addr constant [41 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [52 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @modemcf_create_qam(i32 noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  %7 = load i32, ptr %3, align 4, !tbaa !5
  %8 = icmp ult i32 %7, 1
  br i1 %8, label %9, label %11

9:                                                ; preds = %1
  %10 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.21, i32 noundef 33, ptr noundef @.str.22, ptr noundef @.str.2)
  store ptr %10, ptr %2, align 8
  br label %232

11:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %12 = call noalias ptr @malloc(i64 noundef 256) #8
  store ptr %12, ptr %4, align 8, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !9
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = call i32 @modemcf_init(ptr noundef %13, i32 noundef %14)
  %16 = load ptr, ptr %4, align 8, !tbaa !9
  %17 = getelementptr inbounds %struct.modemcf_s, ptr %16, i32 0, i32 1
  %18 = load i32, ptr %17, align 4, !tbaa !11
  %19 = urem i32 %18, 2
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %38

21:                                               ; preds = %11
  %22 = load ptr, ptr %4, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct.modemcf_s, ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !11
  %25 = add i32 %24, 1
  %26 = lshr i32 %25, 1
  %27 = load ptr, ptr %4, align 8, !tbaa !9
  %28 = getelementptr inbounds %struct.modemcf_s, ptr %27, i32 0, i32 8
  %29 = getelementptr inbounds %struct.anon.2, ptr %28, i32 0, i32 0
  store i32 %26, ptr %29, align 8, !tbaa !13
  %30 = load ptr, ptr %4, align 8, !tbaa !9
  %31 = getelementptr inbounds %struct.modemcf_s, ptr %30, i32 0, i32 1
  %32 = load i32, ptr %31, align 4, !tbaa !11
  %33 = sub i32 %32, 1
  %34 = lshr i32 %33, 1
  %35 = load ptr, ptr %4, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct.modemcf_s, ptr %35, i32 0, i32 8
  %37 = getelementptr inbounds %struct.anon.2, ptr %36, i32 0, i32 1
  store i32 %34, ptr %37, align 4, !tbaa !13
  br label %53

38:                                               ; preds = %11
  %39 = load ptr, ptr %4, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.modemcf_s, ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 4, !tbaa !11
  %42 = lshr i32 %41, 1
  %43 = load ptr, ptr %4, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct.modemcf_s, ptr %43, i32 0, i32 8
  %45 = getelementptr inbounds %struct.anon.2, ptr %44, i32 0, i32 0
  store i32 %42, ptr %45, align 8, !tbaa !13
  %46 = load ptr, ptr %4, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.modemcf_s, ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !11
  %49 = lshr i32 %48, 1
  %50 = load ptr, ptr %4, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.modemcf_s, ptr %50, i32 0, i32 8
  %52 = getelementptr inbounds %struct.anon.2, ptr %51, i32 0, i32 1
  store i32 %49, ptr %52, align 4, !tbaa !13
  br label %53

53:                                               ; preds = %38, %21
  %54 = load ptr, ptr %4, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.modemcf_s, ptr %54, i32 0, i32 8
  %56 = getelementptr inbounds %struct.anon.2, ptr %55, i32 0, i32 0
  %57 = load i32, ptr %56, align 8, !tbaa !13
  %58 = shl i32 1, %57
  %59 = load ptr, ptr %4, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.modemcf_s, ptr %59, i32 0, i32 8
  %61 = getelementptr inbounds %struct.anon.2, ptr %60, i32 0, i32 2
  store i32 %58, ptr %61, align 8, !tbaa !13
  %62 = load ptr, ptr %4, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.modemcf_s, ptr %62, i32 0, i32 8
  %64 = getelementptr inbounds %struct.anon.2, ptr %63, i32 0, i32 1
  %65 = load i32, ptr %64, align 4, !tbaa !13
  %66 = shl i32 1, %65
  %67 = load ptr, ptr %4, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.modemcf_s, ptr %67, i32 0, i32 8
  %69 = getelementptr inbounds %struct.anon.2, ptr %68, i32 0, i32 3
  store i32 %66, ptr %69, align 4, !tbaa !13
  %70 = load ptr, ptr %4, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct.modemcf_s, ptr %70, i32 0, i32 8
  %72 = getelementptr inbounds %struct.anon.2, ptr %71, i32 0, i32 0
  %73 = load i32, ptr %72, align 8, !tbaa !13
  %74 = load ptr, ptr %4, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct.modemcf_s, ptr %74, i32 0, i32 8
  %76 = getelementptr inbounds %struct.anon.2, ptr %75, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !13
  %78 = add i32 %73, %77
  %79 = load ptr, ptr %4, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.modemcf_s, ptr %79, i32 0, i32 1
  %81 = load i32, ptr %80, align 4, !tbaa !11
  %82 = icmp eq i32 %78, %81
  br i1 %82, label %83, label %84

83:                                               ; preds = %53
  br label %85

84:                                               ; preds = %53
  call void @__assert_fail(ptr noundef @.str.23, ptr noundef @.str.21, i32 noundef 52, ptr noundef @__PRETTY_FUNCTION__.modemcf_create_qam) #9
  unreachable

85:                                               ; preds = %83
  %86 = load ptr, ptr %4, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.modemcf_s, ptr %86, i32 0, i32 8
  %88 = getelementptr inbounds %struct.anon.2, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 8, !tbaa !13
  %90 = load ptr, ptr %4, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.modemcf_s, ptr %90, i32 0, i32 8
  %92 = getelementptr inbounds %struct.anon.2, ptr %91, i32 0, i32 3
  %93 = load i32, ptr %92, align 4, !tbaa !13
  %94 = mul i32 %89, %93
  %95 = load ptr, ptr %4, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct.modemcf_s, ptr %95, i32 0, i32 2
  %97 = load i32, ptr %96, align 8, !tbaa !14
  %98 = icmp eq i32 %94, %97
  br i1 %98, label %99, label %100

99:                                               ; preds = %85
  br label %101

100:                                              ; preds = %85
  call void @__assert_fail(ptr noundef @.str.24, ptr noundef @.str.21, i32 noundef 53, ptr noundef @__PRETTY_FUNCTION__.modemcf_create_qam) #9
  unreachable

101:                                              ; preds = %99
  %102 = load ptr, ptr %4, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct.modemcf_s, ptr %102, i32 0, i32 2
  %104 = load i32, ptr %103, align 8, !tbaa !14
  switch i32 %104, label %168 [
    i32 4, label %105
    i32 8, label %114
    i32 16, label %123
    i32 32, label %132
    i32 64, label %141
    i32 128, label %150
    i32 256, label %159
  ]

105:                                              ; preds = %101
  %106 = call double @sqrt(double noundef 2.000000e+00) #7
  %107 = fdiv double 1.000000e+00, %106
  %108 = fptrunc double %107 to float
  %109 = load ptr, ptr %4, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.modemcf_s, ptr %109, i32 0, i32 8
  %111 = getelementptr inbounds %struct.anon.2, ptr %110, i32 0, i32 4
  store float %108, ptr %111, align 8, !tbaa !13
  %112 = load ptr, ptr %4, align 8, !tbaa !9
  %113 = getelementptr inbounds %struct.modemcf_s, ptr %112, i32 0, i32 0
  store i32 25, ptr %113, align 8, !tbaa !15
  br label %170

114:                                              ; preds = %101
  %115 = call double @sqrt(double noundef 6.000000e+00) #7
  %116 = fdiv double 1.000000e+00, %115
  %117 = fptrunc double %116 to float
  %118 = load ptr, ptr %4, align 8, !tbaa !9
  %119 = getelementptr inbounds %struct.modemcf_s, ptr %118, i32 0, i32 8
  %120 = getelementptr inbounds %struct.anon.2, ptr %119, i32 0, i32 4
  store float %117, ptr %120, align 8, !tbaa !13
  %121 = load ptr, ptr %4, align 8, !tbaa !9
  %122 = getelementptr inbounds %struct.modemcf_s, ptr %121, i32 0, i32 0
  store i32 26, ptr %122, align 8, !tbaa !15
  br label %170

123:                                              ; preds = %101
  %124 = call double @sqrt(double noundef 1.000000e+01) #7
  %125 = fdiv double 1.000000e+00, %124
  %126 = fptrunc double %125 to float
  %127 = load ptr, ptr %4, align 8, !tbaa !9
  %128 = getelementptr inbounds %struct.modemcf_s, ptr %127, i32 0, i32 8
  %129 = getelementptr inbounds %struct.anon.2, ptr %128, i32 0, i32 4
  store float %126, ptr %129, align 8, !tbaa !13
  %130 = load ptr, ptr %4, align 8, !tbaa !9
  %131 = getelementptr inbounds %struct.modemcf_s, ptr %130, i32 0, i32 0
  store i32 27, ptr %131, align 8, !tbaa !15
  br label %170

132:                                              ; preds = %101
  %133 = call double @sqrt(double noundef 2.600000e+01) #7
  %134 = fdiv double 1.000000e+00, %133
  %135 = fptrunc double %134 to float
  %136 = load ptr, ptr %4, align 8, !tbaa !9
  %137 = getelementptr inbounds %struct.modemcf_s, ptr %136, i32 0, i32 8
  %138 = getelementptr inbounds %struct.anon.2, ptr %137, i32 0, i32 4
  store float %135, ptr %138, align 8, !tbaa !13
  %139 = load ptr, ptr %4, align 8, !tbaa !9
  %140 = getelementptr inbounds %struct.modemcf_s, ptr %139, i32 0, i32 0
  store i32 28, ptr %140, align 8, !tbaa !15
  br label %170

141:                                              ; preds = %101
  %142 = call double @sqrt(double noundef 4.200000e+01) #7
  %143 = fdiv double 1.000000e+00, %142
  %144 = fptrunc double %143 to float
  %145 = load ptr, ptr %4, align 8, !tbaa !9
  %146 = getelementptr inbounds %struct.modemcf_s, ptr %145, i32 0, i32 8
  %147 = getelementptr inbounds %struct.anon.2, ptr %146, i32 0, i32 4
  store float %144, ptr %147, align 8, !tbaa !13
  %148 = load ptr, ptr %4, align 8, !tbaa !9
  %149 = getelementptr inbounds %struct.modemcf_s, ptr %148, i32 0, i32 0
  store i32 29, ptr %149, align 8, !tbaa !15
  br label %170

150:                                              ; preds = %101
  %151 = call double @sqrt(double noundef 1.060000e+02) #7
  %152 = fdiv double 1.000000e+00, %151
  %153 = fptrunc double %152 to float
  %154 = load ptr, ptr %4, align 8, !tbaa !9
  %155 = getelementptr inbounds %struct.modemcf_s, ptr %154, i32 0, i32 8
  %156 = getelementptr inbounds %struct.anon.2, ptr %155, i32 0, i32 4
  store float %153, ptr %156, align 8, !tbaa !13
  %157 = load ptr, ptr %4, align 8, !tbaa !9
  %158 = getelementptr inbounds %struct.modemcf_s, ptr %157, i32 0, i32 0
  store i32 30, ptr %158, align 8, !tbaa !15
  br label %170

159:                                              ; preds = %101
  %160 = call double @sqrt(double noundef 1.700000e+02) #7
  %161 = fdiv double 1.000000e+00, %160
  %162 = fptrunc double %161 to float
  %163 = load ptr, ptr %4, align 8, !tbaa !9
  %164 = getelementptr inbounds %struct.modemcf_s, ptr %163, i32 0, i32 8
  %165 = getelementptr inbounds %struct.anon.2, ptr %164, i32 0, i32 4
  store float %162, ptr %165, align 8, !tbaa !13
  %166 = load ptr, ptr %4, align 8, !tbaa !9
  %167 = getelementptr inbounds %struct.modemcf_s, ptr %166, i32 0, i32 0
  store i32 31, ptr %167, align 8, !tbaa !15
  br label %170

168:                                              ; preds = %101
  %169 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.21, i32 noundef 74, ptr noundef @.str.25, ptr noundef @.str.2)
  store ptr %169, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %231

170:                                              ; preds = %159, %150, %141, %132, %123, %114, %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %171

171:                                              ; preds = %191, %170
  %172 = load i32, ptr %6, align 4, !tbaa !5
  %173 = load ptr, ptr %4, align 8, !tbaa !9
  %174 = getelementptr inbounds %struct.modemcf_s, ptr %173, i32 0, i32 1
  %175 = load i32, ptr %174, align 4, !tbaa !11
  %176 = icmp ult i32 %172, %175
  br i1 %176, label %177, label %194

177:                                              ; preds = %171
  %178 = load i32, ptr %6, align 4, !tbaa !5
  %179 = shl i32 1, %178
  %180 = sitofp i32 %179 to float
  %181 = load ptr, ptr %4, align 8, !tbaa !9
  %182 = getelementptr inbounds %struct.modemcf_s, ptr %181, i32 0, i32 8
  %183 = getelementptr inbounds %struct.anon.2, ptr %182, i32 0, i32 4
  %184 = load float, ptr %183, align 8, !tbaa !13
  %185 = fmul float %180, %184
  %186 = load ptr, ptr %4, align 8, !tbaa !9
  %187 = getelementptr inbounds %struct.modemcf_s, ptr %186, i32 0, i32 3
  %188 = load i32, ptr %6, align 4, !tbaa !5
  %189 = zext i32 %188 to i64
  %190 = getelementptr inbounds [8 x float], ptr %187, i64 0, i64 %189
  store float %185, ptr %190, align 4, !tbaa !16
  br label %191

191:                                              ; preds = %177
  %192 = load i32, ptr %6, align 4, !tbaa !5
  %193 = add i32 %192, 1
  store i32 %193, ptr %6, align 4, !tbaa !5
  br label %171, !llvm.loop !18

194:                                              ; preds = %171
  %195 = load ptr, ptr %4, align 8, !tbaa !9
  %196 = getelementptr inbounds %struct.modemcf_s, ptr %195, i32 0, i32 9
  store ptr @modemcf_modulate_qam, ptr %196, align 8, !tbaa !20
  %197 = load ptr, ptr %4, align 8, !tbaa !9
  %198 = getelementptr inbounds %struct.modemcf_s, ptr %197, i32 0, i32 10
  store ptr @modemcf_demodulate_qam, ptr %198, align 8, !tbaa !21
  %199 = load ptr, ptr %4, align 8, !tbaa !9
  %200 = getelementptr inbounds %struct.modemcf_s, ptr %199, i32 0, i32 2
  %201 = load i32, ptr %200, align 8, !tbaa !14
  %202 = zext i32 %201 to i64
  %203 = mul i64 %202, 8
  %204 = call noalias ptr @malloc(i64 noundef %203) #8
  %205 = load ptr, ptr %4, align 8, !tbaa !9
  %206 = getelementptr inbounds %struct.modemcf_s, ptr %205, i32 0, i32 4
  store ptr %204, ptr %206, align 8, !tbaa !22
  %207 = load ptr, ptr %4, align 8, !tbaa !9
  %208 = call i32 @modemcf_init_map(ptr noundef %207)
  %209 = load ptr, ptr %4, align 8, !tbaa !9
  %210 = getelementptr inbounds %struct.modemcf_s, ptr %209, i32 0, i32 5
  store i32 1, ptr %210, align 8, !tbaa !23
  %211 = load ptr, ptr %4, align 8, !tbaa !9
  %212 = getelementptr inbounds %struct.modemcf_s, ptr %211, i32 0, i32 1
  %213 = load i32, ptr %212, align 4, !tbaa !11
  %214 = icmp eq i32 %213, 3
  br i1 %214, label %215, label %218

215:                                              ; preds = %194
  %216 = load ptr, ptr %4, align 8, !tbaa !9
  %217 = call i32 @modemcf_demodsoft_gentab(ptr noundef %216, i32 noundef 3)
  br label %227

218:                                              ; preds = %194
  %219 = load ptr, ptr %4, align 8, !tbaa !9
  %220 = getelementptr inbounds %struct.modemcf_s, ptr %219, i32 0, i32 1
  %221 = load i32, ptr %220, align 4, !tbaa !11
  %222 = icmp uge i32 %221, 4
  br i1 %222, label %223, label %226

223:                                              ; preds = %218
  %224 = load ptr, ptr %4, align 8, !tbaa !9
  %225 = call i32 @modemcf_demodsoft_gentab(ptr noundef %224, i32 noundef 4)
  br label %226

226:                                              ; preds = %223, %218
  br label %227

227:                                              ; preds = %226, %215
  %228 = load ptr, ptr %4, align 8, !tbaa !9
  %229 = call i32 @modemcf_reset(ptr noundef %228)
  %230 = load ptr, ptr %4, align 8, !tbaa !9
  store ptr %230, ptr %2, align 8
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %231

231:                                              ; preds = %227, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %232

232:                                              ; preds = %231, %9
  %233 = load ptr, ptr %2, align 8
  ret ptr %233
}

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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

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

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

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

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #5

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @modemcf_demodulate_qam(ptr noundef, <2 x float> noundef, ptr noundef) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 4}
!12 = !{!"modemcf_s", !6, i64 0, !6, i64 4, !6, i64 8, !7, i64 12, !10, i64 48, !6, i64 56, !7, i64 60, !7, i64 68, !7, i64 80, !10, i64 224, !10, i64 232, !10, i64 240, !6, i64 248}
!13 = !{!7, !7, i64 0}
!14 = !{!12, !6, i64 8}
!15 = !{!12, !6, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!12, !10, i64 224}
!21 = !{!12, !10, i64 232}
!22 = !{!12, !10, i64 48}
!23 = !{!12, !6, i64 56}


; 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.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [42 x i8], align 1
@__PRETTY_FUNCTION__.modemcf_create_qam = external hidden unnamed_addr constant [41 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [52 x i8], align 1

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

3:                                                ; preds = %1
  %4 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.21, i32 noundef 33, ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.2) #5
  br label %82

5:                                                ; preds = %1
  %6 = tail call noalias dereferenceable_or_null(256) ptr @malloc(i64 noundef 256) #6
  %7 = tail call i32 @modemcf_init(ptr noundef %6, i32 noundef %0)
  %8 = getelementptr inbounds i8, ptr %6, i64 4
  %9 = load i32, ptr %8, align 4, !tbaa !5
  %10 = and i32 %9, 1
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %16, label %11

11:                                               ; preds = %5
  %12 = add i32 %9, 1
  %13 = lshr exact i32 %12, 1
  %14 = add nsw i32 %9, -1
  %15 = lshr exact i32 %14, 1
  br label %18

16:                                               ; preds = %5
  %17 = lshr exact i32 %9, 1
  br label %18

18:                                               ; preds = %16, %11
  %.sink63 = phi i32 [ %17, %16 ], [ %13, %11 ]
  %.sink = phi i32 [ %17, %16 ], [ %15, %11 ]
  %19 = getelementptr inbounds i8, ptr %6, i64 80
  store i32 %.sink63, ptr %19, align 8
  %20 = getelementptr inbounds i8, ptr %6, i64 84
  store i32 %.sink, ptr %20, align 4
  %21 = shl nuw i32 1, %.sink63
  %22 = getelementptr inbounds i8, ptr %6, i64 88
  store i32 %21, ptr %22, align 8, !tbaa !11
  %23 = shl nuw i32 1, %.sink
  %24 = getelementptr inbounds i8, ptr %6, i64 92
  store i32 %23, ptr %24, align 4, !tbaa !11
  %25 = add nuw i32 %.sink, %.sink63
  %26 = icmp eq i32 %25, %9
  br i1 %26, label %28, label %27

27:                                               ; preds = %18
  tail call void @__assert_fail(ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.21, i32 noundef 52, ptr noundef nonnull @__PRETTY_FUNCTION__.modemcf_create_qam) #7
  unreachable

28:                                               ; preds = %18
  %29 = shl i32 %21, %.sink
  %30 = getelementptr inbounds i8, ptr %6, i64 8
  %31 = load i32, ptr %30, align 8, !tbaa !12
  %32 = icmp eq i32 %29, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %28
  tail call void @__assert_fail(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.21, i32 noundef 53, ptr noundef nonnull @__PRETTY_FUNCTION__.modemcf_create_qam) #7
  unreachable

34:                                               ; preds = %28
  switch i32 %29, label %41 [
    i32 4, label %43
    i32 8, label %35
    i32 16, label %36
    i32 32, label %37
    i32 64, label %38
    i32 128, label %39
    i32 256, label %40
  ]

35:                                               ; preds = %34
  br label %43

36:                                               ; preds = %34
  br label %43

37:                                               ; preds = %34
  br label %43

38:                                               ; preds = %34
  br label %43

39:                                               ; preds = %34
  br label %43

40:                                               ; preds = %34
  br label %43

41:                                               ; preds = %34
  %42 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.21, i32 noundef 74, ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.2) #5
  br label %82

43:                                               ; preds = %34, %40, %39, %38, %37, %36, %35
  %.sink65 = phi float [ 0x3FB3A261C0000000, %40 ], [ 0x3FB8DD6B40000000, %39 ], [ 0x3FC3C03660000000, %38 ], [ 0x3FC91A5560000000, %37 ], [ 0x3FD43D1360000000, %36 ], [ 0x3FDA20BD80000000, %35 ], [ 0x3FE6A09E60000000, %34 ]
  %.sink64 = phi i32 [ 31, %40 ], [ 30, %39 ], [ 29, %38 ], [ 28, %37 ], [ 27, %36 ], [ 26, %35 ], [ 25, %34 ]
  %44 = getelementptr inbounds i8, ptr %6, i64 96
  store float %.sink65, ptr %44, align 8, !tbaa !11
  store i32 %.sink64, ptr %6, align 8, !tbaa !13
  %.not61 = icmp eq i32 %9, 0
  br i1 %.not61, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %43
  %45 = getelementptr inbounds i8, ptr %6, i64 96
  %46 = getelementptr inbounds i8, ptr %6, i64 12
  %wide.trip.count = zext i32 %9 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %47 = icmp eq i32 %9, 1
  br i1 %47, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 4294967294
  br label %48

48:                                               ; preds = %48, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %48 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %48 ]
  %49 = trunc nuw i64 %indvars.iv to i32
  %50 = shl nuw i32 1, %49
  %51 = uitofp nneg i32 %50 to float
  %52 = load float, ptr %45, align 8, !tbaa !11
  %53 = fmul float %52, %51
  %54 = getelementptr inbounds [8 x float], ptr %46, i64 0, i64 %indvars.iv
  store float %53, ptr %54, align 4, !tbaa !14
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %55 = trunc nuw i64 %indvars.iv.next to i32
  %56 = shl nuw i32 1, %55
  %57 = sitofp i32 %56 to float
  %58 = load float, ptr %45, align 8, !tbaa !11
  %59 = fmul float %58, %57
  %60 = getelementptr inbounds [8 x float], ptr %46, i64 0, i64 %indvars.iv.next
  store float %59, ptr %60, align 4, !tbaa !14
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %48, !llvm.loop !16

._crit_edge.loopexit.unr-lcssa:                   ; preds = %48, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %48 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %61 = trunc nuw i64 %indvars.iv.unr to i32
  %62 = shl nuw i32 1, %61
  %63 = sitofp i32 %62 to float
  %64 = load float, ptr %45, align 8, !tbaa !11
  %65 = fmul float %64, %63
  %66 = getelementptr inbounds [8 x float], ptr %46, i64 0, i64 %indvars.iv.unr
  store float %65, ptr %66, align 4, !tbaa !14
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %43
  %67 = getelementptr inbounds i8, ptr %6, i64 224
  store ptr @modemcf_modulate_qam, ptr %67, align 8, !tbaa !18
  %68 = getelementptr inbounds i8, ptr %6, i64 232
  store ptr @modemcf_demodulate_qam, ptr %68, align 8, !tbaa !19
  %69 = zext i32 %29 to i64
  %70 = shl nuw nsw i64 %69, 3
  %71 = tail call noalias ptr @malloc(i64 noundef %70) #6
  %72 = getelementptr inbounds i8, ptr %6, i64 48
  store ptr %71, ptr %72, align 8, !tbaa !20
  %73 = tail call i32 @modemcf_init_map(ptr noundef nonnull %6)
  %74 = getelementptr inbounds i8, ptr %6, i64 56
  store i32 1, ptr %74, align 8, !tbaa !21
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = icmp eq i32 %75, 3
  br i1 %76, label %.sink.split, label %77

77:                                               ; preds = %._crit_edge
  %78 = icmp ugt i32 %75, 3
  br i1 %78, label %.sink.split, label %80

.sink.split:                                      ; preds = %77, %._crit_edge
  %.sink67 = phi i32 [ 3, %._crit_edge ], [ 4, %77 ]
  %79 = tail call i32 @modemcf_demodsoft_gentab(ptr noundef nonnull %6, i32 noundef %.sink67)
  br label %80

80:                                               ; preds = %.sink.split, %77
  %81 = tail call i32 @modemcf_reset(ptr noundef nonnull %6)
  br label %82

82:                                               ; preds = %41, %80, %3
  %.1 = phi ptr [ %4, %3 ], [ %42, %41 ], [ %6, %80 ]
  ret ptr %.1
}

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

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @modemcf_demodulate_qam(ptr noundef, <2 x float> noundef, ptr noundef) #2

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 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn 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 #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { noreturn 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 4}
!6 = !{!"modemcf_s", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 12, !10, i64 48, !7, i64 56, !8, i64 60, !8, i64 68, !8, i64 80, !10, i64 224, !10, i64 232, !10, i64 240, !7, i64 248}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!8, !8, i64 0}
!12 = !{!6, !7, i64 8}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!6, !10, i64 224}
!19 = !{!6, !10, i64 232}
!20 = !{!6, !10, i64 48}
!21 = !{!6, !7, i64 56}


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