; LLVM IR from intel/qpl :: sources/isal/igzip (huff_codes)

; 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.huff_code = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { i32 }
%struct.heap_tree = type { %union.anon.1 }
%union.anon.1 = type { [859 x i64] }
%struct.BitBuf2 = type { i64, i32, ptr, ptr, ptr }
%struct.rl_code = type { i8, i8 }
%struct.isal_hufftables = type { [328 x i8], i32, i32, [2 x i32], [256 x i32], [257 x i16], [257 x i8], [30 x i16], [30 x i8] }
%struct.isal_huff_histogram = type { [286 x i64], [30 x i64], [8192 x i16] }
%struct.anon.0 = type { i16, i8, i8 }

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @convert_dist_to_dist_sym(i32 noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @qpl_isal_create_hufftables(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [286 x %struct.huff_code], align 16
  %6 = alloca [30 x %struct.huff_code], align 16
  %7 = alloca i32, align 4
  %8 = alloca %struct.heap_tree, align 8
  %9 = alloca [16 x i32], align 16
  %10 = alloca %struct.BitBuf2, align 8
  %11 = alloca [316 x i16], align 16
  %12 = alloca [19 x i64], align 16
  %13 = alloca [316 x %struct.rl_code], align 16
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i64, 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 1144, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 120, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %31 = call i32 @convert_dist_to_dist_sym(i32 noundef 32768)
  store i32 %31, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 6872, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 632, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 152, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 632, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.isal_hufftables, ptr %32, i32 0, i32 3
  %34 = getelementptr inbounds [2 x i32], ptr %33, i64 0, i64 0
  store ptr %34, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.isal_hufftables, ptr %35, i32 0, i32 4
  %37 = getelementptr inbounds [256 x i32], ptr %36, i64 0, i64 0
  store ptr %37, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.isal_hufftables, ptr %38, i32 0, i32 5
  %40 = getelementptr inbounds [257 x i16], ptr %39, i64 0, i64 0
  store ptr %40, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.isal_hufftables, ptr %41, i32 0, i32 7
  %43 = getelementptr inbounds [30 x i16], ptr %42, i64 0, i64 0
  store ptr %43, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.isal_hufftables, ptr %44, i32 0, i32 6
  %46 = getelementptr inbounds [257 x i8], ptr %45, i64 0, i64 0
  store ptr %46, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.isal_hufftables, ptr %47, i32 0, i32 8
  %49 = getelementptr inbounds [30 x i8], ptr %48, i64 0, i64 0
  store ptr %49, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.isal_huff_histogram, ptr %50, i32 0, i32 0
  %52 = getelementptr inbounds [286 x i64], ptr %51, i64 0, i64 0
  store ptr %52, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.isal_huff_histogram, ptr %53, i32 0, i32 1
  %55 = getelementptr inbounds [30 x i64], ptr %54, i64 0, i64 0
  store ptr %55, ptr %22, align 8, !tbaa !5
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 4 %56, i8 0, i64 2232, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %57 = load ptr, ptr %21, align 8, !tbaa !5
  %58 = call i32 @init_heap64_complete(ptr noundef %8, ptr noundef %57, i64 noundef 286)
  store i32 %58, ptr %23, align 4, !tbaa !9
  %59 = load i32, ptr %23, align 4, !tbaa !9
  %60 = getelementptr inbounds [16 x i32], ptr %9, i64 0, i64 0
  %61 = getelementptr inbounds [286 x %struct.huff_code], ptr %5, i64 0, i64 0
  call void @gen_huff_code_lens(ptr noundef %8, i32 noundef %59, ptr noundef %60, ptr noundef %61, i32 noundef 286, i32 noundef 15)
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %62 = getelementptr inbounds [286 x %struct.huff_code], ptr %5, i64 0, i64 0
  %63 = getelementptr inbounds [16 x i32], ptr %9, i64 0, i64 0
  %64 = call i32 @set_huff_codes(ptr noundef %62, i32 noundef 286, ptr noundef %63)
  store i32 %64, ptr %24, align 4, !tbaa !9
  %65 = load ptr, ptr %22, align 8, !tbaa !5
  %66 = call i32 @init_heap64_complete(ptr noundef %8, ptr noundef %65, i64 noundef 30)
  store i32 %66, ptr %23, align 4, !tbaa !9
  %67 = load i32, ptr %23, align 4, !tbaa !9
  %68 = getelementptr inbounds [16 x i32], ptr %9, i64 0, i64 0
  %69 = getelementptr inbounds [30 x %struct.huff_code], ptr %6, i64 0, i64 0
  %70 = load i32, ptr %7, align 4, !tbaa !9
  call void @gen_huff_code_lens(ptr noundef %8, i32 noundef %67, ptr noundef %68, ptr noundef %69, i32 noundef %70, i32 noundef 15)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  %71 = getelementptr inbounds [30 x %struct.huff_code], ptr %6, i64 0, i64 0
  %72 = getelementptr inbounds [16 x i32], ptr %9, i64 0, i64 0
  %73 = call i32 @set_huff_codes(ptr noundef %71, i32 noundef 30, ptr noundef %72)
  store i32 %73, ptr %25, align 4, !tbaa !9
  %74 = getelementptr inbounds [286 x %struct.huff_code], ptr %5, i64 0, i64 0
  %75 = getelementptr inbounds [30 x %struct.huff_code], ptr %6, i64 0, i64 0
  %76 = call i32 @are_hufftables_useable(ptr noundef %74, ptr noundef %75)
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %96

78:                                               ; preds = %2
  %79 = load ptr, ptr %21, align 8, !tbaa !5
  %80 = call i32 @init_heap64_complete(ptr noundef %8, ptr noundef %79, i64 noundef 286)
  store i32 %80, ptr %23, align 4, !tbaa !9
  %81 = load i32, ptr %23, align 4, !tbaa !9
  %82 = getelementptr inbounds [16 x i32], ptr %9, i64 0, i64 0
  %83 = getelementptr inbounds [286 x %struct.huff_code], ptr %5, i64 0, i64 0
  call void @gen_huff_code_lens(ptr noundef %8, i32 noundef %81, ptr noundef %82, ptr noundef %83, i32 noundef 286, i32 noundef 13)
  %84 = getelementptr inbounds [286 x %struct.huff_code], ptr %5, i64 0, i64 0
  %85 = getelementptr inbounds [16 x i32], ptr %9, i64 0, i64 0
  %86 = call i32 @set_huff_codes(ptr noundef %84, i32 noundef 286, ptr noundef %85)
  store i32 %86, ptr %24, align 4, !tbaa !9
  %87 = load ptr, ptr %22, align 8, !tbaa !5
  %88 = call i32 @init_heap64_complete(ptr noundef %8, ptr noundef %87, i64 noundef 30)
  store i32 %88, ptr %23, align 4, !tbaa !9
  %89 = load i32, ptr %23, align 4, !tbaa !9
  %90 = getelementptr inbounds [16 x i32], ptr %9, i64 0, i64 0
  %91 = getelementptr inbounds [30 x %struct.huff_code], ptr %6, i64 0, i64 0
  %92 = load i32, ptr %7, align 4, !tbaa !9
  call void @gen_huff_code_lens(ptr noundef %8, i32 noundef %89, ptr noundef %90, ptr noundef %91, i32 noundef %92, i32 noundef 12)
  %93 = getelementptr inbounds [30 x %struct.huff_code], ptr %6, i64 0, i64 0
  %94 = getelementptr inbounds [16 x i32], ptr %9, i64 0, i64 0
  %95 = call i32 @set_huff_codes(ptr noundef %93, i32 noundef 30, ptr noundef %94)
  store i32 %95, ptr %25, align 4, !tbaa !9
  br label %96

96:                                               ; preds = %78, %2
  %97 = load ptr, ptr %18, align 8, !tbaa !5
  %98 = load ptr, ptr %20, align 8, !tbaa !5
  %99 = getelementptr inbounds [30 x %struct.huff_code], ptr %6, i64 0, i64 0
  %100 = getelementptr inbounds %struct.huff_code, ptr %99, i64 0
  call void @create_code_tables(ptr noundef %97, ptr noundef %98, i32 noundef 30, ptr noundef %100)
  %101 = load ptr, ptr %17, align 8, !tbaa !5
  %102 = load ptr, ptr %19, align 8, !tbaa !5
  %103 = getelementptr inbounds [286 x %struct.huff_code], ptr %5, i64 0, i64 0
  call void @create_code_tables(ptr noundef %101, ptr noundef %102, i32 noundef 257, ptr noundef %103)
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  %105 = getelementptr inbounds [286 x %struct.huff_code], ptr %5, i64 0, i64 0
  call void @create_packed_len_table(ptr noundef %104, ptr noundef %105)
  %106 = load ptr, ptr %15, align 8, !tbaa !5
  %107 = getelementptr inbounds [30 x %struct.huff_code], ptr %6, i64 0, i64 0
  call void @create_packed_dist_table(ptr noundef %106, i32 noundef 2, ptr noundef %107)
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.isal_hufftables, ptr %108, i32 0, i32 0
  %110 = getelementptr inbounds [328 x i8], ptr %109, i64 0, i64 0
  call void @set_buf(ptr noundef %10, ptr noundef %110, i32 noundef 328)
  call void @init(ptr noundef %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %111 = load i32, ptr %24, align 4, !tbaa !9
  %112 = sub i32 %111, 256
  store i32 %112, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %113 = load i32, ptr %25, align 4, !tbaa !9
  store i32 %113, ptr %27, align 4, !tbaa !9
  %114 = getelementptr inbounds [19 x i64], ptr %12, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %114, i8 0, i64 152, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %115

115:                                              ; preds = %132, %96
  %116 = load i32, ptr %28, align 4, !tbaa !9
  %117 = load i32, ptr %26, align 4, !tbaa !9
  %118 = add i32 257, %117
  %119 = icmp ult i32 %116, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  br label %135

121:                                              ; preds = %115
  %122 = load i32, ptr %28, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds [286 x %struct.huff_code], ptr %5, i64 0, i64 %123
  %125 = getelementptr inbounds %struct.huff_code, ptr %124, i32 0, i32 0
  %126 = getelementptr inbounds %struct.anon.0, ptr %125, i32 0, i32 2
  %127 = load i8, ptr %126, align 1, !tbaa !11
  %128 = zext i8 %127 to i16
  %129 = load i32, ptr %28, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds [316 x i16], ptr %11, i64 0, i64 %130
  store i16 %128, ptr %131, align 2, !tbaa !12
  br label %132

132:                                              ; preds = %121
  %133 = load i32, ptr %28, align 4, !tbaa !9
  %134 = add i32 %133, 1
  store i32 %134, ptr %28, align 4, !tbaa !9
  br label %115, !llvm.loop !14

135:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %136

136:                                              ; preds = %156, %135
  %137 = load i32, ptr %29, align 4, !tbaa !9
  %138 = load i32, ptr %27, align 4, !tbaa !9
  %139 = add i32 1, %138
  %140 = icmp ult i32 %137, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  br label %159

142:                                              ; preds = %136
  %143 = load i32, ptr %29, align 4, !tbaa !9
  %144 = zext i32 %143 to i64
  %145 = getelementptr inbounds [30 x %struct.huff_code], ptr %6, i64 0, i64 %144
  %146 = getelementptr inbounds %struct.huff_code, ptr %145, i32 0, i32 0
  %147 = getelementptr inbounds %struct.anon.0, ptr %146, i32 0, i32 2
  %148 = load i8, ptr %147, align 1, !tbaa !11
  %149 = zext i8 %148 to i16
  %150 = load i32, ptr %29, align 4, !tbaa !9
  %151 = load i32, ptr %26, align 4, !tbaa !9
  %152 = add i32 %150, %151
  %153 = add i32 %152, 257
  %154 = zext i32 %153 to i64
  %155 = getelementptr inbounds [316 x i16], ptr %11, i64 0, i64 %154
  store i16 %149, ptr %155, align 2, !tbaa !12
  br label %156

156:                                              ; preds = %142
  %157 = load i32, ptr %29, align 4, !tbaa !9
  %158 = add i32 %157, 1
  store i32 %158, ptr %29, align 4, !tbaa !9
  br label %136, !llvm.loop !16

159:                                              ; preds = %141
  %160 = getelementptr inbounds [316 x i16], ptr %11, i64 0, i64 0
  %161 = load i32, ptr %26, align 4, !tbaa !9
  %162 = add i32 %161, 257
  %163 = load i32, ptr %27, align 4, !tbaa !9
  %164 = add i32 %162, %163
  %165 = add i32 %164, 1
  %166 = getelementptr inbounds [19 x i64], ptr %12, i64 0, i64 0
  %167 = getelementptr inbounds [316 x %struct.rl_code], ptr %13, i64 0, i64 0
  %168 = call i32 @rl_encode(ptr noundef %160, i32 noundef %165, ptr noundef %166, ptr noundef %167)
  store i32 %168, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  %169 = getelementptr inbounds [316 x %struct.rl_code], ptr %13, i64 0, i64 0
  %170 = load i32, ptr %14, align 4, !tbaa !9
  %171 = getelementptr inbounds [19 x i64], ptr %12, i64 0, i64 0
  %172 = load i32, ptr %26, align 4, !tbaa !9
  %173 = load i32, ptr %27, align 4, !tbaa !9
  %174 = call i32 @create_header(ptr noundef %10, ptr noundef %169, i32 noundef %170, ptr noundef %171, i32 noundef %172, i32 noundef %173, i32 noundef 1)
  %175 = sext i32 %174 to i64
  store i64 %175, ptr %30, align 8, !tbaa !17
  call void @flush(ptr noundef %10)
  %176 = load i64, ptr %30, align 8, !tbaa !17
  %177 = udiv i64 %176, 8
  %178 = trunc i64 %177 to i32
  %179 = load ptr, ptr %3, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.isal_hufftables, ptr %179, i32 0, i32 1
  store i32 %178, ptr %180, align 4, !tbaa !19
  %181 = load i64, ptr %30, align 8, !tbaa !17
  %182 = urem i64 %181, 8
  %183 = trunc i64 %182 to i32
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.isal_hufftables, ptr %184, i32 0, i32 2
  store i32 %183, ptr %185, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 632, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 152, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 632, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 6872, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 120, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1144, ptr %5) #4
  ret i32 0
}

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!18, !18, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!20, !10, i64 328}
!20 = !{!"isal_hufftables", !7, i64 0, !10, i64 328, !10, i64 332, !7, i64 336, !7, i64 344, !7, i64 1368, !7, i64 1882, !7, i64 2140, !7, i64 2200}
!21 = !{!20, !10, i64 332}


; 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.huff_code = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { i32 }
%struct.heap_tree = type { %union.anon.1 }
%union.anon.1 = type { [859 x i64] }
%struct.BitBuf2 = type { i64, i32, ptr, ptr, ptr }
%struct.rl_code = type { i8, i8 }

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @convert_dist_to_dist_sym(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @qpl_isal_create_hufftables(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca [286 x %struct.huff_code], align 16
  %4 = alloca [30 x %struct.huff_code], align 16
  %5 = alloca %struct.heap_tree, align 8
  %6 = alloca [16 x i32], align 16
  %7 = alloca %struct.BitBuf2, align 8
  %8 = alloca [316 x i16], align 16
  %9 = alloca [19 x i64], align 16
  %10 = alloca [316 x %struct.rl_code], align 16
  call void @llvm.lifetime.start.p0(i64 1144, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %4) #4
  %11 = tail call i32 @convert_dist_to_dist_sym(i32 noundef 32768)
  call void @llvm.lifetime.start.p0(i64 6872, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 632, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 152, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 632, ptr nonnull %10) #4
  %12 = getelementptr inbounds i8, ptr %0, i64 336
  %13 = getelementptr inbounds i8, ptr %0, i64 344
  %14 = getelementptr inbounds i8, ptr %0, i64 1368
  %15 = getelementptr inbounds i8, ptr %0, i64 2140
  %16 = getelementptr inbounds i8, ptr %0, i64 1882
  %17 = getelementptr inbounds i8, ptr %0, i64 2200
  %18 = getelementptr inbounds i8, ptr %1, i64 2288
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(2232) %0, i8 0, i64 2232, i1 false)
  %19 = call i32 @init_heap64_complete(ptr noundef nonnull %5, ptr noundef %1, i64 noundef 286)
  call void @gen_huff_code_lens(ptr noundef nonnull %5, i32 noundef %19, ptr noundef nonnull %6, ptr noundef nonnull %3, i32 noundef 286, i32 noundef 15)
  %20 = call i32 @set_huff_codes(ptr noundef nonnull %3, i32 noundef 286, ptr noundef nonnull %6)
  %21 = call i32 @init_heap64_complete(ptr noundef nonnull %5, ptr noundef nonnull %18, i64 noundef 30)
  call void @gen_huff_code_lens(ptr noundef nonnull %5, i32 noundef %21, ptr noundef nonnull %6, ptr noundef nonnull %4, i32 noundef %11, i32 noundef 15)
  %22 = call i32 @set_huff_codes(ptr noundef nonnull %4, i32 noundef 30, ptr noundef nonnull %6)
  %23 = call i32 @are_hufftables_useable(ptr noundef nonnull %3, ptr noundef nonnull %4)
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %29, label %24

24:                                               ; preds = %2
  %25 = call i32 @init_heap64_complete(ptr noundef nonnull %5, ptr noundef %1, i64 noundef 286)
  call void @gen_huff_code_lens(ptr noundef nonnull %5, i32 noundef %25, ptr noundef nonnull %6, ptr noundef nonnull %3, i32 noundef 286, i32 noundef 13)
  %26 = call i32 @set_huff_codes(ptr noundef nonnull %3, i32 noundef 286, ptr noundef nonnull %6)
  %27 = call i32 @init_heap64_complete(ptr noundef nonnull %5, ptr noundef nonnull %18, i64 noundef 30)
  call void @gen_huff_code_lens(ptr noundef nonnull %5, i32 noundef %27, ptr noundef nonnull %6, ptr noundef nonnull %4, i32 noundef %11, i32 noundef 12)
  %28 = call i32 @set_huff_codes(ptr noundef nonnull %4, i32 noundef 30, ptr noundef nonnull %6)
  br label %29

29:                                               ; preds = %24, %2
  %.049 = phi i32 [ %28, %24 ], [ %22, %2 ]
  %.048 = phi i32 [ %26, %24 ], [ %20, %2 ]
  call void @create_code_tables(ptr noundef nonnull %15, ptr noundef nonnull %17, i32 noundef 30, ptr noundef nonnull %4)
  call void @create_code_tables(ptr noundef nonnull %14, ptr noundef nonnull %16, i32 noundef 257, ptr noundef nonnull %3)
  call void @create_packed_len_table(ptr noundef nonnull %13, ptr noundef nonnull %3)
  call void @create_packed_dist_table(ptr noundef nonnull %12, i32 noundef 2, ptr noundef nonnull %4)
  call void @set_buf(ptr noundef nonnull %7, ptr noundef nonnull %0, i32 noundef 328)
  call void @init(ptr noundef nonnull %7)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(152) %9, i8 0, i64 152, i1 false)
  %30 = add i32 %.048, 1
  %invariant.gep = getelementptr inbounds i8, ptr %3, i64 3
  %.not56 = icmp eq i32 %30, 0
  br i1 %.not56, label %.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %29
  %wide.trip.count = zext i32 %30 to i64
  %min.iters.check = icmp ult i32 %30, 9
  br i1 %min.iters.check, label %.lr.ph.preheader74, label %vector.ph

.lr.ph.preheader74:                               ; preds = %vector.body, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %vector.body ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.mod.vf = and i64 %wide.trip.count, 7
  %31 = icmp eq i64 %n.mod.vf, 0
  %32 = select i1 %31, i64 8, i64 %n.mod.vf
  %n.vec = sub nsw i64 %wide.trip.count, %32
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %33 = or disjoint i64 %index, 1
  %34 = or disjoint i64 %index, 2
  %35 = or disjoint i64 %index, 3
  %36 = or disjoint i64 %index, 4
  %37 = or disjoint i64 %index, 5
  %38 = or disjoint i64 %index, 6
  %39 = or disjoint i64 %index, 7
  %40 = getelementptr inbounds [286 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %index
  %41 = getelementptr inbounds [286 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %33
  %42 = getelementptr inbounds [286 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %34
  %43 = getelementptr inbounds [286 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %35
  %44 = getelementptr inbounds [286 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %36
  %45 = getelementptr inbounds [286 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %37
  %46 = getelementptr inbounds [286 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %38
  %47 = getelementptr inbounds [286 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %39
  %48 = load i8, ptr %40, align 1, !tbaa !5
  %49 = load i8, ptr %41, align 1, !tbaa !5
  %50 = load i8, ptr %42, align 1, !tbaa !5
  %51 = load i8, ptr %43, align 1, !tbaa !5
  %52 = load i8, ptr %44, align 1, !tbaa !5
  %53 = load i8, ptr %45, align 1, !tbaa !5
  %54 = load i8, ptr %46, align 1, !tbaa !5
  %55 = load i8, ptr %47, align 1, !tbaa !5
  %56 = insertelement <8 x i8> poison, i8 %48, i64 0
  %57 = insertelement <8 x i8> %56, i8 %49, i64 1
  %58 = insertelement <8 x i8> %57, i8 %50, i64 2
  %59 = insertelement <8 x i8> %58, i8 %51, i64 3
  %60 = insertelement <8 x i8> %59, i8 %52, i64 4
  %61 = insertelement <8 x i8> %60, i8 %53, i64 5
  %62 = insertelement <8 x i8> %61, i8 %54, i64 6
  %63 = insertelement <8 x i8> %62, i8 %55, i64 7
  %64 = zext <8 x i8> %63 to <8 x i16>
  %65 = getelementptr inbounds [316 x i16], ptr %8, i64 0, i64 %index
  store <8 x i16> %64, ptr %65, align 16, !tbaa !8
  %index.next = add nuw i64 %index, 8
  %66 = icmp eq i64 %index.next, %n.vec
  br i1 %66, label %.lr.ph.preheader74, label %vector.body, !llvm.loop !10

.preheader:                                       ; preds = %.lr.ph, %29
  %67 = add i32 %.049, 1
  %invariant.gep52 = getelementptr inbounds i8, ptr %4, i64 3
  %.not57 = icmp eq i32 %67, 0
  br i1 %.not57, label %._crit_edge, label %.lr.ph55

.lr.ph55:                                         ; preds = %.preheader
  %wide.trip.count62 = zext i32 %67 to i64
  %min.iters.check66 = icmp ult i32 %67, 17
  br i1 %min.iters.check66, label %scalar.ph65.preheader, label %vector.scevcheck

scalar.ph65.preheader:                            ; preds = %vector.body71, %vector.scevcheck, %.lr.ph55
  %indvars.iv59.ph = phi i64 [ 0, %vector.scevcheck ], [ 0, %.lr.ph55 ], [ %n.vec69, %vector.body71 ]
  %68 = sub nsw i64 %wide.trip.count62, %indvars.iv59.ph
  %xtraiter = and i64 %68, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph65.prol.loopexit, label %scalar.ph65.prol

scalar.ph65.prol:                                 ; preds = %scalar.ph65.preheader, %scalar.ph65.prol
  %indvars.iv59.prol = phi i64 [ %indvars.iv.next60.prol, %scalar.ph65.prol ], [ %indvars.iv59.ph, %scalar.ph65.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph65.prol ], [ 0, %scalar.ph65.preheader ]
  %gep53.prol = getelementptr inbounds [30 x %struct.huff_code], ptr %invariant.gep52, i64 0, i64 %indvars.iv59.prol
  %69 = load i8, ptr %gep53.prol, align 1, !tbaa !5
  %70 = zext i8 %69 to i16
  %71 = trunc nuw i64 %indvars.iv59.prol to i32
  %72 = add i32 %30, %71
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds [316 x i16], ptr %8, i64 0, i64 %73
  store i16 %70, ptr %74, align 2, !tbaa !8
  %indvars.iv.next60.prol = add nuw nsw i64 %indvars.iv59.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph65.prol.loopexit, label %scalar.ph65.prol, !llvm.loop !14

scalar.ph65.prol.loopexit:                        ; preds = %scalar.ph65.prol, %scalar.ph65.preheader
  %indvars.iv59.unr = phi i64 [ %indvars.iv59.ph, %scalar.ph65.preheader ], [ %indvars.iv.next60.prol, %scalar.ph65.prol ]
  %75 = sub nsw i64 %indvars.iv59.ph, %wide.trip.count62
  %76 = icmp ugt i64 %75, -4
  br i1 %76, label %._crit_edge, label %scalar.ph65

vector.scevcheck:                                 ; preds = %.lr.ph55
  %77 = add nsw i64 %wide.trip.count62, -1
  %78 = trunc i64 %77 to i32
  %79 = sub i32 -2, %.048
  %80 = icmp ult i32 %79, %78
  %81 = icmp ugt i64 %77, 4294967295
  %82 = or i1 %80, %81
  br i1 %82, label %scalar.ph65.preheader, label %vector.ph67

vector.ph67:                                      ; preds = %vector.scevcheck
  %n.mod.vf68 = and i64 %wide.trip.count62, 7
  %83 = icmp eq i64 %n.mod.vf68, 0
  %84 = select i1 %83, i64 8, i64 %n.mod.vf68
  %n.vec69 = sub nsw i64 %wide.trip.count62, %84
  br label %vector.body71

vector.body71:                                    ; preds = %vector.body71, %vector.ph67
  %index72 = phi i64 [ 0, %vector.ph67 ], [ %index.next73, %vector.body71 ]
  %85 = or disjoint i64 %index72, 1
  %86 = or disjoint i64 %index72, 2
  %87 = or disjoint i64 %index72, 3
  %88 = or disjoint i64 %index72, 4
  %89 = or disjoint i64 %index72, 5
  %90 = or disjoint i64 %index72, 6
  %91 = or disjoint i64 %index72, 7
  %92 = trunc i64 %index72 to i32
  %93 = getelementptr inbounds [30 x %struct.huff_code], ptr %invariant.gep52, i64 0, i64 %index72
  %94 = getelementptr inbounds [30 x %struct.huff_code], ptr %invariant.gep52, i64 0, i64 %85
  %95 = getelementptr inbounds [30 x %struct.huff_code], ptr %invariant.gep52, i64 0, i64 %86
  %96 = getelementptr inbounds [30 x %struct.huff_code], ptr %invariant.gep52, i64 0, i64 %87
  %97 = getelementptr inbounds [30 x %struct.huff_code], ptr %invariant.gep52, i64 0, i64 %88
  %98 = getelementptr inbounds [30 x %struct.huff_code], ptr %invariant.gep52, i64 0, i64 %89
  %99 = getelementptr inbounds [30 x %struct.huff_code], ptr %invariant.gep52, i64 0, i64 %90
  %100 = getelementptr inbounds [30 x %struct.huff_code], ptr %invariant.gep52, i64 0, i64 %91
  %101 = load i8, ptr %93, align 1, !tbaa !5
  %102 = load i8, ptr %94, align 1, !tbaa !5
  %103 = load i8, ptr %95, align 1, !tbaa !5
  %104 = load i8, ptr %96, align 1, !tbaa !5
  %105 = load i8, ptr %97, align 1, !tbaa !5
  %106 = load i8, ptr %98, align 1, !tbaa !5
  %107 = load i8, ptr %99, align 1, !tbaa !5
  %108 = load i8, ptr %100, align 1, !tbaa !5
  %109 = insertelement <8 x i8> poison, i8 %101, i64 0
  %110 = insertelement <8 x i8> %109, i8 %102, i64 1
  %111 = insertelement <8 x i8> %110, i8 %103, i64 2
  %112 = insertelement <8 x i8> %111, i8 %104, i64 3
  %113 = insertelement <8 x i8> %112, i8 %105, i64 4
  %114 = insertelement <8 x i8> %113, i8 %106, i64 5
  %115 = insertelement <8 x i8> %114, i8 %107, i64 6
  %116 = insertelement <8 x i8> %115, i8 %108, i64 7
  %117 = zext <8 x i8> %116 to <8 x i16>
  %118 = add i32 %30, %92
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds [316 x i16], ptr %8, i64 0, i64 %119
  store <8 x i16> %117, ptr %120, align 2, !tbaa !8
  %index.next73 = add nuw i64 %index72, 8
  %121 = icmp eq i64 %index.next73, %n.vec69
  br i1 %121, label %scalar.ph65.preheader, label %vector.body71, !llvm.loop !16

.lr.ph:                                           ; preds = %.lr.ph.preheader74, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader74 ]
  %gep = getelementptr inbounds [286 x %struct.huff_code], ptr %invariant.gep, i64 0, i64 %indvars.iv
  %122 = load i8, ptr %gep, align 1, !tbaa !5
  %123 = zext i8 %122 to i16
  %124 = getelementptr inbounds [316 x i16], ptr %8, i64 0, i64 %indvars.iv
  store i16 %123, ptr %124, align 2, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !17

._crit_edge:                                      ; preds = %scalar.ph65.prol.loopexit, %scalar.ph65, %.preheader
  %125 = add i32 %.048, -256
  %126 = add i32 %67, %30
  %127 = call i32 @rl_encode(ptr noundef nonnull %8, i32 noundef %126, ptr noundef nonnull %9, ptr noundef nonnull %10)
  %128 = call i32 @create_header(ptr noundef nonnull %7, ptr noundef nonnull %10, i32 noundef %127, ptr noundef nonnull %9, i32 noundef %125, i32 noundef %.049, i32 noundef 1)
  call void @flush(ptr noundef nonnull %7)
  %129 = ashr i32 %128, 3
  %130 = getelementptr inbounds i8, ptr %0, i64 328
  store i32 %129, ptr %130, align 4, !tbaa !18
  %131 = and i32 %128, 7
  %132 = getelementptr inbounds i8, ptr %0, i64 332
  store i32 %131, ptr %132, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 632, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 152, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 632, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 6872, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 1144, ptr nonnull %3) #4
  ret i32 0

scalar.ph65:                                      ; preds = %scalar.ph65.prol.loopexit, %scalar.ph65
  %indvars.iv59 = phi i64 [ %indvars.iv.next60.3, %scalar.ph65 ], [ %indvars.iv59.unr, %scalar.ph65.prol.loopexit ]
  %gep53 = getelementptr inbounds [30 x %struct.huff_code], ptr %invariant.gep52, i64 0, i64 %indvars.iv59
  %133 = load i8, ptr %gep53, align 1, !tbaa !5
  %134 = zext i8 %133 to i16
  %135 = trunc nuw i64 %indvars.iv59 to i32
  %136 = add i32 %30, %135
  %137 = zext i32 %136 to i64
  %138 = getelementptr inbounds [316 x i16], ptr %8, i64 0, i64 %137
  store i16 %134, ptr %138, align 2, !tbaa !8
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %gep53.1 = getelementptr inbounds [30 x %struct.huff_code], ptr %invariant.gep52, i64 0, i64 %indvars.iv.next60
  %139 = load i8, ptr %gep53.1, align 1, !tbaa !5
  %140 = zext i8 %139 to i16
  %141 = trunc nuw i64 %indvars.iv.next60 to i32
  %142 = add i32 %30, %141
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds [316 x i16], ptr %8, i64 0, i64 %143
  store i16 %140, ptr %144, align 2, !tbaa !8
  %indvars.iv.next60.1 = add nuw nsw i64 %indvars.iv59, 2
  %gep53.2 = getelementptr inbounds [30 x %struct.huff_code], ptr %invariant.gep52, i64 0, i64 %indvars.iv.next60.1
  %145 = load i8, ptr %gep53.2, align 1, !tbaa !5
  %146 = zext i8 %145 to i16
  %147 = trunc nuw i64 %indvars.iv.next60.1 to i32
  %148 = add i32 %30, %147
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds [316 x i16], ptr %8, i64 0, i64 %149
  store i16 %146, ptr %150, align 2, !tbaa !8
  %indvars.iv.next60.2 = add nuw nsw i64 %indvars.iv59, 3
  %gep53.3 = getelementptr inbounds [30 x %struct.huff_code], ptr %invariant.gep52, i64 0, i64 %indvars.iv.next60.2
  %151 = load i8, ptr %gep53.3, align 1, !tbaa !5
  %152 = zext i8 %151 to i16
  %153 = trunc nuw i64 %indvars.iv.next60.2 to i32
  %154 = add i32 %30, %153
  %155 = zext i32 %154 to i64
  %156 = getelementptr inbounds [316 x i16], ptr %8, i64 0, i64 %155
  store i16 %152, ptr %156, align 2, !tbaa !8
  %indvars.iv.next60.3 = add nuw nsw i64 %indvars.iv59, 4
  %exitcond63.not.3 = icmp eq i64 %indvars.iv.next60.3, %wide.trip.count62
  br i1 %exitcond63.not.3, label %._crit_edge, label %scalar.ph65, !llvm.loop !22
}

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @are_hufftables_useable(ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"short", !6, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !11, !12, !13}
!17 = distinct !{!17, !11, !13, !12}
!18 = !{!19, !20, i64 328}
!19 = !{!"isal_hufftables", !6, i64 0, !20, i64 328, !20, i64 332, !6, i64 336, !6, i64 344, !6, i64 1368, !6, i64 1882, !6, i64 2140, !6, i64 2200}
!20 = !{!"int", !6, i64 0}
!21 = !{!19, !20, i64 332}
!22 = distinct !{!22, !11, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass