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

; 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::decompression_operation_result_t" = type { i32, i32, i32, %"struct.qpl::ml::checksums_t", %struct.qpl_execution_record }
%"struct.qpl::ml::checksums_t" = type { i32, i32, i32 }
%struct.qpl_execution_record = type { double, i32, i32 }
%"struct.std::array" = type { [256 x %"struct.qpl::ml::compression::huffman_code"] }
%"struct.qpl::ml::compression::huffman_code" = type { i16, i8, i8 }
%"class.qpl::ml::bit_reader" = type <{ ptr, ptr, ptr, i8, [7 x i8], i64, i8, i8, i8, [5 x i8] }>
%"struct.qpl::ml::compression::huffman_only_decompression_state<qpl::ml::execution_path_t::software>::internal_state_fields_t" = type { ptr, i32, ptr, i32, i32, i8 }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3qpl2ml11compression23decompress_huffman_onlyILNS0_16execution_path_tE2EEENS1_32decompression_operation_result_tERNS1_32huffman_only_decompression_stateIXT_EEERNS1_27decompression_huffman_tableE(ptr dead_on_unwind noalias writable sret(%"struct.qpl::ml::compression::decompression_operation_result_t") align 8 %0, ptr noundef nonnull align 8 dereferenceable(17) %1, ptr noundef nonnull align 8 dereferenceable(35) %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.std::array", align 2
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca %"class.qpl::ml::bit_reader", align 8
  %14 = alloca i8, align 1
  %15 = alloca %"struct.qpl::ml::compression::decompression_operation_result_t", align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  store ptr %2, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %16) #6
  %18 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_only_decompression_state<qpl::ml::execution_path_t::software>::internal_state_fields_t", ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  store ptr %19, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %21) #6
  %23 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_only_decompression_state<qpl::ml::execution_path_t::software>::internal_state_fields_t", ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 8, !tbaa !12
  %25 = zext i32 %24 to i64
  %26 = getelementptr inbounds i8, ptr %20, i64 %25
  store ptr %26, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %27) #6
  %29 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_only_decompression_state<qpl::ml::execution_path_t::software>::internal_state_fields_t", ptr %28, i32 0, i32 2
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  store ptr %30, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %31) #6
  %33 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_only_decompression_state<qpl::ml::execution_path_t::software>::internal_state_fields_t", ptr %32, i32 0, i32 2
  %34 = load ptr, ptr %33, align 8, !tbaa !13
  store ptr %34, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %35) #6
  %37 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_only_decompression_state<qpl::ml::execution_path_t::software>::internal_state_fields_t", ptr %36, i32 0, i32 3
  %38 = load i32, ptr %37, align 8, !tbaa !14
  store i32 %38, ptr %11, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %39) #6
  %41 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_only_decompression_state<qpl::ml::execution_path_t::software>::internal_state_fields_t", ptr %40, i32 0, i32 5
  %42 = load i8, ptr %41, align 8, !tbaa !16
  store i8 %42, ptr %12, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #6
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN3qpl2ml10bit_readerC2IPKhEET_S5_(ptr noundef nonnull align 8 dereferenceable(43) %13, ptr noundef %43, ptr noundef %44)
          to label %45 unwind label %119

45:                                               ; preds = %3
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = call noundef ptr @_ZN3qpl2ml11compression27decompression_huffman_table26get_sw_decompression_tableEv(ptr noundef nonnull align 8 dereferenceable(35) %46) #6
  call void @_ZN3qpl2ml11compressionL24initialize_huffman_tableERK30qplc_huffman_table_flat_formatRSt5arrayINS1_12huffman_codeELm256EE(ptr noundef nonnull align 4 dereferenceable(624) %47, ptr noundef nonnull align 2 dereferenceable(1024) %6) #6
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = call noundef ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE16get_lookup_tableEv(ptr noundef nonnull align 8 dereferenceable(17) %48) #6
  call void @_ZN3qpl2ml11compressionL18build_lookup_tableERKSt5arrayINS1_12huffman_codeELm256EEPh(ptr noundef nonnull align 2 dereferenceable(1024) %6, ptr noundef %49) #6
  %50 = getelementptr inbounds %"struct.qpl::ml::compression::decompression_operation_result_t", ptr %0, i32 0, i32 0
  store i32 0, ptr %50, align 8, !tbaa !18
  %51 = getelementptr inbounds %"struct.qpl::ml::compression::decompression_operation_result_t", ptr %0, i32 0, i32 1
  store i32 0, ptr %51, align 4, !tbaa !23
  %52 = getelementptr inbounds %"struct.qpl::ml::compression::decompression_operation_result_t", ptr %0, i32 0, i32 2
  store i32 0, ptr %52, align 8, !tbaa !24
  %53 = getelementptr inbounds %"struct.qpl::ml::compression::decompression_operation_result_t", ptr %0, i32 0, i32 3
  %54 = getelementptr inbounds %"struct.qpl::ml::checksums_t", ptr %53, i32 0, i32 0
  store i32 0, ptr %54, align 4, !tbaa !25
  %55 = getelementptr inbounds %"struct.qpl::ml::checksums_t", ptr %53, i32 0, i32 1
  store i32 0, ptr %55, align 4, !tbaa !26
  %56 = getelementptr inbounds %"struct.qpl::ml::checksums_t", ptr %53, i32 0, i32 2
  store i32 0, ptr %56, align 4, !tbaa !27
  %57 = getelementptr inbounds %"struct.qpl::ml::compression::decompression_operation_result_t", ptr %0, i32 0, i32 4
  %58 = getelementptr inbounds %struct.qpl_execution_record, ptr %57, i32 0, i32 0
  store double 0.000000e+00, ptr %58, align 8, !tbaa !28
  %59 = getelementptr inbounds %struct.qpl_execution_record, ptr %57, i32 0, i32 1
  store i32 0, ptr %59, align 8, !tbaa !29
  %60 = getelementptr inbounds %struct.qpl_execution_record, ptr %57, i32 0, i32 2
  store i32 0, ptr %60, align 4, !tbaa !30
  %61 = load i8, ptr %12, align 1, !tbaa !17
  call void @_ZN3qpl2ml10bit_reader20set_last_bits_offsetEh(ptr noundef nonnull align 8 dereferenceable(43) %13, i8 noundef zeroext %61) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = call noundef zeroext i8 @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE14get_endiannessEv(ptr noundef nonnull align 8 dereferenceable(17) %62) #6
  %64 = zext i8 %63 to i32
  %65 = icmp eq i32 %64, 1
  %66 = zext i1 %65 to i8
  store i8 %66, ptr %14, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #6
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = load i32, ptr %11, align 4, !tbaa !15
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = call noundef ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE16get_lookup_tableEv(ptr noundef nonnull align 8 dereferenceable(17) %69) #6
  %71 = load i8, ptr %14, align 1, !tbaa !31, !range !33, !noundef !34
  %72 = trunc i8 %71 to i1
  call void @_ZN3qpl2ml11compressionL34perform_huffman_only_decompressionERNS0_10bit_readerEPhjPKhRKSt5arrayINS1_12huffman_codeELm256EEb(ptr dead_on_unwind writable sret(%"struct.qpl::ml::compression::decompression_operation_result_t") align 8 %15, ptr noundef nonnull align 8 dereferenceable(43) %13, ptr noundef %67, i32 noundef %68, ptr noundef %70, ptr noundef nonnull align 2 dereferenceable(1024) %6, i1 noundef zeroext %72) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %15, i64 40, i1 false), !tbaa.struct !35
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #6
  %73 = call noundef i32 @_ZN3qpl2ml10bit_reader20get_total_bytes_readEv(ptr noundef nonnull align 8 dereferenceable(43) %13) #6
  %74 = getelementptr inbounds %"struct.qpl::ml::compression::decompression_operation_result_t", ptr %0, i32 0, i32 2
  store i32 %73, ptr %74, align 8, !tbaa !24
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.qpl::ml::compression::decompression_operation_result_t", ptr %0, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !23
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds i8, ptr %76, i64 %79
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %81) #6
  %83 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_only_decompression_state<qpl::ml::execution_path_t::software>::internal_state_fields_t", ptr %82, i32 0, i32 4
  %84 = load i32, ptr %83, align 4, !tbaa !37
  %85 = call noundef i32 @_ZN3qpl2ml4util10crc32_gzipIPhEEjT_S4_j(ptr noundef %75, ptr noundef %80, i32 noundef %84) #6
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %86) #6
  %88 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_only_decompression_state<qpl::ml::execution_path_t::software>::internal_state_fields_t", ptr %87, i32 0, i32 4
  store i32 %85, ptr %88, align 4, !tbaa !37
  %89 = getelementptr inbounds %"struct.qpl::ml::compression::decompression_operation_result_t", ptr %0, i32 0, i32 2
  %90 = load i32, ptr %89, align 8, !tbaa !24
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %91) #6
  %93 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_only_decompression_state<qpl::ml::execution_path_t::software>::internal_state_fields_t", ptr %92, i32 0, i32 1
  %94 = load i32, ptr %93, align 8, !tbaa !12
  %95 = sub i32 %94, %90
  store i32 %95, ptr %93, align 8, !tbaa !12
  %96 = getelementptr inbounds %"struct.qpl::ml::compression::decompression_operation_result_t", ptr %0, i32 0, i32 2
  %97 = load i32, ptr %96, align 8, !tbaa !24
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %98) #6
  %100 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_only_decompression_state<qpl::ml::execution_path_t::software>::internal_state_fields_t", ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !9
  %102 = zext i32 %97 to i64
  %103 = getelementptr inbounds i8, ptr %101, i64 %102
  store ptr %103, ptr %100, align 8, !tbaa !9
  %104 = getelementptr inbounds %"struct.qpl::ml::compression::decompression_operation_result_t", ptr %0, i32 0, i32 1
  %105 = load i32, ptr %104, align 4, !tbaa !23
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %106) #6
  %108 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_only_decompression_state<qpl::ml::execution_path_t::software>::internal_state_fields_t", ptr %107, i32 0, i32 2
  %109 = load ptr, ptr %108, align 8, !tbaa !13
  %110 = zext i32 %105 to i64
  %111 = getelementptr inbounds i8, ptr %109, i64 %110
  store ptr %111, ptr %108, align 8, !tbaa !13
  %112 = getelementptr inbounds %"struct.qpl::ml::compression::decompression_operation_result_t", ptr %0, i32 0, i32 1
  %113 = load i32, ptr %112, align 4, !tbaa !23
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %114) #6
  %116 = getelementptr inbounds %"struct.qpl::ml::compression::huffman_only_decompression_state<qpl::ml::execution_path_t::software>::internal_state_fields_t", ptr %115, i32 0, i32 3
  %117 = load i32, ptr %116, align 8, !tbaa !14
  %118 = sub i32 %117, %113
  store i32 %118, ptr %116, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %6) #6
  ret void

119:                                              ; preds = %3
  %120 = landingpad { ptr, i32 }
          catch ptr null
  %121 = extractvalue { ptr, i32 } %120, 0
  call void @__clang_call_terminate(ptr %121) #7
  unreachable
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN3qpl2ml11compressionL24initialize_huffman_tableERK30qplc_huffman_table_flat_formatRSt5arrayINS1_12huffman_codeELm256EE(ptr noundef nonnull align 4 dereferenceable(624), ptr noundef nonnull align 2 dereferenceable(1024)) #0

; Function Attrs: nounwind
declare noundef ptr @_ZN3qpl2ml11compression27decompression_huffman_table26get_sw_decompression_tableEv(ptr noundef nonnull align 8 dereferenceable(35)) #4

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN3qpl2ml11compressionL18build_lookup_tableERKSt5arrayINS1_12huffman_codeELm256EEPh(ptr noundef nonnull align 2 dereferenceable(1024), ptr noundef) #0

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

; Function Attrs: nounwind
declare void @_ZN3qpl2ml10bit_reader20set_last_bits_offsetEh(ptr noundef nonnull align 8 dereferenceable(43), i8 noundef zeroext) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN3qpl2ml11compressionL34perform_huffman_only_decompressionERNS0_10bit_readerEPhjPKhRKSt5arrayINS1_12huffman_codeELm256EEb(ptr dead_on_unwind noalias writable sret(%"struct.qpl::ml::compression::decompression_operation_result_t") align 8, ptr noundef nonnull align 8 dereferenceable(43), ptr noundef, i32 noundef, ptr noundef, ptr noundef nonnull align 2 dereferenceable(1024), i1 noundef zeroext) #0

; 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

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

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml10bit_reader20get_total_bytes_readEv(ptr noundef nonnull align 8 dereferenceable(43)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3qpl2ml4util10crc32_gzipIPhEEjT_S4_j(ptr noundef, ptr noundef, i32 noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !6, i64 0}
!10 = !{!"_ZTSN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE23internal_state_fields_tE", !6, i64 0, !11, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !7, i64 32}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!10, !6, i64 16}
!14 = !{!10, !11, i64 24}
!15 = !{!11, !11, i64 0}
!16 = !{!10, !7, i64 32}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !11, i64 0}
!19 = !{!"_ZTSN3qpl2ml11compression32decompression_operation_result_tE", !11, i64 0, !11, i64 4, !11, i64 8, !20, i64 12, !21, i64 24}
!20 = !{!"_ZTSN3qpl2ml11checksums_tE", !11, i64 0, !11, i64 4, !11, i64 8}
!21 = !{!"_ZTS20qpl_execution_record", !22, i64 0, !11, i64 8, !11, i64 12}
!22 = !{!"double", !7, i64 0}
!23 = !{!19, !11, i64 4}
!24 = !{!19, !11, i64 8}
!25 = !{!20, !11, i64 0}
!26 = !{!20, !11, i64 4}
!27 = !{!20, !11, i64 8}
!28 = !{!21, !22, i64 0}
!29 = !{!21, !11, i64 8}
!30 = !{!21, !11, i64 12}
!31 = !{!32, !32, i64 0}
!32 = !{!"bool", !7, i64 0}
!33 = !{i8 0, i8 2}
!34 = !{}
!35 = !{i64 0, i64 4, !15, i64 4, i64 4, !15, i64 8, i64 4, !15, i64 12, i64 4, !15, i64 16, i64 4, !15, i64 20, i64 4, !15, i64 24, i64 8, !36, i64 32, i64 4, !15, i64 36, i64 4, !15}
!36 = !{!22, !22, i64 0}
!37 = !{!10, !11, i64 28}


; 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::decompression_operation_result_t" = type { i32, i32, i32, %"struct.qpl::ml::checksums_t", %struct.qpl_execution_record }
%"struct.qpl::ml::checksums_t" = type { i32, i32, i32 }
%struct.qpl_execution_record = type { double, i32, i32 }
%"struct.std::array" = type { [256 x %"struct.qpl::ml::compression::huffman_code"] }
%"struct.qpl::ml::compression::huffman_code" = type { i16, i8, i8 }
%"class.qpl::ml::bit_reader" = type <{ ptr, ptr, ptr, i8, [7 x i8], i64, i8, i8, i8, [5 x i8] }>

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3qpl2ml11compression23decompress_huffman_onlyILNS0_16execution_path_tE2EEENS1_32decompression_operation_result_tERNS1_32huffman_only_decompression_stateIXT_EEERNS1_27decompression_huffman_tableE(ptr dead_on_unwind noalias nocapture writable sret(%"struct.qpl::ml::compression::decompression_operation_result_t") align 8 %0, ptr noundef nonnull align 8 dereferenceable(17) %1, ptr noundef nonnull align 8 dereferenceable(35) %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.std::array", align 2
  %5 = alloca %"class.qpl::ml::bit_reader", align 8
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #4
  %6 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  %9 = getelementptr inbounds i8, ptr %8, i64 8
  %10 = load i32, ptr %9, align 8, !tbaa !11
  %11 = zext i32 %10 to i64
  %12 = getelementptr inbounds i8, ptr %7, i64 %11
  %13 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  %14 = getelementptr inbounds i8, ptr %13, i64 16
  %15 = load ptr, ptr %14, align 8, !tbaa !12
  %16 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  %19 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  %20 = getelementptr inbounds i8, ptr %19, i64 24
  %21 = load i32, ptr %20, align 8, !tbaa !13
  %22 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  %23 = getelementptr inbounds i8, ptr %22, i64 32
  %24 = load i8, ptr %23, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #4
  call void @_ZN3qpl2ml10bit_readerC2IPKhEET_S5_(ptr noundef nonnull align 8 dereferenceable(43) %5, ptr noundef %7, ptr noundef %12)
  %25 = call noundef ptr @_ZN3qpl2ml11compression27decompression_huffman_table26get_sw_decompression_tableEv(ptr noundef nonnull align 8 dereferenceable(35) %2) #4
  call void @_ZN3qpl2ml11compressionL24initialize_huffman_tableERK30qplc_huffman_table_flat_formatRSt5arrayINS1_12huffman_codeELm256EE(ptr noundef nonnull align 4 dereferenceable(624) %25, ptr noundef nonnull align 2 dereferenceable(1024) %4) #4
  %26 = call noundef ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE16get_lookup_tableEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  call void @_ZN3qpl2ml11compressionL18build_lookup_tableERKSt5arrayINS1_12huffman_codeELm256EEPh(ptr noundef nonnull align 2 dereferenceable(1024) %4, ptr noundef %26) #4
  %27 = getelementptr inbounds i8, ptr %0, i64 4
  %28 = getelementptr inbounds i8, ptr %0, i64 8
  call void @_ZN3qpl2ml10bit_reader20set_last_bits_offsetEh(ptr noundef nonnull align 8 dereferenceable(43) %5, i8 noundef zeroext %24) #4
  %29 = call noundef zeroext i8 @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE14get_endiannessEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  %30 = icmp eq i8 %29, 1
  %31 = call noundef ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE16get_lookup_tableEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  call void @_ZN3qpl2ml11compressionL34perform_huffman_only_decompressionERNS0_10bit_readerEPhjPKhRKSt5arrayINS1_12huffman_codeELm256EEb(ptr dead_on_unwind nonnull writable sret(%"struct.qpl::ml::compression::decompression_operation_result_t") align 8 %0, ptr noundef nonnull align 8 dereferenceable(43) %5, ptr noundef %15, i32 noundef %21, ptr noundef %31, ptr noundef nonnull align 2 dereferenceable(1024) %4, i1 noundef zeroext %30) #4
  %32 = call noundef i32 @_ZN3qpl2ml10bit_reader20get_total_bytes_readEv(ptr noundef nonnull align 8 dereferenceable(43) %5) #4
  store i32 %32, ptr %28, align 8, !tbaa !15
  %33 = load i32, ptr %27, align 4, !tbaa !20
  %34 = zext i32 %33 to i64
  %35 = getelementptr inbounds i8, ptr %18, i64 %34
  %36 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  %37 = getelementptr inbounds i8, ptr %36, i64 28
  %38 = load i32, ptr %37, align 4, !tbaa !21
  %39 = call noundef i32 @_ZN3qpl2ml4util10crc32_gzipIPhEEjT_S4_j(ptr noundef %18, ptr noundef %35, i32 noundef %38) #4
  %40 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  %41 = getelementptr inbounds i8, ptr %40, i64 28
  store i32 %39, ptr %41, align 4, !tbaa !21
  %42 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  %44 = load i32, ptr %43, align 8, !tbaa !11
  %45 = sub i32 %44, %32
  store i32 %45, ptr %43, align 8, !tbaa !11
  %46 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = zext i32 %32 to i64
  %49 = getelementptr inbounds i8, ptr %47, i64 %48
  store ptr %49, ptr %46, align 8, !tbaa !5
  %50 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  %52 = load ptr, ptr %51, align 8, !tbaa !12
  %53 = getelementptr inbounds i8, ptr %52, i64 %34
  store ptr %53, ptr %51, align 8, !tbaa !12
  %54 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE10get_fieldsEv(ptr noundef nonnull align 8 dereferenceable(17) %1) #4
  %55 = getelementptr inbounds i8, ptr %54, i64 24
  %56 = load i32, ptr %55, align 8, !tbaa !13
  %57 = sub i32 %56, %33
  store i32 %57, ptr %55, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #4
  ret void
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN3qpl2ml11compressionL24initialize_huffman_tableERK30qplc_huffman_table_flat_formatRSt5arrayINS1_12huffman_codeELm256EE(ptr noundef nonnull align 4 dereferenceable(624), ptr noundef nonnull align 2 dereferenceable(1024)) local_unnamed_addr #0

; Function Attrs: nounwind
declare noundef ptr @_ZN3qpl2ml11compression27decompression_huffman_table26get_sw_decompression_tableEv(ptr noundef nonnull align 8 dereferenceable(35)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN3qpl2ml11compressionL18build_lookup_tableERKSt5arrayINS1_12huffman_codeELm256EEPh(ptr noundef nonnull align 2 dereferenceable(1024), ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind
declare void @_ZN3qpl2ml10bit_reader20set_last_bits_offsetEh(ptr noundef nonnull align 8 dereferenceable(43), i8 noundef zeroext) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN3qpl2ml11compressionL34perform_huffman_only_decompressionERNS0_10bit_readerEPhjPKhRKSt5arrayINS1_12huffman_codeELm256EEb(ptr dead_on_unwind noalias writable sret(%"struct.qpl::ml::compression::decompression_operation_result_t") align 8, ptr noundef nonnull align 8 dereferenceable(43), ptr noundef, i32 noundef, ptr noundef, ptr noundef nonnull align 2 dereferenceable(1024), i1 noundef zeroext) local_unnamed_addr #0

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

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml10bit_reader20get_total_bytes_readEv(ptr noundef nonnull align 8 dereferenceable(43)) 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 0}
!6 = !{!"_ZTSN3qpl2ml11compression32huffman_only_decompression_stateILNS0_16execution_path_tE2EE23internal_state_fields_tE", !7, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !8, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!6, !7, i64 16}
!13 = !{!6, !10, i64 24}
!14 = !{!6, !8, i64 32}
!15 = !{!16, !10, i64 8}
!16 = !{!"_ZTSN3qpl2ml11compression32decompression_operation_result_tE", !10, i64 0, !10, i64 4, !10, i64 8, !17, i64 12, !18, i64 24}
!17 = !{!"_ZTSN3qpl2ml11checksums_tE", !10, i64 0, !10, i64 4, !10, i64 8}
!18 = !{!"_ZTS20qpl_execution_record", !19, i64 0, !10, i64 8, !10, i64 12}
!19 = !{!"double", !8, i64 0}
!20 = !{!16, !10, i64 4}
!21 = !{!6, !10, i64 28}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass