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

; 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.qpl::ml::compression::compression_operation_result_t" = type { i32, i32, i32, i32, i32, %"struct.qpl::ml::checksums_t", i32, %struct.qpl_execution_record }
%"struct.qpl::ml::checksums_t" = type { i32, i32, i32 }
%struct.qpl_execution_record = type { double, i32, i32 }
%"class.qpl::ml::compression::huffman_only_state.1" = type <{ ptr, ptr, ptr, ptr, ptr, i8, i8, [6 x i8] }>
%struct.hw_iaa_aecs_compress = type { i32, i32, [5 x i32], i32, [256 x i8], %struct.hw_iaa_histogram, [12288 x i8] }
%struct.hw_iaa_histogram = type { [286 x i32], [2 x i32], [30 x i32], [2 x i32] }

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml11compression30compression_operation_result_tC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #2

; Function Attrs: nounwind
declare noundef ptr @_ZNK3qpl2ml11compression25compression_huffman_table24get_sw_compression_tableEv(ptr noundef nonnull align 8 dereferenceable(36)) #3

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3qpl2ml11compression21compress_huffman_onlyILNS0_16execution_path_tE1ENS1_18huffman_only_stateILS3_1EEEEENS1_30compression_operation_result_tEPhjRT0_(ptr dead_on_unwind noalias writable sret(%"struct.qpl::ml::compression::compression_operation_result_t") align 8 %0, ptr noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(42) %3) #4 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %"struct.qpl::ml::compression::compression_operation_result_t", align 8
  %9 = alloca %"struct.qpl::ml::compression::compression_operation_result_t", align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  store ptr %3, ptr %7, align 8, !tbaa !5
  call void @_ZN3qpl2ml11compression30compression_operation_result_tC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #7
  %10 = load ptr, ptr %7, align 8, !tbaa !5
  %11 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %10, i32 0, i32 0
  %12 = load ptr, ptr %11, align 8, !tbaa !11
  %13 = icmp ne ptr %12, null
  br i1 %13, label %14, label %59

14:                                               ; preds = %4
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  %16 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %15, i32 0, i32 0
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @_ZL34hw_iaa_descriptor_set_input_bufferP13hw_descriptorPhj(ptr noundef %17, ptr noundef %18, i32 noundef %19)
          to label %20 unwind label %80

20:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 56, ptr %8) #7
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %21, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %24, i32 0, i32 2
  %26 = load ptr, ptr %25, align 8, !tbaa !14
  call void @_ZN3qpl2ml4util18process_descriptorINS0_11compression30compression_operation_result_tELNS1_16execution_mode_tE0EEET_P13hw_descriptorPV20hw_completion_recordi(ptr dead_on_unwind writable sret(%"struct.qpl::ml::compression::compression_operation_result_t") align 8 %8, ptr noundef %23, ptr noundef %26, i32 noundef -1) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %8, i64 56, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 56, ptr %8) #7
  %27 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !20
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %20
  br label %79

31:                                               ; preds = %20
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %32, i32 0, i32 3
  %34 = load ptr, ptr %33, align 8, !tbaa !24
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %35, i32 0, i32 3
  %37 = load ptr, ptr %36, align 8, !tbaa !24
  %38 = getelementptr inbounds %struct.hw_iaa_aecs_compress, ptr %37, i32 0, i32 5
  invoke void @hw_iaa_aecs_compress_set_huffman_only_huffman_table_from_histogram(ptr noundef %34, ptr noundef %38)
          to label %39 unwind label %80

39:                                               ; preds = %31
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %40, i32 0, i32 3
  %42 = load ptr, ptr %41, align 8, !tbaa !24
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %43, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !25
  %46 = call noundef ptr @_ZNK3qpl2ml11compression25compression_huffman_table24get_sw_compression_tableEv(ptr noundef nonnull align 8 dereferenceable(36) %45) #7
  invoke void @hw_iaa_aecs_compress_store_huffman_only_huffman_table(ptr noundef %42, ptr noundef %46)
          to label %47 unwind label %80

47:                                               ; preds = %39
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %48, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !26
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %51, i32 0, i32 3
  %53 = load ptr, ptr %52, align 8, !tbaa !24
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %54, i32 0, i32 6
  %56 = load i8, ptr %55, align 1, !tbaa !27, !range !28, !noundef !29
  %57 = trunc i8 %56 to i1
  invoke void @hw_iaa_descriptor_compress_set_aecs(ptr noundef %50, ptr noundef %53, i32 noundef 16, i1 noundef zeroext %57)
          to label %58 unwind label %80

58:                                               ; preds = %47
  br label %59

59:                                               ; preds = %58, %4
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %60, i32 0, i32 1
  %62 = load ptr, ptr %61, align 8, !tbaa !26
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @_ZL34hw_iaa_descriptor_set_input_bufferP13hw_descriptorPhj(ptr noundef %62, ptr noundef %63, i32 noundef %64)
          to label %65 unwind label %80

65:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 56, ptr %9) #7
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %66, i32 0, i32 1
  %68 = load ptr, ptr %67, align 8, !tbaa !26
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state.1", ptr %69, i32 0, i32 2
  %71 = load ptr, ptr %70, align 8, !tbaa !14
  call void @_ZN3qpl2ml4util18process_descriptorINS0_11compression30compression_operation_result_tELNS1_16execution_mode_tE0EEET_P13hw_descriptorPV20hw_completion_recordi(ptr dead_on_unwind writable sret(%"struct.qpl::ml::compression::compression_operation_result_t") align 8 %9, ptr noundef %68, ptr noundef %71, i32 noundef -1) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %9, i64 56, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 56, ptr %9) #7
  %72 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  %73 = load i32, ptr %72, align 8, !tbaa !20
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %75, label %78

75:                                               ; preds = %65
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 2
  store i32 %76, ptr %77, align 8, !tbaa !30
  br label %78

78:                                               ; preds = %75, %65
  br label %79

79:                                               ; preds = %78, %30
  ret void

80:                                               ; preds = %59, %47, %39, %31, %14
  %81 = landingpad { ptr, i32 }
          catch ptr null
  %82 = extractvalue { ptr, i32 } %81, 0
  call void @__clang_call_terminate(ptr %82) #8
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL34hw_iaa_descriptor_set_input_bufferP13hw_descriptorPhj(ptr noundef, ptr noundef, i32 noundef) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml4util18process_descriptorINS0_11compression30compression_operation_result_tELNS1_16execution_mode_tE0EEET_P13hw_descriptorPV20hw_completion_recordi(ptr dead_on_unwind noalias writable sret(%"struct.qpl::ml::compression::compression_operation_result_t") align 8, ptr noundef, ptr noundef, i32 noundef) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

declare void @hw_iaa_aecs_compress_set_huffman_only_huffman_table_from_histogram(ptr noundef, ptr noundef) #6

declare void @hw_iaa_aecs_compress_store_huffman_only_huffman_table(ptr noundef, ptr noundef) #6

declare void @hw_iaa_descriptor_compress_set_aecs(ptr noundef, ptr noundef, i32 noundef, i1 noundef zeroext) #6

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSN3qpl2ml11compression18huffman_only_stateILNS0_16execution_path_tE1EEE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !13, i64 40, !13, i64 41}
!13 = !{!"bool", !7, i64 0}
!14 = !{!12, !6, i64 16}
!15 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9, i64 16, i64 4, !9, i64 20, i64 4, !9, i64 24, i64 4, !9, i64 28, i64 4, !9, i64 32, i64 4, !16, i64 40, i64 8, !18, i64 48, i64 4, !9, i64 52, i64 4, !9}
!16 = !{!17, !17, i64 0}
!17 = !{!"_ZTS25hw_multidescriptor_status", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!21, !10, i64 0}
!21 = !{!"_ZTSN3qpl2ml11compression30compression_operation_result_tE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !22, i64 20, !17, i64 32, !23, i64 40}
!22 = !{!"_ZTSN3qpl2ml11checksums_tE", !10, i64 0, !10, i64 4, !10, i64 8}
!23 = !{!"_ZTS20qpl_execution_record", !19, i64 0, !10, i64 8, !10, i64 12}
!24 = !{!12, !6, i64 24}
!25 = !{!12, !6, i64 32}
!26 = !{!12, !6, i64 8}
!27 = !{!12, !13, i64 41}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!21, !10, i64 8}


; 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.qpl::ml::compression::compression_operation_result_t" = type { i32, i32, i32, i32, i32, %"struct.qpl::ml::checksums_t", i32, %struct.qpl_execution_record }
%"struct.qpl::ml::checksums_t" = type { i32, i32, i32 }
%struct.qpl_execution_record = type { double, i32, i32 }

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml11compression30compression_operation_result_tC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare noundef ptr @_ZNK3qpl2ml11compression25compression_huffman_table24get_sw_compression_tableEv(ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3qpl2ml11compression21compress_huffman_onlyILNS0_16execution_path_tE1ENS1_18huffman_only_stateILS3_1EEEEENS1_30compression_operation_result_tEPhjRT0_(ptr dead_on_unwind noalias nonnull writable sret(%"struct.qpl::ml::compression::compression_operation_result_t") align 8 %0, ptr noundef %1, i32 noundef %2, ptr nocapture noundef nonnull readonly align 8 dereferenceable(42) %3) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.qpl::ml::compression::compression_operation_result_t", align 8
  %6 = alloca %"struct.qpl::ml::compression::compression_operation_result_t", align 8
  tail call void @_ZN3qpl2ml11compression30compression_operation_result_tC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #7
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %29, label %8

8:                                                ; preds = %4
  tail call void @_ZL34hw_iaa_descriptor_set_input_bufferP13hw_descriptorPhj(ptr noundef nonnull %7, ptr noundef %1, i32 noundef %2)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #7
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %3, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !11
  call void @_ZN3qpl2ml4util18process_descriptorINS0_11compression30compression_operation_result_tELNS1_16execution_mode_tE0EEET_P13hw_descriptorPV20hw_completion_recordi(ptr dead_on_unwind nonnull writable sret(%"struct.qpl::ml::compression::compression_operation_result_t") align 8 %5, ptr noundef %9, ptr noundef %11, i32 noundef -1) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(56) %5, i64 56, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #7
  %12 = load i32, ptr %0, align 8, !tbaa !19
  %.not18 = icmp eq i32 %12, 0
  br i1 %.not18, label %13, label %39

13:                                               ; preds = %8
  %14 = getelementptr inbounds i8, ptr %3, i64 24
  %15 = load ptr, ptr %14, align 8, !tbaa !23
  %16 = getelementptr inbounds i8, ptr %15, i64 288
  invoke void @hw_iaa_aecs_compress_set_huffman_only_huffman_table_from_histogram(ptr noundef %15, ptr noundef nonnull %16)
          to label %17 unwind label %40

17:                                               ; preds = %13
  %18 = load ptr, ptr %14, align 8, !tbaa !23
  %19 = getelementptr inbounds i8, ptr %3, i64 32
  %20 = load ptr, ptr %19, align 8, !tbaa !24
  %21 = call noundef ptr @_ZNK3qpl2ml11compression25compression_huffman_table24get_sw_compression_tableEv(ptr noundef nonnull align 8 dereferenceable(36) %20) #7
  invoke void @hw_iaa_aecs_compress_store_huffman_only_huffman_table(ptr noundef %18, ptr noundef %21)
          to label %22 unwind label %40

22:                                               ; preds = %17
  %23 = getelementptr inbounds i8, ptr %3, i64 8
  %24 = load ptr, ptr %23, align 8, !tbaa !25
  %25 = load ptr, ptr %14, align 8, !tbaa !23
  %26 = getelementptr inbounds i8, ptr %3, i64 41
  %27 = load i8, ptr %26, align 1, !tbaa !26, !range !27, !noundef !28
  %28 = trunc nuw i8 %27 to i1
  invoke void @hw_iaa_descriptor_compress_set_aecs(ptr noundef %24, ptr noundef %25, i32 noundef 16, i1 noundef zeroext %28)
          to label %29 unwind label %40

29:                                               ; preds = %22, %4
  %30 = getelementptr inbounds i8, ptr %3, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !25
  call void @_ZL34hw_iaa_descriptor_set_input_bufferP13hw_descriptorPhj(ptr noundef %31, ptr noundef %1, i32 noundef %2)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #7
  %32 = load ptr, ptr %30, align 8, !tbaa !25
  %33 = getelementptr inbounds i8, ptr %3, i64 16
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  call void @_ZN3qpl2ml4util18process_descriptorINS0_11compression30compression_operation_result_tELNS1_16execution_mode_tE0EEET_P13hw_descriptorPV20hw_completion_recordi(ptr dead_on_unwind nonnull writable sret(%"struct.qpl::ml::compression::compression_operation_result_t") align 8 %6, ptr noundef %32, ptr noundef %34, i32 noundef -1) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(56) %6, i64 56, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #7
  %35 = load i32, ptr %0, align 8, !tbaa !19
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %39

37:                                               ; preds = %29
  %38 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %2, ptr %38, align 8, !tbaa !29
  br label %39

39:                                               ; preds = %29, %37, %8
  ret void

40:                                               ; preds = %22, %17, %13
  %41 = landingpad { ptr, i32 }
          catch ptr null
  %42 = extractvalue { ptr, i32 } %41, 0
  call void @__clang_call_terminate(ptr %42) #8
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL34hw_iaa_descriptor_set_input_bufferP13hw_descriptorPhj(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml4util18process_descriptorINS0_11compression30compression_operation_result_tELNS1_16execution_mode_tE0EEET_P13hw_descriptorPV20hw_completion_recordi(ptr dead_on_unwind noalias writable sret(%"struct.qpl::ml::compression::compression_operation_result_t") align 8, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

declare void @hw_iaa_aecs_compress_set_huffman_only_huffman_table_from_histogram(ptr noundef, ptr noundef) local_unnamed_addr #6

declare void @hw_iaa_aecs_compress_store_huffman_only_huffman_table(ptr noundef, ptr noundef) local_unnamed_addr #6

declare void @hw_iaa_descriptor_compress_set_aecs(ptr noundef, ptr noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #6

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { 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 = !{!"_ZTSN3qpl2ml11compression18huffman_only_stateILNS0_16execution_path_tE1EEE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !10, i64 41}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!6, !7, i64 16}
!12 = !{i64 0, i64 4, !13, i64 4, i64 4, !13, i64 8, i64 4, !13, i64 12, i64 4, !13, i64 16, i64 4, !13, i64 20, i64 4, !13, i64 24, i64 4, !13, i64 28, i64 4, !13, i64 32, i64 4, !15, i64 40, i64 8, !17, i64 48, i64 4, !13, i64 52, i64 4, !13}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTS25hw_multidescriptor_status", !8, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !8, i64 0}
!19 = !{!20, !14, i64 0}
!20 = !{!"_ZTSN3qpl2ml11compression30compression_operation_result_tE", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !21, i64 20, !16, i64 32, !22, i64 40}
!21 = !{!"_ZTSN3qpl2ml11checksums_tE", !14, i64 0, !14, i64 4, !14, i64 8}
!22 = !{!"_ZTS20qpl_execution_record", !18, i64 0, !14, i64 8, !14, i64 12}
!23 = !{!6, !7, i64 24}
!24 = !{!6, !7, i64 32}
!25 = !{!6, !7, i64 8}
!26 = !{!6, !10, i64 41}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!20, !14, i64 8}


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