; LLVM IR from facebook/redex :: libredex (Resolver)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z14resolve_methodPK8DexClassPK9DexStringPK8DexProto12MethodSearchPK9DexMethod(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) #1 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i32 %3, ptr %10, align 4, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  %25 = load i32, ptr %10, align 4, !tbaa !9
  %26 = icmp eq i32 %25, 5
  br i1 %26, label %27, label %36

27:                                               ; preds = %5
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %35

30:                                               ; preds = %27
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = call noundef ptr @_ZN12_GLOBAL__N_123resolve_intf_method_refEPK8DexClassPK9DexStringPK8DexProto(ptr noundef %31, ptr noundef %32, ptr noundef %33)
  store ptr %34, ptr %6, align 8
  br label %172

35:                                               ; preds = %27
  br label %36

36:                                               ; preds = %35, %5
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = icmp eq i32 %37, 3
  br i1 %38, label %39, label %64

39:                                               ; preds = %36
  %40 = load ptr, ptr %11, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %63

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  %44 = call noundef ptr @_ZNK12DexMethodRef9get_classEv(ptr noundef nonnull align 8 dereferenceable(26) %43)
  store ptr %44, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = call noundef ptr @_Z10type_classPK7DexType(ptr noundef %45)
  store ptr %46, ptr %13, align 8, !tbaa !5
  %47 = load ptr, ptr %13, align 8, !tbaa !5
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %50

49:                                               ; preds = %42
  store ptr null, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %60

50:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %51 = load ptr, ptr %13, align 8, !tbaa !5
  %52 = call noundef ptr @_ZNK8DexClass15get_super_classEv(ptr noundef nonnull align 8 dereferenceable(176) %51)
  store ptr %52, ptr %15, align 8, !tbaa !5
  %53 = load ptr, ptr %15, align 8, !tbaa !5
  %54 = icmp ne ptr %53, null
  br i1 %54, label %56, label %55

55:                                               ; preds = %50
  store ptr null, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %59

56:                                               ; preds = %50
  %57 = load ptr, ptr %15, align 8, !tbaa !5
  %58 = call noundef ptr @_Z10type_classPK7DexType(ptr noundef %57)
  store ptr %58, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %14, align 4
  br label %59

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

60:                                               ; preds = %59, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %61 = load i32, ptr %14, align 4
  switch i32 %61, label %174 [
    i32 0, label %62
    i32 1, label %172
  ]

62:                                               ; preds = %60
  br label %63

63:                                               ; preds = %62, %39
  store i32 2, ptr %10, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %63, %36
  br label %65

65:                                               ; preds = %169, %64
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %171

68:                                               ; preds = %65
  %69 = load i32, ptr %10, align 4, !tbaa !9
  %70 = icmp eq i32 %69, 6
  br i1 %70, label %71, label %84

71:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = call noundef ptr @_ZN12_GLOBAL__N_123resolve_intf_method_refEPK8DexClassPK9DexStringPK8DexProto(ptr noundef %72, ptr noundef %73, ptr noundef %74)
  store ptr %75, ptr %16, align 8, !tbaa !5
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %80

78:                                               ; preds = %71
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %79, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %81

80:                                               ; preds = %71
  store i32 0, ptr %14, align 4
  br label %81

81:                                               ; preds = %80, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %82 = load i32, ptr %14, align 4
  switch i32 %82, label %174 [
    i32 0, label %83
    i32 1, label %172
  ]

83:                                               ; preds = %81
  br label %84

84:                                               ; preds = %83, %68
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = icmp eq i32 %85, 2
  br i1 %86, label %90, label %87

87:                                               ; preds = %84
  %88 = load i32, ptr %10, align 4, !tbaa !9
  %89 = icmp eq i32 %88, 4
  br i1 %89, label %90, label %121

90:                                               ; preds = %87, %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK8DexClass12get_vmethodsEv(ptr noundef nonnull align 8 dereferenceable(176) %91)
  store ptr %92, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %93 = load ptr, ptr %17, align 8, !tbaa !5
  %94 = call ptr @_ZNKSt6vectorIP9DexMethodSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %93) #5
  %95 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %96 = load ptr, ptr %17, align 8, !tbaa !5
  %97 = call ptr @_ZNKSt6vectorIP9DexMethodSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %96) #5
  %98 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %97, ptr %98, align 8
  br label %99

99:                                               ; preds = %116, %90
  %100 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP9DexMethodSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  br i1 %100, label %102, label %101

101:                                              ; preds = %99
  store i32 4, ptr %14, align 4
  br label %118

102:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP9DexMethodSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  store ptr %103, ptr %20, align 8, !tbaa !5
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = load ptr, ptr %20, align 8, !tbaa !5
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  %108 = call noundef zeroext i1 @_ZN12_GLOBAL__N_15matchEPK9DexStringPK8DexProtoPK9DexMethod(ptr noundef %104, ptr noundef %105, ptr noundef %107)
  br i1 %108, label %109, label %112

109:                                              ; preds = %102
  %110 = load ptr, ptr %20, align 8, !tbaa !5
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  store ptr %111, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %113

112:                                              ; preds = %102
  store i32 0, ptr %14, align 4
  br label %113

113:                                              ; preds = %112, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  %114 = load i32, ptr %14, align 4
  switch i32 %114, label %118 [
    i32 0, label %115
  ]

115:                                              ; preds = %113
  br label %116

116:                                              ; preds = %115
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKP9DexMethodSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  br label %99

118:                                              ; preds = %113, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  %119 = load i32, ptr %14, align 4
  switch i32 %119, label %174 [
    i32 4, label %120
    i32 1, label %172
  ]

120:                                              ; preds = %118
  br label %121

121:                                              ; preds = %120, %87
  %122 = load i32, ptr %10, align 4, !tbaa !9
  %123 = icmp eq i32 %122, 0
  br i1 %123, label %130, label %124

124:                                              ; preds = %121
  %125 = load i32, ptr %10, align 4, !tbaa !9
  %126 = icmp eq i32 %125, 1
  br i1 %126, label %130, label %127

127:                                              ; preds = %124
  %128 = load i32, ptr %10, align 4, !tbaa !9
  %129 = icmp eq i32 %128, 4
  br i1 %129, label %130, label %161

130:                                              ; preds = %127, %124, %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK8DexClass12get_dmethodsEv(ptr noundef nonnull align 8 dereferenceable(176) %131)
  store ptr %132, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %133 = load ptr, ptr %21, align 8, !tbaa !5
  %134 = call ptr @_ZNKSt6vectorIP9DexMethodSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %133) #5
  %135 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %134, ptr %135, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %136 = load ptr, ptr %21, align 8, !tbaa !5
  %137 = call ptr @_ZNKSt6vectorIP9DexMethodSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %136) #5
  %138 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %137, ptr %138, align 8
  br label %139

139:                                              ; preds = %156, %130
  %140 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP9DexMethodSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  br i1 %140, label %142, label %141

141:                                              ; preds = %139
  store i32 6, ptr %14, align 4
  br label %158

142:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP9DexMethodSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  store ptr %143, ptr %24, align 8, !tbaa !5
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = load ptr, ptr %24, align 8, !tbaa !5
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  %148 = call noundef zeroext i1 @_ZN12_GLOBAL__N_15matchEPK9DexStringPK8DexProtoPK9DexMethod(ptr noundef %144, ptr noundef %145, ptr noundef %147)
  br i1 %148, label %149, label %152

149:                                              ; preds = %142
  %150 = load ptr, ptr %24, align 8, !tbaa !5
  %151 = load ptr, ptr %150, align 8, !tbaa !5
  store ptr %151, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %153

152:                                              ; preds = %142
  store i32 0, ptr %14, align 4
  br label %153

153:                                              ; preds = %152, %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  %154 = load i32, ptr %14, align 4
  switch i32 %154, label %158 [
    i32 0, label %155
  ]

155:                                              ; preds = %153
  br label %156

156:                                              ; preds = %155
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKP9DexMethodSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  br label %139

158:                                              ; preds = %153, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  %159 = load i32, ptr %14, align 4
  switch i32 %159, label %174 [
    i32 6, label %160
    i32 1, label %172
  ]

160:                                              ; preds = %158
  br label %161

161:                                              ; preds = %160, %127
  %162 = load i32, ptr %10, align 4, !tbaa !9
  %163 = icmp ne i32 %162, 0
  br i1 %163, label %164, label %168

164:                                              ; preds = %161
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = call noundef ptr @_ZNK8DexClass15get_super_classEv(ptr noundef nonnull align 8 dereferenceable(176) %165)
  %167 = call noundef ptr @_Z10type_classPK7DexType(ptr noundef %166)
  br label %169

168:                                              ; preds = %161
  br label %169

169:                                              ; preds = %168, %164
  %170 = phi ptr [ %167, %164 ], [ null, %168 ]
  store ptr %170, ptr %7, align 8, !tbaa !5
  br label %65, !llvm.loop !11

171:                                              ; preds = %65
  store ptr null, ptr %6, align 8
  br label %172

172:                                              ; preds = %171, %158, %118, %81, %60, %30
  %173 = load ptr, ptr %6, align 8
  ret ptr %173

174:                                              ; preds = %158, %118, %81, %60
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN12_GLOBAL__N_123resolve_intf_method_refEPK8DexClassPK9DexStringPK8DexProto(ptr noundef, ptr noundef, ptr noundef) #1

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

declare noundef ptr @_Z10type_classPK7DexType(ptr noundef) #3

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_15matchEPK9DexStringPK8DexProtoPK9DexMethod(ptr noundef, ptr noundef, ptr noundef) #4

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 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 #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"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS12MethodSearch", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; 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.__gnu_cxx::__normal_iterator" = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z14resolve_methodPK8DexClassPK9DexStringPK8DexProto12MethodSearchPK9DexMethod(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = icmp eq i32 %3, 5
  %11 = icmp ne ptr %0, null
  %or.cond8 = and i1 %11, %10
  br i1 %or.cond8, label %12, label %14

12:                                               ; preds = %5
  %13 = tail call noundef ptr @_ZN12_GLOBAL__N_123resolve_intf_method_refEPK8DexClassPK9DexStringPK8DexProto(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2)
  br label %.thread

14:                                               ; preds = %5
  %15 = icmp eq i32 %3, 3
  br i1 %15, label %16, label %25

16:                                               ; preds = %14
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %25, label %17

17:                                               ; preds = %16
  %18 = tail call noundef ptr @_ZNK12DexMethodRef9get_classEv(ptr noundef nonnull align 8 dereferenceable(26) %4)
  %19 = tail call noundef ptr @_Z10type_classPK7DexType(ptr noundef %18)
  %20 = icmp eq ptr %19, null
  br i1 %20, label %.thread, label %21

21:                                               ; preds = %17
  %22 = tail call noundef ptr @_ZNK8DexClass15get_super_classEv(ptr noundef nonnull align 8 dereferenceable(176) %19)
  %.not73 = icmp eq ptr %22, null
  br i1 %.not73, label %.thread, label %23

23:                                               ; preds = %21
  %24 = tail call noundef ptr @_Z10type_classPK7DexType(ptr noundef nonnull %22)
  br label %25

25:                                               ; preds = %23, %16, %14
  %.060 = phi i32 [ %3, %14 ], [ 2, %23 ], [ 2, %16 ]
  %.358 = phi ptr [ %0, %14 ], [ %24, %23 ], [ %0, %16 ]
  %.not74107 = icmp eq ptr %.358, null
  br i1 %.not74107, label %.thread, label %.lr.ph110

.lr.ph110:                                        ; preds = %25
  %.not76 = icmp eq i32 %.060, 0
  br label %26

26:                                               ; preds = %.lr.ph110, %55
  %.459108 = phi ptr [ %.358, %.lr.ph110 ], [ %57, %55 ]
  switch i32 %.060, label %55 [
    i32 6, label %27
    i32 4, label %29
    i32 2, label %29
    i32 1, label %42
    i32 0, label %42
  ]

27:                                               ; preds = %26
  %28 = call noundef ptr @_ZN12_GLOBAL__N_123resolve_intf_method_refEPK8DexClassPK9DexStringPK8DexProto(ptr noundef nonnull %.459108, ptr noundef %1, ptr noundef %2)
  %.not75.not = icmp eq ptr %28, null
  br i1 %.not75.not, label %55, label %.thread

29:                                               ; preds = %26, %26
  %30 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK8DexClass12get_vmethodsEv(ptr noundef nonnull align 8 dereferenceable(176) %.459108)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %31 = call ptr @_ZNKSt6vectorIP9DexMethodSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  store ptr %31, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %32 = call ptr @_ZNKSt6vectorIP9DexMethodSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  store ptr %32, ptr %7, align 8
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP9DexMethodSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %33, label %.lr.ph, label %.thread87

.thread87:                                        ; preds = %37, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  switch i32 %.060, label %55 [
    i32 4, label %42
    i32 1, label %42
    i32 0, label %42
  ]

.lr.ph:                                           ; preds = %29, %37
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP9DexMethodSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = call noundef zeroext i1 @_ZN12_GLOBAL__N_15matchEPK9DexStringPK8DexProtoPK9DexMethod(ptr noundef %1, ptr noundef %2, ptr noundef %35)
  br i1 %36, label %40, label %37

37:                                               ; preds = %.lr.ph
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKP9DexMethodSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %39 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP9DexMethodSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %39, label %.lr.ph, label %.thread87

40:                                               ; preds = %.lr.ph
  %41 = load ptr, ptr %34, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %.thread

42:                                               ; preds = %26, %26, %.thread87, %.thread87, %.thread87
  %43 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK8DexClass12get_dmethodsEv(ptr noundef nonnull align 8 dereferenceable(176) %.459108)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %44 = call ptr @_ZNKSt6vectorIP9DexMethodSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #5
  store ptr %44, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %45 = call ptr @_ZNKSt6vectorIP9DexMethodSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #5
  store ptr %45, ptr %9, align 8
  %46 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP9DexMethodSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %46, label %.lr.ph106, label %._crit_edge

.lr.ph106:                                        ; preds = %42, %50
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP9DexMethodSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = call noundef zeroext i1 @_ZN12_GLOBAL__N_15matchEPK9DexStringPK8DexProtoPK9DexMethod(ptr noundef %1, ptr noundef %2, ptr noundef %48)
  br i1 %49, label %53, label %50

50:                                               ; preds = %.lr.ph106
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKP9DexMethodSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %52 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP9DexMethodSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %52, label %.lr.ph106, label %._crit_edge

53:                                               ; preds = %.lr.ph106
  %54 = load ptr, ptr %47, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %.thread

._crit_edge:                                      ; preds = %50, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br i1 %.not76, label %.thread, label %55

55:                                               ; preds = %._crit_edge, %.thread87, %27, %26
  %56 = call noundef ptr @_ZNK8DexClass15get_super_classEv(ptr noundef nonnull align 8 dereferenceable(176) %.459108)
  %57 = call noundef ptr @_Z10type_classPK7DexType(ptr noundef %56)
  %.not74 = icmp eq ptr %57, null
  br i1 %.not74, label %.thread, label %26, !llvm.loop !9

.thread:                                          ; preds = %._crit_edge, %55, %27, %25, %21, %17, %53, %40, %12
  %.15 = phi ptr [ %13, %12 ], [ %41, %40 ], [ %54, %53 ], [ null, %17 ], [ null, %21 ], [ null, %25 ], [ null, %._crit_edge ], [ null, %55 ], [ %28, %27 ]
  ret ptr %.15
}

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN12_GLOBAL__N_123resolve_intf_method_refEPK8DexClassPK9DexStringPK8DexProto(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; 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

declare noundef ptr @_Z10type_classPK7DexType(ptr noundef) local_unnamed_addr #3

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_15matchEPK9DexStringPK8DexProtoPK9DexMethod(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass