; LLVM IR from intel/qpl :: sources/middle-layer/compression/huffman_table (huffman_table)

; 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.allocator_t = type { ptr, ptr }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { ptr }
%"struct.std::_Head_base.1" = type { ptr }
%"class.qpl::ml::compression::huffman_table_t" = type { %"struct.qpl::ml::compression::huffman_table_meta_t", i8, ptr, ptr, %"class.std::unique_ptr", %struct.allocator_t }
%"struct.qpl::ml::compression::huffman_table_meta_t" = type { [4 x i8], i32, i8, i8, i8, 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden { ptr, ptr } @_ZN3qpl2ml11compression7detailsL13get_allocatorE11allocator_t(ptr, ptr) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE6createENS1_20huffman_table_type_eENS0_16execution_path_tE11allocator_t(ptr noundef nonnull align 8 dereferenceable(72) %0, i8 noundef zeroext %1, i8 noundef zeroext %2, ptr %3, ptr %4) #3 align 2 {
  %6 = alloca i32, align 4
  %7 = alloca %struct.allocator_t, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca %struct.allocator_t, align 8
  %14 = alloca %struct.allocator_t, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::unique_ptr", align 8
  %18 = getelementptr inbounds { ptr, ptr }, ptr %7, i32 0, i32 0
  store ptr %3, ptr %18, align 8
  %19 = getelementptr inbounds { ptr, ptr }, ptr %7, i32 0, i32 1
  store ptr %4, ptr %19, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i8 %1, ptr %9, align 1, !tbaa !9
  store i8 %2, ptr %10, align 1, !tbaa !11
  %20 = load ptr, ptr %8, align 8
  %21 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 0
  %22 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_table_meta_t", ptr %21, i32 0, i32 2
  store i8 0, ptr %22, align 8, !tbaa !13
  %23 = load i8, ptr %9, align 1, !tbaa !9
  %24 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 0
  %25 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_table_meta_t", ptr %24, i32 0, i32 4
  store i8 %23, ptr %25, align 2, !tbaa !29
  %26 = load i8, ptr %10, align 1, !tbaa !11
  %27 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 0
  %28 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_table_meta_t", ptr %27, i32 0, i32 5
  store i8 %26, ptr %28, align 1, !tbaa !30
  %29 = load i8, ptr %10, align 1, !tbaa !11
  %30 = call noundef i32 @_ZN3qpl2ml11compression7detailsL14get_path_flagsENS0_16execution_path_tE(i8 noundef zeroext %29)
  %31 = or i32 %30, 4
  %32 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 0
  %33 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_table_meta_t", ptr %32, i32 0, i32 6
  store i32 %31, ptr %33, align 4, !tbaa !31
  %34 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 0
  %35 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_table_meta_t", ptr %34, i32 0, i32 3
  store i8 1, ptr %35, align 1, !tbaa !32
  %36 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 1
  store i8 0, ptr %36, align 8, !tbaa !33
  %37 = getelementptr inbounds %struct.allocator_t, ptr %7, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !34
  %39 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 5
  %40 = getelementptr inbounds %struct.allocator_t, ptr %39, i32 0, i32 0
  store ptr %38, ptr %40, align 8, !tbaa !35
  %41 = getelementptr inbounds %struct.allocator_t, ptr %7, i32 0, i32 1
  %42 = load ptr, ptr %41, align 8, !tbaa !36
  %43 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 5
  %44 = getelementptr inbounds %struct.allocator_t, ptr %43, i32 0, i32 1
  store ptr %42, ptr %44, align 8, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !39
  %45 = load i8, ptr %9, align 1, !tbaa !9
  switch i8 %45, label %56 [
    i8 1, label %46
    i8 2, label %51
  ]

46:                                               ; preds = %5
  %47 = load i32, ptr %11, align 4, !tbaa !38
  %48 = zext i32 %47 to i64
  %49 = add i64 %48, 3904
  %50 = trunc i64 %49 to i32
  store i32 %50, ptr %11, align 4, !tbaa !38
  br label %61

51:                                               ; preds = %5
  %52 = load i32, ptr %11, align 4, !tbaa !38
  %53 = zext i32 %52 to i64
  %54 = add i64 %53, 27584
  %55 = trunc i64 %54 to i32
  store i32 %55, ptr %11, align 4, !tbaa !38
  br label %61

56:                                               ; preds = %5
  %57 = load i32, ptr %11, align 4, !tbaa !38
  %58 = zext i32 %57 to i64
  %59 = add i64 %58, 31488
  %60 = trunc i64 %59 to i32
  store i32 %60, ptr %11, align 4, !tbaa !38
  store i64 3904, ptr %12, align 8, !tbaa !39
  br label %61

61:                                               ; preds = %56, %51, %46
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !41
  %62 = getelementptr inbounds { ptr, ptr }, ptr %14, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8
  %64 = getelementptr inbounds { ptr, ptr }, ptr %14, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8
  %66 = call { ptr, ptr } @_ZN3qpl2ml11compression7detailsL13get_allocatorE11allocator_t(ptr %63, ptr %65)
  %67 = getelementptr inbounds { ptr, ptr }, ptr %13, i32 0, i32 0
  %68 = extractvalue { ptr, ptr } %66, 0
  store ptr %68, ptr %67, align 8
  %69 = getelementptr inbounds { ptr, ptr }, ptr %13, i32 0, i32 1
  %70 = extractvalue { ptr, ptr } %66, 1
  store ptr %70, ptr %69, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %71 = getelementptr inbounds %struct.allocator_t, ptr %13, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !34
  %73 = load i32, ptr %11, align 4, !tbaa !38
  %74 = zext i32 %73 to i64
  %75 = call noundef ptr %72(i64 noundef %74)
  store ptr %75, ptr %15, align 8, !tbaa !5
  %76 = load ptr, ptr %15, align 8, !tbaa !5
  %77 = icmp ne ptr %76, null
  br i1 %77, label %79, label %78

78:                                               ; preds = %61
  store i32 50, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %110

79:                                               ; preds = %61
  %80 = load ptr, ptr %15, align 8, !tbaa !5
  %81 = load i32, ptr %11, align 4, !tbaa !38
  %82 = zext i32 %81 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %80, i8 0, i64 %82, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  %83 = load ptr, ptr %15, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.allocator_t, ptr %13, i32 0, i32 1
  call void @_ZNSt10unique_ptrIA_hPFvPvEEC2IPhS3_vEET_RKS3_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef %83, ptr noundef nonnull align 8 dereferenceable(8) %84) #6
  %85 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 4
  %86 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10unique_ptrIA_hPFvPvEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  call void @_ZNSt10unique_ptrIA_hPFvPvEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  %87 = load i8, ptr %9, align 1, !tbaa !9
  switch i8 %87, label %100 [
    i8 1, label %88
    i8 2, label %93
  ]

88:                                               ; preds = %79
  %89 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 4
  %90 = call noundef ptr @_ZNKSt10unique_ptrIA_hPFvPvEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %89) #6
  %91 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 2
  store ptr %90, ptr %91, align 8, !tbaa !42
  %92 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 3
  store ptr null, ptr %92, align 8, !tbaa !43
  br label %109

93:                                               ; preds = %79
  %94 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 2
  store ptr null, ptr %94, align 8, !tbaa !42
  %95 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 4
  %96 = call noundef ptr @_ZNKSt10unique_ptrIA_hPFvPvEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %95) #6
  %97 = load i64, ptr %12, align 8, !tbaa !39
  %98 = getelementptr inbounds i8, ptr %96, i64 %97
  %99 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 3
  store ptr %98, ptr %99, align 8, !tbaa !43
  br label %109

100:                                              ; preds = %79
  %101 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 4
  %102 = call noundef ptr @_ZNKSt10unique_ptrIA_hPFvPvEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %101) #6
  %103 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 2
  store ptr %102, ptr %103, align 8, !tbaa !42
  %104 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 4
  %105 = call noundef ptr @_ZNKSt10unique_ptrIA_hPFvPvEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %104) #6
  %106 = load i64, ptr %12, align 8, !tbaa !39
  %107 = getelementptr inbounds i8, ptr %105, i64 %106
  %108 = getelementptr inbounds %"class.qpl::ml::compression::huffman_table_t", ptr %20, i32 0, i32 3
  store ptr %107, ptr %108, align 8, !tbaa !43
  br label %109

109:                                              ; preds = %100, %93, %88
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %110

110:                                              ; preds = %109, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  %111 = load i32, ptr %6, align 4
  ret i32 %111
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN3qpl2ml11compression7detailsL14get_path_flagsENS0_16execution_path_tE(i8 noundef zeroext) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10unique_ptrIA_hPFvPvEEC2IPhS3_vEET_RKS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10unique_ptrIA_hPFvPvEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10unique_ptrIA_hPFvPvEED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrIA_hPFvPvEE3getEv(ptr noundef nonnull align 8 dereferenceable(16)) #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { 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 = !{!"_ZTSN3qpl2ml11compression20huffman_table_type_eE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN3qpl2ml16execution_path_tE", !7, i64 0}
!13 = !{!14, !17, i64 8}
!14 = !{!"_ZTSN3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EEE", !15, i64 0, !19, i64 16, !6, i64 24, !6, i64 32, !20, i64 40, !28, i64 56}
!15 = !{!"_ZTSN3qpl2ml11compression20huffman_table_meta_tE", !7, i64 0, !16, i64 4, !17, i64 8, !18, i64 9, !10, i64 10, !12, i64 11, !16, i64 12}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSN3qpl2ml11compression23compression_algorithm_eE", !7, i64 0}
!18 = !{!"_ZTSN3qpl2ml11compression15table_version_eE", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTSSt10unique_ptrIA_hPFvPvEE", !21, i64 0}
!21 = !{!"_ZTSSt15__uniq_ptr_dataIhPFvPvELb1ELb1EE", !22, i64 0}
!22 = !{!"_ZTSSt15__uniq_ptr_implIhPFvPvEE", !23, i64 0}
!23 = !{!"_ZTSSt5tupleIJPhPFvPvEEE", !24, i64 0}
!24 = !{!"_ZTSSt11_Tuple_implILm0EJPhPFvPvEEE", !25, i64 0, !27, i64 8}
!25 = !{!"_ZTSSt11_Tuple_implILm1EJPFvPvEEE", !26, i64 0}
!26 = !{!"_ZTSSt10_Head_baseILm1EPFvPvELb0EE", !6, i64 0}
!27 = !{!"_ZTSSt10_Head_baseILm0EPhLb0EE", !6, i64 0}
!28 = !{!"_ZTS11allocator_t", !6, i64 0, !6, i64 8}
!29 = !{!14, !10, i64 10}
!30 = !{!14, !12, i64 11}
!31 = !{!14, !16, i64 12}
!32 = !{!14, !18, i64 9}
!33 = !{!14, !19, i64 16}
!34 = !{!28, !6, i64 0}
!35 = !{!14, !6, i64 56}
!36 = !{!28, !6, i64 8}
!37 = !{!14, !6, i64 64}
!38 = !{!16, !16, i64 0}
!39 = !{!40, !40, i64 0}
!40 = !{!"long", !7, i64 0}
!41 = !{i64 0, i64 8, !5, i64 8, i64 8, !5}
!42 = !{!14, !6, i64 24}
!43 = !{!14, !6, i64 32}


; 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.allocator_t = type { ptr, ptr }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { ptr }
%"struct.std::_Head_base.1" = type { ptr }

; 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: inlinehint mustprogress nounwind uwtable
declare hidden { ptr, ptr } @_ZN3qpl2ml11compression7detailsL13get_allocatorE11allocator_t(ptr, ptr) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 51) i32 @_ZN3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE6createENS1_20huffman_table_type_eENS0_16execution_path_tE11allocator_t(ptr noundef nonnull align 8 dereferenceable(72) %0, i8 noundef zeroext %1, i8 noundef zeroext %2, ptr %3, ptr %4) local_unnamed_addr #2 align 2 {
  %6 = alloca %struct.allocator_t, align 8
  %7 = alloca %"class.std::unique_ptr", align 8
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  store i8 0, ptr %8, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 10
  store i8 %1, ptr %9, align 2, !tbaa !26
  %10 = getelementptr inbounds i8, ptr %0, i64 11
  store i8 %2, ptr %10, align 1, !tbaa !27
  %11 = tail call noundef i32 @_ZN3qpl2ml11compression7detailsL14get_path_flagsENS0_16execution_path_tE(i8 noundef zeroext %2)
  %12 = or i32 %11, 4
  %13 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %12, ptr %13, align 4, !tbaa !28
  %14 = getelementptr inbounds i8, ptr %0, i64 9
  store i8 1, ptr %14, align 1, !tbaa !29
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  store i8 0, ptr %15, align 8, !tbaa !30
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %3, ptr %16, align 8, !tbaa !31
  %17 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %4, ptr %17, align 8, !tbaa !32
  switch i8 %1, label %19 [
    i8 1, label %20
    i8 2, label %18
  ]

18:                                               ; preds = %5
  br label %20

19:                                               ; preds = %5
  br label %20

20:                                               ; preds = %5, %19, %18
  %.018 = phi i64 [ 3904, %19 ], [ 0, %18 ], [ 0, %5 ]
  %.017 = phi i64 [ 31488, %19 ], [ 27584, %18 ], [ 3904, %5 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %21 = tail call { ptr, ptr } @_ZN3qpl2ml11compression7detailsL13get_allocatorE11allocator_t(ptr %3, ptr %4)
  %22 = extractvalue { ptr, ptr } %21, 0
  store ptr %22, ptr %6, align 8
  %23 = getelementptr inbounds i8, ptr %6, i64 8
  %24 = extractvalue { ptr, ptr } %21, 1
  store ptr %24, ptr %23, align 8
  %25 = tail call noundef ptr %22(i64 noundef %.017)
  %.not = icmp eq ptr %25, null
  br i1 %.not, label %42, label %26

26:                                               ; preds = %20
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %25, i8 0, i64 %.017, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  call void @_ZNSt10unique_ptrIA_hPFvPvEEC2IPhS3_vEET_RKS3_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull %25, ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  %27 = getelementptr inbounds i8, ptr %0, i64 40
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10unique_ptrIA_hPFvPvEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @_ZNSt10unique_ptrIA_hPFvPvEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  switch i8 %1, label %36 [
    i8 1, label %29
    i8 2, label %32
  ]

29:                                               ; preds = %26
  %30 = call noundef ptr @_ZNKSt10unique_ptrIA_hPFvPvEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %27) #5
  %31 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %30, ptr %31, align 8, !tbaa !33
  br label %.sink.split

32:                                               ; preds = %26
  %33 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr null, ptr %33, align 8, !tbaa !33
  %34 = call noundef ptr @_ZNKSt10unique_ptrIA_hPFvPvEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %27) #5
  %35 = getelementptr inbounds i8, ptr %34, i64 %.018
  br label %.sink.split

36:                                               ; preds = %26
  %37 = call noundef ptr @_ZNKSt10unique_ptrIA_hPFvPvEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %27) #5
  %38 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %37, ptr %38, align 8, !tbaa !33
  %39 = call noundef ptr @_ZNKSt10unique_ptrIA_hPFvPvEE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %27) #5
  %40 = getelementptr inbounds i8, ptr %39, i64 %.018
  br label %.sink.split

.sink.split:                                      ; preds = %36, %32, %29
  %.sink = phi ptr [ null, %29 ], [ %35, %32 ], [ %40, %36 ]
  %41 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %.sink, ptr %41, align 8, !tbaa !34
  br label %42

42:                                               ; preds = %.sink.split, %20
  %.0 = phi i32 [ 50, %20 ], [ 0, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  ret i32 %.0
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN3qpl2ml11compression7detailsL14get_path_flagsENS0_16execution_path_tE(i8 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10unique_ptrIA_hPFvPvEEC2IPhS3_vEET_RKS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10unique_ptrIA_hPFvPvEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10unique_ptrIA_hPFvPvEED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrIA_hPFvPvEE3getEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { 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, !11, i64 8}
!6 = !{!"_ZTSN3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EEE", !7, i64 0, !15, i64 16, !16, i64 24, !16, i64 32, !17, i64 40, !25, i64 56}
!7 = !{!"_ZTSN3qpl2ml11compression20huffman_table_meta_tE", !8, i64 0, !10, i64 4, !11, i64 8, !12, i64 9, !13, i64 10, !14, i64 11, !10, i64 12}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSN3qpl2ml11compression23compression_algorithm_eE", !8, i64 0}
!12 = !{!"_ZTSN3qpl2ml11compression15table_version_eE", !8, i64 0}
!13 = !{!"_ZTSN3qpl2ml11compression20huffman_table_type_eE", !8, i64 0}
!14 = !{!"_ZTSN3qpl2ml16execution_path_tE", !8, i64 0}
!15 = !{!"bool", !8, i64 0}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"_ZTSSt10unique_ptrIA_hPFvPvEE", !18, i64 0}
!18 = !{!"_ZTSSt15__uniq_ptr_dataIhPFvPvELb1ELb1EE", !19, i64 0}
!19 = !{!"_ZTSSt15__uniq_ptr_implIhPFvPvEE", !20, i64 0}
!20 = !{!"_ZTSSt5tupleIJPhPFvPvEEE", !21, i64 0}
!21 = !{!"_ZTSSt11_Tuple_implILm0EJPhPFvPvEEE", !22, i64 0, !24, i64 8}
!22 = !{!"_ZTSSt11_Tuple_implILm1EJPFvPvEEE", !23, i64 0}
!23 = !{!"_ZTSSt10_Head_baseILm1EPFvPvELb0EE", !16, i64 0}
!24 = !{!"_ZTSSt10_Head_baseILm0EPhLb0EE", !16, i64 0}
!25 = !{!"_ZTS11allocator_t", !16, i64 0, !16, i64 8}
!26 = !{!6, !13, i64 10}
!27 = !{!6, !14, i64 11}
!28 = !{!6, !10, i64 12}
!29 = !{!6, !12, i64 9}
!30 = !{!6, !15, i64 16}
!31 = !{!6, !16, i64 56}
!32 = !{!6, !16, i64 64}
!33 = !{!6, !16, i64 24}
!34 = !{!6, !16, i64 32}


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