; LLVM IR from tangjz/acm-icpc :: lydsy/1026.ll/Z4calcNSt7 (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"

@dphead = external dso_local global [11 x [11 x i32]], align 16
@cnt = external dso_local global [11 x i32], align 16

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z4calcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %0) #3 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %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
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %12 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  %13 = trunc i64 %12 to i32
  store i32 %13, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  %14 = load i32, ptr %9, align 4, !tbaa !9
  %15 = icmp eq i32 %14, 1
  br i1 %15, label %16, label %21

16:                                               ; preds = %1
  %17 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef 0)
  %18 = load i8, ptr %17, align 1, !tbaa !11
  %19 = sext i8 %18 to i32
  %20 = sub nsw i32 %19, 48
  store i32 %20, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %122

21:                                               ; preds = %1
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %117, %21
  %23 = load i32, ptr %4, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %24)
  %26 = load i8, ptr %25, align 1, !tbaa !11
  %27 = icmp ne i8 %26, 0
  br i1 %27, label %28, label %120

28:                                               ; preds = %22
  %29 = load i32, ptr %4, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %30)
  %32 = load i8, ptr %31, align 1, !tbaa !11
  %33 = sext i8 %32 to i32
  %34 = sub nsw i32 %33, 48
  store i32 %34, ptr %6, align 4, !tbaa !9
  %35 = load i32, ptr %4, align 4, !tbaa !9
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %62, label %37

37:                                               ; preds = %28
  store i32 1, ptr %5, align 4, !tbaa !9
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = sub nsw i32 %38, 1
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [11 x i32], ptr @cnt, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = load i32, ptr %10, align 4, !tbaa !9
  %44 = add nsw i32 %43, %42
  store i32 %44, ptr %10, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %49, %37
  %46 = load i32, ptr %5, align 4, !tbaa !9
  %47 = load i32, ptr %6, align 4, !tbaa !9
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %49, label %60

49:                                               ; preds = %45
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [11 x [11 x i32]], ptr @dphead, i64 0, i64 %51
  %53 = load i32, ptr %5, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %5, align 4, !tbaa !9
  %55 = sext i32 %53 to i64
  %56 = getelementptr inbounds [11 x i32], ptr %52, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !9
  %58 = load i32, ptr %10, align 4, !tbaa !9
  %59 = add nsw i32 %58, %57
  store i32 %59, ptr %10, align 4, !tbaa !9
  br label %45, !llvm.loop !12

60:                                               ; preds = %45
  %61 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %61, ptr %8, align 4, !tbaa !9
  br label %116

62:                                               ; preds = %28
  store i32 0, ptr %5, align 4, !tbaa !9
  store i32 -1, ptr %7, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %85, %62
  %64 = load i32, ptr %5, align 4, !tbaa !9
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %67, label %88

67:                                               ; preds = %63
  %68 = load i32, ptr %5, align 4, !tbaa !9
  %69 = load i32, ptr %8, align 4, !tbaa !9
  %70 = sub nsw i32 %68, %69
  %71 = call i32 @llvm.abs.i32(i32 %70, i1 true)
  %72 = icmp sge i32 %71, 2
  br i1 %72, label %73, label %85

73:                                               ; preds = %67
  %74 = load i32, ptr %9, align 4, !tbaa !9
  %75 = load i32, ptr %4, align 4, !tbaa !9
  %76 = sub nsw i32 %74, %75
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [11 x [11 x i32]], ptr @dphead, i64 0, i64 %77
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [11 x i32], ptr %78, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = load i32, ptr %10, align 4, !tbaa !9
  %84 = add nsw i32 %83, %82
  store i32 %84, ptr %10, align 4, !tbaa !9
  br label %85

85:                                               ; preds = %73, %67
  %86 = load i32, ptr %5, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %5, align 4, !tbaa !9
  store i32 %86, ptr %7, align 4, !tbaa !9
  br label %63, !llvm.loop !14

88:                                               ; preds = %63
  %89 = load i32, ptr %4, align 4, !tbaa !9
  %90 = load i32, ptr %9, align 4, !tbaa !9
  %91 = sub nsw i32 %90, 1
  %92 = icmp eq i32 %89, %91
  br i1 %92, label %93, label %102

93:                                               ; preds = %88
  %94 = load i32, ptr %5, align 4, !tbaa !9
  %95 = load i32, ptr %8, align 4, !tbaa !9
  %96 = sub nsw i32 %94, %95
  %97 = call i32 @llvm.abs.i32(i32 %96, i1 true)
  %98 = icmp sge i32 %97, 2
  br i1 %98, label %99, label %102

99:                                               ; preds = %93
  %100 = load i32, ptr %10, align 4, !tbaa !9
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %10, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %99, %93, %88
  %103 = load i32, ptr %5, align 4, !tbaa !9
  %104 = load i32, ptr %8, align 4, !tbaa !9
  %105 = sub nsw i32 %103, %104
  %106 = call i32 @llvm.abs.i32(i32 %105, i1 true)
  %107 = icmp sge i32 %106, 2
  br i1 %107, label %108, label %110

108:                                              ; preds = %102
  %109 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %109, ptr %7, align 4, !tbaa !9
  store i32 %109, ptr %8, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %108, %102
  %111 = load i32, ptr %7, align 4, !tbaa !9
  %112 = load i32, ptr %6, align 4, !tbaa !9
  %113 = icmp slt i32 %111, %112
  br i1 %113, label %114, label %115

114:                                              ; preds = %110
  br label %120

115:                                              ; preds = %110
  br label %116

116:                                              ; preds = %115, %60
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %4, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %4, align 4, !tbaa !9
  br label %22, !llvm.loop !15

120:                                              ; preds = %114, %22
  %121 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %121, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %122

122:                                              ; preds = %120, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  %123 = load i32, ptr %2, align 4
  ret i32 %123
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #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}


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

@dphead = external dso_local local_unnamed_addr global [11 x [11 x i32]], align 16
@cnt = external dso_local local_unnamed_addr global [11 x i32], align 16

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z4calcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %0) local_unnamed_addr #0 {
  %2 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  %3 = and i64 %2, 4294967295
  %4 = icmp eq i64 %3, 1
  %5 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef 0)
  %6 = load i8, ptr %5, align 1, !tbaa !5
  br i1 %4, label %14, label %.preheader50

.preheader50:                                     ; preds = %1
  %.not61 = icmp eq i8 %6, 0
  br i1 %.not61, label %.loopexit51, label %.lr.ph65

.lr.ph65:                                         ; preds = %.preheader50
  %7 = add i64 %2, 4294967295
  %8 = shl i64 %2, 32
  %sext = add i64 %8, -4294967296
  %9 = ashr exact i64 %sext, 32
  %10 = getelementptr inbounds [11 x i32], ptr @cnt, i64 0, i64 %9
  %11 = ashr exact i64 %8, 32
  %sext81 = shl i64 %2, 32
  %12 = ashr exact i64 %sext81, 32
  %13 = and i64 %7, 4294967295
  br label %17

14:                                               ; preds = %1
  %15 = sext i8 %6 to i32
  %16 = add nsw i32 %15, -48
  br label %.loopexit51

17:                                               ; preds = %.lr.ph65, %.loopexit
  %indvars.iv76 = phi i64 [ 0, %.lr.ph65 ], [ %indvars.iv.next77, %.loopexit ]
  %.064 = phi i32 [ 0, %.lr.ph65 ], [ %.5, %.loopexit ]
  %.03563 = phi i32 [ undef, %.lr.ph65 ], [ %.237, %.loopexit ]
  %18 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %indvars.iv76)
  %19 = load i8, ptr %18, align 1, !tbaa !5
  %20 = sext i8 %19 to i32
  %21 = add nsw i32 %20, -48
  %.not46 = icmp eq i64 %indvars.iv76, 0
  br i1 %.not46, label %26, label %.preheader

.preheader:                                       ; preds = %17
  %22 = icmp sgt i8 %19, 48
  br i1 %22, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %23 = sub nsw i64 %12, %indvars.iv76
  %24 = add nsw i32 %20, -49
  %wide.trip.count = zext i32 %21 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %25 = icmp eq i32 %21, 1
  br i1 %25, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 4294967294
  br label %41

26:                                               ; preds = %17
  %27 = load i32, ptr %10, align 4, !tbaa !8
  %28 = add nsw i32 %27, %.064
  %29 = icmp sgt i8 %19, 49
  br i1 %29, label %.lr.ph59.preheader, label %.loopexit

.lr.ph59.preheader:                               ; preds = %26
  %wide.trip.count74 = zext i32 %21 to i64
  %30 = add nsw i64 %wide.trip.count74, -1
  %min.iters.check = icmp ult i64 %30, 8
  br i1 %min.iters.check, label %.lr.ph59.preheader84, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph59.preheader
  %n.vec = and i64 %30, -8
  %ind.end = or disjoint i64 %n.vec, 1
  %31 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %28, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %31, %vector.ph ], [ %34, %vector.body ]
  %vec.phi82 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %35, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %32 = getelementptr inbounds [11 x [11 x i32]], ptr @dphead, i64 0, i64 %11, i64 %offset.idx
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %wide.load = load <4 x i32>, ptr %32, align 4, !tbaa !8
  %wide.load83 = load <4 x i32>, ptr %33, align 4, !tbaa !8
  %34 = add <4 x i32> %wide.load, %vec.phi
  %35 = add <4 x i32> %wide.load83, %vec.phi82
  %index.next = add nuw i64 %index, 8
  %36 = icmp eq i64 %index.next, %n.vec
  br i1 %36, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %35, %34
  %37 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %30, %n.vec
  br i1 %cmp.n, label %.loopexit, label %.lr.ph59.preheader84

.lr.ph59.preheader84:                             ; preds = %middle.block, %.lr.ph59.preheader
  %indvars.iv71.ph = phi i64 [ 1, %.lr.ph59.preheader ], [ %ind.end, %middle.block ]
  %.157.ph = phi i32 [ %28, %.lr.ph59.preheader ], [ %37, %middle.block ]
  br label %.lr.ph59

.lr.ph59:                                         ; preds = %.lr.ph59.preheader84, %.lr.ph59
  %indvars.iv71 = phi i64 [ %indvars.iv.next72, %.lr.ph59 ], [ %indvars.iv71.ph, %.lr.ph59.preheader84 ]
  %.157 = phi i32 [ %40, %.lr.ph59 ], [ %.157.ph, %.lr.ph59.preheader84 ]
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %38 = getelementptr inbounds [11 x [11 x i32]], ptr @dphead, i64 0, i64 %11, i64 %indvars.iv71
  %39 = load i32, ptr %38, align 4, !tbaa !8
  %40 = add nsw i32 %39, %.157
  %exitcond75.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count74
  br i1 %exitcond75.not, label %.loopexit, label %.lr.ph59, !llvm.loop !14

41:                                               ; preds = %59, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %59 ]
  %.253 = phi i32 [ %.064, %.lr.ph.new ], [ %.3.1, %59 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %59 ]
  %42 = trunc i64 %indvars.iv to i32
  %43 = sub i32 %42, %.03563
  %44 = tail call i32 @llvm.abs.i32(i32 %43, i1 true)
  %45 = icmp ugt i32 %44, 1
  br i1 %45, label %46, label %50

46:                                               ; preds = %41
  %47 = getelementptr inbounds [11 x [11 x i32]], ptr @dphead, i64 0, i64 %23, i64 %indvars.iv
  %48 = load i32, ptr %47, align 4, !tbaa !8
  %49 = add nsw i32 %48, %.253
  br label %50

50:                                               ; preds = %46, %41
  %.3 = phi i32 [ %49, %46 ], [ %.253, %41 ]
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %51 = trunc i64 %indvars.iv.next to i32
  %52 = sub i32 %51, %.03563
  %53 = tail call i32 @llvm.abs.i32(i32 %52, i1 true)
  %54 = icmp ugt i32 %53, 1
  br i1 %54, label %55, label %59

55:                                               ; preds = %50
  %56 = getelementptr inbounds [11 x [11 x i32]], ptr @dphead, i64 0, i64 %23, i64 %indvars.iv.next
  %57 = load i32, ptr %56, align 4, !tbaa !8
  %58 = add nsw i32 %57, %.3
  br label %59

59:                                               ; preds = %55, %50
  %.3.1 = phi i32 [ %58, %55 ], [ %.3, %50 ]
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %41, !llvm.loop !15

._crit_edge.loopexit.unr-lcssa:                   ; preds = %59, %.lr.ph
  %.3.lcssa.ph = phi i32 [ poison, %.lr.ph ], [ %.3.1, %59 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %59 ]
  %.253.unr = phi i32 [ %.064, %.lr.ph ], [ %.3.1, %59 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa
  %60 = trunc i64 %indvars.iv.unr to i32
  %61 = sub i32 %60, %.03563
  %62 = tail call i32 @llvm.abs.i32(i32 %61, i1 true)
  %63 = icmp ugt i32 %62, 1
  br i1 %63, label %64, label %._crit_edge.loopexit

64:                                               ; preds = %.epil.preheader
  %65 = getelementptr inbounds [11 x [11 x i32]], ptr @dphead, i64 0, i64 %23, i64 %indvars.iv.unr
  %66 = load i32, ptr %65, align 4, !tbaa !8
  %67 = add nsw i32 %66, %.253.unr
  br label %._crit_edge.loopexit

._crit_edge.loopexit:                             ; preds = %.epil.preheader, %64, %._crit_edge.loopexit.unr-lcssa
  %.3.lcssa = phi i32 [ %.3.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %67, %64 ], [ %.253.unr, %.epil.preheader ]
  %68 = add nsw i32 %20, -48
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %.142.lcssa = phi i32 [ 0, %.preheader ], [ %68, %._crit_edge.loopexit ]
  %.038.lcssa = phi i32 [ -1, %.preheader ], [ %24, %._crit_edge.loopexit ]
  %.2.lcssa = phi i32 [ %.064, %.preheader ], [ %.3.lcssa, %._crit_edge.loopexit ]
  %69 = icmp eq i64 %indvars.iv76, %13
  %70 = sub nsw i32 %.142.lcssa, %.03563
  %71 = tail call i32 @llvm.abs.i32(i32 %70, i1 true)
  %72 = icmp ugt i32 %71, 1
  %narrow = and i1 %69, %72
  %spec.select = zext i1 %narrow to i32
  %.4 = add nsw i32 %.2.lcssa, %spec.select
  %73 = icmp ult i32 %71, 2
  %spec.select49 = select i1 %73, i32 %.03563, i32 %21
  %74 = icmp slt i32 %.038.lcssa, %21
  %75 = select i1 %73, i1 %74, i1 false
  br i1 %75, label %.loopexit51, label %.loopexit

.loopexit:                                        ; preds = %.lr.ph59, %middle.block, %26, %._crit_edge
  %.237 = phi i32 [ %spec.select49, %._crit_edge ], [ %21, %26 ], [ %21, %middle.block ], [ %21, %.lr.ph59 ]
  %.5 = phi i32 [ %.4, %._crit_edge ], [ %28, %26 ], [ %37, %middle.block ], [ %40, %.lr.ph59 ]
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %76 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %indvars.iv.next77)
  %77 = load i8, ptr %76, align 1, !tbaa !5
  %.not = icmp eq i8 %77, 0
  br i1 %.not, label %.loopexit51, label %17, !llvm.loop !16

.loopexit51:                                      ; preds = %._crit_edge, %.loopexit, %.preheader50, %14
  %.034 = phi i32 [ %16, %14 ], [ 0, %.preheader50 ], [ %.4, %._crit_edge ], [ %.5, %.loopexit ]
  ret i32 %.034
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #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 speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !11, !13, !12}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}


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