; LLVM IR from Iotic-Labs/py-lz4framed :: lz4 (lz4frame)

; 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.LZ4F_preferences_t = type { %struct.LZ4F_frameInfo_t, i32, i32, i32, [3 x i32] }
%struct.LZ4F_frameInfo_t = type { i32, i32, i32, i32, i64, i32, i32 }
%struct.LZ4F_compressOptions_t = type { i32, [3 x i32] }

; Function Attrs: nounwind uwtable
declare dso_local i32 @LZ4F_isError(i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @LZ4F_getBlockSize(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i64 @err0r(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @LZ4F_compressFrameBound(i64 noundef, 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

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

32:                                               ; preds = %7
  %33 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %33, i64 56, i1 false), !tbaa.struct !11
  br label %35

34:                                               ; preds = %7
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 56, i1 false)
  br label %35

35:                                               ; preds = %34, %32
  %36 = getelementptr inbounds %struct.LZ4F_preferences_t, ptr %16, i32 0, i32 0
  %37 = getelementptr inbounds %struct.LZ4F_frameInfo_t, ptr %36, i32 0, i32 4
  %38 = load i64, ptr %37, align 8, !tbaa !17
  %39 = icmp ne i64 %38, 0
  br i1 %39, label %40, label %44

40:                                               ; preds = %35
  %41 = load i64, ptr %13, align 8, !tbaa !9
  %42 = getelementptr inbounds %struct.LZ4F_preferences_t, ptr %16, i32 0, i32 0
  %43 = getelementptr inbounds %struct.LZ4F_frameInfo_t, ptr %42, i32 0, i32 4
  store i64 %41, ptr %43, align 8, !tbaa !17
  br label %44

44:                                               ; preds = %40, %35
  %45 = getelementptr inbounds %struct.LZ4F_preferences_t, ptr %16, i32 0, i32 0
  %46 = getelementptr inbounds %struct.LZ4F_frameInfo_t, ptr %45, i32 0, i32 0
  %47 = load i32, ptr %46, align 8, !tbaa !20
  %48 = load i64, ptr %13, align 8, !tbaa !9
  %49 = call i32 @LZ4F_optimalBSID(i32 noundef %47, i64 noundef %48)
  %50 = getelementptr inbounds %struct.LZ4F_preferences_t, ptr %16, i32 0, i32 0
  %51 = getelementptr inbounds %struct.LZ4F_frameInfo_t, ptr %50, i32 0, i32 0
  store i32 %49, ptr %51, align 8, !tbaa !20
  %52 = getelementptr inbounds %struct.LZ4F_preferences_t, ptr %16, i32 0, i32 2
  store i32 1, ptr %52, align 4, !tbaa !21
  %53 = load i64, ptr %13, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.LZ4F_preferences_t, ptr %16, i32 0, i32 0
  %55 = getelementptr inbounds %struct.LZ4F_frameInfo_t, ptr %54, i32 0, i32 0
  %56 = load i32, ptr %55, align 8, !tbaa !20
  %57 = call i64 @LZ4F_getBlockSize(i32 noundef %56)
  %58 = icmp ule i64 %53, %57
  br i1 %58, label %59, label %62

59:                                               ; preds = %44
  %60 = getelementptr inbounds %struct.LZ4F_preferences_t, ptr %16, i32 0, i32 0
  %61 = getelementptr inbounds %struct.LZ4F_frameInfo_t, ptr %60, i32 0, i32 1
  store i32 1, ptr %61, align 4, !tbaa !22
  br label %62

62:                                               ; preds = %59, %44
  call void @llvm.memset.p0.i64(ptr align 4 %17, i8 0, i64 16, i1 false)
  %63 = getelementptr inbounds %struct.LZ4F_compressOptions_t, ptr %17, i32 0, i32 0
  store i32 1, ptr %63, align 4, !tbaa !23
  %64 = load i64, ptr %11, align 8, !tbaa !9
  %65 = load i64, ptr %13, align 8, !tbaa !9
  %66 = call i64 @LZ4F_compressFrameBound(i64 noundef %65, ptr noundef %16)
  %67 = icmp ult i64 %64, %66
  br i1 %67, label %68, label %70

68:                                               ; preds = %62
  %69 = call i64 @err0r(i32 noundef 11)
  store i64 %69, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %135

70:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = load i64, ptr %11, align 8, !tbaa !9
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = call i64 @LZ4F_compressBegin_usingCDict(ptr noundef %71, ptr noundef %72, i64 noundef %73, ptr noundef %74, ptr noundef %16)
  store i64 %75, ptr %22, align 8, !tbaa !9
  %76 = load i64, ptr %22, align 8, !tbaa !9
  %77 = call i32 @LZ4F_isError(i64 noundef %76)
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %81

79:                                               ; preds = %70
  %80 = load i64, ptr %22, align 8, !tbaa !9
  store i64 %80, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %85

81:                                               ; preds = %70
  %82 = load i64, ptr %22, align 8, !tbaa !9
  %83 = load ptr, ptr %19, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %83, i64 %82
  store ptr %84, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %21, align 4
  br label %85

85:                                               ; preds = %81, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  %86 = load i32, ptr %21, align 4
  switch i32 %86, label %135 [
    i32 0, label %87
  ]

87:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %88 = load ptr, ptr %9, align 8, !tbaa !5
  %89 = load ptr, ptr %19, align 8, !tbaa !5
  %90 = load ptr, ptr %20, align 8, !tbaa !5
  %91 = load ptr, ptr %19, align 8, !tbaa !5
  %92 = ptrtoint ptr %90 to i64
  %93 = ptrtoint ptr %91 to i64
  %94 = sub i64 %92, %93
  %95 = load ptr, ptr %12, align 8, !tbaa !5
  %96 = load i64, ptr %13, align 8, !tbaa !9
  %97 = call i64 @LZ4F_compressUpdate(ptr noundef %88, ptr noundef %89, i64 noundef %94, ptr noundef %95, i64 noundef %96, ptr noundef %17)
  store i64 %97, ptr %23, align 8, !tbaa !9
  %98 = load i64, ptr %23, align 8, !tbaa !9
  %99 = call i32 @LZ4F_isError(i64 noundef %98)
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %103

101:                                              ; preds = %87
  %102 = load i64, ptr %23, align 8, !tbaa !9
  store i64 %102, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %107

103:                                              ; preds = %87
  %104 = load i64, ptr %23, align 8, !tbaa !9
  %105 = load ptr, ptr %19, align 8, !tbaa !5
  %106 = getelementptr inbounds i8, ptr %105, i64 %104
  store ptr %106, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %21, align 4
  br label %107

107:                                              ; preds = %103, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  %108 = load i32, ptr %21, align 4
  switch i32 %108, label %135 [
    i32 0, label %109
  ]

109:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = load ptr, ptr %19, align 8, !tbaa !5
  %112 = load ptr, ptr %20, align 8, !tbaa !5
  %113 = load ptr, ptr %19, align 8, !tbaa !5
  %114 = ptrtoint ptr %112 to i64
  %115 = ptrtoint ptr %113 to i64
  %116 = sub i64 %114, %115
  %117 = call i64 @LZ4F_compressEnd(ptr noundef %110, ptr noundef %111, i64 noundef %116, ptr noundef %17)
  store i64 %117, ptr %24, align 8, !tbaa !9
  %118 = load i64, ptr %24, align 8, !tbaa !9
  %119 = call i32 @LZ4F_isError(i64 noundef %118)
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %123

121:                                              ; preds = %109
  %122 = load i64, ptr %24, align 8, !tbaa !9
  store i64 %122, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %127

123:                                              ; preds = %109
  %124 = load i64, ptr %24, align 8, !tbaa !9
  %125 = load ptr, ptr %19, align 8, !tbaa !5
  %126 = getelementptr inbounds i8, ptr %125, i64 %124
  store ptr %126, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %21, align 4
  br label %127

127:                                              ; preds = %123, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  %128 = load i32, ptr %21, align 4
  switch i32 %128, label %135 [
    i32 0, label %129
  ]

129:                                              ; preds = %127
  %130 = load ptr, ptr %19, align 8, !tbaa !5
  %131 = load ptr, ptr %18, align 8, !tbaa !5
  %132 = ptrtoint ptr %130 to i64
  %133 = ptrtoint ptr %131 to i64
  %134 = sub i64 %132, %133
  store i64 %134, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %135

135:                                              ; preds = %129, %127, %107, %85, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %16) #4
  %136 = load i64, ptr %8, align 8
  ret i64 %136
}

; Function Attrs: nounwind uwtable
declare hidden i32 @LZ4F_optimalBSID(i32 noundef, i64 noundef) #0

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"long", !7, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12, i64 12, i64 4, !12, i64 16, i64 8, !14, i64 24, i64 4, !12, i64 28, i64 4, !12, i64 32, i64 4, !12, i64 36, i64 4, !12, i64 40, i64 4, !12, i64 44, i64 12, !16}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !15, i64 16}
!18 = !{!"", !19, i64 0, !13, i64 32, !13, i64 36, !13, i64 40, !7, i64 44}
!19 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !15, i64 16, !13, i64 24, !13, i64 28}
!20 = !{!18, !13, i64 0}
!21 = !{!18, !13, i64 36}
!22 = !{!18, !13, i64 4}
!23 = !{!24, !13, i64 0}
!24 = !{!"", !13, i64 0, !7, i64 4}


; 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.LZ4F_preferences_t = type { %struct.LZ4F_frameInfo_t, i32, i32, i32, [3 x i32] }
%struct.LZ4F_frameInfo_t = type { i32, i32, i32, i32, i64, i32, i32 }
%struct.LZ4F_compressOptions_t = type { i32, [3 x i32] }

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

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

; Function Attrs: nounwind uwtable
declare hidden i64 @err0r(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @LZ4F_compressFrameBound(i64 noundef, 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @LZ4F_compressFrame_usingCDict(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef readonly %6) local_unnamed_addr #0 {
  %8 = alloca %struct.LZ4F_preferences_t, align 8
  %9 = alloca %struct.LZ4F_compressOptions_t, align 4
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  %10 = getelementptr inbounds i8, ptr %1, i64 %2
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %.thread, label %11

.thread:                                          ; preds = %7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %8, i8 0, i64 56, i1 false)
  br label %15

11:                                               ; preds = %7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %8, ptr noundef nonnull align 8 dereferenceable(56) %6, i64 56, i1 false), !tbaa.struct !5
  %.phi.trans.insert = getelementptr inbounds i8, ptr %8, i64 16
  %.pre = load i64, ptr %.phi.trans.insert, align 8, !tbaa !13
  %12 = icmp eq i64 %.pre, 0
  br i1 %12, label %15, label %13

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %8, i64 16
  store i64 %4, ptr %14, align 8, !tbaa !13
  br label %15

15:                                               ; preds = %.thread, %13, %11
  %16 = load i32, ptr %8, align 8, !tbaa !16
  %17 = tail call i32 @LZ4F_optimalBSID(i32 noundef %16, i64 noundef %4)
  store i32 %17, ptr %8, align 8, !tbaa !16
  %18 = getelementptr inbounds i8, ptr %8, i64 36
  store i32 1, ptr %18, align 4, !tbaa !17
  %19 = tail call i64 @LZ4F_getBlockSize(i32 noundef %17)
  %.not52 = icmp ult i64 %19, %4
  br i1 %.not52, label %22, label %20

20:                                               ; preds = %15
  %21 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 1, ptr %21, align 4, !tbaa !18
  br label %22

22:                                               ; preds = %20, %15
  %23 = getelementptr inbounds i8, ptr %9, i64 4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %23, i8 0, i64 12, i1 false)
  store i32 1, ptr %9, align 4, !tbaa !19
  %24 = call i64 @LZ4F_compressFrameBound(i64 noundef %4, ptr noundef nonnull %8)
  %25 = icmp ugt i64 %24, %2
  br i1 %25, label %26, label %28

26:                                               ; preds = %22
  %27 = call i64 @err0r(i32 noundef 11)
  br label %47

28:                                               ; preds = %22
  %29 = call i64 @LZ4F_compressBegin_usingCDict(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %5, ptr noundef nonnull %8)
  %30 = call i32 @LZ4F_isError(i64 noundef %29)
  %.not53 = icmp eq i32 %30, 0
  br i1 %.not53, label %31, label %47

31:                                               ; preds = %28
  %32 = getelementptr inbounds i8, ptr %1, i64 %29
  %gepdiff = sub nsw i64 %2, %29
  %33 = call i64 @LZ4F_compressUpdate(ptr noundef %0, ptr noundef %32, i64 noundef %gepdiff, ptr noundef %3, i64 noundef %4, ptr noundef nonnull %9)
  %34 = call i32 @LZ4F_isError(i64 noundef %33)
  %.not54 = icmp eq i32 %34, 0
  br i1 %.not54, label %35, label %47

35:                                               ; preds = %31
  %36 = getelementptr inbounds i8, ptr %32, i64 %33
  %37 = ptrtoint ptr %10 to i64
  %38 = ptrtoint ptr %36 to i64
  %39 = sub i64 %37, %38
  %40 = call i64 @LZ4F_compressEnd(ptr noundef %0, ptr noundef %36, i64 noundef %39, ptr noundef nonnull %9)
  %41 = call i32 @LZ4F_isError(i64 noundef %40)
  %.not55 = icmp eq i32 %41, 0
  br i1 %.not55, label %42, label %47

42:                                               ; preds = %35
  %43 = getelementptr inbounds i8, ptr %36, i64 %40
  %44 = ptrtoint ptr %43 to i64
  %45 = ptrtoint ptr %1 to i64
  %46 = sub i64 %44, %45
  br label %47

47:                                               ; preds = %35, %31, %28, %42, %26
  %.3 = phi i64 [ %27, %26 ], [ %46, %42 ], [ %40, %35 ], [ %33, %31 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %8) #4
  ret i64 %.3
}

; Function Attrs: nounwind uwtable
declare hidden i32 @LZ4F_optimalBSID(i32 noundef, i64 noundef) local_unnamed_addr #0

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6, i64 12, i64 4, !6, i64 16, i64 8, !10, i64 24, i64 4, !6, i64 28, i64 4, !6, i64 32, i64 4, !6, i64 36, i64 4, !6, i64 40, i64 4, !6, i64 44, i64 12, !12}
!6 = !{!7, !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"long long", !8, i64 0}
!12 = !{!8, !8, i64 0}
!13 = !{!14, !11, i64 16}
!14 = !{!"", !15, i64 0, !7, i64 32, !7, i64 36, !7, i64 40, !8, i64 44}
!15 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !11, i64 16, !7, i64 24, !7, i64 28}
!16 = !{!14, !7, i64 0}
!17 = !{!14, !7, i64 36}
!18 = !{!14, !7, i64 4}
!19 = !{!20, !7, i64 0}
!20 = !{!"", !7, i64 0, !8, i64 4}


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