; LLVM IR from jgaeddert/liquid-dsp :: src/framing/src (ofdmflexframesync)

; 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.ofdmflexframesync_s = type { i32, i32, i32, ptr, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, %struct.ofdmflexframegenprops_s, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, %struct.framesyncstats_s, %struct.framedatastats_s, float, ptr, i32, i32, i32, i32, i32 }
%struct.ofdmflexframegenprops_s = type { i32, i32, i32, i32 }
%struct.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }
%struct.framedatastats_s = type { i32, i32, i32, i64 }

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @ofdmflexframesync_reset(ptr noundef) #1

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

declare float @ofdmframesync_get_rssi(ptr noundef) #2

declare float @ofdmframesync_get_cfo(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @ofdmflexframesync_rxpayload(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca { float, float }, align 4
  %9 = alloca { float, float }, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %11

11:                                               ; preds = %273, %2
  %12 = load i32, ptr %5, align 4, !tbaa !9
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %13, i32 0, i32 0
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %16 = icmp ult i32 %12, %15
  br i1 %16, label %17, label %276

17:                                               ; preds = %11
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %18, i32 0, i32 3
  %20 = load ptr, ptr %19, align 8, !tbaa !18
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = zext i32 %21 to i64
  %23 = getelementptr inbounds i8, ptr %20, i64 %22
  %24 = load i8, ptr %23, align 1, !tbaa !19
  %25 = zext i8 %24 to i32
  store i32 %25, ptr %6, align 4, !tbaa !9
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = icmp eq i32 %26, 2
  br i1 %27, label %28, label %272

28:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = load i32, ptr %5, align 4, !tbaa !9
  %31 = zext i32 %30 to i64
  %32 = getelementptr inbounds { float, float }, ptr %29, i64 %31
  %33 = getelementptr inbounds { float, float }, ptr %32, i32 0, i32 0
  %34 = load float, ptr %33, align 4
  %35 = getelementptr inbounds { float, float }, ptr %32, i32 0, i32 1
  %36 = load float, ptr %35, align 4
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %37, i32 0, i32 35
  %39 = load ptr, ptr %38, align 8, !tbaa !20
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %40, i32 0, i32 45
  %42 = load i32, ptr %41, align 4, !tbaa !21
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds { float, float }, ptr %39, i64 %43
  %45 = getelementptr inbounds { float, float }, ptr %44, i32 0, i32 0
  %46 = getelementptr inbounds { float, float }, ptr %44, i32 0, i32 1
  store float %34, ptr %45, align 4
  store float %36, ptr %46, align 4
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %47, i32 0, i32 27
  %49 = load i32, ptr %48, align 4, !tbaa !22
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %79

51:                                               ; preds = %28
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %52, i32 0, i32 29
  %54 = load ptr, ptr %53, align 8, !tbaa !23
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load i32, ptr %5, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds { float, float }, ptr %55, i64 %57
  %59 = getelementptr inbounds { float, float }, ptr %58, i32 0, i32 0
  %60 = load float, ptr %59, align 4
  %61 = getelementptr inbounds { float, float }, ptr %58, i32 0, i32 1
  %62 = load float, ptr %61, align 4
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %63, i32 0, i32 30
  %65 = load ptr, ptr %64, align 8, !tbaa !24
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %66, i32 0, i32 22
  %68 = load i32, ptr %67, align 8, !tbaa !25
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %69, i32 0, i32 45
  %71 = load i32, ptr %70, align 4, !tbaa !21
  %72 = mul i32 %68, %71
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds i8, ptr %65, i64 %73
  %75 = getelementptr inbounds { float, float }, ptr %8, i32 0, i32 0
  %76 = getelementptr inbounds { float, float }, ptr %8, i32 0, i32 1
  store float %60, ptr %75, align 4
  store float %62, ptr %76, align 4
  %77 = load <2 x float>, ptr %8, align 4
  %78 = call i32 @modemcf_demodulate_soft(ptr noundef %54, <2 x float> noundef %77, ptr noundef %7, ptr noundef %74)
  br label %117

79:                                               ; preds = %28
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %80, i32 0, i32 29
  %82 = load ptr, ptr %81, align 8, !tbaa !23
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = load i32, ptr %5, align 4, !tbaa !9
  %85 = zext i32 %84 to i64
  %86 = getelementptr inbounds { float, float }, ptr %83, i64 %85
  %87 = getelementptr inbounds { float, float }, ptr %86, i32 0, i32 0
  %88 = load float, ptr %87, align 4
  %89 = getelementptr inbounds { float, float }, ptr %86, i32 0, i32 1
  %90 = load float, ptr %89, align 4
  %91 = getelementptr inbounds { float, float }, ptr %9, i32 0, i32 0
  %92 = getelementptr inbounds { float, float }, ptr %9, i32 0, i32 1
  store float %88, ptr %91, align 4
  store float %90, ptr %92, align 4
  %93 = load <2 x float>, ptr %9, align 4
  %94 = call i32 @modemcf_demodulate(ptr noundef %82, <2 x float> noundef %93, ptr noundef %7)
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %95, i32 0, i32 30
  %97 = load ptr, ptr %96, align 8, !tbaa !24
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %98, i32 0, i32 32
  %100 = load i32, ptr %99, align 8, !tbaa !26
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %101, i32 0, i32 46
  %103 = load i32, ptr %102, align 8, !tbaa !27
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %104, i32 0, i32 22
  %106 = load i32, ptr %105, align 8, !tbaa !25
  %107 = load i32, ptr %7, align 4, !tbaa !9
  %108 = trunc i32 %107 to i8
  %109 = call i32 @liquid_pack_array(ptr noundef %97, i32 noundef %100, i32 noundef %103, i32 noundef %106, i8 noundef zeroext %108)
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %110, i32 0, i32 22
  %112 = load i32, ptr %111, align 8, !tbaa !25
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %113, i32 0, i32 46
  %115 = load i32, ptr %114, align 8, !tbaa !27
  %116 = add i32 %115, %112
  store i32 %116, ptr %114, align 8, !tbaa !27
  br label %117

117:                                              ; preds = %79, %51
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %118, i32 0, i32 45
  %120 = load i32, ptr %119, align 4, !tbaa !21
  %121 = add i32 %120, 1
  store i32 %121, ptr %119, align 4, !tbaa !21
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %122, i32 0, i32 45
  %124 = load i32, ptr %123, align 4, !tbaa !21
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %125, i32 0, i32 33
  %127 = load i32, ptr %126, align 4, !tbaa !28
  %128 = icmp eq i32 %124, %127
  br i1 %128, label %129, label %268

129:                                              ; preds = %117
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %130, i32 0, i32 27
  %132 = load i32, ptr %131, align 4, !tbaa !22
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %147

134:                                              ; preds = %129
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %135, i32 0, i32 28
  %137 = load ptr, ptr %136, align 8, !tbaa !29
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %138, i32 0, i32 30
  %140 = load ptr, ptr %139, align 8, !tbaa !24
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %141, i32 0, i32 31
  %143 = load ptr, ptr %142, align 8, !tbaa !30
  %144 = call i32 @packetizer_decode_soft(ptr noundef %137, ptr noundef %140, ptr noundef %143)
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %145, i32 0, i32 34
  store i32 %144, ptr %146, align 8, !tbaa !31
  br label %160

147:                                              ; preds = %129
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %148, i32 0, i32 28
  %150 = load ptr, ptr %149, align 8, !tbaa !29
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %151, i32 0, i32 30
  %153 = load ptr, ptr %152, align 8, !tbaa !24
  %154 = load ptr, ptr %3, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %154, i32 0, i32 31
  %156 = load ptr, ptr %155, align 8, !tbaa !30
  %157 = call i32 @packetizer_decode(ptr noundef %150, ptr noundef %153, ptr noundef %156)
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %158, i32 0, i32 34
  store i32 %157, ptr %159, align 8, !tbaa !31
  br label %160

160:                                              ; preds = %147, %134
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %161, i32 0, i32 34
  %163 = load i32, ptr %162, align 8, !tbaa !31
  %164 = load ptr, ptr %3, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %164, i32 0, i32 39
  %166 = getelementptr inbounds %struct.framedatastats_s, ptr %165, i32 0, i32 2
  %167 = load i32, ptr %166, align 8, !tbaa !32
  %168 = add i32 %167, %163
  store i32 %168, ptr %166, align 8, !tbaa !32
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %169, i32 0, i32 23
  %171 = load i32, ptr %170, align 4, !tbaa !33
  %172 = zext i32 %171 to i64
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %173, i32 0, i32 39
  %175 = getelementptr inbounds %struct.framedatastats_s, ptr %174, i32 0, i32 3
  %176 = load i64, ptr %175, align 8, !tbaa !34
  %177 = add i64 %176, %172
  store i64 %177, ptr %175, align 8, !tbaa !34
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %178, i32 0, i32 41
  %180 = load ptr, ptr %179, align 8, !tbaa !35
  %181 = call float @ofdmframesync_get_rssi(ptr noundef %180)
  %182 = load ptr, ptr %3, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %182, i32 0, i32 38
  %184 = getelementptr inbounds %struct.framesyncstats_s, ptr %183, i32 0, i32 1
  store float %181, ptr %184, align 4, !tbaa !36
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %185, i32 0, i32 41
  %187 = load ptr, ptr %186, align 8, !tbaa !35
  %188 = call float @ofdmframesync_get_cfo(ptr noundef %187)
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %189, i32 0, i32 38
  %191 = getelementptr inbounds %struct.framesyncstats_s, ptr %190, i32 0, i32 2
  store float %188, ptr %191, align 8, !tbaa !37
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %192, i32 0, i32 35
  %194 = load ptr, ptr %193, align 8, !tbaa !20
  %195 = load ptr, ptr %3, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %195, i32 0, i32 38
  %197 = getelementptr inbounds %struct.framesyncstats_s, ptr %196, i32 0, i32 3
  store ptr %194, ptr %197, align 8, !tbaa !38
  %198 = load ptr, ptr %3, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %198, i32 0, i32 33
  %200 = load i32, ptr %199, align 4, !tbaa !28
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %201, i32 0, i32 38
  %203 = getelementptr inbounds %struct.framesyncstats_s, ptr %202, i32 0, i32 4
  store i32 %200, ptr %203, align 8, !tbaa !39
  %204 = load ptr, ptr %3, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %204, i32 0, i32 21
  %206 = load i32, ptr %205, align 4, !tbaa !40
  %207 = load ptr, ptr %3, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %207, i32 0, i32 38
  %209 = getelementptr inbounds %struct.framesyncstats_s, ptr %208, i32 0, i32 5
  store i32 %206, ptr %209, align 4, !tbaa !41
  %210 = load ptr, ptr %3, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %210, i32 0, i32 22
  %212 = load i32, ptr %211, align 8, !tbaa !25
  %213 = load ptr, ptr %3, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %213, i32 0, i32 38
  %215 = getelementptr inbounds %struct.framesyncstats_s, ptr %214, i32 0, i32 6
  store i32 %212, ptr %215, align 8, !tbaa !42
  %216 = load ptr, ptr %3, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %216, i32 0, i32 24
  %218 = load i32, ptr %217, align 8, !tbaa !43
  %219 = load ptr, ptr %3, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %219, i32 0, i32 38
  %221 = getelementptr inbounds %struct.framesyncstats_s, ptr %220, i32 0, i32 7
  store i32 %218, ptr %221, align 4, !tbaa !44
  %222 = load ptr, ptr %3, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %222, i32 0, i32 25
  %224 = load i32, ptr %223, align 4, !tbaa !45
  %225 = load ptr, ptr %3, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %225, i32 0, i32 38
  %227 = getelementptr inbounds %struct.framesyncstats_s, ptr %226, i32 0, i32 8
  store i32 %224, ptr %227, align 8, !tbaa !46
  %228 = load ptr, ptr %3, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %228, i32 0, i32 26
  %230 = load i32, ptr %229, align 8, !tbaa !47
  %231 = load ptr, ptr %3, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %231, i32 0, i32 38
  %233 = getelementptr inbounds %struct.framesyncstats_s, ptr %232, i32 0, i32 9
  store i32 %230, ptr %233, align 4, !tbaa !48
  %234 = load ptr, ptr %3, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %234, i32 0, i32 36
  %236 = load ptr, ptr %235, align 8, !tbaa !49
  %237 = icmp eq ptr %236, null
  br i1 %237, label %238, label %241

238:                                              ; preds = %160
  %239 = load ptr, ptr %3, align 8, !tbaa !5
  %240 = call i32 @ofdmflexframesync_reset(ptr noundef %239)
  store i32 2, ptr %10, align 4
  br label %269

241:                                              ; preds = %160
  %242 = load ptr, ptr %3, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %242, i32 0, i32 36
  %244 = load ptr, ptr %243, align 8, !tbaa !49
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %245, i32 0, i32 12
  %247 = load ptr, ptr %246, align 8, !tbaa !50
  %248 = load ptr, ptr %3, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %248, i32 0, i32 19
  %250 = load i32, ptr %249, align 8, !tbaa !51
  %251 = load ptr, ptr %3, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %251, i32 0, i32 31
  %253 = load ptr, ptr %252, align 8, !tbaa !30
  %254 = load ptr, ptr %3, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %254, i32 0, i32 23
  %256 = load i32, ptr %255, align 4, !tbaa !33
  %257 = load ptr, ptr %3, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %257, i32 0, i32 34
  %259 = load i32, ptr %258, align 8, !tbaa !31
  %260 = load ptr, ptr %3, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %260, i32 0, i32 38
  %262 = load ptr, ptr %3, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.ofdmflexframesync_s, ptr %262, i32 0, i32 37
  %264 = load ptr, ptr %263, align 8, !tbaa !52
  %265 = call i32 %244(ptr noundef %247, i32 noundef %250, ptr noundef %253, i32 noundef %256, i32 noundef %259, ptr noundef byval(%struct.framesyncstats_s) align 8 %261, ptr noundef %264)
  %266 = load ptr, ptr %3, align 8, !tbaa !5
  %267 = call i32 @ofdmflexframesync_reset(ptr noundef %266)
  store i32 2, ptr %10, align 4
  br label %269

268:                                              ; preds = %117
  store i32 0, ptr %10, align 4
  br label %269

269:                                              ; preds = %268, %241, %238
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  %270 = load i32, ptr %10, align 4
  switch i32 %270, label %277 [
    i32 0, label %271
    i32 2, label %276
  ]

271:                                              ; preds = %269
  br label %272

272:                                              ; preds = %271, %17
  br label %273

273:                                              ; preds = %272
  %274 = load i32, ptr %5, align 4, !tbaa !9
  %275 = add i32 %274, 1
  store i32 %275, ptr %5, align 4, !tbaa !9
  br label %11, !llvm.loop !53

276:                                              ; preds = %269, %11
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret i32 0

277:                                              ; preds = %269
  unreachable
}

declare i32 @modemcf_demodulate_soft(ptr noundef, <2 x float> noundef, ptr noundef, ptr noundef) #2

declare i32 @modemcf_demodulate(ptr noundef, <2 x float> noundef, ptr noundef) #2

declare i32 @packetizer_decode_soft(ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @packetizer_decode(ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @liquid_pack_array(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i8 noundef zeroext) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { 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 }

!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 0}
!12 = !{!"ofdmflexframesync_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, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !13, i64 108, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !10, i64 184, !10, i64 188, !10, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !14, i64 224, !16, i64 272, !15, i64 296, !6, i64 304, !10, i64 312, !10, i64 316, !10, i64 320, !10, i64 324, !10, i64 328}
!13 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!14 = !{!"", !15, i64 0, !15, i64 4, !15, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44}
!15 = !{!"float", !7, i64 0}
!16 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !17, i64 16}
!17 = !{!"long", !7, i64 0}
!18 = !{!12, !6, i64 16}
!19 = !{!7, !7, i64 0}
!20 = !{!12, !6, i64 200}
!21 = !{!12, !10, i64 324}
!22 = !{!12, !10, i64 148}
!23 = !{!12, !6, i64 160}
!24 = !{!12, !6, i64 168}
!25 = !{!12, !10, i64 128}
!26 = !{!12, !10, i64 184}
!27 = !{!12, !10, i64 328}
!28 = !{!12, !10, i64 188}
!29 = !{!12, !6, i64 152}
!30 = !{!12, !6, i64 176}
!31 = !{!12, !10, i64 192}
!32 = !{!12, !10, i64 280}
!33 = !{!12, !10, i64 132}
!34 = !{!12, !17, i64 288}
!35 = !{!12, !6, i64 304}
!36 = !{!12, !15, i64 228}
!37 = !{!12, !15, i64 232}
!38 = !{!12, !6, i64 240}
!39 = !{!12, !10, i64 248}
!40 = !{!12, !10, i64 124}
!41 = !{!12, !10, i64 252}
!42 = !{!12, !10, i64 256}
!43 = !{!12, !10, i64 136}
!44 = !{!12, !10, i64 260}
!45 = !{!12, !10, i64 140}
!46 = !{!12, !10, i64 264}
!47 = !{!12, !10, i64 144}
!48 = !{!12, !10, i64 268}
!49 = !{!12, !6, i64 208}
!50 = !{!12, !6, i64 64}
!51 = !{!12, !10, i64 104}
!52 = !{!12, !6, i64 216}
!53 = distinct !{!53, !54}
!54 = !{!"llvm.loop.mustprogress"}


; 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"

%struct.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }

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

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

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

declare float @ofdmframesync_get_rssi(ptr noundef) local_unnamed_addr #2

declare float @ofdmframesync_get_cfo(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @ofdmflexframesync_rxpayload(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #3 {
  %3 = alloca i32, align 4
  %4 = load i32, ptr %0, align 8, !tbaa !5
  %.not84 = icmp eq i32 %4, 0
  br i1 %.not84, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = getelementptr inbounds i8, ptr %0, i64 200
  %7 = getelementptr inbounds i8, ptr %0, i64 324
  %8 = getelementptr inbounds i8, ptr %0, i64 148
  %9 = getelementptr inbounds i8, ptr %0, i64 160
  %10 = getelementptr inbounds i8, ptr %0, i64 168
  %11 = getelementptr inbounds i8, ptr %0, i64 128
  %12 = getelementptr inbounds i8, ptr %0, i64 184
  %13 = getelementptr inbounds i8, ptr %0, i64 328
  %14 = getelementptr inbounds i8, ptr %0, i64 188
  br label %15

15:                                               ; preds = %.lr.ph, %116
  %16 = phi i32 [ %4, %.lr.ph ], [ %117, %116 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %116 ]
  %17 = load ptr, ptr %5, align 8, !tbaa !16
  %18 = getelementptr inbounds i8, ptr %17, i64 %indvars.iv
  %19 = load i8, ptr %18, align 1, !tbaa !17
  %20 = icmp eq i8 %19, 2
  br i1 %20, label %21, label %116

21:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %22 = getelementptr inbounds { float, float }, ptr %1, i64 %indvars.iv
  %23 = load ptr, ptr %6, align 8, !tbaa !18
  %24 = load i32, ptr %7, align 4, !tbaa !19
  %25 = zext i32 %24 to i64
  %26 = getelementptr inbounds { float, float }, ptr %23, i64 %25
  %27 = load <2 x float>, ptr %22, align 4
  store <2 x float> %27, ptr %26, align 4
  %28 = load i32, ptr %8, align 4, !tbaa !20
  %.not = icmp eq i32 %28, 0
  %29 = load ptr, ptr %9, align 8, !tbaa !21
  %30 = load <2 x float>, ptr %22, align 4
  br i1 %.not, label %39, label %31

31:                                               ; preds = %21
  %32 = load ptr, ptr %10, align 8, !tbaa !22
  %33 = load i32, ptr %11, align 8, !tbaa !23
  %34 = load i32, ptr %7, align 4, !tbaa !19
  %35 = mul i32 %34, %33
  %36 = zext i32 %35 to i64
  %37 = getelementptr inbounds i8, ptr %32, i64 %36
  %38 = call i32 @modemcf_demodulate_soft(ptr noundef %29, <2 x float> noundef %30, ptr noundef nonnull %3, ptr noundef %37) #4
  br label %51

39:                                               ; preds = %21
  %40 = call i32 @modemcf_demodulate(ptr noundef %29, <2 x float> noundef %30, ptr noundef nonnull %3) #4
  %41 = load ptr, ptr %10, align 8, !tbaa !22
  %42 = load i32, ptr %12, align 8, !tbaa !24
  %43 = load i32, ptr %13, align 8, !tbaa !25
  %44 = load i32, ptr %11, align 8, !tbaa !23
  %45 = load i32, ptr %3, align 4, !tbaa !26
  %46 = trunc i32 %45 to i8
  %47 = call i32 @liquid_pack_array(ptr noundef %41, i32 noundef %42, i32 noundef %43, i32 noundef %44, i8 noundef zeroext %46) #4
  %48 = load i32, ptr %11, align 8, !tbaa !23
  %49 = load i32, ptr %13, align 8, !tbaa !25
  %50 = add i32 %49, %48
  store i32 %50, ptr %13, align 8, !tbaa !25
  br label %51

51:                                               ; preds = %39, %31
  %52 = load i32, ptr %7, align 4, !tbaa !19
  %53 = add i32 %52, 1
  store i32 %53, ptr %7, align 4, !tbaa !19
  %54 = load i32, ptr %14, align 4, !tbaa !27
  %55 = icmp eq i32 %53, %54
  br i1 %55, label %56, label %115

56:                                               ; preds = %51
  %57 = load i32, ptr %8, align 4, !tbaa !20
  %.not76 = icmp eq i32 %57, 0
  %58 = getelementptr inbounds i8, ptr %0, i64 152
  %59 = load ptr, ptr %58, align 8, !tbaa !28
  %60 = load ptr, ptr %10, align 8, !tbaa !22
  %61 = getelementptr inbounds i8, ptr %0, i64 176
  %62 = load ptr, ptr %61, align 8, !tbaa !29
  br i1 %.not76, label %65, label %63

63:                                               ; preds = %56
  %64 = call i32 @packetizer_decode_soft(ptr noundef %59, ptr noundef %60, ptr noundef %62) #4
  br label %67

65:                                               ; preds = %56
  %66 = call i32 @packetizer_decode(ptr noundef %59, ptr noundef %60, ptr noundef %62) #4
  br label %67

67:                                               ; preds = %65, %63
  %.sink = phi i32 [ %66, %65 ], [ %64, %63 ]
  %68 = getelementptr inbounds i8, ptr %0, i64 192
  store i32 %.sink, ptr %68, align 8
  %69 = getelementptr inbounds i8, ptr %0, i64 280
  %70 = load i32, ptr %69, align 8, !tbaa !30
  %71 = add i32 %70, %.sink
  store i32 %71, ptr %69, align 8, !tbaa !30
  %72 = getelementptr inbounds i8, ptr %0, i64 132
  %73 = load i32, ptr %72, align 4, !tbaa !31
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds i8, ptr %0, i64 288
  %76 = load i64, ptr %75, align 8, !tbaa !32
  %77 = add i64 %76, %74
  store i64 %77, ptr %75, align 8, !tbaa !32
  %78 = getelementptr inbounds i8, ptr %0, i64 304
  %79 = load ptr, ptr %78, align 8, !tbaa !33
  %80 = call float @ofdmframesync_get_rssi(ptr noundef %79) #4
  %81 = getelementptr inbounds i8, ptr %0, i64 228
  store float %80, ptr %81, align 4, !tbaa !34
  %82 = load ptr, ptr %78, align 8, !tbaa !33
  %83 = call float @ofdmframesync_get_cfo(ptr noundef %82) #4
  %84 = getelementptr inbounds i8, ptr %0, i64 232
  store float %83, ptr %84, align 8, !tbaa !35
  %85 = load ptr, ptr %6, align 8, !tbaa !18
  %86 = getelementptr inbounds i8, ptr %0, i64 240
  store ptr %85, ptr %86, align 8, !tbaa !36
  %87 = load i32, ptr %14, align 4, !tbaa !27
  %88 = getelementptr inbounds i8, ptr %0, i64 248
  store i32 %87, ptr %88, align 8, !tbaa !37
  %89 = getelementptr inbounds i8, ptr %0, i64 124
  %90 = getelementptr inbounds i8, ptr %0, i64 252
  %91 = load <2 x i32>, ptr %89, align 4, !tbaa !26
  %92 = getelementptr inbounds i8, ptr %0, i64 136
  %93 = load <2 x i32>, ptr %92, align 8, !tbaa !26
  %94 = shufflevector <2 x i32> %91, <2 x i32> %93, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  store <4 x i32> %94, ptr %90, align 4, !tbaa !26
  %95 = getelementptr inbounds i8, ptr %0, i64 144
  %96 = load i32, ptr %95, align 8, !tbaa !38
  %97 = getelementptr inbounds i8, ptr %0, i64 268
  store i32 %96, ptr %97, align 4, !tbaa !39
  %98 = getelementptr inbounds i8, ptr %0, i64 208
  %99 = load ptr, ptr %98, align 8, !tbaa !40
  %100 = icmp eq ptr %99, null
  br i1 %100, label %.thread, label %101

101:                                              ; preds = %67
  %102 = getelementptr inbounds i8, ptr %0, i64 224
  %103 = getelementptr inbounds i8, ptr %0, i64 64
  %104 = load ptr, ptr %103, align 8, !tbaa !41
  %105 = getelementptr inbounds i8, ptr %0, i64 104
  %106 = load i32, ptr %105, align 8, !tbaa !42
  %107 = getelementptr inbounds i8, ptr %0, i64 176
  %108 = load ptr, ptr %107, align 8, !tbaa !29
  %109 = load i32, ptr %72, align 4, !tbaa !31
  %110 = load i32, ptr %68, align 8, !tbaa !43
  %111 = getelementptr inbounds i8, ptr %0, i64 216
  %112 = load ptr, ptr %111, align 8, !tbaa !44
  %113 = call i32 %99(ptr noundef %104, i32 noundef %106, ptr noundef %108, i32 noundef %109, i32 noundef %110, ptr noundef nonnull byval(%struct.framesyncstats_s) align 8 %102, ptr noundef %112) #4
  br label %.thread

.thread:                                          ; preds = %67, %101
  %114 = call i32 @ofdmflexframesync_reset(ptr noundef nonnull %0)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  br label %.loopexit

115:                                              ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  %.pre = load i32, ptr %0, align 8, !tbaa !5
  br label %116

116:                                              ; preds = %115, %15
  %117 = phi i32 [ %.pre, %115 ], [ %16, %15 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %118 = zext i32 %117 to i64
  %119 = icmp ult i64 %indvars.iv.next, %118
  br i1 %119, label %15, label %.loopexit, !llvm.loop !45

.loopexit:                                        ; preds = %116, %2, %.thread
  ret i32 0
}

declare i32 @modemcf_demodulate_soft(ptr noundef, <2 x float> noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @modemcf_demodulate(ptr noundef, <2 x float> noundef, ptr noundef) local_unnamed_addr #2

declare i32 @packetizer_decode_soft(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @packetizer_decode(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @liquid_pack_array(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i8 noundef zeroext) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { 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 }

!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 = !{!"ofdmflexframesync_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, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !11, i64 108, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !7, i64 184, !7, i64 188, !7, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !12, i64 224, !14, i64 272, !13, i64 296, !10, i64 304, !7, i64 312, !7, i64 316, !7, i64 320, !7, i64 324, !7, i64 328}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12}
!12 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44}
!13 = !{!"float", !8, i64 0}
!14 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !15, i64 16}
!15 = !{!"long", !8, i64 0}
!16 = !{!6, !10, i64 16}
!17 = !{!8, !8, i64 0}
!18 = !{!6, !10, i64 200}
!19 = !{!6, !7, i64 324}
!20 = !{!6, !7, i64 148}
!21 = !{!6, !10, i64 160}
!22 = !{!6, !10, i64 168}
!23 = !{!6, !7, i64 128}
!24 = !{!6, !7, i64 184}
!25 = !{!6, !7, i64 328}
!26 = !{!7, !7, i64 0}
!27 = !{!6, !7, i64 188}
!28 = !{!6, !10, i64 152}
!29 = !{!6, !10, i64 176}
!30 = !{!6, !7, i64 280}
!31 = !{!6, !7, i64 132}
!32 = !{!6, !15, i64 288}
!33 = !{!6, !10, i64 304}
!34 = !{!6, !13, i64 228}
!35 = !{!6, !13, i64 232}
!36 = !{!6, !10, i64 240}
!37 = !{!6, !7, i64 248}
!38 = !{!6, !7, i64 144}
!39 = !{!6, !7, i64 268}
!40 = !{!6, !10, i64 208}
!41 = !{!6, !10, i64 64}
!42 = !{!6, !7, i64 104}
!43 = !{!6, !7, i64 192}
!44 = !{!6, !10, i64 216}
!45 = distinct !{!45, !46}
!46 = !{!"llvm.loop.mustprogress"}


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