; LLVM IR from IlyaGrebnov/libbsc :: libbsc/lzp/lzp.ll (Z20bsc_lzp_encode_blockPKhS0_PhS1_ii)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z22bsc_lzp_encode_genericPKhS0_PhS1_Piii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef, 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: mustprogress uwtable
define dso_local noundef i32 @_Z20bsc_lzp_encode_blockPKhS0_PhS1_ii(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5) #2 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  %16 = load ptr, ptr %9, align 8, !tbaa !5
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = ptrtoint ptr %16 to i64
  %19 = ptrtoint ptr %17 to i64
  %20 = sub i64 %18, %19
  %21 = load i32, ptr %13, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = sub nsw i64 %20, %22
  %24 = icmp slt i64 %23, 32
  br i1 %24, label %25, label %26

25:                                               ; preds = %6
  store i32 -3, ptr %7, align 4
  br label %173

26:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 -2, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %27 = load i32, ptr %12, align 4, !tbaa !9
  %28 = shl i32 1, %27
  %29 = sext i32 %28 to i64
  %30 = mul i64 %29, 4
  %31 = call ptr @bsc_zero_malloc(i64 noundef %30)
  store ptr %31, ptr %15, align 8, !tbaa !5
  %32 = load ptr, ptr %15, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %171

34:                                               ; preds = %26
  %35 = load i32, ptr %12, align 4, !tbaa !9
  %36 = icmp sle i32 %35, 17
  br i1 %36, label %37, label %152

37:                                               ; preds = %34
  %38 = load i32, ptr %13, align 4, !tbaa !9
  %39 = icmp eq i32 %38, 4
  br i1 %39, label %40, label %53

40:                                               ; preds = %37
  %41 = load i32, ptr %14, align 4, !tbaa !9
  %42 = icmp eq i32 %41, -2
  br i1 %42, label %43, label %53

43:                                               ; preds = %40
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = load ptr, ptr %15, align 8, !tbaa !5
  %49 = load i32, ptr %12, align 4, !tbaa !9
  %50 = shl i32 1, %49
  %51 = sub nsw i32 %50, 1
  %52 = call noundef i32 @_Z20bsc_lzp_encode_smallIjEiPKhS1_PhS2_Pii(ptr noundef %44, ptr noundef %45, ptr noundef %46, ptr noundef %47, ptr noundef %48, i32 noundef %51)
  br label %55

53:                                               ; preds = %40, %37
  %54 = load i32, ptr %14, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %53, %43
  %56 = phi i32 [ %52, %43 ], [ %54, %53 ]
  store i32 %56, ptr %14, align 4, !tbaa !9
  %57 = load i32, ptr %13, align 4, !tbaa !9
  %58 = icmp eq i32 %57, 8
  br i1 %58, label %59, label %72

59:                                               ; preds = %55
  %60 = load i32, ptr %14, align 4, !tbaa !9
  %61 = icmp eq i32 %60, -2
  br i1 %61, label %62, label %72

62:                                               ; preds = %59
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = load ptr, ptr %15, align 8, !tbaa !5
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = shl i32 1, %68
  %70 = sub nsw i32 %69, 1
  %71 = call noundef i32 @_Z20bsc_lzp_encode_smallIyEiPKhS1_PhS2_Pii(ptr noundef %63, ptr noundef %64, ptr noundef %65, ptr noundef %66, ptr noundef %67, i32 noundef %70)
  br label %74

72:                                               ; preds = %59, %55
  %73 = load i32, ptr %14, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %72, %62
  %75 = phi i32 [ %71, %62 ], [ %73, %72 ]
  store i32 %75, ptr %14, align 4, !tbaa !9
  %76 = load i32, ptr %13, align 4, !tbaa !9
  %77 = icmp eq i32 %76, 16
  br i1 %77, label %78, label %91

78:                                               ; preds = %74
  %79 = load i32, ptr %14, align 4, !tbaa !9
  %80 = icmp eq i32 %79, -2
  br i1 %80, label %81, label %91

81:                                               ; preds = %78
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  %87 = load i32, ptr %12, align 4, !tbaa !9
  %88 = shl i32 1, %87
  %89 = sub nsw i32 %88, 1
  %90 = call noundef i32 @_Z22bsc_lzp_encode_small2xIyEiPKhS1_PhS2_Pii(ptr noundef %82, ptr noundef %83, ptr noundef %84, ptr noundef %85, ptr noundef %86, i32 noundef %89)
  br label %93

91:                                               ; preds = %78, %74
  %92 = load i32, ptr %14, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %91, %81
  %94 = phi i32 [ %90, %81 ], [ %92, %91 ]
  store i32 %94, ptr %14, align 4, !tbaa !9
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = icmp sle i32 %95, 8
  br i1 %96, label %97, label %111

97:                                               ; preds = %93
  %98 = load i32, ptr %14, align 4, !tbaa !9
  %99 = icmp eq i32 %98, -2
  br i1 %99, label %100, label %111

100:                                              ; preds = %97
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = load ptr, ptr %11, align 8, !tbaa !5
  %105 = load ptr, ptr %15, align 8, !tbaa !5
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = shl i32 1, %106
  %108 = sub nsw i32 %107, 1
  %109 = load i32, ptr %13, align 4, !tbaa !9
  %110 = call noundef i32 @_Z21bsc_lzp_encode_mediumIjEiPKhS1_PhS2_Piii(ptr noundef %101, ptr noundef %102, ptr noundef %103, ptr noundef %104, ptr noundef %105, i32 noundef %108, i32 noundef %109)
  br label %113

111:                                              ; preds = %97, %93
  %112 = load i32, ptr %14, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %111, %100
  %114 = phi i32 [ %110, %100 ], [ %112, %111 ]
  store i32 %114, ptr %14, align 4, !tbaa !9
  %115 = load i32, ptr %13, align 4, !tbaa !9
  %116 = icmp sle i32 %115, 16
  br i1 %116, label %117, label %131

117:                                              ; preds = %113
  %118 = load i32, ptr %14, align 4, !tbaa !9
  %119 = icmp eq i32 %118, -2
  br i1 %119, label %120, label %131

120:                                              ; preds = %117
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = load ptr, ptr %15, align 8, !tbaa !5
  %126 = load i32, ptr %12, align 4, !tbaa !9
  %127 = shl i32 1, %126
  %128 = sub nsw i32 %127, 1
  %129 = load i32, ptr %13, align 4, !tbaa !9
  %130 = call noundef i32 @_Z21bsc_lzp_encode_mediumIyEiPKhS1_PhS2_Piii(ptr noundef %121, ptr noundef %122, ptr noundef %123, ptr noundef %124, ptr noundef %125, i32 noundef %128, i32 noundef %129)
  br label %133

131:                                              ; preds = %117, %113
  %132 = load i32, ptr %14, align 4, !tbaa !9
  br label %133

133:                                              ; preds = %131, %120
  %134 = phi i32 [ %130, %120 ], [ %132, %131 ]
  store i32 %134, ptr %14, align 4, !tbaa !9
  %135 = load i32, ptr %14, align 4, !tbaa !9
  %136 = icmp eq i32 %135, -2
  br i1 %136, label %137, label %148

137:                                              ; preds = %133
  %138 = load ptr, ptr %8, align 8, !tbaa !5
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = load ptr, ptr %11, align 8, !tbaa !5
  %142 = load ptr, ptr %15, align 8, !tbaa !5
  %143 = load i32, ptr %12, align 4, !tbaa !9
  %144 = shl i32 1, %143
  %145 = sub nsw i32 %144, 1
  %146 = load i32, ptr %13, align 4, !tbaa !9
  %147 = call noundef i32 @_Z20bsc_lzp_encode_largeIyEiPKhS1_PhS2_Piii(ptr noundef %138, ptr noundef %139, ptr noundef %140, ptr noundef %141, ptr noundef %142, i32 noundef %145, i32 noundef %146)
  br label %150

148:                                              ; preds = %133
  %149 = load i32, ptr %14, align 4, !tbaa !9
  br label %150

150:                                              ; preds = %148, %137
  %151 = phi i32 [ %147, %137 ], [ %149, %148 ]
  store i32 %151, ptr %14, align 4, !tbaa !9
  br label %152

152:                                              ; preds = %150, %34
  %153 = load i32, ptr %14, align 4, !tbaa !9
  %154 = icmp eq i32 %153, -2
  br i1 %154, label %155, label %166

155:                                              ; preds = %152
  %156 = load ptr, ptr %8, align 8, !tbaa !5
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = load ptr, ptr %10, align 8, !tbaa !5
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  %160 = load ptr, ptr %15, align 8, !tbaa !5
  %161 = load i32, ptr %12, align 4, !tbaa !9
  %162 = shl i32 1, %161
  %163 = sub nsw i32 %162, 1
  %164 = load i32, ptr %13, align 4, !tbaa !9
  %165 = call noundef i32 @_Z22bsc_lzp_encode_genericPKhS0_PhS1_Piii(ptr noundef %156, ptr noundef %157, ptr noundef %158, ptr noundef %159, ptr noundef %160, i32 noundef %163, i32 noundef %164)
  br label %168

166:                                              ; preds = %152
  %167 = load i32, ptr %14, align 4, !tbaa !9
  br label %168

168:                                              ; preds = %166, %155
  %169 = phi i32 [ %165, %155 ], [ %167, %166 ]
  store i32 %169, ptr %14, align 4, !tbaa !9
  %170 = load ptr, ptr %15, align 8, !tbaa !5
  call void @bsc_free(ptr noundef %170)
  br label %171

171:                                              ; preds = %168, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  %172 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %172, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %173

173:                                              ; preds = %171, %25
  %174 = load i32, ptr %7, align 4
  ret i32 %174
}

declare ptr @bsc_zero_malloc(i64 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z20bsc_lzp_encode_smallIjEiPKhS1_PhS2_Pii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z20bsc_lzp_encode_smallIyEiPKhS1_PhS2_Pii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z22bsc_lzp_encode_small2xIyEiPKhS1_PhS2_Pii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z21bsc_lzp_encode_mediumIjEiPKhS1_PhS2_Piii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z21bsc_lzp_encode_mediumIyEiPKhS1_PhS2_Piii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z20bsc_lzp_encode_largeIyEiPKhS1_PhS2_Piii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef, i32 noundef) #0

declare void @bsc_free(ptr noundef) #3

attributes #0 = { mustprogress 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 = { mustprogress 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}


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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z22bsc_lzp_encode_genericPKhS0_PhS1_Piii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z20bsc_lzp_encode_blockPKhS0_PhS1_ii(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #1 {
  %7 = ptrtoint ptr %1 to i64
  %8 = ptrtoint ptr %0 to i64
  %9 = sext i32 %5 to i64
  %10 = add i64 %8, %9
  %11 = sub i64 %7, %10
  %12 = icmp slt i64 %11, 32
  br i1 %12, label %50, label %13

13:                                               ; preds = %6
  %14 = shl nuw i32 1, %4
  %15 = sext i32 %14 to i64
  %16 = shl nsw i64 %15, 2
  %17 = tail call ptr @bsc_zero_malloc(i64 noundef %16)
  %.not = icmp eq ptr %17, null
  br i1 %.not, label %50, label %18

18:                                               ; preds = %13
  %19 = icmp slt i32 %4, 18
  br i1 %19, label %20, label %..thread92_crit_edge

..thread92_crit_edge:                             ; preds = %18
  %.pre = add nsw i32 %14, -1
  br label %.thread92

20:                                               ; preds = %18
  switch i32 %5, label %.thread88 [
    i32 4, label %.thread
    i32 8, label %23
    i32 16, label %.thread90
  ]

.thread:                                          ; preds = %20
  %21 = add nsw i32 %14, -1
  %22 = tail call noundef i32 @_Z20bsc_lzp_encode_smallIjEiPKhS1_PhS2_Pii(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %17, i32 noundef %21)
  br label %.thread88

23:                                               ; preds = %20
  %24 = add nsw i32 %14, -1
  %25 = tail call noundef i32 @_Z20bsc_lzp_encode_smallIyEiPKhS1_PhS2_Pii(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %17, i32 noundef %24)
  br label %.thread88

.thread90:                                        ; preds = %20
  %26 = add nsw i32 %14, -1
  %27 = tail call noundef i32 @_Z22bsc_lzp_encode_small2xIyEiPKhS1_PhS2_Pii(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %17, i32 noundef %26)
  br label %34

.thread88:                                        ; preds = %20, %23, %.thread
  %28 = phi i32 [ %22, %.thread ], [ %25, %23 ], [ -2, %20 ]
  %29 = icmp slt i32 %5, 9
  %30 = icmp eq i32 %28, -2
  %or.cond7 = and i1 %29, %30
  br i1 %or.cond7, label %31, label %34

31:                                               ; preds = %.thread88
  %32 = add nsw i32 %14, -1
  %33 = tail call noundef i32 @_Z21bsc_lzp_encode_mediumIjEiPKhS1_PhS2_Piii(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %17, i32 noundef %32, i32 noundef %5)
  br label %34

34:                                               ; preds = %.thread90, %.thread88, %31
  %35 = phi i32 [ %33, %31 ], [ %28, %.thread88 ], [ %27, %.thread90 ]
  %36 = icmp slt i32 %5, 17
  %37 = icmp eq i32 %35, -2
  %or.cond9 = and i1 %36, %37
  br i1 %or.cond9, label %38, label %41

38:                                               ; preds = %34
  %39 = add nsw i32 %14, -1
  %40 = tail call noundef i32 @_Z21bsc_lzp_encode_mediumIyEiPKhS1_PhS2_Piii(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %17, i32 noundef %39, i32 noundef %5)
  br label %41

41:                                               ; preds = %34, %38
  %42 = phi i32 [ %40, %38 ], [ %35, %34 ]
  %43 = icmp eq i32 %42, -2
  br i1 %43, label %44, label %.thread94

44:                                               ; preds = %41
  %45 = add nsw i32 %14, -1
  %46 = tail call noundef i32 @_Z20bsc_lzp_encode_largeIyEiPKhS1_PhS2_Piii(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %17, i32 noundef %45, i32 noundef %5)
  %47 = icmp eq i32 %46, -2
  br i1 %47, label %.thread92, label %.thread94

.thread92:                                        ; preds = %..thread92_crit_edge, %44
  %.pre-phi = phi i32 [ %.pre, %..thread92_crit_edge ], [ %45, %44 ]
  %48 = tail call noundef i32 @_Z22bsc_lzp_encode_genericPKhS0_PhS1_Piii(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %17, i32 noundef %.pre-phi, i32 noundef %5)
  br label %.thread94

.thread94:                                        ; preds = %41, %44, %.thread92
  %49 = phi i32 [ %48, %.thread92 ], [ %46, %44 ], [ %42, %41 ]
  tail call void @bsc_free(ptr noundef nonnull %17)
  br label %50

50:                                               ; preds = %13, %.thread94, %6
  %.0 = phi i32 [ -3, %6 ], [ %49, %.thread94 ], [ -2, %13 ]
  ret i32 %.0
}

declare ptr @bsc_zero_malloc(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z20bsc_lzp_encode_smallIjEiPKhS1_PhS2_Pii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z20bsc_lzp_encode_smallIyEiPKhS1_PhS2_Pii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z22bsc_lzp_encode_small2xIyEiPKhS1_PhS2_Pii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z21bsc_lzp_encode_mediumIjEiPKhS1_PhS2_Piii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z21bsc_lzp_encode_mediumIyEiPKhS1_PhS2_Piii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z20bsc_lzp_encode_largeIyEiPKhS1_PhS2_Piii(ptr noalias noundef, ptr noundef, ptr noalias noundef, ptr noundef, ptr noalias noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare void @bsc_free(ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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)"}


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