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

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

; 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
declare dso_local i32 @ZSTD_isError(i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @COVER_warnOnSmallCorpus(i64 noundef, i64 noundef, i32 noundef) #1

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

declare i32 @fflush(ptr noundef) #3

; 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) #1 {
  %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
  %19 = 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
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %20, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 88, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  %21 = getelementptr inbounds %struct.ZDICT_cover_params_t, ptr %5, i32 0, i32 4
  store double 1.000000e+00, ptr %21, align 8, !tbaa !13
  %22 = getelementptr inbounds %struct.ZDICT_cover_params_t, ptr %5, i32 0, i32 7
  %23 = getelementptr inbounds %struct.ZDICT_params_t, ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !17
  store i32 %24, ptr @g_displayLevel, align 4, !tbaa !11
  %25 = load i64, ptr %9, align 8, !tbaa !9
  %26 = call i32 @COVER_checkParameters(ptr noundef byval(%struct.ZDICT_cover_params_t) align 8 %5, i64 noundef %25)
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %37, label %28

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

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

36:                                               ; preds = %31, %28
  store i64 -42, ptr %7, align 8
  store i32 1, ptr %16, align 4
  br label %143

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

40:                                               ; preds = %37
  %41 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %42 = icmp sge i32 %41, 1
  br i1 %42, label %43, label %48

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

48:                                               ; preds = %43, %40
  store i64 -72, ptr %7, align 8
  store i32 1, ptr %16, align 4
  br label %143

49:                                               ; preds = %37
  %50 = load i64, ptr %9, align 8, !tbaa !9
  %51 = icmp ult i64 %50, 256
  br i1 %51, label %52, label %61

52:                                               ; preds = %49
  %53 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %54 = icmp sge i32 %53, 1
  br i1 %54, label %55, label %60

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

60:                                               ; preds = %55, %52
  store i64 -70, ptr %7, align 8
  store i32 1, ptr %16, align 4
  br label %143

61:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  %64 = load i32, ptr %12, align 4, !tbaa !11
  %65 = getelementptr inbounds %struct.ZDICT_cover_params_t, ptr %5, i32 0, i32 1
  %66 = load i32, ptr %65, align 4, !tbaa !18
  %67 = getelementptr inbounds %struct.ZDICT_cover_params_t, ptr %5, i32 0, i32 4
  %68 = load double, ptr %67, align 8, !tbaa !13
  %69 = call i64 @COVER_ctx_init(ptr noundef %14, ptr noundef %62, ptr noundef %63, i32 noundef %64, i32 noundef %66, double noundef %68)
  store i64 %69, ptr %17, align 8, !tbaa !9
  %70 = load i64, ptr %17, align 8, !tbaa !9
  %71 = call i32 @ZSTD_isError(i64 noundef %70)
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %75

73:                                               ; preds = %61
  %74 = load i64, ptr %17, align 8, !tbaa !9
  store i64 %74, ptr %7, align 8
  store i32 1, ptr %16, align 4
  br label %76

75:                                               ; preds = %61
  store i32 0, ptr %16, align 4
  br label %76

76:                                               ; preds = %75, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  %77 = load i32, ptr %16, align 4
  switch i32 %77, label %143 [
    i32 0, label %78
  ]

78:                                               ; preds = %76
  %79 = load i64, ptr %9, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.COVER_ctx_t, ptr %14, i32 0, i32 7
  %81 = load i64, ptr %80, align 8, !tbaa !19
  %82 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  call void @COVER_warnOnSmallCorpus(i64 noundef %79, i64 noundef %81, i32 noundef %82)
  %83 = getelementptr inbounds %struct.ZDICT_cover_params_t, ptr %5, i32 0, i32 0
  %84 = load i32, ptr %83, align 8, !tbaa !21
  %85 = getelementptr inbounds %struct.ZDICT_cover_params_t, ptr %5, i32 0, i32 1
  %86 = load i32, ptr %85, align 4, !tbaa !18
  %87 = sub i32 %84, %86
  %88 = add i32 %87, 1
  %89 = call i32 @COVER_map_init(ptr noundef %15, i32 noundef %88)
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %100, label %91

91:                                               ; preds = %78
  %92 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %93 = icmp sge i32 %92, 1
  br i1 %93, label %94, label %99

94:                                               ; preds = %91
  %95 = load ptr, ptr @stderr, align 8, !tbaa !5
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef @.str.40) #4
  %97 = load ptr, ptr @stderr, align 8, !tbaa !5
  %98 = call i32 @fflush(ptr noundef %97)
  br label %99

99:                                               ; preds = %94, %91
  call void @COVER_ctx_destroy(ptr noundef %14)
  store i64 -64, ptr %7, align 8
  store i32 1, ptr %16, align 4
  br label %143

100:                                              ; preds = %78
  %101 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %102 = icmp sge i32 %101, 2
  br i1 %102, label %103, label %108

103:                                              ; preds = %100
  %104 = load ptr, ptr @stderr, align 8, !tbaa !5
  %105 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %104, ptr noundef @.str.41) #4
  %106 = load ptr, ptr @stderr, align 8, !tbaa !5
  %107 = call i32 @fflush(ptr noundef %106)
  br label %108

108:                                              ; preds = %103, %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %109 = getelementptr inbounds %struct.COVER_ctx_t, ptr %14, i32 0, i32 8
  %110 = load ptr, ptr %109, align 8, !tbaa !22
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = load i64, ptr %9, align 8, !tbaa !9
  %113 = call i64 @COVER_buildDictionary(ptr noundef %14, ptr noundef %110, ptr noundef %15, ptr noundef %111, i64 noundef %112, ptr noundef byval(%struct.ZDICT_cover_params_t) align 8 %5)
  store i64 %113, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = load i64, ptr %9, align 8, !tbaa !9
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  %117 = load i64, ptr %18, align 8, !tbaa !9
  %118 = getelementptr inbounds i8, ptr %116, i64 %117
  %119 = load i64, ptr %9, align 8, !tbaa !9
  %120 = load i64, ptr %18, align 8, !tbaa !9
  %121 = sub i64 %119, %120
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = load i32, ptr %12, align 4, !tbaa !11
  %125 = getelementptr inbounds %struct.ZDICT_cover_params_t, ptr %5, i32 0, i32 7
  %126 = call i64 @ZDICT_finalizeDictionary(ptr noundef %114, i64 noundef %115, ptr noundef %118, i64 noundef %121, ptr noundef %122, ptr noundef %123, i32 noundef %124, ptr noundef byval(%struct.ZDICT_params_t) align 8 %125)
  store i64 %126, ptr %19, align 8, !tbaa !9
  %127 = load i64, ptr %19, align 8, !tbaa !9
  %128 = call i32 @ZSTD_isError(i64 noundef %127)
  %129 = icmp ne i32 %128, 0
  br i1 %129, label %141, label %130

130:                                              ; preds = %108
  %131 = load i32, ptr @g_displayLevel, align 4, !tbaa !11
  %132 = icmp sge i32 %131, 2
  br i1 %132, label %133, label %140

133:                                              ; preds = %130
  %134 = load ptr, ptr @stderr, align 8, !tbaa !5
  %135 = load i64, ptr %19, align 8, !tbaa !9
  %136 = trunc i64 %135 to i32
  %137 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef @.str.42, i32 noundef %136) #4
  %138 = load ptr, ptr @stderr, align 8, !tbaa !5
  %139 = call i32 @fflush(ptr noundef %138)
  br label %140

140:                                              ; preds = %133, %130
  br label %141

141:                                              ; preds = %140, %108
  call void @COVER_ctx_destroy(ptr noundef %14)
  call void @COVER_map_destroy(ptr noundef %15)
  %142 = load i64, ptr %19, align 8, !tbaa !9
  store i64 %142, ptr %7, align 8
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %143

143:                                              ; preds = %141, %99, %76, %60, %48, %36
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 88, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %144 = load i64, ptr %7, align 8
  ret i64 %144
}

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local 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) #1

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

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 = { 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, !15, i64 16}
!14 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !15, i64 16, !12, i64 24, !12, i64 28, !16, i64 32}
!15 = !{!"double", !7, i64 0}
!16 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8}
!17 = !{!14, !12, i64 36}
!18 = !{!14, !12, i64 4}
!19 = !{!20, !10, i64 56}
!20 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !6, i64 48, !10, i64 56, !6, i64 64, !6, i64 72, !12, i64 80}
!21 = !{!14, !12, i64 0}
!22 = !{!20, !6, 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, double, i32, i32, %struct.ZDICT_params_t }
%struct.ZDICT_params_t = type { i32, i32, i32 }
%struct.COVER_ctx_t = type { ptr, ptr, ptr, i64, i64, i64, ptr, i64, ptr, ptr, i32 }
%struct.COVER_map_s = type { ptr, i32, i32, i32 }

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @ZSTD_isError(i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @COVER_warnOnSmallCorpus(i64 noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

; 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
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 #1 {
  %7 = alloca %struct.COVER_ctx_t, align 8
  %8 = alloca %struct.COVER_map_s, align 8
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #3
  %9 = getelementptr inbounds i8, ptr %5, i64 16
  store double 1.000000e+00, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %5, i64 32
  %11 = getelementptr inbounds i8, ptr %5, i64 36
  %12 = load i32, ptr %11, align 4, !tbaa !12
  store i32 %12, ptr @g_displayLevel, align 4, !tbaa !13
  %13 = tail call i32 @COVER_checkParameters(ptr noundef nonnull byval(%struct.ZDICT_cover_params_t) align 8 %5, i64 noundef %1)
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %14, label %22

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

17:                                               ; preds = %14
  %18 = load ptr, ptr @stderr, align 8, !tbaa !14
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.37) #4
  %20 = load ptr, ptr @stderr, align 8, !tbaa !14
  %21 = tail call i32 @fflush(ptr noundef %20)
  br label %91

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

24:                                               ; preds = %22
  %25 = load i32, ptr @g_displayLevel, align 4, !tbaa !13
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %27, label %91

27:                                               ; preds = %24
  %28 = load ptr, ptr @stderr, align 8, !tbaa !14
  %29 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.38) #4
  %30 = load ptr, ptr @stderr, align 8, !tbaa !14
  %31 = tail call i32 @fflush(ptr noundef %30)
  br label %91

32:                                               ; preds = %22
  %33 = icmp ult i64 %1, 256
  br i1 %33, label %34, label %42

34:                                               ; preds = %32
  %35 = load i32, ptr @g_displayLevel, align 4, !tbaa !13
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %37, label %91

37:                                               ; preds = %34
  %38 = load ptr, ptr @stderr, align 8, !tbaa !14
  %39 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.39, i32 noundef 256) #4
  %40 = load ptr, ptr @stderr, align 8, !tbaa !14
  %41 = tail call i32 @fflush(ptr noundef %40)
  br label %91

42:                                               ; preds = %32
  %43 = getelementptr inbounds i8, ptr %5, i64 4
  %44 = load i32, ptr %43, align 4, !tbaa !16
  %45 = load double, ptr %9, align 8, !tbaa !5
  %46 = call i64 @COVER_ctx_init(ptr noundef nonnull %7, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %44, double noundef %45)
  %47 = call i32 @ZSTD_isError(i64 noundef %46)
  %.not28 = icmp eq i32 %47, 0
  br i1 %.not28, label %48, label %91

48:                                               ; preds = %42
  %49 = getelementptr inbounds i8, ptr %7, i64 56
  %50 = load i64, ptr %49, align 8, !tbaa !17
  %51 = load i32, ptr @g_displayLevel, align 4, !tbaa !13
  call void @COVER_warnOnSmallCorpus(i64 noundef %1, i64 noundef %50, i32 noundef %51)
  %52 = load i32, ptr %5, align 8, !tbaa !20
  %53 = load i32, ptr %43, align 4, !tbaa !16
  %54 = add i32 %52, 1
  %55 = sub i32 %54, %53
  %56 = call i32 @COVER_map_init(ptr noundef nonnull %8, i32 noundef %55)
  %.not29 = icmp eq i32 %56, 0
  %57 = load i32, ptr @g_displayLevel, align 4, !tbaa !13
  br i1 %.not29, label %58, label %66

58:                                               ; preds = %48
  %59 = icmp sgt i32 %57, 0
  br i1 %59, label %60, label %65

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

65:                                               ; preds = %60, %58
  call void @COVER_ctx_destroy(ptr noundef nonnull %7)
  br label %91

66:                                               ; preds = %48
  %67 = icmp sgt i32 %57, 1
  br i1 %67, label %68, label %73

68:                                               ; preds = %66
  %69 = load ptr, ptr @stderr, align 8, !tbaa !14
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef nonnull @.str.41) #4
  %71 = load ptr, ptr @stderr, align 8, !tbaa !14
  %72 = call i32 @fflush(ptr noundef %71)
  br label %73

73:                                               ; preds = %68, %66
  %74 = getelementptr inbounds i8, ptr %7, i64 64
  %75 = load ptr, ptr %74, align 8, !tbaa !21
  %76 = call i64 @COVER_buildDictionary(ptr noundef nonnull %7, ptr noundef %75, ptr noundef nonnull %8, ptr noundef %0, i64 noundef %1, ptr noundef nonnull byval(%struct.ZDICT_cover_params_t) align 8 %5)
  %77 = getelementptr inbounds i8, ptr %0, i64 %76
  %78 = sub i64 %1, %76
  %79 = call i64 @ZDICT_finalizeDictionary(ptr noundef %0, i64 noundef %1, ptr noundef %77, i64 noundef %78, ptr noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef nonnull byval(%struct.ZDICT_params_t) align 8 %10)
  %80 = call i32 @ZSTD_isError(i64 noundef %79)
  %81 = icmp eq i32 %80, 0
  %82 = load i32, ptr @g_displayLevel, align 4
  %83 = icmp sgt i32 %82, 1
  %or.cond = select i1 %81, i1 %83, i1 false
  br i1 %or.cond, label %84, label %90

84:                                               ; preds = %73
  %85 = load ptr, ptr @stderr, align 8, !tbaa !14
  %86 = trunc i64 %79 to i32
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef nonnull @.str.42, i32 noundef %86) #4
  %88 = load ptr, ptr @stderr, align 8, !tbaa !14
  %89 = call i32 @fflush(ptr noundef %88)
  br label %90

90:                                               ; preds = %84, %73
  call void @COVER_ctx_destroy(ptr noundef nonnull %7)
  call void @COVER_map_destroy(ptr noundef nonnull %8)
  br label %91

91:                                               ; preds = %34, %37, %24, %27, %14, %17, %42, %90, %65
  %.1 = phi i64 [ %79, %90 ], [ -64, %65 ], [ %46, %42 ], [ -42, %17 ], [ -42, %14 ], [ -72, %27 ], [ -72, %24 ], [ -70, %37 ], [ -70, %34 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %7) #3
  ret i64 %.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 #1

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local 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 #1

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

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


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