; LLVM IR from openssl/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 [40 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [29 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 @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 i32, align 4
  %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 4, 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 %114

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 %114

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 %114

39:                                               ; preds = %31
  %40 = load ptr, ptr %11, align 8, !tbaa !9
  %41 = call i32 @EVP_MD_get_size(ptr noundef %40)
  store i32 %41, ptr %13, align 4, !tbaa !5
  %42 = load i32, ptr %13, align 4, !tbaa !5
  %43 = icmp sle i32 %42, 0
  br i1 %43, label %44, label %47

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

47:                                               ; preds = %39
  %48 = load i32, ptr %13, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = call ptr @CRYPTO_malloc(i64 noundef %49, ptr noundef @.str.5, i32 noundef 76)
  store ptr %50, ptr %14, align 8, !tbaa !9
  %51 = load ptr, ptr %14, align 8, !tbaa !9
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %58

53:                                               ; preds = %47
  %54 = load ptr, ptr @stderr, align 8, !tbaa !9
  %55 = load i32, ptr %13, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef @.str.6, i64 noundef %56) #4
  br label %114

58:                                               ; preds = %47
  %59 = call ptr @BIO_f_md()
  %60 = call ptr @BIO_new(ptr noundef %59)
  store ptr %60, ptr %9, align 8, !tbaa !9
  %61 = load ptr, ptr %9, align 8, !tbaa !9
  %62 = icmp eq ptr %61, null
  br i1 %62, label %63, label %66

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

66:                                               ; preds = %58
  %67 = load ptr, ptr %9, align 8, !tbaa !9
  %68 = load ptr, ptr %11, align 8, !tbaa !9
  %69 = call i64 @BIO_ctrl(ptr noundef %67, i32 noundef 111, i64 noundef 0, ptr noundef %68)
  %70 = icmp ne i64 %69, 1
  br i1 %70, label %71, label %74

71:                                               ; preds = %66
  %72 = load ptr, ptr @stderr, align 8, !tbaa !9
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str.8) #4
  br label %114

74:                                               ; preds = %66
  %75 = load ptr, ptr %9, align 8, !tbaa !9
  %76 = load ptr, ptr %8, align 8, !tbaa !9
  %77 = call ptr @BIO_push(ptr noundef %75, ptr noundef %76)
  store ptr %77, ptr %10, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %83, %74
  %79 = load ptr, ptr %10, align 8, !tbaa !9
  %80 = getelementptr inbounds [512 x i8], ptr %12, i64 0, i64 0
  %81 = call i32 @BIO_read(ptr noundef %79, ptr noundef %80, i32 noundef 512)
  %82 = icmp sgt i32 %81, 0
  br i1 %82, label %83, label %84

83:                                               ; preds = %78
  br label %78, !llvm.loop !11

84:                                               ; preds = %78
  %85 = load ptr, ptr %9, align 8, !tbaa !9
  %86 = load ptr, ptr %14, align 8, !tbaa !9
  %87 = load i32, ptr %13, align 4, !tbaa !5
  %88 = call i32 @BIO_gets(ptr noundef %85, ptr noundef %86, i32 noundef %87)
  %89 = load i32, ptr %13, align 4, !tbaa !5
  %90 = icmp ne i32 %88, %89
  br i1 %90, label %91, label %94

91:                                               ; preds = %84
  %92 = load ptr, ptr @stderr, align 8, !tbaa !9
  %93 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %92, ptr noundef @.str.9) #4
  br label %114

94:                                               ; preds = %84
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %108, %94
  %96 = load i32, ptr %15, align 4, !tbaa !5
  %97 = load i32, ptr %13, align 4, !tbaa !5
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %99, label %111

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

108:                                              ; preds = %99
  %109 = load i32, ptr %15, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %15, align 4, !tbaa !5
  br label %95, !llvm.loop !14

111:                                              ; preds = %95
  %112 = load ptr, ptr @stdout, align 8, !tbaa !9
  %113 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str.11) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %111, %91, %71, %63, %53, %44, %36, %28, %21
  %115 = load i32, ptr %6, align 4, !tbaa !5
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %119

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

119:                                              ; preds = %117, %114
  %120 = load ptr, ptr %14, align 8, !tbaa !9
  call void @CRYPTO_free(ptr noundef %120, ptr noundef @.str.5, i32 noundef 119)
  %121 = load ptr, ptr %8, align 8, !tbaa !9
  %122 = call i32 @BIO_free(ptr noundef %121)
  %123 = load ptr, ptr %9, align 8, !tbaa !9
  %124 = call i32 @BIO_free(ptr noundef %123)
  %125 = load ptr, ptr %11, align 8, !tbaa !9
  call void @EVP_MD_free(ptr noundef %125)
  %126 = load ptr, ptr %7, align 8, !tbaa !9
  call void @OSSL_LIB_CTX_free(ptr noundef %126)
  %127 = 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 4, 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 %127
}

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

@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 [40 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [29 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 @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 %65

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 %65

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 %65

23:                                               ; preds = %17
  %24 = tail call i32 @EVP_MD_get_size(ptr noundef nonnull %18) #4
  %25 = icmp slt i32 %24, 1
  br i1 %25, label %26, label %29

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

29:                                               ; preds = %23
  %30 = zext nneg i32 %24 to i64
  %31 = tail call ptr @CRYPTO_malloc(i64 noundef %30, ptr noundef nonnull @.str.5, i32 noundef 76) #4
  %32 = icmp eq ptr %31, null
  br i1 %32, label %33, label %36

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

36:                                               ; preds = %29
  %37 = tail call ptr @BIO_f_md() #4
  %38 = tail call ptr @BIO_new(ptr noundef %37) #4
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %43

40:                                               ; preds = %36
  %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 %65

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

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

48:                                               ; preds = %43
  %49 = tail call ptr @BIO_push(ptr noundef nonnull %38, ptr noundef nonnull %6) #4
  br label %50

50:                                               ; preds = %50, %48
  %51 = call i32 @BIO_read(ptr noundef %49, ptr noundef nonnull %3, i32 noundef 512) #4
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %50, label %53, !llvm.loop !9

53:                                               ; preds = %50
  %54 = call i32 @BIO_gets(ptr noundef nonnull %38, ptr noundef nonnull %31, i32 noundef %24) #4
  %.not44 = icmp eq i32 %54, %24
  br i1 %.not44, label %.lr.ph, label %55

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

.lr.ph:                                           ; preds = %53, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %53 ]
  %58 = load ptr, ptr @stdout, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %31, i64 %indvars.iv
  %60 = load i8, ptr %59, align 1, !tbaa !11
  %61 = zext i8 %60 to i32
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef nonnull @.str.10, i32 noundef %61) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %30
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !12

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

65:                                               ; preds = %8, %14, %20, %26, %33, %40, %45, %55
  %.034.ph = phi ptr [ %12, %55 ], [ %12, %45 ], [ %12, %40 ], [ %12, %33 ], [ %12, %26 ], [ %12, %20 ], [ null, %14 ], [ null, %8 ]
  %.033.ph = phi ptr [ %38, %55 ], [ %38, %45 ], [ null, %40 ], [ null, %33 ], [ null, %26 ], [ null, %20 ], [ null, %14 ], [ null, %8 ]
  %.032.ph = phi ptr [ %18, %55 ], [ %18, %45 ], [ %18, %40 ], [ %18, %33 ], [ %18, %26 ], [ null, %20 ], [ null, %14 ], [ null, %8 ]
  %.030.ph = phi ptr [ %31, %55 ], [ %31, %45 ], [ %31, %40 ], [ null, %33 ], [ null, %26 ], [ null, %20 ], [ null, %14 ], [ null, %8 ]
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %66) #4
  br label %67

67:                                               ; preds = %._crit_edge, %65
  %.03061 = phi ptr [ %.030.ph, %65 ], [ %31, %._crit_edge ]
  %.03159 = phi i32 [ 1, %65 ], [ 0, %._crit_edge ]
  %.03257 = phi ptr [ %.032.ph, %65 ], [ %18, %._crit_edge ]
  %.03355 = phi ptr [ %.033.ph, %65 ], [ %38, %._crit_edge ]
  %.03453 = phi ptr [ %.034.ph, %65 ], [ %12, %._crit_edge ]
  call void @CRYPTO_free(ptr noundef %.03061, ptr noundef nonnull @.str.5, i32 noundef 119) #4
  %68 = call i32 @BIO_free(ptr noundef %6) #4
  %69 = call i32 @BIO_free(ptr noundef %.03355) #4
  call void @EVP_MD_free(ptr noundef %.03257) #4
  call void @OSSL_LIB_CTX_free(ptr noundef %.03453) #4
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #4
  ret i32 %.03159
}

; 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,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass