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

; 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::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 }

@.str.8 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [32 x i8], align 1
@__PRETTY_FUNCTION__._ZN6DexIdx13get_type_listEj = external hidden unnamed_addr constant [45 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [21 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIP7DexTypeSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

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

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

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

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  call void @llvm.memset.p0.i64(ptr align 8 %6, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIP7DexTypeSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %19 = invoke noundef ptr @_ZN11DexTypeList14make_type_listEOSt6vectorIP7DexTypeSaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %20 unwind label %21

20:                                               ; preds = %18
  store ptr %19, ptr %3, align 8
  call void @_ZNSt6vectorIP7DexTypeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  br label %84

21:                                               ; preds = %18
  %22 = landingpad { ptr, i32 }
          cleanup
  %23 = extractvalue { ptr, i32 } %22, 0
  store ptr %23, ptr %7, align 8
  %24 = extractvalue { ptr, i32 } %22, 1
  store i32 %24, ptr %8, align 4
  call void @_ZNSt6vectorIP7DexTypeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  br label %86

25:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = call noundef ptr @_ZN6DexIdx13get_uint_dataEj(ptr noundef nonnull align 8 dereferenceable(288) %15, i32 noundef %26)
  store ptr %27, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = getelementptr inbounds i32, ptr %28, i32 1
  store ptr %29, ptr %9, align 8, !tbaa !5
  %30 = load i32, ptr %28, align 4, !tbaa !9
  store i32 %30, ptr %10, align 4, !tbaa !9
  %31 = load i32, ptr %10, align 4, !tbaa !9
  %32 = call noundef i32 @_ZNK6DexIdx13get_file_sizeEv(ptr noundef nonnull align 8 dereferenceable(288) %15)
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = sub i32 %32, %33
  %35 = icmp ult i32 %31, %34
  br i1 %35, label %36, label %37

36:                                               ; preds = %25
  br label %39

37:                                               ; preds = %25
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef @.str.42, ptr noundef @.str.8, i32 noundef 196, ptr noundef @__PRETTY_FUNCTION__._ZN6DexIdx13get_type_listEj, i32 noundef 12, ptr noundef @.str.43) #7
  unreachable

38:                                               ; No predecessors!
  br label %39

39:                                               ; preds = %38, %36
  %40 = load i32, ptr %5, align 4, !tbaa !9
  %41 = call noundef i32 @_ZNK6DexIdx13get_file_sizeEv(ptr noundef nonnull align 8 dereferenceable(288) %15)
  %42 = load i32, ptr %10, align 4, !tbaa !9
  %43 = mul i32 2, %42
  %44 = sub i32 %41, %43
  %45 = icmp ule i32 %40, %44
  br i1 %45, label %46, label %47

46:                                               ; preds = %39
  br label %49

47:                                               ; preds = %39
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef @.str.44, ptr noundef @.str.8, i32 noundef 198, ptr noundef @__PRETTY_FUNCTION__._ZN6DexIdx13get_type_listEj, i32 noundef 12, ptr noundef @.str.45) #7
  unreachable

48:                                               ; No predecessors!
  br label %49

49:                                               ; preds = %48, %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %50, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  call void @_ZNSt6vectorIP7DexTypeSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %51 = load i32, ptr %10, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  invoke void @_ZNSt6vectorIP7DexTypeSaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %52)
          to label %53 unwind label %59

53:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %73, %53
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = load i32, ptr %10, align 4, !tbaa !9
  %57 = icmp ult i32 %55, %56
  br i1 %57, label %63, label %58

58:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %80

59:                                               ; preds = %80, %49
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %7, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %8, align 4
  br label %83

63:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds i16, ptr %64, i64 %66
  %68 = load i16, ptr %67, align 2, !tbaa !11
  %69 = zext i16 %68 to i32
  %70 = invoke noundef ptr @_ZN6DexIdx11get_typeidxEj(ptr noundef nonnull align 8 dereferenceable(288) %15, i32 noundef %69)
          to label %71 unwind label %76

71:                                               ; preds = %63
  store ptr %70, ptr %14, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIP7DexTypeSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %72 unwind label %76

72:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %13, align 4, !tbaa !9
  %75 = add i32 %74, 1
  store i32 %75, ptr %13, align 4, !tbaa !9
  br label %54, !llvm.loop !13

76:                                               ; preds = %71, %63
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %7, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %83

80:                                               ; preds = %58
  %81 = invoke noundef ptr @_ZN11DexTypeList14make_type_listEOSt6vectorIP7DexTypeSaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %82 unwind label %59

82:                                               ; preds = %80
  store ptr %81, ptr %3, align 8
  call void @_ZNSt6vectorIP7DexTypeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %84

83:                                               ; preds = %76, %59
  call void @_ZNSt6vectorIP7DexTypeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %86

84:                                               ; preds = %82, %20
  %85 = load ptr, ptr %3, align 8
  ret ptr %85

86:                                               ; preds = %83, %21
  %87 = load ptr, ptr %7, align 8
  %88 = load i32, ptr %8, align 4
  %89 = insertvalue { ptr, i32 } poison, ptr %87, 0
  %90 = insertvalue { ptr, i32 } %89, i32 %88, 1
  resume { ptr, i32 } %90
}

declare noundef ptr @_ZN11DexTypeList14make_type_listEOSt6vectorIP7DexTypeSaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24)) #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP7DexTypeSaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP7DexTypeSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), 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 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

!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, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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.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 }

@.str.8 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [32 x i8], align 1
@__PRETTY_FUNCTION__._ZN6DexIdx13get_type_listEj = external hidden unnamed_addr constant [45 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [21 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN6DexIdx13get_type_listEj(ptr noundef nonnull align 8 dereferenceable(288) %0, i32 noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector.3", align 8
  %4 = alloca %"class.std::vector.3", align 8
  %5 = alloca ptr, align 8
  %6 = icmp eq i32 %1, 0
  br i1 %6, label %7, label %12

7:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %3, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIP7DexTypeSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  %8 = invoke noundef ptr @_ZN11DexTypeList14make_type_listEOSt6vectorIP7DexTypeSaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %9 unwind label %10

9:                                                ; preds = %7
  call void @_ZNSt6vectorIP7DexTypeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  br label %40

10:                                               ; preds = %7
  %11 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIP7DexTypeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  br label %41

12:                                               ; preds = %2
  %13 = tail call noundef ptr @_ZN6DexIdx13get_uint_dataEj(ptr noundef nonnull align 8 dereferenceable(288) %0, i32 noundef %1)
  %14 = getelementptr inbounds i8, ptr %13, i64 4
  %15 = load i32, ptr %13, align 4, !tbaa !5
  %16 = tail call noundef i32 @_ZNK6DexIdx13get_file_sizeEv(ptr noundef nonnull align 8 dereferenceable(288) %0)
  %17 = sub i32 %16, %1
  %18 = icmp ult i32 %15, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %12
  tail call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.8, i32 noundef 196, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6DexIdx13get_type_listEj, i32 noundef 12, ptr noundef nonnull @.str.43) #7
  unreachable

20:                                               ; preds = %12
  %21 = tail call noundef i32 @_ZNK6DexIdx13get_file_sizeEv(ptr noundef nonnull align 8 dereferenceable(288) %0)
  %22 = shl i32 %15, 1
  %23 = sub i32 %21, %22
  %.not = icmp ult i32 %23, %1
  br i1 %.not, label %24, label %25

24:                                               ; preds = %20
  tail call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.8, i32 noundef 198, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6DexIdx13get_type_listEj, i32 noundef 12, ptr noundef nonnull @.str.45) #7
  unreachable

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @_ZNSt6vectorIP7DexTypeSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %26 = zext i32 %15 to i64
  invoke void @_ZNSt6vectorIP7DexTypeSaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %26)
          to label %.preheader unwind label %28

.preheader:                                       ; preds = %25
  %.not27 = icmp eq i32 %15, 0
  br i1 %.not27, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %35, %.preheader
  %27 = invoke noundef ptr @_ZN11DexTypeList14make_type_listEOSt6vectorIP7DexTypeSaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %38 unwind label %28

28:                                               ; preds = %._crit_edge, %25
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %39

.lr.ph:                                           ; preds = %.preheader, %35
  %indvars.iv = phi i64 [ %indvars.iv.next, %35 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %30 = getelementptr inbounds i16, ptr %14, i64 %indvars.iv
  %31 = load i16, ptr %30, align 2, !tbaa !9
  %32 = zext i16 %31 to i32
  %33 = invoke noundef ptr @_ZN6DexIdx11get_typeidxEj(ptr noundef nonnull align 8 dereferenceable(288) %0, i32 noundef %32)
          to label %34 unwind label %36

34:                                               ; preds = %.lr.ph
  store ptr %33, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIP7DexTypeSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %35 unwind label %36

35:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %26
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

36:                                               ; preds = %34, %.lr.ph
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %39

38:                                               ; preds = %._crit_edge
  call void @_ZNSt6vectorIP7DexTypeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  br label %40

39:                                               ; preds = %36, %28
  %.pn = phi { ptr, i32 } [ %37, %36 ], [ %29, %28 ]
  call void @_ZNSt6vectorIP7DexTypeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  br label %41

40:                                               ; preds = %38, %9
  %.017 = phi ptr [ %8, %9 ], [ %27, %38 ]
  ret ptr %.017

41:                                               ; preds = %39, %10
  %.pn24 = phi { ptr, i32 } [ %11, %10 ], [ %.pn, %39 ]
  resume { ptr, i32 } %.pn24
}

declare noundef ptr @_ZN11DexTypeList14make_type_listEOSt6vectorIP7DexTypeSaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP7DexTypeSaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP7DexTypeSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), 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 = { 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"short", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass