; LLVM IR from openanolis/openssl :: demos/digest (EVP_MD_stdin)

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

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@stdout = external global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @demonstrate_digest(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca [512 x i8], align 16
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  store ptr null, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 512, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %14 = call ptr @OSSL_LIB_CTX_new()
  store ptr %14, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %20

17:                                               ; preds = %1
  %18 = load ptr, ptr @stderr, align 8, !tbaa !5
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef @.str) #4
  br label %110

20:                                               ; preds = %1
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call ptr @EVP_MD_fetch(ptr noundef %21, ptr noundef @.str.1, ptr noundef %22)
  store ptr %23, ptr %7, align 8, !tbaa !5
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %31

26:                                               ; preds = %20
  %27 = load ptr, ptr @stderr, align 8, !tbaa !5
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef @.str.2) #4
  %29 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %29)
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  call void @OSSL_LIB_CTX_free(ptr noundef %30)
  store i32 0, ptr %2, align 4
  store i32 1, ptr %13, align 4
  br label %121

31:                                               ; preds = %20
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = call i32 @EVP_MD_get_size(ptr noundef %32)
  store i32 %33, ptr %9, align 4, !tbaa !9
  %34 = load i32, ptr %9, align 4, !tbaa !9
  %35 = icmp ule i32 %34, 0
  br i1 %35, label %36, label %39

36:                                               ; preds = %31
  %37 = load ptr, ptr @stderr, align 8, !tbaa !5
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.3) #4
  br label %110

39:                                               ; preds = %31
  %40 = load i32, ptr %9, align 4, !tbaa !9
  %41 = zext i32 %40 to i64
  %42 = call ptr @CRYPTO_malloc(i64 noundef %41, ptr noundef @.str.4, i32 noundef 72)
  store ptr %42, ptr %10, align 8, !tbaa !5
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %48

45:                                               ; preds = %39
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef @.str.5) #4
  br label %110

48:                                               ; preds = %39
  %49 = call ptr @EVP_MD_CTX_new()
  store ptr %49, ptr %8, align 8, !tbaa !5
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = icmp eq ptr %50, null
  br i1 %51, label %52, label %56

52:                                               ; preds = %48
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef @.str.6) #4
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %55)
  br label %110

56:                                               ; preds = %48
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = call i32 @EVP_DigestInit(ptr noundef %57, ptr noundef %58)
  %60 = icmp ne i32 %59, 1
  br i1 %60, label %61, label %65

61:                                               ; preds = %56
  %62 = load ptr, ptr @stderr, align 8, !tbaa !5
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef @.str.7) #4
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %64)
  br label %110

65:                                               ; preds = %56
  br label %66

66:                                               ; preds = %81, %65
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds [512 x i8], ptr %11, i64 0, i64 0
  %69 = call i32 @BIO_read(ptr noundef %67, ptr noundef %68, i32 noundef 512)
  store i32 %69, ptr %12, align 4, !tbaa !9
  %70 = icmp sgt i32 %69, 0
  br i1 %70, label %71, label %82

71:                                               ; preds = %66
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds [512 x i8], ptr %11, i64 0, i64 0
  %74 = load i32, ptr %12, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = call i32 @EVP_DigestUpdate(ptr noundef %72, ptr noundef %73, i64 noundef %75)
  %77 = icmp ne i32 %76, 1
  br i1 %77, label %78, label %81

78:                                               ; preds = %71
  %79 = load ptr, ptr @stderr, align 8, !tbaa !5
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef @.str.8) #4
  br label %110

81:                                               ; preds = %71
  br label %66, !llvm.loop !11

82:                                               ; preds = %66
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = call i32 @EVP_DigestFinal(ptr noundef %83, ptr noundef %84, ptr noundef %9)
  %86 = icmp ne i32 %85, 1
  br i1 %86, label %87, label %90

87:                                               ; preds = %82
  %88 = load ptr, ptr @stderr, align 8, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.9) #4
  br label %110

90:                                               ; preds = %82
  store i32 1, ptr %5, align 4, !tbaa !9
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %104, %90
  %92 = load i32, ptr %12, align 4, !tbaa !9
  %93 = load i32, ptr %9, align 4, !tbaa !9
  %94 = icmp ult i32 %92, %93
  br i1 %94, label %95, label %107

95:                                               ; preds = %91
  %96 = load ptr, ptr @stdout, align 8, !tbaa !5
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = load i32, ptr %12, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i8, ptr %97, i64 %99
  %101 = load i8, ptr %100, align 1, !tbaa !13
  %102 = zext i8 %101 to i32
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef @.str.10, i32 noundef %102) #4
  br label %104

104:                                              ; preds = %95
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %12, align 4, !tbaa !9
  br label %91, !llvm.loop !14

107:                                              ; preds = %91
  %108 = load ptr, ptr @stdout, align 8, !tbaa !5
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %108, ptr noundef @.str.11) #4
  br label %110

110:                                              ; preds = %107, %87, %78, %61, %52, %45, %36, %17
  %111 = load i32, ptr %5, align 4, !tbaa !9
  %112 = icmp ne i32 %111, 1
  br i1 %112, label %113, label %115

113:                                              ; preds = %110
  %114 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %114)
  br label %115

115:                                              ; preds = %113, %110
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  call void @EVP_MD_CTX_free(ptr noundef %116)
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  call void @CRYPTO_free(ptr noundef %117, ptr noundef @.str.4, i32 noundef 117)
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  call void @EVP_MD_free(ptr noundef %118)
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  call void @OSSL_LIB_CTX_free(ptr noundef %119)
  %120 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %120, ptr %2, align 4
  store i32 1, ptr %13, align 4
  br label %121

121:                                              ; preds = %115, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 512, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  %122 = load i32, ptr %2, align 4
  ret i32 %122
}

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

declare ptr @OSSL_LIB_CTX_new() #2

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

declare ptr @EVP_MD_fetch(ptr noundef, ptr noundef, ptr noundef) #2

declare void @ERR_print_errors_fp(ptr noundef) #2

declare void @OSSL_LIB_CTX_free(ptr noundef) #2

declare i32 @EVP_MD_get_size(ptr noundef) #2

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

declare ptr @EVP_MD_CTX_new() #2

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

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

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

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

declare void @EVP_MD_CTX_free(ptr noundef) #2

declare void @CRYPTO_free(ptr noundef, ptr noundef, i32 noundef) #2

declare void @EVP_MD_free(ptr noundef) #2

; 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 = { 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 #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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @demonstrate_digest(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca i32, align 4
  %3 = alloca [512 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #4
  %4 = tail call ptr @OSSL_LIB_CTX_new() #4
  %5 = icmp eq ptr %4, null
  br i1 %5, label %6, label %9

6:                                                ; preds = %1
  %7 = load ptr, ptr @stderr, align 8, !tbaa !5
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %7, ptr noundef nonnull @.str) #5
  br label %66

9:                                                ; preds = %1
  %10 = tail call ptr @EVP_MD_fetch(ptr noundef nonnull %4, ptr noundef nonnull @.str.1, ptr noundef null) #4
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %16

12:                                               ; preds = %9
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.2) #5
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  tail call void @ERR_print_errors_fp(ptr noundef %15) #4
  tail call void @OSSL_LIB_CTX_free(ptr noundef nonnull %4) #4
  br label %69

16:                                               ; preds = %9
  %17 = tail call i32 @EVP_MD_get_size(ptr noundef nonnull %10) #4
  store i32 %17, ptr %2, align 4, !tbaa !9
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %22

19:                                               ; preds = %16
  %20 = load ptr, ptr @stderr, align 8, !tbaa !5
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.3) #5
  br label %66

22:                                               ; preds = %16
  %23 = zext i32 %17 to i64
  %24 = tail call ptr @CRYPTO_malloc(i64 noundef %23, ptr noundef nonnull @.str.4, i32 noundef 72) #4
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %29

26:                                               ; preds = %22
  %27 = load ptr, ptr @stderr, align 8, !tbaa !5
  %28 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.5) #5
  br label %66

29:                                               ; preds = %22
  %30 = tail call ptr @EVP_MD_CTX_new() #4
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %36

32:                                               ; preds = %29
  %33 = load ptr, ptr @stderr, align 8, !tbaa !5
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.6) #5
  %35 = load ptr, ptr @stderr, align 8, !tbaa !5
  tail call void @ERR_print_errors_fp(ptr noundef %35) #4
  br label %66

36:                                               ; preds = %29
  %37 = tail call i32 @EVP_DigestInit(ptr noundef nonnull %30, ptr noundef nonnull %10) #4
  %.not = icmp eq i32 %37, 1
  br i1 %.not, label %.preheader53, label %38

38:                                               ; preds = %36
  %39 = load ptr, ptr @stderr, align 8, !tbaa !5
  %40 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.7) #5
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  tail call void @ERR_print_errors_fp(ptr noundef %41) #4
  br label %66

.preheader53:                                     ; preds = %36, %44
  %42 = call i32 @BIO_read(ptr noundef %0, ptr noundef nonnull %3, i32 noundef 512) #4
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %44, label %50

44:                                               ; preds = %.preheader53
  %45 = zext nneg i32 %42 to i64
  %46 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %30, ptr noundef nonnull %3, i64 noundef %45) #4
  %.not38 = icmp eq i32 %46, 1
  br i1 %.not38, label %.preheader53, label %47, !llvm.loop !11

47:                                               ; preds = %44
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.8) #5
  br label %66

50:                                               ; preds = %.preheader53
  %51 = call i32 @EVP_DigestFinal(ptr noundef nonnull %30, ptr noundef nonnull %24, ptr noundef nonnull %2) #4
  %.not37 = icmp eq i32 %51, 1
  br i1 %.not37, label %.preheader, label %53

.preheader:                                       ; preds = %50
  %52 = load i32, ptr %2, align 4, !tbaa !9
  %.not55 = icmp eq i32 %52, 0
  br i1 %.not55, label %._crit_edge, label %.lr.ph

53:                                               ; preds = %50
  %54 = load ptr, ptr @stderr, align 8, !tbaa !5
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef nonnull @.str.9) #5
  br label %66

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader ]
  %56 = load ptr, ptr @stdout, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %24, i64 %indvars.iv
  %58 = load i8, ptr %57, align 1, !tbaa !13
  %59 = zext i8 %58 to i32
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.10, i32 noundef %59) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %61 = load i32, ptr %2, align 4, !tbaa !9
  %62 = zext i32 %61 to i64
  %63 = icmp ult i64 %indvars.iv.next, %62
  br i1 %63, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %64 = load ptr, ptr @stdout, align 8, !tbaa !5
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.11) #4
  br label %68

66:                                               ; preds = %6, %19, %26, %32, %38, %47, %53
  %.027.ph = phi ptr [ %10, %53 ], [ %10, %47 ], [ %10, %38 ], [ %10, %32 ], [ %10, %26 ], [ %10, %19 ], [ null, %6 ]
  %.026.ph = phi ptr [ %30, %53 ], [ %30, %47 ], [ %30, %38 ], [ null, %32 ], [ null, %26 ], [ null, %19 ], [ null, %6 ]
  %.025.ph = phi ptr [ %24, %53 ], [ %24, %47 ], [ %24, %38 ], [ %24, %32 ], [ null, %26 ], [ null, %19 ], [ null, %6 ]
  %67 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %67) #4
  br label %68

68:                                               ; preds = %._crit_edge, %66
  %.02552 = phi ptr [ %.025.ph, %66 ], [ %24, %._crit_edge ]
  %.02650 = phi ptr [ %.026.ph, %66 ], [ %30, %._crit_edge ]
  %.02748 = phi ptr [ %.027.ph, %66 ], [ %10, %._crit_edge ]
  %.02946 = phi i32 [ 0, %66 ], [ 1, %._crit_edge ]
  call void @EVP_MD_CTX_free(ptr noundef %.02650) #4
  call void @CRYPTO_free(ptr noundef %.02552, ptr noundef nonnull @.str.4, i32 noundef 117) #4
  call void @EVP_MD_free(ptr noundef %.02748) #4
  call void @OSSL_LIB_CTX_free(ptr noundef %4) #4
  br label %69

69:                                               ; preds = %68, %12
  %.028 = phi i32 [ %.02946, %68 ], [ 0, %12 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  ret i32 %.028
}

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

declare ptr @OSSL_LIB_CTX_new() local_unnamed_addr #2

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

declare ptr @EVP_MD_fetch(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @ERR_print_errors_fp(ptr noundef) local_unnamed_addr #2

declare void @OSSL_LIB_CTX_free(ptr noundef) local_unnamed_addr #2

declare i32 @EVP_MD_get_size(ptr noundef) local_unnamed_addr #2

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

declare ptr @EVP_MD_CTX_new() local_unnamed_addr #2

declare i32 @EVP_DigestInit(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @BIO_read(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

declare i32 @EVP_DigestFinal(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @EVP_MD_CTX_free(ptr noundef) local_unnamed_addr #2

declare void @CRYPTO_free(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @EVP_MD_free(ptr noundef) local_unnamed_addr #2

; 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 = { "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 = { 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 #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, !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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass