; LLVM IR from Water-Melon/Melon :: src (mln_fec)

; 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.mln_string_t = type { ptr, i64, i32 }
%struct.mln_fec_t = type { i16, i8 }

@__const.mln_fec_decode.fec_packet = external hidden unnamed_addr constant { ptr, i64, i8, i8, i8, i8 }, align 8

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mln_string_vector_free(ptr noundef) #0

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

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mln_string_vector_new(i64 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden ptr @mln_fec_result_new(ptr noundef, i64 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local ptr @mln_fec_decode(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i16, align 2
  %15 = alloca i16, align 2
  %16 = alloca %struct.mln_string_t, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %struct.mln_string_t, align 8
  %19 = alloca [1472 x i8], align 16
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i64 %3, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 2, ptr %14) #7
  store i16 0, ptr %14, align 2, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 2, ptr %15) #7
  store i16 0, ptr %15, align 2, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 @__const.mln_fec_decode.fec_packet, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 1472, ptr %19) #7
  call void @llvm.memset.p0.i64(ptr align 16 %19, i8 0, i64 1472, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !9
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %35, label %26

26:                                               ; preds = %4
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = icmp eq ptr %27, null
  br i1 %28, label %35, label %29

29:                                               ; preds = %26
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = icmp eq ptr %30, null
  br i1 %31, label %35, label %32

32:                                               ; preds = %29
  %33 = load i64, ptr %9, align 8, !tbaa !9
  %34 = icmp ne i64 %33, 0
  br i1 %34, label %37, label %35

35:                                               ; preds = %32, %29, %26, %4
  %36 = call ptr @__errno_location() #8
  store i32 22, ptr %36, align 4, !tbaa !13
  store ptr null, ptr %5, align 8
  store i32 1, ptr %21, align 4
  br label %202

37:                                               ; preds = %32
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %38, ptr %11, align 8, !tbaa !5
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %39, ptr %12, align 8, !tbaa !5
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load i64, ptr %9, align 8, !tbaa !9
  %42 = getelementptr inbounds i16, ptr %40, i64 %41
  store ptr %42, ptr %13, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %117, %37
  %44 = load ptr, ptr %12, align 8, !tbaa !5
  %45 = load ptr, ptr %13, align 8, !tbaa !5
  %46 = icmp ult ptr %44, %45
  br i1 %46, label %47, label %122

47:                                               ; preds = %43
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = load i16, ptr %48, align 2, !tbaa !11
  %50 = zext i16 %49 to i32
  %51 = icmp slt i32 %50, 12
  br i1 %51, label %57, label %52

52:                                               ; preds = %47
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = load i16, ptr %53, align 2, !tbaa !11
  %55 = zext i16 %54 to i32
  %56 = icmp sgt i32 %55, 1472
  br i1 %56, label %57, label %59

57:                                               ; preds = %52, %47
  %58 = call ptr @__errno_location() #8
  store i32 22, ptr %58, align 4, !tbaa !13
  store ptr null, ptr %5, align 8
  store i32 1, ptr %21, align 4
  br label %202

59:                                               ; preds = %52
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %61, i64 1
  %63 = load i8, ptr %62, align 1, !tbaa !15
  %64 = zext i8 %63 to i32
  %65 = and i32 %64, 127
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.mln_fec_t, ptr %66, i32 0, i32 1
  %68 = load i8, ptr %67, align 2
  %69 = and i8 %68, 127
  %70 = zext i8 %69 to i16
  %71 = zext i16 %70 to i32
  %72 = icmp eq i32 %65, %71
  br i1 %72, label %73, label %116

73:                                               ; preds = %59
  %74 = load ptr, ptr %12, align 8, !tbaa !5
  %75 = load i16, ptr %74, align 2, !tbaa !11
  %76 = zext i16 %75 to i32
  %77 = icmp slt i32 %76, 26
  br i1 %77, label %91, label %78

78:                                               ; preds = %73
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %80, i64 12
  %82 = load i8, ptr %81, align 1, !tbaa !15
  %83 = zext i8 %82 to i32
  %84 = and i32 %83, 64
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %93

86:                                               ; preds = %78
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = load i16, ptr %87, align 2, !tbaa !11
  %89 = zext i16 %88 to i32
  %90 = icmp slt i32 %89, 30
  br i1 %90, label %91, label %93

91:                                               ; preds = %86, %73
  %92 = call ptr @__errno_location() #8
  store i32 22, ptr %92, align 4, !tbaa !13
  store ptr null, ptr %5, align 8
  store i32 1, ptr %21, align 4
  br label %202

93:                                               ; preds = %86, %78
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = load ptr, ptr %94, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.mln_string_t, ptr %16, i32 0, i32 0
  store ptr %95, ptr %96, align 8, !tbaa !16
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  %98 = load i16, ptr %97, align 2, !tbaa !11
  %99 = zext i16 %98 to i64
  %100 = getelementptr inbounds %struct.mln_string_t, ptr %16, i32 0, i32 1
  store i64 %99, ptr %100, align 8, !tbaa !18
  %101 = getelementptr inbounds %struct.mln_string_t, ptr %16, i32 0, i32 2
  %102 = load i32, ptr %101, align 8
  %103 = and i32 %102, -2
  %104 = or i32 %103, 1
  store i32 %104, ptr %101, align 8
  %105 = getelementptr inbounds %struct.mln_string_t, ptr %16, i32 0, i32 2
  %106 = load i32, ptr %105, align 8
  %107 = and i32 %106, -3
  %108 = or i32 %107, 0
  store i32 %108, ptr %105, align 8
  %109 = getelementptr inbounds %struct.mln_string_t, ptr %16, i32 0, i32 2
  %110 = load i32, ptr %109, align 8
  %111 = and i32 %110, 3
  %112 = or i32 %111, 4
  store i32 %112, ptr %109, align 8
  store ptr %16, ptr %22, align 8, !tbaa !5
  %113 = load ptr, ptr %22, align 8, !tbaa !5
  %114 = load i16, ptr %14, align 2, !tbaa !11
  %115 = add i16 %114, 1
  store i16 %115, ptr %14, align 2, !tbaa !11
  br label %117

116:                                              ; preds = %59
  br label %117

117:                                              ; preds = %116, %93
  %118 = load ptr, ptr %12, align 8, !tbaa !5
  %119 = getelementptr inbounds i16, ptr %118, i32 1
  store ptr %119, ptr %12, align 8, !tbaa !5
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = getelementptr inbounds ptr, ptr %120, i32 1
  store ptr %121, ptr %11, align 8, !tbaa !5
  br label %43, !llvm.loop !19

122:                                              ; preds = %43
  %123 = load i16, ptr %14, align 2, !tbaa !11
  %124 = zext i16 %123 to i32
  %125 = icmp sgt i32 %124, 1
  br i1 %125, label %126, label %128

126:                                              ; preds = %122
  %127 = call ptr @__errno_location() #8
  store i32 22, ptr %127, align 4, !tbaa !13
  store ptr null, ptr %5, align 8
  store i32 1, ptr %21, align 4
  br label %202

128:                                              ; preds = %122
  %129 = load i16, ptr %14, align 2, !tbaa !11
  %130 = icmp ne i16 %129, 0
  br i1 %130, label %139, label %131

131:                                              ; preds = %128
  br label %132

132:                                              ; preds = %151, %131
  %133 = call ptr @mln_fec_result_new(ptr noundef null, i64 noundef 0)
  store ptr %133, ptr %10, align 8, !tbaa !5
  %134 = icmp eq ptr %133, null
  br i1 %134, label %135, label %137

135:                                              ; preds = %132
  %136 = call ptr @__errno_location() #8
  store i32 12, ptr %136, align 4, !tbaa !13
  store ptr null, ptr %5, align 8
  store i32 1, ptr %21, align 4
  br label %202

137:                                              ; preds = %132
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %138, ptr %5, align 8
  store i32 1, ptr %21, align 4
  br label %202

139:                                              ; preds = %128
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds [1472 x i8], ptr %19, i64 0, i64 0
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = load i64, ptr %9, align 8, !tbaa !9
  %145 = call i32 @mln_fec_decode_header(ptr noundef %140, ptr noundef %16, ptr noundef %141, ptr noundef %20, ptr noundef %142, ptr noundef %143, i64 noundef %144, ptr noundef %15)
  %146 = icmp slt i32 %145, 0
  br i1 %146, label %147, label %148

147:                                              ; preds = %139
  store ptr null, ptr %5, align 8
  store i32 1, ptr %21, align 4
  br label %202

148:                                              ; preds = %139
  %149 = load i64, ptr %20, align 8, !tbaa !9
  %150 = icmp ne i64 %149, 0
  br i1 %150, label %152, label %151

151:                                              ; preds = %148
  br label %132

152:                                              ; preds = %148
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  %154 = getelementptr inbounds [1472 x i8], ptr %19, i64 0, i64 0
  %155 = load i64, ptr %20, align 8, !tbaa !9
  %156 = getelementptr inbounds i8, ptr %154, i64 %155
  %157 = load ptr, ptr %7, align 8, !tbaa !5
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = load i64, ptr %9, align 8, !tbaa !9
  %160 = load i16, ptr %15, align 2, !tbaa !11
  %161 = call i32 @mln_fec_decode_body(ptr noundef %153, ptr noundef %16, ptr noundef %156, ptr noundef %20, ptr noundef %157, ptr noundef %158, i64 noundef %159, i16 noundef zeroext %160)
  %162 = icmp slt i32 %161, 0
  br i1 %162, label %163, label %164

163:                                              ; preds = %152
  store ptr null, ptr %5, align 8
  store i32 1, ptr %21, align 4
  br label %202

164:                                              ; preds = %152
  %165 = call ptr @mln_string_vector_new(i64 noundef 1)
  store ptr %165, ptr %17, align 8, !tbaa !5
  %166 = icmp eq ptr %165, null
  br i1 %166, label %167, label %169

167:                                              ; preds = %164
  %168 = call ptr @__errno_location() #8
  store i32 12, ptr %168, align 4, !tbaa !13
  store ptr null, ptr %5, align 8
  store i32 1, ptr %21, align 4
  br label %202

169:                                              ; preds = %164
  %170 = getelementptr inbounds [1472 x i8], ptr %19, i64 0, i64 0
  %171 = getelementptr inbounds %struct.mln_string_t, ptr %18, i32 0, i32 0
  store ptr %170, ptr %171, align 8, !tbaa !16
  %172 = load i64, ptr %20, align 8, !tbaa !9
  %173 = getelementptr inbounds %struct.mln_string_t, ptr %18, i32 0, i32 1
  store i64 %172, ptr %173, align 8, !tbaa !18
  %174 = getelementptr inbounds %struct.mln_string_t, ptr %18, i32 0, i32 2
  %175 = load i32, ptr %174, align 8
  %176 = and i32 %175, -2
  %177 = or i32 %176, 1
  store i32 %177, ptr %174, align 8
  %178 = getelementptr inbounds %struct.mln_string_t, ptr %18, i32 0, i32 2
  %179 = load i32, ptr %178, align 8
  %180 = and i32 %179, -3
  %181 = or i32 %180, 0
  store i32 %181, ptr %178, align 8
  %182 = getelementptr inbounds %struct.mln_string_t, ptr %18, i32 0, i32 2
  %183 = load i32, ptr %182, align 8
  %184 = and i32 %183, 3
  %185 = or i32 %184, 4
  store i32 %185, ptr %182, align 8
  store ptr %18, ptr %23, align 8, !tbaa !5
  %186 = load ptr, ptr %23, align 8, !tbaa !5
  %187 = call ptr @mln_string_dup(ptr noundef %18)
  %188 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %187, ptr %188, align 8, !tbaa !5
  %189 = icmp eq ptr %187, null
  br i1 %189, label %190, label %193

190:                                              ; preds = %169
  %191 = load ptr, ptr %17, align 8, !tbaa !5
  call void @mln_string_vector_free(ptr noundef %191)
  %192 = call ptr @__errno_location() #8
  store i32 12, ptr %192, align 4, !tbaa !13
  store ptr null, ptr %5, align 8
  store i32 1, ptr %21, align 4
  br label %202

193:                                              ; preds = %169
  %194 = load ptr, ptr %17, align 8, !tbaa !5
  %195 = call ptr @mln_fec_result_new(ptr noundef %194, i64 noundef 1)
  store ptr %195, ptr %10, align 8, !tbaa !5
  %196 = icmp eq ptr %195, null
  br i1 %196, label %197, label %200

197:                                              ; preds = %193
  %198 = load ptr, ptr %17, align 8, !tbaa !5
  call void @mln_string_vector_free(ptr noundef %198)
  %199 = call ptr @__errno_location() #8
  store i32 12, ptr %199, align 4, !tbaa !13
  store ptr null, ptr %5, align 8
  store i32 1, ptr %21, align 4
  br label %202

200:                                              ; preds = %193
  %201 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %201, ptr %5, align 8
  store i32 1, ptr %21, align 4
  br label %202

202:                                              ; preds = %200, %197, %190, %167, %163, %147, %137, %135, %126, %91, %57, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 1472, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %203 = load ptr, ptr %5, align 8
  ret ptr %203
}

; 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) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: nounwind uwtable
declare hidden i32 @mln_fec_decode_header(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden i32 @mln_fec_decode_body(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i16 noundef zeroext) #3

declare ptr @mln_string_dup(ptr noundef) #6

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

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 16, !10, i64 16}
!18 = !{!17, !10, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"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.mln_string_t = type { ptr, i64, i32 }

@__const.mln_fec_decode.fec_packet = external hidden unnamed_addr constant { ptr, i64, i8, i8, i8, i8 }, align 8

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mln_string_vector_free(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mln_string_vector_new(i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden ptr @mln_fec_result_new(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local ptr @mln_fec_decode(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3) local_unnamed_addr #3 {
  %5 = alloca i16, align 2
  %6 = alloca %struct.mln_string_t, align 8
  %7 = alloca %struct.mln_string_t, align 8
  %8 = alloca [1472 x i8], align 16
  %9 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %5) #7
  store i16 0, ptr %5, align 2, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) @__const.mln_fec_decode.fec_packet, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 1472, ptr nonnull %8) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1472) %8, i8 0, i64 1472, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  store i64 0, ptr %9, align 8, !tbaa !9
  %10 = icmp ne ptr %0, null
  %11 = icmp ne ptr %1, null
  %or.cond.not57 = and i1 %10, %11
  %12 = icmp ne ptr %2, null
  %or.cond3.not54 = and i1 %or.cond.not57, %12
  %13 = icmp ne i64 %3, 0
  %or.cond5 = and i1 %or.cond3.not54, %13
  br i1 %or.cond5, label %14, label %.sink.split

14:                                               ; preds = %4
  %15 = getelementptr inbounds i16, ptr %2, i64 %3
  %16 = icmp sgt i64 %3, 0
  br i1 %16, label %.lr.ph, label %.thread

.lr.ph:                                           ; preds = %14
  %17 = getelementptr inbounds i8, ptr %0, i64 2
  %18 = getelementptr inbounds i8, ptr %6, i64 8
  %19 = getelementptr inbounds i8, ptr %6, i64 16
  br label %20

20:                                               ; preds = %.lr.ph, %41
  %.04565 = phi ptr [ %1, %.lr.ph ], [ %43, %41 ]
  %.04664 = phi i16 [ 0, %.lr.ph ], [ %.1, %41 ]
  %.04763 = phi ptr [ %2, %.lr.ph ], [ %42, %41 ]
  %21 = load i16, ptr %.04763, align 2, !tbaa !5
  %22 = add i16 %21, -1473
  %or.cond = icmp ult i16 %22, -1461
  br i1 %or.cond, label %.sink.split, label %23

23:                                               ; preds = %20
  %24 = load ptr, ptr %.04565, align 8, !tbaa !11
  %25 = getelementptr inbounds i8, ptr %24, i64 1
  %26 = load i8, ptr %25, align 1, !tbaa !13
  %27 = load i8, ptr %17, align 2
  %28 = xor i8 %27, %26
  %29 = and i8 %28, 127
  %30 = icmp eq i8 %29, 0
  br i1 %30, label %31, label %41

31:                                               ; preds = %23
  %32 = icmp ult i16 %21, 26
  br i1 %32, label %.sink.split, label %33

33:                                               ; preds = %31
  %34 = getelementptr inbounds i8, ptr %24, i64 12
  %35 = load i8, ptr %34, align 1, !tbaa !13
  %36 = and i8 %35, 64
  %.not59 = icmp ne i8 %36, 0
  %37 = icmp ult i16 %21, 30
  %or.cond60 = and i1 %37, %.not59
  br i1 %or.cond60, label %.sink.split, label %38

38:                                               ; preds = %33
  store ptr %24, ptr %6, align 8, !tbaa !14
  %39 = zext nneg i16 %21 to i64
  store i64 %39, ptr %18, align 8, !tbaa !16
  store i32 5, ptr %19, align 8
  %40 = add i16 %.04664, 1
  br label %41

41:                                               ; preds = %23, %38
  %.1 = phi i16 [ %40, %38 ], [ %.04664, %23 ]
  %42 = getelementptr inbounds i8, ptr %.04763, i64 2
  %43 = getelementptr inbounds i8, ptr %.04565, i64 8
  %44 = icmp ult ptr %42, %15
  br i1 %44, label %20, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %41
  %45 = icmp ugt i16 %.1, 1
  br i1 %45, label %.sink.split, label %46

46:                                               ; preds = %._crit_edge
  %.not = icmp eq i16 %.1, 0
  br i1 %.not, label %.thread, label %49

.thread:                                          ; preds = %14, %52, %46
  %47 = call ptr @mln_fec_result_new(ptr noundef null, i64 noundef 0)
  %48 = icmp eq ptr %47, null
  br i1 %48, label %.sink.split, label %72

49:                                               ; preds = %46
  %50 = call i32 @mln_fec_decode_header(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %1, ptr noundef nonnull %2, i64 noundef %3, ptr noundef nonnull %5)
  %51 = icmp slt i32 %50, 0
  br i1 %51, label %72, label %52

52:                                               ; preds = %49
  %53 = load i64, ptr %9, align 8, !tbaa !9
  %.not58 = icmp eq i64 %53, 0
  br i1 %.not58, label %.thread, label %54

54:                                               ; preds = %52
  %55 = getelementptr inbounds i8, ptr %8, i64 %53
  %56 = load i16, ptr %5, align 2, !tbaa !5
  %57 = call i32 @mln_fec_decode_body(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %55, ptr noundef nonnull %9, ptr noundef nonnull %1, ptr noundef nonnull %2, i64 noundef %3, i16 noundef zeroext %56)
  %58 = icmp slt i32 %57, 0
  br i1 %58, label %72, label %59

59:                                               ; preds = %54
  %60 = call ptr @mln_string_vector_new(i64 noundef 1)
  %61 = icmp eq ptr %60, null
  br i1 %61, label %.sink.split, label %62

62:                                               ; preds = %59
  store ptr %8, ptr %7, align 8, !tbaa !14
  %63 = load i64, ptr %9, align 8, !tbaa !9
  %64 = getelementptr inbounds i8, ptr %7, i64 8
  store i64 %63, ptr %64, align 8, !tbaa !16
  %65 = getelementptr inbounds i8, ptr %7, i64 16
  store i32 5, ptr %65, align 8
  %66 = call ptr @mln_string_dup(ptr noundef nonnull %7) #7
  store ptr %66, ptr %60, align 8, !tbaa !11
  %67 = icmp eq ptr %66, null
  br i1 %67, label %.sink.split.sink.split, label %68

68:                                               ; preds = %62
  %69 = call ptr @mln_fec_result_new(ptr noundef nonnull %60, i64 noundef 1)
  %70 = icmp eq ptr %69, null
  br i1 %70, label %.sink.split.sink.split, label %72

.sink.split.sink.split:                           ; preds = %68, %62
  call void @mln_string_vector_free(ptr noundef nonnull %60)
  br label %.sink.split

.sink.split:                                      ; preds = %31, %33, %20, %.sink.split.sink.split, %59, %.thread, %._crit_edge, %4
  %.sink = phi i32 [ 22, %4 ], [ 22, %._crit_edge ], [ 12, %.thread ], [ 12, %59 ], [ 12, %.sink.split.sink.split ], [ 22, %20 ], [ 22, %33 ], [ 22, %31 ]
  %71 = tail call ptr @__errno_location() #8
  store i32 %.sink, ptr %71, align 4, !tbaa !19
  br label %72

72:                                               ; preds = %.sink.split, %68, %54, %49, %.thread
  %.0 = phi ptr [ %47, %.thread ], [ null, %49 ], [ null, %54 ], [ %69, %68 ], [ null, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 1472, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %5) #7
  ret ptr %.0
}

; Function Attrs: mustprogress 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) #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: nounwind uwtable
declare hidden i32 @mln_fec_decode_header(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden i32 @mln_fec_decode_body(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i16 noundef zeroext) local_unnamed_addr #3

declare ptr @mln_string_dup(ptr noundef) local_unnamed_addr #6

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

!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 = !{!"short", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !12, i64 0}
!15 = !{!"", !12, i64 0, !10, i64 8, !10, i64 16, !10, i64 16, !10, i64 16}
!16 = !{!15, !10, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}


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