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

; 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.1 = type { ptr }
%"class.std::allocator" = type { i8 }
%struct.X509_algor_st = type { ptr, ptr }

@logger = external global ptr, align 8
@__FUNCTION__._ZN9AlgorithmC2EPKc = external hidden unnamed_addr constant [10 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@.str.1 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@__FUNCTION__._ZN9Algorithm7getNameB5cxx11Ev = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

; 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 #3 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 uwtable
declare dso_local void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #4 align 2

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

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

declare ptr @__cxa_allocate_exception(i64)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN9SSLObjectI13X509_algor_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16)) #4 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)) #4 align 2

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

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

20:                                               ; preds = %2
  store ptr %19, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 100, ptr %9) #7
  %21 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %21, i32 noundef 32, ptr noundef @__FUNCTION__._ZN9Algorithm7getNameB5cxx11Ev, ptr noundef @.str.5)
          to label %22 unwind label %47

22:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  %23 = getelementptr inbounds [100 x i8], ptr %9, i64 0, i64 0
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.X509_algor_st, ptr %24, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  %27 = invoke i32 @OBJ_obj2txt(ptr noundef %23, i32 noundef 100, ptr noundef %26, i32 noundef 0)
          to label %28 unwind label %51

28:                                               ; preds = %22
  store i32 %27, ptr %10, align 4, !tbaa !9
  %29 = icmp sle i32 %27, 0
  br i1 %29, label %30, label %81

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %31 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #8
          to label %32 unwind label %55

32:                                               ; preds = %30
  store i1 true, ptr %13, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef null)
          to label %33 unwind label %59

33:                                               ; preds = %32
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %31, i1 noundef zeroext true, ptr noundef @.str.1, i32 noundef 56, i32 noundef 0, ptr noundef @__FUNCTION__._ZN9AlgorithmC2EPKc, ptr noundef @__FUNCTION__._ZN9Algorithm7getNameB5cxx11Ev, ptr noundef %12, ptr noundef @.str.5)
          to label %34 unwind label %63

34:                                               ; preds = %33
  store i1 false, ptr %13, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef %31)
          to label %35 unwind label %63

35:                                               ; preds = %34
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %36 = load ptr, ptr @logger, align 8, !tbaa !5
  %37 = invoke noundef ptr @_ZNK6HandleI9ExceptionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %38 unwind label %71

38:                                               ; preds = %35
  %39 = call noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176) %37) #7
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger4warnEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef @__FUNCTION__._ZN9Algorithm7getNameB5cxx11Ev, ptr noundef @.str.4, ptr noundef %39)
          to label %40 unwind label %71

40:                                               ; preds = %38
  %41 = call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %42 unwind label %75

42:                                               ; preds = %40
  invoke void @__cxa_throw(ptr %41, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #9
          to label %110 unwind label %71

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

47:                                               ; preds = %20
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %7, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %8, align 4
  br label %103

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

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

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

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

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

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

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

71:                                               ; preds = %42, %38, %35
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %7, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %8, align 4
  br label %79

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

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

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

81:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %82 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 32) #8
          to label %83 unwind label %90

83:                                               ; preds = %81
  store i1 true, ptr %16, align 1
  %84 = getelementptr inbounds [100 x i8], ptr %9, i64 0, i64 0
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %82, ptr noundef %84, i64 noundef %86, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %87 unwind label %94

87:                                               ; preds = %83
  store i1 false, ptr %16, align 1
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  store ptr %82, ptr %14, align 8, !tbaa !5
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2EPS5_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %88)
          to label %89 unwind label %90

89:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 100, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #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

90:                                               ; preds = %87, %81
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %7, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %8, align 4
  br label %101

94:                                               ; preds = %83
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %7, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  %98 = load i1, ptr %16, align 1
  br i1 %98, label %99, label %100

99:                                               ; preds = %94
  call void @_ZdlPvm(ptr noundef %82, i64 noundef 32) #10
  br label %100

100:                                              ; preds = %99, %94
  br label %101

101:                                              ; preds = %100, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %102

102:                                              ; preds = %101, %80, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %103

103:                                              ; preds = %102, %47
  call void @llvm.lifetime.end.p0(i64 100, ptr %9) #7
  br label %104

104:                                              ; preds = %103, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  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 %105

105:                                              ; preds = %104
  %106 = load ptr, ptr %7, align 8
  %107 = load i32, ptr %8, align 4
  %108 = insertvalue { ptr, i32 } poison, ptr %106, 0
  %109 = insertvalue { ptr, i32 } %108, i32 %107, 1
  resume { ptr, i32 } %109

110:                                              ; preds = %42
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 #4 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 #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 = { 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 #3 = { 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 #4 = { 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 #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS13X509_algor_st", !6, i64 0, !6, i64 8}


; 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.1 = type { ptr }
%"class.std::allocator" = type { i8 }

@logger = external local_unnamed_addr global ptr, align 8
@__FUNCTION__._ZN9AlgorithmC2EPKc = external hidden unnamed_addr constant [10 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@.str.1 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@__FUNCTION__._ZN9Algorithm7getNameB5cxx11Ev = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

; 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 #3 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 uwtable
declare dso_local void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN9SSLObjectI13X509_algor_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 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 #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9Algorithm7getNameB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%class.Handle.0) align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.LoggerFunction, align 8
  %4 = alloca [100 x i8], align 16
  %5 = alloca %class.Handle.1, align 8
  %6 = alloca %class.Handle.1, align 8
  %7 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %8 = load ptr, ptr @logger, align 8, !tbaa !5
  call void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef %8, ptr noundef nonnull @__FUNCTION__._ZN9Algorithm7getNameB5cxx11Ev)
  %9 = invoke noundef ptr @_ZN9SSLObjectI13X509_algor_stE8internalEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %10 unwind label %30

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %4) #7
  %11 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, i32, ptr, ptr, ...) @_ZN6Logger5writeEN11LoggerLevel12LOGGER_LEVELEPKcS3_z(ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef 32, ptr noundef nonnull @__FUNCTION__._ZN9Algorithm7getNameB5cxx11Ev, ptr noundef nonnull @.str.5)
          to label %12 unwind label %32

12:                                               ; preds = %10
  %13 = load ptr, ptr %9, align 8, !tbaa !9
  %14 = invoke i32 @OBJ_obj2txt(ptr noundef nonnull %4, i32 noundef 100, ptr noundef %13, i32 noundef 0)
          to label %15 unwind label %34

15:                                               ; preds = %12
  %16 = icmp slt i32 %14, 1
  br i1 %16, label %17, label %45

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

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

20:                                               ; preds = %19
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %18, i1 noundef zeroext true, ptr noundef nonnull @.str.1, i32 noundef 56, i32 noundef 0, ptr noundef nonnull @__FUNCTION__._ZN9AlgorithmC2EPKc, ptr noundef nonnull @__FUNCTION__._ZN9Algorithm7getNameB5cxx11Ev, ptr noundef nonnull %6, ptr noundef nonnull @.str.5)
          to label %22 unwind label %.thread27

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

22:                                               ; preds = %20
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %18)
          to label %23 unwind label %39

23:                                               ; preds = %22
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %24 = load ptr, ptr @logger, align 8, !tbaa !5
  %25 = invoke noundef ptr @_ZNK6HandleI9ExceptionEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %26 unwind label %42

26:                                               ; preds = %23
  %27 = call noundef ptr @_ZNK9Exception4whatEv(ptr noundef nonnull align 8 dereferenceable(176) %25) #7
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger4warnEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull @__FUNCTION__._ZN9Algorithm7getNameB5cxx11Ev, ptr noundef nonnull @.str.4, ptr noundef %27)
          to label %28 unwind label %42

28:                                               ; preds = %26
  %29 = call ptr @__cxa_allocate_exception(i64 8) #7
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %5)
  invoke void @__cxa_throw(ptr nonnull %29, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #9
          to label %57 unwind label %42

30:                                               ; preds = %2
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %56

32:                                               ; preds = %10
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %55

34:                                               ; preds = %12
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %55

36:                                               ; preds = %17
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %44

.thread:                                          ; preds = %19
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %41

39:                                               ; preds = %22
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br label %44

41:                                               ; preds = %.thread27, %.thread
  %.pn1726 = phi { ptr, i32 } [ %38, %.thread ], [ %21, %.thread27 ]
  call void @_ZdlPvm(ptr noundef nonnull %18, i64 noundef 176) #10
  br label %44

42:                                               ; preds = %28, %26, %23
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br label %44

44:                                               ; preds = %39, %41, %42, %36
  %.pn19 = phi { ptr, i32 } [ %43, %42 ], [ %.pn1726, %41 ], [ %40, %39 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %55

45:                                               ; preds = %15
  %46 = invoke noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #8
          to label %47 unwind label %51

47:                                               ; preds = %45
  %48 = zext nneg i32 %14 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %46, ptr noundef nonnull %4, i64 noundef %48, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %49 unwind label %53

49:                                               ; preds = %47
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  invoke void @_ZN6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2EPS5_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %46)
          to label %50 unwind label %51

50:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %4) #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

51:                                               ; preds = %49, %45
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %47
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @_ZdlPvm(ptr noundef nonnull %46, i64 noundef 32) #10
  br label %55

55:                                               ; preds = %34, %44, %53, %51, %32
  %.pn19.pn.pn = phi { ptr, i32 } [ %33, %32 ], [ %.pn19, %44 ], [ %35, %34 ], [ %52, %51 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %4) #7
  br label %56

56:                                               ; preds = %55, %30
  %.pn19.pn.pn.pn = phi { ptr, i32 } [ %.pn19.pn.pn, %55 ], [ %31, %30 ]
  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 } %.pn19.pn.pn.pn

57:                                               ; preds = %28
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 #4 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 #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 = { 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 #3 = { 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 #4 = { 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 #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 0}
!10 = !{!"_ZTS13X509_algor_st", !6, i64 0, !6, i64 8}


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