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

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

@.str.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [32 x i8], align 1
@__PRETTY_FUNCTION__.gmskframesync_decode_header = external hidden unnamed_addr constant [47 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [67 x i8], align 1

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

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

declare i32 @packetizer_get_enc_msg_len(ptr noundef) #1

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #2

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

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

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

29:                                               ; preds = %1
  br label %31

30:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 773, ptr noundef @__PRETTY_FUNCTION__.gmskframesync_decode_header) #6
  unreachable

31:                                               ; preds = %29
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.gmskframesync_s, ptr %32, i32 0, i32 31
  %34 = load ptr, ptr %33, align 8, !tbaa !17
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.gmskframesync_s, ptr %35, i32 0, i32 28
  %37 = load i32, ptr %36, align 4, !tbaa !18
  call void @unscramble_data(ptr noundef %34, i32 noundef %37)
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.gmskframesync_s, ptr %38, i32 0, i32 33
  %40 = load ptr, ptr %39, align 8, !tbaa !20
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.gmskframesync_s, ptr %41, i32 0, i32 31
  %43 = load ptr, ptr %42, align 8, !tbaa !17
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.gmskframesync_s, ptr %44, i32 0, i32 32
  %46 = load ptr, ptr %45, align 8, !tbaa !21
  %47 = call i32 @packetizer_decode(ptr noundef %40, ptr noundef %43, ptr noundef %46)
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.gmskframesync_s, ptr %48, i32 0, i32 34
  store i32 %47, ptr %49, align 8, !tbaa !22
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.gmskframesync_s, ptr %50, i32 0, i32 34
  %52 = load i32, ptr %51, align 8, !tbaa !22
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %55, label %54

54:                                               ; preds = %31
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %226

55:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.gmskframesync_s, ptr %56, i32 0, i32 27
  %58 = load i32, ptr %57, align 8, !tbaa !23
  store i32 %58, ptr %6, align 4, !tbaa !19
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.gmskframesync_s, ptr %59, i32 0, i32 32
  %61 = load ptr, ptr %60, align 8, !tbaa !21
  %62 = load i32, ptr %6, align 4, !tbaa !19
  %63 = add i32 %62, 0
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds i8, ptr %61, i64 %64
  %66 = load i8, ptr %65, align 1, !tbaa !24
  %67 = zext i8 %66 to i32
  %68 = icmp ne i32 %67, 4
  br i1 %68, label %69, label %82

69:                                               ; preds = %55
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.gmskframesync_s, ptr %70, i32 0, i32 32
  %72 = load ptr, ptr %71, align 8, !tbaa !21
  %73 = load i32, ptr %6, align 4, !tbaa !19
  %74 = add i32 %73, 0
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds i8, ptr %72, i64 %75
  %77 = load i8, ptr %76, align 1, !tbaa !24
  %78 = zext i8 %77 to i32
  %79 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str.1, i32 noundef 789, ptr noundef @.str.6, i32 noundef %78, i32 noundef 4)
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.gmskframesync_s, ptr %80, i32 0, i32 34
  store i32 0, ptr %81, align 8, !tbaa !22
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %225

82:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.gmskframesync_s, ptr %83, i32 0, i32 32
  %85 = load ptr, ptr %84, align 8, !tbaa !21
  %86 = load i32, ptr %6, align 4, !tbaa !19
  %87 = add i32 %86, 1
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %85, i64 %88
  %90 = load i8, ptr %89, align 1, !tbaa !24
  %91 = zext i8 %90 to i32
  %92 = shl i32 %91, 8
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.gmskframesync_s, ptr %93, i32 0, i32 32
  %95 = load ptr, ptr %94, align 8, !tbaa !21
  %96 = load i32, ptr %6, align 4, !tbaa !19
  %97 = add i32 %96, 2
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds i8, ptr %95, i64 %98
  %100 = load i8, ptr %99, align 1, !tbaa !24
  %101 = zext i8 %100 to i32
  %102 = or i32 %92, %101
  store i32 %102, ptr %7, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.gmskframesync_s, ptr %103, i32 0, i32 32
  %105 = load ptr, ptr %104, align 8, !tbaa !21
  %106 = load i32, ptr %6, align 4, !tbaa !19
  %107 = add i32 %106, 3
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds i8, ptr %105, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !24
  %111 = zext i8 %110 to i32
  %112 = ashr i32 %111, 5
  %113 = and i32 %112, 7
  store i32 %113, ptr %8, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.gmskframesync_s, ptr %114, i32 0, i32 32
  %116 = load ptr, ptr %115, align 8, !tbaa !21
  %117 = load i32, ptr %6, align 4, !tbaa !19
  %118 = add i32 %117, 3
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds i8, ptr %116, i64 %119
  %121 = load i8, ptr %120, align 1, !tbaa !24
  %122 = zext i8 %121 to i32
  %123 = and i32 %122, 31
  store i32 %123, ptr %9, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.gmskframesync_s, ptr %124, i32 0, i32 32
  %126 = load ptr, ptr %125, align 8, !tbaa !21
  %127 = load i32, ptr %6, align 4, !tbaa !19
  %128 = add i32 %127, 4
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds i8, ptr %126, i64 %129
  %131 = load i8, ptr %130, align 1, !tbaa !24
  %132 = zext i8 %131 to i32
  %133 = and i32 %132, 31
  store i32 %133, ptr %10, align 4, !tbaa !19
  %134 = load i32, ptr %8, align 4, !tbaa !19
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %139, label %136

136:                                              ; preds = %82
  %137 = load i32, ptr %8, align 4, !tbaa !19
  %138 = icmp uge i32 %137, 7
  br i1 %138, label %139, label %144

139:                                              ; preds = %136, %82
  %140 = load i32, ptr %8, align 4, !tbaa !19
  %141 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str.1, i32 noundef 807, ptr noundef @.str.7, i32 noundef %140)
  store i32 0, ptr %8, align 4, !tbaa !19
  %142 = load ptr, ptr %3, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.gmskframesync_s, ptr %142, i32 0, i32 34
  store i32 0, ptr %143, align 8, !tbaa !22
  br label %144

144:                                              ; preds = %139, %136
  %145 = load i32, ptr %9, align 4, !tbaa !19
  %146 = icmp uge i32 %145, 28
  br i1 %146, label %147, label %152

147:                                              ; preds = %144
  %148 = load i32, ptr %9, align 4, !tbaa !19
  %149 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str.1, i32 noundef 812, ptr noundef @.str.8, i32 noundef %148)
  store i32 0, ptr %9, align 4, !tbaa !19
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.gmskframesync_s, ptr %150, i32 0, i32 34
  store i32 0, ptr %151, align 8, !tbaa !22
  br label %152

152:                                              ; preds = %147, %144
  %153 = load i32, ptr %10, align 4, !tbaa !19
  %154 = icmp uge i32 %153, 28
  br i1 %154, label %155, label %160

155:                                              ; preds = %152
  %156 = load i32, ptr %10, align 4, !tbaa !19
  %157 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str.1, i32 noundef 817, ptr noundef @.str.9, i32 noundef %156)
  store i32 0, ptr %10, align 4, !tbaa !19
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.gmskframesync_s, ptr %158, i32 0, i32 34
  store i32 0, ptr %159, align 8, !tbaa !22
  br label %160

160:                                              ; preds = %155, %152
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.gmskframesync_s, ptr %161, i32 0, i32 34
  %163 = load i32, ptr %162, align 8, !tbaa !22
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %224

165:                                              ; preds = %160
  %166 = load i32, ptr %7, align 4, !tbaa !19
  %167 = load ptr, ptr %3, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.gmskframesync_s, ptr %167, i32 0, i32 40
  store i32 %166, ptr %168, align 8, !tbaa !25
  %169 = load i32, ptr %8, align 4, !tbaa !19
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.gmskframesync_s, ptr %170, i32 0, i32 36
  store i32 %169, ptr %171, align 8, !tbaa !26
  %172 = load i32, ptr %9, align 4, !tbaa !19
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.gmskframesync_s, ptr %173, i32 0, i32 37
  store i32 %172, ptr %174, align 4, !tbaa !27
  %175 = load i32, ptr %10, align 4, !tbaa !19
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.gmskframesync_s, ptr %176, i32 0, i32 38
  store i32 %175, ptr %177, align 8, !tbaa !28
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.gmskframesync_s, ptr %178, i32 0, i32 43
  %180 = load ptr, ptr %179, align 8, !tbaa !29
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.gmskframesync_s, ptr %181, i32 0, i32 40
  %183 = load i32, ptr %182, align 8, !tbaa !25
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.gmskframesync_s, ptr %184, i32 0, i32 36
  %186 = load i32, ptr %185, align 8, !tbaa !26
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.gmskframesync_s, ptr %187, i32 0, i32 37
  %189 = load i32, ptr %188, align 4, !tbaa !27
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.gmskframesync_s, ptr %190, i32 0, i32 38
  %192 = load i32, ptr %191, align 8, !tbaa !28
  %193 = call ptr @packetizer_recreate(ptr noundef %180, i32 noundef %183, i32 noundef %186, i32 noundef %189, i32 noundef %192)
  %194 = load ptr, ptr %3, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.gmskframesync_s, ptr %194, i32 0, i32 43
  store ptr %193, ptr %195, align 8, !tbaa !29
  %196 = load ptr, ptr %3, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.gmskframesync_s, ptr %196, i32 0, i32 43
  %198 = load ptr, ptr %197, align 8, !tbaa !29
  %199 = call i32 @packetizer_get_enc_msg_len(ptr noundef %198)
  %200 = load ptr, ptr %3, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.gmskframesync_s, ptr %200, i32 0, i32 39
  store i32 %199, ptr %201, align 4, !tbaa !30
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.gmskframesync_s, ptr %202, i32 0, i32 41
  %204 = load ptr, ptr %203, align 8, !tbaa !31
  %205 = load ptr, ptr %3, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.gmskframesync_s, ptr %205, i32 0, i32 39
  %207 = load i32, ptr %206, align 4, !tbaa !30
  %208 = zext i32 %207 to i64
  %209 = mul i64 %208, 1
  %210 = call ptr @realloc(ptr noundef %204, i64 noundef %209) #7
  %211 = load ptr, ptr %3, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.gmskframesync_s, ptr %211, i32 0, i32 41
  store ptr %210, ptr %212, align 8, !tbaa !31
  %213 = load ptr, ptr %3, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.gmskframesync_s, ptr %213, i32 0, i32 42
  %215 = load ptr, ptr %214, align 8, !tbaa !32
  %216 = load ptr, ptr %3, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.gmskframesync_s, ptr %216, i32 0, i32 40
  %218 = load i32, ptr %217, align 8, !tbaa !25
  %219 = zext i32 %218 to i64
  %220 = mul i64 %219, 1
  %221 = call ptr @realloc(ptr noundef %215, i64 noundef %220) #7
  %222 = load ptr, ptr %3, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.gmskframesync_s, ptr %222, i32 0, i32 42
  store ptr %221, ptr %223, align 8, !tbaa !32
  br label %224

224:                                              ; preds = %165, %160
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %225

225:                                              ; preds = %224, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %226

226:                                              ; preds = %225, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %227 = load i32, ptr %2, align 4
  ret i32 %227
}

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

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

declare void @unscramble_data(ptr noundef, i32 noundef) #1

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

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

!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, !6, i64 248}
!10 = !{!"gmskframesync_s", !6, i64 0, !11, i64 8, !11, i64 12, !12, i64 16, !6, i64 24, !6, i64 32, !13, i64 40, !14, i64 88, !7, i64 112, !12, i64 120, !6, i64 128, !6, i64 136, !11, i64 144, !12, i64 148, !12, i64 152, !11, i64 156, !11, i64 160, !12, i64 164, !6, i64 168, !12, i64 176, !12, i64 180, !12, i64 184, !6, i64 192, !6, i64 200, !11, i64 208, !6, i64 216, !6, i64 224, !11, i64 232, !11, i64 236, !11, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !11, i64 280, !7, i64 284, !11, i64 288, !11, i64 292, !11, i64 296, !11, i64 300, !11, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !11, i64 336, !11, i64 340, !11, i64 344, !11, i64 348, !11, i64 352}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44}
!14 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !15, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!10, !11, i64 240}
!17 = !{!10, !6, i64 256}
!18 = !{!10, !11, i64 236}
!19 = !{!11, !11, i64 0}
!20 = !{!10, !6, i64 272}
!21 = !{!10, !6, i64 264}
!22 = !{!10, !11, i64 280}
!23 = !{!10, !11, i64 232}
!24 = !{!7, !7, i64 0}
!25 = !{!10, !11, i64 304}
!26 = !{!10, !11, i64 288}
!27 = !{!10, !11, i64 292}
!28 = !{!10, !11, i64 296}
!29 = !{!10, !6, i64 328}
!30 = !{!10, !11, i64 300}
!31 = !{!10, !6, i64 312}
!32 = !{!10, !6, i64 320}


; 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.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [32 x i8], align 1
@__PRETTY_FUNCTION__.gmskframesync_decode_header = external hidden unnamed_addr constant [47 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [67 x i8], align 1

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

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

declare i32 @packetizer_get_enc_msg_len(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @gmskframesync_decode_header(ptr nocapture noundef %0) local_unnamed_addr #4 {
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %3 = getelementptr inbounds i8, ptr %0, i64 248
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 240
  %6 = load i32, ptr %5, align 8, !tbaa !15
  %7 = getelementptr inbounds i8, ptr %0, i64 256
  %8 = load ptr, ptr %7, align 8, !tbaa !16
  %9 = getelementptr inbounds i8, ptr %0, i64 236
  %10 = load i32, ptr %9, align 4, !tbaa !17
  %11 = call i32 @liquid_pack_bytes(ptr noundef %4, i32 noundef %6, ptr noundef %8, i32 noundef %10, ptr noundef nonnull %2) #5
  %12 = load i32, ptr %2, align 4, !tbaa !18
  %13 = load i32, ptr %9, align 4, !tbaa !17
  %14 = icmp eq i32 %12, %13
  br i1 %14, label %16, label %15

15:                                               ; preds = %1
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 773, ptr noundef nonnull @__PRETTY_FUNCTION__.gmskframesync_decode_header) #6
  unreachable

16:                                               ; preds = %1
  %17 = load ptr, ptr %7, align 8, !tbaa !16
  call void @unscramble_data(ptr noundef %17, i32 noundef %12) #5
  %18 = getelementptr inbounds i8, ptr %0, i64 272
  %19 = load ptr, ptr %18, align 8, !tbaa !19
  %20 = load ptr, ptr %7, align 8, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %0, i64 264
  %22 = load ptr, ptr %21, align 8, !tbaa !20
  %23 = call i32 @packetizer_decode(ptr noundef %19, ptr noundef %20, ptr noundef %22) #5
  %24 = getelementptr inbounds i8, ptr %0, i64 280
  store i32 %23, ptr %24, align 8, !tbaa !21
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %.thread82, label %25

25:                                               ; preds = %16
  %26 = getelementptr inbounds i8, ptr %0, i64 232
  %27 = load i32, ptr %26, align 8, !tbaa !22
  %28 = load ptr, ptr %21, align 8, !tbaa !20
  %29 = zext i32 %27 to i64
  %30 = getelementptr inbounds i8, ptr %28, i64 %29
  %31 = load i8, ptr %30, align 1, !tbaa !23
  %.not71 = icmp eq i8 %31, 4
  br i1 %.not71, label %35, label %32

32:                                               ; preds = %25
  %33 = zext i8 %31 to i32
  %34 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str.1, i32 noundef 789, ptr noundef nonnull @.str.6, i32 noundef %33, i32 noundef 4) #5
  store i32 0, ptr %24, align 8, !tbaa !21
  br label %.thread82

35:                                               ; preds = %25
  %36 = add i32 %27, 1
  %37 = zext i32 %36 to i64
  %38 = getelementptr inbounds i8, ptr %28, i64 %37
  %39 = load i8, ptr %38, align 1, !tbaa !23
  %40 = zext i8 %39 to i32
  %41 = shl nuw nsw i32 %40, 8
  %42 = add i32 %27, 2
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds i8, ptr %28, i64 %43
  %45 = load i8, ptr %44, align 1, !tbaa !23
  %46 = zext i8 %45 to i32
  %47 = or disjoint i32 %41, %46
  %48 = add i32 %27, 3
  %49 = zext i32 %48 to i64
  %50 = getelementptr inbounds i8, ptr %28, i64 %49
  %51 = load i8, ptr %50, align 1, !tbaa !23
  %52 = zext i8 %51 to i32
  %53 = lshr i32 %52, 5
  %54 = and i32 %52, 31
  %55 = add i32 %27, 4
  %56 = zext i32 %55 to i64
  %57 = getelementptr inbounds i8, ptr %28, i64 %56
  %58 = load i8, ptr %57, align 1, !tbaa !23
  %59 = and i8 %58, 31
  %60 = zext nneg i8 %59 to i32
  %61 = icmp ult i8 %51, 32
  %62 = icmp eq i32 %53, 7
  %or.cond = or i1 %61, %62
  br i1 %or.cond, label %63, label %65

63:                                               ; preds = %35
  %64 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str.1, i32 noundef 807, ptr noundef nonnull @.str.7, i32 noundef %53) #5
  store i32 0, ptr %24, align 8, !tbaa !21
  br label %65

65:                                               ; preds = %35, %63
  %.063 = phi i32 [ 0, %63 ], [ %53, %35 ]
  %66 = icmp ugt i32 %54, 27
  br i1 %66, label %.thread77, label %67

67:                                               ; preds = %65
  %68 = icmp ugt i8 %59, 27
  br i1 %68, label %.thread, label %72

.thread77:                                        ; preds = %65
  %69 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str.1, i32 noundef 812, ptr noundef nonnull @.str.8, i32 noundef %54) #5
  store i32 0, ptr %24, align 8, !tbaa !21
  %70 = icmp ugt i8 %59, 27
  br i1 %70, label %.thread, label %.thread82

.thread:                                          ; preds = %.thread77, %67
  %71 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str.1, i32 noundef 817, ptr noundef nonnull @.str.9, i32 noundef %60) #5
  store i32 0, ptr %24, align 8, !tbaa !21
  br label %.thread82

72:                                               ; preds = %67
  br i1 %or.cond, label %.thread82, label %73

73:                                               ; preds = %72
  %74 = getelementptr inbounds i8, ptr %0, i64 304
  store i32 %47, ptr %74, align 8, !tbaa !24
  %75 = getelementptr inbounds i8, ptr %0, i64 288
  store i32 %.063, ptr %75, align 8, !tbaa !25
  %76 = getelementptr inbounds i8, ptr %0, i64 292
  store i32 %54, ptr %76, align 4, !tbaa !26
  %77 = getelementptr inbounds i8, ptr %0, i64 296
  store i32 %60, ptr %77, align 8, !tbaa !27
  %78 = getelementptr inbounds i8, ptr %0, i64 328
  %79 = load ptr, ptr %78, align 8, !tbaa !28
  %80 = call ptr @packetizer_recreate(ptr noundef %79, i32 noundef %47, i32 noundef %.063, i32 noundef %54, i32 noundef %60) #5
  store ptr %80, ptr %78, align 8, !tbaa !28
  %81 = call i32 @packetizer_get_enc_msg_len(ptr noundef %80) #5
  %82 = getelementptr inbounds i8, ptr %0, i64 300
  store i32 %81, ptr %82, align 4, !tbaa !29
  %83 = getelementptr inbounds i8, ptr %0, i64 312
  %84 = load ptr, ptr %83, align 8, !tbaa !30
  %85 = zext i32 %81 to i64
  %86 = call ptr @realloc(ptr noundef %84, i64 noundef %85) #7
  store ptr %86, ptr %83, align 8, !tbaa !30
  %87 = getelementptr inbounds i8, ptr %0, i64 320
  %88 = load ptr, ptr %87, align 8, !tbaa !31
  %89 = load i32, ptr %74, align 8, !tbaa !24
  %90 = zext i32 %89 to i64
  %91 = call ptr @realloc(ptr noundef %88, i64 noundef %90) #7
  store ptr %91, ptr %87, align 8, !tbaa !31
  br label %.thread82

.thread82:                                        ; preds = %.thread77, %.thread, %32, %73, %72, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  ret i32 0
}

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

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

declare void @unscramble_data(ptr noundef, i32 noundef) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, 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 = { 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind allocsize(1) }

!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 248}
!6 = !{!"gmskframesync_s", !7, i64 0, !10, i64 8, !10, i64 12, !11, i64 16, !7, i64 24, !7, i64 32, !12, i64 40, !13, i64 88, !8, i64 112, !11, i64 120, !7, i64 128, !7, i64 136, !10, i64 144, !11, i64 148, !11, i64 152, !10, i64 156, !10, i64 160, !11, i64 164, !7, i64 168, !11, i64 176, !11, i64 180, !11, i64 184, !7, i64 192, !7, i64 200, !10, i64 208, !7, i64 216, !7, i64 224, !10, i64 232, !10, i64 236, !10, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !7, i64 272, !10, i64 280, !8, i64 284, !10, i64 288, !10, i64 292, !10, i64 296, !10, i64 300, !10, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !10, i64 352}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44}
!13 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !14, i64 16}
!14 = !{!"long", !8, i64 0}
!15 = !{!6, !10, i64 240}
!16 = !{!6, !7, i64 256}
!17 = !{!6, !10, i64 236}
!18 = !{!10, !10, i64 0}
!19 = !{!6, !7, i64 272}
!20 = !{!6, !7, i64 264}
!21 = !{!6, !10, i64 280}
!22 = !{!6, !10, i64 232}
!23 = !{!8, !8, i64 0}
!24 = !{!6, !10, i64 304}
!25 = !{!6, !10, i64 288}
!26 = !{!6, !10, i64 292}
!27 = !{!6, !10, i64 296}
!28 = !{!6, !7, i64 328}
!29 = !{!6, !10, i64 300}
!30 = !{!6, !7, i64 312}
!31 = !{!6, !7, i64 320}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass