; LLVM IR from intel/qpl :: sources/c_api/legacy_hw_path (qpl_hw_compress_job)

; 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_job = type { ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, ptr, i32, i32, i8, i8, i8, i64, i64, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.qpl_aux_data }
%struct.qpl_aux_data = type { ptr, ptr, ptr, ptr, ptr, i32 }
%struct.qpl_hw_state = type { %struct.hw_decompress_analytics_descriptor, %struct.hw_iaa_completion_record, [2 x %struct.hw_iaa_aecs_analytic], [2 x %struct.hw_iaa_aecs_compress], %struct.qpl_buffer, %struct.qpl_execution_history, i32, i32, i32, %struct.hw_huffman_code, i32, %struct.hw_accelerator_context, i32, i32, i8, i8, i32, i32, %struct.qpl_execution_record }
%struct.hw_decompress_analytics_descriptor = type { i32, i32, ptr, ptr, ptr, i32, i16, i16, ptr, i32, i32, i32, i32 }
%struct.hw_iaa_completion_record = type { i8, i8, i8, i8, i32, i64, i64, i32, i8, i8, i16, i32, i32, i32, i32, i64, i64 }
%struct.hw_iaa_aecs_analytic = type { %struct.hw_iaa_aecs_filter, [36 x i32], %struct.hw_iaa_aecs_decompress }
%struct.hw_iaa_aecs_filter = type { i32, i32, i32, i32, i32, i32 }
%struct.hw_iaa_aecs_decompress = type { [2 x i32], i32, i32, [32 x i64], [32 x i8], i32, i8, i8, i16, [5 x i32], [5 x i32], [5 x i32], [5 x i32], [62 x i32], %union.anon, i16, i16, %union.anon.7, %struct.anon.9, i16, [4096 x i8], [6 x i32] }
%union.anon = type { %struct.anon }
%struct.anon = type { [6 x i32], [224 x i8], [5 x i32] }
%union.anon.7 = type { %struct.anon.8 }
%struct.anon.8 = type { [2 x i32], [144 x i8], [5 x i32] }
%struct.anon.9 = type { i16 }
%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] }
%struct.qpl_buffer = type { [1024 x i8], i32, i32 }
%struct.qpl_execution_history = type { i8, i32, i32, i32, ptr }
%struct.hw_huffman_code = type { i16, i8, i8 }
%struct.hw_accelerator_context = type { %struct.hw_device_properties, ptr }
%struct.hw_device_properties = type { i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
%struct.qpl_execution_record = type { double, i32, i32 }
%struct.qpl_dictionary = type { i8, i8, i64, i32, i32, i32, i32, i32 }

@_ZZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher = external hidden global ptr, align 8
@_ZGVZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher = external hidden global i64, align 8

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

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #1

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(975232) ptr @_ZN3qpl2ml10dispatcher13hw_dispatcher12get_instanceEv() #2

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

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK3qpl2ml10dispatcher13hw_dispatcher13is_hw_supportEv(ptr noundef nonnull align 8 dereferenceable(975232)) #2

; Function Attrs: nounwind
declare noundef i32 @_ZNK3qpl2ml10dispatcher13hw_dispatcher18get_hw_init_statusEv(ptr noundef nonnull align 8 dereferenceable(975232)) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3qpl2ml4util43convert_hw_accelerator_status_to_qpl_statusEj(i32 noundef) #3

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

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(9752) ptr @_ZNK3qpl2ml10dispatcher13hw_dispatcher6deviceEm(ptr noundef nonnull align 8 dereferenceable(975232), i64 noundef) #2

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK3qpl2ml10dispatcher9hw_device25get_dict_compress_supportEv(ptr noundef nonnull align 8 dereferenceable(9752)) #2

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40)) #2

declare void @hw_iaa_descriptor_init_deflate_body(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #4

; Function Attrs: nounwind
declare noundef ptr @_ZN3qpl2ml11compression19get_dictionary_dataER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40)) #2

; Function Attrs: nounwind
declare noundef zeroext i8 @_ZN3qpl2ml11compression24get_load_dictionary_flagER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40)) #2

declare void @hw_iaa_descriptor_compress_setup_dictionary(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #4

declare void @hw_iaa_descriptor_set_completion_record(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z20use_as_huffman_tableILN3qpl2ml11compression23compression_algorithm_eE0EEDaP17qpl_huffman_table(ptr noundef) #5

; Function Attrs: nounwind
declare noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE30get_literals_lengths_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72)) #2

declare void @hw_iaa_aecs_compress_set_deflate_huffman_table(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nounwind
declare noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE21get_offsets_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72)) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL45hw_iaa_descriptor_compress_set_be_output_modeP13hw_descriptor(ptr noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL33hw_iaa_descriptor_set_crc_rfc3720P13hw_descriptor(ptr noundef) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3qpl2ml4util38are_iaa_gen_2_min_capabilities_presentEv() #3

; Function Attrs: mustprogress uwtable
define dso_local i32 @hw_descriptor_compress_init_deflate_canned(ptr noundef %0) #6 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i8, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #1
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.qpl_job, ptr %20, i32 0, i32 39
  %22 = getelementptr inbounds %struct.qpl_aux_data, ptr %21, i32 0, i32 4
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  store ptr %23, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #1
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.qpl_hw_state, ptr %24, i32 0, i32 0
  store ptr %25, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #1
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.qpl_job, ptr %26, i32 0, i32 7
  %28 = load i32, ptr %27, align 4, !tbaa !21
  store i32 %28, ptr %6, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #1
  %29 = load i32, ptr %6, align 4, !tbaa !22
  %30 = and i32 %29, 2
  %31 = icmp ne i32 %30, 0
  %32 = zext i1 %31 to i8
  store i8 %32, ptr %7, align 1, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #1
  %33 = load i32, ptr %6, align 4, !tbaa !22
  %34 = and i32 %33, 1
  %35 = icmp ne i32 %34, 0
  %36 = zext i1 %35 to i8
  store i8 %36, ptr %8, align 1, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #1
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.qpl_job, ptr %37, i32 0, i32 14
  %39 = load ptr, ptr %38, align 8, !tbaa !25
  store ptr %39, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #1
  store i8 0, ptr %10, align 1, !tbaa !23
  %40 = load atomic i8, ptr @_ZGVZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher acquire, align 8
  %41 = icmp eq i8 %40, 0
  br i1 %41, label %42, label %47, !prof !26

42:                                               ; preds = %1
  %43 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher) #1
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %42
  %46 = call noundef nonnull align 8 dereferenceable(975232) ptr @_ZN3qpl2ml10dispatcher13hw_dispatcher12get_instanceEv() #1
  store ptr %46, ptr @_ZZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher, align 8, !tbaa !5
  call void @__cxa_guard_release(ptr @_ZGVZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher) #1
  br label %47

47:                                               ; preds = %45, %42, %1
  %48 = load ptr, ptr @_ZZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher, align 8, !tbaa !5
  %49 = call noundef zeroext i1 @_ZNK3qpl2ml10dispatcher13hw_dispatcher13is_hw_supportEv(ptr noundef nonnull align 8 dereferenceable(975232) %48) #1
  br i1 %49, label %55, label %50

50:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #1
  %51 = load ptr, ptr @_ZZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher, align 8, !tbaa !5
  %52 = call noundef i32 @_ZNK3qpl2ml10dispatcher13hw_dispatcher18get_hw_init_statusEv(ptr noundef nonnull align 8 dereferenceable(975232) %51) #1
  store i32 %52, ptr %11, align 4, !tbaa !27
  %53 = load i32, ptr %11, align 4, !tbaa !27
  %54 = call noundef i32 @_ZN3qpl2ml4util43convert_hw_accelerator_status_to_qpl_statusEj(i32 noundef %53)
  store i32 %54, ptr %2, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #1
  br label %177

55:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #1
  %56 = load ptr, ptr @_ZZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher, align 8, !tbaa !5
  %57 = call noundef nonnull align 8 dereferenceable(9752) ptr @_ZNK3qpl2ml10dispatcher13hw_dispatcher6deviceEm(ptr noundef nonnull align 8 dereferenceable(975232) %56, i64 noundef 0) #1
  store ptr %57, ptr %13, align 8, !tbaa !5
  %58 = load ptr, ptr %13, align 8, !tbaa !5
  %59 = call noundef zeroext i1 @_ZNK3qpl2ml10dispatcher9hw_device25get_dict_compress_supportEv(ptr noundef nonnull align 8 dereferenceable(9752) %58) #1
  %60 = zext i1 %59 to i8
  store i8 %60, ptr %10, align 1, !tbaa !23
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %85

63:                                               ; preds = %55
  %64 = load i8, ptr %10, align 1, !tbaa !23, !range !29, !noundef !30
  %65 = trunc i8 %64 to i1
  br i1 %65, label %66, label %77

66:                                               ; preds = %63
  %67 = load i8, ptr %7, align 1, !tbaa !23, !range !29, !noundef !30
  %68 = trunc i8 %67 to i1
  br i1 %68, label %69, label %77

69:                                               ; preds = %66
  %70 = load i8, ptr %8, align 1, !tbaa !23, !range !29, !noundef !30
  %71 = trunc i8 %70 to i1
  br i1 %71, label %72, label %77

72:                                               ; preds = %69
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.qpl_dictionary, ptr %73, i32 0, i32 1
  %75 = load i8, ptr %74, align 1, !tbaa !31
  %76 = icmp eq i8 -1, %75
  br i1 %76, label %77, label %78

77:                                               ; preds = %72, %69, %66, %63
  store i32 52, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %176

78:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #1
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = call noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %79) #1
  store i32 %80, ptr %14, align 4, !tbaa !22
  %81 = load i32, ptr %14, align 4, !tbaa !22
  %82 = add i32 1568, %81
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.qpl_hw_state, ptr %83, i32 0, i32 8
  store i32 %82, ptr %84, align 8, !tbaa !35
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #1
  br label %88

85:                                               ; preds = %55
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.qpl_hw_state, ptr %86, i32 0, i32 8
  store i32 1568, ptr %87, align 8, !tbaa !35
  br label %88

88:                                               ; preds = %85, %78
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.qpl_job, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !51
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.qpl_job, ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 8, !tbaa !52
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.qpl_job, ptr %96, i32 0, i32 3
  %98 = load ptr, ptr %97, align 8, !tbaa !53
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.qpl_job, ptr %99, i32 0, i32 4
  %101 = load i32, ptr %100, align 8, !tbaa !54
  call void @hw_iaa_descriptor_init_deflate_body(ptr noundef %89, ptr noundef %92, i32 noundef %95, ptr noundef %98, i32 noundef %101)
  %102 = load i32, ptr %6, align 4, !tbaa !22
  %103 = and i32 %102, 16
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %107

105:                                              ; preds = %88
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZL45hw_iaa_descriptor_compress_set_be_output_modeP13hw_descriptor(ptr noundef %106)
  br label %107

107:                                              ; preds = %105, %88
  %108 = load i32, ptr %6, align 4, !tbaa !22
  %109 = and i32 %108, 4
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %113

111:                                              ; preds = %107
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZL33hw_iaa_descriptor_set_crc_rfc3720P13hw_descriptor(ptr noundef %112)
  br label %113

113:                                              ; preds = %111, %107
  %114 = load i8, ptr %8, align 1, !tbaa !23, !range !29, !noundef !30
  %115 = trunc i8 %114 to i1
  br i1 %115, label %116, label %128

116:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #1
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.qpl_job, ptr %117, i32 0, i32 13
  %119 = load ptr, ptr %118, align 8, !tbaa !55
  %120 = call noundef ptr @_Z20use_as_huffman_tableILN3qpl2ml11compression23compression_algorithm_eE0EEDaP17qpl_huffman_table(ptr noundef %119)
  store ptr %120, ptr %15, align 8, !tbaa !5
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.qpl_hw_state, ptr %121, i32 0, i32 3
  %123 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %122, i64 0, i64 0
  %124 = load ptr, ptr %15, align 8, !tbaa !5
  %125 = call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE30get_literals_lengths_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %124) #1
  %126 = load ptr, ptr %15, align 8, !tbaa !5
  %127 = call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE21get_offsets_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %126) #1
  call void @hw_iaa_aecs_compress_set_deflate_huffman_table(ptr noundef %123, ptr noundef %125, ptr noundef %127)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #1
  br label %128

128:                                              ; preds = %116, %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #1
  %129 = load i8, ptr %7, align 1, !tbaa !23, !range !29, !noundef !30
  %130 = trunc i8 %129 to i1
  %131 = zext i1 %130 to i64
  %132 = select i1 %130, i32 16, i32 272
  store i32 %132, ptr %16, align 4, !tbaa !22
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.qpl_hw_state, ptr %134, i32 0, i32 3
  %136 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %135, i64 0, i64 0
  %137 = load i32, ptr %16, align 4, !tbaa !22
  %138 = call noundef zeroext i1 @_ZN3qpl2ml4util38are_iaa_gen_2_min_capabilities_presentEv()
  %139 = xor i1 %138, true
  call void @hw_iaa_descriptor_compress_set_aecs(ptr noundef %133, ptr noundef %136, i32 noundef %137, i1 noundef zeroext %139)
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  %141 = icmp ne ptr %140, null
  br i1 %141, label %142, label %166

142:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #1
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = call noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %143) #1
  store i32 %144, ptr %17, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #1
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = call noundef ptr @_ZN3qpl2ml11compression19get_dictionary_dataER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %145) #1
  store ptr %146, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #1
  %147 = load ptr, ptr %9, align 8, !tbaa !5
  %148 = call noundef zeroext i8 @_ZN3qpl2ml11compression24get_load_dictionary_flagER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %147) #1
  store i8 %148, ptr %19, align 1, !tbaa !56
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = load i32, ptr %17, align 4, !tbaa !22
  %151 = load ptr, ptr %18, align 8, !tbaa !5
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.qpl_dictionary, ptr %152, i32 0, i32 3
  %154 = load i32, ptr %153, align 8, !tbaa !57
  %155 = load ptr, ptr %4, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.qpl_hw_state, ptr %155, i32 0, i32 3
  %157 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %156, i64 0, i64 0
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.qpl_hw_state, ptr %158, i32 0, i32 7
  %160 = load i32, ptr %159, align 4, !tbaa !58
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.qpl_hw_state, ptr %161, i32 0, i32 8
  %163 = load i32, ptr %162, align 8, !tbaa !35
  %164 = load i8, ptr %19, align 1, !tbaa !56
  %165 = zext i8 %164 to i32
  call void @hw_iaa_descriptor_compress_setup_dictionary(ptr noundef %149, i32 noundef %150, ptr noundef %151, i32 noundef %154, ptr noundef %157, i32 noundef %160, i32 noundef %163, i32 noundef %165)
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #1
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #1
  br label %166

166:                                              ; preds = %142, %128
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %167, i32 0, i32 7
  %169 = load i16, ptr %168, align 1, !tbaa !59
  %170 = zext i16 %169 to i32
  %171 = or i32 %170, 4
  %172 = trunc i32 %171 to i16
  store i16 %172, ptr %168, align 1, !tbaa !59
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.qpl_hw_state, ptr %174, i32 0, i32 1
  call void @hw_iaa_descriptor_set_completion_record(ptr noundef %173, ptr noundef %175)
  store i32 0, ptr %2, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #1
  br label %176

176:                                              ; preds = %166, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #1
  br label %177

177:                                              ; preds = %176, %50
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #1
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #1
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #1
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #1
  %178 = load i32, ptr %2, align 4
  ret i32 %178
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "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 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 = { 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" }

!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, !6, i64 224}
!10 = !{!"_ZTS7qpl_job", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16, !11, i64 24, !11, i64 28, !12, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !13, i64 52, !14, i64 56, !6, i64 64, !6, i64 72, !15, i64 80, !6, i64 88, !11, i64 96, !11, i64 100, !7, i64 104, !7, i64 105, !7, i64 106, !16, i64 112, !16, i64 120, !6, i64 128, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !17, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !11, i64 168, !18, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !19, i64 192}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS13qpl_operation", !7, i64 0}
!13 = !{!"_ZTS22qpl_compression_levels", !7, i64 0}
!14 = !{!"_ZTS19qpl_statistics_mode", !7, i64 0}
!15 = !{!"_ZTS19qpl_mini_block_size", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTS14qpl_out_format", !7, i64 0}
!18 = !{!"_ZTS10qpl_parser", !7, i64 0}
!19 = !{!"_ZTS12qpl_aux_data", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !20, i64 40}
!20 = !{!"_ZTS10qpl_path_t", !7, i64 0}
!21 = !{!10, !11, i64 36}
!22 = !{!11, !11, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"bool", !7, i64 0}
!25 = !{!10, !6, i64 72}
!26 = !{!"branch_weights", i32 1, i32 1048575}
!27 = !{!28, !28, i64 0}
!28 = !{!"_ZTS21hw_accelerator_status", !7, i64 0}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!32, !34, i64 1}
!32 = !{!"_ZTS14qpl_dictionary", !33, i64 0, !34, i64 1, !16, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32}
!33 = !{!"_ZTS26software_compression_level", !7, i64 0}
!34 = !{!"_ZTS25hardware_dictionary_level", !7, i64 0}
!35 = !{!36, !11, i64 39656}
!36 = !{!"_ZTS12qpl_hw_state", !37, i64 0, !39, i64 64, !7, i64 128, !7, i64 10880, !40, i64 38592, !41, i64 39624, !11, i64 39648, !11, i64 39652, !11, i64 39656, !44, i64 39660, !11, i64 39664, !45, i64 39672, !11, i64 39704, !11, i64 39708, !24, i64 39712, !24, i64 39713, !47, i64 39716, !48, i64 39720, !49, i64 39728}
!37 = !{!"_ZTS34hw_decompress_analytics_descriptor", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !38, i64 36, !38, i64 38, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60}
!38 = !{!"short", !7, i64 0}
!39 = !{!"_ZTS24hw_iaa_completion_record", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !11, i64 4, !16, i64 8, !16, i64 16, !11, i64 24, !7, i64 28, !7, i64 29, !38, i64 30, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !16, i64 48, !16, i64 56}
!40 = !{!"_ZTS10qpl_buffer", !7, i64 0, !11, i64 1024, !11, i64 1028}
!41 = !{!"_ZTS21qpl_execution_history", !24, i64 0, !42, i64 4, !43, i64 8, !11, i64 12, !6, i64 16}
!42 = !{!"_ZTS23qpl_task_execution_step", !7, i64 0}
!43 = !{!"_ZTS14qpl_comp_style", !7, i64 0}
!44 = !{!"_ZTS15hw_huffman_code", !38, i64 0, !7, i64 2, !7, i64 3}
!45 = !{!"_ZTS22hw_accelerator_context", !46, i64 0, !6, i64 24}
!46 = !{!"_ZTS20hw_device_properties", !11, i64 0, !11, i64 4, !11, i64 8, !24, i64 12, !24, i64 13, !24, i64 14, !24, i64 15, !24, i64 16, !24, i64 17, !24, i64 18, !24, i64 19, !24, i64 20, !24, i64 21, !24, i64 22}
!47 = !{!"_ZTS25hw_multidescriptor_status", !7, i64 0}
!48 = !{!"_ZTS10qpl_status", !7, i64 0}
!49 = !{!"_ZTS20qpl_execution_record", !50, i64 0, !11, i64 8, !11, i64 12}
!50 = !{!"double", !7, i64 0}
!51 = !{!10, !6, i64 0}
!52 = !{!10, !11, i64 8}
!53 = !{!10, !6, i64 16}
!54 = !{!10, !11, i64 24}
!55 = !{!10, !6, i64 64}
!56 = !{!7, !7, i64 0}
!57 = !{!32, !11, i64 16}
!58 = !{!36, !11, i64 39652}
!59 = !{!37, !38, i64 38}


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

@_ZZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher = external hidden local_unnamed_addr global ptr, align 8
@_ZGVZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher = external hidden global i64, align 8

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #0

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(975232) ptr @_ZN3qpl2ml10dispatcher13hw_dispatcher12get_instanceEv() local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #0

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK3qpl2ml10dispatcher13hw_dispatcher13is_hw_supportEv(ptr noundef nonnull align 8 dereferenceable(975232)) local_unnamed_addr #1

; Function Attrs: nounwind
declare noundef i32 @_ZNK3qpl2ml10dispatcher13hw_dispatcher18get_hw_init_statusEv(ptr noundef nonnull align 8 dereferenceable(975232)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3qpl2ml4util43convert_hw_accelerator_status_to_qpl_statusEj(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(9752) ptr @_ZNK3qpl2ml10dispatcher13hw_dispatcher6deviceEm(ptr noundef nonnull align 8 dereferenceable(975232), i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK3qpl2ml10dispatcher9hw_device25get_dict_compress_supportEv(ptr noundef nonnull align 8 dereferenceable(9752)) local_unnamed_addr #1

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1

declare void @hw_iaa_descriptor_init_deflate_body(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare noundef ptr @_ZN3qpl2ml11compression19get_dictionary_dataER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1

; Function Attrs: nounwind
declare noundef zeroext i8 @_ZN3qpl2ml11compression24get_load_dictionary_flagER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1

declare void @hw_iaa_descriptor_compress_setup_dictionary(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @hw_iaa_descriptor_set_completion_record(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z20use_as_huffman_tableILN3qpl2ml11compression23compression_algorithm_eE0EEDaP17qpl_huffman_table(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE30get_literals_lengths_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1

declare void @hw_iaa_aecs_compress_set_deflate_huffman_table(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE21get_offsets_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL45hw_iaa_descriptor_compress_set_be_output_modeP13hw_descriptor(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL33hw_iaa_descriptor_set_crc_rfc3720P13hw_descriptor(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3qpl2ml4util38are_iaa_gen_2_min_capabilities_presentEv() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @hw_descriptor_compress_init_deflate_canned(ptr nocapture noundef readonly %0) local_unnamed_addr #5 {
  %2 = getelementptr inbounds i8, ptr %0, i64 224
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 36
  %5 = load i32, ptr %4, align 4, !tbaa !20
  %6 = and i32 %5, 2
  %.not = icmp eq i32 %6, 0
  %7 = and i32 %5, 1
  %.not52 = icmp eq i32 %7, 0
  %8 = getelementptr inbounds i8, ptr %0, i64 72
  %9 = load ptr, ptr %8, align 8, !tbaa !21
  %10 = load atomic i8, ptr @_ZGVZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher acquire, align 8
  %11 = icmp eq i8 %10, 0
  br i1 %11, label %12, label %16, !prof !22

12:                                               ; preds = %1
  %13 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher) #6
  %.not53 = icmp eq i32 %13, 0
  br i1 %.not53, label %16, label %14

14:                                               ; preds = %12
  %15 = tail call noundef nonnull align 8 dereferenceable(975232) ptr @_ZN3qpl2ml10dispatcher13hw_dispatcher12get_instanceEv() #6
  store ptr %15, ptr @_ZZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher, align 8, !tbaa !23
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher) #6
  br label %16

16:                                               ; preds = %14, %12, %1
  %17 = load ptr, ptr @_ZZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher, align 8, !tbaa !23
  %18 = tail call noundef zeroext i1 @_ZNK3qpl2ml10dispatcher13hw_dispatcher13is_hw_supportEv(ptr noundef nonnull align 8 dereferenceable(975232) %17) #6
  %19 = load ptr, ptr @_ZZ42hw_descriptor_compress_init_deflate_cannedE10dispatcher, align 8, !tbaa !23
  br i1 %18, label %23, label %20

20:                                               ; preds = %16
  %21 = tail call noundef i32 @_ZNK3qpl2ml10dispatcher13hw_dispatcher18get_hw_init_statusEv(ptr noundef nonnull align 8 dereferenceable(975232) %19) #6
  %22 = tail call noundef i32 @_ZN3qpl2ml4util43convert_hw_accelerator_status_to_qpl_statusEj(i32 noundef %21)
  br label %79

23:                                               ; preds = %16
  %24 = tail call noundef nonnull align 8 dereferenceable(9752) ptr @_ZNK3qpl2ml10dispatcher13hw_dispatcher6deviceEm(ptr noundef nonnull align 8 dereferenceable(975232) %19, i64 noundef 0) #6
  %25 = tail call noundef zeroext i1 @_ZNK3qpl2ml10dispatcher9hw_device25get_dict_compress_supportEv(ptr noundef nonnull align 8 dereferenceable(9752) %24) #6
  %.not54 = icmp eq ptr %9, null
  br i1 %.not54, label %36, label %26

26:                                               ; preds = %23
  %27 = and i32 %5, 3
  %28 = icmp eq i32 %27, 3
  %brmerge58.not = select i1 %25, i1 %28, i1 false
  br i1 %brmerge58.not, label %29, label %79

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %9, i64 1
  %31 = load i8, ptr %30, align 1, !tbaa !24
  %32 = icmp eq i8 %31, -1
  br i1 %32, label %79, label %33

33:                                               ; preds = %29
  %34 = tail call noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %9) #6
  %35 = add i32 %34, 1568
  br label %36

36:                                               ; preds = %23, %33
  %.sink = phi i32 [ %35, %33 ], [ 1568, %23 ]
  %37 = getelementptr inbounds i8, ptr %3, i64 39656
  store i32 %.sink, ptr %37, align 8, !tbaa !28
  %38 = load ptr, ptr %0, align 8, !tbaa !45
  %39 = getelementptr inbounds i8, ptr %0, i64 8
  %40 = load i32, ptr %39, align 8, !tbaa !46
  %41 = getelementptr inbounds i8, ptr %0, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !47
  %43 = getelementptr inbounds i8, ptr %0, i64 24
  %44 = load i32, ptr %43, align 8, !tbaa !48
  tail call void @hw_iaa_descriptor_init_deflate_body(ptr noundef nonnull %3, ptr noundef %38, i32 noundef %40, ptr noundef %42, i32 noundef %44)
  %45 = and i32 %5, 16
  %.not55 = icmp eq i32 %45, 0
  br i1 %.not55, label %47, label %46

46:                                               ; preds = %36
  tail call void @_ZL45hw_iaa_descriptor_compress_set_be_output_modeP13hw_descriptor(ptr noundef nonnull %3)
  br label %47

47:                                               ; preds = %46, %36
  %48 = and i32 %5, 4
  %.not56 = icmp eq i32 %48, 0
  br i1 %.not56, label %50, label %49

49:                                               ; preds = %47
  tail call void @_ZL33hw_iaa_descriptor_set_crc_rfc3720P13hw_descriptor(ptr noundef nonnull %3)
  br label %50

50:                                               ; preds = %49, %47
  br i1 %.not52, label %58, label %51

51:                                               ; preds = %50
  %52 = getelementptr inbounds i8, ptr %0, i64 64
  %53 = load ptr, ptr %52, align 8, !tbaa !49
  %54 = tail call noundef ptr @_Z20use_as_huffman_tableILN3qpl2ml11compression23compression_algorithm_eE0EEDaP17qpl_huffman_table(ptr noundef %53)
  %55 = getelementptr inbounds i8, ptr %3, i64 10880
  %56 = tail call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE30get_literals_lengths_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %54) #6
  %57 = tail call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE21get_offsets_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %54) #6
  tail call void @hw_iaa_aecs_compress_set_deflate_huffman_table(ptr noundef nonnull %55, ptr noundef %56, ptr noundef %57)
  br label %58

58:                                               ; preds = %51, %50
  %59 = select i1 %.not, i32 272, i32 16
  %60 = getelementptr inbounds i8, ptr %3, i64 10880
  %61 = tail call noundef zeroext i1 @_ZN3qpl2ml4util38are_iaa_gen_2_min_capabilities_presentEv()
  %62 = xor i1 %61, true
  tail call void @hw_iaa_descriptor_compress_set_aecs(ptr noundef nonnull %3, ptr noundef nonnull %60, i32 noundef %59, i1 noundef zeroext %62)
  br i1 %.not54, label %74, label %63

63:                                               ; preds = %58
  %64 = tail call noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %9) #6
  %65 = tail call noundef ptr @_ZN3qpl2ml11compression19get_dictionary_dataER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %9) #6
  %66 = tail call noundef zeroext i8 @_ZN3qpl2ml11compression24get_load_dictionary_flagER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %9) #6
  %67 = getelementptr inbounds i8, ptr %9, i64 16
  %68 = load i32, ptr %67, align 8, !tbaa !50
  %69 = getelementptr inbounds i8, ptr %3, i64 39652
  %70 = load i32, ptr %69, align 4, !tbaa !51
  %71 = getelementptr inbounds i8, ptr %3, i64 39656
  %72 = load i32, ptr %71, align 8, !tbaa !28
  %73 = zext i8 %66 to i32
  tail call void @hw_iaa_descriptor_compress_setup_dictionary(ptr noundef nonnull %3, i32 noundef %64, ptr noundef %65, i32 noundef %68, ptr noundef nonnull %60, i32 noundef %70, i32 noundef %72, i32 noundef %73)
  br label %74

74:                                               ; preds = %63, %58
  %75 = getelementptr inbounds i8, ptr %3, i64 38
  %76 = load i16, ptr %75, align 1, !tbaa !52
  %77 = or i16 %76, 4
  store i16 %77, ptr %75, align 1, !tbaa !52
  %78 = getelementptr inbounds i8, ptr %3, i64 64
  tail call void @hw_iaa_descriptor_set_completion_record(ptr noundef nonnull %3, ptr noundef nonnull %78)
  br label %79

79:                                               ; preds = %74, %26, %29, %20
  %.1 = phi i32 [ %22, %20 ], [ 0, %74 ], [ 52, %26 ], [ 52, %29 ]
  ret i32 %.1
}

attributes #0 = { nofree nounwind }
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 = { 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 = { "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 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, !7, i64 224}
!6 = !{!"_ZTS7qpl_job", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16, !10, i64 24, !10, i64 28, !11, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !12, i64 52, !13, i64 56, !7, i64 64, !7, i64 72, !14, i64 80, !7, i64 88, !10, i64 96, !10, i64 100, !8, i64 104, !8, i64 105, !8, i64 106, !15, i64 112, !15, i64 120, !7, i64 128, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !16, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !17, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !18, i64 192}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTS13qpl_operation", !8, i64 0}
!12 = !{!"_ZTS22qpl_compression_levels", !8, i64 0}
!13 = !{!"_ZTS19qpl_statistics_mode", !8, i64 0}
!14 = !{!"_ZTS19qpl_mini_block_size", !8, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!"_ZTS14qpl_out_format", !8, i64 0}
!17 = !{!"_ZTS10qpl_parser", !8, i64 0}
!18 = !{!"_ZTS12qpl_aux_data", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !19, i64 40}
!19 = !{!"_ZTS10qpl_path_t", !8, i64 0}
!20 = !{!6, !10, i64 36}
!21 = !{!6, !7, i64 72}
!22 = !{!"branch_weights", i32 1, i32 1048575}
!23 = !{!7, !7, i64 0}
!24 = !{!25, !27, i64 1}
!25 = !{!"_ZTS14qpl_dictionary", !26, i64 0, !27, i64 1, !15, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!26 = !{!"_ZTS26software_compression_level", !8, i64 0}
!27 = !{!"_ZTS25hardware_dictionary_level", !8, i64 0}
!28 = !{!29, !10, i64 39656}
!29 = !{!"_ZTS12qpl_hw_state", !30, i64 0, !32, i64 64, !8, i64 128, !8, i64 10880, !33, i64 38592, !34, i64 39624, !10, i64 39648, !10, i64 39652, !10, i64 39656, !38, i64 39660, !10, i64 39664, !39, i64 39672, !10, i64 39704, !10, i64 39708, !35, i64 39712, !35, i64 39713, !41, i64 39716, !42, i64 39720, !43, i64 39728}
!30 = !{!"_ZTS34hw_decompress_analytics_descriptor", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !31, i64 36, !31, i64 38, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60}
!31 = !{!"short", !8, i64 0}
!32 = !{!"_ZTS24hw_iaa_completion_record", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !10, i64 4, !15, i64 8, !15, i64 16, !10, i64 24, !8, i64 28, !8, i64 29, !31, i64 30, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !15, i64 48, !15, i64 56}
!33 = !{!"_ZTS10qpl_buffer", !8, i64 0, !10, i64 1024, !10, i64 1028}
!34 = !{!"_ZTS21qpl_execution_history", !35, i64 0, !36, i64 4, !37, i64 8, !10, i64 12, !7, i64 16}
!35 = !{!"bool", !8, i64 0}
!36 = !{!"_ZTS23qpl_task_execution_step", !8, i64 0}
!37 = !{!"_ZTS14qpl_comp_style", !8, i64 0}
!38 = !{!"_ZTS15hw_huffman_code", !31, i64 0, !8, i64 2, !8, i64 3}
!39 = !{!"_ZTS22hw_accelerator_context", !40, i64 0, !7, i64 24}
!40 = !{!"_ZTS20hw_device_properties", !10, i64 0, !10, i64 4, !10, i64 8, !35, i64 12, !35, i64 13, !35, i64 14, !35, i64 15, !35, i64 16, !35, i64 17, !35, i64 18, !35, i64 19, !35, i64 20, !35, i64 21, !35, i64 22}
!41 = !{!"_ZTS25hw_multidescriptor_status", !8, i64 0}
!42 = !{!"_ZTS10qpl_status", !8, i64 0}
!43 = !{!"_ZTS20qpl_execution_record", !44, i64 0, !10, i64 8, !10, i64 12}
!44 = !{!"double", !8, i64 0}
!45 = !{!6, !7, i64 0}
!46 = !{!6, !10, i64 8}
!47 = !{!6, !7, i64 16}
!48 = !{!6, !10, i64 24}
!49 = !{!6, !7, i64 64}
!50 = !{!25, !10, i64 16}
!51 = !{!29, !10, i64 39652}
!52 = !{!30, !31, i64 38}


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