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

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

%struct.hw_huffman_code = type { i16, i8, i8 }
%struct.qpl_job = type { ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, ptr, i32, i32, i8, i8, i8, i64, i64, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.qpl_aux_data }
%struct.qpl_aux_data = type { ptr, ptr, ptr, ptr, ptr, i32 }
%struct.qpl_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_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 }

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3qpl2ml30set_state_to_complete_and_wrapEP7qpl_jobP12qpl_hw_statej(ptr noundef, ptr noundef, i32 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3qpl2ml33write_stored_block_and_update_jobEP7qpl_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 ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %struct.hw_huffman_code, align 2
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i8, align 1
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 320, ptr %4, align 4, !tbaa !9
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.qpl_job, ptr %24, i32 0, i32 7
  %26 = load i32, ptr %25, align 4, !tbaa !11
  %27 = and i32 %26, 32
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %1
  store i32 225, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %261

30:                                               ; preds = %1
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.qpl_job, ptr %31, i32 0, i32 15
  %33 = load i32, ptr %32, align 8, !tbaa !22
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %55

35:                                               ; preds = %30
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.qpl_job, ptr %36, i32 0, i32 1
  %38 = load i32, ptr %37, align 8, !tbaa !23
  %39 = icmp ule i32 65536, %38
  br i1 %39, label %40, label %41

40:                                               ; preds = %35
  store i32 103, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %261

41:                                               ; preds = %35
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.qpl_job, ptr %42, i32 0, i32 7
  %44 = load i32, ptr %43, align 4, !tbaa !11
  %45 = and i32 %44, 3
  %46 = icmp ne i32 %45, 3
  br i1 %46, label %47, label %54

47:                                               ; preds = %41
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.qpl_job, ptr %48, i32 0, i32 7
  %50 = load i32, ptr %49, align 4, !tbaa !11
  %51 = and i32 %50, 12289
  %52 = icmp eq i32 0, %51
  br i1 %52, label %53, label %54

53:                                               ; preds = %47
  store i32 103, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %261

54:                                               ; preds = %47, %41
  br label %55

55:                                               ; preds = %54, %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = call noundef ptr @_ZN3qpl3jobL9get_stateEPK7qpl_job(ptr noundef %56) #6
  store ptr %57, ptr %6, align 8, !tbaa !5
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = icmp eq ptr null, %58
  br i1 %59, label %60, label %61

60:                                               ; preds = %55
  store i32 50, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %260

61:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.qpl_hw_state, ptr %62, i32 0, i32 3
  %64 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %63, i64 0, i64 0
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.qpl_hw_state, ptr %65, i32 0, i32 7
  %67 = load i32, ptr %66, align 4, !tbaa !24
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.qpl_hw_state, ptr %68, i32 0, i32 8
  %70 = load i32, ptr %69, align 8, !tbaa !41
  %71 = call noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef %64, i32 noundef %67, i32 noundef %70)
  store ptr %71, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.qpl_hw_state, ptr %72, i32 0, i32 3
  %74 = getelementptr inbounds [2 x %struct.hw_iaa_aecs_compress], ptr %73, i64 0, i64 0
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.qpl_hw_state, ptr %75, i32 0, i32 7
  %77 = load i32, ptr %76, align 4, !tbaa !24
  %78 = xor i32 %77, 1
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.qpl_hw_state, ptr %79, i32 0, i32 8
  %81 = load i32, ptr %80, align 8, !tbaa !41
  %82 = call noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef %74, i32 noundef %78, i32 noundef %81)
  store ptr %82, ptr %8, align 8, !tbaa !5
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = icmp eq ptr %83, null
  br i1 %84, label %88, label %85

85:                                               ; preds = %61
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = icmp eq ptr %86, null
  br i1 %87, label %88, label %89

88:                                               ; preds = %85, %61
  store i32 6, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %259

89:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.qpl_hw_state, ptr %90, i32 0, i32 5
  %92 = getelementptr inbounds %struct.qpl_execution_history, ptr %91, i32 0, i32 1
  %93 = load i32, ptr %92, align 4, !tbaa !42
  %94 = icmp eq i32 1, %93
  br i1 %94, label %95, label %99

95:                                               ; preds = %89
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.qpl_hw_state, ptr %96, i32 0, i32 10
  %98 = load i32, ptr %97, align 8, !tbaa !43
  store i32 %98, ptr %9, align 4, !tbaa !9
  br label %113

99:                                               ; preds = %89
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = call noundef i32 @_ZL48hw_iaa_aecs_compress_accumulator_get_actual_bitsPK20hw_iaa_aecs_compress(ptr noundef %100)
  store i32 %101, ptr %9, align 4, !tbaa !9
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.qpl_hw_state, ptr %103, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %10, ptr align 4 %104, i64 4, i1 false), !tbaa.struct !44
  %105 = load i32, ptr %10, align 2
  call void @hw_iaa_aecs_compress_accumulator_insert_eob(ptr noundef %102, i32 %105)
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.qpl_hw_state, ptr %106, i32 0, i32 9
  %108 = getelementptr inbounds %struct.hw_huffman_code, ptr %107, i32 0, i32 2
  %109 = load i8, ptr %108, align 1, !tbaa !47
  %110 = zext i8 %109 to i32
  %111 = load i32, ptr %9, align 4, !tbaa !9
  %112 = add i32 %111, %110
  store i32 %112, ptr %9, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %99, %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.qpl_job, ptr %114, i32 0, i32 1
  %116 = load i32, ptr %115, align 8, !tbaa !23
  %117 = load i32, ptr %9, align 4, !tbaa !9
  %118 = call noundef i32 @_ZN3qpl2ml11compression21calculate_size_neededEjj(i32 noundef %116, i32 noundef %117) #6
  store i32 %118, ptr %11, align 4, !tbaa !9
  %119 = load i32, ptr %11, align 4, !tbaa !9
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.qpl_job, ptr %120, i32 0, i32 4
  %122 = load i32, ptr %121, align 8, !tbaa !48
  %123 = icmp ugt i32 %119, %122
  br i1 %123, label %124, label %125

124:                                              ; preds = %113
  store i32 2, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %258

125:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.qpl_job, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !49
  store ptr %128, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.qpl_job, ptr %129, i32 0, i32 1
  %131 = load i32, ptr %130, align 8, !tbaa !23
  store i32 %131, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.qpl_job, ptr %132, i32 0, i32 3
  %134 = load ptr, ptr %133, align 8, !tbaa !50
  store ptr %134, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.qpl_job, ptr %135, i32 0, i32 4
  %137 = load i32, ptr %136, align 8, !tbaa !48
  store i32 %137, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !9
  %138 = load i32, ptr %9, align 4, !tbaa !9
  %139 = icmp ule i32 320, %138
  br i1 %139, label %140, label %141

140:                                              ; preds = %125
  store i32 6, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %257

141:                                              ; preds = %125
  %142 = load i32, ptr %9, align 4, !tbaa !9
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %156

144:                                              ; preds = %141
  %145 = load ptr, ptr %7, align 8, !tbaa !5
  %146 = load i32, ptr %9, align 4, !tbaa !9
  call void @hw_iaa_aecs_compress_accumulator_flush(ptr noundef %145, ptr noundef %14, i32 noundef %146)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %147 = load i32, ptr %9, align 4, !tbaa !9
  %148 = udiv i32 %147, 8
  store i32 %148, ptr %17, align 4, !tbaa !9
  %149 = load i32, ptr %17, align 4, !tbaa !9
  %150 = load i32, ptr %16, align 4, !tbaa !9
  %151 = add i32 %150, %149
  store i32 %151, ptr %16, align 4, !tbaa !9
  %152 = load i32, ptr %17, align 4, !tbaa !9
  %153 = load ptr, ptr %14, align 8, !tbaa !5
  %154 = zext i32 %152 to i64
  %155 = getelementptr inbounds i8, ptr %153, i64 %154
  store ptr %155, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %159

156:                                              ; preds = %141
  %157 = load ptr, ptr %7, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.hw_iaa_aecs_compress, ptr %157, i32 0, i32 3
  store i32 0, ptr %158, align 4, !tbaa !51
  br label %159

159:                                              ; preds = %156, %144
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.qpl_job, ptr %160, i32 0, i32 7
  %162 = load i32, ptr %161, align 4, !tbaa !11
  %163 = and i32 2, %162
  %164 = icmp ne i32 %163, 0
  %165 = zext i1 %164 to i8
  store i8 %165, ptr %18, align 1, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %166 = load ptr, ptr %12, align 8, !tbaa !5
  %167 = load i32, ptr %13, align 4, !tbaa !9
  %168 = load ptr, ptr %14, align 8, !tbaa !5
  %169 = load i32, ptr %15, align 4, !tbaa !9
  %170 = load i32, ptr %9, align 4, !tbaa !9
  %171 = and i32 %170, 7
  %172 = load i8, ptr %18, align 1, !tbaa !54, !range !55, !noundef !56
  %173 = trunc i8 %172 to i1
  %174 = call noundef i64 @_ZN3qpl2ml11compression19write_stored_blocksEPhjS2_jjb(ptr noundef %166, i32 noundef %167, ptr noundef %168, i32 noundef %169, i32 noundef %171, i1 noundef zeroext %173) #6
  store i64 %174, ptr %19, align 8, !tbaa !57
  %175 = load i64, ptr %19, align 8, !tbaa !57
  %176 = icmp slt i64 %175, 0
  br i1 %176, label %177, label %178

177:                                              ; preds = %159
  store i32 2, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %256

178:                                              ; preds = %159
  %179 = load i64, ptr %19, align 8, !tbaa !57
  %180 = trunc i64 %179 to i32
  %181 = load i32, ptr %16, align 4, !tbaa !9
  %182 = add i32 %181, %180
  store i32 %182, ptr %16, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !9
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZL34hw_iaa_aecs_compress_get_checksumsPK20hw_iaa_aecs_compressPjS2_(ptr noundef %184, ptr noundef %20, ptr noundef %21)
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.qpl_job, ptr %185, i32 0, i32 7
  %187 = load i32, ptr %186, align 4, !tbaa !11
  %188 = and i32 %187, 4
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %198, label %190

190:                                              ; preds = %183
  %191 = load ptr, ptr %12, align 8, !tbaa !5
  %192 = load ptr, ptr %12, align 8, !tbaa !5
  %193 = load i32, ptr %13, align 4, !tbaa !9
  %194 = zext i32 %193 to i64
  %195 = getelementptr inbounds i8, ptr %192, i64 %194
  %196 = load i32, ptr %20, align 4, !tbaa !9
  %197 = call noundef i32 @_ZN3qpl2ml4util10crc32_gzipIPKhEEjT_S5_j(ptr noundef %191, ptr noundef %195, i32 noundef %196) #6
  br label %206

198:                                              ; preds = %183
  %199 = load ptr, ptr %12, align 8, !tbaa !5
  %200 = load ptr, ptr %12, align 8, !tbaa !5
  %201 = load i32, ptr %13, align 4, !tbaa !9
  %202 = zext i32 %201 to i64
  %203 = getelementptr inbounds i8, ptr %200, i64 %202
  %204 = load i32, ptr %20, align 4, !tbaa !9
  %205 = call noundef i32 @_ZN3qpl2ml4util15crc32_iscsi_invIPKhEEjT_S5_j(ptr noundef %199, ptr noundef %203, i32 noundef %204) #6
  br label %206

206:                                              ; preds = %198, %190
  %207 = phi i32 [ %197, %190 ], [ %205, %198 ]
  store i32 %207, ptr %20, align 4, !tbaa !9
  %208 = load ptr, ptr %12, align 8, !tbaa !5
  %209 = load ptr, ptr %12, align 8, !tbaa !5
  %210 = load i32, ptr %13, align 4, !tbaa !9
  %211 = zext i32 %210 to i64
  %212 = getelementptr inbounds i8, ptr %209, i64 %211
  %213 = load i32, ptr %21, align 4, !tbaa !9
  %214 = call noundef i32 @_ZN3qpl2ml4util12xor_checksumIPKhEEjT_S5_j(ptr noundef %208, ptr noundef %212, i32 noundef %213) #6
  store i32 %214, ptr %21, align 4, !tbaa !9
  %215 = load ptr, ptr %8, align 8, !tbaa !5
  %216 = load i32, ptr %20, align 4, !tbaa !9
  %217 = load i32, ptr %21, align 4, !tbaa !9
  call void @_ZL34hw_iaa_aecs_compress_set_checksumsP20hw_iaa_aecs_compressjj(ptr noundef %215, i32 noundef %216, i32 noundef %217)
  %218 = load ptr, ptr %3, align 8, !tbaa !5
  %219 = load i32, ptr %20, align 4, !tbaa !9
  %220 = load i32, ptr %21, align 4, !tbaa !9
  call void @_ZN3qpl3jobL16update_checksumsEP7qpl_jobjj(ptr noundef %218, i32 noundef %219, i32 noundef %220) #6
  %221 = load i32, ptr %20, align 4, !tbaa !9
  %222 = load ptr, ptr %6, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.qpl_hw_state, ptr %222, i32 0, i32 5
  %224 = getelementptr inbounds %struct.qpl_execution_history, ptr %223, i32 0, i32 3
  store i32 %221, ptr %224, align 4, !tbaa !58
  %225 = load ptr, ptr %3, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.qpl_job, ptr %225, i32 0, i32 7
  %227 = load i32, ptr %226, align 4, !tbaa !11
  %228 = and i32 524288, %227
  %229 = icmp ne i32 %228, 0
  br i1 %229, label %230, label %239

230:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %231 = load ptr, ptr %3, align 8, !tbaa !5
  %232 = call noundef i32 @_ZN3qpl3jobL11get_adler32EPK7qpl_job(ptr noundef %231) #6
  store i32 %232, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %233 = load ptr, ptr %12, align 8, !tbaa !5
  %234 = load i32, ptr %13, align 4, !tbaa !9
  %235 = load i32, ptr %22, align 4, !tbaa !9
  %236 = call noundef i32 @_ZN3qpl2ml4util7adler32EPKhjj(ptr noundef %233, i32 noundef %234, i32 noundef %235) #6
  store i32 %236, ptr %23, align 4, !tbaa !9
  %237 = load ptr, ptr %3, align 8, !tbaa !5
  %238 = load i32, ptr %23, align 4, !tbaa !9
  call void @_ZN3qpl3jobL14update_adler32EP7qpl_jobj(ptr noundef %237, i32 noundef %238) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %239

239:                                              ; preds = %230, %206
  %240 = load ptr, ptr %3, align 8, !tbaa !5
  %241 = load i32, ptr %16, align 4, !tbaa !9
  call void @_ZN3qpl3jobL20update_output_streamEP7qpl_jobjj(ptr noundef %240, i32 noundef %241, i32 noundef 0) #6
  %242 = load i8, ptr %18, align 1, !tbaa !54, !range !55, !noundef !56
  %243 = trunc i8 %242 to i1
  br i1 %243, label %244, label %249

244:                                              ; preds = %239
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = load ptr, ptr %6, align 8, !tbaa !5
  %247 = load i32, ptr %20, align 4, !tbaa !9
  %248 = call noundef i32 @_ZN3qpl2ml30set_state_to_complete_and_wrapEP7qpl_jobP12qpl_hw_statej(ptr noundef %245, ptr noundef %246, i32 noundef %247)
  br label %253

249:                                              ; preds = %239
  %250 = load ptr, ptr %6, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.qpl_hw_state, ptr %250, i32 0, i32 5
  %252 = getelementptr inbounds %struct.qpl_execution_history, ptr %251, i32 0, i32 1
  store i32 1, ptr %252, align 4, !tbaa !42
  br label %253

253:                                              ; preds = %249, %244
  %254 = load ptr, ptr %3, align 8, !tbaa !5
  %255 = load i32, ptr %13, align 4, !tbaa !9
  call void @_ZN3qpl3jobL19update_input_streamEP7qpl_jobj(ptr noundef %254, i32 noundef %255) #6
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %256

256:                                              ; preds = %253, %177
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  br label %257

257:                                              ; preds = %256, %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %258

258:                                              ; preds = %257, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %259

259:                                              ; preds = %258, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %260

260:                                              ; preds = %259, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %261

261:                                              ; preds = %260, %53, %40, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  %262 = load i32, ptr %2, align 4
  ret i32 %262
}

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

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

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

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

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

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression21calculate_size_neededEjj(i32 noundef, i32 noundef) #5

declare void @hw_iaa_aecs_compress_accumulator_flush(ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind
declare noundef i64 @_ZN3qpl2ml11compression19write_stored_blocksEPhjS2_jjb(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i1 noundef zeroext) #5

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

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

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

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

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

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

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml4util7adler32EPKhjj(ptr noundef, i32 noundef, i32 noundef) #5

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 36}
!12 = !{!"_ZTS7qpl_job", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16, !10, i64 24, !10, i64 28, !13, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !14, i64 52, !15, i64 56, !6, i64 64, !6, i64 72, !16, i64 80, !6, i64 88, !10, i64 96, !10, i64 100, !7, i64 104, !7, i64 105, !7, i64 106, !17, i64 112, !17, i64 120, !6, i64 128, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !18, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !19, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !20, i64 192}
!13 = !{!"_ZTS13qpl_operation", !7, i64 0}
!14 = !{!"_ZTS22qpl_compression_levels", !7, i64 0}
!15 = !{!"_ZTS19qpl_statistics_mode", !7, i64 0}
!16 = !{!"_ZTS19qpl_mini_block_size", !7, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTS14qpl_out_format", !7, i64 0}
!19 = !{!"_ZTS10qpl_parser", !7, i64 0}
!20 = !{!"_ZTS12qpl_aux_data", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !21, i64 40}
!21 = !{!"_ZTS10qpl_path_t", !7, i64 0}
!22 = !{!12, !16, i64 80}
!23 = !{!12, !10, i64 8}
!24 = !{!25, !10, i64 39652}
!25 = !{!"_ZTS12qpl_hw_state", !26, i64 0, !28, i64 64, !7, i64 128, !7, i64 10880, !29, i64 38592, !30, i64 39624, !10, i64 39648, !10, i64 39652, !10, i64 39656, !34, i64 39660, !10, i64 39664, !35, i64 39672, !10, i64 39704, !10, i64 39708, !31, i64 39712, !31, i64 39713, !37, i64 39716, !38, i64 39720, !39, i64 39728}
!26 = !{!"_ZTS34hw_decompress_analytics_descriptor", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !27, i64 36, !27, i64 38, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60}
!27 = !{!"short", !7, i64 0}
!28 = !{!"_ZTS24hw_iaa_completion_record", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !10, i64 4, !17, i64 8, !17, i64 16, !10, i64 24, !7, i64 28, !7, i64 29, !27, i64 30, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !17, i64 48, !17, i64 56}
!29 = !{!"_ZTS10qpl_buffer", !7, i64 0, !10, i64 1024, !10, i64 1028}
!30 = !{!"_ZTS21qpl_execution_history", !31, i64 0, !32, i64 4, !33, i64 8, !10, i64 12, !6, i64 16}
!31 = !{!"bool", !7, i64 0}
!32 = !{!"_ZTS23qpl_task_execution_step", !7, i64 0}
!33 = !{!"_ZTS14qpl_comp_style", !7, i64 0}
!34 = !{!"_ZTS15hw_huffman_code", !27, i64 0, !7, i64 2, !7, i64 3}
!35 = !{!"_ZTS22hw_accelerator_context", !36, i64 0, !6, i64 24}
!36 = !{!"_ZTS20hw_device_properties", !10, i64 0, !10, i64 4, !10, i64 8, !31, i64 12, !31, i64 13, !31, i64 14, !31, i64 15, !31, i64 16, !31, i64 17, !31, i64 18, !31, i64 19, !31, i64 20, !31, i64 21, !31, i64 22}
!37 = !{!"_ZTS25hw_multidescriptor_status", !7, i64 0}
!38 = !{!"_ZTS10qpl_status", !7, i64 0}
!39 = !{!"_ZTS20qpl_execution_record", !40, i64 0, !10, i64 8, !10, i64 12}
!40 = !{!"double", !7, i64 0}
!41 = !{!25, !10, i64 39656}
!42 = !{!25, !32, i64 39628}
!43 = !{!25, !10, i64 39664}
!44 = !{i64 0, i64 2, !45, i64 2, i64 1, !46, i64 3, i64 1, !46}
!45 = !{!27, !27, i64 0}
!46 = !{!7, !7, i64 0}
!47 = !{!25, !7, i64 39663}
!48 = !{!12, !10, i64 24}
!49 = !{!12, !6, i64 0}
!50 = !{!12, !6, i64 16}
!51 = !{!52, !10, i64 28}
!52 = !{!"_ZTS20hw_iaa_aecs_compress", !10, i64 0, !10, i64 4, !7, i64 8, !10, i64 28, !7, i64 32, !53, i64 288, !7, i64 1568}
!53 = !{!"_ZTS16hw_iaa_histogram", !7, i64 0, !7, i64 1144, !7, i64 1152, !7, i64 1272}
!54 = !{!31, !31, i64 0}
!55 = !{i8 0, i8 2}
!56 = !{}
!57 = !{!17, !17, i64 0}
!58 = !{!25, !10, i64 39636}


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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 226) i32 @_ZN3qpl2ml33write_stored_block_and_update_jobEP7qpl_job(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = getelementptr inbounds i8, ptr %0, i64 36
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = and i32 %6, 32
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %8, label %112

8:                                                ; preds = %1
  %9 = getelementptr inbounds i8, ptr %0, i64 80
  %10 = load i32, ptr %9, align 8, !tbaa !20
  %.not84 = icmp eq i32 %10, 0
  br i1 %.not84, label %19, label %11

11:                                               ; preds = %8
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load i32, ptr %12, align 8, !tbaa !21
  %14 = icmp ugt i32 %13, 65535
  br i1 %14, label %112, label %15

15:                                               ; preds = %11
  %16 = and i32 %6, 3
  %.not85 = icmp ne i32 %16, 3
  %17 = and i32 %6, 12289
  %18 = icmp eq i32 %17, 0
  %or.cond90 = and i1 %.not85, %18
  br i1 %or.cond90, label %112, label %19

19:                                               ; preds = %15, %8
  %20 = tail call noundef ptr @_ZN3qpl3jobL9get_stateEPK7qpl_job(ptr noundef nonnull %0) #5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %112, label %22

22:                                               ; preds = %19
  %23 = getelementptr inbounds i8, ptr %20, i64 10880
  %24 = getelementptr inbounds i8, ptr %20, i64 39652
  %25 = load i32, ptr %24, align 4, !tbaa !22
  %26 = getelementptr inbounds i8, ptr %20, i64 39656
  %27 = load i32, ptr %26, align 8, !tbaa !39
  %28 = tail call noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef nonnull %23, i32 noundef %25, i32 noundef %27)
  %29 = load i32, ptr %24, align 4, !tbaa !22
  %30 = xor i32 %29, 1
  %31 = load i32, ptr %26, align 8, !tbaa !39
  %32 = tail call noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef nonnull %23, i32 noundef %30, i32 noundef %31)
  %33 = icmp eq ptr %28, null
  %34 = icmp eq ptr %32, null
  %or.cond = or i1 %33, %34
  br i1 %or.cond, label %112, label %35

35:                                               ; preds = %22
  %36 = getelementptr inbounds i8, ptr %20, i64 39628
  %37 = load i32, ptr %36, align 4, !tbaa !40
  %38 = icmp eq i32 %37, 1
  br i1 %38, label %39, label %42

39:                                               ; preds = %35
  %40 = getelementptr inbounds i8, ptr %20, i64 39664
  %41 = load i32, ptr %40, align 8, !tbaa !41
  br label %49

42:                                               ; preds = %35
  %43 = tail call noundef i32 @_ZL48hw_iaa_aecs_compress_accumulator_get_actual_bitsPK20hw_iaa_aecs_compress(ptr noundef nonnull %28)
  %44 = getelementptr inbounds i8, ptr %20, i64 39660
  %.sroa.0.0.copyload = load i32, ptr %44, align 4
  tail call void @hw_iaa_aecs_compress_accumulator_insert_eob(ptr noundef nonnull %28, i32 %.sroa.0.0.copyload)
  %45 = getelementptr inbounds i8, ptr %20, i64 39663
  %46 = load i8, ptr %45, align 1, !tbaa !42
  %47 = zext i8 %46 to i32
  %48 = add i32 %43, %47
  br label %49

49:                                               ; preds = %42, %39
  %.078 = phi i32 [ %41, %39 ], [ %48, %42 ]
  %50 = getelementptr inbounds i8, ptr %0, i64 8
  %51 = load i32, ptr %50, align 8, !tbaa !21
  %52 = tail call noundef i32 @_ZN3qpl2ml11compression21calculate_size_neededEjj(i32 noundef %51, i32 noundef %.078) #5
  %53 = getelementptr inbounds i8, ptr %0, i64 24
  %54 = load i32, ptr %53, align 8, !tbaa !43
  %55 = icmp ugt i32 %52, %54
  br i1 %55, label %112, label %56

56:                                               ; preds = %49
  %57 = load ptr, ptr %0, align 8, !tbaa !44
  %58 = load i32, ptr %50, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %59 = getelementptr inbounds i8, ptr %0, i64 16
  %60 = load ptr, ptr %59, align 8, !tbaa !45
  store ptr %60, ptr %2, align 8, !tbaa !46
  %61 = icmp ugt i32 %.078, 319
  br i1 %61, label %111, label %62

62:                                               ; preds = %56
  %.not86 = icmp eq i32 %.078, 0
  br i1 %.not86, label %68, label %63

63:                                               ; preds = %62
  call void @hw_iaa_aecs_compress_accumulator_flush(ptr noundef nonnull %28, ptr noundef nonnull %2, i32 noundef %.078)
  %64 = lshr i32 %.078, 3
  %65 = load ptr, ptr %2, align 8, !tbaa !46
  %66 = zext nneg i32 %64 to i64
  %67 = getelementptr inbounds i8, ptr %65, i64 %66
  store ptr %67, ptr %2, align 8, !tbaa !46
  br label %70

68:                                               ; preds = %62
  %69 = getelementptr inbounds i8, ptr %28, i64 28
  store i32 0, ptr %69, align 4, !tbaa !47
  br label %70

70:                                               ; preds = %68, %63
  %71 = phi ptr [ %67, %63 ], [ %60, %68 ]
  %.079 = phi i32 [ %64, %63 ], [ 0, %68 ]
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = and i32 %72, 2
  %74 = icmp ne i32 %73, 0
  %75 = and i32 %.078, 7
  %76 = call noundef i64 @_ZN3qpl2ml11compression19write_stored_blocksEPhjS2_jjb(ptr noundef %57, i32 noundef %58, ptr noundef %71, i32 noundef %54, i32 noundef %75, i1 noundef zeroext %74) #5
  %77 = icmp slt i64 %76, 0
  br i1 %77, label %111, label %78

78:                                               ; preds = %70
  %79 = trunc i64 %76 to i32
  %80 = add i32 %.079, %79
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  store i32 0, ptr %3, align 4, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 0, ptr %4, align 4, !tbaa !50
  call void @_ZL34hw_iaa_aecs_compress_get_checksumsPK20hw_iaa_aecs_compressPjS2_(ptr noundef nonnull %28, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = and i32 %81, 4
  %.not87 = icmp eq i32 %82, 0
  %83 = zext i32 %58 to i64
  %84 = getelementptr inbounds i8, ptr %57, i64 %83
  %85 = load i32, ptr %3, align 4, !tbaa !50
  br i1 %.not87, label %86, label %88

86:                                               ; preds = %78
  %87 = call noundef i32 @_ZN3qpl2ml4util10crc32_gzipIPKhEEjT_S5_j(ptr noundef %57, ptr noundef %84, i32 noundef %85) #5
  br label %90

88:                                               ; preds = %78
  %89 = call noundef i32 @_ZN3qpl2ml4util15crc32_iscsi_invIPKhEEjT_S5_j(ptr noundef %57, ptr noundef %84, i32 noundef %85) #5
  br label %90

90:                                               ; preds = %88, %86
  %91 = phi i32 [ %89, %88 ], [ %87, %86 ]
  store i32 %91, ptr %3, align 4, !tbaa !50
  %92 = getelementptr inbounds i8, ptr %57, i64 %83
  %93 = load i32, ptr %4, align 4, !tbaa !50
  %94 = call noundef i32 @_ZN3qpl2ml4util12xor_checksumIPKhEEjT_S5_j(ptr noundef %57, ptr noundef %92, i32 noundef %93) #5
  store i32 %94, ptr %4, align 4, !tbaa !50
  %95 = load i32, ptr %3, align 4, !tbaa !50
  call void @_ZL34hw_iaa_aecs_compress_set_checksumsP20hw_iaa_aecs_compressjj(ptr noundef nonnull %32, i32 noundef %95, i32 noundef %94)
  %96 = load i32, ptr %3, align 4, !tbaa !50
  %97 = load i32, ptr %4, align 4, !tbaa !50
  call void @_ZN3qpl3jobL16update_checksumsEP7qpl_jobjj(ptr noundef nonnull %0, i32 noundef %96, i32 noundef %97) #5
  %98 = load i32, ptr %3, align 4, !tbaa !50
  %99 = getelementptr inbounds i8, ptr %20, i64 39636
  store i32 %98, ptr %99, align 4, !tbaa !51
  %100 = load i32, ptr %5, align 4, !tbaa !5
  %101 = and i32 %100, 524288
  %.not88 = icmp eq i32 %101, 0
  br i1 %.not88, label %105, label %102

102:                                              ; preds = %90
  %103 = call noundef i32 @_ZN3qpl3jobL11get_adler32EPK7qpl_job(ptr noundef nonnull %0) #5
  %104 = call noundef i32 @_ZN3qpl2ml4util7adler32EPKhjj(ptr noundef %57, i32 noundef %58, i32 noundef %103) #5
  call void @_ZN3qpl3jobL14update_adler32EP7qpl_jobj(ptr noundef nonnull %0, i32 noundef %104) #5
  br label %105

105:                                              ; preds = %102, %90
  call void @_ZN3qpl3jobL20update_output_streamEP7qpl_jobjj(ptr noundef nonnull %0, i32 noundef %80, i32 noundef 0) #5
  br i1 %74, label %106, label %109

106:                                              ; preds = %105
  %107 = load i32, ptr %3, align 4, !tbaa !50
  %108 = call noundef i32 @_ZN3qpl2ml30set_state_to_complete_and_wrapEP7qpl_jobP12qpl_hw_statej(ptr noundef nonnull %0, ptr noundef nonnull %20, i32 noundef %107)
  br label %110

109:                                              ; preds = %105
  store i32 1, ptr %36, align 4, !tbaa !40
  br label %110

110:                                              ; preds = %109, %106
  call void @_ZN3qpl3jobL19update_input_streamEP7qpl_jobj(ptr noundef nonnull %0, i32 noundef %58) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %111

111:                                              ; preds = %110, %70, %56
  %.1 = phi i32 [ 6, %56 ], [ 0, %110 ], [ 2, %70 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  br label %112

112:                                              ; preds = %19, %111, %49, %22, %15, %11, %1
  %.5 = phi i32 [ 225, %1 ], [ 103, %11 ], [ 103, %15 ], [ 50, %19 ], [ 6, %22 ], [ %.1, %111 ], [ 2, %49 ]
  ret i32 %.5
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN3qpl3jobL9get_stateEPK7qpl_job(ptr noundef) local_unnamed_addr #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 #2

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

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

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression21calculate_size_neededEjj(i32 noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: nounwind
declare noundef i64 @_ZN3qpl2ml11compression19write_stored_blocksEPhjS2_jjb(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #4

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

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

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

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

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

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

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml4util7adler32EPKhjj(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { "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 "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 = { 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, !14, i64 80}
!21 = !{!6, !10, i64 8}
!22 = !{!23, !10, i64 39652}
!23 = !{!"_ZTS12qpl_hw_state", !24, i64 0, !26, i64 64, !8, i64 128, !8, i64 10880, !27, i64 38592, !28, i64 39624, !10, i64 39648, !10, i64 39652, !10, i64 39656, !32, i64 39660, !10, i64 39664, !33, i64 39672, !10, i64 39704, !10, i64 39708, !29, i64 39712, !29, i64 39713, !35, i64 39716, !36, i64 39720, !37, i64 39728}
!24 = !{!"_ZTS34hw_decompress_analytics_descriptor", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !25, i64 36, !25, i64 38, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60}
!25 = !{!"short", !8, i64 0}
!26 = !{!"_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, !25, i64 30, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !15, i64 48, !15, i64 56}
!27 = !{!"_ZTS10qpl_buffer", !8, i64 0, !10, i64 1024, !10, i64 1028}
!28 = !{!"_ZTS21qpl_execution_history", !29, i64 0, !30, i64 4, !31, i64 8, !10, i64 12, !7, i64 16}
!29 = !{!"bool", !8, i64 0}
!30 = !{!"_ZTS23qpl_task_execution_step", !8, i64 0}
!31 = !{!"_ZTS14qpl_comp_style", !8, i64 0}
!32 = !{!"_ZTS15hw_huffman_code", !25, i64 0, !8, i64 2, !8, i64 3}
!33 = !{!"_ZTS22hw_accelerator_context", !34, i64 0, !7, i64 24}
!34 = !{!"_ZTS20hw_device_properties", !10, i64 0, !10, i64 4, !10, i64 8, !29, i64 12, !29, i64 13, !29, i64 14, !29, i64 15, !29, i64 16, !29, i64 17, !29, i64 18, !29, i64 19, !29, i64 20, !29, i64 21, !29, i64 22}
!35 = !{!"_ZTS25hw_multidescriptor_status", !8, i64 0}
!36 = !{!"_ZTS10qpl_status", !8, i64 0}
!37 = !{!"_ZTS20qpl_execution_record", !38, i64 0, !10, i64 8, !10, i64 12}
!38 = !{!"double", !8, i64 0}
!39 = !{!23, !10, i64 39656}
!40 = !{!23, !30, i64 39628}
!41 = !{!23, !10, i64 39664}
!42 = !{!23, !8, i64 39663}
!43 = !{!6, !10, i64 24}
!44 = !{!6, !7, i64 0}
!45 = !{!6, !7, i64 16}
!46 = !{!7, !7, i64 0}
!47 = !{!48, !10, i64 28}
!48 = !{!"_ZTS20hw_iaa_aecs_compress", !10, i64 0, !10, i64 4, !8, i64 8, !10, i64 28, !8, i64 32, !49, i64 288, !8, i64 1568}
!49 = !{!"_ZTS16hw_iaa_histogram", !8, i64 0, !8, i64 1144, !8, i64 1152, !8, i64 1272}
!50 = !{!10, !10, i64 0}
!51 = !{!23, !10, i64 39636}


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