; 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.blockProperties_t = type { i32, i32, i32 }
%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: nounwind uwtable
declare hidden i64 @ZSTD_frameHeaderSize_internal(ptr noundef, i64 noundef, i32 noundef) #3

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @ZSTD_getcBlockSize(ptr noundef, i64 noundef, ptr noundef) #3

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @ZSTD_decompressContinue(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4) #3 {
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.blockProperties_t, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i64 %2, ptr %9, align 8, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i64 %4, ptr %11, align 8, !tbaa !9
  %19 = load i64, ptr %11, align 8, !tbaa !9
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %20, i32 0, i32 9
  %22 = load i64, ptr %21, align 8, !tbaa !11
  %23 = icmp ne i64 %19, %22
  br i1 %23, label %24, label %25

24:                                               ; preds = %5
  store i64 -72, ptr %6, align 8
  br label %328

25:                                               ; preds = %5
  %26 = load i64, ptr %9, align 8, !tbaa !9
  %27 = icmp ne i64 %26, 0
  br i1 %27, label %28, label %31

28:                                               ; preds = %25
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  call void @ZSTD_checkContinuity(ptr noundef %29, ptr noundef %30)
  br label %31

31:                                               ; preds = %28, %25
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %32, i32 0, i32 13
  %34 = load i32, ptr %33, align 4, !tbaa !19
  switch i32 %34, label %327 [
    i32 0, label %35
    i32 1, label %91
    i32 2, label %124
    i32 4, label %183
    i32 3, label %183
    i32 5, label %286
    i32 6, label %303
    i32 7, label %322
  ]

35:                                               ; preds = %31
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %36, i32 0, i32 19
  %38 = load i32, ptr %37, align 4, !tbaa !20
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %58

40:                                               ; preds = %35
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = call i32 @MEM_readLE32(ptr noundef %41)
  %43 = and i32 %42, -16
  %44 = icmp eq i32 %43, 407710288
  br i1 %44, label %45, label %57

45:                                               ; preds = %40
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %46, i32 0, i32 43
  %48 = getelementptr inbounds [18 x i8], ptr %47, i64 0, i64 0
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = load i64, ptr %11, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %48, ptr align 1 %49, i64 %50, i1 false)
  %51 = load i64, ptr %11, align 8, !tbaa !9
  %52 = sub i64 8, %51
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %53, i32 0, i32 9
  store i64 %52, ptr %54, align 8, !tbaa !11
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %55, i32 0, i32 13
  store i32 6, ptr %56, align 4, !tbaa !19
  store i64 0, ptr %6, align 8
  br label %328

57:                                               ; preds = %40
  br label %58

58:                                               ; preds = %57, %35
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = load i64, ptr %11, align 8, !tbaa !9
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %61, i32 0, i32 19
  %63 = load i32, ptr %62, align 4, !tbaa !20
  %64 = call i64 @ZSTD_frameHeaderSize_internal(ptr noundef %59, i64 noundef %60, i32 noundef %63)
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %65, i32 0, i32 17
  store i64 %64, ptr %66, align 8, !tbaa !21
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %67, i32 0, i32 17
  %69 = load i64, ptr %68, align 8, !tbaa !21
  %70 = call i32 @ERR_isError(i64 noundef %69)
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %76

72:                                               ; preds = %58
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %73, i32 0, i32 17
  %75 = load i64, ptr %74, align 8, !tbaa !21
  store i64 %75, ptr %6, align 8
  br label %328

76:                                               ; preds = %58
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %77, i32 0, i32 43
  %79 = getelementptr inbounds [18 x i8], ptr %78, i64 0, i64 0
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = load i64, ptr %11, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %79, ptr align 1 %80, i64 %81, i1 false)
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %82, i32 0, i32 17
  %84 = load i64, ptr %83, align 8, !tbaa !21
  %85 = load i64, ptr %11, align 8, !tbaa !9
  %86 = sub i64 %84, %85
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %87, i32 0, i32 9
  store i64 %86, ptr %88, align 8, !tbaa !11
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %89, i32 0, i32 13
  store i32 1, ptr %90, align 4, !tbaa !19
  store i64 0, ptr %6, align 8
  br label %328

91:                                               ; preds = %31
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %92, i32 0, i32 43
  %94 = getelementptr inbounds [18 x i8], ptr %93, i64 0, i64 0
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %95, i32 0, i32 17
  %97 = load i64, ptr %96, align 8, !tbaa !21
  %98 = load i64, ptr %11, align 8, !tbaa !9
  %99 = sub i64 %97, %98
  %100 = getelementptr inbounds i8, ptr %94, i64 %99
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = load i64, ptr %11, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %100, ptr align 1 %101, i64 %102, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %104, i32 0, i32 43
  %106 = getelementptr inbounds [18 x i8], ptr %105, i64 0, i64 0
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %107, i32 0, i32 17
  %109 = load i64, ptr %108, align 8, !tbaa !21
  %110 = call i64 @ZSTD_decodeFrameHeader(ptr noundef %103, ptr noundef %106, i64 noundef %109)
  store i64 %110, ptr %12, align 8, !tbaa !9
  %111 = load i64, ptr %12, align 8, !tbaa !9
  %112 = call i32 @ERR_isError(i64 noundef %111)
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %116

114:                                              ; preds = %91
  %115 = load i64, ptr %12, align 8, !tbaa !9
  store i64 %115, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %117

116:                                              ; preds = %91
  store i32 0, ptr %13, align 4
  br label %117

117:                                              ; preds = %116, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %118 = load i32, ptr %13, align 4
  switch i32 %118, label %330 [
    i32 0, label %119
    i32 1, label %328
  ]

119:                                              ; preds = %117
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %120, i32 0, i32 9
  store i64 3, ptr %121, align 8, !tbaa !11
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %122, i32 0, i32 13
  store i32 2, ptr %123, align 4, !tbaa !19
  store i64 0, ptr %6, align 8
  br label %328

124:                                              ; preds = %31
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = call i64 @ZSTD_getcBlockSize(ptr noundef %125, i64 noundef 3, ptr noundef %14)
  store i64 %126, ptr %15, align 8, !tbaa !9
  %127 = load i64, ptr %15, align 8, !tbaa !9
  %128 = call i32 @ERR_isError(i64 noundef %127)
  %129 = icmp ne i32 %128, 0
  br i1 %129, label %130, label %132

130:                                              ; preds = %124
  %131 = load i64, ptr %15, align 8, !tbaa !9
  store i64 %131, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %182

132:                                              ; preds = %124
  %133 = load i64, ptr %15, align 8, !tbaa !9
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %134, i32 0, i32 9
  store i64 %133, ptr %135, align 8, !tbaa !11
  %136 = getelementptr inbounds %struct.blockProperties_t, ptr %14, i32 0, i32 0
  %137 = load i32, ptr %136, align 4, !tbaa !22
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %138, i32 0, i32 12
  store i32 %137, ptr %139, align 8, !tbaa !24
  %140 = getelementptr inbounds %struct.blockProperties_t, ptr %14, i32 0, i32 2
  %141 = load i32, ptr %140, align 4, !tbaa !25
  %142 = zext i32 %141 to i64
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %143, i32 0, i32 23
  store i64 %142, ptr %144, align 8, !tbaa !26
  %145 = load i64, ptr %15, align 8, !tbaa !9
  %146 = icmp ne i64 %145, 0
  br i1 %146, label %147, label %155

147:                                              ; preds = %132
  %148 = getelementptr inbounds %struct.blockProperties_t, ptr %14, i32 0, i32 1
  %149 = load i32, ptr %148, align 4, !tbaa !27
  %150 = icmp ne i32 %149, 0
  %151 = zext i1 %150 to i64
  %152 = select i1 %150, i32 4, i32 3
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %153, i32 0, i32 13
  store i32 %152, ptr %154, align 4, !tbaa !19
  store i64 0, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %182

155:                                              ; preds = %132
  %156 = getelementptr inbounds %struct.blockProperties_t, ptr %14, i32 0, i32 1
  %157 = load i32, ptr %156, align 4, !tbaa !27
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %176

159:                                              ; preds = %155
  %160 = load ptr, ptr %7, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %160, i32 0, i32 10
  %162 = getelementptr inbounds %struct.ZSTD_frameHeader, ptr %161, i32 0, i32 6
  %163 = load i32, ptr %162, align 8, !tbaa !28
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %170

165:                                              ; preds = %159
  %166 = load ptr, ptr %7, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %166, i32 0, i32 9
  store i64 4, ptr %167, align 8, !tbaa !11
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %168, i32 0, i32 13
  store i32 5, ptr %169, align 4, !tbaa !19
  br label %175

170:                                              ; preds = %159
  %171 = load ptr, ptr %7, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %171, i32 0, i32 9
  store i64 0, ptr %172, align 8, !tbaa !11
  %173 = load ptr, ptr %7, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %173, i32 0, i32 13
  store i32 0, ptr %174, align 4, !tbaa !19
  br label %175

175:                                              ; preds = %170, %165
  br label %181

176:                                              ; preds = %155
  %177 = load ptr, ptr %7, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %177, i32 0, i32 9
  store i64 3, ptr %178, align 8, !tbaa !11
  %179 = load ptr, ptr %7, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %179, i32 0, i32 13
  store i32 2, ptr %180, align 4, !tbaa !19
  br label %181

181:                                              ; preds = %176, %175
  store i64 0, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %182

182:                                              ; preds = %181, %147, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #5
  br label %328

183:                                              ; preds = %31, %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %184, i32 0, i32 12
  %186 = load i32, ptr %185, align 8, !tbaa !24
  switch i32 %186, label %210 [
    i32 2, label %187
    i32 0, label %194
    i32 1, label %200
    i32 3, label %209
  ]

187:                                              ; preds = %183
  %188 = load ptr, ptr %7, align 8, !tbaa !5
  %189 = load ptr, ptr %8, align 8, !tbaa !5
  %190 = load i64, ptr %9, align 8, !tbaa !9
  %191 = load ptr, ptr %10, align 8, !tbaa !5
  %192 = load i64, ptr %11, align 8, !tbaa !9
  %193 = call i64 @ZSTD_decompressBlock_internal(ptr noundef %188, ptr noundef %189, i64 noundef %190, ptr noundef %191, i64 noundef %192, i32 noundef 1)
  store i64 %193, ptr %16, align 8, !tbaa !9
  br label %211

194:                                              ; preds = %183
  %195 = load ptr, ptr %8, align 8, !tbaa !5
  %196 = load i64, ptr %9, align 8, !tbaa !9
  %197 = load ptr, ptr %10, align 8, !tbaa !5
  %198 = load i64, ptr %11, align 8, !tbaa !9
  %199 = call i64 @ZSTD_copyRawBlock(ptr noundef %195, i64 noundef %196, ptr noundef %197, i64 noundef %198)
  store i64 %199, ptr %16, align 8, !tbaa !9
  br label %211

200:                                              ; preds = %183
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  %202 = load i64, ptr %9, align 8, !tbaa !9
  %203 = load ptr, ptr %10, align 8, !tbaa !5
  %204 = load i64, ptr %11, align 8, !tbaa !9
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %205, i32 0, i32 23
  %207 = load i64, ptr %206, align 8, !tbaa !26
  %208 = call i64 @ZSTD_setRleBlock(ptr noundef %201, i64 noundef %202, ptr noundef %203, i64 noundef %204, i64 noundef %207)
  store i64 %208, ptr %16, align 8, !tbaa !9
  br label %211

209:                                              ; preds = %183
  br label %210

210:                                              ; preds = %209, %183
  store i64 -20, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %285

211:                                              ; preds = %200, %194, %187
  %212 = load i64, ptr %16, align 8, !tbaa !9
  %213 = call i32 @ERR_isError(i64 noundef %212)
  %214 = icmp ne i32 %213, 0
  br i1 %214, label %215, label %217

215:                                              ; preds = %211
  %216 = load i64, ptr %16, align 8, !tbaa !9
  store i64 %216, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %285

217:                                              ; preds = %211
  %218 = load i64, ptr %16, align 8, !tbaa !9
  %219 = load ptr, ptr %7, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %219, i32 0, i32 11
  %221 = load i64, ptr %220, align 8, !tbaa !29
  %222 = add i64 %221, %218
  store i64 %222, ptr %220, align 8, !tbaa !29
  %223 = load ptr, ptr %7, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %223, i32 0, i32 10
  %225 = getelementptr inbounds %struct.ZSTD_frameHeader, ptr %224, i32 0, i32 6
  %226 = load i32, ptr %225, align 8, !tbaa !28
  %227 = icmp ne i32 %226, 0
  br i1 %227, label %228, label %234

228:                                              ; preds = %217
  %229 = load ptr, ptr %7, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %229, i32 0, i32 16
  %231 = load ptr, ptr %8, align 8, !tbaa !5
  %232 = load i64, ptr %16, align 8, !tbaa !9
  %233 = call i32 @XXH64_update(ptr noundef %230, ptr noundef %231, i64 noundef %232)
  br label %234

234:                                              ; preds = %228, %217
  %235 = load ptr, ptr %7, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %235, i32 0, i32 13
  %237 = load i32, ptr %236, align 4, !tbaa !19
  %238 = icmp eq i32 %237, 4
  br i1 %238, label %239, label %273

239:                                              ; preds = %234
  %240 = load ptr, ptr %7, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %240, i32 0, i32 10
  %242 = getelementptr inbounds %struct.ZSTD_frameHeader, ptr %241, i32 0, i32 0
  %243 = load i64, ptr %242, align 8, !tbaa !30
  %244 = icmp ne i64 %243, -1
  br i1 %244, label %245, label %256

245:                                              ; preds = %239
  %246 = load ptr, ptr %7, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %246, i32 0, i32 11
  %248 = load i64, ptr %247, align 8, !tbaa !29
  %249 = load ptr, ptr %7, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %249, i32 0, i32 10
  %251 = getelementptr inbounds %struct.ZSTD_frameHeader, ptr %250, i32 0, i32 0
  %252 = load i64, ptr %251, align 8, !tbaa !30
  %253 = icmp ne i64 %248, %252
  br i1 %253, label %254, label %255

254:                                              ; preds = %245
  store i64 -20, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %285

255:                                              ; preds = %245
  br label %256

256:                                              ; preds = %255, %239
  %257 = load ptr, ptr %7, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %257, i32 0, i32 10
  %259 = getelementptr inbounds %struct.ZSTD_frameHeader, ptr %258, i32 0, i32 6
  %260 = load i32, ptr %259, align 8, !tbaa !28
  %261 = icmp ne i32 %260, 0
  br i1 %261, label %262, label %267

262:                                              ; preds = %256
  %263 = load ptr, ptr %7, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %263, i32 0, i32 9
  store i64 4, ptr %264, align 8, !tbaa !11
  %265 = load ptr, ptr %7, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %265, i32 0, i32 13
  store i32 5, ptr %266, align 4, !tbaa !19
  br label %272

267:                                              ; preds = %256
  %268 = load ptr, ptr %7, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %268, i32 0, i32 9
  store i64 0, ptr %269, align 8, !tbaa !11
  %270 = load ptr, ptr %7, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %270, i32 0, i32 13
  store i32 0, ptr %271, align 4, !tbaa !19
  br label %272

272:                                              ; preds = %267, %262
  br label %283

273:                                              ; preds = %234
  %274 = load ptr, ptr %7, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %274, i32 0, i32 13
  store i32 2, ptr %275, align 4, !tbaa !19
  %276 = load ptr, ptr %7, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %276, i32 0, i32 9
  store i64 3, ptr %277, align 8, !tbaa !11
  %278 = load ptr, ptr %8, align 8, !tbaa !5
  %279 = load i64, ptr %16, align 8, !tbaa !9
  %280 = getelementptr inbounds i8, ptr %278, i64 %279
  %281 = load ptr, ptr %7, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %281, i32 0, i32 5
  store ptr %280, ptr %282, align 8, !tbaa !31
  br label %283

283:                                              ; preds = %273, %272
  %284 = load i64, ptr %16, align 8, !tbaa !9
  store i64 %284, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %285

285:                                              ; preds = %283, %254, %215, %210
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %328

286:                                              ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %287 = load ptr, ptr %7, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %287, i32 0, i32 16
  %289 = call i64 @XXH64_digest(ptr noundef %288)
  %290 = trunc i64 %289 to i32
  store i32 %290, ptr %17, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %291 = load ptr, ptr %10, align 8, !tbaa !5
  %292 = call i32 @MEM_readLE32(ptr noundef %291)
  store i32 %292, ptr %18, align 4, !tbaa !32
  %293 = load i32, ptr %18, align 4, !tbaa !32
  %294 = load i32, ptr %17, align 4, !tbaa !32
  %295 = icmp ne i32 %293, %294
  br i1 %295, label %296, label %297

296:                                              ; preds = %286
  store i64 -22, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %302

297:                                              ; preds = %286
  %298 = load ptr, ptr %7, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %298, i32 0, i32 9
  store i64 0, ptr %299, align 8, !tbaa !11
  %300 = load ptr, ptr %7, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %300, i32 0, i32 13
  store i32 0, ptr %301, align 4, !tbaa !19
  store i64 0, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %302

302:                                              ; preds = %297, %296
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %328

303:                                              ; preds = %31
  %304 = load ptr, ptr %7, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %304, i32 0, i32 43
  %306 = getelementptr inbounds [18 x i8], ptr %305, i64 0, i64 0
  %307 = load i64, ptr %11, align 8, !tbaa !9
  %308 = sub i64 8, %307
  %309 = getelementptr inbounds i8, ptr %306, i64 %308
  %310 = load ptr, ptr %10, align 8, !tbaa !5
  %311 = load i64, ptr %11, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %309, ptr align 1 %310, i64 %311, i1 false)
  %312 = load ptr, ptr %7, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %312, i32 0, i32 43
  %314 = getelementptr inbounds [18 x i8], ptr %313, i64 0, i64 0
  %315 = getelementptr inbounds i8, ptr %314, i64 4
  %316 = call i32 @MEM_readLE32(ptr noundef %315)
  %317 = zext i32 %316 to i64
  %318 = load ptr, ptr %7, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %318, i32 0, i32 9
  store i64 %317, ptr %319, align 8, !tbaa !11
  %320 = load ptr, ptr %7, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %320, i32 0, i32 13
  store i32 7, ptr %321, align 4, !tbaa !19
  store i64 0, ptr %6, align 8
  br label %328

322:                                              ; preds = %31
  %323 = load ptr, ptr %7, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %323, i32 0, i32 9
  store i64 0, ptr %324, align 8, !tbaa !11
  %325 = load ptr, ptr %7, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.ZSTD_DCtx_s, ptr %325, i32 0, i32 13
  store i32 0, ptr %326, align 4, !tbaa !19
  store i64 0, ptr %6, align 8
  br label %328

327:                                              ; preds = %31
  store i64 -1, ptr %6, align 8
  br label %328

328:                                              ; preds = %327, %322, %303, %302, %285, %182, %119, %117, %76, %72, %45, %24
  %329 = load i64, ptr %6, align 8
  ret i64 %329

330:                                              ; preds = %117
  unreachable
}

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

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

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

declare i32 @XXH64_update(ptr noundef, ptr noundef, i64 noundef) #4

declare i64 @XXH64_digest(ptr noundef) #4

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 = { 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 = { 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, !10, i64 28776}
!12 = !{!"ZSTD_DCtx_s", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !6, i64 28744, !6, i64 28752, !6, i64 28760, !6, i64 28768, !10, i64 28776, !14, i64 28784, !10, i64 28824, !16, i64 28832, !16, i64 28836, !16, i64 28840, !16, i64 28844, !17, i64 28848, !10, i64 28936, !16, i64 28944, !16, i64 28948, !6, i64 28952, !18, i64 28960, !10, i64 28984, !10, i64 28992, !10, i64 29000, !16, i64 29008, !6, i64 29016, !6, i64 29024, !16, 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, !16, i64 29120, !16, i64 29124, !16, i64 29128, !7, i64 29132, !7, i64 160212}
!13 = !{!"", !7, i64 0, !7, i64 4104, !7, i64 6160, !7, i64 10264, !7, i64 26652, !7, i64 28700}
!14 = !{!"", !15, i64 0, !15, i64 8, !16, i64 16, !16, i64 20, !16, i64 24, !16, i64 28, !16, i64 32}
!15 = !{!"long long", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"XXH64_state_s", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !7, i64 40, !16, i64 72, !7, i64 76}
!18 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!12, !16, i64 28836}
!20 = !{!12, !16, i64 28948}
!21 = !{!12, !10, i64 28936}
!22 = !{!23, !16, i64 0}
!23 = !{!"", !16, i64 0, !16, i64 4, !16, i64 8}
!24 = !{!12, !16, i64 28832}
!25 = !{!23, !16, i64 8}
!26 = !{!12, !10, i64 28992}
!27 = !{!23, !16, i64 4}
!28 = !{!12, !16, i64 28816}
!29 = !{!12, !10, i64 28824}
!30 = !{!12, !15, i64 28784}
!31 = !{!12, !6, i64 28744}
!32 = !{!16, !16, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.blockProperties_t = type { i32, i32, i32 }

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

; 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) #1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @ZSTD_getcBlockSize(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @ZSTD_decompressContinue(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4) local_unnamed_addr #3 {
  %6 = alloca %struct.blockProperties_t, align 4
  %7 = getelementptr inbounds i8, ptr %0, i64 28776
  %8 = load i64, ptr %7, align 8, !tbaa !5
  %.not = icmp eq i64 %8, %4
  br i1 %.not, label %9, label %119

9:                                                ; preds = %5
  %.not112 = icmp eq i64 %2, 0
  br i1 %.not112, label %11, label %10

10:                                               ; preds = %9
  tail call void @ZSTD_checkContinuity(ptr noundef nonnull %0, ptr noundef %1)
  br label %11

11:                                               ; preds = %10, %9
  %12 = getelementptr inbounds i8, ptr %0, i64 28836
  %13 = load i32, ptr %12, align 4, !tbaa !17
  switch i32 %13, label %119 [
    i32 0, label %14
    i32 1, label %36
    i32 2, label %46
    i32 4, label %68
    i32 3, label %68
    i32 5, label %105
    i32 6, label %111
    i32 7, label %118
  ]

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %0, i64 28948
  %16 = load i32, ptr %15, align 4, !tbaa !18
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %25

18:                                               ; preds = %14
  %19 = tail call i32 @MEM_readLE32(ptr noundef %3)
  %20 = and i32 %19, -16
  %21 = icmp eq i32 %20, 407710288
  br i1 %21, label %22, label %._crit_edge

._crit_edge:                                      ; preds = %18
  %.pre = load i32, ptr %15, align 4, !tbaa !18
  br label %25

22:                                               ; preds = %18
  %23 = getelementptr inbounds i8, ptr %0, i64 160212
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %23, ptr align 1 %3, i64 %4, i1 false)
  %24 = sub i64 8, %4
  store i64 %24, ptr %7, align 8, !tbaa !5
  store i32 6, ptr %12, align 4, !tbaa !17
  br label %119

25:                                               ; preds = %._crit_edge, %14
  %26 = phi i32 [ %.pre, %._crit_edge ], [ %16, %14 ]
  %27 = tail call i64 @ZSTD_frameHeaderSize_internal(ptr noundef %3, i64 noundef %4, i32 noundef %26)
  %28 = getelementptr inbounds i8, ptr %0, i64 28936
  store i64 %27, ptr %28, align 8, !tbaa !19
  %29 = tail call i32 @ERR_isError(i64 noundef %27)
  %.not125 = icmp eq i32 %29, 0
  br i1 %.not125, label %32, label %30

30:                                               ; preds = %25
  %31 = load i64, ptr %28, align 8, !tbaa !19
  br label %119

32:                                               ; preds = %25
  %33 = getelementptr inbounds i8, ptr %0, i64 160212
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %33, ptr align 1 %3, i64 %4, i1 false)
  %34 = load i64, ptr %28, align 8, !tbaa !19
  %35 = sub i64 %34, %4
  store i64 %35, ptr %7, align 8, !tbaa !5
  store i32 1, ptr %12, align 4, !tbaa !17
  br label %119

36:                                               ; preds = %11
  %37 = getelementptr inbounds i8, ptr %0, i64 160212
  %38 = getelementptr inbounds i8, ptr %0, i64 28936
  %39 = load i64, ptr %38, align 8, !tbaa !19
  %40 = sub i64 %39, %4
  %41 = getelementptr inbounds i8, ptr %37, i64 %40
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %41, ptr align 1 %3, i64 %4, i1 false)
  %42 = load i64, ptr %38, align 8, !tbaa !19
  %43 = tail call i64 @ZSTD_decodeFrameHeader(ptr noundef nonnull %0, ptr noundef nonnull %37, i64 noundef %42)
  %44 = tail call i32 @ERR_isError(i64 noundef %43)
  %.not124.not = icmp eq i32 %44, 0
  br i1 %.not124.not, label %45, label %119

45:                                               ; preds = %36
  store i64 3, ptr %7, align 8, !tbaa !5
  store i32 2, ptr %12, align 4, !tbaa !17
  br label %119

46:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  %47 = call i64 @ZSTD_getcBlockSize(ptr noundef %3, i64 noundef 3, ptr noundef nonnull %6)
  %48 = call i32 @ERR_isError(i64 noundef %47)
  %.not119 = icmp eq i32 %48, 0
  br i1 %.not119, label %49, label %67

49:                                               ; preds = %46
  store i64 %47, ptr %7, align 8, !tbaa !5
  %50 = load i32, ptr %6, align 4, !tbaa !20
  %51 = getelementptr inbounds i8, ptr %0, i64 28832
  store i32 %50, ptr %51, align 8, !tbaa !22
  %52 = getelementptr inbounds i8, ptr %6, i64 8
  %53 = load i32, ptr %52, align 4, !tbaa !23
  %54 = zext i32 %53 to i64
  %55 = getelementptr inbounds i8, ptr %0, i64 28992
  store i64 %54, ptr %55, align 8, !tbaa !24
  %.not120 = icmp eq i64 %47, 0
  %56 = getelementptr inbounds i8, ptr %6, i64 4
  %57 = load i32, ptr %56, align 4, !tbaa !25
  %.not121 = icmp eq i32 %57, 0
  br i1 %.not120, label %60, label %58

58:                                               ; preds = %49
  %59 = select i1 %.not121, i32 3, i32 4
  br label %.sink.split

60:                                               ; preds = %49
  br i1 %.not121, label %66, label %61

61:                                               ; preds = %60
  %62 = getelementptr inbounds i8, ptr %0, i64 28816
  %63 = load i32, ptr %62, align 8, !tbaa !26
  %.not122 = icmp eq i32 %63, 0
  br i1 %.not122, label %65, label %64

64:                                               ; preds = %61
  store i64 4, ptr %7, align 8, !tbaa !5
  br label %.sink.split

65:                                               ; preds = %61
  store i64 0, ptr %7, align 8, !tbaa !5
  br label %.sink.split

66:                                               ; preds = %60
  store i64 3, ptr %7, align 8, !tbaa !5
  br label %.sink.split

.sink.split:                                      ; preds = %58, %64, %65, %66
  %.sink = phi i32 [ 2, %66 ], [ 0, %65 ], [ 5, %64 ], [ %59, %58 ]
  store i32 %.sink, ptr %12, align 4, !tbaa !17
  br label %67

67:                                               ; preds = %.sink.split, %46
  %.1 = phi i64 [ %47, %46 ], [ 0, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  br label %119

68:                                               ; preds = %11, %11
  %69 = getelementptr inbounds i8, ptr %0, i64 28832
  %70 = load i32, ptr %69, align 8, !tbaa !22
  switch i32 %70, label %119 [
    i32 2, label %71
    i32 0, label %73
    i32 1, label %75
  ]

71:                                               ; preds = %68
  %72 = tail call i64 @ZSTD_decompressBlock_internal(ptr noundef nonnull %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, i32 noundef 1)
  br label %79

73:                                               ; preds = %68
  %74 = tail call i64 @ZSTD_copyRawBlock(ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4)
  br label %79

75:                                               ; preds = %68
  %76 = getelementptr inbounds i8, ptr %0, i64 28992
  %77 = load i64, ptr %76, align 8, !tbaa !24
  %78 = tail call i64 @ZSTD_setRleBlock(ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, i64 noundef %77)
  br label %79

79:                                               ; preds = %75, %73, %71
  %.0110 = phi i64 [ %78, %75 ], [ %74, %73 ], [ %72, %71 ]
  %80 = tail call i32 @ERR_isError(i64 noundef %.0110)
  %.not114 = icmp eq i32 %80, 0
  br i1 %.not114, label %81, label %119

81:                                               ; preds = %79
  %82 = getelementptr inbounds i8, ptr %0, i64 28824
  %83 = load i64, ptr %82, align 8, !tbaa !27
  %84 = add i64 %83, %.0110
  store i64 %84, ptr %82, align 8, !tbaa !27
  %85 = getelementptr inbounds i8, ptr %0, i64 28784
  %86 = getelementptr inbounds i8, ptr %0, i64 28816
  %87 = load i32, ptr %86, align 8, !tbaa !26
  %.not115 = icmp eq i32 %87, 0
  br i1 %.not115, label %91, label %88

88:                                               ; preds = %81
  %89 = getelementptr inbounds i8, ptr %0, i64 28848
  %90 = tail call i32 @XXH64_update(ptr noundef nonnull %89, ptr noundef %1, i64 noundef %.0110) #5
  br label %91

91:                                               ; preds = %88, %81
  %92 = load i32, ptr %12, align 4, !tbaa !17
  %93 = icmp eq i32 %92, 4
  br i1 %93, label %94, label %102

94:                                               ; preds = %91
  %95 = load i64, ptr %85, align 8, !tbaa !28
  %.not116 = icmp eq i64 %95, -1
  br i1 %.not116, label %98, label %96

96:                                               ; preds = %94
  %97 = load i64, ptr %82, align 8, !tbaa !27
  %.not117 = icmp eq i64 %97, %95
  br i1 %.not117, label %98, label %119

98:                                               ; preds = %96, %94
  %99 = load i32, ptr %86, align 8, !tbaa !26
  %.not118 = icmp eq i32 %99, 0
  br i1 %.not118, label %101, label %100

100:                                              ; preds = %98
  store i64 4, ptr %7, align 8, !tbaa !5
  store i32 5, ptr %12, align 4, !tbaa !17
  br label %119

101:                                              ; preds = %98
  store i64 0, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %12, align 4, !tbaa !17
  br label %119

102:                                              ; preds = %91
  store i32 2, ptr %12, align 4, !tbaa !17
  store i64 3, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds i8, ptr %1, i64 %.0110
  %104 = getelementptr inbounds i8, ptr %0, i64 28744
  store ptr %103, ptr %104, align 8, !tbaa !29
  br label %119

105:                                              ; preds = %11
  %106 = getelementptr inbounds i8, ptr %0, i64 28848
  %107 = tail call i64 @XXH64_digest(ptr noundef nonnull %106) #5
  %108 = trunc i64 %107 to i32
  %109 = tail call i32 @MEM_readLE32(ptr noundef %3)
  %.not113 = icmp eq i32 %109, %108
  br i1 %.not113, label %110, label %119

110:                                              ; preds = %105
  store i64 0, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %12, align 4, !tbaa !17
  br label %119

111:                                              ; preds = %11
  %112 = getelementptr inbounds i8, ptr %0, i64 160212
  %113 = sub i64 8, %4
  %114 = getelementptr inbounds i8, ptr %112, i64 %113
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %114, ptr align 1 %3, i64 %4, i1 false)
  %115 = getelementptr inbounds i8, ptr %0, i64 160216
  %116 = tail call i32 @MEM_readLE32(ptr noundef nonnull %115)
  %117 = zext i32 %116 to i64
  store i64 %117, ptr %7, align 8, !tbaa !5
  store i32 7, ptr %12, align 4, !tbaa !17
  br label %119

118:                                              ; preds = %11
  store i64 0, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %12, align 4, !tbaa !17
  br label %119

119:                                              ; preds = %36, %11, %110, %105, %68, %79, %96, %100, %101, %102, %5, %118, %111, %67, %45, %32, %30, %22
  %.4 = phi i64 [ 0, %118 ], [ 0, %111 ], [ %.1, %67 ], [ %43, %36 ], [ 0, %45 ], [ 0, %22 ], [ %31, %30 ], [ 0, %32 ], [ -72, %5 ], [ -20, %68 ], [ %.0110, %79 ], [ -20, %96 ], [ %.0110, %100 ], [ %.0110, %101 ], [ %.0110, %102 ], [ 0, %110 ], [ -22, %105 ], [ -1, %11 ]
  ret i64 %.4
}

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

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

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

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

declare i64 @XXH64_digest(ptr noundef) local_unnamed_addr #4

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


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