; LLVM IR from hutusi/rethink-c :: app (deflate)

; 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._BitMap = type { ptr, i32, i32 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [47 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@stdout = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca [100 x i8], align 16
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = icmp slt i32 %16, 2
  br i1 %17, label %18, label %24

18:                                               ; preds = %2
  %19 = load ptr, ptr @stderr, align 8, !tbaa !9
  %20 = load ptr, ptr %5, align 8, !tbaa !9
  %21 = getelementptr inbounds ptr, ptr %20, i64 0
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef @.str, ptr noundef %22) #5
  store i32 -1, ptr %3, align 4
  br label %125

24:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 100, ptr %6) #5
  %25 = getelementptr inbounds [100 x i8], ptr %6, i64 0, i64 0
  store i8 0, ptr %25, align 16, !tbaa !11
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = icmp sgt i32 %26, 2
  br i1 %27, label %28, label %34

28:                                               ; preds = %24
  %29 = getelementptr inbounds [100 x i8], ptr %6, i64 0, i64 0
  %30 = load ptr, ptr %5, align 8, !tbaa !9
  %31 = getelementptr inbounds ptr, ptr %30, i64 2
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = call ptr @strcpy(ptr noundef %29, ptr noundef %32) #5
  br label %37

34:                                               ; preds = %24
  %35 = getelementptr inbounds [100 x i8], ptr %6, i64 0, i64 0
  %36 = call ptr @strcpy(ptr noundef %35, ptr noundef @.str.1) #5
  br label %37

37:                                               ; preds = %34, %28
  %38 = load ptr, ptr @stdout, align 8, !tbaa !9
  %39 = load ptr, ptr %5, align 8, !tbaa !9
  %40 = getelementptr inbounds ptr, ptr %39, i64 0
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = load ptr, ptr %5, align 8, !tbaa !9
  %43 = getelementptr inbounds ptr, ptr %42, i64 1
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = getelementptr inbounds [100 x i8], ptr %6, i64 0, i64 0
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef @.str.2, ptr noundef %41, ptr noundef %44, ptr noundef %45) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %47 = load ptr, ptr %5, align 8, !tbaa !9
  %48 = getelementptr inbounds ptr, ptr %47, i64 1
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = call noalias ptr @fopen(ptr noundef %49, ptr noundef @.str.3)
  store ptr %50, ptr %7, align 8, !tbaa !9
  %51 = load ptr, ptr %7, align 8, !tbaa !9
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %59

53:                                               ; preds = %37
  %54 = load ptr, ptr @stderr, align 8, !tbaa !9
  %55 = load ptr, ptr %5, align 8, !tbaa !9
  %56 = getelementptr inbounds ptr, ptr %55, i64 1
  %57 = load ptr, ptr %56, align 8, !tbaa !9
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef @.str.4, ptr noundef %57) #5
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %124

59:                                               ; preds = %37
  %60 = load ptr, ptr %7, align 8, !tbaa !9
  %61 = call i32 @fseek(ptr noundef %60, i64 noundef 0, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %62 = load ptr, ptr %7, align 8, !tbaa !9
  %63 = call i64 @ftell(ptr noundef %62)
  store i64 %63, ptr %9, align 8, !tbaa !12
  %64 = load ptr, ptr %7, align 8, !tbaa !9
  %65 = call i32 @fseek(ptr noundef %64, i64 noundef 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %66 = load i64, ptr %9, align 8, !tbaa !12
  %67 = call noalias ptr @malloc(i64 noundef %66) #6
  store ptr %67, ptr %10, align 8, !tbaa !9
  %68 = load ptr, ptr %10, align 8, !tbaa !9
  %69 = load i64, ptr %9, align 8, !tbaa !12
  %70 = load ptr, ptr %7, align 8, !tbaa !9
  %71 = call i64 @fread(ptr noundef %68, i64 noundef 1, i64 noundef %69, ptr noundef %70)
  %72 = load ptr, ptr %7, align 8, !tbaa !9
  %73 = call i32 @fclose(ptr noundef %72)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %74 = load ptr, ptr %10, align 8, !tbaa !9
  %75 = load i64, ptr %9, align 8, !tbaa !12
  %76 = trunc i64 %75 to i32
  %77 = call ptr @huffman_heap_from_string(ptr noundef %74, i32 noundef %76)
  store ptr %77, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %78 = load ptr, ptr %11, align 8, !tbaa !9
  %79 = call ptr @huffman_tree_from(ptr noundef %78)
  store ptr %79, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %80 = load ptr, ptr %12, align 8, !tbaa !9
  %81 = load ptr, ptr %10, align 8, !tbaa !9
  %82 = load i64, ptr %9, align 8, !tbaa !12
  %83 = trunc i64 %82 to i32
  %84 = call ptr @huffman_encode_string(ptr noundef %80, ptr noundef %81, i32 noundef %83)
  store ptr %84, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %85 = load ptr, ptr %12, align 8, !tbaa !9
  %86 = call ptr @huffman_tree_deflate(ptr noundef %85)
  store ptr %86, ptr %14, align 8, !tbaa !9
  %87 = load ptr, ptr %10, align 8, !tbaa !9
  call void @free(ptr noundef %87) #5
  %88 = load ptr, ptr %12, align 8, !tbaa !9
  call void @huffman_tree_free(ptr noundef %88)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %89 = getelementptr inbounds [100 x i8], ptr %6, i64 0, i64 0
  %90 = call noalias ptr @fopen(ptr noundef %89, ptr noundef @.str.5)
  store ptr %90, ptr %15, align 8, !tbaa !9
  %91 = load ptr, ptr %14, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct._BitMap, ptr %91, i32 0, i32 1
  %93 = load ptr, ptr %15, align 8, !tbaa !9
  %94 = call i64 @fwrite(ptr noundef %92, i64 noundef 4, i64 noundef 1, ptr noundef %93)
  %95 = load ptr, ptr %14, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct._BitMap, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !14
  %98 = load ptr, ptr %14, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct._BitMap, ptr %98, i32 0, i32 2
  %100 = load i32, ptr %99, align 4, !tbaa !16
  %101 = zext i32 %100 to i64
  %102 = load ptr, ptr %15, align 8, !tbaa !9
  %103 = call i64 @fwrite(ptr noundef %97, i64 noundef 4, i64 noundef %101, ptr noundef %102)
  %104 = load ptr, ptr %13, align 8, !tbaa !9
  %105 = getelementptr inbounds %struct._BitMap, ptr %104, i32 0, i32 1
  %106 = load ptr, ptr %15, align 8, !tbaa !9
  %107 = call i64 @fwrite(ptr noundef %105, i64 noundef 4, i64 noundef 1, ptr noundef %106)
  %108 = load ptr, ptr %13, align 8, !tbaa !9
  %109 = getelementptr inbounds %struct._BitMap, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !14
  %111 = load ptr, ptr %13, align 8, !tbaa !9
  %112 = getelementptr inbounds %struct._BitMap, ptr %111, i32 0, i32 2
  %113 = load i32, ptr %112, align 4, !tbaa !16
  %114 = zext i32 %113 to i64
  %115 = load ptr, ptr %15, align 8, !tbaa !9
  %116 = call i64 @fwrite(ptr noundef %110, i64 noundef 4, i64 noundef %114, ptr noundef %115)
  %117 = load ptr, ptr %15, align 8, !tbaa !9
  %118 = call i32 @fclose(ptr noundef %117)
  %119 = load ptr, ptr %14, align 8, !tbaa !9
  call void @bitmap_free(ptr noundef %119)
  %120 = load ptr, ptr %13, align 8, !tbaa !9
  call void @bitmap_free(ptr noundef %120)
  %121 = load ptr, ptr @stdout, align 8, !tbaa !9
  %122 = getelementptr inbounds [100 x i8], ptr %6, i64 0, i64 0
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef @.str.6, ptr noundef %122) #5
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %124

124:                                              ; preds = %59, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 100, ptr %6) #5
  br label %125

125:                                              ; preds = %124, %18
  %126 = load i32, ptr %3, align 4
  ret i32 %126
}

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

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

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #1

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #3

declare i64 @ftell(ptr noundef) #3

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

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

declare i32 @fclose(ptr noundef) #3

declare ptr @huffman_heap_from_string(ptr noundef, i32 noundef) #3

declare ptr @huffman_tree_from(ptr noundef) #3

declare ptr @huffman_encode_string(ptr noundef, ptr noundef, i32 noundef) #3

declare ptr @huffman_tree_deflate(ptr noundef) #3

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

declare void @huffman_tree_free(ptr noundef) #3

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

declare void @bitmap_free(ptr noundef) #3

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

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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind 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 = { nounwind }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !10, i64 0}
!15 = !{!"_BitMap", !10, i64 0, !6, i64 8, !6, i64 12}
!16 = !{!15, !6, i64 12}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [47 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [100 x i8], align 16
  %4 = icmp slt i32 %0, 2
  br i1 %4, label %5, label %9

5:                                                ; preds = %2
  %6 = load ptr, ptr @stderr, align 8, !tbaa !5
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str, ptr noundef %7) #7
  br label %58

9:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %3) #8
  store i8 0, ptr %3, align 16, !tbaa !9
  %.not = icmp eq i32 %0, 2
  br i1 %.not, label %13, label %10

10:                                               ; preds = %9
  %11 = getelementptr inbounds i8, ptr %1, i64 16
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  br label %13

13:                                               ; preds = %9, %10
  %.str.1.sink = phi ptr [ %12, %10 ], [ @.str.1, %9 ]
  %14 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %.str.1.sink) #8
  %15 = load ptr, ptr @stdout, align 8, !tbaa !5
  %16 = load ptr, ptr %1, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %1, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.2, ptr noundef %16, ptr noundef %18, ptr noundef nonnull %3) #8
  %20 = load ptr, ptr %17, align 8, !tbaa !5
  %21 = call noalias ptr @fopen(ptr noundef %20, ptr noundef nonnull @.str.3)
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %27

23:                                               ; preds = %13
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = load ptr, ptr %17, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.4, ptr noundef %25) #7
  br label %57

27:                                               ; preds = %13
  %28 = call i32 @fseek(ptr noundef nonnull %21, i64 noundef 0, i32 noundef 2)
  %29 = call i64 @ftell(ptr noundef nonnull %21)
  %30 = call i32 @fseek(ptr noundef nonnull %21, i64 noundef 0, i32 noundef 0)
  %31 = call noalias ptr @malloc(i64 noundef %29) #9
  %32 = call i64 @fread(ptr noundef %31, i64 noundef 1, i64 noundef %29, ptr noundef nonnull %21)
  %33 = call i32 @fclose(ptr noundef nonnull %21)
  %34 = trunc i64 %29 to i32
  %35 = call ptr @huffman_heap_from_string(ptr noundef %31, i32 noundef %34) #8
  %36 = call ptr @huffman_tree_from(ptr noundef %35) #8
  %37 = call ptr @huffman_encode_string(ptr noundef %36, ptr noundef %31, i32 noundef %34) #8
  %38 = call ptr @huffman_tree_deflate(ptr noundef %36) #8
  call void @free(ptr noundef %31) #8
  call void @huffman_tree_free(ptr noundef %36) #8
  %39 = call noalias ptr @fopen(ptr noundef nonnull %3, ptr noundef nonnull @.str.5)
  %40 = getelementptr inbounds i8, ptr %38, i64 8
  %41 = call i64 @fwrite(ptr noundef nonnull %40, i64 noundef 4, i64 noundef 1, ptr noundef %39)
  %42 = load ptr, ptr %38, align 8, !tbaa !10
  %43 = getelementptr inbounds i8, ptr %38, i64 12
  %44 = load i32, ptr %43, align 4, !tbaa !13
  %45 = zext i32 %44 to i64
  %46 = call i64 @fwrite(ptr noundef %42, i64 noundef 4, i64 noundef %45, ptr noundef %39)
  %47 = getelementptr inbounds i8, ptr %37, i64 8
  %48 = call i64 @fwrite(ptr noundef nonnull %47, i64 noundef 4, i64 noundef 1, ptr noundef %39)
  %49 = load ptr, ptr %37, align 8, !tbaa !10
  %50 = getelementptr inbounds i8, ptr %37, i64 12
  %51 = load i32, ptr %50, align 4, !tbaa !13
  %52 = zext i32 %51 to i64
  %53 = call i64 @fwrite(ptr noundef %49, i64 noundef 4, i64 noundef %52, ptr noundef %39)
  %54 = call i32 @fclose(ptr noundef %39)
  call void @bitmap_free(ptr noundef nonnull %38) #8
  call void @bitmap_free(ptr noundef nonnull %37) #8
  %55 = load ptr, ptr @stdout, align 8, !tbaa !5
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.6, ptr noundef nonnull %3) #8
  br label %57

57:                                               ; preds = %27, %23
  %.0 = phi i32 [ -1, %23 ], [ 0, %27 ]
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %3) #8
  br label %58

58:                                               ; preds = %57, %5
  %.1 = phi i32 [ -1, %5 ], [ %.0, %57 ]
  ret i32 %.1
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i64 @ftell(ptr nocapture noundef) local_unnamed_addr #1

; 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: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #1

declare ptr @huffman_heap_from_string(ptr noundef, i32 noundef) local_unnamed_addr #5

declare ptr @huffman_tree_from(ptr noundef) local_unnamed_addr #5

declare ptr @huffman_encode_string(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

declare ptr @huffman_tree_deflate(ptr noundef) local_unnamed_addr #5

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

declare void @huffman_tree_free(ptr noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #1

declare void @bitmap_free(ptr noundef) local_unnamed_addr #5

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

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 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 = { "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 = { 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 #7 = { cold nounwind }
attributes #8 = { nounwind }
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 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 0}
!11 = !{!"_BitMap", !6, i64 0, !12, i64 8, !12, i64 12}
!12 = !{!"int", !7, i64 0}
!13 = !{!11, !12, i64 12}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass