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

; 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.3 = type { ptr }
%class.SignerAttributeCollection = type <{ %class.Handle, i8, [7 x i8] }>
%class.Handle = type { ptr }

@logger = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 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
@__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [23 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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

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

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

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

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

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

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

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)) #3

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 #5 align 2

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

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

19:                                               ; preds = %2
  %20 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %20, i32 noundef 32, ptr noundef @__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE, ptr noundef @.str.9)
          to label %21 unwind label %47

21:                                               ; preds = %19
  %22 = getelementptr inbounds %class.SignerAttributeCollection, ptr %14, i32 0, i32 0
  %23 = invoke noundef ptr @_ZNK6HandleI6SignerEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %24 unwind label %47

24:                                               ; preds = %21
  %25 = invoke noundef ptr @_ZN9SSLObjectI17CMS_SignerInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %26 unwind label %47

26:                                               ; preds = %24
  %27 = invoke noundef ptr @_ZNK6HandleI9AttributeEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %28 unwind label %47

28:                                               ; preds = %26
  %29 = invoke noundef ptr @_ZN9SSLObjectI18x509_attributes_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %27)
          to label %30 unwind label %47

30:                                               ; preds = %28
  %31 = invoke i32 @CMS_signed_add1_attr(ptr noundef %25, ptr noundef %29)
          to label %32 unwind label %47

32:                                               ; preds = %30
  %33 = icmp slt i32 %31, 1
  br i1 %33, label %34, label %77

34:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %35 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #8
          to label %36 unwind label %51

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

37:                                               ; preds = %36
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %35, i1 noundef zeroext true, ptr noundef @.str.2, i32 noundef 87, i32 noundef 0, ptr noundef @.str.3, ptr noundef @__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE, ptr noundef %9, ptr noundef @.str.10)
          to label %38 unwind label %59

38:                                               ; preds = %37
  store i1 false, ptr %10, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef %35)
          to label %39 unwind label %59

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

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

44:                                               ; preds = %42
  %45 = call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %46 unwind label %71

46:                                               ; preds = %44
  invoke void @__cxa_throw(ptr %45, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #9
          to label %140 unwind label %67

47:                                               ; preds = %89, %87, %85, %83, %80, %78, %30, %28, %26, %24, %21, %19
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %6, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %7, align 4
  br label %134

51:                                               ; preds = %34
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %6, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %7, align 4
  br label %76

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

59:                                               ; preds = %38, %37
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %6, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %7, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br label %63

63:                                               ; preds = %59, %55
  %64 = load i1, ptr %10, align 1
  br i1 %64, label %65, label %66

65:                                               ; preds = %63
  call void @_ZdlPvm(ptr noundef %35, i64 noundef 176) #10
  br label %66

66:                                               ; preds = %65, %63
  br label %76

67:                                               ; preds = %46, %42, %39
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %6, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %7, align 4
  br label %75

71:                                               ; preds = %44
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %6, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %7, align 4
  call void @__cxa_free_exception(ptr %45) #7
  br label %75

75:                                               ; preds = %71, %67
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br label %76

76:                                               ; preds = %75, %66, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %134

77:                                               ; preds = %32
  br label %133

78:                                               ; preds = %2
  %79 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %79, i32 noundef 32, ptr noundef @__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE, ptr noundef @.str.11)
          to label %80 unwind label %47

80:                                               ; preds = %78
  %81 = getelementptr inbounds %class.SignerAttributeCollection, ptr %14, i32 0, i32 0
  %82 = invoke noundef ptr @_ZNK6HandleI6SignerEptEv(ptr noundef nonnull align 8 dereferenceable(8) %81)
          to label %83 unwind label %47

83:                                               ; preds = %80
  %84 = invoke noundef ptr @_ZN9SSLObjectI17CMS_SignerInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %82)
          to label %85 unwind label %47

85:                                               ; preds = %83
  %86 = invoke noundef ptr @_ZNK6HandleI9AttributeEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %87 unwind label %47

87:                                               ; preds = %85
  %88 = invoke noundef ptr @_ZN9SSLObjectI18x509_attributes_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %86)
          to label %89 unwind label %47

89:                                               ; preds = %87
  %90 = invoke i32 @CMS_unsigned_add1_attr(ptr noundef %84, ptr noundef %88)
          to label %91 unwind label %47

91:                                               ; preds = %89
  %92 = icmp slt i32 %90, 1
  br i1 %92, label %93, label %132

93:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %94 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #8
          to label %95 unwind label %106

95:                                               ; preds = %93
  store i1 true, ptr %13, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef null)
          to label %96 unwind label %110

96:                                               ; preds = %95
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %94, i1 noundef zeroext true, ptr noundef @.str.2, i32 noundef 93, i32 noundef 0, ptr noundef @.str.3, ptr noundef @__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE, ptr noundef %12, ptr noundef @.str.12)
          to label %97 unwind label %114

97:                                               ; preds = %96
  store i1 false, ptr %13, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef %94)
          to label %98 unwind label %114

98:                                               ; preds = %97
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %99 = load ptr, ptr @logger, align 8, !tbaa !5
  %100 = invoke noundef ptr @_ZNK6HandleI9ExceptionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %101 unwind label %122

101:                                              ; preds = %98
  %102 = call noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176) %100) #7
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger4warnEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %99, ptr noundef @__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE, ptr noundef @.str.5, ptr noundef %102)
          to label %103 unwind label %122

103:                                              ; preds = %101
  %104 = call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %105 unwind label %126

105:                                              ; preds = %103
  invoke void @__cxa_throw(ptr %104, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #9
          to label %140 unwind label %122

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

110:                                              ; preds = %95
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %6, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %7, align 4
  br label %118

114:                                              ; preds = %97, %96
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %6, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %7, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br label %118

118:                                              ; preds = %114, %110
  %119 = load i1, ptr %13, align 1
  br i1 %119, label %120, label %121

120:                                              ; preds = %118
  call void @_ZdlPvm(ptr noundef %94, i64 noundef 176) #10
  br label %121

121:                                              ; preds = %120, %118
  br label %131

122:                                              ; preds = %105, %101, %98
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %6, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %7, align 4
  br label %130

126:                                              ; preds = %103
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %6, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %7, align 4
  call void @__cxa_free_exception(ptr %104) #7
  br label %130

130:                                              ; preds = %126, %122
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %131

131:                                              ; preds = %130, %121, %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %134

132:                                              ; preds = %91
  br label %133

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

134:                                              ; preds = %131, %76, %47
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  br label %135

135:                                              ; preds = %134
  %136 = load ptr, ptr %6, align 8
  %137 = load i32, ptr %7, align 4
  %138 = insertvalue { ptr, i32 } poison, ptr %136, 0
  %139 = insertvalue { ptr, i32 } %138, i32 %137, 1
  resume { ptr, i32 } %139

140:                                              ; preds = %105, %46
  unreachable
}

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

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

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

declare i32 @CMS_unsigned_add1_attr(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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 #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, !12, i64 8}
!10 = !{!"_ZTS25SignerAttributeCollection", !11, i64 0, !12, i64 8}
!11 = !{!"_ZTS6HandleI6SignerE", !6, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@logger = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 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
@__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [23 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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

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

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

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

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

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

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

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 #3

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 #5 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN25SignerAttributeCollection4pushE6HandleI9AttributeE(ptr noundef nonnull align 8 dereferenceable(9) %0, ptr noundef %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.LoggerFunction, align 8
  %4 = alloca %class.Handle.3, align 8
  %5 = alloca %class.Handle.3, align 8
  %6 = alloca %class.Handle.3, align 8
  %7 = alloca %class.Handle.3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %8 = load ptr, ptr @logger, align 8, !tbaa !5
  call void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef %8, ptr noundef nonnull @__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE)
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = load i8, ptr %9, align 8, !tbaa !9, !range !13, !noundef !14
  %11 = trunc nuw i8 %10 to i1
  %12 = load ptr, ptr @logger, align 8, !tbaa !5
  br i1 %11, label %13, label %50

13:                                               ; preds = %2
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef 32, ptr noundef nonnull @__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE, ptr noundef nonnull @.str.9)
          to label %14 unwind label %39

14:                                               ; preds = %13
  %15 = invoke noundef ptr @_ZNK6HandleI6SignerEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %16 unwind label %39

16:                                               ; preds = %14
  %17 = invoke noundef ptr @_ZN9SSLObjectI17CMS_SignerInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %18 unwind label %39

18:                                               ; preds = %16
  %19 = invoke noundef ptr @_ZNK6HandleI9AttributeEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %20 unwind label %39

20:                                               ; preds = %18
  %21 = invoke noundef ptr @_ZN9SSLObjectI18x509_attributes_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %22 unwind label %39

22:                                               ; preds = %20
  %23 = invoke i32 @CMS_signed_add1_attr(ptr noundef %17, ptr noundef %21)
          to label %24 unwind label %39

24:                                               ; preds = %22
  %25 = icmp slt i32 %23, 1
  br i1 %25, label %26, label %85

26:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %27 = invoke noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #8
          to label %28 unwind label %41

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

29:                                               ; preds = %28
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %27, i1 noundef zeroext true, ptr noundef nonnull @.str.2, i32 noundef 87, i32 noundef 0, ptr noundef nonnull @.str.3, ptr noundef nonnull @__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE, ptr noundef nonnull %5, ptr noundef nonnull @.str.10)
          to label %31 unwind label %.thread24

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

31:                                               ; preds = %29
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %27)
          to label %32 unwind label %44

32:                                               ; preds = %31
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %33 = load ptr, ptr @logger, align 8, !tbaa !5
  %34 = invoke noundef ptr @_ZNK6HandleI9ExceptionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %35 unwind label %47

35:                                               ; preds = %32
  %36 = call noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176) %34) #7
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger4warnEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull @__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE, ptr noundef nonnull @.str.5, ptr noundef %36)
          to label %37 unwind label %47

37:                                               ; preds = %35
  %38 = call ptr @__cxa_allocate_exception(i64 8) #7
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 8 dereferenceable(8) %4)
  invoke void @__cxa_throw(ptr nonnull %38, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #9
          to label %87 unwind label %47

39:                                               ; preds = %59, %57, %55, %53, %51, %50, %22, %20, %18, %16, %14, %13
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %86

41:                                               ; preds = %26
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %49

.thread:                                          ; preds = %28
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %46

44:                                               ; preds = %31
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br label %49

46:                                               ; preds = %.thread24, %.thread
  %.pn1623 = phi { ptr, i32 } [ %43, %.thread ], [ %30, %.thread24 ]
  call void @_ZdlPvm(ptr noundef nonnull %27, i64 noundef 176) #10
  br label %49

47:                                               ; preds = %37, %35, %32
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  br label %49

49:                                               ; preds = %44, %46, %47, %41
  %.pn18 = phi { ptr, i32 } [ %48, %47 ], [ %.pn1623, %46 ], [ %45, %44 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %86

50:                                               ; preds = %2
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef 32, ptr noundef nonnull @__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE, ptr noundef nonnull @.str.11)
          to label %51 unwind label %39

51:                                               ; preds = %50
  %52 = invoke noundef ptr @_ZNK6HandleI6SignerEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %53 unwind label %39

53:                                               ; preds = %51
  %54 = invoke noundef ptr @_ZN9SSLObjectI17CMS_SignerInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %52)
          to label %55 unwind label %39

55:                                               ; preds = %53
  %56 = invoke noundef ptr @_ZNK6HandleI9AttributeEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %57 unwind label %39

57:                                               ; preds = %55
  %58 = invoke noundef ptr @_ZN9SSLObjectI18x509_attributes_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %56)
          to label %59 unwind label %39

59:                                               ; preds = %57
  %60 = invoke i32 @CMS_unsigned_add1_attr(ptr noundef %54, ptr noundef %58)
          to label %61 unwind label %39

61:                                               ; preds = %59
  %62 = icmp slt i32 %60, 1
  br i1 %62, label %63, label %85

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %64 = invoke noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #8
          to label %65 unwind label %76

65:                                               ; preds = %63
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef null)
          to label %66 unwind label %.thread26

66:                                               ; preds = %65
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %64, i1 noundef zeroext true, ptr noundef nonnull @.str.2, i32 noundef 93, i32 noundef 0, ptr noundef nonnull @.str.3, ptr noundef nonnull @__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE, ptr noundef nonnull %7, ptr noundef nonnull @.str.12)
          to label %68 unwind label %.thread30

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

68:                                               ; preds = %66
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %64)
          to label %69 unwind label %79

69:                                               ; preds = %68
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %70 = load ptr, ptr @logger, align 8, !tbaa !5
  %71 = invoke noundef ptr @_ZNK6HandleI9ExceptionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %72 unwind label %82

72:                                               ; preds = %69
  %73 = call noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176) %71) #7
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger4warnEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %70, ptr noundef nonnull @__FUNCTION__._ZN25SignerAttributeCollection4pushE6HandleI9AttributeE, ptr noundef nonnull @.str.5, ptr noundef %73)
          to label %74 unwind label %82

74:                                               ; preds = %72
  %75 = call ptr @__cxa_allocate_exception(i64 8) #7
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull align 8 dereferenceable(8) %6)
  invoke void @__cxa_throw(ptr nonnull %75, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #9
          to label %87 unwind label %82

76:                                               ; preds = %63
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %84

.thread26:                                        ; preds = %65
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %81

79:                                               ; preds = %68
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br label %84

81:                                               ; preds = %.thread30, %.thread26
  %.pn29 = phi { ptr, i32 } [ %78, %.thread26 ], [ %67, %.thread30 ]
  call void @_ZdlPvm(ptr noundef nonnull %64, i64 noundef 176) #10
  br label %84

82:                                               ; preds = %74, %72, %69
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br label %84

84:                                               ; preds = %79, %81, %82, %76
  %.pn14 = phi { ptr, i32 } [ %83, %82 ], [ %.pn29, %81 ], [ %80, %79 ], [ %77, %76 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %86

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

86:                                               ; preds = %84, %49, %39
  %.pn18.pn = phi { ptr, i32 } [ %.pn18, %49 ], [ %40, %39 ], [ %.pn14, %84 ]
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn18.pn

87:                                               ; preds = %74, %37
  unreachable
}

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

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

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

declare i32 @CMS_unsigned_add1_attr(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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 #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, !12, i64 8}
!10 = !{!"_ZTS25SignerAttributeCollection", !11, i64 0, !12, i64 8}
!11 = !{!"_ZTS6HandleI6SignerE", !6, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}


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