; LLVM IR from Leet-Us-Code/DSA-A-Z-Practice :: Sid's Levels/Level - 3/Sliding Window (Smallest Distinct Window)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14smallestWindowNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [256 x i32], align 16
  %6 = alloca [256 x i32], 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 i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %5) #4
  call void @llvm.memset.p0.i64(ptr align 16 %5, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 1024, ptr %6) #4
  call void @llvm.memset.p0.i64(ptr align 16 %6, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %34, %2
  %22 = load i32, ptr %8, align 4, !tbaa !9
  %23 = sext i32 %22 to i64
  %24 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  %25 = icmp ult i64 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %37

27:                                               ; preds = %21
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %29)
  %31 = load i8, ptr %30, align 1, !tbaa !11
  %32 = sext i8 %31 to i64
  %33 = getelementptr inbounds [256 x i32], ptr %5, i64 0, i64 %32
  store i32 1, ptr %33, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %27
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %8, align 4, !tbaa !9
  br label %21, !llvm.loop !12

37:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %52, %37
  %39 = load i32, ptr %9, align 4, !tbaa !9
  %40 = icmp slt i32 %39, 256
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %55

42:                                               ; preds = %38
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [256 x i32], ptr %5, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %51

48:                                               ; preds = %42
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %7, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %48, %42
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %9, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %9, align 4, !tbaa !9
  br label %38, !llvm.loop !14

55:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 -1, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 2147483647, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %118, %55
  %57 = load i32, ptr %14, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  %60 = icmp ult i64 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %121

62:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  %63 = load i32, ptr %14, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %64)
  %66 = load i8, ptr %65, align 1, !tbaa !11
  store i8 %66, ptr %15, align 1, !tbaa !11
  %67 = load i8, ptr %15, align 1, !tbaa !11
  %68 = sext i8 %67 to i64
  %69 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !9
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %75

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

75:                                               ; preds = %72, %62
  %76 = load i8, ptr %15, align 1, !tbaa !11
  %77 = sext i8 %76 to i64
  %78 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %78, align 4, !tbaa !9
  %81 = load i32, ptr %13, align 4, !tbaa !9
  %82 = load i32, ptr %7, align 4, !tbaa !9
  %83 = icmp eq i32 %81, %82
  br i1 %83, label %84, label %117

84:                                               ; preds = %75
  br label %85

85:                                               ; preds = %94, %84
  %86 = load i32, ptr %10, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %87)
  %89 = load i8, ptr %88, align 1, !tbaa !11
  %90 = sext i8 %89 to i64
  %91 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !9
  %93 = icmp sgt i32 %92, 1
  br i1 %93, label %94, label %105

94:                                               ; preds = %85
  %95 = load i32, ptr %10, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %96)
  %98 = load i8, ptr %97, align 1, !tbaa !11
  %99 = sext i8 %98 to i64
  %100 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !9
  %102 = add nsw i32 %101, -1
  store i32 %102, ptr %100, align 4, !tbaa !9
  %103 = load i32, ptr %10, align 4, !tbaa !9
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %10, align 4, !tbaa !9
  br label %85, !llvm.loop !15

105:                                              ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %106 = load i32, ptr %14, align 4, !tbaa !9
  %107 = load i32, ptr %10, align 4, !tbaa !9
  %108 = sub nsw i32 %106, %107
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %16, align 4, !tbaa !9
  %110 = load i32, ptr %16, align 4, !tbaa !9
  %111 = load i32, ptr %12, align 4, !tbaa !9
  %112 = icmp slt i32 %110, %111
  br i1 %112, label %113, label %116

113:                                              ; preds = %105
  %114 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %114, ptr %12, align 4, !tbaa !9
  %115 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %115, ptr %11, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %113, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %117

117:                                              ; preds = %116, %75
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %14, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %14, align 4, !tbaa !9
  br label %56, !llvm.loop !16

121:                                              ; preds = %61
  %122 = load i32, ptr %11, align 4, !tbaa !9
  %123 = icmp eq i32 %122, -1
  br i1 %123, label %124, label %130

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %125 unwind label %126

125:                                              ; preds = %124
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  store i32 1, ptr %20, align 4
  br label %135

126:                                              ; preds = %124
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %18, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %19, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %5) #4
  br label %136

130:                                              ; preds = %121
  %131 = load i32, ptr %11, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = load i32, ptr %12, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  call void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %132, i64 noundef %134)
  store i32 1, ptr %20, align 4
  br label %135

135:                                              ; preds = %130, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %5) #4
  ret void

136:                                              ; preds = %126
  %137 = load ptr, ptr %18, align 8
  %138 = load i32, ptr %19, align 4
  %139 = insertvalue { ptr, i32 } poison, ptr %137, 0
  %140 = insertvalue { ptr, i32 } %139, i32 %138, 1
  resume { ptr, i32 } %140
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #0 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: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 }

!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}
!16 = distinct !{!16, !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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14smallestWindowNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca [256 x i32], align 16
  %4 = alloca [256 x i32], align 16
  %5 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %3, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %4, i8 0, i64 1024, i1 false)
  %6 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %.not63 = icmp eq i64 %6, 0
  br i1 %.not63, label %vector.body, label %.lr.ph

vector.body:                                      ; preds = %2, %.lr.ph
  %7 = getelementptr inbounds i8, ptr %3, i64 16
  %wide.load = load <4 x i32>, ptr %3, align 16, !tbaa !5
  %wide.load78 = load <4 x i32>, ptr %7, align 16, !tbaa !5
  %8 = icmp ne <4 x i32> %wide.load, zeroinitializer
  %9 = icmp ne <4 x i32> %wide.load78, zeroinitializer
  %10 = zext <4 x i1> %8 to <4 x i32>
  %11 = zext <4 x i1> %9 to <4 x i32>
  %12 = getelementptr inbounds i8, ptr %3, i64 32
  %13 = getelementptr inbounds i8, ptr %3, i64 48
  %wide.load.1 = load <4 x i32>, ptr %12, align 16, !tbaa !5
  %wide.load78.1 = load <4 x i32>, ptr %13, align 16, !tbaa !5
  %14 = icmp ne <4 x i32> %wide.load.1, zeroinitializer
  %15 = icmp ne <4 x i32> %wide.load78.1, zeroinitializer
  %16 = zext <4 x i1> %14 to <4 x i32>
  %17 = zext <4 x i1> %15 to <4 x i32>
  %18 = add nuw nsw <4 x i32> %10, %16
  %19 = add nuw nsw <4 x i32> %11, %17
  %20 = getelementptr inbounds i8, ptr %3, i64 64
  %21 = getelementptr inbounds i8, ptr %3, i64 80
  %wide.load.2 = load <4 x i32>, ptr %20, align 16, !tbaa !5
  %wide.load78.2 = load <4 x i32>, ptr %21, align 16, !tbaa !5
  %22 = icmp ne <4 x i32> %wide.load.2, zeroinitializer
  %23 = icmp ne <4 x i32> %wide.load78.2, zeroinitializer
  %24 = zext <4 x i1> %22 to <4 x i32>
  %25 = zext <4 x i1> %23 to <4 x i32>
  %26 = add nuw nsw <4 x i32> %18, %24
  %27 = add nuw nsw <4 x i32> %19, %25
  %28 = getelementptr inbounds i8, ptr %3, i64 96
  %29 = getelementptr inbounds i8, ptr %3, i64 112
  %wide.load.3 = load <4 x i32>, ptr %28, align 16, !tbaa !5
  %wide.load78.3 = load <4 x i32>, ptr %29, align 16, !tbaa !5
  %30 = icmp ne <4 x i32> %wide.load.3, zeroinitializer
  %31 = icmp ne <4 x i32> %wide.load78.3, zeroinitializer
  %32 = zext <4 x i1> %30 to <4 x i32>
  %33 = zext <4 x i1> %31 to <4 x i32>
  %34 = add nuw nsw <4 x i32> %26, %32
  %35 = add nuw nsw <4 x i32> %27, %33
  %36 = getelementptr inbounds i8, ptr %3, i64 128
  %37 = getelementptr inbounds i8, ptr %3, i64 144
  %wide.load.4 = load <4 x i32>, ptr %36, align 16, !tbaa !5
  %wide.load78.4 = load <4 x i32>, ptr %37, align 16, !tbaa !5
  %38 = icmp ne <4 x i32> %wide.load.4, zeroinitializer
  %39 = icmp ne <4 x i32> %wide.load78.4, zeroinitializer
  %40 = zext <4 x i1> %38 to <4 x i32>
  %41 = zext <4 x i1> %39 to <4 x i32>
  %42 = add nuw nsw <4 x i32> %34, %40
  %43 = add nuw nsw <4 x i32> %35, %41
  %44 = getelementptr inbounds i8, ptr %3, i64 160
  %45 = getelementptr inbounds i8, ptr %3, i64 176
  %wide.load.5 = load <4 x i32>, ptr %44, align 16, !tbaa !5
  %wide.load78.5 = load <4 x i32>, ptr %45, align 16, !tbaa !5
  %46 = icmp ne <4 x i32> %wide.load.5, zeroinitializer
  %47 = icmp ne <4 x i32> %wide.load78.5, zeroinitializer
  %48 = zext <4 x i1> %46 to <4 x i32>
  %49 = zext <4 x i1> %47 to <4 x i32>
  %50 = add nuw nsw <4 x i32> %42, %48
  %51 = add nuw nsw <4 x i32> %43, %49
  %52 = getelementptr inbounds i8, ptr %3, i64 192
  %53 = getelementptr inbounds i8, ptr %3, i64 208
  %wide.load.6 = load <4 x i32>, ptr %52, align 16, !tbaa !5
  %wide.load78.6 = load <4 x i32>, ptr %53, align 16, !tbaa !5
  %54 = icmp ne <4 x i32> %wide.load.6, zeroinitializer
  %55 = icmp ne <4 x i32> %wide.load78.6, zeroinitializer
  %56 = zext <4 x i1> %54 to <4 x i32>
  %57 = zext <4 x i1> %55 to <4 x i32>
  %58 = add nuw nsw <4 x i32> %50, %56
  %59 = add nuw nsw <4 x i32> %51, %57
  %60 = getelementptr inbounds i8, ptr %3, i64 224
  %61 = getelementptr inbounds i8, ptr %3, i64 240
  %wide.load.7 = load <4 x i32>, ptr %60, align 16, !tbaa !5
  %wide.load78.7 = load <4 x i32>, ptr %61, align 16, !tbaa !5
  %62 = icmp ne <4 x i32> %wide.load.7, zeroinitializer
  %63 = icmp ne <4 x i32> %wide.load78.7, zeroinitializer
  %64 = zext <4 x i1> %62 to <4 x i32>
  %65 = zext <4 x i1> %63 to <4 x i32>
  %66 = add <4 x i32> %58, %64
  %67 = add <4 x i32> %59, %65
  %68 = getelementptr inbounds i8, ptr %3, i64 256
  %69 = getelementptr inbounds i8, ptr %3, i64 272
  %wide.load.8 = load <4 x i32>, ptr %68, align 16, !tbaa !5
  %wide.load78.8 = load <4 x i32>, ptr %69, align 16, !tbaa !5
  %70 = icmp ne <4 x i32> %wide.load.8, zeroinitializer
  %71 = icmp ne <4 x i32> %wide.load78.8, zeroinitializer
  %72 = zext <4 x i1> %70 to <4 x i32>
  %73 = zext <4 x i1> %71 to <4 x i32>
  %74 = add <4 x i32> %66, %72
  %75 = add <4 x i32> %67, %73
  %76 = getelementptr inbounds i8, ptr %3, i64 288
  %77 = getelementptr inbounds i8, ptr %3, i64 304
  %wide.load.9 = load <4 x i32>, ptr %76, align 16, !tbaa !5
  %wide.load78.9 = load <4 x i32>, ptr %77, align 16, !tbaa !5
  %78 = icmp ne <4 x i32> %wide.load.9, zeroinitializer
  %79 = icmp ne <4 x i32> %wide.load78.9, zeroinitializer
  %80 = zext <4 x i1> %78 to <4 x i32>
  %81 = zext <4 x i1> %79 to <4 x i32>
  %82 = add <4 x i32> %74, %80
  %83 = add <4 x i32> %75, %81
  %84 = getelementptr inbounds i8, ptr %3, i64 320
  %85 = getelementptr inbounds i8, ptr %3, i64 336
  %wide.load.10 = load <4 x i32>, ptr %84, align 16, !tbaa !5
  %wide.load78.10 = load <4 x i32>, ptr %85, align 16, !tbaa !5
  %86 = icmp ne <4 x i32> %wide.load.10, zeroinitializer
  %87 = icmp ne <4 x i32> %wide.load78.10, zeroinitializer
  %88 = zext <4 x i1> %86 to <4 x i32>
  %89 = zext <4 x i1> %87 to <4 x i32>
  %90 = add <4 x i32> %82, %88
  %91 = add <4 x i32> %83, %89
  %92 = getelementptr inbounds i8, ptr %3, i64 352
  %93 = getelementptr inbounds i8, ptr %3, i64 368
  %wide.load.11 = load <4 x i32>, ptr %92, align 16, !tbaa !5
  %wide.load78.11 = load <4 x i32>, ptr %93, align 16, !tbaa !5
  %94 = icmp ne <4 x i32> %wide.load.11, zeroinitializer
  %95 = icmp ne <4 x i32> %wide.load78.11, zeroinitializer
  %96 = zext <4 x i1> %94 to <4 x i32>
  %97 = zext <4 x i1> %95 to <4 x i32>
  %98 = add <4 x i32> %90, %96
  %99 = add <4 x i32> %91, %97
  %100 = getelementptr inbounds i8, ptr %3, i64 384
  %101 = getelementptr inbounds i8, ptr %3, i64 400
  %wide.load.12 = load <4 x i32>, ptr %100, align 16, !tbaa !5
  %wide.load78.12 = load <4 x i32>, ptr %101, align 16, !tbaa !5
  %102 = icmp ne <4 x i32> %wide.load.12, zeroinitializer
  %103 = icmp ne <4 x i32> %wide.load78.12, zeroinitializer
  %104 = zext <4 x i1> %102 to <4 x i32>
  %105 = zext <4 x i1> %103 to <4 x i32>
  %106 = add <4 x i32> %98, %104
  %107 = add <4 x i32> %99, %105
  %108 = getelementptr inbounds i8, ptr %3, i64 416
  %109 = getelementptr inbounds i8, ptr %3, i64 432
  %wide.load.13 = load <4 x i32>, ptr %108, align 16, !tbaa !5
  %wide.load78.13 = load <4 x i32>, ptr %109, align 16, !tbaa !5
  %110 = icmp ne <4 x i32> %wide.load.13, zeroinitializer
  %111 = icmp ne <4 x i32> %wide.load78.13, zeroinitializer
  %112 = zext <4 x i1> %110 to <4 x i32>
  %113 = zext <4 x i1> %111 to <4 x i32>
  %114 = add <4 x i32> %106, %112
  %115 = add <4 x i32> %107, %113
  %116 = getelementptr inbounds i8, ptr %3, i64 448
  %117 = getelementptr inbounds i8, ptr %3, i64 464
  %wide.load.14 = load <4 x i32>, ptr %116, align 16, !tbaa !5
  %wide.load78.14 = load <4 x i32>, ptr %117, align 16, !tbaa !5
  %118 = icmp ne <4 x i32> %wide.load.14, zeroinitializer
  %119 = icmp ne <4 x i32> %wide.load78.14, zeroinitializer
  %120 = zext <4 x i1> %118 to <4 x i32>
  %121 = zext <4 x i1> %119 to <4 x i32>
  %122 = add <4 x i32> %114, %120
  %123 = add <4 x i32> %115, %121
  %124 = getelementptr inbounds i8, ptr %3, i64 480
  %125 = getelementptr inbounds i8, ptr %3, i64 496
  %wide.load.15 = load <4 x i32>, ptr %124, align 16, !tbaa !5
  %wide.load78.15 = load <4 x i32>, ptr %125, align 16, !tbaa !5
  %126 = icmp ne <4 x i32> %wide.load.15, zeroinitializer
  %127 = icmp ne <4 x i32> %wide.load78.15, zeroinitializer
  %128 = zext <4 x i1> %126 to <4 x i32>
  %129 = zext <4 x i1> %127 to <4 x i32>
  %130 = add <4 x i32> %122, %128
  %131 = add <4 x i32> %123, %129
  %132 = getelementptr inbounds i8, ptr %3, i64 512
  %133 = getelementptr inbounds i8, ptr %3, i64 528
  %wide.load.16 = load <4 x i32>, ptr %132, align 16, !tbaa !5
  %wide.load78.16 = load <4 x i32>, ptr %133, align 16, !tbaa !5
  %134 = icmp ne <4 x i32> %wide.load.16, zeroinitializer
  %135 = icmp ne <4 x i32> %wide.load78.16, zeroinitializer
  %136 = zext <4 x i1> %134 to <4 x i32>
  %137 = zext <4 x i1> %135 to <4 x i32>
  %138 = add <4 x i32> %130, %136
  %139 = add <4 x i32> %131, %137
  %140 = getelementptr inbounds i8, ptr %3, i64 544
  %141 = getelementptr inbounds i8, ptr %3, i64 560
  %wide.load.17 = load <4 x i32>, ptr %140, align 16, !tbaa !5
  %wide.load78.17 = load <4 x i32>, ptr %141, align 16, !tbaa !5
  %142 = icmp ne <4 x i32> %wide.load.17, zeroinitializer
  %143 = icmp ne <4 x i32> %wide.load78.17, zeroinitializer
  %144 = zext <4 x i1> %142 to <4 x i32>
  %145 = zext <4 x i1> %143 to <4 x i32>
  %146 = add <4 x i32> %138, %144
  %147 = add <4 x i32> %139, %145
  %148 = getelementptr inbounds i8, ptr %3, i64 576
  %149 = getelementptr inbounds i8, ptr %3, i64 592
  %wide.load.18 = load <4 x i32>, ptr %148, align 16, !tbaa !5
  %wide.load78.18 = load <4 x i32>, ptr %149, align 16, !tbaa !5
  %150 = icmp ne <4 x i32> %wide.load.18, zeroinitializer
  %151 = icmp ne <4 x i32> %wide.load78.18, zeroinitializer
  %152 = zext <4 x i1> %150 to <4 x i32>
  %153 = zext <4 x i1> %151 to <4 x i32>
  %154 = add <4 x i32> %146, %152
  %155 = add <4 x i32> %147, %153
  %156 = getelementptr inbounds i8, ptr %3, i64 608
  %157 = getelementptr inbounds i8, ptr %3, i64 624
  %wide.load.19 = load <4 x i32>, ptr %156, align 16, !tbaa !5
  %wide.load78.19 = load <4 x i32>, ptr %157, align 16, !tbaa !5
  %158 = icmp ne <4 x i32> %wide.load.19, zeroinitializer
  %159 = icmp ne <4 x i32> %wide.load78.19, zeroinitializer
  %160 = zext <4 x i1> %158 to <4 x i32>
  %161 = zext <4 x i1> %159 to <4 x i32>
  %162 = add <4 x i32> %154, %160
  %163 = add <4 x i32> %155, %161
  %164 = getelementptr inbounds i8, ptr %3, i64 640
  %165 = getelementptr inbounds i8, ptr %3, i64 656
  %wide.load.20 = load <4 x i32>, ptr %164, align 16, !tbaa !5
  %wide.load78.20 = load <4 x i32>, ptr %165, align 16, !tbaa !5
  %166 = icmp ne <4 x i32> %wide.load.20, zeroinitializer
  %167 = icmp ne <4 x i32> %wide.load78.20, zeroinitializer
  %168 = zext <4 x i1> %166 to <4 x i32>
  %169 = zext <4 x i1> %167 to <4 x i32>
  %170 = add <4 x i32> %162, %168
  %171 = add <4 x i32> %163, %169
  %172 = getelementptr inbounds i8, ptr %3, i64 672
  %173 = getelementptr inbounds i8, ptr %3, i64 688
  %wide.load.21 = load <4 x i32>, ptr %172, align 16, !tbaa !5
  %wide.load78.21 = load <4 x i32>, ptr %173, align 16, !tbaa !5
  %174 = icmp ne <4 x i32> %wide.load.21, zeroinitializer
  %175 = icmp ne <4 x i32> %wide.load78.21, zeroinitializer
  %176 = zext <4 x i1> %174 to <4 x i32>
  %177 = zext <4 x i1> %175 to <4 x i32>
  %178 = add <4 x i32> %170, %176
  %179 = add <4 x i32> %171, %177
  %180 = getelementptr inbounds i8, ptr %3, i64 704
  %181 = getelementptr inbounds i8, ptr %3, i64 720
  %wide.load.22 = load <4 x i32>, ptr %180, align 16, !tbaa !5
  %wide.load78.22 = load <4 x i32>, ptr %181, align 16, !tbaa !5
  %182 = icmp ne <4 x i32> %wide.load.22, zeroinitializer
  %183 = icmp ne <4 x i32> %wide.load78.22, zeroinitializer
  %184 = zext <4 x i1> %182 to <4 x i32>
  %185 = zext <4 x i1> %183 to <4 x i32>
  %186 = add <4 x i32> %178, %184
  %187 = add <4 x i32> %179, %185
  %188 = getelementptr inbounds i8, ptr %3, i64 736
  %189 = getelementptr inbounds i8, ptr %3, i64 752
  %wide.load.23 = load <4 x i32>, ptr %188, align 16, !tbaa !5
  %wide.load78.23 = load <4 x i32>, ptr %189, align 16, !tbaa !5
  %190 = icmp ne <4 x i32> %wide.load.23, zeroinitializer
  %191 = icmp ne <4 x i32> %wide.load78.23, zeroinitializer
  %192 = zext <4 x i1> %190 to <4 x i32>
  %193 = zext <4 x i1> %191 to <4 x i32>
  %194 = add <4 x i32> %186, %192
  %195 = add <4 x i32> %187, %193
  %196 = getelementptr inbounds i8, ptr %3, i64 768
  %197 = getelementptr inbounds i8, ptr %3, i64 784
  %wide.load.24 = load <4 x i32>, ptr %196, align 16, !tbaa !5
  %wide.load78.24 = load <4 x i32>, ptr %197, align 16, !tbaa !5
  %198 = icmp ne <4 x i32> %wide.load.24, zeroinitializer
  %199 = icmp ne <4 x i32> %wide.load78.24, zeroinitializer
  %200 = zext <4 x i1> %198 to <4 x i32>
  %201 = zext <4 x i1> %199 to <4 x i32>
  %202 = add <4 x i32> %194, %200
  %203 = add <4 x i32> %195, %201
  %204 = getelementptr inbounds i8, ptr %3, i64 800
  %205 = getelementptr inbounds i8, ptr %3, i64 816
  %wide.load.25 = load <4 x i32>, ptr %204, align 16, !tbaa !5
  %wide.load78.25 = load <4 x i32>, ptr %205, align 16, !tbaa !5
  %206 = icmp ne <4 x i32> %wide.load.25, zeroinitializer
  %207 = icmp ne <4 x i32> %wide.load78.25, zeroinitializer
  %208 = zext <4 x i1> %206 to <4 x i32>
  %209 = zext <4 x i1> %207 to <4 x i32>
  %210 = add <4 x i32> %202, %208
  %211 = add <4 x i32> %203, %209
  %212 = getelementptr inbounds i8, ptr %3, i64 832
  %213 = getelementptr inbounds i8, ptr %3, i64 848
  %wide.load.26 = load <4 x i32>, ptr %212, align 16, !tbaa !5
  %wide.load78.26 = load <4 x i32>, ptr %213, align 16, !tbaa !5
  %214 = icmp ne <4 x i32> %wide.load.26, zeroinitializer
  %215 = icmp ne <4 x i32> %wide.load78.26, zeroinitializer
  %216 = zext <4 x i1> %214 to <4 x i32>
  %217 = zext <4 x i1> %215 to <4 x i32>
  %218 = add <4 x i32> %210, %216
  %219 = add <4 x i32> %211, %217
  %220 = getelementptr inbounds i8, ptr %3, i64 864
  %221 = getelementptr inbounds i8, ptr %3, i64 880
  %wide.load.27 = load <4 x i32>, ptr %220, align 16, !tbaa !5
  %wide.load78.27 = load <4 x i32>, ptr %221, align 16, !tbaa !5
  %222 = icmp ne <4 x i32> %wide.load.27, zeroinitializer
  %223 = icmp ne <4 x i32> %wide.load78.27, zeroinitializer
  %224 = zext <4 x i1> %222 to <4 x i32>
  %225 = zext <4 x i1> %223 to <4 x i32>
  %226 = add <4 x i32> %218, %224
  %227 = add <4 x i32> %219, %225
  %228 = getelementptr inbounds i8, ptr %3, i64 896
  %229 = getelementptr inbounds i8, ptr %3, i64 912
  %wide.load.28 = load <4 x i32>, ptr %228, align 16, !tbaa !5
  %wide.load78.28 = load <4 x i32>, ptr %229, align 16, !tbaa !5
  %230 = icmp ne <4 x i32> %wide.load.28, zeroinitializer
  %231 = icmp ne <4 x i32> %wide.load78.28, zeroinitializer
  %232 = zext <4 x i1> %230 to <4 x i32>
  %233 = zext <4 x i1> %231 to <4 x i32>
  %234 = add <4 x i32> %226, %232
  %235 = add <4 x i32> %227, %233
  %236 = getelementptr inbounds i8, ptr %3, i64 928
  %237 = getelementptr inbounds i8, ptr %3, i64 944
  %wide.load.29 = load <4 x i32>, ptr %236, align 16, !tbaa !5
  %wide.load78.29 = load <4 x i32>, ptr %237, align 16, !tbaa !5
  %238 = icmp ne <4 x i32> %wide.load.29, zeroinitializer
  %239 = icmp ne <4 x i32> %wide.load78.29, zeroinitializer
  %240 = zext <4 x i1> %238 to <4 x i32>
  %241 = zext <4 x i1> %239 to <4 x i32>
  %242 = add <4 x i32> %234, %240
  %243 = add <4 x i32> %235, %241
  %244 = getelementptr inbounds i8, ptr %3, i64 960
  %245 = getelementptr inbounds i8, ptr %3, i64 976
  %wide.load.30 = load <4 x i32>, ptr %244, align 16, !tbaa !5
  %wide.load78.30 = load <4 x i32>, ptr %245, align 16, !tbaa !5
  %246 = icmp ne <4 x i32> %wide.load.30, zeroinitializer
  %247 = icmp ne <4 x i32> %wide.load78.30, zeroinitializer
  %248 = zext <4 x i1> %246 to <4 x i32>
  %249 = zext <4 x i1> %247 to <4 x i32>
  %250 = add <4 x i32> %242, %248
  %251 = add <4 x i32> %243, %249
  %252 = getelementptr inbounds i8, ptr %3, i64 992
  %253 = getelementptr inbounds i8, ptr %3, i64 1008
  %wide.load.31 = load <4 x i32>, ptr %252, align 16, !tbaa !5
  %wide.load78.31 = load <4 x i32>, ptr %253, align 16, !tbaa !5
  %254 = icmp ne <4 x i32> %wide.load.31, zeroinitializer
  %255 = icmp ne <4 x i32> %wide.load78.31, zeroinitializer
  %256 = zext <4 x i1> %254 to <4 x i32>
  %257 = zext <4 x i1> %255 to <4 x i32>
  %258 = add <4 x i32> %250, %256
  %259 = add <4 x i32> %251, %257
  %bin.rdx = add <4 x i32> %259, %258
  %260 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %261 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %.not64 = icmp eq i64 %261, 0
  br i1 %.not64, label %._crit_edge60.thread, label %.lr.ph59

.lr.ph:                                           ; preds = %2, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %2 ]
  %262 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  %263 = load i8, ptr %262, align 1, !tbaa !9
  %264 = sext i8 %263 to i64
  %265 = getelementptr inbounds [256 x i32], ptr %3, i64 0, i64 %264
  store i32 1, ptr %265, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %266 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %267 = icmp ugt i64 %266, %indvars.iv.next
  br i1 %267, label %.lr.ph, label %vector.body, !llvm.loop !10

._crit_edge60:                                    ; preds = %302
  %268 = icmp eq i32 %.240, -1
  br i1 %268, label %._crit_edge60.thread, label %308

.lr.ph59:                                         ; preds = %vector.body, %302
  %indvars.iv72 = phi i64 [ %indvars.iv.next73, %302 ], [ 0, %vector.body ]
  %.03058 = phi i32 [ %.2, %302 ], [ 0, %vector.body ]
  %.03356 = phi i32 [ %spec.select44, %302 ], [ 0, %vector.body ]
  %.03555 = phi i32 [ %.237, %302 ], [ 2147483647, %vector.body ]
  %.03854 = phi i32 [ %.240, %302 ], [ -1, %vector.body ]
  %269 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv72)
  %270 = load i8, ptr %269, align 1, !tbaa !9
  %271 = sext i8 %270 to i64
  %272 = getelementptr inbounds [256 x i32], ptr %4, i64 0, i64 %271
  %273 = load i32, ptr %272, align 4, !tbaa !5
  %274 = icmp eq i32 %273, 0
  %275 = zext i1 %274 to i32
  %spec.select44 = add nuw nsw i32 %.03356, %275
  %276 = add nsw i32 %273, 1
  store i32 %276, ptr %272, align 4, !tbaa !5
  %277 = icmp eq i32 %spec.select44, %260
  br i1 %277, label %.preheader, label %302

.preheader:                                       ; preds = %.lr.ph59
  %278 = sext i32 %.03058 to i64
  %279 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %278)
  %280 = load i8, ptr %279, align 1, !tbaa !9
  %281 = sext i8 %280 to i64
  %282 = getelementptr inbounds [256 x i32], ptr %4, i64 0, i64 %281
  %283 = load i32, ptr %282, align 4, !tbaa !5
  %284 = icmp sgt i32 %283, 1
  br i1 %284, label %.lr.ph53, label %._crit_edge

.lr.ph53:                                         ; preds = %.preheader, %.lr.ph53
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %.lr.ph53 ], [ %278, %.preheader ]
  %285 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv69)
  %286 = load i8, ptr %285, align 1, !tbaa !9
  %287 = sext i8 %286 to i64
  %288 = getelementptr inbounds [256 x i32], ptr %4, i64 0, i64 %287
  %289 = load i32, ptr %288, align 4, !tbaa !5
  %290 = add nsw i32 %289, -1
  store i32 %290, ptr %288, align 4, !tbaa !5
  %indvars.iv.next70 = add nsw i64 %indvars.iv69, 1
  %291 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv.next70)
  %292 = load i8, ptr %291, align 1, !tbaa !9
  %293 = sext i8 %292 to i64
  %294 = getelementptr inbounds [256 x i32], ptr %4, i64 0, i64 %293
  %295 = load i32, ptr %294, align 4, !tbaa !5
  %296 = icmp sgt i32 %295, 1
  br i1 %296, label %.lr.ph53, label %._crit_edge.loopexit, !llvm.loop !12

._crit_edge.loopexit:                             ; preds = %.lr.ph53
  %297 = trunc nsw i64 %indvars.iv.next70 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %.131.lcssa = phi i32 [ %.03058, %.preheader ], [ %297, %._crit_edge.loopexit ]
  %298 = trunc nuw nsw i64 %indvars.iv72 to i32
  %299 = sub nsw i32 %298, %.131.lcssa
  %300 = add nsw i32 %299, 1
  %301 = icmp slt i32 %300, %.03555
  %spec.select45 = select i1 %301, i32 %.131.lcssa, i32 %.03854
  %spec.select46 = tail call i32 @llvm.smin.i32(i32 %300, i32 %.03555)
  br label %302

302:                                              ; preds = %._crit_edge, %.lr.ph59
  %.240 = phi i32 [ %spec.select45, %._crit_edge ], [ %.03854, %.lr.ph59 ]
  %.237 = phi i32 [ %spec.select46, %._crit_edge ], [ %.03555, %.lr.ph59 ]
  %.2 = phi i32 [ %.131.lcssa, %._crit_edge ], [ %.03058, %.lr.ph59 ]
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %303 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %304 = icmp ugt i64 %303, %indvars.iv.next73
  br i1 %304, label %.lr.ph59, label %._crit_edge60, !llvm.loop !13

._crit_edge60.thread:                             ; preds = %vector.body, %._crit_edge60
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %305 unwind label %306

305:                                              ; preds = %._crit_edge60.thread
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  br label %311

306:                                              ; preds = %._crit_edge60.thread
  %307 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #5
  resume { ptr, i32 } %307

308:                                              ; preds = %._crit_edge60
  %309 = sext i32 %.237 to i64
  %310 = sext i32 %.240 to i64
  tail call void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %310, i64 noundef %309)
  br label %311

311:                                              ; preds = %308, %305
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #5
  ret void
}

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress 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 #0 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass