; LLVM IR from facebook/redex :: libresource/VectorImpl.ll (ZN7android10VectorImpl4sortEPFiPKvS2_PvES3_)

; 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.android::VectorImpl" = type { ptr, ptr, i64, i32, i64 }

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7android10VectorImpl13editArrayImplEv(ptr noundef nonnull align 8 dereferenceable(40)) #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7android10VectorImpl8_do_copyEPvPKvm(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef, i64 noundef) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7android10VectorImpl4sizeEv(ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7android10VectorImpl4sortEPFiPKvS2_PvES3_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %1, ptr noundef %2) #0 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %18 = call noundef i64 @_ZNK7android10VectorImpl4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %17)
  store i64 %18, ptr %8, align 8, !tbaa !9
  %19 = load i64, ptr %8, align 8, !tbaa !9
  %20 = icmp sgt i64 %19, 1
  br i1 %20, label %21, label %138

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %22 = call noundef ptr @_ZNK7android10VectorImpl9arrayImplEv(ptr noundef nonnull align 8 dereferenceable(40) %17)
  store ptr %22, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 1, ptr %11, align 8, !tbaa !9
  br label %23

23:                                               ; preds = %127, %21
  %24 = load i64, ptr %11, align 8, !tbaa !9
  %25 = load i64, ptr %8, align 8, !tbaa !9
  %26 = icmp slt i64 %24, %25
  br i1 %26, label %27, label %128

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = getelementptr inbounds %"class.android::VectorImpl", ptr %17, i32 0, i32 4
  %30 = load i64, ptr %29, align 8, !tbaa !11
  %31 = load i64, ptr %11, align 8, !tbaa !9
  %32 = mul i64 %30, %31
  %33 = getelementptr inbounds i8, ptr %28, i64 %32
  store ptr %33, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.android::VectorImpl", ptr %17, i32 0, i32 4
  %36 = load i64, ptr %35, align 8, !tbaa !11
  %37 = load i64, ptr %11, align 8, !tbaa !9
  %38 = sub nsw i64 %37, 1
  %39 = mul i64 %36, %38
  %40 = getelementptr inbounds i8, ptr %34, i64 %39
  store ptr %40, ptr %13, align 8, !tbaa !5
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = load ptr, ptr %13, align 8, !tbaa !5
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = call noundef i32 %41(ptr noundef %42, ptr noundef %43, ptr noundef %44)
  %46 = icmp sgt i32 %45, 0
  br i1 %46, label %47, label %122

47:                                               ; preds = %27
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %76, label %50

50:                                               ; preds = %47
  %51 = call noundef ptr @_ZN7android10VectorImpl13editArrayImplEv(ptr noundef nonnull align 8 dereferenceable(40) %17)
  store ptr %51, ptr %9, align 8, !tbaa !5
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 -12, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %125

55:                                               ; preds = %50
  %56 = getelementptr inbounds %"class.android::VectorImpl", ptr %17, i32 0, i32 4
  %57 = load i64, ptr %56, align 8, !tbaa !11
  %58 = call noalias ptr @malloc(i64 noundef %57) #7
  store ptr %58, ptr %10, align 8, !tbaa !5
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %62, label %61

61:                                               ; preds = %55
  store i32 -12, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %125

62:                                               ; preds = %55
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = getelementptr inbounds %"class.android::VectorImpl", ptr %17, i32 0, i32 4
  %65 = load i64, ptr %64, align 8, !tbaa !11
  %66 = load i64, ptr %11, align 8, !tbaa !9
  %67 = mul i64 %65, %66
  %68 = getelementptr inbounds i8, ptr %63, i64 %67
  store ptr %68, ptr %12, align 8, !tbaa !5
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.android::VectorImpl", ptr %17, i32 0, i32 4
  %71 = load i64, ptr %70, align 8, !tbaa !11
  %72 = load i64, ptr %11, align 8, !tbaa !9
  %73 = sub nsw i64 %72, 1
  %74 = mul i64 %71, %73
  %75 = getelementptr inbounds i8, ptr %69, i64 %74
  store ptr %75, ptr %13, align 8, !tbaa !5
  br label %78

76:                                               ; preds = %47
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNK7android10VectorImpl11_do_destroyEPvm(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef %77, i64 noundef 1)
  br label %78

78:                                               ; preds = %76, %62
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZNK7android10VectorImpl8_do_copyEPvPKvm(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef %79, ptr noundef %80, i64 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %81 = load i64, ptr %11, align 8, !tbaa !9
  %82 = sub nsw i64 %81, 1
  store i64 %82, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %"class.android::VectorImpl", ptr %17, i32 0, i32 4
  %85 = load i64, ptr %84, align 8, !tbaa !11
  %86 = load i64, ptr %11, align 8, !tbaa !9
  %87 = mul i64 %85, %86
  %88 = getelementptr inbounds i8, ptr %83, i64 %87
  store ptr %88, ptr %16, align 8, !tbaa !5
  br label %89

89:                                               ; preds = %116, %78
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZNK7android10VectorImpl11_do_destroyEPvm(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef %90, i64 noundef 1)
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZNK7android10VectorImpl8_do_copyEPvPKvm(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef %91, ptr noundef %92, i64 noundef 1)
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %93, ptr %16, align 8, !tbaa !5
  %94 = load i64, ptr %15, align 8, !tbaa !9
  %95 = add nsw i64 %94, -1
  store i64 %95, ptr %15, align 8, !tbaa !9
  store ptr null, ptr %13, align 8, !tbaa !5
  %96 = load i64, ptr %15, align 8, !tbaa !9
  %97 = icmp sge i64 %96, 0
  br i1 %97, label %98, label %105

98:                                               ; preds = %89
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = getelementptr inbounds %"class.android::VectorImpl", ptr %17, i32 0, i32 4
  %101 = load i64, ptr %100, align 8, !tbaa !11
  %102 = load i64, ptr %15, align 8, !tbaa !9
  %103 = mul i64 %101, %102
  %104 = getelementptr inbounds i8, ptr %99, i64 %103
  store ptr %104, ptr %13, align 8, !tbaa !5
  br label %105

105:                                              ; preds = %98, %89
  br label %106

106:                                              ; preds = %105
  %107 = load i64, ptr %15, align 8, !tbaa !9
  %108 = icmp sge i64 %107, 0
  br i1 %108, label %109, label %116

109:                                              ; preds = %106
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = call noundef i32 %110(ptr noundef %111, ptr noundef %112, ptr noundef %113)
  %115 = icmp sgt i32 %114, 0
  br label %116

116:                                              ; preds = %109, %106
  %117 = phi i1 [ false, %106 ], [ %115, %109 ]
  br i1 %117, label %89, label %118, !llvm.loop !14

118:                                              ; preds = %116
  %119 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZNK7android10VectorImpl11_do_destroyEPvm(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef %119, i64 noundef 1)
  %120 = load ptr, ptr %16, align 8, !tbaa !5
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNK7android10VectorImpl8_do_copyEPvPKvm(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef %120, ptr noundef %121, i64 noundef 1)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %122

122:                                              ; preds = %118, %27
  %123 = load i64, ptr %11, align 8, !tbaa !9
  %124 = add nsw i64 %123, 1
  store i64 %124, ptr %11, align 8, !tbaa !9
  store i32 0, ptr %14, align 4
  br label %125

125:                                              ; preds = %122, %61, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %126 = load i32, ptr %14, align 4
  switch i32 %126, label %135 [
    i32 0, label %127
  ]

127:                                              ; preds = %125
  br label %23, !llvm.loop !16

128:                                              ; preds = %23
  %129 = load ptr, ptr %10, align 8, !tbaa !5
  %130 = icmp ne ptr %129, null
  br i1 %130, label %131, label %134

131:                                              ; preds = %128
  %132 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNK7android10VectorImpl11_do_destroyEPvm(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef %132, i64 noundef 1)
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %133) #6
  br label %134

134:                                              ; preds = %131, %128
  store i32 0, ptr %14, align 4
  br label %135

135:                                              ; preds = %134, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %136 = load i32, ptr %14, align 4
  switch i32 %136, label %139 [
    i32 0, label %137
  ]

137:                                              ; preds = %135
  br label %138

138:                                              ; preds = %137, %3
  store i32 0, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %139

139:                                              ; preds = %138, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %140 = load i32, ptr %4, align 4
  ret i32 %140
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7android10VectorImpl11_do_destroyEPvm(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i64 noundef) #2 align 2

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

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

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"_ZTSN7android10VectorImplE", !6, i64 8, !10, i64 16, !13, i64 24, !10, i64 32}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; 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"

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7android10VectorImpl8_do_copyEPvPKvm(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7android10VectorImpl4sortEPFiPKvS2_PvES3_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr nocapture noundef readonly %1, ptr noundef %2) local_unnamed_addr #0 align 2 {
  %4 = tail call noundef i64 @_ZNK7android10VectorImpl4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  %5 = icmp sgt i64 %4, 1
  br i1 %5, label %6, label %.thread82

6:                                                ; preds = %3
  %7 = tail call noundef ptr @_ZNK7android10VectorImpl9arrayImplEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  %8 = getelementptr inbounds i8, ptr %0, i64 32
  br label %9

9:                                                ; preds = %6, %43
  %.05386 = phi i64 [ 1, %6 ], [ %44, %43 ]
  %.05585 = phi ptr [ null, %6 ], [ %.257, %43 ]
  %.05884 = phi ptr [ %7, %6 ], [ %.260, %43 ]
  %10 = load i64, ptr %8, align 8, !tbaa !5
  %11 = mul i64 %10, %.05386
  %12 = getelementptr inbounds i8, ptr %.05884, i64 %11
  %13 = add nsw i64 %.05386, -1
  %14 = mul i64 %10, %13
  %15 = getelementptr inbounds i8, ptr %.05884, i64 %14
  %16 = tail call noundef i32 %1(ptr noundef %15, ptr noundef %12, ptr noundef %2)
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %18, label %43

18:                                               ; preds = %9
  %.not73 = icmp eq ptr %.05585, null
  br i1 %.not73, label %19, label %29

19:                                               ; preds = %18
  %20 = tail call noundef ptr @_ZN7android10VectorImpl13editArrayImplEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  %.not74 = icmp eq ptr %20, null
  br i1 %.not74, label %.thread82, label %21

21:                                               ; preds = %19
  %22 = load i64, ptr %8, align 8, !tbaa !5
  %23 = tail call noalias ptr @malloc(i64 noundef %22) #5
  %.not75 = icmp eq ptr %23, null
  br i1 %.not75, label %.thread82, label %24

24:                                               ; preds = %21
  %25 = mul i64 %22, %.05386
  %26 = getelementptr inbounds i8, ptr %20, i64 %25
  %27 = mul i64 %22, %13
  %28 = getelementptr inbounds i8, ptr %20, i64 %27
  br label %30

29:                                               ; preds = %18
  tail call void @_ZNK7android10VectorImpl11_do_destroyEPvm(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull %.05585, i64 noundef 1)
  br label %30

30:                                               ; preds = %29, %24
  %.159 = phi ptr [ %.05884, %29 ], [ %20, %24 ]
  %.156 = phi ptr [ %.05585, %29 ], [ %23, %24 ]
  %.052 = phi ptr [ %12, %29 ], [ %26, %24 ]
  %.050 = phi ptr [ %15, %29 ], [ %28, %24 ]
  tail call void @_ZNK7android10VectorImpl8_do_copyEPvPKvm(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull %.156, ptr noundef %.052, i64 noundef 1)
  %31 = load i64, ptr %8, align 8, !tbaa !5
  %32 = mul i64 %31, %.05386
  %33 = getelementptr inbounds i8, ptr %.159, i64 %32
  br label %34

34:                                               ; preds = %36, %30
  %.151 = phi ptr [ %.050, %30 ], [ %40, %36 ]
  %.048 = phi i64 [ %13, %30 ], [ %38, %36 ]
  %.0 = phi ptr [ %33, %30 ], [ %.151, %36 ]
  tail call void @_ZNK7android10VectorImpl11_do_destroyEPvm(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %.0, i64 noundef 1)
  tail call void @_ZNK7android10VectorImpl8_do_copyEPvPKvm(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %.0, ptr noundef %.151, i64 noundef 1)
  %35 = icmp sgt i64 %.048, 0
  br i1 %35, label %36, label %.critedge

36:                                               ; preds = %34
  %37 = load i64, ptr %8, align 8
  %38 = add nsw i64 %.048, -1
  %39 = mul i64 %37, %38
  %40 = getelementptr inbounds i8, ptr %.159, i64 %39
  %41 = tail call noundef i32 %1(ptr noundef %40, ptr noundef nonnull %.156, ptr noundef %2)
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %34, label %.critedge, !llvm.loop !12

.critedge:                                        ; preds = %34, %36
  tail call void @_ZNK7android10VectorImpl11_do_destroyEPvm(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %.151, i64 noundef 1)
  tail call void @_ZNK7android10VectorImpl8_do_copyEPvPKvm(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %.151, ptr noundef nonnull %.156, i64 noundef 1)
  br label %43

43:                                               ; preds = %9, %.critedge
  %.260 = phi ptr [ %.159, %.critedge ], [ %.05884, %9 ]
  %.257 = phi ptr [ %.156, %.critedge ], [ %.05585, %9 ]
  %44 = add nuw nsw i64 %.05386, 1
  %exitcond.not = icmp eq i64 %44, %4
  br i1 %exitcond.not, label %45, label %9, !llvm.loop !14

45:                                               ; preds = %43
  %.not = icmp eq ptr %.257, null
  br i1 %.not, label %.thread82, label %46

46:                                               ; preds = %45
  tail call void @_ZNK7android10VectorImpl11_do_destroyEPvm(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull %.257, i64 noundef 1)
  tail call void @free(ptr noundef nonnull %.257) #6
  br label %.thread82

.thread82:                                        ; preds = %21, %19, %46, %45, %3
  %.365 = phi i32 [ 0, %3 ], [ 0, %45 ], [ 0, %46 ], [ -12, %19 ], [ -12, %21 ]
  ret i32 %.365
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7android10VectorImpl11_do_destroyEPvm(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 allocsize(0) }
attributes #6 = { 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 32}
!6 = !{!"_ZTSN7android10VectorImplE", !7, i64 8, !10, i64 16, !11, i64 24, !10, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


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