; LLVM IR from sgtlaugh/algovault :: code_library/hunt_szymanski.ll (Z3lcsPcS_)

; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@ar = external dso_local global [50010 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z3lcsPcS_(ptr noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [256 x %"class.std::vector"], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 6144, ptr %6) #5
  %15 = getelementptr inbounds [256 x %"class.std::vector"], ptr %6, i32 0, i32 0
  %16 = getelementptr inbounds %"class.std::vector", ptr %15, i64 256
  br label %17

17:                                               ; preds = %17, %2
  %18 = phi ptr [ %15, %2 ], [ %19, %17 ]
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  %19 = getelementptr inbounds %"class.std::vector", ptr %18, i64 1
  %20 = icmp eq ptr %19, %16
  br i1 %20, label %21, label %17

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = call i64 @strlen(ptr noundef %22) #6
  %24 = trunc i64 %23 to i32
  store i32 %24, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = call i64 @strlen(ptr noundef %25) #6
  %27 = trunc i64 %26 to i32
  store i32 %27, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %42, %21
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = load i32, ptr %11, align 4, !tbaa !9
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %32, label %49

32:                                               ; preds = %28
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i8, ptr %33, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !11
  %38 = sext i8 %37 to i32
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [256 x %"class.std::vector"], ptr %6, i64 0, i64 %39
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %41 unwind label %45

41:                                               ; preds = %32
  br label %42

42:                                               ; preds = %41
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %7, align 4, !tbaa !9
  br label %28, !llvm.loop !12

45:                                               ; preds = %32
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %12, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %13, align 4
  br label %127

49:                                               ; preds = %28
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %9, align 4, !tbaa !9
  %52 = sext i32 %50 to i64
  %53 = getelementptr inbounds [50010 x i32], ptr @ar, i64 0, i64 %52
  store i32 -1, ptr %53, align 4, !tbaa !9
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %119, %49
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = load i32, ptr %10, align 4, !tbaa !9
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %58, label %122

58:                                               ; preds = %54
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = load i32, ptr %7, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i8, ptr %59, i64 %61
  %63 = load i8, ptr %62, align 1, !tbaa !11
  %64 = sext i8 %63 to i32
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [256 x %"class.std::vector"], ptr %6, i64 0, i64 %65
  %67 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #5
  %68 = trunc i64 %67 to i32
  %69 = sub nsw i32 %68, 1
  store i32 %69, ptr %8, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %115, %58
  %71 = load i32, ptr %8, align 4, !tbaa !9
  %72 = icmp sge i32 %71, 0
  br i1 %72, label %73, label %118

73:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = load i32, ptr %7, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds i8, ptr %74, i64 %76
  %78 = load i8, ptr %77, align 1, !tbaa !11
  %79 = sext i8 %78 to i32
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [256 x %"class.std::vector"], ptr %6, i64 0, i64 %80
  %82 = load i32, ptr %8, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83) #5
  %85 = load i32, ptr %84, align 4, !tbaa !9
  store i32 %85, ptr %14, align 4, !tbaa !9
  %86 = load i32, ptr %14, align 4, !tbaa !9
  %87 = load i32, ptr %9, align 4, !tbaa !9
  %88 = sub nsw i32 %87, 1
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [50010 x i32], ptr @ar, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !9
  %92 = icmp sgt i32 %86, %91
  br i1 %92, label %93, label %99

93:                                               ; preds = %73
  %94 = load i32, ptr %14, align 4, !tbaa !9
  %95 = load i32, ptr %9, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %9, align 4, !tbaa !9
  %97 = sext i32 %95 to i64
  %98 = getelementptr inbounds [50010 x i32], ptr @ar, i64 0, i64 %97
  store i32 %94, ptr %98, align 4, !tbaa !9
  br label %114

99:                                               ; preds = %73
  %100 = load i32, ptr %14, align 4, !tbaa !9
  %101 = load i32, ptr %9, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i32, ptr @ar, i64 %102
  %104 = invoke noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef @ar, ptr noundef %103, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %105 unwind label %110

105:                                              ; preds = %99
  %106 = ptrtoint ptr %104 to i64
  %107 = sub i64 %106, ptrtoint (ptr @ar to i64)
  %108 = sdiv exact i64 %107, 4
  %109 = getelementptr inbounds [50010 x i32], ptr @ar, i64 0, i64 %108
  store i32 %100, ptr %109, align 4, !tbaa !9
  br label %114

110:                                              ; preds = %99
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %12, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %127

114:                                              ; preds = %105, %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %8, align 4, !tbaa !9
  %117 = add nsw i32 %116, -1
  store i32 %117, ptr %8, align 4, !tbaa !9
  br label %70, !llvm.loop !14

118:                                              ; preds = %70
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %7, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %7, align 4, !tbaa !9
  br label %54, !llvm.loop !15

122:                                              ; preds = %54
  %123 = load i32, ptr %9, align 4, !tbaa !9
  %124 = sub nsw i32 %123, 1
  store i32 %124, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  %125 = getelementptr inbounds [256 x %"class.std::vector"], ptr %6, i32 0, i32 0
  %126 = getelementptr inbounds %"class.std::vector", ptr %125, i64 256
  br label %130

127:                                              ; preds = %110, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  %128 = getelementptr inbounds [256 x %"class.std::vector"], ptr %6, i32 0, i32 0
  %129 = getelementptr inbounds %"class.std::vector", ptr %128, i64 256
  br label %136

130:                                              ; preds = %130, %122
  %131 = phi ptr [ %126, %122 ], [ %132, %130 ]
  %132 = getelementptr inbounds %"class.std::vector", ptr %131, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %132) #5
  %133 = icmp eq ptr %132, %125
  br i1 %133, label %134, label %130

134:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 6144, ptr %6) #5
  %135 = load i32, ptr %3, align 4
  ret i32 %135

136:                                              ; preds = %136, %127
  %137 = phi ptr [ %129, %127 ], [ %138, %136 ]
  %138 = getelementptr inbounds %"class.std::vector", ptr %137, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %138) #5
  %139 = icmp eq ptr %138, %128
  br i1 %139, label %140, label %136

140:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 6144, ptr %6) #5
  br label %141

141:                                              ; preds = %140
  %142 = load ptr, ptr %12, align 8
  %143 = load i32, ptr %13, align 4
  %144 = insertvalue { ptr, i32 } poison, ptr %142, 0
  %145 = insertvalue { ptr, i32 } %144, i32 %143, 1
  resume { ptr, i32 } %145
}

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #4

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

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

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

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


; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@ar = external dso_local global [50010 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -2147483648, 2147483647) i32 @_Z3lcsPcS_(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca [256 x %"class.std::vector"], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 6144, ptr nonnull %3) #5
  br label %6

6:                                                ; preds = %6, %2
  %.idx = phi i64 [ 0, %2 ], [ %.add, %6 ]
  %.ptr = getelementptr inbounds i8, ptr %3, i64 %.idx
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr) #5
  %.add = add nuw nsw i64 %.idx, 24
  %7 = icmp eq i64 %.add, 6144
  br i1 %7, label %8, label %6

8:                                                ; preds = %6
  %9 = getelementptr inbounds i8, ptr %3, i64 6144
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %10 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %0) #6
  %11 = trunc i64 %10 to i32
  %12 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #6
  %13 = trunc i64 %12 to i32
  store i32 0, ptr %4, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %8, %20
  %storemerge32 = phi i32 [ %22, %20 ], [ 0, %8 ]
  %15 = sext i32 %storemerge32 to i64
  %16 = getelementptr inbounds i8, ptr %1, i64 %15
  %17 = load i8, ptr %16, align 1, !tbaa !9
  %18 = sext i8 %17 to i64
  %19 = getelementptr inbounds [256 x %"class.std::vector"], ptr %3, i64 0, i64 %18
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %20 unwind label %24

20:                                               ; preds = %.lr.ph
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %4, align 4, !tbaa !5
  %23 = icmp slt i32 %22, %13
  br i1 %23, label %.lr.ph, label %._crit_edge, !llvm.loop !10

24:                                               ; preds = %.lr.ph
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %69

._crit_edge:                                      ; preds = %20, %8
  store i32 -1, ptr @ar, align 16, !tbaa !5
  store i32 0, ptr %4, align 4, !tbaa !5
  %26 = icmp sgt i32 %11, 0
  br i1 %26, label %.lr.ph42, label %._crit_edge43

.lr.ph42:                                         ; preds = %._crit_edge, %._crit_edge38
  %.01940 = phi i32 [ %.1.lcssa, %._crit_edge38 ], [ 1, %._crit_edge ]
  %storemerge2839 = phi i32 [ %66, %._crit_edge38 ], [ 0, %._crit_edge ]
  %27 = sext i32 %storemerge2839 to i64
  %28 = getelementptr inbounds i8, ptr %0, i64 %27
  %29 = load i8, ptr %28, align 1, !tbaa !9
  %30 = sext i8 %29 to i64
  %31 = getelementptr inbounds [256 x %"class.std::vector"], ptr %3, i64 0, i64 %30
  %32 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  %33 = trunc i64 %32 to i32
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph37.preheader, label %._crit_edge38

.lr.ph37.preheader:                               ; preds = %.lr.ph42
  %35 = and i64 %32, 2147483647
  br label %.lr.ph37

.lr.ph37:                                         ; preds = %.lr.ph37.preheader, %62
  %indvars.iv = phi i64 [ %35, %.lr.ph37.preheader ], [ %indvars.iv.next, %62 ]
  %.134 = phi i32 [ %.01940, %.lr.ph37.preheader ], [ %.2, %62 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds i8, ptr %0, i64 %37
  %39 = load i8, ptr %38, align 1, !tbaa !9
  %40 = sext i8 %39 to i64
  %41 = getelementptr inbounds [256 x %"class.std::vector"], ptr %3, i64 0, i64 %40
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %indvars.iv.next) #5
  %43 = load i32, ptr %42, align 4, !tbaa !5
  store i32 %43, ptr %5, align 4, !tbaa !5
  %44 = add nsw i32 %.134, -1
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [50010 x i32], ptr @ar, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = icmp sgt i32 %43, %47
  br i1 %48, label %49, label %52

49:                                               ; preds = %.lr.ph37
  %50 = add nsw i32 %.134, 1
  %51 = sext i32 %.134 to i64
  br label %62

52:                                               ; preds = %.lr.ph37
  %53 = sext i32 %.134 to i64
  %54 = getelementptr inbounds i32, ptr @ar, i64 %53
  %55 = invoke noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull @ar, ptr noundef nonnull %54, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %56 unwind label %60

56:                                               ; preds = %52
  %57 = ptrtoint ptr %55 to i64
  %58 = sub i64 %57, ptrtoint (ptr @ar to i64)
  %59 = ashr exact i64 %58, 2
  br label %62

60:                                               ; preds = %52
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %69

62:                                               ; preds = %56, %49
  %.sink46 = phi i64 [ %59, %56 ], [ %51, %49 ]
  %.2 = phi i32 [ %.134, %56 ], [ %50, %49 ]
  %63 = getelementptr inbounds [50010 x i32], ptr @ar, i64 0, i64 %.sink46
  store i32 %43, ptr %63, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %64 = icmp ugt i64 %indvars.iv, 1
  br i1 %64, label %.lr.ph37, label %._crit_edge38, !llvm.loop !12

._crit_edge38:                                    ; preds = %62, %.lr.ph42
  %.1.lcssa = phi i32 [ %.01940, %.lr.ph42 ], [ %.2, %62 ]
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %4, align 4, !tbaa !5
  %67 = icmp slt i32 %66, %11
  br i1 %67, label %.lr.ph42, label %._crit_edge43.loopexit, !llvm.loop !13

._crit_edge43.loopexit:                           ; preds = %._crit_edge38
  %68 = add nsw i32 %.1.lcssa, -1
  br label %._crit_edge43

._crit_edge43:                                    ; preds = %._crit_edge43.loopexit, %._crit_edge
  %.019.lcssa = phi i32 [ 0, %._crit_edge ], [ %68, %._crit_edge43.loopexit ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %70

69:                                               ; preds = %60, %24
  %.pn = phi { ptr, i32 } [ %25, %24 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %75

70:                                               ; preds = %70, %._crit_edge43
  %71 = phi ptr [ %9, %._crit_edge43 ], [ %72, %70 ]
  %72 = getelementptr inbounds i8, ptr %71, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %72) #5
  %73 = icmp eq ptr %72, %3
  br i1 %73, label %74, label %70

74:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 6144, ptr nonnull %3) #5
  ret i32 %.019.lcssa

75:                                               ; preds = %75, %69
  %76 = phi ptr [ %9, %69 ], [ %77, %75 ]
  %77 = getelementptr inbounds i8, ptr %76, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %77) #5
  %78 = icmp eq ptr %77, %3
  br i1 %78, label %79, label %75

79:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 6144, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

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

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

!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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}


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