; LLVM IR from UtkarshPathrabe/Competitive-Coding :: Model Algorithms/Dynamic Programming/Edit Distance/Edit Distance - Bottom Up.ll (Z4Editv)

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

@_Z2s1B5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z2s2B5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@edit = external dso_local global [2 x [100 x i32]], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z4Editv() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %8

8:                                                ; preds = %17, %0
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = icmp slt i32 %9, 100
  br i1 %10, label %12, label %11

11:                                               ; preds = %8
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  br label %20

12:                                               ; preds = %8
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [100 x i32], ptr @edit, i64 0, i64 %15
  store i32 %13, ptr %16, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %12
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %1, align 4, !tbaa !5
  br label %8, !llvm.loop !9

20:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %21

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

26:                                               ; preds = %21
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %111

27:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %104, %27
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11) #4
  %32 = icmp ule i64 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %28
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %107

34:                                               ; preds = %28
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %46

37:                                               ; preds = %34
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = srem i32 %39, 2
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [2 x [100 x i32]], ptr @edit, i64 0, i64 %41
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100 x i32], ptr %42, i64 0, i64 %44
  store i32 %38, ptr %45, align 4, !tbaa !5
  br label %103

46:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sub nsw i32 %47, 1
  %49 = srem i32 %48, 2
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [2 x [100 x i32]], ptr @edit, i64 0, i64 %50
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [100 x i32], ptr %51, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = srem i32 %57, 2
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [2 x [100 x i32]], ptr @edit, i64 0, i64 %59
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = sub nsw i32 %61, 1
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100 x i32], ptr %60, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %6, align 4, !tbaa !5
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %68 = load i32, ptr %2, align 4, !tbaa !5
  %69 = sub nsw i32 %68, 1
  %70 = srem i32 %69, 2
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [2 x [100 x i32]], ptr @edit, i64 0, i64 %71
  %73 = load i32, ptr %4, align 4, !tbaa !5
  %74 = sub nsw i32 %73, 1
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [100 x i32], ptr %72, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = sub nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %80)
  %82 = load i8, ptr %81, align 1, !tbaa !11
  %83 = sext i8 %82 to i32
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = sub nsw i32 %84, 1
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %86)
  %88 = load i8, ptr %87, align 1, !tbaa !11
  %89 = sext i8 %88 to i32
  %90 = icmp eq i32 %83, %89
  %91 = zext i1 %90 to i64
  %92 = select i1 %90, i32 0, i32 1
  %93 = add nsw i32 %77, %92
  store i32 %93, ptr %7, align 4, !tbaa !5
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %67, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = load i32, ptr %2, align 4, !tbaa !5
  %97 = srem i32 %96, 2
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [2 x [100 x i32]], ptr @edit, i64 0, i64 %98
  %100 = load i32, ptr %4, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100 x i32], ptr %99, i64 0, i64 %101
  store i32 %95, ptr %102, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %103

103:                                              ; preds = %46, %37
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %4, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %4, align 4, !tbaa !5
  br label %28, !llvm.loop !12

107:                                              ; preds = %33
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %2, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %2, align 4, !tbaa !5
  br label %21, !llvm.loop !13

111:                                              ; preds = %26
  %112 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11) #4
  %113 = urem i64 %112, 2
  %114 = getelementptr inbounds [2 x [100 x i32]], ptr @edit, i64 0, i64 %113
  %115 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11) #4
  %116 = getelementptr inbounds [100 x i32], ptr %114, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !5
  ret i32 %117
}

; 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 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_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

; 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

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

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


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

@_Z2s1B5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z2s2B5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@edit = external dso_local local_unnamed_addr global [2 x [100 x i32]], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z4Editv() local_unnamed_addr #0 {
vector.ph:
  %0 = alloca i32, align 4
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, ptr @edit, align 16, !tbaa !5
  store <4 x i32> <i32 4, i32 5, i32 6, i32 7>, ptr getelementptr inbounds (i8, ptr @edit, i64 16), align 16, !tbaa !5
  store <4 x i32> <i32 8, i32 9, i32 10, i32 11>, ptr getelementptr inbounds (i8, ptr @edit, i64 32), align 16, !tbaa !5
  store <4 x i32> <i32 12, i32 13, i32 14, i32 15>, ptr getelementptr inbounds (i8, ptr @edit, i64 48), align 16, !tbaa !5
  store <4 x i32> <i32 16, i32 17, i32 18, i32 19>, ptr getelementptr inbounds (i8, ptr @edit, i64 64), align 16, !tbaa !5
  store <4 x i32> <i32 20, i32 21, i32 22, i32 23>, ptr getelementptr inbounds (i8, ptr @edit, i64 80), align 16, !tbaa !5
  store <4 x i32> <i32 24, i32 25, i32 26, i32 27>, ptr getelementptr inbounds (i8, ptr @edit, i64 96), align 16, !tbaa !5
  store <4 x i32> <i32 28, i32 29, i32 30, i32 31>, ptr getelementptr inbounds (i8, ptr @edit, i64 112), align 16, !tbaa !5
  store <4 x i32> <i32 32, i32 33, i32 34, i32 35>, ptr getelementptr inbounds (i8, ptr @edit, i64 128), align 16, !tbaa !5
  store <4 x i32> <i32 36, i32 37, i32 38, i32 39>, ptr getelementptr inbounds (i8, ptr @edit, i64 144), align 16, !tbaa !5
  store <4 x i32> <i32 40, i32 41, i32 42, i32 43>, ptr getelementptr inbounds (i8, ptr @edit, i64 160), align 16, !tbaa !5
  store <4 x i32> <i32 44, i32 45, i32 46, i32 47>, ptr getelementptr inbounds (i8, ptr @edit, i64 176), align 16, !tbaa !5
  store <4 x i32> <i32 48, i32 49, i32 50, i32 51>, ptr getelementptr inbounds (i8, ptr @edit, i64 192), align 16, !tbaa !5
  store <4 x i32> <i32 52, i32 53, i32 54, i32 55>, ptr getelementptr inbounds (i8, ptr @edit, i64 208), align 16, !tbaa !5
  store <4 x i32> <i32 56, i32 57, i32 58, i32 59>, ptr getelementptr inbounds (i8, ptr @edit, i64 224), align 16, !tbaa !5
  store <4 x i32> <i32 60, i32 61, i32 62, i32 63>, ptr getelementptr inbounds (i8, ptr @edit, i64 240), align 16, !tbaa !5
  store <4 x i32> <i32 64, i32 65, i32 66, i32 67>, ptr getelementptr inbounds (i8, ptr @edit, i64 256), align 16, !tbaa !5
  store <4 x i32> <i32 68, i32 69, i32 70, i32 71>, ptr getelementptr inbounds (i8, ptr @edit, i64 272), align 16, !tbaa !5
  store <4 x i32> <i32 72, i32 73, i32 74, i32 75>, ptr getelementptr inbounds (i8, ptr @edit, i64 288), align 16, !tbaa !5
  store <4 x i32> <i32 76, i32 77, i32 78, i32 79>, ptr getelementptr inbounds (i8, ptr @edit, i64 304), align 16, !tbaa !5
  store <4 x i32> <i32 80, i32 81, i32 82, i32 83>, ptr getelementptr inbounds (i8, ptr @edit, i64 320), align 16, !tbaa !5
  store <4 x i32> <i32 84, i32 85, i32 86, i32 87>, ptr getelementptr inbounds (i8, ptr @edit, i64 336), align 16, !tbaa !5
  store <4 x i32> <i32 88, i32 89, i32 90, i32 91>, ptr getelementptr inbounds (i8, ptr @edit, i64 352), align 16, !tbaa !5
  store <4 x i32> <i32 92, i32 93, i32 94, i32 95>, ptr getelementptr inbounds (i8, ptr @edit, i64 368), align 16, !tbaa !5
  store i32 96, ptr getelementptr inbounds (i8, ptr @edit, i64 384), align 16, !tbaa !5
  store i32 97, ptr getelementptr inbounds (i8, ptr @edit, i64 388), align 4, !tbaa !5
  store i32 98, ptr getelementptr inbounds (i8, ptr @edit, i64 392), align 8, !tbaa !5
  store i32 99, ptr getelementptr inbounds (i8, ptr @edit, i64 396), align 4, !tbaa !5
  %3 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11) #3
  %.not29 = icmp eq i64 %3, 0
  br i1 %.not29, label %._crit_edge, label %.preheader.preheader

.preheader.preheader:                             ; preds = %vector.ph, %.loopexit
  %indvars.iv36 = phi i64 [ %indvars.iv.next37, %.loopexit ], [ 1, %vector.ph ]
  %4 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11) #3
  %5 = add nsw i64 %indvars.iv36, -1
  %.urem = and i64 %5, 1
  %6 = and i64 %indvars.iv36, 1
  %7 = trunc nuw nsw i64 %indvars.iv36 to i32
  %8 = getelementptr inbounds [2 x [100 x i32]], ptr @edit, i64 0, i64 %6, i64 0
  store i32 %7, ptr %8, align 16, !tbaa !5
  %9 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11) #3
  %.not25.peel = icmp eq i64 %9, 0
  br i1 %.not25.peel, label %.loopexit, label %.peel.next

._crit_edge:                                      ; preds = %.loopexit, %vector.ph
  %10 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11) #3
  %11 = and i64 %10, 1
  %12 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11) #3
  %13 = getelementptr inbounds [2 x [100 x i32]], ptr @edit, i64 0, i64 %11, i64 %12
  %14 = load i32, ptr %13, align 4, !tbaa !5
  ret i32 %14

.loopexit:                                        ; preds = %.peel.next, %.preheader.preheader
  %indvars.iv.next37 = add nuw nsw i64 %indvars.iv36, 1
  %15 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11) #3
  %.not.not = icmp ugt i64 %15, %indvars.iv36
  br i1 %.not.not, label %.preheader.preheader, label %._crit_edge, !llvm.loop !9

.peel.next:                                       ; preds = %.preheader.preheader, %.peel.next
  %indvars.iv32 = phi i64 [ %indvars.iv.next33, %.peel.next ], [ 1, %.preheader.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %0) #3
  %16 = getelementptr inbounds [2 x [100 x i32]], ptr @edit, i64 0, i64 %.urem, i64 %indvars.iv32
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = add nsw i32 %17, 1
  store i32 %18, ptr %0, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #3
  %19 = add nsw i64 %indvars.iv32, -1
  %20 = getelementptr inbounds [2 x [100 x i32]], ptr @edit, i64 0, i64 %6, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %1, align 4, !tbaa !5
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %0, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #3
  %24 = getelementptr inbounds [2 x [100 x i32]], ptr @edit, i64 0, i64 %.urem, i64 %19
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %5)
  %27 = load i8, ptr %26, align 1, !tbaa !11
  %28 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %19)
  %29 = load i8, ptr %28, align 1, !tbaa !11
  %30 = icmp ne i8 %27, %29
  %31 = zext i1 %30 to i32
  %32 = add nsw i32 %25, %31
  store i32 %32, ptr %2, align 4, !tbaa !5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = getelementptr inbounds [2 x [100 x i32]], ptr @edit, i64 0, i64 %6, i64 %indvars.iv32
  store i32 %34, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %0) #3
  %indvars.iv.next33 = add nuw nsw i64 %indvars.iv32, 1
  %36 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11) #3
  %.not25.not = icmp ugt i64 %36, %indvars.iv32
  br i1 %.not25.not, label %.peel.next, label %.loopexit, !llvm.loop !12
}

; 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 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_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #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 #0 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10, !13}
!13 = !{!"llvm.loop.peeled.count", i32 1}


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