; LLVM IR from alibaba/BladeDISC :: tao_compiler/mlir/ral/context/base/cpu (cpu_context_impl)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::lock_guard" = type { ptr }
%class.anon.110 = type { i8 }
%"struct.tao::ral::internal::Voidifier" = type { i8 }
%"class.tao::ral::internal::LogMessage" = type { %"class.std::__cxx11::basic_ostringstream.base", ptr, i32, i32, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_ostringstream.base" = type { %"class.std::basic_ostream.base", %"class.std::__cxx11::basic_stringbuf" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%class.anon.111 = type { i8 }
%"struct.std::pair.116" = type <{ ptr, i32, [4 x i8] }>
%"struct.std::pair.113" = type <{ %"struct.std::__detail::_Node_iterator", i8, [7 x i8] }>
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.tao::ral::cpu::BaseCpuContextState" = type { %"struct.tao::ral::Context::Resource", %"class.std::mutex", %"class.std::shared_ptr.34", i8, %"class.std::unordered_set" }
%"struct.tao::ral::Context::Resource" = type { 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 }
%"class.std::shared_ptr.34" = type { %"class.std::__shared_ptr.35" }
%"class.std::__shared_ptr.35" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.50" }
%"class.std::_Hashtable.50" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.tao::ral::cpu::BaseCpuExecutionContext" = type { %"struct.tao::ral::BaseExecutionContext", %"class.std::unordered_map.89" }
%"struct.tao::ral::BaseExecutionContext" = type { %"class.tao::ral::ExecutionContext", %"class.std::unordered_set", %"class.std::unordered_set", %"class.std::unordered_map.69", %"class.std::unordered_map.69", %"class.std::unordered_map.89" }
%"class.tao::ral::ExecutionContext" = type { ptr, %"class.std::unique_ptr.37", %"class.std::unordered_map" }
%"class.std::unique_ptr.37" = type { %"struct.std::__uniq_ptr_data.38" }
%"struct.std::__uniq_ptr_data.38" = type { %"class.std::__uniq_ptr_impl.39" }
%"class.std::__uniq_ptr_impl.39" = type { %"class.std::tuple.40" }
%"class.std::tuple.40" = type { %"struct.std::_Tuple_impl.41" }
%"struct.std::_Tuple_impl.41" = type { %"struct.std::_Head_base.44" }
%"struct.std::_Head_base.44" = type { ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.69" = type { %"class.std::_Hashtable.70" }
%"class.std::_Hashtable.70" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.89" = type { %"class.std::_Hashtable.90" }
%"class.std::_Hashtable.90" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }

@_ZN3tao3ral3cpu23kRalBaseCpuContextStateE = external dso_local global ptr, align 8
@_ZTIN3tao3ral16ExecutionContextE = external constant ptr
@_ZTIN3tao3ral3cpu23BaseCpuExecutionContextE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.1 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN3tao3ral16ExecutionContext11getResourceINS0_3cpu19BaseCpuContextStateEEEPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN3tao3ral3cpu18ral_base_cpu_allocEPNS0_16ExecutionContextEm(ptr noundef %0, i64 noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"class.std::lock_guard", align 8
  %12 = alloca %class.anon.110, align 1
  %13 = alloca %"struct.tao::ral::internal::Voidifier", align 1
  %14 = alloca %"class.tao::ral::internal::LogMessage", align 8
  %15 = alloca i1, align 1
  %16 = alloca i1, align 1
  %17 = alloca ptr, align 8
  %18 = alloca %class.anon.111, align 1
  %19 = alloca %"struct.tao::ral::internal::Voidifier", align 1
  %20 = alloca %"class.tao::ral::internal::LogMessage", align 8
  %21 = alloca i1, align 1
  %22 = alloca i1, align 1
  %23 = alloca %"struct.std::pair.116", align 8
  %24 = alloca i32, align 4
  %25 = alloca { ptr, i32 }, align 8
  %26 = alloca %"struct.std::pair.113", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #9
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #9
  %28 = load ptr, ptr @_ZN3tao3ral3cpu23kRalBaseCpuContextStateE, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef %28, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %29 unwind label %36

29:                                               ; preds = %2
  %30 = invoke noundef ptr @_ZN3tao3ral16ExecutionContext11getResourceINS0_3cpu19BaseCpuContextStateEEEPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(72) %27, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %31 unwind label %40

31:                                               ; preds = %29
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #9
  store ptr %30, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = icmp eq ptr %32, null
  br i1 %33, label %45, label %34

34:                                               ; preds = %31
  %35 = call ptr @__dynamic_cast(ptr %32, ptr @_ZTIN3tao3ral16ExecutionContextE, ptr @_ZTIN3tao3ral3cpu23BaseCpuExecutionContextE, i64 0) #9
  br label %46

36:                                               ; preds = %2
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %8, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %9, align 4
  br label %44

40:                                               ; preds = %29
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %8, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  br label %44

44:                                               ; preds = %40, %36
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #9
  br label %173

45:                                               ; preds = %31
  br label %46

46:                                               ; preds = %45, %34
  %47 = phi ptr [ %35, %34 ], [ null, %45 ]
  store ptr %47, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.tao::ral::cpu::BaseCpuContextState", ptr %48, i32 0, i32 1
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(40) %49)
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #9
  store i1 false, ptr %15, align 1
  store i1 false, ptr %16, align 1
  %50 = invoke noundef zeroext i1 @"_ZZN3tao3ral3cpu18ral_base_cpu_allocEPNS0_16ExecutionContextEmENK3$_0clEiPKc"(ptr noundef nonnull align 1 dereferenceable(1) %12, i32 noundef 1, ptr noundef @.str.1)
          to label %51 unwind label %123

51:                                               ; preds = %46
  %52 = xor i1 %50, true
  %53 = xor i1 %52, true
  %54 = xor i1 %53, true
  %55 = zext i1 %54 to i64
  %56 = call i64 @llvm.expect.i64(i64 %55, i64 1)
  %57 = icmp ne i64 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %51
  br label %66

59:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 392, ptr %14) #9
  store i1 true, ptr %15, align 1
  invoke void @_ZN3tao3ral8internal10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128) %14, ptr noundef @.str.1, i32 noundef 134, i32 noundef 0)
          to label %60 unwind label %127

60:                                               ; preds = %59
  store i1 true, ptr %16, align 1
  %61 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEA33_cEOT_S6_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %14, ptr noundef nonnull align 1 dereferenceable(33) @.str.2)
          to label %62 unwind label %131

62:                                               ; preds = %60
  %63 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEmEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %61, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %64 unwind label %131

64:                                               ; preds = %62
  invoke void @_ZNK3tao3ral8internal9VoidifieranINS1_10LogMessageEEEvRKT_(ptr noundef nonnull align 1 dereferenceable(1) %13, ptr noundef nonnull align 8 dereferenceable(128) %63)
          to label %65 unwind label %131

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65, %58
  %67 = load i1, ptr %16, align 1
  br i1 %67, label %68, label %69

68:                                               ; preds = %66
  call void @_ZN3tao3ral8internal10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14) #9
  br label %69

69:                                               ; preds = %68, %66
  %70 = load i1, ptr %15, align 1
  br i1 %70, label %71, label %72

71:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 392, ptr %14) #9
  br label %72

72:                                               ; preds = %71, %69
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #9
  %73 = load i64, ptr %4, align 8, !tbaa !9
  %74 = icmp ne i64 %73, 0
  br i1 %74, label %75, label %77

75:                                               ; preds = %72
  %76 = load i64, ptr %4, align 8, !tbaa !9
  br label %78

77:                                               ; preds = %72
  br label %78

78:                                               ; preds = %77, %75
  %79 = phi i64 [ %76, %75 ], [ 1, %77 ]
  store i64 %79, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.tao::ral::cpu::BaseCpuContextState", ptr %80, i32 0, i32 2
  %82 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3tao3ral9AllocatorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %81) #9
  %83 = load i64, ptr %4, align 8, !tbaa !9
  %84 = load ptr, ptr %82, align 8, !tbaa !11
  %85 = getelementptr inbounds ptr, ptr %84, i64 3
  %86 = load ptr, ptr %85, align 8
  %87 = invoke noundef ptr %86(ptr noundef nonnull align 8 dereferenceable(8) %82, i64 noundef %83)
          to label %88 unwind label %143

88:                                               ; preds = %78
  store ptr %87, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #9
  store i1 false, ptr %21, align 1
  store i1 false, ptr %22, align 1
  %89 = invoke noundef zeroext i1 @"_ZZN3tao3ral3cpu18ral_base_cpu_allocEPNS0_16ExecutionContextEmENK3$_1clEiPKc"(ptr noundef nonnull align 1 dereferenceable(1) %18, i32 noundef 1, ptr noundef @.str.1)
          to label %90 unwind label %147

90:                                               ; preds = %88
  %91 = xor i1 %89, true
  %92 = xor i1 %91, true
  %93 = xor i1 %92, true
  %94 = zext i1 %93 to i64
  %95 = call i64 @llvm.expect.i64(i64 %94, i64 1)
  %96 = icmp ne i64 %95, 0
  br i1 %96, label %97, label %98

97:                                               ; preds = %90
  br label %105

98:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 392, ptr %20) #9
  store i1 true, ptr %21, align 1
  invoke void @_ZN3tao3ral8internal10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128) %20, ptr noundef @.str.1, i32 noundef 137, i32 noundef 0)
          to label %99 unwind label %151

99:                                               ; preds = %98
  store i1 true, ptr %22, align 1
  %100 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEA37_cEOT_S6_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %20, ptr noundef nonnull align 1 dereferenceable(37) @.str.3)
          to label %101 unwind label %155

101:                                              ; preds = %99
  %102 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEPvEOT_S6_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %100, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %103 unwind label %155

103:                                              ; preds = %101
  invoke void @_ZNK3tao3ral8internal9VoidifieranINS1_10LogMessageEEEvRKT_(ptr noundef nonnull align 1 dereferenceable(1) %19, ptr noundef nonnull align 8 dereferenceable(128) %102)
          to label %104 unwind label %155

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104, %97
  %106 = load i1, ptr %22, align 1
  br i1 %106, label %107, label %108

107:                                              ; preds = %105
  call void @_ZN3tao3ral8internal10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %20) #9
  br label %108

108:                                              ; preds = %107, %105
  %109 = load i1, ptr %21, align 1
  br i1 %109, label %110, label %111

110:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 392, ptr %20) #9
  br label %111

111:                                              ; preds = %110, %108
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.tao::ral::cpu::BaseCpuExecutionContext", ptr %112, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  store i32 1, ptr %24, align 4, !tbaa !13
  %114 = invoke { ptr, i32 } @_ZSt9make_pairIRPviESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %115 unwind label %167

115:                                              ; preds = %111
  store { ptr, i32 } %114, ptr %25, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %25, i64 12, i1 false)
  %116 = invoke { ptr, i8 } @_ZNSt13unordered_mapIPKviSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_iEEE6insertIS6_IPviEEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueES6_INSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEbEE4typeESG_(ptr noundef nonnull align 8 dereferenceable(56) %113, ptr noundef nonnull align 8 dereferenceable(12) %23)
          to label %117 unwind label %167

117:                                              ; preds = %115
  %118 = getelementptr inbounds { ptr, i8 }, ptr %26, i32 0, i32 0
  %119 = extractvalue { ptr, i8 } %116, 0
  store ptr %119, ptr %118, align 8
  %120 = getelementptr inbounds { ptr, i8 }, ptr %26, i32 0, i32 1
  %121 = extractvalue { ptr, i8 } %116, 1
  store i8 %121, ptr %120, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #9
  %122 = load ptr, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #9
  ret ptr %122

123:                                              ; preds = %46
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %8, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %9, align 4
  br label %142

127:                                              ; preds = %59
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %8, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %9, align 4
  br label %138

131:                                              ; preds = %64, %62, %60
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %8, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %9, align 4
  %135 = load i1, ptr %16, align 1
  br i1 %135, label %136, label %137

136:                                              ; preds = %131
  call void @_ZN3tao3ral8internal10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14) #9
  br label %137

137:                                              ; preds = %136, %131
  br label %138

138:                                              ; preds = %137, %127
  %139 = load i1, ptr %15, align 1
  br i1 %139, label %140, label %141

140:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 392, ptr %14) #9
  br label %141

141:                                              ; preds = %140, %138
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #9
  br label %142

142:                                              ; preds = %141, %123
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #9
  br label %172

143:                                              ; preds = %78
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %8, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %9, align 4
  br label %171

147:                                              ; preds = %88
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %8, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %9, align 4
  br label %166

151:                                              ; preds = %98
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %8, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %9, align 4
  br label %162

155:                                              ; preds = %103, %101, %99
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %8, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %9, align 4
  %159 = load i1, ptr %22, align 1
  br i1 %159, label %160, label %161

160:                                              ; preds = %155
  call void @_ZN3tao3ral8internal10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %20) #9
  br label %161

161:                                              ; preds = %160, %155
  br label %162

162:                                              ; preds = %161, %151
  %163 = load i1, ptr %21, align 1
  br i1 %163, label %164, label %165

164:                                              ; preds = %162
  call void @llvm.lifetime.end.p0(i64 392, ptr %20) #9
  br label %165

165:                                              ; preds = %164, %162
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #9
  br label %166

166:                                              ; preds = %165, %147
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  br label %171

167:                                              ; preds = %115, %111
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %8, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #9
  br label %171

171:                                              ; preds = %167, %166, %143
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %172

172:                                              ; preds = %171, %142
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  br label %173

173:                                              ; preds = %172, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #9
  br label %174

174:                                              ; preds = %173
  %175 = load ptr, ptr %8, align 8
  %176 = load i32, ptr %9, align 4
  %177 = insertvalue { ptr, i32 } poison, ptr %175, 0
  %178 = insertvalue { ptr, i32 } %177, i32 %176, 1
  resume { ptr, i32 } %178
}

; Function Attrs: nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @"_ZZN3tao3ral3cpu18ral_base_cpu_allocEPNS0_16ExecutionContextEmENK3$_0clEiPKc"(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef) #4 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3tao3ral8internal9VoidifieranINS1_10LogMessageEEEvRKT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(128)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEmEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEA33_cEOT_S6_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(33)) #4

declare void @_ZN3tao3ral8internal10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #6

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @"_ZZN3tao3ral3cpu18ral_base_cpu_allocEPNS0_16ExecutionContextEmENK3$_1clEiPKc"(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEPvEOT_S6_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEA37_cEOT_S6_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(37)) #4

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_mapIPKviSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_iEEE6insertIS6_IPviEEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueES6_INSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEbEE4typeESG_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i32 } @_ZSt9make_pairIRPviESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::lock_guard" = type { ptr }
%class.anon.110 = type { i8 }
%"struct.tao::ral::internal::Voidifier" = type { i8 }
%"class.tao::ral::internal::LogMessage" = type { %"class.std::__cxx11::basic_ostringstream.base", ptr, i32, i32, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_ostringstream.base" = type { %"class.std::basic_ostream.base", %"class.std::__cxx11::basic_stringbuf" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%class.anon.111 = type { i8 }
%"struct.std::pair.116" = type <{ ptr, i32, [4 x i8] }>

@_ZN3tao3ral3cpu23kRalBaseCpuContextStateE = external dso_local local_unnamed_addr global ptr, align 8
@_ZTIN3tao3ral16ExecutionContextE = external constant ptr
@_ZTIN3tao3ral3cpu23BaseCpuExecutionContextE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.1 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN3tao3ral3cpu18ral_base_cpu_allocEPNS0_16ExecutionContextEm(ptr noundef %0, i64 noundef %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::lock_guard", align 8
  %7 = alloca %class.anon.110, align 1
  %8 = alloca %"struct.tao::ral::internal::Voidifier", align 1
  %9 = alloca %"class.tao::ral::internal::LogMessage", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %class.anon.111, align 1
  %12 = alloca %"struct.tao::ral::internal::Voidifier", align 1
  %13 = alloca %"class.tao::ral::internal::LogMessage", align 8
  %14 = alloca %"struct.std::pair.116", align 8
  %15 = alloca i32, align 4
  store i64 %1, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  %16 = load ptr, ptr @_ZN3tao3ral3cpu23kRalBaseCpuContextStateE, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef %16, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %17 unwind label %23

17:                                               ; preds = %2
  %18 = invoke noundef ptr @_ZN3tao3ral16ExecutionContext11getResourceINS0_3cpu19BaseCpuContextStateEEEPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %19 unwind label %25

19:                                               ; preds = %17
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  %20 = call ptr @__dynamic_cast(ptr nonnull %0, ptr nonnull @_ZTIN3tao3ral16ExecutionContextE, ptr nonnull @_ZTIN3tao3ral3cpu23BaseCpuExecutionContextE, i64 0) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %21 = getelementptr inbounds i8, ptr %18, i64 8
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(40) %21)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #8
  %22 = invoke noundef zeroext i1 @"_ZZN3tao3ral3cpu18ral_base_cpu_allocEPNS0_16ExecutionContextEmENK3$_0clEiPKc"(ptr noundef nonnull align 1 dereferenceable(1) %7, i32 noundef 1, ptr noundef nonnull @.str.1)
          to label %28 unwind label %57

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

25:                                               ; preds = %17
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  br label %27

27:                                               ; preds = %25, %23
  %.pn = phi { ptr, i32 } [ %26, %25 ], [ %24, %23 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %79

28:                                               ; preds = %19
  br i1 %22, label %29, label %.critedge38, !prof !11

29:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %9) #8
  invoke void @_ZN3tao3ral8internal10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128) %9, ptr noundef nonnull @.str.1, i32 noundef 134, i32 noundef 0)
          to label %30 unwind label %59

30:                                               ; preds = %29
  %31 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEA33_cEOT_S6_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %9, ptr noundef nonnull align 1 dereferenceable(33) @.str.2)
          to label %32 unwind label %61

32:                                               ; preds = %30
  %33 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEmEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %31, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %.critedge unwind label %61

.critedge:                                        ; preds = %32
  call void @_ZNK3tao3ral8internal9VoidifieranINS1_10LogMessageEEEvRKT_(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 8 dereferenceable(128) %33)
  call void @_ZN3tao3ral8internal10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #8
  %.pre = load i64, ptr %3, align 8
  br label %.critedge38

.critedge38:                                      ; preds = %28, %.critedge
  %34 = phi i64 [ %1, %28 ], [ %.pre, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #8
  %35 = call i64 @llvm.umax.i64(i64 %34, i64 1)
  store i64 %35, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %36 = getelementptr inbounds i8, ptr %18, i64 48
  %37 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3tao3ral9AllocatorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %36) #8
  %38 = load i64, ptr %3, align 8, !tbaa !5
  %39 = load ptr, ptr %37, align 8, !tbaa !12
  %40 = getelementptr inbounds i8, ptr %39, i64 24
  %41 = load ptr, ptr %40, align 8
  %42 = invoke noundef ptr %41(ptr noundef nonnull align 8 dereferenceable(8) %37, i64 noundef %38)
          to label %43 unwind label %65

43:                                               ; preds = %.critedge38
  store ptr %42, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #8
  %44 = invoke noundef zeroext i1 @"_ZZN3tao3ral3cpu18ral_base_cpu_allocEPNS0_16ExecutionContextEmENK3$_1clEiPKc"(ptr noundef nonnull align 1 dereferenceable(1) %11, i32 noundef 1, ptr noundef nonnull @.str.1)
          to label %45 unwind label %67

45:                                               ; preds = %43
  br i1 %44, label %46, label %.critedge41, !prof !11

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %13) #8
  invoke void @_ZN3tao3ral8internal10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef nonnull @.str.1, i32 noundef 137, i32 noundef 0)
          to label %47 unwind label %69

47:                                               ; preds = %46
  %48 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEA37_cEOT_S6_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef nonnull align 1 dereferenceable(37) @.str.3)
          to label %49 unwind label %71

49:                                               ; preds = %47
  %50 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEPvEOT_S6_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %48, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %.critedge40 unwind label %71

.critedge40:                                      ; preds = %49
  call void @_ZNK3tao3ral8internal9VoidifieranINS1_10LogMessageEEEvRKT_(ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef nonnull align 8 dereferenceable(128) %50)
  call void @_ZN3tao3ral8internal10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %13) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %13) #8
  br label %.critedge41

.critedge41:                                      ; preds = %45, %.critedge40
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  store i32 1, ptr %15, align 4, !tbaa !14
  %51 = invoke { ptr, i32 } @_ZSt9make_pairIRPviESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %52 unwind label %75

52:                                               ; preds = %.critedge41
  %53 = getelementptr inbounds i8, ptr %20, i64 352
  %.fca.0.extract = extractvalue { ptr, i32 } %51, 0
  %.fca.1.extract = extractvalue { ptr, i32 } %51, 1
  store ptr %.fca.0.extract, ptr %14, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %14, i64 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %54 = invoke { ptr, i8 } @_ZNSt13unordered_mapIPKviSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_iEEE6insertIS6_IPviEEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueES6_INSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEbEE4typeESG_(ptr noundef nonnull align 8 dereferenceable(56) %53, ptr noundef nonnull align 8 dereferenceable(12) %14)
          to label %55 unwind label %75

55:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  %56 = load ptr, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  ret ptr %56

57:                                               ; preds = %19
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %64

59:                                               ; preds = %29
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %63

61:                                               ; preds = %32, %30
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3tao3ral8internal10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #8
  br label %63

63:                                               ; preds = %59, %61
  %.pn28 = phi { ptr, i32 } [ %62, %61 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  br label %64

64:                                               ; preds = %63, %57
  %.pn28.pn = phi { ptr, i32 } [ %.pn28, %63 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #8
  br label %78

65:                                               ; preds = %.critedge38
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %77

67:                                               ; preds = %43
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %74

69:                                               ; preds = %46
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %73

71:                                               ; preds = %49, %47
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3tao3ral8internal10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %13) #8
  br label %73

73:                                               ; preds = %69, %71
  %.pn31 = phi { ptr, i32 } [ %72, %71 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  br label %74

74:                                               ; preds = %73, %67
  %.pn31.pn = phi { ptr, i32 } [ %.pn31, %73 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #8
  br label %77

75:                                               ; preds = %52, %.critedge41
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  br label %77

77:                                               ; preds = %75, %74, %65
  %.pn34 = phi { ptr, i32 } [ %76, %75 ], [ %.pn31.pn, %74 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %78

78:                                               ; preds = %77, %64
  %.pn34.pn = phi { ptr, i32 } [ %.pn34, %77 ], [ %.pn28.pn, %64 ]
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %79

79:                                               ; preds = %78, %27
  %.pn34.pn.pn = phi { ptr, i32 } [ %.pn34.pn, %78 ], [ %.pn, %27 ]
  resume { ptr, i32 } %.pn34.pn.pn
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @"_ZZN3tao3ral3cpu18ral_base_cpu_allocEPNS0_16ExecutionContextEmENK3$_0clEiPKc"(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3tao3ral8internal9VoidifieranINS1_10LogMessageEEEvRKT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEmEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEA33_cEOT_S6_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(33)) local_unnamed_addr #4

declare void @_ZN3tao3ral8internal10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3tao3ral9AllocatorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @"_ZZN3tao3ral3cpu18ral_base_cpu_allocEPNS0_16ExecutionContextEmENK3$_1clEiPKc"(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEPvEOT_S6_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN3tao3ral8internal10LogMessageEA37_cEOT_S6_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(37)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_mapIPKviSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_iEEE6insertIS6_IPviEEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueES6_INSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEbEE4typeESG_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i32 } @_ZSt9make_pairIRPviESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(read) }
attributes #4 = { inlinehint 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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!12 = !{!13, !13, i64 0}
!13 = !{!"vtable pointer", !8, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}


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