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

; 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_generateSequences(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4) #1 {
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i64 %4, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.ldmParams_t, ptr %28, i32 0, i32 5
  %30 = load i32, ptr %29, align 4, !tbaa !11
  %31 = shl i32 1, %30
  store i32 %31, ptr %12, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %32, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %33 = load ptr, ptr %13, align 8, !tbaa !5
  %34 = load i64, ptr %11, align 8, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %33, i64 %34
  store ptr %35, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store i64 1048576, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %36 = load i64, ptr %11, align 8, !tbaa !9
  %37 = udiv i64 %36, 1048576
  %38 = load i64, ptr %11, align 8, !tbaa !9
  %39 = urem i64 %38, 1048576
  %40 = icmp ne i64 %39, 0
  %41 = zext i1 %40 to i32
  %42 = sext i32 %41 to i64
  %43 = add i64 %37, %42
  store i64 %43, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store i64 0, ptr %18, align 8, !tbaa !9
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %44

44:                                               ; preds = %147, %5
  %45 = load i64, ptr %17, align 8, !tbaa !9
  %46 = load i64, ptr %16, align 8, !tbaa !9
  %47 = icmp ult i64 %45, %46
  br i1 %47, label %48, label %56

48:                                               ; preds = %44
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.rawSeqStore_t, ptr %49, i32 0, i32 2
  %51 = load i64, ptr %50, align 8, !tbaa !15
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.rawSeqStore_t, ptr %52, i32 0, i32 3
  %54 = load i64, ptr %53, align 8, !tbaa !17
  %55 = icmp ult i64 %51, %54
  br label %56

56:                                               ; preds = %48, %44
  %57 = phi i1 [ false, %44 ], [ %55, %48 ]
  br i1 %57, label %58, label %150

58:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  %60 = load i64, ptr %17, align 8, !tbaa !9
  %61 = mul i64 %60, 1048576
  %62 = getelementptr inbounds i8, ptr %59, i64 %61
  store ptr %62, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %63 = load ptr, ptr %14, align 8, !tbaa !5
  %64 = load ptr, ptr %19, align 8, !tbaa !5
  %65 = ptrtoint ptr %63 to i64
  %66 = ptrtoint ptr %64 to i64
  %67 = sub i64 %65, %66
  store i64 %67, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %68 = load i64, ptr %20, align 8, !tbaa !9
  %69 = icmp ult i64 %68, 1048576
  br i1 %69, label %70, label %72

70:                                               ; preds = %58
  %71 = load ptr, ptr %14, align 8, !tbaa !5
  br label %75

72:                                               ; preds = %58
  %73 = load ptr, ptr %19, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %73, i64 1048576
  br label %75

75:                                               ; preds = %72, %70
  %76 = phi ptr [ %71, %70 ], [ %74, %72 ]
  store ptr %76, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %77 = load ptr, ptr %21, align 8, !tbaa !5
  %78 = load ptr, ptr %19, align 8, !tbaa !5
  %79 = ptrtoint ptr %77 to i64
  %80 = ptrtoint ptr %78 to i64
  %81 = sub i64 %79, %80
  store i64 %81, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.rawSeqStore_t, ptr %82, i32 0, i32 2
  %84 = load i64, ptr %83, align 8, !tbaa !15
  store i64 %84, ptr %24, align 8, !tbaa !9
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ldmState_t, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %21, align 8, !tbaa !5
  %88 = call i32 @ZSTD_window_needOverflowCorrection(ptr noundef byval(%struct.ZSTD_window_t) align 8 %86, ptr noundef %87)
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %105

90:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.ldmParams_t, ptr %91, i32 0, i32 1
  %93 = load i32, ptr %92, align 4, !tbaa !18
  %94 = shl i32 1, %93
  store i32 %94, ptr %25, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ldmState_t, ptr %95, i32 0, i32 0
  %97 = load i32, ptr %12, align 4, !tbaa !14
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = call i32 @ZSTD_window_correctOverflow(ptr noundef %96, i32 noundef 0, i32 noundef %97, ptr noundef %98)
  store i32 %99, ptr %26, align 4, !tbaa !14
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ldmState_t, ptr %100, i32 0, i32 1
  %102 = load ptr, ptr %101, align 8, !tbaa !19
  %103 = load i32, ptr %25, align 4, !tbaa !14
  %104 = load i32, ptr %26, align 4, !tbaa !14
  call void @ZSTD_ldm_reduceTable(ptr noundef %102, i32 noundef %103, i32 noundef %104)
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  br label %105

105:                                              ; preds = %90, %75
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.ldmState_t, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %21, align 8, !tbaa !5
  %109 = load i32, ptr %12, align 4, !tbaa !14
  call void @ZSTD_window_enforceMaxDist(ptr noundef %107, ptr noundef %108, i32 noundef %109, ptr noundef null)
  %110 = load ptr, ptr %7, align 8, !tbaa !5
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = load ptr, ptr %19, align 8, !tbaa !5
  %114 = load i64, ptr %22, align 8, !tbaa !9
  %115 = call i64 @ZSTD_ldm_generateSequences_internal(ptr noundef %110, ptr noundef %111, ptr noundef %112, ptr noundef %113, i64 noundef %114)
  store i64 %115, ptr %23, align 8, !tbaa !9
  %116 = load i64, ptr %23, align 8, !tbaa !9
  %117 = call i32 @ZSTD_isError(i64 noundef %116)
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %119, label %121

119:                                              ; preds = %105
  %120 = load i64, ptr %23, align 8, !tbaa !9
  store i64 %120, ptr %6, align 8
  store i32 1, ptr %27, align 4
  br label %144

121:                                              ; preds = %105
  %122 = load i64, ptr %24, align 8, !tbaa !9
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.rawSeqStore_t, ptr %123, i32 0, i32 2
  %125 = load i64, ptr %124, align 8, !tbaa !15
  %126 = icmp ult i64 %122, %125
  br i1 %126, label %127, label %139

127:                                              ; preds = %121
  %128 = load i64, ptr %18, align 8, !tbaa !9
  %129 = trunc i64 %128 to i32
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.rawSeqStore_t, ptr %130, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8, !tbaa !22
  %133 = load i64, ptr %24, align 8, !tbaa !9
  %134 = getelementptr inbounds %struct.rawSeq, ptr %132, i64 %133
  %135 = getelementptr inbounds %struct.rawSeq, ptr %134, i32 0, i32 1
  %136 = load i32, ptr %135, align 4, !tbaa !23
  %137 = add i32 %136, %129
  store i32 %137, ptr %135, align 4, !tbaa !23
  %138 = load i64, ptr %23, align 8, !tbaa !9
  store i64 %138, ptr %18, align 8, !tbaa !9
  br label %143

139:                                              ; preds = %121
  %140 = load i64, ptr %22, align 8, !tbaa !9
  %141 = load i64, ptr %18, align 8, !tbaa !9
  %142 = add i64 %141, %140
  store i64 %142, ptr %18, align 8, !tbaa !9
  br label %143

143:                                              ; preds = %139, %127
  store i32 0, ptr %27, align 4
  br label %144

144:                                              ; preds = %143, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  %145 = load i32, ptr %27, align 4
  switch i32 %145, label %151 [
    i32 0, label %146
  ]

146:                                              ; preds = %144
  br label %147

147:                                              ; preds = %146
  %148 = load i64, ptr %17, align 8, !tbaa !9
  %149 = add i64 %148, 1
  store i64 %149, ptr %17, align 8, !tbaa !9
  br label %44, !llvm.loop !25

150:                                              ; preds = %56
  store i64 0, ptr %6, align 8
  store i32 1, ptr %27, align 4
  br label %151

151:                                              ; preds = %150, %144
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %152 = load i64, ptr %6, align 8
  ret i64 %152
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @ZSTD_window_needOverflowCorrection(ptr noundef byval(%struct.ZSTD_window_t) align 8, ptr noundef) #2

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

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

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

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

declare i32 @ZSTD_isError(i64 noundef) #3

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 = { 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 = { "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 = { 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, !13, i64 20}
!12 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!16, !10, i64 16}
!16 = !{!"", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!17 = !{!16, !10, i64 24}
!18 = !{!12, !13, i64 4}
!19 = !{!20, !6, i64 32}
!20 = !{!"", !21, i64 0, !6, i64 32, !6, i64 40, !10, i64 48}
!21 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !13, i64 28}
!22 = !{!16, !6, i64 0}
!23 = !{!24, !13, i64 4}
!24 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


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

%struct.ZSTD_window_t = type { ptr, ptr, ptr, i32, i32 }
%struct.rawSeq = type { i32, i32, i32 }

; Function Attrs: nounwind uwtable
define dso_local noundef i64 @ZSTD_ldm_generateSequences(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4) local_unnamed_addr #0 {
  %6 = getelementptr inbounds i8, ptr %2, i64 20
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = shl nuw i32 1, %7
  %9 = getelementptr inbounds i8, ptr %3, i64 %4
  %10 = lshr i64 %4, 20
  %11 = and i64 %4, 1048575
  %12 = icmp ne i64 %11, 0
  %13 = zext i1 %12 to i64
  %14 = add nuw nsw i64 %10, %13
  %15 = getelementptr inbounds i8, ptr %1, i64 16
  %.not66 = icmp eq i64 %14, 0
  br i1 %.not66, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %5
  %16 = getelementptr inbounds i8, ptr %1, i64 24
  %17 = getelementptr inbounds i8, ptr %2, i64 4
  %18 = getelementptr inbounds i8, ptr %0, i64 32
  %.pre = load i64, ptr %15, align 8, !tbaa !10
  br label %19

19:                                               ; preds = %.lr.ph, %52
  %20 = phi i64 [ %.pre, %.lr.ph ], [ %42, %52 ]
  %.05061 = phi i64 [ 0, %.lr.ph ], [ %53, %52 ]
  %.05160 = phi i64 [ 0, %.lr.ph ], [ %.253.ph, %52 ]
  %21 = load i64, ptr %16, align 8, !tbaa !14
  %22 = icmp ult i64 %20, %21
  br i1 %22, label %23, label %.critedge

23:                                               ; preds = %19
  %24 = shl nuw i64 %.05061, 20
  %25 = getelementptr inbounds i8, ptr %3, i64 %24
  %26 = ptrtoint ptr %25 to i64
  %gepdiff = sub nsw i64 %4, %24
  %27 = icmp ult i64 %gepdiff, 1048576
  %28 = getelementptr inbounds i8, ptr %25, i64 1048576
  %29 = select i1 %27, ptr %9, ptr %28
  %30 = ptrtoint ptr %29 to i64
  %31 = sub i64 %30, %26
  %32 = tail call i32 @ZSTD_window_needOverflowCorrection(ptr noundef byval(%struct.ZSTD_window_t) align 8 %0, ptr noundef %29)
  %.not = icmp eq i32 %32, 0
  br i1 %.not, label %38, label %33

33:                                               ; preds = %23
  %34 = load i32, ptr %17, align 4, !tbaa !15
  %35 = shl nuw i32 1, %34
  %36 = tail call i32 @ZSTD_window_correctOverflow(ptr noundef %0, i32 noundef 0, i32 noundef %8, ptr noundef %3)
  %37 = load ptr, ptr %18, align 8, !tbaa !16
  tail call void @ZSTD_ldm_reduceTable(ptr noundef %37, i32 noundef %35, i32 noundef %36)
  br label %38

38:                                               ; preds = %33, %23
  tail call void @ZSTD_window_enforceMaxDist(ptr noundef %0, ptr noundef %29, i32 noundef %8, ptr noundef null)
  %39 = tail call i64 @ZSTD_ldm_generateSequences_internal(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %25, i64 noundef %31)
  %40 = tail call i32 @ZSTD_isError(i64 noundef %39) #3
  %.not55 = icmp eq i32 %40, 0
  br i1 %.not55, label %41, label %.critedge

41:                                               ; preds = %38
  %42 = load i64, ptr %15, align 8, !tbaa !10
  %43 = icmp ult i64 %20, %42
  br i1 %43, label %44, label %50

44:                                               ; preds = %41
  %45 = trunc i64 %.05160 to i32
  %46 = load ptr, ptr %1, align 8, !tbaa !19
  %47 = getelementptr inbounds %struct.rawSeq, ptr %46, i64 %20, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !20
  %49 = add i32 %48, %45
  store i32 %49, ptr %47, align 4, !tbaa !20
  br label %52

50:                                               ; preds = %41
  %51 = add i64 %31, %.05160
  br label %52

52:                                               ; preds = %44, %50
  %.253.ph = phi i64 [ %51, %50 ], [ %39, %44 ]
  %53 = add nuw nsw i64 %.05061, 1
  %exitcond.not = icmp eq i64 %53, %14
  br i1 %exitcond.not, label %.critedge, label %19, !llvm.loop !22

.critedge:                                        ; preds = %52, %19, %38, %5
  %.2 = phi i64 [ 0, %5 ], [ %39, %38 ], [ 0, %19 ], [ 0, %52 ]
  ret i64 %.2
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @ZSTD_window_needOverflowCorrection(ptr noundef byval(%struct.ZSTD_window_t) align 8, ptr noundef) local_unnamed_addr #1

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

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

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

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

declare i32 @ZSTD_isError(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 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 20}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !13, i64 16}
!11 = !{!"", !12, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!11, !13, i64 24}
!15 = !{!6, !7, i64 4}
!16 = !{!17, !12, i64 32}
!17 = !{!"", !18, i64 0, !12, i64 32, !12, i64 40, !13, i64 48}
!18 = !{!"", !12, i64 0, !12, i64 8, !12, i64 16, !7, i64 24, !7, i64 28}
!19 = !{!11, !12, i64 0}
!20 = !{!21, !7, i64 4}
!21 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


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