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

; 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.ZDICT_cover_params_t = type { i32, i32, i32, i32, %struct.ZDICT_params_t }
%struct.ZDICT_params_t = type { i32, i32, i32 }
%struct.COVER_ctx_t = type { ptr, ptr, ptr, i64, ptr, i64, ptr, ptr, i32 }
%struct.COVER_map_s = type { ptr, i32, i32, i32 }

@g_displayLevel = external hidden global i32, align 4
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @ZDICT_trainFromBuffer_cover(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef byval(%struct.ZDICT_cover_params_t) align 8 %5) #0 {
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %struct.COVER_ctx_t, align 8
  %15 = alloca %struct.COVER_map_s, align 8
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i64 %1, ptr %9, align 8, !tbaa !9
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i32 %4, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %19, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 72, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  %20 = getelementptr inbounds %struct.ZDICT_cover_params_t, ptr %5, i32 0, i32 4
  %21 = getelementptr inbounds %struct.ZDICT_params_t, ptr %20, i32 0, i32 1
  %22 = load i32, ptr %21, align 4, !tbaa !13
  store i32 %22, ptr @g_displayLevel, align 4, !tbaa !11
  %23 = load i64, ptr %9, align 8, !tbaa !9
  %24 = call i32 @COVER_checkParameters(ptr noundef byval(%struct.ZDICT_cover_params_t) align 8 %5, i64 noundef %23)
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %35, label %26

26:                                               ; preds = %6
  %27 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %28 = icmp sge i32 %27, 1
  br i1 %28, label %29, label %34

29:                                               ; preds = %26
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str) #4
  %32 = load ptr, ptr @stderr, align 8, !tbaa !5
  %33 = call i32 @fflush(ptr noundef %32)
  br label %34

34:                                               ; preds = %29, %26
  store i64 -1, ptr %7, align 8
  store i32 1, ptr %16, align 4
  br label %129

35:                                               ; preds = %6
  %36 = load i32, ptr %12, align 4, !tbaa !11
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %38, label %47

38:                                               ; preds = %35
  %39 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %40 = icmp sge i32 %39, 1
  br i1 %40, label %41, label %46

41:                                               ; preds = %38
  %42 = load ptr, ptr @stderr, align 8, !tbaa !5
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef @.str.1) #4
  %44 = load ptr, ptr @stderr, align 8, !tbaa !5
  %45 = call i32 @fflush(ptr noundef %44)
  br label %46

46:                                               ; preds = %41, %38
  store i64 -1, ptr %7, align 8
  store i32 1, ptr %16, align 4
  br label %129

47:                                               ; preds = %35
  %48 = load i64, ptr %9, align 8, !tbaa !9
  %49 = icmp ult i64 %48, 256
  br i1 %49, label %50, label %59

50:                                               ; preds = %47
  %51 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %52 = icmp sge i32 %51, 1
  br i1 %52, label %53, label %58

53:                                               ; preds = %50
  %54 = load ptr, ptr @stderr, align 8, !tbaa !5
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef @.str.2, i32 noundef 256) #4
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = call i32 @fflush(ptr noundef %56)
  br label %58

58:                                               ; preds = %53, %50
  store i64 -70, ptr %7, align 8
  store i32 1, ptr %16, align 4
  br label %129

59:                                               ; preds = %47
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = load i32, ptr %12, align 4, !tbaa !11
  %63 = getelementptr inbounds %struct.ZDICT_cover_params_t, ptr %5, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !16
  %65 = call i32 @COVER_ctx_init(ptr noundef %14, ptr noundef %60, ptr noundef %61, i32 noundef %62, i32 noundef %64)
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %68, label %67

67:                                               ; preds = %59
  store i64 -1, ptr %7, align 8
  store i32 1, ptr %16, align 4
  br label %129

68:                                               ; preds = %59
  %69 = getelementptr inbounds %struct.ZDICT_cover_params_t, ptr %5, i32 0, i32 0
  %70 = load i32, ptr %69, align 8, !tbaa !17
  %71 = getelementptr inbounds %struct.ZDICT_cover_params_t, ptr %5, i32 0, i32 1
  %72 = load i32, ptr %71, align 4, !tbaa !16
  %73 = sub i32 %70, %72
  %74 = add i32 %73, 1
  %75 = call i32 @COVER_map_init(ptr noundef %15, i32 noundef %74)
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %86, label %77

77:                                               ; preds = %68
  %78 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %79 = icmp sge i32 %78, 1
  br i1 %79, label %80, label %85

80:                                               ; preds = %77
  %81 = load ptr, ptr @stderr, align 8, !tbaa !5
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef @.str.3) #4
  %83 = load ptr, ptr @stderr, align 8, !tbaa !5
  %84 = call i32 @fflush(ptr noundef %83)
  br label %85

85:                                               ; preds = %80, %77
  call void @COVER_ctx_destroy(ptr noundef %14)
  store i64 -1, ptr %7, align 8
  store i32 1, ptr %16, align 4
  br label %129

86:                                               ; preds = %68
  %87 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %88 = icmp sge i32 %87, 2
  br i1 %88, label %89, label %94

89:                                               ; preds = %86
  %90 = load ptr, ptr @stderr, align 8, !tbaa !5
  %91 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %90, ptr noundef @.str.4) #4
  %92 = load ptr, ptr @stderr, align 8, !tbaa !5
  %93 = call i32 @fflush(ptr noundef %92)
  br label %94

94:                                               ; preds = %89, %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %95 = getelementptr inbounds %struct.COVER_ctx_t, ptr %14, i32 0, i32 6
  %96 = load ptr, ptr %95, align 8, !tbaa !18
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = load i64, ptr %9, align 8, !tbaa !9
  %99 = call i64 @COVER_buildDictionary(ptr noundef %14, ptr noundef %96, ptr noundef %15, ptr noundef %97, i64 noundef %98, ptr noundef byval(%struct.ZDICT_cover_params_t) align 8 %5)
  store i64 %99, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %100 = load ptr, ptr %13, align 8, !tbaa !5
  %101 = load i64, ptr %9, align 8, !tbaa !9
  %102 = load ptr, ptr %13, align 8, !tbaa !5
  %103 = load i64, ptr %17, align 8, !tbaa !9
  %104 = getelementptr inbounds i8, ptr %102, i64 %103
  %105 = load i64, ptr %9, align 8, !tbaa !9
  %106 = load i64, ptr %17, align 8, !tbaa !9
  %107 = sub i64 %105, %106
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = load ptr, ptr %11, align 8, !tbaa !5
  %110 = load i32, ptr %12, align 4, !tbaa !11
  %111 = getelementptr inbounds %struct.ZDICT_cover_params_t, ptr %5, i32 0, i32 4
  %112 = call i64 @ZDICT_finalizeDictionary(ptr noundef %100, i64 noundef %101, ptr noundef %104, i64 noundef %107, ptr noundef %108, ptr noundef %109, i32 noundef %110, ptr noundef byval(%struct.ZDICT_params_t) align 8 %111)
  store i64 %112, ptr %18, align 8, !tbaa !9
  %113 = load i64, ptr %18, align 8, !tbaa !9
  %114 = call i32 @ZSTD_isError(i64 noundef %113)
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %127, label %116

116:                                              ; preds = %94
  %117 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %118 = icmp sge i32 %117, 2
  br i1 %118, label %119, label %126

119:                                              ; preds = %116
  %120 = load ptr, ptr @stderr, align 8, !tbaa !5
  %121 = load i64, ptr %18, align 8, !tbaa !9
  %122 = trunc i64 %121 to i32
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef @.str.5, i32 noundef %122) #4
  %124 = load ptr, ptr @stderr, align 8, !tbaa !5
  %125 = call i32 @fflush(ptr noundef %124)
  br label %126

126:                                              ; preds = %119, %116
  br label %127

127:                                              ; preds = %126, %94
  call void @COVER_ctx_destroy(ptr noundef %14)
  call void @COVER_map_destroy(ptr noundef %15)
  %128 = load i64, ptr %18, align 8, !tbaa !9
  store i64 %128, ptr %7, align 8
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %129

129:                                              ; preds = %127, %85, %67, %58, %46, %34
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %130 = load i64, ptr %7, align 8
  ret i64 %130
}

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

; Function Attrs: nounwind uwtable
declare hidden i32 @COVER_checkParameters(ptr noundef byval(%struct.ZDICT_cover_params_t) align 8, i64 noundef) #0

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

declare i32 @fflush(ptr noundef) #3

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i64 @COVER_buildDictionary(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef byval(%struct.ZDICT_cover_params_t) align 8) #0

declare i64 @ZDICT_finalizeDictionary(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef byval(%struct.ZDICT_params_t) align 8) #3

declare i32 @ZSTD_isError(i64 noundef) #3

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

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

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 = { nounwind "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, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 20}
!14 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !15, i64 16}
!15 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8}
!16 = !{!14, !12, i64 4}
!17 = !{!14, !12, i64 0}
!18 = !{!19, !6, i64 48}
!19 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !10, i64 40, !6, i64 48, !6, i64 56, !12, i64 64}


; 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.ZDICT_cover_params_t = type { i32, i32, i32, i32, %struct.ZDICT_params_t }
%struct.ZDICT_params_t = type { i32, i32, i32 }
%struct.COVER_ctx_t = type { ptr, ptr, ptr, i64, ptr, i64, ptr, ptr, i32 }
%struct.COVER_map_s = type { ptr, i32, i32, i32 }

@g_displayLevel = external hidden local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i64 @ZDICT_trainFromBuffer_cover(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef byval(%struct.ZDICT_cover_params_t) align 8 %5) local_unnamed_addr #0 {
  %7 = alloca %struct.COVER_ctx_t, align 8
  %8 = alloca %struct.COVER_map_s, align 8
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  %9 = getelementptr inbounds i8, ptr %5, i64 16
  %10 = getelementptr inbounds i8, ptr %5, i64 20
  %11 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %11, ptr @g_displayLevel, align 4, !tbaa !11
  %12 = tail call i32 @COVER_checkParameters(ptr noundef nonnull byval(%struct.ZDICT_cover_params_t) align 8 %5, i64 noundef %1)
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %13, label %21

13:                                               ; preds = %6
  %14 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %16, label %85

16:                                               ; preds = %13
  %17 = load ptr, ptr @stderr, align 8, !tbaa !12
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str) #5
  %19 = load ptr, ptr @stderr, align 8, !tbaa !12
  %20 = tail call i32 @fflush(ptr noundef %19)
  br label %85

21:                                               ; preds = %6
  %22 = icmp eq i32 %4, 0
  br i1 %22, label %23, label %31

23:                                               ; preds = %21
  %24 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %26, label %85

26:                                               ; preds = %23
  %27 = load ptr, ptr @stderr, align 8, !tbaa !12
  %28 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.1) #5
  %29 = load ptr, ptr @stderr, align 8, !tbaa !12
  %30 = tail call i32 @fflush(ptr noundef %29)
  br label %85

31:                                               ; preds = %21
  %32 = icmp ult i64 %1, 256
  br i1 %32, label %33, label %41

33:                                               ; preds = %31
  %34 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %35 = icmp sgt i32 %34, 0
  br i1 %35, label %36, label %85

36:                                               ; preds = %33
  %37 = load ptr, ptr @stderr, align 8, !tbaa !12
  %38 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.2, i32 noundef 256) #5
  %39 = load ptr, ptr @stderr, align 8, !tbaa !12
  %40 = tail call i32 @fflush(ptr noundef %39)
  br label %85

41:                                               ; preds = %31
  %42 = getelementptr inbounds i8, ptr %5, i64 4
  %43 = load i32, ptr %42, align 4, !tbaa !14
  %44 = call i32 @COVER_ctx_init(ptr noundef nonnull %7, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %43)
  %.not24 = icmp eq i32 %44, 0
  br i1 %.not24, label %85, label %45

45:                                               ; preds = %41
  %46 = load i32, ptr %5, align 8, !tbaa !15
  %47 = load i32, ptr %42, align 4, !tbaa !14
  %48 = add i32 %46, 1
  %49 = sub i32 %48, %47
  %50 = call i32 @COVER_map_init(ptr noundef nonnull %8, i32 noundef %49)
  %.not25 = icmp eq i32 %50, 0
  %51 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  br i1 %.not25, label %52, label %60

52:                                               ; preds = %45
  %53 = icmp sgt i32 %51, 0
  br i1 %53, label %54, label %59

54:                                               ; preds = %52
  %55 = load ptr, ptr @stderr, align 8, !tbaa !12
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.3) #5
  %57 = load ptr, ptr @stderr, align 8, !tbaa !12
  %58 = call i32 @fflush(ptr noundef %57)
  br label %59

59:                                               ; preds = %54, %52
  call void @COVER_ctx_destroy(ptr noundef nonnull %7)
  br label %85

60:                                               ; preds = %45
  %61 = icmp sgt i32 %51, 1
  br i1 %61, label %62, label %67

62:                                               ; preds = %60
  %63 = load ptr, ptr @stderr, align 8, !tbaa !12
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef nonnull @.str.4) #5
  %65 = load ptr, ptr @stderr, align 8, !tbaa !12
  %66 = call i32 @fflush(ptr noundef %65)
  br label %67

67:                                               ; preds = %62, %60
  %68 = getelementptr inbounds i8, ptr %7, i64 48
  %69 = load ptr, ptr %68, align 8, !tbaa !16
  %70 = call i64 @COVER_buildDictionary(ptr noundef nonnull %7, ptr noundef %69, ptr noundef nonnull %8, ptr noundef %0, i64 noundef %1, ptr noundef nonnull byval(%struct.ZDICT_cover_params_t) align 8 %5)
  %71 = getelementptr inbounds i8, ptr %0, i64 %70
  %72 = sub i64 %1, %70
  %73 = call i64 @ZDICT_finalizeDictionary(ptr noundef %0, i64 noundef %1, ptr noundef %71, i64 noundef %72, ptr noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef nonnull byval(%struct.ZDICT_params_t) align 8 %9) #4
  %74 = call i32 @ZSTD_isError(i64 noundef %73) #4
  %75 = icmp eq i32 %74, 0
  %76 = load i32, ptr @g_displayLevel, align 4
  %77 = icmp sgt i32 %76, 1
  %or.cond = select i1 %75, i1 %77, i1 false
  br i1 %or.cond, label %78, label %84

78:                                               ; preds = %67
  %79 = load ptr, ptr @stderr, align 8, !tbaa !12
  %80 = trunc i64 %73 to i32
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef nonnull @.str.5, i32 noundef %80) #5
  %82 = load ptr, ptr @stderr, align 8, !tbaa !12
  %83 = call i32 @fflush(ptr noundef %82)
  br label %84

84:                                               ; preds = %78, %67
  call void @COVER_ctx_destroy(ptr noundef nonnull %7)
  call void @COVER_map_destroy(ptr noundef nonnull %8)
  br label %85

85:                                               ; preds = %41, %33, %36, %23, %26, %13, %16, %84, %59
  %.0 = phi i64 [ %73, %84 ], [ -1, %59 ], [ -1, %16 ], [ -1, %13 ], [ -1, %26 ], [ -1, %23 ], [ -70, %36 ], [ -70, %33 ], [ -1, %41 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7) #4
  ret i64 %.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: nounwind uwtable
declare hidden i32 @COVER_checkParameters(ptr noundef byval(%struct.ZDICT_cover_params_t) align 8, i64 noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i64 @COVER_buildDictionary(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef byval(%struct.ZDICT_cover_params_t) align 8) local_unnamed_addr #0

declare i64 @ZDICT_finalizeDictionary(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef byval(%struct.ZDICT_params_t) align 8) local_unnamed_addr #3

declare i32 @ZSTD_isError(i64 noundef) local_unnamed_addr #3

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

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

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 = { nofree nounwind "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 }
attributes #5 = { cold 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, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!6, !7, i64 4}
!15 = !{!6, !7, i64 0}
!16 = !{!17, !13, i64 48}
!17 = !{!"", !13, i64 0, !13, i64 8, !13, i64 16, !18, i64 24, !13, i64 32, !18, i64 40, !13, i64 48, !13, i64 56, !7, i64 64}
!18 = !{!"long", !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass