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

; 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
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@__FUNCTION__._ZN10SignedData4signE6HandleI11CertificateES0_I3KeyES0_I21CertificateCollectionES0_I3BioEj = external hidden unnamed_addr constant [5 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [10 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

declare void @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176), i1 noundef zeroext, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ...) unnamed_addr #1

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

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

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

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

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SignedData4signEv(ptr noundef nonnull align 8 dereferenceable(28) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %class.LoggerFunction, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %class.Handle.8, align 8
  %7 = alloca %class.Handle.8, align 8
  %8 = alloca i1, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %9 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #7
  %10 = load ptr, ptr @logger, align 8, !tbaa !5
  call void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef %10, ptr noundef @__FUNCTION__._ZN10SignedData4signE6HandleI11CertificateES0_I3KeyES0_I21CertificateCollectionES0_I3BioEj)
  %11 = getelementptr inbounds %class.SignedData, ptr %9, i32 0, i32 2
  %12 = load i32, ptr %11, align 8, !tbaa !9
  %13 = and i32 %12, 64
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %24, label %15

15:                                               ; preds = %1
  %16 = invoke noundef ptr @_ZN9SSLObjectI18CMS_ContentInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %17 unwind label %20

17:                                               ; preds = %15
  %18 = invoke i32 @CMS_set_detached(ptr noundef %16, i32 noundef 0)
          to label %19 unwind label %20

19:                                               ; preds = %17
  br label %24

20:                                               ; preds = %36, %34, %31, %29, %24, %17, %15
  %21 = landingpad { ptr, i32 }
          cleanup
  %22 = extractvalue { ptr, i32 } %21, 0
  store ptr %22, ptr %4, align 8
  %23 = extractvalue { ptr, i32 } %21, 1
  store i32 %23, ptr %5, align 4
  br label %82

24:                                               ; preds = %19, %1
  %25 = getelementptr inbounds %class.SignedData, ptr %9, i32 0, i32 2
  %26 = load i32, ptr %25, align 8, !tbaa !9
  %27 = or i32 %26, 128
  store i32 %27, ptr %25, align 8, !tbaa !9
  %28 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %28, i32 noundef 32, ptr noundef @__FUNCTION__._ZN10SignedData4signE6HandleI11CertificateES0_I3KeyES0_I21CertificateCollectionES0_I3BioEj, ptr noundef @.str.33)
          to label %29 unwind label %20

29:                                               ; preds = %24
  %30 = invoke noundef ptr @_ZN9SSLObjectI18CMS_ContentInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %31 unwind label %20

31:                                               ; preds = %29
  %32 = getelementptr inbounds %class.SignedData, ptr %9, i32 0, i32 1
  %33 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %34 unwind label %20

34:                                               ; preds = %31
  %35 = invoke noundef ptr @_ZN3Bio8internalEv(ptr noundef nonnull align 8 dereferenceable(9) %33)
          to label %36 unwind label %20

36:                                               ; preds = %34
  %37 = getelementptr inbounds %class.SignedData, ptr %9, i32 0, i32 2
  %38 = load i32, ptr %37, align 8, !tbaa !9
  %39 = invoke i32 @CMS_final(ptr noundef %30, ptr noundef %35, ptr noundef null, i32 noundef %38)
          to label %40 unwind label %20

40:                                               ; preds = %36
  %41 = icmp slt i32 %39, 1
  br i1 %41, label %42, label %81

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %43 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #8
          to label %44 unwind label %55

44:                                               ; preds = %42
  store i1 true, ptr %8, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef null)
          to label %45 unwind label %59

45:                                               ; preds = %44
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %43, i1 noundef zeroext true, ptr noundef @.str.2, i32 noundef 270, i32 noundef 0, ptr noundef @.str.3, ptr noundef @__FUNCTION__._ZN10SignedData4signE6HandleI11CertificateES0_I3KeyES0_I21CertificateCollectionES0_I3BioEj, ptr noundef %7, ptr noundef @.str.34)
          to label %46 unwind label %63

46:                                               ; preds = %45
  store i1 false, ptr %8, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %43)
          to label %47 unwind label %63

47:                                               ; preds = %46
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %48 = load ptr, ptr @logger, align 8, !tbaa !5
  %49 = invoke noundef ptr @_ZNK6HandleI9ExceptionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %50 unwind label %71

50:                                               ; preds = %47
  %51 = call noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176) %49) #7
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger4warnEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef @__FUNCTION__._ZN10SignedData4signE6HandleI11CertificateES0_I3KeyES0_I21CertificateCollectionES0_I3BioEj, ptr noundef @.str.5, ptr noundef %51)
          to label %52 unwind label %71

52:                                               ; preds = %50
  %53 = call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %54 unwind label %75

54:                                               ; preds = %52
  invoke void @__cxa_throw(ptr %53, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #9
          to label %88 unwind label %71

55:                                               ; preds = %42
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %4, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %5, align 4
  br label %80

59:                                               ; preds = %44
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %4, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %5, align 4
  br label %67

63:                                               ; preds = %46, %45
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %4, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %5, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br label %67

67:                                               ; preds = %63, %59
  %68 = load i1, ptr %8, align 1
  br i1 %68, label %69, label %70

69:                                               ; preds = %67
  call void @_ZdlPvm(ptr noundef %43, i64 noundef 176) #10
  br label %70

70:                                               ; preds = %69, %67
  br label %80

71:                                               ; preds = %54, %50, %47
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %4, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %5, align 4
  br label %79

75:                                               ; preds = %52
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %4, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %5, align 4
  call void @__cxa_free_exception(ptr %53) #7
  br label %79

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

80:                                               ; preds = %79, %70, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %82

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

82:                                               ; preds = %80, %20
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #7
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %4, align 8
  %85 = load i32, ptr %5, align 4
  %86 = insertvalue { ptr, i32 } poison, ptr %84, 0
  %87 = insertvalue { ptr, i32 } %86, i32 %85, 1
  resume { ptr, i32 } %87

88:                                               ; preds = %54
  unreachable
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { noreturn }
attributes #10 = { builtin nounwind }

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

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


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

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

@logger = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@__FUNCTION__._ZN10SignedData4signE6HandleI11CertificateES0_I3KeyES0_I21CertificateCollectionES0_I3BioEj = external hidden unnamed_addr constant [5 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [10 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

declare void @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176), i1 noundef zeroext, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ...) unnamed_addr #1

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

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SignedData4signEv(ptr noundef nonnull align 8 dereferenceable(28) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.LoggerFunction, align 8
  %3 = alloca %class.Handle.8, align 8
  %4 = alloca %class.Handle.8, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #7
  %5 = load ptr, ptr @logger, align 8, !tbaa !5
  call void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef %5, ptr noundef nonnull @__FUNCTION__._ZN10SignedData4signE6HandleI11CertificateES0_I3KeyES0_I21CertificateCollectionES0_I3BioEj)
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  %7 = load i32, ptr %6, align 8, !tbaa !9
  %8 = and i32 %7, 64
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %9, label %15

9:                                                ; preds = %1
  %10 = invoke noundef ptr @_ZN9SSLObjectI18CMS_ContentInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %11 unwind label %13

11:                                               ; preds = %9
  %12 = invoke i32 @CMS_set_detached(ptr noundef %10, i32 noundef 0)
          to label %._crit_edge unwind label %13

._crit_edge:                                      ; preds = %11
  %.pre = load i32, ptr %6, align 8, !tbaa !9
  br label %15

13:                                               ; preds = %26, %24, %21, %19, %15, %11, %9
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %54

15:                                               ; preds = %._crit_edge, %1
  %16 = phi i32 [ %.pre, %._crit_edge ], [ %7, %1 ]
  %17 = or i32 %16, 128
  store i32 %17, ptr %6, align 8, !tbaa !9
  %18 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef 32, ptr noundef nonnull @__FUNCTION__._ZN10SignedData4signE6HandleI11CertificateES0_I3KeyES0_I21CertificateCollectionES0_I3BioEj, ptr noundef nonnull @.str.33)
          to label %19 unwind label %13

19:                                               ; preds = %15
  %20 = invoke noundef ptr @_ZN9SSLObjectI18CMS_ContentInfo_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %21 unwind label %13

21:                                               ; preds = %19
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = invoke noundef ptr @_ZNK6HandleI3BioEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %24 unwind label %13

24:                                               ; preds = %21
  %25 = invoke noundef ptr @_ZN3Bio8internalEv(ptr noundef nonnull align 8 dereferenceable(9) %23)
          to label %26 unwind label %13

26:                                               ; preds = %24
  %27 = load i32, ptr %6, align 8, !tbaa !9
  %28 = invoke i32 @CMS_final(ptr noundef %20, ptr noundef %25, ptr noundef null, i32 noundef %27)
          to label %29 unwind label %13

29:                                               ; preds = %26
  %30 = icmp slt i32 %28, 1
  br i1 %30, label %31, label %53

31:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %32 = invoke noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #8
          to label %33 unwind label %44

33:                                               ; preds = %31
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef null)
          to label %34 unwind label %.thread

34:                                               ; preds = %33
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %32, i1 noundef zeroext true, ptr noundef nonnull @.str.2, i32 noundef 270, i32 noundef 0, ptr noundef nonnull @.str.3, ptr noundef nonnull @__FUNCTION__._ZN10SignedData4signE6HandleI11CertificateES0_I3KeyES0_I21CertificateCollectionES0_I3BioEj, ptr noundef nonnull %4, ptr noundef nonnull @.str.34)
          to label %36 unwind label %.thread15

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

36:                                               ; preds = %34
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %32)
          to label %37 unwind label %47

37:                                               ; preds = %36
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %38 = load ptr, ptr @logger, align 8, !tbaa !5
  %39 = invoke noundef ptr @_ZNK6HandleI9ExceptionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %40 unwind label %50

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

42:                                               ; preds = %40
  %43 = call ptr @__cxa_allocate_exception(i64 8) #7
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(8) %3)
  invoke void @__cxa_throw(ptr nonnull %43, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #9
          to label %55 unwind label %50

44:                                               ; preds = %31
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %52

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

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

49:                                               ; preds = %.thread15, %.thread
  %.pn14 = phi { ptr, i32 } [ %46, %.thread ], [ %35, %.thread15 ]
  call void @_ZdlPvm(ptr noundef nonnull %32, i64 noundef 176) #10
  br label %52

50:                                               ; preds = %42, %40, %37
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  br label %52

52:                                               ; preds = %47, %49, %50, %44
  %.pn9 = phi { ptr, i32 } [ %51, %50 ], [ %.pn14, %49 ], [ %48, %47 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %54

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

54:                                               ; preds = %52, %13
  %.pn9.pn = phi { ptr, i32 } [ %.pn9, %52 ], [ %14, %13 ]
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn9.pn

55:                                               ; preds = %42
  unreachable
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { noreturn }
attributes #10 = { builtin nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!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,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass