; LLVM IR from ebiggers/libdeflate :: scripts/libFuzzer/deflate_compress (fuzz)

; 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"

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1
@__PRETTY_FUNCTION__.LLVMFuzzerTestOneInput = external hidden unnamed_addr constant [52 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @LLVMFuzzerTestOneInput(ptr noundef %0, i64 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %23 = load i64, ptr %5, align 8, !tbaa !9
  %24 = icmp ult i64 %23, 2
  br i1 %24, label %25, label %26

25:                                               ; preds = %2
  store i32 0, ptr %3, align 4
  store i32 1, ptr %22, align 4
  br label %132

26:                                               ; preds = %2
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 0
  %29 = load i8, ptr %28, align 1, !tbaa !11
  %30 = zext i8 %29 to i32
  %31 = srem i32 %30, 13
  store i32 %31, ptr %6, align 4, !tbaa !12
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i64 1
  %34 = load i8, ptr %33, align 1, !tbaa !11
  %35 = zext i8 %34 to i32
  %36 = srem i32 %35, 2
  %37 = icmp ne i32 %36, 0
  %38 = zext i1 %37 to i8
  store i8 %38, ptr %7, align 1, !tbaa !14
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 2
  store ptr %40, ptr %4, align 8, !tbaa !5
  %41 = load i64, ptr %5, align 8, !tbaa !9
  %42 = sub i64 %41, 2
  store i64 %42, ptr %5, align 8, !tbaa !9
  %43 = load i32, ptr %6, align 4, !tbaa !12
  %44 = call ptr @libdeflate_alloc_compressor(i32 noundef %43)
  store ptr %44, ptr %8, align 8, !tbaa !5
  %45 = call ptr @libdeflate_alloc_decompressor()
  store ptr %45, ptr %9, align 8, !tbaa !5
  %46 = load i64, ptr %5, align 8, !tbaa !9
  call void @alloc_guarded_buffer(i64 noundef %46, ptr noundef %11, ptr noundef %12)
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = load i64, ptr %5, align 8, !tbaa !9
  %49 = sub i64 0, %48
  %50 = getelementptr inbounds i8, ptr %47, i64 %49
  store ptr %50, ptr %13, align 8, !tbaa !5
  %51 = load ptr, ptr %13, align 8, !tbaa !5
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = load i64, ptr %5, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %51, ptr align 1 %52, i64 %53, i1 false)
  %54 = load i8, ptr %7, align 1, !tbaa !14, !range !16, !noundef !17
  %55 = trunc i8 %54 to i1
  br i1 %55, label %56, label %60

56:                                               ; preds = %26
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load i64, ptr %5, align 8, !tbaa !9
  %59 = call i64 @libdeflate_deflate_compress_bound(ptr noundef %57, i64 noundef %58)
  br label %62

60:                                               ; preds = %26
  %61 = load i64, ptr %5, align 8, !tbaa !9
  br label %62

62:                                               ; preds = %60, %56
  %63 = phi i64 [ %59, %56 ], [ %61, %60 ]
  store i64 %63, ptr %10, align 8, !tbaa !9
  %64 = load i64, ptr %10, align 8, !tbaa !9
  call void @alloc_guarded_buffer(i64 noundef %64, ptr noundef %14, ptr noundef %15)
  %65 = load ptr, ptr %15, align 8, !tbaa !5
  %66 = load i64, ptr %10, align 8, !tbaa !9
  %67 = sub i64 0, %66
  %68 = getelementptr inbounds i8, ptr %65, i64 %67
  store ptr %68, ptr %16, align 8, !tbaa !5
  %69 = load i64, ptr %5, align 8, !tbaa !9
  call void @alloc_guarded_buffer(i64 noundef %69, ptr noundef %17, ptr noundef %18)
  %70 = load ptr, ptr %18, align 8, !tbaa !5
  %71 = load i64, ptr %5, align 8, !tbaa !9
  %72 = sub i64 0, %71
  %73 = getelementptr inbounds i8, ptr %70, i64 %72
  store ptr %73, ptr %19, align 8, !tbaa !5
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = load i64, ptr %5, align 8, !tbaa !9
  %77 = load ptr, ptr %16, align 8, !tbaa !5
  %78 = load i64, ptr %10, align 8, !tbaa !9
  %79 = call i64 @libdeflate_deflate_compress(ptr noundef %74, ptr noundef %75, i64 noundef %76, ptr noundef %77, i64 noundef %78)
  store i64 %79, ptr %20, align 8, !tbaa !9
  %80 = load i64, ptr %20, align 8, !tbaa !9
  %81 = icmp ne i64 %80, 0
  br i1 %81, label %82, label %117

82:                                               ; preds = %62
  %83 = load i64, ptr %20, align 8, !tbaa !9
  %84 = load i64, ptr %10, align 8, !tbaa !9
  %85 = icmp ule i64 %83, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %82
  br label %88

87:                                               ; preds = %82
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 79, ptr noundef @__PRETTY_FUNCTION__.LLVMFuzzerTestOneInput) #7
  unreachable

88:                                               ; preds = %86
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = load i64, ptr %20, align 8, !tbaa !9
  %91 = sub i64 0, %90
  %92 = getelementptr inbounds i8, ptr %89, i64 %91
  %93 = load ptr, ptr %16, align 8, !tbaa !5
  %94 = load i64, ptr %20, align 8, !tbaa !9
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %92, ptr align 1 %93, i64 %94, i1 false)
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = load ptr, ptr %15, align 8, !tbaa !5
  %97 = load i64, ptr %20, align 8, !tbaa !9
  %98 = sub i64 0, %97
  %99 = getelementptr inbounds i8, ptr %96, i64 %98
  %100 = load i64, ptr %20, align 8, !tbaa !9
  %101 = load ptr, ptr %19, align 8, !tbaa !5
  %102 = load i64, ptr %5, align 8, !tbaa !9
  %103 = call i32 @libdeflate_deflate_decompress(ptr noundef %95, ptr noundef %99, i64 noundef %100, ptr noundef %101, i64 noundef %102, ptr noundef null)
  store i32 %103, ptr %21, align 4, !tbaa !12
  %104 = load i32, ptr %21, align 4, !tbaa !12
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %106, label %107

106:                                              ; preds = %88
  br label %108

107:                                              ; preds = %88
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 83, ptr noundef @__PRETTY_FUNCTION__.LLVMFuzzerTestOneInput) #7
  unreachable

108:                                              ; preds = %106
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = load ptr, ptr %19, align 8, !tbaa !5
  %111 = load i64, ptr %5, align 8, !tbaa !9
  %112 = call i32 @memcmp(ptr noundef %109, ptr noundef %110, i64 noundef %111) #8
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %108
  br label %116

115:                                              ; preds = %108
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 84, ptr noundef @__PRETTY_FUNCTION__.LLVMFuzzerTestOneInput) #7
  unreachable

116:                                              ; preds = %114
  br label %123

117:                                              ; preds = %62
  %118 = load i8, ptr %7, align 1, !tbaa !14, !range !16, !noundef !17
  %119 = trunc i8 %118 to i1
  br i1 %119, label %121, label %120

120:                                              ; preds = %117
  br label %122

121:                                              ; preds = %117
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 86, ptr noundef @__PRETTY_FUNCTION__.LLVMFuzzerTestOneInput) #7
  unreachable

122:                                              ; preds = %120
  br label %123

123:                                              ; preds = %122, %116
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  call void @libdeflate_free_compressor(ptr noundef %124)
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  call void @libdeflate_free_decompressor(ptr noundef %125)
  %126 = load ptr, ptr %11, align 8, !tbaa !5
  %127 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free_guarded_buffer(ptr noundef %126, ptr noundef %127)
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = load ptr, ptr %15, align 8, !tbaa !5
  call void @free_guarded_buffer(ptr noundef %128, ptr noundef %129)
  %130 = load ptr, ptr %17, align 8, !tbaa !5
  %131 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free_guarded_buffer(ptr noundef %130, ptr noundef %131)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %22, align 4
  br label %132

132:                                              ; preds = %123, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %133 = load i32, ptr %3, align 4
  ret i32 %133
}

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

declare ptr @libdeflate_alloc_compressor(i32 noundef) #2

declare ptr @libdeflate_alloc_decompressor() #2

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

; 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

declare i64 @libdeflate_deflate_compress_bound(ptr noundef, i64 noundef) #2

declare i64 @libdeflate_deflate_compress(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #3

declare i32 @libdeflate_deflate_decompress(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #5

declare void @libdeflate_free_compressor(ptr noundef) #2

declare void @libdeflate_free_decompressor(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @free_guarded_buffer(ptr noundef, 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 = { "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 = { noreturn 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 #5 = { nounwind willreturn memory(read) "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 #6 = { nounwind }
attributes #7 = { noreturn nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}


; 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"

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1
@__PRETTY_FUNCTION__.LLVMFuzzerTestOneInput = external hidden unnamed_addr constant [52 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @LLVMFuzzerTestOneInput(ptr nocapture noundef readonly %0, i64 noundef %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %9 = icmp ult i64 %1, 2
  br i1 %9, label %57, label %10

10:                                               ; preds = %2
  %11 = load i8, ptr %0, align 1, !tbaa !5
  %12 = urem i8 %11, 13
  %13 = zext nneg i8 %12 to i32
  %14 = getelementptr inbounds i8, ptr %0, i64 1
  %15 = load i8, ptr %14, align 1, !tbaa !5
  %16 = and i8 %15, 1
  %.not = icmp eq i8 %16, 0
  %17 = getelementptr inbounds i8, ptr %0, i64 2
  %18 = add i64 %1, -2
  %19 = tail call ptr @libdeflate_alloc_compressor(i32 noundef %13) #6
  %20 = tail call ptr @libdeflate_alloc_decompressor() #6
  call void @alloc_guarded_buffer(i64 noundef %18, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %21 = load ptr, ptr %4, align 8, !tbaa !8
  %22 = sub i64 2, %1
  %23 = getelementptr inbounds i8, ptr %21, i64 %22
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %23, ptr nonnull align 1 %17, i64 %18, i1 false)
  br i1 %.not, label %26, label %24

24:                                               ; preds = %10
  %25 = call i64 @libdeflate_deflate_compress_bound(ptr noundef %19, i64 noundef %18) #6
  br label %26

26:                                               ; preds = %10, %24
  %27 = phi i64 [ %25, %24 ], [ %18, %10 ]
  call void @alloc_guarded_buffer(i64 noundef %27, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %28 = load ptr, ptr %6, align 8, !tbaa !8
  %29 = sub i64 0, %27
  %30 = getelementptr inbounds i8, ptr %28, i64 %29
  call void @alloc_guarded_buffer(i64 noundef %18, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %31 = load ptr, ptr %8, align 8, !tbaa !8
  %32 = getelementptr inbounds i8, ptr %31, i64 %22
  %33 = call i64 @libdeflate_deflate_compress(ptr noundef %19, ptr noundef %23, i64 noundef %18, ptr noundef %30, i64 noundef %27) #6
  %.not43 = icmp eq i64 %33, 0
  br i1 %.not43, label %48, label %34

34:                                               ; preds = %26
  %.not44 = icmp ugt i64 %33, %27
  br i1 %.not44, label %35, label %36

35:                                               ; preds = %34
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 79, ptr noundef nonnull @__PRETTY_FUNCTION__.LLVMFuzzerTestOneInput) #7
  unreachable

36:                                               ; preds = %34
  %37 = load ptr, ptr %6, align 8, !tbaa !8
  %38 = sub i64 0, %33
  %39 = getelementptr inbounds i8, ptr %37, i64 %38
  call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %39, ptr align 1 %30, i64 %33, i1 false)
  %40 = load ptr, ptr %6, align 8, !tbaa !8
  %41 = getelementptr inbounds i8, ptr %40, i64 %38
  %42 = call i32 @libdeflate_deflate_decompress(ptr noundef %20, ptr noundef nonnull %41, i64 noundef %33, ptr noundef %32, i64 noundef %18, ptr noundef null) #6
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %45, label %44

44:                                               ; preds = %36
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 83, ptr noundef nonnull @__PRETTY_FUNCTION__.LLVMFuzzerTestOneInput) #7
  unreachable

45:                                               ; preds = %36
  %bcmp = call i32 @bcmp(ptr nonnull %17, ptr %32, i64 %18)
  %46 = icmp eq i32 %bcmp, 0
  br i1 %46, label %50, label %47

47:                                               ; preds = %45
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 84, ptr noundef nonnull @__PRETTY_FUNCTION__.LLVMFuzzerTestOneInput) #7
  unreachable

48:                                               ; preds = %26
  br i1 %.not, label %50, label %49

49:                                               ; preds = %48
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 86, ptr noundef nonnull @__PRETTY_FUNCTION__.LLVMFuzzerTestOneInput) #7
  unreachable

50:                                               ; preds = %48, %45
  call void @libdeflate_free_compressor(ptr noundef %19) #6
  call void @libdeflate_free_decompressor(ptr noundef %20) #6
  %51 = load ptr, ptr %3, align 8, !tbaa !8
  %52 = load ptr, ptr %4, align 8, !tbaa !8
  call void @free_guarded_buffer(ptr noundef %51, ptr noundef %52)
  %53 = load ptr, ptr %5, align 8, !tbaa !8
  %54 = load ptr, ptr %6, align 8, !tbaa !8
  call void @free_guarded_buffer(ptr noundef %53, ptr noundef %54)
  %55 = load ptr, ptr %7, align 8, !tbaa !8
  %56 = load ptr, ptr %8, align 8, !tbaa !8
  call void @free_guarded_buffer(ptr noundef %55, ptr noundef %56)
  br label %57

57:                                               ; preds = %2, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret i32 0
}

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

declare ptr @libdeflate_alloc_compressor(i32 noundef) local_unnamed_addr #2

declare ptr @libdeflate_alloc_decompressor() local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

declare i64 @libdeflate_deflate_compress_bound(ptr noundef, i64 noundef) local_unnamed_addr #2

declare i64 @libdeflate_deflate_compress(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #3

declare i32 @libdeflate_deflate_decompress(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @libdeflate_free_compressor(ptr noundef) local_unnamed_addr #2

declare void @libdeflate_free_decompressor(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @free_guarded_buffer(ptr noundef, 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

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #5

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { noreturn 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 #5 = { nofree nounwind willreturn memory(argmem: read) }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}


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