; LLVM IR from facebook/redex :: service/cse (CommonSubexpressionElimination)

; 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.UnorderedSet<DexMethodRef *>::ConstFixedIterator" = type { %"struct.std::__detail::_Node_const_iterator.260" }
%"struct.std::__detail::_Node_const_iterator.260" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"class.cse_impl::SharedState" = type { %class.UnorderedSet.6, %class.UnorderedSet.6, %class.UnorderedSet.26, ptr, ptr, %class.UnorderedSet.48, %"class.std::unique_ptr", %class.UnorderedMap, %class.UnorderedMap, %"class.std::unique_ptr.86", %"struct.cse_impl::SharedStateStats", %class.UnorderedMap.94, %class.UnorderedMap.94 }
%class.UnorderedSet.6 = type { %"class.std::unordered_set.8" }
%"class.std::unordered_set.8" = type { %"class.std::_Hashtable.9" }
%"class.std::_Hashtable.9" = 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.UnorderedSet.26 = type { %"class.std::unordered_set.28" }
%"class.std::unordered_set.28" = type { %"class.std::_Hashtable.29" }
%"class.std::_Hashtable.29" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%class.UnorderedSet.48 = type { %"class.std::unordered_set.50" }
%"class.std::unordered_set.50" = type { %"class.std::_Hashtable.51" }
%"class.std::_Hashtable.51" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"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.71" }
%"struct.std::_Head_base.71" = type { ptr }
%class.UnorderedMap = type { %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable.73" }
%"class.std::_Hashtable.73" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unique_ptr.86" = type { %"struct.std::__uniq_ptr_data.87" }
%"struct.std::__uniq_ptr_data.87" = type { %"class.std::__uniq_ptr_impl.88" }
%"class.std::__uniq_ptr_impl.88" = type { %"class.std::tuple.89" }
%"class.std::tuple.89" = type { %"struct.std::_Tuple_impl.90" }
%"struct.std::_Tuple_impl.90" = type { %"struct.std::_Head_base.93" }
%"struct.std::_Head_base.93" = type { ptr }
%"struct.cse_impl::SharedStateStats" = type { i64, i64, i64, i64, i64 }
%class.UnorderedMap.94 = type { %"class.std::unordered_map.96" }
%"class.std::unordered_map.96" = type { %"class.std::_Hashtable.97" }
%"class.std::_Hashtable.97" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }

@.str.113 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [29 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

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

declare noundef ptr @_ZN12DexMethodRef6as_defEv(ptr noundef nonnull align 8 dereferenceable(26)) #2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK8cse_impl11SharedState15has_pure_methodEPK13IRInstruction(ptr noundef nonnull align 8 dereferenceable(520) %0, ptr noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.UnorderedSet<DexMethodRef *>::ConstFixedIterator", align 8
  %8 = alloca %"class.UnorderedSet<DexMethodRef *>::ConstFixedIterator", 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 i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %"class.UnorderedSet<DexMethodRef *>::ConstFixedIterator", align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.UnorderedSet<DexMethodRef *>::ConstFixedIterator", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = call noundef ptr @_ZNK13IRInstruction10get_methodEv(ptr noundef nonnull align 8 dereferenceable(32) %20)
  store ptr %21, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %22 = getelementptr inbounds %"class.cse_impl::SharedState", ptr %19, i32 0, i32 0
  %23 = call ptr @_ZNK12UnorderedSetIP12DexMethodRefSt4hashIS1_ESt8equal_toIS1_EE4findERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %22, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %24 = getelementptr inbounds %"class.UnorderedSet<DexMethodRef *>::ConstFixedIterator", ptr %7, i32 0, i32 0
  %25 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator.260", ptr %24, i32 0, i32 0
  %26 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %25, i32 0, i32 0
  store ptr %23, ptr %26, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %27 = getelementptr inbounds %"class.cse_impl::SharedState", ptr %19, i32 0, i32 0
  %28 = call ptr @_ZNK12UnorderedSetIP12DexMethodRefSt4hashIS1_ESt8equal_toIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %27)
  %29 = getelementptr inbounds %"class.UnorderedSet<DexMethodRef *>::ConstFixedIterator", ptr %8, i32 0, i32 0
  %30 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator.260", ptr %29, i32 0, i32 0
  %31 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %30, i32 0, i32 0
  store ptr %28, ptr %31, align 8
  %32 = call noundef zeroext i1 @_ZNK12UnorderedSetIP12DexMethodRefSt4hashIS1_ESt8equal_toIS1_EE18ConstFixedIteratorneERKS7_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br i1 %32, label %33, label %59

33:                                               ; preds = %2
  br label %34

34:                                               ; preds = %33
  %35 = call noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef 29, i32 noundef 4)
  br i1 %35, label %36, label %56

36:                                               ; preds = %34
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = call noundef zeroext i1 @_ZNK12DexMethodRef6is_defEv(ptr noundef nonnull align 8 dereferenceable(26) %37)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  br i1 %38, label %39, label %45

39:                                               ; preds = %36
  %40 = getelementptr inbounds %"class.cse_impl::SharedState", ptr %19, i32 0, i32 8
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = call noundef ptr @_ZN12DexMethodRef6as_defEv(ptr noundef nonnull align 8 dereferenceable(26) %41)
  store ptr %42, ptr %9, align 8, !tbaa !5
  %43 = call noundef i64 @_ZNK12UnorderedMapIPK9DexMethod12UnorderedSetI11CseLocation17CseLocationHasherSt8equal_toIS4_EESt4hashIS2_ES6_IS2_EE5countERKS2_(ptr noundef nonnull align 8 dereferenceable(56) %40, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %44 = icmp ne i64 %43, 0
  br label %45

45:                                               ; preds = %39, %36
  %46 = phi i1 [ false, %36 ], [ %44, %39 ]
  %47 = zext i1 %46 to i64
  %48 = select i1 %46, ptr @.str.114, ptr @.str.115
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #5
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_Z4showB5cxx11PK12DexMethodRef(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef %49)
  %50 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  invoke void (i32, i32, i1, ptr, ...) @_Z5trace11TraceModuleibPKcz(i32 noundef 29, i32 noundef 4, i1 noundef zeroext false, ptr noundef @.str.113, ptr noundef %48, ptr noundef %50)
          to label %51 unwind label %52

51:                                               ; preds = %45
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %56

52:                                               ; preds = %45
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %11, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %105

56:                                               ; preds = %51, %34
  br label %57

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57
  store i1 true, ptr %3, align 1
  store i32 1, ptr %13, align 4
  br label %103

59:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = call noundef ptr @_ZNK13IRInstruction10get_methodEv(ptr noundef nonnull align 8 dereferenceable(32) %60)
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = call noundef i32 @_Z16opcode_to_searchPK13IRInstruction(ptr noundef %62)
  %64 = call noundef ptr @_Z14resolve_methodP12DexMethodRef12MethodSearchPK9DexMethod(ptr noundef %61, i32 noundef %63, ptr noundef null)
  store ptr %64, ptr %14, align 8, !tbaa !5
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  br i1 %66, label %67, label %80

67:                                               ; preds = %59
  %68 = getelementptr inbounds %"class.cse_impl::SharedState", ptr %19, i32 0, i32 0
  %69 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %69, ptr %16, align 8, !tbaa !5
  %70 = call ptr @_ZNK12UnorderedSetIP12DexMethodRefSt4hashIS1_ESt8equal_toIS1_EE4findERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %68, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %71 = getelementptr inbounds %"class.UnorderedSet<DexMethodRef *>::ConstFixedIterator", ptr %15, i32 0, i32 0
  %72 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator.260", ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %72, i32 0, i32 0
  store ptr %70, ptr %73, align 8
  %74 = getelementptr inbounds %"class.cse_impl::SharedState", ptr %19, i32 0, i32 0
  %75 = call ptr @_ZNK12UnorderedSetIP12DexMethodRefSt4hashIS1_ESt8equal_toIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %74)
  %76 = getelementptr inbounds %"class.UnorderedSet<DexMethodRef *>::ConstFixedIterator", ptr %17, i32 0, i32 0
  %77 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator.260", ptr %76, i32 0, i32 0
  %78 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %77, i32 0, i32 0
  store ptr %75, ptr %78, align 8
  %79 = call noundef zeroext i1 @_ZNK12UnorderedSetIP12DexMethodRefSt4hashIS1_ESt8equal_toIS1_EE18ConstFixedIteratorneERKS7_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %17)
  br label %80

80:                                               ; preds = %67, %59
  %81 = phi i1 [ false, %59 ], [ %79, %67 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br i1 %81, label %82, label %101

82:                                               ; preds = %80
  br label %83

83:                                               ; preds = %82
  %84 = call noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef 29, i32 noundef 4)
  br i1 %84, label %85, label %98

85:                                               ; preds = %83
  %86 = getelementptr inbounds %"class.cse_impl::SharedState", ptr %19, i32 0, i32 8
  %87 = call noundef i64 @_ZNK12UnorderedMapIPK9DexMethod12UnorderedSetI11CseLocation17CseLocationHasherSt8equal_toIS4_EESt4hashIS2_ES6_IS2_EE5countERKS2_(ptr noundef nonnull align 8 dereferenceable(56) %86, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %88 = icmp ne i64 %87, 0
  %89 = zext i1 %88 to i64
  %90 = select i1 %88, ptr @.str.114, ptr @.str.115
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #5
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_Z4showB5cxx11PK12DexMethodRef(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef %91)
  %92 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  invoke void (i32, i32, i1, ptr, ...) @_Z5trace11TraceModuleibPKcz(i32 noundef 29, i32 noundef 4, i1 noundef zeroext false, ptr noundef @.str.116, ptr noundef %90, ptr noundef %92)
          to label %93 unwind label %94

93:                                               ; preds = %85
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  br label %98

94:                                               ; preds = %85
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %11, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %105

98:                                               ; preds = %93, %83
  br label %99

99:                                               ; preds = %98
  br label %100

100:                                              ; preds = %99
  store i1 true, ptr %3, align 1
  store i32 1, ptr %13, align 4
  br label %102

101:                                              ; preds = %80
  store i1 false, ptr %3, align 1
  store i32 1, ptr %13, align 4
  br label %102

102:                                              ; preds = %101, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %103

103:                                              ; preds = %102, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %104 = load i1, ptr %3, align 1
  ret i1 %104

105:                                              ; preds = %94, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %106

106:                                              ; preds = %105
  %107 = load ptr, ptr %11, align 8
  %108 = load i32, ptr %12, align 4
  %109 = insertvalue { ptr, i32 } poison, ptr %107, 0
  %110 = insertvalue { ptr, i32 } %109, i32 %108, 1
  resume { ptr, i32 } %110
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK12DexMethodRef6is_defEv(ptr noundef nonnull align 8 dereferenceable(26)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK12UnorderedMapIPK9DexMethod12UnorderedSetI11CseLocation17CseLocationHasherSt8equal_toIS4_EESt4hashIS2_ES6_IS2_EE5countERKS2_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #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 = { 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 #5 = { 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"

%"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.UnorderedSet<DexMethodRef *>::ConstFixedIterator" = type { %"struct.std::__detail::_Node_const_iterator.260" }
%"struct.std::__detail::_Node_const_iterator.260" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@.str.113 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [29 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

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

declare noundef ptr @_ZN12DexMethodRef6as_defEv(ptr noundef nonnull align 8 dereferenceable(26)) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK8cse_impl11SharedState15has_pure_methodEPK13IRInstruction(ptr noundef nonnull align 8 dereferenceable(520) %0, ptr noundef nonnull %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca %"class.UnorderedSet<DexMethodRef *>::ConstFixedIterator", align 8
  %5 = alloca %"class.UnorderedSet<DexMethodRef *>::ConstFixedIterator", align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.UnorderedSet<DexMethodRef *>::ConstFixedIterator", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.UnorderedSet<DexMethodRef *>::ConstFixedIterator", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %13 = tail call noundef ptr @_ZNK13IRInstruction10get_methodEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  store ptr %13, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %14 = call ptr @_ZNK12UnorderedSetIP12DexMethodRefSt4hashIS1_ESt8equal_toIS1_EE4findERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(8) %3)
  store ptr %14, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %15 = call ptr @_ZNK12UnorderedSetIP12DexMethodRefSt4hashIS1_ESt8equal_toIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
  store ptr %15, ptr %5, align 8
  %16 = call noundef zeroext i1 @_ZNK12UnorderedSetIP12DexMethodRefSt4hashIS1_ESt8equal_toIS1_EE18ConstFixedIteratorneERKS7_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br i1 %16, label %17, label %35

17:                                               ; preds = %2
  %18 = call noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef 29, i32 noundef 4)
  br i1 %18, label %19, label %55

19:                                               ; preds = %17
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = call noundef zeroext i1 @_ZNK12DexMethodRef6is_defEv(ptr noundef nonnull align 8 dereferenceable(26) %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  br i1 %21, label %22, label %28

22:                                               ; preds = %19
  %23 = getelementptr inbounds i8, ptr %0, i64 304
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = call noundef ptr @_ZN12DexMethodRef6as_defEv(ptr noundef nonnull align 8 dereferenceable(26) %24)
  store ptr %25, ptr %6, align 8, !tbaa !5
  %26 = call noundef i64 @_ZNK12UnorderedMapIPK9DexMethod12UnorderedSetI11CseLocation17CseLocationHasherSt8equal_toIS4_EESt4hashIS2_ES6_IS2_EE5countERKS2_(ptr noundef nonnull align 8 dereferenceable(56) %23, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %.not9 = icmp eq i64 %26, 0
  %27 = select i1 %.not9, ptr @.str.115, ptr @.str.114
  br label %28

28:                                               ; preds = %22, %19
  %29 = phi ptr [ @.str.115, %19 ], [ %27, %22 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_Z4showB5cxx11PK12DexMethodRef(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef %30)
  %31 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  invoke void (i32, i32, i1, ptr, ...) @_Z5trace11TraceModuleibPKcz(i32 noundef 29, i32 noundef 4, i1 noundef zeroext false, ptr noundef nonnull @.str.113, ptr noundef nonnull %29, ptr noundef %31)
          to label %32 unwind label %33

32:                                               ; preds = %28
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %55

33:                                               ; preds = %28
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %56

35:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %36 = call noundef ptr @_ZNK13IRInstruction10get_methodEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %37 = call noundef i32 @_Z16opcode_to_searchPK13IRInstruction(ptr noundef nonnull %1)
  %38 = call noundef ptr @_Z14resolve_methodP12DexMethodRef12MethodSearchPK9DexMethod(ptr noundef %36, i32 noundef %37, ptr noundef null)
  store ptr %38, ptr %8, align 8, !tbaa !5
  %.not = icmp eq ptr %38, null
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  br i1 %.not, label %.critedge, label %39

39:                                               ; preds = %35
  store ptr %38, ptr %10, align 8, !tbaa !5
  %40 = call ptr @_ZNK12UnorderedSetIP12DexMethodRefSt4hashIS1_ESt8equal_toIS1_EE4findERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(8) %10)
  store ptr %40, ptr %9, align 8
  %41 = call ptr @_ZNK12UnorderedSetIP12DexMethodRefSt4hashIS1_ESt8equal_toIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
  store ptr %41, ptr %11, align 8
  %42 = call noundef zeroext i1 @_ZNK12UnorderedSetIP12DexMethodRefSt4hashIS1_ESt8equal_toIS1_EE18ConstFixedIteratorneERKS7_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br i1 %42, label %43, label %54

43:                                               ; preds = %39
  %44 = call noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef 29, i32 noundef 4)
  br i1 %44, label %45, label %54

45:                                               ; preds = %43
  %46 = getelementptr inbounds i8, ptr %0, i64 304
  %47 = call noundef i64 @_ZNK12UnorderedMapIPK9DexMethod12UnorderedSetI11CseLocation17CseLocationHasherSt8equal_toIS4_EESt4hashIS2_ES6_IS2_EE5countERKS2_(ptr noundef nonnull align 8 dereferenceable(56) %46, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %.not8 = icmp eq i64 %47, 0
  %48 = select i1 %.not8, ptr @.str.115, ptr @.str.114
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #5
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_Z4showB5cxx11PK12DexMethodRef(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef %49)
  %50 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  invoke void (i32, i32, i1, ptr, ...) @_Z5trace11TraceModuleibPKcz(i32 noundef 29, i32 noundef 4, i1 noundef zeroext false, ptr noundef nonnull @.str.116, ptr noundef nonnull %48, ptr noundef %50)
          to label %51 unwind label %52

51:                                               ; preds = %45
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  br label %54

52:                                               ; preds = %45
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %56

.critedge:                                        ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %54

54:                                               ; preds = %39, %.critedge, %43, %51
  %.07 = phi i1 [ true, %51 ], [ true, %43 ], [ false, %.critedge ], [ false, %39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %55

55:                                               ; preds = %17, %32, %54
  %.1 = phi i1 [ %.07, %54 ], [ true, %32 ], [ true, %17 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret i1 %.1

56:                                               ; preds = %52, %33
  %.pn = phi { ptr, i32 } [ %34, %33 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK12DexMethodRef6is_defEv(ptr noundef nonnull align 8 dereferenceable(26)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK12UnorderedMapIPK9DexMethod12UnorderedSetI11CseLocation17CseLocationHasherSt8equal_toIS4_EESt4hashIS2_ES6_IS2_EE5countERKS2_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) 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 = { 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 #5 = { 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,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass