; LLVM IR from Trusted-eSign/trusted-crypto :: deps/wrapper/src/cms (signed_data)

; 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.8 = type { ptr }

@logger = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@.str.14 = external hidden unnamed_addr constant [31 x i8], align 1
@__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE = external hidden unnamed_addr constant [6 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [18 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 void @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, ptr noundef, ptr noundef, ...) #1

declare i32 @__gxx_personality_v0(...)

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

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

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

; 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 #5

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

; Function Attrs: nounwind
declare noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176)) #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 #6 align 2

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

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

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

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

25:                                               ; preds = %3
  br i1 %24, label %26, label %66

26:                                               ; preds = %25
  %27 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef @.str.16, i32 noundef 1)
          to label %28 unwind label %36

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %29 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #8
          to label %30 unwind label %40

30:                                               ; preds = %28
  store i1 true, ptr %12, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef null)
          to label %31 unwind label %44

31:                                               ; preds = %30
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %29, i1 noundef zeroext false, ptr noundef @.str.2, i32 noundef 130, i32 noundef 0, ptr noundef @.str.3, ptr noundef @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef %11, ptr noundef @.str.16, i32 noundef 1)
          to label %32 unwind label %48

32:                                               ; preds = %31
  store i1 false, ptr %12, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef %29)
          to label %33 unwind label %48

33:                                               ; preds = %32
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %34 = call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %35 unwind label %56

35:                                               ; preds = %33
  invoke void @__cxa_throw(ptr %34, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #9
          to label %217 unwind label %60

36:                                               ; preds = %172, %128, %126, %124, %122, %120, %76, %74, %72, %70, %68, %26, %3
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %8, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %9, align 4
  br label %211

40:                                               ; preds = %28
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %8, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %9, align 4
  br label %65

44:                                               ; preds = %30
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %8, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %9, align 4
  br label %52

48:                                               ; preds = %32, %31
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %8, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %9, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %52

52:                                               ; preds = %48, %44
  %53 = load i1, ptr %12, align 1
  br i1 %53, label %54, label %55

54:                                               ; preds = %52
  call void @_ZdlPvm(ptr noundef %29, i64 noundef 176) #10
  br label %55

55:                                               ; preds = %54, %52
  br label %65

56:                                               ; preds = %33
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %8, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %9, align 4
  call void @__cxa_free_exception(ptr %34) #7
  br label %64

60:                                               ; preds = %35
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %8, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %9, align 4
  br label %64

64:                                               ; preds = %60, %56
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br label %65

65:                                               ; preds = %64, %55, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %211

66:                                               ; preds = %25
  %67 = load i32, ptr %6, align 4, !tbaa !9
  switch i32 %67, label %172 [
    i32 0, label %68
    i32 1, label %120
  ]

68:                                               ; preds = %66
  %69 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %69, i32 noundef 32, ptr noundef @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef @.str.17)
          to label %70 unwind label %36

70:                                               ; preds = %68
  %71 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %72 unwind label %36

72:                                               ; preds = %70
  %73 = invoke noundef ptr @_ZN3Bio8internalEv(ptr noundef nonnull align 8 dereferenceable(9) %71)
          to label %74 unwind label %36

74:                                               ; preds = %72
  %75 = invoke noundef ptr @_ZN9SSLObjectI18CMS_ContentInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %76 unwind label %36

76:                                               ; preds = %74
  %77 = invoke i32 @i2d_CMS_bio(ptr noundef %73, ptr noundef %75)
          to label %78 unwind label %36

78:                                               ; preds = %76
  %79 = icmp slt i32 %77, 1
  br i1 %79, label %80, label %119

80:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %81 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #8
          to label %82 unwind label %93

82:                                               ; preds = %80
  store i1 true, ptr %15, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef null)
          to label %83 unwind label %97

83:                                               ; preds = %82
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %81, i1 noundef zeroext true, ptr noundef @.str.2, i32 noundef 137, i32 noundef 0, ptr noundef @.str.3, ptr noundef @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef %14, ptr noundef @.str.18, i64 noundef 0)
          to label %84 unwind label %101

84:                                               ; preds = %83
  store i1 false, ptr %15, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %81)
          to label %85 unwind label %101

85:                                               ; preds = %84
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %86 = load ptr, ptr @logger, align 8, !tbaa !5
  %87 = invoke noundef ptr @_ZNK6HandleI9ExceptionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %88 unwind label %109

88:                                               ; preds = %85
  %89 = call noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176) %87) #7
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger4warnEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %86, ptr noundef @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef @.str.5, ptr noundef %89)
          to label %90 unwind label %109

90:                                               ; preds = %88
  %91 = call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %92 unwind label %113

92:                                               ; preds = %90
  invoke void @__cxa_throw(ptr %91, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #9
          to label %217 unwind label %109

93:                                               ; preds = %80
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %8, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %9, align 4
  br label %118

97:                                               ; preds = %82
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %8, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %9, align 4
  br label %105

101:                                              ; preds = %84, %83
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %8, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %9, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %105

105:                                              ; preds = %101, %97
  %106 = load i1, ptr %15, align 1
  br i1 %106, label %107, label %108

107:                                              ; preds = %105
  call void @_ZdlPvm(ptr noundef %81, i64 noundef 176) #10
  br label %108

108:                                              ; preds = %107, %105
  br label %118

109:                                              ; preds = %92, %88, %85
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %8, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %9, align 4
  br label %117

113:                                              ; preds = %90
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %8, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %9, align 4
  call void @__cxa_free_exception(ptr %91) #7
  br label %117

117:                                              ; preds = %113, %109
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br label %118

118:                                              ; preds = %117, %108, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %211

119:                                              ; preds = %78
  br label %210

120:                                              ; preds = %66
  %121 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %121, i32 noundef 32, ptr noundef @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef @.str.19)
          to label %122 unwind label %36

122:                                              ; preds = %120
  %123 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %124 unwind label %36

124:                                              ; preds = %122
  %125 = invoke noundef ptr @_ZN3Bio8internalEv(ptr noundef nonnull align 8 dereferenceable(9) %123)
          to label %126 unwind label %36

126:                                              ; preds = %124
  %127 = invoke noundef ptr @_ZN9SSLObjectI18CMS_ContentInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %128 unwind label %36

128:                                              ; preds = %126
  %129 = invoke i32 @PEM_write_bio_CMS(ptr noundef %125, ptr noundef %127)
          to label %130 unwind label %36

130:                                              ; preds = %128
  %131 = icmp slt i32 %129, 1
  br i1 %131, label %132, label %171

132:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %133 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #8
          to label %134 unwind label %145

134:                                              ; preds = %132
  store i1 true, ptr %18, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef null)
          to label %135 unwind label %149

135:                                              ; preds = %134
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %133, i1 noundef zeroext true, ptr noundef @.str.2, i32 noundef 147, i32 noundef 0, ptr noundef @.str.3, ptr noundef @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef %17, ptr noundef @.str.20, i64 noundef 0)
          to label %136 unwind label %153

136:                                              ; preds = %135
  store i1 false, ptr %18, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef %133)
          to label %137 unwind label %153

137:                                              ; preds = %136
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  %138 = load ptr, ptr @logger, align 8, !tbaa !5
  %139 = invoke noundef ptr @_ZNK6HandleI9ExceptionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %140 unwind label %161

140:                                              ; preds = %137
  %141 = call noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176) %139) #7
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger4warnEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %138, ptr noundef @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef @.str.5, ptr noundef %141)
          to label %142 unwind label %161

142:                                              ; preds = %140
  %143 = call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %143, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %144 unwind label %165

144:                                              ; preds = %142
  invoke void @__cxa_throw(ptr %143, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #9
          to label %217 unwind label %161

145:                                              ; preds = %132
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %8, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %9, align 4
  br label %170

149:                                              ; preds = %134
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %8, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %9, align 4
  br label %157

153:                                              ; preds = %136, %135
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %8, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %9, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br label %157

157:                                              ; preds = %153, %149
  %158 = load i1, ptr %18, align 1
  br i1 %158, label %159, label %160

159:                                              ; preds = %157
  call void @_ZdlPvm(ptr noundef %133, i64 noundef 176) #10
  br label %160

160:                                              ; preds = %159, %157
  br label %170

161:                                              ; preds = %144, %140, %137
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %8, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %9, align 4
  br label %169

165:                                              ; preds = %142
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %8, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %9, align 4
  call void @__cxa_free_exception(ptr %143) #7
  br label %169

169:                                              ; preds = %165, %161
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br label %170

170:                                              ; preds = %169, %160, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %211

171:                                              ; preds = %130
  br label %210

172:                                              ; preds = %66
  %173 = load ptr, ptr @logger, align 8, !tbaa !5
  %174 = load i32, ptr %6, align 4, !tbaa !9
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %173, ptr noundef @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef @.str.14, i32 noundef %174)
          to label %175 unwind label %36

175:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %176 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #8
          to label %177 unwind label %184

177:                                              ; preds = %175
  store i1 true, ptr %21, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef null)
          to label %178 unwind label %188

178:                                              ; preds = %177
  %179 = load i32, ptr %6, align 4, !tbaa !9
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %176, i1 noundef zeroext false, ptr noundef @.str.2, i32 noundef 156, i32 noundef 0, ptr noundef @.str.3, ptr noundef @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef %20, ptr noundef @.str.14, i32 noundef %179)
          to label %180 unwind label %192

180:                                              ; preds = %178
  store i1 false, ptr %21, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef %176)
          to label %181 unwind label %192

181:                                              ; preds = %180
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  %182 = call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %182, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %183 unwind label %200

183:                                              ; preds = %181
  invoke void @__cxa_throw(ptr %182, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #9
          to label %217 unwind label %204

184:                                              ; preds = %175
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %8, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %9, align 4
  br label %209

188:                                              ; preds = %177
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %8, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %9, align 4
  br label %196

192:                                              ; preds = %180, %178
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %8, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %9, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  br label %196

196:                                              ; preds = %192, %188
  %197 = load i1, ptr %21, align 1
  br i1 %197, label %198, label %199

198:                                              ; preds = %196
  call void @_ZdlPvm(ptr noundef %176, i64 noundef 176) #10
  br label %199

199:                                              ; preds = %198, %196
  br label %209

200:                                              ; preds = %181
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %8, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %9, align 4
  call void @__cxa_free_exception(ptr %182) #7
  br label %208

204:                                              ; preds = %183
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %8, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %9, align 4
  br label %208

208:                                              ; preds = %204, %200
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br label %209

209:                                              ; preds = %208, %199, %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %211

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

211:                                              ; preds = %209, %170, %118, %65, %36
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  br label %212

212:                                              ; preds = %211
  %213 = load ptr, ptr %8, align 8
  %214 = load i32, ptr %9, align 4
  %215 = insertvalue { ptr, i32 } poison, ptr %213, 0
  %216 = insertvalue { ptr, i32 } %215, i32 %214, 1
  resume { ptr, i32 } %216

217:                                              ; preds = %183, %144, %92, %35
  unreachable
}

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

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

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 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 = { 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 #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"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN10DataFormat11DATA_FORMATE", !7, i64 0}


; 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.8 = type { ptr }

@logger = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@.str.14 = external hidden unnamed_addr constant [31 x i8], align 1
@__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE = external hidden unnamed_addr constant [6 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [18 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 void @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

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

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

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

; 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 #5

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

; Function Attrs: nounwind
declare noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176)) 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 #6 align 2

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

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

declare void @_ZN6Logger5errorEPKcS1_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 @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

16:                                               ; preds = %3
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef nonnull @.str.16, i32 noundef 1)
          to label %17 unwind label %25

17:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %18 = invoke noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #8
          to label %19 unwind label %27

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

20:                                               ; preds = %19
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %18, i1 noundef zeroext false, ptr noundef nonnull @.str.2, i32 noundef 130, i32 noundef 0, ptr noundef nonnull @.str.3, ptr noundef nonnull @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef nonnull %6, ptr noundef nonnull @.str.16, i32 noundef 1)
          to label %22 unwind label %.thread45

.thread45:                                        ; preds = %20
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br label %32

22:                                               ; preds = %20
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %18)
          to label %23 unwind label %30

23:                                               ; preds = %22
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %24 = call ptr @__cxa_allocate_exception(i64 8) #7
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %5)
  invoke void @__cxa_throw(ptr nonnull %24, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #9
          to label %123 unwind label %33

25:                                               ; preds = %103, %77, %75, %73, %71, %70, %44, %42, %40, %38, %37, %16
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %122

27:                                               ; preds = %17
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %35

.thread:                                          ; preds = %19
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %32

30:                                               ; preds = %22
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br label %35

32:                                               ; preds = %.thread45, %.thread
  %.pn3744 = phi { ptr, i32 } [ %29, %.thread ], [ %21, %.thread45 ]
  call void @_ZdlPvm(ptr noundef nonnull %18, i64 noundef 176) #10
  br label %35

33:                                               ; preds = %23
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br label %35

35:                                               ; preds = %30, %32, %33, %27
  %.pn39 = phi { ptr, i32 } [ %34, %33 ], [ %.pn3744, %32 ], [ %31, %30 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %122

36:                                               ; preds = %3
  switch i32 %2, label %103 [
    i32 0, label %37
    i32 1, label %70
  ]

37:                                               ; preds = %36
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 32, ptr noundef nonnull @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef nonnull @.str.17)
          to label %38 unwind label %25

38:                                               ; preds = %37
  %39 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %40 unwind label %25

40:                                               ; preds = %38
  %41 = invoke noundef ptr @_ZN3Bio8internalEv(ptr noundef nonnull align 8 dereferenceable(9) %39)
          to label %42 unwind label %25

42:                                               ; preds = %40
  %43 = invoke noundef ptr @_ZN9SSLObjectI18CMS_ContentInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %44 unwind label %25

44:                                               ; preds = %42
  %45 = invoke i32 @i2d_CMS_bio(ptr noundef %41, ptr noundef %43)
          to label %46 unwind label %25

46:                                               ; preds = %44
  %47 = icmp slt i32 %45, 1
  br i1 %47, label %48, label %121

48:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %49 = invoke noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #8
          to label %50 unwind label %61

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

51:                                               ; preds = %50
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %49, i1 noundef zeroext true, ptr noundef nonnull @.str.2, i32 noundef 137, i32 noundef 0, ptr noundef nonnull @.str.3, ptr noundef nonnull @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef nonnull %8, ptr noundef nonnull @.str.18, i64 noundef 0)
          to label %53 unwind label %.thread51

.thread51:                                        ; preds = %51
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br label %66

53:                                               ; preds = %51
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull %49)
          to label %54 unwind label %64

54:                                               ; preds = %53
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %55 = load ptr, ptr @logger, align 8, !tbaa !5
  %56 = invoke noundef ptr @_ZNK6HandleI9ExceptionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %57 unwind label %67

57:                                               ; preds = %54
  %58 = call noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176) %56) #7
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger4warnEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %55, ptr noundef nonnull @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef nonnull @.str.5, ptr noundef %58)
          to label %59 unwind label %67

59:                                               ; preds = %57
  %60 = call ptr @__cxa_allocate_exception(i64 8) #7
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull align 8 dereferenceable(8) %7)
  invoke void @__cxa_throw(ptr nonnull %60, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #9
          to label %123 unwind label %67

61:                                               ; preds = %48
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %69

.thread47:                                        ; preds = %50
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %66

64:                                               ; preds = %53
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br label %69

66:                                               ; preds = %.thread51, %.thread47
  %.pn2950 = phi { ptr, i32 } [ %63, %.thread47 ], [ %52, %.thread51 ]
  call void @_ZdlPvm(ptr noundef nonnull %49, i64 noundef 176) #10
  br label %69

67:                                               ; preds = %59, %57, %54
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br label %69

69:                                               ; preds = %64, %66, %67, %61
  %.pn31 = phi { ptr, i32 } [ %68, %67 ], [ %.pn2950, %66 ], [ %65, %64 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %122

70:                                               ; preds = %36
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 32, ptr noundef nonnull @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef nonnull @.str.19)
          to label %71 unwind label %25

71:                                               ; preds = %70
  %72 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %73 unwind label %25

73:                                               ; preds = %71
  %74 = invoke noundef ptr @_ZN3Bio8internalEv(ptr noundef nonnull align 8 dereferenceable(9) %72)
          to label %75 unwind label %25

75:                                               ; preds = %73
  %76 = invoke noundef ptr @_ZN9SSLObjectI18CMS_ContentInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %77 unwind label %25

77:                                               ; preds = %75
  %78 = invoke i32 @PEM_write_bio_CMS(ptr noundef %74, ptr noundef %76)
          to label %79 unwind label %25

79:                                               ; preds = %77
  %80 = icmp slt i32 %78, 1
  br i1 %80, label %81, label %121

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

83:                                               ; preds = %81
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef null)
          to label %84 unwind label %.thread53

84:                                               ; preds = %83
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %82, i1 noundef zeroext true, ptr noundef nonnull @.str.2, i32 noundef 147, i32 noundef 0, ptr noundef nonnull @.str.3, ptr noundef nonnull @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef nonnull %10, ptr noundef nonnull @.str.20, i64 noundef 0)
          to label %86 unwind label %.thread57

.thread57:                                        ; preds = %84
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br label %99

86:                                               ; preds = %84
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull %82)
          to label %87 unwind label %97

87:                                               ; preds = %86
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  %88 = load ptr, ptr @logger, align 8, !tbaa !5
  %89 = invoke noundef ptr @_ZNK6HandleI9ExceptionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %90 unwind label %100

90:                                               ; preds = %87
  %91 = call noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176) %89) #7
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger4warnEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %88, ptr noundef nonnull @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef nonnull @.str.5, ptr noundef %91)
          to label %92 unwind label %100

92:                                               ; preds = %90
  %93 = call ptr @__cxa_allocate_exception(i64 8) #7
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull align 8 dereferenceable(8) %9)
  invoke void @__cxa_throw(ptr nonnull %93, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #9
          to label %123 unwind label %100

94:                                               ; preds = %81
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %102

.thread53:                                        ; preds = %83
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %99

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

99:                                               ; preds = %.thread57, %.thread53
  %.pn56 = phi { ptr, i32 } [ %96, %.thread53 ], [ %85, %.thread57 ]
  call void @_ZdlPvm(ptr noundef nonnull %82, i64 noundef 176) #10
  br label %102

100:                                              ; preds = %92, %90, %87
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br label %102

102:                                              ; preds = %97, %99, %100, %94
  %.pn27 = phi { ptr, i32 } [ %101, %100 ], [ %.pn56, %99 ], [ %98, %97 ], [ %95, %94 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %122

103:                                              ; preds = %36
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef nonnull @.str.14, i32 noundef %2)
          to label %104 unwind label %25

104:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %105 = invoke noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #8
          to label %106 unwind label %112

106:                                              ; preds = %104
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef null)
          to label %107 unwind label %.thread59

107:                                              ; preds = %106
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %105, i1 noundef zeroext false, ptr noundef nonnull @.str.2, i32 noundef 156, i32 noundef 0, ptr noundef nonnull @.str.3, ptr noundef nonnull @__FUNCTION__._ZN10SignedData5writeE6HandleI3BioEN10DataFormat11DATA_FORMATE, ptr noundef nonnull %12, ptr noundef nonnull @.str.14, i32 noundef %2)
          to label %109 unwind label %.thread63

.thread63:                                        ; preds = %107
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br label %117

109:                                              ; preds = %107
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull %105)
          to label %110 unwind label %115

110:                                              ; preds = %109
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %111 = call ptr @__cxa_allocate_exception(i64 8) #7
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef nonnull align 8 dereferenceable(8) %11)
  invoke void @__cxa_throw(ptr nonnull %111, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #9
          to label %123 unwind label %118

112:                                              ; preds = %104
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %120

.thread59:                                        ; preds = %106
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %117

115:                                              ; preds = %109
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br label %120

117:                                              ; preds = %.thread63, %.thread59
  %.pn3362 = phi { ptr, i32 } [ %114, %.thread59 ], [ %108, %.thread63 ]
  call void @_ZdlPvm(ptr noundef nonnull %105, i64 noundef 176) #10
  br label %120

118:                                              ; preds = %110
  %119 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %120

120:                                              ; preds = %115, %117, %118, %112
  %.pn35 = phi { ptr, i32 } [ %119, %118 ], [ %.pn3362, %117 ], [ %116, %115 ], [ %113, %112 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %122

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

122:                                              ; preds = %120, %102, %69, %35, %25
  %.pn39.pn = phi { ptr, i32 } [ %.pn39, %35 ], [ %26, %25 ], [ %.pn35, %120 ], [ %.pn27, %102 ], [ %.pn31, %69 ]
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn39.pn

123:                                              ; preds = %110, %92, %59, %23
  unreachable
}

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

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

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 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 = { 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 #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