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

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

@stdin = external global ptr, align 8
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [38 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [29 x i8], align 1
@stdout = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1

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

21:                                               ; preds = %2
  %22 = load ptr, ptr @stderr, align 8, !tbaa !9
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef @.str) #4
  br label %110

24:                                               ; preds = %2
  %25 = call ptr @OSSL_LIB_CTX_new()
  store ptr %25, ptr %7, align 8, !tbaa !9
  %26 = load ptr, ptr %7, align 8, !tbaa !9
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %31

28:                                               ; preds = %24
  %29 = load ptr, ptr @stderr, align 8, !tbaa !9
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef @.str.1) #4
  br label %110

31:                                               ; preds = %24
  %32 = load ptr, ptr %7, align 8, !tbaa !9
  %33 = call ptr @EVP_MD_fetch(ptr noundef %32, ptr noundef @.str.2, ptr noundef null)
  store ptr %33, ptr %11, align 8, !tbaa !9
  %34 = load ptr, ptr %11, align 8, !tbaa !9
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %39

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

39:                                               ; preds = %31
  %40 = load ptr, ptr %11, align 8, !tbaa !9
  %41 = call i32 @EVP_MD_get_size(ptr noundef %40)
  %42 = sext i32 %41 to i64
  store i64 %42, ptr %13, align 8, !tbaa !11
  %43 = load i64, ptr %13, align 8, !tbaa !11
  %44 = call ptr @CRYPTO_malloc(i64 noundef %43, ptr noundef @.str.4, i32 noundef 71)
  store ptr %44, ptr %14, align 8, !tbaa !9
  %45 = load ptr, ptr %14, align 8, !tbaa !9
  %46 = icmp eq ptr %45, null
  br i1 %46, label %47, label %51

47:                                               ; preds = %39
  %48 = load ptr, ptr @stderr, align 8, !tbaa !9
  %49 = load i64, ptr %13, align 8, !tbaa !11
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str.5, i64 noundef %49) #4
  br label %110

51:                                               ; preds = %39
  %52 = call ptr @BIO_f_md()
  %53 = call ptr @BIO_new(ptr noundef %52)
  store ptr %53, ptr %9, align 8, !tbaa !9
  %54 = load ptr, ptr %9, align 8, !tbaa !9
  %55 = icmp eq ptr %54, null
  br i1 %55, label %56, label %59

56:                                               ; preds = %51
  %57 = load ptr, ptr @stderr, align 8, !tbaa !9
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef @.str.6) #4
  br label %110

59:                                               ; preds = %51
  %60 = load ptr, ptr %9, align 8, !tbaa !9
  %61 = load ptr, ptr %11, align 8, !tbaa !9
  %62 = call i64 @BIO_ctrl(ptr noundef %60, i32 noundef 111, i64 noundef 0, ptr noundef %61)
  %63 = icmp ne i64 %62, 1
  br i1 %63, label %64, label %67

64:                                               ; preds = %59
  %65 = load ptr, ptr @stderr, align 8, !tbaa !9
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str.7) #4
  br label %110

67:                                               ; preds = %59
  %68 = load ptr, ptr %9, align 8, !tbaa !9
  %69 = load ptr, ptr %8, align 8, !tbaa !9
  %70 = call ptr @BIO_push(ptr noundef %68, ptr noundef %69)
  store ptr %70, ptr %10, align 8, !tbaa !9
  br label %71

71:                                               ; preds = %76, %67
  %72 = load ptr, ptr %10, align 8, !tbaa !9
  %73 = getelementptr inbounds [512 x i8], ptr %12, i64 0, i64 0
  %74 = call i32 @BIO_read(ptr noundef %72, ptr noundef %73, i32 noundef 512)
  %75 = icmp sgt i32 %74, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %71
  br label %71, !llvm.loop !13

77:                                               ; preds = %71
  %78 = load ptr, ptr %9, align 8, !tbaa !9
  %79 = load ptr, ptr %14, align 8, !tbaa !9
  %80 = load i64, ptr %13, align 8, !tbaa !11
  %81 = trunc i64 %80 to i32
  %82 = call i32 @BIO_gets(ptr noundef %78, ptr noundef %79, i32 noundef %81)
  %83 = sext i32 %82 to i64
  %84 = load i64, ptr %13, align 8, !tbaa !11
  %85 = icmp ne i64 %83, %84
  br i1 %85, label %86, label %89

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

89:                                               ; preds = %77
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %104, %89
  %91 = load i32, ptr %15, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = load i64, ptr %13, align 8, !tbaa !11
  %94 = icmp ult i64 %92, %93
  br i1 %94, label %95, label %107

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

104:                                              ; preds = %95
  %105 = load i32, ptr %15, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %15, align 4, !tbaa !5
  br label %90, !llvm.loop !16

107:                                              ; preds = %90
  %108 = load ptr, ptr @stdout, align 8, !tbaa !9
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %108, ptr noundef @.str.10) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %107, %86, %64, %56, %47, %36, %28, %21
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %115

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

115:                                              ; preds = %113, %110
  %116 = load ptr, ptr %14, align 8, !tbaa !9
  call void @CRYPTO_free(ptr noundef %116, ptr noundef @.str.4, i32 noundef 114)
  %117 = load ptr, ptr %8, align 8, !tbaa !9
  %118 = call i32 @BIO_free(ptr noundef %117)
  %119 = load ptr, ptr %9, align 8, !tbaa !9
  %120 = call i32 @BIO_free(ptr noundef %119)
  %121 = load ptr, ptr %11, align 8, !tbaa !9
  call void @EVP_MD_free(ptr noundef %121)
  %122 = load ptr, ptr %7, align 8, !tbaa !9
  call void @OSSL_LIB_CTX_free(ptr noundef %122)
  %123 = load i32, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 512, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, 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 4, ptr %6) #4
  ret i32 %123
}

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

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

; Function Attrs: nounwind
declare i32 @fileno(ptr noundef) #3

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

declare ptr @OSSL_LIB_CTX_new() #2

declare ptr @EVP_MD_fetch(ptr noundef, ptr noundef, 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 @BIO_new(ptr noundef) #2

declare ptr @BIO_f_md() #2

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

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

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

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

declare void @ERR_print_errors_fp(ptr noundef) #2

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

declare i32 @BIO_free(ptr noundef) #2

declare void @EVP_MD_free(ptr noundef) #2

declare void @OSSL_LIB_CTX_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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !14}


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

@stdin = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [38 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [29 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca [512 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #4
  %4 = load ptr, ptr @stdin, align 8, !tbaa !5
  %5 = tail call i32 @fileno(ptr noundef %4) #4
  %6 = tail call ptr @BIO_new_fd(i32 noundef %5, i32 noundef 1) #4
  %7 = icmp eq ptr %6, null
  br i1 %7, label %8, label %11

8:                                                ; preds = %2
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str) #5
  br label %60

11:                                               ; preds = %2
  %12 = tail call ptr @OSSL_LIB_CTX_new() #4
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %17

14:                                               ; preds = %11
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.1) #5
  br label %60

17:                                               ; preds = %11
  %18 = tail call ptr @EVP_MD_fetch(ptr noundef nonnull %12, ptr noundef nonnull @.str.2, ptr noundef null) #4
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %23

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

23:                                               ; preds = %17
  %24 = tail call i32 @EVP_MD_get_size(ptr noundef nonnull %18) #4
  %25 = sext i32 %24 to i64
  %26 = tail call ptr @CRYPTO_malloc(i64 noundef %25, ptr noundef nonnull @.str.4, i32 noundef 71) #4
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %31

28:                                               ; preds = %23
  %29 = load ptr, ptr @stderr, align 8, !tbaa !5
  %30 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.5, i64 noundef %25) #5
  br label %60

31:                                               ; preds = %23
  %32 = tail call ptr @BIO_f_md() #4
  %33 = tail call ptr @BIO_new(ptr noundef %32) #4
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %38

35:                                               ; preds = %31
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.6) #5
  br label %60

38:                                               ; preds = %31
  %39 = tail call i64 @BIO_ctrl(ptr noundef nonnull %33, i32 noundef 111, i64 noundef 0, ptr noundef nonnull %18) #4
  %.not = icmp eq i64 %39, 1
  br i1 %.not, label %43, label %40

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

43:                                               ; preds = %38
  %44 = tail call ptr @BIO_push(ptr noundef nonnull %33, ptr noundef nonnull %6) #4
  br label %45

45:                                               ; preds = %45, %43
  %46 = call i32 @BIO_read(ptr noundef %44, ptr noundef nonnull %3, i32 noundef 512) #4
  %47 = icmp sgt i32 %46, 0
  br i1 %47, label %45, label %48, !llvm.loop !9

48:                                               ; preds = %45
  %49 = call i32 @BIO_gets(ptr noundef nonnull %33, ptr noundef nonnull %26, i32 noundef %24) #4
  %.not44 = icmp eq i32 %49, %24
  br i1 %.not44, label %.preheader, label %50

.preheader:                                       ; preds = %48
  %.not63 = icmp eq i32 %24, 0
  br i1 %.not63, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader
  %wide.trip.count = zext i32 %24 to i64
  br label %.lr.ph

50:                                               ; preds = %48
  %51 = load ptr, ptr @stderr, align 8, !tbaa !5
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.8) #5
  br label %60

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %53 = load ptr, ptr @stdout, align 8, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %26, i64 %indvars.iv
  %55 = load i8, ptr %54, align 1, !tbaa !11
  %56 = zext i8 %55 to i32
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.9, i32 noundef %56) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !12

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

60:                                               ; preds = %8, %14, %20, %28, %35, %40, %50
  %.033.ph = phi ptr [ %12, %50 ], [ %12, %40 ], [ %12, %35 ], [ %12, %28 ], [ %12, %20 ], [ null, %14 ], [ null, %8 ]
  %.032.ph = phi ptr [ %33, %50 ], [ %33, %40 ], [ null, %35 ], [ null, %28 ], [ null, %20 ], [ null, %14 ], [ null, %8 ]
  %.031.ph = phi ptr [ %18, %50 ], [ %18, %40 ], [ %18, %35 ], [ %18, %28 ], [ null, %20 ], [ null, %14 ], [ null, %8 ]
  %.029.ph = phi ptr [ %26, %50 ], [ %26, %40 ], [ %26, %35 ], [ null, %28 ], [ null, %20 ], [ null, %14 ], [ null, %8 ]
  %61 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %61) #4
  br label %62

62:                                               ; preds = %._crit_edge, %60
  %.02961 = phi ptr [ %.029.ph, %60 ], [ %26, %._crit_edge ]
  %.03059 = phi i32 [ 1, %60 ], [ 0, %._crit_edge ]
  %.03157 = phi ptr [ %.031.ph, %60 ], [ %18, %._crit_edge ]
  %.03255 = phi ptr [ %.032.ph, %60 ], [ %33, %._crit_edge ]
  %.03353 = phi ptr [ %.033.ph, %60 ], [ %12, %._crit_edge ]
  call void @CRYPTO_free(ptr noundef %.02961, ptr noundef nonnull @.str.4, i32 noundef 114) #4
  %63 = call i32 @BIO_free(ptr noundef %6) #4
  %64 = call i32 @BIO_free(ptr noundef %.03255) #4
  call void @EVP_MD_free(ptr noundef %.03157) #4
  call void @OSSL_LIB_CTX_free(ptr noundef %.03353) #4
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #4
  ret i32 %.03059
}

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

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

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

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

declare ptr @OSSL_LIB_CTX_new() local_unnamed_addr #2

declare ptr @EVP_MD_fetch(ptr noundef, ptr noundef, 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 @BIO_new(ptr noundef) local_unnamed_addr #2

declare ptr @BIO_f_md() local_unnamed_addr #2

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

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

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

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

declare void @ERR_print_errors_fp(ptr noundef) local_unnamed_addr #2

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

declare i32 @BIO_free(ptr noundef) local_unnamed_addr #2

declare void @EVP_MD_free(ptr noundef) local_unnamed_addr #2

declare void @OSSL_LIB_CTX_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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}


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