; LLVM IR from facebook/redex :: opt/optimize_enums (EnumUpcastAnalysis)

; 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.cc_impl::ConcurrentContainerIterator.212" = type { ptr, i64, %"class.cc_impl::ConcurrentHashtableIterator.213" }
%"class.cc_impl::ConcurrentHashtableIterator.213" = type { ptr, i64, ptr }
%class.ConcurrentSet = type { %class.ConcurrentContainer.65 }
%class.ConcurrentContainer.65 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.66"] }
%"class.cc_impl::ConcurrentHashtable.66" = type { %"struct.std::atomic.67", %"struct.std::atomic.58", %"struct.std::atomic.60", %"struct.std::atomic.69" }
%"struct.std::atomic.67" = type { %"struct.std::__atomic_base.68" }
%"struct.std::__atomic_base.68" = type { ptr }
%"struct.std::atomic.58" = type { %"struct.std::__atomic_base.59" }
%"struct.std::__atomic_base.59" = type { i64 }
%"struct.std::atomic.60" = type { %"struct.std::__atomic_base.61" }
%"struct.std::__atomic_base.61" = type { i8 }
%"struct.std::atomic.69" = type { %"struct.std::__atomic_base.70" }
%"struct.std::__atomic_base.70" = type { ptr }
%class.anon.215 = type { ptr, ptr, ptr }
%class.anon.217 = type { ptr, ptr, ptr, ptr }
%"class.ConcurrentContainer<std::unordered_set<DexType *>, 83>::UnorderedIterable" = type { ptr }
%"struct.optimize_enums::Config" = type { i32, i8, i8, %class.UnorderedSet, %class.InsertOnlyConcurrentMap, %class.ConcurrentSet }
%class.UnorderedSet = type { %"class.std::unordered_set" }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.39" }
%"class.std::_Hashtable.39" = 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.InsertOnlyConcurrentMap = type { %class.ConcurrentContainer }
%class.ConcurrentContainer = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable"] }
%"class.cc_impl::ConcurrentHashtable" = type { %"struct.std::atomic", %"struct.std::atomic.58", %"struct.std::atomic.60", %"struct.std::atomic.62" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { ptr }
%"struct.std::atomic.62" = type { %"struct.std::__atomic_base.63" }
%"struct.std::__atomic_base.63" = type { ptr }

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN14redex_parallel19default_num_threadsEv() #3

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_Z17UnorderedIterableI13ConcurrentSetIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ELm83EETnNSt9enable_ifIXsr3stdE12is_base_of_vI13UnorderedBaseIT_ESA_EEbE4typeELb1EEDaRSA_(ptr noundef nonnull align 8 dereferenceable(2664)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE17UnorderedIterable5beginEv(ptr dead_on_unwind noalias writable sret(%"class.cc_impl::ConcurrentContainerIterator.212") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE17UnorderedIterable3endEv(ptr dead_on_unwind noalias writable sret(%"class.cc_impl::ConcurrentContainerIterator.212") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP7DexTypeS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEneERKS9_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14optimize_enums19reject_unsafe_enumsERKSt6vectorIP8DexClassSaIS2_EEPNS_6ConfigERKSt8functionIFvPK7DexTypeNS_10UnsafeTypeEEE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(32) %2) #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %class.ConcurrentSet, align 8
  %9 = alloca %class.anon.215, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %class.anon.217, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.ConcurrentContainer<std::unordered_set<DexType *>, 83>::UnorderedIterable", align 8
  %15 = alloca %"class.cc_impl::ConcurrentContainerIterator.212", align 8
  %16 = alloca %"class.cc_impl::ConcurrentContainerIterator.212", align 8
  %17 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.optimize_enums::Config", ptr %18, i32 0, i32 5
  store ptr %19, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2664, ptr %8) #4
  call void @_ZN13ConcurrentSetIP7DexTypeSt4hashIS1_ESt8equal_toIS1_ELm83EEC2Ev(ptr noundef nonnull align 8 dereferenceable(2664) %8) #4
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #4
  %21 = getelementptr inbounds %class.anon.215, ptr %9, i32 0, i32 0
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %22, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds %class.anon.215, ptr %9, i32 0, i32 1
  store ptr %8, ptr %23, align 8, !tbaa !5
  %24 = getelementptr inbounds %class.anon.215, ptr %9, i32 0, i32 2
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %25, ptr %24, align 8, !tbaa !5
  %26 = invoke noundef i64 @_ZN14redex_parallel19default_num_threadsEv()
          to label %27 unwind label %49

27:                                               ; preds = %3
  invoke void @"_ZN4walk8parallel6fieldsISt6vectorIP8DexClassSaIS4_EEZN14optimize_enums19reject_unsafe_enumsERKS6_PNS7_6ConfigERKSt8functionIFvPK7DexTypeNS7_10UnsafeTypeEEEE3$_0EEvRKT_RKT0_m"(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %26)
          to label %28 unwind label %49

28:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #4
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #4
  %30 = getelementptr inbounds %class.anon.217, ptr %12, i32 0, i32 0
  store ptr %7, ptr %30, align 8, !tbaa !5
  %31 = getelementptr inbounds %class.anon.217, ptr %12, i32 0, i32 1
  store ptr %8, ptr %31, align 8, !tbaa !5
  %32 = getelementptr inbounds %class.anon.217, ptr %12, i32 0, i32 2
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %33, ptr %32, align 8, !tbaa !5
  %34 = getelementptr inbounds %class.anon.217, ptr %12, i32 0, i32 3
  store ptr %5, ptr %34, align 8, !tbaa !5
  %35 = invoke noundef i64 @_ZN14redex_parallel19default_num_threadsEv()
          to label %36 unwind label %53

36:                                               ; preds = %28
  invoke void @"_ZN4walk8parallel7methodsISt6vectorIP8DexClassSaIS4_EEZN14optimize_enums19reject_unsafe_enumsERKS6_PNS7_6ConfigERKSt8functionIFvPK7DexTypeNS7_10UnsafeTypeEEEE3$_1EEvRKT_RKT0_m"(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(32) %12, i64 noundef %35)
          to label %37 unwind label %53

37:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %38 = invoke ptr @_Z17UnorderedIterableI13ConcurrentSetIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ELm83EETnNSt9enable_ifIXsr3stdE12is_base_of_vI13UnorderedBaseIT_ESA_EEbE4typeELb1EEDaRSA_(ptr noundef nonnull align 8 dereferenceable(2664) %8)
          to label %39 unwind label %57

39:                                               ; preds = %37
  %40 = getelementptr inbounds %"class.ConcurrentContainer<std::unordered_set<DexType *>, 83>::UnorderedIterable", ptr %14, i32 0, i32 0
  store ptr %38, ptr %40, align 8
  store ptr %14, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #4
  %41 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE17UnorderedIterable5beginEv(ptr dead_on_unwind writable sret(%"class.cc_impl::ConcurrentContainerIterator.212") align 8 %15, ptr noundef nonnull align 8 dereferenceable(8) %41)
          to label %42 unwind label %61

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #4
  %43 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE17UnorderedIterable3endEv(ptr dead_on_unwind writable sret(%"class.cc_impl::ConcurrentContainerIterator.212") align 8 %16, ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %44 unwind label %65

44:                                               ; preds = %42
  br label %45

45:                                               ; preds = %78, %44
  %46 = invoke noundef zeroext i1 @_ZNK7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP7DexTypeS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEneERKS9_(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef nonnull align 8 dereferenceable(40) %16)
          to label %47 unwind label %65

47:                                               ; preds = %45
  br i1 %46, label %69, label %48

48:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %86

49:                                               ; preds = %27, %3
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %10, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #4
  br label %97

53:                                               ; preds = %36, %28
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %10, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  br label %97

57:                                               ; preds = %37
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %10, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %11, align 4
  br label %85

61:                                               ; preds = %39
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %10, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %11, align 4
  br label %84

65:                                               ; preds = %76, %45, %42
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %10, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %11, align 4
  br label %83

69:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %70 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP7DexTypeS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEdeEv(ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %71 unwind label %79

71:                                               ; preds = %69
  %72 = load ptr, ptr %70, align 8, !tbaa !5
  store ptr %72, ptr %17, align 8, !tbaa !5
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = invoke noundef i64 @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE5eraseERKS2_(ptr noundef nonnull align 8 dereferenceable(2664) %73, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %75 unwind label %79

75:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %76

76:                                               ; preds = %75
  %77 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP7DexTypeS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEppEv(ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %78 unwind label %65

78:                                               ; preds = %76
  br label %45

79:                                               ; preds = %71, %69
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %10, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %83

83:                                               ; preds = %79, %65
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #4
  br label %84

84:                                               ; preds = %83, %61
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %85

85:                                               ; preds = %84, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %97

86:                                               ; preds = %48
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN14optimize_enums39reject_enums_for_colliding_constructorsERKSt6vectorIP8DexClassSaIS2_EEP13ConcurrentSetIP7DexTypeSt4hashIS9_ESt8equal_toIS9_ELm83EE(ptr noundef nonnull align 8 dereferenceable(24) %87, ptr noundef %88)
          to label %89 unwind label %93

89:                                               ; preds = %86
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN14optimize_enums30reject_enums_for_relaxed_initsERKSt6vectorIP8DexClassSaIS2_EEP13ConcurrentSetIP7DexTypeSt4hashIS9_ESt8equal_toIS9_ELm83EE(ptr noundef nonnull align 8 dereferenceable(24) %90, ptr noundef %91)
          to label %92 unwind label %93

92:                                               ; preds = %89
  call void @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EED2Ev(ptr noundef nonnull align 8 dereferenceable(2664) %8) #4
  call void @llvm.lifetime.end.p0(i64 2664, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret void

93:                                               ; preds = %89, %86
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %10, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %11, align 4
  br label %97

97:                                               ; preds = %93, %85, %53, %49
  call void @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EED2Ev(ptr noundef nonnull align 8 dereferenceable(2664) %8) #4
  call void @llvm.lifetime.end.p0(i64 2664, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %98

98:                                               ; preds = %97
  %99 = load ptr, ptr %10, align 8
  %100 = load i32, ptr %11, align 4
  %101 = insertvalue { ptr, i32 } poison, ptr %99, 0
  %102 = insertvalue { ptr, i32 } %101, i32 %100, 1
  resume { ptr, i32 } %102
}

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN4walk8parallel6fieldsISt6vectorIP8DexClassSaIS4_EEZN14optimize_enums19reject_unsafe_enumsERKS6_PNS7_6ConfigERKSt8functionIFvPK7DexTypeNS7_10UnsafeTypeEEEE3$_0EEvRKT_RKT0_m"(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN4walk8parallel7methodsISt6vectorIP8DexClassSaIS4_EEZN14optimize_enums19reject_unsafe_enumsERKS6_PNS7_6ConfigERKSt8functionIFvPK7DexTypeNS7_10UnsafeTypeEEEE3$_1EEvRKT_RKT0_m"(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #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 = { 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 #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSZN14optimize_enums19reject_unsafe_enumsERKSt6vectorIP8DexClassSaIS2_EEPNS_6ConfigERKSt8functionIFvPK7DexTypeNS_10UnsafeTypeEEEE3$_0", !6, i64 0, !6, i64 8, !6, i64 16}


; 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.cc_impl::ConcurrentContainerIterator.212" = type { ptr, i64, %"class.cc_impl::ConcurrentHashtableIterator.213" }
%"class.cc_impl::ConcurrentHashtableIterator.213" = type { ptr, i64, ptr }
%class.ConcurrentSet = type { %class.ConcurrentContainer.65 }
%class.ConcurrentContainer.65 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.66"] }
%"class.cc_impl::ConcurrentHashtable.66" = type { %"struct.std::atomic.67", %"struct.std::atomic.58", %"struct.std::atomic.60", %"struct.std::atomic.69" }
%"struct.std::atomic.67" = type { %"struct.std::__atomic_base.68" }
%"struct.std::__atomic_base.68" = type { ptr }
%"struct.std::atomic.58" = type { %"struct.std::__atomic_base.59" }
%"struct.std::__atomic_base.59" = type { i64 }
%"struct.std::atomic.60" = type { %"struct.std::__atomic_base.61" }
%"struct.std::__atomic_base.61" = type { i8 }
%"struct.std::atomic.69" = type { %"struct.std::__atomic_base.70" }
%"struct.std::__atomic_base.70" = type { ptr }
%class.anon.215 = type { ptr, ptr, ptr }
%class.anon.217 = type { ptr, ptr, ptr, ptr }
%"class.ConcurrentContainer<std::unordered_set<DexType *>, 83>::UnorderedIterable" = type { ptr }

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 uwtable
declare dso_local void @_ZN14optimize_enums39reject_enums_for_colliding_constructorsERKSt6vectorIP8DexClassSaIS2_EEP13ConcurrentSetIP7DexTypeSt4hashIS9_ESt8equal_toIS9_ELm83EE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN14redex_parallel19default_num_threadsEv() local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE17UnorderedIterable5beginEv(ptr dead_on_unwind noalias writable sret(%"class.cc_impl::ConcurrentContainerIterator.212") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE17UnorderedIterable3endEv(ptr dead_on_unwind noalias writable sret(%"class.cc_impl::ConcurrentContainerIterator.212") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP7DexTypeS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEneERKS9_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14optimize_enums19reject_unsafe_enumsERKSt6vectorIP8DexClassSaIS2_EEPNS_6ConfigERKSt8functionIFvPK7DexTypeNS_10UnsafeTypeEEE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(32) %2) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %class.ConcurrentSet, align 8
  %7 = alloca %class.anon.215, align 8
  %8 = alloca %class.anon.217, align 8
  %9 = alloca %"class.ConcurrentContainer<std::unordered_set<DexType *>, 83>::UnorderedIterable", align 8
  %10 = alloca %"class.cc_impl::ConcurrentContainerIterator.212", align 8
  %11 = alloca %"class.cc_impl::ConcurrentContainerIterator.212", align 8
  %12 = alloca ptr, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %13 = getelementptr inbounds i8, ptr %1, i64 2728
  store ptr %13, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2664, ptr nonnull %6) #4
  call void @_ZN13ConcurrentSetIP7DexTypeSt4hashIS1_ESt8equal_toIS1_ELm83EEC2Ev(ptr noundef nonnull align 8 dereferenceable(2664) %6) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #4
  store ptr %13, ptr %7, align 8, !tbaa !9
  %14 = getelementptr inbounds i8, ptr %7, i64 8
  store ptr %6, ptr %14, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %7, i64 16
  store ptr %2, ptr %15, align 8, !tbaa !5
  %16 = invoke noundef i64 @_ZN14redex_parallel19default_num_threadsEv()
          to label %17 unwind label %32

17:                                               ; preds = %3
  invoke void @"_ZN4walk8parallel6fieldsISt6vectorIP8DexClassSaIS4_EEZN14optimize_enums19reject_unsafe_enumsERKS6_PNS7_6ConfigERKSt8functionIFvPK7DexTypeNS7_10UnsafeTypeEEEE3$_0EEvRKT_RKT0_m"(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %16)
          to label %18 unwind label %32

18:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  store ptr %5, ptr %8, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %6, ptr %19, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %8, i64 16
  store ptr %2, ptr %20, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %8, i64 24
  store ptr %4, ptr %21, align 8, !tbaa !5
  %22 = invoke noundef i64 @_ZN14redex_parallel19default_num_threadsEv()
          to label %23 unwind label %34

23:                                               ; preds = %18
  invoke void @"_ZN4walk8parallel7methodsISt6vectorIP8DexClassSaIS4_EEZN14optimize_enums19reject_unsafe_enumsERKS6_PNS7_6ConfigERKSt8functionIFvPK7DexTypeNS7_10UnsafeTypeEEEE3$_1EEvRKT_RKT0_m"(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(32) %8, i64 noundef %22)
          to label %24 unwind label %34

24:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %25 = invoke ptr @_Z17UnorderedIterableI13ConcurrentSetIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ELm83EETnNSt9enable_ifIXsr3stdE12is_base_of_vI13UnorderedBaseIT_ESA_EEbE4typeELb1EEDaRSA_(ptr noundef nonnull align 8 dereferenceable(2664) %6)
          to label %26 unwind label %36

26:                                               ; preds = %24
  store ptr %25, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #4
  invoke void @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE17UnorderedIterable5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.cc_impl::ConcurrentContainerIterator.212") align 8 %10, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %27 unwind label %38

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #4
  invoke void @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE17UnorderedIterable3endEv(ptr dead_on_unwind nonnull writable sret(%"class.cc_impl::ConcurrentContainerIterator.212") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %27, %46
  %28 = invoke noundef zeroext i1 @_ZNK7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP7DexTypeS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEneERKS9_(ptr noundef nonnull align 8 dereferenceable(40) %10, ptr noundef nonnull align 8 dereferenceable(40) %11)
          to label %29 unwind label %.loopexit

29:                                               ; preds = %.preheader
  br i1 %28, label %40, label %30

30:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN14optimize_enums39reject_enums_for_colliding_constructorsERKSt6vectorIP8DexClassSaIS2_EEP13ConcurrentSetIP7DexTypeSt4hashIS9_ESt8equal_toIS9_ELm83EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %31)
          to label %52 unwind label %55

32:                                               ; preds = %17, %3
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  br label %57

34:                                               ; preds = %23, %18
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  br label %57

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

38:                                               ; preds = %26
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %51

.loopexit:                                        ; preds = %.preheader, %46
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %50

.loopexit.split-lp:                               ; preds = %27
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %50

40:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP7DexTypeS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEdeEv(ptr noundef nonnull align 8 dereferenceable(40) %10)
          to label %42 unwind label %48

42:                                               ; preds = %40
  %43 = load ptr, ptr %41, align 8, !tbaa !5
  store ptr %43, ptr %12, align 8, !tbaa !5
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = invoke noundef i64 @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE5eraseERKS2_(ptr noundef nonnull align 8 dereferenceable(2664) %44, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %46 unwind label %48

46:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %47 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP7DexTypeS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEppEv(ptr noundef nonnull align 8 dereferenceable(40) %10)
          to label %.preheader unwind label %.loopexit

48:                                               ; preds = %42, %40
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  br label %50

50:                                               ; preds = %.loopexit, %.loopexit.split-lp, %48
  %.pn = phi { ptr, i32 } [ %49, %48 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #4
  br label %51

51:                                               ; preds = %50, %38
  %.pn.pn = phi { ptr, i32 } [ %.pn, %50 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  br label %57

52:                                               ; preds = %30
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN14optimize_enums30reject_enums_for_relaxed_initsERKSt6vectorIP8DexClassSaIS2_EEP13ConcurrentSetIP7DexTypeSt4hashIS9_ESt8equal_toIS9_ELm83EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %53)
          to label %54 unwind label %55

54:                                               ; preds = %52
  call void @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EED2Ev(ptr noundef nonnull align 8 dereferenceable(2664) %6) #4
  call void @llvm.lifetime.end.p0(i64 2664, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  ret void

55:                                               ; preds = %52, %30
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %57

57:                                               ; preds = %36, %51, %55, %34, %32
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %56, %55 ], [ %35, %34 ], [ %33, %32 ], [ %.pn.pn, %51 ], [ %37, %36 ]
  call void @_ZN19ConcurrentContainerISt13unordered_setIP7DexTypeSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EED2Ev(ptr noundef nonnull align 8 dereferenceable(2664) %6) #4
  call void @llvm.lifetime.end.p0(i64 2664, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  resume { ptr, i32 } %.pn.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN4walk8parallel6fieldsISt6vectorIP8DexClassSaIS4_EEZN14optimize_enums19reject_unsafe_enumsERKS6_PNS7_6ConfigERKSt8functionIFvPK7DexTypeNS7_10UnsafeTypeEEEE3$_0EEvRKT_RKT0_m"(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN4walk8parallel7methodsISt6vectorIP8DexClassSaIS4_EEZN14optimize_enums19reject_unsafe_enumsERKS6_PNS7_6ConfigERKSt8functionIFvPK7DexTypeNS7_10UnsafeTypeEEEE3$_1EEvRKT_RKT0_m"(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) 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 = { 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 #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSZN14optimize_enums19reject_unsafe_enumsERKSt6vectorIP8DexClassSaIS2_EEPNS_6ConfigERKSt8functionIFvPK7DexTypeNS_10UnsafeTypeEEEE3$_0", !6, i64 0, !6, i64 8, !6, i64 16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass