; LLVM IR from catid/Zpng :: zstd (zstd_decompress)

; 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.ZSTD_DCtx_s = type { ptr, ptr, ptr, ptr, %struct.ZSTD_entropyDTables_t, ptr, ptr, ptr, ptr, i64, %struct.ZSTD_frameHeader, i64, i32, i32, i32, i32, %struct.XXH64_state_s, i64, i32, i32, ptr, %struct.ZSTD_customMem, i64, i64, i64, i32, ptr, ptr, i32, ptr, i64, i64, i64, ptr, i64, i64, i64, i64, ptr, i32, i32, i32, [131080 x i8], [18 x i8] }
%struct.ZSTD_entropyDTables_t = type { [513 x %struct.ZSTD_seqSymbol], [257 x %struct.ZSTD_seqSymbol], [513 x %struct.ZSTD_seqSymbol], [4097 x i32], [512 x i32], [3 x i32] }
%struct.ZSTD_seqSymbol = type { i16, i8, i8, i32 }
%struct.ZSTD_frameHeader = type { i64, i64, i32, i32, i32, i32, i32 }
%struct.XXH64_state_s = type { i64, i64, i64, i64, i64, [4 x i64], i32, [2 x i32] }
%struct.ZSTD_customMem = type { ptr, ptr, ptr }

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @MEM_readLE16(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @ERR_isError(i64 noundef) #4

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

; Function Attrs: nounwind uwtable
define dso_local i64 @ZSTD_decodeLiteralsBlock(ptr noundef %0, ptr noundef %1, i64 noundef %2) #4 {
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  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
  %23 = load i64, ptr %7, align 8, !tbaa !9
  %24 = icmp ult i64 %23, 3
  br i1 %24, label %25, label %26

25:                                               ; preds = %3
  store i64 -20, ptr %4, align 8
  br label %366

26:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %27, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %28, i64 0
  %30 = load i8, ptr %29, align 1, !tbaa !11
  %31 = zext i8 %30 to i32
  %32 = and i32 %31, 3
  store i32 %32, ptr %9, align 4, !tbaa !12
  %33 = load i32, ptr %9, align 4, !tbaa !12
  switch i32 %33, label %364 [
    i32 3, label %34
    i32 2, label %41
    i32 0, label %226
    i32 1, label %306
  ]

34:                                               ; preds = %26
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %35, i32 0, i32 14
  %37 = load i32, ptr %36, align 8, !tbaa !14
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %34
  store i64 -30, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %365

40:                                               ; preds = %34
  br label %41

41:                                               ; preds = %40, %26
  %42 = load i64, ptr %7, align 8, !tbaa !9
  %43 = icmp ult i64 %42, 5
  br i1 %43, label %44, label %45

44:                                               ; preds = %41
  store i64 -20, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %365

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 0
  %48 = load i8, ptr %47, align 1, !tbaa !11
  %49 = zext i8 %48 to i32
  %50 = ashr i32 %49, 2
  %51 = and i32 %50, 3
  store i32 %51, ptr %15, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = call i32 @MEM_readLE32(ptr noundef %52)
  store i32 %53, ptr %16, align 4, !tbaa !12
  %54 = load i32, ptr %15, align 4, !tbaa !12
  switch i32 %54, label %56 [
    i32 0, label %55
    i32 1, label %55
    i32 2, label %69
    i32 3, label %77
  ]

55:                                               ; preds = %45, %45
  br label %56

56:                                               ; preds = %55, %45
  %57 = load i32, ptr %15, align 4, !tbaa !12
  %58 = icmp ne i32 %57, 0
  %59 = xor i1 %58, true
  %60 = zext i1 %59 to i32
  store i32 %60, ptr %14, align 4, !tbaa !12
  store i64 3, ptr %11, align 8, !tbaa !9
  %61 = load i32, ptr %16, align 4, !tbaa !12
  %62 = lshr i32 %61, 4
  %63 = and i32 %62, 1023
  %64 = zext i32 %63 to i64
  store i64 %64, ptr %12, align 8, !tbaa !9
  %65 = load i32, ptr %16, align 4, !tbaa !12
  %66 = lshr i32 %65, 14
  %67 = and i32 %66, 1023
  %68 = zext i32 %67 to i64
  store i64 %68, ptr %13, align 8, !tbaa !9
  br label %91

69:                                               ; preds = %45
  store i64 4, ptr %11, align 8, !tbaa !9
  %70 = load i32, ptr %16, align 4, !tbaa !12
  %71 = lshr i32 %70, 4
  %72 = and i32 %71, 16383
  %73 = zext i32 %72 to i64
  store i64 %73, ptr %12, align 8, !tbaa !9
  %74 = load i32, ptr %16, align 4, !tbaa !12
  %75 = lshr i32 %74, 18
  %76 = zext i32 %75 to i64
  store i64 %76, ptr %13, align 8, !tbaa !9
  br label %91

77:                                               ; preds = %45
  store i64 5, ptr %11, align 8, !tbaa !9
  %78 = load i32, ptr %16, align 4, !tbaa !12
  %79 = lshr i32 %78, 4
  %80 = and i32 %79, 262143
  %81 = zext i32 %80 to i64
  store i64 %81, ptr %12, align 8, !tbaa !9
  %82 = load i32, ptr %16, align 4, !tbaa !12
  %83 = lshr i32 %82, 22
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %84, i64 4
  %86 = load i8, ptr %85, align 1, !tbaa !11
  %87 = zext i8 %86 to i32
  %88 = shl i32 %87, 10
  %89 = add i32 %83, %88
  %90 = zext i32 %89 to i64
  store i64 %90, ptr %13, align 8, !tbaa !9
  br label %91

91:                                               ; preds = %77, %69, %56
  %92 = load i64, ptr %12, align 8, !tbaa !9
  %93 = icmp ugt i64 %92, 131072
  br i1 %93, label %94, label %95

94:                                               ; preds = %91
  store i64 -20, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %225

95:                                               ; preds = %91
  %96 = load i64, ptr %13, align 8, !tbaa !9
  %97 = load i64, ptr %11, align 8, !tbaa !9
  %98 = add i64 %96, %97
  %99 = load i64, ptr %7, align 8, !tbaa !9
  %100 = icmp ugt i64 %98, %99
  br i1 %100, label %101, label %102

101:                                              ; preds = %95
  store i64 -20, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %225

102:                                              ; preds = %95
  %103 = load i32, ptr %9, align 4, !tbaa !12
  %104 = icmp eq i32 %103, 3
  br i1 %104, label %105, label %142

105:                                              ; preds = %102
  %106 = load i32, ptr %14, align 4, !tbaa !12
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %124

108:                                              ; preds = %105
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %109, i32 0, i32 42
  %111 = getelementptr inbounds [131080 x i8], ptr %110, i64 0, i64 0
  %112 = load i64, ptr %12, align 8, !tbaa !9
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = load i64, ptr %11, align 8, !tbaa !9
  %115 = getelementptr inbounds i8, ptr %113, i64 %114
  %116 = load i64, ptr %13, align 8, !tbaa !9
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %117, i32 0, i32 3
  %119 = load ptr, ptr %118, align 8, !tbaa !21
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %120, i32 0, i32 25
  %122 = load i32, ptr %121, align 8, !tbaa !22
  %123 = call i64 @HUF_decompress1X_usingDTable_bmi2(ptr noundef %111, i64 noundef %112, ptr noundef %115, i64 noundef %116, ptr noundef %119, i32 noundef %122)
  br label %140

124:                                              ; preds = %105
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %125, i32 0, i32 42
  %127 = getelementptr inbounds [131080 x i8], ptr %126, i64 0, i64 0
  %128 = load i64, ptr %12, align 8, !tbaa !9
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = load i64, ptr %11, align 8, !tbaa !9
  %131 = getelementptr inbounds i8, ptr %129, i64 %130
  %132 = load i64, ptr %13, align 8, !tbaa !9
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %133, i32 0, i32 3
  %135 = load ptr, ptr %134, align 8, !tbaa !21
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %136, i32 0, i32 25
  %138 = load i32, ptr %137, align 8, !tbaa !22
  %139 = call i64 @HUF_decompress4X_usingDTable_bmi2(ptr noundef %127, i64 noundef %128, ptr noundef %131, i64 noundef %132, ptr noundef %135, i32 noundef %138)
  br label %140

140:                                              ; preds = %124, %108
  %141 = phi i64 [ %123, %108 ], [ %139, %124 ]
  br label %189

142:                                              ; preds = %102
  %143 = load i32, ptr %14, align 4, !tbaa !12
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %166

145:                                              ; preds = %142
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %146, i32 0, i32 4
  %148 = getelementptr inbounds %struct.ZSTD_entropyDTables_t, ptr %147, i32 0, i32 3
  %149 = getelementptr inbounds [4097 x i32], ptr %148, i64 0, i64 0
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %150, i32 0, i32 42
  %152 = getelementptr inbounds [131080 x i8], ptr %151, i64 0, i64 0
  %153 = load i64, ptr %12, align 8, !tbaa !9
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = load i64, ptr %11, align 8, !tbaa !9
  %156 = getelementptr inbounds i8, ptr %154, i64 %155
  %157 = load i64, ptr %13, align 8, !tbaa !9
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %158, i32 0, i32 4
  %160 = getelementptr inbounds %struct.ZSTD_entropyDTables_t, ptr %159, i32 0, i32 4
  %161 = getelementptr inbounds [512 x i32], ptr %160, i64 0, i64 0
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %162, i32 0, i32 25
  %164 = load i32, ptr %163, align 8, !tbaa !22
  %165 = call i64 @HUF_decompress1X2_DCtx_wksp_bmi2(ptr noundef %149, ptr noundef %152, i64 noundef %153, ptr noundef %156, i64 noundef %157, ptr noundef %161, i64 noundef 2048, i32 noundef %164)
  br label %187

166:                                              ; preds = %142
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %167, i32 0, i32 4
  %169 = getelementptr inbounds %struct.ZSTD_entropyDTables_t, ptr %168, i32 0, i32 3
  %170 = getelementptr inbounds [4097 x i32], ptr %169, i64 0, i64 0
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %171, i32 0, i32 42
  %173 = getelementptr inbounds [131080 x i8], ptr %172, i64 0, i64 0
  %174 = load i64, ptr %12, align 8, !tbaa !9
  %175 = load ptr, ptr %8, align 8, !tbaa !5
  %176 = load i64, ptr %11, align 8, !tbaa !9
  %177 = getelementptr inbounds i8, ptr %175, i64 %176
  %178 = load i64, ptr %13, align 8, !tbaa !9
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %179, i32 0, i32 4
  %181 = getelementptr inbounds %struct.ZSTD_entropyDTables_t, ptr %180, i32 0, i32 4
  %182 = getelementptr inbounds [512 x i32], ptr %181, i64 0, i64 0
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %183, i32 0, i32 25
  %185 = load i32, ptr %184, align 8, !tbaa !22
  %186 = call i64 @HUF_decompress4X_hufOnly_wksp_bmi2(ptr noundef %170, ptr noundef %173, i64 noundef %174, ptr noundef %177, i64 noundef %178, ptr noundef %182, i64 noundef 2048, i32 noundef %185)
  br label %187

187:                                              ; preds = %166, %145
  %188 = phi i64 [ %165, %145 ], [ %186, %166 ]
  br label %189

189:                                              ; preds = %187, %140
  %190 = phi i64 [ %141, %140 ], [ %188, %187 ]
  %191 = call i32 @ERR_isError(i64 noundef %190)
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %194

193:                                              ; preds = %189
  store i64 -20, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %225

194:                                              ; preds = %189
  %195 = load ptr, ptr %5, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %195, i32 0, i32 42
  %197 = getelementptr inbounds [131080 x i8], ptr %196, i64 0, i64 0
  %198 = load ptr, ptr %5, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %198, i32 0, i32 20
  store ptr %197, ptr %199, align 8, !tbaa !23
  %200 = load i64, ptr %12, align 8, !tbaa !9
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %201, i32 0, i32 22
  store i64 %200, ptr %202, align 8, !tbaa !24
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %203, i32 0, i32 14
  store i32 1, ptr %204, align 8, !tbaa !14
  %205 = load i32, ptr %9, align 4, !tbaa !12
  %206 = icmp eq i32 %205, 2
  br i1 %206, label %207, label %214

207:                                              ; preds = %194
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %208, i32 0, i32 4
  %210 = getelementptr inbounds %struct.ZSTD_entropyDTables_t, ptr %209, i32 0, i32 3
  %211 = getelementptr inbounds [4097 x i32], ptr %210, i64 0, i64 0
  %212 = load ptr, ptr %5, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %212, i32 0, i32 3
  store ptr %211, ptr %213, align 8, !tbaa !21
  br label %214

214:                                              ; preds = %207, %194
  %215 = load ptr, ptr %5, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %215, i32 0, i32 42
  %217 = getelementptr inbounds [131080 x i8], ptr %216, i64 0, i64 0
  %218 = load ptr, ptr %5, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %218, i32 0, i32 22
  %220 = load i64, ptr %219, align 8, !tbaa !24
  %221 = getelementptr inbounds i8, ptr %217, i64 %220
  call void @llvm.memset.p0.i64(ptr align 1 %221, i8 0, i64 8, i1 false)
  %222 = load i64, ptr %13, align 8, !tbaa !9
  %223 = load i64, ptr %11, align 8, !tbaa !9
  %224 = add i64 %222, %223
  store i64 %224, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %225

225:                                              ; preds = %214, %193, %101, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %365

226:                                              ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %227 = load ptr, ptr %8, align 8, !tbaa !5
  %228 = getelementptr inbounds i8, ptr %227, i64 0
  %229 = load i8, ptr %228, align 1, !tbaa !11
  %230 = zext i8 %229 to i32
  %231 = ashr i32 %230, 2
  %232 = and i32 %231, 3
  store i32 %232, ptr %19, align 4, !tbaa !12
  %233 = load i32, ptr %19, align 4, !tbaa !12
  switch i32 %233, label %235 [
    i32 0, label %234
    i32 2, label %234
    i32 1, label %242
    i32 3, label %248
  ]

234:                                              ; preds = %226, %226
  br label %235

235:                                              ; preds = %234, %226
  store i64 1, ptr %18, align 8, !tbaa !9
  %236 = load ptr, ptr %8, align 8, !tbaa !5
  %237 = getelementptr inbounds i8, ptr %236, i64 0
  %238 = load i8, ptr %237, align 1, !tbaa !11
  %239 = zext i8 %238 to i32
  %240 = ashr i32 %239, 3
  %241 = sext i32 %240 to i64
  store i64 %241, ptr %17, align 8, !tbaa !9
  br label %253

242:                                              ; preds = %226
  store i64 2, ptr %18, align 8, !tbaa !9
  %243 = load ptr, ptr %8, align 8, !tbaa !5
  %244 = call zeroext i16 @MEM_readLE16(ptr noundef %243)
  %245 = zext i16 %244 to i32
  %246 = ashr i32 %245, 4
  %247 = sext i32 %246 to i64
  store i64 %247, ptr %17, align 8, !tbaa !9
  br label %253

248:                                              ; preds = %226
  store i64 3, ptr %18, align 8, !tbaa !9
  %249 = load ptr, ptr %8, align 8, !tbaa !5
  %250 = call i32 @MEM_readLE24(ptr noundef %249)
  %251 = lshr i32 %250, 4
  %252 = zext i32 %251 to i64
  store i64 %252, ptr %17, align 8, !tbaa !9
  br label %253

253:                                              ; preds = %248, %242, %235
  %254 = load i64, ptr %18, align 8, !tbaa !9
  %255 = load i64, ptr %17, align 8, !tbaa !9
  %256 = add i64 %254, %255
  %257 = add i64 %256, 8
  %258 = load i64, ptr %7, align 8, !tbaa !9
  %259 = icmp ugt i64 %257, %258
  br i1 %259, label %260, label %293

260:                                              ; preds = %253
  %261 = load i64, ptr %17, align 8, !tbaa !9
  %262 = load i64, ptr %18, align 8, !tbaa !9
  %263 = add i64 %261, %262
  %264 = load i64, ptr %7, align 8, !tbaa !9
  %265 = icmp ugt i64 %263, %264
  br i1 %265, label %266, label %267

266:                                              ; preds = %260
  store i64 -20, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %305

267:                                              ; preds = %260
  %268 = load ptr, ptr %5, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %268, i32 0, i32 42
  %270 = getelementptr inbounds [131080 x i8], ptr %269, i64 0, i64 0
  %271 = load ptr, ptr %8, align 8, !tbaa !5
  %272 = load i64, ptr %18, align 8, !tbaa !9
  %273 = getelementptr inbounds i8, ptr %271, i64 %272
  %274 = load i64, ptr %17, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %270, ptr align 1 %273, i64 %274, i1 false)
  %275 = load ptr, ptr %5, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %275, i32 0, i32 42
  %277 = getelementptr inbounds [131080 x i8], ptr %276, i64 0, i64 0
  %278 = load ptr, ptr %5, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %278, i32 0, i32 20
  store ptr %277, ptr %279, align 8, !tbaa !23
  %280 = load i64, ptr %17, align 8, !tbaa !9
  %281 = load ptr, ptr %5, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %281, i32 0, i32 22
  store i64 %280, ptr %282, align 8, !tbaa !24
  %283 = load ptr, ptr %5, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %283, i32 0, i32 42
  %285 = getelementptr inbounds [131080 x i8], ptr %284, i64 0, i64 0
  %286 = load ptr, ptr %5, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %286, i32 0, i32 22
  %288 = load i64, ptr %287, align 8, !tbaa !24
  %289 = getelementptr inbounds i8, ptr %285, i64 %288
  call void @llvm.memset.p0.i64(ptr align 1 %289, i8 0, i64 8, i1 false)
  %290 = load i64, ptr %18, align 8, !tbaa !9
  %291 = load i64, ptr %17, align 8, !tbaa !9
  %292 = add i64 %290, %291
  store i64 %292, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %305

293:                                              ; preds = %253
  %294 = load ptr, ptr %8, align 8, !tbaa !5
  %295 = load i64, ptr %18, align 8, !tbaa !9
  %296 = getelementptr inbounds i8, ptr %294, i64 %295
  %297 = load ptr, ptr %5, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %297, i32 0, i32 20
  store ptr %296, ptr %298, align 8, !tbaa !23
  %299 = load i64, ptr %17, align 8, !tbaa !9
  %300 = load ptr, ptr %5, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %300, i32 0, i32 22
  store i64 %299, ptr %301, align 8, !tbaa !24
  %302 = load i64, ptr %18, align 8, !tbaa !9
  %303 = load i64, ptr %17, align 8, !tbaa !9
  %304 = add i64 %302, %303
  store i64 %304, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %305

305:                                              ; preds = %293, %267, %266
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %365

306:                                              ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %307 = load ptr, ptr %8, align 8, !tbaa !5
  %308 = getelementptr inbounds i8, ptr %307, i64 0
  %309 = load i8, ptr %308, align 1, !tbaa !11
  %310 = zext i8 %309 to i32
  %311 = ashr i32 %310, 2
  %312 = and i32 %311, 3
  store i32 %312, ptr %20, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %313 = load i32, ptr %20, align 4, !tbaa !12
  switch i32 %313, label %315 [
    i32 0, label %314
    i32 2, label %314
    i32 1, label %322
    i32 3, label %328
  ]

314:                                              ; preds = %306, %306
  br label %315

315:                                              ; preds = %314, %306
  store i64 1, ptr %22, align 8, !tbaa !9
  %316 = load ptr, ptr %8, align 8, !tbaa !5
  %317 = getelementptr inbounds i8, ptr %316, i64 0
  %318 = load i8, ptr %317, align 1, !tbaa !11
  %319 = zext i8 %318 to i32
  %320 = ashr i32 %319, 3
  %321 = sext i32 %320 to i64
  store i64 %321, ptr %21, align 8, !tbaa !9
  br label %337

322:                                              ; preds = %306
  store i64 2, ptr %22, align 8, !tbaa !9
  %323 = load ptr, ptr %8, align 8, !tbaa !5
  %324 = call zeroext i16 @MEM_readLE16(ptr noundef %323)
  %325 = zext i16 %324 to i32
  %326 = ashr i32 %325, 4
  %327 = sext i32 %326 to i64
  store i64 %327, ptr %21, align 8, !tbaa !9
  br label %337

328:                                              ; preds = %306
  store i64 3, ptr %22, align 8, !tbaa !9
  %329 = load ptr, ptr %8, align 8, !tbaa !5
  %330 = call i32 @MEM_readLE24(ptr noundef %329)
  %331 = lshr i32 %330, 4
  %332 = zext i32 %331 to i64
  store i64 %332, ptr %21, align 8, !tbaa !9
  %333 = load i64, ptr %7, align 8, !tbaa !9
  %334 = icmp ult i64 %333, 4
  br i1 %334, label %335, label %336

335:                                              ; preds = %328
  store i64 -20, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %363

336:                                              ; preds = %328
  br label %337

337:                                              ; preds = %336, %322, %315
  %338 = load i64, ptr %21, align 8, !tbaa !9
  %339 = icmp ugt i64 %338, 131072
  br i1 %339, label %340, label %341

340:                                              ; preds = %337
  store i64 -20, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %363

341:                                              ; preds = %337
  %342 = load ptr, ptr %5, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %342, i32 0, i32 42
  %344 = getelementptr inbounds [131080 x i8], ptr %343, i64 0, i64 0
  %345 = load ptr, ptr %8, align 8, !tbaa !5
  %346 = load i64, ptr %22, align 8, !tbaa !9
  %347 = getelementptr inbounds i8, ptr %345, i64 %346
  %348 = load i8, ptr %347, align 1, !tbaa !11
  %349 = zext i8 %348 to i32
  %350 = trunc i32 %349 to i8
  %351 = load i64, ptr %21, align 8, !tbaa !9
  %352 = add i64 %351, 8
  call void @llvm.memset.p0.i64(ptr align 4 %344, i8 %350, i64 %352, i1 false)
  %353 = load ptr, ptr %5, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %353, i32 0, i32 42
  %355 = getelementptr inbounds [131080 x i8], ptr %354, i64 0, i64 0
  %356 = load ptr, ptr %5, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %356, i32 0, i32 20
  store ptr %355, ptr %357, align 8, !tbaa !23
  %358 = load i64, ptr %21, align 8, !tbaa !9
  %359 = load ptr, ptr %5, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %359, i32 0, i32 22
  store i64 %358, ptr %360, align 8, !tbaa !24
  %361 = load i64, ptr %22, align 8, !tbaa !9
  %362 = add i64 %361, 1
  store i64 %362, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %363

363:                                              ; preds = %341, %340, %335
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %365

364:                                              ; preds = %26
  store i64 -20, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %365

365:                                              ; preds = %364, %363, %305, %225, %44, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %366

366:                                              ; preds = %365, %25
  %367 = load i64, ptr %4, align 8
  ret i64 %367
}

declare i64 @HUF_decompress1X_usingDTable_bmi2(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i32 noundef) #5

declare i64 @HUF_decompress4X_usingDTable_bmi2(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i32 noundef) #5

declare i64 @HUF_decompress1X2_DCtx_wksp_bmi2(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #5

declare i64 @HUF_decompress4X_hufOnly_wksp_bmi2(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = { "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 = { 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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !13, i64 28840}
!15 = !{!"ZSTD_DCtx_s", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !16, i64 32, !6, i64 28744, !6, i64 28752, !6, i64 28760, !6, i64 28768, !10, i64 28776, !17, i64 28784, !10, i64 28824, !13, i64 28832, !13, i64 28836, !13, i64 28840, !13, i64 28844, !19, i64 28848, !10, i64 28936, !13, i64 28944, !13, i64 28948, !6, i64 28952, !20, i64 28960, !10, i64 28984, !10, i64 28992, !10, i64 29000, !13, i64 29008, !6, i64 29016, !6, i64 29024, !13, i64 29032, !6, i64 29040, !10, i64 29048, !10, i64 29056, !10, i64 29064, !6, i64 29072, !10, i64 29080, !10, i64 29088, !10, i64 29096, !10, i64 29104, !6, i64 29112, !13, i64 29120, !13, i64 29124, !13, i64 29128, !7, i64 29132, !7, i64 160212}
!16 = !{!"", !7, i64 0, !7, i64 4104, !7, i64 6160, !7, i64 10264, !7, i64 26652, !7, i64 28700}
!17 = !{!"", !18, i64 0, !18, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32}
!18 = !{!"long long", !7, i64 0}
!19 = !{!"XXH64_state_s", !18, i64 0, !18, i64 8, !18, i64 16, !18, i64 24, !18, i64 32, !7, i64 40, !13, i64 72, !7, i64 76}
!20 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!15, !6, i64 24}
!22 = !{!15, !13, i64 29008}
!23 = !{!15, !6, i64 28952}
!24 = !{!15, !10, i64 28984}


; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @MEM_readLE16(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @ERR_isError(i64 noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
define dso_local i64 @ZSTD_decodeLiteralsBlock(ptr noundef %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #3 {
  %4 = icmp ult i64 %2, 3
  br i1 %4, label %127, label %5

5:                                                ; preds = %3
  %6 = load i8, ptr %1, align 1, !tbaa !5
  %7 = zext i8 %6 to i32
  %8 = and i32 %7, 3
  switch i32 %8, label %default.unreachable142 [
    i32 3, label %9
    i32 2, label %13
    i32 0, label %74
    i32 1, label %104
  ]

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 28840
  %11 = load i32, ptr %10, align 8, !tbaa !8
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %127, label %13

13:                                               ; preds = %9, %5
  %14 = icmp ult i64 %2, 5
  br i1 %14, label %127, label %15

15:                                               ; preds = %13
  %16 = lshr i8 %6, 2
  %17 = and i8 %16, 3
  %18 = tail call i32 @MEM_readLE32(ptr noundef nonnull %1)
  switch i8 %17, label %19 [
    i8 3, label %28
    i8 2, label %24
  ]

19:                                               ; preds = %15
  %.not = icmp ne i8 %17, 0
  %20 = lshr i32 %18, 4
  %21 = and i32 %20, 1023
  %22 = lshr i32 %18, 14
  %23 = and i32 %22, 1023
  br label %.thread

24:                                               ; preds = %15
  %25 = lshr i32 %18, 4
  %26 = and i32 %25, 16383
  %27 = lshr i32 %18, 18
  br label %.thread

28:                                               ; preds = %15
  %29 = lshr i32 %18, 4
  %30 = and i32 %29, 262143
  %31 = getelementptr inbounds i8, ptr %1, i64 4
  %32 = load i8, ptr %31, align 1, !tbaa !5
  %33 = zext i8 %32 to i32
  %34 = tail call i32 @llvm.fshl.i32(i32 %33, i32 %18, i32 10)
  %35 = icmp ugt i32 %30, 131072
  br i1 %35, label %127, label %.thread

.thread:                                          ; preds = %24, %19, %28
  %.0119135.in = phi i32 [ %34, %28 ], [ %27, %24 ], [ %23, %19 ]
  %.0117134.in = phi i32 [ %30, %28 ], [ %26, %24 ], [ %21, %19 ]
  %.0116133 = phi i64 [ 5, %28 ], [ 4, %24 ], [ 3, %19 ]
  %.0118132 = phi i1 [ true, %28 ], [ true, %24 ], [ %.not, %19 ]
  %.0117134 = zext nneg i32 %.0117134.in to i64
  %.0119135 = zext i32 %.0119135.in to i64
  %36 = add nuw nsw i64 %.0116133, %.0119135
  %37 = icmp ugt i64 %36, %2
  br i1 %37, label %127, label %38

38:                                               ; preds = %.thread
  %39 = icmp eq i32 %8, 3
  %40 = getelementptr inbounds i8, ptr %0, i64 29008
  %41 = load i32, ptr %40, align 8, !tbaa !18
  br i1 %39, label %42, label %51

42:                                               ; preds = %38
  %43 = getelementptr inbounds i8, ptr %0, i64 29132
  %44 = getelementptr inbounds i8, ptr %1, i64 %.0116133
  %45 = getelementptr inbounds i8, ptr %0, i64 24
  %46 = load ptr, ptr %45, align 8, !tbaa !19
  br i1 %.0118132, label %49, label %47

47:                                               ; preds = %42
  %48 = tail call i64 @HUF_decompress1X_usingDTable_bmi2(ptr noundef nonnull %43, i64 noundef %.0117134, ptr noundef nonnull %44, i64 noundef %.0119135, ptr noundef %46, i32 noundef %41) #6
  br label %60

49:                                               ; preds = %42
  %50 = tail call i64 @HUF_decompress4X_usingDTable_bmi2(ptr noundef nonnull %43, i64 noundef %.0117134, ptr noundef nonnull %44, i64 noundef %.0119135, ptr noundef %46, i32 noundef %41) #6
  br label %60

51:                                               ; preds = %38
  %52 = getelementptr inbounds i8, ptr %0, i64 10296
  %53 = getelementptr inbounds i8, ptr %0, i64 29132
  %54 = getelementptr inbounds i8, ptr %1, i64 %.0116133
  %55 = getelementptr inbounds i8, ptr %0, i64 26684
  br i1 %.0118132, label %58, label %56

56:                                               ; preds = %51
  %57 = tail call i64 @HUF_decompress1X2_DCtx_wksp_bmi2(ptr noundef nonnull %52, ptr noundef nonnull %53, i64 noundef %.0117134, ptr noundef nonnull %54, i64 noundef %.0119135, ptr noundef nonnull %55, i64 noundef 2048, i32 noundef %41) #6
  br label %60

58:                                               ; preds = %51
  %59 = tail call i64 @HUF_decompress4X_hufOnly_wksp_bmi2(ptr noundef nonnull %52, ptr noundef nonnull %53, i64 noundef %.0117134, ptr noundef nonnull %54, i64 noundef %.0119135, ptr noundef nonnull %55, i64 noundef 2048, i32 noundef %41) #6
  br label %60

60:                                               ; preds = %56, %58, %47, %49
  %61 = phi i64 [ %48, %47 ], [ %50, %49 ], [ %57, %56 ], [ %59, %58 ]
  %62 = tail call i32 @ERR_isError(i64 noundef %61)
  %.not125 = icmp eq i32 %62, 0
  br i1 %.not125, label %63, label %127

63:                                               ; preds = %60
  %64 = getelementptr inbounds i8, ptr %0, i64 29132
  %65 = getelementptr inbounds i8, ptr %0, i64 28952
  store ptr %64, ptr %65, align 8, !tbaa !20
  %66 = getelementptr inbounds i8, ptr %0, i64 28984
  store i64 %.0117134, ptr %66, align 8, !tbaa !21
  %67 = getelementptr inbounds i8, ptr %0, i64 28840
  store i32 1, ptr %67, align 8, !tbaa !8
  %68 = icmp eq i32 %8, 2
  br i1 %68, label %69, label %72

69:                                               ; preds = %63
  %70 = getelementptr inbounds i8, ptr %0, i64 10296
  %71 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %70, ptr %71, align 8, !tbaa !19
  br label %72

72:                                               ; preds = %69, %63
  %73 = getelementptr inbounds i8, ptr %64, i64 %.0117134
  store i64 0, ptr %73, align 1
  br label %127

74:                                               ; preds = %5
  %75 = lshr i32 %7, 2
  %76 = and i32 %75, 3
  switch i32 %76, label %77 [
    i32 3, label %84
    i32 1, label %80
  ]

77:                                               ; preds = %74
  %78 = lshr i32 %7, 3
  %79 = zext nneg i32 %78 to i64
  br label %88

80:                                               ; preds = %74
  %81 = tail call zeroext i16 @MEM_readLE16(ptr noundef nonnull %1)
  %82 = lshr i16 %81, 4
  %83 = zext nneg i16 %82 to i64
  br label %88

84:                                               ; preds = %74
  %85 = tail call i32 @MEM_readLE24(ptr noundef nonnull %1)
  %86 = lshr i32 %85, 4
  %87 = zext nneg i32 %86 to i64
  br label %88

88:                                               ; preds = %84, %80, %77
  %.0115 = phi i64 [ %79, %77 ], [ %83, %80 ], [ %87, %84 ]
  %.0114 = phi i64 [ 1, %77 ], [ 2, %80 ], [ 3, %84 ]
  %89 = add nuw nsw i64 %.0114, %.0115
  %90 = add nuw nsw i64 %89, 8
  %91 = icmp ugt i64 %90, %2
  br i1 %91, label %92, label %100

92:                                               ; preds = %88
  %93 = icmp ugt i64 %89, %2
  br i1 %93, label %127, label %94

94:                                               ; preds = %92
  %95 = getelementptr inbounds i8, ptr %0, i64 29132
  %96 = getelementptr inbounds i8, ptr %1, i64 %.0114
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %95, ptr nonnull align 1 %96, i64 %.0115, i1 false)
  %97 = getelementptr inbounds i8, ptr %0, i64 28952
  store ptr %95, ptr %97, align 8, !tbaa !20
  %98 = getelementptr inbounds i8, ptr %0, i64 28984
  store i64 %.0115, ptr %98, align 8, !tbaa !21
  %99 = getelementptr inbounds i8, ptr %95, i64 %.0115
  store i64 0, ptr %99, align 1
  br label %127

100:                                              ; preds = %88
  %101 = getelementptr inbounds i8, ptr %1, i64 %.0114
  %102 = getelementptr inbounds i8, ptr %0, i64 28952
  store ptr %101, ptr %102, align 8, !tbaa !20
  %103 = getelementptr inbounds i8, ptr %0, i64 28984
  store i64 %.0115, ptr %103, align 8, !tbaa !21
  br label %127

104:                                              ; preds = %5
  %105 = lshr i32 %7, 2
  %106 = and i32 %105, 3
  switch i32 %106, label %107 [
    i32 3, label %114
    i32 1, label %110
  ]

107:                                              ; preds = %104
  %108 = lshr i32 %7, 3
  %109 = zext nneg i32 %108 to i64
  br label %.thread137

110:                                              ; preds = %104
  %111 = tail call zeroext i16 @MEM_readLE16(ptr noundef nonnull %1)
  %112 = lshr i16 %111, 4
  %113 = zext nneg i16 %112 to i64
  br label %.thread137

114:                                              ; preds = %104
  %115 = tail call i32 @MEM_readLE24(ptr noundef nonnull %1)
  %116 = lshr i32 %115, 4
  %117 = zext nneg i32 %116 to i64
  %118 = icmp eq i64 %2, 3
  %119 = icmp ugt i32 %115, 2097167
  %or.cond = select i1 %118, i1 true, i1 %119
  br i1 %or.cond, label %127, label %.thread137

.thread137:                                       ; preds = %114, %110, %107
  %.0141 = phi i64 [ 2, %110 ], [ 1, %107 ], [ 3, %114 ]
  %.0112140 = phi i64 [ %113, %110 ], [ %109, %107 ], [ %117, %114 ]
  %120 = getelementptr inbounds i8, ptr %0, i64 29132
  %121 = getelementptr inbounds i8, ptr %1, i64 %.0141
  %122 = load i8, ptr %121, align 1, !tbaa !5
  %123 = add nuw nsw i64 %.0112140, 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %120, i8 %122, i64 %123, i1 false)
  %124 = getelementptr inbounds i8, ptr %0, i64 28952
  store ptr %120, ptr %124, align 8, !tbaa !20
  %125 = getelementptr inbounds i8, ptr %0, i64 28984
  store i64 %.0112140, ptr %125, align 8, !tbaa !21
  %126 = add nuw nsw i64 %.0141, 1
  br label %127

default.unreachable142:                           ; preds = %5
  unreachable

127:                                              ; preds = %9, %13, %60, %.thread, %28, %72, %92, %100, %94, %114, %.thread137, %3
  %.4 = phi i64 [ -20, %3 ], [ -30, %9 ], [ -20, %13 ], [ %36, %72 ], [ -20, %28 ], [ -20, %.thread ], [ -20, %60 ], [ %89, %94 ], [ %89, %100 ], [ -20, %92 ], [ %126, %.thread137 ], [ -20, %114 ]
  ret i64 %.4
}

declare i64 @HUF_decompress1X_usingDTable_bmi2(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

declare i64 @HUF_decompress4X_usingDTable_bmi2(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

declare i64 @HUF_decompress1X2_DCtx_wksp_bmi2(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #4

declare i64 @HUF_decompress4X_hufOnly_wksp_bmi2(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.fshl.i32(i32, i32, i32) #5

attributes #0 = { mustprogress nocallback nofree 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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, !15, i64 28840}
!9 = !{!"ZSTD_DCtx_s", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !11, i64 32, !10, i64 28744, !10, i64 28752, !10, i64 28760, !10, i64 28768, !12, i64 28776, !13, i64 28784, !12, i64 28824, !15, i64 28832, !15, i64 28836, !15, i64 28840, !15, i64 28844, !16, i64 28848, !12, i64 28936, !15, i64 28944, !15, i64 28948, !10, i64 28952, !17, i64 28960, !12, i64 28984, !12, i64 28992, !12, i64 29000, !15, i64 29008, !10, i64 29016, !10, i64 29024, !15, i64 29032, !10, i64 29040, !12, i64 29048, !12, i64 29056, !12, i64 29064, !10, i64 29072, !12, i64 29080, !12, i64 29088, !12, i64 29096, !12, i64 29104, !10, i64 29112, !15, i64 29120, !15, i64 29124, !15, i64 29128, !6, i64 29132, !6, i64 160212}
!10 = !{!"any pointer", !6, i64 0}
!11 = !{!"", !6, i64 0, !6, i64 4104, !6, i64 6160, !6, i64 10264, !6, i64 26652, !6, i64 28700}
!12 = !{!"long", !6, i64 0}
!13 = !{!"", !14, i64 0, !14, i64 8, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32}
!14 = !{!"long long", !6, i64 0}
!15 = !{!"int", !6, i64 0}
!16 = !{!"XXH64_state_s", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !6, i64 40, !15, i64 72, !6, i64 76}
!17 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16}
!18 = !{!9, !15, i64 29008}
!19 = !{!9, !10, i64 24}
!20 = !{!9, !10, i64 28952}
!21 = !{!9, !12, i64 28984}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass