; LLVM IR from intel/qpl :: sources/middle-layer/compression/huffman_only (huffman_only_compression)

; 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 }
%"class.qpl::ml::compression::implementation" = type { %"struct.std::array" }
%"struct.std::array" = type { [14 x ptr] }
%"class.qpl::ml::compression::huffman_only_decompression_state" = type <{ ptr, ptr, i8, [7 x i8] }>
%"struct.std::array.0" = type { [624 x i8] }
%"class.qpl::ml::compression::decompression_huffman_table" = type <{ ptr, ptr, ptr, ptr, i8, i8, i8, [5 x i8] }>
%"class.qpl::ml::compression::huffman_only_state" = type { %"struct.qpl::ml::util::checksum_accumulator", ptr, ptr, ptr, i8, i32, i8, i8, i8, i8, ptr }
%"struct.qpl::ml::util::checksum_accumulator" = type { i32, i32 }
%struct.isal_zstream = type { ptr, i32, i32, ptr, i32, i32, ptr, i32, i32, ptr, i16, i16, i16, i16, %struct.isal_zstate }
%struct.isal_zstate = type { i32, i32, i32, i32, i32, i32, %struct.BitBuf2, i32, i8, i8, i8, i8, i16, i32, [16 x i8], i32, i32, i32, i32, [65824 x i8], [8192 x i16] }
%struct.BitBuf2 = type { i64, i32, ptr, ptr, ptr }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3qpl2ml11compression21compress_huffman_onlyILNS0_16execution_path_tE2ENS1_18huffman_only_stateILS3_2EEEEENS1_30compression_operation_result_tEPhjRT0_(ptr dead_on_unwind noalias writable sret(%"struct.qpl::ml::compression::compression_operation_result_t") align 8 %0, ptr noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(56) %3) #0 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.qpl::ml::compression::implementation", align 8
  %10 = alloca i8, align 1
  %11 = alloca %"class.qpl::ml::compression::huffman_only_decompression_state", align 8
  %12 = alloca %"struct.std::array.0", align 1
  %13 = alloca %"class.qpl::ml::compression::decompression_huffman_table", align 8
  %14 = alloca i32, align 4
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  store ptr %3, ptr %7, align 8, !tbaa !5
  call void @_ZN3qpl2ml11compression30compression_operation_result_tC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  %16 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %15, i32 0, i32 1
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = getelementptr inbounds %struct.isal_zstream, ptr %17, i32 0, i32 3
  %19 = load ptr, ptr %18, align 8, !tbaa !17
  store ptr %19, ptr %8, align 8, !tbaa !5
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN3qpl2ml11compression18huffman_only_stateILNS0_16execution_path_tE2EE9set_inputEPhj(ptr noundef nonnull align 8 dereferenceable(56) %20, ptr noundef %21, i32 noundef %22) #9
  call void @llvm.lifetime.start.p0(i64 112, ptr %9) #9
  invoke void @_ZN3qpl2ml11compression33build_huffman_only_implementationEv(ptr dead_on_unwind writable sret(%"class.qpl::ml::compression::implementation") align 8 %9)
          to label %23 unwind label %204

23:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #9
  store i8 0, ptr %10, align 1, !tbaa !24
  br label %24

24:                                               ; preds = %35, %23
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = call noundef i32 @_ZNK3qpl2ml11compression14implementationINS1_18huffman_only_stateILNS0_16execution_path_tE2EEEE7executeERS5_RNS1_19compression_state_tE(ptr noundef nonnull align 8 dereferenceable(112) %9, ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  %27 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  store i32 %26, ptr %27, align 8, !tbaa !26
  br label %28

28:                                               ; preds = %24
  %29 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  %30 = load i32, ptr %29, align 8, !tbaa !26
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %35, label %32

32:                                               ; preds = %28
  %33 = load i8, ptr %10, align 1, !tbaa !24
  %34 = icmp ne i8 %33, 13
  br label %35

35:                                               ; preds = %32, %28
  %36 = phi i1 [ false, %28 ], [ %34, %32 ]
  br i1 %36, label %24, label %37, !llvm.loop !32

37:                                               ; preds = %35
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %38, i32 0, i32 4
  %40 = load i8, ptr %39, align 8, !tbaa !34
  %41 = zext i8 %40 to i32
  %42 = icmp eq i32 %41, 1
  br i1 %42, label %43, label %51

43:                                               ; preds = %37
  %44 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  %45 = load i32, ptr %44, align 8, !tbaa !26
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %51, label %47

47:                                               ; preds = %43
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = call noundef i32 @_ZN3qpl2ml11compression28convert_output_to_big_endianERNS1_18huffman_only_stateILNS0_16execution_path_tE2EEERNS1_19compression_state_tE(ptr noundef nonnull align 8 dereferenceable(56) %48, ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  %50 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  store i32 %49, ptr %50, align 8, !tbaa !26
  br label %51

51:                                               ; preds = %47, %43, %37
  %52 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  %53 = load i32, ptr %52, align 8, !tbaa !26
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %73, label %55

55:                                               ; preds = %51
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %56, i32 0, i32 3
  %58 = load ptr, ptr %57, align 8, !tbaa !35
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %59, i32 0, i32 1
  %61 = load ptr, ptr %60, align 8, !tbaa !11
  %62 = getelementptr inbounds %struct.isal_zstream, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !36
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN3qpl2ml11compression18huffman_only_stateILNS0_16execution_path_tE2EE8checksumEv(ptr noundef nonnull align 8 dereferenceable(56) %64) #9
  %66 = getelementptr inbounds %"struct.qpl::ml::util::checksum_accumulator", ptr %65, i32 0, i32 0
  %67 = load i32, ptr %66, align 4, !tbaa !37
  %68 = call noundef i32 @_ZN3qpl2ml4util10crc32_gzipIPhEEjT_S4_j(ptr noundef %58, ptr noundef %63, i32 noundef %67) #9
  %69 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 5
  %70 = getelementptr inbounds %"struct.qpl::ml::checksums_t", ptr %69, i32 0, i32 0
  store i32 %68, ptr %70, align 4, !tbaa !38
  %71 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 5
  %72 = getelementptr inbounds %"struct.qpl::ml::checksums_t", ptr %71, i32 0, i32 1
  store i32 0, ptr %72, align 4, !tbaa !39
  br label %73

73:                                               ; preds = %55, %51
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %74, i32 0, i32 7
  %76 = load i8, ptr %75, align 1, !tbaa !40
  %77 = zext i8 %76 to i32
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %79, label %90

79:                                               ; preds = %73
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %80, i32 0, i32 1
  %82 = load ptr, ptr %81, align 8, !tbaa !11
  %83 = getelementptr inbounds %struct.isal_zstream, ptr %82, i32 0, i32 6
  %84 = load ptr, ptr %83, align 8, !tbaa !41
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %85, i32 0, i32 2
  %87 = load ptr, ptr %86, align 8, !tbaa !42
  %88 = call noundef ptr @_ZNK3qpl2ml11compression25compression_huffman_table24get_sw_compression_tableEv(ptr noundef nonnull align 8 dereferenceable(36) %87) #9
  %89 = call noundef i32 @_ZN3qpl2ml11compression21huffman_table_convertI15isal_hufftables33qplc_huffman_table_default_formatEEjRKT_RT0_j(ptr noundef nonnull align 4 dereferenceable(2232) %84, ptr noundef nonnull align 4 dereferenceable(1264) %88, i32 noundef 0) #9
  br label %90

90:                                               ; preds = %79, %73
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %91, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !11
  %94 = getelementptr inbounds %struct.isal_zstream, ptr %93, i32 0, i32 2
  %95 = load i32, ptr %94, align 4, !tbaa !43
  %96 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 2
  store i32 %95, ptr %96, align 8, !tbaa !44
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !11
  %100 = getelementptr inbounds %struct.isal_zstream, ptr %99, i32 0, i32 5
  %101 = load i32, ptr %100, align 4, !tbaa !45
  %102 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 1
  store i32 %101, ptr %102, align 4, !tbaa !46
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %103, i32 0, i32 8
  %105 = load i8, ptr %104, align 2, !tbaa !47
  %106 = zext i8 %105 to i32
  %107 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 4
  store i32 %106, ptr %107, align 8, !tbaa !48
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %108, i32 0, i32 4
  %110 = load i8, ptr %109, align 8, !tbaa !34
  %111 = zext i8 %110 to i32
  %112 = icmp eq i32 %111, 1
  br i1 %112, label %113, label %140

113:                                              ; preds = %90
  %114 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 1
  %115 = load i32, ptr %114, align 4, !tbaa !46
  %116 = urem i32 %115, 2
  %117 = icmp eq i32 %116, 1
  br i1 %117, label %118, label %129

118:                                              ; preds = %113
  %119 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 1
  %120 = load i32, ptr %119, align 4, !tbaa !46
  %121 = add i32 %120, 1
  %122 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 1
  store i32 %121, ptr %122, align 4, !tbaa !46
  %123 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 4
  %124 = load i32, ptr %123, align 8, !tbaa !48
  %125 = icmp eq i32 %124, 0
  br i1 %125, label %126, label %128

126:                                              ; preds = %118
  %127 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 4
  store i32 8, ptr %127, align 8, !tbaa !48
  br label %128

128:                                              ; preds = %126, %118
  br label %139

129:                                              ; preds = %113
  %130 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 4
  %131 = load i32, ptr %130, align 8, !tbaa !48
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %133, label %138

133:                                              ; preds = %129
  %134 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 4
  %135 = load i32, ptr %134, align 8, !tbaa !48
  %136 = add i32 %135, 8
  %137 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 4
  store i32 %136, ptr %137, align 8, !tbaa !48
  br label %138

138:                                              ; preds = %133, %129
  br label %139

139:                                              ; preds = %138, %128
  br label %140

140:                                              ; preds = %139, %90
  %141 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  %142 = load i32, ptr %141, align 8, !tbaa !26
  %143 = icmp eq i32 %142, 0
  br i1 %143, label %144, label %202

144:                                              ; preds = %140
  %145 = load ptr, ptr %7, align 8, !tbaa !5
  %146 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %145, i32 0, i32 9
  %147 = load i8, ptr %146, align 1, !tbaa !49, !range !50, !noundef !51
  %148 = trunc i8 %147 to i1
  br i1 %148, label %149, label %202

149:                                              ; preds = %144
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  %151 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %150, i32 0, i32 7
  %152 = load i8, ptr %151, align 1, !tbaa !40
  %153 = zext i8 %152 to i32
  %154 = icmp ne i32 %153, 1
  br i1 %154, label %155, label %202

155:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #9
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %156, i32 0, i32 10
  %158 = load ptr, ptr %157, align 8, !tbaa !52
  invoke void @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EEC2ERKNS0_4util16linear_allocatorE(ptr noundef nonnull align 8 dereferenceable(17) %11, ptr noundef nonnull align 8 dereferenceable(8) %158)
          to label %159 unwind label %204

159:                                              ; preds = %155
  %160 = load ptr, ptr %7, align 8, !tbaa !5
  %161 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %160, i32 0, i32 2
  %162 = load ptr, ptr %161, align 8, !tbaa !42
  call void @_ZN3qpl2ml11compression25compression_huffman_table27enable_sw_compression_tableEv(ptr noundef nonnull align 8 dereferenceable(36) %162) #9
  call void @llvm.lifetime.start.p0(i64 624, ptr %12) #9
  call void @llvm.memset.p0.i64(ptr align 1 %12, i8 0, i64 624, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #9
  %163 = call noundef ptr @_ZNSt5arrayIhLm624EE4dataEv(ptr noundef nonnull align 1 dereferenceable(624) %12) #10
  invoke void @_ZN3qpl2ml11compression27decompression_huffman_tableC1EPhS3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(35) %13, ptr noundef %163, ptr noundef null, ptr noundef null, ptr noundef null)
          to label %164 unwind label %204

164:                                              ; preds = %159
  call void @_ZN3qpl2ml11compression27decompression_huffman_table29enable_sw_decompression_tableEv(ptr noundef nonnull align 8 dereferenceable(35) %13) #9
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %165, i32 0, i32 2
  %167 = load ptr, ptr %166, align 8, !tbaa !42
  %168 = call noundef i32 @_ZN3qpl2ml11compression21huffman_table_convertINS1_25compression_huffman_tableENS1_27decompression_huffman_tableEEEjRKT_RT0_j(ptr noundef nonnull align 8 dereferenceable(36) %167, ptr noundef nonnull align 8 dereferenceable(35) %13, i32 noundef 0) #9
  %169 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  store i32 %168, ptr %169, align 8, !tbaa !26
  %170 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  %171 = load i32, ptr %170, align 8, !tbaa !26
  %172 = icmp ne i32 %171, 0
  br i1 %172, label %173, label %174

173:                                              ; preds = %164
  store i32 1, ptr %14, align 4
  br label %199

174:                                              ; preds = %164
  %175 = load ptr, ptr %8, align 8, !tbaa !5
  %176 = load ptr, ptr %8, align 8, !tbaa !5
  %177 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 1
  %178 = load i32, ptr %177, align 4, !tbaa !46
  %179 = zext i32 %178 to i64
  %180 = getelementptr inbounds i8, ptr %176, i64 %179
  %181 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE5inputIPhEERS4_T_S8_(ptr noundef nonnull align 8 dereferenceable(17) %11, ptr noundef %175, ptr noundef %180) #9
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  %183 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %182, i32 0, i32 5
  %184 = load i32, ptr %183, align 4, !tbaa !53
  %185 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE8crc_seedEj(ptr noundef nonnull align 8 dereferenceable(17) %181, i32 noundef %184) #9
  %186 = load ptr, ptr %7, align 8, !tbaa !5
  %187 = getelementptr inbounds %"class.qpl::ml::compression::huffman_only_state", ptr %186, i32 0, i32 4
  %188 = load i8, ptr %187, align 8, !tbaa !34
  %189 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10endiannessENS1_12endianness_tE(ptr noundef nonnull align 8 dereferenceable(17) %185, i8 noundef zeroext %188) #9
  %190 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 4
  %191 = load i32, ptr %190, align 8, !tbaa !48
  %192 = trunc i32 %191 to i8
  %193 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE16last_bits_offsetEh(ptr noundef nonnull align 8 dereferenceable(17) %189, i8 noundef zeroext %192) #9
  %194 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 5
  %195 = getelementptr inbounds %"struct.qpl::ml::checksums_t", ptr %194, i32 0, i32 0
  %196 = load i32, ptr %195, align 4, !tbaa !38
  %197 = call noundef i32 @_ZN3qpl2ml11compression19verify_huffman_onlyILNS0_16execution_path_tE2EEEjRNS1_32huffman_only_decompression_stateIXT_EEERNS1_27decompression_huffman_tableEj(ptr noundef nonnull align 8 dereferenceable(17) %11, ptr noundef nonnull align 8 dereferenceable(35) %13, i32 noundef %196) #9
  %198 = getelementptr inbounds %"struct.qpl::ml::compression::compression_operation_result_t", ptr %0, i32 0, i32 0
  store i32 %197, ptr %198, align 8, !tbaa !26
  store i32 0, ptr %14, align 4
  br label %199

199:                                              ; preds = %174, %173
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 624, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #9
  %200 = load i32, ptr %14, align 4
  switch i32 %200, label %203 [
    i32 0, label %201
  ]

201:                                              ; preds = %199
  br label %202

202:                                              ; preds = %201, %149, %144, %140
  store i32 1, ptr %14, align 4
  br label %203

203:                                              ; preds = %202, %199
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  ret void

204:                                              ; preds = %159, %155, %4
  %205 = landingpad { ptr, i32 }
          catch ptr null
  %206 = extractvalue { ptr, i32 } %205, 0
  call void @__clang_call_terminate(ptr %206) #11
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml11compression18huffman_only_stateILNS0_16execution_path_tE2EE9set_inputEPhj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3qpl2ml11compression33build_huffman_only_implementationEv(ptr dead_on_unwind noalias writable sret(%"class.qpl::ml::compression::implementation") align 8) #3

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3qpl2ml11compression14implementationINS1_18huffman_only_stateILNS0_16execution_path_tE2EEEE7executeERS5_RNS1_19compression_state_tE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 1 dereferenceable(1)) #0 align 2

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression28convert_output_to_big_endianERNS1_18huffman_only_stateILNS0_16execution_path_tE2EEERNS1_19compression_state_tE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 1 dereferenceable(1)) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN3qpl2ml11compression18huffman_only_stateILNS0_16execution_path_tE2EE8checksumEv(ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression21huffman_table_convertI15isal_hufftables33qplc_huffman_table_default_formatEEjRKT_RT0_j(ptr noundef nonnull align 4 dereferenceable(2232), ptr noundef nonnull align 4 dereferenceable(1264), i32 noundef) #5

; Function Attrs: nounwind
declare noundef ptr @_ZNK3qpl2ml11compression25compression_huffman_table24get_sw_compression_tableEv(ptr noundef nonnull align 8 dereferenceable(36)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EEC2ERKNS0_4util16linear_allocatorE(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

; Function Attrs: nounwind
declare void @_ZN3qpl2ml11compression25compression_huffman_table27enable_sw_compression_tableEv(ptr noundef nonnull align 8 dereferenceable(36)) #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIhLm624EE4dataEv(ptr noundef nonnull align 1 dereferenceable(624)) #7 align 2

declare void @_ZN3qpl2ml11compression27decompression_huffman_tableC1EPhS3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(35), ptr noundef, ptr noundef, ptr noundef, ptr noundef) unnamed_addr #8

; Function Attrs: nounwind
declare void @_ZN3qpl2ml11compression27decompression_huffman_table29enable_sw_decompression_tableEv(ptr noundef nonnull align 8 dereferenceable(35)) #5

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression21huffman_table_convertINS1_25compression_huffman_tableENS1_27decompression_huffman_tableEEEjRKT_RT0_j(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(35), i32 noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE5inputIPhEERS4_T_S8_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef, ptr noundef) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE8crc_seedEj(ptr noundef nonnull align 8 dereferenceable(17), i32 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10endiannessENS1_12endianness_tE(ptr noundef nonnull align 8 dereferenceable(17), i8 noundef zeroext) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE16last_bits_offsetEh(ptr noundef nonnull align 8 dereferenceable(17), i8 noundef zeroext) #1 align 2

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression19verify_huffman_onlyILNS0_16execution_path_tE2EEEjRNS1_32huffman_only_decompression_stateIXT_EEERNS1_27decompression_huffman_tableEj(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(35), i32 noundef) #5

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

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { mustprogress nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { "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 #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(none) }
attributes #11 = { 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 8}
!12 = !{!"_ZTSN3qpl2ml11compression18huffman_only_stateILNS0_16execution_path_tE2EEE", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !14, i64 32, !10, i64 36, !15, i64 40, !16, i64 41, !7, i64 42, !15, i64 43, !6, i64 48}
!13 = !{!"_ZTSN3qpl2ml4util20checksum_accumulatorE", !10, i64 0, !10, i64 4}
!14 = !{!"_ZTSN3qpl2ml11compression12endianness_tE", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN3qpl2ml11compression18compression_mode_tE", !7, i64 0}
!17 = !{!18, !6, i64 16}
!18 = !{!"_ZTS12isal_zstream", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16, !10, i64 24, !10, i64 28, !6, i64 32, !10, i64 40, !10, i64 44, !6, i64 48, !19, i64 56, !19, i64 58, !19, i64 60, !19, i64 62, !20, i64 64}
!19 = !{!"short", !7, i64 0}
!20 = !{!"_ZTS11isal_zstate", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !21, i64 20, !22, i64 24, !10, i64 64, !7, i64 68, !7, i64 69, !7, i64 70, !7, i64 71, !19, i64 72, !10, i64 76, !7, i64 80, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !7, i64 112, !7, i64 65936}
!21 = !{!"_ZTS17isal_zstate_state", !7, i64 0}
!22 = !{!"_ZTS7BitBuf2", !23, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!23 = !{!"long", !7, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"_ZTSN3qpl2ml11compression19compression_state_tE", !7, i64 0}
!26 = !{!27, !10, i64 0}
!27 = !{!"_ZTSN3qpl2ml11compression30compression_operation_result_tE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !28, i64 20, !29, i64 32, !30, i64 40}
!28 = !{!"_ZTSN3qpl2ml11checksums_tE", !10, i64 0, !10, i64 4, !10, i64 8}
!29 = !{!"_ZTS25hw_multidescriptor_status", !7, i64 0}
!30 = !{!"_ZTS20qpl_execution_record", !31, i64 0, !10, i64 8, !10, i64 12}
!31 = !{!"double", !7, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!12, !14, i64 32}
!35 = !{!12, !6, i64 24}
!36 = !{!18, !6, i64 0}
!37 = !{!13, !10, i64 0}
!38 = !{!27, !10, i64 20}
!39 = !{!27, !10, i64 24}
!40 = !{!12, !16, i64 41}
!41 = !{!18, !6, i64 32}
!42 = !{!12, !6, i64 16}
!43 = !{!18, !10, i64 12}
!44 = !{!27, !10, i64 8}
!45 = !{!18, !10, i64 28}
!46 = !{!27, !10, i64 4}
!47 = !{!12, !7, i64 42}
!48 = !{!27, !10, i64 16}
!49 = !{!12, !15, i64 43}
!50 = !{i8 0, i8 2}
!51 = !{}
!52 = !{!12, !6, i64 48}
!53 = !{!12, !10, i64 36}


; 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 }
%"class.qpl::ml::compression::implementation" = type { %"struct.std::array" }
%"struct.std::array" = type { [14 x ptr] }
%"class.qpl::ml::compression::huffman_only_decompression_state" = type <{ ptr, ptr, i8, [7 x i8] }>
%"struct.std::array.0" = type { [624 x i8] }
%"class.qpl::ml::compression::decompression_huffman_table" = type <{ ptr, ptr, ptr, ptr, i8, i8, i8, [5 x i8] }>

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3qpl2ml11compression21compress_huffman_onlyILNS0_16execution_path_tE2ENS1_18huffman_only_stateILS3_2EEEEENS1_30compression_operation_result_tEPhjRT0_(ptr dead_on_unwind noalias nonnull writable sret(%"struct.qpl::ml::compression::compression_operation_result_t") align 8 %0, ptr noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(56) %3) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.qpl::ml::compression::implementation", align 8
  %6 = alloca i8, align 1
  %7 = alloca %"class.qpl::ml::compression::huffman_only_decompression_state", align 8
  %8 = alloca %"struct.std::array.0", align 1
  %9 = alloca %"class.qpl::ml::compression::decompression_huffman_table", align 8
  tail call void @_ZN3qpl2ml11compression30compression_operation_result_tC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #9
  %10 = getelementptr inbounds i8, ptr %3, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  tail call void @_ZN3qpl2ml11compression18huffman_only_stateILNS0_16execution_path_tE2EE9set_inputEPhj(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef %1, i32 noundef %2) #9
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %5) #9
  invoke void @_ZN3qpl2ml11compression33build_huffman_only_implementationEv(ptr dead_on_unwind nonnull writable sret(%"class.qpl::ml::compression::implementation") align 8 %5)
          to label %14 unwind label %105

14:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #9
  store i8 0, ptr %6, align 1, !tbaa !22
  br label %15

15:                                               ; preds = %15, %14
  %16 = call noundef i32 @_ZNK3qpl2ml11compression14implementationINS1_18huffman_only_stateILNS0_16execution_path_tE2EEEE7executeERS5_RNS1_19compression_state_tE(ptr noundef nonnull align 8 dereferenceable(112) %5, ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  store i32 %16, ptr %0, align 8, !tbaa !24
  %17 = icmp ne i32 %16, 0
  %18 = load i8, ptr %6, align 1
  %19 = icmp eq i8 %18, 13
  %.not29 = select i1 %17, i1 true, i1 %19
  br i1 %.not29, label %20, label %15, !llvm.loop !30

20:                                               ; preds = %15
  %21 = getelementptr inbounds i8, ptr %3, i64 32
  %22 = load i8, ptr %21, align 8, !tbaa !32
  %23 = icmp ne i8 %22, 1
  %or.cond = or i1 %17, %23
  br i1 %or.cond, label %thread-pre-split, label %24

24:                                               ; preds = %20
  %25 = call noundef i32 @_ZN3qpl2ml11compression28convert_output_to_big_endianERNS1_18huffman_only_stateILNS0_16execution_path_tE2EEERNS1_19compression_state_tE(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  store i32 %25, ptr %0, align 8, !tbaa !24
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %20, %24
  %26 = phi i32 [ %25, %24 ], [ %16, %20 ]
  %.not = icmp eq i32 %26, 0
  br i1 %.not, label %27, label %37

27:                                               ; preds = %thread-pre-split
  %28 = getelementptr inbounds i8, ptr %3, i64 24
  %29 = load ptr, ptr %28, align 8, !tbaa !33
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = load ptr, ptr %30, align 8, !tbaa !34
  %32 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN3qpl2ml11compression18huffman_only_stateILNS0_16execution_path_tE2EE8checksumEv(ptr noundef nonnull align 8 dereferenceable(56) %3) #9
  %33 = load i32, ptr %32, align 4, !tbaa !35
  %34 = call noundef i32 @_ZN3qpl2ml4util10crc32_gzipIPhEEjT_S4_j(ptr noundef %29, ptr noundef %31, i32 noundef %33) #9
  %35 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 %34, ptr %35, align 4, !tbaa !36
  %36 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 0, ptr %36, align 8, !tbaa !37
  br label %37

37:                                               ; preds = %27, %thread-pre-split
  %38 = getelementptr inbounds i8, ptr %3, i64 41
  %39 = load i8, ptr %38, align 1, !tbaa !38
  %40 = icmp eq i8 %39, 0
  br i1 %40, label %41, label %49

41:                                               ; preds = %37
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %42, i64 32
  %44 = load ptr, ptr %43, align 8, !tbaa !39
  %45 = getelementptr inbounds i8, ptr %3, i64 16
  %46 = load ptr, ptr %45, align 8, !tbaa !40
  %47 = call noundef ptr @_ZNK3qpl2ml11compression25compression_huffman_table24get_sw_compression_tableEv(ptr noundef nonnull align 8 dereferenceable(36) %46) #9
  %48 = call noundef i32 @_ZN3qpl2ml11compression21huffman_table_convertI15isal_hufftables33qplc_huffman_table_default_formatEEjRKT_RT0_j(ptr noundef nonnull align 4 dereferenceable(2232) %44, ptr noundef nonnull align 4 dereferenceable(1264) %47, i32 noundef 0) #9
  br label %49

49:                                               ; preds = %41, %37
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %50, i64 12
  %52 = load i32, ptr %51, align 4, !tbaa !41
  %53 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %52, ptr %53, align 8, !tbaa !42
  %54 = getelementptr inbounds i8, ptr %50, i64 28
  %55 = load i32, ptr %54, align 4, !tbaa !43
  %56 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %55, ptr %56, align 4, !tbaa !44
  %57 = getelementptr inbounds i8, ptr %3, i64 42
  %58 = load i8, ptr %57, align 2, !tbaa !45
  %59 = zext i8 %58 to i32
  %60 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 %59, ptr %60, align 8, !tbaa !46
  %61 = load i8, ptr %21, align 8, !tbaa !32
  %62 = icmp eq i8 %61, 1
  br i1 %62, label %63, label %71

63:                                               ; preds = %49
  %64 = and i32 %55, 1
  %.not30 = icmp eq i32 %64, 0
  br i1 %.not30, label %68, label %65

65:                                               ; preds = %63
  %66 = add i32 %55, 1
  store i32 %66, ptr %56, align 4, !tbaa !44
  %67 = icmp eq i8 %58, 0
  br i1 %67, label %.sink.split, label %71

68:                                               ; preds = %63
  %.not31 = icmp eq i8 %58, 0
  br i1 %.not31, label %71, label %69

69:                                               ; preds = %68
  %70 = add nuw nsw i32 %59, 8
  br label %.sink.split

.sink.split:                                      ; preds = %65, %69
  %.sink = phi i32 [ %70, %69 ], [ 8, %65 ]
  store i32 %.sink, ptr %60, align 8, !tbaa !46
  br label %71

71:                                               ; preds = %.sink.split, %65, %68, %49
  %72 = load i32, ptr %0, align 8, !tbaa !24
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %74, label %104

74:                                               ; preds = %71
  %75 = getelementptr inbounds i8, ptr %3, i64 43
  %76 = load i8, ptr %75, align 1, !tbaa !47, !range !48, !noundef !49
  %77 = trunc nuw i8 %76 to i1
  %78 = load i8, ptr %38, align 1
  %.not32 = icmp ne i8 %78, 1
  %or.cond35.not = select i1 %77, i1 %.not32, i1 false
  br i1 %or.cond35.not, label %79, label %104

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #9
  %80 = getelementptr inbounds i8, ptr %3, i64 48
  %81 = load ptr, ptr %80, align 8, !tbaa !50
  call void @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EEC2ERKNS0_4util16linear_allocatorE(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef nonnull align 8 dereferenceable(8) %81)
  %82 = getelementptr inbounds i8, ptr %3, i64 16
  %83 = load ptr, ptr %82, align 8, !tbaa !40
  call void @_ZN3qpl2ml11compression25compression_huffman_table27enable_sw_compression_tableEv(ptr noundef nonnull align 8 dereferenceable(36) %83) #9
  call void @llvm.lifetime.start.p0(i64 624, ptr nonnull %8) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(624) %8, i8 0, i64 624, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #9
  %84 = call noundef ptr @_ZNSt5arrayIhLm624EE4dataEv(ptr noundef nonnull align 1 dereferenceable(624) %8) #10
  invoke void @_ZN3qpl2ml11compression27decompression_huffman_tableC1EPhS3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(35) %9, ptr noundef %84, ptr noundef null, ptr noundef null, ptr noundef null)
          to label %85 unwind label %105

85:                                               ; preds = %79
  call void @_ZN3qpl2ml11compression27decompression_huffman_table29enable_sw_decompression_tableEv(ptr noundef nonnull align 8 dereferenceable(35) %9) #9
  %86 = load ptr, ptr %82, align 8, !tbaa !40
  %87 = call noundef i32 @_ZN3qpl2ml11compression21huffman_table_convertINS1_25compression_huffman_tableENS1_27decompression_huffman_tableEEEjRKT_RT0_j(ptr noundef nonnull align 8 dereferenceable(36) %86, ptr noundef nonnull align 8 dereferenceable(35) %9, i32 noundef 0) #9
  store i32 %87, ptr %0, align 8, !tbaa !24
  %.not33 = icmp eq i32 %87, 0
  br i1 %.not33, label %88, label %.critedge

88:                                               ; preds = %85
  %89 = load i32, ptr %56, align 4, !tbaa !44
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %13, i64 %90
  %92 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE5inputIPhEERS4_T_S8_(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef %13, ptr noundef %91) #9
  %93 = getelementptr inbounds i8, ptr %3, i64 36
  %94 = load i32, ptr %93, align 4, !tbaa !51
  %95 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE8crc_seedEj(ptr noundef nonnull align 8 dereferenceable(17) %92, i32 noundef %94) #9
  %96 = load i8, ptr %21, align 8, !tbaa !32
  %97 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10endiannessENS1_12endianness_tE(ptr noundef nonnull align 8 dereferenceable(17) %95, i8 noundef zeroext %96) #9
  %98 = load i32, ptr %60, align 8, !tbaa !46
  %99 = trunc i32 %98 to i8
  %100 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE16last_bits_offsetEh(ptr noundef nonnull align 8 dereferenceable(17) %97, i8 noundef zeroext %99) #9
  %101 = getelementptr inbounds i8, ptr %0, i64 20
  %102 = load i32, ptr %101, align 4, !tbaa !36
  %103 = call noundef i32 @_ZN3qpl2ml11compression19verify_huffman_onlyILNS0_16execution_path_tE2EEEjRNS1_32huffman_only_decompression_stateIXT_EEERNS1_27decompression_huffman_tableEj(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef nonnull align 8 dereferenceable(35) %9, i32 noundef %102) #9
  store i32 %103, ptr %0, align 8, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 624, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #9
  br label %104

.critedge:                                        ; preds = %85
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 624, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #9
  br label %104

104:                                              ; preds = %88, %71, %74, %.critedge
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %5) #9
  ret void

105:                                              ; preds = %79, %4
  %106 = landingpad { ptr, i32 }
          catch ptr null
  %107 = extractvalue { ptr, i32 } %106, 0
  call void @__clang_call_terminate(ptr %107) #11
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml11compression18huffman_only_stateILNS0_16execution_path_tE2EE9set_inputEPhj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3qpl2ml11compression33build_huffman_only_implementationEv(ptr dead_on_unwind noalias writable sret(%"class.qpl::ml::compression::implementation") align 8) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3qpl2ml11compression14implementationINS1_18huffman_only_stateILNS0_16execution_path_tE2EEEE7executeERS5_RNS1_19compression_state_tE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #0 align 2

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression28convert_output_to_big_endianERNS1_18huffman_only_stateILNS0_16execution_path_tE2EEERNS1_19compression_state_tE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN3qpl2ml11compression18huffman_only_stateILNS0_16execution_path_tE2EE8checksumEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression21huffman_table_convertI15isal_hufftables33qplc_huffman_table_default_formatEEjRKT_RT0_j(ptr noundef nonnull align 4 dereferenceable(2232), ptr noundef nonnull align 4 dereferenceable(1264), i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare noundef ptr @_ZNK3qpl2ml11compression25compression_huffman_table24get_sw_compression_tableEv(ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EEC2ERKNS0_4util16linear_allocatorE(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

; Function Attrs: nounwind
declare void @_ZN3qpl2ml11compression25compression_huffman_table27enable_sw_compression_tableEv(ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIhLm624EE4dataEv(ptr noundef nonnull align 1 dereferenceable(624)) local_unnamed_addr #7 align 2

declare void @_ZN3qpl2ml11compression27decompression_huffman_tableC1EPhS3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(35), ptr noundef, ptr noundef, ptr noundef, ptr noundef) unnamed_addr #8

; Function Attrs: nounwind
declare void @_ZN3qpl2ml11compression27decompression_huffman_table29enable_sw_decompression_tableEv(ptr noundef nonnull align 8 dereferenceable(35)) local_unnamed_addr #5

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression21huffman_table_convertINS1_25compression_huffman_tableENS1_27decompression_huffman_tableEEEjRKT_RT0_j(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(35), i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE5inputIPhEERS4_T_S8_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE8crc_seedEj(ptr noundef nonnull align 8 dereferenceable(17), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10endiannessENS1_12endianness_tE(ptr noundef nonnull align 8 dereferenceable(17), i8 noundef zeroext) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(17) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE16last_bits_offsetEh(ptr noundef nonnull align 8 dereferenceable(17), i8 noundef zeroext) local_unnamed_addr #1 align 2

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression19verify_huffman_onlyILNS0_16execution_path_tE2EEEjRNS1_32huffman_only_decompression_stateIXT_EEERNS1_27decompression_huffman_tableEj(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(35), i32 noundef) local_unnamed_addr #5

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

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { "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 #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(none) }
attributes #11 = { 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, !11, i64 8}
!6 = !{!"_ZTSN3qpl2ml11compression18huffman_only_stateILNS0_16execution_path_tE2EEE", !7, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !8, i64 36, !13, i64 40, !14, i64 41, !9, i64 42, !13, i64 43, !11, i64 48}
!7 = !{!"_ZTSN3qpl2ml4util20checksum_accumulatorE", !8, i64 0, !8, i64 4}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTSN3qpl2ml11compression12endianness_tE", !9, i64 0}
!13 = !{!"bool", !9, i64 0}
!14 = !{!"_ZTSN3qpl2ml11compression18compression_mode_tE", !9, i64 0}
!15 = !{!16, !11, i64 16}
!16 = !{!"_ZTS12isal_zstream", !11, i64 0, !8, i64 8, !8, i64 12, !11, i64 16, !8, i64 24, !8, i64 28, !11, i64 32, !8, i64 40, !8, i64 44, !11, i64 48, !17, i64 56, !17, i64 58, !17, i64 60, !17, i64 62, !18, i64 64}
!17 = !{!"short", !9, i64 0}
!18 = !{!"_ZTS11isal_zstate", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !19, i64 20, !20, i64 24, !8, i64 64, !9, i64 68, !9, i64 69, !9, i64 70, !9, i64 71, !17, i64 72, !8, i64 76, !9, i64 80, !8, i64 96, !8, i64 100, !8, i64 104, !8, i64 108, !9, i64 112, !9, i64 65936}
!19 = !{!"_ZTS17isal_zstate_state", !9, i64 0}
!20 = !{!"_ZTS7BitBuf2", !21, i64 0, !8, i64 8, !11, i64 16, !11, i64 24, !11, i64 32}
!21 = !{!"long", !9, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"_ZTSN3qpl2ml11compression19compression_state_tE", !9, i64 0}
!24 = !{!25, !8, i64 0}
!25 = !{!"_ZTSN3qpl2ml11compression30compression_operation_result_tE", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !26, i64 20, !27, i64 32, !28, i64 40}
!26 = !{!"_ZTSN3qpl2ml11checksums_tE", !8, i64 0, !8, i64 4, !8, i64 8}
!27 = !{!"_ZTS25hw_multidescriptor_status", !9, i64 0}
!28 = !{!"_ZTS20qpl_execution_record", !29, i64 0, !8, i64 8, !8, i64 12}
!29 = !{!"double", !9, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!6, !12, i64 32}
!33 = !{!6, !11, i64 24}
!34 = !{!16, !11, i64 0}
!35 = !{!7, !8, i64 0}
!36 = !{!25, !8, i64 20}
!37 = !{!25, !8, i64 24}
!38 = !{!6, !14, i64 41}
!39 = !{!16, !11, i64 32}
!40 = !{!6, !11, i64 16}
!41 = !{!16, !8, i64 12}
!42 = !{!25, !8, i64 8}
!43 = !{!16, !8, i64 28}
!44 = !{!25, !8, i64 4}
!45 = !{!6, !9, i64 42}
!46 = !{!25, !8, i64 16}
!47 = !{!6, !13, i64 43}
!48 = !{i8 0, i8 2}
!49 = !{}
!50 = !{!6, !11, i64 48}
!51 = !{!6, !8, i64 36}


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