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

; 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.isal_zstream = type { ptr, i32, i32, ptr, i32, i32, ptr, i32, i32, ptr, i16, i16, i16, i16, %struct.isal_zstate }
%struct.isal_zstate = type { i32, i32, i32, i32, i32, i32, %struct.BitBuf2, i32, i8, i8, i8, i8, i16, i32, [16 x i8], i32, i32, i32, i32, [65824 x i8], [8192 x i16] }
%struct.BitBuf2 = type { i64, i32, ptr, ptr, ptr }
%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: inlinehint nounwind uwtable
declare hidden void @write_deflate_icf(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

; 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 i64 @qpl_gen_icf_map_h1_base(ptr noundef %0, ptr noundef %1, i64 noundef %2) #2 {
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.isal_zstream, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !13
  store ptr %25, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.isal_zstream, ptr %26, i32 0, i32 0
  %28 = load ptr, ptr %27, align 8, !tbaa !13
  %29 = load i64, ptr %7, align 8, !tbaa !9
  %30 = getelementptr inbounds i8, ptr %28, i64 %29
  store ptr %30, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.isal_zstream, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !13
  %34 = ptrtoint ptr %33 to i64
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.isal_zstream, ptr %35, i32 0, i32 2
  %37 = load i32, ptr %36, align 4, !tbaa !18
  %38 = zext i32 %37 to i64
  %39 = sub i64 %34, %38
  %40 = inttoptr i64 %39 to ptr
  store ptr %40, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store i64 0, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store i64 0, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  store i64 0, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.isal_zstream, ptr %41, i32 0, i32 9
  %43 = load ptr, ptr %42, align 8, !tbaa !19
  store ptr %43, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %44 = load ptr, ptr %18, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.level_buf, ptr %44, i32 0, i32 8
  %46 = getelementptr inbounds %struct.hash_map_buf, ptr %45, i32 0, i32 0
  %47 = getelementptr inbounds [32768 x i16], ptr %46, i64 0, i64 0
  store ptr %47, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.isal_zstream, ptr %48, i32 0, i32 14
  %50 = getelementptr inbounds %struct.isal_zstate, ptr %49, i32 0, i32 3
  %51 = load i32, ptr %50, align 4, !tbaa !20
  store i32 %51, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.isal_zstream, ptr %52, i32 0, i32 14
  %54 = getelementptr inbounds %struct.isal_zstate, ptr %53, i32 0, i32 4
  %55 = load i32, ptr %54, align 8, !tbaa !21
  store i32 %55, ptr %21, align 4, !tbaa !11
  %56 = load i64, ptr %7, align 8, !tbaa !9
  %57 = icmp ult i64 %56, 288
  br i1 %57, label %58, label %59

58:                                               ; preds = %3
  store i64 0, ptr %4, align 8
  store i32 1, ptr %22, align 4
  br label %186

59:                                               ; preds = %3
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.isal_zstream, ptr %60, i32 0, i32 14
  %62 = getelementptr inbounds %struct.isal_zstate, ptr %61, i32 0, i32 11
  %63 = load i8, ptr %62, align 1, !tbaa !22
  %64 = zext i8 %63 to i32
  %65 = icmp eq i32 %64, 0
  br i1 %65, label %66, label %105

66:                                               ; preds = %59
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = load i8, ptr %67, align 1, !tbaa !23
  %69 = zext i8 %68 to i32
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = load i32, ptr %70, align 4
  %72 = and i32 %69, 1023
  %73 = and i32 %71, -1024
  %74 = or i32 %73, %72
  store i32 %74, ptr %70, align 4
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = load i32, ptr %75, align 4
  %77 = and i32 %76, -523265
  %78 = or i32 %77, 30720
  store i32 %78, ptr %75, align 4
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = load i32, ptr %79, align 4
  %81 = and i32 %80, 524287
  %82 = or i32 %81, 0
  store i32 %82, ptr %79, align 4
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = call i32 @load_u32(ptr noundef %83)
  %85 = call i32 @compute_hash(i32 noundef %84)
  %86 = load i32, ptr %21, align 4, !tbaa !11
  %87 = and i32 %85, %86
  store i32 %87, ptr %14, align 4, !tbaa !11
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = ptrtoint ptr %88 to i64
  %91 = ptrtoint ptr %89 to i64
  %92 = sub i64 %90, %91
  %93 = trunc i64 %92 to i16
  %94 = load ptr, ptr %19, align 8, !tbaa !5
  %95 = load i32, ptr %14, align 4, !tbaa !11
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds i16, ptr %94, i64 %96
  store i16 %93, ptr %97, align 2, !tbaa !24
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  %99 = getelementptr inbounds i8, ptr %98, i32 1
  store ptr %99, ptr %11, align 8, !tbaa !5
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.deflate_icf, ptr %100, i32 1
  store ptr %101, ptr %6, align 8, !tbaa !5
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.isal_zstream, ptr %102, i32 0, i32 14
  %104 = getelementptr inbounds %struct.isal_zstate, ptr %103, i32 0, i32 11
  store i8 1, ptr %104, align 1, !tbaa !22
  br label %105

105:                                              ; preds = %66, %59
  br label %106

106:                                              ; preds = %173, %105
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = getelementptr inbounds i8, ptr %108, i64 -288
  %110 = icmp ult ptr %107, %109
  br i1 %110, label %111, label %178

111:                                              ; preds = %106
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  %113 = call i32 @load_u32(ptr noundef %112)
  %114 = call i32 @compute_hash(i32 noundef %113)
  %115 = load i32, ptr %21, align 4, !tbaa !11
  %116 = and i32 %114, %115
  store i32 %116, ptr %14, align 4, !tbaa !11
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = load ptr, ptr %13, align 8, !tbaa !5
  %119 = ptrtoint ptr %117 to i64
  %120 = ptrtoint ptr %118 to i64
  %121 = sub i64 %119, %120
  %122 = load ptr, ptr %19, align 8, !tbaa !5
  %123 = load i32, ptr %14, align 4, !tbaa !11
  %124 = zext i32 %123 to i64
  %125 = getelementptr inbounds i16, ptr %122, i64 %124
  %126 = load i16, ptr %125, align 2, !tbaa !24
  %127 = zext i16 %126 to i64
  %128 = sub nsw i64 %121, %127
  %129 = trunc i64 %128 to i32
  store i32 %129, ptr %8, align 4, !tbaa !11
  %130 = load i32, ptr %8, align 4, !tbaa !11
  %131 = sub i32 %130, 1
  %132 = load i32, ptr %20, align 4, !tbaa !11
  %133 = and i32 %131, %132
  %134 = add i32 %133, 1
  store i32 %134, ptr %8, align 4, !tbaa !11
  %135 = load ptr, ptr %11, align 8, !tbaa !5
  %136 = load ptr, ptr %13, align 8, !tbaa !5
  %137 = ptrtoint ptr %135 to i64
  %138 = ptrtoint ptr %136 to i64
  %139 = sub i64 %137, %138
  %140 = trunc i64 %139 to i16
  %141 = load ptr, ptr %19, align 8, !tbaa !5
  %142 = load i32, ptr %14, align 4, !tbaa !11
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds i16, ptr %141, i64 %143
  store i16 %140, ptr %144, align 2, !tbaa !24
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = load i32, ptr %8, align 4, !tbaa !11
  %147 = zext i32 %146 to i64
  %148 = sub i64 0, %147
  %149 = getelementptr inbounds i8, ptr %145, i64 %148
  %150 = call i64 @load_u64(ptr noundef %149)
  store i64 %150, ptr %16, align 8, !tbaa !9
  %151 = load ptr, ptr %11, align 8, !tbaa !5
  %152 = call i64 @load_u64(ptr noundef %151)
  store i64 %152, ptr %15, align 8, !tbaa !9
  %153 = load i64, ptr %15, align 8, !tbaa !9
  %154 = load i64, ptr %16, align 8, !tbaa !9
  %155 = xor i64 %153, %154
  store i64 %155, ptr %17, align 8, !tbaa !9
  %156 = load i64, ptr %17, align 8, !tbaa !9
  %157 = call i32 @tzbytecnt(i64 noundef %156)
  store i32 %157, ptr %9, align 4, !tbaa !11
  %158 = load i32, ptr %9, align 4, !tbaa !11
  %159 = icmp uge i32 %158, 4
  br i1 %159, label %160, label %168

160:                                              ; preds = %111
  %161 = load i32, ptr %9, align 4, !tbaa !11
  %162 = add i32 %161, 254
  store i32 %162, ptr %9, align 4, !tbaa !11
  %163 = load i32, ptr %8, align 4, !tbaa !11
  call void @get_dist_icf_code(i32 noundef %163, ptr noundef %8, ptr noundef %10)
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = load i32, ptr %9, align 4, !tbaa !11
  %166 = load i32, ptr %8, align 4, !tbaa !11
  %167 = load i32, ptr %10, align 4, !tbaa !11
  call void @write_deflate_icf(ptr noundef %164, i32 noundef %165, i32 noundef %166, i32 noundef %167)
  br label %173

168:                                              ; preds = %111
  %169 = load ptr, ptr %6, align 8, !tbaa !5
  %170 = load ptr, ptr %11, align 8, !tbaa !5
  %171 = load i8, ptr %170, align 1, !tbaa !23
  %172 = zext i8 %171 to i32
  call void @write_deflate_icf(ptr noundef %169, i32 noundef %172, i32 noundef 30, i32 noundef 0)
  br label %173

173:                                              ; preds = %168, %160
  %174 = load ptr, ptr %11, align 8, !tbaa !5
  %175 = getelementptr inbounds i8, ptr %174, i32 1
  store ptr %175, ptr %11, align 8, !tbaa !5
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.deflate_icf, ptr %176, i32 1
  store ptr %177, ptr %6, align 8, !tbaa !5
  br label %106, !llvm.loop !25

178:                                              ; preds = %106
  %179 = load ptr, ptr %11, align 8, !tbaa !5
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.isal_zstream, ptr %180, i32 0, i32 0
  %182 = load ptr, ptr %181, align 8, !tbaa !13
  %183 = ptrtoint ptr %179 to i64
  %184 = ptrtoint ptr %182 to i64
  %185 = sub i64 %183, %184
  store i64 %185, ptr %4, align 8
  store i32 1, ptr %22, align 4
  br label %186

186:                                              ; preds = %178, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %187 = load i64, ptr %4, align 8
  ret i64 %187
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @compute_hash(i32 noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @load_u32(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @load_u64(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tzbytecnt(i64 noundef) #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"isal_zstream", !6, i64 0, !12, i64 8, !12, i64 12, !6, i64 16, !12, i64 24, !12, i64 28, !6, i64 32, !12, i64 40, !12, i64 44, !6, i64 48, !15, i64 56, !15, i64 58, !15, i64 60, !15, i64 62, !16, i64 64}
!15 = !{!"short", !7, i64 0}
!16 = !{!"isal_zstate", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !17, i64 24, !12, i64 64, !7, i64 68, !7, i64 69, !7, i64 70, !7, i64 71, !15, i64 72, !12, i64 76, !7, i64 80, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !7, i64 112, !7, i64 65936}
!17 = !{!"BitBuf2", !10, i64 0, !12, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!18 = !{!14, !12, i64 12}
!19 = !{!14, !6, i64 48}
!20 = !{!14, !12, i64 76}
!21 = !{!14, !12, i64 80}
!22 = !{!14, !7, i64 135}
!23 = !{!7, !7, i64 0}
!24 = !{!15, !15, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


; 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"

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

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

; 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 i64 @qpl_gen_icf_map_h1_base(ptr nocapture noundef %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #2 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  store i32 0, ptr %5, align 4, !tbaa !5
  %6 = load ptr, ptr %0, align 8, !tbaa !9
  %7 = getelementptr inbounds i8, ptr %6, i64 %2
  %8 = ptrtoint ptr %6 to i64
  %9 = getelementptr inbounds i8, ptr %0, i64 12
  %10 = load i32, ptr %9, align 4, !tbaa !16
  %11 = zext i32 %10 to i64
  %.neg = sub i64 %11, %8
  %12 = getelementptr inbounds i8, ptr %0, i64 48
  %13 = load ptr, ptr %12, align 8, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %13, i64 4712
  %15 = getelementptr inbounds i8, ptr %0, i64 76
  %16 = load i32, ptr %15, align 4, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %0, i64 80
  %18 = load i32, ptr %17, align 8, !tbaa !19
  %19 = icmp ult i64 %2, 288
  br i1 %19, label %78, label %20

20:                                               ; preds = %3
  %21 = getelementptr inbounds i8, ptr %0, i64 135
  %22 = load i8, ptr %21, align 1, !tbaa !20
  %23 = icmp eq i8 %22, 0
  br i1 %23, label %24, label %36

24:                                               ; preds = %20
  %25 = load i8, ptr %6, align 1, !tbaa !21
  %26 = zext i8 %25 to i32
  %27 = or disjoint i32 %26, 30720
  store i32 %27, ptr %1, align 4
  %28 = tail call i32 @load_u32(ptr noundef nonnull %6)
  %29 = tail call i32 @compute_hash(i32 noundef %28)
  %30 = and i32 %29, %18
  %31 = trunc i32 %10 to i16
  %32 = zext i32 %30 to i64
  %33 = getelementptr inbounds i16, ptr %14, i64 %32
  store i16 %31, ptr %33, align 2, !tbaa !22
  %34 = getelementptr inbounds i8, ptr %6, i64 1
  %35 = getelementptr inbounds i8, ptr %1, i64 4
  store i8 1, ptr %21, align 1, !tbaa !20
  br label %36

36:                                               ; preds = %24, %20
  %.053 = phi ptr [ %34, %24 ], [ %6, %20 ]
  %.052 = phi ptr [ %35, %24 ], [ %1, %20 ]
  %37 = getelementptr inbounds i8, ptr %7, i64 -288
  %38 = icmp ult ptr %.053, %37
  br i1 %38, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %36, %70
  %.157 = phi ptr [ %72, %70 ], [ %.052, %36 ]
  %.15456 = phi ptr [ %71, %70 ], [ %.053, %36 ]
  %39 = call i32 @load_u32(ptr noundef %.15456)
  %40 = call i32 @compute_hash(i32 noundef %39)
  %41 = and i32 %40, %18
  %42 = ptrtoint ptr %.15456 to i64
  %43 = add i64 %.neg, %42
  %44 = zext i32 %41 to i64
  %45 = getelementptr inbounds i16, ptr %14, i64 %44
  %46 = load i16, ptr %45, align 2, !tbaa !22
  %47 = zext i16 %46 to i64
  %48 = sub nsw i64 %43, %47
  %49 = trunc i64 %48 to i32
  %50 = add i32 %49, -1
  %51 = and i32 %50, %16
  %52 = add i32 %51, 1
  store i32 %52, ptr %4, align 4, !tbaa !5
  %53 = trunc i64 %43 to i16
  store i16 %53, ptr %45, align 2, !tbaa !22
  %54 = zext i32 %52 to i64
  %55 = sub nsw i64 0, %54
  %56 = getelementptr inbounds i8, ptr %.15456, i64 %55
  %57 = call i64 @load_u64(ptr noundef %56)
  %58 = call i64 @load_u64(ptr noundef %.15456)
  %59 = xor i64 %58, %57
  %60 = call i32 @tzbytecnt(i64 noundef %59)
  %61 = icmp ugt i32 %60, 3
  br i1 %61, label %62, label %67

62:                                               ; preds = %.lr.ph
  %63 = add i32 %60, 254
  %64 = load i32, ptr %4, align 4, !tbaa !5
  call void @get_dist_icf_code(i32 noundef %64, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = load i32, ptr %5, align 4, !tbaa !5
  call void @write_deflate_icf(ptr noundef %.157, i32 noundef %63, i32 noundef %65, i32 noundef %66)
  br label %70

67:                                               ; preds = %.lr.ph
  %68 = load i8, ptr %.15456, align 1, !tbaa !21
  %69 = zext i8 %68 to i32
  call void @write_deflate_icf(ptr noundef %.157, i32 noundef %69, i32 noundef 30, i32 noundef 0)
  br label %70

70:                                               ; preds = %67, %62
  %71 = getelementptr inbounds i8, ptr %.15456, i64 1
  %72 = getelementptr inbounds i8, ptr %.157, i64 4
  %73 = icmp ult ptr %71, %37
  br i1 %73, label %.lr.ph, label %._crit_edge, !llvm.loop !23

._crit_edge:                                      ; preds = %70, %36
  %.154.lcssa = phi ptr [ %.053, %36 ], [ %71, %70 ]
  %74 = load ptr, ptr %0, align 8, !tbaa !9
  %75 = ptrtoint ptr %.154.lcssa to i64
  %76 = ptrtoint ptr %74 to i64
  %77 = sub i64 %75, %76
  br label %78

78:                                               ; preds = %3, %._crit_edge
  %.0 = phi i64 [ %77, %._crit_edge ], [ 0, %3 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  ret i64 %.0
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @compute_hash(i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @load_u32(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @load_u64(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tzbytecnt(i64 noundef) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"isal_zstream", !11, i64 0, !6, i64 8, !6, i64 12, !11, i64 16, !6, i64 24, !6, i64 28, !11, i64 32, !6, i64 40, !6, i64 44, !11, i64 48, !12, i64 56, !12, i64 58, !12, i64 60, !12, i64 62, !13, i64 64}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!"isal_zstate", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !14, i64 24, !6, i64 64, !7, i64 68, !7, i64 69, !7, i64 70, !7, i64 71, !12, i64 72, !6, i64 76, !7, i64 80, !6, i64 96, !6, i64 100, !6, i64 104, !6, i64 108, !7, i64 112, !7, i64 65936}
!14 = !{!"BitBuf2", !15, i64 0, !6, i64 8, !11, i64 16, !11, i64 24, !11, i64 32}
!15 = !{!"long", !7, i64 0}
!16 = !{!10, !6, i64 12}
!17 = !{!10, !11, i64 48}
!18 = !{!10, !6, i64 76}
!19 = !{!10, !6, i64 80}
!20 = !{!10, !7, i64 135}
!21 = !{!7, !7, i64 0}
!22 = !{!12, !12, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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