; 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 }
%class.SignedData = type <{ %class.SSLObject, %class.Handle.2, i32, [4 x i8] }>
%class.SSLObject = type { ptr, %class.Handle.1 }
%class.Handle.1 = type { ptr }
%class.Handle.2 = 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
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@__FUNCTION__._ZN10SignedData6verifyE6HandleI21CertificateCollectionE = external hidden unnamed_addr constant [7 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [17 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 noundef ptr @_ZNK6HandleI21CertificateCollectionEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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 void @_ZN3Bio5resetEv(ptr noundef nonnull align 8 dereferenceable(9)) #1

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

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

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10SignedData6verifyE6HandleI21CertificateCollectionE(ptr noundef nonnull align 8 dereferenceable(28) %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 i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %class.Handle.8, align 8
  %13 = alloca %class.Handle.8, align 8
  %14 = alloca i1, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #9
  %16 = load ptr, ptr @logger, align 8, !tbaa !5
  call void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %16, ptr noundef @__FUNCTION__._ZN10SignedData6verifyE6HandleI21CertificateCollectionE)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  store ptr null, ptr %7, align 8, !tbaa !5
  %17 = invoke noundef zeroext i1 @_ZNK6HandleI21CertificateCollectionE7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %18 unwind label %24

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

19:                                               ; preds = %18
  %20 = invoke noundef ptr @_ZNK6HandleI21CertificateCollectionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %21 unwind label %24

21:                                               ; preds = %19
  %22 = invoke noundef ptr @_ZN9SSLObjectI13stack_st_X509E8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %23 unwind label %24

23:                                               ; preds = %21
  store ptr %22, ptr %7, align 8, !tbaa !5
  br label %28

24:                                               ; preds = %31, %28, %21, %19, %2
  %25 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %8, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %9, align 4
  br label %60

28:                                               ; preds = %23, %18
  %29 = getelementptr inbounds %class.SignedData, ptr %15, i32 0, i32 1
  %30 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %31 unwind label %24

31:                                               ; preds = %28
  invoke void @_ZN3Bio5resetEv(ptr noundef nonnull align 8 dereferenceable(9) %30)
          to label %32 unwind label %24

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %33 = invoke ptr @X509_STORE_new()
          to label %34 unwind label %56

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

36:                                               ; preds = %34
  %37 = invoke noundef ptr @_ZN9SSLObjectI18CMS_ContentInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %38 unwind label %56

38:                                               ; preds = %36
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = getelementptr inbounds %class.SignedData, ptr %15, i32 0, i32 1
  %42 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %41)
          to label %43 unwind label %56

43:                                               ; preds = %38
  %44 = invoke noundef ptr @_ZN3Bio8internalEv(ptr noundef nonnull align 8 dereferenceable(9) %42)
          to label %45 unwind label %56

45:                                               ; preds = %43
  %46 = getelementptr inbounds %class.SignedData, ptr %15, i32 0, i32 2
  %47 = load i32, ptr %46, align 8, !tbaa !9
  %48 = invoke i32 @CMS_verify(ptr noundef %37, ptr noundef %39, ptr noundef %40, ptr noundef %44, ptr noundef null, i32 noundef %47)
          to label %49 unwind label %56

49:                                               ; preds = %45
  store i32 %48, ptr %6, align 4, !tbaa !15
  %50 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %50, i32 noundef 32, ptr noundef @__FUNCTION__._ZN10SignedData6verifyE6HandleI21CertificateCollectionE, ptr noundef @.str.29)
          to label %51 unwind label %56

51:                                               ; preds = %49
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @X509_STORE_free(ptr noundef %52)
          to label %53 unwind label %56

53:                                               ; preds = %51
  %54 = load i32, ptr %6, align 4, !tbaa !15
  %55 = icmp eq i32 %54, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #9
  ret i1 %55

56:                                               ; preds = %51, %49, %45, %43, %38, %36, %34, %32
  %57 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %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 @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  br label %60

60:                                               ; preds = %56, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %9, align 4
  %63 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTI6HandleI9ExceptionE) #9
  %64 = icmp eq i32 %62, %63
  br i1 %64, label %65, label %111

65:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %66 = load ptr, ptr %8, align 8
  %67 = call ptr @__cxa_begin_catch(ptr %66) #9
  store ptr %67, ptr %11, align 8
  %68 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef @__FUNCTION__._ZN10SignedData6verifyE6HandleI21CertificateCollectionE, ptr noundef @.str.30)
          to label %69 unwind label %78

69:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %70 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #10
          to label %71 unwind label %82

71:                                               ; preds = %69
  store i1 true, ptr %14, align 1
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %72)
          to label %73 unwind label %86

73:                                               ; preds = %71
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %70, i1 noundef zeroext false, ptr noundef @.str.2, i32 noundef 240, i32 noundef 0, ptr noundef @.str.3, ptr noundef @__FUNCTION__._ZN10SignedData6verifyE6HandleI21CertificateCollectionE, ptr noundef %13, ptr noundef @.str.30)
          to label %74 unwind label %90

74:                                               ; preds = %73
  store i1 false, ptr %14, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef %70)
          to label %75 unwind label %90

75:                                               ; preds = %74
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  %76 = call ptr @__cxa_allocate_exception(i64 8) #9
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %77 unwind label %98

77:                                               ; preds = %75
  invoke void @__cxa_throw(ptr %76, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #11
          to label %120 unwind label %102

78:                                               ; preds = %65
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %8, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %9, align 4
  br label %108

82:                                               ; preds = %69
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %8, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %9, align 4
  br label %107

86:                                               ; preds = %71
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %8, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %9, align 4
  br label %94

90:                                               ; preds = %74, %73
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %8, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %9, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br label %94

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

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

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

98:                                               ; preds = %75
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %8, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %9, align 4
  call void @__cxa_free_exception(ptr %76) #9
  br label %106

102:                                              ; preds = %77
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %8, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %9, align 4
  br label %106

106:                                              ; preds = %102, %98
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  br label %107

107:                                              ; preds = %106, %97, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %108

108:                                              ; preds = %107, %78
  invoke void @__cxa_end_catch()
          to label %109 unwind label %117

109:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %111

110:                                              ; No predecessors!
  unreachable

111:                                              ; preds = %109, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #9
  br label %112

112:                                              ; preds = %111
  %113 = load ptr, ptr %8, align 8
  %114 = load i32, ptr %9, align 4
  %115 = insertvalue { ptr, i32 } poison, ptr %113, 0
  %116 = insertvalue { ptr, i32 } %115, i32 %114, 1
  resume { ptr, i32 } %116

117:                                              ; preds = %108
  %118 = landingpad { ptr, i32 }
          catch ptr null
  %119 = extractvalue { ptr, i32 } %118, 0
  call void @__clang_call_terminate(ptr %119) #13
  unreachable

120:                                              ; preds = %77
  unreachable
}

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

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

declare ptr @X509_STORE_new() #1

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

declare void @X509_STORE_free(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 memory(none) }
attributes #8 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { noreturn }
attributes #12 = { builtin nounwind }
attributes #13 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !14, i64 24}
!10 = !{!"_ZTS10SignedData", !11, i64 0, !13, i64 16, !14, i64 24}
!11 = !{!"_ZTS9SSLObjectI18CMS_ContentInfo_stE", !6, i64 0, !12, i64 8}
!12 = !{!"_ZTS6HandleI7SObjectE", !6, i64 0}
!13 = !{!"_ZTS6HandleI3BioE", !6, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!14, !14, 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
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@__FUNCTION__._ZN10SignedData6verifyE6HandleI21CertificateCollectionE = external hidden unnamed_addr constant [7 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [17 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 noundef ptr @_ZNK6HandleI21CertificateCollectionEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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 void @_ZN3Bio5resetEv(ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #1

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

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

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10SignedData6verifyE6HandleI21CertificateCollectionE(ptr noundef nonnull align 8 dereferenceable(28) %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.8, align 8
  %5 = alloca %class.Handle.8, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #9
  %6 = load ptr, ptr @logger, align 8, !tbaa !5
  call void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef %6, ptr noundef nonnull @__FUNCTION__._ZN10SignedData6verifyE6HandleI21CertificateCollectionE)
  %7 = call noundef zeroext i1 @_ZNK6HandleI21CertificateCollectionE7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  br i1 %7, label %14, label %8

8:                                                ; preds = %2
  %9 = invoke noundef ptr @_ZNK6HandleI21CertificateCollectionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %10 unwind label %12

10:                                               ; preds = %8
  %11 = invoke noundef ptr @_ZN9SSLObjectI13stack_st_X509E8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %14 unwind label %12

12:                                               ; preds = %17, %14, %10, %8
  %13 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %39

14:                                               ; preds = %10, %2
  %.010 = phi ptr [ null, %2 ], [ %11, %10 ]
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %17 unwind label %12

17:                                               ; preds = %14
  invoke void @_ZN3Bio5resetEv(ptr noundef nonnull align 8 dereferenceable(9) %16)
          to label %18 unwind label %12

18:                                               ; preds = %17
  %19 = invoke ptr @X509_STORE_new()
          to label %20 unwind label %37

20:                                               ; preds = %18
  %21 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %21, i32 noundef 32, ptr noundef nonnull @__FUNCTION__._ZN10SignedData6verifyE6HandleI21CertificateCollectionE, ptr noundef nonnull @.str.28)
          to label %22 unwind label %37

22:                                               ; preds = %20
  %23 = invoke noundef ptr @_ZN9SSLObjectI18CMS_ContentInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %24 unwind label %37

24:                                               ; preds = %22
  %25 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %26 unwind label %37

26:                                               ; preds = %24
  %27 = invoke noundef ptr @_ZN3Bio8internalEv(ptr noundef nonnull align 8 dereferenceable(9) %25)
          to label %28 unwind label %37

28:                                               ; preds = %26
  %29 = getelementptr inbounds i8, ptr %0, i64 24
  %30 = load i32, ptr %29, align 8, !tbaa !9
  %31 = invoke i32 @CMS_verify(ptr noundef %23, ptr noundef %.010, ptr noundef %19, ptr noundef %27, ptr noundef null, i32 noundef %30)
          to label %32 unwind label %37

32:                                               ; preds = %28
  %33 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %33, i32 noundef 32, ptr noundef nonnull @__FUNCTION__._ZN10SignedData6verifyE6HandleI21CertificateCollectionE, ptr noundef nonnull @.str.29)
          to label %34 unwind label %37

34:                                               ; preds = %32
  invoke void @X509_STORE_free(ptr noundef %19)
          to label %35 unwind label %37

35:                                               ; preds = %34
  %36 = icmp eq i32 %31, 1
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  ret i1 %36

37:                                               ; preds = %34, %32, %28, %26, %24, %22, %20, %18
  %38 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %39

39:                                               ; preds = %37, %12
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %13, %12 ]
  %.012 = extractvalue { ptr, i32 } %.pn, 1
  %40 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTI6HandleI9ExceptionE) #9
  %41 = icmp eq i32 %.012, %40
  br i1 %41, label %42, label %63

42:                                               ; preds = %39
  %.011 = extractvalue { ptr, i32 } %.pn, 0
  %43 = call ptr @__cxa_begin_catch(ptr %.011) #9
  %44 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %44, ptr noundef nonnull @__FUNCTION__._ZN10SignedData6verifyE6HandleI21CertificateCollectionE, ptr noundef nonnull @.str.30)
          to label %45 unwind label %51

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  %46 = invoke noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #10
          to label %47 unwind label %53

47:                                               ; preds = %45
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %43)
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %46, i1 noundef zeroext false, ptr noundef nonnull @.str.2, i32 noundef 240, i32 noundef 0, ptr noundef nonnull @.str.3, ptr noundef nonnull @__FUNCTION__._ZN10SignedData6verifyE6HandleI21CertificateCollectionE, ptr noundef nonnull %5, ptr noundef nonnull @.str.30)
          to label %48 unwind label %57

48:                                               ; preds = %47
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %46)
          to label %49 unwind label %55

49:                                               ; preds = %48
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  %50 = call ptr @__cxa_allocate_exception(i64 8) #9
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 8 dereferenceable(8) %4)
  invoke void @__cxa_throw(ptr nonnull %50, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #11
          to label %67 unwind label %59

51:                                               ; preds = %42
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %62

53:                                               ; preds = %45
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %61

55:                                               ; preds = %48
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  br label %61

57:                                               ; preds = %47
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  call void @_ZdlPvm(ptr noundef nonnull %46, i64 noundef 176) #12
  br label %61

59:                                               ; preds = %49
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  br label %61

61:                                               ; preds = %55, %57, %59, %53
  %.pn17 = phi { ptr, i32 } [ %60, %59 ], [ %58, %57 ], [ %56, %55 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  br label %62

62:                                               ; preds = %61, %51
  %.pn17.pn = phi { ptr, i32 } [ %.pn17, %61 ], [ %52, %51 ]
  invoke void @__cxa_end_catch()
          to label %63 unwind label %64

63:                                               ; preds = %62, %39
  %.merged = phi { ptr, i32 } [ %.pn, %39 ], [ %.pn17.pn, %62 ]
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  resume { ptr, i32 } %.merged

64:                                               ; preds = %62
  %65 = landingpad { ptr, i32 }
          catch ptr null
  %66 = extractvalue { ptr, i32 } %65, 0
  call void @__clang_call_terminate(ptr %66) #13
  unreachable

67:                                               ; preds = %49
  unreachable
}

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

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

declare ptr @X509_STORE_new() local_unnamed_addr #1

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

declare void @X509_STORE_free(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 = { nofree nosync nounwind memory(none) }
attributes #8 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { noreturn }
attributes #12 = { builtin nounwind }
attributes #13 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !14, i64 24}
!10 = !{!"_ZTS10SignedData", !11, i64 0, !13, i64 16, !14, i64 24}
!11 = !{!"_ZTS9SSLObjectI18CMS_ContentInfo_stE", !6, i64 0, !12, i64 8}
!12 = !{!"_ZTS6HandleI7SObjectE", !6, i64 0}
!13 = !{!"_ZTS6HandleI3BioE", !6, i64 0}
!14 = !{!"int", !7, i64 0}


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