; LLVM IR from intel/qpl :: sources/middle-layer/compression/deflate/compression_units (icf_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.BitBuf2 = type { i64, i32, ptr, ptr, ptr }
%"class.qpl::ml::compression::deflate_state" = type { %"class.qpl::ml::compression::compression_stream.base", ptr, ptr, %"class.qpl::ml::compression::huffman_table_icf", %struct.deflate_hash_table_t, %"class.qpl::ml::compression::index_table_t", i8, i8, ptr, i8, ptr, i32, i32, i32, i8, ptr, ptr }
%"class.qpl::ml::compression::compression_stream.base" = type <{ ptr, %"struct.qpl::ml::util::checksum_accumulator", i8, i8, %"struct.qpl::ml::compression::chunk_type", i32, i32 }>
%"struct.qpl::ml::util::checksum_accumulator" = type { i32, i32 }
%"struct.qpl::ml::compression::chunk_type" = type { i8, i8 }
%"class.qpl::ml::compression::huffman_table_icf" = type { ptr, i32, i32 }
%struct.deflate_hash_table_t = type { ptr, ptr, i32, i32, i32, i32, i32 }
%"class.qpl::ml::compression::index_table_t" = type <{ ptr, i32, i32, i32, [4 x i8] }>
%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.level_buf = type { %struct.hufftables_icf, %struct.isal_mod_hist, i32, i32, [328 x i8], ptr, i64, ptr, %union.anon.4 }
%struct.hufftables_icf = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { [31 x %struct.huff_code], [513 x %struct.huff_code] }
%struct.huff_code = type { %union.anon.0 }
%union.anon.0 = type { %struct.anon.1 }
%struct.anon.1 = type { i32 }
%struct.isal_mod_hist = type { [30 x i32], [513 x i32] }
%union.anon.4 = type { %struct.hash_map_buf }
%struct.hash_map_buf = type { [32768 x i16], ptr, ptr, [4096 x %struct.deflate_icf], [288 x %struct.deflate_icf] }
%struct.deflate_icf = type { i32 }

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

; Function Attrs: nounwind
declare void @_ZN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE16reset_bit_bufferEv(ptr noundef nonnull align 8 dereferenceable(192)) #1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind
declare void @_ZN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE15dump_bit_bufferEv(ptr noundef nonnull align 8 dereferenceable(192)) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl7core_sw4util4copyIPhS3_EEvT_S4_T0_(ptr noundef, ptr noundef, ptr noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN3qpl2ml11compression23create_icf_block_headerERNS1_13deflate_stateILNS0_16execution_path_tE2EEERNS1_19compression_state_tE(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr noundef nonnull align 1 dereferenceable(1) %1) #5 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.BitBuf2, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %19, i32 0, i32 1
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = getelementptr inbounds %struct.isal_zstream, ptr %21, i32 0, i32 14
  store ptr %22, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.isal_zstate, ptr %23, i32 0, i32 6
  store ptr %24, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %25, i32 0, i32 1
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds %struct.isal_zstream, ptr %27, i32 0, i32 9
  %29 = load ptr, ptr %28, align 8, !tbaa !23
  store ptr %29, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #7
  call void @llvm.memset.p0.i64(ptr align 8 %8, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %30, i32 0, i32 1
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds %struct.isal_zstream, ptr %32, i32 0, i32 4
  %34 = load i32, ptr %33, align 8, !tbaa !30
  store i32 %34, ptr %9, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %35, i32 0, i32 1
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.isal_zstream, ptr %37, i32 0, i32 3
  %39 = load ptr, ptr %38, align 8, !tbaa !32
  %40 = load i32, ptr %9, align 4, !tbaa !31
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds i8, ptr %39, i64 %41
  store ptr %42, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.isal_zstate, ptr %43, i32 0, i32 2
  %45 = load i32, ptr %44, align 8, !tbaa !33
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.isal_zstate, ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !34
  %49 = sub i32 %45, %48
  %50 = zext i32 %49 to i64
  store i64 %50, ptr %11, align 8, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %51 = load i64, ptr %11, align 8, !tbaa !35
  %52 = add i64 %51, 65535
  %53 = sub i64 %52, 1
  %54 = udiv i64 %53, 65535
  %55 = mul i64 5, %54
  %56 = load i64, ptr %11, align 8, !tbaa !35
  %57 = add i64 %55, %56
  store i64 %57, ptr %13, align 8, !tbaa !35
  %58 = load i64, ptr %13, align 8, !tbaa !35
  %59 = icmp ne i64 %58, 0
  br i1 %59, label %60, label %62

60:                                               ; preds = %2
  %61 = load i64, ptr %13, align 8, !tbaa !35
  br label %63

62:                                               ; preds = %2
  br label %63

63:                                               ; preds = %62, %60
  %64 = phi i64 [ %61, %60 ], [ 5, %62 ]
  store i64 %64, ptr %13, align 8, !tbaa !35
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %66, i64 40
  call void @_ZN3qpl7core_sw4util4copyIPhS3_EEvT_S4_T0_(ptr noundef %65, ptr noundef %67, ptr noundef %8) #7
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.level_buf, ptr %68, i32 0, i32 1
  %70 = getelementptr inbounds %struct.isal_mod_hist, ptr %69, i32 0, i32 1
  %71 = getelementptr inbounds [513 x i32], ptr %70, i64 0, i64 256
  store i32 1, ptr %71, align 8, !tbaa !31
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.level_buf, ptr %72, i32 0, i32 5
  %74 = load ptr, ptr %73, align 8, !tbaa !36
  %75 = load i32, ptr %74, align 4
  %76 = and i32 %75, -1024
  %77 = or i32 %76, 256
  store i32 %77, ptr %74, align 4
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.level_buf, ptr %78, i32 0, i32 5
  %80 = load ptr, ptr %79, align 8, !tbaa !36
  %81 = load i32, ptr %80, align 4
  %82 = and i32 %81, -523265
  %83 = or i32 %82, 30720
  store i32 %83, ptr %80, align 4
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.level_buf, ptr %84, i32 0, i32 5
  %86 = load ptr, ptr %85, align 8, !tbaa !36
  %87 = load i32, ptr %86, align 4
  %88 = and i32 %87, 524287
  %89 = or i32 %88, 0
  store i32 %89, ptr %86, align 4
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.level_buf, ptr %90, i32 0, i32 5
  %92 = load ptr, ptr %91, align 8, !tbaa !36
  %93 = getelementptr inbounds %struct.deflate_icf, ptr %92, i32 1
  store ptr %93, ptr %91, align 8, !tbaa !36
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %94, i32 0, i32 1
  %96 = load ptr, ptr %95, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.isal_zstream, ptr %96, i32 0, i32 10
  %98 = load i16, ptr %97, align 8, !tbaa !40
  %99 = icmp ne i16 %98, 0
  br i1 %99, label %100, label %103

100:                                              ; preds = %63
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = call noundef zeroext i1 @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE17are_buffers_emptyEv(ptr noundef nonnull align 8 dereferenceable(192) %101) #7
  br label %103

103:                                              ; preds = %100, %63
  %104 = phi i1 [ false, %63 ], [ %102, %100 ]
  %105 = zext i1 %104 to i64
  %106 = select i1 %104, i32 1, i32 0
  %107 = trunc i32 %106 to i8
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.isal_zstate, ptr %108, i32 0, i32 9
  store i8 %107, ptr %109, align 1, !tbaa !41
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %111, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !9
  %114 = getelementptr inbounds %struct.isal_zstream, ptr %113, i32 0, i32 3
  %115 = load ptr, ptr %114, align 8, !tbaa !32
  %116 = ptrtoint ptr %110 to i64
  %117 = ptrtoint ptr %115 to i64
  %118 = sub i64 %116, %117
  %119 = icmp sge i64 %118, 328
  br i1 %119, label %120, label %122

120:                                              ; preds = %103
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE16reset_bit_bufferEv(ptr noundef nonnull align 8 dereferenceable(192) %121) #7
  store i32 0, ptr %12, align 4, !tbaa !31
  br label %128

122:                                              ; preds = %103
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.level_buf, ptr %124, i32 0, i32 4
  %126 = getelementptr inbounds [328 x i8], ptr %125, i64 0, i64 0
  invoke void @_ZL7set_bufP7BitBuf2Phj(ptr noundef %123, ptr noundef %126, i32 noundef 328)
          to label %127 unwind label %247

127:                                              ; preds = %122
  store i32 1, ptr %12, align 4, !tbaa !31
  br label %128

128:                                              ; preds = %127, %120
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.level_buf, ptr %129, i32 0, i32 1
  call void @_ZN3qpl2ml11compression17prepare_histogramEP13isal_mod_hist(ptr noundef %130) #7
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %131, i32 0, i32 3
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.level_buf, ptr %133, i32 0, i32 1
  call void @_ZN3qpl2ml11compression23build_huffman_table_icfERNS1_17huffman_table_icfEP13isal_mod_hist(ptr noundef nonnull align 8 dereferenceable(16) %132, ptr noundef %134) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %136, i32 0, i32 3
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.level_buf, ptr %138, i32 0, i32 1
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = call noundef zeroext i8 @_ZNK3qpl2ml11compression18compression_stream16compression_modeEv(ptr noundef nonnull align 8 dereferenceable(28) %140) #7
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.isal_zstate, ptr %142, i32 0, i32 9
  %144 = load i8, ptr %143, align 1, !tbaa !41
  %145 = zext i8 %144 to i32
  %146 = call noundef i64 @_ZN3qpl2ml11compression23write_huffman_table_icfEP7BitBuf2RNS1_17huffman_table_icfEP13isal_mod_histNS1_18compression_mode_tEj(ptr noundef %135, ptr noundef nonnull align 8 dereferenceable(16) %137, ptr noundef %139, i8 noundef zeroext %141, i32 noundef %145) #7
  store i64 %146, ptr %14, align 8, !tbaa !35
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %147, i32 0, i32 3
  call void @_ZNK3qpl2ml11compression17huffman_table_icf21expand_huffman_tablesEv(ptr noundef nonnull align 8 dereferenceable(16) %148) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %149, i32 0, i32 1
  %151 = load ptr, ptr %150, align 8, !tbaa !9
  %152 = getelementptr inbounds %struct.isal_zstream, ptr %151, i32 0, i32 2
  %153 = load i32, ptr %152, align 4, !tbaa !42
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.isal_zstate, ptr %154, i32 0, i32 1
  %156 = load i32, ptr %155, align 4, !tbaa !34
  %157 = sub i32 %153, %156
  store i32 %157, ptr %15, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %158, i32 0, i32 1
  %160 = load ptr, ptr %159, align 8, !tbaa !9
  %161 = getelementptr inbounds %struct.isal_zstream, ptr %160, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8, !tbaa !43
  %163 = load i32, ptr %15, align 4, !tbaa !31
  %164 = zext i32 %163 to i64
  %165 = sub i64 0, %164
  %166 = getelementptr inbounds i8, ptr %162, i64 %165
  store ptr %166, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %167 = load ptr, ptr %3, align 8, !tbaa !5
  %168 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %167, i32 0, i32 1
  %169 = load ptr, ptr %168, align 8, !tbaa !9
  %170 = getelementptr inbounds %struct.isal_zstream, ptr %169, i32 0, i32 4
  %171 = load i32, ptr %170, align 8, !tbaa !30
  %172 = zext i32 %171 to i64
  %173 = add i64 %172, 65824
  %174 = load ptr, ptr %3, align 8, !tbaa !5
  %175 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %174, i32 0, i32 1
  %176 = load ptr, ptr %175, align 8, !tbaa !9
  %177 = getelementptr inbounds %struct.isal_zstream, ptr %176, i32 0, i32 2
  %178 = load i32, ptr %177, align 4, !tbaa !42
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.isal_zstate, ptr %179, i32 0, i32 2
  %181 = load i32, ptr %180, align 8, !tbaa !33
  %182 = sub i32 %178, %181
  %183 = zext i32 %182 to i64
  %184 = sub i64 %173, %183
  %185 = trunc i64 %184 to i32
  store i32 %185, ptr %17, align 4, !tbaa !31
  %186 = load i64, ptr %14, align 8, !tbaa !35
  %187 = udiv i64 %186, 8
  %188 = load i64, ptr %13, align 8, !tbaa !35
  %189 = icmp uge i64 %187, %188
  br i1 %189, label %201, label %190

190:                                              ; preds = %128
  %191 = load i64, ptr %14, align 8, !tbaa !35
  %192 = add i64 %191, 64
  %193 = udiv i64 %192, 8
  %194 = load ptr, ptr %3, align 8, !tbaa !5
  %195 = getelementptr inbounds %"class.qpl::ml::compression::deflate_state", ptr %194, i32 0, i32 1
  %196 = load ptr, ptr %195, align 8, !tbaa !9
  %197 = getelementptr inbounds %struct.isal_zstream, ptr %196, i32 0, i32 4
  %198 = load i32, ptr %197, align 8, !tbaa !30
  %199 = zext i32 %198 to i64
  %200 = icmp ugt i64 %193, %199
  br i1 %200, label %201, label %219

201:                                              ; preds = %190, %128
  %202 = load ptr, ptr %16, align 8, !tbaa !5
  %203 = load ptr, ptr %3, align 8, !tbaa !5
  %204 = call noundef ptr @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE12source_beginEv(ptr noundef nonnull align 8 dereferenceable(192) %203) #7
  %205 = icmp uge ptr %202, %204
  br i1 %205, label %206, label %219

206:                                              ; preds = %201
  %207 = load i64, ptr %13, align 8, !tbaa !35
  %208 = load i32, ptr %17, align 4, !tbaa !31
  %209 = zext i32 %208 to i64
  %210 = icmp ule i64 %207, %209
  br i1 %210, label %211, label %219

211:                                              ; preds = %206
  %212 = load ptr, ptr %5, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.isal_zstate, ptr %212, i32 0, i32 9
  store i8 0, ptr %213, align 1, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store ptr %8, ptr %18, align 8, !tbaa !5
  %214 = load ptr, ptr %18, align 8, !tbaa !5
  %215 = load ptr, ptr %18, align 8, !tbaa !5
  %216 = getelementptr inbounds i8, ptr %215, i64 40
  %217 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3qpl7core_sw4util4copyIPhS3_EEvT_S4_T0_(ptr noundef %214, ptr noundef %216, ptr noundef %217) #7
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  store i8 9, ptr %218, align 1, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %246

219:                                              ; preds = %206, %201, %190
  %220 = load i32, ptr %12, align 4, !tbaa !31
  %221 = icmp ne i32 %220, 0
  br i1 %221, label %222, label %242

222:                                              ; preds = %219
  %223 = load ptr, ptr %6, align 8, !tbaa !5
  %224 = invoke noundef i32 @_ZL11buffer_usedP7BitBuf2(ptr noundef %223)
          to label %225 unwind label %247

225:                                              ; preds = %222
  %226 = load ptr, ptr %7, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.level_buf, ptr %226, i32 0, i32 2
  store i32 %224, ptr %227, align 4, !tbaa !46
  %228 = load ptr, ptr %6, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.BitBuf2, ptr %228, i32 0, i32 1
  %230 = load i32, ptr %229, align 8, !tbaa !47
  %231 = load ptr, ptr %7, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.level_buf, ptr %231, i32 0, i32 3
  store i32 %230, ptr %232, align 8, !tbaa !48
  %233 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZL5flushP7BitBuf2(ptr noundef %233)
          to label %234 unwind label %247

234:                                              ; preds = %225
  %235 = getelementptr inbounds i8, ptr %8, i64 40
  %236 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3qpl7core_sw4util4copyIPhS3_EEvT_S4_T0_(ptr noundef %8, ptr noundef %235, ptr noundef %236) #7
  %237 = load ptr, ptr %6, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.BitBuf2, ptr %237, i32 0, i32 0
  store i64 0, ptr %238, align 8, !tbaa !49
  %239 = load ptr, ptr %6, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.BitBuf2, ptr %239, i32 0, i32 1
  store i32 0, ptr %240, align 8, !tbaa !47
  %241 = load ptr, ptr %4, align 8, !tbaa !5
  store i8 6, ptr %241, align 1, !tbaa !44
  br label %245

242:                                              ; preds = %219
  %243 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE15dump_bit_bufferEv(ptr noundef nonnull align 8 dereferenceable(192) %243) #7
  %244 = load ptr, ptr %4, align 8, !tbaa !5
  store i8 7, ptr %244, align 1, !tbaa !44
  br label %245

245:                                              ; preds = %242, %234
  br label %246

246:                                              ; preds = %245, %211
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret i32 0

247:                                              ; preds = %225, %222, %122
  %248 = landingpad { ptr, i32 }
          catch ptr null
  %249 = extractvalue { ptr, i32 } %248, 0
  call void @__clang_call_terminate(ptr %249) #8
  unreachable
}

; 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: nounwind
declare noundef zeroext i1 @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE17are_buffers_emptyEv(ptr noundef nonnull align 8 dereferenceable(192)) #1

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

; Function Attrs: nounwind
declare void @_ZN3qpl2ml11compression17prepare_histogramEP13isal_mod_hist(ptr noundef) #1

; Function Attrs: nounwind
declare void @_ZN3qpl2ml11compression23build_huffman_table_icfERNS1_17huffman_table_icfEP13isal_mod_hist(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #1

; Function Attrs: nounwind
declare noundef i64 @_ZN3qpl2ml11compression23write_huffman_table_icfEP7BitBuf2RNS1_17huffman_table_icfEP13isal_mod_histNS1_18compression_mode_tEj(ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i8 noundef zeroext, i32 noundef) #1

; Function Attrs: nounwind
declare noundef zeroext i8 @_ZNK3qpl2ml11compression18compression_stream16compression_modeEv(ptr noundef nonnull align 8 dereferenceable(28)) #1

; Function Attrs: nounwind
declare void @_ZNK3qpl2ml11compression17huffman_table_icf21expand_huffman_tablesEv(ptr noundef nonnull align 8 dereferenceable(16)) #1

; Function Attrs: nounwind
declare noundef ptr @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE12source_beginEv(ptr noundef nonnull align 8 dereferenceable(192)) #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { 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 32}
!10 = !{!"_ZTSN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EEE", !11, i64 0, !6, i64 32, !6, i64 40, !18, i64 48, !19, i64 64, !20, i64 104, !21, i64 128, !22, i64 129, !6, i64 136, !17, i64 144, !6, i64 152, !13, i64 160, !13, i64 164, !13, i64 168, !17, i64 172, !6, i64 176, !6, i64 184}
!11 = !{!"_ZTSN3qpl2ml11compression18compression_streamE", !12, i64 8, !14, i64 16, !15, i64 17, !16, i64 18, !13, i64 20, !13, i64 24}
!12 = !{!"_ZTSN3qpl2ml4util20checksum_accumulatorE", !13, i64 0, !13, i64 4}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN3qpl2ml11compression18compression_mode_tE", !7, i64 0}
!15 = !{!"_ZTSN3qpl2ml11compression17mini_block_size_tE", !7, i64 0}
!16 = !{!"_ZTSN3qpl2ml11compression10chunk_typeE", !17, i64 0, !17, i64 1}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSN3qpl2ml11compression17huffman_table_icfE", !6, i64 0, !13, i64 8, !13, i64 12}
!19 = !{!"_ZTS20deflate_hash_table_t", !6, i64 0, !6, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32}
!20 = !{!"_ZTSN3qpl2ml11compression13index_table_tE", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16}
!21 = !{!"_ZTSN3qpl2ml11compression19compression_level_tE", !7, i64 0}
!22 = !{!"_ZTSN3qpl2ml11compression20dictionary_support_tE", !7, i64 0}
!23 = !{!24, !6, i64 48}
!24 = !{!"_ZTS12isal_zstream", !6, i64 0, !13, i64 8, !13, i64 12, !6, i64 16, !13, i64 24, !13, i64 28, !6, i64 32, !13, i64 40, !13, i64 44, !6, i64 48, !25, i64 56, !25, i64 58, !25, i64 60, !25, i64 62, !26, i64 64}
!25 = !{!"short", !7, i64 0}
!26 = !{!"_ZTS11isal_zstate", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !27, i64 20, !28, i64 24, !13, i64 64, !7, i64 68, !7, i64 69, !7, i64 70, !7, i64 71, !25, i64 72, !13, i64 76, !7, i64 80, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !7, i64 112, !7, i64 65936}
!27 = !{!"_ZTS17isal_zstate_state", !7, i64 0}
!28 = !{!"_ZTS7BitBuf2", !29, i64 0, !13, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!29 = !{!"long", !7, i64 0}
!30 = !{!24, !13, i64 24}
!31 = !{!13, !13, i64 0}
!32 = !{!24, !6, i64 16}
!33 = !{!26, !13, i64 8}
!34 = !{!26, !13, i64 4}
!35 = !{!29, !29, i64 0}
!36 = !{!37, !6, i64 4688}
!37 = !{!"_ZTS9level_buf", !38, i64 0, !39, i64 2176, !13, i64 4348, !13, i64 4352, !7, i64 4356, !6, i64 4688, !29, i64 4696, !6, i64 4704, !7, i64 4712}
!38 = !{!"_ZTS14hufftables_icf", !7, i64 0}
!39 = !{!"_ZTS13isal_mod_hist", !7, i64 0, !7, i64 120}
!40 = !{!24, !25, i64 56}
!41 = !{!26, !7, i64 69}
!42 = !{!24, !13, i64 12}
!43 = !{!24, !6, i64 0}
!44 = !{!45, !45, i64 0}
!45 = !{!"_ZTSN3qpl2ml11compression19compression_state_tE", !7, i64 0}
!46 = !{!37, !13, i64 4348}
!47 = !{!28, !13, i64 8}
!48 = !{!37, !13, i64 4352}
!49 = !{!28, !29, i64 0}


; 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.BitBuf2 = type { i64, i32, ptr, ptr, ptr }

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

; Function Attrs: nounwind
declare void @_ZN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE16reset_bit_bufferEv(ptr noundef nonnull align 8 dereferenceable(192)) local_unnamed_addr #1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind
declare void @_ZN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE15dump_bit_bufferEv(ptr noundef nonnull align 8 dereferenceable(192)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl7core_sw4util4copyIPhS3_EEvT_S4_T0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN3qpl2ml11compression23create_icf_block_headerERNS1_13deflate_stateILNS0_16execution_path_tE2EEERNS1_19compression_state_tE(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr nocapture noundef nonnull writeonly align 1 dereferenceable(1) %1) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.BitBuf2, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 32
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 88
  %7 = getelementptr inbounds i8, ptr %5, i64 48
  %8 = load ptr, ptr %7, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %3, i8 0, i64 40, i1 false)
  %9 = getelementptr inbounds i8, ptr %5, i64 24
  %10 = load i32, ptr %9, align 8, !tbaa !29
  %11 = getelementptr inbounds i8, ptr %5, i64 16
  %12 = load ptr, ptr %11, align 8, !tbaa !30
  %13 = zext i32 %10 to i64
  %14 = getelementptr inbounds i8, ptr %12, i64 %13
  %15 = getelementptr inbounds i8, ptr %5, i64 72
  %16 = load i32, ptr %15, align 8, !tbaa !31
  %17 = getelementptr inbounds i8, ptr %5, i64 68
  %18 = load i32, ptr %17, align 4, !tbaa !32
  %19 = sub i32 %16, %18
  %20 = zext i32 %19 to i64
  %21 = add nuw nsw i64 %20, 65534
  %22 = udiv i64 %21, 65535
  %23 = mul nuw nsw i64 %22, 5
  %24 = add nuw nsw i64 %23, %20
  %.not = icmp eq i64 %24, 0
  %25 = select i1 %.not, i64 5, i64 %24
  %26 = getelementptr inbounds i8, ptr %5, i64 128
  call void @_ZN3qpl7core_sw4util4copyIPhS3_EEvT_S4_T0_(ptr noundef nonnull %6, ptr noundef nonnull %26, ptr noundef nonnull %3) #7
  %27 = getelementptr inbounds i8, ptr %8, i64 2176
  %28 = getelementptr inbounds i8, ptr %8, i64 3320
  store i32 1, ptr %28, align 8, !tbaa !33
  %29 = getelementptr inbounds i8, ptr %8, i64 4688
  %30 = load ptr, ptr %29, align 8, !tbaa !34
  %31 = load i32, ptr %30, align 4
  %32 = and i32 %31, -1024
  %33 = or disjoint i32 %32, 256
  store i32 %33, ptr %30, align 4
  %34 = load ptr, ptr %29, align 8, !tbaa !34
  %35 = load i32, ptr %34, align 4
  %36 = and i32 %35, -523265
  %37 = or disjoint i32 %36, 30720
  store i32 %37, ptr %34, align 4
  %38 = load ptr, ptr %29, align 8, !tbaa !34
  %39 = load i32, ptr %38, align 4
  %40 = and i32 %39, 524287
  store i32 %40, ptr %38, align 4
  %41 = load ptr, ptr %29, align 8, !tbaa !34
  %42 = getelementptr inbounds i8, ptr %41, i64 4
  store ptr %42, ptr %29, align 8, !tbaa !34
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 56
  %45 = load i16, ptr %44, align 8, !tbaa !38
  %.not67 = icmp eq i16 %45, 0
  br i1 %.not67, label %49, label %46

46:                                               ; preds = %2
  %47 = call noundef zeroext i1 @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE17are_buffers_emptyEv(ptr noundef nonnull align 8 dereferenceable(192) %0) #7
  %48 = zext i1 %47 to i8
  %.pre = load ptr, ptr %4, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %46, %2
  %50 = phi ptr [ %43, %2 ], [ %.pre, %46 ]
  %51 = phi i8 [ 0, %2 ], [ %48, %46 ]
  %52 = getelementptr inbounds i8, ptr %5, i64 133
  store i8 %51, ptr %52, align 1, !tbaa !39
  %53 = getelementptr inbounds i8, ptr %50, i64 16
  %54 = load ptr, ptr %53, align 8, !tbaa !30
  %55 = ptrtoint ptr %14 to i64
  %56 = ptrtoint ptr %54 to i64
  %57 = sub i64 %55, %56
  %58 = icmp sgt i64 %57, 327
  br i1 %58, label %59, label %60

59:                                               ; preds = %49
  call void @_ZN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE16reset_bit_bufferEv(ptr noundef nonnull align 8 dereferenceable(192) %0) #7
  br label %62

60:                                               ; preds = %49
  %61 = getelementptr inbounds i8, ptr %8, i64 4356
  call void @_ZL7set_bufP7BitBuf2Phj(ptr noundef nonnull %6, ptr noundef nonnull %61, i32 noundef 328)
  br label %62

62:                                               ; preds = %60, %59
  call void @_ZN3qpl2ml11compression17prepare_histogramEP13isal_mod_hist(ptr noundef nonnull %27) #7
  %63 = getelementptr inbounds i8, ptr %0, i64 48
  call void @_ZN3qpl2ml11compression23build_huffman_table_icfERNS1_17huffman_table_icfEP13isal_mod_hist(ptr noundef nonnull align 8 dereferenceable(16) %63, ptr noundef nonnull %27) #7
  %64 = call noundef zeroext i8 @_ZNK3qpl2ml11compression18compression_stream16compression_modeEv(ptr noundef nonnull align 8 dereferenceable(28) %0) #7
  %65 = load i8, ptr %52, align 1, !tbaa !39
  %66 = zext i8 %65 to i32
  %67 = call noundef i64 @_ZN3qpl2ml11compression23write_huffman_table_icfEP7BitBuf2RNS1_17huffman_table_icfEP13isal_mod_histNS1_18compression_mode_tEj(ptr noundef nonnull %6, ptr noundef nonnull align 8 dereferenceable(16) %63, ptr noundef nonnull %27, i8 noundef zeroext %64, i32 noundef %66) #7
  call void @_ZNK3qpl2ml11compression17huffman_table_icf21expand_huffman_tablesEv(ptr noundef nonnull align 8 dereferenceable(16) %63) #7
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %68, i64 12
  %70 = load i32, ptr %69, align 4, !tbaa !40
  %71 = load i32, ptr %17, align 4, !tbaa !32
  %72 = sub i32 %70, %71
  %73 = load ptr, ptr %68, align 8, !tbaa !41
  %74 = zext i32 %72 to i64
  %75 = sub nsw i64 0, %74
  %76 = getelementptr inbounds i8, ptr %73, i64 %75
  %77 = getelementptr inbounds i8, ptr %68, i64 24
  %78 = load i32, ptr %77, align 8, !tbaa !29
  %79 = load i32, ptr %15, align 8, !tbaa !31
  %reass.sub = sub i32 %78, %70
  %80 = add i32 %reass.sub, 65824
  %81 = add i32 %80, %79
  %82 = lshr i64 %67, 3
  %.not68 = icmp ult i64 %82, %25
  br i1 %.not68, label %83, label %88

83:                                               ; preds = %62
  %84 = zext i32 %78 to i64
  %85 = add i64 %67, 64
  %86 = lshr i64 %85, 3
  %87 = icmp ugt i64 %86, %84
  br i1 %87, label %88, label %93

88:                                               ; preds = %83, %62
  %89 = call noundef ptr @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE12source_beginEv(ptr noundef nonnull align 8 dereferenceable(192) %0) #7
  %.not69 = icmp ult ptr %76, %89
  %90 = zext i32 %81 to i64
  %.not70 = icmp ugt i64 %25, %90
  %or.cond = select i1 %.not69, i1 true, i1 %.not70
  br i1 %or.cond, label %93, label %91

91:                                               ; preds = %88
  store i8 0, ptr %52, align 1, !tbaa !39
  %92 = getelementptr inbounds i8, ptr %3, i64 40
  call void @_ZN3qpl7core_sw4util4copyIPhS3_EEvT_S4_T0_(ptr noundef nonnull %3, ptr noundef nonnull %92, ptr noundef nonnull %6) #7
  br label %103

93:                                               ; preds = %88, %83
  br i1 %58, label %102, label %94

94:                                               ; preds = %93
  %95 = call noundef i32 @_ZL11buffer_usedP7BitBuf2(ptr noundef nonnull %6)
  %96 = getelementptr inbounds i8, ptr %8, i64 4348
  store i32 %95, ptr %96, align 4, !tbaa !42
  %97 = getelementptr inbounds i8, ptr %5, i64 96
  %98 = load i32, ptr %97, align 8, !tbaa !43
  %99 = getelementptr inbounds i8, ptr %8, i64 4352
  store i32 %98, ptr %99, align 8, !tbaa !44
  invoke void @_ZL5flushP7BitBuf2(ptr noundef nonnull %6)
          to label %100 unwind label %104

100:                                              ; preds = %94
  %101 = getelementptr inbounds i8, ptr %3, i64 40
  call void @_ZN3qpl7core_sw4util4copyIPhS3_EEvT_S4_T0_(ptr noundef nonnull %3, ptr noundef nonnull %101, ptr noundef nonnull %6) #7
  store i64 0, ptr %6, align 8, !tbaa !45
  store i32 0, ptr %97, align 8, !tbaa !43
  br label %103

102:                                              ; preds = %93
  call void @_ZN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE15dump_bit_bufferEv(ptr noundef nonnull align 8 dereferenceable(192) %0) #7
  br label %103

103:                                              ; preds = %100, %102, %91
  %.sink = phi i8 [ 6, %100 ], [ 7, %102 ], [ 9, %91 ]
  store i8 %.sink, ptr %1, align 1, !tbaa !46
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #7
  ret i32 0

104:                                              ; preds = %94
  %105 = landingpad { ptr, i32 }
          catch ptr null
  %106 = extractvalue { ptr, i32 } %105, 0
  call void @__clang_call_terminate(ptr %106) #8
  unreachable
}

; 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: nounwind
declare noundef zeroext i1 @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE17are_buffers_emptyEv(ptr noundef nonnull align 8 dereferenceable(192)) local_unnamed_addr #1

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

; Function Attrs: nounwind
declare void @_ZN3qpl2ml11compression17prepare_histogramEP13isal_mod_hist(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN3qpl2ml11compression23build_huffman_table_icfERNS1_17huffman_table_icfEP13isal_mod_hist(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare noundef i64 @_ZN3qpl2ml11compression23write_huffman_table_icfEP7BitBuf2RNS1_17huffman_table_icfEP13isal_mod_histNS1_18compression_mode_tEj(ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i8 noundef zeroext, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare noundef zeroext i8 @_ZNK3qpl2ml11compression18compression_stream16compression_modeEv(ptr noundef nonnull align 8 dereferenceable(28)) local_unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZNK3qpl2ml11compression17huffman_table_icf21expand_huffman_tablesEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: nounwind
declare noundef ptr @_ZNK3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EE12source_beginEv(ptr noundef nonnull align 8 dereferenceable(192)) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { 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 #5 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { 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, !16, i64 32}
!6 = !{!"_ZTSN3qpl2ml11compression13deflate_stateILNS0_16execution_path_tE2EEE", !7, i64 0, !16, i64 32, !16, i64 40, !17, i64 48, !18, i64 64, !19, i64 104, !20, i64 128, !21, i64 129, !16, i64 136, !15, i64 144, !16, i64 152, !9, i64 160, !9, i64 164, !9, i64 168, !15, i64 172, !16, i64 176, !16, i64 184}
!7 = !{!"_ZTSN3qpl2ml11compression18compression_streamE", !8, i64 8, !12, i64 16, !13, i64 17, !14, i64 18, !9, i64 20, !9, i64 24}
!8 = !{!"_ZTSN3qpl2ml4util20checksum_accumulatorE", !9, i64 0, !9, i64 4}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSN3qpl2ml11compression18compression_mode_tE", !10, i64 0}
!13 = !{!"_ZTSN3qpl2ml11compression17mini_block_size_tE", !10, i64 0}
!14 = !{!"_ZTSN3qpl2ml11compression10chunk_typeE", !15, i64 0, !15, i64 1}
!15 = !{!"bool", !10, i64 0}
!16 = !{!"any pointer", !10, i64 0}
!17 = !{!"_ZTSN3qpl2ml11compression17huffman_table_icfE", !16, i64 0, !9, i64 8, !9, i64 12}
!18 = !{!"_ZTS20deflate_hash_table_t", !16, i64 0, !16, i64 8, !9, i64 16, !9, i64 20, !9, i64 24, !9, i64 28, !9, i64 32}
!19 = !{!"_ZTSN3qpl2ml11compression13index_table_tE", !16, i64 0, !9, i64 8, !9, i64 12, !9, i64 16}
!20 = !{!"_ZTSN3qpl2ml11compression19compression_level_tE", !10, i64 0}
!21 = !{!"_ZTSN3qpl2ml11compression20dictionary_support_tE", !10, i64 0}
!22 = !{!23, !16, i64 48}
!23 = !{!"_ZTS12isal_zstream", !16, i64 0, !9, i64 8, !9, i64 12, !16, i64 16, !9, i64 24, !9, i64 28, !16, i64 32, !9, i64 40, !9, i64 44, !16, i64 48, !24, i64 56, !24, i64 58, !24, i64 60, !24, i64 62, !25, i64 64}
!24 = !{!"short", !10, i64 0}
!25 = !{!"_ZTS11isal_zstate", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !26, i64 20, !27, i64 24, !9, i64 64, !10, i64 68, !10, i64 69, !10, i64 70, !10, i64 71, !24, i64 72, !9, i64 76, !10, i64 80, !9, i64 96, !9, i64 100, !9, i64 104, !9, i64 108, !10, i64 112, !10, i64 65936}
!26 = !{!"_ZTS17isal_zstate_state", !10, i64 0}
!27 = !{!"_ZTS7BitBuf2", !28, i64 0, !9, i64 8, !16, i64 16, !16, i64 24, !16, i64 32}
!28 = !{!"long", !10, i64 0}
!29 = !{!23, !9, i64 24}
!30 = !{!23, !16, i64 16}
!31 = !{!25, !9, i64 8}
!32 = !{!25, !9, i64 4}
!33 = !{!9, !9, i64 0}
!34 = !{!35, !16, i64 4688}
!35 = !{!"_ZTS9level_buf", !36, i64 0, !37, i64 2176, !9, i64 4348, !9, i64 4352, !10, i64 4356, !16, i64 4688, !28, i64 4696, !16, i64 4704, !10, i64 4712}
!36 = !{!"_ZTS14hufftables_icf", !10, i64 0}
!37 = !{!"_ZTS13isal_mod_hist", !10, i64 0, !10, i64 120}
!38 = !{!23, !24, i64 56}
!39 = !{!25, !10, i64 69}
!40 = !{!23, !9, i64 12}
!41 = !{!23, !16, i64 0}
!42 = !{!35, !9, i64 4348}
!43 = !{!27, !9, i64 8}
!44 = !{!35, !9, i64 4352}
!45 = !{!27, !28, i64 0}
!46 = !{!47, !47, i64 0}
!47 = !{!"_ZTSN3qpl2ml11compression19compression_state_tE", !10, i64 0}


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