; LLVM IR from Trusted-eSign/trusted-crypto :: deps/wrapper/src/pki/pkcs12.ll (ZN6Pkcs124readE6HandleI3BioE)

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

%class.LoggerFunction = type { %class.Handle.0, ptr }
%class.Handle.0 = type { ptr }
%class.Handle.1 = type { ptr }

@logger = external global ptr, align 8
@__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE = external hidden unnamed_addr constant [5 x i8], align 1
@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Pkcs124readE6HandleI3BioE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.LoggerFunction, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %class.Handle.1, align 8
  %9 = alloca %class.Handle.1, align 8
  %10 = alloca i1, align 1
  %11 = alloca ptr, align 8
  %12 = alloca %class.Handle.1, align 8
  %13 = alloca %class.Handle.1, align 8
  %14 = alloca i1, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  %16 = load ptr, ptr @logger, align 8, !tbaa !5
  call void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %16, ptr noundef @__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE)
  %17 = invoke noundef zeroext i1 @_ZNK6HandleI3BioE7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %18 unwind label %29

18:                                               ; preds = %2
  br i1 %17, label %19, label %59

19:                                               ; preds = %18
  %20 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef @__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE, ptr noundef @.str, i32 noundef 1)
          to label %21 unwind label %29

21:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %22 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #8
          to label %23 unwind label %33

23:                                               ; preds = %21
  store i1 true, ptr %10, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef null)
          to label %24 unwind label %37

24:                                               ; preds = %23
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %22, i1 noundef zeroext false, ptr noundef @.str.1, i32 noundef 9, i32 noundef 0, ptr noundef @.str.2, ptr noundef @__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE, ptr noundef %9, ptr noundef @.str, i32 noundef 1)
          to label %25 unwind label %41

25:                                               ; preds = %24
  store i1 false, ptr %10, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef %22)
          to label %26 unwind label %41

26:                                               ; preds = %25
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %27 = call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %28 unwind label %49

28:                                               ; preds = %26
  invoke void @__cxa_throw(ptr %27, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #9
          to label %123 unwind label %53

29:                                               ; preds = %19, %2
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %6, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %7, align 4
  br label %117

33:                                               ; preds = %21
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %6, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %7, align 4
  br label %58

37:                                               ; preds = %23
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %6, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %7, align 4
  br label %45

41:                                               ; preds = %25, %24
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %6, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %7, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br label %45

45:                                               ; preds = %41, %37
  %46 = load i1, ptr %10, align 1
  br i1 %46, label %47, label %48

47:                                               ; preds = %45
  call void @_ZdlPvm(ptr noundef %22, i64 noundef 176) #10
  br label %48

48:                                               ; preds = %47, %45
  br label %58

49:                                               ; preds = %26
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %6, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %7, align 4
  call void @__cxa_free_exception(ptr %27) #7
  br label %57

53:                                               ; preds = %28
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %6, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %7, align 4
  br label %57

57:                                               ; preds = %53, %49
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br label %58

58:                                               ; preds = %57, %48, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %117

59:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store ptr null, ptr %11, align 8, !tbaa !5
  %60 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %61 unwind label %83

61:                                               ; preds = %59
  invoke void @_ZN3Bio5resetEv(ptr noundef nonnull align 8 dereferenceable(9) %60)
          to label %62 unwind label %83

62:                                               ; preds = %61
  %63 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %63, i32 noundef 32, ptr noundef @__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE, ptr noundef @.str.3)
          to label %64 unwind label %83

64:                                               ; preds = %62
  %65 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %66 unwind label %83

66:                                               ; preds = %64
  %67 = invoke noundef ptr @_ZN3Bio8internalEv(ptr noundef nonnull align 8 dereferenceable(9) %65)
          to label %68 unwind label %83

68:                                               ; preds = %66
  %69 = invoke ptr @d2i_PKCS12_bio(ptr noundef %67, ptr noundef null)
          to label %70 unwind label %83

70:                                               ; preds = %68
  store ptr %69, ptr %11, align 8, !tbaa !5
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = icmp ne ptr %71, null
  br i1 %72, label %113, label %73

73:                                               ; preds = %70
  %74 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %74, ptr noundef @__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE, ptr noundef @.str.4)
          to label %75 unwind label %83

75:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %76 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #8
          to label %77 unwind label %87

77:                                               ; preds = %75
  store i1 true, ptr %14, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef null)
          to label %78 unwind label %91

78:                                               ; preds = %77
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %76, i1 noundef zeroext false, ptr noundef @.str.1, i32 noundef 19, i32 noundef 0, ptr noundef @.str.2, ptr noundef @__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE, ptr noundef %13, ptr noundef @.str.4)
          to label %79 unwind label %95

79:                                               ; preds = %78
  store i1 false, ptr %14, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef %76)
          to label %80 unwind label %95

80:                                               ; preds = %79
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %81 = call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %82 unwind label %103

82:                                               ; preds = %80
  invoke void @__cxa_throw(ptr %81, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #9
          to label %123 unwind label %107

83:                                               ; preds = %113, %73, %68, %66, %64, %62, %61, %59
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %6, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %7, align 4
  br label %116

87:                                               ; preds = %75
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %6, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %7, align 4
  br label %112

91:                                               ; preds = %77
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %6, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %7, align 4
  br label %99

95:                                               ; preds = %79, %78
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %6, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %7, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br label %99

99:                                               ; preds = %95, %91
  %100 = load i1, ptr %14, align 1
  br i1 %100, label %101, label %102

101:                                              ; preds = %99
  call void @_ZdlPvm(ptr noundef %76, i64 noundef 176) #10
  br label %102

102:                                              ; preds = %101, %99
  br label %112

103:                                              ; preds = %80
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %6, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %7, align 4
  call void @__cxa_free_exception(ptr %81) #7
  br label %111

107:                                              ; preds = %82
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %6, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %7, align 4
  br label %111

111:                                              ; preds = %107, %103
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br label %112

112:                                              ; preds = %111, %102, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %116

113:                                              ; preds = %70
  %114 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN9SSLObjectI9PKCS12_stE7setDataEPS0_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef %114)
          to label %115 unwind label %83

115:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  ret void

116:                                              ; preds = %112, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %117

117:                                              ; preds = %116, %58, %29
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  br label %118

118:                                              ; preds = %117
  %119 = load ptr, ptr %6, align 8
  %120 = load i32, ptr %7, align 4
  %121 = insertvalue { ptr, i32 } poison, ptr %119, 0
  %122 = insertvalue { ptr, i32 } %121, i32 %120, 1
  resume { ptr, i32 } %122

123:                                              ; preds = %82, %28
  unreachable
}

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

declare void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6HandleI3BioE7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

declare i32 @__gxx_personality_v0(...)

declare void @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ...) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #0 align 2

declare void @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176), i1 noundef zeroext, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ...) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

declare void @_ZN3Bio5resetEv(ptr noundef nonnull align 8 dereferenceable(9)) #2

declare void @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, ptr noundef, ptr noundef, ...) #2

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

declare noundef ptr @_ZN3Bio8internalEv(ptr noundef nonnull align 8 dereferenceable(9)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9SSLObjectI9PKCS12_stE7setDataEPS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #0 align 2

; Function Attrs: nounwind
declare void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #6

attributes #0 = { mustprogress 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 = { mustprogress 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 #4 = { nobuiltin allocsize(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 #5 = { nobuiltin 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { noreturn }
attributes #10 = { builtin 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++ TBAA"}


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

%class.LoggerFunction = type { %class.Handle.0, ptr }
%class.Handle.0 = type { ptr }
%class.Handle.1 = type { ptr }

@logger = external local_unnamed_addr global ptr, align 8
@__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE = external hidden unnamed_addr constant [5 x i8], align 1
@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Pkcs124readE6HandleI3BioE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.LoggerFunction, align 8
  %4 = alloca %class.Handle.1, align 8
  %5 = alloca %class.Handle.1, align 8
  %6 = alloca %class.Handle.1, align 8
  %7 = alloca %class.Handle.1, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %8 = load ptr, ptr @logger, align 8, !tbaa !5
  call void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef %8, ptr noundef nonnull @__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE)
  %9 = call noundef zeroext i1 @_ZNK6HandleI3BioE7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  br i1 %9, label %10, label %31

10:                                               ; preds = %2
  %11 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull @__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE, ptr noundef nonnull @.str, i32 noundef 1)
          to label %12 unwind label %20

12:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %13 = invoke noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #8
          to label %14 unwind label %22

14:                                               ; preds = %12
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef null)
          to label %15 unwind label %.thread

15:                                               ; preds = %14
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %13, i1 noundef zeroext false, ptr noundef nonnull @.str.1, i32 noundef 9, i32 noundef 0, ptr noundef nonnull @.str.2, ptr noundef nonnull @__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE, ptr noundef nonnull %5, ptr noundef nonnull @.str, i32 noundef 1)
          to label %17 unwind label %.thread30

.thread30:                                        ; preds = %15
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br label %27

17:                                               ; preds = %15
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %13)
          to label %18 unwind label %25

18:                                               ; preds = %17
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %19 = call ptr @__cxa_allocate_exception(i64 8) #7
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %4)
  invoke void @__cxa_throw(ptr nonnull %19, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #9
          to label %67 unwind label %28

20:                                               ; preds = %10
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %66

22:                                               ; preds = %12
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %30

.thread:                                          ; preds = %14
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %27

25:                                               ; preds = %17
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br label %30

27:                                               ; preds = %.thread30, %.thread
  %.pn2229 = phi { ptr, i32 } [ %24, %.thread ], [ %16, %.thread30 ]
  call void @_ZdlPvm(ptr noundef nonnull %13, i64 noundef 176) #10
  br label %30

28:                                               ; preds = %18
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  br label %30

30:                                               ; preds = %25, %27, %28, %22
  %.pn24 = phi { ptr, i32 } [ %29, %28 ], [ %.pn2229, %27 ], [ %26, %25 ], [ %23, %22 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %66

31:                                               ; preds = %2
  %32 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %33 unwind label %53

33:                                               ; preds = %31
  invoke void @_ZN3Bio5resetEv(ptr noundef nonnull align 8 dereferenceable(9) %32)
          to label %34 unwind label %53

34:                                               ; preds = %33
  %35 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %35, i32 noundef 32, ptr noundef nonnull @__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE, ptr noundef nonnull @.str.3)
          to label %36 unwind label %53

36:                                               ; preds = %34
  %37 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %38 unwind label %53

38:                                               ; preds = %36
  %39 = invoke noundef ptr @_ZN3Bio8internalEv(ptr noundef nonnull align 8 dereferenceable(9) %37)
          to label %40 unwind label %53

40:                                               ; preds = %38
  %41 = invoke ptr @d2i_PKCS12_bio(ptr noundef %39, ptr noundef null)
          to label %42 unwind label %53

42:                                               ; preds = %40
  %.not = icmp eq ptr %41, null
  br i1 %.not, label %43, label %64

43:                                               ; preds = %42
  %44 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %44, ptr noundef nonnull @__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE, ptr noundef nonnull @.str.4)
          to label %45 unwind label %53

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %46 = invoke noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #8
          to label %47 unwind label %55

47:                                               ; preds = %45
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef null)
          to label %48 unwind label %.thread32

48:                                               ; preds = %47
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %46, i1 noundef zeroext false, ptr noundef nonnull @.str.1, i32 noundef 19, i32 noundef 0, ptr noundef nonnull @.str.2, ptr noundef nonnull @__FUNCTION__._ZN6Pkcs124readE6HandleI3BioE, ptr noundef nonnull %7, ptr noundef nonnull @.str.4)
          to label %50 unwind label %.thread36

.thread36:                                        ; preds = %48
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br label %60

50:                                               ; preds = %48
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %46)
          to label %51 unwind label %58

51:                                               ; preds = %50
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %52 = call ptr @__cxa_allocate_exception(i64 8) #7
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull align 8 dereferenceable(8) %6)
  invoke void @__cxa_throw(ptr nonnull %52, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #9
          to label %67 unwind label %61

53:                                               ; preds = %64, %43, %40, %38, %36, %34, %33, %31
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %66

55:                                               ; preds = %45
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %63

.thread32:                                        ; preds = %47
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %60

58:                                               ; preds = %50
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br label %63

60:                                               ; preds = %.thread36, %.thread32
  %.pn35 = phi { ptr, i32 } [ %57, %.thread32 ], [ %49, %.thread36 ]
  call void @_ZdlPvm(ptr noundef nonnull %46, i64 noundef 176) #10
  br label %63

61:                                               ; preds = %51
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br label %63

63:                                               ; preds = %58, %60, %61, %55
  %.pn18 = phi { ptr, i32 } [ %62, %61 ], [ %.pn35, %60 ], [ %59, %58 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %66

64:                                               ; preds = %42
  invoke void @_ZN9SSLObjectI9PKCS12_stE7setDataEPS0_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %41)
          to label %65 unwind label %53

65:                                               ; preds = %64
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  ret void

66:                                               ; preds = %53, %63, %30, %20
  %.pn24.pn = phi { ptr, i32 } [ %.pn24, %30 ], [ %21, %20 ], [ %54, %53 ], [ %.pn18, %63 ]
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn24.pn

67:                                               ; preds = %51, %18
  unreachable
}

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

declare void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6HandleI3BioE7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

declare void @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #0 align 2

declare void @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176), i1 noundef zeroext, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ...) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

declare void @_ZN3Bio5resetEv(ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #2

declare void @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #2

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

declare noundef ptr @_ZN3Bio8internalEv(ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9SSLObjectI9PKCS12_stE7setDataEPS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: nounwind
declare void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #6

attributes #0 = { mustprogress 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 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 #4 = { nobuiltin allocsize(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 #5 = { nobuiltin 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { noreturn }
attributes #10 = { builtin 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++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass