; LLVM IR from AsyncAlgoTrading/aat :: aat/cpp/src/core/order_book (order_book)

; 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.__gnu_cxx::__normal_iterator.233" = type { ptr }
%"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.0" = type { i8 }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.234" = type { ptr }
%"struct.aat::core::Order" = type <{ %"struct.aat::core::_EventTarget", %"class.std::__cxx11::basic_string", %"class.std::chrono::time_point", i32, [4 x i8], %"struct.aat::core::Instrument", %"struct.aat::core::ExchangeType", double, double, i32, i32, i32, [4 x i8], %"class.std::shared_ptr", double, double, i8, [7 x i8] }>
%"struct.aat::core::_EventTarget" = type { ptr }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"struct.aat::core::Instrument" = type { ptr, %"class.std::__cxx11::basic_string", i32, %"class.std::vector.228" }
%"class.std::vector.228" = type { %"struct.std::_Vector_base.229" }
%"struct.std::_Vector_base.229" = type { %"struct.std::_Vector_base<aat::core::ExchangeType, std::allocator<aat::core::ExchangeType>>::_Vector_impl" }
%"struct.std::_Vector_base<aat::core::ExchangeType, std::allocator<aat::core::ExchangeType>>::_Vector_impl" = type { %"struct.std::_Vector_base<aat::core::ExchangeType, std::allocator<aat::core::ExchangeType>>::_Vector_impl_data" }
%"struct.std::_Vector_base<aat::core::ExchangeType, std::allocator<aat::core::ExchangeType>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.aat::core::ExchangeType" = type { ptr, %"class.std::__cxx11::basic_string" }
%"class.aat::core::OrderBook" = type { %"class.aat::core::Collector", ptr, ptr, %"class.std::function", %"class.std::vector.195", %"class.std::vector.195", %"class.std::unordered_map.200", %"class.std::unordered_map.200" }
%"class.aat::core::Collector" = type { %"class.std::function", double, double, %"class.std::deque", %"class.std::shared_ptr", %"class.std::deque.183", %"class.std::deque.189" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::shared_ptr<aat::core::Event>, std::allocator<std::shared_ptr<aat::core::Event>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::shared_ptr<aat::core::Event>, std::allocator<std::shared_ptr<aat::core::Event>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::shared_ptr<aat::core::Event>, std::allocator<std::shared_ptr<aat::core::Event>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::shared_ptr<aat::core::Event>, std::allocator<std::shared_ptr<aat::core::Event>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::deque.183" = type { %"class.std::_Deque_base.184" }
%"class.std::_Deque_base.184" = type { %"struct.std::_Deque_base<std::shared_ptr<aat::core::Order>, std::allocator<std::shared_ptr<aat::core::Order>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::shared_ptr<aat::core::Order>, std::allocator<std::shared_ptr<aat::core::Order>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::shared_ptr<aat::core::Order>, std::allocator<std::shared_ptr<aat::core::Order>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::shared_ptr<aat::core::Order>, std::allocator<std::shared_ptr<aat::core::Order>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.188", %"struct.std::_Deque_iterator.188" }
%"struct.std::_Deque_iterator.188" = type { ptr, ptr, ptr, ptr }
%"class.std::deque.189" = type { %"class.std::_Deque_base.190" }
%"class.std::_Deque_base.190" = type { %"struct.std::_Deque_base<std::shared_ptr<aat::core::PriceLevel>, std::allocator<std::shared_ptr<aat::core::PriceLevel>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::shared_ptr<aat::core::PriceLevel>, std::allocator<std::shared_ptr<aat::core::PriceLevel>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::shared_ptr<aat::core::PriceLevel>, std::allocator<std::shared_ptr<aat::core::PriceLevel>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::shared_ptr<aat::core::PriceLevel>, std::allocator<std::shared_ptr<aat::core::PriceLevel>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.194", %"struct.std::_Deque_iterator.194" }
%"struct.std::_Deque_iterator.194" = type { ptr, ptr, ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::vector.195" = type { %"struct.std::_Vector_base.196" }
%"struct.std::_Vector_base.196" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map.200" = type { %"class.std::_Hashtable.201" }
%"class.std::_Hashtable.201" = 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 }

@.str.66 = external hidden unnamed_addr constant [22 x i8], align 1
@_ZTIN3aat6common15AATCPPExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8

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

; 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

declare i32 @__gxx_personality_v0(...)

; 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 dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxeqIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

declare ptr @__cxa_allocate_exception(i64)

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

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3aat4core9OrderBook6cancelESt10shared_ptrINS0_5OrderEE(ptr noundef nonnull align 8 dereferenceable(512) %0, ptr noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.233", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.233", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.233", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.233", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator.0", align 1
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i1, align 1
  %18 = alloca %"class.std::shared_ptr", align 8
  %19 = alloca %"class.std::shared_ptr", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.234", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.233", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.233", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.233", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator.234", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator.233", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator.233", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %27 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %28 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3aat4core5OrderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %29 = getelementptr inbounds %"struct.aat::core::Order", ptr %28, i32 0, i32 8
  %30 = load double, ptr %29, align 8, !tbaa !9
  store double %30, ptr %5, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %31 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3aat4core5OrderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %32 = getelementptr inbounds %"struct.aat::core::Order", ptr %31, i32 0, i32 9
  %33 = load i32, ptr %32, align 8, !tbaa !34
  store i32 %33, ptr %6, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %34 = load i32, ptr %6, align 4, !tbaa !35
  %35 = icmp eq i32 %34, 1
  br i1 %35, label %36, label %38

36:                                               ; preds = %2
  %37 = getelementptr inbounds %"class.aat::core::OrderBook", ptr %27, i32 0, i32 4
  br label %40

38:                                               ; preds = %2
  %39 = getelementptr inbounds %"class.aat::core::OrderBook", ptr %27, i32 0, i32 5
  br label %40

40:                                               ; preds = %38, %36
  %41 = phi ptr [ %37, %36 ], [ %39, %38 ]
  store ptr %41, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %42 = load i32, ptr %6, align 4, !tbaa !35
  %43 = icmp eq i32 %42, 1
  br i1 %43, label %44, label %46

44:                                               ; preds = %40
  %45 = getelementptr inbounds %"class.aat::core::OrderBook", ptr %27, i32 0, i32 6
  br label %48

46:                                               ; preds = %40
  %47 = getelementptr inbounds %"class.aat::core::OrderBook", ptr %27, i32 0, i32 7
  br label %48

48:                                               ; preds = %46, %44
  %49 = phi ptr [ %45, %44 ], [ %47, %46 ]
  store ptr %49, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #6
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.233", ptr %10, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  %55 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.233", ptr %11, i32 0, i32 0
  store ptr %54, ptr %55, align 8
  %56 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.233", ptr %10, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8
  %58 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.233", ptr %11, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8
  %60 = call ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEdET_S7_S7_RKT0_(ptr %57, ptr %59, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %61 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.233", ptr %9, i32 0, i32 0
  store ptr %60, ptr %61, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %62) #6
  %64 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.233", ptr %12, i32 0, i32 0
  store ptr %63, ptr %64, align 8
  %65 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br i1 %65, label %66, label %82

66:                                               ; preds = %48
  store i1 true, ptr %17, align 1
  %67 = call ptr @__cxa_allocate_exception(i64 40) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.66, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %68 unwind label %70

68:                                               ; preds = %66
  invoke void @_ZN3aat6common15AATCPPExceptionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %67, ptr noundef %13)
          to label %69 unwind label %74

69:                                               ; preds = %68
  store i1 false, ptr %17, align 1
  invoke void @__cxa_throw(ptr %67, ptr @_ZTIN3aat6common15AATCPPExceptionE, ptr @_ZN3aat6common15AATCPPExceptionD2Ev) #7
          to label %126 unwind label %74

70:                                               ; preds = %66
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %15, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %16, align 4
  br label %78

74:                                               ; preds = %69, %68
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %15, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  br label %78

78:                                               ; preds = %74, %70
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  %79 = load i1, ptr %17, align 1
  br i1 %79, label %80, label %81

80:                                               ; preds = %78
  call void @__cxa_free_exception(ptr %67) #6
  br label %81

81:                                               ; preds = %80, %78
  br label %120

82:                                               ; preds = %48
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt13unordered_mapIdSt10shared_ptrIN3aat4core10PriceLevelEESt4hashIdESt8equal_toIdESaISt4pairIKdS4_EEEixERSA_(ptr noundef nonnull align 8 dereferenceable(56) %83, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %85 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3aat4core10PriceLevelELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %84) #6
  call void @_ZNSt10shared_ptrIN3aat4core5OrderEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  invoke void @_ZN3aat4core10PriceLevel6removeESt10shared_ptrINS0_5OrderEE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %18, ptr noundef nonnull align 8 dereferenceable(304) %85, ptr noundef %19)
          to label %86 unwind label %115

86:                                               ; preds = %82
  call void @_ZNSt12__shared_ptrIN3aat4core5OrderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #6
  call void @_ZNSt12__shared_ptrIN3aat4core5OrderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #6
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt13unordered_mapIdSt10shared_ptrIN3aat4core10PriceLevelEESt4hashIdESt8equal_toIdESaISt4pairIKdS4_EEEixERSA_(ptr noundef nonnull align 8 dereferenceable(56) %87, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %89 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3aat4core10PriceLevelELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %88) #6
  %90 = call noundef i64 @_ZNK3aat4core10PriceLevel4sizeEv(ptr noundef nonnull align 8 dereferenceable(304) %89)
  %91 = icmp eq i64 %90, 0
  br i1 %91, label %92, label %119

92:                                               ; preds = %86
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #6
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.233", ptr %22, i32 0, i32 0
  store ptr %95, ptr %96, align 8
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %97) #6
  %99 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.233", ptr %23, i32 0, i32 0
  store ptr %98, ptr %99, align 8
  %100 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.233", ptr %22, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8
  %102 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.233", ptr %23, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8
  %104 = call ptr @_ZSt6removeIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEdET_S7_S7_RKT0_(ptr %101, ptr %103, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %105 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.233", ptr %21, i32 0, i32 0
  store ptr %104, ptr %105, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEC2IPdvEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %106) #6
  %108 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.233", ptr %25, i32 0, i32 0
  store ptr %107, ptr %108, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEC2IPdvEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  %109 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.234", ptr %20, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8
  %111 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.234", ptr %24, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8
  %113 = call ptr @_ZNSt6vectorIdSaIdEE5eraseEN9__gnu_cxx17__normal_iteratorIPKdS1_EES6_(ptr noundef nonnull align 8 dereferenceable(24) %93, ptr %110, ptr %112)
  %114 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.233", ptr %26, i32 0, i32 0
  store ptr %113, ptr %114, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %119

115:                                              ; preds = %82
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %15, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %16, align 4
  call void @_ZNSt12__shared_ptrIN3aat4core5OrderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #6
  br label %120

119:                                              ; preds = %92, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void

120:                                              ; preds = %115, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %121

121:                                              ; preds = %120
  %122 = load ptr, ptr %15, align 8
  %123 = load i32, ptr %16, align 4
  %124 = insertvalue { ptr, i32 } poison, ptr %122, 0
  %125 = insertvalue { ptr, i32 } %124, i32 %123, 1
  resume { ptr, i32 } %125

126:                                              ; preds = %69
  unreachable
}

declare void @_ZN3aat4core10PriceLevel6removeESt10shared_ptrINS0_5OrderEE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(304), ptr noundef) #5

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

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

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

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 = { 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 = { 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 }
attributes #7 = { noreturn }

!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, !25, i64 176}
!10 = !{!"_ZTSN3aat4core5OrderE", !11, i64 0, !12, i64 8, !15, i64 40, !17, i64 48, !18, i64 56, !24, i64 128, !25, i64 168, !25, i64 176, !26, i64 184, !27, i64 188, !28, i64 192, !29, i64 200, !25, i64 216, !25, i64 224, !32, i64 232}
!11 = !{!"_ZTSN3aat4core12_EventTargetE"}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !14, i64 8, !7, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSNSt6chrono10time_pointINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEEE", !16, i64 0}
!16 = !{!"_ZTSNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE", !14, i64 0}
!17 = !{!"_ZTSN3aat6config8DataTypeE", !7, i64 0}
!18 = !{!"_ZTSN3aat4core10InstrumentE", !12, i64 8, !19, i64 40, !20, i64 48}
!19 = !{!"_ZTSN3aat6config14InstrumentTypeE", !7, i64 0}
!20 = !{!"_ZTSSt6vectorIN3aat4core12ExchangeTypeESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIN3aat4core12ExchangeTypeESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN3aat4core12ExchangeTypeESaIS2_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN3aat4core12ExchangeTypeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSN3aat4core12ExchangeTypeE", !12, i64 8}
!25 = !{!"double", !7, i64 0}
!26 = !{!"_ZTSN3aat6config4SideE", !7, i64 0}
!27 = !{!"_ZTSN3aat6config9OrderTypeE", !7, i64 0}
!28 = !{!"_ZTSN3aat6config9OrderFlagE", !7, i64 0}
!29 = !{!"_ZTSSt10shared_ptrIN3aat4core5OrderEE", !30, i64 0}
!30 = !{!"_ZTSSt12__shared_ptrIN3aat4core5OrderELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !31, i64 8}
!31 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!32 = !{!"bool", !7, i64 0}
!33 = !{!25, !25, i64 0}
!34 = !{!10, !26, i64 184}
!35 = !{!26, !26, 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.__gnu_cxx::__normal_iterator.233" = type { ptr }
%"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.0" = type { i8 }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.234" = type { ptr }

@.str.66 = external hidden unnamed_addr constant [22 x i8], align 1
@_ZTIN3aat6common15AATCPPExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8

; 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 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

declare i32 @__gxx_personality_v0(...)

; 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 dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxeqIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3aat4core9OrderBook6cancelESt10shared_ptrINS0_5OrderEE(ptr noundef nonnull align 8 dereferenceable(512) %0, ptr noundef nonnull %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca double, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.233", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.233", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.0", align 1
  %8 = alloca %"class.std::shared_ptr", align 8
  %9 = alloca %"class.std::shared_ptr", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.234", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.233", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.234", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.233", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %14 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN3aat4core5OrderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %15 = getelementptr inbounds i8, ptr %14, i64 176
  %16 = load double, ptr %15, align 8, !tbaa !5
  store double %16, ptr %3, align 8, !tbaa !32
  %17 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN3aat4core5OrderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %18 = getelementptr inbounds i8, ptr %17, i64 184
  %19 = load i32, ptr %18, align 8, !tbaa !33
  %20 = icmp eq i32 %19, 1
  %.v = select i1 %20, i64 352, i64 376
  %21 = getelementptr inbounds i8, ptr %0, i64 %.v
  %.v22 = select i1 %20, i64 400, i64 456
  %22 = getelementptr inbounds i8, ptr %0, i64 %.v22
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %23 = tail call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  %24 = tail call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  %25 = call ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEdET_S7_S7_RKT0_(ptr %23, ptr %24, ptr noundef nonnull align 8 dereferenceable(8) %3)
  store ptr %25, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %26 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  store ptr %26, ptr %5, align 8
  %27 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br i1 %27, label %28, label %36

28:                                               ; preds = %2
  %29 = call ptr @__cxa_allocate_exception(i64 40) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.66, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %30 unwind label %.thread

30:                                               ; preds = %28
  invoke void @_ZN3aat6common15AATCPPExceptionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %29, ptr noundef nonnull %6)
          to label %31 unwind label %33

31:                                               ; preds = %30
  invoke void @__cxa_throw(ptr nonnull %29, ptr nonnull @_ZTIN3aat6common15AATCPPExceptionE, ptr nonnull @_ZN3aat6common15AATCPPExceptionD2Ev) #7
          to label %56 unwind label %33

.thread:                                          ; preds = %28
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  br label %35

33:                                               ; preds = %30, %31
  %.020 = phi i1 [ false, %31 ], [ true, %30 ]
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  br i1 %.020, label %35, label %55

35:                                               ; preds = %.thread, %33
  %.pn27 = phi { ptr, i32 } [ %32, %.thread ], [ %34, %33 ]
  call void @__cxa_free_exception(ptr %29) #6
  br label %55

36:                                               ; preds = %2
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt13unordered_mapIdSt10shared_ptrIN3aat4core10PriceLevelEESt4hashIdESt8equal_toIdESaISt4pairIKdS4_EEEixERSA_(ptr noundef nonnull align 8 dereferenceable(56) %22, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %38 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3aat4core10PriceLevelELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %37) #6
  call void @_ZNSt10shared_ptrIN3aat4core5OrderEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  invoke void @_ZN3aat4core10PriceLevel6removeESt10shared_ptrINS0_5OrderEE(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %8, ptr noundef nonnull align 8 dereferenceable(304) %38, ptr noundef nonnull %9)
          to label %39 unwind label %52

39:                                               ; preds = %36
  call void @_ZNSt12__shared_ptrIN3aat4core5OrderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @_ZNSt12__shared_ptrIN3aat4core5OrderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt13unordered_mapIdSt10shared_ptrIN3aat4core10PriceLevelEESt4hashIdESt8equal_toIdESaISt4pairIKdS4_EEEixERSA_(ptr noundef nonnull align 8 dereferenceable(56) %22, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %41 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3aat4core10PriceLevelELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %40) #6
  %42 = call noundef i64 @_ZNK3aat4core10PriceLevel4sizeEv(ptr noundef nonnull align 8 dereferenceable(304) %41)
  %43 = icmp eq i64 %42, 0
  br i1 %43, label %44, label %54

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %45 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  %46 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  %47 = call ptr @_ZSt6removeIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEdET_S7_S7_RKT0_(ptr %45, ptr %46, ptr noundef nonnull align 8 dereferenceable(8) %3)
  store ptr %47, ptr %11, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEC2IPdvEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %48 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  store ptr %48, ptr %13, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEC2IPdvEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  %49 = load ptr, ptr %10, align 8
  %50 = load ptr, ptr %12, align 8
  %51 = call ptr @_ZNSt6vectorIdSaIdEE5eraseEN9__gnu_cxx17__normal_iteratorIPKdS1_EES6_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr %49, ptr %50)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %54

52:                                               ; preds = %36
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN3aat4core5OrderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  br label %55

54:                                               ; preds = %44, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret void

55:                                               ; preds = %33, %35, %52
  %.pn.pn = phi { ptr, i32 } [ %.pn27, %35 ], [ %34, %33 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn

56:                                               ; preds = %31
  unreachable
}

declare void @_ZN3aat4core10PriceLevel6removeESt10shared_ptrINS0_5OrderEE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(304), ptr noundef) local_unnamed_addr #5

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

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

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

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 = { 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 = { 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 }
attributes #7 = { noreturn }

!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, !24, i64 176}
!6 = !{!"_ZTSN3aat4core5OrderE", !7, i64 0, !8, i64 8, !14, i64 40, !16, i64 48, !17, i64 56, !23, i64 128, !24, i64 168, !24, i64 176, !25, i64 184, !26, i64 188, !27, i64 192, !28, i64 200, !24, i64 216, !24, i64 224, !31, i64 232}
!7 = !{!"_ZTSN3aat4core12_EventTargetE"}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !9, i64 0, !13, i64 8, !11, i64 16}
!9 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"long", !11, i64 0}
!14 = !{!"_ZTSNSt6chrono10time_pointINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEEE", !15, i64 0}
!15 = !{!"_ZTSNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE", !13, i64 0}
!16 = !{!"_ZTSN3aat6config8DataTypeE", !11, i64 0}
!17 = !{!"_ZTSN3aat4core10InstrumentE", !8, i64 8, !18, i64 40, !19, i64 48}
!18 = !{!"_ZTSN3aat6config14InstrumentTypeE", !11, i64 0}
!19 = !{!"_ZTSSt6vectorIN3aat4core12ExchangeTypeESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN3aat4core12ExchangeTypeESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN3aat4core12ExchangeTypeESaIS2_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN3aat4core12ExchangeTypeESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!23 = !{!"_ZTSN3aat4core12ExchangeTypeE", !8, i64 8}
!24 = !{!"double", !11, i64 0}
!25 = !{!"_ZTSN3aat6config4SideE", !11, i64 0}
!26 = !{!"_ZTSN3aat6config9OrderTypeE", !11, i64 0}
!27 = !{!"_ZTSN3aat6config9OrderFlagE", !11, i64 0}
!28 = !{!"_ZTSSt10shared_ptrIN3aat4core5OrderEE", !29, i64 0}
!29 = !{!"_ZTSSt12__shared_ptrIN3aat4core5OrderELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !30, i64 8}
!30 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0}
!31 = !{!"bool", !11, i64 0}
!32 = !{!24, !24, i64 0}
!33 = !{!6, !25, i64 184}


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