; LLVM IR from intel/qpl :: sources/middle-layer/compression/deflate/compression_units (stored_block_units)

; 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::ml::compression::compression_operation_result_t" = type { i32, i32, i32, i32, i32, %"struct.qpl::ml::checksums_t", i32, %struct.qpl_execution_record }
%"struct.qpl::ml::checksums_t" = type { i32, i32, i32 }
%struct.qpl_execution_record = type { double, i32, i32 }
%struct.hw_huffman_code = type { i16, i8, i8 }
%"class.qpl::ml::compression::deflate_state.0" = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i32, i32, ptr, ptr, ptr }
%"struct.qpl::ml::compression::deflate_state<qpl::ml::execution_path_t::hardware>::meta_data" = type { i8, i32, %struct.hw_huffman_code, ptr, i32, i32, i8, i32 }
%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] }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3qpl2ml11compression19write_stored_blocksEPhjS2_jjb(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i1 noundef zeroext) #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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3qpl2ml11compression21calculate_size_neededEjj(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3qpl2ml11compression18write_stored_blockERNS1_13deflate_stateILNS0_16execution_path_tE1EEE(ptr dead_on_unwind noalias writable sret(%"struct.qpl::ml::compression::compression_operation_result_t") align 8 %0, ptr noundef nonnull align 8 dereferenceable(88) %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca %struct.hw_huffman_code, align 2
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  store ptr %1, 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
  call void @_ZN3qpl2ml11compression30compression_operation_result_tC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %22, i32 0, i32 10
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds %"struct.qpl::ml::compression::deflate_state<qpl::ml::execution_path_t::hardware>::meta_data", ptr %24, i32 0, i32 3
  %26 = load ptr, ptr %25, align 8, !tbaa !16
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %27, i32 0, i32 10
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = getelementptr inbounds %"struct.qpl::ml::compression::deflate_state<qpl::ml::execution_path_t::hardware>::meta_data", ptr %29, i32 0, i32 0
  %31 = load i8, ptr %30, align 8, !tbaa !21
  %32 = zext i8 %31 to i32
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %33, i32 0, i32 10
  %35 = load ptr, ptr %34, align 8, !tbaa !11
  %36 = getelementptr inbounds %"struct.qpl::ml::compression::deflate_state<qpl::ml::execution_path_t::hardware>::meta_data", ptr %35, i32 0, i32 7
  %37 = load i32, ptr %36, align 4, !tbaa !22
  %38 = invoke noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef %26, i32 noundef %32, i32 noundef %37)
          to label %39 unwind label %229

39:                                               ; preds = %2
  store ptr %38, ptr %5, align 8, !tbaa !5
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %44, label %42

42:                                               ; preds = %39
  %43 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  store i32 6, ptr %43, align 8, !tbaa !23
  store i32 1, ptr %6, align 4
  br label %228

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %45, i32 0, i32 1
  %47 = load ptr, ptr %46, align 8, !tbaa !28
  invoke void @_ZL34hw_iaa_descriptor_get_input_bufferP13hw_descriptorPPhPj(ptr noundef %47, ptr noundef %7, ptr noundef %8)
          to label %48 unwind label %229

48:                                               ; preds = %44
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %49, i32 0, i32 1
  %51 = load ptr, ptr %50, align 8, !tbaa !28
  invoke void @_ZL35hw_iaa_descriptor_get_output_bufferP13hw_descriptorPPhPj(ptr noundef %51, ptr noundef %9, ptr noundef %10)
          to label %52 unwind label %229

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = call noundef zeroext i1 @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE1EE14is_first_chunkEv(ptr noundef nonnull align 8 dereferenceable(88) %53) #6
  br i1 %54, label %61, label %55

55:                                               ; preds = %52
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %56, i32 0, i32 6
  %58 = load i8, ptr %57, align 8, !tbaa !29, !range !30, !noundef !31
  %59 = trunc i8 %58 to i1
  %60 = xor i1 %59, true
  br label %61

61:                                               ; preds = %55, %52
  %62 = phi i1 [ false, %52 ], [ %60, %55 ]
  %63 = zext i1 %62 to i8
  store i8 %63, ptr %11, align 1, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !9
  %64 = load i8, ptr %11, align 1, !tbaa !32, !range !30, !noundef !31
  %65 = trunc i8 %64 to i1
  br i1 %65, label %72, label %66

66:                                               ; preds = %61
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %67, i32 0, i32 10
  %69 = load ptr, ptr %68, align 8, !tbaa !11
  %70 = getelementptr inbounds %"struct.qpl::ml::compression::deflate_state<qpl::ml::execution_path_t::hardware>::meta_data", ptr %69, i32 0, i32 1
  %71 = load i32, ptr %70, align 4, !tbaa !33
  store i32 %71, ptr %12, align 4, !tbaa !9
  br label %92

72:                                               ; preds = %61
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = invoke noundef i32 @_ZL48hw_iaa_aecs_compress_accumulator_get_actual_bitsPK20hw_iaa_aecs_compress(ptr noundef %73)
          to label %75 unwind label %229

75:                                               ; preds = %72
  store i32 %74, ptr %12, align 4, !tbaa !9
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %77, i32 0, i32 10
  %79 = load ptr, ptr %78, align 8, !tbaa !11
  %80 = getelementptr inbounds %"struct.qpl::ml::compression::deflate_state<qpl::ml::execution_path_t::hardware>::meta_data", ptr %79, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %13, ptr align 8 %80, i64 4, i1 false), !tbaa.struct !34
  %81 = load i32, ptr %13, align 2
  invoke void @hw_iaa_aecs_compress_accumulator_insert_eob(ptr noundef %76, i32 %81)
          to label %82 unwind label %229

82:                                               ; preds = %75
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %83, i32 0, i32 10
  %85 = load ptr, ptr %84, align 8, !tbaa !11
  %86 = getelementptr inbounds %"struct.qpl::ml::compression::deflate_state<qpl::ml::execution_path_t::hardware>::meta_data", ptr %85, i32 0, i32 2
  %87 = getelementptr inbounds %struct.hw_huffman_code, ptr %86, i32 0, i32 2
  %88 = load i8, ptr %87, align 1, !tbaa !37
  %89 = zext i8 %88 to i32
  %90 = load i32, ptr %12, align 4, !tbaa !9
  %91 = add i32 %90, %89
  store i32 %91, ptr %12, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %82, %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %93 = load i32, ptr %8, align 4, !tbaa !9
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = call noundef i32 @_ZN3qpl2ml11compression21calculate_size_neededEjj(i32 noundef %93, i32 noundef %94) #6
  store i32 %95, ptr %14, align 4, !tbaa !9
  %96 = load i32, ptr %14, align 4, !tbaa !9
  %97 = load i32, ptr %10, align 4, !tbaa !9
  %98 = icmp ugt i32 %96, %97
  br i1 %98, label %99, label %101

99:                                               ; preds = %92
  %100 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  store i32 2, ptr %100, align 8, !tbaa !23
  store i32 1, ptr %6, align 4
  br label %227

101:                                              ; preds = %92
  %102 = load i32, ptr %12, align 4, !tbaa !9
  %103 = icmp ule i32 320, %102
  br i1 %103, label %104, label %106

104:                                              ; preds = %101
  %105 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  store i32 6, ptr %105, align 8, !tbaa !23
  store i32 1, ptr %6, align 4
  br label %227

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !9
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %122

109:                                              ; preds = %106
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = load i32, ptr %12, align 4, !tbaa !9
  invoke void @hw_iaa_aecs_compress_accumulator_flush(ptr noundef %110, ptr noundef %9, i32 noundef %111)
          to label %112 unwind label %229

112:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %113 = load i32, ptr %12, align 4, !tbaa !9
  %114 = udiv i32 %113, 8
  store i32 %114, ptr %16, align 4, !tbaa !9
  %115 = load i32, ptr %16, align 4, !tbaa !9
  %116 = load i32, ptr %15, align 4, !tbaa !9
  %117 = add i32 %116, %115
  store i32 %117, ptr %15, align 4, !tbaa !9
  %118 = load i32, ptr %16, align 4, !tbaa !9
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = zext i32 %118 to i64
  %121 = getelementptr inbounds i8, ptr %119, i64 %120
  store ptr %121, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %125

122:                                              ; preds = %106
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.hw_iaa_aecs_compress, ptr %123, i32 0, i32 3
  store i32 0, ptr %124, align 4, !tbaa !38
  br label %125

125:                                              ; preds = %122, %112
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = load i32, ptr %8, align 4, !tbaa !9
  %128 = load ptr, ptr %9, align 8, !tbaa !5
  %129 = load i32, ptr %10, align 4, !tbaa !9
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = and i32 %130, 7
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = call noundef zeroext i1 @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE1EE13is_last_chunkEv(ptr noundef nonnull align 8 dereferenceable(88) %132) #6
  %134 = call noundef i64 @_ZN3qpl2ml11compression19write_stored_blocksEPhjS2_jjb(ptr noundef %126, i32 noundef %127, ptr noundef %128, i32 noundef %129, i32 noundef %131, i1 noundef zeroext %133) #6
  store i64 %134, ptr %17, align 8, !tbaa !41
  %135 = load i64, ptr %17, align 8, !tbaa !41
  %136 = icmp slt i64 %135, 0
  br i1 %136, label %137, label %139

137:                                              ; preds = %125
  %138 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  store i32 2, ptr %138, align 8, !tbaa !23
  store i32 1, ptr %6, align 4
  br label %226

139:                                              ; preds = %125
  %140 = load i64, ptr %17, align 8, !tbaa !41
  %141 = trunc i64 %140 to i32
  %142 = load i32, ptr %15, align 4, !tbaa !9
  %143 = add i32 %142, %141
  store i32 %143, ptr %15, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %145, i32 0, i32 10
  %147 = load ptr, ptr %146, align 8, !tbaa !11
  %148 = getelementptr inbounds %"struct.qpl::ml::compression::deflate_state<qpl::ml::execution_path_t::hardware>::meta_data", ptr %147, i32 0, i32 3
  %149 = load ptr, ptr %148, align 8, !tbaa !16
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %150, i32 0, i32 10
  %152 = load ptr, ptr %151, align 8, !tbaa !11
  %153 = getelementptr inbounds %"struct.qpl::ml::compression::deflate_state<qpl::ml::execution_path_t::hardware>::meta_data", ptr %152, i32 0, i32 0
  %154 = load i8, ptr %153, align 8, !tbaa !21
  %155 = zext i8 %154 to i32
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %156, i32 0, i32 10
  %158 = load ptr, ptr %157, align 8, !tbaa !11
  %159 = getelementptr inbounds %"struct.qpl::ml::compression::deflate_state<qpl::ml::execution_path_t::hardware>::meta_data", ptr %158, i32 0, i32 7
  %160 = load i32, ptr %159, align 4, !tbaa !22
  %161 = invoke noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef %149, i32 noundef %155, i32 noundef %160)
          to label %162 unwind label %229

162:                                              ; preds = %144
  store ptr %161, ptr %20, align 8, !tbaa !5
  %163 = load ptr, ptr %20, align 8, !tbaa !5
  %164 = icmp ne ptr %163, null
  br i1 %164, label %167, label %165

165:                                              ; preds = %162
  %166 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  store i32 6, ptr %166, align 8, !tbaa !23
  store i32 1, ptr %6, align 4
  br label %225

167:                                              ; preds = %162
  %168 = load ptr, ptr %20, align 8, !tbaa !5
  invoke void @_ZL34hw_iaa_aecs_compress_get_checksumsPK20hw_iaa_aecs_compressPjS2_(ptr noundef %168, ptr noundef %18, ptr noundef %19)
          to label %169 unwind label %229

169:                                              ; preds = %167
  %170 = load ptr, ptr %7, align 8, !tbaa !5
  %171 = load ptr, ptr %7, align 8, !tbaa !5
  %172 = load i32, ptr %8, align 4, !tbaa !9
  %173 = zext i32 %172 to i64
  %174 = getelementptr inbounds i8, ptr %171, i64 %173
  %175 = load i32, ptr %18, align 4, !tbaa !9
  %176 = call noundef i32 @_ZN3qpl2ml4util10crc32_gzipIPhEEjT_S4_j(ptr noundef %170, ptr noundef %174, i32 noundef %175) #6
  store i32 %176, ptr %18, align 4, !tbaa !9
  %177 = load ptr, ptr %7, align 8, !tbaa !5
  %178 = load ptr, ptr %7, align 8, !tbaa !5
  %179 = load i32, ptr %8, align 4, !tbaa !9
  %180 = zext i32 %179 to i64
  %181 = getelementptr inbounds i8, ptr %178, i64 %180
  %182 = load i32, ptr %19, align 4, !tbaa !9
  %183 = call noundef i32 @_ZN3qpl2ml4util12xor_checksumIPhEEjT_S4_j(ptr noundef %177, ptr noundef %181, i32 noundef %182) #6
  store i32 %183, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %184, i32 0, i32 10
  %186 = load ptr, ptr %185, align 8, !tbaa !11
  %187 = getelementptr inbounds %"struct.qpl::ml::compression::deflate_state<qpl::ml::execution_path_t::hardware>::meta_data", ptr %186, i32 0, i32 3
  %188 = load ptr, ptr %187, align 8, !tbaa !16
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %189, i32 0, i32 10
  %191 = load ptr, ptr %190, align 8, !tbaa !11
  %192 = getelementptr inbounds %"struct.qpl::ml::compression::deflate_state<qpl::ml::execution_path_t::hardware>::meta_data", ptr %191, i32 0, i32 0
  %193 = load i8, ptr %192, align 8, !tbaa !21
  %194 = zext i8 %193 to i32
  %195 = xor i32 %194, 1
  %196 = load ptr, ptr %3, align 8, !tbaa !5
  %197 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state.0", ptr %196, i32 0, i32 10
  %198 = load ptr, ptr %197, align 8, !tbaa !11
  %199 = getelementptr inbounds %"struct.qpl::ml::compression::deflate_state<qpl::ml::execution_path_t::hardware>::meta_data", ptr %198, i32 0, i32 7
  %200 = load i32, ptr %199, align 4, !tbaa !22
  %201 = invoke noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef %188, i32 noundef %195, i32 noundef %200)
          to label %202 unwind label %229

202:                                              ; preds = %169
  store ptr %201, ptr %21, align 8, !tbaa !5
  %203 = load ptr, ptr %21, align 8, !tbaa !5
  %204 = icmp ne ptr %203, null
  br i1 %204, label %207, label %205

205:                                              ; preds = %202
  %206 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  store i32 6, ptr %206, align 8, !tbaa !23
  store i32 1, ptr %6, align 4
  br label %224

207:                                              ; preds = %202
  %208 = load ptr, ptr %21, align 8, !tbaa !5
  %209 = load i32, ptr %18, align 4, !tbaa !9
  %210 = load i32, ptr %19, align 4, !tbaa !9
  invoke void @_ZL34hw_iaa_aecs_compress_set_checksumsP20hw_iaa_aecs_compressjj(ptr noundef %208, i32 noundef %209, i32 noundef %210)
          to label %211 unwind label %229

211:                                              ; preds = %207
  %212 = load i32, ptr %18, align 4, !tbaa !9
  %213 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 5
  %214 = getelementptr inbounds %"struct.qpl::ml::checksums_t", ptr %213, i32 0, i32 0
  store i32 %212, ptr %214, align 4, !tbaa !43
  %215 = load i32, ptr %19, align 4, !tbaa !9
  %216 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 5
  %217 = getelementptr inbounds %"struct.qpl::ml::checksums_t", ptr %216, i32 0, i32 1
  store i32 %215, ptr %217, align 4, !tbaa !44
  %218 = load i32, ptr %8, align 4, !tbaa !9
  %219 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 2
  store i32 %218, ptr %219, align 8, !tbaa !45
  %220 = load i32, ptr %15, align 4, !tbaa !9
  %221 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 1
  store i32 %220, ptr %221, align 4, !tbaa !46
  %222 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 4
  store i32 0, ptr %222, align 8, !tbaa !47
  %223 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  store i32 0, ptr %223, align 8, !tbaa !23
  store i32 1, ptr %6, align 4
  br label %224

224:                                              ; preds = %211, %205
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %225

225:                                              ; preds = %224, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %226

226:                                              ; preds = %225, %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %227

227:                                              ; preds = %226, %104, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %228

228:                                              ; preds = %227, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  ret void

229:                                              ; preds = %207, %169, %167, %144, %109, %75, %72, %48, %44, %2
  %230 = landingpad { ptr, i32 }
          catch ptr null
  %231 = extractvalue { ptr, i32 } %230, 0
  call void @__clang_call_terminate(ptr %231) #7
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml11compression30compression_operation_result_tC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE1EE14is_first_chunkEv(ptr noundef nonnull align 8 dereferenceable(88)) #3 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE1EE13is_last_chunkEv(ptr noundef nonnull align 8 dereferenceable(88)) #3 align 2

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

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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, !6, i64 64}
!12 = !{!"_ZTSN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE1EEE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !13, i64 48, !14, i64 49, !15, i64 52, !10, i64 56, !6, i64 64, !6, i64 72, !6, i64 80}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN3qpl2ml4util16multitask_statusE", !7, i64 0}
!15 = !{!"_ZTS25hw_multidescriptor_status", !7, i64 0}
!16 = !{!17, !6, i64 16}
!17 = !{!"_ZTSN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE1EE9meta_dataE", !7, i64 0, !10, i64 4, !18, i64 8, !6, i64 16, !20, i64 24, !10, i64 28, !7, i64 32, !10, i64 36}
!18 = !{!"_ZTS15hw_huffman_code", !19, i64 0, !7, i64 2, !7, i64 3}
!19 = !{!"short", !7, i64 0}
!20 = !{!"_ZTS24hw_iaa_mini_block_size_t", !7, i64 0}
!21 = !{!17, !7, i64 0}
!22 = !{!17, !10, i64 36}
!23 = !{!24, !10, i64 0}
!24 = !{!"_ZTSN3qpl2ml11compression30compression_operation_result_tE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !25, i64 20, !15, i64 32, !26, i64 40}
!25 = !{!"_ZTSN3qpl2ml11checksums_tE", !10, i64 0, !10, i64 4, !10, i64 8}
!26 = !{!"_ZTS20qpl_execution_record", !27, i64 0, !10, i64 8, !10, i64 12}
!27 = !{!"double", !7, i64 0}
!28 = !{!12, !6, i64 8}
!29 = !{!12, !13, i64 48}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = !{!13, !13, i64 0}
!33 = !{!17, !10, i64 4}
!34 = !{i64 0, i64 2, !35, i64 2, i64 1, !36, i64 3, i64 1, !36}
!35 = !{!19, !19, i64 0}
!36 = !{!7, !7, i64 0}
!37 = !{!17, !7, i64 11}
!38 = !{!39, !10, i64 28}
!39 = !{!"_ZTS20hw_iaa_aecs_compress", !10, i64 0, !10, i64 4, !7, i64 8, !10, i64 28, !7, i64 32, !40, i64 288, !7, i64 1568}
!40 = !{!"_ZTS16hw_iaa_histogram", !7, i64 0, !7, i64 1144, !7, i64 1152, !7, i64 1272}
!41 = !{!42, !42, i64 0}
!42 = !{!"long", !7, i64 0}
!43 = !{!24, !10, i64 20}
!44 = !{!24, !10, i64 24}
!45 = !{!24, !10, i64 8}
!46 = !{!24, !10, i64 4}
!47 = !{!24, !10, i64 16}


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

%"struct.qpl::ml::compression::compression_operation_result_t" = type { i32, i32, i32, i32, i32, %"struct.qpl::ml::checksums_t", i32, %struct.qpl_execution_record }
%"struct.qpl::ml::checksums_t" = type { i32, i32, i32 }
%struct.qpl_execution_record = type { double, i32, i32 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3qpl2ml11compression19write_stored_blocksEPhjS2_jjb(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i1 noundef zeroext) 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3qpl2ml11compression18write_stored_blockERNS1_13deflate_stateILNS0_16execution_path_tE1EEE(ptr dead_on_unwind noalias nonnull writable sret(%"struct.qpl::ml::compression::compression_operation_result_t") align 8 %0, ptr noundef nonnull align 8 dereferenceable(88) %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  tail call void @_ZN3qpl2ml11compression30compression_operation_result_tC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #5
  %9 = getelementptr inbounds i8, ptr %1, i64 64
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  %12 = load ptr, ptr %11, align 8, !tbaa !14
  %13 = load i8, ptr %10, align 8, !tbaa !19
  %14 = zext i8 %13 to i32
  %15 = getelementptr inbounds i8, ptr %10, i64 36
  %16 = load i32, ptr %15, align 4, !tbaa !20
  %17 = tail call noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef %12, i32 noundef %14, i32 noundef %16)
  %.not = icmp eq ptr %17, null
  br i1 %.not, label %18, label %19

18:                                               ; preds = %2
  store i32 6, ptr %0, align 8, !tbaa !21
  br label %116

19:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store ptr null, ptr %3, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 0, ptr %4, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  store ptr null, ptr %5, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 0, ptr %6, align 4, !tbaa !27
  %20 = getelementptr inbounds i8, ptr %1, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !28
  call void @_ZL34hw_iaa_descriptor_get_input_bufferP13hw_descriptorPPhPj(ptr noundef %21, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %22 = load ptr, ptr %20, align 8, !tbaa !28
  call void @_ZL35hw_iaa_descriptor_get_output_bufferP13hw_descriptorPPhPj(ptr noundef %22, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %23 = call noundef zeroext i1 @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE1EE14is_first_chunkEv(ptr noundef nonnull align 8 dereferenceable(88) %1) #5
  %24 = getelementptr inbounds i8, ptr %1, i64 48
  %25 = load i8, ptr %24, align 8, !range !29
  %26 = trunc nuw i8 %25 to i1
  %27 = select i1 %23, i1 true, i1 %26
  br i1 %27, label %28, label %32

28:                                               ; preds = %19
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 4
  %31 = load i32, ptr %30, align 4, !tbaa !30
  br label %42

32:                                               ; preds = %19
  %33 = call noundef i32 @_ZL48hw_iaa_aecs_compress_accumulator_get_actual_bitsPK20hw_iaa_aecs_compress(ptr noundef nonnull %17)
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %.sroa.0.0.copyload = load i32, ptr %35, align 8
  invoke void @hw_iaa_aecs_compress_accumulator_insert_eob(ptr noundef nonnull %17, i32 %.sroa.0.0.copyload)
          to label %36 unwind label %117

36:                                               ; preds = %32
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %37, i64 11
  %39 = load i8, ptr %38, align 1, !tbaa !31
  %40 = zext i8 %39 to i32
  %41 = add i32 %33, %40
  br label %42

42:                                               ; preds = %36, %28
  %.0 = phi i32 [ %41, %36 ], [ %31, %28 ]
  %43 = load i32, ptr %4, align 4, !tbaa !27
  %44 = call noundef i32 @_ZN3qpl2ml11compression21calculate_size_neededEjj(i32 noundef %43, i32 noundef %.0) #5
  %45 = load i32, ptr %6, align 4, !tbaa !27
  %46 = icmp ugt i32 %44, %45
  br i1 %46, label %47, label %48

47:                                               ; preds = %42
  store i32 2, ptr %0, align 8, !tbaa !21
  br label %115

48:                                               ; preds = %42
  %49 = icmp ugt i32 %.0, 319
  br i1 %49, label %50, label %51

50:                                               ; preds = %48
  store i32 6, ptr %0, align 8, !tbaa !21
  br label %115

51:                                               ; preds = %48
  %.not46 = icmp eq i32 %.0, 0
  br i1 %.not46, label %58, label %52

52:                                               ; preds = %51
  invoke void @hw_iaa_aecs_compress_accumulator_flush(ptr noundef nonnull %17, ptr noundef nonnull %5, i32 noundef %.0)
          to label %53 unwind label %117

53:                                               ; preds = %52
  %54 = lshr i32 %.0, 3
  %55 = load ptr, ptr %5, align 8, !tbaa !26
  %56 = zext nneg i32 %54 to i64
  %57 = getelementptr inbounds i8, ptr %55, i64 %56
  store ptr %57, ptr %5, align 8, !tbaa !26
  %.pre50 = load i32, ptr %6, align 4, !tbaa !27
  br label %60

58:                                               ; preds = %51
  %59 = getelementptr inbounds i8, ptr %17, i64 28
  store i32 0, ptr %59, align 4, !tbaa !32
  %.pre = load ptr, ptr %5, align 8, !tbaa !26
  br label %60

60:                                               ; preds = %58, %53
  %61 = phi i32 [ %.pre50, %53 ], [ %45, %58 ]
  %62 = phi ptr [ %57, %53 ], [ %.pre, %58 ]
  %.041 = phi i32 [ %54, %53 ], [ 0, %58 ]
  %63 = load ptr, ptr %3, align 8, !tbaa !26
  %64 = load i32, ptr %4, align 4, !tbaa !27
  %65 = and i32 %.0, 7
  %66 = call noundef zeroext i1 @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE1EE13is_last_chunkEv(ptr noundef nonnull align 8 dereferenceable(88) %1) #5
  %67 = call noundef i64 @_ZN3qpl2ml11compression19write_stored_blocksEPhjS2_jjb(ptr noundef %63, i32 noundef %64, ptr noundef %62, i32 noundef %61, i32 noundef %65, i1 noundef zeroext %66) #5
  %68 = icmp slt i64 %67, 0
  br i1 %68, label %69, label %70

69:                                               ; preds = %60
  store i32 2, ptr %0, align 8, !tbaa !21
  br label %115

70:                                               ; preds = %60
  %71 = trunc i64 %67 to i32
  %72 = add i32 %.041, %71
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 0, ptr %7, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store i32 0, ptr %8, align 4, !tbaa !27
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %73, i64 16
  %75 = load ptr, ptr %74, align 8, !tbaa !14
  %76 = load i8, ptr %73, align 8, !tbaa !19
  %77 = zext i8 %76 to i32
  %78 = getelementptr inbounds i8, ptr %73, i64 36
  %79 = load i32, ptr %78, align 4, !tbaa !20
  %80 = call noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef %75, i32 noundef %77, i32 noundef %79)
  %.not47 = icmp eq ptr %80, null
  br i1 %.not47, label %114, label %81

81:                                               ; preds = %70
  call void @_ZL34hw_iaa_aecs_compress_get_checksumsPK20hw_iaa_aecs_compressPjS2_(ptr noundef nonnull %80, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %82 = load ptr, ptr %3, align 8, !tbaa !26
  %83 = load i32, ptr %4, align 4, !tbaa !27
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds i8, ptr %82, i64 %84
  %86 = load i32, ptr %7, align 4, !tbaa !27
  %87 = call noundef i32 @_ZN3qpl2ml4util10crc32_gzipIPhEEjT_S4_j(ptr noundef %82, ptr noundef %85, i32 noundef %86) #5
  store i32 %87, ptr %7, align 4, !tbaa !27
  %88 = load ptr, ptr %3, align 8, !tbaa !26
  %89 = load i32, ptr %4, align 4, !tbaa !27
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %88, i64 %90
  %92 = load i32, ptr %8, align 4, !tbaa !27
  %93 = call noundef i32 @_ZN3qpl2ml4util12xor_checksumIPhEEjT_S4_j(ptr noundef %88, ptr noundef %91, i32 noundef %92) #5
  store i32 %93, ptr %8, align 4, !tbaa !27
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %94, i64 16
  %96 = load ptr, ptr %95, align 8, !tbaa !14
  %97 = load i8, ptr %94, align 8, !tbaa !19
  %98 = xor i8 %97, 1
  %99 = zext i8 %98 to i32
  %100 = getelementptr inbounds i8, ptr %94, i64 36
  %101 = load i32, ptr %100, align 4, !tbaa !20
  %102 = call noundef ptr @_ZL33hw_iaa_aecs_compress_get_aecs_ptrP20hw_iaa_aecs_compressjj(ptr noundef %96, i32 noundef %99, i32 noundef %101)
  %.not48 = icmp eq ptr %102, null
  br i1 %.not48, label %114, label %103

103:                                              ; preds = %81
  %104 = load i32, ptr %7, align 4, !tbaa !27
  %105 = load i32, ptr %8, align 4, !tbaa !27
  call void @_ZL34hw_iaa_aecs_compress_set_checksumsP20hw_iaa_aecs_compressjj(ptr noundef nonnull %102, i32 noundef %104, i32 noundef %105)
  %106 = load i32, ptr %7, align 4, !tbaa !27
  %107 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 %106, ptr %107, align 4, !tbaa !35
  %108 = load i32, ptr %8, align 4, !tbaa !27
  %109 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 %108, ptr %109, align 8, !tbaa !36
  %110 = load i32, ptr %4, align 4, !tbaa !27
  %111 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %110, ptr %111, align 8, !tbaa !37
  %112 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %72, ptr %112, align 4, !tbaa !38
  %113 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 0, ptr %113, align 8, !tbaa !39
  br label %114

114:                                              ; preds = %103, %81, %70
  %storemerge49 = phi i32 [ 6, %70 ], [ 0, %103 ], [ 6, %81 ]
  store i32 %storemerge49, ptr %0, align 8, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %115

115:                                              ; preds = %69, %114, %50, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %116

116:                                              ; preds = %115, %18
  ret void

117:                                              ; preds = %52, %32
  %118 = landingpad { ptr, i32 }
          catch ptr null
  %119 = extractvalue { ptr, i32 } %118, 0
  call void @__clang_call_terminate(ptr %119) #6
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml11compression30compression_operation_result_tC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE1EE14is_first_chunkEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #3 align 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 #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE1EE13is_last_chunkEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 64}
!6 = !{!"_ZTSN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE1EEE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !11, i64 49, !12, i64 52, !13, i64 56, !7, i64 64, !7, i64 72, !7, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN3qpl2ml4util16multitask_statusE", !8, i64 0}
!12 = !{!"_ZTS25hw_multidescriptor_status", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!15, !7, i64 16}
!15 = !{!"_ZTSN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE1EE9meta_dataE", !8, i64 0, !13, i64 4, !16, i64 8, !7, i64 16, !18, i64 24, !13, i64 28, !8, i64 32, !13, i64 36}
!16 = !{!"_ZTS15hw_huffman_code", !17, i64 0, !8, i64 2, !8, i64 3}
!17 = !{!"short", !8, i64 0}
!18 = !{!"_ZTS24hw_iaa_mini_block_size_t", !8, i64 0}
!19 = !{!15, !8, i64 0}
!20 = !{!15, !13, i64 36}
!21 = !{!22, !13, i64 0}
!22 = !{!"_ZTSN3qpl2ml11compression30compression_operation_result_tE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !23, i64 20, !12, i64 32, !24, i64 40}
!23 = !{!"_ZTSN3qpl2ml11checksums_tE", !13, i64 0, !13, i64 4, !13, i64 8}
!24 = !{!"_ZTS20qpl_execution_record", !25, i64 0, !13, i64 8, !13, i64 12}
!25 = !{!"double", !8, i64 0}
!26 = !{!7, !7, i64 0}
!27 = !{!13, !13, i64 0}
!28 = !{!6, !7, i64 8}
!29 = !{i8 0, i8 2}
!30 = !{!15, !13, i64 4}
!31 = !{!15, !8, i64 11}
!32 = !{!33, !13, i64 28}
!33 = !{!"_ZTS20hw_iaa_aecs_compress", !13, i64 0, !13, i64 4, !8, i64 8, !13, i64 28, !8, i64 32, !34, i64 288, !8, i64 1568}
!34 = !{!"_ZTS16hw_iaa_histogram", !8, i64 0, !8, i64 1144, !8, i64 1152, !8, i64 1272}
!35 = !{!22, !13, i64 20}
!36 = !{!22, !13, i64 24}
!37 = !{!22, !13, i64 8}
!38 = !{!22, !13, i64 4}
!39 = !{!22, !13, i64 16}


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