; LLVM IR from brpapa/algorithms :: solutions/spoj/PL.ll/Z10ehPossivelNSt7 (cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)

; 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 }
%"class.std::allocator.0" = type { i8 }

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z10ehPossivelNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::allocator.0", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #3
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 26, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %13 unwind label %20

13:                                               ; preds = %1
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %36, %13
  %15 = load i32, ptr %9, align 4, !tbaa !9
  %16 = sext i32 %15 to i64
  %17 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  %18 = icmp ult i64 %16, %17
  br i1 %18, label %24, label %19

19:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %43

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

24:                                               ; preds = %14
  %25 = load i32, ptr %9, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %26)
          to label %28 unwind label %39

28:                                               ; preds = %24
  %29 = load i8, ptr %27, align 1, !tbaa !11
  %30 = sext i8 %29 to i32
  %31 = sub nsw i32 %30, 97
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %32) #3
  %34 = load i32, ptr %33, align 4, !tbaa !9
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %33, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %28
  %37 = load i32, ptr %9, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %9, align 4, !tbaa !9
  br label %14, !llvm.loop !12

39:                                               ; preds = %24
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %7, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  br label %71

43:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %63, %43
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = icmp slt i32 %45, 26
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  store i32 5, ptr %12, align 4
  br label %66

48:                                               ; preds = %44
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %50) #3
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = srem i32 %52, 2
  %54 = icmp eq i32 %53, 1
  br i1 %54, label %55, label %58

55:                                               ; preds = %48
  %56 = load i32, ptr %10, align 4, !tbaa !9
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %10, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %55, %48
  %59 = load i32, ptr %10, align 4, !tbaa !9
  %60 = icmp eq i32 %59, 2
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %66

62:                                               ; preds = %58
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr %11, align 4, !tbaa !9
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %11, align 4, !tbaa !9
  br label %44, !llvm.loop !14

66:                                               ; preds = %61, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  %67 = load i32, ptr %12, align 4
  switch i32 %67, label %69 [
    i32 5, label %68
  ]

68:                                               ; preds = %66
  store i32 1, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %69

69:                                               ; preds = %68, %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #3
  %70 = load i32, ptr %2, align 4
  ret i32 %70

71:                                               ; preds = %39, %20
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #3
  br label %72

72:                                               ; preds = %71
  %73 = load ptr, ptr %7, align 8
  %74 = load i32, ptr %8, align 4
  %75 = insertvalue { ptr, i32 } poison, ptr %73, 0
  %76 = insertvalue { ptr, i32 } %75, i32 %74, 1
  resume { ptr, i32 } %76
}

; 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 @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

; 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 noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #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: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 }

!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}


; 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 }
%"class.std::allocator.0" = type { i8 }

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -1, 2) i32 @_Z10ehPossivelNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::allocator.0", align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #3
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 26, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %5 unwind label %7

5:                                                ; preds = %1
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  %6 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  %.not = icmp eq i64 %6, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

7:                                                ; preds = %1
  %8 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  resume { ptr, i32 } %8

.lr.ph:                                           ; preds = %5, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %5 ]
  %9 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %indvars.iv)
  %10 = load i8, ptr %9, align 1, !tbaa !9
  %11 = sext i8 %10 to i64
  %12 = add nsw i64 %11, -97
  %13 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %12) #3
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = add nsw i32 %14, 1
  store i32 %15, ptr %13, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  %17 = icmp ugt i64 %16, %indvars.iv.next
  br i1 %17, label %.lr.ph, label %.loopexit, !llvm.loop !10

.loopexit:                                        ; preds = %.lr.ph, %5
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = and i32 %19, -2147483647
  %21 = icmp eq i32 %20, 1
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 1) #3
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = and i32 %23, -2147483647
  %25 = icmp eq i32 %24, 1
  %26 = and i1 %21, %25
  br i1 %26, label %197, label %27

27:                                               ; preds = %.loopexit
  %28 = zext i1 %21 to i32
  %29 = zext i1 %25 to i32
  %spec.select.1 = add nuw nsw i32 %28, %29
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 2) #3
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = and i32 %31, -2147483647
  %33 = icmp eq i32 %32, 1
  %34 = zext i1 %33 to i32
  %spec.select.2 = add nuw nsw i32 %spec.select.1, %34
  %35 = icmp eq i32 %spec.select.2, 2
  br i1 %35, label %197, label %36

36:                                               ; preds = %27
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 3) #3
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = and i32 %38, -2147483647
  %40 = icmp eq i32 %39, 1
  %41 = zext i1 %40 to i32
  %spec.select.3 = add nuw nsw i32 %spec.select.2, %41
  %42 = icmp eq i32 %spec.select.3, 2
  br i1 %42, label %197, label %43

43:                                               ; preds = %36
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 4) #3
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = and i32 %45, -2147483647
  %47 = icmp eq i32 %46, 1
  %48 = zext i1 %47 to i32
  %spec.select.4 = add nuw nsw i32 %spec.select.3, %48
  %49 = icmp eq i32 %spec.select.4, 2
  br i1 %49, label %197, label %50

50:                                               ; preds = %43
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 5) #3
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = and i32 %52, -2147483647
  %54 = icmp eq i32 %53, 1
  %55 = zext i1 %54 to i32
  %spec.select.5 = add nuw nsw i32 %spec.select.4, %55
  %56 = icmp eq i32 %spec.select.5, 2
  br i1 %56, label %197, label %57

57:                                               ; preds = %50
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 6) #3
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = and i32 %59, -2147483647
  %61 = icmp eq i32 %60, 1
  %62 = zext i1 %61 to i32
  %spec.select.6 = add nuw nsw i32 %spec.select.5, %62
  %63 = icmp eq i32 %spec.select.6, 2
  br i1 %63, label %197, label %64

64:                                               ; preds = %57
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 7) #3
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = and i32 %66, -2147483647
  %68 = icmp eq i32 %67, 1
  %69 = zext i1 %68 to i32
  %spec.select.7 = add nuw nsw i32 %spec.select.6, %69
  %70 = icmp eq i32 %spec.select.7, 2
  br i1 %70, label %197, label %71

71:                                               ; preds = %64
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 8) #3
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = and i32 %73, -2147483647
  %75 = icmp eq i32 %74, 1
  %76 = zext i1 %75 to i32
  %spec.select.8 = add nuw nsw i32 %spec.select.7, %76
  %77 = icmp eq i32 %spec.select.8, 2
  br i1 %77, label %197, label %78

78:                                               ; preds = %71
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 9) #3
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = and i32 %80, -2147483647
  %82 = icmp eq i32 %81, 1
  %83 = zext i1 %82 to i32
  %spec.select.9 = add nuw nsw i32 %spec.select.8, %83
  %84 = icmp eq i32 %spec.select.9, 2
  br i1 %84, label %197, label %85

85:                                               ; preds = %78
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 10) #3
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = and i32 %87, -2147483647
  %89 = icmp eq i32 %88, 1
  %90 = zext i1 %89 to i32
  %spec.select.10 = add nuw nsw i32 %spec.select.9, %90
  %91 = icmp eq i32 %spec.select.10, 2
  br i1 %91, label %197, label %92

92:                                               ; preds = %85
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 11) #3
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = and i32 %94, -2147483647
  %96 = icmp eq i32 %95, 1
  %97 = zext i1 %96 to i32
  %spec.select.11 = add nuw nsw i32 %spec.select.10, %97
  %98 = icmp eq i32 %spec.select.11, 2
  br i1 %98, label %197, label %99

99:                                               ; preds = %92
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 12) #3
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = and i32 %101, -2147483647
  %103 = icmp eq i32 %102, 1
  %104 = zext i1 %103 to i32
  %spec.select.12 = add nuw nsw i32 %spec.select.11, %104
  %105 = icmp eq i32 %spec.select.12, 2
  br i1 %105, label %197, label %106

106:                                              ; preds = %99
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 13) #3
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = and i32 %108, -2147483647
  %110 = icmp eq i32 %109, 1
  %111 = zext i1 %110 to i32
  %spec.select.13 = add nuw nsw i32 %spec.select.12, %111
  %112 = icmp eq i32 %spec.select.13, 2
  br i1 %112, label %197, label %113

113:                                              ; preds = %106
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 14) #3
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = and i32 %115, -2147483647
  %117 = icmp eq i32 %116, 1
  %118 = zext i1 %117 to i32
  %spec.select.14 = add nuw nsw i32 %spec.select.13, %118
  %119 = icmp eq i32 %spec.select.14, 2
  br i1 %119, label %197, label %120

120:                                              ; preds = %113
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 15) #3
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = and i32 %122, -2147483647
  %124 = icmp eq i32 %123, 1
  %125 = zext i1 %124 to i32
  %spec.select.15 = add nuw nsw i32 %spec.select.14, %125
  %126 = icmp eq i32 %spec.select.15, 2
  br i1 %126, label %197, label %127

127:                                              ; preds = %120
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 16) #3
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = and i32 %129, -2147483647
  %131 = icmp eq i32 %130, 1
  %132 = zext i1 %131 to i32
  %spec.select.16 = add nuw nsw i32 %spec.select.15, %132
  %133 = icmp eq i32 %spec.select.16, 2
  br i1 %133, label %197, label %134

134:                                              ; preds = %127
  %135 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 17) #3
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = and i32 %136, -2147483647
  %138 = icmp eq i32 %137, 1
  %139 = zext i1 %138 to i32
  %spec.select.17 = add nuw nsw i32 %spec.select.16, %139
  %140 = icmp eq i32 %spec.select.17, 2
  br i1 %140, label %197, label %141

141:                                              ; preds = %134
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 18) #3
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = and i32 %143, -2147483647
  %145 = icmp eq i32 %144, 1
  %146 = zext i1 %145 to i32
  %spec.select.18 = add nuw nsw i32 %spec.select.17, %146
  %147 = icmp eq i32 %spec.select.18, 2
  br i1 %147, label %197, label %148

148:                                              ; preds = %141
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 19) #3
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = and i32 %150, -2147483647
  %152 = icmp eq i32 %151, 1
  %153 = zext i1 %152 to i32
  %spec.select.19 = add nuw nsw i32 %spec.select.18, %153
  %154 = icmp eq i32 %spec.select.19, 2
  br i1 %154, label %197, label %155

155:                                              ; preds = %148
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 20) #3
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = and i32 %157, -2147483647
  %159 = icmp eq i32 %158, 1
  %160 = zext i1 %159 to i32
  %spec.select.20 = add nuw nsw i32 %spec.select.19, %160
  %161 = icmp eq i32 %spec.select.20, 2
  br i1 %161, label %197, label %162

162:                                              ; preds = %155
  %163 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 21) #3
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = and i32 %164, -2147483647
  %166 = icmp eq i32 %165, 1
  %167 = zext i1 %166 to i32
  %spec.select.21 = add nuw nsw i32 %spec.select.20, %167
  %168 = icmp eq i32 %spec.select.21, 2
  br i1 %168, label %197, label %169

169:                                              ; preds = %162
  %170 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 22) #3
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = and i32 %171, -2147483647
  %173 = icmp eq i32 %172, 1
  %174 = zext i1 %173 to i32
  %spec.select.22 = add nuw nsw i32 %spec.select.21, %174
  %175 = icmp eq i32 %spec.select.22, 2
  br i1 %175, label %197, label %176

176:                                              ; preds = %169
  %177 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 23) #3
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = and i32 %178, -2147483647
  %180 = icmp eq i32 %179, 1
  %181 = zext i1 %180 to i32
  %spec.select.23 = add nuw nsw i32 %spec.select.22, %181
  %182 = icmp eq i32 %spec.select.23, 2
  br i1 %182, label %197, label %183

183:                                              ; preds = %176
  %184 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 24) #3
  %185 = load i32, ptr %184, align 4, !tbaa !5
  %186 = and i32 %185, -2147483647
  %187 = icmp eq i32 %186, 1
  %188 = zext i1 %187 to i32
  %spec.select.24 = add nuw nsw i32 %spec.select.23, %188
  %189 = icmp eq i32 %spec.select.24, 2
  br i1 %189, label %197, label %190

190:                                              ; preds = %183
  %191 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 25) #3
  %192 = load i32, ptr %191, align 4, !tbaa !5
  %193 = and i32 %192, -2147483647
  %194 = icmp eq i32 %193, 1
  %195 = zext i1 %194 to i32
  %spec.select.25 = add nuw nsw i32 %spec.select.24, %195
  %196 = icmp eq i32 %spec.select.25, 2
  %spec.select = select i1 %196, i32 -1, i32 1
  br label %197

197:                                              ; preds = %190, %183, %176, %169, %162, %155, %148, %141, %134, %127, %120, %113, %106, %99, %92, %85, %78, %71, %64, %57, %50, %43, %36, %27, %.loopexit
  %spec.select17 = phi i32 [ -1, %.loopexit ], [ -1, %27 ], [ -1, %36 ], [ -1, %43 ], [ -1, %50 ], [ -1, %57 ], [ -1, %64 ], [ -1, %71 ], [ -1, %78 ], [ -1, %85 ], [ -1, %92 ], [ -1, %99 ], [ -1, %106 ], [ -1, %113 ], [ -1, %120 ], [ -1, %127 ], [ -1, %134 ], [ -1, %141 ], [ -1, %148 ], [ -1, %155 ], [ -1, %162 ], [ -1, %169 ], [ -1, %176 ], [ -1, %183 ], [ %spec.select, %190 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  ret i32 %spec.select17
}

; 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 @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

; 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 noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) 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: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { 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 = !{!"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"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass