; LLVM IR from Trusted-eSign/trusted-crypto :: deps/wrapper/src/pki/exts.ll (ZN19ExtensionCollection4pushE6HandleI9ExtensionE)

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

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

@logger = external global ptr, align 8
@__FUNCTION__._ZN19ExtensionCollection4pushE6HandleI9ExtensionE = external hidden unnamed_addr constant [5 x i8], align 1
@.str = external hidden unnamed_addr constant [29 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN19ExtensionCollection4pushE6HandleI9ExtensionE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1) #0 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
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #8
  %13 = load ptr, ptr @logger, align 8, !tbaa !5
  call void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %13, ptr noundef @__FUNCTION__._ZN19ExtensionCollection4pushE6HandleI9ExtensionE)
  %14 = invoke noundef zeroext i1 @_ZN9SSLObjectI23stack_st_X509_EXTENSIONE7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %15 unwind label %22

15:                                               ; preds = %2
  br i1 %14, label %16, label %26

16:                                               ; preds = %15
  %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__._ZN19ExtensionCollection4pushE6HandleI9ExtensionE, ptr noundef @.str)
          to label %18 unwind label %22

18:                                               ; preds = %16
  %19 = invoke ptr @OPENSSL_sk_new_null()
          to label %20 unwind label %22

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

21:                                               ; preds = %20
  br label %26

22:                                               ; preds = %26, %20, %18, %16, %2
  %23 = landingpad { ptr, i32 }
          cleanup
  %24 = extractvalue { ptr, i32 } %23, 0
  store ptr %24, ptr %6, align 8
  %25 = extractvalue { ptr, i32 } %23, 1
  store i32 %25, ptr %7, align 4
  br label %90

26:                                               ; preds = %21, %15
  %27 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %27, i32 noundef 32, ptr noundef @__FUNCTION__._ZN19ExtensionCollection4pushE6HandleI9ExtensionE, ptr noundef @.str.1)
          to label %28 unwind label %22

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %29 = invoke noundef ptr @_ZNK6HandleI9ExtensionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %30 unwind label %47

30:                                               ; preds = %28
  %31 = invoke noundef ptr @_ZN9SSLObjectI17X509_extension_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %32 unwind label %47

32:                                               ; preds = %30
  %33 = invoke ptr @X509_EXTENSION_dup(ptr noundef %31)
          to label %34 unwind label %47

34:                                               ; preds = %32
  store ptr %33, ptr %8, align 8, !tbaa !5
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %77, label %37

37:                                               ; preds = %34
  %38 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %38, ptr noundef @__FUNCTION__._ZN19ExtensionCollection4pushE6HandleI9ExtensionE, ptr noundef @.str.1)
          to label %39 unwind label %47

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %40 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #9
          to label %41 unwind label %51

41:                                               ; preds = %39
  store i1 true, ptr %11, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef null)
          to label %42 unwind label %55

42:                                               ; preds = %41
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %40, i1 noundef zeroext false, ptr noundef @.str.2, i32 noundef 16, i32 noundef 0, ptr noundef @.str.3, ptr noundef @__FUNCTION__._ZN19ExtensionCollection4pushE6HandleI9ExtensionE, ptr noundef %10, ptr noundef @.str.1)
          to label %43 unwind label %59

43:                                               ; preds = %42
  store i1 false, ptr %11, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %40)
          to label %44 unwind label %59

44:                                               ; preds = %43
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  %45 = call ptr @__cxa_allocate_exception(i64 8) #8
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %46 unwind label %67

46:                                               ; preds = %44
  invoke void @__cxa_throw(ptr %45, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #10
          to label %96 unwind label %71

47:                                               ; preds = %86, %83, %81, %79, %77, %37, %32, %30, %28
  %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 %89

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

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

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

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

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

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

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

71:                                               ; preds = %46
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %6, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %7, align 4
  br label %75

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

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

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

79:                                               ; preds = %77
  %80 = invoke noundef ptr @_ZN9SSLObjectI23stack_st_X509_EXTENSIONE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %81 unwind label %47

81:                                               ; preds = %79
  %82 = invoke noundef ptr @_ZL33ossl_check_X509_EXTENSION_sk_typeP23stack_st_X509_EXTENSION(ptr noundef %80)
          to label %83 unwind label %47

83:                                               ; preds = %81
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = invoke noundef ptr @_ZL30ossl_check_X509_EXTENSION_typeP17X509_extension_st(ptr noundef %84)
          to label %86 unwind label %47

86:                                               ; preds = %83
  %87 = invoke i32 @OPENSSL_sk_push(ptr noundef %82, ptr noundef %85)
          to label %88 unwind label %47

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

89:                                               ; preds = %76, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %90

90:                                               ; preds = %89, %22
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #8
  br label %91

91:                                               ; preds = %90
  %92 = load ptr, ptr %6, align 8
  %93 = load i32, ptr %7, align 4
  %94 = insertvalue { ptr, i32 } poison, ptr %92, 0
  %95 = insertvalue { ptr, i32 } %94, i32 %93, 1
  resume { ptr, i32 } %95

96:                                               ; preds = %46
  unreachable
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

declare ptr @OPENSSL_sk_new_null() #2

declare ptr @X509_EXTENSION_dup(ptr noundef) #2

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

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

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

; 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 #0 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 #2

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

declare i32 @OPENSSL_sk_push(ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL33ossl_check_X509_EXTENSION_sk_typeP23stack_st_X509_EXTENSION(ptr noundef) #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL30ossl_check_X509_EXTENSION_typeP17X509_extension_st(ptr noundef) #6

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { inlinehint 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 "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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { noreturn }
attributes #11 = { 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"}


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

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

@logger = external local_unnamed_addr global ptr, align 8
@__FUNCTION__._ZN19ExtensionCollection4pushE6HandleI9ExtensionE = external hidden unnamed_addr constant [5 x i8], align 1
@.str = external hidden unnamed_addr constant [29 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN19ExtensionCollection4pushE6HandleI9ExtensionE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1) local_unnamed_addr #0 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
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  %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__._ZN19ExtensionCollection4pushE6HandleI9ExtensionE)
  %7 = invoke noundef zeroext i1 @_ZN9SSLObjectI23stack_st_X509_EXTENSIONE7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %8 unwind label %14

8:                                                ; preds = %2
  br i1 %7, label %9, label %16

9:                                                ; preds = %8
  %10 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef 32, ptr noundef nonnull @__FUNCTION__._ZN19ExtensionCollection4pushE6HandleI9ExtensionE, ptr noundef nonnull @.str)
          to label %11 unwind label %14

11:                                               ; preds = %9
  %12 = invoke ptr @OPENSSL_sk_new_null()
          to label %13 unwind label %14

13:                                               ; preds = %11
  invoke void @_ZN9SSLObjectI23stack_st_X509_EXTENSIONE7setDataEPS0_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %12)
          to label %16 unwind label %14

14:                                               ; preds = %16, %13, %11, %9, %2
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %54

16:                                               ; preds = %13, %8
  %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 nonnull @__FUNCTION__._ZN19ExtensionCollection4pushE6HandleI9ExtensionE, ptr noundef nonnull @.str.1)
          to label %18 unwind label %14

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

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

22:                                               ; preds = %20
  %23 = invoke ptr @X509_EXTENSION_dup(ptr noundef %21)
          to label %24 unwind label %35

24:                                               ; preds = %22
  %.not = icmp eq ptr %23, null
  %25 = load ptr, ptr @logger, align 8, !tbaa !5
  br i1 %.not, label %26, label %46

26:                                               ; preds = %24
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull @__FUNCTION__._ZN19ExtensionCollection4pushE6HandleI9ExtensionE, ptr noundef nonnull @.str.1)
          to label %27 unwind label %35

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

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

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 nonnull @.str.2, i32 noundef 16, i32 noundef 0, ptr noundef nonnull @.str.3, ptr noundef nonnull @__FUNCTION__._ZN19ExtensionCollection4pushE6HandleI9ExtensionE, ptr noundef nonnull %5, ptr noundef nonnull @.str.1)
          to label %32 unwind label %.thread21

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

32:                                               ; preds = %30
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %28)
          to label %33 unwind label %40

33:                                               ; preds = %32
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %34 = call ptr @__cxa_allocate_exception(i64 8) #8
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %4)
  invoke void @__cxa_throw(ptr nonnull %34, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #10
          to label %55 unwind label %43

35:                                               ; preds = %49, %47, %46, %26, %22, %20, %18
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %54

37:                                               ; preds = %27
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %45

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

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

42:                                               ; preds = %.thread21, %.thread
  %.pn20 = phi { ptr, i32 } [ %39, %.thread ], [ %31, %.thread21 ]
  call void @_ZdlPvm(ptr noundef nonnull %28, i64 noundef 176) #11
  br label %45

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

45:                                               ; preds = %40, %42, %43, %37
  %.pn13 = phi { ptr, i32 } [ %44, %43 ], [ %.pn20, %42 ], [ %41, %40 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %54

46:                                               ; preds = %24
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %25, i32 noundef 32, ptr noundef nonnull @__FUNCTION__._ZN19ExtensionCollection4pushE6HandleI9ExtensionE, ptr noundef nonnull @.str.4)
          to label %47 unwind label %35

47:                                               ; preds = %46
  %48 = invoke noundef ptr @_ZN9SSLObjectI23stack_st_X509_EXTENSIONE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %49 unwind label %35

49:                                               ; preds = %47
  %50 = call noundef ptr @_ZL33ossl_check_X509_EXTENSION_sk_typeP23stack_st_X509_EXTENSION(ptr noundef %48)
  %51 = call noundef ptr @_ZL30ossl_check_X509_EXTENSION_typeP17X509_extension_st(ptr noundef nonnull %23)
  %52 = invoke i32 @OPENSSL_sk_push(ptr noundef %50, ptr noundef %51)
          to label %53 unwind label %35

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

54:                                               ; preds = %35, %45, %14
  %.pn15.pn = phi { ptr, i32 } [ %15, %14 ], [ %36, %35 ], [ %.pn13, %45 ]
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn15.pn

55:                                               ; preds = %33
  unreachable
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

declare ptr @OPENSSL_sk_new_null() local_unnamed_addr #2

declare ptr @X509_EXTENSION_dup(ptr noundef) local_unnamed_addr #2

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

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

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

; 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 #0 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 #2

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

declare i32 @OPENSSL_sk_push(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL33ossl_check_X509_EXTENSION_sk_typeP23stack_st_X509_EXTENSION(ptr noundef) local_unnamed_addr #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL30ossl_check_X509_EXTENSION_typeP17X509_extension_st(ptr noundef) local_unnamed_addr #6

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { inlinehint 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 "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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { noreturn }
attributes #11 = { builtin nounwind }

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

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


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