; LLVM IR from facebook/redex :: service/kotlin-instance-rewrite (KotlinInstanceRewriter)

; 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.KotlinInstanceRewriter::Stats" = type { i64, i64, i64, i64, i64 }
%class.ConcurrentSet = type { %class.ConcurrentContainer.10 }
%class.ConcurrentContainer.10 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.11"] }
%"class.cc_impl::ConcurrentHashtable.11" = type { %"struct.std::atomic.12", %"struct.std::atomic.4", %"struct.std::atomic.6", %"struct.std::atomic.14" }
%"struct.std::atomic.12" = type { %"struct.std::__atomic_base.13" }
%"struct.std::__atomic_base.13" = type { ptr }
%"struct.std::atomic.4" = type { %"struct.std::__atomic_base.5" }
%"struct.std::__atomic_base.5" = type { i64 }
%"struct.std::atomic.6" = type { %"struct.std::__atomic_base.7" }
%"struct.std::__atomic_base.7" = type { i8 }
%"struct.std::atomic.14" = type { %"struct.std::__atomic_base.15" }
%"struct.std::__atomic_base.15" = type { ptr }
%class.anon.17 = type { ptr, ptr }
%"class.ConcurrentContainer<std::unordered_set<DexFieldRef *>, 83>::UnorderedIterable" = type { ptr }
%"class.cc_impl::ConcurrentContainerIterator" = type { ptr, i64, %"class.cc_impl::ConcurrentHashtableIterator" }
%"class.cc_impl::ConcurrentHashtableIterator" = type { ptr, i64, ptr }

; 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: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN14redex_parallel19default_num_threadsEv() #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN22KotlinInstanceRewriter24remove_escaping_instanceERKSt6vectorIP8DexClassSaIS2_EER13ConcurrentMapIP11DexFieldRefSt3setISt4pairIP13IRInstructionP9DexMethodESt4lessISG_ESaISG_EESt4hashIS9_ESt8equal_toIS9_ELm83EE(ptr dead_on_unwind noalias writable sret(%"struct.KotlinInstanceRewriter::Stats") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(5984) %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %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.17, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.KotlinInstanceRewriter::Stats", align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.ConcurrentContainer<std::unordered_set<DexFieldRef *>, 83>::UnorderedIterable", align 8
  %15 = alloca %"class.cc_impl::ConcurrentContainerIterator", align 8
  %16 = alloca %"class.cc_impl::ConcurrentContainerIterator", align 8
  %17 = alloca ptr, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  store ptr %3, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 2664, ptr %8) #6
  call void @_ZN13ConcurrentSetIP11DexFieldRefSt4hashIS1_ESt8equal_toIS1_ELm83EEC2Ev(ptr noundef nonnull align 8 dereferenceable(2664) %8) #6
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %20 = getelementptr inbounds %class.anon.17, ptr %9, i32 0, i32 0
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %21, ptr %20, align 8, !tbaa !5
  %22 = getelementptr inbounds %class.anon.17, ptr %9, i32 0, i32 1
  store ptr %8, ptr %22, align 8, !tbaa !5
  %23 = invoke noundef i64 @_ZN14redex_parallel19default_num_threadsEv()
          to label %24 unwind label %37

24:                                               ; preds = %4
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 40, i1 false)
  call void @_ZN22KotlinInstanceRewriter5StatsC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #6
  invoke void @"_ZN4walk8parallel7methodsIN22KotlinInstanceRewriter5StatsENS_11plus_assignIS3_EESt6vectorIP8DexClassSaIS8_EEZNS2_24remove_escaping_instanceERKSA_R13ConcurrentMapIP11DexFieldRefSt3setISt4pairIP13IRInstructionP9DexMethodESt4lessISM_ESaISM_EESt4hashISF_ESt8equal_toISF_ELm83EEE3$_0TnNSt9enable_ifIXeqsr5ArityIT2_EE5valueLi1EEiE4typeELi0EEET_RKT1_RKSZ_mS12_"(ptr dead_on_unwind writable sret(%"struct.KotlinInstanceRewriter::Stats") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(16) %9, i64 noundef %23, ptr noundef byval(%"struct.KotlinInstanceRewriter::Stats") align 8 %12)
          to label %25 unwind label %37

25:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %26 = invoke ptr @_Z17UnorderedIterableI13ConcurrentSetIP11DexFieldRefSt4hashIS2_ESt8equal_toIS2_ELm83EETnNSt9enable_ifIXsr3stdE12is_base_of_vI13UnorderedBaseIT_ESA_EEbE4typeELb1EEDaRSA_(ptr noundef nonnull align 8 dereferenceable(2664) %8)
          to label %27 unwind label %41

27:                                               ; preds = %25
  %28 = getelementptr inbounds %"class.ConcurrentContainer<std::unordered_set<DexFieldRef *>, 83>::UnorderedIterable", ptr %14, i32 0, i32 0
  store ptr %26, ptr %28, align 8
  store ptr %14, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #6
  %29 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN19ConcurrentContainerISt13unordered_setIP11DexFieldRefSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE17UnorderedIterable5beginEv(ptr dead_on_unwind writable sret(%"class.cc_impl::ConcurrentContainerIterator") align 8 %15, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %30 unwind label %45

30:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #6
  %31 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN19ConcurrentContainerISt13unordered_setIP11DexFieldRefSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE17UnorderedIterable3endEv(ptr dead_on_unwind writable sret(%"class.cc_impl::ConcurrentContainerIterator") align 8 %16, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %32 unwind label %49

32:                                               ; preds = %30
  br label %33

33:                                               ; preds = %62, %32
  %34 = invoke noundef zeroext i1 @_ZNK7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP11DexFieldRefS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEneERKS9_(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef nonnull align 8 dereferenceable(40) %16)
          to label %35 unwind label %49

35:                                               ; preds = %33
  br i1 %34, label %53, label %36

36:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %70

37:                                               ; preds = %24, %4
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %10, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br label %71

41:                                               ; preds = %25
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %10, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %11, align 4
  br label %69

45:                                               ; preds = %27
  %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
  br label %68

49:                                               ; preds = %60, %33, %30
  %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
  br label %67

53:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP11DexFieldRefS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEdeEv(ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %55 unwind label %63

55:                                               ; preds = %53
  %56 = load ptr, ptr %54, align 8, !tbaa !5
  store ptr %56, ptr %17, align 8, !tbaa !5
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = invoke noundef i64 @_ZN19ConcurrentContainerISt13unordered_mapIP11DexFieldRefSt3setISt4pairIP13IRInstructionP9DexMethodESt4lessIS9_ESaIS9_EESt4hashIS2_ESt8equal_toIS2_ESaIS4_IKS2_SD_EEELm83EE5eraseERSI_(ptr noundef nonnull align 8 dereferenceable(2664) %57, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %59 unwind label %63

59:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %60

60:                                               ; preds = %59
  %61 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP11DexFieldRefS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEppEv(ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %62 unwind label %49

62:                                               ; preds = %60
  br label %33

63:                                               ; preds = %55, %53
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %10, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %67

67:                                               ; preds = %63, %49
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #6
  br label %68

68:                                               ; preds = %67, %45
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %69

69:                                               ; preds = %68, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %71

70:                                               ; preds = %36
  call void @_ZN19ConcurrentContainerISt13unordered_setIP11DexFieldRefSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EED2Ev(ptr noundef nonnull align 8 dereferenceable(2664) %8) #6
  call void @llvm.lifetime.end.p0(i64 2664, ptr %8) #6
  ret void

71:                                               ; preds = %69, %37
  call void @_ZN19ConcurrentContainerISt13unordered_setIP11DexFieldRefSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EED2Ev(ptr noundef nonnull align 8 dereferenceable(2664) %8) #6
  call void @llvm.lifetime.end.p0(i64 2664, ptr %8) #6
  br label %72

72:                                               ; preds = %71
  %73 = load ptr, ptr %10, align 8
  %74 = load i32, ptr %11, align 4
  %75 = insertvalue { ptr, i32 } poison, ptr %73, 0
  %76 = insertvalue { ptr, i32 } %75, i32 %74, 1
  resume { ptr, i32 } %76
}

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN4walk8parallel7methodsIN22KotlinInstanceRewriter5StatsENS_11plus_assignIS3_EESt6vectorIP8DexClassSaIS8_EEZNS2_24remove_escaping_instanceERKSA_R13ConcurrentMapIP11DexFieldRefSt3setISt4pairIP13IRInstructionP9DexMethodESt4lessISM_ESaISM_EESt4hashISF_ESt8equal_toISF_ELm83EEE3$_0TnNSt9enable_ifIXeqsr5ArityIT2_EE5valueLi1EEiE4typeELi0EEET_RKT1_RKSZ_mS12_"(ptr dead_on_unwind noalias writable sret(%"struct.KotlinInstanceRewriter::Stats") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, ptr noundef byval(%"struct.KotlinInstanceRewriter::Stats") align 8) #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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

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

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

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

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

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

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

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


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

%"struct.KotlinInstanceRewriter::Stats" = type { i64, i64, i64, i64, i64 }
%class.ConcurrentSet = type { %class.ConcurrentContainer.10 }
%class.ConcurrentContainer.10 = type { ptr, [83 x %"class.cc_impl::ConcurrentHashtable.11"] }
%"class.cc_impl::ConcurrentHashtable.11" = type { %"struct.std::atomic.12", %"struct.std::atomic.4", %"struct.std::atomic.6", %"struct.std::atomic.14" }
%"struct.std::atomic.12" = type { %"struct.std::__atomic_base.13" }
%"struct.std::__atomic_base.13" = type { ptr }
%"struct.std::atomic.4" = type { %"struct.std::__atomic_base.5" }
%"struct.std::__atomic_base.5" = type { i64 }
%"struct.std::atomic.6" = type { %"struct.std::__atomic_base.7" }
%"struct.std::__atomic_base.7" = type { i8 }
%"struct.std::atomic.14" = type { %"struct.std::__atomic_base.15" }
%"struct.std::__atomic_base.15" = type { ptr }
%class.anon.17 = type { ptr, ptr }
%"class.ConcurrentContainer<std::unordered_set<DexFieldRef *>, 83>::UnorderedIterable" = type { ptr }
%"class.cc_impl::ConcurrentContainerIterator" = type { ptr, i64, %"class.cc_impl::ConcurrentHashtableIterator" }
%"class.cc_impl::ConcurrentHashtableIterator" = type { ptr, i64, ptr }

; 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: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN14redex_parallel19default_num_threadsEv() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN22KotlinInstanceRewriter24remove_escaping_instanceERKSt6vectorIP8DexClassSaIS2_EER13ConcurrentMapIP11DexFieldRefSt3setISt4pairIP13IRInstructionP9DexMethodESt4lessISG_ESaISG_EESt4hashIS9_ESt8equal_toIS9_ELm83EE(ptr dead_on_unwind noalias writable sret(%"struct.KotlinInstanceRewriter::Stats") align 8 %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(5984) %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.ConcurrentSet, align 8
  %6 = alloca %class.anon.17, align 8
  %7 = alloca %"struct.KotlinInstanceRewriter::Stats", align 8
  %8 = alloca %"class.ConcurrentContainer<std::unordered_set<DexFieldRef *>, 83>::UnorderedIterable", align 8
  %9 = alloca %"class.cc_impl::ConcurrentContainerIterator", align 8
  %10 = alloca %"class.cc_impl::ConcurrentContainerIterator", align 8
  %11 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 2664, ptr nonnull %5) #6
  call void @_ZN13ConcurrentSetIP11DexFieldRefSt4hashIS1_ESt8equal_toIS1_ELm83EEC2Ev(ptr noundef nonnull align 8 dereferenceable(2664) %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  store ptr %3, ptr %6, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr %5, ptr %12, align 8, !tbaa !5
  %13 = invoke noundef i64 @_ZN14redex_parallel19default_num_threadsEv()
          to label %14 unwind label %22

14:                                               ; preds = %4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %7, i8 0, i64 40, i1 false)
  call void @_ZN22KotlinInstanceRewriter5StatsC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #6
  invoke void @"_ZN4walk8parallel7methodsIN22KotlinInstanceRewriter5StatsENS_11plus_assignIS3_EESt6vectorIP8DexClassSaIS8_EEZNS2_24remove_escaping_instanceERKSA_R13ConcurrentMapIP11DexFieldRefSt3setISt4pairIP13IRInstructionP9DexMethodESt4lessISM_ESaISM_EESt4hashISF_ESt8equal_toISF_ELm83EEE3$_0TnNSt9enable_ifIXeqsr5ArityIT2_EE5valueLi1EEiE4typeELi0EEET_RKT1_RKSZ_mS12_"(ptr dead_on_unwind writable sret(%"struct.KotlinInstanceRewriter::Stats") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %13, ptr noundef nonnull byval(%"struct.KotlinInstanceRewriter::Stats") align 8 %7)
          to label %15 unwind label %22

15:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %16 = invoke ptr @_Z17UnorderedIterableI13ConcurrentSetIP11DexFieldRefSt4hashIS2_ESt8equal_toIS2_ELm83EETnNSt9enable_ifIXsr3stdE12is_base_of_vI13UnorderedBaseIT_ESA_EEbE4typeELb1EEDaRSA_(ptr noundef nonnull align 8 dereferenceable(2664) %5)
          to label %17 unwind label %24

17:                                               ; preds = %15
  store ptr %16, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #6
  invoke void @_ZN19ConcurrentContainerISt13unordered_setIP11DexFieldRefSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE17UnorderedIterable5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.cc_impl::ConcurrentContainerIterator") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %18 unwind label %26

18:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #6
  invoke void @_ZN19ConcurrentContainerISt13unordered_setIP11DexFieldRefSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EE17UnorderedIterable3endEv(ptr dead_on_unwind nonnull writable sret(%"class.cc_impl::ConcurrentContainerIterator") align 8 %10, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %18, %33
  %19 = invoke noundef zeroext i1 @_ZNK7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP11DexFieldRefS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEneERKS9_(ptr noundef nonnull align 8 dereferenceable(40) %9, ptr noundef nonnull align 8 dereferenceable(40) %10)
          to label %20 unwind label %.loopexit

20:                                               ; preds = %.preheader
  br i1 %19, label %28, label %21

21:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @_ZN19ConcurrentContainerISt13unordered_setIP11DexFieldRefSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EED2Ev(ptr noundef nonnull align 8 dereferenceable(2664) %5) #6
  call void @llvm.lifetime.end.p0(i64 2664, ptr nonnull %5) #6
  ret void

22:                                               ; preds = %14, %4
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %39

24:                                               ; preds = %15
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %39

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

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

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

28:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP11DexFieldRefS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEdeEv(ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %30 unwind label %35

30:                                               ; preds = %28
  %31 = load ptr, ptr %29, align 8, !tbaa !5
  store ptr %31, ptr %11, align 8, !tbaa !5
  %32 = invoke noundef i64 @_ZN19ConcurrentContainerISt13unordered_mapIP11DexFieldRefSt3setISt4pairIP13IRInstructionP9DexMethodESt4lessIS9_ESaIS9_EESt4hashIS2_ESt8equal_toIS2_ESaIS4_IKS2_SD_EEELm83EE5eraseERSI_(ptr noundef nonnull align 8 dereferenceable(2664) %3, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %33 unwind label %35

33:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  %34 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN7cc_impl27ConcurrentContainerIteratorINS_19ConcurrentHashtableIP11DexFieldRefS3_St4hashIS3_ESt8equal_toIS3_EEELm83EEppEv(ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %.preheader unwind label %.loopexit

35:                                               ; preds = %30, %28
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %37

37:                                               ; preds = %.loopexit, %.loopexit.split-lp, %35
  %.pn = phi { ptr, i32 } [ %36, %35 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #6
  br label %38

38:                                               ; preds = %37, %26
  %.pn.pn = phi { ptr, i32 } [ %.pn, %37 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %39

39:                                               ; preds = %24, %38, %22
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %23, %22 ], [ %.pn.pn, %38 ], [ %25, %24 ]
  call void @_ZN19ConcurrentContainerISt13unordered_setIP11DexFieldRefSt4hashIS2_ESt8equal_toIS2_ESaIS2_EELm83EED2Ev(ptr noundef nonnull align 8 dereferenceable(2664) %5) #6
  call void @llvm.lifetime.end.p0(i64 2664, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN4walk8parallel7methodsIN22KotlinInstanceRewriter5StatsENS_11plus_assignIS3_EESt6vectorIP8DexClassSaIS8_EEZNS2_24remove_escaping_instanceERKSA_R13ConcurrentMapIP11DexFieldRefSt3setISt4pairIP13IRInstructionP9DexMethodESt4lessISM_ESaISM_EESt4hashISF_ESt8equal_toISF_ELm83EEE3$_0TnNSt9enable_ifIXeqsr5ArityIT2_EE5valueLi1EEiE4typeELi0EEET_RKT1_RKSZ_mS12_"(ptr dead_on_unwind noalias writable sret(%"struct.KotlinInstanceRewriter::Stats") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, ptr noundef byval(%"struct.KotlinInstanceRewriter::Stats") align 8) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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

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

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

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

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

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

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

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


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