; LLVM IR from eyangch/competitive-programming :: USACOcontests/silver/2019.01 (perimeter)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4calcRiRA1000_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_S_RA1000_A1000_bii(ptr noundef nonnull align 4 dereferenceable(4) %0, ptr noundef nonnull align 8 dereferenceable(32000) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 1 dereferenceable(1000000) %4, i32 noundef %5, i32 noundef %6) #0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store i32 %5, ptr %13, align 4, !tbaa !9
  store i32 %6, ptr %14, align 4, !tbaa !9
  %15 = load i32, ptr %13, align 4, !tbaa !9
  %16 = icmp slt i32 %15, 0
  br i1 %16, label %53, label %17

17:                                               ; preds = %7
  %18 = load i32, ptr %14, align 4, !tbaa !9
  %19 = icmp slt i32 %18, 0
  br i1 %19, label %53, label %20

20:                                               ; preds = %17
  %21 = load i32, ptr %13, align 4, !tbaa !9
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = load i32, ptr %22, align 4, !tbaa !9
  %24 = sub nsw i32 %23, 1
  %25 = icmp sgt i32 %21, %24
  br i1 %25, label %53, label %26

26:                                               ; preds = %20
  %27 = load i32, ptr %14, align 4, !tbaa !9
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %30 = sub nsw i32 %29, 1
  %31 = icmp sgt i32 %27, %30
  br i1 %31, label %53, label %32

32:                                               ; preds = %26
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  %34 = load i32, ptr %13, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [1000 x [1000 x i8]], ptr %33, i64 0, i64 %35
  %37 = load i32, ptr %14, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [1000 x i8], ptr %36, i64 0, i64 %38
  %40 = load i8, ptr %39, align 1, !tbaa !11, !range !13, !noundef !14
  %41 = trunc i8 %40 to i1
  br i1 %41, label %53, label %42

42:                                               ; preds = %32
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = load i32, ptr %13, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [1000 x %"class.std::__cxx11::basic_string"], ptr %43, i64 0, i64 %45
  %47 = load i32, ptr %14, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %46, i64 noundef %48)
  %50 = load i8, ptr %49, align 1, !tbaa !15
  %51 = sext i8 %50 to i32
  %52 = icmp eq i32 %51, 46
  br i1 %52, label %53, label %54

53:                                               ; preds = %42, %32, %26, %20, %17, %7
  br label %179

54:                                               ; preds = %42
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  %56 = load i32, ptr %13, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [1000 x [1000 x i8]], ptr %55, i64 0, i64 %57
  %59 = load i32, ptr %14, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [1000 x i8], ptr %58, i64 0, i64 %60
  store i8 1, ptr %61, align 1, !tbaa !11
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %62, align 4, !tbaa !9
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %79, label %67

67:                                               ; preds = %54
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = sub nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [1000 x %"class.std::__cxx11::basic_string"], ptr %68, i64 0, i64 %71
  %73 = load i32, ptr %14, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %72, i64 noundef %74)
  %76 = load i8, ptr %75, align 1, !tbaa !15
  %77 = sext i8 %76 to i32
  %78 = icmp eq i32 %77, 46
  br i1 %78, label %79, label %83

79:                                               ; preds = %67, %54
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %80, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %79, %67
  %84 = load i32, ptr %13, align 4, !tbaa !9
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = sub nsw i32 %86, 1
  %88 = icmp eq i32 %84, %87
  br i1 %88, label %101, label %89

89:                                               ; preds = %83
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = load i32, ptr %13, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [1000 x %"class.std::__cxx11::basic_string"], ptr %90, i64 0, i64 %93
  %95 = load i32, ptr %14, 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) %94, i64 noundef %96)
  %98 = load i8, ptr %97, align 1, !tbaa !15
  %99 = sext i8 %98 to i32
  %100 = icmp eq i32 %99, 46
  br i1 %100, label %101, label %105

101:                                              ; preds = %89, %83
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %102, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %101, %89
  %106 = load i32, ptr %14, align 4, !tbaa !9
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %120, label %108

108:                                              ; preds = %105
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = load i32, ptr %13, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [1000 x %"class.std::__cxx11::basic_string"], ptr %109, i64 0, i64 %111
  %113 = load i32, ptr %14, align 4, !tbaa !9
  %114 = sub nsw i32 %113, 1
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %112, i64 noundef %115)
  %117 = load i8, ptr %116, align 1, !tbaa !15
  %118 = sext i8 %117 to i32
  %119 = icmp eq i32 %118, 46
  br i1 %119, label %120, label %124

120:                                              ; preds = %108, %105
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = load i32, ptr %121, align 4, !tbaa !9
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %121, align 4, !tbaa !9
  br label %124

124:                                              ; preds = %120, %108
  %125 = load i32, ptr %14, align 4, !tbaa !9
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = sub nsw i32 %127, 1
  %129 = icmp eq i32 %125, %128
  br i1 %129, label %142, label %130

130:                                              ; preds = %124
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = load i32, ptr %13, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [1000 x %"class.std::__cxx11::basic_string"], ptr %131, i64 0, i64 %133
  %135 = load i32, ptr %14, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %134, i64 noundef %137)
  %139 = load i8, ptr %138, align 1, !tbaa !15
  %140 = sext i8 %139 to i32
  %141 = icmp eq i32 %140, 46
  br i1 %141, label %142, label %146

142:                                              ; preds = %130, %124
  %143 = load ptr, ptr %10, align 8, !tbaa !5
  %144 = load i32, ptr %143, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %143, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %142, %130
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  %151 = load ptr, ptr %12, align 8, !tbaa !5
  %152 = load i32, ptr %13, align 4, !tbaa !9
  %153 = add nsw i32 %152, 1
  %154 = load i32, ptr %14, align 4, !tbaa !9
  call void @_Z4calcRiRA1000_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_S_RA1000_A1000_bii(ptr noundef nonnull align 4 dereferenceable(4) %147, ptr noundef nonnull align 8 dereferenceable(32000) %148, ptr noundef nonnull align 4 dereferenceable(4) %149, ptr noundef nonnull align 4 dereferenceable(4) %150, ptr noundef nonnull align 1 dereferenceable(1000000) %151, i32 noundef %153, i32 noundef %154)
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = load ptr, ptr %10, align 8, !tbaa !5
  %158 = load ptr, ptr %11, align 8, !tbaa !5
  %159 = load ptr, ptr %12, align 8, !tbaa !5
  %160 = load i32, ptr %13, align 4, !tbaa !9
  %161 = sub nsw i32 %160, 1
  %162 = load i32, ptr %14, align 4, !tbaa !9
  call void @_Z4calcRiRA1000_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_S_RA1000_A1000_bii(ptr noundef nonnull align 4 dereferenceable(4) %155, ptr noundef nonnull align 8 dereferenceable(32000) %156, ptr noundef nonnull align 4 dereferenceable(4) %157, ptr noundef nonnull align 4 dereferenceable(4) %158, ptr noundef nonnull align 1 dereferenceable(1000000) %159, i32 noundef %161, i32 noundef %162)
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  %165 = load ptr, ptr %10, align 8, !tbaa !5
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  %167 = load ptr, ptr %12, align 8, !tbaa !5
  %168 = load i32, ptr %13, align 4, !tbaa !9
  %169 = load i32, ptr %14, align 4, !tbaa !9
  %170 = add nsw i32 %169, 1
  call void @_Z4calcRiRA1000_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_S_RA1000_A1000_bii(ptr noundef nonnull align 4 dereferenceable(4) %163, ptr noundef nonnull align 8 dereferenceable(32000) %164, ptr noundef nonnull align 4 dereferenceable(4) %165, ptr noundef nonnull align 4 dereferenceable(4) %166, ptr noundef nonnull align 1 dereferenceable(1000000) %167, i32 noundef %168, i32 noundef %170)
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = load ptr, ptr %9, align 8, !tbaa !5
  %173 = load ptr, ptr %10, align 8, !tbaa !5
  %174 = load ptr, ptr %11, align 8, !tbaa !5
  %175 = load ptr, ptr %12, align 8, !tbaa !5
  %176 = load i32, ptr %13, align 4, !tbaa !9
  %177 = load i32, ptr %14, align 4, !tbaa !9
  %178 = sub nsw i32 %177, 1
  call void @_Z4calcRiRA1000_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_S_RA1000_A1000_bii(ptr noundef nonnull align 4 dereferenceable(4) %171, ptr noundef nonnull align 8 dereferenceable(32000) %172, ptr noundef nonnull align 4 dereferenceable(4) %173, ptr noundef nonnull align 4 dereferenceable(4) %174, ptr noundef nonnull align 1 dereferenceable(1000000) %175, i32 noundef %176, i32 noundef %178)
  br label %179

179:                                              ; preds = %146, %53
  ret void
}

; 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

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

!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 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!7, !7, i64 0}


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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z4calcRiRA1000_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_S_RA1000_A1000_bii(ptr noundef nonnull align 4 dereferenceable(4) %0, ptr noundef nonnull align 8 dereferenceable(32000) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 1 dereferenceable(1000000) %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr #0 {
  %8 = zext nneg i32 %5 to i64
  %9 = getelementptr inbounds [1000 x %"class.std::__cxx11::basic_string"], ptr %1, i64 0, i64 %8
  %10 = or i32 %6, %5
  %or.cond.not75 = icmp sgt i32 %10, -1
  br i1 %or.cond.not75, label %.lr.ph, label %tailrecurse._crit_edge

.lr.ph:                                           ; preds = %7
  %11 = icmp eq i32 %5, 0
  %12 = add nsw i32 %5, -1
  %13 = zext nneg i32 %12 to i64
  %14 = getelementptr inbounds [1000 x %"class.std::__cxx11::basic_string"], ptr %1, i64 0, i64 %13
  %15 = add nuw nsw i32 %5, 1
  %16 = zext nneg i32 %15 to i64
  %17 = getelementptr inbounds [1000 x %"class.std::__cxx11::basic_string"], ptr %1, i64 0, i64 %16
  br label %18

18:                                               ; preds = %.lr.ph, %tailrecurse
  %.tr7476 = phi i32 [ %6, %.lr.ph ], [ %72, %tailrecurse ]
  %19 = load i32, ptr %0, align 4, !tbaa !5
  %.not = icmp sgt i32 %19, %5
  %.not68 = icmp sgt i32 %19, %.tr7476
  %or.cond = and i1 %.not, %.not68
  br i1 %or.cond, label %20, label %tailrecurse._crit_edge

20:                                               ; preds = %18
  %21 = zext nneg i32 %.tr7476 to i64
  %22 = getelementptr inbounds [1000 x [1000 x i8]], ptr %4, i64 0, i64 %8, i64 %21
  %23 = load i8, ptr %22, align 1, !tbaa !9, !range !11, !noundef !12
  %24 = trunc nuw i8 %23 to i1
  br i1 %24, label %tailrecurse._crit_edge, label %25

25:                                               ; preds = %20
  %26 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %9, i64 noundef %21)
  %27 = load i8, ptr %26, align 1, !tbaa !13
  %28 = icmp eq i8 %27, 46
  br i1 %28, label %tailrecurse._crit_edge, label %29

29:                                               ; preds = %25
  store i8 1, ptr %22, align 1, !tbaa !9
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %3, align 4, !tbaa !5
  br i1 %11, label %36, label %32

32:                                               ; preds = %29
  %33 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %14, i64 noundef %21)
  %34 = load i8, ptr %33, align 1, !tbaa !13
  %35 = icmp eq i8 %34, 46
  br i1 %35, label %36, label %39

36:                                               ; preds = %32, %29
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %2, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %36, %32
  %40 = load i32, ptr %0, align 4, !tbaa !5
  %41 = add nsw i32 %40, -1
  %42 = icmp eq i32 %41, %5
  br i1 %42, label %47, label %43

43:                                               ; preds = %39
  %44 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef %21)
  %45 = load i8, ptr %44, align 1, !tbaa !13
  %46 = icmp eq i8 %45, 46
  br i1 %46, label %47, label %50

47:                                               ; preds = %43, %39
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %2, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %47, %43
  %51 = icmp eq i32 %.tr7476, 0
  br i1 %51, label %58, label %52

52:                                               ; preds = %50
  %53 = add nsw i32 %.tr7476, -1
  %54 = zext nneg i32 %53 to i64
  %55 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %9, i64 noundef %54)
  %56 = load i8, ptr %55, align 1, !tbaa !13
  %57 = icmp eq i8 %56, 46
  br i1 %57, label %58, label %61

58:                                               ; preds = %52, %50
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %2, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %58, %52
  %62 = load i32, ptr %0, align 4, !tbaa !5
  %63 = add nsw i32 %62, -1
  %64 = icmp eq i32 %63, %.tr7476
  %.pre79 = add nuw nsw i32 %.tr7476, 1
  br i1 %64, label %._crit_edge, label %65

65:                                               ; preds = %61
  %66 = zext nneg i32 %.pre79 to i64
  %67 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %9, i64 noundef %66)
  %68 = load i8, ptr %67, align 1, !tbaa !13
  %69 = icmp eq i8 %68, 46
  br i1 %69, label %._crit_edge, label %tailrecurse

._crit_edge:                                      ; preds = %61, %65
  %70 = load i32, ptr %2, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %2, align 4, !tbaa !5
  br label %tailrecurse

tailrecurse:                                      ; preds = %._crit_edge, %65
  tail call void @_Z4calcRiRA1000_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_S_RA1000_A1000_bii(ptr noundef nonnull align 4 dereferenceable(4) %0, ptr noundef nonnull align 8 dereferenceable(32000) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 1 dereferenceable(1000000) %4, i32 noundef %15, i32 noundef %.tr7476)
  tail call void @_Z4calcRiRA1000_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_S_RA1000_A1000_bii(ptr noundef nonnull align 4 dereferenceable(4) %0, ptr noundef nonnull align 8 dereferenceable(32000) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 1 dereferenceable(1000000) %4, i32 noundef %12, i32 noundef %.tr7476)
  tail call void @_Z4calcRiRA1000_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_S_RA1000_A1000_bii(ptr noundef nonnull align 4 dereferenceable(4) %0, ptr noundef nonnull align 8 dereferenceable(32000) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 1 dereferenceable(1000000) %4, i32 noundef %5, i32 noundef %.pre79)
  %72 = add nsw i32 %.tr7476, -1
  %73 = or i32 %72, %5
  %or.cond.not = icmp sgt i32 %73, -1
  br i1 %or.cond.not, label %18, label %tailrecurse._crit_edge

tailrecurse._crit_edge:                           ; preds = %25, %20, %18, %tailrecurse, %7
  ret void
}

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

!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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!7, !7, i64 0}


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