; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Random Problems/B. You Are Given a Decimal String.../Z5solveRNSt7/c_c331fefa/Z5solveRNSt7 (traitsIcESaIcEEEll)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z5solveRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEll(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %1, i64 noundef %2) #0 {
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca [10 x [10 x i64]], align 16
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store i64 %2, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 800, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %19

19:                                               ; preds = %54, %3
  %20 = load i64, ptr %9, align 8, !tbaa !9
  %21 = icmp slt i64 %20, 10
  br i1 %21, label %23, label %22

22:                                               ; preds = %19
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %57

23:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %24

24:                                               ; preds = %50, %23
  %25 = load i64, ptr %11, align 8, !tbaa !9
  %26 = icmp slt i64 %25, 10
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %53

28:                                               ; preds = %24
  %29 = load i64, ptr %9, align 8, !tbaa !9
  %30 = load i64, ptr %6, align 8, !tbaa !9
  %31 = add nsw i64 %29, %30
  %32 = srem i64 %31, 10
  %33 = load i64, ptr %11, align 8, !tbaa !9
  %34 = icmp eq i64 %32, %33
  br i1 %34, label %42, label %35

35:                                               ; preds = %28
  %36 = load i64, ptr %9, align 8, !tbaa !9
  %37 = load i64, ptr %7, align 8, !tbaa !9
  %38 = add nsw i64 %36, %37
  %39 = srem i64 %38, 10
  %40 = load i64, ptr %11, align 8, !tbaa !9
  %41 = icmp eq i64 %39, %40
  br label %42

42:                                               ; preds = %35, %28
  %43 = phi i1 [ true, %28 ], [ %41, %35 ]
  %44 = zext i1 %43 to i64
  %45 = select i1 %43, i64 1, i64 1000000000000
  %46 = load i64, ptr %9, align 8, !tbaa !9
  %47 = getelementptr inbounds [10 x [10 x i64]], ptr %8, i64 0, i64 %46
  %48 = load i64, ptr %11, align 8, !tbaa !9
  %49 = getelementptr inbounds [10 x i64], ptr %47, i64 0, i64 %48
  store i64 %45, ptr %49, align 8, !tbaa !9
  br label %50

50:                                               ; preds = %42
  %51 = load i64, ptr %11, align 8, !tbaa !9
  %52 = add nsw i64 %51, 1
  store i64 %52, ptr %11, align 8, !tbaa !9
  br label %24, !llvm.loop !11

53:                                               ; preds = %27
  br label %54

54:                                               ; preds = %53
  %55 = load i64, ptr %9, align 8, !tbaa !9
  %56 = add nsw i64 %55, 1
  store i64 %56, ptr %9, align 8, !tbaa !9
  br label %19, !llvm.loop !13

57:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %58

58:                                               ; preds = %102, %57
  %59 = load i64, ptr %12, align 8, !tbaa !9
  %60 = icmp slt i64 %59, 10
  br i1 %60, label %62, label %61

61:                                               ; preds = %58
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %105

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %63

63:                                               ; preds = %98, %62
  %64 = load i64, ptr %13, align 8, !tbaa !9
  %65 = icmp slt i64 %64, 10
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %101

67:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %68

68:                                               ; preds = %94, %67
  %69 = load i64, ptr %14, align 8, !tbaa !9
  %70 = icmp slt i64 %69, 10
  br i1 %70, label %72, label %71

71:                                               ; preds = %68
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %97

72:                                               ; preds = %68
  %73 = load i64, ptr %13, align 8, !tbaa !9
  %74 = getelementptr inbounds [10 x [10 x i64]], ptr %8, i64 0, i64 %73
  %75 = load i64, ptr %14, align 8, !tbaa !9
  %76 = getelementptr inbounds [10 x i64], ptr %74, i64 0, i64 %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %77 = load i64, ptr %13, align 8, !tbaa !9
  %78 = getelementptr inbounds [10 x [10 x i64]], ptr %8, i64 0, i64 %77
  %79 = load i64, ptr %12, align 8, !tbaa !9
  %80 = getelementptr inbounds [10 x i64], ptr %78, i64 0, i64 %79
  %81 = load i64, ptr %80, align 8, !tbaa !9
  %82 = load i64, ptr %12, align 8, !tbaa !9
  %83 = getelementptr inbounds [10 x [10 x i64]], ptr %8, i64 0, i64 %82
  %84 = load i64, ptr %14, align 8, !tbaa !9
  %85 = getelementptr inbounds [10 x i64], ptr %83, i64 0, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !9
  %87 = add nsw i64 %81, %86
  store i64 %87, ptr %15, align 8, !tbaa !9
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %89 = load i64, ptr %88, align 8, !tbaa !9
  %90 = load i64, ptr %13, align 8, !tbaa !9
  %91 = getelementptr inbounds [10 x [10 x i64]], ptr %8, i64 0, i64 %90
  %92 = load i64, ptr %14, align 8, !tbaa !9
  %93 = getelementptr inbounds [10 x i64], ptr %91, i64 0, i64 %92
  store i64 %89, ptr %93, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %94

94:                                               ; preds = %72
  %95 = load i64, ptr %14, align 8, !tbaa !9
  %96 = add nsw i64 %95, 1
  store i64 %96, ptr %14, align 8, !tbaa !9
  br label %68, !llvm.loop !14

97:                                               ; preds = %71
  br label %98

98:                                               ; preds = %97
  %99 = load i64, ptr %13, align 8, !tbaa !9
  %100 = add nsw i64 %99, 1
  store i64 %100, ptr %13, align 8, !tbaa !9
  br label %63, !llvm.loop !15

101:                                              ; preds = %66
  br label %102

102:                                              ; preds = %101
  %103 = load i64, ptr %12, align 8, !tbaa !9
  %104 = add nsw i64 %103, 1
  store i64 %104, ptr %12, align 8, !tbaa !9
  br label %58, !llvm.loop !16

105:                                              ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  store i64 0, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store i64 1, ptr %17, align 8, !tbaa !9
  br label %106

106:                                              ; preds = %142, %105
  %107 = load i64, ptr %17, align 8, !tbaa !9
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %108) #4
  %110 = icmp slt i64 %107, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %106
  store i32 17, ptr %10, align 4
  br label %145

112:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = load i64, ptr %17, align 8, !tbaa !9
  %115 = sub nsw i64 %114, 1
  %116 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %113, i64 noundef %115)
  %117 = load i8, ptr %116, align 1, !tbaa !17
  %118 = sext i8 %117 to i32
  %119 = sub nsw i32 %118, 48
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [10 x [10 x i64]], ptr %8, i64 0, i64 %120
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = load i64, ptr %17, align 8, !tbaa !9
  %124 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %122, i64 noundef %123)
  %125 = load i8, ptr %124, align 1, !tbaa !17
  %126 = sext i8 %125 to i32
  %127 = sub nsw i32 %126, 48
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [10 x i64], ptr %121, i64 0, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !9
  store i64 %130, ptr %18, align 8, !tbaa !9
  %131 = load i64, ptr %18, align 8, !tbaa !9
  %132 = icmp eq i64 %131, 1000000000000
  br i1 %132, label %133, label %134

133:                                              ; preds = %112
  store i64 -1, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %139

134:                                              ; preds = %112
  %135 = load i64, ptr %18, align 8, !tbaa !9
  %136 = sub nsw i64 %135, 1
  %137 = load i64, ptr %16, align 8, !tbaa !9
  %138 = add nsw i64 %137, %136
  store i64 %138, ptr %16, align 8, !tbaa !9
  store i32 0, ptr %10, align 4
  br label %139

139:                                              ; preds = %134, %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  %140 = load i32, ptr %10, align 4
  switch i32 %140, label %145 [
    i32 0, label %141
  ]

141:                                              ; preds = %139
  br label %142

142:                                              ; preds = %141
  %143 = load i64, ptr %17, align 8, !tbaa !9
  %144 = add nsw i64 %143, 1
  store i64 %144, ptr %17, align 8, !tbaa !9
  br label %106, !llvm.loop !18

145:                                              ; preds = %139, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  %146 = load i32, ptr %10, align 4
  switch i32 %146, label %149 [
    i32 17, label %147
  ]

147:                                              ; preds = %145
  %148 = load i64, ptr %16, align 8, !tbaa !9
  store i64 %148, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %149

149:                                              ; preds = %147, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 800, ptr %8) #4
  %150 = load i64, ptr %4, align 8
  ret i64 %150
}

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 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) #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 = { 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 = { 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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !12}


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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i64 @_Z5solveRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEll(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %1, i64 noundef %2) local_unnamed_addr #0 {
  %4 = alloca [10 x [10 x i64]], align 16
  %5 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 800, ptr nonnull %4) #3
  br label %.preheader57

.preheader57:                                     ; preds = %3, %.preheader57
  %.05059 = phi i64 [ 0, %3 ], [ %50, %.preheader57 ]
  %6 = add nsw i64 %.05059, %1
  %7 = srem i64 %6, 10
  %8 = add i64 %.05059, %2
  %9 = srem i64 %8, 10
  %10 = icmp eq i64 %7, 0
  %11 = icmp eq i64 %9, 0
  %or.cond = or i1 %10, %11
  %12 = select i1 %or.cond, i64 1, i64 1000000000000
  %13 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.05059, i64 0
  store i64 %12, ptr %13, align 16, !tbaa !5
  %14 = icmp eq i64 %7, 1
  %15 = icmp eq i64 %9, 1
  %or.cond81 = or i1 %14, %15
  %16 = select i1 %or.cond81, i64 1, i64 1000000000000
  %17 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.05059, i64 1
  store i64 %16, ptr %17, align 8, !tbaa !5
  %18 = icmp eq i64 %7, 2
  %19 = icmp eq i64 %9, 2
  %or.cond82 = or i1 %18, %19
  %20 = select i1 %or.cond82, i64 1, i64 1000000000000
  %21 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.05059, i64 2
  store i64 %20, ptr %21, align 16, !tbaa !5
  %22 = icmp eq i64 %7, 3
  %23 = icmp eq i64 %9, 3
  %or.cond83 = or i1 %22, %23
  %24 = select i1 %or.cond83, i64 1, i64 1000000000000
  %25 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.05059, i64 3
  store i64 %24, ptr %25, align 8, !tbaa !5
  %26 = icmp eq i64 %7, 4
  %27 = icmp eq i64 %9, 4
  %or.cond84 = or i1 %26, %27
  %28 = select i1 %or.cond84, i64 1, i64 1000000000000
  %29 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.05059, i64 4
  store i64 %28, ptr %29, align 16, !tbaa !5
  %30 = icmp eq i64 %7, 5
  %31 = icmp eq i64 %9, 5
  %or.cond85 = or i1 %30, %31
  %32 = select i1 %or.cond85, i64 1, i64 1000000000000
  %33 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.05059, i64 5
  store i64 %32, ptr %33, align 8, !tbaa !5
  %34 = icmp eq i64 %7, 6
  %35 = icmp eq i64 %9, 6
  %or.cond86 = or i1 %34, %35
  %36 = select i1 %or.cond86, i64 1, i64 1000000000000
  %37 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.05059, i64 6
  store i64 %36, ptr %37, align 16, !tbaa !5
  %38 = icmp eq i64 %7, 7
  %39 = icmp eq i64 %9, 7
  %or.cond87 = or i1 %38, %39
  %40 = select i1 %or.cond87, i64 1, i64 1000000000000
  %41 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.05059, i64 7
  store i64 %40, ptr %41, align 8, !tbaa !5
  %42 = icmp eq i64 %7, 8
  %43 = icmp eq i64 %9, 8
  %or.cond88 = or i1 %42, %43
  %44 = select i1 %or.cond88, i64 1, i64 1000000000000
  %45 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.05059, i64 8
  store i64 %44, ptr %45, align 16, !tbaa !5
  %46 = icmp eq i64 %7, 9
  %47 = icmp eq i64 %9, 9
  %or.cond89 = or i1 %46, %47
  %48 = select i1 %or.cond89, i64 1, i64 1000000000000
  %49 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.05059, i64 9
  store i64 %48, ptr %49, align 8, !tbaa !5
  %50 = add i64 %.05059, 1
  %exitcond.not = icmp eq i64 %50, 10
  br i1 %exitcond.not, label %.preheader55, label %.preheader57, !llvm.loop !9

.preheader55:                                     ; preds = %.preheader57, %124
  %.04662 = phi i64 [ %125, %124 ], [ 0, %.preheader57 ]
  %51 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04662, i64 0
  %52 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04662, i64 1
  %53 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04662, i64 2
  %54 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04662, i64 3
  %55 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04662, i64 4
  %56 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04662, i64 5
  %57 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04662, i64 6
  %58 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04662, i64 7
  %59 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04662, i64 8
  %60 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04662, i64 9
  br label %.preheader54

.preheader:                                       ; preds = %124
  %61 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  %.not5263 = icmp sgt i64 %61, 1
  br i1 %.not5263, label %.lr.ph, label %._crit_edge

.preheader54:                                     ; preds = %.preheader55, %.preheader54
  %.04561 = phi i64 [ 0, %.preheader55 ], [ %123, %.preheader54 ]
  %62 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04561, i64 %.04662
  %63 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04561, i64 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %64 = load i64, ptr %62, align 8, !tbaa !5
  %65 = load i64, ptr %51, align 16, !tbaa !5
  %66 = add nsw i64 %65, %64
  store i64 %66, ptr %5, align 8, !tbaa !5
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %68 = load i64, ptr %67, align 8, !tbaa !5
  store i64 %68, ptr %63, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %69 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04561, i64 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %70 = load i64, ptr %62, align 8, !tbaa !5
  %71 = load i64, ptr %52, align 8, !tbaa !5
  %72 = add nsw i64 %71, %70
  store i64 %72, ptr %5, align 8, !tbaa !5
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %74 = load i64, ptr %73, align 8, !tbaa !5
  store i64 %74, ptr %69, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %75 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04561, i64 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %76 = load i64, ptr %62, align 8, !tbaa !5
  %77 = load i64, ptr %53, align 16, !tbaa !5
  %78 = add nsw i64 %77, %76
  store i64 %78, ptr %5, align 8, !tbaa !5
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %80 = load i64, ptr %79, align 8, !tbaa !5
  store i64 %80, ptr %75, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %81 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04561, i64 3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %82 = load i64, ptr %62, align 8, !tbaa !5
  %83 = load i64, ptr %54, align 8, !tbaa !5
  %84 = add nsw i64 %83, %82
  store i64 %84, ptr %5, align 8, !tbaa !5
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %86 = load i64, ptr %85, align 8, !tbaa !5
  store i64 %86, ptr %81, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %87 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04561, i64 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %88 = load i64, ptr %62, align 8, !tbaa !5
  %89 = load i64, ptr %55, align 16, !tbaa !5
  %90 = add nsw i64 %89, %88
  store i64 %90, ptr %5, align 8, !tbaa !5
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %92 = load i64, ptr %91, align 8, !tbaa !5
  store i64 %92, ptr %87, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %93 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04561, i64 5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %94 = load i64, ptr %62, align 8, !tbaa !5
  %95 = load i64, ptr %56, align 8, !tbaa !5
  %96 = add nsw i64 %95, %94
  store i64 %96, ptr %5, align 8, !tbaa !5
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %98 = load i64, ptr %97, align 8, !tbaa !5
  store i64 %98, ptr %93, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %99 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04561, i64 6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %100 = load i64, ptr %62, align 8, !tbaa !5
  %101 = load i64, ptr %57, align 16, !tbaa !5
  %102 = add nsw i64 %101, %100
  store i64 %102, ptr %5, align 8, !tbaa !5
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %104 = load i64, ptr %103, align 8, !tbaa !5
  store i64 %104, ptr %99, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %105 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04561, i64 7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %106 = load i64, ptr %62, align 8, !tbaa !5
  %107 = load i64, ptr %58, align 8, !tbaa !5
  %108 = add nsw i64 %107, %106
  store i64 %108, ptr %5, align 8, !tbaa !5
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %110 = load i64, ptr %109, align 8, !tbaa !5
  store i64 %110, ptr %105, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %111 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04561, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %112 = load i64, ptr %62, align 8, !tbaa !5
  %113 = load i64, ptr %59, align 16, !tbaa !5
  %114 = add nsw i64 %113, %112
  store i64 %114, ptr %5, align 8, !tbaa !5
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %116 = load i64, ptr %115, align 8, !tbaa !5
  store i64 %116, ptr %111, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %117 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %.04561, i64 9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %118 = load i64, ptr %62, align 8, !tbaa !5
  %119 = load i64, ptr %60, align 8, !tbaa !5
  %120 = add nsw i64 %119, %118
  store i64 %120, ptr %5, align 8, !tbaa !5
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %122 = load i64, ptr %121, align 8, !tbaa !5
  store i64 %122, ptr %117, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %123 = add nuw nsw i64 %.04561, 1
  %exitcond69.not = icmp eq i64 %123, 10
  br i1 %exitcond69.not, label %124, label %.preheader54, !llvm.loop !11

124:                                              ; preds = %.preheader54
  %125 = add nuw nsw i64 %.04662, 1
  %exitcond70.not = icmp eq i64 %125, 10
  br i1 %exitcond70.not, label %.preheader, label %.preheader55, !llvm.loop !12

.lr.ph:                                           ; preds = %.preheader, %137
  %.04065 = phi i64 [ %140, %137 ], [ 1, %.preheader ]
  %.04164 = phi i64 [ %139, %137 ], [ 0, %.preheader ]
  %126 = add nsw i64 %.04065, -1
  %127 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %126)
  %128 = load i8, ptr %127, align 1, !tbaa !13
  %129 = sext i8 %128 to i64
  %130 = add nsw i64 %129, -48
  %131 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %.04065)
  %132 = load i8, ptr %131, align 1, !tbaa !13
  %133 = sext i8 %132 to i64
  %134 = add nsw i64 %133, -48
  %135 = getelementptr inbounds [10 x [10 x i64]], ptr %4, i64 0, i64 %130, i64 %134
  %136 = load i64, ptr %135, align 8, !tbaa !5
  %.not = icmp eq i64 %136, 1000000000000
  br i1 %.not, label %._crit_edge, label %137

137:                                              ; preds = %.lr.ph
  %138 = add i64 %.04164, -1
  %139 = add i64 %138, %136
  %140 = add nuw nsw i64 %.04065, 1
  %141 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  %.not52 = icmp slt i64 %140, %141
  br i1 %.not52, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph, %137, %.preheader
  %spec.select = phi i64 [ 0, %.preheader ], [ %139, %137 ], [ -1, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 800, ptr nonnull %4) #3
  ret i64 %spec.select
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(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

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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !10}


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