; LLVM IR from hutusi/rethink-c :: test (test_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._HuffmanTree = type { ptr }
%struct._HuffmanNode = type { i8, i32, ptr, ptr }

@.str = external hidden unnamed_addr constant [43 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__.test_huffman_tree_inflate = external hidden unnamed_addr constant [33 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [53 x i8], align 1

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

declare ptr @huffman_heap_new(...) #1

declare i32 @huffman_heap_insert(ptr noundef, i8 noundef signext, i32 noundef) #1

declare ptr @huffman_tree_from(ptr noundef) #1

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

declare void @huffman_tree_free(ptr noundef) #1

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

declare void @bitmap_free(ptr noundef) #1

declare ptr @huffman_tree_deflate(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @test_huffman_tree_inflate() #3 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  %5 = call ptr (...) @huffman_heap_new()
  store ptr %5, ptr %1, align 8, !tbaa !5
  %6 = load ptr, ptr %1, align 8, !tbaa !5
  %7 = call i32 @huffman_heap_insert(ptr noundef %6, i8 noundef signext 97, i32 noundef 7)
  %8 = load ptr, ptr %1, align 8, !tbaa !5
  %9 = call i32 @huffman_heap_insert(ptr noundef %8, i8 noundef signext 98, i32 noundef 5)
  %10 = load ptr, ptr %1, align 8, !tbaa !5
  %11 = call i32 @huffman_heap_insert(ptr noundef %10, i8 noundef signext 99, i32 noundef 3)
  %12 = load ptr, ptr %1, align 8, !tbaa !5
  %13 = call i32 @huffman_heap_insert(ptr noundef %12, i8 noundef signext 100, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  %14 = load ptr, ptr %1, align 8, !tbaa !5
  %15 = call ptr @huffman_tree_from(ptr noundef %14)
  store ptr %15, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = call ptr @huffman_tree_deflate(ptr noundef %16)
  store ptr %17, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = call ptr @huffman_tree_inflate(ptr noundef %18)
  store ptr %19, ptr %4, align 8, !tbaa !5
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct._HuffmanTree, ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct._HuffmanNode, ptr %22, i32 0, i32 2
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds %struct._HuffmanNode, ptr %24, i32 0, i32 0
  %26 = load i8, ptr %25, align 8, !tbaa !14
  %27 = sext i8 %26 to i32
  %28 = icmp ne i32 %27, 97
  br i1 %28, label %29, label %51

29:                                               ; preds = %0
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._HuffmanTree, ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds %struct._HuffmanNode, ptr %32, i32 0, i32 2
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = getelementptr inbounds %struct._HuffmanNode, ptr %34, i32 0, i32 0
  %36 = load i8, ptr %35, align 8, !tbaa !14
  %37 = sext i8 %36 to i32
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %37, i32 noundef 97)
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._HuffmanTree, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = getelementptr inbounds %struct._HuffmanNode, ptr %41, i32 0, i32 2
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = getelementptr inbounds %struct._HuffmanNode, ptr %43, i32 0, i32 0
  %45 = load i8, ptr %44, align 8, !tbaa !14
  %46 = sext i8 %45 to i32
  %47 = icmp eq i32 %46, 97
  br i1 %47, label %48, label %49

48:                                               ; preds = %29
  br label %50

49:                                               ; preds = %29
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.2, i32 noundef 306, ptr noundef @__PRETTY_FUNCTION__.test_huffman_tree_inflate) #5
  unreachable

50:                                               ; preds = %48
  br label %51

51:                                               ; preds = %50, %0
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct._HuffmanTree, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct._HuffmanNode, ptr %54, i32 0, i32 2
  %56 = load ptr, ptr %55, align 8, !tbaa !11
  %57 = getelementptr inbounds %struct._HuffmanNode, ptr %56, i32 0, i32 1
  %58 = load i32, ptr %57, align 4, !tbaa !15
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %80

60:                                               ; preds = %51
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct._HuffmanTree, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct._HuffmanNode, ptr %63, i32 0, i32 2
  %65 = load ptr, ptr %64, align 8, !tbaa !11
  %66 = getelementptr inbounds %struct._HuffmanNode, ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 4, !tbaa !15
  %68 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %67, i32 noundef 0)
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._HuffmanTree, ptr %69, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct._HuffmanNode, ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !11
  %74 = getelementptr inbounds %struct._HuffmanNode, ptr %73, i32 0, i32 1
  %75 = load i32, ptr %74, align 4, !tbaa !15
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %78

77:                                               ; preds = %60
  br label %79

78:                                               ; preds = %60
  call void @__assert_fail(ptr noundef @.str.27, ptr noundef @.str.2, i32 noundef 307, ptr noundef @__PRETTY_FUNCTION__.test_huffman_tree_inflate) #5
  unreachable

79:                                               ; preds = %77
  br label %80

80:                                               ; preds = %79, %51
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct._HuffmanTree, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct._HuffmanNode, ptr %83, i32 0, i32 3
  %85 = load ptr, ptr %84, align 8, !tbaa !16
  %86 = getelementptr inbounds %struct._HuffmanNode, ptr %85, i32 0, i32 3
  %87 = load ptr, ptr %86, align 8, !tbaa !16
  %88 = getelementptr inbounds %struct._HuffmanNode, ptr %87, i32 0, i32 0
  %89 = load i8, ptr %88, align 8, !tbaa !14
  %90 = sext i8 %89 to i32
  %91 = icmp ne i32 %90, 98
  br i1 %91, label %92, label %118

92:                                               ; preds = %80
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct._HuffmanTree, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct._HuffmanNode, ptr %95, i32 0, i32 3
  %97 = load ptr, ptr %96, align 8, !tbaa !16
  %98 = getelementptr inbounds %struct._HuffmanNode, ptr %97, i32 0, i32 3
  %99 = load ptr, ptr %98, align 8, !tbaa !16
  %100 = getelementptr inbounds %struct._HuffmanNode, ptr %99, i32 0, i32 0
  %101 = load i8, ptr %100, align 8, !tbaa !14
  %102 = sext i8 %101 to i32
  %103 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %102, i32 noundef 98)
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._HuffmanTree, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !9
  %107 = getelementptr inbounds %struct._HuffmanNode, ptr %106, i32 0, i32 3
  %108 = load ptr, ptr %107, align 8, !tbaa !16
  %109 = getelementptr inbounds %struct._HuffmanNode, ptr %108, i32 0, i32 3
  %110 = load ptr, ptr %109, align 8, !tbaa !16
  %111 = getelementptr inbounds %struct._HuffmanNode, ptr %110, i32 0, i32 0
  %112 = load i8, ptr %111, align 8, !tbaa !14
  %113 = sext i8 %112 to i32
  %114 = icmp eq i32 %113, 98
  br i1 %114, label %115, label %116

115:                                              ; preds = %92
  br label %117

116:                                              ; preds = %92
  call void @__assert_fail(ptr noundef @.str.28, ptr noundef @.str.2, i32 noundef 308, ptr noundef @__PRETTY_FUNCTION__.test_huffman_tree_inflate) #5
  unreachable

117:                                              ; preds = %115
  br label %118

118:                                              ; preds = %117, %80
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct._HuffmanTree, ptr %119, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8, !tbaa !9
  %122 = getelementptr inbounds %struct._HuffmanNode, ptr %121, i32 0, i32 3
  %123 = load ptr, ptr %122, align 8, !tbaa !16
  %124 = getelementptr inbounds %struct._HuffmanNode, ptr %123, i32 0, i32 2
  %125 = load ptr, ptr %124, align 8, !tbaa !11
  %126 = getelementptr inbounds %struct._HuffmanNode, ptr %125, i32 0, i32 2
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = getelementptr inbounds %struct._HuffmanNode, ptr %127, i32 0, i32 0
  %129 = load i8, ptr %128, align 8, !tbaa !14
  %130 = sext i8 %129 to i32
  %131 = icmp ne i32 %130, 100
  br i1 %131, label %132, label %162

132:                                              ; preds = %118
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct._HuffmanTree, ptr %133, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8, !tbaa !9
  %136 = getelementptr inbounds %struct._HuffmanNode, ptr %135, i32 0, i32 3
  %137 = load ptr, ptr %136, align 8, !tbaa !16
  %138 = getelementptr inbounds %struct._HuffmanNode, ptr %137, i32 0, i32 2
  %139 = load ptr, ptr %138, align 8, !tbaa !11
  %140 = getelementptr inbounds %struct._HuffmanNode, ptr %139, i32 0, i32 2
  %141 = load ptr, ptr %140, align 8, !tbaa !11
  %142 = getelementptr inbounds %struct._HuffmanNode, ptr %141, i32 0, i32 0
  %143 = load i8, ptr %142, align 8, !tbaa !14
  %144 = sext i8 %143 to i32
  %145 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %144, i32 noundef 100)
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct._HuffmanTree, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !9
  %149 = getelementptr inbounds %struct._HuffmanNode, ptr %148, i32 0, i32 3
  %150 = load ptr, ptr %149, align 8, !tbaa !16
  %151 = getelementptr inbounds %struct._HuffmanNode, ptr %150, i32 0, i32 2
  %152 = load ptr, ptr %151, align 8, !tbaa !11
  %153 = getelementptr inbounds %struct._HuffmanNode, ptr %152, i32 0, i32 2
  %154 = load ptr, ptr %153, align 8, !tbaa !11
  %155 = getelementptr inbounds %struct._HuffmanNode, ptr %154, i32 0, i32 0
  %156 = load i8, ptr %155, align 8, !tbaa !14
  %157 = sext i8 %156 to i32
  %158 = icmp eq i32 %157, 100
  br i1 %158, label %159, label %160

159:                                              ; preds = %132
  br label %161

160:                                              ; preds = %132
  call void @__assert_fail(ptr noundef @.str.29, ptr noundef @.str.2, i32 noundef 309, ptr noundef @__PRETTY_FUNCTION__.test_huffman_tree_inflate) #5
  unreachable

161:                                              ; preds = %159
  br label %162

162:                                              ; preds = %161, %118
  %163 = load ptr, ptr %4, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct._HuffmanTree, ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !9
  %166 = getelementptr inbounds %struct._HuffmanNode, ptr %165, i32 0, i32 3
  %167 = load ptr, ptr %166, align 8, !tbaa !16
  %168 = getelementptr inbounds %struct._HuffmanNode, ptr %167, i32 0, i32 2
  %169 = load ptr, ptr %168, align 8, !tbaa !11
  %170 = getelementptr inbounds %struct._HuffmanNode, ptr %169, i32 0, i32 3
  %171 = load ptr, ptr %170, align 8, !tbaa !16
  %172 = getelementptr inbounds %struct._HuffmanNode, ptr %171, i32 0, i32 0
  %173 = load i8, ptr %172, align 8, !tbaa !14
  %174 = sext i8 %173 to i32
  %175 = icmp ne i32 %174, 99
  br i1 %175, label %176, label %206

176:                                              ; preds = %162
  %177 = load ptr, ptr %4, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct._HuffmanTree, ptr %177, i32 0, i32 0
  %179 = load ptr, ptr %178, align 8, !tbaa !9
  %180 = getelementptr inbounds %struct._HuffmanNode, ptr %179, i32 0, i32 3
  %181 = load ptr, ptr %180, align 8, !tbaa !16
  %182 = getelementptr inbounds %struct._HuffmanNode, ptr %181, i32 0, i32 2
  %183 = load ptr, ptr %182, align 8, !tbaa !11
  %184 = getelementptr inbounds %struct._HuffmanNode, ptr %183, i32 0, i32 3
  %185 = load ptr, ptr %184, align 8, !tbaa !16
  %186 = getelementptr inbounds %struct._HuffmanNode, ptr %185, i32 0, i32 0
  %187 = load i8, ptr %186, align 8, !tbaa !14
  %188 = sext i8 %187 to i32
  %189 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %188, i32 noundef 99)
  %190 = load ptr, ptr %4, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct._HuffmanTree, ptr %190, i32 0, i32 0
  %192 = load ptr, ptr %191, align 8, !tbaa !9
  %193 = getelementptr inbounds %struct._HuffmanNode, ptr %192, i32 0, i32 3
  %194 = load ptr, ptr %193, align 8, !tbaa !16
  %195 = getelementptr inbounds %struct._HuffmanNode, ptr %194, i32 0, i32 2
  %196 = load ptr, ptr %195, align 8, !tbaa !11
  %197 = getelementptr inbounds %struct._HuffmanNode, ptr %196, i32 0, i32 3
  %198 = load ptr, ptr %197, align 8, !tbaa !16
  %199 = getelementptr inbounds %struct._HuffmanNode, ptr %198, i32 0, i32 0
  %200 = load i8, ptr %199, align 8, !tbaa !14
  %201 = sext i8 %200 to i32
  %202 = icmp eq i32 %201, 99
  br i1 %202, label %203, label %204

203:                                              ; preds = %176
  br label %205

204:                                              ; preds = %176
  call void @__assert_fail(ptr noundef @.str.30, ptr noundef @.str.2, i32 noundef 310, ptr noundef @__PRETTY_FUNCTION__.test_huffman_tree_inflate) #5
  unreachable

205:                                              ; preds = %203
  br label %206

206:                                              ; preds = %205, %162
  %207 = load ptr, ptr %3, align 8, !tbaa !5
  call void @bitmap_free(ptr noundef %207)
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  call void @huffman_tree_free(ptr noundef %208)
  %209 = load ptr, ptr %2, align 8, !tbaa !5
  call void @huffman_tree_free(ptr noundef %209)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret void
}

declare ptr @huffman_tree_inflate(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #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 #2 = { noreturn 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { noreturn 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, !6, i64 0}
!10 = !{!"_HuffmanTree", !6, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_HuffmanNode", !7, i64 0, !13, i64 4, !6, i64 8, !6, i64 16}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !7, i64 0}
!15 = !{!12, !13, i64 4}
!16 = !{!12, !6, i64 16}


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

@.str = external hidden unnamed_addr constant [43 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__.test_huffman_tree_inflate = external hidden unnamed_addr constant [33 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [53 x i8], align 1

declare ptr @huffman_heap_new(...) local_unnamed_addr #0

declare i32 @huffman_heap_insert(ptr noundef, i8 noundef signext, i32 noundef) local_unnamed_addr #0

declare ptr @huffman_tree_from(ptr noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare void @huffman_tree_free(ptr noundef) local_unnamed_addr #0

declare void @bitmap_free(ptr noundef) local_unnamed_addr #0

declare ptr @huffman_tree_deflate(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @test_huffman_tree_inflate() local_unnamed_addr #3 {
  %1 = tail call ptr (...) @huffman_heap_new() #4
  %2 = tail call i32 @huffman_heap_insert(ptr noundef %1, i8 noundef signext 97, i32 noundef 7) #4
  %3 = tail call i32 @huffman_heap_insert(ptr noundef %1, i8 noundef signext 98, i32 noundef 5) #4
  %4 = tail call i32 @huffman_heap_insert(ptr noundef %1, i8 noundef signext 99, i32 noundef 3) #4
  %5 = tail call i32 @huffman_heap_insert(ptr noundef %1, i8 noundef signext 100, i32 noundef 1) #4
  %6 = tail call ptr @huffman_tree_from(ptr noundef %1) #4
  %7 = tail call ptr @huffman_tree_deflate(ptr noundef %6) #4
  %8 = tail call ptr @huffman_tree_inflate(ptr noundef %7) #4
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !10
  %12 = load i8, ptr %11, align 8, !tbaa !13
  %.not = icmp eq i8 %12, 97
  br i1 %.not, label %22, label %13

13:                                               ; preds = %0
  %14 = sext i8 %12 to i32
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %14, i32 noundef 97)
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !10
  %19 = load i8, ptr %18, align 8, !tbaa !13
  %20 = icmp eq i8 %19, 97
  br i1 %20, label %22, label %21

21:                                               ; preds = %13
  tail call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.2, i32 noundef 306, ptr noundef nonnull @__PRETTY_FUNCTION__.test_huffman_tree_inflate) #5
  unreachable

22:                                               ; preds = %13, %0
  %23 = phi ptr [ %18, %13 ], [ %11, %0 ]
  %24 = phi ptr [ %16, %13 ], [ %9, %0 ]
  %25 = getelementptr inbounds i8, ptr %23, i64 4
  %26 = load i32, ptr %25, align 4, !tbaa !14
  %.not29 = icmp eq i32 %26, 0
  br i1 %.not29, label %36, label %27

27:                                               ; preds = %22
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %26, i32 noundef 0)
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !10
  %32 = getelementptr inbounds i8, ptr %31, i64 4
  %33 = load i32, ptr %32, align 4, !tbaa !14
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %36, label %35

35:                                               ; preds = %27
  tail call void @__assert_fail(ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.2, i32 noundef 307, ptr noundef nonnull @__PRETTY_FUNCTION__.test_huffman_tree_inflate) #5
  unreachable

36:                                               ; preds = %27, %22
  %37 = phi ptr [ %29, %27 ], [ %24, %22 ]
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  %41 = load ptr, ptr %40, align 8, !tbaa !15
  %42 = load i8, ptr %41, align 8, !tbaa !13
  %.not30 = icmp eq i8 %42, 98
  br i1 %.not30, label %54, label %43

43:                                               ; preds = %36
  %44 = sext i8 %42 to i32
  %45 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %44, i32 noundef 98)
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %50 = load ptr, ptr %49, align 8, !tbaa !15
  %51 = load i8, ptr %50, align 8, !tbaa !13
  %52 = icmp eq i8 %51, 98
  br i1 %52, label %54, label %53

53:                                               ; preds = %43
  tail call void @__assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.2, i32 noundef 308, ptr noundef nonnull @__PRETTY_FUNCTION__.test_huffman_tree_inflate) #5
  unreachable

54:                                               ; preds = %43, %36
  %55 = phi ptr [ %48, %43 ], [ %39, %36 ]
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = load ptr, ptr %56, align 8, !tbaa !10
  %58 = getelementptr inbounds i8, ptr %57, i64 8
  %59 = load ptr, ptr %58, align 8, !tbaa !10
  %60 = load i8, ptr %59, align 8, !tbaa !13
  %.not31 = icmp eq i8 %60, 100
  br i1 %.not31, label %74, label %61

61:                                               ; preds = %54
  %62 = sext i8 %60 to i32
  %63 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %62, i32 noundef 100)
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  %66 = load ptr, ptr %65, align 8, !tbaa !15
  %67 = getelementptr inbounds i8, ptr %66, i64 8
  %68 = load ptr, ptr %67, align 8, !tbaa !10
  %69 = getelementptr inbounds i8, ptr %68, i64 8
  %70 = load ptr, ptr %69, align 8, !tbaa !10
  %71 = load i8, ptr %70, align 8, !tbaa !13
  %72 = icmp eq i8 %71, 100
  br i1 %72, label %74, label %73

73:                                               ; preds = %61
  tail call void @__assert_fail(ptr noundef nonnull @.str.29, ptr noundef nonnull @.str.2, i32 noundef 309, ptr noundef nonnull @__PRETTY_FUNCTION__.test_huffman_tree_inflate) #5
  unreachable

74:                                               ; preds = %61, %54
  %75 = phi ptr [ %68, %61 ], [ %57, %54 ]
  %76 = getelementptr inbounds i8, ptr %75, i64 16
  %77 = load ptr, ptr %76, align 8, !tbaa !15
  %78 = load i8, ptr %77, align 8, !tbaa !13
  %.not32 = icmp eq i8 %78, 99
  br i1 %.not32, label %92, label %79

79:                                               ; preds = %74
  %80 = sext i8 %78 to i32
  %81 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %80, i32 noundef 99)
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = getelementptr inbounds i8, ptr %82, i64 16
  %84 = load ptr, ptr %83, align 8, !tbaa !15
  %85 = getelementptr inbounds i8, ptr %84, i64 8
  %86 = load ptr, ptr %85, align 8, !tbaa !10
  %87 = getelementptr inbounds i8, ptr %86, i64 16
  %88 = load ptr, ptr %87, align 8, !tbaa !15
  %89 = load i8, ptr %88, align 8, !tbaa !13
  %90 = icmp eq i8 %89, 99
  br i1 %90, label %92, label %91

91:                                               ; preds = %79
  tail call void @__assert_fail(ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.2, i32 noundef 310, ptr noundef nonnull @__PRETTY_FUNCTION__.test_huffman_tree_inflate) #5
  unreachable

92:                                               ; preds = %79, %74
  tail call void @bitmap_free(ptr noundef %7) #4
  tail call void @huffman_tree_free(ptr noundef nonnull %8) #4
  tail call void @huffman_tree_free(ptr noundef %6) #4
  ret void
}

declare ptr @huffman_tree_inflate(ptr noundef) local_unnamed_addr #0

attributes #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 = { nofree 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 #2 = { noreturn 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { noreturn 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, !7, i64 0}
!6 = !{!"_HuffmanTree", !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 8}
!11 = !{!"_HuffmanNode", !8, i64 0, !12, i64 4, !7, i64 8, !7, i64 16}
!12 = !{!"int", !8, i64 0}
!13 = !{!11, !8, i64 0}
!14 = !{!11, !12, i64 4}
!15 = !{!11, !7, i64 16}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass