; LLVM IR from facebook/redex :: libredex/RedexContext.ll (ZN12RedexContext13publish_classEP8DexClass)

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

%"struct.std::pair.472" = type <{ ptr, i8, [7 x i8] }>
%"class.std::lock_guard" = type { ptr }
%class.DexType = type { ptr, %"struct.std::atomic.203" }
%"struct.std::atomic.203" = type { %"struct.std::__atomic_base.204" }
%"struct.std::__atomic_base.204" = type { ptr }
%struct.RedexContext = type { i8, i8, %class.ConcurrentSet, %class.ConcurrentSet.7, %class.InsertOnlyConcurrentSet, %"struct.RedexContext::LargeStringSet", %"struct.std::array.27", %"struct.RedexContext::ConcurrentStringStorage", %"struct.RedexContext::ConcurrentStringStorage", %"struct.RedexContext::ConcurrentStringStorage", %class.AtomicMap, %class.AtomicMap.41, %"class.std::mutex", %class.AtomicMap.49, %class.InsertOnlyConcurrentSet.57, %class.AtomicMap.65, %"class.std::mutex", %class.AtomicMap.73, ptr, %class.InsertOnlyConcurrentSet.81, %"class.std::mutex", %"class.std::vector.89", %"class.std::vector.94", %"class.std::mutex", %"class.std::vector.99", %class.UnorderedMap, i8, i8, %"class.std::mutex", %class.FrequentlyUsedPointers, %class.ConcurrentMap, %class.ConcurrentMap.137, i8, %"class.std::queue", %"class.std::mutex" }
%class.ConcurrentSet = type { %class.ConcurrentContainer }
%class.ConcurrentContainer = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable"] }
%"class.cc_impl::ConcurrentHashtable" = type { %"struct.std::atomic", %"struct.std::atomic.1", %"struct.std::atomic.3", %"struct.std::atomic.5" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { ptr }
%"struct.std::atomic.1" = type { %"struct.std::__atomic_base.2" }
%"struct.std::__atomic_base.2" = type { i64 }
%"struct.std::atomic.3" = type { %"struct.std::__atomic_base.4" }
%"struct.std::__atomic_base.4" = type { i8 }
%"struct.std::atomic.5" = type { %"struct.std::__atomic_base.6" }
%"struct.std::__atomic_base.6" = type { ptr }
%class.ConcurrentSet.7 = type { %class.ConcurrentContainer.8 }
%class.ConcurrentContainer.8 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.9"] }
%"class.cc_impl::ConcurrentHashtable.9" = type { %"struct.std::atomic.10", %"struct.std::atomic.1", %"struct.std::atomic.3", %"struct.std::atomic.12" }
%"struct.std::atomic.10" = type { %"struct.std::__atomic_base.11" }
%"struct.std::__atomic_base.11" = type { ptr }
%"struct.std::atomic.12" = type { %"struct.std::__atomic_base.13" }
%"struct.std::__atomic_base.13" = type { ptr }
%class.InsertOnlyConcurrentSet = type { %class.ConcurrentContainer.15 }
%class.ConcurrentContainer.15 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.16"] }
%"class.cc_impl::ConcurrentHashtable.16" = type { %"struct.std::atomic.17", %"struct.std::atomic.1", %"struct.std::atomic.3", %"struct.std::atomic.19" }
%"struct.std::atomic.17" = type { %"struct.std::__atomic_base.18" }
%"struct.std::__atomic_base.18" = type { ptr }
%"struct.std::atomic.19" = type { %"struct.std::__atomic_base.20" }
%"struct.std::__atomic_base.20" = type { ptr }
%"struct.RedexContext::LargeStringSet" = type { %"struct.std::array" }
%"struct.std::array" = type { [127 x %"class.RedexContext::ConcurrentProjectedStringSet"] }
%"class.RedexContext::ConcurrentProjectedStringSet" = type { %"struct.std::array.22", %"struct.std::array.26" }
%"struct.std::array.22" = type { [31 x %"class.std::set"] }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<const DexString *, const DexString *, std::_Identity<const DexString *>, RedexContext::StringSetKeyCompare>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<const DexString *, const DexString *, std::_Identity<const DexString *>, RedexContext::StringSetKeyCompare>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::array.26" = type { [31 x %"class.std::mutex"] }
%"struct.std::array.27" = type { [128 x ptr] }
%"struct.RedexContext::ConcurrentStringStorage" = type { i64, i64, i64, %"struct.std::atomic.1", %"struct.std::atomic.1", %"struct.std::atomic.1", %"struct.std::atomic.1", %"struct.std::array.28", %"class.std::mutex", %"class.std::vector" }
%"struct.std::array.28" = type { [11 x %"struct.RedexContext::ConcurrentStringStorage::Slot"] }
%"struct.RedexContext::ConcurrentStringStorage::Slot" = type { %"struct.std::atomic.29", [56 x i8] }
%"struct.std::atomic.29" = type { %"struct.std::__atomic_base.30" }
%"struct.std::__atomic_base.30" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unique_ptr<RedexContext::ConcurrentStringStorage::Container>, std::allocator<std::unique_ptr<RedexContext::ConcurrentStringStorage::Container>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<RedexContext::ConcurrentStringStorage::Container>, std::allocator<std::unique_ptr<RedexContext::ConcurrentStringStorage::Container>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<RedexContext::ConcurrentStringStorage::Container>, std::allocator<std::unique_ptr<RedexContext::ConcurrentStringStorage::Container>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<RedexContext::ConcurrentStringStorage::Container>, std::allocator<std::unique_ptr<RedexContext::ConcurrentStringStorage::Container>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.AtomicMap = type { %class.ConcurrentContainer.34 }
%class.ConcurrentContainer.34 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.35"] }
%"class.cc_impl::ConcurrentHashtable.35" = type { %"struct.std::atomic.36", %"struct.std::atomic.1", %"struct.std::atomic.3", %"struct.std::atomic.38" }
%"struct.std::atomic.36" = type { %"struct.std::__atomic_base.37" }
%"struct.std::__atomic_base.37" = type { ptr }
%"struct.std::atomic.38" = type { %"struct.std::__atomic_base.39" }
%"struct.std::__atomic_base.39" = type { ptr }
%class.AtomicMap.41 = type { %class.ConcurrentContainer.42 }
%class.ConcurrentContainer.42 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.43"] }
%"class.cc_impl::ConcurrentHashtable.43" = type { %"struct.std::atomic.44", %"struct.std::atomic.1", %"struct.std::atomic.3", %"struct.std::atomic.46" }
%"struct.std::atomic.44" = type { %"struct.std::__atomic_base.45" }
%"struct.std::__atomic_base.45" = type { ptr }
%"struct.std::atomic.46" = type { %"struct.std::__atomic_base.47" }
%"struct.std::__atomic_base.47" = type { ptr }
%class.AtomicMap.49 = type { %class.ConcurrentContainer.50 }
%class.ConcurrentContainer.50 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.51"] }
%"class.cc_impl::ConcurrentHashtable.51" = type { %"struct.std::atomic.52", %"struct.std::atomic.1", %"struct.std::atomic.3", %"struct.std::atomic.54" }
%"struct.std::atomic.52" = type { %"struct.std::__atomic_base.53" }
%"struct.std::__atomic_base.53" = type { ptr }
%"struct.std::atomic.54" = type { %"struct.std::__atomic_base.55" }
%"struct.std::__atomic_base.55" = type { ptr }
%class.InsertOnlyConcurrentSet.57 = type { %class.ConcurrentContainer.58 }
%class.ConcurrentContainer.58 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.59"] }
%"class.cc_impl::ConcurrentHashtable.59" = type { %"struct.std::atomic.60", %"struct.std::atomic.1", %"struct.std::atomic.3", %"struct.std::atomic.62" }
%"struct.std::atomic.60" = type { %"struct.std::__atomic_base.61" }
%"struct.std::__atomic_base.61" = type { ptr }
%"struct.std::atomic.62" = type { %"struct.std::__atomic_base.63" }
%"struct.std::__atomic_base.63" = type { ptr }
%class.AtomicMap.65 = type { %class.ConcurrentContainer.66 }
%class.ConcurrentContainer.66 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.67"] }
%"class.cc_impl::ConcurrentHashtable.67" = type { %"struct.std::atomic.68", %"struct.std::atomic.1", %"struct.std::atomic.3", %"struct.std::atomic.70" }
%"struct.std::atomic.68" = type { %"struct.std::__atomic_base.69" }
%"struct.std::__atomic_base.69" = type { ptr }
%"struct.std::atomic.70" = type { %"struct.std::__atomic_base.71" }
%"struct.std::__atomic_base.71" = type { ptr }
%class.AtomicMap.73 = type { %class.ConcurrentContainer.74 }
%class.ConcurrentContainer.74 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.75"] }
%"class.cc_impl::ConcurrentHashtable.75" = type { %"struct.std::atomic.76", %"struct.std::atomic.1", %"struct.std::atomic.3", %"struct.std::atomic.78" }
%"struct.std::atomic.76" = type { %"struct.std::__atomic_base.77" }
%"struct.std::__atomic_base.77" = type { ptr }
%"struct.std::atomic.78" = type { %"struct.std::__atomic_base.79" }
%"struct.std::__atomic_base.79" = type { ptr }
%class.InsertOnlyConcurrentSet.81 = type { %class.ConcurrentContainer.82 }
%class.ConcurrentContainer.82 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.83"] }
%"class.cc_impl::ConcurrentHashtable.83" = type { %"struct.std::atomic.84", %"struct.std::atomic.1", %"struct.std::atomic.3", %"struct.std::atomic.86" }
%"struct.std::atomic.84" = type { %"struct.std::__atomic_base.85" }
%"struct.std::__atomic_base.85" = type { ptr }
%"struct.std::atomic.86" = type { %"struct.std::__atomic_base.87" }
%"struct.std::__atomic_base.87" = type { ptr }
%"class.std::vector.89" = type { %"struct.std::_Vector_base.90" }
%"struct.std::_Vector_base.90" = type { %"struct.std::_Vector_base<DexClass *, std::allocator<DexClass *>>::_Vector_impl" }
%"struct.std::_Vector_base<DexClass *, std::allocator<DexClass *>>::_Vector_impl" = type { %"struct.std::_Vector_base<DexClass *, std::allocator<DexClass *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DexClass *, std::allocator<DexClass *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.94" = type { %"struct.std::_Vector_base.95" }
%"struct.std::_Vector_base.95" = type { %"struct.std::_Vector_base<const DexType *, std::allocator<const DexType *>>::_Vector_impl" }
%"struct.std::_Vector_base<const DexType *, std::allocator<const DexType *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const DexType *, std::allocator<const DexType *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const DexType *, std::allocator<const DexType *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.99" = type { %"struct.std::_Vector_base.100" }
%"struct.std::_Vector_base.100" = type { %"struct.std::_Vector_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.UnorderedMap = type { %"class.std::unordered_map" }
%"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 }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%class.FrequentlyUsedPointers = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %class.UnorderedSet }
%class.UnorderedSet = type { %"class.std::unordered_set" }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.111" }
%"class.std::_Hashtable.111" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%class.ConcurrentMap = type { %class.ConcurrentContainer.130, [83 x %"class.std::mutex"] }
%class.ConcurrentContainer.130 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.131"] }
%"class.cc_impl::ConcurrentHashtable.131" = type { %"struct.std::atomic.132", %"struct.std::atomic.1", %"struct.std::atomic.3", %"struct.std::atomic.134" }
%"struct.std::atomic.132" = type { %"struct.std::__atomic_base.133" }
%"struct.std::__atomic_base.133" = type { ptr }
%"struct.std::atomic.134" = type { %"struct.std::__atomic_base.135" }
%"struct.std::__atomic_base.135" = type { ptr }
%class.ConcurrentMap.137 = type { %class.ConcurrentContainer.138, [83 x %"class.std::mutex"] }
%class.ConcurrentContainer.138 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.139"] }
%"class.cc_impl::ConcurrentHashtable.139" = type { %"struct.std::atomic.140", %"struct.std::atomic.1", %"struct.std::atomic.3", %"struct.std::atomic.142" }
%"struct.std::atomic.140" = type { %"struct.std::__atomic_base.141" }
%"struct.std::__atomic_base.141" = type { ptr }
%"struct.std::atomic.142" = type { %"struct.std::__atomic_base.143" }
%"struct.std::__atomic_base.143" = type { ptr }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<DexMethodRef *, std::allocator<DexMethodRef *>>::_Deque_impl" }
%"struct.std::_Deque_base<DexMethodRef *, std::allocator<DexMethodRef *>>::_Deque_impl" = type { %"struct.std::_Deque_base<DexMethodRef *, std::allocator<DexMethodRef *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<DexMethodRef *, std::allocator<DexMethodRef *>>::_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::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 }

@.str.16 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN12RedexContext13publish_classEP8DexClass = external hidden unnamed_addr constant [45 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [54 x i8], align 1

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

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 uwtable
declare dso_local void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

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

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

; Function Attrs: noreturn
declare void @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12RedexContext13publish_classEP8DexClass(ptr noundef nonnull align 8 dereferenceable(389504) %0, ptr noundef %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca %"struct.std::pair.472", align 8
  %9 = alloca %"class.std::lock_guard", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = call noundef ptr @_ZNK8DexClass8get_typeEv(ptr noundef nonnull align 8 dereferenceable(176) %13)
  store ptr %14, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %class.DexType, ptr %15, i32 0, i32 1
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = call noundef zeroext i1 @_ZNSt6atomicIP8DexClassE23compare_exchange_strongERS1_S1_St12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %17, i32 noundef 5) #4
  %19 = zext i1 %18 to i8
  store i8 %19, ptr %7, align 1, !tbaa !9
  %20 = load i8, ptr %7, align 1, !tbaa !9, !range !11, !noundef !12
  %21 = trunc i8 %20 to i1
  br i1 %21, label %22, label %23

22:                                               ; preds = %2
  br label %31

23:                                               ; preds = %2
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = call noundef ptr @_ZNK8DexClass8get_nameEv(ptr noundef nonnull align 8 dereferenceable(176) %24)
  %26 = call noundef ptr @_ZNK9DexString5c_strEv(ptr noundef nonnull align 8 dereferenceable(16) %25)
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK8DexClass21get_deobfuscated_nameEv(ptr noundef nonnull align 8 dereferenceable(176) %27)
  %29 = call noundef ptr @_ZNK9DexString5c_strEv(ptr noundef nonnull align 8 dereferenceable(16) %28)
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef @.str.48, ptr noundef @.str.16, i32 noundef 924, ptr noundef @__PRETTY_FUNCTION__._ZN12RedexContext13publish_classEP8DexClass, i32 noundef 2, ptr noundef @.str.49, ptr noundef %26, ptr noundef %29) #5
  unreachable

30:                                               ; No predecessors!
  br label %31

31:                                               ; preds = %30, %22
  %32 = getelementptr inbounds %struct.RedexContext, ptr %12, i32 0, i32 19
  %33 = call { ptr, i8 } @_ZN23InsertOnlyConcurrentSetIP8DexClassSt4hashIS1_ESt8equal_toIS1_ELm83EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(2664) %32, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %34 = getelementptr inbounds { ptr, i8 }, ptr %8, i32 0, i32 0
  %35 = extractvalue { ptr, i8 } %33, 0
  store ptr %35, ptr %34, align 8
  %36 = getelementptr inbounds { ptr, i8 }, ptr %8, i32 0, i32 1
  %37 = extractvalue { ptr, i8 } %33, 1
  store i8 %37, ptr %36, align 8
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = call noundef zeroext i1 @_ZNK8DexClass11is_externalEv(ptr noundef nonnull align 8 dereferenceable(176) %38)
  br i1 %39, label %40, label %49

40:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %41 = getelementptr inbounds %struct.RedexContext, ptr %12, i32 0, i32 20
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(40) %41)
  %42 = getelementptr inbounds %struct.RedexContext, ptr %12, i32 0, i32 21
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP8DexClassSaIS1_EE12emplace_backIJRS1_EEES5_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %44 unwind label %45

44:                                               ; preds = %40
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %49

45:                                               ; preds = %40
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %10, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %11, align 4
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %50

49:                                               ; preds = %44, %31
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void

50:                                               ; preds = %45
  %51 = load ptr, ptr %10, align 8
  %52 = load i32, ptr %11, align 4
  %53 = insertvalue { ptr, i32 } poison, ptr %51, 0
  %54 = insertvalue { ptr, i32 } %53, i32 %52, 1
  resume { ptr, i32 } %54
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt6atomicIP8DexClassE23compare_exchange_strongERS1_S1_St12memory_order(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZN23InsertOnlyConcurrentSetIP8DexClassSt4hashIS1_ESt8equal_toIS1_ELm83EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(2664), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8DexClass11is_externalEv(ptr noundef nonnull align 8 dereferenceable(176)) #2 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn "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 = { nounwind }
attributes #5 = { 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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}


; 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::lock_guard" = type { ptr }

@.str.16 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN12RedexContext13publish_classEP8DexClass = external hidden unnamed_addr constant [45 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [54 x i8], align 1

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

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 uwtable
declare dso_local void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

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

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

; Function Attrs: noreturn
declare void @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12RedexContext13publish_classEP8DexClass(ptr noundef nonnull align 8 dereferenceable(389504) %0, ptr noundef nonnull %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::lock_guard", align 8
  store ptr %1, ptr %3, align 8, !tbaa !5
  %6 = tail call noundef ptr @_ZNK8DexClass8get_typeEv(ptr noundef nonnull align 8 dereferenceable(176) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store ptr null, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 8
  %8 = call noundef zeroext i1 @_ZNSt6atomicIP8DexClassE23compare_exchange_strongERS1_S1_St12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %1, i32 noundef 5) #4
  br i1 %8, label %14, label %9

9:                                                ; preds = %2
  %10 = call noundef ptr @_ZNK8DexClass8get_nameEv(ptr noundef nonnull align 8 dereferenceable(176) %1)
  %11 = call noundef ptr @_ZNK9DexString5c_strEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK8DexClass21get_deobfuscated_nameEv(ptr noundef nonnull align 8 dereferenceable(176) %1)
  %13 = call noundef ptr @_ZNK9DexString5c_strEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.48, ptr noundef nonnull @.str.16, i32 noundef 924, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12RedexContext13publish_classEP8DexClass, i32 noundef 2, ptr noundef nonnull @.str.49, ptr noundef %11, ptr noundef %13) #5
  unreachable

14:                                               ; preds = %2
  %15 = getelementptr inbounds i8, ptr %0, i64 374024
  %16 = call { ptr, i8 } @_ZN23InsertOnlyConcurrentSetIP8DexClassSt4hashIS1_ESt8equal_toIS1_ELm83EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(2664) %15, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = call noundef zeroext i1 @_ZNK8DexClass11is_externalEv(ptr noundef nonnull align 8 dereferenceable(176) %17)
  br i1 %18, label %19, label %26

19:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %20 = getelementptr inbounds i8, ptr %0, i64 376688
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(40) %20)
  %21 = getelementptr inbounds i8, ptr %0, i64 376728
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP8DexClassSaIS1_EE12emplace_backIJRS1_EEES5_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %23 unwind label %24

23:                                               ; preds = %19
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %26

24:                                               ; preds = %19
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  resume { ptr, i32 } %25

26:                                               ; preds = %23, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt6atomicIP8DexClassE23compare_exchange_strongERS1_S1_St12memory_order(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8DexClass11is_externalEv(ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #2 align 2

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

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


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