; LLVM IR from yourtion/LearningMasteringAlgorithms-C :: source (huffman)

; 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.BiTree_ = type { i32, ptr, ptr, ptr }
%struct.BiTreeNode_ = type { ptr, ptr, ptr }
%struct.HuffNode_ = type { i8, i32 }

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

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

declare void @bitree_destroy(ptr noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

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

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #6

declare i32 @bit_get(ptr noundef, i32 noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @huffman_uncompress(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca [256 x i32], align 16
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 1024, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store ptr null, ptr %15, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr null, ptr %18, align 8, !tbaa !5
  store i32 260, ptr %9, align 4, !tbaa !9
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 1 %19, i64 4, i1 false)
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %34, %2
  %21 = load i32, ptr %14, align 4, !tbaa !9
  %22 = icmp sle i32 %21, 255
  br i1 %22, label %23, label %37

23:                                               ; preds = %20
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = load i32, ptr %14, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = add i64 4, %26
  %28 = getelementptr inbounds i8, ptr %24, i64 %27
  %29 = load i8, ptr %28, align 1, !tbaa !11
  %30 = zext i8 %29 to i32
  %31 = load i32, ptr %14, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [256 x i32], ptr %8, i64 0, i64 %32
  store i32 %30, ptr %33, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %23
  %35 = load i32, ptr %14, align 4, !tbaa !9
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %14, align 4, !tbaa !9
  br label %20, !llvm.loop !12

37:                                               ; preds = %20
  %38 = getelementptr inbounds [256 x i32], ptr %8, i64 0, i64 0
  %39 = call i32 @build_tree(ptr noundef %38, ptr noundef %6)
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %41, label %42

41:                                               ; preds = %37
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %147

42:                                               ; preds = %37
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = mul nsw i32 %43, 8
  store i32 %44, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %12, align 4, !tbaa !9
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.BiTree_, ptr %45, i32 0, i32 3
  %47 = load ptr, ptr %46, align 8, !tbaa !14
  store ptr %47, ptr %7, align 8, !tbaa !5
  br label %48

48:                                               ; preds = %140, %42
  %49 = load i32, ptr %12, align 4, !tbaa !9
  %50 = load i32, ptr %10, align 4, !tbaa !9
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %52, label %141

52:                                               ; preds = %48
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = load i32, ptr %11, align 4, !tbaa !9
  %55 = call i32 @bit_get(ptr noundef %53, i32 noundef %54)
  store i32 %55, ptr %13, align 4, !tbaa !9
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %11, align 4, !tbaa !9
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %76

60:                                               ; preds = %52
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = icmp eq ptr %61, null
  br i1 %62, label %68, label %63

63:                                               ; preds = %60
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.BiTreeNode_, ptr %64, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !16
  %67 = icmp eq ptr %66, null
  br i1 %67, label %68, label %71

68:                                               ; preds = %63, %60
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  call void @bitree_destroy(ptr noundef %69)
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %70) #7
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %147

71:                                               ; preds = %63
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.BiTreeNode_, ptr %72, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8, !tbaa !16
  store ptr %74, ptr %7, align 8, !tbaa !5
  br label %75

75:                                               ; preds = %71
  br label %92

76:                                               ; preds = %52
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = icmp eq ptr %77, null
  br i1 %78, label %84, label %79

79:                                               ; preds = %76
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.BiTreeNode_, ptr %80, i32 0, i32 2
  %82 = load ptr, ptr %81, align 8, !tbaa !18
  %83 = icmp eq ptr %82, null
  br i1 %83, label %84, label %87

84:                                               ; preds = %79, %76
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  call void @bitree_destroy(ptr noundef %85)
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %86) #7
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %147

87:                                               ; preds = %79
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.BiTreeNode_, ptr %88, i32 0, i32 2
  %90 = load ptr, ptr %89, align 8, !tbaa !18
  store ptr %90, ptr %7, align 8, !tbaa !5
  br label %91

91:                                               ; preds = %87
  br label %92

92:                                               ; preds = %91, %75
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.BiTreeNode_, ptr %93, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !16
  %96 = icmp eq ptr %95, null
  br i1 %96, label %97, label %140

97:                                               ; preds = %92
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.BiTreeNode_, ptr %98, i32 0, i32 2
  %100 = load ptr, ptr %99, align 8, !tbaa !18
  %101 = icmp eq ptr %100, null
  br i1 %101, label %102, label %140

102:                                              ; preds = %97
  %103 = load i32, ptr %12, align 4, !tbaa !9
  %104 = icmp sgt i32 %103, 0
  br i1 %104, label %105, label %118

105:                                              ; preds = %102
  %106 = load ptr, ptr %15, align 8, !tbaa !5
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  %109 = sext i32 %108 to i64
  %110 = call ptr @realloc(ptr noundef %106, i64 noundef %109) #8
  store ptr %110, ptr %16, align 8, !tbaa !5
  %111 = icmp eq ptr %110, null
  br i1 %111, label %112, label %116

112:                                              ; preds = %105
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  call void @bitree_destroy(ptr noundef %113)
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %114) #7
  %115 = load ptr, ptr %15, align 8, !tbaa !5
  call void @free(ptr noundef %115) #7
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %147

116:                                              ; preds = %105
  %117 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %117, ptr %15, align 8, !tbaa !5
  br label %125

118:                                              ; preds = %102
  %119 = call noalias ptr @malloc(i64 noundef 1) #9
  store ptr %119, ptr %15, align 8, !tbaa !5
  %120 = icmp eq ptr %119, null
  br i1 %120, label %121, label %124

121:                                              ; preds = %118
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  call void @bitree_destroy(ptr noundef %122)
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %123) #7
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %147

124:                                              ; preds = %118
  br label %125

125:                                              ; preds = %124, %116
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.BiTreeNode_, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !19
  %129 = getelementptr inbounds %struct.HuffNode_, ptr %128, i32 0, i32 0
  %130 = load i8, ptr %129, align 4, !tbaa !20
  %131 = load ptr, ptr %15, align 8, !tbaa !5
  %132 = load i32, ptr %12, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i8, ptr %131, i64 %133
  store i8 %130, ptr %134, align 1, !tbaa !11
  %135 = load i32, ptr %12, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %12, align 4, !tbaa !9
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.BiTree_, ptr %137, i32 0, i32 3
  %139 = load ptr, ptr %138, align 8, !tbaa !14
  store ptr %139, ptr %7, align 8, !tbaa !5
  br label %140

140:                                              ; preds = %125, %97, %92
  br label %48, !llvm.loop !22

141:                                              ; preds = %48
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  call void @bitree_destroy(ptr noundef %142)
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %143) #7
  %144 = load ptr, ptr %15, align 8, !tbaa !5
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %144, ptr %145, align 8, !tbaa !5
  %146 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %146, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %147

147:                                              ; preds = %141, %121, %112, %84, %68, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %148 = load i32, ptr %3, align 4
  ret i32 %148
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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" }
attributes #3 = { nounwind "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 allocsize(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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind allocsize(1) "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 allocsize(1) }
attributes #9 = { nounwind allocsize(0) }

!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 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !6, i64 24}
!15 = !{!"BiTree_", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!17, !6, i64 8}
!17 = !{!"BiTreeNode_", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!17, !6, i64 16}
!19 = !{!17, !6, i64 0}
!20 = !{!21, !7, i64 0}
!21 = !{!"HuffNode_", !7, i64 0, !10, i64 4}
!22 = distinct !{!22, !13}


; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

declare void @bitree_destroy(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #5

declare i32 @bit_get(ptr noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @huffman_uncompress(ptr noundef %0, ptr nocapture noundef writeonly %1) local_unnamed_addr #1 {
vector.ph:
  %2 = alloca ptr, align 8
  %3 = alloca [256 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #6
  store ptr null, ptr %1, align 8, !tbaa !5
  %.0.copyload = load i32, ptr %0, align 1
  %invariant.gep = getelementptr inbounds i8, ptr %0, i64 4
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %wide.load = load <4 x i8>, ptr %invariant.gep, align 1, !tbaa !9
  %wide.load75 = load <4 x i8>, ptr %4, align 1, !tbaa !9
  %5 = zext <4 x i8> %wide.load to <4 x i32>
  %6 = zext <4 x i8> %wide.load75 to <4 x i32>
  %7 = getelementptr inbounds i8, ptr %3, i64 16
  store <4 x i32> %5, ptr %3, align 16, !tbaa !10
  store <4 x i32> %6, ptr %7, align 16, !tbaa !10
  %8 = getelementptr inbounds i8, ptr %0, i64 12
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %wide.load.1 = load <4 x i8>, ptr %8, align 1, !tbaa !9
  %wide.load75.1 = load <4 x i8>, ptr %9, align 1, !tbaa !9
  %10 = zext <4 x i8> %wide.load.1 to <4 x i32>
  %11 = zext <4 x i8> %wide.load75.1 to <4 x i32>
  %12 = getelementptr inbounds i8, ptr %3, i64 32
  %13 = getelementptr inbounds i8, ptr %3, i64 48
  store <4 x i32> %10, ptr %12, align 16, !tbaa !10
  store <4 x i32> %11, ptr %13, align 16, !tbaa !10
  %14 = getelementptr inbounds i8, ptr %0, i64 20
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  %wide.load.2 = load <4 x i8>, ptr %14, align 1, !tbaa !9
  %wide.load75.2 = load <4 x i8>, ptr %15, align 1, !tbaa !9
  %16 = zext <4 x i8> %wide.load.2 to <4 x i32>
  %17 = zext <4 x i8> %wide.load75.2 to <4 x i32>
  %18 = getelementptr inbounds i8, ptr %3, i64 64
  %19 = getelementptr inbounds i8, ptr %3, i64 80
  store <4 x i32> %16, ptr %18, align 16, !tbaa !10
  store <4 x i32> %17, ptr %19, align 16, !tbaa !10
  %20 = getelementptr inbounds i8, ptr %0, i64 28
  %21 = getelementptr inbounds i8, ptr %0, i64 32
  %wide.load.3 = load <4 x i8>, ptr %20, align 1, !tbaa !9
  %wide.load75.3 = load <4 x i8>, ptr %21, align 1, !tbaa !9
  %22 = zext <4 x i8> %wide.load.3 to <4 x i32>
  %23 = zext <4 x i8> %wide.load75.3 to <4 x i32>
  %24 = getelementptr inbounds i8, ptr %3, i64 96
  %25 = getelementptr inbounds i8, ptr %3, i64 112
  store <4 x i32> %22, ptr %24, align 16, !tbaa !10
  store <4 x i32> %23, ptr %25, align 16, !tbaa !10
  %26 = getelementptr inbounds i8, ptr %0, i64 36
  %27 = getelementptr inbounds i8, ptr %0, i64 40
  %wide.load.4 = load <4 x i8>, ptr %26, align 1, !tbaa !9
  %wide.load75.4 = load <4 x i8>, ptr %27, align 1, !tbaa !9
  %28 = zext <4 x i8> %wide.load.4 to <4 x i32>
  %29 = zext <4 x i8> %wide.load75.4 to <4 x i32>
  %30 = getelementptr inbounds i8, ptr %3, i64 128
  %31 = getelementptr inbounds i8, ptr %3, i64 144
  store <4 x i32> %28, ptr %30, align 16, !tbaa !10
  store <4 x i32> %29, ptr %31, align 16, !tbaa !10
  %32 = getelementptr inbounds i8, ptr %0, i64 44
  %33 = getelementptr inbounds i8, ptr %0, i64 48
  %wide.load.5 = load <4 x i8>, ptr %32, align 1, !tbaa !9
  %wide.load75.5 = load <4 x i8>, ptr %33, align 1, !tbaa !9
  %34 = zext <4 x i8> %wide.load.5 to <4 x i32>
  %35 = zext <4 x i8> %wide.load75.5 to <4 x i32>
  %36 = getelementptr inbounds i8, ptr %3, i64 160
  %37 = getelementptr inbounds i8, ptr %3, i64 176
  store <4 x i32> %34, ptr %36, align 16, !tbaa !10
  store <4 x i32> %35, ptr %37, align 16, !tbaa !10
  %38 = getelementptr inbounds i8, ptr %0, i64 52
  %39 = getelementptr inbounds i8, ptr %0, i64 56
  %wide.load.6 = load <4 x i8>, ptr %38, align 1, !tbaa !9
  %wide.load75.6 = load <4 x i8>, ptr %39, align 1, !tbaa !9
  %40 = zext <4 x i8> %wide.load.6 to <4 x i32>
  %41 = zext <4 x i8> %wide.load75.6 to <4 x i32>
  %42 = getelementptr inbounds i8, ptr %3, i64 192
  %43 = getelementptr inbounds i8, ptr %3, i64 208
  store <4 x i32> %40, ptr %42, align 16, !tbaa !10
  store <4 x i32> %41, ptr %43, align 16, !tbaa !10
  %44 = getelementptr inbounds i8, ptr %0, i64 60
  %45 = getelementptr inbounds i8, ptr %0, i64 64
  %wide.load.7 = load <4 x i8>, ptr %44, align 1, !tbaa !9
  %wide.load75.7 = load <4 x i8>, ptr %45, align 1, !tbaa !9
  %46 = zext <4 x i8> %wide.load.7 to <4 x i32>
  %47 = zext <4 x i8> %wide.load75.7 to <4 x i32>
  %48 = getelementptr inbounds i8, ptr %3, i64 224
  %49 = getelementptr inbounds i8, ptr %3, i64 240
  store <4 x i32> %46, ptr %48, align 16, !tbaa !10
  store <4 x i32> %47, ptr %49, align 16, !tbaa !10
  %50 = getelementptr inbounds i8, ptr %0, i64 68
  %51 = getelementptr inbounds i8, ptr %0, i64 72
  %wide.load.8 = load <4 x i8>, ptr %50, align 1, !tbaa !9
  %wide.load75.8 = load <4 x i8>, ptr %51, align 1, !tbaa !9
  %52 = zext <4 x i8> %wide.load.8 to <4 x i32>
  %53 = zext <4 x i8> %wide.load75.8 to <4 x i32>
  %54 = getelementptr inbounds i8, ptr %3, i64 256
  %55 = getelementptr inbounds i8, ptr %3, i64 272
  store <4 x i32> %52, ptr %54, align 16, !tbaa !10
  store <4 x i32> %53, ptr %55, align 16, !tbaa !10
  %56 = getelementptr inbounds i8, ptr %0, i64 76
  %57 = getelementptr inbounds i8, ptr %0, i64 80
  %wide.load.9 = load <4 x i8>, ptr %56, align 1, !tbaa !9
  %wide.load75.9 = load <4 x i8>, ptr %57, align 1, !tbaa !9
  %58 = zext <4 x i8> %wide.load.9 to <4 x i32>
  %59 = zext <4 x i8> %wide.load75.9 to <4 x i32>
  %60 = getelementptr inbounds i8, ptr %3, i64 288
  %61 = getelementptr inbounds i8, ptr %3, i64 304
  store <4 x i32> %58, ptr %60, align 16, !tbaa !10
  store <4 x i32> %59, ptr %61, align 16, !tbaa !10
  %62 = getelementptr inbounds i8, ptr %0, i64 84
  %63 = getelementptr inbounds i8, ptr %0, i64 88
  %wide.load.10 = load <4 x i8>, ptr %62, align 1, !tbaa !9
  %wide.load75.10 = load <4 x i8>, ptr %63, align 1, !tbaa !9
  %64 = zext <4 x i8> %wide.load.10 to <4 x i32>
  %65 = zext <4 x i8> %wide.load75.10 to <4 x i32>
  %66 = getelementptr inbounds i8, ptr %3, i64 320
  %67 = getelementptr inbounds i8, ptr %3, i64 336
  store <4 x i32> %64, ptr %66, align 16, !tbaa !10
  store <4 x i32> %65, ptr %67, align 16, !tbaa !10
  %68 = getelementptr inbounds i8, ptr %0, i64 92
  %69 = getelementptr inbounds i8, ptr %0, i64 96
  %wide.load.11 = load <4 x i8>, ptr %68, align 1, !tbaa !9
  %wide.load75.11 = load <4 x i8>, ptr %69, align 1, !tbaa !9
  %70 = zext <4 x i8> %wide.load.11 to <4 x i32>
  %71 = zext <4 x i8> %wide.load75.11 to <4 x i32>
  %72 = getelementptr inbounds i8, ptr %3, i64 352
  %73 = getelementptr inbounds i8, ptr %3, i64 368
  store <4 x i32> %70, ptr %72, align 16, !tbaa !10
  store <4 x i32> %71, ptr %73, align 16, !tbaa !10
  %74 = getelementptr inbounds i8, ptr %0, i64 100
  %75 = getelementptr inbounds i8, ptr %0, i64 104
  %wide.load.12 = load <4 x i8>, ptr %74, align 1, !tbaa !9
  %wide.load75.12 = load <4 x i8>, ptr %75, align 1, !tbaa !9
  %76 = zext <4 x i8> %wide.load.12 to <4 x i32>
  %77 = zext <4 x i8> %wide.load75.12 to <4 x i32>
  %78 = getelementptr inbounds i8, ptr %3, i64 384
  %79 = getelementptr inbounds i8, ptr %3, i64 400
  store <4 x i32> %76, ptr %78, align 16, !tbaa !10
  store <4 x i32> %77, ptr %79, align 16, !tbaa !10
  %80 = getelementptr inbounds i8, ptr %0, i64 108
  %81 = getelementptr inbounds i8, ptr %0, i64 112
  %wide.load.13 = load <4 x i8>, ptr %80, align 1, !tbaa !9
  %wide.load75.13 = load <4 x i8>, ptr %81, align 1, !tbaa !9
  %82 = zext <4 x i8> %wide.load.13 to <4 x i32>
  %83 = zext <4 x i8> %wide.load75.13 to <4 x i32>
  %84 = getelementptr inbounds i8, ptr %3, i64 416
  %85 = getelementptr inbounds i8, ptr %3, i64 432
  store <4 x i32> %82, ptr %84, align 16, !tbaa !10
  store <4 x i32> %83, ptr %85, align 16, !tbaa !10
  %86 = getelementptr inbounds i8, ptr %0, i64 116
  %87 = getelementptr inbounds i8, ptr %0, i64 120
  %wide.load.14 = load <4 x i8>, ptr %86, align 1, !tbaa !9
  %wide.load75.14 = load <4 x i8>, ptr %87, align 1, !tbaa !9
  %88 = zext <4 x i8> %wide.load.14 to <4 x i32>
  %89 = zext <4 x i8> %wide.load75.14 to <4 x i32>
  %90 = getelementptr inbounds i8, ptr %3, i64 448
  %91 = getelementptr inbounds i8, ptr %3, i64 464
  store <4 x i32> %88, ptr %90, align 16, !tbaa !10
  store <4 x i32> %89, ptr %91, align 16, !tbaa !10
  %92 = getelementptr inbounds i8, ptr %0, i64 124
  %93 = getelementptr inbounds i8, ptr %0, i64 128
  %wide.load.15 = load <4 x i8>, ptr %92, align 1, !tbaa !9
  %wide.load75.15 = load <4 x i8>, ptr %93, align 1, !tbaa !9
  %94 = zext <4 x i8> %wide.load.15 to <4 x i32>
  %95 = zext <4 x i8> %wide.load75.15 to <4 x i32>
  %96 = getelementptr inbounds i8, ptr %3, i64 480
  %97 = getelementptr inbounds i8, ptr %3, i64 496
  store <4 x i32> %94, ptr %96, align 16, !tbaa !10
  store <4 x i32> %95, ptr %97, align 16, !tbaa !10
  %98 = getelementptr inbounds i8, ptr %0, i64 132
  %99 = getelementptr inbounds i8, ptr %0, i64 136
  %wide.load.16 = load <4 x i8>, ptr %98, align 1, !tbaa !9
  %wide.load75.16 = load <4 x i8>, ptr %99, align 1, !tbaa !9
  %100 = zext <4 x i8> %wide.load.16 to <4 x i32>
  %101 = zext <4 x i8> %wide.load75.16 to <4 x i32>
  %102 = getelementptr inbounds i8, ptr %3, i64 512
  %103 = getelementptr inbounds i8, ptr %3, i64 528
  store <4 x i32> %100, ptr %102, align 16, !tbaa !10
  store <4 x i32> %101, ptr %103, align 16, !tbaa !10
  %104 = getelementptr inbounds i8, ptr %0, i64 140
  %105 = getelementptr inbounds i8, ptr %0, i64 144
  %wide.load.17 = load <4 x i8>, ptr %104, align 1, !tbaa !9
  %wide.load75.17 = load <4 x i8>, ptr %105, align 1, !tbaa !9
  %106 = zext <4 x i8> %wide.load.17 to <4 x i32>
  %107 = zext <4 x i8> %wide.load75.17 to <4 x i32>
  %108 = getelementptr inbounds i8, ptr %3, i64 544
  %109 = getelementptr inbounds i8, ptr %3, i64 560
  store <4 x i32> %106, ptr %108, align 16, !tbaa !10
  store <4 x i32> %107, ptr %109, align 16, !tbaa !10
  %110 = getelementptr inbounds i8, ptr %0, i64 148
  %111 = getelementptr inbounds i8, ptr %0, i64 152
  %wide.load.18 = load <4 x i8>, ptr %110, align 1, !tbaa !9
  %wide.load75.18 = load <4 x i8>, ptr %111, align 1, !tbaa !9
  %112 = zext <4 x i8> %wide.load.18 to <4 x i32>
  %113 = zext <4 x i8> %wide.load75.18 to <4 x i32>
  %114 = getelementptr inbounds i8, ptr %3, i64 576
  %115 = getelementptr inbounds i8, ptr %3, i64 592
  store <4 x i32> %112, ptr %114, align 16, !tbaa !10
  store <4 x i32> %113, ptr %115, align 16, !tbaa !10
  %116 = getelementptr inbounds i8, ptr %0, i64 156
  %117 = getelementptr inbounds i8, ptr %0, i64 160
  %wide.load.19 = load <4 x i8>, ptr %116, align 1, !tbaa !9
  %wide.load75.19 = load <4 x i8>, ptr %117, align 1, !tbaa !9
  %118 = zext <4 x i8> %wide.load.19 to <4 x i32>
  %119 = zext <4 x i8> %wide.load75.19 to <4 x i32>
  %120 = getelementptr inbounds i8, ptr %3, i64 608
  %121 = getelementptr inbounds i8, ptr %3, i64 624
  store <4 x i32> %118, ptr %120, align 16, !tbaa !10
  store <4 x i32> %119, ptr %121, align 16, !tbaa !10
  %122 = getelementptr inbounds i8, ptr %0, i64 164
  %123 = getelementptr inbounds i8, ptr %0, i64 168
  %wide.load.20 = load <4 x i8>, ptr %122, align 1, !tbaa !9
  %wide.load75.20 = load <4 x i8>, ptr %123, align 1, !tbaa !9
  %124 = zext <4 x i8> %wide.load.20 to <4 x i32>
  %125 = zext <4 x i8> %wide.load75.20 to <4 x i32>
  %126 = getelementptr inbounds i8, ptr %3, i64 640
  %127 = getelementptr inbounds i8, ptr %3, i64 656
  store <4 x i32> %124, ptr %126, align 16, !tbaa !10
  store <4 x i32> %125, ptr %127, align 16, !tbaa !10
  %128 = getelementptr inbounds i8, ptr %0, i64 172
  %129 = getelementptr inbounds i8, ptr %0, i64 176
  %wide.load.21 = load <4 x i8>, ptr %128, align 1, !tbaa !9
  %wide.load75.21 = load <4 x i8>, ptr %129, align 1, !tbaa !9
  %130 = zext <4 x i8> %wide.load.21 to <4 x i32>
  %131 = zext <4 x i8> %wide.load75.21 to <4 x i32>
  %132 = getelementptr inbounds i8, ptr %3, i64 672
  %133 = getelementptr inbounds i8, ptr %3, i64 688
  store <4 x i32> %130, ptr %132, align 16, !tbaa !10
  store <4 x i32> %131, ptr %133, align 16, !tbaa !10
  %134 = getelementptr inbounds i8, ptr %0, i64 180
  %135 = getelementptr inbounds i8, ptr %0, i64 184
  %wide.load.22 = load <4 x i8>, ptr %134, align 1, !tbaa !9
  %wide.load75.22 = load <4 x i8>, ptr %135, align 1, !tbaa !9
  %136 = zext <4 x i8> %wide.load.22 to <4 x i32>
  %137 = zext <4 x i8> %wide.load75.22 to <4 x i32>
  %138 = getelementptr inbounds i8, ptr %3, i64 704
  %139 = getelementptr inbounds i8, ptr %3, i64 720
  store <4 x i32> %136, ptr %138, align 16, !tbaa !10
  store <4 x i32> %137, ptr %139, align 16, !tbaa !10
  %140 = getelementptr inbounds i8, ptr %0, i64 188
  %141 = getelementptr inbounds i8, ptr %0, i64 192
  %wide.load.23 = load <4 x i8>, ptr %140, align 1, !tbaa !9
  %wide.load75.23 = load <4 x i8>, ptr %141, align 1, !tbaa !9
  %142 = zext <4 x i8> %wide.load.23 to <4 x i32>
  %143 = zext <4 x i8> %wide.load75.23 to <4 x i32>
  %144 = getelementptr inbounds i8, ptr %3, i64 736
  %145 = getelementptr inbounds i8, ptr %3, i64 752
  store <4 x i32> %142, ptr %144, align 16, !tbaa !10
  store <4 x i32> %143, ptr %145, align 16, !tbaa !10
  %146 = getelementptr inbounds i8, ptr %0, i64 196
  %147 = getelementptr inbounds i8, ptr %0, i64 200
  %wide.load.24 = load <4 x i8>, ptr %146, align 1, !tbaa !9
  %wide.load75.24 = load <4 x i8>, ptr %147, align 1, !tbaa !9
  %148 = zext <4 x i8> %wide.load.24 to <4 x i32>
  %149 = zext <4 x i8> %wide.load75.24 to <4 x i32>
  %150 = getelementptr inbounds i8, ptr %3, i64 768
  %151 = getelementptr inbounds i8, ptr %3, i64 784
  store <4 x i32> %148, ptr %150, align 16, !tbaa !10
  store <4 x i32> %149, ptr %151, align 16, !tbaa !10
  %152 = getelementptr inbounds i8, ptr %0, i64 204
  %153 = getelementptr inbounds i8, ptr %0, i64 208
  %wide.load.25 = load <4 x i8>, ptr %152, align 1, !tbaa !9
  %wide.load75.25 = load <4 x i8>, ptr %153, align 1, !tbaa !9
  %154 = zext <4 x i8> %wide.load.25 to <4 x i32>
  %155 = zext <4 x i8> %wide.load75.25 to <4 x i32>
  %156 = getelementptr inbounds i8, ptr %3, i64 800
  %157 = getelementptr inbounds i8, ptr %3, i64 816
  store <4 x i32> %154, ptr %156, align 16, !tbaa !10
  store <4 x i32> %155, ptr %157, align 16, !tbaa !10
  %158 = getelementptr inbounds i8, ptr %0, i64 212
  %159 = getelementptr inbounds i8, ptr %0, i64 216
  %wide.load.26 = load <4 x i8>, ptr %158, align 1, !tbaa !9
  %wide.load75.26 = load <4 x i8>, ptr %159, align 1, !tbaa !9
  %160 = zext <4 x i8> %wide.load.26 to <4 x i32>
  %161 = zext <4 x i8> %wide.load75.26 to <4 x i32>
  %162 = getelementptr inbounds i8, ptr %3, i64 832
  %163 = getelementptr inbounds i8, ptr %3, i64 848
  store <4 x i32> %160, ptr %162, align 16, !tbaa !10
  store <4 x i32> %161, ptr %163, align 16, !tbaa !10
  %164 = getelementptr inbounds i8, ptr %0, i64 220
  %165 = getelementptr inbounds i8, ptr %0, i64 224
  %wide.load.27 = load <4 x i8>, ptr %164, align 1, !tbaa !9
  %wide.load75.27 = load <4 x i8>, ptr %165, align 1, !tbaa !9
  %166 = zext <4 x i8> %wide.load.27 to <4 x i32>
  %167 = zext <4 x i8> %wide.load75.27 to <4 x i32>
  %168 = getelementptr inbounds i8, ptr %3, i64 864
  %169 = getelementptr inbounds i8, ptr %3, i64 880
  store <4 x i32> %166, ptr %168, align 16, !tbaa !10
  store <4 x i32> %167, ptr %169, align 16, !tbaa !10
  %170 = getelementptr inbounds i8, ptr %0, i64 228
  %171 = getelementptr inbounds i8, ptr %0, i64 232
  %wide.load.28 = load <4 x i8>, ptr %170, align 1, !tbaa !9
  %wide.load75.28 = load <4 x i8>, ptr %171, align 1, !tbaa !9
  %172 = zext <4 x i8> %wide.load.28 to <4 x i32>
  %173 = zext <4 x i8> %wide.load75.28 to <4 x i32>
  %174 = getelementptr inbounds i8, ptr %3, i64 896
  %175 = getelementptr inbounds i8, ptr %3, i64 912
  store <4 x i32> %172, ptr %174, align 16, !tbaa !10
  store <4 x i32> %173, ptr %175, align 16, !tbaa !10
  %176 = getelementptr inbounds i8, ptr %0, i64 236
  %177 = getelementptr inbounds i8, ptr %0, i64 240
  %wide.load.29 = load <4 x i8>, ptr %176, align 1, !tbaa !9
  %wide.load75.29 = load <4 x i8>, ptr %177, align 1, !tbaa !9
  %178 = zext <4 x i8> %wide.load.29 to <4 x i32>
  %179 = zext <4 x i8> %wide.load75.29 to <4 x i32>
  %180 = getelementptr inbounds i8, ptr %3, i64 928
  %181 = getelementptr inbounds i8, ptr %3, i64 944
  store <4 x i32> %178, ptr %180, align 16, !tbaa !10
  store <4 x i32> %179, ptr %181, align 16, !tbaa !10
  %182 = getelementptr inbounds i8, ptr %0, i64 244
  %183 = getelementptr inbounds i8, ptr %0, i64 248
  %wide.load.30 = load <4 x i8>, ptr %182, align 1, !tbaa !9
  %wide.load75.30 = load <4 x i8>, ptr %183, align 1, !tbaa !9
  %184 = zext <4 x i8> %wide.load.30 to <4 x i32>
  %185 = zext <4 x i8> %wide.load75.30 to <4 x i32>
  %186 = getelementptr inbounds i8, ptr %3, i64 960
  %187 = getelementptr inbounds i8, ptr %3, i64 976
  store <4 x i32> %184, ptr %186, align 16, !tbaa !10
  store <4 x i32> %185, ptr %187, align 16, !tbaa !10
  %188 = getelementptr inbounds i8, ptr %0, i64 252
  %189 = getelementptr inbounds i8, ptr %0, i64 256
  %wide.load.31 = load <4 x i8>, ptr %188, align 1, !tbaa !9
  %wide.load75.31 = load <4 x i8>, ptr %189, align 1, !tbaa !9
  %190 = zext <4 x i8> %wide.load.31 to <4 x i32>
  %191 = zext <4 x i8> %wide.load75.31 to <4 x i32>
  %192 = getelementptr inbounds i8, ptr %3, i64 992
  %193 = getelementptr inbounds i8, ptr %3, i64 1008
  store <4 x i32> %190, ptr %192, align 16, !tbaa !10
  store <4 x i32> %191, ptr %193, align 16, !tbaa !10
  %194 = call i32 @build_tree(ptr noundef nonnull %3, ptr noundef nonnull %2)
  %.not = icmp eq i32 %194, 0
  br i1 %.not, label %195, label %256

195:                                              ; preds = %vector.ph
  %196 = load ptr, ptr %2, align 8, !tbaa !5
  %197 = icmp sgt i32 %.0.copyload, 0
  br i1 %197, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %195
  %198 = getelementptr inbounds i8, ptr %196, i64 24
  %199 = load ptr, ptr %198, align 8, !tbaa !12
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %252
  %.03458 = phi ptr [ %.2, %252 ], [ null, %.lr.ph.preheader ]
  %.03657 = phi ptr [ %.238, %252 ], [ %199, %.lr.ph.preheader ]
  %.03956 = phi i32 [ %.140, %252 ], [ 0, %.lr.ph.preheader ]
  %.04155 = phi i32 [ %201, %252 ], [ 2080, %.lr.ph.preheader ]
  %200 = call i32 @bit_get(ptr noundef nonnull %0, i32 noundef %.04155) #6
  %201 = add nuw nsw i32 %.04155, 1
  %202 = icmp eq i32 %200, 0
  %203 = icmp eq ptr %.03657, null
  br i1 %202, label %204, label %212

204:                                              ; preds = %.lr.ph
  br i1 %203, label %209, label %205

205:                                              ; preds = %204
  %206 = getelementptr inbounds i8, ptr %.03657, i64 8
  %207 = load ptr, ptr %206, align 8, !tbaa !14
  %208 = icmp eq ptr %207, null
  br i1 %208, label %209, label %220

209:                                              ; preds = %205, %204
  %210 = load ptr, ptr %2, align 8, !tbaa !5
  call void @bitree_destroy(ptr noundef %210) #6
  %211 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %211) #6
  br label %256

212:                                              ; preds = %.lr.ph
  br i1 %203, label %217, label %213

213:                                              ; preds = %212
  %214 = getelementptr inbounds i8, ptr %.03657, i64 16
  %215 = load ptr, ptr %214, align 8, !tbaa !16
  %216 = icmp eq ptr %215, null
  br i1 %216, label %217, label %220

217:                                              ; preds = %213, %212
  %218 = load ptr, ptr %2, align 8, !tbaa !5
  call void @bitree_destroy(ptr noundef %218) #6
  %219 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %219) #6
  br label %256

220:                                              ; preds = %213, %205
  %.137 = phi ptr [ %207, %205 ], [ %215, %213 ]
  %221 = getelementptr inbounds i8, ptr %.137, i64 8
  %222 = load ptr, ptr %221, align 8, !tbaa !14
  %223 = icmp eq ptr %222, null
  br i1 %223, label %224, label %252

224:                                              ; preds = %220
  %225 = getelementptr inbounds i8, ptr %.137, i64 16
  %226 = load ptr, ptr %225, align 8, !tbaa !16
  %227 = icmp eq ptr %226, null
  br i1 %227, label %228, label %252

228:                                              ; preds = %224
  %229 = icmp sgt i32 %.03956, 0
  br i1 %229, label %230, label %238

230:                                              ; preds = %228
  %231 = add nuw nsw i32 %.03956, 1
  %232 = zext nneg i32 %231 to i64
  %233 = call ptr @realloc(ptr noundef %.03458, i64 noundef %232) #7
  %234 = icmp eq ptr %233, null
  br i1 %234, label %235, label %244

235:                                              ; preds = %230
  %236 = load ptr, ptr %2, align 8, !tbaa !5
  call void @bitree_destroy(ptr noundef %236) #6
  %237 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %237) #6
  call void @free(ptr noundef %.03458) #6
  br label %256

238:                                              ; preds = %228
  %239 = call noalias dereferenceable_or_null(1) ptr @malloc(i64 noundef 1) #8
  %240 = icmp eq ptr %239, null
  br i1 %240, label %241, label %._crit_edge65

._crit_edge65:                                    ; preds = %238
  %.pre66 = add nsw i32 %.03956, 1
  br label %244

241:                                              ; preds = %238
  %242 = load ptr, ptr %2, align 8, !tbaa !5
  call void @bitree_destroy(ptr noundef %242) #6
  %243 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %243) #6
  br label %256

244:                                              ; preds = %._crit_edge65, %230
  %.pre-phi = phi i32 [ %.pre66, %._crit_edge65 ], [ %231, %230 ]
  %.1 = phi ptr [ %239, %._crit_edge65 ], [ %233, %230 ]
  %245 = load ptr, ptr %.137, align 8, !tbaa !17
  %246 = load i8, ptr %245, align 4, !tbaa !18
  %247 = sext i32 %.03956 to i64
  %248 = getelementptr inbounds i8, ptr %.1, i64 %247
  store i8 %246, ptr %248, align 1, !tbaa !9
  %249 = load ptr, ptr %2, align 8, !tbaa !5
  %250 = getelementptr inbounds i8, ptr %249, i64 24
  %251 = load ptr, ptr %250, align 8, !tbaa !12
  br label %252

252:                                              ; preds = %244, %224, %220
  %.140 = phi i32 [ %.pre-phi, %244 ], [ %.03956, %224 ], [ %.03956, %220 ]
  %.238 = phi ptr [ %251, %244 ], [ %.137, %224 ], [ %.137, %220 ]
  %.2 = phi ptr [ %.1, %244 ], [ %.03458, %224 ], [ %.03458, %220 ]
  %253 = icmp slt i32 %.140, %.0.copyload
  br i1 %253, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !20

._crit_edge.loopexit:                             ; preds = %252
  %.pre = load ptr, ptr %2, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %195
  %254 = phi ptr [ %196, %195 ], [ %.pre, %._crit_edge.loopexit ]
  %.039.lcssa = phi i32 [ 0, %195 ], [ %.140, %._crit_edge.loopexit ]
  %.034.lcssa = phi ptr [ null, %195 ], [ %.2, %._crit_edge.loopexit ]
  call void @bitree_destroy(ptr noundef %254) #6
  %255 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %255) #6
  store ptr %.034.lcssa, ptr %1, align 8, !tbaa !5
  br label %256

256:                                              ; preds = %vector.ph, %._crit_edge, %241, %235, %217, %209
  %.0 = phi i32 [ -1, %209 ], [ -1, %235 ], [ -1, %241 ], [ -1, %217 ], [ %.039.lcssa, %._crit_edge ], [ -1, %vector.ph ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  ret i32 %.0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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" }
attributes #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #5 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(1) }
attributes #8 = { nounwind allocsize(0) }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 24}
!13 = !{!"BiTree_", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!14 = !{!15, !6, i64 8}
!15 = !{!"BiTreeNode_", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!15, !6, i64 16}
!17 = !{!15, !6, i64 0}
!18 = !{!19, !7, i64 0}
!19 = !{!"HuffNode_", !7, i64 0, !11, i64 4}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass