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

; 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.rawSeq = type { i32, i32, i32 }
%struct.ZSTD_compressionParameters = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.ZSTD_matchState_t = type { %struct.ZSTD_window_t, i32, i32, i32, i32, ptr, ptr, ptr, %struct.optState_t }
%struct.ZSTD_window_t = type { ptr, ptr, ptr, i32, i32 }
%struct.optState_t = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.rawSeqStore_t = type { ptr, i64, i64, i64 }

; 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: nounwind uwtable
define dso_local i64 @ZSTD_ldm_blockCompress(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i64 noundef %6, i32 noundef %7) #1 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %struct.rawSeq, align 4
  %24 = alloca { i64, i32 }, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  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 ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store i64 %6, ptr %15, align 8, !tbaa !9
  store i32 %7, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %29 = load ptr, ptr %13, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.ZSTD_compressionParameters, ptr %29, i32 0, i32 4
  %31 = load i32, ptr %30, align 4, !tbaa !13
  store i32 %31, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %32 = load ptr, ptr %13, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ZSTD_compressionParameters, ptr %32, i32 0, i32 6
  %34 = load i32, ptr %33, align 4, !tbaa !15
  %35 = load i32, ptr %16, align 4, !tbaa !11
  %36 = call ptr @ZSTD_selectBlockCompressor(i32 noundef %34, i32 noundef %35)
  store ptr %36, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ZSTD_matchState_t, ptr %37, i32 0, i32 0
  %39 = getelementptr inbounds %struct.ZSTD_window_t, ptr %38, i32 0, i32 1
  %40 = load ptr, ptr %39, align 8, !tbaa !16
  store ptr %40, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %41 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %41, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %42 = load ptr, ptr %20, align 8, !tbaa !5
  %43 = load i64, ptr %15, align 8, !tbaa !9
  %44 = getelementptr inbounds i8, ptr %42, i64 %43
  store ptr %44, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %45 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %45, ptr %22, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %146, %8
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.rawSeqStore_t, ptr %47, i32 0, i32 1
  %49 = load i64, ptr %48, align 8, !tbaa !20
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.rawSeqStore_t, ptr %50, i32 0, i32 2
  %52 = load i64, ptr %51, align 8, !tbaa !22
  %53 = icmp ult i64 %49, %52
  br i1 %53, label %54, label %58

54:                                               ; preds = %46
  %55 = load ptr, ptr %22, align 8, !tbaa !5
  %56 = load ptr, ptr %21, align 8, !tbaa !5
  %57 = icmp ult ptr %55, %56
  br label %58

58:                                               ; preds = %54, %46
  %59 = phi i1 [ false, %46 ], [ %57, %54 ]
  br i1 %59, label %60, label %147

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 12, ptr %23) #5
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = load ptr, ptr %21, align 8, !tbaa !5
  %63 = load ptr, ptr %22, align 8, !tbaa !5
  %64 = ptrtoint ptr %62 to i64
  %65 = ptrtoint ptr %63 to i64
  %66 = sub i64 %64, %65
  %67 = trunc i64 %66 to i32
  %68 = load i32, ptr %17, align 4, !tbaa !11
  %69 = call { i64, i32 } @maybeSplitSequence(ptr noundef %61, i32 noundef %67, i32 noundef %68)
  store { i64, i32 } %69, ptr %24, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 8 %24, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %70 = getelementptr inbounds %struct.rawSeq, ptr %23, i32 0, i32 0
  %71 = load i32, ptr %70, align 4, !tbaa !23
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %60
  store i32 3, ptr %26, align 4
  br label %144

74:                                               ; preds = %60
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = load ptr, ptr %22, align 8, !tbaa !5
  call void @ZSTD_ldm_limitTableUpdate(ptr noundef %75, ptr noundef %76)
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = load ptr, ptr %13, align 8, !tbaa !5
  %79 = load ptr, ptr %22, align 8, !tbaa !5
  %80 = call i64 @ZSTD_ldm_fillFastTables(ptr noundef %77, ptr noundef %78, ptr noundef %79)
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %81 = load ptr, ptr %18, align 8, !tbaa !5
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = load ptr, ptr %22, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.rawSeq, ptr %23, i32 0, i32 1
  %88 = load i32, ptr %87, align 4, !tbaa !25
  %89 = zext i32 %88 to i64
  %90 = call i64 %81(ptr noundef %82, ptr noundef %83, ptr noundef %84, ptr noundef %85, ptr noundef %86, i64 noundef %89)
  store i64 %90, ptr %27, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.rawSeq, ptr %23, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !25
  %93 = load ptr, ptr %22, align 8, !tbaa !5
  %94 = zext i32 %92 to i64
  %95 = getelementptr inbounds i8, ptr %93, i64 %94
  store ptr %95, ptr %22, align 8, !tbaa !5
  %96 = load ptr, ptr %22, align 8, !tbaa !5
  %97 = load ptr, ptr %19, align 8, !tbaa !5
  %98 = ptrtoint ptr %96 to i64
  %99 = ptrtoint ptr %97 to i64
  %100 = sub i64 %98, %99
  %101 = trunc i64 %100 to i32
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.ZSTD_matchState_t, ptr %102, i32 0, i32 2
  store i32 %101, ptr %103, align 4, !tbaa !26
  store i32 2, ptr %25, align 4, !tbaa !11
  br label %104

104:                                              ; preds = %118, %74
  %105 = load i32, ptr %25, align 4, !tbaa !11
  %106 = icmp sgt i32 %105, 0
  br i1 %106, label %107, label %121

107:                                              ; preds = %104
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = load i32, ptr %25, align 4, !tbaa !11
  %110 = sub nsw i32 %109, 1
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %108, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !11
  %114 = load ptr, ptr %12, align 8, !tbaa !5
  %115 = load i32, ptr %25, align 4, !tbaa !11
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds i32, ptr %114, i64 %116
  store i32 %113, ptr %117, align 4, !tbaa !11
  br label %118

118:                                              ; preds = %107
  %119 = load i32, ptr %25, align 4, !tbaa !11
  %120 = add nsw i32 %119, -1
  store i32 %120, ptr %25, align 4, !tbaa !11
  br label %104, !llvm.loop !27

121:                                              ; preds = %104
  %122 = getelementptr inbounds %struct.rawSeq, ptr %23, i32 0, i32 0
  %123 = load i32, ptr %122, align 4, !tbaa !23
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  %125 = getelementptr inbounds i32, ptr %124, i64 0
  store i32 %123, ptr %125, align 4, !tbaa !11
  %126 = load ptr, ptr %11, align 8, !tbaa !5
  %127 = load i64, ptr %27, align 8, !tbaa !9
  %128 = load ptr, ptr %22, align 8, !tbaa !5
  %129 = load i64, ptr %27, align 8, !tbaa !9
  %130 = sub i64 0, %129
  %131 = getelementptr inbounds i8, ptr %128, i64 %130
  %132 = getelementptr inbounds %struct.rawSeq, ptr %23, i32 0, i32 0
  %133 = load i32, ptr %132, align 4, !tbaa !23
  %134 = add i32 %133, 2
  %135 = getelementptr inbounds %struct.rawSeq, ptr %23, i32 0, i32 2
  %136 = load i32, ptr %135, align 4, !tbaa !29
  %137 = sub i32 %136, 3
  %138 = zext i32 %137 to i64
  call void @ZSTD_storeSeq(ptr noundef %126, i64 noundef %127, ptr noundef %131, i32 noundef %134, i64 noundef %138)
  %139 = getelementptr inbounds %struct.rawSeq, ptr %23, i32 0, i32 2
  %140 = load i32, ptr %139, align 4, !tbaa !29
  %141 = load ptr, ptr %22, align 8, !tbaa !5
  %142 = zext i32 %140 to i64
  %143 = getelementptr inbounds i8, ptr %141, i64 %142
  store ptr %143, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  store i32 0, ptr %26, align 4
  br label %144

144:                                              ; preds = %121, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #5
  %145 = load i32, ptr %26, align 4
  switch i32 %145, label %175 [
    i32 0, label %146
    i32 3, label %147
  ]

146:                                              ; preds = %144
  br label %46, !llvm.loop !30

147:                                              ; preds = %144, %58
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = load ptr, ptr %22, align 8, !tbaa !5
  call void @ZSTD_ldm_limitTableUpdate(ptr noundef %148, ptr noundef %149)
  %150 = load ptr, ptr %10, align 8, !tbaa !5
  %151 = load ptr, ptr %13, align 8, !tbaa !5
  %152 = load ptr, ptr %22, align 8, !tbaa !5
  %153 = call i64 @ZSTD_ldm_fillFastTables(ptr noundef %150, ptr noundef %151, ptr noundef %152)
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %154 = load ptr, ptr %18, align 8, !tbaa !5
  %155 = load ptr, ptr %10, align 8, !tbaa !5
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  %157 = load ptr, ptr %12, align 8, !tbaa !5
  %158 = load ptr, ptr %13, align 8, !tbaa !5
  %159 = load ptr, ptr %22, align 8, !tbaa !5
  %160 = load ptr, ptr %21, align 8, !tbaa !5
  %161 = load ptr, ptr %22, align 8, !tbaa !5
  %162 = ptrtoint ptr %160 to i64
  %163 = ptrtoint ptr %161 to i64
  %164 = sub i64 %162, %163
  %165 = call i64 %154(ptr noundef %155, ptr noundef %156, ptr noundef %157, ptr noundef %158, ptr noundef %159, i64 noundef %164)
  store i64 %165, ptr %28, align 8, !tbaa !9
  %166 = load ptr, ptr %21, align 8, !tbaa !5
  %167 = load ptr, ptr %19, align 8, !tbaa !5
  %168 = ptrtoint ptr %166 to i64
  %169 = ptrtoint ptr %167 to i64
  %170 = sub i64 %168, %169
  %171 = trunc i64 %170 to i32
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.ZSTD_matchState_t, ptr %172, i32 0, i32 2
  store i32 %171, ptr %173, align 4, !tbaa !26
  %174 = load i64, ptr %28, align 8, !tbaa !9
  store i32 1, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  ret i64 %174

175:                                              ; preds = %144
  unreachable
}

declare ptr @ZSTD_selectBlockCompressor(i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden { i64, i32 } @maybeSplitSequence(ptr noundef, i32 noundef, i32 noundef) #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) #3

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 16}
!14 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24}
!15 = !{!14, !12, i64 24}
!16 = !{!17, !6, i64 8}
!17 = !{!"", !18, i64 0, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !19, i64 72}
!18 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !12, i64 28}
!19 = !{!"", !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}
!20 = !{!21, !10, i64 8}
!21 = !{!"", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!22 = !{!21, !10, i64 16}
!23 = !{!24, !12, i64 0}
!24 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8}
!25 = !{!24, !12, i64 4}
!26 = !{!17, !12, i64 36}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!24, !12, i64 8}
!30 = distinct !{!30, !28}


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

; Function Attrs: nounwind uwtable
define dso_local i64 @ZSTD_ldm_blockCompress(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i64 noundef %6, i32 noundef %7) local_unnamed_addr #0 {
  %9 = getelementptr inbounds i8, ptr %4, i64 16
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %4, i64 24
  %12 = load i32, ptr %11, align 4, !tbaa !10
  %13 = tail call ptr @ZSTD_selectBlockCompressor(i32 noundef %12, i32 noundef %7) #3
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %5, i64 %6
  %17 = ptrtoint ptr %16 to i64
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  %20 = load i64, ptr %18, align 8, !tbaa !16
  %21 = load i64, ptr %19, align 8, !tbaa !19
  %22 = icmp ult i64 %20, %21
  %23 = icmp sgt i64 %6, 0
  %24 = and i1 %22, %23
  %25 = ptrtoint ptr %15 to i64
  br i1 %24, label %.lr.ph, label %.thread

.lr.ph:                                           ; preds = %8
  %26 = getelementptr inbounds i8, ptr %1, i64 36
  %scevgep = getelementptr i8, ptr %3, i64 4
  br label %27

27:                                               ; preds = %.lr.ph, %33
  %.076 = phi ptr [ %5, %.lr.ph ], [ %47, %33 ]
  %28 = ptrtoint ptr %.076 to i64
  %29 = sub i64 %17, %28
  %30 = trunc i64 %29 to i32
  %31 = tail call { i64, i32 } @maybeSplitSequence(ptr noundef nonnull %0, i32 noundef %30, i32 noundef %10)
  %.fca.0.extract = extractvalue { i64, i32 } %31, 0
  %.sroa.08.0.extract.trunc = trunc i64 %.fca.0.extract to i32
  %32 = icmp eq i32 %.sroa.08.0.extract.trunc, 0
  br i1 %32, label %.thread, label %33

33:                                               ; preds = %27
  %.fca.1.extract = extractvalue { i64, i32 } %31, 1
  tail call void @ZSTD_ldm_limitTableUpdate(ptr noundef %1, ptr noundef %.076)
  %34 = tail call i64 @ZSTD_ldm_fillFastTables(ptr noundef %1, ptr noundef %4, ptr noundef %.076)
  %.sroa.08.4.extract.shift = lshr i64 %.fca.0.extract, 32
  %35 = tail call i64 %13(ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %.076, i64 noundef %.sroa.08.4.extract.shift) #3
  %36 = getelementptr inbounds i8, ptr %.076, i64 %.sroa.08.4.extract.shift
  %37 = ptrtoint ptr %36 to i64
  %38 = sub i64 %37, %25
  %39 = trunc i64 %38 to i32
  store i32 %39, ptr %26, align 4, !tbaa !20
  %40 = load i64, ptr %3, align 4, !tbaa !21
  store i64 %40, ptr %scevgep, align 4, !tbaa !21
  store i32 %.sroa.08.0.extract.trunc, ptr %3, align 4, !tbaa !21
  %41 = sub i64 0, %35
  %42 = getelementptr inbounds i8, ptr %36, i64 %41
  %43 = add i32 %.sroa.08.0.extract.trunc, 2
  %44 = add i32 %.fca.1.extract, -3
  %45 = zext i32 %44 to i64
  tail call void @ZSTD_storeSeq(ptr noundef %2, i64 noundef %35, ptr noundef %42, i32 noundef %43, i64 noundef %45)
  %46 = zext i32 %.fca.1.extract to i64
  %47 = getelementptr inbounds i8, ptr %36, i64 %46
  %48 = load i64, ptr %18, align 8, !tbaa !16
  %49 = load i64, ptr %19, align 8, !tbaa !19
  %50 = icmp ult i64 %48, %49
  %51 = icmp ult ptr %47, %16
  %52 = select i1 %50, i1 %51, i1 false
  br i1 %52, label %27, label %.thread

.thread:                                          ; preds = %33, %27, %8
  %.0.lcssa = phi ptr [ %5, %8 ], [ %.076, %27 ], [ %47, %33 ]
  tail call void @ZSTD_ldm_limitTableUpdate(ptr noundef %1, ptr noundef %.0.lcssa)
  %53 = tail call i64 @ZSTD_ldm_fillFastTables(ptr noundef %1, ptr noundef %4, ptr noundef %.0.lcssa)
  %54 = ptrtoint ptr %.0.lcssa to i64
  %55 = sub i64 %17, %54
  %56 = tail call i64 %13(ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %.0.lcssa, i64 noundef %55) #3
  %57 = sub i64 %17, %25
  %58 = trunc i64 %57 to i32
  %59 = getelementptr inbounds i8, ptr %1, i64 36
  store i32 %58, ptr %59, align 4, !tbaa !20
  ret i64 %56
}

declare ptr @ZSTD_selectBlockCompressor(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden { i64, i32 } @maybeSplitSequence(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 }

!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 16}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 24}
!11 = !{!12, !14, i64 8}
!12 = !{!"", !13, i64 0, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !14, i64 48, !14, i64 56, !14, i64 64, !15, i64 72}
!13 = !{!"", !14, i64 0, !14, i64 8, !14, i64 16, !7, i64 24, !7, i64 28}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, 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}
!16 = !{!17, !18, i64 8}
!17 = !{!"", !14, i64 0, !18, i64 8, !18, i64 16, !18, i64 24}
!18 = !{!"long", !8, i64 0}
!19 = !{!17, !18, i64 16}
!20 = !{!12, !7, i64 36}
!21 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass