; LLVM IR from indygreg/python-zstandard :: zstd (zstd)

; 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.repcodes_s = type { [3 x i32] }
%struct.ZSTD_Sequence = type { i32, i32, i32, i32 }
%struct.ZSTD_sequencePosition = type { i32, i32, i64 }
%struct.ZSTD_CCtx_s = type { i32, i32, i32, %struct.ZSTD_CCtx_params_s, %struct.ZSTD_CCtx_params_s, %struct.ZSTD_CCtx_params_s, i32, i64, %struct.ZSTD_cwksp, i64, i64, i64, i64, %struct.XXH_NAMESPACEXXH64_state_s, %struct.ZSTD_customMem, ptr, i64, %struct.SeqCollector, i32, i32, %struct.seqStore_t, %struct.ldmState_t, ptr, i64, %struct.rawSeqStore_t, %struct.ZSTD_blockState_t, ptr, i32, ptr, i64, i64, i64, i64, ptr, i64, i64, i64, i32, i32, %struct.ZSTD_inBuffer_s, i64, i64, %struct.ZSTD_localDict, ptr, %struct.ZSTD_prefixDict_s, ptr, %struct.ZSTD_blockSplitCtx, ptr, i64 }
%struct.ZSTD_CCtx_params_s = type { i32, %struct.ZSTD_compressionParameters, %struct.ZSTD_frameParameters, i32, i32, i64, i32, i32, i32, i32, i64, i32, i32, %struct.ldmParams_t, i32, i32, i32, i32, i32, i32, i32, i32, %struct.ZSTD_customMem, i32, i32, ptr, ptr, i64, i32 }
%struct.ZSTD_compressionParameters = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.ZSTD_frameParameters = type { i32, i32, i32 }
%struct.ldmParams_t = type { i32, i32, i32, i32, i32, i32 }
%struct.ZSTD_cwksp = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i32, i32, i32 }
%struct.XXH_NAMESPACEXXH64_state_s = type { i64, [4 x i64], [4 x i64], i32, i32, i64 }
%struct.ZSTD_customMem = type { ptr, ptr, ptr }
%struct.SeqCollector = type { i32, ptr, i64, i64 }
%struct.seqStore_t = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i32, i32 }
%struct.ldmState_t = type { %struct.ZSTD_window_t, ptr, i32, ptr, [64 x i64], [64 x %struct.ldmMatchCandidate_t] }
%struct.ZSTD_window_t = type { ptr, ptr, ptr, i32, i32, i32 }
%struct.ldmMatchCandidate_t = type { ptr, i32, i32, ptr }
%struct.rawSeqStore_t = type { ptr, i64, i64, i64, i64 }
%struct.ZSTD_blockState_t = type { ptr, ptr, %struct.ZSTD_matchState_t }
%struct.ZSTD_matchState_t = type { %struct.ZSTD_window_t, i32, i32, i32, i32, ptr, [8 x i32], i64, i32, ptr, ptr, ptr, i32, i32, %struct.optState_t, ptr, %struct.ZSTD_compressionParameters, ptr, i32, i32 }
%struct.optState_t = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32 }
%struct.ZSTD_inBuffer_s = type { ptr, i64, i64 }
%struct.ZSTD_localDict = type { ptr, ptr, i64, i32, ptr }
%struct.ZSTD_prefixDict_s = type { ptr, i64, i32 }
%struct.ZSTD_blockSplitCtx = type { %struct.seqStore_t, %struct.seqStore_t, %struct.seqStore_t, %struct.seqStore_t, %struct.seqStore_t, [196 x i32], %struct.ZSTD_entropyCTablesMetadata_t }
%struct.ZSTD_entropyCTablesMetadata_t = type { %struct.ZSTD_hufCTablesMetadata_t, %struct.ZSTD_fseCTablesMetadata_t }
%struct.ZSTD_hufCTablesMetadata_t = type { i32, [128 x i8], i64 }
%struct.ZSTD_fseCTablesMetadata_t = type { i32, i32, i32, [133 x i8], i64, i64 }
%struct.ZSTD_CDict_s = type { ptr, i64, i32, ptr, %struct.ZSTD_cwksp, %struct.ZSTD_matchState_t, %struct.ZSTD_compressedBlockState_t, %struct.ZSTD_customMem, i32, i32, i32 }
%struct.ZSTD_compressedBlockState_t = type { %struct.ZSTD_entropyCTables_t, [3 x i32] }
%struct.ZSTD_entropyCTables_t = type { %struct.ZSTD_hufCTables_t, %struct.ZSTD_fseCTables_t }
%struct.ZSTD_hufCTables_t = type { [257 x i64], i32 }
%struct.ZSTD_fseCTables_t = type { [193 x i32], [363 x i32], [329 x i32], i32, i32, i32 }

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i64 @ZSTD_validateSequence(i32 noundef, i32 noundef, i32 noundef, i64 noundef, i32 noundef, i64 noundef, i32 noundef) #0

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @ZSTD_storeSeq(ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, i64 noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @ZSTD_storeLastLiterals(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i64 @ZSTD_copySequencesToSeqStoreNoBlockDelim(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, i64 noundef %5, i32 noundef %6) #0 {
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %struct.repcodes_s, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %struct.ZSTD_Sequence, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i64, align 8
  %35 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store i64 %3, ptr %12, align 8, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !5
  store i64 %5, ptr %14, align 8, !tbaa !9
  store i32 %6, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ZSTD_sequencePosition, ptr %36, i32 0, i32 0
  %38 = load i32, ptr %37, align 8, !tbaa !13
  store i32 %38, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.ZSTD_sequencePosition, ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 4, !tbaa !15
  store i32 %41, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.ZSTD_sequencePosition, ptr %42, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !15
  %45 = load i64, ptr %14, align 8, !tbaa !9
  %46 = trunc i64 %45 to i32
  %47 = add i32 %44, %46
  store i32 %47, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %48, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %49 = load ptr, ptr %20, align 8, !tbaa !5
  %50 = load i64, ptr %14, align 8, !tbaa !9
  %51 = getelementptr inbounds i8, ptr %49, i64 %50
  store ptr %51, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !11
  %52 = load i32, ptr %15, align 4, !tbaa !11
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %53, i32 0, i32 43
  %55 = load ptr, ptr %54, align 8, !tbaa !16
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %63

57:                                               ; preds = %7
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %58, i32 0, i32 43
  %60 = load ptr, ptr %59, align 8, !tbaa !16
  %61 = getelementptr inbounds %struct.ZSTD_CDict_s, ptr %60, i32 0, i32 1
  %62 = load i64, ptr %61, align 8, !tbaa !41
  store i64 %62, ptr %19, align 8, !tbaa !9
  br label %76

63:                                               ; preds = %7
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %64, i32 0, i32 44
  %66 = getelementptr inbounds %struct.ZSTD_prefixDict_s, ptr %65, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !47
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %74

69:                                               ; preds = %63
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %70, i32 0, i32 44
  %72 = getelementptr inbounds %struct.ZSTD_prefixDict_s, ptr %71, i32 0, i32 1
  %73 = load i64, ptr %72, align 8, !tbaa !48
  store i64 %73, ptr %19, align 8, !tbaa !9
  br label %75

74:                                               ; preds = %63
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %74, %69
  br label %76

76:                                               ; preds = %75, %57
  br label %77

77:                                               ; preds = %76
  br label %78

78:                                               ; preds = %77
  br label %79

79:                                               ; preds = %78
  br label %80

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81
  %83 = getelementptr inbounds %struct.repcodes_s, ptr %22, i32 0, i32 0
  %84 = getelementptr inbounds [3 x i32], ptr %83, i64 0, i64 0
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %85, i32 0, i32 25
  %87 = getelementptr inbounds %struct.ZSTD_blockState_t, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !49
  %89 = getelementptr inbounds %struct.ZSTD_compressedBlockState_t, ptr %88, i32 0, i32 1
  %90 = getelementptr inbounds [3 x i32], ptr %89, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %84, ptr align 8 %90, i64 12, i1 false)
  br label %91

91:                                               ; preds = %357, %82
  %92 = load i32, ptr %18, align 4, !tbaa !11
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %103

94:                                               ; preds = %91
  %95 = load i32, ptr %16, align 4, !tbaa !11
  %96 = zext i32 %95 to i64
  %97 = load i64, ptr %12, align 8, !tbaa !9
  %98 = icmp ult i64 %96, %97
  br i1 %98, label %99, label %103

99:                                               ; preds = %94
  %100 = load i32, ptr %24, align 4, !tbaa !11
  %101 = icmp ne i32 %100, 0
  %102 = xor i1 %101, true
  br label %103

103:                                              ; preds = %99, %94, %91
  %104 = phi i1 [ false, %94 ], [ false, %91 ], [ %102, %99 ]
  br i1 %104, label %105, label %358

105:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  %106 = load ptr, ptr %11, align 8, !tbaa !5
  %107 = load i32, ptr %16, align 4, !tbaa !11
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds %struct.ZSTD_Sequence, ptr %106, i64 %108
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %109, i64 16, i1 false), !tbaa.struct !50
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %110 = getelementptr inbounds %struct.ZSTD_Sequence, ptr %25, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !51
  store i32 %111, ptr %26, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %112 = getelementptr inbounds %struct.ZSTD_Sequence, ptr %25, i32 0, i32 2
  %113 = load i32, ptr %112, align 4, !tbaa !53
  store i32 %113, ptr %27, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %114 = getelementptr inbounds %struct.ZSTD_Sequence, ptr %25, i32 0, i32 0
  %115 = load i32, ptr %114, align 4, !tbaa !54
  store i32 %115, ptr %28, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %116 = load i32, ptr %18, align 4, !tbaa !11
  %117 = getelementptr inbounds %struct.ZSTD_Sequence, ptr %25, i32 0, i32 1
  %118 = load i32, ptr %117, align 4, !tbaa !51
  %119 = getelementptr inbounds %struct.ZSTD_Sequence, ptr %25, i32 0, i32 2
  %120 = load i32, ptr %119, align 4, !tbaa !53
  %121 = add i32 %118, %120
  %122 = icmp uge i32 %116, %121
  br i1 %122, label %123, label %146

123:                                              ; preds = %105
  %124 = load i32, ptr %17, align 4, !tbaa !11
  %125 = load i32, ptr %26, align 4, !tbaa !11
  %126 = icmp uge i32 %124, %125
  br i1 %126, label %127, label %134

127:                                              ; preds = %123
  %128 = load i32, ptr %26, align 4, !tbaa !11
  %129 = load i32, ptr %17, align 4, !tbaa !11
  %130 = sub i32 %129, %128
  store i32 %130, ptr %17, align 4, !tbaa !11
  store i32 0, ptr %26, align 4, !tbaa !11
  %131 = load i32, ptr %17, align 4, !tbaa !11
  %132 = load i32, ptr %27, align 4, !tbaa !11
  %133 = sub i32 %132, %131
  store i32 %133, ptr %27, align 4, !tbaa !11
  br label %138

134:                                              ; preds = %123
  %135 = load i32, ptr %17, align 4, !tbaa !11
  %136 = load i32, ptr %26, align 4, !tbaa !11
  %137 = sub i32 %136, %135
  store i32 %137, ptr %26, align 4, !tbaa !11
  br label %138

138:                                              ; preds = %134, %127
  %139 = getelementptr inbounds %struct.ZSTD_Sequence, ptr %25, i32 0, i32 1
  %140 = load i32, ptr %139, align 4, !tbaa !51
  %141 = getelementptr inbounds %struct.ZSTD_Sequence, ptr %25, i32 0, i32 2
  %142 = load i32, ptr %141, align 4, !tbaa !53
  %143 = add i32 %140, %142
  %144 = load i32, ptr %18, align 4, !tbaa !11
  %145 = sub i32 %144, %143
  store i32 %145, ptr %18, align 4, !tbaa !11
  store i32 0, ptr %17, align 4, !tbaa !11
  br label %231

146:                                              ; preds = %105
  br label %147

147:                                              ; preds = %146
  br label %148

148:                                              ; preds = %147
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %18, align 4, !tbaa !11
  %151 = load i32, ptr %26, align 4, !tbaa !11
  %152 = icmp ugt i32 %150, %151
  br i1 %152, label %153, label %229

153:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %154 = load i32, ptr %17, align 4, !tbaa !11
  %155 = load i32, ptr %26, align 4, !tbaa !11
  %156 = icmp uge i32 %154, %155
  br i1 %156, label %157, label %158

157:                                              ; preds = %153
  br label %162

158:                                              ; preds = %153
  %159 = load i32, ptr %26, align 4, !tbaa !11
  %160 = load i32, ptr %17, align 4, !tbaa !11
  %161 = sub i32 %159, %160
  br label %162

162:                                              ; preds = %158, %157
  %163 = phi i32 [ 0, %157 ], [ %161, %158 ]
  store i32 %163, ptr %26, align 4, !tbaa !11
  %164 = load i32, ptr %18, align 4, !tbaa !11
  %165 = load i32, ptr %17, align 4, !tbaa !11
  %166 = sub i32 %164, %165
  %167 = load i32, ptr %26, align 4, !tbaa !11
  %168 = sub i32 %166, %167
  store i32 %168, ptr %30, align 4, !tbaa !11
  %169 = load i32, ptr %27, align 4, !tbaa !11
  %170 = zext i32 %169 to i64
  %171 = load i64, ptr %14, align 8, !tbaa !9
  %172 = icmp ugt i64 %170, %171
  br i1 %172, label %173, label %218

173:                                              ; preds = %162
  %174 = load i32, ptr %30, align 4, !tbaa !11
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %175, i32 0, i32 4
  %177 = getelementptr inbounds %struct.ZSTD_CCtx_params_s, ptr %176, i32 0, i32 1
  %178 = getelementptr inbounds %struct.ZSTD_compressionParameters, ptr %177, i32 0, i32 4
  %179 = load i32, ptr %178, align 4, !tbaa !55
  %180 = icmp uge i32 %174, %179
  br i1 %180, label %181, label %218

181:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  %182 = getelementptr inbounds %struct.ZSTD_Sequence, ptr %25, i32 0, i32 2
  %183 = load i32, ptr %182, align 4, !tbaa !53
  %184 = getelementptr inbounds %struct.ZSTD_Sequence, ptr %25, i32 0, i32 1
  %185 = load i32, ptr %184, align 4, !tbaa !51
  %186 = add i32 %183, %185
  %187 = load i32, ptr %18, align 4, !tbaa !11
  %188 = sub i32 %186, %187
  store i32 %188, ptr %31, align 4, !tbaa !11
  %189 = load i32, ptr %31, align 4, !tbaa !11
  %190 = load ptr, ptr %9, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %190, i32 0, i32 4
  %192 = getelementptr inbounds %struct.ZSTD_CCtx_params_s, ptr %191, i32 0, i32 1
  %193 = getelementptr inbounds %struct.ZSTD_compressionParameters, ptr %192, i32 0, i32 4
  %194 = load i32, ptr %193, align 4, !tbaa !55
  %195 = icmp ult i32 %189, %194
  br i1 %195, label %196, label %216

196:                                              ; preds = %181
  %197 = load ptr, ptr %9, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %197, i32 0, i32 4
  %199 = getelementptr inbounds %struct.ZSTD_CCtx_params_s, ptr %198, i32 0, i32 1
  %200 = getelementptr inbounds %struct.ZSTD_compressionParameters, ptr %199, i32 0, i32 4
  %201 = load i32, ptr %200, align 4, !tbaa !55
  %202 = load i32, ptr %31, align 4, !tbaa !11
  %203 = sub i32 %201, %202
  %204 = load i32, ptr %18, align 4, !tbaa !11
  %205 = sub i32 %204, %203
  store i32 %205, ptr %18, align 4, !tbaa !11
  %206 = load ptr, ptr %9, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %206, i32 0, i32 4
  %208 = getelementptr inbounds %struct.ZSTD_CCtx_params_s, ptr %207, i32 0, i32 1
  %209 = getelementptr inbounds %struct.ZSTD_compressionParameters, ptr %208, i32 0, i32 4
  %210 = load i32, ptr %209, align 4, !tbaa !55
  %211 = load i32, ptr %31, align 4, !tbaa !11
  %212 = sub i32 %210, %211
  store i32 %212, ptr %23, align 4, !tbaa !11
  %213 = load i32, ptr %23, align 4, !tbaa !11
  %214 = load i32, ptr %30, align 4, !tbaa !11
  %215 = sub i32 %214, %213
  store i32 %215, ptr %30, align 4, !tbaa !11
  br label %216

216:                                              ; preds = %196, %181
  %217 = load i32, ptr %30, align 4, !tbaa !11
  store i32 %217, ptr %27, align 4, !tbaa !11
  store i32 1, ptr %24, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  br label %225

218:                                              ; preds = %173, %162
  %219 = load i32, ptr %18, align 4, !tbaa !11
  %220 = getelementptr inbounds %struct.ZSTD_Sequence, ptr %25, i32 0, i32 1
  %221 = load i32, ptr %220, align 4, !tbaa !51
  %222 = sub i32 %219, %221
  store i32 %222, ptr %23, align 4, !tbaa !11
  %223 = getelementptr inbounds %struct.ZSTD_Sequence, ptr %25, i32 0, i32 1
  %224 = load i32, ptr %223, align 4, !tbaa !51
  store i32 %224, ptr %18, align 4, !tbaa !11
  store i32 7, ptr %32, align 4
  br label %226

225:                                              ; preds = %216
  store i32 0, ptr %32, align 4
  br label %226

226:                                              ; preds = %225, %218
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  %227 = load i32, ptr %32, align 4
  switch i32 %227, label %355 [
    i32 0, label %228
  ]

228:                                              ; preds = %226
  br label %230

229:                                              ; preds = %149
  store i32 7, ptr %32, align 4
  br label %355

230:                                              ; preds = %228
  br label %231

231:                                              ; preds = %230, %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  %232 = load i32, ptr %26, align 4, !tbaa !11
  %233 = icmp eq i32 %232, 0
  %234 = zext i1 %233 to i32
  store i32 %234, ptr %33, align 4, !tbaa !11
  %235 = load i32, ptr %28, align 4, !tbaa !11
  %236 = getelementptr inbounds %struct.repcodes_s, ptr %22, i32 0, i32 0
  %237 = getelementptr inbounds [3 x i32], ptr %236, i64 0, i64 0
  %238 = load i32, ptr %33, align 4, !tbaa !11
  %239 = call i32 @ZSTD_finalizeOffBase(i32 noundef %235, ptr noundef %237, i32 noundef %238)
  store i32 %239, ptr %29, align 4, !tbaa !11
  %240 = getelementptr inbounds %struct.repcodes_s, ptr %22, i32 0, i32 0
  %241 = getelementptr inbounds [3 x i32], ptr %240, i64 0, i64 0
  %242 = load i32, ptr %29, align 4, !tbaa !11
  %243 = load i32, ptr %33, align 4, !tbaa !11
  call void @ZSTD_updateRep(ptr noundef %241, i32 noundef %242, i32 noundef %243)
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  %244 = load ptr, ptr %9, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %244, i32 0, i32 4
  %246 = getelementptr inbounds %struct.ZSTD_CCtx_params_s, ptr %245, i32 0, i32 18
  %247 = load i32, ptr %246, align 8, !tbaa !56
  %248 = icmp ne i32 %247, 0
  br i1 %248, label %249, label %302

249:                                              ; preds = %231
  %250 = load i32, ptr %26, align 4, !tbaa !11
  %251 = load i32, ptr %27, align 4, !tbaa !11
  %252 = add i32 %250, %251
  %253 = zext i32 %252 to i64
  %254 = load ptr, ptr %10, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.ZSTD_sequencePosition, ptr %254, i32 0, i32 2
  %256 = load i64, ptr %255, align 8, !tbaa !57
  %257 = add i64 %256, %253
  store i64 %257, ptr %255, align 8, !tbaa !57
  br label %258

258:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  %259 = load i32, ptr %29, align 4, !tbaa !11
  %260 = load i32, ptr %27, align 4, !tbaa !11
  %261 = load ptr, ptr %9, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %261, i32 0, i32 4
  %263 = getelementptr inbounds %struct.ZSTD_CCtx_params_s, ptr %262, i32 0, i32 1
  %264 = getelementptr inbounds %struct.ZSTD_compressionParameters, ptr %263, i32 0, i32 4
  %265 = load i32, ptr %264, align 4, !tbaa !55
  %266 = load ptr, ptr %10, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.ZSTD_sequencePosition, ptr %266, i32 0, i32 2
  %268 = load i64, ptr %267, align 8, !tbaa !57
  %269 = load ptr, ptr %9, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %269, i32 0, i32 4
  %271 = getelementptr inbounds %struct.ZSTD_CCtx_params_s, ptr %270, i32 0, i32 1
  %272 = getelementptr inbounds %struct.ZSTD_compressionParameters, ptr %271, i32 0, i32 0
  %273 = load i32, ptr %272, align 4, !tbaa !58
  %274 = load i64, ptr %19, align 8, !tbaa !9
  %275 = load ptr, ptr %9, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %275, i32 0, i32 4
  %277 = call i32 @ZSTD_hasExtSeqProd(ptr noundef %276)
  %278 = call i64 @ZSTD_validateSequence(i32 noundef %259, i32 noundef %260, i32 noundef %265, i64 noundef %268, i32 noundef %273, i64 noundef %274, i32 noundef %277)
  store i64 %278, ptr %34, align 8, !tbaa !9
  %279 = load i64, ptr %34, align 8, !tbaa !9
  %280 = call i32 @ERR_isError(i64 noundef %279)
  %281 = icmp ne i32 %280, 0
  br i1 %281, label %282, label %296

282:                                              ; preds = %258
  br label %283

283:                                              ; preds = %282
  br label %284

284:                                              ; preds = %283
  br label %285

285:                                              ; preds = %284
  br label %286

286:                                              ; preds = %285
  br label %287

287:                                              ; preds = %286
  br label %288

288:                                              ; preds = %287
  br label %289

289:                                              ; preds = %288
  br label %290

290:                                              ; preds = %289
  br label %291

291:                                              ; preds = %290
  br label %292

292:                                              ; preds = %291
  br label %293

293:                                              ; preds = %292
  br label %294

294:                                              ; preds = %293
  %295 = load i64, ptr %34, align 8, !tbaa !9
  store i64 %295, ptr %8, align 8
  store i32 1, ptr %32, align 4
  br label %297

296:                                              ; preds = %258
  store i32 0, ptr %32, align 4
  br label %297

297:                                              ; preds = %296, %294
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  %298 = load i32, ptr %32, align 4
  switch i32 %298, label %355 [
    i32 0, label %299
  ]

299:                                              ; preds = %297
  br label %300

300:                                              ; preds = %299
  br label %301

301:                                              ; preds = %300
  br label %302

302:                                              ; preds = %301, %231
  br label %303

303:                                              ; preds = %302
  br label %304

304:                                              ; preds = %303
  br label %305

305:                                              ; preds = %304
  br label %306

306:                                              ; preds = %305
  %307 = load i32, ptr %16, align 4, !tbaa !11
  %308 = load ptr, ptr %10, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.ZSTD_sequencePosition, ptr %308, i32 0, i32 0
  %310 = load i32, ptr %309, align 8, !tbaa !13
  %311 = sub i32 %307, %310
  %312 = zext i32 %311 to i64
  %313 = load ptr, ptr %9, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %313, i32 0, i32 20
  %315 = getelementptr inbounds %struct.seqStore_t, ptr %314, i32 0, i32 7
  %316 = load i64, ptr %315, align 8, !tbaa !59
  %317 = icmp uge i64 %312, %316
  br i1 %317, label %318, label %331

318:                                              ; preds = %306
  br label %319

319:                                              ; preds = %318
  br label %320

320:                                              ; preds = %319
  br label %321

321:                                              ; preds = %320
  br label %322

322:                                              ; preds = %321
  br label %323

323:                                              ; preds = %322
  br label %324

324:                                              ; preds = %323
  br label %325

325:                                              ; preds = %324
  br label %326

326:                                              ; preds = %325
  br label %327

327:                                              ; preds = %326
  br label %328

328:                                              ; preds = %327
  br label %329

329:                                              ; preds = %328
  br label %330

330:                                              ; preds = %329
  store i64 -107, ptr %8, align 8
  store i32 1, ptr %32, align 4
  br label %355

331:                                              ; preds = %306
  br label %332

332:                                              ; preds = %331
  br label %333

333:                                              ; preds = %332
  %334 = load ptr, ptr %9, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %334, i32 0, i32 20
  %336 = load i32, ptr %26, align 4, !tbaa !11
  %337 = zext i32 %336 to i64
  %338 = load ptr, ptr %20, align 8, !tbaa !5
  %339 = load ptr, ptr %21, align 8, !tbaa !5
  %340 = load i32, ptr %29, align 4, !tbaa !11
  %341 = load i32, ptr %27, align 4, !tbaa !11
  %342 = zext i32 %341 to i64
  call void @ZSTD_storeSeq(ptr noundef %335, i64 noundef %337, ptr noundef %338, ptr noundef %339, i32 noundef %340, i64 noundef %342)
  %343 = load i32, ptr %27, align 4, !tbaa !11
  %344 = load i32, ptr %26, align 4, !tbaa !11
  %345 = add i32 %343, %344
  %346 = load ptr, ptr %20, align 8, !tbaa !5
  %347 = zext i32 %345 to i64
  %348 = getelementptr inbounds i8, ptr %346, i64 %347
  store ptr %348, ptr %20, align 8, !tbaa !5
  %349 = load i32, ptr %24, align 4, !tbaa !11
  %350 = icmp ne i32 %349, 0
  br i1 %350, label %354, label %351

351:                                              ; preds = %333
  %352 = load i32, ptr %16, align 4, !tbaa !11
  %353 = add i32 %352, 1
  store i32 %353, ptr %16, align 4, !tbaa !11
  br label %354

354:                                              ; preds = %351, %333
  store i32 0, ptr %32, align 4
  br label %355

355:                                              ; preds = %354, %330, %297, %229, %226
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  %356 = load i32, ptr %32, align 4
  switch i32 %356, label %408 [
    i32 0, label %357
    i32 7, label %358
  ]

357:                                              ; preds = %355
  br label %91, !llvm.loop !60

358:                                              ; preds = %355, %103
  br label %359

359:                                              ; preds = %358
  br label %360

360:                                              ; preds = %359
  br label %361

361:                                              ; preds = %360
  %362 = load i32, ptr %16, align 4, !tbaa !11
  %363 = load ptr, ptr %10, align 8, !tbaa !5
  %364 = getelementptr inbounds %struct.ZSTD_sequencePosition, ptr %363, i32 0, i32 0
  store i32 %362, ptr %364, align 8, !tbaa !13
  %365 = load i32, ptr %18, align 4, !tbaa !11
  %366 = load ptr, ptr %10, align 8, !tbaa !5
  %367 = getelementptr inbounds %struct.ZSTD_sequencePosition, ptr %366, i32 0, i32 1
  store i32 %365, ptr %367, align 4, !tbaa !15
  %368 = load ptr, ptr %9, align 8, !tbaa !5
  %369 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %368, i32 0, i32 25
  %370 = getelementptr inbounds %struct.ZSTD_blockState_t, ptr %369, i32 0, i32 1
  %371 = load ptr, ptr %370, align 8, !tbaa !62
  %372 = getelementptr inbounds %struct.ZSTD_compressedBlockState_t, ptr %371, i32 0, i32 1
  %373 = getelementptr inbounds [3 x i32], ptr %372, i64 0, i64 0
  %374 = getelementptr inbounds %struct.repcodes_s, ptr %22, i32 0, i32 0
  %375 = getelementptr inbounds [3 x i32], ptr %374, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %373, ptr align 4 %375, i64 12, i1 false)
  %376 = load i32, ptr %23, align 4, !tbaa !11
  %377 = load ptr, ptr %21, align 8, !tbaa !5
  %378 = zext i32 %376 to i64
  %379 = sub i64 0, %378
  %380 = getelementptr inbounds i8, ptr %377, i64 %379
  store ptr %380, ptr %21, align 8, !tbaa !5
  %381 = load ptr, ptr %20, align 8, !tbaa !5
  %382 = load ptr, ptr %21, align 8, !tbaa !5
  %383 = icmp ne ptr %381, %382
  br i1 %383, label %384, label %405

384:                                              ; preds = %361
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #5
  %385 = load ptr, ptr %21, align 8, !tbaa !5
  %386 = load ptr, ptr %20, align 8, !tbaa !5
  %387 = ptrtoint ptr %385 to i64
  %388 = ptrtoint ptr %386 to i64
  %389 = sub i64 %387, %388
  %390 = trunc i64 %389 to i32
  store i32 %390, ptr %35, align 4, !tbaa !11
  br label %391

391:                                              ; preds = %384
  br label %392

392:                                              ; preds = %391
  br label %393

393:                                              ; preds = %392
  %394 = load ptr, ptr %9, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.ZSTD_CCtx_s, ptr %394, i32 0, i32 20
  %396 = load ptr, ptr %20, align 8, !tbaa !5
  %397 = load i32, ptr %35, align 4, !tbaa !11
  %398 = zext i32 %397 to i64
  call void @ZSTD_storeLastLiterals(ptr noundef %395, ptr noundef %396, i64 noundef %398)
  %399 = load i32, ptr %35, align 4, !tbaa !11
  %400 = zext i32 %399 to i64
  %401 = load ptr, ptr %10, align 8, !tbaa !5
  %402 = getelementptr inbounds %struct.ZSTD_sequencePosition, ptr %401, i32 0, i32 2
  %403 = load i64, ptr %402, align 8, !tbaa !57
  %404 = add i64 %403, %400
  store i64 %404, ptr %402, align 8, !tbaa !57
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  br label %405

405:                                              ; preds = %393, %361
  %406 = load i32, ptr %23, align 4, !tbaa !11
  %407 = zext i32 %406 to i64
  store i64 %407, ptr %8, align 8
  store i32 1, ptr %32, align 4
  br label %408

408:                                              ; preds = %405, %355
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  %409 = load i64, ptr %8, align 8
  ret i64 %409
}

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { alwaysinline 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 = { 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, !12, i64 0}
!14 = !{!"", !12, i64 0, !12, i64 4, !10, i64 8}
!15 = !{!14, !12, i64 4}
!16 = !{!17, !6, i64 3696}
!17 = !{!"ZSTD_CCtx_s", !12, i64 0, !12, i64 4, !12, i64 8, !18, i64 16, !18, i64 232, !18, i64 448, !12, i64 664, !10, i64 672, !23, i64 680, !10, i64 752, !24, i64 760, !24, i64 768, !24, i64 776, !25, i64 784, !22, i64 872, !6, i64 896, !10, i64 904, !26, i64 912, !12, i64 944, !12, i64 948, !27, i64 952, !28, i64 1032, !6, i64 3144, !10, i64 3152, !30, i64 3160, !31, i64 3200, !6, i64 3520, !12, i64 3528, !6, i64 3536, !10, i64 3544, !10, i64 3552, !10, i64 3560, !10, i64 3568, !6, i64 3576, !10, i64 3584, !10, i64 3592, !10, i64 3600, !12, i64 3608, !12, i64 3612, !34, i64 3616, !10, i64 3640, !10, i64 3648, !35, i64 3656, !6, i64 3696, !36, i64 3704, !6, i64 3728, !37, i64 3736, !6, i64 5232, !10, i64 5240}
!18 = !{!"ZSTD_CCtx_params_s", !12, i64 0, !19, i64 4, !20, i64 32, !12, i64 44, !12, i64 48, !10, i64 56, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !10, i64 80, !12, i64 88, !12, i64 92, !21, i64 96, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !12, i64 136, !12, i64 140, !12, i64 144, !12, i64 148, !22, i64 152, !12, i64 176, !12, i64 180, !6, i64 184, !6, i64 192, !10, i64 200, !12, i64 208}
!19 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24}
!20 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8}
!21 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!22 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !7, i64 56, !12, i64 60, !12, i64 64, !12, i64 68}
!24 = !{!"long long", !7, i64 0}
!25 = !{!"XXH_NAMESPACEXXH64_state_s", !10, i64 0, !7, i64 8, !7, i64 40, !12, i64 72, !12, i64 76, !10, i64 80}
!26 = !{!"", !12, i64 0, !6, i64 8, !10, i64 16, !10, i64 24}
!27 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !10, i64 64, !12, i64 72, !12, i64 76}
!28 = !{!"", !29, i64 0, !6, i64 40, !12, i64 48, !6, i64 56, !7, i64 64, !7, i64 576}
!29 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !12, i64 28, !12, i64 32}
!30 = !{!"", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!31 = !{!"", !6, i64 0, !6, i64 8, !32, i64 16}
!32 = !{!"ZSTD_matchState_t", !29, i64 0, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !6, i64 56, !7, i64 64, !10, i64 96, !12, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !12, i64 136, !12, i64 140, !33, i64 144, !6, i64 248, !19, i64 256, !6, i64 288, !12, i64 296, !12, i64 300}
!33 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !6, i64 88, !12, i64 96}
!34 = !{!"ZSTD_inBuffer_s", !6, i64 0, !10, i64 8, !10, i64 16}
!35 = !{!"", !6, i64 0, !6, i64 8, !10, i64 16, !12, i64 24, !6, i64 32}
!36 = !{!"ZSTD_prefixDict_s", !6, i64 0, !10, i64 8, !12, i64 16}
!37 = !{!"", !27, i64 0, !27, i64 80, !27, i64 160, !27, i64 240, !27, i64 320, !7, i64 400, !38, i64 1184}
!38 = !{!"", !39, i64 0, !40, i64 144}
!39 = !{!"", !12, i64 0, !7, i64 4, !10, i64 136}
!40 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !7, i64 12, !10, i64 152, !10, i64 160}
!41 = !{!42, !10, i64 8}
!42 = !{!"ZSTD_CDict_s", !6, i64 0, !10, i64 8, !12, i64 16, !6, i64 24, !23, i64 32, !32, i64 104, !43, i64 408, !22, i64 6040, !12, i64 6064, !12, i64 6068, !12, i64 6072}
!43 = !{!"", !44, i64 0, !7, i64 5616}
!44 = !{!"", !45, i64 0, !46, i64 2064}
!45 = !{!"", !7, i64 0, !12, i64 2056}
!46 = !{!"", !7, i64 0, !7, i64 772, !7, i64 2224, !12, i64 3540, !12, i64 3544, !12, i64 3548}
!47 = !{!17, !6, i64 3704}
!48 = !{!17, !10, i64 3712}
!49 = !{!17, !6, i64 3200}
!50 = !{i64 0, i64 4, !11, i64 4, i64 4, !11, i64 8, i64 4, !11, i64 12, i64 4, !11}
!51 = !{!52, !12, i64 4}
!52 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!53 = !{!52, !12, i64 8}
!54 = !{!52, !12, i64 0}
!55 = !{!17, !12, i64 252}
!56 = !{!17, !12, i64 368}
!57 = !{!14, !10, i64 8}
!58 = !{!17, !12, i64 236}
!59 = !{!17, !10, i64 1008}
!60 = distinct !{!60, !61}
!61 = !{!"llvm.loop.mustprogress"}
!62 = !{!17, !6, i64 3208}


; 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.repcodes_s = type { [3 x i32] }
%struct.ZSTD_Sequence = type { i32, i32, i32, i32 }

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i64 @ZSTD_validateSequence(i32 noundef, i32 noundef, i32 noundef, i64 noundef, i32 noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @ZSTD_storeSeq(ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @ZSTD_storeLastLiterals(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i64 @ZSTD_copySequencesToSeqStoreNoBlockDelim(ptr noundef %0, ptr nocapture noundef %1, ptr nocapture noundef readonly %2, i64 noundef %3, ptr noundef %4, i64 noundef %5, i32 noundef %6) local_unnamed_addr #0 {
  %8 = alloca %struct.repcodes_s, align 4
  %9 = load i32, ptr %1, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %1, i64 4
  %11 = load i32, ptr %10, align 4, !tbaa !11
  %12 = trunc i64 %5 to i32
  %13 = add i32 %11, %12
  %14 = getelementptr inbounds i8, ptr %4, i64 %5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #6
  %15 = getelementptr inbounds i8, ptr %0, i64 3696
  %16 = load ptr, ptr %15, align 8, !tbaa !12
  %.not = icmp eq ptr %16, null
  br i1 %.not, label %19, label %17

17:                                               ; preds = %7
  %18 = getelementptr inbounds i8, ptr %16, i64 8
  br label %.sink.split

19:                                               ; preds = %7
  %20 = getelementptr inbounds i8, ptr %0, i64 3704
  %21 = load ptr, ptr %20, align 8, !tbaa !38
  %.not158 = icmp eq ptr %21, null
  br i1 %.not158, label %25, label %22

22:                                               ; preds = %19
  %23 = getelementptr inbounds i8, ptr %0, i64 3712
  br label %.sink.split

.sink.split:                                      ; preds = %17, %22
  %.sink = phi ptr [ %23, %22 ], [ %18, %17 ]
  %24 = load i64, ptr %.sink, align 8, !tbaa !39
  br label %25

25:                                               ; preds = %.sink.split, %19
  %.0131 = phi i64 [ 0, %19 ], [ %24, %.sink.split ]
  %26 = getelementptr inbounds i8, ptr %0, i64 3200
  %27 = load ptr, ptr %26, align 8, !tbaa !40
  %28 = getelementptr inbounds i8, ptr %27, i64 5616
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(12) %28, i64 12, i1 false)
  %.not159207 = icmp eq i32 %13, 0
  br i1 %.not159207, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %25
  %29 = getelementptr inbounds i8, ptr %0, i64 252
  %30 = getelementptr inbounds i8, ptr %0, i64 368
  %31 = getelementptr inbounds i8, ptr %0, i64 232
  %32 = getelementptr inbounds i8, ptr %1, i64 8
  %33 = getelementptr inbounds i8, ptr %0, i64 236
  %34 = getelementptr inbounds i8, ptr %0, i64 1008
  %35 = getelementptr inbounds i8, ptr %0, i64 952
  br label %36

36:                                               ; preds = %.lr.ph, %80
  %.0115213 = phi i32 [ %9, %.lr.ph ], [ %spec.select, %80 ]
  %.0119212 = phi i32 [ %11, %.lr.ph ], [ %.1120, %80 ]
  %.0125211 = phi i32 [ %13, %.lr.ph ], [ %.3128, %80 ]
  %.0132210 = phi ptr [ %4, %.lr.ph ], [ %85, %80 ]
  %.0140209 = phi i32 [ 0, %.lr.ph ], [ %.3143, %80 ]
  %.0146208 = phi i32 [ 0, %.lr.ph ], [ %.2148, %80 ]
  %37 = zext i32 %.0115213 to i64
  %38 = icmp ult i64 %37, %3
  %.not160 = icmp eq i32 %.0146208, 0
  %or.cond = and i1 %.not160, %38
  br i1 %or.cond, label %39, label %.critedge

39:                                               ; preds = %36
  %40 = getelementptr inbounds %struct.ZSTD_Sequence, ptr %2, i64 %37
  %.sroa.0.0.copyload = load i32, ptr %40, align 4, !tbaa !41
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 4
  %.sroa.4.0.copyload = load i32, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !41
  %.sroa.10.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 8
  %.sroa.10.0.copyload = load i32, ptr %.sroa.10.0..sroa_idx, align 4, !tbaa !41
  %41 = add i32 %.sroa.10.0.copyload, %.sroa.4.0.copyload
  %.not161.not = icmp uge i32 %.0125211, %41
  br i1 %.not161.not, label %42, label %44

42:                                               ; preds = %39
  %.0138 = call i32 @llvm.usub.sat.i32(i32 %.sroa.4.0.copyload, i32 %.0119212)
  %43 = call i32 @llvm.usub.sat.i32(i32 %.0119212, i32 %.sroa.4.0.copyload)
  %.0135 = sub i32 %.sroa.10.0.copyload, %43
  br label %60

44:                                               ; preds = %39
  %45 = icmp ugt i32 %.0125211, %.sroa.4.0.copyload
  br i1 %45, label %46, label %.critedge

46:                                               ; preds = %44
  %47 = call i32 @llvm.usub.sat.i32(i32 %.sroa.4.0.copyload, i32 %.0119212)
  %48 = add i32 %.0119212, %47
  %49 = sub i32 %.0125211, %48
  %50 = zext i32 %.sroa.10.0.copyload to i64
  %51 = icmp ugt i64 %50, %5
  br i1 %51, label %52, label %58

52:                                               ; preds = %46
  %53 = load i32, ptr %29, align 4, !tbaa !42
  %.not163 = icmp ult i32 %49, %53
  br i1 %.not163, label %58, label %.thread

.thread:                                          ; preds = %52
  %54 = sub i32 %41, %.0125211
  %55 = icmp ult i32 %54, %53
  %56 = sub i32 %53, %54
  %.1141 = select i1 %55, i32 %56, i32 %.0140209
  %57 = call i32 @llvm.usub.sat.i32(i32 %53, i32 %54)
  %.0130 = sub i32 %49, %57
  br label %60

58:                                               ; preds = %46, %52
  %59 = sub i32 %.0125211, %.sroa.4.0.copyload
  br label %.critedge

60:                                               ; preds = %.thread, %42
  %.2148 = phi i32 [ 0, %42 ], [ 1, %.thread ]
  %.3143 = phi i32 [ %.0140209, %42 ], [ %.1141, %.thread ]
  %.1139 = phi i32 [ %.0138, %42 ], [ %47, %.thread ]
  %.2137 = phi i32 [ %.0135, %42 ], [ %.0130, %.thread ]
  %.pn = phi i32 [ %41, %42 ], [ %57, %.thread ]
  %.1120 = phi i32 [ 0, %42 ], [ %.0119212, %.thread ]
  %.3128 = sub i32 %.0125211, %.pn
  %61 = icmp eq i32 %.1139, 0
  %62 = zext i1 %61 to i32
  %63 = call i32 @ZSTD_finalizeOffBase(i32 noundef %.sroa.0.0.copyload, ptr noundef nonnull %8, i32 noundef %62)
  call void @ZSTD_updateRep(ptr noundef nonnull %8, i32 noundef %63, i32 noundef %62)
  %64 = load i32, ptr %30, align 8, !tbaa !43
  %.not165 = icmp eq i32 %64, 0
  br i1 %.not165, label %75, label %65

65:                                               ; preds = %60
  %66 = add i32 %.2137, %.1139
  %67 = zext i32 %66 to i64
  %68 = load i64, ptr %32, align 8, !tbaa !44
  %69 = add i64 %68, %67
  store i64 %69, ptr %32, align 8, !tbaa !44
  %70 = load i32, ptr %29, align 4, !tbaa !42
  %71 = load i32, ptr %33, align 4, !tbaa !45
  %72 = call i32 @ZSTD_hasExtSeqProd(ptr noundef nonnull %31)
  %73 = call i64 @ZSTD_validateSequence(i32 noundef %63, i32 noundef %.2137, i32 noundef %70, i64 noundef %69, i32 noundef %71, i64 noundef %.0131, i32 noundef %72)
  %74 = call i32 @ERR_isError(i64 noundef %73)
  %.not166 = icmp eq i32 %74, 0
  br i1 %.not166, label %75, label %.thread176

75:                                               ; preds = %65, %60
  %76 = load i32, ptr %1, align 8, !tbaa !5
  %77 = sub i32 %.0115213, %76
  %78 = zext i32 %77 to i64
  %79 = load i64, ptr %34, align 8, !tbaa !46
  %.not167 = icmp ugt i64 %79, %78
  br i1 %.not167, label %80, label %.thread176

80:                                               ; preds = %75
  %81 = zext i32 %.1139 to i64
  %82 = zext i32 %.2137 to i64
  call void @ZSTD_storeSeq(ptr noundef nonnull %35, i64 noundef %81, ptr noundef %.0132210, ptr noundef %14, i32 noundef %63, i64 noundef %82)
  %83 = add i32 %.2137, %.1139
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds i8, ptr %.0132210, i64 %84
  %86 = zext i1 %.not161.not to i32
  %spec.select = add i32 %.0115213, %86
  %.not159 = icmp eq i32 %.3128, 0
  br i1 %.not159, label %.critedge, label %36

.critedge:                                        ; preds = %36, %80, %44, %25, %58
  %.0132203 = phi ptr [ %.0132210, %58 ], [ %4, %25 ], [ %.0132210, %36 ], [ %85, %80 ], [ %.0132210, %44 ]
  %.0115198 = phi i32 [ %.0115213, %58 ], [ %9, %25 ], [ %.0115213, %36 ], [ %spec.select, %80 ], [ %.0115213, %44 ]
  %.5145 = phi i32 [ %59, %58 ], [ 0, %25 ], [ %.0140209, %36 ], [ %.3143, %80 ], [ %.0140209, %44 ]
  %.5 = phi i32 [ %.sroa.4.0.copyload, %58 ], [ 0, %25 ], [ %.0125211, %36 ], [ 0, %80 ], [ %.0125211, %44 ]
  store i32 %.0115198, ptr %1, align 8, !tbaa !5
  store i32 %.5, ptr %10, align 4, !tbaa !11
  %87 = getelementptr inbounds i8, ptr %0, i64 3208
  %88 = load ptr, ptr %87, align 8, !tbaa !47
  %89 = getelementptr inbounds i8, ptr %88, i64 5616
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %89, ptr noundef nonnull align 4 dereferenceable(12) %8, i64 12, i1 false)
  %90 = zext i32 %.5145 to i64
  %91 = sub nsw i64 0, %90
  %92 = getelementptr inbounds i8, ptr %14, i64 %91
  %.not169 = icmp eq ptr %.0132203, %92
  br i1 %.not169, label %.thread176, label %93

93:                                               ; preds = %.critedge
  %94 = ptrtoint ptr %92 to i64
  %95 = ptrtoint ptr %.0132203 to i64
  %96 = sub i64 %94, %95
  %97 = getelementptr inbounds i8, ptr %0, i64 952
  %98 = and i64 %96, 4294967295
  call void @ZSTD_storeLastLiterals(ptr noundef nonnull %97, ptr noundef %.0132203, i64 noundef %98)
  %99 = getelementptr inbounds i8, ptr %1, i64 8
  %100 = load i64, ptr %99, align 8, !tbaa !44
  %101 = add i64 %100, %98
  store i64 %101, ptr %99, align 8, !tbaa !44
  br label %.thread176

.thread176:                                       ; preds = %75, %65, %.critedge, %93
  %.4 = phi i64 [ %90, %93 ], [ %90, %.critedge ], [ %73, %65 ], [ -107, %75 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  ret i64 %.4
}

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { alwaysinline 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 = { 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!13, !19, i64 3696}
!13 = !{!"ZSTD_CCtx_s", !7, i64 0, !7, i64 4, !7, i64 8, !14, i64 16, !14, i64 232, !14, i64 448, !7, i64 664, !10, i64 672, !20, i64 680, !10, i64 752, !21, i64 760, !21, i64 768, !21, i64 776, !22, i64 784, !18, i64 872, !19, i64 896, !10, i64 904, !23, i64 912, !7, i64 944, !7, i64 948, !24, i64 952, !25, i64 1032, !19, i64 3144, !10, i64 3152, !27, i64 3160, !28, i64 3200, !19, i64 3520, !7, i64 3528, !19, i64 3536, !10, i64 3544, !10, i64 3552, !10, i64 3560, !10, i64 3568, !19, i64 3576, !10, i64 3584, !10, i64 3592, !10, i64 3600, !7, i64 3608, !7, i64 3612, !31, i64 3616, !10, i64 3640, !10, i64 3648, !32, i64 3656, !19, i64 3696, !33, i64 3704, !19, i64 3728, !34, i64 3736, !19, i64 5232, !10, i64 5240}
!14 = !{!"ZSTD_CCtx_params_s", !7, i64 0, !15, i64 4, !16, i64 32, !7, i64 44, !7, i64 48, !10, i64 56, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !10, i64 80, !7, i64 88, !7, i64 92, !17, i64 96, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !18, i64 152, !7, i64 176, !7, i64 180, !19, i64 184, !19, i64 192, !10, i64 200, !7, i64 208}
!15 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24}
!16 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8}
!17 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!18 = !{!"", !19, i64 0, !19, i64 8, !19, i64 16}
!19 = !{!"any pointer", !8, i64 0}
!20 = !{!"", !19, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !19, i64 48, !8, i64 56, !7, i64 60, !7, i64 64, !7, i64 68}
!21 = !{!"long long", !8, i64 0}
!22 = !{!"XXH_NAMESPACEXXH64_state_s", !10, i64 0, !8, i64 8, !8, i64 40, !7, i64 72, !7, i64 76, !10, i64 80}
!23 = !{!"", !7, i64 0, !19, i64 8, !10, i64 16, !10, i64 24}
!24 = !{!"", !19, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !19, i64 48, !10, i64 56, !10, i64 64, !7, i64 72, !7, i64 76}
!25 = !{!"", !26, i64 0, !19, i64 40, !7, i64 48, !19, i64 56, !8, i64 64, !8, i64 576}
!26 = !{!"", !19, i64 0, !19, i64 8, !19, i64 16, !7, i64 24, !7, i64 28, !7, i64 32}
!27 = !{!"", !19, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!28 = !{!"", !19, i64 0, !19, i64 8, !29, i64 16}
!29 = !{!"ZSTD_matchState_t", !26, i64 0, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !19, i64 56, !8, i64 64, !10, i64 96, !7, i64 104, !19, i64 112, !19, i64 120, !19, i64 128, !7, i64 136, !7, i64 140, !30, i64 144, !19, i64 248, !15, i64 256, !19, i64 288, !7, i64 296, !7, i64 300}
!30 = !{!"", !19, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !19, i64 88, !7, i64 96}
!31 = !{!"ZSTD_inBuffer_s", !19, i64 0, !10, i64 8, !10, i64 16}
!32 = !{!"", !19, i64 0, !19, i64 8, !10, i64 16, !7, i64 24, !19, i64 32}
!33 = !{!"ZSTD_prefixDict_s", !19, i64 0, !10, i64 8, !7, i64 16}
!34 = !{!"", !24, i64 0, !24, i64 80, !24, i64 160, !24, i64 240, !24, i64 320, !8, i64 400, !35, i64 1184}
!35 = !{!"", !36, i64 0, !37, i64 144}
!36 = !{!"", !7, i64 0, !8, i64 4, !10, i64 136}
!37 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 12, !10, i64 152, !10, i64 160}
!38 = !{!13, !19, i64 3704}
!39 = !{!10, !10, i64 0}
!40 = !{!13, !19, i64 3200}
!41 = !{!7, !7, i64 0}
!42 = !{!13, !7, i64 252}
!43 = !{!13, !7, i64 368}
!44 = !{!6, !10, i64 8}
!45 = !{!13, !7, i64 236}
!46 = !{!13, !10, i64 1008}
!47 = !{!13, !19, i64 3208}


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