; LLVM IR from facebook/redex :: opt/builder_pattern/BuilderTransform.ll (ZN15builder_pattern16BuilderTransform7cleanupEv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.UnorderedMap<DexMethod *, DexMethod *>::UnorderedIterable" = type { ptr }
%"struct.std::__detail::_Node_iterator.851" = type { %"struct.std::__detail::_Node_iterator_base.852" }
%"struct.std::__detail::_Node_iterator_base.852" = type { ptr }
%"class.std::unique_ptr.675" = type { %"struct.std::__uniq_ptr_data.676" }
%"struct.std::__uniq_ptr_data.676" = type { %"class.std::__uniq_ptr_impl.677" }
%"class.std::__uniq_ptr_impl.677" = type { %"class.std::tuple.678" }
%"class.std::tuple.678" = type { %"struct.std::_Tuple_impl.679" }
%"struct.std::_Tuple_impl.679" = type { %"struct.std::_Head_base.682" }
%"struct.std::_Head_base.682" = type { ptr }
%"class.builder_pattern::BuilderTransform" = type { ptr, ptr, %"class.std::unique_ptr", %"struct.inliner::InlinerConfig", %struct.ConcurrentMethodResolver, %class.UnorderedMap }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.2" }
%"struct.std::_Head_base.2" = type { ptr }
%"struct.inliner::InlinerConfig" = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, [4 x i8], %"struct.shrinker::ShrinkerConfig", i8, i8, i8, i8, i8, i8, i8, i64, i64, i64, %"class.std::__cxx11::basic_string", i32, %class.UnorderedSet, %class.UnorderedSet, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", i64, i8, %class.UnorderedSet, %class.UnorderedSet, %class.UnorderedSet }
%"struct.shrinker::ShrinkerConfig" = type <{ i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, [6 x i8], %"class.std::__cxx11::basic_string", i8, [7 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.UnorderedSet = type { %"class.std::unordered_set" }
%"class.std::unordered_set" = 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 }
%struct.ConcurrentMethodResolver = type { %class.InsertOnlyConcurrentMap }
%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.11", %"struct.std::atomic.13", %"struct.std::atomic.15" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { ptr }
%"struct.std::atomic.11" = type { %"struct.std::__atomic_base.12" }
%"struct.std::__atomic_base.12" = type { i64 }
%"struct.std::atomic.13" = type { %"struct.std::__atomic_base.14" }
%"struct.std::__atomic_base.14" = type { i8 }
%"struct.std::atomic.15" = type { %"struct.std::__atomic_base.16" }
%"struct.std::__atomic_base.16" = type { ptr }
%class.UnorderedMap = type { %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable.19" }
%"class.std::_Hashtable.19" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::pair.853" = type { ptr, ptr }

@.str.25 = external hidden unnamed_addr constant [46 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; 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 noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

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

declare noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef, i32 noundef) #2

declare void @_Z5trace11TraceModuleibPKcz(i32 noundef, i32 noundef, i1 noundef zeroext, ptr noundef, ...) #2

declare void @_Z4showB5cxx11PK12DexMethodRef(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15builder_pattern16BuilderTransform7cleanupEv(ptr noundef nonnull align 8 dereferenceable(3280) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %"class.UnorderedMap<DexMethod *, DexMethod *>::UnorderedIterable", align 8
  %5 = alloca %"struct.std::__detail::_Node_iterator.851", align 8
  %6 = alloca %"struct.std::__detail::_Node_iterator.851", align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::unique_ptr.675", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %14 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %15 = getelementptr inbounds %"class.builder_pattern::BuilderTransform", ptr %14, i32 0, i32 5
  %16 = call ptr @_Z17UnorderedIterableI12UnorderedMapIP9DexMethodS2_St4hashIS2_ESt8equal_toIS2_EETnNSt9enable_ifIXsr3stdE12is_base_of_vI13UnorderedBaseIT_ESA_EEbE4typeELb1EEDaRSA_(ptr noundef nonnull align 8 dereferenceable(56) %15)
  %17 = getelementptr inbounds %"class.UnorderedMap<DexMethod *, DexMethod *>::UnorderedIterable", ptr %4, i32 0, i32 0
  store ptr %16, ptr %17, align 8
  store ptr %4, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = call ptr @_ZN12UnorderedMapIP9DexMethodS1_St4hashIS1_ESt8equal_toIS1_EE17UnorderedIterable5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %18)
  %20 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.851", ptr %5, i32 0, i32 0
  %21 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.852", ptr %20, i32 0, i32 0
  store ptr %19, ptr %21, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = call ptr @_ZN12UnorderedMapIP9DexMethodS1_St4hashIS1_ESt8equal_toIS1_EE17UnorderedIterable3endEv(ptr noundef nonnull align 8 dereferenceable(8) %22)
  %24 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.851", ptr %6, i32 0, i32 0
  %25 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.852", ptr %24, i32 0, i32 0
  store ptr %23, ptr %25, align 8
  br label %26

26:                                               ; preds = %54, %1
  %27 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKP9DexMethodS3_ELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br i1 %27, label %29, label %28

28:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %61

29:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKP9DexMethodS3_ELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  store ptr %30, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.std::pair.853", ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  store ptr %33, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.std::pair.853", ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  store ptr %36, ptr %9, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %29
  %38 = call noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef 11, i32 noundef 8)
  br i1 %38, label %39, label %47

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #4
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_Z4showB5cxx11PK12DexMethodRef(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef %40)
  %41 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  invoke void (i32, i32, i1, ptr, ...) @_Z5trace11TraceModuleibPKcz(i32 noundef 11, i32 noundef 8, i1 noundef zeroext false, ptr noundef @.str.25, ptr noundef %41)
          to label %42 unwind label %43

42:                                               ; preds = %39
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  br label %47

43:                                               ; preds = %39
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %11, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  br label %60

47:                                               ; preds = %42, %37
  br label %48

48:                                               ; preds = %47
  br label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN9DexMethod12release_codeEv(ptr dead_on_unwind writable sret(%"class.std::unique_ptr.675") align 8 %13, ptr noundef nonnull align 8 dereferenceable(88) %51)
  invoke void @_ZN9DexMethod8set_codeESt10unique_ptrI6IRCodeSt14default_deleteIS1_EE(ptr noundef nonnull align 8 dereferenceable(88) %50, ptr noundef %13)
          to label %52 unwind label %56

52:                                               ; preds = %49
  call void @_ZNSt10unique_ptrI6IRCodeSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN12DexMethodRef24delete_method_DO_NOT_USEEPS_(ptr noundef %53)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %54

54:                                               ; preds = %52
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKP9DexMethodS3_ELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br label %26

56:                                               ; preds = %49
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %11, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %12, align 4
  call void @_ZNSt10unique_ptrI6IRCodeSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  br label %60

60:                                               ; preds = %56, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %64

61:                                               ; preds = %28
  %62 = getelementptr inbounds %"class.builder_pattern::BuilderTransform", ptr %14, i32 0, i32 2
  %63 = call noundef ptr @_ZNKSt10unique_ptrI18MultiMethodInlinerSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %62) #4
  call void @_ZN18MultiMethodInliner5flushEv(ptr noundef nonnull align 8 dereferenceable(68736) %63)
  ret void

64:                                               ; preds = %60
  %65 = load ptr, ptr %11, align 8
  %66 = load i32, ptr %12, align 4
  %67 = insertvalue { ptr, i32 } poison, ptr %65, 0
  %68 = insertvalue { ptr, i32 } %67, i32 %66, 1
  resume { ptr, i32 } %68
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_Z17UnorderedIterableI12UnorderedMapIP9DexMethodS2_St4hashIS2_ESt8equal_toIS2_EETnNSt9enable_ifIXsr3stdE12is_base_of_vI13UnorderedBaseIT_ESA_EEbE4typeELb1EEDaRSA_(ptr noundef nonnull align 8 dereferenceable(56)) #3

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

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

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

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

declare void @_ZN9DexMethod8set_codeESt10unique_ptrI6IRCodeSt14default_deleteIS1_EE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) #2

declare void @_ZN9DexMethod12release_codeEv(ptr dead_on_unwind writable sret(%"class.std::unique_ptr.675") align 8, ptr noundef nonnull align 8 dereferenceable(88)) #2

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

declare void @_ZN12DexMethodRef24delete_method_DO_NOT_USEEPS_(ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN18MultiMethodInliner5flushEv(ptr noundef nonnull align 8 dereferenceable(68736)) #3 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"_ZTSSt4pairIKP9DexMethodS1_E", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 8}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.UnorderedMap<DexMethod *, DexMethod *>::UnorderedIterable" = type { ptr }
%"struct.std::__detail::_Node_iterator.851" = type { %"struct.std::__detail::_Node_iterator_base.852" }
%"struct.std::__detail::_Node_iterator_base.852" = type { ptr }
%"class.std::unique_ptr.675" = type { %"struct.std::__uniq_ptr_data.676" }
%"struct.std::__uniq_ptr_data.676" = type { %"class.std::__uniq_ptr_impl.677" }
%"class.std::__uniq_ptr_impl.677" = type { %"class.std::tuple.678" }
%"class.std::tuple.678" = type { %"struct.std::_Tuple_impl.679" }
%"struct.std::_Tuple_impl.679" = type { %"struct.std::_Head_base.682" }
%"struct.std::_Head_base.682" = type { ptr }

@.str.25 = external hidden unnamed_addr constant [46 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; 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 noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

declare noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @_Z5trace11TraceModuleibPKcz(i32 noundef, i32 noundef, i1 noundef zeroext, ptr noundef, ...) local_unnamed_addr #2

declare void @_Z4showB5cxx11PK12DexMethodRef(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15builder_pattern16BuilderTransform7cleanupEv(ptr noundef nonnull align 8 dereferenceable(3280) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.UnorderedMap<DexMethod *, DexMethod *>::UnorderedIterable", align 8
  %3 = alloca %"struct.std::__detail::_Node_iterator.851", align 8
  %4 = alloca %"struct.std::__detail::_Node_iterator.851", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::unique_ptr.675", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %7 = getelementptr inbounds i8, ptr %0, i64 3224
  %8 = tail call ptr @_Z17UnorderedIterableI12UnorderedMapIP9DexMethodS2_St4hashIS2_ESt8equal_toIS2_EETnNSt9enable_ifIXsr3stdE12is_base_of_vI13UnorderedBaseIT_ESA_EEbE4typeELb1EEDaRSA_(ptr noundef nonnull align 8 dereferenceable(56) %7)
  store ptr %8, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %9 = call ptr @_ZN12UnorderedMapIP9DexMethodS1_St4hashIS1_ESt8equal_toIS1_EE17UnorderedIterable5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  store ptr %9, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %10 = call ptr @_ZN12UnorderedMapIP9DexMethodS1_St4hashIS1_ESt8equal_toIS1_EE17UnorderedIterable3endEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  store ptr %10, ptr %4, align 8
  %11 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKP9DexMethodS3_ELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %25, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = call noundef ptr @_ZNKSt10unique_ptrI18MultiMethodInlinerSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  call void @_ZN18MultiMethodInliner5flushEv(ptr noundef nonnull align 8 dereferenceable(68736) %13)
  ret void

.lr.ph:                                           ; preds = %1, %25
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKP9DexMethodS3_ELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %14, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !10
  %18 = call noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef 11, i32 noundef 8)
  br i1 %18, label %19, label %24

19:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @_Z4showB5cxx11PK12DexMethodRef(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef %15)
  %20 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  invoke void (i32, i32, i1, ptr, ...) @_Z5trace11TraceModuleibPKcz(i32 noundef 11, i32 noundef 8, i1 noundef zeroext false, ptr noundef nonnull @.str.25, ptr noundef %20)
          to label %21 unwind label %22

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

22:                                               ; preds = %19
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  br label %30

24:                                               ; preds = %21, %.lr.ph
  call void @_ZN9DexMethod12release_codeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::unique_ptr.675") align 8 %6, ptr noundef nonnull align 8 dereferenceable(88) %17)
  invoke void @_ZN9DexMethod8set_codeESt10unique_ptrI6IRCodeSt14default_deleteIS1_EE(ptr noundef nonnull align 8 dereferenceable(88) %15, ptr noundef nonnull %6)
          to label %25 unwind label %28

25:                                               ; preds = %24
  call void @_ZNSt10unique_ptrI6IRCodeSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @_ZN12DexMethodRef24delete_method_DO_NOT_USEEPS_(ptr noundef nonnull %17)
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKP9DexMethodS3_ELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %27 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKP9DexMethodS3_ELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %27, label %.lr.ph, label %._crit_edge

28:                                               ; preds = %24
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt10unique_ptrI6IRCodeSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br label %30

30:                                               ; preds = %28, %22
  %.pn = phi { ptr, i32 } [ %29, %28 ], [ %23, %22 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_Z17UnorderedIterableI12UnorderedMapIP9DexMethodS2_St4hashIS2_ESt8equal_toIS2_EETnNSt9enable_ifIXsr3stdE12is_base_of_vI13UnorderedBaseIT_ESA_EEbE4typeELb1EEDaRSA_(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3

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

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

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

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

declare void @_ZN9DexMethod8set_codeESt10unique_ptrI6IRCodeSt14default_deleteIS1_EE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) local_unnamed_addr #2

declare void @_ZN9DexMethod12release_codeEv(ptr dead_on_unwind writable sret(%"class.std::unique_ptr.675") align 8, ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #2

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

declare void @_ZN12DexMethodRef24delete_method_DO_NOT_USEEPS_(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN18MultiMethodInliner5flushEv(ptr noundef nonnull align 8 dereferenceable(68736)) local_unnamed_addr #3 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !7, i64 0}
!6 = !{!"_ZTSSt4pairIKP9DexMethodS1_E", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 8}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass