; LLVM IR from facebook/redex :: libredex/DexIdx.ll (ZN6DexIdx27get_methodhandleidx_fromdexEj)

; 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.DexIdx = type { ptr, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, %"class.std::vector", %"class.std::vector.3", %"class.std::vector.8", %"class.std::vector.13", %"class.std::vector.18", %"class.std::vector.23", %"class.std::vector.28" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<const DexString *, std::allocator<const DexString *>>::_Vector_impl" }
%"struct.std::_Vector_base<const DexString *, std::allocator<const DexString *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const DexString *, std::allocator<const DexString *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const DexString *, std::allocator<const DexString *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<DexType *, std::allocator<DexType *>>::_Vector_impl" }
%"struct.std::_Vector_base<DexType *, std::allocator<DexType *>>::_Vector_impl" = type { %"struct.std::_Vector_base<DexType *, std::allocator<DexType *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DexType *, std::allocator<DexType *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<DexFieldRef *, std::allocator<DexFieldRef *>>::_Vector_impl" }
%"struct.std::_Vector_base<DexFieldRef *, std::allocator<DexFieldRef *>>::_Vector_impl" = type { %"struct.std::_Vector_base<DexFieldRef *, std::allocator<DexFieldRef *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DexFieldRef *, std::allocator<DexFieldRef *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<DexMethodRef *, std::allocator<DexMethodRef *>>::_Vector_impl" }
%"struct.std::_Vector_base<DexMethodRef *, std::allocator<DexMethodRef *>>::_Vector_impl" = type { %"struct.std::_Vector_base<DexMethodRef *, std::allocator<DexMethodRef *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DexMethodRef *, std::allocator<DexMethodRef *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<DexProto *, std::allocator<DexProto *>>::_Vector_impl" }
%"struct.std::_Vector_base<DexProto *, std::allocator<DexProto *>>::_Vector_impl" = type { %"struct.std::_Vector_base<DexProto *, std::allocator<DexProto *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DexProto *, std::allocator<DexProto *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<DexCallSite *, std::allocator<DexCallSite *>>::_Vector_impl" }
%"struct.std::_Vector_base<DexCallSite *, std::allocator<DexCallSite *>>::_Vector_impl" = type { %"struct.std::_Vector_base<DexCallSite *, std::allocator<DexCallSite *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DexCallSite *, std::allocator<DexCallSite *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.28" = type { %"struct.std::_Vector_base.29" }
%"struct.std::_Vector_base.29" = type { %"struct.std::_Vector_base<DexMethodHandle *, std::allocator<DexMethodHandle *>>::_Vector_impl" }
%"struct.std::_Vector_base<DexMethodHandle *, std::allocator<DexMethodHandle *>>::_Vector_impl" = type { %"struct.std::_Vector_base<DexMethodHandle *, std::allocator<DexMethodHandle *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DexMethodHandle *, std::allocator<DexMethodHandle *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.dex_methodhandle_id = type { i16, i16, i16, i16 }

@.str.8 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [44 x i8], align 1
@__PRETTY_FUNCTION__._ZN6DexIdx27get_methodhandleidx_fromdexEj = external hidden unnamed_addr constant [63 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [135 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [26 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN6DexIdx27get_methodhandleidx_fromdexEj(ptr noundef nonnull align 8 dereferenceable(288) %0, i32 noundef %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i16, align 2
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %13 = load ptr, ptr %4, align 8
  %14 = load i32, ptr %5, align 4, !tbaa !9
  %15 = getelementptr inbounds %class.DexIdx, ptr %13, i32 0, i32 14
  %16 = load i32, ptr %15, align 8, !tbaa !11
  %17 = icmp ult i32 %14, %16
  br i1 %17, label %18, label %19

18:                                               ; preds = %2
  br label %21

19:                                               ; preds = %2
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef @.str.26, ptr noundef @.str.8, i32 noundef 99, ptr noundef @__PRETTY_FUNCTION__._ZN6DexIdx27get_methodhandleidx_fromdexEj, i32 noundef 2, ptr noundef @.str.19) #6
  unreachable

20:                                               ; No predecessors!
  br label %21

21:                                               ; preds = %20, %18
  call void @llvm.lifetime.start.p0(i64 2, ptr %6) #7
  %22 = getelementptr inbounds %class.DexIdx, ptr %13, i32 0, i32 13
  %23 = load ptr, ptr %22, align 8, !tbaa !41
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = zext i32 %24 to i64
  %26 = getelementptr inbounds %struct.dex_methodhandle_id, ptr %23, i64 %25
  %27 = getelementptr inbounds %struct.dex_methodhandle_id, ptr %26, i32 0, i32 0
  %28 = load i16, ptr %27, align 1, !tbaa !42
  store i16 %28, ptr %6, align 2, !tbaa !45
  %29 = load i16, ptr %6, align 2, !tbaa !45
  %30 = zext i16 %29 to i32
  %31 = icmp sge i32 %30, 0
  br i1 %31, label %32, label %37

32:                                               ; preds = %21
  %33 = load i16, ptr %6, align 2, !tbaa !45
  %34 = zext i16 %33 to i32
  %35 = icmp sle i32 %34, 8
  br i1 %35, label %36, label %37

36:                                               ; preds = %32
  br label %39

37:                                               ; preds = %32, %21
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef @.str.27, ptr noundef @.str.8, i32 noundef 105, ptr noundef @__PRETTY_FUNCTION__._ZN6DexIdx27get_methodhandleidx_fromdexEj, i32 noundef 12, ptr noundef @.str.28) #6
  unreachable

38:                                               ; No predecessors!
  br label %39

39:                                               ; preds = %38, %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %40 = load i16, ptr %6, align 2, !tbaa !45
  %41 = zext i16 %40 to i32
  store i32 %41, ptr %7, align 4, !tbaa !46
  %42 = load i32, ptr %7, align 4, !tbaa !46
  %43 = call noundef zeroext i1 @_ZN15DexMethodHandle12isInvokeTypeE16MethodHandleType(i32 noundef %42)
  br i1 %43, label %44, label %62

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %45 = getelementptr inbounds %class.DexIdx, ptr %13, i32 0, i32 13
  %46 = load ptr, ptr %45, align 8, !tbaa !41
  %47 = load i32, ptr %5, align 4, !tbaa !9
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds %struct.dex_methodhandle_id, ptr %46, i64 %48
  %50 = getelementptr inbounds %struct.dex_methodhandle_id, ptr %49, i32 0, i32 2
  %51 = load i16, ptr %50, align 1, !tbaa !48
  %52 = zext i16 %51 to i32
  %53 = call noundef ptr @_ZN6DexIdx13get_methodidxEj(ptr noundef nonnull align 8 dereferenceable(288) %13, i32 noundef %52)
  store ptr %53, ptr %8, align 8, !tbaa !5
  %54 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #8
  %55 = load i32, ptr %7, align 4, !tbaa !46
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN15DexMethodHandleC1E16MethodHandleTypeP12DexMethodRef(ptr noundef nonnull align 8 dereferenceable(16) %54, i32 noundef %55, ptr noundef %56)
          to label %57 unwind label %58

57:                                               ; preds = %44
  store ptr %54, ptr %3, align 8
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %80

58:                                               ; preds = %44
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %9, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %54, i64 noundef 16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %82

62:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %63 = getelementptr inbounds %class.DexIdx, ptr %13, i32 0, i32 13
  %64 = load ptr, ptr %63, align 8, !tbaa !41
  %65 = load i32, ptr %5, align 4, !tbaa !9
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds %struct.dex_methodhandle_id, ptr %64, i64 %66
  %68 = getelementptr inbounds %struct.dex_methodhandle_id, ptr %67, i32 0, i32 2
  %69 = load i16, ptr %68, align 1, !tbaa !48
  %70 = zext i16 %69 to i32
  %71 = call noundef ptr @_ZN6DexIdx12get_fieldidxEj(ptr noundef nonnull align 8 dereferenceable(288) %13, i32 noundef %70)
  store ptr %71, ptr %12, align 8, !tbaa !5
  %72 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #8
  %73 = load i32, ptr %7, align 4, !tbaa !46
  %74 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZN15DexMethodHandleC1E16MethodHandleTypeP11DexFieldRef(ptr noundef nonnull align 8 dereferenceable(16) %72, i32 noundef %73, ptr noundef %74)
          to label %75 unwind label %76

75:                                               ; preds = %62
  store ptr %72, ptr %3, align 8
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %80

76:                                               ; preds = %62
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %9, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %72, i64 noundef 16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %82

80:                                               ; preds = %75, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #7
  %81 = load ptr, ptr %3, align 8
  ret ptr %81

82:                                               ; preds = %76, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #7
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %9, align 8
  %85 = load i32, ptr %10, align 4
  %86 = insertvalue { ptr, i32 } poison, ptr %84, 0
  %87 = insertvalue { ptr, i32 } %86, i32 %85, 1
  resume { ptr, i32 } %87
}

declare noundef zeroext i1 @_ZN15DexMethodHandle12isInvokeTypeE16MethodHandleType(i32 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6DexIdx13get_methodidxEj(ptr noundef nonnull align 8 dereferenceable(288), i32 noundef) #4 align 2

declare void @_ZN15DexMethodHandleC1E16MethodHandleTypeP12DexMethodRef(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, ptr noundef) unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6DexIdx12get_fieldidxEj(ptr noundef nonnull align 8 dereferenceable(288), i32 noundef) #4 align 2

declare void @_ZN15DexMethodHandleC1E16MethodHandleTypeP11DexFieldRef(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, ptr noundef) unnamed_addr #5

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 = { nobuiltin allocsize(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 = { nobuiltin nounwind "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 = { "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 }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 112}
!12 = !{!"_ZTS6DexIdx", !6, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !6, i64 56, !10, i64 64, !6, i64 72, !10, i64 80, !6, i64 88, !10, i64 96, !6, i64 104, !10, i64 112, !13, i64 120, !17, i64 144, !21, i64 168, !25, i64 192, !29, i64 216, !33, i64 240, !37, i64 264}
!13 = !{!"_ZTSSt6vectorIPK9DexStringSaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIPK9DexStringSaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPK9DexStringSaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPK9DexStringSaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt6vectorIP7DexTypeSaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIP7DexTypeSaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIP7DexTypeSaIS1_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIP7DexTypeSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorIP11DexFieldRefSaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIP11DexFieldRefSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIP11DexFieldRefSaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP11DexFieldRefSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt6vectorIP12DexMethodRefSaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIP12DexMethodRefSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIP12DexMethodRefSaIS1_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIP12DexMethodRefSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSSt6vectorIP8DexProtoSaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIP8DexProtoSaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIP8DexProtoSaIS1_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIP8DexProtoSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!"_ZTSSt6vectorIP11DexCallSiteSaIS1_EE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIP11DexCallSiteSaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIP11DexCallSiteSaIS1_EE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIP11DexCallSiteSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!37 = !{!"_ZTSSt6vectorIP15DexMethodHandleSaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIP15DexMethodHandleSaIS1_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIP15DexMethodHandleSaIS1_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIP15DexMethodHandleSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!12, !6, i64 104}
!42 = !{!43, !44, i64 0}
!43 = !{!"_ZTS19dex_methodhandle_id", !44, i64 0, !44, i64 2, !44, i64 4, !44, i64 6}
!44 = !{!"short", !7, i64 0}
!45 = !{!44, !44, i64 0}
!46 = !{!47, !47, i64 0}
!47 = !{!"_ZTS16MethodHandleType", !7, i64 0}
!48 = !{!43, !44, i64 4}


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

%struct.dex_methodhandle_id = type { i16, i16, i16, i16 }

@.str.8 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [44 x i8], align 1
@__PRETTY_FUNCTION__._ZN6DexIdx27get_methodhandleidx_fromdexEj = external hidden unnamed_addr constant [63 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [135 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [26 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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 #0

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #1

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull ptr @_ZN6DexIdx27get_methodhandleidx_fromdexEj(ptr noundef nonnull align 8 dereferenceable(288) %0, i32 noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 112
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = icmp ugt i32 %4, %1
  br i1 %5, label %7, label %6

6:                                                ; preds = %2
  tail call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.8, i32 noundef 99, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6DexIdx27get_methodhandleidx_fromdexEj, i32 noundef 2, ptr noundef nonnull @.str.19) #5
  unreachable

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 104
  %9 = load ptr, ptr %8, align 8, !tbaa !39
  %10 = zext i32 %1 to i64
  %11 = getelementptr inbounds %struct.dex_methodhandle_id, ptr %9, i64 %10
  %12 = load i16, ptr %11, align 1, !tbaa !40
  %13 = zext i16 %12 to i32
  %14 = icmp ult i16 %12, 9
  br i1 %14, label %16, label %15

15:                                               ; preds = %7
  tail call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.8, i32 noundef 105, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6DexIdx27get_methodhandleidx_fromdexEj, i32 noundef 12, ptr noundef nonnull @.str.28) #5
  unreachable

16:                                               ; preds = %7
  %17 = tail call noundef zeroext i1 @_ZN15DexMethodHandle12isInvokeTypeE16MethodHandleType(i32 noundef %13)
  %18 = load ptr, ptr %8, align 8, !tbaa !39
  %19 = getelementptr inbounds %struct.dex_methodhandle_id, ptr %18, i64 %10, i32 2
  %20 = load i16, ptr %19, align 1, !tbaa !43
  %21 = zext i16 %20 to i32
  br i1 %17, label %22, label %27

22:                                               ; preds = %16
  %23 = tail call noundef ptr @_ZN6DexIdx13get_methodidxEj(ptr noundef nonnull align 8 dereferenceable(288) %0, i32 noundef %21)
  %24 = tail call noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #6
  invoke void @_ZN15DexMethodHandleC1E16MethodHandleTypeP12DexMethodRef(ptr noundef nonnull align 8 dereferenceable(16) %24, i32 noundef %13, ptr noundef %23)
          to label %32 unwind label %25

25:                                               ; preds = %22
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %33

27:                                               ; preds = %16
  %28 = tail call noundef ptr @_ZN6DexIdx12get_fieldidxEj(ptr noundef nonnull align 8 dereferenceable(288) %0, i32 noundef %21)
  %29 = tail call noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #6
  invoke void @_ZN15DexMethodHandleC1E16MethodHandleTypeP11DexFieldRef(ptr noundef nonnull align 8 dereferenceable(16) %29, i32 noundef %13, ptr noundef %28)
          to label %32 unwind label %30

30:                                               ; preds = %27
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %33

32:                                               ; preds = %27, %22
  %.0 = phi ptr [ %24, %22 ], [ %29, %27 ]
  ret ptr %.0

33:                                               ; preds = %30, %25
  %.sink = phi ptr [ %29, %30 ], [ %24, %25 ]
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %26, %25 ]
  tail call void @_ZdlPvm(ptr noundef nonnull %.sink, i64 noundef 16) #7
  resume { ptr, i32 } %.pn
}

declare noundef zeroext i1 @_ZN15DexMethodHandle12isInvokeTypeE16MethodHandleType(i32 noundef) local_unnamed_addr #4

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

declare void @_ZN15DexMethodHandleC1E16MethodHandleTypeP12DexMethodRef(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, ptr noundef) unnamed_addr #4

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

declare void @_ZN15DexMethodHandleC1E16MethodHandleTypeP11DexFieldRef(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, ptr noundef) unnamed_addr #4

attributes #0 = { 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 #1 = { nobuiltin allocsize(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 = { nobuiltin nounwind "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 = { "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 = { noreturn }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { builtin 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, !10, i64 112}
!6 = !{!"_ZTS6DexIdx", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !10, i64 80, !7, i64 88, !10, i64 96, !7, i64 104, !10, i64 112, !11, i64 120, !15, i64 144, !19, i64 168, !23, i64 192, !27, i64 216, !31, i64 240, !35, i64 264}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSSt6vectorIPK9DexStringSaIS2_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIPK9DexStringSaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIPK9DexStringSaIS2_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPK9DexStringSaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!15 = !{!"_ZTSSt6vectorIP7DexTypeSaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIP7DexTypeSaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIP7DexTypeSaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIP7DexTypeSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!"_ZTSSt6vectorIP11DexFieldRefSaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIP11DexFieldRefSaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIP11DexFieldRefSaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIP11DexFieldRefSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!23 = !{!"_ZTSSt6vectorIP12DexMethodRefSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIP12DexMethodRefSaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP12DexMethodRefSaIS1_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIP12DexMethodRefSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!27 = !{!"_ZTSSt6vectorIP8DexProtoSaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIP8DexProtoSaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIP8DexProtoSaIS1_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIP8DexProtoSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!31 = !{!"_ZTSSt6vectorIP11DexCallSiteSaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIP11DexCallSiteSaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIP11DexCallSiteSaIS1_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIP11DexCallSiteSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!35 = !{!"_ZTSSt6vectorIP15DexMethodHandleSaIS1_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseIP15DexMethodHandleSaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIP15DexMethodHandleSaIS1_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIP15DexMethodHandleSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!39 = !{!6, !7, i64 104}
!40 = !{!41, !42, i64 0}
!41 = !{!"_ZTS19dex_methodhandle_id", !42, i64 0, !42, i64 2, !42, i64 4, !42, i64 6}
!42 = !{!"short", !8, i64 0}
!43 = !{!41, !42, i64 4}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass