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

; 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.Handle.4 = type { ptr }
%class.LoggerFunction = type { %class.Handle.0, ptr }
%class.Handle.0 = type { ptr }
%class.Handle.1 = type { ptr }
%class.Handle.2 = type { ptr }

@logger = external global ptr, align 8
@.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.7 = external hidden unnamed_addr constant [3 x i8], align 1
@__FUNCTION__._ZN6Pkcs1214getCertificateEPKc = external hidden unnamed_addr constant [15 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [34 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #3 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 #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 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 #4 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) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN9SSLObjectI9PKCS12_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

declare void @_ZN6Logger4warnEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ...) #1

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

; Function Attrs: nounwind
declare noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176)) #6

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #7

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Pkcs1214getCertificateEPKc(ptr dead_on_unwind noalias writable sret(%class.Handle.4) align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %class.LoggerFunction, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %class.Handle.1, align 8
  %14 = alloca %class.Handle.1, align 8
  %15 = alloca i1, align 1
  %16 = alloca %class.Handle.2, align 8
  %17 = alloca i1, align 1
  %18 = alloca %class.Handle.1, align 8
  %19 = alloca %class.Handle.1, align 8
  %20 = alloca i1, align 1
  %21 = alloca ptr, align 8
  %22 = alloca %class.Handle.1, align 8
  %23 = alloca %class.Handle.1, align 8
  %24 = alloca i1, align 1
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %25 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #9
  %26 = load ptr, ptr @logger, align 8, !tbaa !5
  call void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef %26, ptr noundef @__FUNCTION__._ZN6Pkcs1214getCertificateEPKc)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  store ptr null, ptr %10, align 8, !tbaa !5
  %27 = invoke noundef ptr @_ZN9SSLObjectI9PKCS12_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %25)
          to label %28 unwind label %46

28:                                               ; preds = %3
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = invoke i32 @PKCS12_parse(ptr noundef %27, ptr noundef %29, ptr noundef %8, ptr noundef %9, ptr noundef %10)
          to label %31 unwind label %46

31:                                               ; preds = %28
  %32 = icmp ne i32 %30, 0
  br i1 %32, label %76, label %33

33:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %34 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #10
          to label %35 unwind label %50

35:                                               ; preds = %33
  store i1 true, ptr %15, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef null)
          to label %36 unwind label %54

36:                                               ; preds = %35
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %34, i1 noundef zeroext true, ptr noundef @.str.1, i32 noundef 66, i32 noundef 0, ptr noundef @.str.2, ptr noundef @__FUNCTION__._ZN6Pkcs1214getCertificateEPKc, ptr noundef %14, ptr noundef @.str.11, i64 noundef 0)
          to label %37 unwind label %58

37:                                               ; preds = %36
  store i1 false, ptr %15, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %34)
          to label %38 unwind label %58

38:                                               ; preds = %37
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  %39 = load ptr, ptr @logger, align 8, !tbaa !5
  %40 = invoke noundef ptr @_ZNK6HandleI9ExceptionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %41 unwind label %66

41:                                               ; preds = %38
  %42 = call noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176) %40) #9
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger4warnEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef @__FUNCTION__._ZN6Pkcs1214getCertificateEPKc, ptr noundef @.str.7, ptr noundef %42)
          to label %43 unwind label %66

43:                                               ; preds = %41
  %44 = call ptr @__cxa_allocate_exception(i64 8) #9
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %45 unwind label %70

45:                                               ; preds = %43
  invoke void @__cxa_throw(ptr %44, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #11
          to label %194 unwind label %66

46:                                               ; preds = %98, %79, %28, %3
  %47 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %11, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %12, align 4
  br label %134

50:                                               ; preds = %33
  %51 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %11, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %12, align 4
  br label %75

54:                                               ; preds = %35
  %55 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %11, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %12, align 4
  br label %62

58:                                               ; preds = %37, %36
  %59 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %11, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %12, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  br label %62

62:                                               ; preds = %58, %54
  %63 = load i1, ptr %15, align 1
  br i1 %63, label %64, label %65

64:                                               ; preds = %62
  call void @_ZdlPvm(ptr noundef %34, i64 noundef 176) #12
  br label %65

65:                                               ; preds = %64, %62
  br label %75

66:                                               ; preds = %45, %41, %38
  %67 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %11, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %12, align 4
  br label %74

70:                                               ; preds = %43
  %71 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %11, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %12, align 4
  call void @__cxa_free_exception(ptr %44) #9
  br label %74

74:                                               ; preds = %70, %66
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br label %75

75:                                               ; preds = %74, %65, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %134

76:                                               ; preds = %31
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %98

79:                                               ; preds = %76
  %80 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #10
          to label %81 unwind label %46

81:                                               ; preds = %79
  store i1 true, ptr %17, align 1
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @_ZN6HandleI7SObjectEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef null)
          to label %83 unwind label %86

83:                                               ; preds = %81
  invoke void @_ZN11CertificateC2EP7x509_st6HandleI7SObjectE(ptr noundef nonnull align 8 dereferenceable(16) %80, ptr noundef %82, ptr noundef %16)
          to label %84 unwind label %90

84:                                               ; preds = %83
  store i1 false, ptr %17, align 1
  invoke void @_ZN6HandleI11CertificateEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %80)
          to label %85 unwind label %90

85:                                               ; preds = %84
  call void @_ZN6HandleI7SObjectED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #9
  ret void

86:                                               ; preds = %81
  %87 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %11, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %12, align 4
  br label %94

90:                                               ; preds = %84, %83
  %91 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %11, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %12, align 4
  call void @_ZN6HandleI7SObjectED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  br label %94

94:                                               ; preds = %90, %86
  %95 = load i1, ptr %17, align 1
  br i1 %95, label %96, label %97

96:                                               ; preds = %94
  call void @_ZdlPvm(ptr noundef %80, i64 noundef 16) #12
  br label %97

97:                                               ; preds = %96, %94
  br label %134

98:                                               ; preds = %76
  %99 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %99, ptr noundef @__FUNCTION__._ZN6Pkcs1214getCertificateEPKc, ptr noundef @.str.12, i32 noundef 1)
          to label %100 unwind label %46

100:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %101 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #10
          to label %102 unwind label %108

102:                                              ; preds = %100
  store i1 true, ptr %20, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef null)
          to label %103 unwind label %112

103:                                              ; preds = %102
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %101, i1 noundef zeroext false, ptr noundef @.str.1, i32 noundef 73, i32 noundef 0, ptr noundef @.str.2, ptr noundef @__FUNCTION__._ZN6Pkcs1214getCertificateEPKc, ptr noundef %19, ptr noundef @.str.12, i32 noundef 1)
          to label %104 unwind label %116

104:                                              ; preds = %103
  store i1 false, ptr %20, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef %101)
          to label %105 unwind label %116

105:                                              ; preds = %104
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  %106 = call ptr @__cxa_allocate_exception(i64 8) #9
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %107 unwind label %124

107:                                              ; preds = %105
  invoke void @__cxa_throw(ptr %106, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #11
          to label %194 unwind label %128

108:                                              ; preds = %100
  %109 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %11, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %12, align 4
  br label %133

112:                                              ; preds = %102
  %113 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %11, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %12, align 4
  br label %120

116:                                              ; preds = %104, %103
  %117 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %11, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %12, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  br label %120

120:                                              ; preds = %116, %112
  %121 = load i1, ptr %20, align 1
  br i1 %121, label %122, label %123

122:                                              ; preds = %120
  call void @_ZdlPvm(ptr noundef %101, i64 noundef 176) #12
  br label %123

123:                                              ; preds = %122, %120
  br label %133

124:                                              ; preds = %105
  %125 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %11, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %12, align 4
  call void @__cxa_free_exception(ptr %106) #9
  br label %132

128:                                              ; preds = %107
  %129 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %11, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %12, align 4
  br label %132

132:                                              ; preds = %128, %124
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  br label %133

133:                                              ; preds = %132, %123, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %134

134:                                              ; preds = %133, %97, %75, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %12, align 4
  %137 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTI6HandleI9ExceptionE) #9
  %138 = icmp eq i32 %136, %137
  br i1 %138, label %139, label %185

139:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %140 = load ptr, ptr %11, align 8
  %141 = call ptr @__cxa_begin_catch(ptr %140) #9
  store ptr %141, ptr %21, align 8
  %142 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %142, ptr noundef @__FUNCTION__._ZN6Pkcs1214getCertificateEPKc, ptr noundef @.str.13)
          to label %143 unwind label %152

143:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %144 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #10
          to label %145 unwind label %156

145:                                              ; preds = %143
  store i1 true, ptr %24, align 1
  %146 = load ptr, ptr %21, align 8, !tbaa !5
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %146)
          to label %147 unwind label %160

147:                                              ; preds = %145
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %144, i1 noundef zeroext false, ptr noundef @.str.1, i32 noundef 78, i32 noundef 0, ptr noundef @.str.2, ptr noundef @__FUNCTION__._ZN6Pkcs1214getCertificateEPKc, ptr noundef %23, ptr noundef @.str.13)
          to label %148 unwind label %164

148:                                              ; preds = %147
  store i1 false, ptr %24, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef %144)
          to label %149 unwind label %164

149:                                              ; preds = %148
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  %150 = call ptr @__cxa_allocate_exception(i64 8) #9
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %151 unwind label %172

151:                                              ; preds = %149
  invoke void @__cxa_throw(ptr %150, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #11
          to label %194 unwind label %176

152:                                              ; preds = %139
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %11, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %12, align 4
  br label %182

156:                                              ; preds = %143
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %11, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %12, align 4
  br label %181

160:                                              ; preds = %145
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %11, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %12, align 4
  br label %168

164:                                              ; preds = %148, %147
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %11, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %12, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  br label %168

168:                                              ; preds = %164, %160
  %169 = load i1, ptr %24, align 1
  br i1 %169, label %170, label %171

170:                                              ; preds = %168
  call void @_ZdlPvm(ptr noundef %144, i64 noundef 176) #12
  br label %171

171:                                              ; preds = %170, %168
  br label %181

172:                                              ; preds = %149
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %11, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %12, align 4
  call void @__cxa_free_exception(ptr %150) #9
  br label %180

176:                                              ; preds = %151
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %11, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %12, align 4
  br label %180

180:                                              ; preds = %176, %172
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  br label %181

181:                                              ; preds = %180, %171, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %182

182:                                              ; preds = %181, %152
  invoke void @__cxa_end_catch()
          to label %183 unwind label %191

183:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %185

184:                                              ; No predecessors!
  unreachable

185:                                              ; preds = %183, %135
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #9
  br label %186

186:                                              ; preds = %185
  %187 = load ptr, ptr %11, align 8
  %188 = load i32, ptr %12, align 4
  %189 = insertvalue { ptr, i32 } poison, ptr %187, 0
  %190 = insertvalue { ptr, i32 } %189, i32 %188, 1
  resume { ptr, i32 } %190

191:                                              ; preds = %182
  %192 = landingpad { ptr, i32 }
          catch ptr null
  %193 = extractvalue { ptr, i32 } %192, 0
  call void @__clang_call_terminate(ptr %193) #13
  unreachable

194:                                              ; preds = %151, %107, %45
  unreachable
}

declare i32 @PKCS12_parse(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 #2 = { 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 #3 = { 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 #4 = { 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 #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 memory(none) }
attributes #8 = { noinline noreturn nounwind uwtable "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 #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { noreturn }
attributes #12 = { builtin nounwind }
attributes #13 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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.Handle.4 = type { ptr }
%class.LoggerFunction = type { %class.Handle.0, ptr }
%class.Handle.0 = type { ptr }
%class.Handle.1 = type { ptr }
%class.Handle.2 = type { ptr }

@logger = external local_unnamed_addr global ptr, align 8
@.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.7 = external hidden unnamed_addr constant [3 x i8], align 1
@__FUNCTION__._ZN6Pkcs1214getCertificateEPKc = external hidden unnamed_addr constant [15 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [34 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #3 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 #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 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 #4 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) #0

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

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

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

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

; Function Attrs: nounwind
declare noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #6

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #7

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #8

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

17:                                               ; preds = %3
  %18 = invoke i32 @PKCS12_parse(ptr noundef %16, ptr noundef %2, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7)
          to label %19 unwind label %33

19:                                               ; preds = %17
  %.not = icmp eq i32 %18, 0
  br i1 %.not, label %20, label %44

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

22:                                               ; preds = %20
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef null)
          to label %23 unwind label %.thread

23:                                               ; preds = %22
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %21, i1 noundef zeroext true, ptr noundef nonnull @.str.1, i32 noundef 66, i32 noundef 0, ptr noundef nonnull @.str.2, ptr noundef nonnull @__FUNCTION__._ZN6Pkcs1214getCertificateEPKc, ptr noundef nonnull %9, ptr noundef nonnull @.str.11, i64 noundef 0)
          to label %25 unwind label %.thread43

.thread43:                                        ; preds = %23
  %24 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  br label %40

25:                                               ; preds = %23
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull %21)
          to label %26 unwind label %38

26:                                               ; preds = %25
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  %27 = load ptr, ptr @logger, align 8, !tbaa !5
  %28 = invoke noundef ptr @_ZNK6HandleI9ExceptionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %29 unwind label %41

29:                                               ; preds = %26
  %30 = call noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176) %28) #9
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger4warnEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull @__FUNCTION__._ZN6Pkcs1214getCertificateEPKc, ptr noundef nonnull @.str.7, ptr noundef %30)
          to label %31 unwind label %41

31:                                               ; preds = %29
  %32 = call ptr @__cxa_allocate_exception(i64 8) #9
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %8)
  invoke void @__cxa_throw(ptr nonnull %32, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #11
          to label %104 unwind label %41

33:                                               ; preds = %57, %46, %17, %3
  %34 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %76

35:                                               ; preds = %20
  %36 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %43

.thread:                                          ; preds = %22
  %37 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %40

38:                                               ; preds = %25
  %39 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  br label %43

40:                                               ; preds = %.thread43, %.thread
  %.pn42 = phi { ptr, i32 } [ %37, %.thread ], [ %24, %.thread43 ]
  call void @_ZdlPvm(ptr noundef nonnull %21, i64 noundef 176) #12
  br label %43

41:                                               ; preds = %31, %29, %26
  %42 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  br label %43

43:                                               ; preds = %38, %40, %41, %35
  %.pn27 = phi { ptr, i32 } [ %42, %41 ], [ %.pn42, %40 ], [ %39, %38 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %76

44:                                               ; preds = %19
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %.not29 = icmp eq ptr %45, null
  br i1 %.not29, label %57, label %46

46:                                               ; preds = %44
  %47 = invoke noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #10
          to label %48 unwind label %33

48:                                               ; preds = %46
  invoke void @_ZN6HandleI7SObjectEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef null)
          to label %49 unwind label %.thread45

49:                                               ; preds = %48
  invoke void @_ZN11CertificateC2EP7x509_st6HandleI7SObjectE(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull %45, ptr noundef nonnull %10)
          to label %51 unwind label %.thread49

.thread49:                                        ; preds = %49
  %50 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  call void @_ZN6HandleI7SObjectED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #9
  br label %56

51:                                               ; preds = %49
  invoke void @_ZN6HandleI11CertificateEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %47)
          to label %52 unwind label %54

52:                                               ; preds = %51
  call void @_ZN6HandleI7SObjectED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  ret void

.thread45:                                        ; preds = %48
  %53 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %56

54:                                               ; preds = %51
  %55 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  call void @_ZN6HandleI7SObjectED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #9
  br label %76

56:                                               ; preds = %.thread49, %.thread45
  %.pn3448 = phi { ptr, i32 } [ %53, %.thread45 ], [ %50, %.thread49 ]
  call void @_ZdlPvm(ptr noundef nonnull %47, i64 noundef 16) #12
  br label %76

57:                                               ; preds = %44
  %58 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull @__FUNCTION__._ZN6Pkcs1214getCertificateEPKc, ptr noundef nonnull @.str.12, i32 noundef 1)
          to label %59 unwind label %33

59:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %60 = invoke noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #10
          to label %61 unwind label %67

61:                                               ; preds = %59
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef null)
          to label %62 unwind label %.thread51

62:                                               ; preds = %61
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %60, i1 noundef zeroext false, ptr noundef nonnull @.str.1, i32 noundef 73, i32 noundef 0, ptr noundef nonnull @.str.2, ptr noundef nonnull @__FUNCTION__._ZN6Pkcs1214getCertificateEPKc, ptr noundef nonnull %12, ptr noundef nonnull @.str.12, i32 noundef 1)
          to label %64 unwind label %.thread55

.thread55:                                        ; preds = %62
  %63 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  br label %72

64:                                               ; preds = %62
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull %60)
          to label %65 unwind label %70

65:                                               ; preds = %64
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  %66 = call ptr @__cxa_allocate_exception(i64 8) #9
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull align 8 dereferenceable(8) %11)
  invoke void @__cxa_throw(ptr nonnull %66, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #11
          to label %104 unwind label %73

67:                                               ; preds = %59
  %68 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %75

.thread51:                                        ; preds = %61
  %69 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %72

70:                                               ; preds = %64
  %71 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  br label %75

72:                                               ; preds = %.thread55, %.thread51
  %.pn3054 = phi { ptr, i32 } [ %69, %.thread51 ], [ %63, %.thread55 ]
  call void @_ZdlPvm(ptr noundef nonnull %60, i64 noundef 176) #12
  br label %75

73:                                               ; preds = %65
  %74 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  br label %75

75:                                               ; preds = %70, %72, %73, %67
  %.pn32 = phi { ptr, i32 } [ %74, %73 ], [ %.pn3054, %72 ], [ %71, %70 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  br label %76

76:                                               ; preds = %54, %56, %75, %43, %33
  %.pn34.pn = phi { ptr, i32 } [ %.pn3448, %56 ], [ %55, %54 ], [ %34, %33 ], [ %.pn32, %75 ], [ %.pn27, %43 ]
  %.522 = extractvalue { ptr, i32 } %.pn34.pn, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  %77 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTI6HandleI9ExceptionE) #9
  %78 = icmp eq i32 %.522, %77
  br i1 %78, label %79, label %100

79:                                               ; preds = %76
  %.5 = extractvalue { ptr, i32 } %.pn34.pn, 0
  %80 = call ptr @__cxa_begin_catch(ptr %.5) #9
  %81 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %81, ptr noundef nonnull @__FUNCTION__._ZN6Pkcs1214getCertificateEPKc, ptr noundef nonnull @.str.13)
          to label %82 unwind label %88

82:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  %83 = invoke noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #10
          to label %84 unwind label %90

84:                                               ; preds = %82
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %80)
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %83, i1 noundef zeroext false, ptr noundef nonnull @.str.1, i32 noundef 78, i32 noundef 0, ptr noundef nonnull @.str.2, ptr noundef nonnull @__FUNCTION__._ZN6Pkcs1214getCertificateEPKc, ptr noundef nonnull %14, ptr noundef nonnull @.str.13)
          to label %85 unwind label %94

85:                                               ; preds = %84
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull %83)
          to label %86 unwind label %92

86:                                               ; preds = %85
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  %87 = call ptr @__cxa_allocate_exception(i64 8) #9
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef nonnull align 8 dereferenceable(8) %13)
  invoke void @__cxa_throw(ptr nonnull %87, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #11
          to label %104 unwind label %96

88:                                               ; preds = %79
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %99

90:                                               ; preds = %82
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %98

92:                                               ; preds = %85
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  br label %98

94:                                               ; preds = %84
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  call void @_ZdlPvm(ptr noundef nonnull %83, i64 noundef 176) #12
  br label %98

96:                                               ; preds = %86
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br label %98

98:                                               ; preds = %92, %94, %96, %90
  %.pn37 = phi { ptr, i32 } [ %97, %96 ], [ %95, %94 ], [ %93, %92 ], [ %91, %90 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  br label %99

99:                                               ; preds = %98, %88
  %.pn37.pn = phi { ptr, i32 } [ %.pn37, %98 ], [ %89, %88 ]
  invoke void @__cxa_end_catch()
          to label %100 unwind label %101

100:                                              ; preds = %99, %76
  %.merged = phi { ptr, i32 } [ %.pn34.pn, %76 ], [ %.pn37.pn, %99 ]
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  resume { ptr, i32 } %.merged

101:                                              ; preds = %99
  %102 = landingpad { ptr, i32 }
          catch ptr null
  %103 = extractvalue { ptr, i32 } %102, 0
  call void @__clang_call_terminate(ptr %103) #13
  unreachable

104:                                              ; preds = %86, %65, %31
  unreachable
}

declare i32 @PKCS12_parse(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 #2 = { 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 #3 = { 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 #4 = { 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 #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 = { nofree nosync nounwind memory(none) }
attributes #8 = { noinline noreturn nounwind uwtable "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 #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { noreturn }
attributes #12 = { builtin nounwind }
attributes #13 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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