; 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.hw_huffman_code = type { i16, i8, i8 }
%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_dictionary = type { i8, i8, i64, i32, i32, i32, i32, 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_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.hw_completion_record = type { i8, i8, [62 x i8] }

@_ZZ40hw_descriptor_compress_init_deflate_baseE10dispatcher = external hidden global ptr, align 8
@_ZGVZ40hw_descriptor_compress_init_deflate_baseE10dispatcher = external hidden global i64, align 8
@fixed_literals_table = external constant [286 x i32], align 16
@fixed_offsets_table = external constant [30 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local i32 @hw_descriptor_compress_init_deflate_base(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i8, align 1
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i8, align 1
  %26 = alloca i8, align 1
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca i8, align 1
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca i8, align 1
  %33 = alloca i8, align 1
  %34 = alloca i8, align 1
  %35 = alloca %struct.hw_huffman_code, align 2
  %36 = alloca ptr, align 8
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca ptr, align 8
  %42 = alloca ptr, align 8
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca ptr, align 8
  %47 = alloca i8, align 1
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.qpl_job, ptr %48, i32 0, i32 13
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  store ptr %50, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.qpl_job, ptr %51, i32 0, i32 14
  %53 = load ptr, ptr %52, align 8, !tbaa !21
  store ptr %53, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.qpl_job, ptr %54, i32 0, i32 7
  %56 = load i32, ptr %55, align 4, !tbaa !22
  store i32 %56, ptr %13, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = call noundef i32 @_ZL25own_get_compression_stylePK7qpl_job(ptr noundef %57)
  store i32 %58, ptr %14, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.qpl_job, ptr %59, i32 0, i32 3
  %61 = load ptr, ptr %60, align 8, !tbaa !26
  store ptr %61, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.qpl_job, ptr %62, i32 0, i32 4
  %64 = load i32, ptr %63, align 8, !tbaa !27
  store i32 %64, ptr %16, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #3
  store i8 0, ptr %17, align 1, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #3
  store i8 0, ptr %18, align 1, !tbaa !28
  %65 = load atomic i8, ptr @_ZGVZ40hw_descriptor_compress_init_deflate_baseE10dispatcher acquire, align 8
  %66 = icmp eq i8 %65, 0
  br i1 %66, label %67, label %72, !prof !30

67:                                               ; preds = %4
  %68 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ40hw_descriptor_compress_init_deflate_baseE10dispatcher) #3
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %72

70:                                               ; preds = %67
  %71 = call noundef nonnull align 8 dereferenceable(975232) ptr @_ZN3qpl2ml10dispatcher13hw_dispatcher12get_instanceEv() #3
  store ptr %71, ptr @_ZZ40hw_descriptor_compress_init_deflate_baseE10dispatcher, align 8, !tbaa !5
  call void @__cxa_guard_release(ptr @_ZGVZ40hw_descriptor_compress_init_deflate_baseE10dispatcher) #3
  br label %72

72:                                               ; preds = %70, %67, %4
  %73 = load ptr, ptr @_ZZ40hw_descriptor_compress_init_deflate_baseE10dispatcher, align 8, !tbaa !5
  %74 = call noundef zeroext i1 @_ZNK3qpl2ml10dispatcher13hw_dispatcher13is_hw_supportEv(ptr noundef nonnull align 8 dereferenceable(975232) %73) #3
  br i1 %74, label %80, label %75

75:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %76 = load ptr, ptr @_ZZ40hw_descriptor_compress_init_deflate_baseE10dispatcher, align 8, !tbaa !5
  %77 = call noundef i32 @_ZNK3qpl2ml10dispatcher13hw_dispatcher18get_hw_init_statusEv(ptr noundef nonnull align 8 dereferenceable(975232) %76) #3
  store i32 %77, ptr %19, align 4, !tbaa !31
  %78 = load i32, ptr %19, align 4, !tbaa !31
  %79 = call noundef i32 @_ZN3qpl2ml4util43convert_hw_accelerator_status_to_qpl_statusEj(i32 noundef %78)
  store i32 %79, ptr %5, align 4
  store i32 1, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  br label %703

80:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %81 = load ptr, ptr @_ZZ40hw_descriptor_compress_init_deflate_baseE10dispatcher, align 8, !tbaa !5
  %82 = call noundef nonnull align 8 dereferenceable(9752) ptr @_ZNK3qpl2ml10dispatcher13hw_dispatcher6deviceEm(ptr noundef nonnull align 8 dereferenceable(975232) %81, i64 noundef 0) #3
  store ptr %82, ptr %21, align 8, !tbaa !5
  %83 = load ptr, ptr %21, align 8, !tbaa !5
  %84 = call noundef zeroext i1 @_ZNK3qpl2ml10dispatcher9hw_device22get_header_gen_supportEv(ptr noundef nonnull align 8 dereferenceable(9752) %83) #3
  %85 = zext i1 %84 to i8
  store i8 %85, ptr %17, align 1, !tbaa !28
  %86 = load ptr, ptr %21, align 8, !tbaa !5
  %87 = call noundef zeroext i1 @_ZNK3qpl2ml10dispatcher9hw_device25get_dict_compress_supportEv(ptr noundef nonnull align 8 dereferenceable(9752) %86) #3
  %88 = zext i1 %87 to i8
  store i8 %88, ptr %18, align 1, !tbaa !28
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = icmp ne ptr %89, null
  br i1 %90, label %91, label %119

91:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #3
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.qpl_job, ptr %92, i32 0, i32 7
  %94 = load i32, ptr %93, align 4, !tbaa !22
  %95 = and i32 %94, 3
  %96 = icmp eq i32 %95, 3
  %97 = zext i1 %96 to i8
  store i8 %97, ptr %22, align 1, !tbaa !28
  %98 = load i8, ptr %18, align 1, !tbaa !28, !range !33, !noundef !34
  %99 = trunc i8 %98 to i1
  br i1 %99, label %100, label %108

100:                                              ; preds = %91
  %101 = load i8, ptr %22, align 1, !tbaa !28, !range !33, !noundef !34
  %102 = trunc i8 %101 to i1
  br i1 %102, label %103, label %108

103:                                              ; preds = %100
  %104 = load ptr, ptr %11, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.qpl_dictionary, ptr %104, i32 0, i32 1
  %106 = load i8, ptr %105, align 1, !tbaa !35
  %107 = icmp eq i8 -1, %106
  br i1 %107, label %108, label %109

108:                                              ; preds = %103, %100, %91
  store i32 52, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %116

109:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  %110 = load ptr, ptr %11, align 8, !tbaa !5
  %111 = call noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %110) #3
  store i32 %111, ptr %23, align 4, !tbaa !23
  %112 = load i32, ptr %23, align 4, !tbaa !23
  %113 = add i32 1568, %112
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.qpl_hw_state, ptr %114, i32 0, i32 8
  store i32 %113, ptr %115, align 8, !tbaa !39
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  store i32 0, ptr %20, align 4
  br label %116

116:                                              ; preds = %109, %108
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #3
  %117 = load i32, ptr %20, align 4
  switch i32 %117, label %702 [
    i32 0, label %118
  ]

118:                                              ; preds = %116
  br label %122

119:                                              ; preds = %80
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.qpl_hw_state, ptr %120, i32 0, i32 8
  store i32 1568, ptr %121, align 8, !tbaa !39
  br label %122

122:                                              ; preds = %119, %118
  %123 = load i32, ptr %13, align 4, !tbaa !23
  %124 = and i32 %123, 1
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %199

126:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  store i32 0, ptr %24, align 4, !tbaa !23
  %127 = load i32, ptr %13, align 4, !tbaa !23
  %128 = and i32 %127, 32
  %129 = icmp ne i32 %128, 0
  %130 = zext i1 %129 to i64
  %131 = select i1 %129, i32 2, i32 1
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.qpl_hw_state, ptr %132, i32 0, i32 5
  %134 = getelementptr inbounds %struct.qpl_execution_history, ptr %133, i32 0, i32 1
  store i32 %131, ptr %134, align 4, !tbaa !54
  %135 = load i32, ptr %14, align 4, !tbaa !24
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.qpl_hw_state, ptr %136, i32 0, i32 5
  %138 = getelementptr inbounds %struct.qpl_execution_history, ptr %137, i32 0, i32 2
  store i32 %135, ptr %138, align 8, !tbaa !55
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.qpl_hw_state, ptr %139, i32 0, i32 7
  store i32 0, ptr %140, align 4, !tbaa !56
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.qpl_hw_state, ptr %141, i32 0, i32 13
  store i32 0, ptr %142, align 4, !tbaa !57
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.qpl_hw_state, ptr %143, i32 0, i32 3
  %145 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %144, i64 0, i64 0
  store ptr %145, ptr %12, align 8, !tbaa !5
  %146 = load ptr, ptr %12, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.hw_iaa_aecs_compress, ptr %146, i32 0, i32 3
  store i32 0, ptr %147, align 4, !tbaa !58
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.hw_iaa_aecs_compress, ptr %148, i32 0, i32 0
  store i32 0, ptr %149, align 4, !tbaa !61
  %150 = load ptr, ptr %12, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.hw_iaa_aecs_compress, ptr %150, i32 0, i32 1
  store i32 0, ptr %151, align 4, !tbaa !62
  %152 = load i32, ptr %13, align 4, !tbaa !23
  %153 = and i32 %152, 8
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %155, label %164

155:                                              ; preds = %126
  %156 = load i32, ptr %16, align 4, !tbaa !23
  %157 = icmp ult i32 %156, 10
  br i1 %157, label %158, label %159

158:                                              ; preds = %155
  store i32 225, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %196

159:                                              ; preds = %155
  %160 = load ptr, ptr %15, align 8, !tbaa !5
  %161 = load i32, ptr %16, align 4, !tbaa !23
  call void @_ZN3qpl2ml11compression14gzip_decorator19write_header_unsafeEPKhj(ptr noundef %160, i32 noundef %161) #3
  %162 = load i32, ptr %24, align 4, !tbaa !23
  %163 = add i32 %162, 10
  store i32 %163, ptr %24, align 4, !tbaa !23
  br label %164

164:                                              ; preds = %159, %126
  %165 = load i32, ptr %13, align 4, !tbaa !23
  %166 = and i32 %165, 524288
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %168, label %179

168:                                              ; preds = %164
  %169 = load i32, ptr %16, align 4, !tbaa !23
  %170 = zext i32 %169 to i64
  %171 = icmp ult i64 %170, 2
  br i1 %171, label %172, label %173

172:                                              ; preds = %168
  store i32 225, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %196

173:                                              ; preds = %168
  %174 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN3qpl2ml11compression14zlib_decorator19write_header_unsafeEPKh(ptr noundef %174) #3
  %175 = load i32, ptr %24, align 4, !tbaa !23
  %176 = zext i32 %175 to i64
  %177 = add i64 %176, 2
  %178 = trunc i64 %177 to i32
  store i32 %178, ptr %24, align 4, !tbaa !23
  br label %179

179:                                              ; preds = %173, %164
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.qpl_job, ptr %180, i32 0, i32 2
  store i32 0, ptr %181, align 4, !tbaa !63
  %182 = load i32, ptr %24, align 4, !tbaa !23
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.qpl_job, ptr %183, i32 0, i32 3
  %185 = load ptr, ptr %184, align 8, !tbaa !26
  %186 = zext i32 %182 to i64
  %187 = getelementptr inbounds i8, ptr %185, i64 %186
  store ptr %187, ptr %184, align 8, !tbaa !26
  %188 = load i32, ptr %24, align 4, !tbaa !23
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.qpl_job, ptr %189, i32 0, i32 4
  %191 = load i32, ptr %190, align 8, !tbaa !27
  %192 = sub i32 %191, %188
  store i32 %192, ptr %190, align 8, !tbaa !27
  %193 = load i32, ptr %24, align 4, !tbaa !23
  %194 = load ptr, ptr %6, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.qpl_job, ptr %194, i32 0, i32 5
  store i32 %193, ptr %195, align 4, !tbaa !64
  store i32 0, ptr %20, align 4
  br label %196

196:                                              ; preds = %179, %172, %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  %197 = load i32, ptr %20, align 4
  switch i32 %197, label %702 [
    i32 0, label %198
  ]

198:                                              ; preds = %196
  br label %229

199:                                              ; preds = %122
  %200 = load ptr, ptr %9, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.qpl_hw_state, ptr %200, i32 0, i32 5
  %202 = getelementptr inbounds %struct.qpl_execution_history, ptr %201, i32 0, i32 1
  %203 = load i32, ptr %202, align 4, !tbaa !54
  %204 = icmp eq i32 %203, 4
  br i1 %204, label %205, label %206

205:                                              ; preds = %199
  store i32 4, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %702

206:                                              ; preds = %199
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.qpl_hw_state, ptr %207, i32 0, i32 5
  %209 = getelementptr inbounds %struct.qpl_execution_history, ptr %208, i32 0, i32 2
  %210 = load i32, ptr %209, align 8, !tbaa !55
  %211 = load i32, ptr %14, align 4, !tbaa !24
  %212 = icmp ne i32 %210, %211
  br i1 %212, label %213, label %214

213:                                              ; preds = %206
  store i32 83, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %702

214:                                              ; preds = %206
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.qpl_hw_state, ptr %215, i32 0, i32 3
  %217 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %216, i64 0, i64 0
  %218 = load ptr, ptr %9, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.qpl_hw_state, ptr %218, i32 0, i32 7
  %220 = load i32, ptr %219, align 4, !tbaa !56
  %221 = load ptr, ptr %9, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.qpl_hw_state, ptr %221, i32 0, i32 8
  %223 = load i32, ptr %222, align 8, !tbaa !39
  %224 = call noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef %217, i32 noundef %220, i32 noundef %223)
  store ptr %224, ptr %12, align 8, !tbaa !5
  %225 = load ptr, ptr %12, align 8, !tbaa !5
  %226 = icmp ne ptr %225, null
  br i1 %226, label %228, label %227

227:                                              ; preds = %214
  store i32 6, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %702

228:                                              ; preds = %214
  br label %229

229:                                              ; preds = %228, %198
  %230 = load ptr, ptr %6, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.qpl_job, ptr %230, i32 0, i32 3
  %232 = load ptr, ptr %231, align 8, !tbaa !26
  %233 = load ptr, ptr %9, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.qpl_hw_state, ptr %233, i32 0, i32 5
  %235 = getelementptr inbounds %struct.qpl_execution_history, ptr %234, i32 0, i32 4
  store ptr %232, ptr %235, align 8, !tbaa !65
  %236 = load i32, ptr %13, align 4, !tbaa !23
  %237 = and i32 %236, 8192
  %238 = icmp ne i32 %237, 0
  br i1 %238, label %239, label %413

239:                                              ; preds = %229
  %240 = load ptr, ptr %9, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.qpl_hw_state, ptr %240, i32 0, i32 5
  %242 = getelementptr inbounds %struct.qpl_execution_history, ptr %241, i32 0, i32 1
  %243 = load i32, ptr %242, align 4, !tbaa !54
  %244 = icmp eq i32 %243, 1
  br i1 %244, label %250, label %245

245:                                              ; preds = %239
  %246 = load i32, ptr %13, align 4, !tbaa !23
  %247 = and i32 %246, 32
  %248 = icmp ne i32 %247, 0
  br i1 %248, label %250, label %249

249:                                              ; preds = %245
  store i32 6, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %702

250:                                              ; preds = %245, %239
  %251 = load i32, ptr %13, align 4, !tbaa !23
  %252 = and i32 %251, 32
  %253 = icmp ne i32 %252, 0
  br i1 %253, label %254, label %255

254:                                              ; preds = %250
  br label %259

255:                                              ; preds = %250
  %256 = load i8, ptr %17, align 1, !tbaa !28, !range !33, !noundef !34
  %257 = trunc i8 %256 to i1
  %258 = zext i1 %257 to i32
  br label %259

259:                                              ; preds = %255, %254
  %260 = phi i32 [ 0, %254 ], [ %258, %255 ]
  %261 = icmp ne i32 %260, 0
  %262 = zext i1 %261 to i8
  store i8 %262, ptr %17, align 1, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #3
  store i8 0, ptr %25, align 1, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #3
  store i8 0, ptr %26, align 1, !tbaa !28
  %263 = load i8, ptr %17, align 1, !tbaa !28, !range !33, !noundef !34
  %264 = trunc i8 %263 to i1
  br i1 %264, label %265, label %276

265:                                              ; preds = %259
  %266 = load ptr, ptr %6, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.qpl_job, ptr %266, i32 0, i32 1
  %268 = load i32, ptr %267, align 8, !tbaa !66
  %269 = icmp ule i32 %268, 4096
  br i1 %269, label %270, label %274

270:                                              ; preds = %265
  %271 = load ptr, ptr %11, align 8, !tbaa !5
  %272 = icmp ne ptr %271, null
  br i1 %272, label %274, label %273

273:                                              ; preds = %270
  store i8 1, ptr %25, align 1, !tbaa !28
  br label %275

274:                                              ; preds = %270, %265
  store i8 1, ptr %26, align 1, !tbaa !28
  br label %275

275:                                              ; preds = %274, %273
  br label %276

276:                                              ; preds = %275, %259
  %277 = load i8, ptr %25, align 1, !tbaa !28, !range !33, !noundef !34
  %278 = trunc i8 %277 to i1
  br i1 %278, label %279, label %306

279:                                              ; preds = %276
  %280 = load ptr, ptr %7, align 8, !tbaa !5
  %281 = load ptr, ptr %6, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.qpl_job, ptr %281, i32 0, i32 0
  %283 = load ptr, ptr %282, align 8, !tbaa !67
  %284 = load ptr, ptr %6, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.qpl_job, ptr %284, i32 0, i32 1
  %286 = load i32, ptr %285, align 8, !tbaa !66
  %287 = load ptr, ptr %6, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.qpl_job, ptr %287, i32 0, i32 3
  %289 = load ptr, ptr %288, align 8, !tbaa !26
  %290 = load ptr, ptr %6, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.qpl_job, ptr %290, i32 0, i32 4
  %292 = load i32, ptr %291, align 8, !tbaa !27
  call void @hw_iaa_descriptor_init_deflate_body(ptr noundef %280, ptr noundef %283, i32 noundef %286, ptr noundef %289, i32 noundef %292)
  %293 = load ptr, ptr %7, align 8, !tbaa !5
  %294 = load ptr, ptr %9, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.qpl_hw_state, ptr %294, i32 0, i32 3
  %296 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %295, i64 0, i64 0
  %297 = load ptr, ptr %9, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.qpl_hw_state, ptr %297, i32 0, i32 7
  %299 = load i32, ptr %298, align 4, !tbaa !56
  %300 = trunc i32 %299 to i8
  %301 = load i32, ptr %13, align 4, !tbaa !23
  %302 = and i32 %301, 2
  %303 = load i32, ptr %13, align 4, !tbaa !23
  %304 = and i32 %303, 1
  call void @hw_iaa_descriptor_set_1_pass_header_gen(ptr noundef %293, ptr noundef %296, i8 noundef zeroext %300, i32 noundef %302, i32 noundef %304)
  %305 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZL47hw_iaa_descriptor_compress_set_termination_ruleP13hw_descriptor19hw_iaa_terminator_t(ptr noundef %305, i32 noundef 1)
  br label %404

306:                                              ; preds = %276
  %307 = load i8, ptr %26, align 1, !tbaa !28, !range !33, !noundef !34
  %308 = trunc i8 %307 to i1
  br i1 %308, label %309, label %360

309:                                              ; preds = %306
  %310 = load ptr, ptr %7, align 8, !tbaa !5
  %311 = load ptr, ptr %6, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.qpl_job, ptr %311, i32 0, i32 0
  %313 = load ptr, ptr %312, align 8, !tbaa !67
  %314 = load ptr, ptr %6, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.qpl_job, ptr %314, i32 0, i32 1
  %316 = load i32, ptr %315, align 8, !tbaa !66
  %317 = load ptr, ptr %9, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.qpl_hw_state, ptr %317, i32 0, i32 3
  %319 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %318, i64 0, i64 0
  %320 = load ptr, ptr %9, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.qpl_hw_state, ptr %320, i32 0, i32 7
  %322 = load i32, ptr %321, align 4, !tbaa !56
  %323 = trunc i32 %322 to i8
  %324 = load i32, ptr %13, align 4, !tbaa !23
  %325 = and i32 %324, 2
  %326 = load i32, ptr %13, align 4, !tbaa !23
  %327 = and i32 %326, 1
  call void @hw_iaa_descriptor_init_statistic_collector_with_header_gen(ptr noundef %310, ptr noundef %313, i32 noundef %316, ptr noundef %319, i8 noundef zeroext %323, i32 noundef %325, i32 noundef %327)
  %328 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZL47hw_iaa_descriptor_compress_set_termination_ruleP13hw_descriptor19hw_iaa_terminator_t(ptr noundef %328, i32 noundef 1)
  %329 = load ptr, ptr %11, align 8, !tbaa !5
  %330 = icmp ne ptr %329, null
  br i1 %330, label %331, label %355

331:                                              ; preds = %309
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #3
  %332 = load ptr, ptr %11, align 8, !tbaa !5
  %333 = call noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %332) #3
  store i32 %333, ptr %27, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  %334 = load ptr, ptr %11, align 8, !tbaa !5
  %335 = call noundef ptr @_ZN3qpl2ml11compression19get_dictionary_dataER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %334) #3
  store ptr %335, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #3
  %336 = load ptr, ptr %11, align 8, !tbaa !5
  %337 = call noundef zeroext i8 @_ZN3qpl2ml11compression24get_load_dictionary_flagER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %336) #3
  store i8 %337, ptr %29, align 1, !tbaa !68
  %338 = load ptr, ptr %7, align 8, !tbaa !5
  %339 = load i32, ptr %27, align 4, !tbaa !23
  %340 = load ptr, ptr %28, align 8, !tbaa !5
  %341 = load ptr, ptr %11, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.qpl_dictionary, ptr %341, i32 0, i32 3
  %343 = load i32, ptr %342, align 8, !tbaa !69
  %344 = load ptr, ptr %9, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.qpl_hw_state, ptr %344, i32 0, i32 3
  %346 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %345, i64 0, i64 0
  %347 = load ptr, ptr %9, align 8, !tbaa !5
  %348 = getelementptr inbounds %struct.qpl_hw_state, ptr %347, i32 0, i32 7
  %349 = load i32, ptr %348, align 4, !tbaa !56
  %350 = load ptr, ptr %9, align 8, !tbaa !5
  %351 = getelementptr inbounds %struct.qpl_hw_state, ptr %350, i32 0, i32 8
  %352 = load i32, ptr %351, align 8, !tbaa !39
  %353 = load i8, ptr %29, align 1, !tbaa !68
  %354 = zext i8 %353 to i32
  call void @hw_iaa_descriptor_compress_setup_dictionary(ptr noundef %338, i32 noundef %339, ptr noundef %340, i32 noundef %343, ptr noundef %346, i32 noundef %349, i32 noundef %352, i32 noundef %354)
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  br label %355

355:                                              ; preds = %331, %309
  %356 = load ptr, ptr %9, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.qpl_hw_state, ptr %356, i32 0, i32 7
  %358 = load i32, ptr %357, align 4, !tbaa !56
  %359 = xor i32 %358, 1
  store i32 %359, ptr %357, align 4, !tbaa !56
  br label %403

360:                                              ; preds = %306
  %361 = load ptr, ptr %7, align 8, !tbaa !5
  %362 = load ptr, ptr %6, align 8, !tbaa !5
  %363 = getelementptr inbounds %struct.qpl_job, ptr %362, i32 0, i32 0
  %364 = load ptr, ptr %363, align 8, !tbaa !67
  %365 = load ptr, ptr %6, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.qpl_job, ptr %365, i32 0, i32 1
  %367 = load i32, ptr %366, align 8, !tbaa !66
  %368 = load ptr, ptr %12, align 8, !tbaa !5
  %369 = getelementptr inbounds %struct.hw_iaa_aecs_compress, ptr %368, i32 0, i32 5
  call void @hw_iaa_descriptor_init_statistic_collector(ptr noundef %361, ptr noundef %364, i32 noundef %367, ptr noundef %369)
  %370 = load i32, ptr %13, align 4, !tbaa !23
  %371 = and i32 %370, 32768
  %372 = icmp ne i32 %371, 0
  br i1 %372, label %373, label %375

373:                                              ; preds = %360
  %374 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZL48hw_iaa_descriptor_compress_set_huffman_only_modeP13hw_descriptor(ptr noundef %374)
  br label %375

375:                                              ; preds = %373, %360
  %376 = load ptr, ptr %11, align 8, !tbaa !5
  %377 = icmp ne ptr %376, null
  br i1 %377, label %378, label %402

378:                                              ; preds = %375
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #3
  %379 = load ptr, ptr %11, align 8, !tbaa !5
  %380 = call noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %379) #3
  store i32 %380, ptr %30, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  %381 = load ptr, ptr %11, align 8, !tbaa !5
  %382 = call noundef ptr @_ZN3qpl2ml11compression19get_dictionary_dataER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %381) #3
  store ptr %382, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #3
  %383 = load ptr, ptr %11, align 8, !tbaa !5
  %384 = call noundef zeroext i8 @_ZN3qpl2ml11compression24get_load_dictionary_flagER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %383) #3
  store i8 %384, ptr %32, align 1, !tbaa !68
  %385 = load ptr, ptr %7, align 8, !tbaa !5
  %386 = load i32, ptr %30, align 4, !tbaa !23
  %387 = load ptr, ptr %31, align 8, !tbaa !5
  %388 = load ptr, ptr %11, align 8, !tbaa !5
  %389 = getelementptr inbounds %struct.qpl_dictionary, ptr %388, i32 0, i32 3
  %390 = load i32, ptr %389, align 8, !tbaa !69
  %391 = load ptr, ptr %9, align 8, !tbaa !5
  %392 = getelementptr inbounds %struct.qpl_hw_state, ptr %391, i32 0, i32 3
  %393 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %392, i64 0, i64 0
  %394 = load ptr, ptr %9, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.qpl_hw_state, ptr %394, i32 0, i32 7
  %396 = load i32, ptr %395, align 4, !tbaa !56
  %397 = load ptr, ptr %9, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.qpl_hw_state, ptr %397, i32 0, i32 8
  %399 = load i32, ptr %398, align 8, !tbaa !39
  %400 = load i8, ptr %32, align 1, !tbaa !68
  %401 = zext i8 %400 to i32
  call void @hw_iaa_descriptor_compress_setup_dictionary(ptr noundef %385, i32 noundef %386, ptr noundef %387, i32 noundef %390, ptr noundef %393, i32 noundef %396, i32 noundef %399, i32 noundef %401)
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #3
  br label %402

402:                                              ; preds = %378, %375
  br label %403

403:                                              ; preds = %402, %355
  br label %404

404:                                              ; preds = %403, %279
  %405 = load ptr, ptr %7, align 8, !tbaa !5
  %406 = load ptr, ptr %6, align 8, !tbaa !5
  %407 = getelementptr inbounds %struct.qpl_job, ptr %406, i32 0, i32 15
  %408 = load i32, ptr %407, align 8, !tbaa !70
  call void @_ZL46hw_iaa_descriptor_compress_set_mini_block_sizeP13hw_descriptor24hw_iaa_mini_block_size_t(ptr noundef %405, i32 noundef %408)
  %409 = load ptr, ptr %7, align 8, !tbaa !5
  %410 = load ptr, ptr %8, align 8, !tbaa !5
  call void @hw_iaa_descriptor_set_completion_record(ptr noundef %409, ptr noundef %410)
  %411 = load ptr, ptr %8, align 8, !tbaa !5
  %412 = getelementptr inbounds %struct.hw_completion_record, ptr %411, i32 0, i32 0
  store i8 0, ptr %412, align 1, !tbaa !71
  store i32 0, ptr %5, align 4
  store i32 1, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #3
  br label %702

413:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #3
  %414 = load i32, ptr %13, align 4, !tbaa !23
  %415 = and i32 %414, 2
  %416 = icmp ne i32 %415, 0
  %417 = zext i1 %416 to i64
  %418 = select i1 %416, i32 1, i32 0
  %419 = icmp ne i32 %418, 0
  %420 = zext i1 %419 to i8
  store i8 %420, ptr %33, align 1, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #3
  %421 = load i32, ptr %13, align 4, !tbaa !23
  %422 = and i32 %421, 32
  %423 = icmp ne i32 %422, 0
  %424 = zext i1 %423 to i8
  store i8 %424, ptr %34, align 1, !tbaa !28
  %425 = load i32, ptr %13, align 4, !tbaa !23
  %426 = and i32 %425, 4096
  %427 = icmp ne i32 %426, 0
  br i1 %427, label %428, label %450

428:                                              ; preds = %413
  %429 = load ptr, ptr %9, align 8, !tbaa !5
  %430 = getelementptr inbounds %struct.qpl_hw_state, ptr %429, i32 0, i32 5
  %431 = getelementptr inbounds %struct.qpl_execution_history, ptr %430, i32 0, i32 1
  %432 = load i32, ptr %431, align 4, !tbaa !54
  %433 = icmp ne i32 %432, 1
  br i1 %433, label %434, label %449

434:                                              ; preds = %428
  %435 = load ptr, ptr %9, align 8, !tbaa !5
  %436 = getelementptr inbounds %struct.qpl_hw_state, ptr %435, i32 0, i32 5
  %437 = getelementptr inbounds %struct.qpl_execution_history, ptr %436, i32 0, i32 1
  %438 = load i32, ptr %437, align 4, !tbaa !54
  %439 = icmp ne i32 %438, 2
  br i1 %439, label %440, label %441

440:                                              ; preds = %434
  store i32 6, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %701

441:                                              ; preds = %434
  %442 = load ptr, ptr %12, align 8, !tbaa !5
  %443 = load ptr, ptr %9, align 8, !tbaa !5
  %444 = getelementptr inbounds %struct.qpl_hw_state, ptr %443, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %35, ptr align 4 %444, i64 4, i1 false), !tbaa.struct !73
  %445 = load i32, ptr %35, align 2
  call void @hw_iaa_aecs_compress_accumulator_insert_eob(ptr noundef %442, i32 %445)
  %446 = load ptr, ptr %9, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct.qpl_hw_state, ptr %446, i32 0, i32 5
  %448 = getelementptr inbounds %struct.qpl_execution_history, ptr %447, i32 0, i32 1
  store i32 1, ptr %448, align 4, !tbaa !54
  br label %449

449:                                              ; preds = %441, %428
  br label %450

450:                                              ; preds = %449, %413
  %451 = load ptr, ptr %9, align 8, !tbaa !5
  %452 = getelementptr inbounds %struct.qpl_hw_state, ptr %451, i32 0, i32 5
  %453 = getelementptr inbounds %struct.qpl_execution_history, ptr %452, i32 0, i32 1
  %454 = load i32, ptr %453, align 4, !tbaa !54
  %455 = icmp eq i32 %454, 1
  br i1 %455, label %456, label %540

456:                                              ; preds = %450
  %457 = load ptr, ptr %6, align 8, !tbaa !5
  %458 = getelementptr inbounds %struct.qpl_job, ptr %457, i32 0, i32 15
  %459 = load i32, ptr %458, align 8, !tbaa !70
  %460 = icmp ne i32 %459, 0
  br i1 %460, label %461, label %466

461:                                              ; preds = %456
  %462 = load i32, ptr %13, align 4, !tbaa !23
  %463 = and i32 %462, 4097
  %464 = icmp eq i32 0, %463
  br i1 %464, label %465, label %466

465:                                              ; preds = %461
  store i32 103, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %701

466:                                              ; preds = %461, %456
  %467 = load ptr, ptr %12, align 8, !tbaa !5
  %468 = getelementptr inbounds %struct.hw_iaa_aecs_compress, ptr %467, i32 0, i32 3
  %469 = load i32, ptr %468, align 4, !tbaa !58
  %470 = load ptr, ptr %9, align 8, !tbaa !5
  %471 = getelementptr inbounds %struct.qpl_hw_state, ptr %470, i32 0, i32 10
  store i32 %469, ptr %471, align 8, !tbaa !75
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #3
  %472 = load ptr, ptr %6, align 8, !tbaa !5
  %473 = getelementptr inbounds %struct.qpl_job, ptr %472, i32 0, i32 13
  %474 = load ptr, ptr %473, align 8, !tbaa !9
  %475 = call noundef ptr @_Z20use_as_huffman_tableILN3qpl2ml11compression23compression_algorithm_eE0EEDaP17qpl_huffman_table(ptr noundef %474)
  store ptr %475, ptr %36, align 8, !tbaa !5
  %476 = load ptr, ptr %10, align 8, !tbaa !5
  %477 = icmp ne ptr %476, null
  br i1 %477, label %478, label %517

478:                                              ; preds = %466
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #3
  %479 = load ptr, ptr %12, align 8, !tbaa !5
  %480 = load ptr, ptr %36, align 8, !tbaa !5
  %481 = call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE22get_deflate_header_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %480) #3
  %482 = load ptr, ptr %36, align 8, !tbaa !5
  %483 = call noundef i32 @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE28get_deflate_header_bits_sizeEv(ptr noundef nonnull align 8 dereferenceable(72) %482) #3
  %484 = load i8, ptr %33, align 1, !tbaa !28, !range !33, !noundef !34
  %485 = trunc i8 %484 to i1
  %486 = zext i1 %485 to i32
  %487 = call i32 @hw_iaa_aecs_compress_write_deflate_dynamic_header(ptr noundef %479, ptr noundef %481, i32 noundef %483, i32 noundef %486)
  store i32 %487, ptr %37, align 4, !tbaa !23
  %488 = load i32, ptr %37, align 4, !tbaa !23
  %489 = icmp ne i32 %488, 0
  br i1 %489, label %490, label %491

490:                                              ; preds = %478
  store i32 6, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %514

491:                                              ; preds = %478
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #3
  %492 = load ptr, ptr %36, align 8, !tbaa !5
  %493 = call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE30get_literals_lengths_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %492) #3
  %494 = getelementptr inbounds i32, ptr %493, i64 256
  %495 = load i32, ptr %494, align 4, !tbaa !23
  store i32 %495, ptr %38, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #3
  %496 = load i32, ptr %38, align 4, !tbaa !23
  %497 = lshr i32 %496, 15
  store i32 %497, ptr %39, align 4, !tbaa !23
  %498 = load i32, ptr %38, align 4, !tbaa !23
  %499 = trunc i32 %498 to i16
  %500 = call noundef zeroext i16 @_Z12reverse_bitsItET_S0_(i16 noundef zeroext %499)
  %501 = zext i16 %500 to i32
  %502 = load i32, ptr %39, align 4, !tbaa !23
  %503 = sub i32 16, %502
  %504 = ashr i32 %501, %503
  %505 = trunc i32 %504 to i16
  %506 = load ptr, ptr %9, align 8, !tbaa !5
  %507 = getelementptr inbounds %struct.qpl_hw_state, ptr %506, i32 0, i32 9
  %508 = getelementptr inbounds %struct.hw_huffman_code, ptr %507, i32 0, i32 0
  store i16 %505, ptr %508, align 4, !tbaa !76
  %509 = load i32, ptr %39, align 4, !tbaa !23
  %510 = trunc i32 %509 to i8
  %511 = load ptr, ptr %9, align 8, !tbaa !5
  %512 = getelementptr inbounds %struct.qpl_hw_state, ptr %511, i32 0, i32 9
  %513 = getelementptr inbounds %struct.hw_huffman_code, ptr %512, i32 0, i32 2
  store i8 %510, ptr %513, align 1, !tbaa !77
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #3
  store i32 0, ptr %20, align 4
  br label %514

514:                                              ; preds = %491, %490
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #3
  %515 = load i32, ptr %20, align 4
  switch i32 %515, label %537 [
    i32 0, label %516
  ]

516:                                              ; preds = %514
  br label %536

517:                                              ; preds = %466
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #3
  %518 = load ptr, ptr %12, align 8, !tbaa !5
  %519 = load i8, ptr %33, align 1, !tbaa !28, !range !33, !noundef !34
  %520 = trunc i8 %519 to i1
  %521 = zext i1 %520 to i32
  %522 = call i32 @hw_iaa_aecs_compress_write_deflate_fixed_header(ptr noundef %518, i32 noundef %521)
  store i32 %522, ptr %40, align 4, !tbaa !23
  %523 = load i32, ptr %40, align 4, !tbaa !23
  %524 = icmp ne i32 %523, 0
  br i1 %524, label %525, label %526

525:                                              ; preds = %517
  store i32 6, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %533

526:                                              ; preds = %517
  %527 = load ptr, ptr %9, align 8, !tbaa !5
  %528 = getelementptr inbounds %struct.qpl_hw_state, ptr %527, i32 0, i32 9
  %529 = getelementptr inbounds %struct.hw_huffman_code, ptr %528, i32 0, i32 0
  store i16 0, ptr %529, align 4, !tbaa !76
  %530 = load ptr, ptr %9, align 8, !tbaa !5
  %531 = getelementptr inbounds %struct.qpl_hw_state, ptr %530, i32 0, i32 9
  %532 = getelementptr inbounds %struct.hw_huffman_code, ptr %531, i32 0, i32 2
  store i8 7, ptr %532, align 1, !tbaa !77
  store i32 0, ptr %20, align 4
  br label %533

533:                                              ; preds = %526, %525
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #3
  %534 = load i32, ptr %20, align 4
  switch i32 %534, label %537 [
    i32 0, label %535
  ]

535:                                              ; preds = %533
  br label %536

536:                                              ; preds = %535, %516
  store i32 0, ptr %20, align 4
  br label %537

537:                                              ; preds = %536, %533, %514
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #3
  %538 = load i32, ptr %20, align 4
  switch i32 %538, label %701 [
    i32 0, label %539
  ]

539:                                              ; preds = %537
  br label %540

540:                                              ; preds = %539, %450
  %541 = load i8, ptr %34, align 1, !tbaa !28, !range !33, !noundef !34
  %542 = trunc i8 %541 to i1
  br i1 %542, label %559, label %543

543:                                              ; preds = %540
  %544 = load ptr, ptr %10, align 8, !tbaa !5
  %545 = icmp ne ptr %544, null
  br i1 %545, label %546, label %556

546:                                              ; preds = %543
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #3
  %547 = load ptr, ptr %6, align 8, !tbaa !5
  %548 = getelementptr inbounds %struct.qpl_job, ptr %547, i32 0, i32 13
  %549 = load ptr, ptr %548, align 8, !tbaa !9
  %550 = call noundef ptr @_Z20use_as_huffman_tableILN3qpl2ml11compression23compression_algorithm_eE0EEDaP17qpl_huffman_table(ptr noundef %549)
  store ptr %550, ptr %41, align 8, !tbaa !5
  %551 = load ptr, ptr %12, align 8, !tbaa !5
  %552 = load ptr, ptr %41, align 8, !tbaa !5
  %553 = call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE30get_literals_lengths_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %552) #3
  %554 = load ptr, ptr %41, align 8, !tbaa !5
  %555 = call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE21get_offsets_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %554) #3
  call void @hw_iaa_aecs_compress_set_deflate_huffman_table(ptr noundef %551, ptr noundef %553, ptr noundef %555)
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #3
  br label %558

556:                                              ; preds = %543
  %557 = load ptr, ptr %12, align 8, !tbaa !5
  call void @hw_iaa_aecs_compress_set_deflate_huffman_table(ptr noundef %557, ptr noundef @fixed_literals_table, ptr noundef @fixed_offsets_table)
  br label %558

558:                                              ; preds = %556, %546
  br label %559

559:                                              ; preds = %558, %540
  %560 = load i8, ptr %34, align 1, !tbaa !28, !range !33, !noundef !34
  %561 = trunc i8 %560 to i1
  br i1 %561, label %562, label %576

562:                                              ; preds = %559
  %563 = load ptr, ptr %10, align 8, !tbaa !5
  %564 = icmp ne ptr %563, null
  br i1 %564, label %565, label %573

565:                                              ; preds = %562
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #3
  %566 = load ptr, ptr %6, align 8, !tbaa !5
  %567 = getelementptr inbounds %struct.qpl_job, ptr %566, i32 0, i32 13
  %568 = load ptr, ptr %567, align 8, !tbaa !9
  %569 = call noundef ptr @_Z20use_as_huffman_tableILN3qpl2ml11compression23compression_algorithm_eE2EEDaP17qpl_huffman_table(ptr noundef %568)
  store ptr %569, ptr %42, align 8, !tbaa !5
  %570 = load ptr, ptr %12, align 8, !tbaa !5
  %571 = load ptr, ptr %42, align 8, !tbaa !5
  %572 = call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE2EE30get_literals_lengths_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %571) #3
  call void @hw_iaa_aecs_compress_set_huffman_only_huffman_table(ptr noundef %570, ptr noundef %572)
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #3
  br label %575

573:                                              ; preds = %562
  %574 = load ptr, ptr %12, align 8, !tbaa !5
  call void @hw_iaa_aecs_compress_set_huffman_only_huffman_table(ptr noundef %574, ptr noundef @fixed_literals_table)
  br label %575

575:                                              ; preds = %573, %565
  br label %576

576:                                              ; preds = %575, %559
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #3
  %577 = load ptr, ptr %6, align 8, !tbaa !5
  %578 = getelementptr inbounds %struct.qpl_job, ptr %577, i32 0, i32 4
  %579 = load i32, ptr %578, align 8, !tbaa !27
  store i32 %579, ptr %43, align 4, !tbaa !23
  %580 = load ptr, ptr %6, align 8, !tbaa !5
  %581 = getelementptr inbounds %struct.qpl_job, ptr %580, i32 0, i32 7
  %582 = load i32, ptr %581, align 4, !tbaa !22
  %583 = and i32 10, %582
  %584 = icmp eq i32 10, %583
  br i1 %584, label %585, label %595

585:                                              ; preds = %576
  %586 = load i32, ptr %43, align 4, !tbaa !23
  %587 = icmp ugt i32 %586, 8
  br i1 %587, label %588, label %591

588:                                              ; preds = %585
  %589 = load i32, ptr %43, align 4, !tbaa !23
  %590 = sub i32 %589, 8
  br label %593

591:                                              ; preds = %585
  %592 = load i32, ptr %43, align 4, !tbaa !23
  br label %593

593:                                              ; preds = %591, %588
  %594 = phi i32 [ %590, %588 ], [ %592, %591 ]
  store i32 %594, ptr %43, align 4, !tbaa !23
  br label %595

595:                                              ; preds = %593, %576
  %596 = load ptr, ptr %7, align 8, !tbaa !5
  %597 = load ptr, ptr %6, align 8, !tbaa !5
  %598 = getelementptr inbounds %struct.qpl_job, ptr %597, i32 0, i32 0
  %599 = load ptr, ptr %598, align 8, !tbaa !67
  %600 = load ptr, ptr %6, align 8, !tbaa !5
  %601 = getelementptr inbounds %struct.qpl_job, ptr %600, i32 0, i32 1
  %602 = load i32, ptr %601, align 8, !tbaa !66
  %603 = load ptr, ptr %6, align 8, !tbaa !5
  %604 = getelementptr inbounds %struct.qpl_job, ptr %603, i32 0, i32 3
  %605 = load ptr, ptr %604, align 8, !tbaa !26
  %606 = load i32, ptr %43, align 4, !tbaa !23
  call void @hw_iaa_descriptor_init_deflate_body(ptr noundef %596, ptr noundef %599, i32 noundef %602, ptr noundef %605, i32 noundef %606)
  %607 = load i32, ptr %13, align 4, !tbaa !23
  %608 = and i32 %607, 16
  %609 = icmp ne i32 %608, 0
  br i1 %609, label %610, label %612

610:                                              ; preds = %595
  %611 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZL45hw_iaa_descriptor_compress_set_be_output_modeP13hw_descriptor(ptr noundef %611)
  br label %612

612:                                              ; preds = %610, %595
  %613 = load i32, ptr %13, align 4, !tbaa !23
  %614 = and i32 %613, 32768
  %615 = icmp ne i32 %614, 0
  br i1 %615, label %616, label %618

616:                                              ; preds = %612
  %617 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZL48hw_iaa_descriptor_compress_set_huffman_only_modeP13hw_descriptor(ptr noundef %617)
  br label %618

618:                                              ; preds = %616, %612
  %619 = load i32, ptr %13, align 4, !tbaa !23
  %620 = and i32 %619, 4
  %621 = icmp ne i32 %620, 0
  br i1 %621, label %622, label %624

622:                                              ; preds = %618
  %623 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZL33hw_iaa_descriptor_set_crc_rfc3720P13hw_descriptor(ptr noundef %623)
  br label %624

624:                                              ; preds = %622, %618
  %625 = load ptr, ptr %7, align 8, !tbaa !5
  %626 = load ptr, ptr %6, align 8, !tbaa !5
  %627 = getelementptr inbounds %struct.qpl_job, ptr %626, i32 0, i32 15
  %628 = load i32, ptr %627, align 8, !tbaa !70
  call void @_ZL46hw_iaa_descriptor_compress_set_mini_block_sizeP13hw_descriptor24hw_iaa_mini_block_size_t(ptr noundef %625, i32 noundef %628)
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #3
  %629 = load i8, ptr %33, align 1, !tbaa !28, !range !33, !noundef !34
  %630 = trunc i8 %629 to i1
  br i1 %630, label %631, label %636

631:                                              ; preds = %624
  %632 = load ptr, ptr %9, align 8, !tbaa !5
  %633 = getelementptr inbounds %struct.qpl_hw_state, ptr %632, i32 0, i32 7
  %634 = load i32, ptr %633, align 4, !tbaa !56
  %635 = or i32 16, %634
  br label %641

636:                                              ; preds = %624
  %637 = load ptr, ptr %9, align 8, !tbaa !5
  %638 = getelementptr inbounds %struct.qpl_hw_state, ptr %637, i32 0, i32 7
  %639 = load i32, ptr %638, align 4, !tbaa !56
  %640 = or i32 272, %639
  br label %641

641:                                              ; preds = %636, %631
  %642 = phi i32 [ %635, %631 ], [ %640, %636 ]
  store i32 %642, ptr %44, align 4, !tbaa !23
  %643 = load ptr, ptr %7, align 8, !tbaa !5
  %644 = load ptr, ptr %9, align 8, !tbaa !5
  %645 = getelementptr inbounds %struct.qpl_hw_state, ptr %644, i32 0, i32 3
  %646 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %645, i64 0, i64 0
  %647 = load i32, ptr %44, align 4, !tbaa !23
  %648 = call noundef zeroext i1 @_ZN3qpl2ml4util38are_iaa_gen_2_min_capabilities_presentEv()
  %649 = xor i1 %648, true
  call void @hw_iaa_descriptor_compress_set_aecs(ptr noundef %643, ptr noundef %646, i32 noundef %647, i1 noundef zeroext %649)
  %650 = load i8, ptr %33, align 1, !tbaa !28, !range !33, !noundef !34
  %651 = trunc i8 %650 to i1
  br i1 %651, label %652, label %669

652:                                              ; preds = %641
  %653 = load i8, ptr %34, align 1, !tbaa !28, !range !33, !noundef !34
  %654 = trunc i8 %653 to i1
  br i1 %654, label %669, label %655

655:                                              ; preds = %652
  %656 = load ptr, ptr %9, align 8, !tbaa !5
  %657 = getelementptr inbounds %struct.qpl_hw_state, ptr %656, i32 0, i32 5
  %658 = getelementptr inbounds %struct.qpl_execution_history, ptr %657, i32 0, i32 1
  %659 = load i32, ptr %658, align 4, !tbaa !54
  %660 = icmp eq i32 1, %659
  %661 = zext i1 %660 to i64
  %662 = select i1 %660, i32 6, i32 14
  %663 = load ptr, ptr %7, align 8, !tbaa !5
  %664 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %663, i32 0, i32 7
  %665 = load i16, ptr %664, align 1, !tbaa !78
  %666 = zext i16 %665 to i32
  %667 = or i32 %666, %662
  %668 = trunc i32 %667 to i16
  store i16 %668, ptr %664, align 1, !tbaa !78
  br label %669

669:                                              ; preds = %655, %652, %641
  %670 = load ptr, ptr %11, align 8, !tbaa !5
  %671 = icmp ne ptr %670, null
  br i1 %671, label %672, label %696

672:                                              ; preds = %669
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #3
  %673 = load ptr, ptr %11, align 8, !tbaa !5
  %674 = call noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %673) #3
  store i32 %674, ptr %45, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #3
  %675 = load ptr, ptr %11, align 8, !tbaa !5
  %676 = call noundef ptr @_ZN3qpl2ml11compression19get_dictionary_dataER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %675) #3
  store ptr %676, ptr %46, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %47) #3
  %677 = load ptr, ptr %11, align 8, !tbaa !5
  %678 = call noundef zeroext i8 @_ZN3qpl2ml11compression24get_load_dictionary_flagER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %677) #3
  store i8 %678, ptr %47, align 1, !tbaa !68
  %679 = load ptr, ptr %7, align 8, !tbaa !5
  %680 = load i32, ptr %45, align 4, !tbaa !23
  %681 = load ptr, ptr %46, align 8, !tbaa !5
  %682 = load ptr, ptr %11, align 8, !tbaa !5
  %683 = getelementptr inbounds %struct.qpl_dictionary, ptr %682, i32 0, i32 3
  %684 = load i32, ptr %683, align 8, !tbaa !69
  %685 = load ptr, ptr %9, align 8, !tbaa !5
  %686 = getelementptr inbounds %struct.qpl_hw_state, ptr %685, i32 0, i32 3
  %687 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %686, i64 0, i64 0
  %688 = load ptr, ptr %9, align 8, !tbaa !5
  %689 = getelementptr inbounds %struct.qpl_hw_state, ptr %688, i32 0, i32 7
  %690 = load i32, ptr %689, align 4, !tbaa !56
  %691 = load ptr, ptr %9, align 8, !tbaa !5
  %692 = getelementptr inbounds %struct.qpl_hw_state, ptr %691, i32 0, i32 8
  %693 = load i32, ptr %692, align 8, !tbaa !39
  %694 = load i8, ptr %47, align 1, !tbaa !68
  %695 = zext i8 %694 to i32
  call void @hw_iaa_descriptor_compress_setup_dictionary(ptr noundef %679, i32 noundef %680, ptr noundef %681, i32 noundef %684, ptr noundef %687, i32 noundef %690, i32 noundef %693, i32 noundef %695)
  call void @llvm.lifetime.end.p0(i64 1, ptr %47) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #3
  br label %696

696:                                              ; preds = %672, %669
  %697 = load ptr, ptr %7, align 8, !tbaa !5
  %698 = load ptr, ptr %8, align 8, !tbaa !5
  call void @hw_iaa_descriptor_set_completion_record(ptr noundef %697, ptr noundef %698)
  %699 = load ptr, ptr %8, align 8, !tbaa !5
  %700 = getelementptr inbounds %struct.hw_completion_record, ptr %699, i32 0, i32 0
  store i8 0, ptr %700, align 1, !tbaa !71
  store i32 0, ptr %5, align 4
  store i32 1, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #3
  br label %701

701:                                              ; preds = %696, %537, %465, %440
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #3
  br label %702

702:                                              ; preds = %701, %404, %249, %227, %213, %205, %196, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  br label %703

703:                                              ; preds = %702, %75
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %704 = load i32, ptr %5, align 4
  ret i32 %704
}

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml11compression14gzip_decorator19write_header_unsafeEPKhj(ptr noundef, i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml11compression14zlib_decorator19write_header_unsafeEPKh(ptr noundef) #2 align 2

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

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

declare void @hw_iaa_descriptor_set_1_pass_header_gen(ptr noundef, ptr noundef, i8 noundef zeroext, i32 noundef, i32 noundef) #5

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

declare void @hw_iaa_descriptor_init_statistic_collector_with_header_gen(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i8 noundef zeroext, i32 noundef, i32 noundef) #5

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

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

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

declare void @hw_iaa_descriptor_init_statistic_collector(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

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

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

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

declare void @hw_iaa_aecs_compress_accumulator_insert_eob(ptr noundef, i32) #5

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

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

declare i32 @hw_iaa_aecs_compress_write_deflate_dynamic_header(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #5

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

; Function Attrs: nounwind
declare noundef i32 @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE28get_deflate_header_bits_sizeEv(ptr noundef nonnull align 8 dereferenceable(72)) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i16 @_Z12reverse_bitsItET_S0_(i16 noundef zeroext) #8

declare i32 @hw_iaa_aecs_compress_write_deflate_fixed_header(ptr noundef, i32 noundef) #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z20use_as_huffman_tableILN3qpl2ml11compression23compression_algorithm_eE2EEDaP17qpl_huffman_table(ptr noundef) #7

declare void @hw_iaa_aecs_compress_set_huffman_only_huffman_table(ptr noundef, ptr noundef) #5

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

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
attributes #4 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { inlinehint 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 64}
!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, !6, i64 72}
!22 = !{!10, !11, i64 36}
!23 = !{!11, !11, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"_ZTS14qpl_comp_style", !7, i64 0}
!26 = !{!10, !6, i64 16}
!27 = !{!10, !11, i64 24}
!28 = !{!29, !29, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"branch_weights", i32 1, i32 1048575}
!31 = !{!32, !32, i64 0}
!32 = !{!"_ZTS21hw_accelerator_status", !7, i64 0}
!33 = !{i8 0, i8 2}
!34 = !{}
!35 = !{!36, !38, i64 1}
!36 = !{!"_ZTS14qpl_dictionary", !37, i64 0, !38, i64 1, !16, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32}
!37 = !{!"_ZTS26software_compression_level", !7, i64 0}
!38 = !{!"_ZTS25hardware_dictionary_level", !7, i64 0}
!39 = !{!40, !11, i64 39656}
!40 = !{!"_ZTS12qpl_hw_state", !41, i64 0, !43, i64 64, !7, i64 128, !7, i64 10880, !44, i64 38592, !45, i64 39624, !11, i64 39648, !11, i64 39652, !11, i64 39656, !47, i64 39660, !11, i64 39664, !48, i64 39672, !11, i64 39704, !11, i64 39708, !29, i64 39712, !29, i64 39713, !50, i64 39716, !51, i64 39720, !52, i64 39728}
!41 = !{!"_ZTS34hw_decompress_analytics_descriptor", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !42, i64 36, !42, i64 38, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60}
!42 = !{!"short", !7, i64 0}
!43 = !{!"_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, !42, i64 30, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !16, i64 48, !16, i64 56}
!44 = !{!"_ZTS10qpl_buffer", !7, i64 0, !11, i64 1024, !11, i64 1028}
!45 = !{!"_ZTS21qpl_execution_history", !29, i64 0, !46, i64 4, !25, i64 8, !11, i64 12, !6, i64 16}
!46 = !{!"_ZTS23qpl_task_execution_step", !7, i64 0}
!47 = !{!"_ZTS15hw_huffman_code", !42, i64 0, !7, i64 2, !7, i64 3}
!48 = !{!"_ZTS22hw_accelerator_context", !49, i64 0, !6, i64 24}
!49 = !{!"_ZTS20hw_device_properties", !11, i64 0, !11, i64 4, !11, i64 8, !29, i64 12, !29, i64 13, !29, i64 14, !29, i64 15, !29, i64 16, !29, i64 17, !29, i64 18, !29, i64 19, !29, i64 20, !29, i64 21, !29, i64 22}
!50 = !{!"_ZTS25hw_multidescriptor_status", !7, i64 0}
!51 = !{!"_ZTS10qpl_status", !7, i64 0}
!52 = !{!"_ZTS20qpl_execution_record", !53, i64 0, !11, i64 8, !11, i64 12}
!53 = !{!"double", !7, i64 0}
!54 = !{!40, !46, i64 39628}
!55 = !{!40, !25, i64 39632}
!56 = !{!40, !11, i64 39652}
!57 = !{!40, !11, i64 39708}
!58 = !{!59, !11, i64 28}
!59 = !{!"_ZTS20hw_iaa_aecs_compress", !11, i64 0, !11, i64 4, !7, i64 8, !11, i64 28, !7, i64 32, !60, i64 288, !7, i64 1568}
!60 = !{!"_ZTS16hw_iaa_histogram", !7, i64 0, !7, i64 1144, !7, i64 1152, !7, i64 1272}
!61 = !{!59, !11, i64 0}
!62 = !{!59, !11, i64 4}
!63 = !{!10, !11, i64 12}
!64 = !{!10, !11, i64 28}
!65 = !{!40, !6, i64 39640}
!66 = !{!10, !11, i64 8}
!67 = !{!10, !6, i64 0}
!68 = !{!7, !7, i64 0}
!69 = !{!36, !11, i64 16}
!70 = !{!10, !15, i64 80}
!71 = !{!72, !7, i64 0}
!72 = !{!"_ZTS20hw_completion_record", !7, i64 0, !7, i64 1, !7, i64 2}
!73 = !{i64 0, i64 2, !74, i64 2, i64 1, !68, i64 3, i64 1, !68}
!74 = !{!42, !42, i64 0}
!75 = !{!40, !11, i64 39664}
!76 = !{!40, !42, i64 39660}
!77 = !{!40, !7, i64 39663}
!78 = !{!41, !42, 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"

@_ZZ40hw_descriptor_compress_init_deflate_baseE10dispatcher = external hidden local_unnamed_addr global ptr, align 8
@_ZGVZ40hw_descriptor_compress_init_deflate_baseE10dispatcher = external hidden global i64, align 8
@fixed_literals_table = external constant [286 x i32], align 16
@fixed_offsets_table = external constant [30 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @hw_descriptor_compress_init_deflate_base(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 64
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 72
  %8 = load ptr, ptr %7, align 8, !tbaa !20
  %9 = getelementptr inbounds i8, ptr %0, i64 36
  %10 = load i32, ptr %9, align 4, !tbaa !21
  %11 = tail call noundef i32 @_ZL25own_get_compression_stylePK7qpl_job(ptr noundef %0)
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !22
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = load i32, ptr %14, align 8, !tbaa !23
  %16 = load atomic i8, ptr @_ZGVZ40hw_descriptor_compress_init_deflate_baseE10dispatcher acquire, align 8
  %17 = icmp eq i8 %16, 0
  br i1 %17, label %18, label %22, !prof !24

18:                                               ; preds = %4
  %19 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ40hw_descriptor_compress_init_deflate_baseE10dispatcher) #7
  %.not = icmp eq i32 %19, 0
  br i1 %.not, label %22, label %20

20:                                               ; preds = %18
  %21 = tail call noundef nonnull align 8 dereferenceable(975232) ptr @_ZN3qpl2ml10dispatcher13hw_dispatcher12get_instanceEv() #7
  store ptr %21, ptr @_ZZ40hw_descriptor_compress_init_deflate_baseE10dispatcher, align 8, !tbaa !25
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ40hw_descriptor_compress_init_deflate_baseE10dispatcher) #7
  br label %22

22:                                               ; preds = %20, %18, %4
  %23 = load ptr, ptr @_ZZ40hw_descriptor_compress_init_deflate_baseE10dispatcher, align 8, !tbaa !25
  %24 = tail call noundef zeroext i1 @_ZNK3qpl2ml10dispatcher13hw_dispatcher13is_hw_supportEv(ptr noundef nonnull align 8 dereferenceable(975232) %23) #7
  %25 = load ptr, ptr @_ZZ40hw_descriptor_compress_init_deflate_baseE10dispatcher, align 8, !tbaa !25
  br i1 %24, label %29, label %26

26:                                               ; preds = %22
  %27 = tail call noundef i32 @_ZNK3qpl2ml10dispatcher13hw_dispatcher18get_hw_init_statusEv(ptr noundef nonnull align 8 dereferenceable(975232) %25) #7
  %28 = tail call noundef i32 @_ZN3qpl2ml4util43convert_hw_accelerator_status_to_qpl_statusEj(i32 noundef %27)
  br label %.thread

29:                                               ; preds = %22
  %30 = tail call noundef nonnull align 8 dereferenceable(9752) ptr @_ZNK3qpl2ml10dispatcher13hw_dispatcher6deviceEm(ptr noundef nonnull align 8 dereferenceable(975232) %25, i64 noundef 0) #7
  %31 = tail call noundef zeroext i1 @_ZNK3qpl2ml10dispatcher9hw_device22get_header_gen_supportEv(ptr noundef nonnull align 8 dereferenceable(9752) %30) #7
  %32 = tail call noundef zeroext i1 @_ZNK3qpl2ml10dispatcher9hw_device25get_dict_compress_supportEv(ptr noundef nonnull align 8 dereferenceable(9752) %30) #7
  %33 = icmp eq ptr %8, null
  br i1 %33, label %45, label %34

34:                                               ; preds = %29
  br i1 %32, label %35, label %.thread

35:                                               ; preds = %34
  %36 = load i32, ptr %9, align 4, !tbaa !21
  %37 = and i32 %36, 3
  %38 = icmp eq i32 %37, 3
  br i1 %38, label %39, label %.thread

39:                                               ; preds = %35
  %40 = getelementptr inbounds i8, ptr %8, i64 1
  %41 = load i8, ptr %40, align 1, !tbaa !26
  %42 = icmp eq i8 %41, -1
  br i1 %42, label %.thread, label %.critedge

.critedge:                                        ; preds = %39
  %43 = tail call noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  %44 = add i32 %43, 1568
  br label %45

45:                                               ; preds = %29, %.critedge
  %.sink = phi i32 [ %44, %.critedge ], [ 1568, %29 ]
  %46 = getelementptr inbounds i8, ptr %3, i64 39656
  store i32 %.sink, ptr %46, align 8, !tbaa !30
  %47 = and i32 %10, 1
  %.not233 = icmp eq i32 %47, 0
  br i1 %.not233, label %75, label %48

48:                                               ; preds = %45
  %49 = and i32 %10, 32
  %.not236 = icmp eq i32 %49, 0
  %50 = select i1 %.not236, i32 1, i32 2
  %51 = getelementptr inbounds i8, ptr %3, i64 39628
  store i32 %50, ptr %51, align 4, !tbaa !47
  %52 = getelementptr inbounds i8, ptr %3, i64 39632
  store i32 %11, ptr %52, align 8, !tbaa !48
  %53 = getelementptr inbounds i8, ptr %3, i64 39652
  store i32 0, ptr %53, align 4, !tbaa !49
  %54 = getelementptr inbounds i8, ptr %3, i64 39708
  store i32 0, ptr %54, align 4, !tbaa !50
  %55 = getelementptr inbounds i8, ptr %3, i64 10880
  %56 = getelementptr inbounds i8, ptr %3, i64 10908
  store i32 0, ptr %56, align 4, !tbaa !51
  store i32 0, ptr %55, align 4, !tbaa !54
  %57 = getelementptr inbounds i8, ptr %3, i64 10884
  store i32 0, ptr %57, align 4, !tbaa !55
  %58 = and i32 %10, 8
  %.not237 = icmp eq i32 %58, 0
  br i1 %.not237, label %62, label %59

59:                                               ; preds = %48
  %60 = icmp ult i32 %15, 10
  br i1 %60, label %.thread, label %61

61:                                               ; preds = %59
  tail call void @_ZN3qpl2ml11compression14gzip_decorator19write_header_unsafeEPKhj(ptr noundef %13, i32 noundef %15) #7
  br label %62

62:                                               ; preds = %61, %48
  %.0224 = phi i32 [ 10, %61 ], [ 0, %48 ]
  %63 = and i32 %10, 524288
  %.not238 = icmp eq i32 %63, 0
  br i1 %.not238, label %67, label %64

64:                                               ; preds = %62
  %65 = icmp ult i32 %15, 2
  br i1 %65, label %.thread, label %66

66:                                               ; preds = %64
  tail call void @_ZN3qpl2ml11compression14zlib_decorator19write_header_unsafeEPKh(ptr noundef %13) #7
  %narrow = add nuw nsw i32 %.0224, 2
  br label %67

67:                                               ; preds = %62, %66
  %.1225 = phi i32 [ %narrow, %66 ], [ %.0224, %62 ]
  %68 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 0, ptr %68, align 4, !tbaa !56
  %69 = load ptr, ptr %12, align 8, !tbaa !22
  %70 = zext nneg i32 %.1225 to i64
  %71 = getelementptr inbounds i8, ptr %69, i64 %70
  store ptr %71, ptr %12, align 8, !tbaa !22
  %72 = load i32, ptr %14, align 8, !tbaa !23
  %73 = sub i32 %72, %.1225
  store i32 %73, ptr %14, align 8, !tbaa !23
  %74 = getelementptr inbounds i8, ptr %0, i64 28
  store i32 %.1225, ptr %74, align 4, !tbaa !57
  br label %87

75:                                               ; preds = %45
  %76 = getelementptr inbounds i8, ptr %3, i64 39628
  %77 = load i32, ptr %76, align 4, !tbaa !47
  %78 = icmp eq i32 %77, 4
  br i1 %78, label %.thread, label %79

79:                                               ; preds = %75
  %80 = getelementptr inbounds i8, ptr %3, i64 39632
  %81 = load i32, ptr %80, align 8, !tbaa !48
  %.not234 = icmp eq i32 %81, %11
  br i1 %.not234, label %82, label %.thread

82:                                               ; preds = %79
  %83 = getelementptr inbounds i8, ptr %3, i64 10880
  %84 = getelementptr inbounds i8, ptr %3, i64 39652
  %85 = load i32, ptr %84, align 4, !tbaa !49
  %86 = tail call noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef nonnull %83, i32 noundef %85, i32 noundef %.sink)
  %.not235 = icmp eq ptr %86, null
  br i1 %.not235, label %.thread, label %._crit_edge

._crit_edge:                                      ; preds = %82
  %.pre = load ptr, ptr %12, align 8, !tbaa !22
  br label %87

87:                                               ; preds = %._crit_edge, %67
  %88 = phi ptr [ %71, %67 ], [ %.pre, %._crit_edge ]
  %.0217 = phi ptr [ %55, %67 ], [ %86, %._crit_edge ]
  %89 = getelementptr inbounds i8, ptr %3, i64 39640
  store ptr %88, ptr %89, align 8, !tbaa !58
  %90 = and i32 %10, 8192
  %.not239 = icmp eq i32 %90, 0
  br i1 %.not239, label %150, label %91

91:                                               ; preds = %87
  %92 = getelementptr inbounds i8, ptr %3, i64 39628
  %93 = load i32, ptr %92, align 4, !tbaa !47
  %94 = icmp ne i32 %93, 1
  %95 = and i32 %10, 32
  %.not255 = icmp eq i32 %95, 0
  %or.cond259 = select i1 %94, i1 %.not255, i1 false
  br i1 %or.cond259, label %.thread, label %96

96:                                               ; preds = %91
  %narrow257 = and i1 %.not255, %31
  br i1 %narrow257, label %97, label %.thread271

97:                                               ; preds = %96
  %98 = getelementptr inbounds i8, ptr %0, i64 8
  %99 = load i32, ptr %98, align 8, !tbaa !59
  %100 = icmp ult i32 %99, 4097
  %or.cond.not = and i1 %33, %100
  %101 = load ptr, ptr %0, align 8, !tbaa !60
  br i1 %or.cond.not, label %102, label %109

102:                                              ; preds = %97
  %103 = load i32, ptr %14, align 8, !tbaa !23
  tail call void @hw_iaa_descriptor_init_deflate_body(ptr noundef %1, ptr noundef %101, i32 noundef %99, ptr noundef %88, i32 noundef %103)
  %104 = getelementptr inbounds i8, ptr %3, i64 10880
  %105 = getelementptr inbounds i8, ptr %3, i64 39652
  %106 = load i32, ptr %105, align 4, !tbaa !49
  %107 = trunc i32 %106 to i8
  %108 = and i32 %10, 2
  tail call void @hw_iaa_descriptor_set_1_pass_header_gen(ptr noundef %1, ptr noundef nonnull %104, i8 noundef zeroext %107, i32 noundef %108, i32 noundef %47)
  tail call void @_ZL47hw_iaa_descriptor_compress_set_termination_ruleP13hw_descriptor19hw_iaa_terminator_t(ptr noundef %1, i32 noundef 1)
  br label %147

109:                                              ; preds = %97
  %110 = getelementptr inbounds i8, ptr %3, i64 10880
  %111 = getelementptr inbounds i8, ptr %3, i64 39652
  %112 = load i32, ptr %111, align 4, !tbaa !49
  %113 = trunc i32 %112 to i8
  %114 = and i32 %10, 2
  tail call void @hw_iaa_descriptor_init_statistic_collector_with_header_gen(ptr noundef %1, ptr noundef %101, i32 noundef %99, ptr noundef nonnull %110, i8 noundef zeroext %113, i32 noundef %114, i32 noundef %47)
  tail call void @_ZL47hw_iaa_descriptor_compress_set_termination_ruleP13hw_descriptor19hw_iaa_terminator_t(ptr noundef %1, i32 noundef 1)
  br i1 %33, label %125, label %115

115:                                              ; preds = %109
  %116 = tail call noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  %117 = tail call noundef ptr @_ZN3qpl2ml11compression19get_dictionary_dataER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  %118 = tail call noundef zeroext i8 @_ZN3qpl2ml11compression24get_load_dictionary_flagER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  %119 = getelementptr inbounds i8, ptr %8, i64 16
  %120 = load i32, ptr %119, align 8, !tbaa !61
  %121 = load i32, ptr %111, align 4, !tbaa !49
  %122 = getelementptr inbounds i8, ptr %3, i64 39656
  %123 = load i32, ptr %122, align 8, !tbaa !30
  %124 = zext i8 %118 to i32
  tail call void @hw_iaa_descriptor_compress_setup_dictionary(ptr noundef %1, i32 noundef %116, ptr noundef %117, i32 noundef %120, ptr noundef nonnull %110, i32 noundef %121, i32 noundef %123, i32 noundef %124)
  br label %125

125:                                              ; preds = %115, %109
  %126 = load i32, ptr %111, align 4, !tbaa !49
  %127 = xor i32 %126, 1
  store i32 %127, ptr %111, align 4, !tbaa !49
  br label %147

.thread271:                                       ; preds = %96
  %128 = load ptr, ptr %0, align 8, !tbaa !60
  %129 = getelementptr inbounds i8, ptr %0, i64 8
  %130 = load i32, ptr %129, align 8, !tbaa !59
  %131 = getelementptr inbounds i8, ptr %.0217, i64 288
  tail call void @hw_iaa_descriptor_init_statistic_collector(ptr noundef %1, ptr noundef %128, i32 noundef %130, ptr noundef nonnull %131)
  %132 = and i32 %10, 32768
  %.not258 = icmp eq i32 %132, 0
  br i1 %.not258, label %134, label %133

133:                                              ; preds = %.thread271
  tail call void @_ZL48hw_iaa_descriptor_compress_set_huffman_only_modeP13hw_descriptor(ptr noundef %1)
  br label %134

134:                                              ; preds = %133, %.thread271
  br i1 %33, label %147, label %135

135:                                              ; preds = %134
  %136 = tail call noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  %137 = tail call noundef ptr @_ZN3qpl2ml11compression19get_dictionary_dataER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  %138 = tail call noundef zeroext i8 @_ZN3qpl2ml11compression24get_load_dictionary_flagER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  %139 = getelementptr inbounds i8, ptr %8, i64 16
  %140 = load i32, ptr %139, align 8, !tbaa !61
  %141 = getelementptr inbounds i8, ptr %3, i64 10880
  %142 = getelementptr inbounds i8, ptr %3, i64 39652
  %143 = load i32, ptr %142, align 4, !tbaa !49
  %144 = getelementptr inbounds i8, ptr %3, i64 39656
  %145 = load i32, ptr %144, align 8, !tbaa !30
  %146 = zext i8 %138 to i32
  tail call void @hw_iaa_descriptor_compress_setup_dictionary(ptr noundef %1, i32 noundef %136, ptr noundef %137, i32 noundef %140, ptr noundef nonnull %141, i32 noundef %143, i32 noundef %145, i32 noundef %146)
  br label %147

147:                                              ; preds = %125, %135, %134, %102
  %148 = getelementptr inbounds i8, ptr %0, i64 80
  %149 = load i32, ptr %148, align 8, !tbaa !62
  tail call void @_ZL46hw_iaa_descriptor_compress_set_mini_block_sizeP13hw_descriptor24hw_iaa_mini_block_size_t(ptr noundef %1, i32 noundef %149)
  tail call void @hw_iaa_descriptor_set_completion_record(ptr noundef %1, ptr noundef %2)
  store i8 0, ptr %2, align 1, !tbaa !63
  br label %.thread

150:                                              ; preds = %87
  %151 = and i32 %10, 2
  %.not248 = icmp eq i32 %151, 0
  %152 = and i32 %10, 32
  %.not240.not = icmp eq i32 %152, 0
  %153 = and i32 %10, 4096
  %.not241 = icmp eq i32 %153, 0
  %.phi.trans.insert = getelementptr inbounds i8, ptr %3, i64 39628
  %.pre287 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !47
  br i1 %.not241, label %158, label %154

154:                                              ; preds = %150
  switch i32 %.pre287, label %.thread [
    i32 1, label %.thread288
    i32 2, label %155
  ]

155:                                              ; preds = %154
  %156 = getelementptr inbounds i8, ptr %3, i64 39660
  %.sroa.0.0.copyload = load i32, ptr %156, align 4
  tail call void @hw_iaa_aecs_compress_accumulator_insert_eob(ptr noundef nonnull %.0217, i32 %.sroa.0.0.copyload)
  store i32 1, ptr %.phi.trans.insert, align 4, !tbaa !47
  br label %.thread288

.thread288:                                       ; preds = %154, %155
  %157 = getelementptr inbounds i8, ptr %3, i64 39628
  br label %161

158:                                              ; preds = %150
  %159 = icmp eq i32 %.pre287, 1
  %160 = getelementptr inbounds i8, ptr %3, i64 39628
  br i1 %159, label %161, label %.thread278

161:                                              ; preds = %.thread288, %158
  %162 = phi ptr [ %157, %.thread288 ], [ %160, %158 ]
  %163 = getelementptr inbounds i8, ptr %0, i64 80
  %164 = load i32, ptr %163, align 8, !tbaa !62
  %.not244 = icmp ne i32 %164, 0
  %165 = and i32 %10, 4097
  %166 = icmp eq i32 %165, 0
  %or.cond262 = select i1 %.not244, i1 %166, i1 false
  br i1 %or.cond262, label %.thread, label %167

167:                                              ; preds = %161
  %168 = getelementptr inbounds i8, ptr %.0217, i64 28
  %169 = load i32, ptr %168, align 4, !tbaa !51
  %170 = getelementptr inbounds i8, ptr %3, i64 39664
  store i32 %169, ptr %170, align 8, !tbaa !65
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = tail call noundef ptr @_Z20use_as_huffman_tableILN3qpl2ml11compression23compression_algorithm_eE0EEDaP17qpl_huffman_table(ptr noundef %171)
  %.not245 = icmp eq ptr %6, null
  br i1 %.not245, label %190, label %173

173:                                              ; preds = %167
  %174 = tail call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE22get_deflate_header_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %172) #7
  %175 = tail call noundef i32 @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE28get_deflate_header_bits_sizeEv(ptr noundef nonnull align 8 dereferenceable(72) %172) #7
  %.lobit247 = lshr exact i32 %151, 1
  %176 = tail call i32 @hw_iaa_aecs_compress_write_deflate_dynamic_header(ptr noundef nonnull %.0217, ptr noundef %174, i32 noundef %175, i32 noundef %.lobit247)
  %.not249 = icmp eq i32 %176, 0
  br i1 %.not249, label %.thread273, label %.thread

.thread273:                                       ; preds = %173
  %177 = tail call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE30get_literals_lengths_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %172) #7
  %178 = getelementptr inbounds i8, ptr %177, i64 1024
  %179 = load i32, ptr %178, align 4, !tbaa !66
  %180 = lshr i32 %179, 15
  %181 = trunc i32 %179 to i16
  %182 = tail call noundef zeroext i16 @_Z12reverse_bitsItET_S0_(i16 noundef zeroext %181)
  %183 = zext i16 %182 to i32
  %184 = sub nsw i32 16, %180
  %185 = lshr i32 %183, %184
  %186 = trunc nuw i32 %185 to i16
  %187 = getelementptr inbounds i8, ptr %3, i64 39660
  store i16 %186, ptr %187, align 4, !tbaa !67
  %188 = trunc i32 %180 to i8
  %189 = getelementptr inbounds i8, ptr %3, i64 39663
  store i8 %188, ptr %189, align 1, !tbaa !68
  br label %.thread278

190:                                              ; preds = %167
  %.lobit = lshr exact i32 %151, 1
  %191 = tail call i32 @hw_iaa_aecs_compress_write_deflate_fixed_header(ptr noundef nonnull %.0217, i32 noundef %.lobit)
  %.not246 = icmp eq i32 %191, 0
  br i1 %.not246, label %.thread278.thread, label %.thread

.thread278:                                       ; preds = %.thread273, %158
  %192 = phi ptr [ %162, %.thread273 ], [ %160, %158 ]
  %.not250 = icmp eq ptr %6, null
  br i1 %.not240.not, label %195, label %.critedge264

.thread278.thread:                                ; preds = %190
  %193 = getelementptr inbounds i8, ptr %3, i64 39660
  store i16 0, ptr %193, align 4, !tbaa !67
  %194 = getelementptr inbounds i8, ptr %3, i64 39663
  store i8 7, ptr %194, align 1, !tbaa !68
  br i1 %.not240.not, label %.thread281, label %.critedge264.thread

195:                                              ; preds = %.thread278
  br i1 %.not250, label %.thread281, label %196

196:                                              ; preds = %195
  %197 = load ptr, ptr %5, align 8, !tbaa !5
  %198 = tail call noundef ptr @_Z20use_as_huffman_tableILN3qpl2ml11compression23compression_algorithm_eE0EEDaP17qpl_huffman_table(ptr noundef %197)
  %199 = tail call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE30get_literals_lengths_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %198) #7
  %200 = tail call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE21get_offsets_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %198) #7
  tail call void @hw_iaa_aecs_compress_set_deflate_huffman_table(ptr noundef nonnull %.0217, ptr noundef %199, ptr noundef %200)
  br label %207

.thread281:                                       ; preds = %.thread278.thread, %195
  %201 = phi ptr [ %162, %.thread278.thread ], [ %192, %195 ]
  tail call void @hw_iaa_aecs_compress_set_deflate_huffman_table(ptr noundef nonnull %.0217, ptr noundef nonnull @fixed_literals_table, ptr noundef nonnull @fixed_offsets_table)
  br label %207

.critedge264:                                     ; preds = %.thread278
  br i1 %.not250, label %.critedge264.thread, label %202

202:                                              ; preds = %.critedge264
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = tail call noundef ptr @_Z20use_as_huffman_tableILN3qpl2ml11compression23compression_algorithm_eE2EEDaP17qpl_huffman_table(ptr noundef %203)
  %205 = tail call noundef ptr @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE2EE30get_literals_lengths_table_ptrEv(ptr noundef nonnull align 8 dereferenceable(72) %204) #7
  tail call void @hw_iaa_aecs_compress_set_huffman_only_huffman_table(ptr noundef nonnull %.0217, ptr noundef %205)
  br label %207

.critedge264.thread:                              ; preds = %.thread278.thread, %.critedge264
  %206 = phi ptr [ %162, %.thread278.thread ], [ %192, %.critedge264 ]
  tail call void @hw_iaa_aecs_compress_set_huffman_only_huffman_table(ptr noundef nonnull %.0217, ptr noundef nonnull @fixed_literals_table)
  br label %207

207:                                              ; preds = %.thread281, %196, %202, %.critedge264.thread
  %208 = phi ptr [ %201, %.thread281 ], [ %192, %196 ], [ %192, %202 ], [ %206, %.critedge264.thread ]
  %209 = load i32, ptr %14, align 8, !tbaa !23
  %210 = load i32, ptr %9, align 4, !tbaa !21
  %211 = and i32 %210, 10
  %212 = icmp eq i32 %211, 10
  %213 = icmp ugt i32 %209, 8
  %214 = add i32 %209, -8
  %215 = and i1 %213, %212
  %.0218 = select i1 %215, i32 %214, i32 %209
  %216 = load ptr, ptr %0, align 8, !tbaa !60
  %217 = getelementptr inbounds i8, ptr %0, i64 8
  %218 = load i32, ptr %217, align 8, !tbaa !59
  %219 = load ptr, ptr %12, align 8, !tbaa !22
  tail call void @hw_iaa_descriptor_init_deflate_body(ptr noundef %1, ptr noundef %216, i32 noundef %218, ptr noundef %219, i32 noundef %.0218)
  %220 = and i32 %10, 16
  %.not252 = icmp eq i32 %220, 0
  br i1 %.not252, label %222, label %221

221:                                              ; preds = %207
  tail call void @_ZL45hw_iaa_descriptor_compress_set_be_output_modeP13hw_descriptor(ptr noundef %1)
  br label %222

222:                                              ; preds = %221, %207
  %223 = and i32 %10, 32768
  %.not253 = icmp eq i32 %223, 0
  br i1 %.not253, label %225, label %224

224:                                              ; preds = %222
  tail call void @_ZL48hw_iaa_descriptor_compress_set_huffman_only_modeP13hw_descriptor(ptr noundef %1)
  br label %225

225:                                              ; preds = %224, %222
  %226 = and i32 %10, 4
  %.not254 = icmp eq i32 %226, 0
  br i1 %.not254, label %228, label %227

227:                                              ; preds = %225
  tail call void @_ZL33hw_iaa_descriptor_set_crc_rfc3720P13hw_descriptor(ptr noundef %1)
  br label %228

228:                                              ; preds = %227, %225
  %229 = getelementptr inbounds i8, ptr %0, i64 80
  %230 = load i32, ptr %229, align 8, !tbaa !62
  tail call void @_ZL46hw_iaa_descriptor_compress_set_mini_block_sizeP13hw_descriptor24hw_iaa_mini_block_size_t(ptr noundef %1, i32 noundef %230)
  %231 = getelementptr inbounds i8, ptr %3, i64 39652
  %232 = load i32, ptr %231, align 4, !tbaa !49
  %. = select i1 %.not248, i32 272, i32 16
  %233 = or i32 %232, %.
  %234 = getelementptr inbounds i8, ptr %3, i64 10880
  %235 = tail call noundef zeroext i1 @_ZN3qpl2ml4util38are_iaa_gen_2_min_capabilities_presentEv()
  %236 = xor i1 %235, true
  tail call void @hw_iaa_descriptor_compress_set_aecs(ptr noundef %1, ptr noundef nonnull %234, i32 noundef %233, i1 noundef zeroext %236)
  %237 = and i32 %10, 34
  %brmerge.not = icmp eq i32 %237, 2
  br i1 %brmerge.not, label %238, label %245

238:                                              ; preds = %228
  %239 = load i32, ptr %208, align 4, !tbaa !47
  %240 = icmp eq i32 %239, 1
  %241 = select i1 %240, i16 6, i16 14
  %242 = getelementptr inbounds i8, ptr %1, i64 38
  %243 = load i16, ptr %242, align 1, !tbaa !69
  %244 = or i16 %241, %243
  store i16 %244, ptr %242, align 1, !tbaa !69
  br label %245

245:                                              ; preds = %228, %238
  br i1 %33, label %257, label %246

246:                                              ; preds = %245
  %247 = tail call noundef i32 @_ZN3qpl2ml11compression27get_dictionary_size_in_aecsER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  %248 = tail call noundef ptr @_ZN3qpl2ml11compression19get_dictionary_dataER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  %249 = tail call noundef zeroext i8 @_ZN3qpl2ml11compression24get_load_dictionary_flagER14qpl_dictionary(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  %250 = getelementptr inbounds i8, ptr %8, i64 16
  %251 = load i32, ptr %250, align 8, !tbaa !61
  %252 = getelementptr inbounds i8, ptr %3, i64 39652
  %253 = load i32, ptr %252, align 4, !tbaa !49
  %254 = getelementptr inbounds i8, ptr %3, i64 39656
  %255 = load i32, ptr %254, align 8, !tbaa !30
  %256 = zext i8 %249 to i32
  tail call void @hw_iaa_descriptor_compress_setup_dictionary(ptr noundef %1, i32 noundef %247, ptr noundef %248, i32 noundef %251, ptr noundef nonnull %234, i32 noundef %253, i32 noundef %255, i32 noundef %256)
  br label %257

257:                                              ; preds = %246, %245
  tail call void @hw_iaa_descriptor_set_completion_record(ptr noundef %1, ptr noundef %2)
  store i8 0, ptr %2, align 1, !tbaa !63
  br label %.thread

.thread:                                          ; preds = %64, %59, %173, %190, %147, %34, %35, %39, %75, %79, %82, %91, %161, %154, %257, %26
  %.10 = phi i32 [ %28, %26 ], [ 0, %147 ], [ 52, %34 ], [ 52, %35 ], [ 52, %39 ], [ 4, %75 ], [ 83, %79 ], [ 6, %82 ], [ 6, %91 ], [ 0, %257 ], [ 6, %154 ], [ 103, %161 ], [ 6, %173 ], [ 6, %190 ], [ 225, %59 ], [ 225, %64 ]
  ret i32 %.10
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL25own_get_compression_stylePK7qpl_job(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

; 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 #3

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml11compression14zlib_decorator19write_header_unsafeEPKh(ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef, i32 noundef, i32 noundef) 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 #4

declare void @hw_iaa_descriptor_set_1_pass_header_gen(ptr noundef, ptr noundef, i8 noundef zeroext, i32 noundef, i32 noundef) local_unnamed_addr #4

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

declare void @hw_iaa_descriptor_init_statistic_collector_with_header_gen(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i8 noundef zeroext, i32 noundef, i32 noundef) local_unnamed_addr #4

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

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

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 #4

declare void @hw_iaa_descriptor_init_statistic_collector(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

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

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

declare void @hw_iaa_aecs_compress_accumulator_insert_eob(ptr noundef, i32) local_unnamed_addr #4

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

declare i32 @hw_iaa_aecs_compress_write_deflate_dynamic_header(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: nounwind
declare noundef i32 @_ZNK3qpl2ml11compression15huffman_table_tILNS1_23compression_algorithm_eE0EE28get_deflate_header_bits_sizeEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #3

; 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 #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i16 @_Z12reverse_bitsItET_S0_(i16 noundef zeroext) local_unnamed_addr #6

declare i32 @hw_iaa_aecs_compress_write_deflate_fixed_header(ptr noundef, i32 noundef) local_unnamed_addr #4

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

; 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 #3

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

declare void @hw_iaa_aecs_compress_set_huffman_only_huffman_table(ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

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

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

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

attributes #0 = { 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 #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 = { nofree nounwind }
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 = { "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 = { inlinehint 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 #7 = { 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 64}
!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, !7, i64 72}
!21 = !{!6, !10, i64 36}
!22 = !{!6, !7, i64 16}
!23 = !{!6, !10, i64 24}
!24 = !{!"branch_weights", i32 1, i32 1048575}
!25 = !{!7, !7, i64 0}
!26 = !{!27, !29, i64 1}
!27 = !{!"_ZTS14qpl_dictionary", !28, i64 0, !29, i64 1, !15, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!28 = !{!"_ZTS26software_compression_level", !8, i64 0}
!29 = !{!"_ZTS25hardware_dictionary_level", !8, i64 0}
!30 = !{!31, !10, i64 39656}
!31 = !{!"_ZTS12qpl_hw_state", !32, i64 0, !34, i64 64, !8, i64 128, !8, i64 10880, !35, i64 38592, !36, i64 39624, !10, i64 39648, !10, i64 39652, !10, i64 39656, !40, i64 39660, !10, i64 39664, !41, i64 39672, !10, i64 39704, !10, i64 39708, !37, i64 39712, !37, i64 39713, !43, i64 39716, !44, i64 39720, !45, i64 39728}
!32 = !{!"_ZTS34hw_decompress_analytics_descriptor", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !33, i64 36, !33, i64 38, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60}
!33 = !{!"short", !8, i64 0}
!34 = !{!"_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, !33, i64 30, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !15, i64 48, !15, i64 56}
!35 = !{!"_ZTS10qpl_buffer", !8, i64 0, !10, i64 1024, !10, i64 1028}
!36 = !{!"_ZTS21qpl_execution_history", !37, i64 0, !38, i64 4, !39, i64 8, !10, i64 12, !7, i64 16}
!37 = !{!"bool", !8, i64 0}
!38 = !{!"_ZTS23qpl_task_execution_step", !8, i64 0}
!39 = !{!"_ZTS14qpl_comp_style", !8, i64 0}
!40 = !{!"_ZTS15hw_huffman_code", !33, i64 0, !8, i64 2, !8, i64 3}
!41 = !{!"_ZTS22hw_accelerator_context", !42, i64 0, !7, i64 24}
!42 = !{!"_ZTS20hw_device_properties", !10, i64 0, !10, i64 4, !10, i64 8, !37, i64 12, !37, i64 13, !37, i64 14, !37, i64 15, !37, i64 16, !37, i64 17, !37, i64 18, !37, i64 19, !37, i64 20, !37, i64 21, !37, i64 22}
!43 = !{!"_ZTS25hw_multidescriptor_status", !8, i64 0}
!44 = !{!"_ZTS10qpl_status", !8, i64 0}
!45 = !{!"_ZTS20qpl_execution_record", !46, i64 0, !10, i64 8, !10, i64 12}
!46 = !{!"double", !8, i64 0}
!47 = !{!31, !38, i64 39628}
!48 = !{!31, !39, i64 39632}
!49 = !{!31, !10, i64 39652}
!50 = !{!31, !10, i64 39708}
!51 = !{!52, !10, i64 28}
!52 = !{!"_ZTS20hw_iaa_aecs_compress", !10, i64 0, !10, i64 4, !8, i64 8, !10, i64 28, !8, i64 32, !53, i64 288, !8, i64 1568}
!53 = !{!"_ZTS16hw_iaa_histogram", !8, i64 0, !8, i64 1144, !8, i64 1152, !8, i64 1272}
!54 = !{!52, !10, i64 0}
!55 = !{!52, !10, i64 4}
!56 = !{!6, !10, i64 12}
!57 = !{!6, !10, i64 28}
!58 = !{!31, !7, i64 39640}
!59 = !{!6, !10, i64 8}
!60 = !{!6, !7, i64 0}
!61 = !{!27, !10, i64 16}
!62 = !{!6, !14, i64 80}
!63 = !{!64, !8, i64 0}
!64 = !{!"_ZTS20hw_completion_record", !8, i64 0, !8, i64 1, !8, i64 2}
!65 = !{!31, !10, i64 39664}
!66 = !{!10, !10, i64 0}
!67 = !{!31, !33, i64 39660}
!68 = !{!31, !8, i64 39663}
!69 = !{!32, !33, i64 38}


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