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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.qpl_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.0, %struct.anon.2, 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.0 = type { %struct.anon.1 }
%struct.anon.1 = type { [2 x i32], [144 x i8], [5 x i32] }
%struct.anon.2 = type { i16 }
%struct.hw_iaa_aecs_compress = type { i32, i32, [5 x i32], i32, [256 x i8], %struct.hw_iaa_histogram, [12288 x i8] }
%struct.hw_iaa_histogram = type { [286 x i32], [2 x i32], [30 x i32], [2 x i32] }
%struct.qpl_buffer = type { [1024 x i8], i32, i32 }
%struct.qpl_execution_history = type { i8, i32, i32, i32, ptr }
%struct.hw_huffman_code = type { i16, i8, i8 }
%struct.hw_accelerator_context = type { %struct.hw_device_properties, ptr }
%struct.hw_device_properties = type { i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
%struct.qpl_execution_record = type { double, i32, i32 }
%struct.qpl_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 }

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL44hw_iaa_aecs_decompress_state_set_aecs_formatP22hw_iaa_aecs_decompressb(ptr noundef, i1 noundef zeroext) #1

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @hw_submit_verify_job(ptr noundef %0) #2 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = call noundef ptr @_ZN3qpl3jobL9get_stateEPK7qpl_job(ptr noundef %19) #4
  store ptr %20, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.qpl_hw_state, ptr %21, i32 0, i32 0
  store ptr %22, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.qpl_hw_state, ptr %23, i32 0, i32 1
  store ptr %24, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.qpl_hw_state, ptr %25, i32 0, i32 2
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.qpl_hw_state, ptr %27, i32 0, i32 13
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %30 = zext i32 %29 to i64
  %31 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_analytic], ptr %26, i64 0, i64 %30
  %32 = getelementptr inbounds %struct.hw_iaa_aecs_analytic, ptr %31, i32 0, i32 2
  store ptr %32, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.qpl_hw_state, ptr %33, i32 0, i32 3
  %35 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %34, i64 0, i64 0
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.qpl_hw_state, ptr %36, i32 0, i32 7
  %38 = load i32, ptr %37, align 4, !tbaa !28
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.qpl_hw_state, ptr %39, i32 0, i32 8
  %41 = load i32, ptr %40, align 8, !tbaa !29
  %42 = call noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef %35, i32 noundef %38, i32 noundef %41)
  store ptr %42, ptr %8, align 8, !tbaa !5
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %46, label %45

45:                                               ; preds = %1
  store i32 6, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %360

46:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.qpl_job, ptr %47, i32 0, i32 7
  %49 = load i32, ptr %48, align 4, !tbaa !30
  %50 = and i32 1, %49
  %51 = icmp ne i32 %50, 0
  %52 = zext i1 %51 to i8
  store i8 %52, ptr %10, align 1, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.qpl_job, ptr %53, i32 0, i32 7
  %55 = load i32, ptr %54, align 4, !tbaa !30
  %56 = and i32 2, %55
  %57 = icmp ne i32 %56, 0
  %58 = zext i1 %57 to i8
  store i8 %58, ptr %11, align 1, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #4
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.qpl_job, ptr %59, i32 0, i32 7
  %61 = load i32, ptr %60, align 4, !tbaa !30
  %62 = and i32 32, %61
  %63 = icmp ne i32 %62, 0
  %64 = zext i1 %63 to i8
  store i8 %64, ptr %12, align 1, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.qpl_job, ptr %65, i32 0, i32 15
  %67 = load i32, ptr %66, align 8, !tbaa !41
  %68 = icmp ne i32 %67, 0
  %69 = zext i1 %68 to i8
  store i8 %69, ptr %13, align 1, !tbaa !40
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.qpl_hw_state, ptr %70, i32 0, i32 5
  %72 = getelementptr inbounds %struct.qpl_execution_history, ptr %71, i32 0, i32 4
  %73 = load ptr, ptr %72, align 8, !tbaa !42
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %74, i32 0, i32 3
  store ptr %73, ptr %75, align 1, !tbaa !43
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.qpl_job, ptr %76, i32 0, i32 3
  %78 = load ptr, ptr %77, align 8, !tbaa !44
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.qpl_hw_state, ptr %79, i32 0, i32 5
  %81 = getelementptr inbounds %struct.qpl_execution_history, ptr %80, i32 0, i32 4
  %82 = load ptr, ptr %81, align 8, !tbaa !42
  %83 = ptrtoint ptr %78 to i64
  %84 = ptrtoint ptr %82 to i64
  %85 = sub i64 %83, %84
  %86 = trunc i64 %85 to i32
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %87, i32 0, i32 5
  store i32 %86, ptr %88, align 1, !tbaa !45
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %89, i32 0, i32 8
  store ptr null, ptr %90, align 1, !tbaa !46
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %91, i32 0, i32 10
  store i32 0, ptr %92, align 1, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 1107296256, ptr %14, align 4, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.qpl_job, ptr %93, i32 0, i32 15
  %95 = load i32, ptr %94, align 8, !tbaa !41
  %96 = and i32 %95, 7
  %97 = shl i32 %96, 10
  %98 = or i32 533, %97
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.qpl_job, ptr %99, i32 0, i32 7
  %101 = load i32, ptr %100, align 4, !tbaa !30
  %102 = and i32 16, %101
  %103 = icmp ne i32 %102, 0
  %104 = zext i1 %103 to i64
  %105 = select i1 %103, i32 32, i32 0
  %106 = or i32 %98, %105
  store i32 %106, ptr %15, align 4, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #4
  %107 = call noundef zeroext i1 @_ZN3qpl2ml4util38are_iaa_gen_2_min_capabilities_presentEv()
  %108 = zext i1 %107 to i8
  store i8 %108, ptr %16, align 1, !tbaa !40
  %109 = load i8, ptr %10, align 1, !tbaa !40, !range !49, !noundef !50
  %110 = trunc i8 %109 to i1
  br i1 %110, label %111, label %172

111:                                              ; preds = %46
  %112 = load i8, ptr %13, align 1, !tbaa !40, !range !49, !noundef !50
  %113 = trunc i8 %112 to i1
  br i1 %113, label %114, label %149

114:                                              ; preds = %111
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.qpl_job, ptr %115, i32 0, i32 7
  %117 = load i32, ptr %116, align 4, !tbaa !30
  %118 = and i32 8, %117
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %142

120:                                              ; preds = %114
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.qpl_job, ptr %121, i32 0, i32 16
  %123 = load ptr, ptr %122, align 8, !tbaa !51
  store i64 80, ptr %123, align 8, !tbaa !52
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.hw_iaa_aecs_decompress, ptr %124, i32 0, i32 15
  store i16 1, ptr %125, align 4, !tbaa !53
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.qpl_job, ptr %126, i32 0, i32 16
  %128 = load ptr, ptr %127, align 8, !tbaa !51
  %129 = load i64, ptr %128, align 8, !tbaa !52
  %130 = trunc i64 %129 to i32
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.hw_iaa_aecs_decompress, ptr %131, i32 0, i32 2
  store i32 %130, ptr %132, align 4, !tbaa !56
  %133 = load i32, ptr %14, align 4, !tbaa !48
  %134 = or i32 %133, 65536
  store i32 %134, ptr %14, align 4, !tbaa !48
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.qpl_hw_state, ptr %135, i32 0, i32 2
  %137 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_analytic], ptr %136, i64 0, i64 0
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %138, i32 0, i32 8
  store ptr %137, ptr %139, align 1, !tbaa !46
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %140, i32 0, i32 10
  store i32 5376, ptr %141, align 1, !tbaa !47
  br label %146

142:                                              ; preds = %114
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.qpl_job, ptr %143, i32 0, i32 16
  %145 = load ptr, ptr %144, align 8, !tbaa !51
  store i64 0, ptr %145, align 8, !tbaa !52
  br label %146

146:                                              ; preds = %142, %120
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.qpl_job, ptr %147, i32 0, i32 18
  store i32 1, ptr %148, align 4, !tbaa !57
  br label %149

149:                                              ; preds = %146, %111
  %150 = load i8, ptr %12, align 1, !tbaa !40, !range !49, !noundef !50
  %151 = trunc i8 %150 to i1
  br i1 %151, label %152, label %171

152:                                              ; preds = %149
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.hw_iaa_aecs_compress, ptr %154, i32 0, i32 5
  %156 = load i8, ptr %16, align 1, !tbaa !40, !range !49, !noundef !50
  %157 = trunc i8 %156 to i1
  %158 = call i32 @hw_iaa_aecs_decompress_set_huffman_only_huffman_table_from_histogram(ptr noundef %153, ptr noundef %155, i1 noundef zeroext %157)
  %159 = icmp ne i32 %158, 0
  br i1 %159, label %160, label %161

160:                                              ; preds = %152
  store i32 81, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %359

161:                                              ; preds = %152
  %162 = load i32, ptr %14, align 4, !tbaa !48
  %163 = or i32 %162, 65536
  store i32 %163, ptr %14, align 4, !tbaa !48
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.qpl_hw_state, ptr %164, i32 0, i32 2
  %166 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_analytic], ptr %165, i64 0, i64 0
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %167, i32 0, i32 8
  store ptr %166, ptr %168, align 1, !tbaa !46
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %169, i32 0, i32 10
  store i32 5376, ptr %170, align 1, !tbaa !47
  br label %171

171:                                              ; preds = %161, %149
  br label %182

172:                                              ; preds = %46
  %173 = load i32, ptr %14, align 4, !tbaa !48
  %174 = or i32 %173, 65536
  store i32 %174, ptr %14, align 4, !tbaa !48
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.qpl_hw_state, ptr %175, i32 0, i32 2
  %177 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_analytic], ptr %176, i64 0, i64 0
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %178, i32 0, i32 8
  store ptr %177, ptr %179, align 1, !tbaa !46
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %180, i32 0, i32 10
  store i32 5376, ptr %181, align 1, !tbaa !47
  br label %182

182:                                              ; preds = %172, %171
  %183 = load i8, ptr %11, align 1, !tbaa !40, !range !49, !noundef !50
  %184 = trunc i8 %183 to i1
  br i1 %184, label %185, label %195

185:                                              ; preds = %182
  %186 = load i8, ptr %12, align 1, !tbaa !40, !range !49, !noundef !50
  %187 = trunc i8 %186 to i1
  %188 = xor i1 %187, true
  %189 = zext i1 %188 to i64
  %190 = select i1 %188, i32 28, i32 0
  %191 = load i32, ptr %15, align 4, !tbaa !48
  %192 = or i32 %191, %190
  store i32 %192, ptr %15, align 4, !tbaa !48
  %193 = load i32, ptr %15, align 4, !tbaa !48
  %194 = or i32 %193, 2
  store i32 %194, ptr %15, align 4, !tbaa !48
  br label %205

195:                                              ; preds = %182
  %196 = load i32, ptr %14, align 4, !tbaa !48
  %197 = or i32 %196, 262144
  store i32 %197, ptr %14, align 4, !tbaa !48
  %198 = load ptr, ptr %4, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.qpl_hw_state, ptr %198, i32 0, i32 2
  %200 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_analytic], ptr %199, i64 0, i64 0
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %201, i32 0, i32 8
  store ptr %200, ptr %202, align 1, !tbaa !46
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %203, i32 0, i32 10
  store i32 5376, ptr %204, align 1, !tbaa !47
  br label %205

205:                                              ; preds = %195, %185
  %206 = load i8, ptr %13, align 1, !tbaa !40, !range !49, !noundef !50
  %207 = trunc i8 %206 to i1
  br i1 %207, label %208, label %240

208:                                              ; preds = %205
  %209 = load ptr, ptr %3, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.qpl_job, ptr %209, i32 0, i32 17
  %211 = load i32, ptr %210, align 8, !tbaa !58
  %212 = load ptr, ptr %3, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.qpl_job, ptr %212, i32 0, i32 18
  %214 = load i32, ptr %213, align 4, !tbaa !57
  %215 = icmp ult i32 %211, %214
  br i1 %215, label %216, label %217

216:                                              ; preds = %208
  store i32 102, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %359

217:                                              ; preds = %208
  %218 = load ptr, ptr %3, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.qpl_job, ptr %218, i32 0, i32 16
  %220 = load ptr, ptr %219, align 8, !tbaa !51
  %221 = load ptr, ptr %3, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.qpl_job, ptr %221, i32 0, i32 18
  %223 = load i32, ptr %222, align 4, !tbaa !57
  %224 = zext i32 %223 to i64
  %225 = getelementptr inbounds i64, ptr %220, i64 %224
  %226 = load ptr, ptr %5, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %226, i32 0, i32 4
  store ptr %225, ptr %227, align 1, !tbaa !59
  %228 = load ptr, ptr %3, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.qpl_job, ptr %228, i32 0, i32 17
  %230 = load i32, ptr %229, align 8, !tbaa !58
  %231 = load ptr, ptr %3, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.qpl_job, ptr %231, i32 0, i32 18
  %233 = load i32, ptr %232, align 4, !tbaa !57
  %234 = sub i32 %230, %233
  %235 = zext i32 %234 to i64
  %236 = mul i64 %235, 8
  %237 = trunc i64 %236 to i32
  %238 = load ptr, ptr %5, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %238, i32 0, i32 9
  store i32 %237, ptr %239, align 1, !tbaa !60
  br label %254

240:                                              ; preds = %205
  %241 = load ptr, ptr %3, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.qpl_job, ptr %241, i32 0, i32 3
  %243 = load ptr, ptr %242, align 8, !tbaa !44
  %244 = load ptr, ptr %5, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %244, i32 0, i32 4
  store ptr %243, ptr %245, align 1, !tbaa !59
  %246 = load ptr, ptr %5, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %246, i32 0, i32 5
  %248 = load i32, ptr %247, align 1, !tbaa !45
  %249 = icmp eq i32 0, %248
  %250 = zext i1 %249 to i64
  %251 = select i1 %249, i32 1, i32 0
  %252 = load ptr, ptr %5, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %252, i32 0, i32 9
  store i32 %251, ptr %253, align 1, !tbaa !60
  br label %254

254:                                              ; preds = %240, %217
  %255 = load ptr, ptr %6, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.hw_iaa_completion_record, ptr %255, i32 0, i32 11
  store i32 0, ptr %256, align 1, !tbaa !61
  %257 = load ptr, ptr %6, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.hw_iaa_completion_record, ptr %257, i32 0, i32 0
  store i8 0, ptr %258, align 1, !tbaa !62
  %259 = load ptr, ptr %3, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.qpl_job, ptr %259, i32 0, i32 7
  %261 = load i32, ptr %260, align 4, !tbaa !30
  %262 = and i32 4, %261
  %263 = icmp ne i32 %262, 0
  %264 = zext i1 %263 to i64
  %265 = select i1 %263, i32 2097152, i32 0
  %266 = load i32, ptr %14, align 4, !tbaa !48
  %267 = or i32 %266, %265
  store i32 %267, ptr %14, align 4, !tbaa !48
  %268 = load ptr, ptr %4, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.qpl_hw_state, ptr %268, i32 0, i32 13
  %270 = load i32, ptr %269, align 4, !tbaa !9
  %271 = icmp ne i32 %270, 0
  %272 = zext i1 %271 to i64
  %273 = select i1 %271, i32 4194304, i32 0
  %274 = load i32, ptr %14, align 4, !tbaa !48
  %275 = or i32 %274, %273
  store i32 %275, ptr %14, align 4, !tbaa !48
  %276 = load i32, ptr %14, align 4, !tbaa !48
  %277 = load ptr, ptr %5, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %277, i32 0, i32 1
  store i32 %276, ptr %278, align 1, !tbaa !63
  %279 = load i32, ptr %15, align 4, !tbaa !48
  %280 = trunc i32 %279 to i16
  %281 = load ptr, ptr %5, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %281, i32 0, i32 7
  store i16 %280, ptr %282, align 1, !tbaa !64
  %283 = load ptr, ptr %5, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %283, i32 0, i32 11
  store i32 0, ptr %284, align 1, !tbaa !65
  %285 = load ptr, ptr %3, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.qpl_job, ptr %285, i32 0, i32 7
  %287 = load i32, ptr %286, align 4, !tbaa !30
  %288 = and i32 %287, 34
  %289 = icmp eq i32 %288, 34
  br i1 %289, label %290, label %343

290:                                              ; preds = %254
  %291 = load ptr, ptr %3, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.qpl_job, ptr %291, i32 0, i32 7
  %293 = load i32, ptr %292, align 4, !tbaa !30
  %294 = and i32 %293, 16
  %295 = icmp ne i32 %294, 0
  br i1 %295, label %296, label %328

296:                                              ; preds = %290
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  %297 = load ptr, ptr %6, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.hw_iaa_completion_record, ptr %297, i32 0, i32 8
  %299 = load i8, ptr %298, align 1, !tbaa !66
  %300 = zext i8 %299 to i32
  %301 = sub i32 16, %300
  %302 = trunc i32 %301 to i8
  store i8 %302, ptr %17, align 1, !tbaa !67
  %303 = load i8, ptr %17, align 1, !tbaa !67
  %304 = zext i8 %303 to i32
  %305 = and i32 %304, 7
  %306 = and i32 %305, 7
  %307 = shl i32 %306, 6
  %308 = load ptr, ptr %5, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %308, i32 0, i32 7
  %310 = load i16, ptr %309, align 1, !tbaa !64
  %311 = zext i16 %310 to i32
  %312 = or i32 %311, %307
  %313 = trunc i32 %312 to i16
  store i16 %313, ptr %309, align 1, !tbaa !64
  %314 = call noundef zeroext i1 @_ZN3qpl2ml4util38are_iaa_gen_2_min_capabilities_presentEv()
  br i1 %314, label %315, label %327

315:                                              ; preds = %296
  %316 = load i8, ptr %17, align 1, !tbaa !67
  %317 = zext i8 %316 to i32
  %318 = icmp ugt i32 %317, 7
  %319 = zext i1 %318 to i64
  %320 = select i1 %318, i32 16384, i32 0
  %321 = load ptr, ptr %5, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %321, i32 0, i32 7
  %323 = load i16, ptr %322, align 1, !tbaa !64
  %324 = zext i16 %323 to i32
  %325 = or i32 %324, %320
  %326 = trunc i32 %325 to i16
  store i16 %326, ptr %322, align 1, !tbaa !64
  br label %327

327:                                              ; preds = %315, %296
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  br label %342

328:                                              ; preds = %290
  %329 = load ptr, ptr %6, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.hw_iaa_completion_record, ptr %329, i32 0, i32 8
  %331 = load i8, ptr %330, align 1, !tbaa !66
  %332 = zext i8 %331 to i32
  %333 = sub i32 8, %332
  %334 = and i32 %333, 7
  %335 = shl i32 %334, 6
  %336 = load ptr, ptr %5, align 8, !tbaa !5
  %337 = getelementptr inbounds %struct.hw_decompress_analytics_descriptor, ptr %336, i32 0, i32 7
  %338 = load i16, ptr %337, align 1, !tbaa !64
  %339 = zext i16 %338 to i32
  %340 = or i32 %339, %335
  %341 = trunc i32 %340 to i16
  store i16 %341, ptr %337, align 1, !tbaa !64
  br label %342

342:                                              ; preds = %328, %327
  br label %343

343:                                              ; preds = %342, %254
  %344 = load ptr, ptr %7, align 8, !tbaa !5
  %345 = load i8, ptr %16, align 1, !tbaa !40, !range !49, !noundef !50
  %346 = trunc i8 %345 to i1
  call void @_ZL44hw_iaa_aecs_decompress_state_set_aecs_formatP22hw_iaa_aecs_decompressb(ptr noundef %344, i1 noundef zeroext %346)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %347 = load ptr, ptr %5, align 8, !tbaa !5
  %348 = load ptr, ptr %4, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.qpl_hw_state, ptr %348, i32 0, i32 1
  %350 = load ptr, ptr %3, align 8, !tbaa !5
  %351 = getelementptr inbounds %struct.qpl_job, ptr %350, i32 0, i32 38
  %352 = load i32, ptr %351, align 4, !tbaa !68
  %353 = call noundef i32 @_ZN3qpl2ml4util18process_descriptorI10qpl_statusLNS1_16execution_mode_tE1EEET_P13hw_descriptorPV20hw_completion_recordi(ptr noundef %347, ptr noundef %349, i32 noundef %352) #4
  store i32 %353, ptr %18, align 4, !tbaa !69
  %354 = load i32, ptr %18, align 4, !tbaa !69
  %355 = icmp ne i32 %354, 0
  br i1 %355, label %356, label %357

356:                                              ; preds = %343
  store i32 5, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %358

357:                                              ; preds = %343
  store i32 1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %358

358:                                              ; preds = %357, %356
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %359

359:                                              ; preds = %358, %216, %160
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  br label %360

360:                                              ; preds = %359, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  %361 = load i32, ptr %2, align 4
  ret i32 %361
}

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

declare i32 @hw_iaa_aecs_decompress_set_huffman_only_huffman_table_from_histogram(ptr noundef, ptr noundef, i1 noundef zeroext) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 39708}
!10 = !{!"_ZTS12qpl_hw_state", !11, i64 0, !14, i64 64, !7, i64 128, !7, i64 10880, !16, i64 38592, !17, i64 39624, !12, i64 39648, !12, i64 39652, !12, i64 39656, !21, i64 39660, !12, i64 39664, !22, i64 39672, !12, i64 39704, !12, i64 39708, !18, i64 39712, !18, i64 39713, !24, i64 39716, !25, i64 39720, !26, i64 39728}
!11 = !{!"_ZTS34hw_decompress_analytics_descriptor", !12, i64 0, !12, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !13, i64 36, !13, i64 38, !6, i64 40, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60}
!12 = !{!"int", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!"_ZTS24hw_iaa_completion_record", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !12, i64 4, !15, i64 8, !15, i64 16, !12, i64 24, !7, i64 28, !7, i64 29, !13, i64 30, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !15, i64 48, !15, i64 56}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTS10qpl_buffer", !7, i64 0, !12, i64 1024, !12, i64 1028}
!17 = !{!"_ZTS21qpl_execution_history", !18, i64 0, !19, i64 4, !20, i64 8, !12, i64 12, !6, i64 16}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTS23qpl_task_execution_step", !7, i64 0}
!20 = !{!"_ZTS14qpl_comp_style", !7, i64 0}
!21 = !{!"_ZTS15hw_huffman_code", !13, i64 0, !7, i64 2, !7, i64 3}
!22 = !{!"_ZTS22hw_accelerator_context", !23, i64 0, !6, i64 24}
!23 = !{!"_ZTS20hw_device_properties", !12, i64 0, !12, i64 4, !12, i64 8, !18, i64 12, !18, i64 13, !18, i64 14, !18, i64 15, !18, i64 16, !18, i64 17, !18, i64 18, !18, i64 19, !18, i64 20, !18, i64 21, !18, i64 22}
!24 = !{!"_ZTS25hw_multidescriptor_status", !7, i64 0}
!25 = !{!"_ZTS10qpl_status", !7, i64 0}
!26 = !{!"_ZTS20qpl_execution_record", !27, i64 0, !12, i64 8, !12, i64 12}
!27 = !{!"double", !7, i64 0}
!28 = !{!10, !12, i64 39652}
!29 = !{!10, !12, i64 39656}
!30 = !{!31, !12, i64 36}
!31 = !{!"_ZTS7qpl_job", !6, i64 0, !12, i64 8, !12, i64 12, !6, i64 16, !12, i64 24, !12, i64 28, !32, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !33, i64 52, !34, i64 56, !6, i64 64, !6, i64 72, !35, i64 80, !6, i64 88, !12, i64 96, !12, i64 100, !7, i64 104, !7, i64 105, !7, i64 106, !15, i64 112, !15, i64 120, !6, i64 128, !12, i64 136, !12, i64 140, !12, i64 144, !12, i64 148, !36, i64 152, !12, i64 156, !12, i64 160, !12, i64 164, !12, i64 168, !37, i64 172, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !38, i64 192}
!32 = !{!"_ZTS13qpl_operation", !7, i64 0}
!33 = !{!"_ZTS22qpl_compression_levels", !7, i64 0}
!34 = !{!"_ZTS19qpl_statistics_mode", !7, i64 0}
!35 = !{!"_ZTS19qpl_mini_block_size", !7, i64 0}
!36 = !{!"_ZTS14qpl_out_format", !7, i64 0}
!37 = !{!"_ZTS10qpl_parser", !7, i64 0}
!38 = !{!"_ZTS12qpl_aux_data", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !39, i64 40}
!39 = !{!"_ZTS10qpl_path_t", !7, i64 0}
!40 = !{!18, !18, i64 0}
!41 = !{!31, !35, i64 80}
!42 = !{!10, !6, i64 39640}
!43 = !{!11, !6, i64 16}
!44 = !{!31, !6, i64 16}
!45 = !{!11, !12, i64 32}
!46 = !{!11, !6, i64 40}
!47 = !{!11, !12, i64 52}
!48 = !{!12, !12, i64 0}
!49 = !{i8 0, i8 2}
!50 = !{}
!51 = !{!31, !6, i64 88}
!52 = !{!15, !15, i64 0}
!53 = !{!54, !13, i64 908}
!54 = !{!"_ZTS22hw_iaa_aecs_decompress", !7, i64 0, !12, i64 8, !12, i64 12, !7, i64 16, !7, i64 272, !12, i64 304, !7, i64 308, !7, i64 309, !13, i64 310, !7, i64 312, !7, i64 332, !7, i64 352, !7, i64 372, !7, i64 392, !7, i64 640, !13, i64 908, !13, i64 910, !7, i64 912, !55, i64 1084, !13, i64 1086, !7, i64 1088, !7, i64 5184}
!55 = !{!"_ZTSN22hw_iaa_aecs_decompressUt1_E", !13, i64 0, !13, i64 1}
!56 = !{!54, !12, i64 12}
!57 = !{!31, !12, i64 100}
!58 = !{!31, !12, i64 96}
!59 = !{!11, !6, i64 24}
!60 = !{!11, !12, i64 48}
!61 = !{!14, !12, i64 32}
!62 = !{!14, !7, i64 0}
!63 = !{!11, !12, i64 4}
!64 = !{!11, !13, i64 38}
!65 = !{!11, !12, i64 56}
!66 = !{!14, !7, i64 28}
!67 = !{!7, !7, i64 0}
!68 = !{!31, !12, i64 188}
!69 = !{!25, !25, i64 0}


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

%struct.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.0, %struct.anon.2, 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.0 = type { %struct.anon.1 }
%struct.anon.1 = type { [2 x i32], [144 x i8], [5 x i32] }
%struct.anon.2 = type { i16 }

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN3qpl3jobL9get_stateEPK7qpl_job(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3qpl2ml4util18process_descriptorI10qpl_statusLNS1_16execution_mode_tE1EEET_P13hw_descriptorPV20hw_completion_recordi(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local range(i32 1, 103) i32 @hw_submit_verify_job(ptr noundef %0) local_unnamed_addr #1 {
  %2 = tail call noundef ptr @_ZN3qpl3jobL9get_stateEPK7qpl_job(ptr noundef %0) #3
  %3 = getelementptr inbounds i8, ptr %2, i64 64
  %4 = getelementptr inbounds i8, ptr %2, i64 128
  %5 = getelementptr inbounds i8, ptr %2, i64 39708
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = zext i32 %6 to i64
  %8 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_analytic], ptr %4, i64 0, i64 %7, i32 2
  %9 = getelementptr inbounds i8, ptr %2, i64 10880
  %10 = getelementptr inbounds i8, ptr %2, i64 39652
  %11 = load i32, ptr %10, align 4, !tbaa !27
  %12 = getelementptr inbounds i8, ptr %2, i64 39656
  %13 = load i32, ptr %12, align 8, !tbaa !28
  %14 = tail call noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef nonnull %9, i32 noundef %11, i32 noundef %13)
  %.not = icmp eq ptr %14, null
  br i1 %.not, label %126, label %15

15:                                               ; preds = %1
  %16 = getelementptr inbounds i8, ptr %0, i64 36
  %17 = load i32, ptr %16, align 4, !tbaa !29
  %18 = and i32 %17, 1
  %.not100 = icmp eq i32 %18, 0
  %19 = and i32 %17, 2
  %.not101 = icmp eq i32 %19, 0
  %20 = and i32 %17, 32
  %.not102 = icmp eq i32 %20, 0
  %21 = getelementptr inbounds i8, ptr %0, i64 80
  %22 = load i32, ptr %21, align 8, !tbaa !39
  %.not103 = icmp eq i32 %22, 0
  %23 = getelementptr inbounds i8, ptr %2, i64 39640
  %24 = load ptr, ptr %23, align 8, !tbaa !40
  %25 = getelementptr inbounds i8, ptr %2, i64 16
  store ptr %24, ptr %25, align 1, !tbaa !41
  %26 = getelementptr inbounds i8, ptr %0, i64 16
  %27 = load ptr, ptr %26, align 8, !tbaa !42
  %28 = ptrtoint ptr %27 to i64
  %29 = ptrtoint ptr %24 to i64
  %30 = sub i64 %28, %29
  %31 = trunc i64 %30 to i32
  %32 = getelementptr inbounds i8, ptr %2, i64 32
  store i32 %31, ptr %32, align 1, !tbaa !43
  %33 = getelementptr inbounds i8, ptr %2, i64 40
  store ptr null, ptr %33, align 1, !tbaa !44
  %34 = getelementptr inbounds i8, ptr %2, i64 52
  store i32 0, ptr %34, align 1, !tbaa !45
  %35 = shl i32 %22, 10
  %36 = and i32 %35, 7168
  %37 = shl i32 %17, 1
  %38 = and i32 %37, 32
  %39 = or disjoint i32 %38, %36
  %40 = or disjoint i32 %39, 533
  %41 = tail call noundef zeroext i1 @_ZN3qpl2ml4util38are_iaa_gen_2_min_capabilities_presentEv()
  br i1 %.not100, label %.sink.split, label %42

42:                                               ; preds = %15
  br i1 %.not103, label %54, label %43

43:                                               ; preds = %42
  %44 = load i32, ptr %16, align 4, !tbaa !29
  %45 = and i32 %44, 8
  %.not105 = icmp eq i32 %45, 0
  %46 = getelementptr inbounds i8, ptr %0, i64 88
  %47 = load ptr, ptr %46, align 8, !tbaa !46
  br i1 %.not105, label %51, label %48

48:                                               ; preds = %43
  store i64 80, ptr %47, align 8, !tbaa !47
  %49 = getelementptr inbounds i8, ptr %8, i64 908
  store i16 1, ptr %49, align 4, !tbaa !48
  %50 = getelementptr inbounds i8, ptr %8, i64 12
  store i32 80, ptr %50, align 4, !tbaa !51
  store ptr %4, ptr %33, align 1, !tbaa !44
  store i32 5376, ptr %34, align 1, !tbaa !45
  br label %52

51:                                               ; preds = %43
  store i64 0, ptr %47, align 8, !tbaa !47
  br label %52

52:                                               ; preds = %51, %48
  %.094 = phi i32 [ 1107361792, %48 ], [ 1107296256, %51 ]
  %53 = getelementptr inbounds i8, ptr %0, i64 100
  store i32 1, ptr %53, align 4, !tbaa !52
  br label %54

54:                                               ; preds = %52, %42
  %.195 = phi i32 [ %.094, %52 ], [ 1107296256, %42 ]
  br i1 %.not102, label %58, label %55

55:                                               ; preds = %54
  %56 = getelementptr inbounds i8, ptr %14, i64 288
  %57 = tail call i32 @hw_iaa_aecs_decompress_set_huffman_only_huffman_table_from_histogram(ptr noundef nonnull %8, ptr noundef nonnull %56, i1 noundef zeroext %41)
  %.not106 = icmp eq i32 %57, 0
  br i1 %.not106, label %.sink.split, label %126

.sink.split:                                      ; preds = %15, %55
  store ptr %4, ptr %33, align 1, !tbaa !44
  store i32 5376, ptr %34, align 1, !tbaa !45
  br label %58

58:                                               ; preds = %.sink.split, %54
  %.296 = phi i32 [ %.195, %54 ], [ 1107361792, %.sink.split ]
  br i1 %.not101, label %62, label %59

59:                                               ; preds = %58
  %60 = select i1 %.not102, i32 10, i32 2
  %61 = or disjoint i32 %60, %40
  br label %64

62:                                               ; preds = %58
  %63 = or i32 %.296, 262144
  store ptr %4, ptr %33, align 1, !tbaa !44
  store i32 5376, ptr %34, align 1, !tbaa !45
  br label %64

64:                                               ; preds = %62, %59
  %.097 = phi i32 [ %61, %59 ], [ %40, %62 ]
  %.3 = phi i32 [ %.296, %59 ], [ %63, %62 ]
  br i1 %.not103, label %79, label %65

65:                                               ; preds = %64
  %66 = getelementptr inbounds i8, ptr %0, i64 96
  %67 = load i32, ptr %66, align 8, !tbaa !53
  %68 = getelementptr inbounds i8, ptr %0, i64 100
  %69 = load i32, ptr %68, align 4, !tbaa !52
  %70 = icmp ult i32 %67, %69
  br i1 %70, label %126, label %71

71:                                               ; preds = %65
  %72 = getelementptr inbounds i8, ptr %0, i64 88
  %73 = load ptr, ptr %72, align 8, !tbaa !46
  %74 = zext i32 %69 to i64
  %75 = getelementptr inbounds i64, ptr %73, i64 %74
  %76 = getelementptr inbounds i8, ptr %2, i64 24
  store ptr %75, ptr %76, align 1, !tbaa !54
  %77 = sub i32 %67, %69
  %78 = shl i32 %77, 3
  br label %85

79:                                               ; preds = %64
  %80 = load ptr, ptr %26, align 8, !tbaa !42
  %81 = getelementptr inbounds i8, ptr %2, i64 24
  store ptr %80, ptr %81, align 1, !tbaa !54
  %82 = load i32, ptr %32, align 1, !tbaa !43
  %83 = icmp eq i32 %82, 0
  %84 = zext i1 %83 to i32
  br label %85

85:                                               ; preds = %79, %71
  %.sink = phi i32 [ %84, %79 ], [ %78, %71 ]
  %86 = getelementptr inbounds i8, ptr %2, i64 48
  store i32 %.sink, ptr %86, align 1, !tbaa !55
  %87 = getelementptr inbounds i8, ptr %2, i64 96
  store i32 0, ptr %87, align 1, !tbaa !56
  store i8 0, ptr %3, align 1, !tbaa !57
  %88 = load i32, ptr %16, align 4, !tbaa !29
  %89 = shl i32 %88, 19
  %90 = and i32 %89, 2097152
  %91 = or i32 %90, %.3
  %92 = load i32, ptr %5, align 4, !tbaa !5
  %.not108 = icmp eq i32 %92, 0
  %93 = select i1 %.not108, i32 0, i32 4194304
  %94 = or i32 %91, %93
  %95 = getelementptr inbounds i8, ptr %2, i64 4
  store i32 %94, ptr %95, align 1, !tbaa !58
  %96 = trunc nuw nsw i32 %.097 to i16
  %97 = getelementptr inbounds i8, ptr %2, i64 38
  store i16 %96, ptr %97, align 1, !tbaa !59
  %98 = getelementptr inbounds i8, ptr %2, i64 56
  store i32 0, ptr %98, align 1, !tbaa !60
  %99 = and i32 %88, 34
  %100 = icmp eq i32 %99, 34
  br i1 %100, label %101, label %122

101:                                              ; preds = %85
  %102 = and i32 %88, 16
  %.not109 = icmp eq i32 %102, 0
  %103 = getelementptr inbounds i8, ptr %2, i64 92
  %104 = load i8, ptr %103, align 1, !tbaa !61
  br i1 %.not109, label %116, label %105

105:                                              ; preds = %101
  %106 = sub i8 16, %104
  %.tr = zext i8 %106 to i16
  %107 = shl nuw nsw i16 %.tr, 6
  %108 = and i16 %107, 448
  %109 = or i16 %108, %96
  store i16 %109, ptr %97, align 1, !tbaa !59
  %110 = tail call noundef zeroext i1 @_ZN3qpl2ml4util38are_iaa_gen_2_min_capabilities_presentEv()
  br i1 %110, label %111, label %122

111:                                              ; preds = %105
  %112 = icmp ugt i8 %106, 7
  %113 = select i1 %112, i16 16384, i16 0
  %114 = load i16, ptr %97, align 1, !tbaa !59
  %115 = or i16 %114, %113
  br label %.sink.split112

116:                                              ; preds = %101
  %117 = sub i8 0, %104
  %118 = and i8 %117, 7
  %119 = zext nneg i8 %118 to i16
  %120 = shl nuw nsw i16 %119, 6
  %121 = or i16 %120, %96
  br label %.sink.split112

.sink.split112:                                   ; preds = %116, %111
  %.sink113 = phi i16 [ %115, %111 ], [ %121, %116 ]
  store i16 %.sink113, ptr %97, align 1, !tbaa !59
  br label %122

122:                                              ; preds = %.sink.split112, %105, %85
  tail call void @_ZL44hw_iaa_aecs_decompress_state_set_aecs_formatP22hw_iaa_aecs_decompressb(ptr noundef nonnull %8, i1 noundef zeroext %41)
  %123 = getelementptr inbounds i8, ptr %0, i64 188
  %124 = load i32, ptr %123, align 4, !tbaa !62
  %125 = tail call noundef i32 @_ZN3qpl2ml4util18process_descriptorI10qpl_statusLNS1_16execution_mode_tE1EEET_P13hw_descriptorPV20hw_completion_recordi(ptr noundef nonnull %2, ptr noundef nonnull %3, i32 noundef %124) #3
  %.not110 = icmp eq i32 %125, 0
  %. = select i1 %.not110, i32 1, i32 5
  br label %126

126:                                              ; preds = %122, %55, %65, %1
  %.2 = phi i32 [ 6, %1 ], [ %., %122 ], [ 81, %55 ], [ 102, %65 ]
  ret i32 %.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 #0

declare i32 @hw_iaa_aecs_decompress_set_huffman_only_huffman_table_from_histogram(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

attributes #0 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 39708}
!6 = !{!"_ZTS12qpl_hw_state", !7, i64 0, !13, i64 64, !9, i64 128, !9, i64 10880, !15, i64 38592, !16, i64 39624, !8, i64 39648, !8, i64 39652, !8, i64 39656, !20, i64 39660, !8, i64 39664, !21, i64 39672, !8, i64 39704, !8, i64 39708, !17, i64 39712, !17, i64 39713, !23, i64 39716, !24, i64 39720, !25, i64 39728}
!7 = !{!"_ZTS34hw_decompress_analytics_descriptor", !8, i64 0, !8, i64 4, !11, i64 8, !11, i64 16, !11, i64 24, !8, i64 32, !12, i64 36, !12, i64 38, !11, i64 40, !8, i64 48, !8, i64 52, !8, i64 56, !8, i64 60}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"short", !9, i64 0}
!13 = !{!"_ZTS24hw_iaa_completion_record", !9, i64 0, !9, i64 1, !9, i64 2, !9, i64 3, !8, i64 4, !14, i64 8, !14, i64 16, !8, i64 24, !9, i64 28, !9, i64 29, !12, i64 30, !8, i64 32, !8, i64 36, !8, i64 40, !8, i64 44, !14, i64 48, !14, i64 56}
!14 = !{!"long", !9, i64 0}
!15 = !{!"_ZTS10qpl_buffer", !9, i64 0, !8, i64 1024, !8, i64 1028}
!16 = !{!"_ZTS21qpl_execution_history", !17, i64 0, !18, i64 4, !19, i64 8, !8, i64 12, !11, i64 16}
!17 = !{!"bool", !9, i64 0}
!18 = !{!"_ZTS23qpl_task_execution_step", !9, i64 0}
!19 = !{!"_ZTS14qpl_comp_style", !9, i64 0}
!20 = !{!"_ZTS15hw_huffman_code", !12, i64 0, !9, i64 2, !9, i64 3}
!21 = !{!"_ZTS22hw_accelerator_context", !22, i64 0, !11, i64 24}
!22 = !{!"_ZTS20hw_device_properties", !8, i64 0, !8, i64 4, !8, i64 8, !17, i64 12, !17, i64 13, !17, i64 14, !17, i64 15, !17, i64 16, !17, i64 17, !17, i64 18, !17, i64 19, !17, i64 20, !17, i64 21, !17, i64 22}
!23 = !{!"_ZTS25hw_multidescriptor_status", !9, i64 0}
!24 = !{!"_ZTS10qpl_status", !9, i64 0}
!25 = !{!"_ZTS20qpl_execution_record", !26, i64 0, !8, i64 8, !8, i64 12}
!26 = !{!"double", !9, i64 0}
!27 = !{!6, !8, i64 39652}
!28 = !{!6, !8, i64 39656}
!29 = !{!30, !8, i64 36}
!30 = !{!"_ZTS7qpl_job", !11, i64 0, !8, i64 8, !8, i64 12, !11, i64 16, !8, i64 24, !8, i64 28, !31, i64 32, !8, i64 36, !8, i64 40, !8, i64 44, !8, i64 48, !32, i64 52, !33, i64 56, !11, i64 64, !11, i64 72, !34, i64 80, !11, i64 88, !8, i64 96, !8, i64 100, !9, i64 104, !9, i64 105, !9, i64 106, !14, i64 112, !14, i64 120, !11, i64 128, !8, i64 136, !8, i64 140, !8, i64 144, !8, i64 148, !35, i64 152, !8, i64 156, !8, i64 160, !8, i64 164, !8, i64 168, !36, i64 172, !8, i64 176, !8, i64 180, !8, i64 184, !8, i64 188, !37, i64 192}
!31 = !{!"_ZTS13qpl_operation", !9, i64 0}
!32 = !{!"_ZTS22qpl_compression_levels", !9, i64 0}
!33 = !{!"_ZTS19qpl_statistics_mode", !9, i64 0}
!34 = !{!"_ZTS19qpl_mini_block_size", !9, i64 0}
!35 = !{!"_ZTS14qpl_out_format", !9, i64 0}
!36 = !{!"_ZTS10qpl_parser", !9, i64 0}
!37 = !{!"_ZTS12qpl_aux_data", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !38, i64 40}
!38 = !{!"_ZTS10qpl_path_t", !9, i64 0}
!39 = !{!30, !34, i64 80}
!40 = !{!6, !11, i64 39640}
!41 = !{!7, !11, i64 16}
!42 = !{!30, !11, i64 16}
!43 = !{!7, !8, i64 32}
!44 = !{!7, !11, i64 40}
!45 = !{!7, !8, i64 52}
!46 = !{!30, !11, i64 88}
!47 = !{!14, !14, i64 0}
!48 = !{!49, !12, i64 908}
!49 = !{!"_ZTS22hw_iaa_aecs_decompress", !9, i64 0, !8, i64 8, !8, i64 12, !9, i64 16, !9, i64 272, !8, i64 304, !9, i64 308, !9, i64 309, !12, i64 310, !9, i64 312, !9, i64 332, !9, i64 352, !9, i64 372, !9, i64 392, !9, i64 640, !12, i64 908, !12, i64 910, !9, i64 912, !50, i64 1084, !12, i64 1086, !9, i64 1088, !9, i64 5184}
!50 = !{!"_ZTSN22hw_iaa_aecs_decompressUt1_E", !12, i64 0, !12, i64 1}
!51 = !{!49, !8, i64 12}
!52 = !{!30, !8, i64 100}
!53 = !{!30, !8, i64 96}
!54 = !{!7, !11, i64 24}
!55 = !{!7, !8, i64 48}
!56 = !{!13, !8, i64 32}
!57 = !{!13, !9, i64 0}
!58 = !{!7, !8, i64 4}
!59 = !{!7, !12, i64 38}
!60 = !{!7, !8, i64 56}
!61 = !{!13, !9, i64 28}
!62 = !{!30, !8, i64 188}


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