; LLVM IR from dynexcoin/Dynex :: src/InProcessNode (InProcessNode)

; 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.std::error_code" = type { i32, ptr }
%"class.std::unique_lock" = type <{ ptr, i8, [7 x i8] }>
%"class.DynexCN::InProcessNode" = type { %"class.DynexCN::INode", %"class.DynexCN::IDynexCNProtocolObserver", %"class.DynexCN::ICoreObserver", i32, ptr, ptr, %"class.Tools::ObserverManager", %"struct.DynexCN::BlockHeaderInfo", %"class.boost::asio::io_context", %"class.std::unique_ptr", %"class.std::unique_ptr.10", %"class.DynexCN::BlockchainExplorerDataBuilder", %"class.std::mutex" }
%"class.DynexCN::INode" = type { ptr }
%"class.DynexCN::IDynexCNProtocolObserver" = type { ptr }
%"class.DynexCN::ICoreObserver" = type { ptr }
%"class.Tools::ObserverManager" = type { %"class.std::vector", %"class.std::mutex" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<DynexCN::INodeObserver *, std::allocator<DynexCN::INodeObserver *>>::_Vector_impl" }
%"struct.std::_Vector_base<DynexCN::INodeObserver *, std::allocator<DynexCN::INodeObserver *>>::_Vector_impl" = type { %"struct.std::_Vector_base<DynexCN::INodeObserver *, std::allocator<DynexCN::INodeObserver *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DynexCN::INodeObserver *, std::allocator<DynexCN::INodeObserver *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.DynexCN::BlockHeaderInfo" = type { i32, i8, i8, i64, %"struct.Crypto::Hash", %"struct.Crypto::Hash", i32, i8, i32, i64, i64 }
%"struct.Crypto::Hash" = type { [32 x i8] }
%"class.boost::asio::io_context" = type { %"class.boost::asio::execution_context", ptr }
%"class.boost::asio::execution_context" = type { ptr }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.9" }
%"struct.std::_Head_base.9" = type { ptr }
%"class.std::unique_ptr.10" = type { %"struct.std::__uniq_ptr_data.11" }
%"struct.std::__uniq_ptr_data.11" = type { %"class.std::__uniq_ptr_impl.12" }
%"class.std::__uniq_ptr_impl.12" = type { %"class.std::tuple.13" }
%"class.std::tuple.13" = type { %"struct.std::_Tuple_impl.14" }
%"struct.std::_Tuple_impl.14" = type { %"struct.std::_Head_base.17" }
%"struct.std::_Head_base.17" = type { ptr }
%"class.DynexCN::BlockchainExplorerDataBuilder" = type { ptr, ptr }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }

@_ZTISt12system_error = external constant ptr
@_ZTISt9exception = external constant ptr

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { i32, ptr } @_Z15make_error_codeN7DynexCN5error23InProcessNodeErrorCodesE(i32 noundef) #3

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local { i32, ptr } @_ZN7DynexCN13InProcessNode33doGetTransactionOutsGlobalIndicesERKN6Crypto4HashERSt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef nonnull align 1 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::error_code", align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::unique_lock", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  %16 = getelementptr inbounds %"class.DynexCN::InProcessNode", ptr %15, i32 0, i32 12
  call void @_ZNSt11unique_lockISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(9) %8, ptr noundef nonnull align 8 dereferenceable(40) %16)
  %17 = getelementptr inbounds %"class.DynexCN::InProcessNode", ptr %15, i32 0, i32 3
  %18 = load i32, ptr %17, align 8, !tbaa !9
  %19 = icmp ne i32 %18, 1
  br i1 %19, label %20, label %31

20:                                               ; preds = %3
  %21 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error23InProcessNodeErrorCodesE(i32 noundef 1)
          to label %22 unwind label %27

22:                                               ; preds = %20
  %23 = getelementptr inbounds { i32, ptr }, ptr %4, i32 0, i32 0
  %24 = extractvalue { i32, ptr } %21, 0
  store i32 %24, ptr %23, align 8
  %25 = getelementptr inbounds { i32, ptr }, ptr %4, i32 0, i32 1
  %26 = extractvalue { i32, ptr } %21, 1
  store ptr %26, ptr %25, align 8
  store i32 1, ptr %11, align 4
  br label %32

27:                                               ; preds = %20
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %9, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %10, align 4
  call void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  br label %91

31:                                               ; preds = %3
  store i32 0, ptr %11, align 4
  br label %32

32:                                               ; preds = %31, %22
  call void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  %33 = load i32, ptr %11, align 4
  switch i32 %33, label %99 [
    i32 0, label %34
    i32 1, label %89
  ]

34:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  %35 = getelementptr inbounds %"class.DynexCN::InProcessNode", ptr %15, i32 0, i32 4
  %36 = load ptr, ptr %35, align 8, !tbaa !42
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = load ptr, ptr %36, align 8, !tbaa !43
  %40 = getelementptr inbounds ptr, ptr %39, i64 17
  %41 = load ptr, ptr %40, align 8
  %42 = invoke noundef zeroext i1 %41(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 1 dereferenceable(32) %37, ptr noundef nonnull align 8 dereferenceable(24) %38)
          to label %43 unwind label %54

43:                                               ; preds = %34
  %44 = zext i1 %42 to i8
  store i8 %44, ptr %12, align 1, !tbaa !45
  %45 = load i8, ptr %12, align 1, !tbaa !45, !range !46, !noundef !47
  %46 = trunc i8 %45 to i1
  br i1 %46, label %79, label %47

47:                                               ; preds = %43
  %48 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error23InProcessNodeErrorCodesE(i32 noundef 6)
          to label %49 unwind label %54

49:                                               ; preds = %47
  %50 = getelementptr inbounds { i32, ptr }, ptr %4, i32 0, i32 0
  %51 = extractvalue { i32, ptr } %48, 0
  store i32 %51, ptr %50, align 8
  %52 = getelementptr inbounds { i32, ptr }, ptr %4, i32 0, i32 1
  %53 = extractvalue { i32, ptr } %48, 1
  store ptr %53, ptr %52, align 8
  store i32 1, ptr %11, align 4
  br label %80

54:                                               ; preds = %47, %34
  %55 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %9, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  br label %58

58:                                               ; preds = %54
  %59 = load i32, ptr %10, align 4
  %60 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt12system_error) #7
  %61 = icmp eq i32 %59, %60
  br i1 %61, label %62, label %67

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %63 = load ptr, ptr %9, align 8
  %64 = call ptr @__cxa_begin_catch(ptr %63) #7
  store ptr %64, ptr %14, align 8
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt12system_error4codeEv(ptr noundef nonnull align 8 dereferenceable(32) %65) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %4, ptr align 8 %66, i64 16, i1 false), !tbaa.struct !48
  store i32 1, ptr %11, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %89

67:                                               ; preds = %58
  %68 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #7
  %69 = icmp eq i32 %59, %68
  br i1 %69, label %70, label %91

70:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %71 = load ptr, ptr %9, align 8
  %72 = call ptr @__cxa_begin_catch(ptr %71) #7
  store ptr %72, ptr %13, align 8
  %73 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error23InProcessNodeErrorCodesE(i32 noundef 5)
          to label %74 unwind label %83

74:                                               ; preds = %70
  %75 = getelementptr inbounds { i32, ptr }, ptr %4, i32 0, i32 0
  %76 = extractvalue { i32, ptr } %73, 0
  store i32 %76, ptr %75, align 8
  %77 = getelementptr inbounds { i32, ptr }, ptr %4, i32 0, i32 1
  %78 = extractvalue { i32, ptr } %73, 1
  store ptr %78, ptr %77, align 8
  store i32 1, ptr %11, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %89

79:                                               ; preds = %43
  store i32 0, ptr %11, align 4
  br label %80

80:                                               ; preds = %79, %49
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  %81 = load i32, ptr %11, align 4
  switch i32 %81, label %99 [
    i32 0, label %82
    i32 1, label %89
  ]

82:                                               ; preds = %80
  br label %88

83:                                               ; preds = %70
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %9, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %10, align 4
  invoke void @__cxa_end_catch()
          to label %87 unwind label %96

87:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %91

88:                                               ; preds = %82
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #7
  br label %89

89:                                               ; preds = %88, %80, %74, %62, %32
  %90 = load { i32, ptr }, ptr %4, align 8
  ret { i32, ptr } %90

91:                                               ; preds = %87, %67, %27
  %92 = load ptr, ptr %9, align 8
  %93 = load i32, ptr %10, align 4
  %94 = insertvalue { ptr, i32 } poison, ptr %92, 0
  %95 = insertvalue { ptr, i32 } %94, i32 %93, 1
  resume { ptr, i32 } %95

96:                                               ; preds = %83
  %97 = landingpad { ptr, i32 }
          catch ptr null
  %98 = extractvalue { ptr, i32 } %97, 0
  call void @__clang_call_terminate(ptr %98) #8
  unreachable

99:                                               ; preds = %80, %32
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { 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 #6 = { nounwind memory(none) }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !14, i64 24}
!10 = !{!"_ZTSN7DynexCN13InProcessNodeE", !11, i64 0, !12, i64 8, !13, i64 16, !14, i64 24, !6, i64 32, !6, i64 40, !15, i64 48, !22, i64 112, !27, i64 224, !29, i64 240, !35, i64 248, !41, i64 256, !20, i64 272}
!11 = !{!"_ZTSN7DynexCN5INodeE"}
!12 = !{!"_ZTSN7DynexCN24IDynexCNProtocolObserverE"}
!13 = !{!"_ZTSN7DynexCN13ICoreObserverE"}
!14 = !{!"_ZTSN7DynexCN13InProcessNode5StateE", !7, i64 0}
!15 = !{!"_ZTSN5Tools15ObserverManagerIN7DynexCN13INodeObserverEEE", !16, i64 0, !20, i64 24}
!16 = !{!"_ZTSSt6vectorIPN7DynexCN13INodeObserverESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIPN7DynexCN13INodeObserverESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN7DynexCN13INodeObserverESaIS2_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN7DynexCN13INodeObserverESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSSt5mutex", !21, i64 0}
!21 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!22 = !{!"_ZTSN7DynexCN15BlockHeaderInfoE", !23, i64 0, !7, i64 4, !7, i64 5, !24, i64 8, !25, i64 16, !25, i64 48, !23, i64 80, !26, i64 84, !23, i64 88, !24, i64 96, !24, i64 104}
!23 = !{!"int", !7, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSN6Crypto4HashE", !7, i64 0}
!26 = !{!"bool", !7, i64 0}
!27 = !{!"_ZTSN5boost4asio10io_contextE", !28, i64 0, !6, i64 8}
!28 = !{!"_ZTSN5boost4asio17execution_contextE", !6, i64 0}
!29 = !{!"_ZTSSt10unique_ptrISt6threadSt14default_deleteIS0_EE", !30, i64 0}
!30 = !{!"_ZTSSt15__uniq_ptr_dataISt6threadSt14default_deleteIS0_ELb1ELb1EE", !31, i64 0}
!31 = !{!"_ZTSSt15__uniq_ptr_implISt6threadSt14default_deleteIS0_EE", !32, i64 0}
!32 = !{!"_ZTSSt5tupleIJPSt6threadSt14default_deleteIS0_EEE", !33, i64 0}
!33 = !{!"_ZTSSt11_Tuple_implILm0EJPSt6threadSt14default_deleteIS0_EEE", !34, i64 0}
!34 = !{!"_ZTSSt10_Head_baseILm0EPSt6threadLb0EE", !6, i64 0}
!35 = !{!"_ZTSSt10unique_ptrIN5boost4asio10io_context4workESt14default_deleteIS3_EE", !36, i64 0}
!36 = !{!"_ZTSSt15__uniq_ptr_dataIN5boost4asio10io_context4workESt14default_deleteIS3_ELb1ELb1EE", !37, i64 0}
!37 = !{!"_ZTSSt15__uniq_ptr_implIN5boost4asio10io_context4workESt14default_deleteIS3_EE", !38, i64 0}
!38 = !{!"_ZTSSt5tupleIJPN5boost4asio10io_context4workESt14default_deleteIS3_EEE", !39, i64 0}
!39 = !{!"_ZTSSt11_Tuple_implILm0EJPN5boost4asio10io_context4workESt14default_deleteIS3_EEE", !40, i64 0}
!40 = !{!"_ZTSSt10_Head_baseILm0EPN5boost4asio10io_context4workELb0EE", !6, i64 0}
!41 = !{!"_ZTSN7DynexCN29BlockchainExplorerDataBuilderE", !6, i64 0, !6, i64 8}
!42 = !{!10, !6, i64 32}
!43 = !{!44, !44, i64 0}
!44 = !{!"vtable pointer", !8, i64 0}
!45 = !{!26, !26, i64 0}
!46 = !{i8 0, i8 2}
!47 = !{}
!48 = !{i64 0, i64 4, !49, i64 8, i64 8, !5}
!49 = !{!23, !23, 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.std::error_code" = type { i32, ptr }
%"class.std::unique_lock" = type <{ ptr, i8, [7 x i8] }>

@_ZTISt12system_error = external constant ptr
@_ZTISt9exception = external constant ptr

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

declare i32 @__gxx_personality_v0(...)

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { i32, ptr } @_Z15make_error_codeN7DynexCN5error23InProcessNodeErrorCodesE(i32 noundef) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local { i32, ptr } @_ZN7DynexCN13InProcessNode33doGetTransactionOutsGlobalIndicesERKN6Crypto4HashERSt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef nonnull align 1 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::error_code", align 8
  %5 = alloca %"class.std::unique_lock", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %6 = getelementptr inbounds i8, ptr %0, i64 272
  call void @_ZNSt11unique_lockISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(9) %5, ptr noundef nonnull align 8 dereferenceable(40) %6)
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %.not.not = icmp eq i32 %8, 1
  br i1 %.not.not, label %14, label %9

9:                                                ; preds = %3
  %10 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error23InProcessNodeErrorCodesE(i32 noundef 1)
  %11 = extractvalue { i32, ptr } %10, 0
  store i32 %11, ptr %4, align 8
  %12 = getelementptr inbounds i8, ptr %4, i64 8
  %13 = extractvalue { i32, ptr } %10, 1
  store ptr %13, ptr %12, align 8
  call void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %46

14:                                               ; preds = %3
  call void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  %15 = getelementptr inbounds i8, ptr %0, i64 32
  %16 = load ptr, ptr %15, align 8, !tbaa !41
  %17 = load ptr, ptr %16, align 8, !tbaa !42
  %18 = getelementptr inbounds i8, ptr %17, i64 136
  %19 = load ptr, ptr %18, align 8
  %20 = invoke noundef zeroext i1 %19(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 1 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %21 unwind label %22

21:                                               ; preds = %14
  br i1 %20, label %45, label %40

22:                                               ; preds = %14
  %23 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %24 = extractvalue { ptr, i32 } %23, 0
  %25 = extractvalue { ptr, i32 } %23, 1
  %26 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt12system_error) #6
  %27 = icmp eq i32 %25, %26
  br i1 %27, label %28, label %31

28:                                               ; preds = %22
  %29 = call ptr @__cxa_begin_catch(ptr %24) #6
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt12system_error4codeEv(ptr noundef nonnull align 8 dereferenceable(32) %29) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %30, i64 16, i1 false), !tbaa.struct !44
  call void @__cxa_end_catch()
  br label %46

31:                                               ; preds = %22
  %32 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #6
  %33 = icmp eq i32 %25, %32
  br i1 %33, label %34, label %47

34:                                               ; preds = %31
  %35 = call ptr @__cxa_begin_catch(ptr %24) #6
  %36 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error23InProcessNodeErrorCodesE(i32 noundef 5)
  %37 = extractvalue { i32, ptr } %36, 0
  store i32 %37, ptr %4, align 8
  %38 = getelementptr inbounds i8, ptr %4, i64 8
  %39 = extractvalue { i32, ptr } %36, 1
  store ptr %39, ptr %38, align 8
  call void @__cxa_end_catch()
  br label %46

40:                                               ; preds = %21
  %41 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error23InProcessNodeErrorCodesE(i32 noundef 6)
  %42 = extractvalue { i32, ptr } %41, 0
  store i32 %42, ptr %4, align 8
  %43 = getelementptr inbounds i8, ptr %4, i64 8
  %44 = extractvalue { i32, ptr } %41, 1
  store ptr %44, ptr %43, align 8
  br label %46

45:                                               ; preds = %21
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #6
  br label %46

46:                                               ; preds = %40, %9, %45, %34, %28
  %.fca.0.load = load i32, ptr %4, align 8
  %.fca.0.insert = insertvalue { i32, ptr } poison, i32 %.fca.0.load, 0
  %.fca.1.gep = getelementptr inbounds i8, ptr %4, i64 8
  %.fca.1.load = load ptr, ptr %.fca.1.gep, align 8
  %.fca.1.insert = insertvalue { i32, ptr } %.fca.0.insert, ptr %.fca.1.load, 1
  ret { i32, ptr } %.fca.1.insert

47:                                               ; preds = %31
  resume { ptr, i32 } %23
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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 = { nofree nosync nounwind memory(none) }
attributes #6 = { 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, !10, i64 24}
!6 = !{!"_ZTSN7DynexCN13InProcessNodeE", !7, i64 0, !8, i64 8, !9, i64 16, !10, i64 24, !13, i64 32, !13, i64 40, !14, i64 48, !21, i64 112, !26, i64 224, !28, i64 240, !34, i64 248, !40, i64 256, !19, i64 272}
!7 = !{!"_ZTSN7DynexCN5INodeE"}
!8 = !{!"_ZTSN7DynexCN24IDynexCNProtocolObserverE"}
!9 = !{!"_ZTSN7DynexCN13ICoreObserverE"}
!10 = !{!"_ZTSN7DynexCN13InProcessNode5StateE", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"any pointer", !11, i64 0}
!14 = !{!"_ZTSN5Tools15ObserverManagerIN7DynexCN13INodeObserverEEE", !15, i64 0, !19, i64 24}
!15 = !{!"_ZTSSt6vectorIPN7DynexCN13INodeObserverESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIPN7DynexCN13INodeObserverESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN7DynexCN13INodeObserverESaIS2_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN7DynexCN13INodeObserverESaIS2_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!19 = !{!"_ZTSSt5mutex", !20, i64 0}
!20 = !{!"_ZTSSt12__mutex_base", !11, i64 0}
!21 = !{!"_ZTSN7DynexCN15BlockHeaderInfoE", !22, i64 0, !11, i64 4, !11, i64 5, !23, i64 8, !24, i64 16, !24, i64 48, !22, i64 80, !25, i64 84, !22, i64 88, !23, i64 96, !23, i64 104}
!22 = !{!"int", !11, i64 0}
!23 = !{!"long", !11, i64 0}
!24 = !{!"_ZTSN6Crypto4HashE", !11, i64 0}
!25 = !{!"bool", !11, i64 0}
!26 = !{!"_ZTSN5boost4asio10io_contextE", !27, i64 0, !13, i64 8}
!27 = !{!"_ZTSN5boost4asio17execution_contextE", !13, i64 0}
!28 = !{!"_ZTSSt10unique_ptrISt6threadSt14default_deleteIS0_EE", !29, i64 0}
!29 = !{!"_ZTSSt15__uniq_ptr_dataISt6threadSt14default_deleteIS0_ELb1ELb1EE", !30, i64 0}
!30 = !{!"_ZTSSt15__uniq_ptr_implISt6threadSt14default_deleteIS0_EE", !31, i64 0}
!31 = !{!"_ZTSSt5tupleIJPSt6threadSt14default_deleteIS0_EEE", !32, i64 0}
!32 = !{!"_ZTSSt11_Tuple_implILm0EJPSt6threadSt14default_deleteIS0_EEE", !33, i64 0}
!33 = !{!"_ZTSSt10_Head_baseILm0EPSt6threadLb0EE", !13, i64 0}
!34 = !{!"_ZTSSt10unique_ptrIN5boost4asio10io_context4workESt14default_deleteIS3_EE", !35, i64 0}
!35 = !{!"_ZTSSt15__uniq_ptr_dataIN5boost4asio10io_context4workESt14default_deleteIS3_ELb1ELb1EE", !36, i64 0}
!36 = !{!"_ZTSSt15__uniq_ptr_implIN5boost4asio10io_context4workESt14default_deleteIS3_EE", !37, i64 0}
!37 = !{!"_ZTSSt5tupleIJPN5boost4asio10io_context4workESt14default_deleteIS3_EEE", !38, i64 0}
!38 = !{!"_ZTSSt11_Tuple_implILm0EJPN5boost4asio10io_context4workESt14default_deleteIS3_EEE", !39, i64 0}
!39 = !{!"_ZTSSt10_Head_baseILm0EPN5boost4asio10io_context4workELb0EE", !13, i64 0}
!40 = !{!"_ZTSN7DynexCN29BlockchainExplorerDataBuilderE", !13, i64 0, !13, i64 8}
!41 = !{!6, !13, i64 32}
!42 = !{!43, !43, i64 0}
!43 = !{!"vtable pointer", !12, i64 0}
!44 = !{i64 0, i64 4, !45, i64 8, i64 8, !46}
!45 = !{!22, !22, i64 0}
!46 = !{!13, !13, i64 0}


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