; LLVM IR from intel/qpl :: sources/middle-layer/compression/deflate/utils (huffman_table_utils)

; 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.std::array.2" = type { [19 x i8] }
%struct.heap_tree = type { %union.anon }
%union.anon = type { [859 x i64] }
%struct.huff_code = type { %union.anon.0 }
%union.anon.0 = type { %struct.anon }
%struct.anon = type { i32 }
%struct.anon.1 = type { i16, i8, i8 }

@_ZN3qpl2ml11compressionL22code_length_code_orderE = external hidden constant %"struct.std::array.2", align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml11compression22generate_huffman_codesEP9heap_treejPjP9huff_codejj(ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3qpl2ml11compression17set_huffman_codesEP9huff_codeiPj(ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3qpl2ml11compression21create_huffman_headerEP7BitBuf2P9huff_codeP7rl_codetjjjj(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN3qpl2ml11compression13create_headerEP7BitBuf2P7rl_codejPmjjj(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) #1 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %struct.heap_tree, align 8
  %18 = alloca [16 x i32], align 16
  %19 = alloca [19 x %struct.huff_code], align 16
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  store i32 %6, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 6872, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 64, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 76, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  store i32 7, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  store i32 0, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  store i64 0, ptr %22, align 8, !tbaa !11
  %23 = load ptr, ptr %11, align 8, !tbaa !5
  %24 = call noundef i32 @_ZN3qpl2ml11compressionL11init_heap64EP9heap_treePmm(ptr noundef %17, ptr noundef %23, i64 noundef 19) #3
  store i32 %24, ptr %16, align 4, !tbaa !9
  %25 = load i32, ptr %16, align 4, !tbaa !9
  %26 = getelementptr inbounds [16 x i32], ptr %18, i64 0, i64 0
  %27 = getelementptr inbounds [19 x %struct.huff_code], ptr %19, i64 0, i64 0
  call void @_ZN3qpl2ml11compression22generate_huffman_codesEP9heap_treejPjP9huff_codejj(ptr noundef %17, i32 noundef %25, ptr noundef %26, ptr noundef %27, i32 noundef 19, i32 noundef 7) #3
  %28 = getelementptr inbounds [19 x %struct.huff_code], ptr %19, i64 0, i64 0
  %29 = getelementptr inbounds [16 x i32], ptr %18, i64 0, i64 0
  %30 = call noundef i32 @_ZN3qpl2ml11compression17set_huffman_codesEP9huff_codeiPj(ptr noundef %28, i32 noundef 19, ptr noundef %29) #3
  store i32 18, ptr %15, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %48, %7
  %32 = load i32, ptr %15, align 4, !tbaa !9
  %33 = icmp sgt i32 %32, 3
  br i1 %33, label %34, label %51

34:                                               ; preds = %31
  %35 = load i32, ptr %15, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef %36) #3
  %38 = load i8, ptr %37, align 1, !tbaa !13
  %39 = zext i8 %38 to i64
  %40 = getelementptr inbounds [19 x %struct.huff_code], ptr %19, i64 0, i64 %39
  %41 = getelementptr inbounds %struct.huff_code, ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds %struct.anon.1, ptr %41, i32 0, i32 2
  %43 = load i8, ptr %42, align 1, !tbaa !13
  %44 = zext i8 %43 to i32
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %34
  br label %51

47:                                               ; preds = %34
  br label %48

48:                                               ; preds = %47
  %49 = load i32, ptr %15, align 4, !tbaa !9
  %50 = add nsw i32 %49, -1
  store i32 %50, ptr %15, align 4, !tbaa !9
  br label %31, !llvm.loop !14

51:                                               ; preds = %46, %31
  %52 = load i32, ptr %15, align 4, !tbaa !9
  %53 = sub nsw i32 %52, 3
  store i32 %53, ptr %21, align 4, !tbaa !9
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds [19 x %struct.huff_code], ptr %19, i64 0, i64 0
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = trunc i32 %57 to i16
  %59 = load i32, ptr %14, align 4, !tbaa !9
  %60 = load i32, ptr %21, align 4, !tbaa !9
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = load i32, ptr %13, align 4, !tbaa !9
  %63 = call noundef i32 @_ZN3qpl2ml11compression21create_huffman_headerEP7BitBuf2P9huff_codeP7rl_codetjjjj(ptr noundef %54, ptr noundef %55, ptr noundef %56, i16 noundef zeroext %58, i32 noundef %59, i32 noundef %60, i32 noundef %61, i32 noundef %62) #3
  %64 = sext i32 %63 to i64
  store i64 %64, ptr %22, align 8, !tbaa !11
  %65 = load i64, ptr %22, align 8, !tbaa !11
  %66 = trunc i64 %65 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 76, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 6872, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  ret i32 %66
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN3qpl2ml11compressionL11init_heap64EP9heap_treePmm(ptr noundef, ptr noundef, i64 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.std::array.2" = type { [19 x i8] }
%struct.heap_tree = type { %union.anon }
%union.anon = type { [859 x i64] }
%struct.huff_code = type { %union.anon.0 }
%union.anon.0 = type { %struct.anon }
%struct.anon = type { i32 }

@_ZN3qpl2ml11compressionL22code_length_code_orderE = external hidden constant %"struct.std::array.2", align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml11compression22generate_huffman_codesEP9heap_treejPjP9huff_codejj(ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3qpl2ml11compression17set_huffman_codesEP9huff_codeiPj(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3qpl2ml11compression21create_huffman_headerEP7BitBuf2P9huff_codeP7rl_codetjjjj(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN3qpl2ml11compression13create_headerEP7BitBuf2P7rl_codejPmjjj(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr #1 {
  %8 = alloca %struct.heap_tree, align 8
  %9 = alloca [16 x i32], align 16
  %10 = alloca [19 x %struct.huff_code], align 16
  call void @llvm.lifetime.start.p0(i64 6872, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 76, ptr nonnull %10) #3
  %11 = call noundef i32 @_ZN3qpl2ml11compressionL11init_heap64EP9heap_treePmm(ptr noundef nonnull %8, ptr noundef %3, i64 noundef 19) #3
  call void @_ZN3qpl2ml11compression22generate_huffman_codesEP9heap_treejPjP9huff_codejj(ptr noundef nonnull %8, i32 noundef %11, ptr noundef nonnull %9, ptr noundef nonnull %10, i32 noundef 19, i32 noundef 7) #3
  %12 = call noundef i32 @_ZN3qpl2ml11compression17set_huffman_codesEP9huff_codeiPj(ptr noundef nonnull %10, i32 noundef 19, ptr noundef nonnull %9) #3
  %invariant.gep = getelementptr inbounds i8, ptr %10, i64 3
  %13 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 18) #3
  %14 = load i8, ptr %13, align 1, !tbaa !5
  %15 = zext i8 %14 to i64
  %gep = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %15
  %16 = load i8, ptr %gep, align 1, !tbaa !5
  %.not = icmp eq i8 %16, 0
  br i1 %.not, label %17, label %87

17:                                               ; preds = %7
  %18 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 17) #3
  %19 = load i8, ptr %18, align 1, !tbaa !5
  %20 = zext i8 %19 to i64
  %gep.1 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %20
  %21 = load i8, ptr %gep.1, align 1, !tbaa !5
  %.not.1 = icmp eq i8 %21, 0
  br i1 %.not.1, label %22, label %87

22:                                               ; preds = %17
  %23 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 16) #3
  %24 = load i8, ptr %23, align 1, !tbaa !5
  %25 = zext i8 %24 to i64
  %gep.2 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %25
  %26 = load i8, ptr %gep.2, align 1, !tbaa !5
  %.not.2 = icmp eq i8 %26, 0
  br i1 %.not.2, label %27, label %87

27:                                               ; preds = %22
  %28 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 15) #3
  %29 = load i8, ptr %28, align 1, !tbaa !5
  %30 = zext i8 %29 to i64
  %gep.3 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %30
  %31 = load i8, ptr %gep.3, align 1, !tbaa !5
  %.not.3 = icmp eq i8 %31, 0
  br i1 %.not.3, label %32, label %87

32:                                               ; preds = %27
  %33 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 14) #3
  %34 = load i8, ptr %33, align 1, !tbaa !5
  %35 = zext i8 %34 to i64
  %gep.4 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %35
  %36 = load i8, ptr %gep.4, align 1, !tbaa !5
  %.not.4 = icmp eq i8 %36, 0
  br i1 %.not.4, label %37, label %87

37:                                               ; preds = %32
  %38 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 13) #3
  %39 = load i8, ptr %38, align 1, !tbaa !5
  %40 = zext i8 %39 to i64
  %gep.5 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %40
  %41 = load i8, ptr %gep.5, align 1, !tbaa !5
  %.not.5 = icmp eq i8 %41, 0
  br i1 %.not.5, label %42, label %87

42:                                               ; preds = %37
  %43 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 12) #3
  %44 = load i8, ptr %43, align 1, !tbaa !5
  %45 = zext i8 %44 to i64
  %gep.6 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %45
  %46 = load i8, ptr %gep.6, align 1, !tbaa !5
  %.not.6 = icmp eq i8 %46, 0
  br i1 %.not.6, label %47, label %87

47:                                               ; preds = %42
  %48 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 11) #3
  %49 = load i8, ptr %48, align 1, !tbaa !5
  %50 = zext i8 %49 to i64
  %gep.7 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %50
  %51 = load i8, ptr %gep.7, align 1, !tbaa !5
  %.not.7 = icmp eq i8 %51, 0
  br i1 %.not.7, label %52, label %87

52:                                               ; preds = %47
  %53 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 10) #3
  %54 = load i8, ptr %53, align 1, !tbaa !5
  %55 = zext i8 %54 to i64
  %gep.8 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %55
  %56 = load i8, ptr %gep.8, align 1, !tbaa !5
  %.not.8 = icmp eq i8 %56, 0
  br i1 %.not.8, label %57, label %87

57:                                               ; preds = %52
  %58 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 9) #3
  %59 = load i8, ptr %58, align 1, !tbaa !5
  %60 = zext i8 %59 to i64
  %gep.9 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %60
  %61 = load i8, ptr %gep.9, align 1, !tbaa !5
  %.not.9 = icmp eq i8 %61, 0
  br i1 %.not.9, label %62, label %87

62:                                               ; preds = %57
  %63 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 8) #3
  %64 = load i8, ptr %63, align 1, !tbaa !5
  %65 = zext i8 %64 to i64
  %gep.10 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %65
  %66 = load i8, ptr %gep.10, align 1, !tbaa !5
  %.not.10 = icmp eq i8 %66, 0
  br i1 %.not.10, label %67, label %87

67:                                               ; preds = %62
  %68 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 7) #3
  %69 = load i8, ptr %68, align 1, !tbaa !5
  %70 = zext i8 %69 to i64
  %gep.11 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %70
  %71 = load i8, ptr %gep.11, align 1, !tbaa !5
  %.not.11 = icmp eq i8 %71, 0
  br i1 %.not.11, label %72, label %87

72:                                               ; preds = %67
  %73 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 6) #3
  %74 = load i8, ptr %73, align 1, !tbaa !5
  %75 = zext i8 %74 to i64
  %gep.12 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %75
  %76 = load i8, ptr %gep.12, align 1, !tbaa !5
  %.not.12 = icmp eq i8 %76, 0
  br i1 %.not.12, label %77, label %87

77:                                               ; preds = %72
  %78 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 5) #3
  %79 = load i8, ptr %78, align 1, !tbaa !5
  %80 = zext i8 %79 to i64
  %gep.13 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %80
  %81 = load i8, ptr %gep.13, align 1, !tbaa !5
  %.not.13 = icmp eq i8 %81, 0
  br i1 %.not.13, label %82, label %87

82:                                               ; preds = %77
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt5arrayIhLm19EEixEm(ptr noundef nonnull align 1 dereferenceable(19) @_ZN3qpl2ml11compressionL22code_length_code_orderE, i64 noundef 4) #3
  %84 = load i8, ptr %83, align 1, !tbaa !5
  %85 = zext i8 %84 to i64
  %gep.14 = getelementptr inbounds [19 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %85
  %86 = load i8, ptr %gep.14, align 1, !tbaa !5
  %.not.14 = icmp ne i8 %86, 0
  %spec.select = zext i1 %.not.14 to i32
  br label %87

87:                                               ; preds = %82, %77, %72, %67, %62, %57, %52, %47, %42, %37, %32, %27, %22, %17, %7
  %.0.lcssa = phi i32 [ 15, %7 ], [ 14, %17 ], [ 13, %22 ], [ 12, %27 ], [ 11, %32 ], [ 10, %37 ], [ 9, %42 ], [ 8, %47 ], [ 7, %52 ], [ 6, %57 ], [ 5, %62 ], [ 4, %67 ], [ 3, %72 ], [ 2, %77 ], [ %spec.select, %82 ]
  %88 = trunc i32 %2 to i16
  %89 = call noundef i32 @_ZN3qpl2ml11compression21create_huffman_headerEP7BitBuf2P9huff_codeP7rl_codetjjjj(ptr noundef %0, ptr noundef nonnull %10, ptr noundef %1, i16 noundef zeroext %88, i32 noundef %6, i32 noundef %.0.lcssa, i32 noundef %4, i32 noundef %5) #3
  call void @llvm.lifetime.end.p0(i64 76, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 6872, ptr nonnull %8) #3
  ret i32 %89
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN3qpl2ml11compressionL11init_heap64EP9heap_treePmm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LICMPass,LoopRotatePass,SROAPass,SimplifyCFGPass