; LLVM IR from facebook/redex :: opt/remove-builders/RemoveBuildersHelper.ll (Z15get_all_methodsP6IRCodeP7DexType)

; 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.UnorderedSet.132 = type { %"class.std::unordered_set.134" }
%"class.std::unordered_set.134" = type { %"class.std::_Hashtable.135" }
%"class.std::_Hashtable.135" = 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.ir_list::InstructionIterableImpl" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.boost::intrusive::list_iterator" = type { %"struct.boost::intrusive::iiterator_members" }
%"struct.boost::intrusive::iiterator_members" = type { ptr }
%"class.ir_list::InstructionIteratorImpl" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"struct.std::pair.179" = type <{ %"class.UnorderedSet<DexMethod *>::FixedIterator", i8, [7 x i8] }>
%"class.UnorderedSet<DexMethod *>::FixedIterator" = type { %"struct.std::__detail::_Node_iterator.181" }
%"struct.std::__detail::_Node_iterator.181" = type { %"struct.std::__detail::_Node_iterator_base.182" }
%"struct.std::__detail::_Node_iterator_base.182" = type { ptr }
%struct.MethodItemEntry = type { %"class.boost::intrusive::list_member_hook", i32, %union.anon.154 }
%"class.boost::intrusive::list_member_hook" = type { %"class.boost::intrusive::generic_hook" }
%"class.boost::intrusive::generic_hook" = type { %"struct.boost::intrusive::list_node" }
%"struct.boost::intrusive::list_node" = type { ptr, ptr }
%union.anon.154 = type { ptr }

@.str.12 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 x i8], align 1
@__PRETTY_FUNCTION__._Z15get_all_methodsP6IRCodeP7DexType = external hidden unnamed_addr constant [63 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK13IRInstruction6opcodeEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6opcode12is_an_invokeE8IROpcode(i16 noundef zeroext) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK13IRInstruction10get_methodEv(ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z14resolve_methodP12DexMethodRef12MethodSearchPK9DexMethod(ptr noundef, i32 noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z16opcode_to_searchPK13IRInstruction(ptr noundef) #5

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z15get_all_methodsP6IRCodeP7DexType(ptr dead_on_unwind noalias writable sret(%class.UnorderedSet.132) align 8 %0, ptr noundef %1, ptr noundef %2) #4 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca %"class.ir_list::InstructionIterableImpl", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %13 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.std::pair.179", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %3
  br label %23

21:                                               ; preds = %3
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef @.str.23, ptr noundef @.str.12, i32 noundef 1100, ptr noundef @__PRETTY_FUNCTION__._Z15get_all_methodsP6IRCodeP7DexType, i32 noundef 2, ptr noundef @.str.13) #6
  unreachable

22:                                               ; No predecessors!
  br label %23

23:                                               ; preds = %22, %20
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %23
  br label %29

27:                                               ; preds = %23
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef @.str.19, ptr noundef @.str.12, i32 noundef 1101, ptr noundef @__PRETTY_FUNCTION__._Z15get_all_methodsP6IRCodeP7DexType, i32 noundef 2, ptr noundef @.str.13) #6
  unreachable

28:                                               ; No predecessors!
  br label %29

29:                                               ; preds = %28, %26
  store i1 false, ptr %7, align 1
  call void @_ZN12UnorderedSetIP9DexMethodSt4hashIS1_ESt8equal_toIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_Z19InstructionIterableI6IRCodeEN7ir_list23InstructionIterableImplILb0EEEPT_(ptr dead_on_unwind writable sret(%"class.ir_list::InstructionIterableImpl") align 8 %9, ptr noundef %30)
          to label %31 unwind label %40

31:                                               ; preds = %29
  store ptr %9, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %32)
          to label %33 unwind label %44

33:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %13, ptr noundef nonnull align 8 dereferenceable(16) %34)
          to label %35 unwind label %48

35:                                               ; preds = %33
  br label %36

36:                                               ; preds = %103, %35
  %37 = invoke noundef zeroext i1 @_ZNK7ir_list23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %38 unwind label %48

38:                                               ; preds = %36
  br i1 %37, label %52, label %39

39:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %109

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

44:                                               ; preds = %31
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %10, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %11, align 4
  br label %107

48:                                               ; preds = %101, %36, %33
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %10, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %11, align 4
  br label %106

52:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %53 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %54 unwind label %87

54:                                               ; preds = %52
  store ptr %53, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.MethodItemEntry, ptr %55, i32 0, i32 2
  %57 = load ptr, ptr %56, align 8, !tbaa !9
  store ptr %57, ptr %15, align 8, !tbaa !5
  %58 = load ptr, ptr %15, align 8, !tbaa !5
  %59 = invoke noundef zeroext i16 @_ZNK13IRInstruction6opcodeEv(ptr noundef nonnull align 8 dereferenceable(32) %58)
          to label %60 unwind label %91

60:                                               ; preds = %54
  %61 = invoke noundef zeroext i1 @_ZN6opcode12is_an_invokeE8IROpcode(i16 noundef zeroext %59)
          to label %62 unwind label %91

62:                                               ; preds = %60
  br i1 %61, label %63, label %100

63:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %64 = load ptr, ptr %15, align 8, !tbaa !5
  %65 = invoke noundef ptr @_ZNK13IRInstruction10get_methodEv(ptr noundef nonnull align 8 dereferenceable(32) %64)
          to label %66 unwind label %95

66:                                               ; preds = %63
  %67 = load ptr, ptr %15, align 8, !tbaa !5
  %68 = invoke noundef i32 @_Z16opcode_to_searchPK13IRInstruction(ptr noundef %67)
          to label %69 unwind label %95

69:                                               ; preds = %66
  %70 = invoke noundef ptr @_Z14resolve_methodP12DexMethodRef12MethodSearchPK9DexMethod(ptr noundef %65, i32 noundef %68, ptr noundef null)
          to label %71 unwind label %95

71:                                               ; preds = %69
  store ptr %70, ptr %16, align 8, !tbaa !5
  %72 = load ptr, ptr %16, align 8, !tbaa !5
  %73 = icmp ne ptr %72, null
  br i1 %73, label %74, label %99

74:                                               ; preds = %71
  %75 = load ptr, ptr %16, align 8, !tbaa !5
  %76 = invoke noundef ptr @_ZNK12DexMethodRef9get_classEv(ptr noundef nonnull align 8 dereferenceable(26) %75)
          to label %77 unwind label %95

77:                                               ; preds = %74
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = icmp eq ptr %76, %78
  br i1 %79, label %80, label %99

80:                                               ; preds = %77
  %81 = invoke { ptr, i8 } @_ZN12UnorderedSetIP9DexMethodSt4hashIS1_ESt8equal_toIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %82 unwind label %95

82:                                               ; preds = %80
  %83 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 0
  %84 = extractvalue { ptr, i8 } %81, 0
  store ptr %84, ptr %83, align 8
  %85 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 1
  %86 = extractvalue { ptr, i8 } %81, 1
  store i8 %86, ptr %85, align 8
  br label %99

87:                                               ; preds = %52
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %10, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %11, align 4
  br label %105

91:                                               ; preds = %60, %54
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %10, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %11, align 4
  br label %104

95:                                               ; preds = %80, %74, %69, %66, %63
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %10, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %104

99:                                               ; preds = %82, %77, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %100

100:                                              ; preds = %99, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %101

101:                                              ; preds = %100
  %102 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7ir_list23InstructionIteratorImplILb0EEppEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %103 unwind label %48

103:                                              ; preds = %101
  br label %36

104:                                              ; preds = %95, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %105

105:                                              ; preds = %104, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %106

106:                                              ; preds = %105, %48
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  br label %107

107:                                              ; preds = %106, %44
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  br label %108

108:                                              ; preds = %107, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @_ZN12UnorderedSetIP9DexMethodSt4hashIS1_ESt8equal_toIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #7
  br label %113

109:                                              ; preds = %39
  store i1 true, ptr %7, align 1
  %110 = load i1, ptr %7, align 1
  br i1 %110, label %112, label %111

111:                                              ; preds = %109
  call void @_ZN12UnorderedSetIP9DexMethodSt4hashIS1_ESt8equal_toIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #7
  br label %112

112:                                              ; preds = %111, %109
  ret void

113:                                              ; preds = %108
  %114 = load ptr, ptr %10, align 8
  %115 = load i32, ptr %11, align 4
  %116 = insertvalue { ptr, i32 } poison, ptr %114, 0
  %117 = insertvalue { ptr, i32 } %116, i32 %115, 1
  resume { ptr, i32 } %117
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z19InstructionIterableI6IRCodeEN7ir_list23InstructionIterableImplILb0EEEPT_(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIterableImpl") align 8, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZN12UnorderedSetIP9DexMethodSt4hashIS1_ESt8equal_toIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

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

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


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

%class.UnorderedSet.132 = type { %"class.std::unordered_set.134" }
%"class.std::unordered_set.134" = type { %"class.std::_Hashtable.135" }
%"class.std::_Hashtable.135" = 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.ir_list::InstructionIterableImpl" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.boost::intrusive::list_iterator" = type { %"struct.boost::intrusive::iiterator_members" }
%"struct.boost::intrusive::iiterator_members" = type { ptr }
%"class.ir_list::InstructionIteratorImpl" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }

@.str.12 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 x i8], align 1
@__PRETTY_FUNCTION__._Z15get_all_methodsP6IRCodeP7DexType = external hidden unnamed_addr constant [63 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK13IRInstruction6opcodeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6opcode12is_an_invokeE8IROpcode(i16 noundef zeroext) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z14resolve_methodP12DexMethodRef12MethodSearchPK9DexMethod(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z16opcode_to_searchPK13IRInstruction(ptr noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z15get_all_methodsP6IRCodeP7DexType(ptr dead_on_unwind noalias writable sret(%class.UnorderedSet.132) align 8 %0, ptr noundef %1, ptr noundef readnone %2) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.ir_list::InstructionIterableImpl", align 8
  %5 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %6 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %7 = alloca ptr, align 8
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %8, label %9

8:                                                ; preds = %3
  tail call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.12, i32 noundef 1100, ptr noundef nonnull @__PRETTY_FUNCTION__._Z15get_all_methodsP6IRCodeP7DexType, i32 noundef 2, ptr noundef nonnull @.str.13) #6
  unreachable

9:                                                ; preds = %3
  %.not19 = icmp eq ptr %2, null
  br i1 %.not19, label %10, label %11

10:                                               ; preds = %9
  tail call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.12, i32 noundef 1101, ptr noundef nonnull @__PRETTY_FUNCTION__._Z15get_all_methodsP6IRCodeP7DexType, i32 noundef 2, ptr noundef nonnull @.str.13) #6
  unreachable

11:                                               ; preds = %9
  tail call void @_ZN12UnorderedSetIP9DexMethodSt4hashIS1_ESt8equal_toIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  invoke void @_Z19InstructionIterableI6IRCodeEN7ir_list23InstructionIterableImplILb0EEEPT_(ptr dead_on_unwind nonnull writable sret(%"class.ir_list::InstructionIterableImpl") align 8 %4, ptr noundef nonnull %1)
          to label %12 unwind label %17

12:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  invoke void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %13 unwind label %19

13:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  invoke void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %6, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %13, %45
  %14 = invoke noundef zeroext i1 @_ZNK7ir_list23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %15 unwind label %.loopexit

15:                                               ; preds = %.preheader
  br i1 %14, label %21, label %16

16:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  ret void

17:                                               ; preds = %11
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %49

19:                                               ; preds = %12
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %48

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

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

21:                                               ; preds = %15
  %22 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %23 unwind label %40

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %22, i64 24
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  %26 = call noundef zeroext i16 @_ZNK13IRInstruction6opcodeEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
  %27 = call noundef zeroext i1 @_ZN6opcode12is_an_invokeE8IROpcode(i16 noundef zeroext %26)
  br i1 %27, label %28, label %45

28:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %29 = invoke noundef ptr @_ZNK13IRInstruction10get_methodEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
          to label %30 unwind label %42

30:                                               ; preds = %28
  %31 = invoke noundef i32 @_Z16opcode_to_searchPK13IRInstruction(ptr noundef nonnull %25)
          to label %32 unwind label %42

32:                                               ; preds = %30
  %33 = invoke noundef ptr @_Z14resolve_methodP12DexMethodRef12MethodSearchPK9DexMethod(ptr noundef %29, i32 noundef %31, ptr noundef null)
          to label %34 unwind label %42

34:                                               ; preds = %32
  store ptr %33, ptr %7, align 8, !tbaa !8
  %.not20 = icmp eq ptr %33, null
  br i1 %.not20, label %44, label %35

35:                                               ; preds = %34
  %36 = call noundef ptr @_ZNK12DexMethodRef9get_classEv(ptr noundef nonnull align 8 dereferenceable(26) %33)
  %37 = icmp eq ptr %36, %2
  br i1 %37, label %38, label %44

38:                                               ; preds = %35
  %39 = invoke { ptr, i8 } @_ZN12UnorderedSetIP9DexMethodSt4hashIS1_ESt8equal_toIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %44 unwind label %42

40:                                               ; preds = %21
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %47

42:                                               ; preds = %38, %32, %30, %28
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %47

44:                                               ; preds = %38, %35, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %45

45:                                               ; preds = %44, %23
  %46 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7ir_list23InstructionIteratorImplILb0EEppEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %.preheader unwind label %.loopexit

47:                                               ; preds = %.loopexit, %.loopexit.split-lp, %40, %42
  %.pn22 = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %48

48:                                               ; preds = %47, %19
  %.pn22.pn = phi { ptr, i32 } [ %.pn22, %47 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  br label %49

49:                                               ; preds = %48, %17
  %.pn22.pn.pn = phi { ptr, i32 } [ %.pn22.pn, %48 ], [ %18, %17 ]
  call void @_ZN12UnorderedSetIP9DexMethodSt4hashIS1_ESt8equal_toIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #7
  resume { ptr, i32 } %.pn22.pn.pn
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z19InstructionIterableI6IRCodeEN7ir_list23InstructionIterableImplILb0EEEPT_(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIterableImpl") align 8, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

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

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

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

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

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

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


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