; LLVM IR from fhanau/Efficient-Compression-Tool :: src/zlib/trees.ll (tr_flush_block)

; 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.ct_data_s = type { %union.anon, %union.anon.0 }
%union.anon = type { i16 }
%union.anon.0 = type { i16 }
%struct.internal_state = type { ptr, i32, ptr, i64, ptr, i32, i32, ptr, i32, i8, i32, i32, i32, i32, ptr, i32, ptr, ptr, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [573 x %struct.ct_data_s], [61 x %struct.ct_data_s], [39 x %struct.ct_data_s], %struct.tree_desc_s, %struct.tree_desc_s, %struct.tree_desc_s, [16 x i16], [573 x i32], i32, i32, [573 x i8], ptr, i32, i32, i32, i64, i64, i32, i32, i64, i32, i64 }
%struct.tree_desc_s = type { ptr, i32, ptr }

@static_ltree = external hidden constant [288 x %struct.ct_data_s], align 16
@static_dtree = external hidden constant [30 x %struct.ct_data_s], align 16

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @_tr_flush_block(ptr noundef %0, ptr noundef %1, i64 noundef %2, i32 noundef %3, ptr noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !11
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #2
  store i32 0, ptr %13, align 4, !tbaa !11
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.internal_state, ptr %15, i32 0, i32 33
  %17 = load i32, ptr %16, align 4, !tbaa !13
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %19, label %46

19:                                               ; preds = %5
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.internal_state, ptr %21, i32 0, i32 40
  call void @build_tree(ptr noundef %20, ptr noundef %22)
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.internal_state, ptr %24, i32 0, i32 41
  call void @build_tree(ptr noundef %23, ptr noundef %25)
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = call i32 @build_bl_tree(ptr noundef %26)
  store i32 %27, ptr %13, align 4, !tbaa !11
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.internal_state, ptr %28, i32 0, i32 52
  %30 = load i64, ptr %29, align 8, !tbaa !16
  %31 = add i64 %30, 3
  %32 = add i64 %31, 7
  %33 = lshr i64 %32, 3
  store i64 %33, ptr %11, align 8, !tbaa !9
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.internal_state, ptr %34, i32 0, i32 53
  %36 = load i64, ptr %35, align 8, !tbaa !17
  %37 = add i64 %36, 3
  %38 = add i64 %37, 7
  %39 = lshr i64 %38, 3
  store i64 %39, ptr %12, align 8, !tbaa !9
  %40 = load i64, ptr %12, align 8, !tbaa !9
  %41 = load i64, ptr %11, align 8, !tbaa !9
  %42 = icmp ule i64 %40, %41
  br i1 %42, label %43, label %45

43:                                               ; preds = %19
  %44 = load i64, ptr %12, align 8, !tbaa !9
  store i64 %44, ptr %11, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %43, %19
  br label %49

46:                                               ; preds = %5
  %47 = load i64, ptr %8, align 8, !tbaa !9
  %48 = add i64 %47, 5
  store i64 %48, ptr %12, align 8, !tbaa !9
  store i64 %48, ptr %11, align 8, !tbaa !9
  br label %49

49:                                               ; preds = %46, %45
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = icmp ne ptr %50, null
  br i1 %51, label %52, label %104

52:                                               ; preds = %49
  %53 = load i64, ptr %8, align 8, !tbaa !9
  %54 = add i64 %53, 4
  %55 = load i64, ptr %11, align 8, !tbaa !9
  %56 = icmp ule i64 %54, %55
  br i1 %56, label %57, label %71

57:                                               ; preds = %52
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %71

60:                                               ; preds = %57
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  call void @send_bits2(ptr noundef %61, i64 noundef 3)
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  call void @bi_windup(ptr noundef %62)
  %63 = load i64, ptr %8, align 8, !tbaa !9
  %64 = add i64 %63, 4
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.internal_state, ptr %65, i32 0, i32 5
  %67 = load i32, ptr %66, align 8, !tbaa !18
  %68 = zext i32 %67 to i64
  %69 = add i64 %68, %64
  %70 = trunc i64 %69 to i32
  store i32 %70, ptr %66, align 8, !tbaa !18
  br label %88

71:                                               ; preds = %57, %52
  %72 = load i64, ptr %11, align 8, !tbaa !9
  %73 = load i64, ptr %12, align 8, !tbaa !9
  %74 = icmp eq i64 %72, %73
  br i1 %74, label %75, label %81

75:                                               ; preds = %71
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.internal_state, ptr %77, i32 0, i32 53
  %79 = load i64, ptr %78, align 8, !tbaa !17
  %80 = add i64 %79, 3
  call void @send_bits2(ptr noundef %76, i64 noundef %80)
  br label %87

81:                                               ; preds = %71
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.internal_state, ptr %83, i32 0, i32 52
  %85 = load i64, ptr %84, align 8, !tbaa !16
  %86 = add i64 %85, 3
  call void @send_bits2(ptr noundef %82, i64 noundef %86)
  br label %87

87:                                               ; preds = %81, %75
  br label %88

88:                                               ; preds = %87, %60
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  call void @init_block(ptr noundef %89)
  %90 = load i32, ptr %9, align 4, !tbaa !11
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %94

92:                                               ; preds = %88
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  call void @bi_windup(ptr noundef %93)
  br label %94

94:                                               ; preds = %92, %88
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.internal_state, ptr %95, i32 0, i32 5
  %97 = load i32, ptr %96, align 8, !tbaa !18
  %98 = zext i32 %97 to i64
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = load i64, ptr %99, align 8, !tbaa !9
  %101 = add i64 %100, %98
  store i64 %101, ptr %99, align 8, !tbaa !9
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.internal_state, ptr %102, i32 0, i32 5
  store i32 0, ptr %103, align 8, !tbaa !18
  store i32 1, ptr %14, align 4
  br label %160

104:                                              ; preds = %49
  %105 = load i64, ptr %8, align 8, !tbaa !9
  %106 = add i64 %105, 4
  %107 = load i64, ptr %11, align 8, !tbaa !9
  %108 = icmp ule i64 %106, %107
  br i1 %108, label %109, label %117

109:                                              ; preds = %104
  %110 = load ptr, ptr %7, align 8, !tbaa !5
  %111 = icmp ne ptr %110, null
  br i1 %111, label %112, label %117

112:                                              ; preds = %109
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = load i64, ptr %8, align 8, !tbaa !9
  %116 = load i32, ptr %9, align 4, !tbaa !11
  call void @_tr_stored_block(ptr noundef %113, ptr noundef %114, i64 noundef %115, i32 noundef %116)
  br label %153

117:                                              ; preds = %109, %104
  %118 = load i64, ptr %12, align 8, !tbaa !9
  %119 = load i64, ptr %11, align 8, !tbaa !9
  %120 = icmp eq i64 %118, %119
  br i1 %120, label %121, label %127

121:                                              ; preds = %117
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = load i32, ptr %9, align 4, !tbaa !11
  %124 = add nsw i32 2, %123
  %125 = sext i32 %124 to i64
  call void @send_bits(ptr noundef %122, i64 noundef %125, i32 noundef 3)
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  call void @compress_block(ptr noundef %126, ptr noundef @static_ltree, ptr noundef @static_dtree)
  br label %152

127:                                              ; preds = %117
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = load i32, ptr %9, align 4, !tbaa !11
  %130 = add nsw i32 4, %129
  %131 = sext i32 %130 to i64
  call void @send_bits(ptr noundef %128, i64 noundef %131, i32 noundef 3)
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.internal_state, ptr %133, i32 0, i32 40
  %135 = getelementptr inbounds %struct.tree_desc_s, ptr %134, i32 0, i32 1
  %136 = load i32, ptr %135, align 8, !tbaa !19
  %137 = add nsw i32 %136, 1
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.internal_state, ptr %138, i32 0, i32 41
  %140 = getelementptr inbounds %struct.tree_desc_s, ptr %139, i32 0, i32 1
  %141 = load i32, ptr %140, align 8, !tbaa !20
  %142 = add nsw i32 %141, 1
  %143 = load i32, ptr %13, align 4, !tbaa !11
  %144 = add nsw i32 %143, 1
  call void @send_all_trees(ptr noundef %132, i32 noundef %137, i32 noundef %142, i32 noundef %144)
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.internal_state, ptr %146, i32 0, i32 37
  %148 = getelementptr inbounds [573 x %struct.ct_data_s], ptr %147, i64 0, i64 0
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.internal_state, ptr %149, i32 0, i32 38
  %151 = getelementptr inbounds [61 x %struct.ct_data_s], ptr %150, i64 0, i64 0
  call void @compress_block(ptr noundef %145, ptr noundef %148, ptr noundef %151)
  br label %152

152:                                              ; preds = %127, %121
  br label %153

153:                                              ; preds = %152, %112
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  call void @init_block(ptr noundef %154)
  %155 = load i32, ptr %9, align 4, !tbaa !11
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %157, label %159

157:                                              ; preds = %153
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  call void @bi_windup(ptr noundef %158)
  br label %159

159:                                              ; preds = %157, %153
  store i32 0, ptr %14, align 4
  br label %160

160:                                              ; preds = %159, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #2
  %161 = load i32, ptr %14, align 4
  switch i32 %161, label %163 [
    i32 0, label %162
    i32 1, label %162
  ]

162:                                              ; preds = %160, %160
  ret void

163:                                              ; preds = %160
  unreachable
}

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @build_bl_tree(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @send_bits2(ptr noundef, i64 noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @send_all_trees(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #0

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

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 = { 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 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 180}
!14 = !{!"internal_state", !6, i64 0, !12, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !12, i64 40, !12, i64 44, !6, i64 48, !12, i64 56, !7, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !6, i64 80, !12, i64 88, !6, i64 96, !6, i64 104, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !10, i64 136, !12, i64 144, !12, i64 148, !12, i64 152, !12, i64 156, !12, i64 160, !12, i64 164, !12, i64 168, !12, i64 172, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !12, i64 192, !7, i64 196, !7, i64 2488, !7, i64 2732, !15, i64 2888, !15, i64 2912, !15, i64 2936, !7, i64 2960, !7, i64 2992, !12, i64 5284, !12, i64 5288, !7, i64 5292, !6, i64 5872, !12, i64 5880, !12, i64 5884, !12, i64 5888, !10, i64 5896, !10, i64 5904, !12, i64 5912, !12, i64 5916, !10, i64 5920, !12, i64 5928, !10, i64 5936}
!15 = !{!"tree_desc_s", !6, i64 0, !12, i64 8, !6, i64 16}
!16 = !{!14, !10, i64 5896}
!17 = !{!14, !10, i64 5904}
!18 = !{!14, !12, i64 40}
!19 = !{!14, !12, i64 2896}
!20 = !{!14, !12, i64 2920}


; 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.ct_data_s = type { %union.anon, %union.anon.0 }
%union.anon = type { i16 }
%union.anon.0 = type { i16 }

@static_ltree = external hidden constant [288 x %struct.ct_data_s], align 16
@static_dtree = external hidden constant [30 x %struct.ct_data_s], align 16

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @_tr_flush_block(ptr noundef %0, ptr noundef %1, i64 noundef %2, i32 noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = getelementptr inbounds i8, ptr %0, i64 180
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %9, label %22

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 2888
  tail call void @build_tree(ptr noundef nonnull %0, ptr noundef nonnull %10)
  %11 = getelementptr inbounds i8, ptr %0, i64 2912
  tail call void @build_tree(ptr noundef nonnull %0, ptr noundef nonnull %11)
  %12 = tail call i32 @build_bl_tree(ptr noundef nonnull %0)
  %13 = getelementptr inbounds i8, ptr %0, i64 5896
  %14 = load i64, ptr %13, align 8, !tbaa !13
  %15 = add i64 %14, 10
  %16 = lshr i64 %15, 3
  %17 = getelementptr inbounds i8, ptr %0, i64 5904
  %18 = load i64, ptr %17, align 8, !tbaa !14
  %19 = add i64 %18, 10
  %20 = lshr i64 %19, 3
  %spec.select = tail call i64 @llvm.umin.i64(i64 %20, i64 %16)
  %21 = add nsw i32 %12, 1
  br label %24

22:                                               ; preds = %5
  %23 = add i64 %2, 5
  br label %24

24:                                               ; preds = %9, %22
  %.059 = phi i64 [ %23, %22 ], [ %spec.select, %9 ]
  %.058 = phi i64 [ %23, %22 ], [ %20, %9 ]
  %.0 = phi i32 [ 1, %22 ], [ %21, %9 ]
  %.not65 = icmp eq ptr %4, null
  %25 = add i64 %2, 4
  %26 = icmp ule i64 %25, %.059
  %27 = icmp ne ptr %1, null
  %or.cond3 = and i1 %27, %26
  br i1 %.not65, label %52, label %28

28:                                               ; preds = %24
  br i1 %or.cond3, label %29, label %34

29:                                               ; preds = %28
  tail call void @send_bits2(ptr noundef nonnull %0, i64 noundef 3)
  tail call void @bi_windup(ptr noundef nonnull %0)
  %30 = getelementptr inbounds i8, ptr %0, i64 40
  %31 = load i32, ptr %30, align 8, !tbaa !15
  %32 = trunc i64 %25 to i32
  %33 = add i32 %31, %32
  store i32 %33, ptr %30, align 8, !tbaa !15
  br label %44

34:                                               ; preds = %28
  %35 = icmp eq i64 %.059, %.058
  br i1 %35, label %36, label %40

36:                                               ; preds = %34
  %37 = getelementptr inbounds i8, ptr %0, i64 5904
  %38 = load i64, ptr %37, align 8, !tbaa !14
  %39 = add i64 %38, 3
  tail call void @send_bits2(ptr noundef nonnull %0, i64 noundef %39)
  br label %44

40:                                               ; preds = %34
  %41 = getelementptr inbounds i8, ptr %0, i64 5896
  %42 = load i64, ptr %41, align 8, !tbaa !13
  %43 = add i64 %42, 3
  tail call void @send_bits2(ptr noundef nonnull %0, i64 noundef %43)
  br label %44

44:                                               ; preds = %36, %40, %29
  tail call void @init_block(ptr noundef nonnull %0)
  %.not67 = icmp eq i32 %3, 0
  br i1 %.not67, label %46, label %45

45:                                               ; preds = %44
  tail call void @bi_windup(ptr noundef nonnull %0)
  br label %46

46:                                               ; preds = %45, %44
  %47 = getelementptr inbounds i8, ptr %0, i64 40
  %48 = load i32, ptr %47, align 8, !tbaa !15
  %49 = zext i32 %48 to i64
  %50 = load i64, ptr %4, align 8, !tbaa !16
  %51 = add i64 %50, %49
  store i64 %51, ptr %4, align 8, !tbaa !16
  store i32 0, ptr %47, align 8, !tbaa !15
  br label %72

52:                                               ; preds = %24
  br i1 %or.cond3, label %53, label %54

53:                                               ; preds = %52
  tail call void @_tr_stored_block(ptr noundef nonnull %0, ptr noundef nonnull %1, i64 noundef %2, i32 noundef %3)
  br label %70

54:                                               ; preds = %52
  %55 = icmp eq i64 %.058, %.059
  br i1 %55, label %56, label %59

56:                                               ; preds = %54
  %57 = add nsw i32 %3, 2
  %58 = sext i32 %57 to i64
  tail call void @send_bits(ptr noundef nonnull %0, i64 noundef %58, i32 noundef 3)
  tail call void @compress_block(ptr noundef nonnull %0, ptr noundef nonnull @static_ltree, ptr noundef nonnull @static_dtree)
  br label %70

59:                                               ; preds = %54
  %60 = add nsw i32 %3, 4
  %61 = sext i32 %60 to i64
  tail call void @send_bits(ptr noundef nonnull %0, i64 noundef %61, i32 noundef 3)
  %62 = getelementptr inbounds i8, ptr %0, i64 2896
  %63 = load i32, ptr %62, align 8, !tbaa !17
  %64 = add nsw i32 %63, 1
  %65 = getelementptr inbounds i8, ptr %0, i64 2920
  %66 = load i32, ptr %65, align 8, !tbaa !18
  %67 = add nsw i32 %66, 1
  tail call void @send_all_trees(ptr noundef nonnull %0, i32 noundef %64, i32 noundef %67, i32 noundef %.0)
  %68 = getelementptr inbounds i8, ptr %0, i64 196
  %69 = getelementptr inbounds i8, ptr %0, i64 2488
  tail call void @compress_block(ptr noundef nonnull %0, ptr noundef nonnull %68, ptr noundef nonnull %69)
  br label %70

70:                                               ; preds = %56, %59, %53
  tail call void @init_block(ptr noundef nonnull %0)
  %.not66 = icmp eq i32 %3, 0
  br i1 %.not66, label %72, label %71

71:                                               ; preds = %70
  tail call void @bi_windup(ptr noundef nonnull %0)
  br label %72

72:                                               ; preds = %70, %71, %46
  ret void
}

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

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

; Function Attrs: nounwind uwtable
declare hidden void @send_bits2(ptr noundef, i64 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare hidden void @send_all_trees(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #1

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 speculatable 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, !10, i64 180}
!6 = !{!"internal_state", !7, i64 0, !10, i64 8, !7, i64 16, !11, i64 24, !7, i64 32, !10, i64 40, !10, i64 44, !7, i64 48, !10, i64 56, !8, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !7, i64 80, !10, i64 88, !7, i64 96, !7, i64 104, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !11, i64 136, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !8, i64 196, !8, i64 2488, !8, i64 2732, !12, i64 2888, !12, i64 2912, !12, i64 2936, !8, i64 2960, !8, i64 2992, !10, i64 5284, !10, i64 5288, !8, i64 5292, !7, i64 5872, !10, i64 5880, !10, i64 5884, !10, i64 5888, !11, i64 5896, !11, i64 5904, !10, i64 5912, !10, i64 5916, !11, i64 5920, !10, i64 5928, !11, i64 5936}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"tree_desc_s", !7, i64 0, !10, i64 8, !7, i64 16}
!13 = !{!6, !11, i64 5896}
!14 = !{!6, !11, i64 5904}
!15 = !{!6, !10, i64 40}
!16 = !{!11, !11, i64 0}
!17 = !{!6, !10, i64 2896}
!18 = !{!6, !10, i64 2920}


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