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

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

%struct.qpl_job = type { ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, ptr, i32, i32, i8, i8, i8, i64, i64, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.qpl_aux_data }
%struct.qpl_aux_data = type { ptr, ptr, ptr, ptr, ptr, i32 }
%struct.qpl_hw_state = type { %struct.hw_decompress_analytics_descriptor, %struct.hw_iaa_completion_record, [2 x %struct.hw_iaa_aecs_analytic], [2 x %struct.hw_iaa_aecs_compress], %struct.qpl_buffer, %struct.qpl_execution_history, i32, i32, i32, %struct.hw_huffman_code, i32, %struct.hw_accelerator_context, i32, i32, i8, i8, i32, i32, %struct.qpl_execution_record }
%struct.hw_decompress_analytics_descriptor = type { i32, i32, ptr, ptr, ptr, i32, i16, i16, ptr, i32, i32, i32, i32 }
%struct.hw_iaa_completion_record = type { i8, i8, i8, i8, i32, i64, i64, i32, i8, i8, i16, i32, i32, i32, i32, i64, i64 }
%struct.hw_iaa_aecs_analytic = type { %struct.hw_iaa_aecs_filter, [36 x i32], %struct.hw_iaa_aecs_decompress }
%struct.hw_iaa_aecs_filter = type { i32, i32, i32, i32, i32, i32 }
%struct.hw_iaa_aecs_decompress = type { [2 x i32], i32, i32, [32 x i64], [32 x i8], i32, i8, i8, i16, [5 x i32], [5 x i32], [5 x i32], [5 x i32], [62 x i32], %union.anon, i16, i16, %union.anon.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.own_analytics_state_t = type { i32, i32, i32, i32, ptr, ptr, ptr, ptr }

@_ZZ15qpl_execute_jobE10dispatcher = external hidden global ptr, align 8
@_ZGVZ15qpl_execute_jobE10dispatcher = external hidden global i64, align 8

; Function Attrs: mustprogress uwtable
declare dso_local i32 @qpl_submit_job(ptr noundef) #0

; 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 ptr @_ZN3qpl3jobL9get_stateEPK7qpl_job(ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL36is_unsupported_on_hw_supported_on_swEP7qpl_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

declare i32 @hw_submit_job(ptr noundef) #5

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i32 @_ZL14sw_execute_jobP7qpl_job(ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local i32 @qpl_wait_job(ptr noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local i32 @qpl_execute_job(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.qpl_job, ptr %10, i32 0, i32 7
  %12 = load i32, ptr %11, align 4, !tbaa !9
  %13 = and i32 %12, 4194304
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %15, label %21

15:                                               ; preds = %1
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.qpl_job, ptr %16, i32 0, i32 13
  %18 = load ptr, ptr %17, align 8, !tbaa !21
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %15
  store i32 50, ptr %2, align 4
  br label %248

21:                                               ; preds = %15, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 0, ptr %4, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.qpl_job, ptr %22, i32 0, i32 39
  %24 = getelementptr inbounds %struct.qpl_aux_data, ptr %23, i32 0, i32 5
  %25 = load i32, ptr %24, align 8, !tbaa !24
  store i32 %25, ptr %5, align 4, !tbaa !25
  %26 = load i32, ptr %5, align 4, !tbaa !25
  %27 = icmp eq i32 1, %26
  br i1 %27, label %31, label %28

28:                                               ; preds = %21
  %29 = load i32, ptr %5, align 4, !tbaa !25
  %30 = icmp eq i32 0, %29
  br i1 %30, label %31, label %244

31:                                               ; preds = %28, %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = call noundef ptr @_ZN3qpl3jobL9get_stateEPK7qpl_job(ptr noundef %32) #3
  store ptr %33, ptr %6, align 8, !tbaa !5
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.qpl_job, ptr %34, i32 0, i32 7
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = and i32 %36, 1
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %41

39:                                               ; preds = %31
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN3qpl3jobL21update_is_sw_fallbackEP7qpl_jobb(ptr noundef %40, i1 noundef zeroext false) #3
  br label %41

41:                                               ; preds = %39, %31
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = call noundef zeroext i1 @_ZN3qpl3jobL36is_unsupported_on_hw_supported_on_swEP7qpl_job(ptr noundef %42) #3
  br i1 %43, label %44, label %46

44:                                               ; preds = %41
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN3qpl3jobL21update_is_sw_fallbackEP7qpl_jobb(ptr noundef %45, i1 noundef zeroext true) #3
  br label %46

46:                                               ; preds = %44, %41
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.qpl_job, ptr %47, i32 0, i32 6
  %49 = load i32, ptr %48, align 8, !tbaa !26
  %50 = icmp eq i32 1, %49
  br i1 %50, label %51, label %67

51:                                               ; preds = %46
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.qpl_job, ptr %52, i32 0, i32 11
  %54 = load i32, ptr %53, align 4, !tbaa !27
  %55 = icmp eq i32 3, %54
  br i1 %55, label %56, label %67

56:                                               ; preds = %51
  %57 = load i32, ptr %5, align 4, !tbaa !25
  %58 = icmp eq i32 1, %57
  br i1 %58, label %59, label %60

59:                                               ; preds = %56
  store i32 87, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %243

60:                                               ; preds = %56
  %61 = load i32, ptr %5, align 4, !tbaa !25
  %62 = icmp eq i32 0, %61
  br i1 %62, label %63, label %65

63:                                               ; preds = %60
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN3qpl3jobL21update_is_sw_fallbackEP7qpl_jobb(ptr noundef %64, i1 noundef zeroext true) #3
  br label %65

65:                                               ; preds = %63, %60
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66, %51, %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.qpl_job, ptr %68, i32 0, i32 39
  %70 = getelementptr inbounds %struct.qpl_aux_data, ptr %69, i32 0, i32 2
  %71 = load ptr, ptr %70, align 8, !tbaa !28
  store ptr %71, ptr %8, align 8, !tbaa !5
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.qpl_hw_state, ptr %72, i32 0, i32 15
  %74 = load i8, ptr %73, align 1, !tbaa !29, !range !45, !noundef !46
  %75 = trunc i8 %74 to i1
  br i1 %75, label %211, label %76

76:                                               ; preds = %67
  %77 = load atomic i8, ptr @_ZGVZ15qpl_execute_jobE10dispatcher acquire, align 8
  %78 = icmp eq i8 %77, 0
  br i1 %78, label %79, label %84, !prof !47

79:                                               ; preds = %76
  %80 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ15qpl_execute_jobE10dispatcher) #3
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %84

82:                                               ; preds = %79
  %83 = call noundef nonnull align 8 dereferenceable(975232) ptr @_ZN3qpl2ml10dispatcher13hw_dispatcher12get_instanceEv() #3
  store ptr %83, ptr @_ZZ15qpl_execute_jobE10dispatcher, align 8, !tbaa !5
  call void @__cxa_guard_release(ptr @_ZGVZ15qpl_execute_jobE10dispatcher) #3
  br label %84

84:                                               ; preds = %82, %79, %76
  %85 = load ptr, ptr @_ZZ15qpl_execute_jobE10dispatcher, align 8, !tbaa !5
  %86 = call noundef zeroext i1 @_ZNK3qpl2ml10dispatcher13hw_dispatcher13is_hw_supportEv(ptr noundef nonnull align 8 dereferenceable(975232) %85) #3
  br i1 %86, label %92, label %87

87:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %88 = load ptr, ptr @_ZZ15qpl_execute_jobE10dispatcher, align 8, !tbaa !5
  %89 = call noundef i32 @_ZNK3qpl2ml10dispatcher13hw_dispatcher18get_hw_init_statusEv(ptr noundef nonnull align 8 dereferenceable(975232) %88) #3
  store i32 %89, ptr %9, align 4, !tbaa !48
  %90 = load i32, ptr %9, align 4, !tbaa !48
  %91 = call noundef i32 @_ZN3qpl2ml4util43convert_hw_accelerator_status_to_qpl_statusEj(i32 noundef %90)
  store i32 %91, ptr %4, align 4, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %92

92:                                               ; preds = %87, %84
  %93 = load i32, ptr %4, align 4, !tbaa !22
  %94 = icmp eq i32 0, %93
  br i1 %94, label %95, label %201

95:                                               ; preds = %92
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = call noundef zeroext i1 @_ZN3qpl3jobL10is_extractEPK7qpl_job(ptr noundef %96) #3
  br i1 %97, label %98, label %107

98:                                               ; preds = %95
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.own_analytics_state_t, ptr %100, i32 0, i32 5
  %102 = load ptr, ptr %101, align 8, !tbaa !50
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.own_analytics_state_t, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %104, align 4, !tbaa !52
  %106 = call noundef i32 @_ZN3qpl15perform_extractEP7qpl_jobPhj(ptr noundef %99, ptr noundef %102, i32 noundef %105)
  store i32 %106, ptr %4, align 4, !tbaa !22
  br label %200

107:                                              ; preds = %95
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = call noundef zeroext i1 @_ZN3qpl3jobL7is_scanEPK7qpl_job(ptr noundef %108) #3
  br i1 %109, label %110, label %119

110:                                              ; preds = %107
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.own_analytics_state_t, ptr %112, i32 0, i32 5
  %114 = load ptr, ptr %113, align 8, !tbaa !50
  %115 = load ptr, ptr %8, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.own_analytics_state_t, ptr %115, i32 0, i32 1
  %117 = load i32, ptr %116, align 4, !tbaa !52
  %118 = call noundef i32 @_ZN3qpl12perform_scanEP7qpl_jobPhj(ptr noundef %111, ptr noundef %114, i32 noundef %117)
  store i32 %118, ptr %4, align 4, !tbaa !22
  br label %199

119:                                              ; preds = %107
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = call noundef zeroext i1 @_ZN3qpl3jobL9is_selectEPK7qpl_job(ptr noundef %120) #3
  br i1 %121, label %122, label %143

122:                                              ; preds = %119
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.own_analytics_state_t, ptr %124, i32 0, i32 5
  %126 = load ptr, ptr %125, align 8, !tbaa !50
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.own_analytics_state_t, ptr %127, i32 0, i32 1
  %129 = load i32, ptr %128, align 4, !tbaa !52
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.own_analytics_state_t, ptr %130, i32 0, i32 6
  %132 = load ptr, ptr %131, align 8, !tbaa !53
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.own_analytics_state_t, ptr %133, i32 0, i32 2
  %135 = load i32, ptr %134, align 8, !tbaa !54
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.own_analytics_state_t, ptr %136, i32 0, i32 7
  %138 = load ptr, ptr %137, align 8, !tbaa !55
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.own_analytics_state_t, ptr %139, i32 0, i32 3
  %141 = load i32, ptr %140, align 4, !tbaa !56
  %142 = call noundef i32 @_ZN3qpl14perform_selectEP7qpl_jobPhjS2_jS2_j(ptr noundef %123, ptr noundef %126, i32 noundef %129, ptr noundef %132, i32 noundef %135, ptr noundef %138, i32 noundef %141)
  store i32 %142, ptr %4, align 4, !tbaa !22
  br label %198

143:                                              ; preds = %119
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = call noundef zeroext i1 @_ZN3qpl3jobL9is_expandEPK7qpl_job(ptr noundef %144) #3
  br i1 %145, label %146, label %167

146:                                              ; preds = %143
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.own_analytics_state_t, ptr %148, i32 0, i32 5
  %150 = load ptr, ptr %149, align 8, !tbaa !50
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.own_analytics_state_t, ptr %151, i32 0, i32 1
  %153 = load i32, ptr %152, align 4, !tbaa !52
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.own_analytics_state_t, ptr %154, i32 0, i32 6
  %156 = load ptr, ptr %155, align 8, !tbaa !53
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.own_analytics_state_t, ptr %157, i32 0, i32 2
  %159 = load i32, ptr %158, align 8, !tbaa !54
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.own_analytics_state_t, ptr %160, i32 0, i32 7
  %162 = load ptr, ptr %161, align 8, !tbaa !55
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.own_analytics_state_t, ptr %163, i32 0, i32 3
  %165 = load i32, ptr %164, align 4, !tbaa !56
  %166 = call noundef i32 @_ZN3qpl14perform_expandEP7qpl_jobPhjS2_jS2_j(ptr noundef %147, ptr noundef %150, i32 noundef %153, ptr noundef %156, i32 noundef %159, ptr noundef %162, i32 noundef %165)
  store i32 %166, ptr %4, align 4, !tbaa !22
  br label %197

167:                                              ; preds = %143
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = call noundef zeroext i1 @_ZN3qpl3jobL16is_decompressionEPK7qpl_job(ptr noundef %168) #3
  br i1 %169, label %170, label %173

170:                                              ; preds = %167
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = call noundef i32 @_ZN3qpl18perform_decompressILNS_2ml16execution_path_tE1EEEjP7qpl_job(ptr noundef %171) #3
  store i32 %172, ptr %4, align 4, !tbaa !22
  br label %196

173:                                              ; preds = %167
  %174 = load ptr, ptr %3, align 8, !tbaa !5
  %175 = call noundef zeroext i1 @_ZN3qpl3jobL14is_compressionEPK7qpl_job(ptr noundef %174) #3
  br i1 %175, label %176, label %185

176:                                              ; preds = %173
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = call noundef zeroext i1 @_ZN3qpl3jobL19is_indexing_enabledEPK7qpl_job(ptr noundef %177) #3
  br i1 %178, label %179, label %182

179:                                              ; preds = %176
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = call noundef zeroext i1 @_ZN3qpl3jobL12is_multi_jobEPK7qpl_job(ptr noundef %180) #3
  br i1 %181, label %185, label %182

182:                                              ; preds = %179, %176
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  %184 = call noundef i32 @_ZN3qpl19perform_compressionILNS_2ml16execution_path_tE1EEEjP7qpl_job(ptr noundef %183) #3
  store i32 %184, ptr %4, align 4, !tbaa !22
  br label %195

185:                                              ; preds = %179, %173
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = call i32 @hw_submit_job(ptr noundef %186)
  store i32 %187, ptr %4, align 4, !tbaa !22
  %188 = load i32, ptr %4, align 4, !tbaa !22
  %189 = icmp eq i32 0, %188
  br i1 %189, label %190, label %194

190:                                              ; preds = %185
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN3qpl3jobL22set_job_to_in_progressEP7qpl_job(ptr noundef %191) #3
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = call i32 @qpl_wait_job(ptr noundef %192)
  store i32 %193, ptr %4, align 4, !tbaa !22
  br label %194

194:                                              ; preds = %190, %185
  br label %195

195:                                              ; preds = %194, %182
  br label %196

196:                                              ; preds = %195, %170
  br label %197

197:                                              ; preds = %196, %146
  br label %198

198:                                              ; preds = %197, %122
  br label %199

199:                                              ; preds = %198, %110
  br label %200

200:                                              ; preds = %199, %98
  br label %201

201:                                              ; preds = %200, %92
  %202 = load i32, ptr %4, align 4, !tbaa !22
  %203 = icmp ne i32 0, %202
  br i1 %203, label %204, label %210

204:                                              ; preds = %201
  %205 = load ptr, ptr %3, align 8, !tbaa !5
  %206 = load i32, ptr %4, align 4, !tbaa !22
  %207 = call noundef zeroext i1 @_ZN3qpl3jobL24is_sw_fallback_supportedEPK7qpl_job10qpl_status(ptr noundef %205, i32 noundef %206)
  br i1 %207, label %208, label %210

208:                                              ; preds = %204
  %209 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN3qpl3jobL21update_is_sw_fallbackEP7qpl_jobb(ptr noundef %209, i1 noundef zeroext true) #3
  br label %210

210:                                              ; preds = %208, %204, %201
  br label %211

211:                                              ; preds = %210, %67
  %212 = load ptr, ptr %6, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.qpl_hw_state, ptr %212, i32 0, i32 15
  %214 = load i8, ptr %213, align 1, !tbaa !29, !range !45, !noundef !46
  %215 = trunc i8 %214 to i1
  br i1 %215, label %216, label %241

216:                                              ; preds = %211
  %217 = load ptr, ptr %3, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.qpl_job, ptr %217, i32 0, i32 39
  %219 = getelementptr inbounds %struct.qpl_aux_data, ptr %218, i32 0, i32 5
  %220 = load i32, ptr %219, align 8, !tbaa !24
  store i32 %220, ptr %5, align 4, !tbaa !25
  %221 = load ptr, ptr %3, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.qpl_job, ptr %221, i32 0, i32 39
  %223 = getelementptr inbounds %struct.qpl_aux_data, ptr %222, i32 0, i32 5
  store i32 2, ptr %223, align 8, !tbaa !24
  %224 = load ptr, ptr %3, align 8, !tbaa !5
  %225 = call noundef i32 @_ZL14sw_execute_jobP7qpl_job(ptr noundef %224)
  store i32 %225, ptr %4, align 4, !tbaa !22
  %226 = load i32, ptr %5, align 4, !tbaa !25
  %227 = load ptr, ptr %3, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.qpl_job, ptr %227, i32 0, i32 39
  %229 = getelementptr inbounds %struct.qpl_aux_data, ptr %228, i32 0, i32 5
  store i32 %226, ptr %229, align 8, !tbaa !24
  %230 = load i32, ptr %4, align 4, !tbaa !22
  %231 = icmp eq i32 0, %230
  br i1 %231, label %232, label %240

232:                                              ; preds = %216
  %233 = load ptr, ptr %3, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.qpl_job, ptr %233, i32 0, i32 39
  %235 = getelementptr inbounds %struct.qpl_aux_data, ptr %234, i32 0, i32 5
  %236 = load i32, ptr %235, align 8, !tbaa !24
  %237 = icmp eq i32 0, %236
  br i1 %237, label %238, label %240

238:                                              ; preds = %232
  %239 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN3qpl3jobL22set_job_to_in_progressEP7qpl_job(ptr noundef %239) #3
  br label %240

240:                                              ; preds = %238, %232, %216
  br label %241

241:                                              ; preds = %240, %211
  %242 = load i32, ptr %4, align 4, !tbaa !22
  store i32 %242, ptr %2, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %243

243:                                              ; preds = %241, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %247

244:                                              ; preds = %28
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = call i32 @qpl_submit_job(ptr noundef %245)
  store i32 %246, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %247

247:                                              ; preds = %244, %243
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %248

248:                                              ; preds = %247, %20
  %249 = load i32, ptr %2, align 4
  ret i32 %249
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL10is_extractEPK7qpl_job(ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL7is_scanEPK7qpl_job(ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL9is_selectEPK7qpl_job(ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL9is_expandEPK7qpl_job(ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL16is_decompressionEPK7qpl_job(ptr noundef) #2

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl18perform_decompressILNS_2ml16execution_path_tE1EEEjP7qpl_job(ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL14is_compressionEPK7qpl_job(ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL19is_indexing_enabledEPK7qpl_job(ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL12is_multi_jobEPK7qpl_job(ptr noundef) #2

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl19perform_compressionILNS_2ml16execution_path_tE1EEEjP7qpl_job(ptr noundef) #4

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 = { 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, !11, i64 36}
!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 64}
!22 = !{!23, !23, i64 0}
!23 = !{!"_ZTS10qpl_status", !7, i64 0}
!24 = !{!10, !20, i64 232}
!25 = !{!20, !20, i64 0}
!26 = !{!10, !12, i64 32}
!27 = !{!10, !13, i64 52}
!28 = !{!10, !6, i64 208}
!29 = !{!30, !36, i64 39713}
!30 = !{!"_ZTS12qpl_hw_state", !31, i64 0, !33, i64 64, !7, i64 128, !7, i64 10880, !34, i64 38592, !35, i64 39624, !11, i64 39648, !11, i64 39652, !11, i64 39656, !39, i64 39660, !11, i64 39664, !40, i64 39672, !11, i64 39704, !11, i64 39708, !36, i64 39712, !36, i64 39713, !42, i64 39716, !23, i64 39720, !43, i64 39728}
!31 = !{!"_ZTS34hw_decompress_analytics_descriptor", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !32, i64 36, !32, i64 38, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60}
!32 = !{!"short", !7, i64 0}
!33 = !{!"_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, !32, i64 30, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !16, i64 48, !16, i64 56}
!34 = !{!"_ZTS10qpl_buffer", !7, i64 0, !11, i64 1024, !11, i64 1028}
!35 = !{!"_ZTS21qpl_execution_history", !36, i64 0, !37, i64 4, !38, i64 8, !11, i64 12, !6, i64 16}
!36 = !{!"bool", !7, i64 0}
!37 = !{!"_ZTS23qpl_task_execution_step", !7, i64 0}
!38 = !{!"_ZTS14qpl_comp_style", !7, i64 0}
!39 = !{!"_ZTS15hw_huffman_code", !32, i64 0, !7, i64 2, !7, i64 3}
!40 = !{!"_ZTS22hw_accelerator_context", !41, i64 0, !6, i64 24}
!41 = !{!"_ZTS20hw_device_properties", !11, i64 0, !11, i64 4, !11, i64 8, !36, i64 12, !36, i64 13, !36, i64 14, !36, i64 15, !36, i64 16, !36, i64 17, !36, i64 18, !36, i64 19, !36, i64 20, !36, i64 21, !36, i64 22}
!42 = !{!"_ZTS25hw_multidescriptor_status", !7, i64 0}
!43 = !{!"_ZTS20qpl_execution_record", !44, i64 0, !11, i64 8, !11, i64 12}
!44 = !{!"double", !7, i64 0}
!45 = !{i8 0, i8 2}
!46 = !{}
!47 = !{!"branch_weights", i32 1, i32 1048575}
!48 = !{!49, !49, i64 0}
!49 = !{!"_ZTS21hw_accelerator_status", !7, i64 0}
!50 = !{!51, !6, i64 24}
!51 = !{!"_ZTS21own_analytics_state_t", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!52 = !{!51, !11, i64 4}
!53 = !{!51, !6, i64 32}
!54 = !{!51, !11, i64 8}
!55 = !{!51, !6, i64 40}
!56 = !{!51, !11, i64 12}


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

@_ZZ15qpl_execute_jobE10dispatcher = external hidden local_unnamed_addr global ptr, align 8
@_ZGVZ15qpl_execute_jobE10dispatcher = external hidden global i64, align 8

; Function Attrs: mustprogress uwtable
declare dso_local i32 @qpl_submit_job(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL36is_unsupported_on_hw_supported_on_swEP7qpl_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

declare i32 @hw_submit_job(ptr noundef) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i32 @_ZL14sw_execute_jobP7qpl_job(ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local i32 @qpl_wait_job(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local i32 @qpl_execute_job(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 36
  %3 = load i32, ptr %2, align 4, !tbaa !5
  %4 = and i32 %3, 4194304
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %9, label %5

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 64
  %7 = load ptr, ptr %6, align 8, !tbaa !20
  %8 = icmp eq ptr %7, null
  br i1 %8, label %130, label %9

9:                                                ; preds = %5, %1
  %10 = getelementptr inbounds i8, ptr %0, i64 232
  %11 = load i32, ptr %10, align 8, !tbaa !21
  %or.cond = icmp ult i32 %11, 2
  br i1 %or.cond, label %12, label %128

12:                                               ; preds = %9
  %13 = tail call noundef ptr @_ZN3qpl3jobL9get_stateEPK7qpl_job(ptr noundef nonnull %0) #6
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = and i32 %14, 1
  %.not75 = icmp eq i32 %15, 0
  br i1 %.not75, label %17, label %16

16:                                               ; preds = %12
  tail call void @_ZN3qpl3jobL21update_is_sw_fallbackEP7qpl_jobb(ptr noundef nonnull %0, i1 noundef zeroext false) #6
  br label %17

17:                                               ; preds = %16, %12
  %18 = tail call noundef zeroext i1 @_ZN3qpl3jobL36is_unsupported_on_hw_supported_on_swEP7qpl_job(ptr noundef nonnull %0) #6
  br i1 %18, label %19, label %20

19:                                               ; preds = %17
  tail call void @_ZN3qpl3jobL21update_is_sw_fallbackEP7qpl_jobb(ptr noundef nonnull %0, i1 noundef zeroext true) #6
  br label %20

20:                                               ; preds = %19, %17
  %21 = getelementptr inbounds i8, ptr %0, i64 32
  %22 = load i32, ptr %21, align 8, !tbaa !22
  %23 = icmp eq i32 %22, 1
  br i1 %23, label %24, label %30

24:                                               ; preds = %20
  %25 = getelementptr inbounds i8, ptr %0, i64 52
  %26 = load i32, ptr %25, align 4, !tbaa !23
  %27 = icmp eq i32 %26, 3
  br i1 %27, label %28, label %30

28:                                               ; preds = %24
  %switch = icmp eq i32 %11, 1
  br i1 %switch, label %130, label %29

29:                                               ; preds = %28
  tail call void @_ZN3qpl3jobL21update_is_sw_fallbackEP7qpl_jobb(ptr noundef nonnull %0, i1 noundef zeroext true) #6
  br label %30

30:                                               ; preds = %29, %24, %20
  %31 = getelementptr inbounds i8, ptr %0, i64 208
  %32 = load ptr, ptr %31, align 8, !tbaa !24
  %33 = getelementptr inbounds i8, ptr %13, i64 39713
  %34 = load i8, ptr %33, align 1, !tbaa !25, !range !42, !noundef !43
  %35 = trunc nuw i8 %34 to i1
  br i1 %35, label %118, label %36

36:                                               ; preds = %30
  %37 = load atomic i8, ptr @_ZGVZ15qpl_execute_jobE10dispatcher acquire, align 8
  %38 = icmp eq i8 %37, 0
  br i1 %38, label %39, label %43, !prof !44

39:                                               ; preds = %36
  %40 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ15qpl_execute_jobE10dispatcher) #6
  %.not76 = icmp eq i32 %40, 0
  br i1 %.not76, label %43, label %41

41:                                               ; preds = %39
  %42 = tail call noundef nonnull align 8 dereferenceable(975232) ptr @_ZN3qpl2ml10dispatcher13hw_dispatcher12get_instanceEv() #6
  store ptr %42, ptr @_ZZ15qpl_execute_jobE10dispatcher, align 8, !tbaa !45
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ15qpl_execute_jobE10dispatcher) #6
  br label %43

43:                                               ; preds = %41, %39, %36
  %44 = load ptr, ptr @_ZZ15qpl_execute_jobE10dispatcher, align 8, !tbaa !45
  %45 = tail call noundef zeroext i1 @_ZNK3qpl2ml10dispatcher13hw_dispatcher13is_hw_supportEv(ptr noundef nonnull align 8 dereferenceable(975232) %44) #6
  br i1 %45, label %.thread, label %46

46:                                               ; preds = %43
  %47 = load ptr, ptr @_ZZ15qpl_execute_jobE10dispatcher, align 8, !tbaa !45
  %48 = tail call noundef i32 @_ZNK3qpl2ml10dispatcher13hw_dispatcher18get_hw_init_statusEv(ptr noundef nonnull align 8 dereferenceable(975232) %47) #6
  %49 = tail call noundef i32 @_ZN3qpl2ml4util43convert_hw_accelerator_status_to_qpl_statusEj(i32 noundef %48)
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %.thread, label %.thread79

.thread:                                          ; preds = %43, %46
  %51 = tail call noundef zeroext i1 @_ZN3qpl3jobL10is_extractEPK7qpl_job(ptr noundef nonnull %0) #6
  br i1 %51, label %52, label %58

52:                                               ; preds = %.thread
  %53 = getelementptr inbounds i8, ptr %32, i64 24
  %54 = load ptr, ptr %53, align 8, !tbaa !46
  %55 = getelementptr inbounds i8, ptr %32, i64 4
  %56 = load i32, ptr %55, align 4, !tbaa !48
  %57 = tail call noundef i32 @_ZN3qpl15perform_extractEP7qpl_jobPhj(ptr noundef nonnull %0, ptr noundef %54, i32 noundef %56)
  br label %115

58:                                               ; preds = %.thread
  %59 = tail call noundef zeroext i1 @_ZN3qpl3jobL7is_scanEPK7qpl_job(ptr noundef nonnull %0) #6
  br i1 %59, label %60, label %66

60:                                               ; preds = %58
  %61 = getelementptr inbounds i8, ptr %32, i64 24
  %62 = load ptr, ptr %61, align 8, !tbaa !46
  %63 = getelementptr inbounds i8, ptr %32, i64 4
  %64 = load i32, ptr %63, align 4, !tbaa !48
  %65 = tail call noundef i32 @_ZN3qpl12perform_scanEP7qpl_jobPhj(ptr noundef nonnull %0, ptr noundef %62, i32 noundef %64)
  br label %115

66:                                               ; preds = %58
  %67 = tail call noundef zeroext i1 @_ZN3qpl3jobL9is_selectEPK7qpl_job(ptr noundef nonnull %0) #6
  br i1 %67, label %68, label %82

68:                                               ; preds = %66
  %69 = getelementptr inbounds i8, ptr %32, i64 24
  %70 = load ptr, ptr %69, align 8, !tbaa !46
  %71 = getelementptr inbounds i8, ptr %32, i64 4
  %72 = load i32, ptr %71, align 4, !tbaa !48
  %73 = getelementptr inbounds i8, ptr %32, i64 32
  %74 = load ptr, ptr %73, align 8, !tbaa !49
  %75 = getelementptr inbounds i8, ptr %32, i64 8
  %76 = load i32, ptr %75, align 8, !tbaa !50
  %77 = getelementptr inbounds i8, ptr %32, i64 40
  %78 = load ptr, ptr %77, align 8, !tbaa !51
  %79 = getelementptr inbounds i8, ptr %32, i64 12
  %80 = load i32, ptr %79, align 4, !tbaa !52
  %81 = tail call noundef i32 @_ZN3qpl14perform_selectEP7qpl_jobPhjS2_jS2_j(ptr noundef nonnull %0, ptr noundef %70, i32 noundef %72, ptr noundef %74, i32 noundef %76, ptr noundef %78, i32 noundef %80)
  br label %115

82:                                               ; preds = %66
  %83 = tail call noundef zeroext i1 @_ZN3qpl3jobL9is_expandEPK7qpl_job(ptr noundef nonnull %0) #6
  br i1 %83, label %84, label %98

84:                                               ; preds = %82
  %85 = getelementptr inbounds i8, ptr %32, i64 24
  %86 = load ptr, ptr %85, align 8, !tbaa !46
  %87 = getelementptr inbounds i8, ptr %32, i64 4
  %88 = load i32, ptr %87, align 4, !tbaa !48
  %89 = getelementptr inbounds i8, ptr %32, i64 32
  %90 = load ptr, ptr %89, align 8, !tbaa !49
  %91 = getelementptr inbounds i8, ptr %32, i64 8
  %92 = load i32, ptr %91, align 8, !tbaa !50
  %93 = getelementptr inbounds i8, ptr %32, i64 40
  %94 = load ptr, ptr %93, align 8, !tbaa !51
  %95 = getelementptr inbounds i8, ptr %32, i64 12
  %96 = load i32, ptr %95, align 4, !tbaa !52
  %97 = tail call noundef i32 @_ZN3qpl14perform_expandEP7qpl_jobPhjS2_jS2_j(ptr noundef nonnull %0, ptr noundef %86, i32 noundef %88, ptr noundef %90, i32 noundef %92, ptr noundef %94, i32 noundef %96)
  br label %115

98:                                               ; preds = %82
  %99 = tail call noundef zeroext i1 @_ZN3qpl3jobL16is_decompressionEPK7qpl_job(ptr noundef nonnull %0) #6
  br i1 %99, label %100, label %102

100:                                              ; preds = %98
  %101 = tail call noundef i32 @_ZN3qpl18perform_decompressILNS_2ml16execution_path_tE1EEEjP7qpl_job(ptr noundef nonnull %0) #6
  br label %115

102:                                              ; preds = %98
  %103 = tail call noundef zeroext i1 @_ZN3qpl3jobL14is_compressionEPK7qpl_job(ptr noundef nonnull %0) #6
  br i1 %103, label %104, label %110

104:                                              ; preds = %102
  %105 = tail call noundef zeroext i1 @_ZN3qpl3jobL19is_indexing_enabledEPK7qpl_job(ptr noundef nonnull %0) #6
  br i1 %105, label %106, label %108

106:                                              ; preds = %104
  %107 = tail call noundef zeroext i1 @_ZN3qpl3jobL12is_multi_jobEPK7qpl_job(ptr noundef nonnull %0) #6
  br i1 %107, label %110, label %108

108:                                              ; preds = %106, %104
  %109 = tail call noundef i32 @_ZN3qpl19perform_compressionILNS_2ml16execution_path_tE1EEEjP7qpl_job(ptr noundef nonnull %0) #6
  br label %115

110:                                              ; preds = %106, %102
  %111 = tail call i32 @hw_submit_job(ptr noundef nonnull %0)
  %112 = icmp eq i32 %111, 0
  br i1 %112, label %113, label %.thread79

113:                                              ; preds = %110
  tail call void @_ZN3qpl3jobL22set_job_to_in_progressEP7qpl_job(ptr noundef nonnull %0) #6
  %114 = tail call i32 @qpl_wait_job(ptr noundef nonnull %0)
  br label %115

115:                                              ; preds = %52, %68, %100, %113, %108, %84, %60
  %.170 = phi i32 [ %57, %52 ], [ %65, %60 ], [ %81, %68 ], [ %97, %84 ], [ %101, %100 ], [ %114, %113 ], [ %109, %108 ]
  %.not77 = icmp eq i32 %.170, 0
  br i1 %.not77, label %118, label %.thread79

.thread79:                                        ; preds = %46, %110, %115
  %.17082 = phi i32 [ %.170, %115 ], [ %49, %46 ], [ %111, %110 ]
  %116 = tail call noundef zeroext i1 @_ZN3qpl3jobL24is_sw_fallback_supportedEPK7qpl_job10qpl_status(ptr noundef nonnull %0, i32 noundef %.17082)
  br i1 %116, label %117, label %118

117:                                              ; preds = %.thread79
  tail call void @_ZN3qpl3jobL21update_is_sw_fallbackEP7qpl_jobb(ptr noundef nonnull %0, i1 noundef zeroext true) #6
  br label %118

118:                                              ; preds = %115, %.thread79, %117, %30
  %.271 = phi i32 [ 0, %30 ], [ %.17082, %117 ], [ %.17082, %.thread79 ], [ 0, %115 ]
  %119 = load i8, ptr %33, align 1, !tbaa !25, !range !42, !noundef !43
  %120 = trunc nuw i8 %119 to i1
  br i1 %120, label %121, label %130

121:                                              ; preds = %118
  %122 = load i32, ptr %10, align 8, !tbaa !21
  store i32 2, ptr %10, align 8, !tbaa !21
  %123 = tail call noundef i32 @_ZL14sw_execute_jobP7qpl_job(ptr noundef nonnull %0)
  store i32 %122, ptr %10, align 8, !tbaa !21
  %124 = icmp eq i32 %123, 0
  br i1 %124, label %125, label %130

125:                                              ; preds = %121
  %126 = icmp eq i32 %122, 0
  br i1 %126, label %127, label %130

127:                                              ; preds = %125
  tail call void @_ZN3qpl3jobL22set_job_to_in_progressEP7qpl_job(ptr noundef nonnull %0) #6
  br label %130

128:                                              ; preds = %9
  %129 = tail call i32 @qpl_submit_job(ptr noundef nonnull %0)
  br label %130

130:                                              ; preds = %28, %128, %118, %127, %125, %121, %5
  %.2 = phi i32 [ 50, %5 ], [ %129, %128 ], [ 87, %28 ], [ 0, %127 ], [ 0, %125 ], [ %123, %121 ], [ %.271, %118 ]
  ret i32 %.2
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL10is_extractEPK7qpl_job(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL7is_scanEPK7qpl_job(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL9is_selectEPK7qpl_job(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL9is_expandEPK7qpl_job(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL16is_decompressionEPK7qpl_job(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl18perform_decompressILNS_2ml16execution_path_tE1EEEjP7qpl_job(ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL14is_compressionEPK7qpl_job(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL19is_indexing_enabledEPK7qpl_job(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN3qpl3jobL12is_multi_jobEPK7qpl_job(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl19perform_compressionILNS_2ml16execution_path_tE1EEEjP7qpl_job(ptr noundef) local_unnamed_addr #3

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 = { 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 36}
!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 64}
!21 = !{!6, !19, i64 232}
!22 = !{!6, !11, i64 32}
!23 = !{!6, !12, i64 52}
!24 = !{!6, !7, i64 208}
!25 = !{!26, !32, i64 39713}
!26 = !{!"_ZTS12qpl_hw_state", !27, i64 0, !29, i64 64, !8, i64 128, !8, i64 10880, !30, i64 38592, !31, i64 39624, !10, i64 39648, !10, i64 39652, !10, i64 39656, !35, i64 39660, !10, i64 39664, !36, i64 39672, !10, i64 39704, !10, i64 39708, !32, i64 39712, !32, i64 39713, !38, i64 39716, !39, i64 39720, !40, i64 39728}
!27 = !{!"_ZTS34hw_decompress_analytics_descriptor", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !28, i64 36, !28, i64 38, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60}
!28 = !{!"short", !8, i64 0}
!29 = !{!"_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, !28, i64 30, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !15, i64 48, !15, i64 56}
!30 = !{!"_ZTS10qpl_buffer", !8, i64 0, !10, i64 1024, !10, i64 1028}
!31 = !{!"_ZTS21qpl_execution_history", !32, i64 0, !33, i64 4, !34, i64 8, !10, i64 12, !7, i64 16}
!32 = !{!"bool", !8, i64 0}
!33 = !{!"_ZTS23qpl_task_execution_step", !8, i64 0}
!34 = !{!"_ZTS14qpl_comp_style", !8, i64 0}
!35 = !{!"_ZTS15hw_huffman_code", !28, i64 0, !8, i64 2, !8, i64 3}
!36 = !{!"_ZTS22hw_accelerator_context", !37, i64 0, !7, i64 24}
!37 = !{!"_ZTS20hw_device_properties", !10, i64 0, !10, i64 4, !10, i64 8, !32, i64 12, !32, i64 13, !32, i64 14, !32, i64 15, !32, i64 16, !32, i64 17, !32, i64 18, !32, i64 19, !32, i64 20, !32, i64 21, !32, i64 22}
!38 = !{!"_ZTS25hw_multidescriptor_status", !8, i64 0}
!39 = !{!"_ZTS10qpl_status", !8, i64 0}
!40 = !{!"_ZTS20qpl_execution_record", !41, i64 0, !10, i64 8, !10, i64 12}
!41 = !{!"double", !8, i64 0}
!42 = !{i8 0, i8 2}
!43 = !{}
!44 = !{!"branch_weights", i32 1, i32 1048575}
!45 = !{!7, !7, i64 0}
!46 = !{!47, !7, i64 24}
!47 = !{!"_ZTS21own_analytics_state_t", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!48 = !{!47, !10, i64 4}
!49 = !{!47, !7, i64 32}
!50 = !{!47, !10, i64 8}
!51 = !{!47, !7, i64 40}
!52 = !{!47, !10, i64 12}


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