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

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

@.str = external hidden unnamed_addr constant [90 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [53 x i8], align 1

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

17:                                               ; preds = %4
  %18 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 92, ptr noundef @.str.1)
  store ptr %18, ptr %5, align 8
  br label %250

19:                                               ; preds = %4
  %20 = load i32, ptr %6, align 4, !tbaa !5
  %21 = urem i32 %20, 2
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %25

23:                                               ; preds = %19
  %24 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 94, ptr noundef @.str.2)
  store ptr %24, ptr %5, align 8
  br label %250

25:                                               ; preds = %19
  %26 = load i32, ptr %7, align 4, !tbaa !5
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = icmp ugt i32 %26, %27
  br i1 %28, label %29, label %31

29:                                               ; preds = %25
  %30 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 96, ptr noundef @.str.3)
  store ptr %30, ptr %5, align 8
  br label %250

31:                                               ; preds = %25
  %32 = load i32, ptr %8, align 4, !tbaa !5
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = icmp ugt i32 %32, %33
  br i1 %34, label %35, label %37

35:                                               ; preds = %31
  %36 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 98, ptr noundef @.str.4)
  store ptr %36, ptr %5, align 8
  br label %250

37:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %38 = call noalias ptr @malloc(i64 noundef 128) #7
  store ptr %38, ptr %10, align 8, !tbaa !9
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = load ptr, ptr %10, align 8, !tbaa !9
  %41 = getelementptr inbounds %struct.ofdmframegen_s, ptr %40, i32 0, i32 0
  store i32 %39, ptr %41, align 8, !tbaa !11
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = load ptr, ptr %10, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct.ofdmframegen_s, ptr %43, i32 0, i32 1
  store i32 %42, ptr %44, align 4, !tbaa !14
  %45 = load i32, ptr %8, align 4, !tbaa !5
  %46 = load ptr, ptr %10, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.ofdmframegen_s, ptr %46, i32 0, i32 3
  store i32 %45, ptr %47, align 8, !tbaa !15
  %48 = load ptr, ptr %10, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct.ofdmframegen_s, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 8, !tbaa !11
  %51 = zext i32 %50 to i64
  %52 = mul i64 %51, 1
  %53 = call noalias ptr @malloc(i64 noundef %52) #7
  %54 = load ptr, ptr %10, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.ofdmframegen_s, ptr %54, i32 0, i32 2
  store ptr %53, ptr %55, align 8, !tbaa !16
  %56 = load ptr, ptr %9, align 8, !tbaa !9
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %66

58:                                               ; preds = %37
  %59 = load ptr, ptr %10, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.ofdmframegen_s, ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !11
  %62 = load ptr, ptr %10, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.ofdmframegen_s, ptr %62, i32 0, i32 2
  %64 = load ptr, ptr %63, align 8, !tbaa !16
  %65 = call i32 @ofdmframe_init_default_sctype(i32 noundef %61, ptr noundef %64)
  br label %76

66:                                               ; preds = %37
  %67 = load ptr, ptr %10, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.ofdmframegen_s, ptr %67, i32 0, i32 2
  %69 = load ptr, ptr %68, align 8, !tbaa !16
  %70 = load ptr, ptr %9, align 8, !tbaa !9
  %71 = load ptr, ptr %10, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.ofdmframegen_s, ptr %71, i32 0, i32 0
  %73 = load i32, ptr %72, align 8, !tbaa !11
  %74 = zext i32 %73 to i64
  %75 = mul i64 %74, 1
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %69, ptr align 1 %70, i64 %75, i1 false)
  br label %76

76:                                               ; preds = %66, %58
  %77 = load ptr, ptr %10, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.ofdmframegen_s, ptr %77, i32 0, i32 2
  %79 = load ptr, ptr %78, align 8, !tbaa !16
  %80 = load ptr, ptr %10, align 8, !tbaa !9
  %81 = getelementptr inbounds %struct.ofdmframegen_s, ptr %80, i32 0, i32 0
  %82 = load i32, ptr %81, align 8, !tbaa !11
  %83 = load ptr, ptr %10, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.ofdmframegen_s, ptr %83, i32 0, i32 6
  %85 = load ptr, ptr %10, align 8, !tbaa !9
  %86 = getelementptr inbounds %struct.ofdmframegen_s, ptr %85, i32 0, i32 7
  %87 = load ptr, ptr %10, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.ofdmframegen_s, ptr %87, i32 0, i32 8
  %89 = call i32 @ofdmframe_validate_sctype(ptr noundef %79, i32 noundef %82, ptr noundef %84, ptr noundef %86, ptr noundef %88)
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %93

91:                                               ; preds = %76
  %92 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 117, ptr noundef @.str.5)
  store ptr %92, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %249

93:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %94 = load ptr, ptr %10, align 8, !tbaa !9
  %95 = getelementptr inbounds %struct.ofdmframegen_s, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %95, align 8, !tbaa !11
  %97 = zext i32 %96 to i64
  %98 = mul i64 %97, 8
  %99 = call noalias ptr @malloc(i64 noundef %98) #7
  %100 = load ptr, ptr %10, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.ofdmframegen_s, ptr %100, i32 0, i32 13
  store ptr %99, ptr %101, align 8, !tbaa !17
  %102 = load ptr, ptr %10, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct.ofdmframegen_s, ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 8, !tbaa !11
  %105 = zext i32 %104 to i64
  %106 = mul i64 %105, 8
  %107 = call noalias ptr @malloc(i64 noundef %106) #7
  %108 = load ptr, ptr %10, align 8, !tbaa !9
  %109 = getelementptr inbounds %struct.ofdmframegen_s, ptr %108, i32 0, i32 14
  store ptr %107, ptr %109, align 8, !tbaa !18
  %110 = load ptr, ptr %10, align 8, !tbaa !9
  %111 = getelementptr inbounds %struct.ofdmframegen_s, ptr %110, i32 0, i32 0
  %112 = load i32, ptr %111, align 8, !tbaa !11
  %113 = load ptr, ptr %10, align 8, !tbaa !9
  %114 = getelementptr inbounds %struct.ofdmframegen_s, ptr %113, i32 0, i32 13
  %115 = load ptr, ptr %114, align 8, !tbaa !17
  %116 = load ptr, ptr %10, align 8, !tbaa !9
  %117 = getelementptr inbounds %struct.ofdmframegen_s, ptr %116, i32 0, i32 14
  %118 = load ptr, ptr %117, align 8, !tbaa !18
  %119 = call ptr @fft_create_plan(i32 noundef %112, ptr noundef %115, ptr noundef %118, i32 noundef -1, i32 noundef 0)
  %120 = load ptr, ptr %10, align 8, !tbaa !9
  %121 = getelementptr inbounds %struct.ofdmframegen_s, ptr %120, i32 0, i32 12
  store ptr %119, ptr %121, align 8, !tbaa !19
  %122 = load ptr, ptr %10, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct.ofdmframegen_s, ptr %122, i32 0, i32 0
  %124 = load i32, ptr %123, align 8, !tbaa !11
  %125 = zext i32 %124 to i64
  %126 = mul i64 %125, 8
  %127 = call noalias ptr @malloc(i64 noundef %126) #7
  %128 = load ptr, ptr %10, align 8, !tbaa !9
  %129 = getelementptr inbounds %struct.ofdmframegen_s, ptr %128, i32 0, i32 15
  store ptr %127, ptr %129, align 8, !tbaa !20
  %130 = load ptr, ptr %10, align 8, !tbaa !9
  %131 = getelementptr inbounds %struct.ofdmframegen_s, ptr %130, i32 0, i32 0
  %132 = load i32, ptr %131, align 8, !tbaa !11
  %133 = zext i32 %132 to i64
  %134 = mul i64 %133, 8
  %135 = call noalias ptr @malloc(i64 noundef %134) #7
  %136 = load ptr, ptr %10, align 8, !tbaa !9
  %137 = getelementptr inbounds %struct.ofdmframegen_s, ptr %136, i32 0, i32 16
  store ptr %135, ptr %137, align 8, !tbaa !21
  %138 = load ptr, ptr %10, align 8, !tbaa !9
  %139 = getelementptr inbounds %struct.ofdmframegen_s, ptr %138, i32 0, i32 0
  %140 = load i32, ptr %139, align 8, !tbaa !11
  %141 = zext i32 %140 to i64
  %142 = mul i64 %141, 8
  %143 = call noalias ptr @malloc(i64 noundef %142) #7
  %144 = load ptr, ptr %10, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.ofdmframegen_s, ptr %144, i32 0, i32 17
  store ptr %143, ptr %145, align 8, !tbaa !22
  %146 = load ptr, ptr %10, align 8, !tbaa !9
  %147 = getelementptr inbounds %struct.ofdmframegen_s, ptr %146, i32 0, i32 0
  %148 = load i32, ptr %147, align 8, !tbaa !11
  %149 = zext i32 %148 to i64
  %150 = mul i64 %149, 8
  %151 = call noalias ptr @malloc(i64 noundef %150) #7
  %152 = load ptr, ptr %10, align 8, !tbaa !9
  %153 = getelementptr inbounds %struct.ofdmframegen_s, ptr %152, i32 0, i32 18
  store ptr %151, ptr %153, align 8, !tbaa !23
  %154 = load ptr, ptr %10, align 8, !tbaa !9
  %155 = getelementptr inbounds %struct.ofdmframegen_s, ptr %154, i32 0, i32 2
  %156 = load ptr, ptr %155, align 8, !tbaa !16
  %157 = load ptr, ptr %10, align 8, !tbaa !9
  %158 = getelementptr inbounds %struct.ofdmframegen_s, ptr %157, i32 0, i32 0
  %159 = load i32, ptr %158, align 8, !tbaa !11
  %160 = load ptr, ptr %10, align 8, !tbaa !9
  %161 = getelementptr inbounds %struct.ofdmframegen_s, ptr %160, i32 0, i32 15
  %162 = load ptr, ptr %161, align 8, !tbaa !20
  %163 = load ptr, ptr %10, align 8, !tbaa !9
  %164 = getelementptr inbounds %struct.ofdmframegen_s, ptr %163, i32 0, i32 16
  %165 = load ptr, ptr %164, align 8, !tbaa !21
  %166 = load ptr, ptr %10, align 8, !tbaa !9
  %167 = getelementptr inbounds %struct.ofdmframegen_s, ptr %166, i32 0, i32 9
  %168 = call i32 @ofdmframe_init_S0(ptr noundef %156, i32 noundef %159, ptr noundef %162, ptr noundef %165, ptr noundef %167)
  %169 = load ptr, ptr %10, align 8, !tbaa !9
  %170 = getelementptr inbounds %struct.ofdmframegen_s, ptr %169, i32 0, i32 2
  %171 = load ptr, ptr %170, align 8, !tbaa !16
  %172 = load ptr, ptr %10, align 8, !tbaa !9
  %173 = getelementptr inbounds %struct.ofdmframegen_s, ptr %172, i32 0, i32 0
  %174 = load i32, ptr %173, align 8, !tbaa !11
  %175 = load ptr, ptr %10, align 8, !tbaa !9
  %176 = getelementptr inbounds %struct.ofdmframegen_s, ptr %175, i32 0, i32 17
  %177 = load ptr, ptr %176, align 8, !tbaa !22
  %178 = load ptr, ptr %10, align 8, !tbaa !9
  %179 = getelementptr inbounds %struct.ofdmframegen_s, ptr %178, i32 0, i32 18
  %180 = load ptr, ptr %179, align 8, !tbaa !23
  %181 = load ptr, ptr %10, align 8, !tbaa !9
  %182 = getelementptr inbounds %struct.ofdmframegen_s, ptr %181, i32 0, i32 10
  %183 = call i32 @ofdmframe_init_S1(ptr noundef %171, i32 noundef %174, ptr noundef %177, ptr noundef %180, ptr noundef %182)
  %184 = load ptr, ptr %10, align 8, !tbaa !9
  %185 = getelementptr inbounds %struct.ofdmframegen_s, ptr %184, i32 0, i32 3
  %186 = load i32, ptr %185, align 8, !tbaa !15
  %187 = zext i32 %186 to i64
  %188 = mul i64 %187, 4
  %189 = call noalias ptr @malloc(i64 noundef %188) #7
  %190 = load ptr, ptr %10, align 8, !tbaa !9
  %191 = getelementptr inbounds %struct.ofdmframegen_s, ptr %190, i32 0, i32 4
  store ptr %189, ptr %191, align 8, !tbaa !24
  %192 = load ptr, ptr %10, align 8, !tbaa !9
  %193 = getelementptr inbounds %struct.ofdmframegen_s, ptr %192, i32 0, i32 3
  %194 = load i32, ptr %193, align 8, !tbaa !15
  %195 = zext i32 %194 to i64
  %196 = mul i64 %195, 8
  %197 = call noalias ptr @malloc(i64 noundef %196) #7
  %198 = load ptr, ptr %10, align 8, !tbaa !9
  %199 = getelementptr inbounds %struct.ofdmframegen_s, ptr %198, i32 0, i32 5
  store ptr %197, ptr %199, align 8, !tbaa !25
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %200

200:                                              ; preds = %229, %93
  %201 = load i32, ptr %12, align 4, !tbaa !5
  %202 = load ptr, ptr %10, align 8, !tbaa !9
  %203 = getelementptr inbounds %struct.ofdmframegen_s, ptr %202, i32 0, i32 3
  %204 = load i32, ptr %203, align 8, !tbaa !15
  %205 = icmp ult i32 %201, %204
  br i1 %205, label %206, label %232

206:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %207 = load i32, ptr %12, align 4, !tbaa !5
  %208 = uitofp i32 %207 to float
  %209 = fadd float %208, 5.000000e-01
  %210 = load ptr, ptr %10, align 8, !tbaa !9
  %211 = getelementptr inbounds %struct.ofdmframegen_s, ptr %210, i32 0, i32 3
  %212 = load i32, ptr %211, align 8, !tbaa !15
  %213 = uitofp i32 %212 to float
  %214 = fdiv float %209, %213
  store float %214, ptr %13, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %215 = load float, ptr %13, align 4, !tbaa !26
  %216 = fpext float %215 to double
  %217 = fmul double 0x3FF921FB54442D18, %216
  %218 = fptrunc double %217 to float
  %219 = call float @sinf(float noundef %218) #6
  store float %219, ptr %14, align 4, !tbaa !26
  %220 = load float, ptr %14, align 4, !tbaa !26
  %221 = load float, ptr %14, align 4, !tbaa !26
  %222 = fmul float %220, %221
  %223 = load ptr, ptr %10, align 8, !tbaa !9
  %224 = getelementptr inbounds %struct.ofdmframegen_s, ptr %223, i32 0, i32 4
  %225 = load ptr, ptr %224, align 8, !tbaa !24
  %226 = load i32, ptr %12, align 4, !tbaa !5
  %227 = zext i32 %226 to i64
  %228 = getelementptr inbounds float, ptr %225, i64 %227
  store float %222, ptr %228, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %229

229:                                              ; preds = %206
  %230 = load i32, ptr %12, align 4, !tbaa !5
  %231 = add i32 %230, 1
  store i32 %231, ptr %12, align 4, !tbaa !5
  br label %200, !llvm.loop !27

232:                                              ; preds = %200
  %233 = load ptr, ptr %10, align 8, !tbaa !9
  %234 = getelementptr inbounds %struct.ofdmframegen_s, ptr %233, i32 0, i32 7
  %235 = load i32, ptr %234, align 4, !tbaa !29
  %236 = load ptr, ptr %10, align 8, !tbaa !9
  %237 = getelementptr inbounds %struct.ofdmframegen_s, ptr %236, i32 0, i32 8
  %238 = load i32, ptr %237, align 8, !tbaa !30
  %239 = add i32 %235, %238
  %240 = uitofp i32 %239 to float
  %241 = call float @sqrtf(float noundef %240) #6
  %242 = fdiv float 1.000000e+00, %241
  %243 = load ptr, ptr %10, align 8, !tbaa !9
  %244 = getelementptr inbounds %struct.ofdmframegen_s, ptr %243, i32 0, i32 11
  store float %242, ptr %244, align 4, !tbaa !31
  %245 = call ptr @msequence_create_default(i32 noundef 8)
  %246 = load ptr, ptr %10, align 8, !tbaa !9
  %247 = getelementptr inbounds %struct.ofdmframegen_s, ptr %246, i32 0, i32 19
  store ptr %245, ptr %247, align 8, !tbaa !32
  %248 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %248, ptr %5, align 8
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %249

249:                                              ; preds = %232, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %250

250:                                              ; preds = %249, %35, %29, %23, %17
  %251 = load ptr, ptr %5, align 8
  ret ptr %251
}

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind
declare float @sqrtf(float noundef) #5

declare ptr @msequence_create_default(i32 noundef) #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"ofdmframegen_s", !6, i64 0, !6, i64 4, !10, i64 8, !6, i64 16, !10, i64 24, !10, i64 32, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !13, i64 60, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !6, i64 4}
!15 = !{!12, !6, i64 16}
!16 = !{!12, !10, i64 8}
!17 = !{!12, !10, i64 72}
!18 = !{!12, !10, i64 80}
!19 = !{!12, !10, i64 64}
!20 = !{!12, !10, i64 88}
!21 = !{!12, !10, i64 96}
!22 = !{!12, !10, i64 104}
!23 = !{!12, !10, i64 112}
!24 = !{!12, !10, i64 24}
!25 = !{!12, !10, i64 32}
!26 = !{!13, !13, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!12, !6, i64 44}
!30 = !{!12, !6, i64 48}
!31 = !{!12, !13, i64 60}
!32 = !{!12, !10, i64 120}


; 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 [90 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [53 x i8], align 1

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

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

8:                                                ; preds = %4
  %9 = and i32 %0, 1
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %12, label %10

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

12:                                               ; preds = %8
  %13 = icmp ugt i32 %1, %0
  br i1 %13, label %14, label %16

14:                                               ; preds = %12
  %15 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str, i32 noundef 96, ptr noundef nonnull @.str.3) #6
  br label %100

16:                                               ; preds = %12
  %17 = icmp ugt i32 %2, %1
  br i1 %17, label %18, label %20

18:                                               ; preds = %16
  %19 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str, i32 noundef 98, ptr noundef nonnull @.str.4) #6
  br label %100

20:                                               ; preds = %16
  %21 = tail call noalias dereferenceable_or_null(128) ptr @malloc(i64 noundef 128) #7
  store i32 %0, ptr %21, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i64 4
  store i32 %1, ptr %22, align 4, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %21, i64 16
  store i32 %2, ptr %23, align 8, !tbaa !13
  %24 = zext i32 %0 to i64
  %25 = tail call noalias ptr @malloc(i64 noundef %24) #7
  %26 = getelementptr inbounds i8, ptr %21, i64 8
  store ptr %25, ptr %26, align 8, !tbaa !14
  %27 = icmp eq ptr %3, null
  br i1 %27, label %28, label %30

28:                                               ; preds = %20
  %29 = tail call i32 @ofdmframe_init_default_sctype(i32 noundef %0, ptr noundef %25) #6
  br label %31

30:                                               ; preds = %20
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %25, ptr nonnull align 1 %3, i64 %24, i1 false)
  br label %31

31:                                               ; preds = %30, %28
  %32 = getelementptr inbounds i8, ptr %21, i64 40
  %33 = getelementptr inbounds i8, ptr %21, i64 44
  %34 = getelementptr inbounds i8, ptr %21, i64 48
  %35 = tail call i32 @ofdmframe_validate_sctype(ptr noundef %25, i32 noundef %0, ptr noundef nonnull %32, ptr noundef nonnull %33, ptr noundef nonnull %34) #6
  %.not76 = icmp eq i32 %35, 0
  br i1 %.not76, label %38, label %36

36:                                               ; preds = %31
  %37 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str, i32 noundef 117, ptr noundef nonnull @.str.5) #6
  br label %100

38:                                               ; preds = %31
  %39 = load i32, ptr %21, align 8, !tbaa !5
  %40 = zext i32 %39 to i64
  %41 = shl nuw nsw i64 %40, 3
  %42 = tail call noalias ptr @malloc(i64 noundef %41) #7
  %43 = getelementptr inbounds i8, ptr %21, i64 72
  store ptr %42, ptr %43, align 8, !tbaa !15
  %44 = tail call noalias ptr @malloc(i64 noundef %41) #7
  %45 = getelementptr inbounds i8, ptr %21, i64 80
  store ptr %44, ptr %45, align 8, !tbaa !16
  %46 = tail call ptr @fft_create_plan(i32 noundef %39, ptr noundef %42, ptr noundef %44, i32 noundef -1, i32 noundef 0) #6
  %47 = getelementptr inbounds i8, ptr %21, i64 64
  store ptr %46, ptr %47, align 8, !tbaa !17
  %48 = load i32, ptr %21, align 8, !tbaa !5
  %49 = zext i32 %48 to i64
  %50 = shl nuw nsw i64 %49, 3
  %51 = tail call noalias ptr @malloc(i64 noundef %50) #7
  %52 = getelementptr inbounds i8, ptr %21, i64 88
  store ptr %51, ptr %52, align 8, !tbaa !18
  %53 = tail call noalias ptr @malloc(i64 noundef %50) #7
  %54 = getelementptr inbounds i8, ptr %21, i64 96
  store ptr %53, ptr %54, align 8, !tbaa !19
  %55 = tail call noalias ptr @malloc(i64 noundef %50) #7
  %56 = getelementptr inbounds i8, ptr %21, i64 104
  store ptr %55, ptr %56, align 8, !tbaa !20
  %57 = tail call noalias ptr @malloc(i64 noundef %50) #7
  %58 = getelementptr inbounds i8, ptr %21, i64 112
  store ptr %57, ptr %58, align 8, !tbaa !21
  %59 = load ptr, ptr %26, align 8, !tbaa !14
  %60 = getelementptr inbounds i8, ptr %21, i64 52
  %61 = tail call i32 @ofdmframe_init_S0(ptr noundef %59, i32 noundef %48, ptr noundef %51, ptr noundef %53, ptr noundef nonnull %60) #6
  %62 = load ptr, ptr %26, align 8, !tbaa !14
  %63 = load i32, ptr %21, align 8, !tbaa !5
  %64 = load ptr, ptr %56, align 8, !tbaa !20
  %65 = load ptr, ptr %58, align 8, !tbaa !21
  %66 = getelementptr inbounds i8, ptr %21, i64 56
  %67 = tail call i32 @ofdmframe_init_S1(ptr noundef %62, i32 noundef %63, ptr noundef %64, ptr noundef %65, ptr noundef nonnull %66) #6
  %68 = load i32, ptr %23, align 8, !tbaa !13
  %69 = zext i32 %68 to i64
  %70 = shl nuw nsw i64 %69, 2
  %71 = tail call noalias ptr @malloc(i64 noundef %70) #7
  %72 = getelementptr inbounds i8, ptr %21, i64 24
  store ptr %71, ptr %72, align 8, !tbaa !22
  %73 = shl nuw nsw i64 %69, 3
  %74 = tail call noalias ptr @malloc(i64 noundef %73) #7
  %75 = getelementptr inbounds i8, ptr %21, i64 32
  store ptr %74, ptr %75, align 8, !tbaa !23
  %.not78 = icmp eq i32 %68, 0
  br i1 %.not78, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %38, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %38 ]
  %76 = phi i32 [ %89, %.lr.ph ], [ %68, %38 ]
  %77 = trunc nuw i64 %indvars.iv to i32
  %78 = uitofp i32 %77 to float
  %79 = fadd float %78, 5.000000e-01
  %80 = uitofp i32 %76 to float
  %81 = fdiv float %79, %80
  %82 = fpext float %81 to double
  %83 = fmul double %82, 0x3FF921FB54442D18
  %84 = fptrunc double %83 to float
  %85 = tail call float @sinf(float noundef %84) #6
  %86 = fmul float %85, %85
  %87 = load ptr, ptr %72, align 8, !tbaa !22
  %88 = getelementptr inbounds float, ptr %87, i64 %indvars.iv
  store float %86, ptr %88, align 4, !tbaa !24
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %89 = load i32, ptr %23, align 8, !tbaa !13
  %90 = zext i32 %89 to i64
  %91 = icmp ult i64 %indvars.iv.next, %90
  br i1 %91, label %.lr.ph, label %._crit_edge, !llvm.loop !25

._crit_edge:                                      ; preds = %.lr.ph, %38
  %92 = load i32, ptr %33, align 4, !tbaa !27
  %93 = load i32, ptr %34, align 8, !tbaa !28
  %94 = add i32 %93, %92
  %95 = uitofp i32 %94 to float
  %sqrt = tail call float @llvm.sqrt.f32(float %95)
  %96 = fdiv float 1.000000e+00, %sqrt
  %97 = getelementptr inbounds i8, ptr %21, i64 60
  store float %96, ptr %97, align 4, !tbaa !29
  %98 = tail call ptr @msequence_create_default(i32 noundef 8) #6
  %99 = getelementptr inbounds i8, ptr %21, i64 120
  store ptr %98, ptr %99, align 8, !tbaa !30
  br label %100

100:                                              ; preds = %36, %._crit_edge, %18, %14, %10, %6
  %.1 = phi ptr [ %7, %6 ], [ %11, %10 ], [ %15, %14 ], [ %19, %18 ], [ %37, %36 ], [ %21, %._crit_edge ]
  ret ptr %.1
}

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

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

declare i32 @ofdmframe_validate_sctype(ptr noundef, i32 noundef, ptr noundef, ptr 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

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

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

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

declare ptr @msequence_create_default(i32 noundef) local_unnamed_addr #1

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

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

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 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"ofdmframegen_s", !7, i64 0, !7, i64 4, !10, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !11, i64 60, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120}
!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 4}
!13 = !{!6, !7, i64 16}
!14 = !{!6, !10, i64 8}
!15 = !{!6, !10, i64 72}
!16 = !{!6, !10, i64 80}
!17 = !{!6, !10, i64 64}
!18 = !{!6, !10, i64 88}
!19 = !{!6, !10, i64 96}
!20 = !{!6, !10, i64 104}
!21 = !{!6, !10, i64 112}
!22 = !{!6, !10, i64 24}
!23 = !{!6, !10, i64 32}
!24 = !{!11, !11, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!6, !7, i64 44}
!28 = !{!6, !7, i64 48}
!29 = !{!6, !11, i64 60}
!30 = !{!6, !10, i64 120}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass