; LLVM IR from Trusted-eSign/trusted-crypto :: deps/wrapper/src/cms/signer.ll (ZN6Signer12getSignatureB5cxx11Ev)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.Handle.0 = type { ptr }
%class.LoggerFunction = type { %class.Handle.0, ptr }
%class.Handle.3 = type { ptr }
%"class.std::allocator" = type { i8 }
%struct.asn1_string_st = type { i32, i32, ptr, i64 }

@logger = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@__FUNCTION__._ZN6Signer12getSignatureB5cxx11Ev = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 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 @_ZN9SSLObjectI17CMS_SignerInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

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

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

; 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 #4 align 2

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

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Signer12getSignatureB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%class.Handle.0) align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %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 ptr, align 8
  %9 = alloca %class.Handle.3, align 8
  %10 = alloca %class.Handle.3, align 8
  %11 = alloca i1, align 1
  %12 = alloca ptr, align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca i1, align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  %16 = load ptr, ptr @logger, align 8, !tbaa !5
  call void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %16, ptr noundef @__FUNCTION__._ZN6Signer12getSignatureB5cxx11Ev)
  %17 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %17, i32 noundef 32, ptr noundef @__FUNCTION__._ZN6Signer12getSignatureB5cxx11Ev, ptr noundef @.str.7)
          to label %18 unwind label %35

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %19 = invoke noundef ptr @_ZN9SSLObjectI17CMS_SignerInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %20 unwind label %39

20:                                               ; preds = %18
  %21 = invoke ptr @CMS_SignerInfo_get0_signature(ptr noundef %19)
          to label %22 unwind label %39

22:                                               ; preds = %20
  store ptr %21, ptr %8, align 8, !tbaa !5
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %69, label %25

25:                                               ; preds = %22
  %26 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef @__FUNCTION__._ZN6Signer12getSignatureB5cxx11Ev, ptr noundef @.str.8)
          to label %27 unwind label %39

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

29:                                               ; preds = %27
  store i1 true, ptr %11, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef null)
          to label %30 unwind label %47

30:                                               ; preds = %29
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %28, i1 noundef zeroext false, ptr noundef @.str.2, i32 noundef 38, i32 noundef 0, ptr noundef @.str.3, ptr noundef @__FUNCTION__._ZN6Signer12getSignatureB5cxx11Ev, ptr noundef %10, ptr noundef @.str.8)
          to label %31 unwind label %51

31:                                               ; preds = %30
  store i1 false, ptr %11, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %28)
          to label %32 unwind label %51

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

34:                                               ; preds = %32
  invoke void @__cxa_throw(ptr %33, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #9
          to label %101 unwind label %63

35:                                               ; preds = %2
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %6, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %7, align 4
  br label %95

39:                                               ; preds = %25, %20, %18
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %6, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %7, align 4
  br label %94

43:                                               ; preds = %27
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %6, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %7, align 4
  br label %68

47:                                               ; preds = %29
  %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 %55

51:                                               ; preds = %31, %30
  %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
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br label %55

55:                                               ; preds = %51, %47
  %56 = load i1, ptr %11, align 1
  br i1 %56, label %57, label %58

57:                                               ; preds = %55
  call void @_ZdlPvm(ptr noundef %28, i64 noundef 176) #10
  br label %58

58:                                               ; preds = %57, %55
  br label %68

59:                                               ; preds = %32
  %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 @__cxa_free_exception(ptr %33) #7
  br label %67

63:                                               ; preds = %34
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %6, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %7, align 4
  br label %67

67:                                               ; preds = %63, %59
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br label %68

68:                                               ; preds = %67, %58, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %94

69:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.asn1_string_st, ptr %70, i32 0, i32 2
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  store ptr %72, ptr %12, align 8, !tbaa !5
  %73 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 32) #8
          to label %74 unwind label %82

74:                                               ; preds = %69
  store i1 true, ptr %14, align 1
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.asn1_string_st, ptr %76, i32 0, i32 0
  %78 = load i32, ptr %77, align 8, !tbaa !13
  %79 = sext i32 %78 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %73, ptr noundef %75, i64 noundef %79, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %80 unwind label %86

80:                                               ; preds = %74
  store i1 false, ptr %14, align 1
  invoke void @_ZN6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2EPS5_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %73)
          to label %81 unwind label %86

81:                                               ; preds = %80
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  ret void

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

86:                                               ; preds = %80, %74
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %6, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  %90 = load i1, ptr %14, align 1
  br i1 %90, label %91, label %92

91:                                               ; preds = %86
  call void @_ZdlPvm(ptr noundef %73, i64 noundef 32) #10
  br label %92

92:                                               ; preds = %91, %86
  br label %93

93:                                               ; preds = %92, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %94

94:                                               ; preds = %93, %68, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %95

95:                                               ; preds = %94, %35
  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 %96

96:                                               ; preds = %95
  %97 = load ptr, ptr %6, align 8
  %98 = load i32, ptr %7, align 4
  %99 = insertvalue { ptr, i32 } poison, ptr %97, 0
  %100 = insertvalue { ptr, i32 } %99, i32 %98, 1
  resume { ptr, i32 } %100

101:                                              ; preds = %34
  unreachable
}

declare ptr @CMS_SignerInfo_get0_signature(ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
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, !6, i64 8}
!10 = !{!"_ZTS14asn1_string_st", !11, i64 0, !11, i64 4, !6, i64 8, !12, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !11, 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.Handle.0 = type { ptr }
%class.LoggerFunction = type { %class.Handle.0, ptr }
%class.Handle.3 = type { ptr }
%"class.std::allocator" = type { i8 }

@logger = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@__FUNCTION__._ZN6Signer12getSignatureB5cxx11Ev = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 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 @_ZN9SSLObjectI17CMS_SignerInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

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

; 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 #4 align 2

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Signer12getSignatureB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%class.Handle.0) align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %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.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %7 = load ptr, ptr @logger, align 8, !tbaa !5
  call void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef %7, ptr noundef nonnull @__FUNCTION__._ZN6Signer12getSignatureB5cxx11Ev)
  %8 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 32, ptr noundef nonnull @__FUNCTION__._ZN6Signer12getSignatureB5cxx11Ev, ptr noundef nonnull @.str.7)
          to label %9 unwind label %24

9:                                                ; preds = %2
  %10 = invoke noundef ptr @_ZN9SSLObjectI17CMS_SignerInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %11 unwind label %26

11:                                               ; preds = %9
  %12 = invoke ptr @CMS_SignerInfo_get0_signature(ptr noundef %10)
          to label %13 unwind label %26

13:                                               ; preds = %11
  %.not = icmp eq ptr %12, null
  br i1 %.not, label %14, label %37

14:                                               ; preds = %13
  %15 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull @__FUNCTION__._ZN6Signer12getSignatureB5cxx11Ev, ptr noundef nonnull @.str.8)
          to label %16 unwind label %26

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

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

19:                                               ; preds = %18
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %17, i1 noundef zeroext false, ptr noundef nonnull @.str.2, i32 noundef 38, i32 noundef 0, ptr noundef nonnull @.str.3, ptr noundef nonnull @__FUNCTION__._ZN6Signer12getSignatureB5cxx11Ev, ptr noundef nonnull %5, ptr noundef nonnull @.str.8)
          to label %21 unwind label %.thread27

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

21:                                               ; preds = %19
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %17)
          to label %22 unwind label %31

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

24:                                               ; preds = %2
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %52

26:                                               ; preds = %14, %11, %9
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %52

28:                                               ; preds = %16
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %36

.thread:                                          ; preds = %18
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %33

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

33:                                               ; preds = %.thread27, %.thread
  %.pn26 = phi { ptr, i32 } [ %30, %.thread ], [ %20, %.thread27 ]
  call void @_ZdlPvm(ptr noundef nonnull %17, i64 noundef 176) #10
  br label %36

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

36:                                               ; preds = %31, %33, %34, %28
  %.pn18 = phi { ptr, i32 } [ %35, %34 ], [ %.pn26, %33 ], [ %32, %31 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %52

37:                                               ; preds = %13
  %38 = getelementptr inbounds i8, ptr %12, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = invoke noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #8
          to label %41 unwind label %46

41:                                               ; preds = %37
  %42 = load i32, ptr %12, align 8, !tbaa !13
  %43 = sext i32 %42 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef %39, i64 noundef %43, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %44 unwind label %50

44:                                               ; preds = %41
  invoke void @_ZN6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2EPS5_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %40)
          to label %45 unwind label %48

45:                                               ; preds = %44
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  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

46:                                               ; preds = %37
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %52

48:                                               ; preds = %44
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  br label %52

50:                                               ; preds = %41
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @_ZdlPvm(ptr noundef nonnull %40, i64 noundef 32) #10
  br label %52

52:                                               ; preds = %48, %26, %36, %50, %46, %24
  %.pn20.pn.pn = phi { ptr, i32 } [ %25, %24 ], [ %.pn18, %36 ], [ %27, %26 ], [ %51, %50 ], [ %49, %48 ], [ %47, %46 ]
  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 } %.pn20.pn.pn

53:                                               ; preds = %22
  unreachable
}

declare ptr @CMS_SignerInfo_get0_signature(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
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, !6, i64 8}
!10 = !{!"_ZTS14asn1_string_st", !11, i64 0, !11, i64 4, !6, i64 8, !12, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !11, i64 0}


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