; LLVM IR from DanEngelbrecht/longtail :: lib/lz4/ext (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 @LZ4F_returnErrorCode(i32 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 uwtable
declare dso_local i64 @LZ4F_compressFrameBound(i64 noundef, ptr noundef) #0

; 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: 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
  br label %64

64:                                               ; preds = %62
  %65 = load i64, ptr %11, align 8, !tbaa !9
  %66 = load i64, ptr %13, align 8, !tbaa !9
  %67 = call i64 @LZ4F_compressFrameBound(i64 noundef %66, ptr noundef %16)
  %68 = icmp ult i64 %65, %67
  br i1 %68, label %69, label %71

69:                                               ; preds = %64
  %70 = call i64 @LZ4F_returnErrorCode(i32 noundef 11)
  store i64 %70, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %147

71:                                               ; preds = %64
  br label %72

72:                                               ; preds = %71
  br label %73

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

79:                                               ; preds = %73
  %80 = load i64, ptr %22, align 8, !tbaa !9
  %81 = call i32 @LZ4F_isError(i64 noundef %80)
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %85

83:                                               ; preds = %79
  %84 = load i64, ptr %22, align 8, !tbaa !9
  store i64 %84, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %91

85:                                               ; preds = %79
  br label %86

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86
  %88 = load i64, ptr %22, align 8, !tbaa !9
  %89 = load ptr, ptr %19, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i64 %88
  store ptr %90, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %21, align 4
  br label %91

91:                                               ; preds = %87, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  %92 = load i32, ptr %21, align 4
  switch i32 %92, label %147 [
    i32 0, label %93
  ]

93:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = load ptr, ptr %19, align 8, !tbaa !5
  %96 = load ptr, ptr %20, align 8, !tbaa !5
  %97 = load ptr, ptr %19, align 8, !tbaa !5
  %98 = ptrtoint ptr %96 to i64
  %99 = ptrtoint ptr %97 to i64
  %100 = sub i64 %98, %99
  %101 = load ptr, ptr %12, align 8, !tbaa !5
  %102 = load i64, ptr %13, align 8, !tbaa !9
  %103 = call i64 @LZ4F_compressUpdate(ptr noundef %94, ptr noundef %95, i64 noundef %100, ptr noundef %101, i64 noundef %102, ptr noundef %17)
  store i64 %103, ptr %23, align 8, !tbaa !9
  br label %104

104:                                              ; preds = %93
  %105 = load i64, ptr %23, align 8, !tbaa !9
  %106 = call i32 @LZ4F_isError(i64 noundef %105)
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %110

108:                                              ; preds = %104
  %109 = load i64, ptr %23, align 8, !tbaa !9
  store i64 %109, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %116

110:                                              ; preds = %104
  br label %111

111:                                              ; preds = %110
  br label %112

112:                                              ; preds = %111
  %113 = load i64, ptr %23, align 8, !tbaa !9
  %114 = load ptr, ptr %19, align 8, !tbaa !5
  %115 = getelementptr inbounds i8, ptr %114, i64 %113
  store ptr %115, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %21, align 4
  br label %116

116:                                              ; preds = %112, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  %117 = load i32, ptr %21, align 4
  switch i32 %117, label %147 [
    i32 0, label %118
  ]

118:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = load ptr, ptr %19, align 8, !tbaa !5
  %121 = load ptr, ptr %20, align 8, !tbaa !5
  %122 = load ptr, ptr %19, align 8, !tbaa !5
  %123 = ptrtoint ptr %121 to i64
  %124 = ptrtoint ptr %122 to i64
  %125 = sub i64 %123, %124
  %126 = call i64 @LZ4F_compressEnd(ptr noundef %119, ptr noundef %120, i64 noundef %125, ptr noundef %17)
  store i64 %126, ptr %24, align 8, !tbaa !9
  br label %127

127:                                              ; preds = %118
  %128 = load i64, ptr %24, align 8, !tbaa !9
  %129 = call i32 @LZ4F_isError(i64 noundef %128)
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %133

131:                                              ; preds = %127
  %132 = load i64, ptr %24, align 8, !tbaa !9
  store i64 %132, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %139

133:                                              ; preds = %127
  br label %134

134:                                              ; preds = %133
  br label %135

135:                                              ; preds = %134
  %136 = load i64, ptr %24, align 8, !tbaa !9
  %137 = load ptr, ptr %19, align 8, !tbaa !5
  %138 = getelementptr inbounds i8, ptr %137, i64 %136
  store ptr %138, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %21, align 4
  br label %139

139:                                              ; preds = %135, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  %140 = load i32, ptr %21, align 4
  switch i32 %140, label %147 [
    i32 0, label %141
  ]

141:                                              ; preds = %139
  %142 = load ptr, ptr %19, align 8, !tbaa !5
  %143 = load ptr, ptr %18, align 8, !tbaa !5
  %144 = ptrtoint ptr %142 to i64
  %145 = ptrtoint ptr %143 to i64
  %146 = sub i64 %144, %145
  store i64 %146, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %147

147:                                              ; preds = %141, %139, %116, %91, %69
  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
  %148 = load i64, ptr %8, align 8
  ret i64 %148
}

; 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 @LZ4F_returnErrorCode(i32 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: nounwind uwtable
declare dso_local i64 @LZ4F_compressFrameBound(i64 noundef, ptr noundef) local_unnamed_addr #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) #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: 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 @LZ4F_returnErrorCode(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